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
#~/usr/bin/env python #-*- coding: utf-8 -*- import matplotlib.pyplot as plt import os import numpy as np # set global settings def init_plotting(): plt.rcParams['figure.figsize'] = (4, 3) plt.rcParams['font.size'] = 8 #plt.rcParams['font.family'] = 'Arial' plt.rcParams['axes.labelsize'] = plt.rcParam...
KEHANG/AutoFragmentModeling
ipython/3. reporting/mw_distri_comparison.py
Python
mit
3,469
def a_funcao_que_vai_gerar_problema(seila, qualquer, coisa): print('A funcao problemática ' + seila.title() + ' ' + qualquer.title() + ' ' + coisa.title()) a_funcao_que_vai_gerar_problema() ''' Este ocorre pq eu chamaei a funcao na linha 4 e não passei o valores para o argumento da função. '''
zirou30/python_student
135.py
Python
gpl-3.0
306
""" Read in and access data from external resources such as gender lists.""" import os import pickle import cort from cort.core import singletons from cort.core import util __author__ = 'smartschat' @singletons.Singleton class GenderData: """ Read in and access data from lists with gender information. A...
Yegor-Budnikov/cort
cort/core/external_data.py
Python
mit
4,384
# systemRocketThermalDamage # # Used by: # Celestials named like: Wolf Rayet Effect Beacon Class (6 of 6) runTime = "early" type = ("projected", "passive") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Rockets"), ...
Ebag333/Pyfa
eos/effects/systemrocketthermaldamage.py
Python
gpl-3.0
483
import smtplib import pystache import os import html.parser from email.mime.text import MIMEText from werkzeug.utils import secure_filename from flask import url_for from srht.database import db from srht.objects import User from srht.config import _cfg, _cfgi def send_invite(user): if _cfg("smtp-host") == "": ...
Debetux/sr.ht
srht/email.py
Python
mit
2,414
# Copyright (c) 2014 Rackspace, 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 wr...
rackerlabs/finding_dory
dory/storage/memory/driver.py
Python
apache-2.0
983
from colab.widgets.widget_manager import WidgetManager from colab_taiga.widgets.user_story import UserStoriesWidget WidgetManager.register_widget('list', UserStoriesWidget())
mes-2016-1/colab-taiga-plugin
tests/widgets.d/user_profile_widget.py
Python
gpl-3.0
177
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbmetrictable_binding.py
Python
apache-2.0
3,682
# 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 applica...
AnishShah/tensorflow
tensorflow/python/autograph/impl/conversion.py
Python
apache-2.0
13,712
from OpenGLCffi.GL import params @params(api='gl', prms=[]) def glGetInstrumentsSGIX(): pass @params(api='gl', prms=['size', 'buffer']) def glInstrumentsBufferSGIX(size, buffer): pass @params(api='gl', prms=['marker_p']) def glPollInstrumentsSGIX(marker_p): pass @params(api='gl', prms=['marker']) def glReadIns...
cydenix/OpenGLCffi
OpenGLCffi/GL/EXT/SGIX/instruments.py
Python
mit
493
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_fetchmail_notify_error_to_sender
OCA/server-tools
fetchmail_notify_error_to_sender_test/tests/__init__.py
Python
agpl-3.0
117
# Copyright 2021 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
google/pigweed
pw_bloat/py/setup.py
Python
apache-2.0
689
from queue import Queue q = Queue(10) q.put("wo") q.put("ai") q.put(["am", "das"]) print(q.get()) print(q.get()) print(q.get()) print(q.get())
lancerpilgrim/Hello-World-
Python/test/multiporcess_test.py
Python
gpl-3.0
146
""" A modification of pyjamas DeferredMethod @author: Tobias Weber @contact: tobi-weber@gmx.de """ from pyjamas.Timer import Timer global deferredHandlers deferredHandlers = [] global timerIsActive timerIsActive = False def add(handler, arguments=[]): deferredHandlers.append([handler, arguments]) maybeS...
minghuascode/pyj
addons/DeferredHandler.py
Python
apache-2.0
927
# NOTIFY_PROCESS = 1 NOTIFY_SHUTDOWN = 2 NOTIFY_REQUEST = 3
wandb/client
wandb/sdk/interface/constants.py
Python
mit
60
from enum import Enum from PyQt5.QtCore import pyqtSignal, QSize from PyQt5.QtWidgets import QTabBar, QWidget, QRadioButton, QHBoxLayout, \ QStyle, QProxyStyle from PyQt5.QtGui import QPalette from feeluown.gui.helpers import resize_font def mode(func): def wrapper(this): this.songs_btn.hide() ...
cosven/FeelUOwn
feeluown/gui/widgets/tabbar.py
Python
gpl-3.0
7,314
# encoding: utf-8 from django.db import models class FormDataQuerySet(models.QuerySet): def user_related(self, user_id): """This QS returns all user related Forms.""" from .models import FormData return self.filter(author=user_id) class FormDataManager(models.Manager): use_for_related...
transcode-de/hopper
form_data/managers.py
Python
bsd-3-clause
335
# Copyright 2013-2020 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) from spack import * class ArgpStandalone(AutotoolsPackage): """Standalone version of the argp interface from glibc ...
rspavel/spack
var/spack/repos/builtin/packages/argp-standalone/package.py
Python
lgpl-2.1
1,235
import rdtest import renderdoc as rd class VK_Adv_CBuffer_Zoo(rdtest.TestCase): def get_capture(self): return rdtest.run_and_capture("demos_x64", "VK_Adv_CBuffer_Zoo", 5) def check_capture(self): draw = self.find_draw("Draw") self.check(draw is not None) self.controller.SetF...
googlestadia/renderdoc
util/test/tests/Vulkan/VK_Adv_CBuffer_Zoo.py
Python
mit
11,714
#coding:utf-8 ################################# #Copyright(c) 2014 dtysky ################################# import G2R class BgDefine(G2R.DefineSyntax): def Creat(self,Flag,US,FS,DictHash): DictHash=G2R.DefineSyntax.Creat(self,Flag,US,FS,DictHash) if DictHash[Flag]==G2R.DHash(US.Args[Flag]): return DictHash ...
dtysky/Gal2Renpy
Gal2Renpy/DefineSyntax/BgDefine.py
Python
mit
894
import logging from chatterbot import languages from chatterbot.tagging import PosLemmaTagger class StorageAdapter(object): """ This is an abstract class that represents the interface that all storage adapters should implement. """ def __init__(self, *args, **kwargs): """ Initiali...
vkosuri/ChatterBot
chatterbot/storage/storage_adapter.py
Python
bsd-3-clause
5,956
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HSS2_if_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HSS2_if_CompleteLHS. """ # Flag th...
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/from_thesis/HSS2_if_CompleteLHS.py
Python
mit
4,871
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Run any Kodi VRT NU plugin:// URL on the commandline""" from __future__ import absolute_import, division, print_functi...
pietje666/plugin.video.vrt.nu
tests/run.py
Python
gpl-3.0
1,293
""" Utility classes and functions for the polynomial modules. This module provides: error and warning objects; a polynomial base class; and some routines used in both the `polynomial` and `chebyshev` modules. Error objects ------------- .. autosummary:: :toctree: generated/ PolyError base class for...
abalkin/numpy
numpy/polynomial/polyutils.py
Python
bsd-3-clause
23,140
from django.conf import settings from neuigkeiten.models import * from pywebpush import webpush import json def notify(subscribers, title, body, icon, link, identifier): data_obj = { 'title': title, 'body': body, 'icon': icon, 'link': link } data = json.dumps(data_obj).encode("utf-8") print("webPush notif...
d120/kifplan
neuigkeiten/gcm_handler.py
Python
agpl-3.0
862
import matplotlib.pylab as plt import numpy as np # Open the file and read everything as a string into 'f' f = open('fitout.dat','r') #Separate the lines lines = f.readlines()[0:] #Close the file f.close() # Initialise lists to add the data to temp = [] rawpt = [] for line in lines: # Split our line into columns...
pw31/GGchem
data/JANAF/fitplot.py
Python
gpl-3.0
1,139
# -*- coding: utf-8 -*- # # Cloud Robotics FX 会話理解API用メッセージ # # @author: Osamu Noguchi <noguchi@headwaters.co.jp> # @version: 0.0.1 import cloudrobotics.message as message APP_ID = 'SbrApiServices' PROCESSING_ID = 'RbAppConversationApi' # 会話メッセージ # class ConversationMessage(message.CRFXMessage): def __init__...
seijim/cloud-robotics-fx-v2
CloudRoboticsApi/ClientCode_Pepper/HeadWaters/PepperCode2/lib/cloudrobotics/conversation/message.py
Python
mit
746
# Copyright 2016 Twitter. 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 agree...
cliffyg/heron
heron/common/src/python/color.py
Python
apache-2.0
904
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
mbohlool/client-python
kubernetes/client/models/v1_watch_event.py
Python
apache-2.0
4,232
from HTMLComponent import HTMLComponent from GUIComponent import GUIComponent from skin import parseColor, parseFont from enigma import eListboxServiceContent, eListbox, eServiceCenter, eServiceReference, gFont, eRect, eSize, getDesktop from Tools.LoadPixmap import LoadPixmap from Tools.TextBoundary import getTextBoun...
trunca/enigma2
lib/python/Components/ServiceList.py
Python
gpl-2.0
16,269
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2010 TUBITAK/UEKAE # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # ...
hknyldz/pisitools
pisilinux-python/pisilinux/iniutils.py
Python
gpl-3.0
6,863
from collections import deque from itertools import zip_longest from functools import reduce def get_at(n, seq): """ Get the value at offset n of a non-indexed sequence :param n: The index of the value to get :param seq: The sequence to get the value from :return: The value at the given sequence ...
doozr/euler.py
euler/iter.py
Python
gpl-3.0
6,661
# Copyright 2018 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
google/deepvariant
tools/print_f1.py
Python
bsd-3-clause
3,132
from PyQt4.QtGui import * from PyQt4.QtCore import * from ..view.Ui_MaintenanceForm import * from ..model.DatabaseHelper import * from ..model.core_classes import CoMaintenance from ..utils.PluginUtils import * from MaintenanceDialog import * class MaintenanceForm(QWidget, Ui_MaintenanceForm, DatabaseHelper): de...
gc-i/wntOS
controller/MaintenanceForm.py
Python
gpl-3.0
5,960
class OptimizationResult(dict): def __getattr__(self, name): try: return self[name] except KeyError: raise AttributeError(name) __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __repr__(self): if self.keys(): header = '\n' ...
tensorprob/tensorprob
tensorprob/optimization_result.py
Python
mit
603
# Copyright 2016 - 2020 Nick Boultbee # # 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. import os import sys if os.nam...
Mellthas/quodlibet
quodlibet/ext/events/mqtt.py
Python
gpl-2.0
8,776
import collections import time from urllib import parse as urlp import requests from . import oauth, errors, responses from .ratelimit import RateLimiter AUTH_DOMAIN = 'https://oauth.reddit.com/' WWW_DOMAIN = 'https://www.reddit.com/' Domain = collections.namedtuple('Domain', ['auth', 'www']) class Snooble(objec...
MrJohz/snooble
snooble/__init__.py
Python
mit
4,756
"""Test class for Ostree Branch CLI. :Requirement: Ostreebranch :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: ContentManagement :Assignee: ltran :TestType: Functional :CaseImportance: High :Upstream: No """ import random import pytest from nailgun import entities from robottelo.cli.content...
rplevka/robottelo
tests/foreman/cli/test_ostreebranch.py
Python
gpl-3.0
4,984
#!/usr/bin/python # -*- coding:utf-8 -*- from setuptools import setup setup( name='Earo', version='0.1.0', url='https://github.com/Everley1993/Laky-Earo', license='Apache', author='Everley', author_email='463785757@qq.com', description='A microframework based on EDA for business logic devel...
Everley1993/Laky-Earo
setup.py
Python
apache-2.0
608
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
waynecoulson/TV-Show-Downloader
sickbeard/processTV.py
Python
gpl-3.0
5,816
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import hashlib import logging import random import socket import threading import cherrypy import zxcvbn from flask import Flask, abort, redirect from flask_login import U...
gazpachoking/Flexget
flexget/webserver.py
Python
mit
7,723
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
ArchiFleKs/magnum
magnum/tests/unit/api/base.py
Python
apache-2.0
10,585
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
Brocade-OpenSource/OpenStack-DNRM-Nova
nova/tests/api/openstack/compute/contrib/test_extended_availability_zone.py
Python
apache-2.0
5,956
# -*- coding: utf-8 -*- """ Test for contract_operation students feature """ from collections import OrderedDict import ddt import hashlib import json from mock import patch from django.core.urlresolvers import reverse from django.db import IntegrityError from django.http import HttpResponse from biz.dj...
nttks/edx-platform
biz/djangoapps/ga_contract_operation/tests/test_views_students.py
Python
agpl-3.0
53,512
# Django settings for yatodo project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS # DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. # 'NAME': '', ...
lumannnn/yatodo
yatodo/settings.py
Python
gpl-3.0
5,514
# Copyright (c) 2012-2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the...
mibanescu/pulp_win
common/pulp_win/common/ids.py
Python
gpl-2.0
1,272
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
jcoady9/beets
beets/util/hidden.py
Python
mit
2,869
# -*- coding: utf-8 -*- from fabric.api import env from . import (ucc, server, dist) env.always_use_pty = False env.use_ssh_config = True
sergeii/swat-utils
fabfile/__init__.py
Python
mit
141
# Copyright 2015, Rackspace, US, Inc. # Copyright 2015, Hewlett-Packard Development Company, L.P. # # 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...
idjaw/horizon
openstack_dashboard/test/api_tests/glance_rest_tests.py
Python
apache-2.0
4,820
# Copyright (C) 2013 Matthew C. Zwier and Lillian T. Chong # # This file is part of WESTPA. # # WESTPA 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...
ajoshpratt/westpa
lib/west_tools/tests/testbinning.py
Python
gpl-3.0
13,938
from nipype.interfaces.base import BaseInterface, \ BaseInterfaceInputSpec, traits, File, TraitedSpec import nibabel as nb import numpy as np import scipy.stats as stats from scipy import ndimage import csv import os import re from collections import OrderedDict def calc_center_of_region(region_id, atlas): # ...
medihack/blink
pipelines/src/blink_interface.py
Python
bsd-3-clause
21,237
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to welcome new users. This script works out of the box for Wikis that have been defined in the script. Ensure you have community support before running this bot! Everything that needs customisation to support additional projects is indicated by comments. Descript...
PersianWikipedia/pywikibot-core
scripts/welcome.py
Python
mit
42,163
from socket import * from pytroykaimu import TroykaIMU import time import datetime # Адрес HOST = '' PORT = 21567 BUFSIZ = 128 ADDR = (HOST, PORT) imu = TroykaIMU() tcpSerSock = socket(AF_INET, SOCK_STREAM) tcpSerSock.bind(ADDR) tcpSerSock.listen(5) # Запрет на ожидание # tcpSerSock.setblocking(False) def print_log...
Shatki/PyIMU
calibration/pyIMUCalibrationServer.py
Python
gpl-3.0
2,005
#tweepy1.py - To test trend obtaining import sys sys.path.append('/home/vijay/.local/lib/python2.7/site-packages') import tweepy import woeid import yweather import time import os import sys reload(sys) #Configure Tweepy API t0 = time.time() consumer_key = 'Osyy0PSrhMRpnIWxjBLzLJeKR' consumer_secret = 'AYY7Qb48y...
Kronosfear/inkbot
miner.py
Python
mit
1,440
# Copyright 2013-2016 DataStax, 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 writi...
markflorisson/python-driver
tests/integration/standard/test_cluster.py
Python
apache-2.0
27,347
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import range from rlpy.Representations.Representation import Representation import num...
rlpy/rlpy
tests/test_agents/test_tdcagents.py
Python
bsd-3-clause
4,790
import io import typing from kaitaistruct import KaitaiStream from mitmproxy.contrib.kaitaistruct import png from mitmproxy.contrib.kaitaistruct import gif from mitmproxy.contrib.kaitaistruct import jpeg from mitmproxy.contrib.kaitaistruct import ico Metadata = typing.List[typing.Tuple[str, str]] def parse_png(dat...
ujjwal96/mitmproxy
mitmproxy/contentviews/image/image_parser.py
Python
mit
4,094
# ext/orderinglist.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """A custom list that manages index/position information for its children. :autho...
nabsboss/CouchPotatoServer
libs/sqlalchemy/ext/orderinglist.py
Python
gpl-3.0
12,250
# -*- coding: utf-8 -*- # Copyright: (c) 2018, SylvainCecchetto # GNU General Public License v2.0+ (see LICENSE.txt or https://www.gnu.org/licenses/gpl-2.0.txt) # This file is part of Catch-up TV & More from __future__ import unicode_literals import json import re import inputstreamhelper from codequick import Listi...
Catch-up-TV-and-More/plugin.video.catchuptvandmore
resources/lib/channels/it/la7.py
Python
gpl-2.0
4,988
import _SilverCity from _SilverCity import * def get_default_stylesheet_location(): """get_default_stylesheet_location() => file path Returns the path of the default cascading style sheet (CSS) file that is installed with the rest of the SilverCity package.""" import os css_file = os.path.join(...
archifix/settings
sublime/Packages/SublimeCodeIntel/libs/SilverCity/__init__.py
Python
mit
559
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
JakubBrachTieto/openthread
tests/scripts/thread-cert/Cert_5_3_09_AddressQuery.py
Python
bsd-3-clause
5,797
""" Markov based methods for spatial dynamics. """ __author__ = "Sergio J. Rey <srey@asu.edu" __all__ = ["Markov", "LISA_Markov", "Spatial_Markov", "kullback", "prais", "shorrock", "homogeneity"] import numpy as np import numpy.linalg as la from pysal.spatial_dynamics.ergodic import fmpt, steady_state from...
schmidtc/pysal
pysal/spatial_dynamics/markov.py
Python
bsd-3-clause
57,662
import settingsManager import pygame import xml.etree.ElementTree as ElementTree import xml.dom.minidom import os import engine.baseActions as baseActions import engine.collisionBox as collisionBox import weakref import engine.hurtbox as hurtbox import math import numpy import spriteManager import engine.article as art...
eaglgenes101/universalSmashSystem
engine/abstractFighter.py
Python
gpl-3.0
73,550
# Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) # Copyright 2015 Techcable # # 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 r...
Techcable/DiffUtils
diffutils/_myers.py
Python
apache-2.0
7,995
# everscan/modules/ui/uiErrors.py class UIInitializeError(Exception): pass
kkerwin1/everscan
modules/ui/uiErrors.py
Python
bsd-2-clause
79
# Prints # - n sprites # - random type over names # - random step intervals over low and high # - random X position over low and high # # sprites(100, 1000, ["bush1", "boulder1"], [5, 12], [2.5, 4.8], 0.0) import random def sprites(amount, start, names, steps, pos, y): z = start for n in range(amount - 1...
buntine/SwervinMervin
scripts/sprites.py
Python
gpl-2.0
487
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Run Sphinx, the Python documentation tool. First try running Sphinx installed in the current Python build. If that fails, try the standard ``sphinx-build`` command which may be installed in a different Python version. If that fails, punt. Originals at...
cyberbeast/pympler
tools/sphinx.py
Python
apache-2.0
595
from __future__ import absolute_import import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket try: # Python 3 from queue import LifoQueue, Empty, Full except ImportError: from Queue import LifoQueue, Empty, Full # Queue is im...
b-jesch/service.fritzbox.callmonitor
resources/lib/PhoneBooks/pyicloud/vendorlibs/requests/packages/urllib3/connectionpool.py
Python
gpl-2.0
32,717
#!venv/bin/python from app import app if __name__ == '__main__': app.run(debug=True)
marcusmchale/breedcafs
run.py
Python
gpl-3.0
86
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). # (C) 2011 - 2013 Therp BV (<http://therp.nl>). # # All other contributions are (C) by their respective contributors # # All Rights ...
NL66278/bank-payment
__unported__/account_banking_payment_export/model/payment_mode.py
Python
agpl-3.0
2,390
#This is used for outputting errors to the user. ERROR_FILE = open("../error.html","w") ERROR_HEADER = open("../res/error_header.html","r").read() LEVELS = ["WARNING","FAIL"] errors = [] def processError(level,line,title,message): errors.append([level,line,title,message]) def showErrors(): ERROR_FILE.writ...
Wezro/Syntax
src/Error.py
Python
mit
604
from setuptools import setup, find_packages DESCRIPTION = """ Send emails based on a Django template See: https://github.com/prestontimmons/django-email-template """ setup( name="django-email-template", version="1.0.2", description="Send emails based on a Django template", long_description=DESCRIPT...
funkybob/django-email-template
setup.py
Python
mit
433
# -*- coding: utf-8 -*- from __future__ import with_statement import os import sys import traceback # monkey patch bug in python 2.6 and lower # http://bugs.python.org/issue6122 , http://bugs.python.org/issue1236 , http://bugs.python.org/issue1731717 if sys.version_info < (2, 7) and os.name != "nt": import errno...
benbox69/pyload
module/plugins/hooks/ExtractArchive.py
Python
gpl-3.0
21,976
#!/usr/bin/env python """ ================================================= is_inside.py - Polygon/Point Test Python Function ================================================= A Python implementation of the ray to infinity even-odd test to determin if a point is inside the specified polygon. """ from nu...
jadecastro/LTLMoP
src/lib/handlers/share/MotionControl/__is_inside.py
Python
gpl-3.0
1,465
# -*- coding: utf-8 -*- # © <2016> <ToproERP liujing> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api, fields, exceptions import time class SytOaGldOpinion(models.Model): _name = "syt.oa.gld.opinion" _description = u'审批意见' gld_id = fields.Many2one('sy...
xhair/TopOdoo_Addons
ToproERP_GLD/models/syt_oa_gld_opinion.py
Python
agpl-3.0
7,014
# 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 applica...
kevin-coder/tensorflow-fork
tensorflow/contrib/distributions/python/ops/bijectors/power_transform.py
Python
apache-2.0
4,607
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='Mariana', ...
JonathanSeguin/Mariana
setup.py
Python
apache-2.0
2,757
#! /usr/bin/env python # -*- coding: utf-8 -*- import argparse import logging import os import random import re from collections import defaultdict import numpy as np READ_ID = 1 def main(): """ Main function of circula RNA simulator """ from collections import defaultdict from logger import get...
Kevinzjy/circSim
circSim/main.py
Python
mit
20,517
# # Copyright © 2012–2022 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 Licens...
nijel/weblate
weblate/wladmin/__init__.py
Python
gpl-3.0
758
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework 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 ...
alexandrul-ci/robotframework
src/robot/htmldata/htmlfilewriter.py
Python
apache-2.0
3,473
import Tkinter import tkFileDialog import tkMessageBox from Tkinter import * import os import sys from math import factorial class Unbuffered(object): """Attempts to create an unbuffered STDOUT""" def __init__(self, stream): self.stream = stream def write(self, data): self.stream.write(data) self.stream.fl...
willblev/RNA_TwiZe
rna_twize.py
Python
gpl-3.0
12,512
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
cloudify-cosmo/cloudify-dev
scripts/clone_pull_install.py
Python
apache-2.0
6,048
from pyensembl import cached_release, genome_for_reference_name grcm38 = genome_for_reference_name("grcm38") grch38 = cached_release(87)
hammerlab/isovar
test/genomes_for_testing.py
Python
apache-2.0
138
# # This source file is part of appleseed. # Visit https://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy #...
appleseedhq/blenderseed
utils/path_util.py
Python
mit
4,158
#!/usr/bin/env python -u import boto.ec2 import time import threading import sys from uuid import uuid4 def launch_controller(region, ami, instance_type, tid): """ Launch a Tsung controller """ launch(region, ami, instance_type, tid, "controller", "controller") def launch_injector(region, ami, instan...
rodo/ansible-tsung
launchtsung.py
Python
gpl-3.0
2,624
import unittest from test import support from weakref import proxy, ref, WeakSet import operator import copy import string import os from random import randrange, shuffle import sys import warnings import collections from collections import UserString as ustr class Foo: pass class TestWeakSet(unittest.TestCase)...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/test/test_weakset.py
Python
mit
10,607
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import control_flow_ops from tensorflow.contrib import slim def _crop(image, offset_height, offset_width, crop_height, crop_width): original_shape = tf.sh...
CharlesShang/FastMaskRCNN
libs/preprocessings/utils.py
Python
apache-2.0
6,561
"""Adversarial imitation learning algorithms, AIRL and GAIL."""
HumanCompatibleAI/imitation
src/imitation/algorithms/adversarial/__init__.py
Python
mit
64
""" 1. Create a simple Sanic app 0. Run with an ASGI server: $ uvicorn run_asgi:app or $ hypercorn run_asgi:app """ from pathlib import Path from sanic import Sanic, response app = Sanic("Example") @app.route("/text") def handler_text(request): return response.text("Hello") @app.route("/json") d...
ashleysommer/sanic
examples/run_asgi.py
Python
mit
1,825
#! /usr/bin/env python # -*- coding: utf-8 -*- # __author__ = 'CwT' import logging import os import threading import sys from mitmproxy import master, controller, options from mitmproxy.proxy import ProxyServer, ProxyConfig from mitmproxy.exceptions import ServerException from ..browser.signal import Request, Respons...
CvvT/crawler_sqlmap
crawler/proxy/proxy.py
Python
apache-2.0
2,353
import os from toxpython import TOX_MESSAGE_TYPE_NORMAL from toxpython import TOX_FILE_CONTROL_RESUME class FileTransfer(): filePointer = None filePath = "" callback = None def __init__(self): pass class FiletransferList(): client = None friendDicts={} def __init__(self,toxinstance): self.client = tox...
yodakohl/toxpython
examples/cmdlineClient/fileTransfer.py
Python
gpl-2.0
2,367
#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_fabric_service(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def show_linkinfo_input_all(self, **kwargs): """Auto Generated Code ""...
BRCDcomm/pynos
pynos/versions/base/yang/brocade_fabric_service.py
Python
apache-2.0
87,699
# -*- coding: utf-8 -*- """ Created on Sun Jan 15 23:32:44 2017 @author: Shabaka """ """ Import the package requests. Assign the URL of interest to the variable url. Package the request to the URL, send the request and catch the response with a single function requests.get(), assigning ...
qalhata/Python-Scripts-Repo-on-Data-Science
HTTP_Request_using_Requests.py
Python
gpl-3.0
821
#!/usr/bin/env python # Version 1.4.1 / 05-February-2018 title='Acoustic Velocity and Loudspeaker Delay Calculator' print(title) print('=' * 80) # Prompt for user input temp_fahrenheit = float(input("Enter temperture in degrees Fahrenheit: ")) measured_distance = float(input("Enter measured distance between speakers...
kreivalabs/acousticVelocityAndDelay
acousticVelocityAndDelayPython3.py
Python
gpl-3.0
1,280
import random from canari.maltego.transform import Transform from canari.maltego.entities import URL from canari.framework import EnableDebugWindow from common.entities import NettackerScan from lib.vuln.ProFTPd_restriction_bypass.engine import start from database.db import __logs_by_scan_id as find_log __author__ ...
viraintel/OWASP-Nettacker
lib/transactions/maltego/nettacker_transforms/src/nettacker_transforms/transforms/proftpd_restriction_bypass_vuln_scan.py
Python
apache-2.0
1,929
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division # from builtins import map, range, object, zip, sorted from builtins import sorted import unittest import os class TestEnvironment(unittest.TestCase): """Test Environment.""" def test_environment_...
ampl/amplpy
amplpy/tests/test_environment.py
Python
bsd-3-clause
1,651
#!/usr/bin/env python """Generate a man page for the given cmdln.Cmdln subclass. Usage: python mkmanpage.py mymodule.Foo > tmp/man1/foo.1 then via that man page with `man -M tmp foo.1`. """ from os.path import dirname, join, abspath import sys sys.path.insert(0, join(dirname(dirname(abspath(__file__))), "lib")...
hfeeki/cmdln
bin/mkmanpage.py
Python
mit
727
import re import markdown def md(text): """ Process text as markdown and remove surrounding '<p>' tags simple flat text if possible. """ text = markdown.markdown(text, output_format='html5') return re.sub('<p>(.*)?</p>', '\\1', text)
urbanspectra-nyc/resume
helpers.py
Python
mit
261
"""Functions that handle parsing pyzor configuration files.""" import os import re import logging import collections try: import sentry_sdk _has_sentry = True except ImportError: _has_sentry = False import pyzor.account _COMMENT_P = re.compile(r"((?<=[^\\])#.*)") # Configuration files for the Pyzor Se...
SpamExperts/pyzor
pyzor/config.py
Python
gpl-2.0
9,034
# Copyright 2017 Jetperch LLC import os from ctypes import cdll, Structure, POINTER, pointer, cast, \ c_uint64, c_uint32, c_uint16, c_uint8 from ctypes.wintypes import DWORD, HANDLE, BOOL, LPVOID, LPWSTR class embc_list_s(Structure): pass embc_list_s._fields_ = [ ('next', POINTER(embc_list_s)), (...
mliberty1/embc
py/embc/collections/list.py
Python
apache-2.0
462