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 -*- import sys WorkList = None def SH(i): """reformatting .SH""" global WorkList string = WorkList[i] l = len(string) - 2 r = 0 while string[0] == '=' and string[l] == '=': WorkList[i] = string[1:l] string = WorkList[i] l = len(string) - 1 r...
franck-talbart/codelet_tuning_infrastructure
ctr-common/plugins/4e7420cd-904e-4c2a-b08f-02c867ba4cd8/wiki2man.py
Python
gpl-3.0
27,388
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright 2012 Unknown <diogo@arch> # # 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 optio...
ODiogoSilva/TriFusion
trifusion/ortho/OrthomclToolbox.py
Python
gpl-3.0
64,833
from logger import * # Easy Demo """ log_functions = [('no_negative_ret', 'no_negatives_log')] log_function_args = [] def query(): def sqrt_filter(x): return x[0] < 0 get_log('no_negatives_log').filter(sqrt_filter).print_log() """ # Intermediate Demo """ log_functions = [('add', 'add_log')] lo...
BluBambu/LumberjackLogger
src/spec.py
Python
gpl-3.0
1,357
from marshmallow import EXCLUDE, Schema from ..fields.objectid import ID class BaseSchema(Schema): id = ID(description='ID', dump_only=True) class Meta: strict = True ordered = True unknown = EXCLUDE
mekanix/flask-bootstrap-sql-rest
freenit/schemas/base.py
Python
gpl-3.0
236
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Parts Copyright 2016 C. Strassburg (lib.utils) c.strassburg@gmx.de # Copyright 2017- Serge Wagener serge@wagener.family ##...
Foxi352/netlib
network.py
Python
gpl-3.0
39,974
# -*- coding: utf-8 -*- # This file is part of Dyko # Copyright © 2008-2010 Kozea # # This library 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 lat...
Kozea/Dyko
kalamar/site.py
Python
gpl-3.0
6,799
from logging import Logger from requests.sessions import Session def getpocket_download(session: Session, _logger: Logger): """ This does the heavy lifting :param session: :param _logger: :return: """ headers = { "Origin": "https://app.getpocket.com", # checked that this is needed...
veltzer/scrapers
pyscrapers/workers/getpocket.py
Python
gpl-3.0
679
from setuptools import setup, find_packages try: # for pip >= 10 from pip._internal.req import parse_requirements except ImportError: # for pip <= 9.0.3 from pip.req import parse_requirements import re, ast # get version from __version__ variable in bench/__init__.py _version_re = re.compile(r'__version__\s+=\...
bailabs/bench-v7
setup.py
Python
gpl-3.0
963
#!/usr/bin/env python from os import path from collections import defaultdict import math root = path.dirname(path.dirname(path.dirname(__file__))) result_dir = path.join(root, 'results') def get_file_name(test): test = '%s_result' % test return path.join(result_dir, test) def mean(l): return float(sum(l...
sheimi/os-benchmark
script/analysis/analysis.py
Python
gpl-3.0
3,736
# This file is part of pylabels, a Python library to create PDFs for printing # labels. # Copyright (C) 2012, 2013, 2014, 2015 Blair Bonnett # # pylabels 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 ...
bcbnz/pylabels
labels/specifications.py
Python
gpl-3.0
17,105
import os.path import unittest from unittest.mock import patch import libpipe from libpipe.cmds.align import HisatCmd import logging log = logging.getLogger(__name__) class TestHistatCmd(unittest.TestCase): def setUp(self): # prevent error logs from occuring during testing patcher = patch.objec...
muppetjones/rempipe
tests/cmds/test_align.py
Python
gpl-3.0
3,934
#!/usr/bin/python #This script create simulation and reconstruction options import os import sys import re if len(sys.argv)<4: print "Usage: make-sim-options.py <decay_file> <output_prefix> <event_number>" exit(1) HOME_DIR = os.environ['HOME'] JPSIKKROOT_DIR = os.environ['JPSIKKROOT'] SHARE_DIR = os.path.joi...
ekherit/JpsiKK
share/make-sim-options.py
Python
gpl-3.0
732
'''Defines the Special class for theia.''' # Provides: # class Special # __init__ # lines import numpy as np from ..helpers import geometry, settings from ..helpers.units import deg, cm, pi from .optic import Optic class Special(Optic): ''' Special class. This class represents general opt...
bandang0/theia
theia/optics/special.py
Python
gpl-3.0
4,456
#!/usr/bin/env python import sys, shutil try: from gi.repository import Gtk, Gdk, Vte, GLib, Pango, GConf, GdkPixbuf import json, os, getpass from pycm.pycm_globals import * except ImportError as e: print "Error during importing of necessaries modules.\nError is '%s'" % e sys.exit() python_path =...
maurelio79/pyConnection_Manager
setup.py
Python
gpl-3.0
1,662
""" Message Queue wrapper """ __RCSID__ = "$Id$" from DIRAC.FrameworkSystem.private.standardLogging.Handler.MessageQueueHandler import MessageQueueHandler from DIRAC.Resources.LogBackends.AbstractBackend import AbstractBackend from DIRAC.FrameworkSystem.private.standardLogging.Formatter.JsonFormatter import JsonForma...
arrabito/DIRAC
Resources/LogBackends/MessageQueueBackend.py
Python
gpl-3.0
1,639
# Copyright 2008 by Kate Scheppke and Wade Brainerd. # This file is part of Typing Turtle. # # Typing Turtle 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 opt...
godiard/typing-turtle-activity
balloongame.py
Python
gpl-3.0
13,291
""" Created on Thu Jan 31 2018 Unit tests for the Balance game @author: IvanPopov """ import unittest from game import Game class GameTest(unittest.TestCase): def test_game_loads(self): g=Game() self.assertEqual(g.c.title(), "Balance")
ipopov13/Balance
legacy_code/tests.py
Python
gpl-3.0
259
import os, sys, re, argparse, time, json, logging import requests from glob import glob from urlparse import urlsplit from getpass import getpass from mastodon import Mastodon from markdown import markdown from html_text import extract_text from flask import (Flask, render_template, abort, request, redirect, jsonif...
thedod/gistodon
gistodon.py
Python
gpl-3.0
8,763
import time import os import json import requests # Plan is to import and to checkout dependencies:
pi-bot/pibot-pkg
tests/dependencies.py
Python
gpl-3.0
100
from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database_repository') api.version_control(SQLALCHEMY_D...
CCS-Tech/duck-blocks
db_create.py
Python
gpl-3.0
475
from troposphere import Tags,FindInMap, Ref, Template, Parameter,ImportValue, Ref, Output from troposphere.efs import FileSystem, MountTarget from troposphere.ec2 import SecurityGroup, SecurityGroupRule, Instance, Subnet from create import export_ref, import_ref from create.network import AclFactory, assoc_nacl_subnet ...
gotropo/gotropo
create/efs.py
Python
gpl-3.0
2,807
# Snap! Configuration Manager # # (C) Copyright 2011 Mo Morsi (mo@morsi.org) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, Version 3, # as published by the Free Software Foundation # # This program is distributed in the hope that it will...
movitto/snap
snap/config.py
Python
gpl-3.0
10,759
# Peerz - P2P python library using ZeroMQ sockets and gevent # Copyright (C) 2014-2015 Steve Henderson # # 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...
shendo/peerz
peerz/messaging/base.py
Python
gpl-3.0
2,720
from essence3.util import clamp class Align(object): def __init__(self, h, v = None): self.h = h self.v = h if v is None else v def __call__(self, node, edge): if edge in ('top', 'bottom'): return node.width * self.h if edge in ('left', 'right'): return...
cheery/essence
essence3/layout.py
Python
gpl-3.0
11,955
# Copyright (C) 2018-2019 Matthias Klumpp <matthias@tenstral.net> # # Licensed under the GNU Lesser General Public License Version 3 # # This program 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, eith...
lkorigin/laniakea
src/rubicon/rubicon/fileimport.py
Python
gpl-3.0
6,906
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-07-30 01:56 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0008_contactphone_place_on_header'), ] operations = [ migrations.Add...
andrius-momzyakov/grade
web/migrations/0009_auto_20170730_0156.py
Python
gpl-3.0
735
# Authors: John Dennis <jdennis@redhat.com> # # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information # # 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...
tbabej/freeipa
ipapython/log_manager.py
Python
gpl-3.0
62,638
""" Created by Emille Ishida in May, 2015. Class to implement calculations on data matrix. """ import os import sys import matplotlib.pylab as plt import numpy as np from multiprocessing import Pool from snclass.treat_lc import LC from snclass.util import read_user_input, read_snana_lc, translate_snid from snclass....
emilleishida/snclass
snclass/matrix.py
Python
gpl-3.0
10,669
__author__ = 'harsha' class ForceReply(object): def __init__(self, force_reply, selective): self.force_reply = force_reply self.selective = selective def get_force_reply(self): return self.force_reply def get_selective(self): return self.selective def __str__(self): ...
harsha5500/pytelegrambot
telegram/ForceReply.py
Python
gpl-3.0
353
#total_ordering_student.py import functools @functools.total_ordering class Student: def __init__(self, firstname, lastname): #姓和名 self.firstname = firstname self.lastname = lastname def __eq__(self, other): #判断姓名是否一致 return ((self.lastname.lower(), self.firstname.lower()) == ...
GH1995/tools
archives/Python_江老师给的代码/chapter09/total_ordering_student.py
Python
gpl-3.0
777
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify, Response from celery import Celery from werkzeug.utils import secure_filename from VideoPlayer import VideoPlayer from subprocess import Popen import os app = Flask(__name__) local = False if local: UPLOAD_FOLDER = '/home/dabo02/...
dabo02/Upwork_Tom_VideoShowroom
Back-End.py
Python
gpl-3.0
4,500
import todsynth import os import numpy import json import pandas class Calibrator( object ): ''' A todsynth.calibrator object is a container that stores coefficients that transform RAW dac units to physical units for a given TOD. ''' # Calibrator description. #00000000000000000000000000...
pafluxa/todsynth
build/lib.linux-x86_64-2.7/todsynth/calibration/calibrator.py
Python
gpl-3.0
2,810
# -*- encoding: utf-8 -*- """Generic base class for cli hammer commands.""" import logging from robottelo import ssh from robottelo.cli import hammer from robottelo.config import conf class CLIError(Exception): """Indicates that a CLI command could not be run.""" class CLIReturnCodeError(Exception): """Ind...
abalakh/robottelo
robottelo/cli/base.py
Python
gpl-3.0
14,527
normIncludes = [ {"fieldName": "field1", "includes": "GOOD,VALUE", "excludes": "BAD,STUFF", "begins": "", "ends": "", "replace": "goodvalue"}, {"fieldName": "field1", "includes": "", "excludes": "", "begins": "ABC", "ends": "", "replace": "goodvalue"}, {"fieldName": "field1", "includes": "", "excludes": "",...
rh-marketingops/dwm
dwm/test/test_normIncludes.py
Python
gpl-3.0
407
# -*- coding: utf-8 -*- """ Created on Thu Aug 31 16:04:18 2017 @author: adelpret """ import pinocchio as se3 import numpy as np from pinocchio import RobotWrapper from conversion_utils import config_sot_to_urdf, joints_sot_to_urdf, velocity_sot_to_urdf from dynamic_graph.sot.torque_control.inverse_dynamics_balance_c...
proyan/sot-torque-control
unitTesting/unit_test_inverse_dynamics_balance_controller.py
Python
gpl-3.0
6,246
""" YieldFrom astroid node This node represents the Python "yield from" statement, which functions similarly to the "yield" statement except that the generator can delegate some generating work to another generator. Attributes: - value (GeneratorExp) - The generator that this YieldFrom is delegating work...
shweta97/pyta
nodes/YieldFrom.py
Python
gpl-3.0
423
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'GeoNamesMatchingLogMatchedPlaces.remark' db.add_column('united_geonames_geonamesmatchinglo...
justinasjaronis/hpn
united_geonames/migrations/0015_auto__add_field_geonamesmatchinglogmatchedplaces_remark.py
Python
gpl-3.0
9,334
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
kartoza/geonode
geonode/people/__init__.py
Python
gpl-3.0
1,584
#!/usr/bin/python -tt # An incredibly simple agent. All we do is find the closest enemy tank, drive # towards it, and shoot. Note that if friendly fire is allowed, you will very # often kill your own tanks with this code. ################################################################# # NOTE TO STUDENTS # This is...
bweaver2/bzrFlag
bzagents/agent0.py
Python
gpl-3.0
3,861
#!/usr/bin/python # # Problem: Endless Knight # Language: Python # Author: KirarinSnow # Usage: python thisfile.py <input.in >output.out # Comments: OK for large, but may time out on small. from itertools import * MOD = 10007 # Precompute factorial table mod MOD fact = [1] * MOD for i in xrange(1, MOD): fact[i]...
KirarinSnow/Google-Code-Jam
Round 3 2008/D1.py
Python
gpl-3.0
2,492
""" This module provides functions that generate commonly used Hamiltonian terms. """ __all__ = [ "Annihilator", "Creator", "CPFactory", "HoppingFactory", "PairingFactory", "HubbardFactory", "CoulombFactory", "HeisenbergFactory", "IsingFactory", "TwoSpinTermFactory", ] from H...
wangshiphys/HamiltonianPy
HamiltonianPy/quantumoperator/factory.py
Python
gpl-3.0
15,843
""" Copyright 2016 Puffin Software. All rights reserved. """ from com.puffinware.pistat.models import User, Location, Category, Thermostat, Sensor, Reading from com.puffinware.pistat import DB from logging import getLogger log = getLogger(__name__) def setup_db(app): DB.create_tables([User, Location, Category, The...
PuffinWare/pistat
com/puffinware/pistat/db.py
Python
gpl-3.0
767
x = int(input()) y = int(input()) print('In this test case x =', x, 'and y =', y) if x >= y: print('(The maximum is x)') theMax = x else: print('(The maximum is y)') theMax = y print('The maximum is', theMax)
cemc/cscircles-wp-content
lesson_files/lesson9/if.py
Python
gpl-3.0
225
from django.conf.urls import url from django.contrib.auth.views import login, \ logout, \ logout_then_login, \ password_change, \ password_change_done, \ ...
t104801/webapp
security/urls.py
Python
gpl-3.0
1,479
import pygame from Explosion import Explosion class Bullet(object): PLAYER, ENEMY = 1, 0 def __init__(self, manager, parent, init_pos, direction, speed=3): self.manager = manager self.parent = parent self.image = pygame.image.load("res/tanks/bullet.png") self.expl...
Vicyorus/BattleTank
src/Bullet.py
Python
gpl-3.0
5,190
# -*- coding: utf-8 -*- # from rest_framework.viewsets import ModelViewSet from rest_framework.generics import RetrieveAPIView, ListAPIView from django.shortcuts import get_object_or_404 from django.db.models import Q from common.utils import get_logger, get_object_or_none from common.mixins.api import SuggestionMixin...
jumpserver/jumpserver
apps/assets/api/asset.py
Python
gpl-3.0
10,108
#!/usr/bin/env ../jazzshell """ Perform song identification by loading up a corpus of harmonic analyses and comparing parse results to all of them, according to some distance metric. """ """ ============================== License ======================================== Copyright (C) 2008, 2010-12 University of Edin...
markgw/jazzparser
bin/analysis/findsong.py
Python
gpl-3.0
10,264
#!/usr/bin/env python # -*- coding, utf-8 -*- # FIDATA. Open-source system for analysis of financial and economic data # Copyright © 2013 Basil Peace # This file is part of FIDATA. # # FIDATA is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
FIDATA/database-draft
predefined-data/import.py
Python
gpl-3.0
4,368
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import logging from sleekxmpp.xmlstream import JID from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.xmlstream.matcher import Sta...
tiancj/emesene
emesene/e3/xmpp/SleekXMPP/sleekxmpp/plugins/xep_0060/pubsub.py
Python
gpl-3.0
25,426
# Copyright 2016 Sam Parkinson <sam@sam.today> # # This file is part of Something for Reddit. # # Something for Reddit 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 ...
samdroid-apps/something-for-reddit
redditisgtk/main.py
Python
gpl-3.0
14,799
#!/usr/bin/env python """XBeeModem.py bypasses the XBee's 802.15.4 capabilities and simply uses it modem for communications You don't have to master 802.15.4 and a large set of XBee commands to make a very simple but potentially useful network. At its core, the XBee radio is a modem and you can use it directly f...
HelloClarice/ClariceNet
Pit/RaspberryPi/daemons/xbee.py
Python
gpl-3.0
4,184
from random import random, randint from PIL import Image, ImageDraw, ImageFont import perlin def draw_background(setup) : canvas = setup['canvas'] image = Image.new('RGBA', canvas, tuple(setup['color']['back'])) background = Image.new('RGBA', canvas, (0,0,0,0)) draw = ImageDraw.Draw(background) stars = [[ int(p...
vojtatom/planets
sun.py
Python
gpl-3.0
3,499
#!/usr/bin/python import pygame import math import random import sys import PixelPerfect from pygame.locals import * from water import Water from menu import Menu from game import Game from highscores import Highscores from options import Options import util from locals import * import health import cloud impor...
italomaia/turtle-linux
games/FunnyBoat/run_game.py
Python
gpl-3.0
3,190
#!/usr/bin/env python2 # # Copyright 2016 Philipp Winter <phw@nymity.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 3 of the License, or # (at your option) any later versio...
NullHypothesis/tor-dns-tools
dns-pcap-to-csv.py
Python
gpl-3.0
1,724
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-few-public-methods """...
mganeva/mantid
scripts/SANS/sans/state/convert_to_q.py
Python
gpl-3.0
10,526
#----------------------------------------------------------------------------- # Copyright (c) 2013-2020, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
etherkit/OpenBeacon2
client/linux-arm/venv/lib/python3.6/site-packages/PyInstaller/utils/cliutils/archive_viewer.py
Python
gpl-3.0
8,195
from .execute import GraphNode from . import preprocess def compile(layout_dict): preprocess.proprocess(layout_dict) # get nodes without any outputs root_nodes = layout_dict["nodes"].keys() - {l[0] for l in layout_dict["links"]} graph_dict = {} out = [GraphNode.from_layout(root_node, layout_dict, ...
Sverchok/SverchokRedux
core/compiler.py
Python
gpl-3.0
376
from .google import GoogleSpeaker from .watson import WatsonSpeaker """ alfred ~~~~~~~~~~~~~~~~ Google tts. """ __all__ = [ 'GoogleSpeaker', 'WatsonSpeaker' ]
lowdev/alfred
speaker/tts/__init__.py
Python
gpl-3.0
169
class Solution(object): def findPaths(self, m, n, N, i, j): """ :type m: int :type n: int :type N: int :type i: int :type j: int :rtype: int """ MOD = 1000000007 paths = 0 cur = {(i, j): 1} for i in xrange(N): ...
zqfan/leetcode
algorithms/576. Out of Boundary Paths/solution.py
Python
gpl-3.0
918
import os import unittest from urlparse import urlparse from paegan.utils.asarandom import AsaRandom class AsaRandomTest(unittest.TestCase): def test_create_random_filename(self): temp_filename = AsaRandom.filename(prefix="superduper", suffix=".nc") path = urlparse(temp_filename).path name...
asascience-open/paegan
tests/test_asarandom.py
Python
gpl-3.0
424
""" Contains exception classes specific to this project. """
electronic-library/electronic-library-core
library/exceptions.py
Python
gpl-3.0
62
class Zone: def __init__(self, id_zone, name, region, description): self.id = id_zone self.name = name self.region = region self.description = description
Crystal-SDS/dashboard
crystal_dashboard/dashboards/crystal/zones/models.py
Python
gpl-3.0
192
# -*- coding: iso-8859-1 -*- # --------------------------------------------------------------------------- # # SPEEDMETER Control wxPython IMPLEMENTATION # Python Code By: # # Andrea Gavana, @ 25 Sep 2005 # Latest Revision: 10 Oct 2005, 22.40 CET # # # TODO List/Caveats # # 1. Combination Of The Two Styles: # # SM_D...
jantman/python-obd
SpeedMeter.py
Python
gpl-3.0
81,844
#!/usr/bin/env python # Copyright (C) 2014-2017 Shea G Craig # # 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 ...
sheagcraig/python-jss
jss/misc_endpoints.py
Python
gpl-3.0
13,525
#!/usr/bin/env python """ Copyright (C) 2015 Louis Dijkstra This file is part of error-model-aligner 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 opt...
louisdijkstra/error-model-aligner
bin/estimate-null-insert-sizes.py
Python
gpl-3.0
3,976
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from selenium.webdriver.common.by import By from pages.base import BasePage class FirefoxWhatsNew73Page(BasePage): ...
ericawright/bedrock
tests/pages/firefox/whatsnew/whatsnew_73.py
Python
mpl-2.0
595
# flake8: noqa from bedrock.mozorg.templatetags import misc, social_widgets
sgarrity/bedrock
bedrock/mozorg/templatetags/__init__.py
Python
mpl-2.0
76
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import time import json from contextlib import nested import mock from nose.tools import eq_, ok_, assert_rai...
twobraids/socorro
socorro/unittest/external/hbase/test_crashstorage.py
Python
mpl-2.0
18,322
# -*- coding: utf-8 -*- import scrapy class QuotesSpider(scrapy.Spider): name = 'quotes' allowed_domains = ['quotes.topscrape.com/tag/humor/'] start_urls = ['http://quotes.topscrape.com/tag/humor/'] def parse(self, response): for quote in response.css('div.quote'): yield { ...
MegaWale/python-playb0x
scrapy/scrapyPlay/properties/properties/spiders/quotes.py
Python
mpl-2.0
641
import unittest import tempfile import os from os.path import join import zipfile from git import * from shutil import rmtree from gitbranchhealth.branchhealth import BranchHealthConfig class GitRepoTest(unittest.TestCase): def setUp(self): self.__mOriginTempDir = tempfile.mkdtemp(prefix='gitBranchHealthTest') ...
jwir3/gitbranchhealth
tests/testutil.py
Python
mpl-2.0
2,053
#!/usr/bin/env python # -*- coding: utf-8 -*- """Module copies data module Variable DIRECTIONS""" from data import DIRECTIONS DIRECTIONS = DIRECTIONS[0:3]+('West',)
ModestoCabrera/is210-week-07-warmup
task_03.py
Python
mpl-2.0
167
import bot import config if __name__ == '__main__': bot.init(config) bot.cancel_all()
linouxis9/bitshares2-liquiditybots
docker-exchangebot/exchangebots/cancel_all.py
Python
mpl-2.0
94
import os MOZ_OBJDIR = 'obj-firefox' config = { 'default_actions': [ 'clobber', 'clone-tools', 'checkout-sources', #'setup-mock', 'build', #'upload-files', #'sendchange', 'check-test', 'valgrind-test', #'generate-build-stats', ...
Yukarumya/Yukarum-Redfoxes
testing/mozharness/configs/builds/releng_sub_linux_configs/64_valgrind.py
Python
mpl-2.0
1,603
# -*- coding: utf-8 -*- from django.db import migrations, models from django.conf import settings import editorsnotes.main.fields class Migration(migrations.Migration): dependencies = [ ('main', '0018_auto_20151019_1331'), ] operations = [ migrations.AlterField( model_name=...
editorsnotes/editorsnotes
editorsnotes/main/migrations/0019_auto_20160229_0921.py
Python
agpl-3.0
10,543
""" Login and logout views for the browseable API. Add these to your root URLconf if you're using the browseable API and your API requires authentication. The urls must be namespaced as 'rest_framework', and you should make sure your authentication settings include `SessionAuthentication`. urlpatterns = patterns...
voer-platform/vp.repo
vpr/rest_framework/urls.py
Python
agpl-3.0
724
__author__ = 'marijn' from setuptools import setup setup( name="goal_notifier", version="0.0.0", license="AGPL3", packages=['goal_notifier'], requires=[ "google-api-python-client", "pykka", "pydub", "pyopenssl", ], scripts=["goal_notifier"] )
marijnvriens/goal_notifier
setup.py
Python
agpl-3.0
304
from django.contrib.auth.models import User, Group from django.test import Client from rest_framework import status from app.models import Project, Task from app.models import Setting from app.models import Theme from webodm import settings from .classes import BootTestCase from django.core.exceptions import Validatio...
OpenDroneMap/WebODM
app/tests/test_app.py
Python
agpl-3.0
9,412
# coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open p...
TeXitoi/navitia
source/jormungandr/jormungandr/modules/v1_routing/v1_routing.py
Python
agpl-3.0
9,012
# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models from odoo.exceptions import ValidationError class EbillPaymentContract(models.Model): _inherit = "ebill.payment.contract" paynet_account_number = fields.Char(string="Paynet ...
OCA/l10n-switzerland
ebill_paynet/models/ebill_payment_contract.py
Python
agpl-3.0
1,855
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import pytest from django.conf import settings from shoop.core.pricing impo...
akx/shoop
shoop_tests/core/test_default_pricing.py
Python
agpl-3.0
2,696
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import deform from pyramid.view import view_config from dace.processinstance.core import DEFAULTMAPPING_ACTIONS_VIEWS from pontus.default_behavior import Cancel from p...
ecreall/nova-ideo
novaideo/views/reports_management/restor.py
Python
agpl-3.0
2,013
# coding=utf-8 # This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing import BikaListingTable from bika.lims.browser.worksheet.views.anal...
rockfruit/bika.lims
bika/lims/browser/worksheet/views/analyses_transposed.py
Python
agpl-3.0
4,358
# -*- coding: utf-8 -*- # © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models, fields class ExceptionRule(models.Model): _inherit = 'exception.rule' rule_group = fields.Selection( selection_add...
kittiu/sale-workflow
sale_exception/models/sale.py
Python
agpl-3.0
2,008
# -*- coding: utf8 -*- # # Copyright (C) 2017 NDP Systèmes (<http://www.ndp-systemes.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License,...
ndp-systemes/odoo-addons
stock_procurement_split/__init__.py
Python
agpl-3.0
822
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from open_municipio.locations.models import Location class LocationAdmin(admin.ModelAdmin): list_display = ('name', 'count') admin.site.register(Location, LocationAdmin)
openpolis/open_municipio
open_municipio/locations/admin.py
Python
agpl-3.0
267
import logging import json from django.test.client import Client, RequestFactory from django.test.utils import override_settings from django.contrib.auth.models import User from django.core.management import call_command from django.core.urlresolvers import reverse from mock import patch, ANY, Mock from nose.tools imp...
sudheerchintala/LearnEraPlatForm
lms/djangoapps/django_comment_client/base/tests.py
Python
agpl-3.0
35,501
""" Key-value store that holds XBlock field data read out of Blockstore """ from collections import namedtuple from weakref import WeakKeyDictionary import logging from xblock.exceptions import InvalidScopeError, NoSuchDefinition from xblock.fields import Field, BlockScope, Scope, UserScope, Sentinel from xblock.fiel...
stvstnfrd/edx-platform
openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py
Python
agpl-3.0
16,343
# Yith Library Server is a password storage server. # Copyright (C) 2012-2013 Yaco Sistemas # Copyright (C) 2012-2013 Alejandro Blanco Escudero <alejandro.b.e@gmail.com> # Copyright (C) 2012-2013 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is...
lorenzogil/yith-library-server
yithlibraryserver/user/__init__.py
Python
agpl-3.0
2,517
# # XML Export, (C) Agaplan 2011 # import models import wizard
jmesteve/saas3
openerp/addons/xml_export/__init__.py
Python
agpl-3.0
64
#################################################################################################### # # GroupedPurchaseOrder - A Django Application. # Copyright (C) 2014 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
FabriceSalvaire/grouped-purchase-order
GroupedPurchaseOrder/bootstrap/components.py
Python
agpl-3.0
6,955
# -*- encoding: utf-8 -*- # © 2014 Elico Corp (https://www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) { 'name': 'Purchase Price List Item', 'version': '7.0.1.0.0', 'category': 'Purchase', 'sequence': 19, 'summary': 'Purchase Price List Item', 'descriptio...
Elico-Corp/openerp-7.0
purchase_price_list_item/__openerp__.py
Python
agpl-3.0
1,073
from flask import Flask, request from flask_bootstrap import Bootstrap from flask_babel import Babel import agherant from webserver_utils import gevent_run def create_app(conf): app = Flask(__name__) app.config.update(conf) Bootstrap(app) babel = Babel(app) app.register_blueprint(agherant.agheran...
insomnia-lab/libreant
webant/agherant_standalone.py
Python
agpl-3.0
591
import json from decimal import Decimal from django import forms class MoneyField(forms.DecimalField): def __init__(self, **kwargs): kwargs["decimal_places"] = 2 for f in ["min_value", "max_value"]: if f in kwargs: kwargs[f] = Decimal(kwargs[f]) / 100 super()._...
lafranceinsoumise/api-django
agir/donations/form_fields.py
Python
agpl-3.0
1,946
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Soft...
omarkhan/opencraft
instance/tests/test_openstack.py
Python
agpl-3.0
3,877
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Math.Float import Float # For fuzzy comparison of edge cases. ## Represents a line segment in 2D. # # The line segment is represented by two endpoints. class LineSegment(object): ## Creates a new line ...
onitake/Uranium
UM/Math/LineSegment.py
Python
agpl-3.0
3,205
import os #: The title of this site SITE_TITLE = 'Job Board' #: Database backend SQLALCHEMY_DATABASE_URI = 'postgresql:///hasjob_testing' SERVER_NAME = 'hasjob.travis.local:5000' #: LastUser server LASTUSER_SERVER = 'https://hasgeek.com/' #: LastUser client id LASTUSER_CLIENT_ID = os.environ.get('LASTUSER_CLIENT_ID', ...
hasgeek/hasjob
instance/testing.py
Python
agpl-3.0
602
# -*- coding: utf-8 -*- from .pagemodels import * from .catalogmodels import * from .utilmodels import * from .usermodels import * from .dbconnect import Base, engine def init_models(): Base.metadata.create_all(engine)
web-izmerenie/avto-lux161
avto-lux/app/models/init_models.py
Python
agpl-3.0
222
# Copyright © 2019 José Alberto Orejuela García (josealberto4444) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
josealberto4444/ApodNasaBot
api.py
Python
agpl-3.0
5,412
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), e...
carthach/essentia
test/src/unittests/spectral/test_triangularbarkbands.py
Python
agpl-3.0
5,769
class Location(object): def __init__(self, x, y): self.x = x self.y = y def __add__(self, direction): return Location(self.x + direction.x, self.y + direction.y) def __sub__(self, direction): return Location(self.x - direction.x, self.y - direction.y) def __repr__(sel...
Spycho/aimmo
aimmo-game-worker/simulation/location.py
Python
agpl-3.0
529