code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaecookie.decorator import no_csrf from gaepermission import facade from gaepermission.decorator import login_not_required from tekton import router @no_csrf @login_not_required def index(_write_tmpl): _write_tmpl('login/passwor...
renzon/livrogae
backend/src/web/login/passwordless.py
Python
mit
1,132
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
twilio/twilio-python
twilio/rest/preview/wireless/rate_plan.py
Python
mit
16,909
""" This library implements a simple set of parallel processing utilities that take advantage of python's `multiprocessing` module to distribute processing over multiple CPUs on a single machine. The most salient feature of this library is the `map()` function that can be used to distribute CPU-intensive processing of...
halfak/python-para
para/__init__.py
Python
mit
652
from setuptools import setup setup( name='pandas_redshift', packages=['pandas_redshift'], version='2.0.5', description='Load data from redshift into a pandas DataFrame and vice versa.', author='Aidan Gawronski', author_email='aidangawronski@gmail.com', # url = 'https://github.com/agawronski...
agawronski/pandas_redshift
setup.py
Python
mit
503
print "hahahahahaah!" print "hahahahahaah!" print "hahahahahaah!" print "hahahahahaah!" print "hahahahahaah!" print "hahahahahaah!" print "hahahahahaah!" print "hahahahahaah!" print "hahahahahaah!"
SuperJerry/Swift
python/test.py
Python
mit
199
import numpy as np import time import datetime SIMULATED_TIME_MAIN = 60 * 60 * 24 * 10 SIMULATED_TIME_FORECAST = 60 * 60 * 24 * 100 def plot_dataset(sensordata,forecast_start=0,block=True): import matplotlib.pyplot as plt fig, ax = plt.subplots() forecast_plot, = ax.plot(range(forecast_start,len(sensorda...
SEC-i/ecoControl
server/forecasting/tools/plotting.py
Python
mit
3,818
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None def preorder(bt): "A preorder traversal of a binary tree" children = [bt] while children: n = children.pop() if n.right: children.append(n.right) if n.lef...
calebperkins/algorithms
algorithms/trees.py
Python
mit
2,540
''' Gesture recognition =================== This class allows you to easily create new gestures and compare them:: from kivy.gesture import Gesture, GestureDatabase # Create a gesture g = Gesture() g.add_stroke(point_list=[(1,1), (3,4), (2,1)]) g.normalize() # Add it to the database gdb ...
Davideddu/kivy-forkedtouch
kivy/gesture.py
Python
mit
14,948
# 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/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/models/__init__.py
Python
mit
1,737
from users_push.userposter import send_message class UserHostess: def greet_user(self, user_id): send_message("Hey !", user_id) def identification_user(self, user_id): send_message("Please follow the link and paste the code back to me !", user_id) def identification_completed_user(self,...
ThibF/G-youmus
users_push/userhostess.py
Python
mit
872
#Copyright (c) 2012 Luminoso, LLC # #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 to use, copy, modify, merge, publish, distribute...
LuminosoInsight/jstime
jstime.py
Python
mit
1,541
""" Celery config for tiny_hands_pac project. For more information on this file, see http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html Run your celery worker(s) as `djcelery`, which is an alias for `celery -A tiny_hands_pac worker --loglevel=info`. A celerybeat scheduler can be started toge...
DonaldTrumpHasTinyHands/tiny_hands_pac
tiny_hands_pac/celery.py
Python
mit
1,032
#! /usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import sktensor as skt import scipy.linalg from utils import rmse from sklearn.base import BaseEstimator import traceback class TensorRegression(BaseEstimator): """ Scikit learn estimator for various regression methods (see paper for details): ...
grwip/HOLRR
models.py
Python
mit
5,532
"""direct_messages.py: Implementation of class AbstractTwitterDirectMessageCommand and its subclasses. """ from argparse import ArgumentParser from . import AbstractTwitterCommand, call_decorator from ..parsers import ( filter_args, cache, parser_user_single, parser_count_statuses, parser_page, ...
showa-yojyo/bin
twmods/commands/direct_messages.py
Python
mit
5,011
import roslib; roslib.load_manifest('hlpr_manipulation_utils') from sensor_msgs.msg import JointState from vector_msgs.msg import JacoCartesianVelocityCmd, LinearActuatorCmd, GripperCmd, GripperStat from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint from wpi_jaco_msgs.msg import AngularCommand, Carte...
kirmani/hlpr_cadence
third_party/hlpr_manipulation/hlpr_manipulation_utils/src/hlpr_manipulation_utils/manipulator.py
Python
mit
17,522
import tensorflow as tf import numpy as np class trainer(object): def __init__(self, sess, model, Input, hps, path): self.sess = sess self.model = model self.Input = Input self.hps = hps self.path = path self.image = model.image self.target = model.target self.logits = model.logits...
pianomania/cifar10
trainer.py
Python
mit
4,648
from abc import abstractmethod from typing import Any, Callable, Generic, Optional, TypeVar, Union from reactivex import abc, typing from reactivex.scheduler import ImmediateScheduler from .observable import Observable from .observer import Observer _T = TypeVar("_T") class Notification(Generic[_T]): """Repres...
ReactiveX/RxPY
reactivex/notification.py
Python
mit
6,251
from typing import Any, Optional from reactivex import Observable, abc from reactivex.disposable import Disposable def never_() -> Observable[Any]: """Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). Returns: An obs...
ReactiveX/RxPY
reactivex/observable/never.py
Python
mit
605
from math import sin, cos, pi, degrees, radians, atan2 from point import Point from line import Line from arc import Arc from circle import Circle from polyline import Polyline from block import Block from vector import Vector from affinematrix import AffineMatrix def rotateAboutPoint(geom, p, radianAngle): ''' ...
gfsmith/gears
gears/geometry/twod_operations.py
Python
mit
3,114
import OOMP newPart = OOMP.oompItem(9579) newPart.addTag("oompType", "VREG") newPart.addTag("oompSize", "SO89") newPart.addTag("oompColor", "X") newPart.addTag("oompDesc", "V33D") newPart.addTag("oompIndex", "A1") OOMP.parts.append(newPart)
oomlout/oomlout-OOMP
old/OOMPpart_VREG_SO89_X_V33D_A1.py
Python
cc0-1.0
243
import OOMP newPart = OOMP.oompItem(8804) newPart.addTag("oompType", "CAPC") newPart.addTag("oompSize", "0402") newPart.addTag("oompColor", "X") newPart.addTag("oompDesc", "PF18") newPart.addTag("oompIndex", "V50") OOMP.parts.append(newPart)
oomlout/oomlout-OOMP
old/OOMPpart_CAPC_0402_X_PF18_V50.py
Python
cc0-1.0
244
# coding=utf-8 from descriptor_tools import get_descriptor __author__ = 'Jake' __all__ = ['name_of', 'id_name_of'] def name_of(descriptor, owner): """ Given a descriptor and a class that the descriptor is stored on, returns the name of the attribute the descriptor is stored under. Also works if the ...
sad2project/descriptor-tools
src/descriptor_tools/names.py
Python
cc0-1.0
1,493
# -*- coding: utf-8 -*- from django.db import models from gestao.financeiro.models.basico.Banco import Banco class ContaDeBanco(models.Model): agencia = models.CharField(verbose_name="Agência", max_length=10) conta_corrente = models.CharField(verbose_name="Conta Corrente", max_length=15) operacao = models...
marcospereirampj/gestao_empresarial
gestao/financeiro/models/basico/ContaDeBanco.py
Python
cc0-1.0
822
class Spark(UsableAbility): def __init__(self, owner): super().__init__() self.owner = owner self.ability_attr["name"] = "Spark" self.ability_attr["magic_type"] = "electric" self.ability_attr["lvl"] = 1 self.ability_attr["cost"] = 20 self.ability_attr["cost...
NiclasEriksen/rpg_procgen
ability_files/spark.py
Python
cc0-1.0
1,604
from setuptools import setup, find_packages setup(name='BIOMD0000000388', version=20140916, description='BIOMD0000000388 from BioModels', url='http://www.ebi.ac.uk/biomodels-main/BIOMD0000000388', maintainer='Stanley Gu', maintainer_url='stanleygu@gmail.com', packages=find_packages(...
biomodels/BIOMD0000000388
setup.py
Python
cc0-1.0
377
""" .. _ts_config_parser: Excel Configuration Parser Internals ------------------------------------ This module handles all of the excel configuration parsing. Guidelines on excel sheet formatting is as follows: +------------------+--------------------+------------------+--------------------+--------------------+ ...
TrafficSenseMSD/core
ts_core/config/parser.py
Python
epl-1.0
15,629
### # Copyright 2011 Diamond Light Source Ltd. # # 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 agr...
erwindl0/python-rpc
org.eclipse.triquetrum.python.service/scripts/scisoftpy/python/pywrapper.py
Python
epl-1.0
2,506
import os import sys import string import xml.etree.ElementTree as etree from xml.etree.ElementTree import SubElement from SCons.Script import * BuildOptions = {} Projects = [] Rtt_Root = '' Env = None fs_encoding = sys.getfilesystemencoding() def _get_filetype(fn): if fn.rfind('.c') != -1 or fn.rfind('.C') != ...
wuliaodew/RTT
tools/building.py
Python
gpl-2.0
20,383
import time import bluetooth from datetime import datetime from MindwaveDataPoints import EEGPowersDataPoint, RawDataPoint, MeditationDataPoint, AttentionDataPoint from MindwaveDataPointReader import MindwaveDataPointReader if __name__ == '__main__': mindwaveDataPointReader = MindwaveDataPointReader() mindwa...
gubertoli/hackrun-eeg
mindwave/read_mindwave_mobile.py
Python
gpl-2.0
1,077
#@+leo-ver=5-thin #@+node:2014fall.20141212095015.1775: * @file wsgi.py # coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 #@@language python #@@tabwidth -4 #@+<<declarations>> #@+node:2014fall.20141212095015.1776: ** <<declar...
2014cdbg4/2015cd_midterm
wsgi.py
Python
gpl-2.0
26,299
## batchprocess.py from modules.FileProcess import batchprocess def _archlinux_(): # Source folder, this one will be walked recursively in search of your files sInd = "/media/BLACK/Work/PersonalMedia/FotosWork/src" # Target folder where the pictures will be copied, and renamed and organized. # Current Pattern: ./...
ridlimod/kndMediaOrganizer
src/batchprocess.py
Python
gpl-2.0
937
""" 2588 : 곱셈 URL : https://www.acmicpc.net/problem/2588 Input : 472 385 Output : 2360 3776 1416 181720 """ first = int(input()) second = int(input()) print(first * (second % 10)) print(first * ((second % 100) // 10)) print(first * (second // 100)) print(...
0x1306e6d/Baekjoon
baekjoon/2588.py
Python
gpl-2.0
340
#!/usr/bin/python3 # -*- coding: utf-8 -*- """USER AGENT SERVER.""" import socket import socketserver import sys import os from xml.sax import make_parser from xml.sax.handler import ContentHandler import time """READING AND EXTRACTION OF XML DATA.""" if len(sys.argv) != 2: sys.exit("Usage: python uaserver.py c...
isabelvillaruiz/ptavi-pfinal
uaserver.py
Python
gpl-2.0
6,607
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
verse/verse-blender
io_verse/mesh.py
Python
gpl-2.0
36,256
#from account.models import User from sqlalchemy.sql import func from flask import Flask from app import * class User(db.Model): __tablename__ = "user" __table_args__ = {"useexisting" : True} id = db.Column(db.Integer,primary_key=True) username = db.Column(db.String(128)) email = db.Column(db.String(128))
mehtapgundogan/Tellal
app/account/models.py
Python
gpl-2.0
313
#!/usr/bin/env python # encoding: utf-8 """ Simple and yet high performance JSON RPC v1.0 server/client """ from gevent import monkey, server, socket as gsocket, Timeout monkey.patch_all() import logging logger = logging.getLogger("RPC") import cjson import socket class RPCException(Exception): pass class MethodAlr...
mengzhuo/justrpc
justrpc.py
Python
gpl-2.0
5,562
import numpy as np from neuron import h import math def lambda_f(section, freq): if h.n3d() < 2: return 1e5*math.sqrt(section.diam/(math.pi*4*freq*section.Ra*section.cm)) else: x1 = h.arc3d(0) d1 = h.diam3d(0) lam = 0 for i in range(int(h.n3d())): x2 = h.arc3...
penguinscontrol/Spinal-Cord-Modeling
Python/cell_template.py
Python
gpl-2.0
3,715
#!/usr/bin/env python # encoding: utf-8 # # Copyright 2011 Daniel Foreman-Mackey and Michael Gorelick # # This is part of pyarxiv. # # pyarxiv is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # p...
dfm/pyarxiv
bibparser.py
Python
gpl-2.0
1,372
#! /usr/bin/python2 # vim: fileencoding=utf-8 encoding=utf-8 et sw=4 # Copyright (C) 2009 Jacek Konieczny <jajcus@jajcus.net> # Copyright (C) 2009 Andrzej Zaborowski <balrogg@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
OSMBrasil/IJSN_road_import
scripts/upload/diffpatch.py
Python
gpl-2.0
2,414
import matplotlib.pyplot as plt import cv2 from skimage.feature import hog # from skimage import data image = cv2.imread("MIT/Train/per00001.ppm", cv2.COLOR_BAYER_RG2GRAY) image = cv2.resize(image, (64, 128)) fd, hog_image = hog(image, orientations=8, pixels_per_cell=(16, 16), cells_per_block=(1,...
HDLynx/sharingan
HOG3.py
Python
gpl-2.0
765
from Screen import Screen from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.Harddisk import harddiskmanager from Components.NimManager import nimmanager from Components.About import about from Components.ScrollLabel import ScrollLabel from Components.config ...
postla/e2-gui
lib/python/Screens/About.py
Python
gpl-2.0
4,213
import mox from unittest import TestCase from kazoo.client import KazooClient from zoom.www.cache.global_cache import GlobalCache from test.test_utils import ConfigurationMock, EventMock, FakeMessage class GlobalCacheTest(TestCase): def setUp(self): self.mox = mox.Mox() self.socket_client1 =...
spottradingllc/zoom
test/cache/global_cache_test.py
Python
gpl-2.0
1,736
# This file is part of MyPaint. # Copyright (C) 2008-2009 by Martin Renold <martinxyz@gmx.ch> # # 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 opt...
benosteen/mypaint
gui/preferenceswindow.py
Python
gpl-2.0
13,712
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme.utils.conf import cfme_data from cfme.common.provider import cleanup_vm from cfme.infrastructure.provider import InfraProvider from cfme.infrastructure.provider.scvmm import SCVMMProvider from cfme.infrastructure.pxe import get_pxe_server_from_config, ...
okolisny/integration_tests
cfme/tests/infrastructure/test_pxe_provisioning.py
Python
gpl-2.0
4,265
#!/usr/bin/env python import sys import os import re import json import getopt from typing import List import logging import logging.config from pathlib import Path from feed_maker_util import IO, URL, header_str from feed_maker import FeedMaker logging.config.fileConfig(os.environ["FEED_MAKER_HOME_DIR"] + "/bin/log...
terzeron/FeedMakerApplications
kakao/kakaowebtoon/capture_item_link_title.py
Python
gpl-2.0
3,876
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import with_statement import os __author__ = 'Henrik Lindgren' # See LICENSE file for license (GPL2) from save_file_parser import StrandedSaveTool import Tkinter as tk import tkFileDialog import logging as log log.basicConfig(format='%(levelname)s %(ascti...
henriklindgren/strandedsavetool
world_viewer.py
Python
gpl-2.0
5,069
#!/bin/python # -*- coding: utf-8 -*- # Author: Pavel Studenik # Email: pstudeni@redhat.com # Date: 24.9.2013 from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework import viewsets from apps.core.models import JobTemplate, Recipe, \ Task, Author, Arch, Dist...
BlackSmith/GreenTea
apps/api/views.py
Python
gpl-2.0
3,641
# -*- coding:utf-8 -*- from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin from django.utils.translation import ugettext_lazy as _ from django.utils import timezone class UserManager(BaseUserManager): def create_user(self, user_id, name, passwo...
SungJinYoo/BookShare
bookshare/apps/users/models.py
Python
gpl-2.0
3,448
#! /usr/bin/env python import sys import dendropy def count_subtree_leaf_set_sizes(tree): internal_nodes = tree.internal_nodes() subtree_leaf_set_sizes = {} for nd in internal_nodes: leaf_count = 0 for leaf in nd.leaf_iter(): leaf_count += 1 if nd.taxon is not None: ...
jeetsukumaran/pstrudel
test/scripts/calc-subtree-leaf-set-sizes.py
Python
gpl-2.0
805
#!/usr/bin/env python ############################################################################ # Copyright (C) 2005 by # # # # Milton Inostroza Aguilera # # minoztro@gmail.com ...
minostro/remunex
src/salud.py
Python
gpl-2.0
6,709
# -*- coding: utf-8 -*- ## Comments and reviews for records. ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 Softwar...
valkyriesavage/invenio
modules/webcomment/lib/webcomment_templates.py
Python
gpl-2.0
109,498
# -*- Coding:utf-8 -*- # # Copyright (C) 2012-2014 Red Hat, Inc. All rights reserved. # # This library 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 (at your o...
openlmi/openlmi-doc
doc/python/lmi/providers/cmpi_logging.py
Python
gpl-2.0
17,541
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright 2009-2018 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
unioslo/cerebrum
contrib/no/hiof/generate_fronter_xml.py
Python
gpl-2.0
62,391
class Model(object): "model mixin, based on sklearn." def __init__(self, sample_factory, hyperparameters): self.sample_factory = sample_factory self.hyperparams = hyperparameters def fit(self, X, Y): pass
cjacoby/ml-experiment
experiment/model.py
Python
gpl-2.0
245
import os, logging, httplib2, json, datetime from django.core.urlresolvers import reverse, reverse_lazy from django.http import HttpResponseRedirect, HttpResponseBadRequest, JsonResponse from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models impor...
mercycorps/TolaTables
silo/google_views.py
Python
gpl-2.0
14,947
########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2015, Zenoss Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License versi...
zenoss/ZenPacks.zenoss.OpenvSwitch
ZenPacks/zenoss/OpenvSwitch/tests/testParser.py
Python
gpl-2.0
8,979
# -*- coding: utf-8 -*- # # Copyright 2013 The cygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public License...
sjagoe/cygit2
cygit2/tests/test_commit.py
Python
gpl-2.0
2,027
class PlayerHand: def __init__(self, player): self.player = player self.hand = [] def getHand(self): return self.hand def getPlayer(self): return self.player def addCard(self, card): self.hand.append(card) def discardCard(self, card): self.hand.re...
zmetcalf/Triple-Draw-Deuce-to-Seven-Lowball-Limit
triple_draw_poker/model/PlayerHand.py
Python
gpl-2.0
331
#!/usr/bin/python import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) GPIO.setwarnings(False) pwm = GPIO.PWM(18, 50) # channel = 18, frequency = 50Hz # duty cycle is Pulse Width divided by Period # Period at 50Hz is 0.02 or 20 milliseconds, or 20000 microseconds PERIOD = float(20000....
griffegg/servo_motors
servo-run-forever.py
Python
gpl-2.0
874
#=============================================================================== # Make global object available #=============================================================================== import mediaitem import contextmenu import chn_class from regexer import Regexer from helpers import xmlhelper from l...
SMALLplayer/smallplayer-image-creator
storage/.xbmc/addons/net.rieter.xot.smallplayer.channel.rtlnl/rtlipad/chn_rtlipad.py
Python
gpl-2.0
6,614
#!/bin/env python # -*- coding: utf-8 -*- __author__ = 'eduardo' import os import os.path import logging from .. import config from .. import LBSociam # Set to test environment config.environment = 'test' lbs = LBSociam() test_dir = os.path.dirname(os.path.realpath(__file__)) log = logging.getLogger() def setup_pa...
lightbase/LBSociam
lbsociam/tests/__init__.py
Python
gpl-2.0
461
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Cisco NetFlow protocol v1 """ from kamene.fields import * from kamene.packet import * # Cisco Netflow Protocol ver...
phaethon/scapy
kamene/layers/netflow.py
Python
gpl-2.0
1,595
''' Code taken and adapted from: The University of Manchester Computer Science COMP18111 - Lab Exercise 3 version: 2011/2012 ex3.py - Module for ex3 - David Thorne / AIG / 15-01-2009 ''' import sys from serverutils import Client class IRCClient(Client): def onMessage(self, socket, message): # *** pro...
radujipa/PiDroid
PiDroidRPi/source/client.py
Python
gpl-2.0
949
# Copyright © 2020, Joseph Berry, Rico Tabor (opendrop.dev@gmail.com) # OpenDrop is released under the GNU GPL License. You are free to # modify and distribute the code, but always under the same license # (i.e. you cannot make commercial derivatives). # # If you use this software in your research, please cite the foll...
ricotabor/opendrop
opendrop/app/ift/report/graphs/graphs.py
Python
gpl-2.0
8,059
# for example, i = 27 def is_multiple(n,m): return n == m * 27 if __name__ == '__main__': # test1 print('n=27,m=1:') print(is_multiple(27, 1)) # test2 print('n=28,m=1:') print(is_multiple(28, 1)) # test3 print('n=270,m=10:') print(is_multiple(270, 10))
maxiee/DataStructuresAlgorithmsPythonExercises
chapter1/r_1_1.py
Python
gpl-2.0
294
# # Copyright 2010-2011 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
borisroman/vdsm
vdsm/hooks.py
Python
gpl-2.0
14,132
# -*- coding: utf-8 -*- # from rest_framework import serializers from common.utils import get_request_ip from users.serializers.v2 import ServiceAccountSerializer from ..models import Terminal __all__ = ['TerminalSerializer', 'TerminalRegistrationSerializer'] class TerminalSerializer(serializers.ModelSerializer): ...
liuzheng712/jumpserver
apps/terminal/serializers/v2.py
Python
gpl-2.0
1,920
## # Copyright 2009-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
ULHPC/easybuild-easyblocks
easybuild/easyblocks/c/cgal.py
Python
gpl-2.0
2,656
# MacrovisionJob, MacrovisionFlexNet # CVE-2007-2419, CVE-2007-5660, CVE-2007-6654, CVE-2007-0321, CVE-2007-0328 import logging log = logging.getLogger("Thug") def Initialize(self, *args): # pylint:disable=unused-argument log.ThugLogging.add_behavior_warn('[Macrovision ActiveX] Initialize') def CreateJob(self...
buffer/thug
thug/ActiveX/modules/MacrovisionFlexNet.py
Python
gpl-2.0
4,390
""" Copyright 2016 Mellanox Technologies. All rights reserved. Licensed under the GNU General Public License, version 2 as published by the Free Software Foundation; see COPYING for details. """ __author__ = """ idosch@mellanox.com (Ido Schimmel) """ from lnst.Controller.Task import ctl from TestLib import TestLib fr...
jiriprochazka/lnst
recipes/switchdev/qos-001-pg.py
Python
gpl-2.0
2,227
from django.contrib.auth.models import User, Group from django.core.urlresolvers import reverse from django.test import TestCase, Client from blog.models import News, Resource, ResourceType, Tag from community.models import Community from users.models import SystersUser class CommunityNewsListViewTestCase(TestCase):...
willingc/portal
systers_portal/blog/tests/test_views.py
Python
gpl-2.0
25,309
# # Created by DraX on 2005.08.12 # minor fixes by DrLecter 2005.09.10 print "importing village master data: Alliance ...done" import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jyt...
Barrog/C4-Datapack
data/jscript/village_master/9001_alliance/__init__.py
Python
gpl-2.0
1,758
# -*- coding: utf-8 -*- from castle.cms.browser.utils import Utils from castle.cms import utils from castle.cms.testing import CASTLE_PLONE_INTEGRATION_TESTING from plone import api from plone.app.testing import login from plone.app.testing import setRoles from plone.app.testing import TEST_USER_ID from plone.app.testi...
castlecms/castle.cms
castle/cms/tests/test_utils.py
Python
gpl-2.0
2,964
# -*- coding: utf-8 -*- ## ## $Id: bfe_CERN_plots.py,v 1.3 2009/03/17 10:55:15 jerome Exp $ ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Publi...
pombredanne/invenio
modules/bibformat/lib/elements/bfe_plots_thumb.py
Python
gpl-2.0
2,623
import math import random try: import matplotlib.pyplot as plt import matplotlib.animation as animation plt.style.use('ggplot') except ImportError: plt = None from ..algorithms import BaseGeneticAlgorithm from ..chromosomes import ReorderingSetChromosome from ..genes import BinaryGene from ..translat...
mdscruggs/ga
ga/examples/travelling_salesman.py
Python
gpl-2.0
6,091
""" urlresolver XBMC Addon Copyright (C) 2013 Bstrdsmkr 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....
noba3/KoTos
addons/script.module.urlresolver/lib/urlresolver/plugins/premiumize_me.py
Python
gpl-2.0
4,829
import os import time from enigma import iPlayableService, eTimer, eServiceCenter, iServiceInformation, ePicLoad from ServiceReference import ServiceReference from Screens.Screen import Screen from Screens.HelpMenu import HelpableScreen from Screens.MessageBox import MessageBox from Screens.InputBox import InputBox fro...
Antonio-Team/enigma2
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
Python
gpl-2.0
43,557
#!/usr/bin/python # -*- encoding: utf-8 -*- ############################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). # All Rights Reserved ############# Credits ######################...
3dfxsoftware/cbss-addons
mrp_product_capacity/model/__init__.py
Python
gpl-2.0
1,386
""" WSGI config for rentv 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 os.environ.setdefault("DJANGO_SETTING...
icewind666/pythonsamples
rentv/rentv/wsgi.py
Python
gpl-2.0
387
import math from pyx import * from pyx.graph import axis # we here use parters and texters which are explained in the examples below log2parter = axis.parter.log([axis.parter.preexp([axis.tick.rational(1)], 4), axis.parter.preexp([axis.tick.rational(1)], 2)]) log2texter = axis.texter.expo...
mjg/PyX
examples/axis/log.py
Python
gpl-2.0
680
# -*- coding: utf-8 -*- import urllib import urllib2 import datetime import re import os import xbmcplugin import xbmcgui import xbmcaddon import xbmcvfs from BeautifulSoup import BeautifulStoneSoup, BeautifulSoup, BeautifulSOAP try: import json except: import simplejson as json import SimpleDownloader as dow...
Easystreams/plugin.video.easystreams-1.63
default.py
Python
gpl-2.0
34,357
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'WordsSet.orderby' db.alter_column(u'game_wordsset', 'o...
zdilby/word-turn-off
migrations/0002_auto__chg_field_wordsset_orderby__chg_field_wordsset_pernum__chg_field.py
Python
gpl-2.0
2,605
# # Auto partitioning module. # # Copyright (C) 2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distribute...
atodorov/anaconda
pyanaconda/modules/storage/partitioning/automatic/automatic_module.py
Python
gpl-2.0
5,929
# -*- coding: utf-8 -*- """ /*************************************************************************** geopunt4QgisAboutdialog A QGIS plugin "Tool om geopunt in QGIS te gebruiken" ------------------- begin : 2013-12-08 copyrigh...
warrieka/geopunt4Qgis
geopunt4QgisAbout.py
Python
gpl-2.0
2,694
import Pyro4 from pyage.core import address from pyage.core.stop_condition import StepLimitStopCondition from pyage_forams.solutions.distributed.neighbour_matcher import Neighbour3dMatcher from pyage_forams.solutions.distributed.request import create_dispatcher from pyage_forams.solutions.environment import environmen...
maciek123/pyage-forams
pyage_forams/conf/distributed3d/common.py
Python
gpl-2.0
1,637
# -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2016 CERN. # # CERN Analysis Preservation Framework 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...
xchen101/analysis-preservation.cern.ch
cap/modules/experiments/permissions/atlas.py
Python
gpl-2.0
1,496
# -*- coding: utf-8 -*- ''' Created on Jul 11, 2013 @author: Carl, Aaron ''' import os from mb.coordinator import _Pretty from jinja2 import Environment,FileSystemLoader,TemplateNotFound from mb.config import ERROR_NO_404, ERROR_NO_500 class Template(object): ''' 这里封装了Jinja2的模板引擎 ''' def render(s...
MoneyBack/MoneyBack
mb/template.py
Python
gpl-2.0
1,182
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2012-2013 Hector Martin "marcan" <hector@marcansoft.com> # # 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 or vers...
yacoob/blitzloop
blitzloop/layout.py
Python
gpl-2.0
24,324
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences # Copyright (C) 2012 - 2015 by the BurnMan team, released under the GNU # GPL v2 or later. from __future__ import absolute_import import numpy as np import warnings import scipy.integrate import matplotlib...
ian-r-rose/burnman
burnman/output_seismo.py
Python
gpl-2.0
11,627
# # ast_parent_aware_visitor.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your...
kperun/nestml
pynestml/visitors/ast_parent_aware_visitor.py
Python
gpl-2.0
1,391
''' Python mapping for the Accounts framework. This module does not contain docstrings for the wrapped code, check Apple's documentation for details on how to use these functions and classes. ''' import objc import sys import Foundation from Accounts import _metadata sys.modules['Accounts'] = mod = objc.ObjCLazyMod...
rishabhmalhotra/FireSync
PyObjC/Accounts/__init__.py
Python
gpl-2.0
577
# Just pretend this is bash... of evil! Muhahahaha! import subprocess, os, sys sauronHome = "jsevil" args = [] # Get special Ogres def getSpecialOgres(): specialOgres = [] for specialOgre in sys.argv: args.append(specialOgre) specialOgreHome = "jsevil/%s" % (specialOgre) if (os.path.isdir(specialOgreHome)): ...
grebnafets/jsevil
tools/python/integration/showUnset.py
Python
gpl-2.0
1,578
#! /usr/bin/env python ############################################################################# ## ## ## inet6.py --- IPv6 support for Scapy ## ## see http://natisbad.org/IPv6/ ...
AmedeoSapio/scapy
scapy/layers/inet6.py
Python
gpl-2.0
144,648
#!/usr/bin/python2.7 from threading import Thread, activeCount import libtorrent as lt from time import sleep, time import sys import os sys.dont_write_bytecode = True state_str = ['queued', 'checking', 'downloading metadata', 'downloading', 'finished', 'seeding', 'allocating', 'checking fastresume'] ...
MisterDaneel/pytorrentClient
libs/my_libtorrent.py
Python
gpl-2.0
6,445
# -*- coding: utf-8 -*- ''' Created on 19 Sep 2012 @author: piel Copyright © 2012-2013 Éric Piel & Kimon Tsitsikas, Delmic This file is part of Odemis. Odemis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Fo...
ktsitsikas/odemis
src/odemis/gui/util/test/img_test.py
Python
gpl-2.0
17,106
# # partition_gui.py: allows the user to choose how to partition their disks # # Matt Wilson <msw@redhat.com> # Michael Fulbright <msf@redhat.com> # # Copyright 2001-2002 Red Hat, Inc. # # This software may be freely redistributed under the terms of the GNU # library public license. # # You should have received a copy ...
sergey-senozhatsky/anaconda-11-vlan-support
iw/partition_gui.py
Python
gpl-2.0
50,370
import urllib2 import re import math from datetime import datetime from collections import namedtuple import operator import numpy as np import matplotlib import matplotlib.pyplot as plt import lxml.html import pandas as pd meyrin_url = "http://services.datasport.com/%i/lauf/meyrin/RANG091.HTM" semi_url = "http://se...
betatim/toys
run-times.py
Python
gpl-2.0
4,019
# -*- coding: utf-8 -*- import datetime import time import utildate from openerp.osv import fields, osv from openerp.tools.translate import _ class Store(osv.osv): _name = "tms.store" def name_get(self,cr,uid,ids,context=None): res=[] display_widget=None if context: display_...
3dfxsoftware/cbss-addons
tms/tms.py
Python
gpl-2.0
21,758
# This file is part of pybliographer # # Copyright (C) 1998-2004 Frederic GOBRY # Email : gobry@pybliographer.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 t...
zkota/pyblio-1.3
Legacy/Base.py
Python
gpl-2.0
7,923
#!/usr/bin/env python #-*- coding:utf-8 -*- #Author:left_left import socks_ssh server = '127.0.0.1' port = 10000 user = 'root' password = 'password' bind_addr = '0.0.0.0' bind_port = 1080 t_num = 10 socks_ssh.run(server, port, user, password, bind_addr, bind_port, t_num)
zuopucuen/ssh_socks
pysocks/run_socks_ssh.py
Python
gpl-2.0
284