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
# pyDome: A geodesic dome calculator # Copyright (C) 2013 Daniel Williams # # 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...
badassdatascience/pyDome
pyDome.py
Python
gpl-3.0
5,599
from .message_media_downloadable import DownloadableMediaMessageProtocolEntity from yowsup.layers.protocol_messages.protocolentities.attributes.attributes_image import ImageAttributes from yowsup.layers.protocol_messages.protocolentities.attributes.attributes_message_meta import MessageMetaAttributes from yowsup.layers...
tgalal/yowsup
yowsup/layers/protocol_media/protocolentities/message_media_downloadable_image.py
Python
gpl-3.0
1,903
import uuid from path_helpers import path import numpy as np try: from base_node_rpc.proxy import ConfigMixinBase, StateMixinBase import arduino_helpers.hardware.teensy as teensy from .node import (Proxy as _Proxy, I2cProxy as _I2cProxy, SerialProxy as _SerialProxy) class Prox...
ryanfobel/multispeq1.py
multispeq1/proxy.py
Python
gpl-3.0
996
from django.apps import AppConfig class ExcelUploadConfig(AppConfig): name = 'excel_upload'
Bielicki/lcda
excel_upload/apps.py
Python
gpl-3.0
98
# Natural Language Toolkit: Classifiers # # Copyright (C) 2001-2016 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Classes and interfaces for labeling tokens with category labels (or "class labels"). Typically, labels are repre...
adazey/Muzez
libs/nltk/classify/__init__.py
Python
gpl-3.0
4,636
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
nexdatas/writer
nxswriter/Types.py
Python
gpl-3.0
7,676
''' Solution for Eight Queens Problem Using the Genetic Algorithms 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 la...
enesates/GA_8Queens
GA_8Queens.py
Python
gpl-3.0
6,582
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net> # # 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...
erwilan/ansible
lib/ansible/modules/web_infrastructure/letsencrypt.py
Python
gpl-3.0
32,185
from player import Player import pandas as pd import time import asyncio from midiutil import MIDIFile PATTERNS = [[0, 0, 0, 0, 0, 0, 0, 0], #0 [1, 0, 0, 0, 0, 0, 0, 0], #1 [1, 0, 0, 0, 1, 0, 0, 0], #2 [1, 0, 1, 0, 1, 0, 0, 0], #3 [1, 0, 1, 0, 1, 0, 1, 0], #4 [1, 1, 1, 0, 1, 0, 1, 0], #5 ...
Technariumas/Marimba
data_analysis/algorithm_to_midi_test.py
Python
gpl-3.0
4,817
# pylint: disable=missing-module-docstring, missing-class-docstring from __future__ import unicode_literals from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('rdrhc...
studybuffalo/studybuffalo
study_buffalo/rdrhc_calendar/migrations/0014_auto_20171016_1922.py
Python
gpl-3.0
813
import difflib import os import pytest from fusesoc.core import Core def compare_fileset(fileset, name, files): assert name == fileset.name for i in range(len(files)): assert files[i] == fileset.file[i].name def test_core_info(): tests_dir = os.path.dirname(__file__) cores_root = os.path.join...
imphil/fusesoc
tests/test_capi1.py
Python
gpl-3.0
10,310
import pandas as pd from sklearn.datasets import load_boston from sklearn.linear_model import LinearRegression from sklearn.tree import DecisionTreeRegressor from sklearn.cross_validation import train_test_split from sklearn.metrics import mean_squared_error from .auto_segment_FEGT import BasicSegmenter_FEGT ...
bhanu-mnit/EvoML
evoml/subsampling/test_auto_segmentEG_FEGT.py
Python
gpl-3.0
1,004
import random from math import sqrt import numpy def validate_cost(result, boot_size, delta=500): budget = result["budget"] for metric_name, _, data_process in result['analysis']: if metric_name == "cost": cost_data = list(x() for x in data_process) data_analysis = yield_analys...
kgadek/evogil
statistic/stats_bootstrap.py
Python
gpl-3.0
4,906
import matplotlib.pyplot as plt from bob.io.base import load from bob.io.base.test_utils import datafile from bob.io.image import imshow from bob.ip.facedetect.tinyface import TinyFacesDetector from matplotlib.patches import Rectangle # load colored test image color_image = load(datafile("test_image_multi_face.png", "...
bioidiap/bob.ip.facedetect
doc/plot/detect_faces_tinyface.py
Python
gpl-3.0
1,124
#!/usr/bin/python # Copyright 2013 Sumana Harihareswara # 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 progra...
brainwane/carmen
carmen.py
Python
gpl-3.0
6,748
import nengo model = nengo.Network() with model: a = nengo.Ensemble(n_neurons=100, dimensions=1) stim_a = nengo.Node([0]) nengo.Connection(stim_a, a) b = nengo.Ensemble(n_neurons=100, dimensions=1) stim_b = nengo.Node([0]) nengo.Connection(stim_b, b) c = nengo.Ensem...
tcstewar/nengo_assignments
groningen_2018/addition.py
Python
gpl-3.0
422
# -*- coding: utf-8 -*- from __future__ import with_statement import os import sys import zipfile from pyload.plugin.Extractor import Extractor, ArchiveError, CRCError, PasswordError from pyload.utils import fs_encode class UnZip(Extractor): __name = "UnZip" __type = "extractor" __version = "1.12...
ardi69/pyload-0.4.10
pyload/plugin/extractor/UnZip.py
Python
gpl-3.0
1,891
import os import sys import signal import argparse import requests from urllib.parse import urljoin from socket import gethostname from io import BytesIO from zipfile import ZipFile from shutil import move, rmtree from uuid import uuid4 from time import time, sleep from subprocess import Popen, check_output, STDOUT, Ca...
certsocietegenerale/fame
worker.py
Python
gpl-3.0
7,534
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^post/(?P<pk>[0-9]+)/$', views.detail, name='detail'), url(r'^archive/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/$', views.archives, name='archive'), url(r'^category/(?P<pk>[0-9]+)/$', views....
francislpx/myblog
blog/urls.py
Python
gpl-3.0
423
from gi.repository import Gtk, Gdk, GdkPixbuf (TARGET_ENTRY_TEXT, TARGET_ENTRY_PIXBUF) = range(2) (COLUMN_TEXT, COLUMN_PIXBUF) = range(2) DRAG_ACTION = Gdk.DragAction.COPY class DragDropWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Drag and Drop") vbox = Gtk.Box(orien...
Dehyrf/python_gates
window.py
Python
gpl-3.0
3,800
# coding=utf-8 import unittest """3. Longest Substring Without Repeating Characters https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ Given a string, find the length of the **longest substring** without repeating characters. **Examples:** Given `"abcabcbb"`, the answer is `"a...
openqt/algorithms
leetcode/python/ac/lc003-longest-substring-without-repeating-characters.py
Python
gpl-3.0
1,545
#(c) 2013-2014 by Authors #This file is a part of Ragout program. #Released under the BSD license (see LICENSE file) """ This module provides some basic FASTA I/O """ import logging from string import maketrans logger = logging.getLogger() class FastaError(Exception): pass def read_fasta_dict(filename): "...
ptdtan/Ragout
ragout/parsers/fasta_parser.py
Python
gpl-3.0
1,963
#!/usr/bin/python # -*- coding: utf-8 -*- # kate: space-indent on; indent-width 4; mixedindent off; indent-mode python; java = [ {'name':'common', 'mainpackage':True, 'shortdesc':'Installs the latest version of Java', 'description':'', 'packages-trusty':['openjdk-7-jre-lib'], 'packages-xenia...
aroth-arsoft/arsoft-meta-packages
grp_java.py
Python
gpl-3.0
2,247
import json from pprint import pprint import requests from telegram import Update, Bot from telegram.ext import CommandHandler from tg_bot import dispatcher # Open API key API_KEY = "6ae0c3a0-afdc-4532-a810-82ded0054236" URL = "http://services.gingersoftware.com/Ginger/correct/json/GingerTheText" def translate(bot...
PaulSonOfLars/tgbot
tg_bot/modules/translation.py
Python
gpl-3.0
1,574
from member.models import Person, Family, Handphone, KeluargaGangguan, JenisDifable, StatusRumah from member.models import Lantai, Dinding, Atap, JamsosDiterima, SumberAirMinum, StatusListrik from member.models import DayaListrik, JadwalRonda, ProgramKB, Agama, StatusPerkawinan, HubunganKeluarga from member.models impo...
lantip/sms-komunitas
medkom/member/serializers.py
Python
gpl-3.0
1,693
# -*- coding: utf-8 -*- from django.db import models import django.template.defaultfilters from django.db.models import Max from django.utils.functional import cached_property # Create your models here. from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.con...
chiara-paci/baskerville
baskervilleweb/bibliography/models.py
Python
gpl-3.0
75,809
import modules.pumpingsystem as ps import pandas as pd import numpy as np # Pump schedule as per SCADA. rows = pumps, columns 1:=Peak, 2:=Standard, 3:Off-peak pump_schedule_41 = np.array([[72, 42, 50], [95, 78, 86], [110, 110, 110], ...
Mierzen/Dam-Simulation
simulations/Case_study_3/simulation_CS3.py
Python
gpl-3.0
4,643
default_app_config = "nnmware.apps.booking.apps.BookingAppConfig"
nnmware/nnmware
apps/booking/__init__.py
Python
gpl-3.0
66
""" :mod:`Selectors` -- selection methods module ============================================================== This module have the *selection methods*, like roulette wheel, tournament, ranking, etc. """ import random import Consts def GRankSelector(population, **args): """ The Rank Selector - This selector w...
UdeM-LBIT/GAPol
lib/ga/evolve/Selectors.py
Python
gpl-3.0
3,696
# Copyright (C) 2016-2020 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/synchrotron/synchrotron/syncengine.py
Python
gpl-3.0
24,637
#!/usr/bin/env python3 import argparse import sys import yaml from pf_focus.markdown import output_markdown from pf_focus.bbcode import output_bbcode from pf_focus.parse import parse_pfsense from pf_focus.pfsense import PfSenseDocument from pf_focus.progress import Animation def output_yaml(doc, stream): yaml.s...
TKCERT/pfFocus
pf_focus/format.py
Python
gpl-3.0
2,598
""" Menu Model [DiamondQuest] Defines a menu. Author(s): Wilfrantz Dede, Jason C. McDonald, Stanislav Schmidt """ # LICENSE (BSD-3-Clause) # Copyright (c) 2020 MousePaw Media. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
mousepawgames/diamondquest
src/diamondquest/model/menu/menu.py
Python
gpl-3.0
8,321
# -*- coding: utf-8 -*- import os from collections import defaultdict from random import choice world = defaultdict(int) possiblepoints = [(x, y) for x in range(-15, 16) for y in range(-15, 16) if 10 <= abs(x + y * 1j) <= 15] for i in range(100): world[choice(possiblepoints)] +...
NicovincX2/Python-3.5
Théorie des nombres/Nombre/Nombre aléatoire/random_points_on_a_circle.py
Python
gpl-3.0
691
# AsteriskLint -- an Asterisk PBX config syntax checker # Copyright (C) 2019 Walter Doekes, OSSO B.V. # # 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...
ossobv/asterisklint
asterisklint/app/vall/app_softhangup.py
Python
gpl-3.0
870
import unittest from rdflib import URIRef from owlapy import model from owlapy.util.hashcode import HashCode from owlapy.vocab.owlfacet import OWLFacet class TestHashCode(unittest.TestCase): def test_hash_ontology(self): ont_id = model.OWLOntologyID() data_factory = model.OWLDataFactory() ...
patrickwestphal/owlapy
tests/util/hashcode_tests.py
Python
gpl-3.0
55,391
from rest_framework.response import Response from rest_framework.views import APIView from .common import login_required from Requests import myudc # Student's details requests handler class Student(APIView): """ This only returns student's basic info right now, but in the future it will have all layout d...
UOSHUB/BackEnd
API/views/details.py
Python
gpl-3.0
877
#!/usr/bin/python # Console import sys, os, time, subprocess def MCS(): return subprocess.Popen(['python', 'mcs.py']) def color(text, color): if color == 0: color = "\033[0m" if color == 1: color = "\033[94m" if color == 2: color = "\033[92m" if color == 3: color = "\033[91m" if color == 4: ...
codeurimpulsif/PyMCS
console.py
Python
gpl-3.0
1,539
# -*- coding: utf-8 -*- """ Created on Sun Feb 14 20:43:12 2016 @author: Adrien """ import canpy.point_defects def defects_movie(dl,t_start='standard',t_end='standard'): ''' Produce a movie in mp4 format of the defects. t_start is the time at which we want the movie to begin and t_end is th...
ruaultadrien/canpy
canpy/defects_movie.py
Python
gpl-3.0
2,116
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2018 Jonathan Peirce # Distributed under the terms of the GNU General Public License (GPL). """Wrapper for all miscellaneous functions and classes from psychopy.tools """ # pylint: disable=W0611 # W0611 = Unused import %s f...
hoechenberger/psychopy
psychopy/misc.py
Python
gpl-3.0
1,519
class TagException(Exception): pass class ArgumentException(Exception): pass class Tag(object): __slots__ = ['_name', '_attributes', '_parent', '_previous_sibling', '_next_sibling', '_first_child', '_last_child', '_children'] def __init__(self, name, attr=None): self._name ...
PavlovVitaly/python__homework_ITMO
task_html.py
Python
gpl-3.0
4,695
#!/usr/bin/python # Downloads kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/ # Requires: python-bs4 # Copyright (c) 2012 Savvas Radevic <vicedar@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 published by # the ...
jaimejimbo/kmp-downloader
kmpd.py
Python
gpl-3.0
8,901
#!/usr/bin/env python from datetime import timedelta import os import random from django.utils.dateparse import parse_date from faker import Faker test_email = 'michael.b001@gmx.de' fake = Faker('de') fake.seed(1) random.seed(1) def get_random_date(): return parse_date('1983-03-31') + timedelta(days=random.r...
michaelbratsch/bwb
populate.py
Python
gpl-3.0
1,775
# YouTube Video: https://www.youtube.com/watch?v=4E7N7W1lUkU import os import pydub import glob wav_files = glob.glob('./*.wav') for wav_file in wav_files: mp3_file = os.path.splitext(wav_file)[0] + '.mp3' sound = pydub.AudioSegment.from_wav(wav_file) sound.export(mp3_file, format="mp3") os.remove(wav...
vprusso/youtube_tutorials
utility_scripts/wav_to_mp3/wav_to_mp3.py
Python
gpl-3.0
356
import datetime from django.http import HttpResponse import logging from natsort import natsorted import pandas as pd from PyPDF2 import PdfFileReader, PdfFileMerger from pyper import * import json from database.models import ko_entry import functions LOG_FILENAME = 'error_log.txt' pd.set_option('display.max_colwid...
manterd/myPhyloDB
functions/analysis/gage_graphs.py
Python
gpl-3.0
19,411
import numpy as np import pyCloudy as pc import matplotlib.pyplot as plt from pyneb.utils.physics import IP # TODO: Add comments """ Pregunta 1 """ def alpha_B(Te): """ Recomb. coefficient, case B """ T4 = Te/1e4 return 2.6e-13/T4 def U_mean_def(QH0, Ne, Rstr): """ \int_0^{Rstr}{U.dV} / \...
Morisset/PyNeb_devel
pyneb/sample_scripts/Choroni_School/ex6_2.py
Python
gpl-3.0
7,588
""" RHUIManager Sync functions """ import re from stitches.expect import Expect from rhuilib.rhuimanager import RHUIManager from rhuilib.util import Util class RHUIManagerSync(object): ''' Represents -= Synchronization Status =- RHUI screen ''' @staticmethod def sync_cds(connection, cdslist): ...
RedHatQE/rhui-testing-tools
rhuilib/rhuimanager_sync.py
Python
gpl-3.0
3,081
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUME...
2ndQuadrant/ansible
lib/ansible/modules/cloud/ovirt/ovirt_auth.py
Python
gpl-3.0
11,230
#!/usr/bin/env python3 import argparse import json import sys import urllib.parse import urllib.request parser = argparse.ArgumentParser(description='Certificate transparency name extractor.') parser.add_argument('-d', '--domains', metavar='domain_file', type=str, help='Domains for certificate search.', ...
blechschmidt/massdns
scripts/ct.py
Python
gpl-3.0
1,748
__author__ = 'Mike McCann' __copyright__ = '2012' __license__ = 'GPL v3' __contact__ = 'mccann at mbari.org' __doc__ = ''' STOQS Query manager for building ajax responses to selections made for QueryUI @undocumented: __doc__ parser @status: production @license: GPL ''' from django.conf import settings from d...
josephmfaulkner/stoqs
stoqs/utils/STOQSQManager.py
Python
gpl-3.0
105,831
from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os datatypes_repository_name = 'blast_datatypes_0120' datatypes_repository_description = 'Galaxy applicable datatypes for BLAST' datatypes_repository_long_description = 'Galaxy datatypes for the BLAST top hit descriptons tool' tool_repository_name = '...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/test/tool_shed/functional/test_0120_simple_repository_dependency_multiple_owners.py
Python
gpl-3.0
8,820
import json import pprint from a2qt import QtWidgets from a2widget.key_value_table import KeyValueTable from a2widget.a2text_field import A2CodeField _DEMO_DATA = { 'Name': 'Some Body', 'Surname': 'Body', 'Street. Nr': 'Thingstreet 8', 'Street': 'Thingstreet', 'Nr': '8', 'PLZ': '12354', ...
ewerybody/a2
ui/a2widget/demo/key_value_table_demo.py
Python
gpl-3.0
1,931
#!/usr/bin/python # -*- coding: utf-8 -*- ''' @date: 2017-04-06 @author: Heysion Yuan @copyright: 2017, Heysion Yuan <heysions@gmail.com> @license: GPLv3 ''' from dab.webui import WebBase from dab.core.db.models import Task class TaskIndex(WebBase): def get(self): dataset = self.get_task_top_all() ...
heysion/deepin-auto-build
dab/webui/taskctrl.py
Python
gpl-3.0
2,297
# # Copyright (C) 2003-2022 Sébastien Helleu <flashcode@flashtux.org> # # This file is part of WeeChat.org. # # WeeChat.org 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 #...
weechat/weechat.org
weechat/common/views.py
Python
gpl-3.0
1,083
# coding=utf-8 # Author: Dennis Lutter <lad1337@gmail.com> # Author: Jonathon Saine <thezoggy@gmail.com> # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
coderbone/SickRage-alt
sickchill/views/api/webapi.py
Python
gpl-3.0
118,111
from makerUtilities import writeFile from makerUtilities import readFile import os def scaffold(systemDir, defaultTheme): return ( """<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <script src='file://""" + os.path.join(systemDir, "jquery.min.js") + """'></script...
geraldspreer/the-maker
makerTemplateViewBuilder.py
Python
gpl-3.0
7,622
''' Created on 11May,2016 @author: linyufeng ''' from utils.TimeZoneConverter import TimeZoneConverter class Asset(object): ''' contain the values will be insert into table Asset ''' convert = TimeZoneConverter(); def __init__(self, startTime, endTime, directory, fileName, fileType, duration...
ericlyf/screenly-tools-schedulespreadsheet
src/model/Asset.py
Python
gpl-3.0
1,601
import os import sys config = { ######################################################################### ######## MACOSX GENERIC CONFIG KEYS/VAlUES 'default_actions': [ 'clobber', 'clone-tools', 'checkout-sources', 'build', 'upload-files', 'sendchange', ...
cstipkovic/spidermonkey-research
testing/mozharness/configs/b2g/desktop_macosx64.py
Python
mpl-2.0
2,633
from tests.support.asserts import assert_error, assert_dialog_handled from tests.support.fixtures import create_dialog from tests.support.inline import inline alert_doc = inline("<script>window.alert()</script>") def get_window_rect(session): return session.transport.send( "GET", "session/{session_id}/w...
mbrubeck/servo
tests/wpt/web-platform-tests/webdriver/tests/get_window_rect/user_prompts.py
Python
mpl-2.0
2,153
# 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 json import os from string import Template from uuid import uuid4 import pytest from moztelemetry.store import I...
whd/python_moztelemetry
tests/test_spark.py
Python
mpl-2.0
5,208
import pytest import tempfile import os import ConfigParser def getConfig(optionname,thedefault,section,configfile): """read an option from a config file or set a default send 'thedefault' as the data class you want to get a string back i.e. 'True' will return a string True will return a bool...
netantho/MozDef
tests/conftest.py
Python
mpl-2.0
2,263
# 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/. """ Test cases for the TAAR Hybrid recommender """ from taar.recommenders.hybrid_recommender import CuratedRecommender ...
maurodoglio/taar
tests/test_hybrid_recommender.py
Python
mpl-2.0
3,508
# title # storyline def show_trailer(title, youtube_url): # Open browser and play trailer def show_info(): # Print movie information
teichopsia-/take_brake
movies.py
Python
mpl-2.0
147
from marshmallow import Schema, fields, post_dump class BasePaging(Schema): has_next = fields.Boolean() has_prev = fields.Boolean() next_num = fields.Integer() prev_num = fields.Integer() page = fields.Integer() pages = fields.Integer() per_page = fields.Integer() total = fields.Intege...
beavyHQ/beavy
beavy/common/paging_schema.py
Python
mpl-2.0
818
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import from __...
klahnakoski/MySQL-to-S3
mysql_to_s3/__init__.py
Python
mpl-2.0
1,965
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
dycodedev/taiga-back
taiga/projects/notifications/utils.py
Python
agpl-3.0
6,784
from django import forms from games.models import DoorPrizeWinner class DoorPrizeWinnerForm(forms.ModelForm): class Meta: model = DoorPrizeWinner fields = ['fan', 'event']
brickfiestastem/brickfiesta
games/forms.py
Python
agpl-3.0
195
# -*- coding: utf-8 -*- # # http://www.privacyidea.org # (c) cornelius kölbel, privacyidea.org # # 2020-01-30 Jean-Pierre Höhmann <jean-pierre.hohemann@netknights.it> # Add WebAuthn token # 2018-01-22 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add offline refill # 2016-12-20 Cornelius Kö...
privacyidea/privacyidea
privacyidea/api/validate.py
Python
agpl-3.0
27,219
# 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 model 'Actor' db.create_table('actors_actor', ( ('id', self.gf('django.db.models.fiel...
SpreadBand/SpreadBand
apps/actors/migrations/0001_initial.py
Python
agpl-3.0
7,406
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-18 07:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('exams', '0058_fill_explanation_is_contribution'), ] operations = [ migratio...
Zahajamaan/Fudulbank
exams/migrations/0059_session_has_finished.py
Python
agpl-3.0
474
# -*- coding: utf-8 -*- import RPi.GPIO as GPIO from models import session from models import Device from models import Module from models import Event_Log from time import sleep from sys import stdout # Modules pins and description M1A = session.query(Module).filter(Module.name == 'M1A').first() M1B = session.query(M...
TemosEngenharia/RPI-IO
RPi_IO/rpi_io.py
Python
agpl-3.0
6,968
# Copyright 2019 Mentxu Isuskitza - AvanzOSC # Copyright 2019 Oihana Larrañaga - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, fields, models from odoo.models import expression from odoo.tools.safe_eval import safe_eval class FleetRouteStop(models.Model): _name = ...
oihane/odoo-addons
fleet_route/models/fleet_route_stop.py
Python
agpl-3.0
3,444
# -*- coding: utf-8 -*- import datetime from django.db import models from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ComponentError' db.create_table(u'maasserver_componenterror', ( ('id', self.gf(...
cloudbase/maas
src/maasserver/migrations/0033_component_error.py
Python
agpl-3.0
15,078
# -*- coding: utf-8 -*- import django.db.models.deletion from django.db import models, migrations import akvo.rsr.fields class Migration(migrations.Migration): dependencies = [ ('rsr', '0067_auto_20160412_1858'), ] operations = [ migrations.CreateModel( name='IatiCheck', ...
akvo/akvo-rsr
akvo/rsr/migrations/0068_iaticheck.py
Python
agpl-3.0
1,001
# -*- coding: utf-8 -*- from flask import Blueprint, current_app, request, render_template, abort, url_for, redirect from pymongo import DESCENDING import arrow from widukind_web import constants from widukind_web.extensions import auth from widukind_web.extensions import cache from widukind_web import queries from ...
Widukind/widukind-web
widukind_web/admin.py
Python
agpl-3.0
9,502
from django.test import TestCase from django.test.utils import override_settings from django.utils import timezone from django.core import mail from ovp.apps.users.tests.fixture import UserFactory from ovp.apps.organizations.tests.fixture import OrganizationFactory from ovp.apps.projects.models import Project, Apply...
atados/atados-ovp
api/channels/default/tests/test_tasks.py
Python
agpl-3.0
4,585
if __name__=="__main__": import sys sys.path.extend([".", "lib", "app"]) import webnotes, os import utilities.demo.make_demo def make_demo_app(): webnotes.mute_emails = 1 webnotes.connect() utilities.demo.make_demo.make(reset=True, simulate=False) # setup demo user etc so that the site it up faster, while the d...
Yellowen/Owrang
utilities/demo/make_erpnext_demo.py
Python
agpl-3.0
3,982
# Copyright 2022 Camptocamp SA (https://www.camptocamp.com). # @author Iván Todorovich <ivan.todorovich@camptocamp.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from lxml import etree from odoo.tests import HttpCase, tagged from odoo.addons.mail.tests.common import MockEmail @tagged("-at_in...
OCA/social
mass_mailing_subscription_email/tests/test_unsubscribe_from_list.py
Python
agpl-3.0
1,590
from openerp.osv import osv, fields class IrActionsActWindowMenu(osv.Model): _name = 'ir.actions.act_window.menu' _description = 'Menu on the actions' _columns = { 'name': fields.char('Label', size=64, required=True, translate=True), 'active': fields.boolean( 'Active', help='i...
vnsofthe/odoo-dev
addons/web_action_add_button/base.py
Python
agpl-3.0
3,729
# -*- 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...
sysadminmatmoz/odoo-clearcorp
purchase_prediction/__init__.py
Python
agpl-3.0
1,003
''' Created on Sep 14, 2013 @author: paepcke Modifications: - Jan 1, 2013: added remove() method to OutputFile ''' import StringIO from collections import OrderedDict import csv import re import sys import os import tempfile from col_data_type import ColDataType class OutputDisposition(object): ''' Sp...
EDUlib/eTracesX
Translation_software/edx_to_MOOCdb_piping/import.openedx.apipe/json_to_relation/output_disposition.py
Python
agpl-3.0
24,333
# Make sure you name your file with className.py from hint.hint_class_helpers.find_matches import find_matches class Prob2_Part1: """ Author: Shen Ting Ang Date: 10/11/2016 """ def check_attempt(self, params): self.attempt = params['attempt'] #student's attempt self.answer = params[...
zhenzhai/edx-platform
common/lib/sandbox-packages/hint/hint_class/Week3/Prob2_Part1.py
Python
agpl-3.0
1,401
from collections import namedtuple import configparser from functools import lru_cache import unittest from unittest.mock import patch, mock_open import transaction import testing.postgresql import webtest import datetime from pyramid.config import Configurator from pyramid.paster import get_app from sqlalchemy import ...
colinhiggs/pyramid-jsonapi
test_project/test_project/tests.py
Python
agpl-3.0
143,952
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import colander import venusian from BTrees.OOBTree import OOBTree from persistent.list import PersistentList from persistent.dict import PersistentDict from webob.multi...
ecreall/nova-ideo
novaideo/core.py
Python
agpl-3.0
25,754
import urllib.parse import sys from ccs import core from ccs import constants from . import response def ticker(): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name # complete request cr = core.request(s, r) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), ...
Honzin/ccs
dev/bitnz/public/__init__.py
Python
agpl-3.0
1,090
__author__ = 'tbri' from openerp import models, fields, api, _ class add_sponsorship_wizard(models.TransientModel): _name = 'add_sponsorship_wizard' def _get_all_children(self): c = [] children = self.env['res.partner'].search([('sponsored_child', '=', 'True')]) for n in children: ...
bringsvor/sponsor
wizards/add_sponsorship.py
Python
agpl-3.0
1,922
#!/usr/bin/env python2 # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, ...
sevein/archivematica
src/MCPClient/lib/clientScripts/generateDIPFromAIPGenerateDIP.py
Python
agpl-3.0
2,681
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licens...
odoo-arg/odoo_l10n_ar
l10n_ar_taxes/models/account_document_tax.py
Python
agpl-3.0
2,137
#-*- coding: utf-8 -*- """ Certificates Tests. """ import itertools import json import ddt import mock import six from django.conf import settings from django.test.utils import override_settings from opaque_keys.edx.keys import AssetKey from six.moves import range from cms.djangoapps.contentstore.tests.utils impor...
stvstnfrd/edx-platform
cms/djangoapps/contentstore/views/tests/test_certificates.py
Python
agpl-3.0
31,931
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("popolo", "0002_update_models_from_upstream"), ("results", "0010_resultevent_winner_party_new"), ] operations = [ migrations.AddField( model_name="resultevent", ...
DemocracyClub/yournextrepresentative
ynr/apps/results/migrations/0011_resultevent_post_new.py
Python
agpl-3.0
539
import os from importlib import import_module def import_module_attr(path): package, module = path.rsplit('.', 1) return getattr(import_module(package), module) settings = import_module_attr( os.getenv('COMMENTS_MODERATION_SETTINGS_MODULE', 'django.conf.settings') ) MODERATION_MODE = getattr(settings, '...
PetrDlouhy/django-comments-moderation
comments_moderation/settings.py
Python
agpl-3.0
358
# coding=utf-8 from __future__ import unicode_literals, print_function from flask import request, jsonify, url_for from flask_login import current_user import bugsnag from . import load from webhookdb.tasks.pull_request_file import spawn_page_tasks_for_pull_request_files @load.route('/repos/<owner>/<repo>/pulls/<int:...
singingwolfboy/webhookdb
webhookdb/load/pull_request_file.py
Python
agpl-3.0
1,058
""" Tests for SGA utility functions """ import pytest import pytz from edx_sga.tests.common import is_near_now from edx_sga.utils import is_finalized_submission, utcnow @pytest.mark.parametrize( "submission_data,expected_value", [ ({"answer": {"finalized": True}}, True), ({"answer": {"filena...
mitodl/edx-sga
edx_sga/tests/test_utils.py
Python
agpl-3.0
851
""" Django REST Framework serializers for the User API Accounts sub-application """ import json import logging from rest_framework import serializers from django.contrib.auth.models import User from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.urls import reverse from s...
Edraak/edraak-platform
openedx/core/djangoapps/user_api/accounts/serializers.py
Python
agpl-3.0
19,240
""" This test case test the REST API api/applications.py """ import json from .base import MyApiTestCase class APIApplicationsResolverTestCase(MyApiTestCase): def test_get_applications(self): with self.app.test_request_context('/application/', method='GET', ...
privacyidea/privacyidea
tests/test_api_applications.py
Python
agpl-3.0
799
from django import forms from django.utils.translation import ugettext_lazy as _ from astrobin.models import SolarSystem_Acquisition class SolarSystem_AcquisitionForm(forms.ModelForm): error_css_class = 'error' date = forms.DateField( required=False, input_formats=['%Y-%m-%d'], widge...
astrobin/astrobin
astrobin/forms/solar_system_acquisition_form.py
Python
agpl-3.0
1,528
""" Data models managers for the user strike app. """ from django.db import models from django.db.models import Q from django.utils import timezone class UserStrikeManager(models.Manager): """ Manager class for the ``UserStrike`` data model. """ use_for_related_fields = True def search_for_stri...
TamiaLab/carnetdumaker
apps/userstrike/managers.py
Python
agpl-3.0
1,277
from . import base from . import mainMenu from . import utils
Aiacos/DevPyLib
mayaLib/guiLib/__init__.py
Python
agpl-3.0
62
# -*- coding: utf-8 -*- """Reforms controller""" import collections from .. import contexts, conv, model, wsgihelpers @wsgihelpers.wsgify def api1_reforms(req): ctx = contexts.Ctx(req) headers = wsgihelpers.handle_cross_origin_resource_sharing(ctx) assert req.method == 'GET', req.method params =...
sgmap/openfisca-web-api
openfisca_web_api/controllers/reforms.py
Python
agpl-3.0
2,088
__doc__ = """ Preprocess input data, include `video` format should be `avi` or `mp4` `slide` format should be `pdf` and auto-convert to `jpg` or a set of `jpg` images `summary` save `video` and `slide` infomation to summary store `reducer` reduce video frames to more distingushable one `redu...
speed-of-light/pyslider
lib/exp/pre/__init__.py
Python
agpl-3.0
3,713
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob 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...
eirmag/weboob
modules/gazelle/test.py
Python
agpl-3.0
989