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
class Predictor: # def __init__(self): # self.in = "Test" def get_tasks(self): print 'task'
praveenax/BotCentric
TFEngine/TF/Predict.py
Python
gpl-3.0
126
# -*- coding: utf-8 -*- from __future__ import division, print_function """ billiards module Copyright © 2012-2015 Moritz Schönwetter This file is part of pyopsys. pyopsys is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
mophahr/pyopsys
billiards.py
Python
gpl-3.0
12,768
from __future__ import absolute_import import io import os import pytz import six import yaml from django.test import TestCase from ner_v2.detectors.temporal.time.time_detection import TimeDetector class TimeDetectionTestMeta(type): yaml_test_files = [ os.path.join(os.path.dirname(os.path.abspath(__fil...
hellohaptik/chatbot_ner
ner_v2/tests/temporal/time/test_time_detection.py
Python
gpl-3.0
4,271
# vim:set et sts=4 sw=4: # # ibus - The Input Bus # # Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> # Copyright (c) 2007-2008 Red Hat, Inc. # # 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 Sof...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/ibus/_config.py
Python
gpl-3.0
1,503
#!/usr/bin/env python from src.santaBot import SantaBot from src.config.config import config bot = SantaBot(config).run()
901/Gwent-twitch-bot
program.py
Python
gpl-3.0
124
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Omero RT Description : Omero plugin Date : October 21, 2011 copyright : (C) 2011 by Giuseppe Sucameli (Faunalia) email : sucameli@faunalia....
faunalia/rt_geosisma_offline
DlgWaiting.py
Python
gpl-3.0
2,446
import os import unittest from vsg.rules import report_statement from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_001_test_input.vhd')) dIndentMap = utils.read_indent_file() dIndentMap = utils.read_ind...
jeremiah-c-leary/vhdl-style-guide
vsg/tests/report_statement/test_rule_001.py
Python
gpl-3.0
1,349
import collections import sys import random import heapq ENGLISH_FREQ = (8.167, 1.492, 2.782, 4.253, 12.702, 2.228, 2.015, 6.094, 6.966, 0.153, 0.772, 4.025, 2.406, 6.749, 7.507, 1.929, 0.095, 5.987, 6.327, 9.056, 2.758, 0.978, 2.360, 0.150, 1.974, 0.074) # @include CharWithFrequency =...
meisamhe/GPLshared
Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/huffman_encoding.py
Python
gpl-3.0
3,151
import bpy import sys import os import re bpy.context.scene.unit_settings.system = 'IMPERIAL' bpy.context.scene.unit_settings.system_rotation = 'DEGREES' bpy.ops.file.make_paths_absolute() bpy.context.scene.render.fps = 24 bpy.context.scene.render.fps_base = 1 # bpy.context.scene.render.use_single_layer = False # try...
shrinidhi666/rbhus
etc/startupScripts/blend/afterFile.py
Python
gpl-3.0
4,731
import logging from foremanop.config import config_model from cliff.command import Command from foremanop.rest.foremanclient import ForemanRESTClient class BootstrapInfo(Command): "Get config data for Satellite bootstrap from configuration files" log = logging.getLogger(__name__) def get_parser(self, p...
javiroman/foreman-op
foremanop/bootstrap/bootstrap.py
Python
gpl-3.0
1,636
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2017 - Tioben Neenot # # 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...
tneenot/mkbuild
src/commands/hello.py
Python
gpl-3.0
1,200
def writerChildFunction( qTo , qFrom , windowSize = [200,200] , windowPosition = [0,0] ): import sdl2 import sdl2.ext import sys import time try: import appnope appnope.nope() except: pass byteify = lambda x, enc: x.encode(enc) sdl2.SDL_Init(sdl2.SDL_INIT_VIDEO) window = sdl2.ext.Window("writer",size=...
mike-lawrence/endo_rgb
writerChild.py
Python
gpl-3.0
1,275
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
BackupTheBerlios/espressopp
src/Exceptions.py
Python
gpl-3.0
2,439
from __future__ import print_function import requests simple_base = u"https://simple.wikipedia.org/w/api.php" en_base = u"https://en.wikipedia.org/w/api.php" list_endpoint = u"?format=json&action=query&list=categorymembers&cmtitle={cat}&continue=-||&cmcontinue={cont}" page_endpoint = u"?action=query&format=json&redire...
samzhang111/wikipedia-jargon
all-subjects/get_category_text.py
Python
gpl-3.0
2,558
import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setup(2, GPIO.OUT) GPIO.setup(3, GPIO.OUT) GPIO.setup(4, GPIO.OUT) GPIO.output(3, GPIO.LOW) GPIO.output(2, GPIO.LOW) p = GPIO.PWM(4, 50) p.start(50) def forward(x): GPIO.output(2, GPIO.HIGH) p.ChangeDutyCycle(25) print("avanti") ...
ifala/SoLLAMo
sensor/H-bridge.py
Python
gpl-3.0
559
############################################################################### # # Comments - A class for writing the Excel XLSX Worksheet file. # # Copyright 2013, John McNamara, jmcnamara@cpan.org # import re from . import xmlwriter from .utility import xl_rowcol_to_cell class Comments(xmlwriter.XMLwriter): ...
ivmech/iviny-scope
lib/xlsxwriter/comments.py
Python
gpl-3.0
5,263
""" Module for internal collector configuration file generator. The complexity collector library needs some specific configuration settings in order to work properly and efficiently. The library uses the circ.conf file to pass the configuration data at collector's runtime. This module handles all the ...
tfiedor/perun
perun/collect/complexity/configurator.py
Python
gpl-3.0
5,317
# Copyright (C) 2006, Red Hat, Inc. # Copyright (C) 2007, One Laptop Per Child # # 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 ...
sugarlabs/sugar
src/jarabe/journal/journalactivity.py
Python
gpl-3.0
23,901
# Problem 48 # The series, 1^1 + 2^2 + 3^3 + ... + 10^10 = 10405071317. # # Find the last ten digits of the series, 1^1 + 2^2 + 3^3 + ... + 1000^1000. # just loop over numbers and raise to the appropriate power running_total = 0 for i in range(1, 1001): running_total += i ** i print("running_total is now: {0}".f...
chriscallan/Euler
Probs_1_to_50/048_SelfPowers.py
Python
gpl-3.0
466
from django.templatetags.static import static from django.template import Library from django.conf import settings from math import fabs,floor from agentex.agentex_settings import decision_images from agentex.models import Datapoint register = Library() @register.filter(name="planetprogress") def planet_progress(user...
LCOGT/citsciportal
app/agentex/templatetags/observing_extras.py
Python
gpl-3.0
2,297
from django.shortcuts import render, redirect, get_object_or_404 from authentication.decorators import has_permission @has_permission('add') def AddView(request, model, model_form, initial={}): if request.method == 'POST': form = model_form(request.POST) if form.is_valid(): instance = f...
nickmartin607/heartbeat
core/views.py
Python
gpl-3.0
2,054
from imports import (Qt, QDialog, QVBoxLayout, QHBoxLayout, QTabWidget, QPushButton, QFont, QListWidget, QComboBox, QCheckBox, QTableWidget, QTableWidgetItem, QAbstractItemView, QFrame, QButtonGroup, QRadioButton, QLineEdit, QMenu, QAction, QCompleter, QStringListModel) from gu...
PhonologicalCorpusTools/SLP-Annotator
slpa/gui/search.py
Python
gpl-3.0
34,301
from pathlib import Path from . import aniDBfileInfo as fileInfo class TvDBMap(object): def __init__(self, cache_dir: Path): self.xmlMap = fileInfo.read_tvdb_map_xml(cache_dir) def get_tvdb_for_anidb(self, anidb_id): return self._get_x_for_y(anidb_id, "anidbid", "tvdbid") def get_anidb_...
h3llrais3r/SickRage
sickchill/adba/aniDBtvDBmaper.py
Python
gpl-3.0
1,457
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
schlueter/ansible
lib/ansible/plugins/action/script.py
Python
gpl-3.0
6,605
# -*- coding: utf-8 -*- from PIL import Image import pygame class ImgPil(object): def __init__(self, loadedimg, (cutposx, cutposy, width, height), (mergedx, mergedy), splitf, imgtype='RGBA'): self.cuted = loadedimg.crop((cutposx, cutposy, cutposx+width, cutposy+height)) merged = Image.ne...
X286/BrickOut
addSurface.py
Python
gpl-3.0
762
from .alcohol_consumption_and_substance_use_form import ( AlcoholConsumptionAndSubstanceUseForm) from .attitudes_towards_people_form import AttitudesTowardsPeopleForm from .background_characteristics_form import ( BackgroundCharacteristicsForm) from .childbearing_and_antenatal_care_form import ( Childbearin...
botswana-harvard/bais-subject
bais_subject/forms/__init__.py
Python
gpl-3.0
826
import udt_suc_sv import suc import suc_ne import collections # Tags a sentence with SUC tags based on a trained model class SucTagger(): def __init__(self, tagging_model): with open(tagging_model, 'rb') as f: self.tagger_weights = f.read() def tag(self, sentence): tags_list = suc...
robertostling/efselab
tagger.py
Python
gpl-3.0
5,917
""" VPy config """ from vpy.proc import Proc class DProc(Proc): """ class for VPy's calculations """ def __init__(self): self.tasks = [] self.done_tasks = [] def add_task(self, task): self.tasks.append(task) # todo
leofnch/kc
hodl/block/sc/machine.py
Python
gpl-3.0
269
#(usr,psw) #-*- coding: utf-8 -*- TASK_LIST = ( )
rapidhere/rpbtman_autosign
task_list.py
Python
gpl-3.0
50
import datetime import calendar import tables from pylab import * from scipy.optimize import curve_fit from sapphire.kascade import KascadeCoincidences from artist import GraphArtist, MultiPlot import utils USE_TEX = True # For matplotlib plots if USE_TEX: rcParams['font.serif'] = 'Computer Modern' rcPara...
tomkooij/sapphire
scripts/kascade/plot_matching_events.py
Python
gpl-3.0
4,766
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^api/', include('accounts.api.urls')), url(r'^api/auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^ap...
vadimka123/team_manager
team_manager/urls.py
Python
gpl-3.0
532
import numpy as np from Orange.data import DiscreteVariable, Domain from Orange.data.sql.table import SqlTable from Orange.statistics import distribution, contingency from .transformation import Transformation from . import _discretize __all__ = ["EqualFreq", "EqualWidth", "EntropyMDL", "DomainDiscretizer"] class D...
PythonCharmers/orange3
Orange/preprocess/discretize.py
Python
gpl-3.0
13,859
""" This packages contains modules for clustering events """ from events import * from veto import * from coinc import *
bema-ligo/pycbc
pycbc/events/__init__.py
Python
gpl-3.0
123
""" High Order Fuzzy Time Series by Hwang, Chen and Lee (1998) Jeng-Ren Hwang, Shyi-Ming Chen, and Chia-Hoang Lee, “Handling forecasting problems using fuzzy time series,” Fuzzy Sets Syst., no. 100, pp. 217–228, 1998. """ import numpy as np from pyFTS.common import FuzzySet, FLR, Transformations, fts class HighOrd...
petroniocandido/pyFTS
pyFTS/models/hwang.py
Python
gpl-3.0
2,175
# -*- coding: UTF-8 -*- # admin.py # # Copyright (C) 2014 HES-SO//HEG Arc # # Author(s): Cédric Gaspoz <cedric.gaspoz@he-arc.ch> # # This file is part of Gelato. # # Gelato 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 ...
HEG-Arc/gelato
gelato/wallets/admin.py
Python
gpl-3.0
1,213
from LOTlib.Miscellaneous import Infinity, attrmem from copy import copy, deepcopy import numpy class Hypothesis(object): """A hypothesis bundles together a value (hypothesis value) with a bunch of remembered states, like posterior_score, prior, likelihood. This class is typically a superclass of the thin...
piantado/LOTlib
LOTlib/Hypotheses/Hypothesis.py
Python
gpl-3.0
6,995
from .stis import *
jchowk/pyND
pyND/stis/__init__.py
Python
gpl-3.0
20
#!/usr/bin/env python #-*-coding:utf-8-*- # import subprocess import sys import os import tempfile import shutil import contextlib import zipfile import platform import re from distutils import log from urlparse import urlparse try: from urllib.request import urlopen except ImportError: from urllib2 import ur...
soarpenguin/python-scripts
download_helper.py
Python
gpl-3.0
4,747
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-10 10:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('snapventure', '0011_auto_20161110_1012'), ] operations = [ migrations.Alter...
DomDomPow/snapventure
snapventure-backend/snapventure/migrations/0012_auto_20161110_1024.py
Python
gpl-3.0
447
VERSION = "6.46"
pedja1/aNmap
dSploit/jni/nmap/zenmap/zenmapCore/Version.py
Python
gpl-3.0
17
#import json import codecs from pprint import pprint import sqlite3 import collections import re import os import urllib.request SQL_DUMP_FILENAME = "tn1.sql" #JSON_FILENAME = "output.json" SQLITE_FILENAME = "collectConnectDB.db" FILEDIR = os.path.dirname(os.path.realpath(__file__)) PICSDIR = FILEDIR + "\pics\\" fina...
SeniorDesignTeam8/Collect-Connect
SDProject1/CollectConnect/Assets/combined_v20171029.py
Python
gpl-3.0
17,612
#!/usr/bin/python from cgi import escape import cherrypy class Page: def __init__(self,title): self.title = title def header(self): yield '''<html> <head><title>%s</title><head> <body><h2>%s</h2>''' % (self.title, self.title) yield '<a href="/">home</a>' def footer(self): yield '<div class="footer">...
MaxTyutyunnikov/lino
obsolete/src/sandbox/cherrypy/2/hello2.py
Python
gpl-3.0
1,108
#! /usr/bin/env python # -*- coding:utf-8 -*- from flask import Flask # from flask import Flask, render_template # from flask_bootstrap import Bootstrap from flask_login import LoginManager, current_user # from flask_migrate import Migrate from flask_script import Manager from flask_sqlalchemy import SQLAlchemy from fl...
d2emon/privatisation-py
src/app.py
Python
gpl-3.0
3,887
#!/usr/bin/env python2 import argparse import os import sys from sandwich import Log from sandwich import swig_shop try: from gi.repository import Gtk, Gdk, GLib except: try: import gtk as Gtk except: print("You need gtk") class SandwichesWindow(Gtk.Window): def __init__(self, global_...
mfischer/sandwich-smartcard-voodoo-thing
swig/nice_gui.py
Python
gpl-3.0
4,184
# -*- coding: utf-8 -*- # Copyright (c) 2011 Stas Zytkiewicz stas.zytkiewicz@schoolsplay.org # # Code is taken from # http://inventwithpython.com/blog/2011/06/10/new-game-source-code-four-in-a-row # # Graphical Four-In-A-Row (a Connect Four clone) # http://inventwithpython.com/blog # By Al Sweigart al@inventwithpy...
childsplay-mobi/cp-pygame
lib/fourrow.py
Python
gpl-3.0
26,070
from django import forms # base models for FieldType classes class FieldConfigForm(forms.Form): """ The base form for field configuration. 'required', 'label', and 'help_text' are implemented on all field objects. """ required = forms.BooleanField(label="Required", required=False, help_text=...
sfu-fas/coursys
onlineforms/fieldtypes/base.py
Python
gpl-3.0
3,275
import sys import os import argparse import yaml import pprint sys.path.append(os.path.join(sys.path[0], "../../..")) # enable package import from parent directory from KicadModTree import * # NOQA class Dimensions(object): def __init__(self, base, variant, cut_pin=False, tab_linked=False): # FROM KL...
SchrodingersGat/kicad-footprint-generator
scripts/Packages/TO_SOT_Packages_SMD/DPAK.py
Python
gpl-3.0
12,492
#!/bin/python #from Parameters import * #from KeywordsList import *
laurentfite/PyJoke
include/__init__.py
Python
gpl-3.0
71
# -*- coding: utf-8 -*- # # Copyright (C) 2013 GNS3 Technologies 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 3 of the License, or # (at your option) any later version. ...
harrijs/gns3-server
gns3server/modules/dynamips/nodes/c3600.py
Python
gpl-3.0
4,544
#!/usr/bin/python from xmlparser import * import string, re, sys def sortkey(item): splitkeys = re.findall('^(\d*)(\w*)', item) if splitkeys[0][0] == "": return sys.maxint, splitkeys[0][1] else: return int(splitkeys[0][0]), splitkeys[0][1] default_size = "6-uni" output = open('leggings_children....
lisjump/dopplemaker
leggings_children_create_inx.py
Python
gpl-3.0
5,177
# -*- coding: utf-8 -*- ##Copyright (C) [2003] [Juergen Hamel, D-32584 Loehne] ##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 vers...
CuonDeveloper/cuon
cuon_client/cuon/bin/cuon/Proposal/proposal.py
Python
gpl-3.0
77,624
from __future__ import division import errno import json import os import sys import time from twisted.internet import task from twisted.python import log from twisted.web import resource, static from bitcoin import data as bitcoin_data from . import data as p2pool_data from util import graph, math def _atomic_read...
goblin/p2pool
p2pool/web.py
Python
gpl-3.0
19,466
from django.apps import AppConfig class LccConfig(AppConfig): name = "lcc"
eaudeweb/lcc-toolkit
lcc/apps.py
Python
gpl-3.0
81
from __future__ import absolute_import, unicode_literals from rest_framework import mixins from rest_framework import generics from rest_framework.response import Response from rest_framework import status from rest_framework import renderers from rest_framework.decorators import api_view try: from django.channe...
Zempashi/stratus
stratus_plugins/gazonentry/views.py
Python
gpl-3.0
3,382
import os, datetime, json from LogController import LogController from django.shortcuts import render,redirect from ..models import RedirectionRule, CableOperator, Country from django.http import HttpResponse from django.template.defaulttags import register from django.contrib import messages RULES = {'H': 'HotGo Regi...
emilianobilli/backend
dam/cawas/Controller/RedirectionRulesController.py
Python
gpl-3.0
7,787
import traceback from visidata import vd, VisiData, options __all__ = ['stacktrace', 'ExpectedException'] class ExpectedException(Exception): 'Controlled Exception from fail() or confirm(). Status or other interface update is done by raiser.' pass def stacktrace(e=None): if not e: return trace...
saulpw/visidata
visidata/errors.py
Python
gpl-3.0
1,031
from __future__ import division from builtins import str from builtins import range from builtins import object from psychopy import visual, event, info import pytest import numpy as np import shutil, os from tempfile import mkdtemp from psychopy.tests import utils # Testing for memory leaks in PsychoPy classes (expe...
hoechenberger/psychopy
psychopy/tests/test_misc/memory_usage.py
Python
gpl-3.0
6,060
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The Initia...
nishad89/newfies-dialer
newfies/survey/function_def.py
Python
mpl-2.0
1,074
import json from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt import logging # Get an instance of a logger logger = logging.getLogger(__name__) @csrf_exempt def authe...
gtalent/soma
api_server/soma/views.py
Python
mpl-2.0
933
import sys import os, os.path import re import random import fileinput import getopt import shutil import zipfile def playVersion(play_env): play_version_file = os.path.join(play_env["basedir"], 'framework', 'src', 'play', 'version') return open(play_version_file).readline().strip() def replaceAll(file, searc...
deanhiller/databus
webapp/play1.3.x/framework/pym/play/utils.py
Python
mpl-2.0
10,462
# 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 argparse import ArgumentParser from copy import deepcopy import json import mozinfo import moznetwork import os im...
cstipkovic/spidermonkey-research
testing/marionette/harness/marionette/runner/base.py
Python
mpl-2.0
42,870
#!/usr/bin/python3 import version def info(): print("Outline v{0}".format(version.__version__)) print("Copyright (c) Sean Francis N. Ballais. All rights reserved 2015.") def help(): info() print("") print("Usage:") print(" outline <project_name> [-c <file> | --config=<file>] [-v | --verbose]...
seanballais/outline
outline/info.py
Python
mpl-2.0
1,266
from django.apps import AppConfig import session_csrf class BaseAppConfig(AppConfig): name = 'medlem.base' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session # based CSRF will prevent attacks from ap...
mozilla/medlem
medlem/base/app.py
Python
mpl-2.0
595
""" Control GMP with a game controler. This script can be modified to send system events or AppleScripts which you could use to get greater control over your computer. We use requests to get the URLs which can be used to control GMP. Buttons are logged for convenience (and debugging). """ import pygame, logging, sys...
chrisnorman7/gremote
gremote.py
Python
mpl-2.0
2,122
from os import path from vj4.util import json MANIFEST_FILE = 'static-manifest.json' _manifest_dir = None _manifest_path = None _manifest = {} def init(static_dir): global _manifest_dir, _manifest_path, _manifest _manifest_dir = static_dir _manifest_path = path.join(_manifest_dir, MANIFEST_FILE) try: wi...
vijos/vj4
vj4/service/staticmanifest.py
Python
agpl-3.0
516
#!/usr/bin/env python import os import sys import sys sys.path.append(os.path.join(os.path.dirname(__file__), "apps")) if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sites.spawnsongsite.settings") from django.core.management import execute_from_command_line execute_from_comm...
asm-products/spawnsong
manage.py
Python
agpl-3.0
339
import urlparse import sys,urllib import xbmc, xbmcgui, xbmcaddon, xbmcplugin base_url = sys.argv[0] addon_handle = int(sys.argv[1]) args = urlparse.parse_qs(sys.argv[2][1:]) def build_url(query): return base_url + '?' + urllib.urlencode(query) def play_video(path): """ Play a video by the provided pa...
munchycool/forthelulz
plugin.video.playv1d30/playvideo.py
Python
agpl-3.0
1,433
# This file is part of OpenHatch. # Copyright (C) 2010 Jack Grigg # Copyright (C) 2010 John Stumpo # Copyright (C) 2011 Krzysztof Tarnowski (krzysztof.tarnowski@ymail.com) # Copyright (C) 2010, 2011 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
campbe13/openhatch
mysite/missions/svn/views.py
Python
agpl-3.0
7,020
#-*- encoding: utf-8 -*- from django.db import models from django.db.models.signals import post_save from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext as _ class ExtendPage(models.Model): flatpage = models.OneToOneField(FlatPage, pr...
nephthys/insidetags
apps/extflatpages/models.py
Python
agpl-3.0
1,430
# This file is part of VoltDB. # Copyright (C) 2008-2018 VoltDB Inc. # # 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 ver...
simonzhangsm/voltdb
lib/python/vdm/server/__init__.py
Python
agpl-3.0
743
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pb_media_statistic.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflectio...
OpenSight/StreamSwitch
controller/python/streamswitch/pb/pb_media_statistic_pb2.py
Python
agpl-3.0
8,598
#!/usr/bin/env python # # Copyright (C) 2014 Simone Basso <bassosimone@gmail.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 Software Foundation, either version 3 of the # License, or (at your option...
TellMeFirst/tmfcore_build_war
test/tomcat.py
Python
agpl-3.0
937
""" This file defines variables for the modelled legislation. A variable is a property of an Entity such as a Person, a Household… See https://openfisca.org/doc/key-concepts/variables.html """ from datetime import date # Import from numpy the operations you need to apply on OpenFisca's population vectors # Import f...
openfisca/country-template
openfisca_country_template/variables/demographics.py
Python
agpl-3.0
1,949
# -*- coding: utf-8 -*- # This file is part of Tumulus. # # Copyright (C) 2013 OKso (http://okso.me) # # 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...
oksome/Tumulus
tumulus/tests/test_lib.py
Python
agpl-3.0
2,325
# coding=utf-8 import copy import datetime from ddt import ddt, file_data from mock import patch from nose.tools import raises import pytz from django.db import DatabaseError, IntegrityError from django.utils import timezone from openassessment.assessment.api import peer as peer_api from openassessment.assessment.mo...
Edraak/edx-ora2
openassessment/assessment/test/test_peer.py
Python
agpl-3.0
73,602
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase import re class ComicData(ComicDataBase): name = 'Whomp!' language = 'en' url = 'http://www.whompcomic.com/' start_date = '2010-06-14' rights = 'Ronnie Filyaw' class Crawler(CrawlerBa...
datagutten/comics
comics/comics/whomp.py
Python
agpl-3.0
1,153
# -*- coding: utf-8 -*- # Copyright 2018 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import fields, models class HrTrainingCategory(models.Model): _inherit = "hr.training_category" allowance_pricelist_id = fields.Many2one( string="Training Allow...
open-synergy/opnsynid-hr
hr_employee_training_allowance/models/hr_training_category.py
Python
agpl-3.0
417
import unittest from spiralgalaxygame import log from mock import patch, sentinel class logTests (unittest.TestCase): @patch('logging.getLogger') def test_bind_logger(self, m_getLogger): @log.bind_logger def some_func(log, x): return (log, x) self.failUnless(m_getLogger...
nejucomo/sgg
spiralgalaxygame/tests/test_log.py
Python
agpl-3.0
489
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Etienne Noreau-Hebert <e@zncb.io> # # 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 ...
zncb/wtrace
wtrace/asset.py
Python
agpl-3.0
3,521
# coding: utf-8 import datetime import re import urllib2 from django.conf import settings from django.core.cache import cache from django.core.files.base import ContentFile from django.core import urlresolvers from django.db import models from django.template.defaultfilters import slugify from django.utils.safestring...
rhymeswithcycle/openparliament
parliament/core/models.py
Python
agpl-3.0
29,760
# -*- 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. from __future__ import unicode_literals import warnings import django.con...
akx/shoop
shoop/admin/urls.py
Python
agpl-3.0
2,374
'''u413 - an open-source BBS/transmit/PI-themed forum Copyright (C) 2012 PiMaster Copyright (C) 2012 EnKrypt 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 Licens...
ConsciousCode/u413
api/topic.py
Python
agpl-3.0
5,943
# -*- coding: utf-8 -*- from . import common from . import test_res_partner from . import test_update_notification
ddico/odoo
addons/mail/tests/__init__.py
Python
agpl-3.0
116
"""|sect| `CDMI_9`_ Tests the creation, reading, updating, and deleting of container objects. All mandatory header fields and content are tested. Where an assertion tests a specific part of the spec, a link is provided to the relevant section, and the assertion's comment prints the section number in parentheses after...
UMD-DRASTIC/drastic-web
tests/functional_tests/test_container.py
Python
agpl-3.0
16,815
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-21 16:41 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('datasets', '0006_datasetrelease'), ] operations = [ migrations.AddField( ...
MTG/freesound-datasets
datasets/migrations/0007_auto_20170321_1741.py
Python
agpl-3.0
1,387
# -*- coding:utf-8 -*- from datetime import datetime import csv import os import re os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from videos.models import Video, Tag, Url BASE_URL = 'http://mostra.videolivre.org.br/files/fisl_2011' url_finder = re.compile(r'https?://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%...
gabinetedigital/videre
scripts/import2011.py
Python
agpl-3.0
1,943
# encoding: utf-8 import os import binascii from collections import OrderedDict import cachemodel from basic_models.models import CreatedUpdatedAt from django.urls import reverse from django.db import models, transaction from django.db.models import Q from entity.models import BaseVersionedEntity from issuer.models ...
concentricsky/badgr-server
apps/backpack/models.py
Python
agpl-3.0
8,542
# -*- coding: utf-8 -*- """ Enterprise Integrated Channel Blackboard Django application initialization. """ from django.apps import AppConfig CHANNEL_NAME = 'integrated_channels.blackboard' VERBOSE_NAME = 'Enterprise Blackboard Integration' BRIEF_CHANNEL_NAME = 'blackboard' class BlackboardConfig(AppConfig): ""...
edx/edx-enterprise
integrated_channels/blackboard/apps.py
Python
agpl-3.0
580
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
festovalros/Examine_odoo8_accounting
account/account_bank.py
Python
agpl-3.0
5,661
# coding: utf8 def edit(): if not request.args(0): # chybné volání redirect(URL('default', 'index')) form = SQLFORM(db.poptavajici, request.args(0)).process( next=URL('poptavka', 'hlavicka_edit', args=request.args(1)) if request.args(1) else URL('poptavky', 'o...
zvolsky/edga
controllers/poptavajici.py
Python
agpl-3.0
381
#!/usr/bin/env python3 # # Analyze and extract the information from the FFN web site # Copyright (C) 2015 samuelv0304@gmail.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 Software Found...
samuelv0304/svFFN
src/svFFN/__init__.py
Python
agpl-3.0
822
# coding: utf-8 import os import shutil from anki.lang import without_unicode_isolation from tests.shared import getEmptyCol def test_latex(): col = getEmptyCol() # change latex cmd to simulate broken build import anki.latex anki.latex.pngCommands[0][0] = "nolatex" # add a note with latex n...
simgunz/anki
pylib/tests/test_latex.py
Python
agpl-3.0
3,418
# Copyright 2020 Tecnativa - Víctor Martínez # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) import odoo.tests from odoo import http @odoo.tests.tagged("post_install", "-at_install") class TestContractPortal(odoo.tests.HttpCase): def test_tour(self): partner = self.env["res.partner"].creat...
OCA/contract
contract/tests/test_portal.py
Python
agpl-3.0
1,358
# -*- coding: 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): # Changing field 'Lesson.xml_file' db.alter_column('catalogue_lesson', 'xml_file', self.gf('django.db.model...
fnp/edumed
catalogue/migrations/0003_auto__chg_field_lesson_xml_file__chg_field_lesson_student_package__chg.py
Python
agpl-3.0
4,504
from comics.aggregator.crawler import NettserierCrawlerBase from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Samtull" language = "no" url = "https://nettserier.no/aikomi/comic/" rights = "Emil Åslund" start_date = "2015-01-24" class Crawler(NettserierCrawl...
jodal/comics
comics/comics/komistriper.py
Python
agpl-3.0
485
# -*- coding: utf-8 -*- # © <2015> <Miguel Chuga> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Report Stock Spreadsheet", "summary": "generates the stock of all locations", "version": "8.0.1.0.0", "category": "Report", "website": "https://mcsistemas.net", "auth...
miguelchuga/stock-logistics-reporting
report_stock_spreadsheet/__openerp__.py
Python
agpl-3.0
644
""" The latest version of this package is available at: <http://github.com/jantman/biweeklybudget> ################################################################################ Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com> This file is part of biweeklybudget, also known as bi...
jantman/biweeklybudget
biweeklybudget/flaskapp/views/utils.py
Python
agpl-3.0
2,492
import jinja2 from flask import Flask class MobivilleCompany: name="LA ROCHELLE, STRASBOURG, LIMOGES ...." naf_text='Trouvez l’emploi et la ville qui va avec !' def get_stars_for_rome_code_as_percentage(self, _=None): return 100 def get_stars_for_rome_code(self, _=None): return 5 ...
StartupsPoleEmploi/labonneboite
labonneboite/web/templates_functions.py
Python
agpl-3.0
730
# -*- coding: utf-8 -*- import unittest from authappliance.lib.utils import to_unicode class TestLibUtils(unittest.TestCase): def test_01_encoding(self): u = u'Hello Wörld' b = b'Hello World' self.assertEqual(to_unicode(u), u) self.assertEqual(to_unicode(b), b.decode('utf8')) ...
privacyidea/privacyidea-appliance
test/test_lib_utils.py
Python
agpl-3.0
412
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager 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 ...
kjagoo/wger_stark
wger/core/models.py
Python
agpl-3.0
22,670