code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#---------------------------------------------------------------------------------------------------------------------------- # Name: Layer Package (Batch) # # Purpose: Runs Layer Package Generator (Standalone) tool for multiple HUC8s # # Notes: - The scripts assumes data are in standard BRAT project # ...
Riverscapes/pyBRAT
SupportingTools/BatchScripts/02_BatchBRATTools/10_Layer_Package_Batch.py
Python
gpl-3.0
5,589
''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect from django.http import HttpResponse from django.core.urlresolvers import reverse from django.shortcuts import render_to_response # , render from django.template import RequestContext try: from bson import ObjectId except I...
makfire/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/views/videoDashboard.py
Python
agpl-3.0
11,176
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
wileeam/airflow
tests/providers/google/marketing_platform/operators/test_campaign_manager.py
Python
apache-2.0
7,433
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from . import steps SPEC = { 'settings': { 'build_gs_bucket': 'chromium-memory-fyi-archive', }, 'builders': { 'Chromium Linux MSan Builder': {...
eunchong/build
scripts/slave/recipe_modules/chromium_tests/chromium_memory_fyi.py
Python
bsd-3-clause
5,459
from flask_philo.cloud.aws import run as aws_run def run(**kwargs): aws_run(**kwargs)
Riffstation/flaskutils
flask_philo/commands_flask_philo/aws.py
Python
apache-2.0
92
# Generated by Django 2.2.24 on 2021-09-22 18:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('order', '0024_markordersstatuscompleteconfig'), ] operations = [ migrations.AlterField( model_...
edx/ecommerce
ecommerce/extensions/order/migrations/0025_auto_20210922_1857.py
Python
agpl-3.0
1,484
import collections Sample = collections.namedtuple('Sample', ['temperature', 'pressure'])
fdebrabander/Arduino-WeatherStation
sample.py
Python
unlicense
91
import os import json from schematics.models import Model from schematics.types import StringType, FloatType, EmailType from schematics.types.compound import ListType, ModelType class Person(Model): Name = StringType() Inn = StringType() AccountNumber = StringType() BankCode = StringType() BankNam...
iraklikhitarishvili/data2class
jsonparser/examples/bog_schematic.py
Python
bsd-2-clause
2,419
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # 2015-03-23T14:34+08:00 __author__ = 'myd7349 <myd7349@gmail.com>' __version__ = '0.0.1' import logging import os import struct import sys import dicom # [pydicom](http://www.pydicom.org/) import fileutil import unpacker _frozen = hasattr(sys, 'frozen') or hasattr...
myd7349/Ongoing-Study
python/dat2dcm.py
Python
lgpl-3.0
18,783
# Copyright 2017 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
dis-xcom/fuel-devops-driver-ironic
devops_driver_ironic/__init__.py
Python
apache-2.0
1,137
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Implementing the context manager API by hand. """ #end_pymotw_header class Context(object): def __init__(self): print '__init__()' def __enter__(self): print '__enter__()' return s...
qilicun/python
python2/PyMOTW-1.132/PyMOTW/contextlib/contextlib_api.py
Python
gpl-3.0
470
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore from .QStyleOption import QStyleOption class QStyleOptionFrame(QStyleOption): """ QStyleOptionFrame() QSt...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QStyleOptionFrame.py
Python
gpl-2.0
721
# LICENSE: Simplified BSD https://github.com/mmp2/megaman/blob/master/LICENSE from .plotter import (plot_with_plotly, plot_embedding_with_plotly, plot_with_matplotlib, plot_embedding_with_matplotlib)
mmp2/megaman
megaman/plotter/__init__.py
Python
bsd-2-clause
205
from django import forms # from splitjson.widgets import SplitJSONWidget from django.forms import ModelForm from .models import * from kaka.utils import KakaForm class TargetForm(KakaForm): title = "Update" class Meta(KakaForm.Meta): model = Target fields = ['kea_id', 'ebrida_id', 'obs'] ...
hdzierz/Kaka
gene_expression/forms.py
Python
gpl-2.0
421
# Class for reading .emd file by Velox. # This code was written based on FormatSER.py from https://github.com/cctbx/dxtbx/blob/master/format/FormatSER.py from __future__ import absolute_import, division, print_function import struct import h5py import numpy import os import json from scitbx.array_family import flex f...
keitaroyam/yamtbx
dxtbx_formats/FormatEMD.py
Python
bsd-3-clause
7,738
import socket import sys from locals import * class Bot: def __init__(self, owner, nick, channel, server, port, auth, queue): self.irc = socket.socket() self.irc.connect((server, port)) self.irc.send('PASS ' + auth + '\r\n') self.irc.send('USER ' + nick + ' 0 * :' + owner + '\r\n') ...
naiyt/twitchplaysdarksouls
ircbot.py
Python
mit
1,031
from freezegun import freeze_time from datetime import datetime from django.apps import apps from django.test import TestCase from django.conf import settings from django_elect import settings from django_elect.models import Ballot, Candidate, Election, Vote, \ VotePlurality, VotePreferential @freeze_time("2010...
MasonM/django-elect
django_elect/tests/test_views.py
Python
bsd-3-clause
17,697
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import from testutil.dott import feature, sh, testtmp # noqa: F401 sh % "hg init repo" sh % "cd...
facebookexperimental/eden
eden/hg-server/tests/test-diff-only-files-in-revs-t.py
Python
gpl-2.0
1,771
from werkzeug.routing import Map, Rule from werkzeug.wrappers import Response import pika # RabbitMQ Interface import logging from betaface import BetaFaceAPI from json import JSONEncoder from collections import namedtuple import base64 import time,datetime from subprocess import call class BiasEncoder(JSONEncoder)...
ted-dunstone/ivs
modules/bias.py
Python
mit
21,071
#!/usr/bin/env python ########################################################################### # obd_sensors.py # # Copyright 2004 Donour Sizemore (donour@uchicago.edu) # Copyright 2009 Secons Ltd. (www.obdtester.com) # # This file is part of pyOBD. # # pyOBD is free software; you can redistribute it and/or modify ...
chethenry/pyOBD
obd_sensors.py
Python
gpl-2.0
34,027
import re from odoo.tests import common from ..models.res_users import WEBSITE_RE, WEBSITE_REFS class TestDomainUpdating(common.HttpCase): at_install = False post_install = True def test_authenticate(self): db_name = common.get_db_name() env = dict(base_location="http://build-123.runbot...
it-projects-llc/website-addons
website_multi_company_demo/tests/test_domain_updating.py
Python
mit
996
from os import path as op import json import pytest from simplepeg.speg import SPEG from utils import collect_files, read_file FIXTURES_ROOT = op.join(op.dirname(__file__), 'speg_fixtures') @pytest.mark.parametrize( 'grammar_file', collect_files(FIXTURES_ROOT, lambda f: f.endswith('.peg'))) def test_speg(g...
SimplePEG/Python
tests/test_speg_fixtures.py
Python
mit
565
#!/usr/bin/env python import os, sys passwd = [x.split(':') for x in open('/etc/passwd').readlines()] def renice_user(user): user = user.rstrip('+') v = [x for x in passwd if user in x[2]] if len(v) > 1: print("user %s does not uniquely determine user" % user) elif len(v) == 0: print(...
tscholl2/smc
src/scripts/smc-nice-auto.py
Python
agpl-3.0
771
# triage function # # sync() def postSave_copyToTaina(mediainstance): print mediainstance return mediainstance
RedeMocambos/baobaxia
app/django-bbx/policy/postSave_copyToTaina.py
Python
gpl-3.0
121
# Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
noironetworks/group-based-policy
gbpservice/neutron/db/migration/alembic_migrations/versions/577bb4469944_gbp_network_service_policy.py
Python
apache-2.0
3,027
#!/usr/bin/env python import sys import yaml import json import datetime import argparse ENABLE_CATEGORY_LIST = False def get_parser(): parser = argparse.ArgumentParser(description="Export rules to json config") parser.add_argument('source', default='rules.yml', help='Source YAML') parser.add_argument('...
openrightsgroup/Blocking-Middleware
config/export.py
Python
gpl-3.0
1,721
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2016 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
crisely09/horton
horton/io/molpro.py
Python
gpl-3.0
5,611
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.Language import language from Components.config import config from Components.Sources.List import List from Components.Label import Label from Components.Sources.StaticText import Stati...
sklnet/opendroid-enigma2
lib/python/Screens/LanguageSelection.py
Python
gpl-2.0
5,658
import pyos def onStart(s, a): global state, app, editor state = s app = a editor = Editor() def save(): editor.save() class Editor(object): def __init__(self): self.path = "" self.fobj = None self.saved = False self.textField = pyos.G...
furmada/PythonOS
apps/editor/__init__.py
Python
mit
2,468
from distutils.core import setup setup( name='Scg Ink lib', version='0.1.1', author='Michael Yin', author_email='gt8442b@yahoo.com', packages=['net', 'net.wyun','net.wyun.mer', 'net.wyun.mer.ink'], #scripts=['bin/stowe-towels.py','bin/wash-towels.py'], url='http://pypi.python.org/pypi/im2ma...
michaelyin/im2markup-prep
setup.py
Python
apache-2.0
538
# Copyright 2016 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
ragupta-git/ImcSdk
imcsdk/apis/admin/user.py
Python
apache-2.0
9,156
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the ZMQ notification interface.""" import configparser import struct from test_framework.test_fra...
vergecurrency/VERGE
test/functional/interface_zmq.py
Python
mit
4,622
from matplotlib import pyplot from math import cos, sin, atan class Neuron(): def __init__(self, x, y): self.x = x self.y = y def draw(self, neuron_radius): circle = pyplot.Circle((self.x, self.y), radius=neuron_radius, fill=False) pyplot.gca().add_patch(circle) class Layer()...
brenoarosa/projeto_final
plotters/neural_net.py
Python
mit
4,008
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
JuleLaryushina/savchenko
workspace_sample/textsum/seq2seq_attention.py
Python
apache-2.0
8,545
from erukar.system.engine import Enemy, BasicAI from ..templates.Undead import Undead from erukar.content.inventory import Shortsword, Buckler from erukar.content.modifiers import Steel, Oak class Skeleton(Undead): ClassName = 'Skeleton' ClassLevel = 1 BaseMitigations = { 'bludgeoning': (-0.25, 0)...
etkirsch/legends-of-erukar
erukar/content/enemies/undead/Skeleton.py
Python
agpl-3.0
1,103
from util import read_tsv from csv import DictWriter import re import ast, json type_set = set() def main(): search_par_h = open("data/search_params.csv", "w") writer = DictWriter(search_par_h, fieldnames=["SearchID", "SearchParams"]) writer.writeheader() for t, row in read_tsv("data/SearchInfo.tsv"): ...
Gzsiceberg/kaggle-avito
prepare/gen_params.py
Python
mit
1,236
from django.contrib.contenttypes.admin import GenericInlineModelAdmin from django.contrib.contenttypes.models import ContentType from django.utils.functional import cached_property from polymorphic.formsets import ( BaseGenericPolymorphicInlineFormSet, GenericPolymorphicFormSetChild, polymorphic_child_form...
chrisglass/django_polymorphic
polymorphic/admin/generic.py
Python
bsd-3-clause
2,684
# Copyright 2016 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import contextlib from gi.reposito...
ptitjes/quodlibet
quodlibet/ext/events/seekbar.py
Python
gpl-2.0
4,402
#!/usr/local/bin/jython #-*- coding: utf-8 -*- from flask import Flask, render_template, send_from_directory, request from GitSearch_Item import GitSearchItem #Git 꺼 사용,, import traceback import time, codecs, cgi, re, os from pygments import highlight from pygments.lexers.jvm import JavaLexer from pygments.formatters....
facoy/facoy
FrontEnd/Server_GitHub_Kui.py
Python
apache-2.0
9,452
# ============================================================================= # Federal University of Rio Grande do Sul (UFRGS) # Connectionist Artificial Intelligence Laboratory (LIAC) # Renato de Pontes Pereira - rppereira@inf.ufrgs.br # ============================================================================= ...
renatopp/liac
liac/__init__.py
Python
mit
1,990
import os import sys arff_path = sys.argv[1] basename = sys.argv[2] arff_file = open(arff_path, 'r') lines = arff_file.read().split('\n') curr_line = 0 classes_declaration = 0 while (lines[curr_line].upper() != '@DATA'): if lines[curr_line][:16].upper() == '@ATTRIBUTE CLASS': classes_declaration = curr_...
luizcavalcanti/ForestClassifier
preparation/split_database_by_class.py
Python
gpl-2.0
1,150
# -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2016-01-26 18:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scheduling', '0007_auto_20160126_1335'), ] operations = [ migrations.RemoveF...
mutaku/bookit
bookit_django/scheduling/migrations/0008_auto_20160126_1343.py
Python
bsd-2-clause
848
import asyncio import json from time import sleep from vcx.api.connection import Connection from vcx.api.credential import Credential from vcx.api.disclosed_proof import DisclosedProof from vcx.api.utils import vcx_agent_provision from vcx.api.vcx_init import vcx_init_with_config from vcx.state import State from vc_au...
Artemkaaas/indy-sdk
vcx/wrappers/python3/demo/alice.py
Python
apache-2.0
4,881
from os.path import join from os.path import relpath from re import compile from contextlib import contextmanager from ..staging import COMMAND_VERSION_FILENAME from ..action_mapper import FileActionMapper from logging import getLogger log = getLogger(__name__) # All output files marked with from_work_dir attribute...
jmchilton/pulsar
pulsar/client/staging/down.py
Python
apache-2.0
6,595
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: cifar-convnet.py # Author: Yuxin Wu import tensorflow as tf import argparse import os from tensorpack import * from tensorpack.tfutils.summary import * from tensorpack.dataflow import dataset from tensorpack.utils.gpu import get_num_gpu """ A small convnet model f...
eyaler/tensorpack
examples/basics/cifar-convnet.py
Python
apache-2.0
5,449
# PyTIBot - IRC Bot using python and the twisted library # Copyright (C) <2015-2021> <Sebastian Schmidt> # 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 # a...
DefaultUser/PyTIBot
backends/irc_factory.py
Python
gpl-3.0
2,256
# (c) 2012-2014, 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) an...
bootswithdefer/ansible
lib/ansible/playbook/task.py
Python
gpl-3.0
16,506
import ast import datetime import os import requests import tarfile import time import subprocess import yaml from os.path import expanduser import common_functions import exceptions import fm_logger from server.dbmodule.objects import app as app_db from server.dbmodule.objects import environment as env_db from serve...
cloud-ark/cloudark
server/common/validator.py
Python
apache-2.0
1,335
# Copyright (c) 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
asadoughi/quark
quark/db/custom_types.py
Python
apache-2.0
1,843
#!/usr/bin/env python # -*- coding: utf-8 -*- class MountPoint(type): """Base mount-point for every plugin. See: http://martyalchin.com/2008/jan/10/simple-plugin-framework/ """ def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): # This branch only executes when...
michalbachowski/pyspd
src/pyspd/__init__.py
Python
mit
839
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Built-in modules # # Internal modules # # First party modules # from plumbing.graphs import Graph # Third party modules # ############################################################################### class SoloLegend(Graph): """ A figure that contains no p...
xapple/plumbing
plumbing/graphs/solo_legend.py
Python
mit
2,468
"""A module for taking latitude, longitude pairs and returning which neighborhood they're located in. Currently Chicago only.""" # imports import sys from . import city_of_chicago from . import nyc from . import zillow from .common import NeighborhoodMap, Neighborhood def main(): return 0 if __name__ == "__m...
bjlange/neighborhoodize
neighborhoodize/__init__.py
Python
mit
379
#!/usr/bin/env python """ @file mpl_dump_onNet.py @author Daniel Krajzewicz @author Michael Behrisch @date 2007-10-25 @version $Id: mpl_dump_onNet.py 13811 2013-05-01 20:31:43Z behrisch $ This script reads a network and a dump file and draws the network, coloring it by the values found within the dump-file....
rudhir-upretee/Sumo17_With_Netsim
tools/visualization/mpl_dump_onNet.py
Python
gpl-3.0
17,970
import sys import urllib import urllib3 import pycurl from io import StringIO,BytesIO import re import subprocess from subprocess import check_output from bs4 import BeautifulSoup import os.path import time import shutil from tempfile import mkstemp from shutil import move from os import remove, close from os.path imp...
kanishka-linux/AnimeWatch
AnimeWatch-PyQt4-Stable/Plugins/KissDrama.py
Python
gpl-3.0
10,742
from crispy_forms.helper import FormHelper
ncphillips/django_rpg
rpg_base/forms/location.py
Python
mit
43
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid - **Logging related code.** Contact : ole.moller.nielsen@gmail.com .. note:: 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 Softw...
Charlotte-Morgan/inasafe
safe/common/custom_logging.py
Python
gpl-3.0
7,216
# Copyright 2014 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
shakamunyi/neutron-vrrp
neutron/tests/unit/cisco/cfg_agent/test_cfg_agent.py
Python
apache-2.0
6,087
from graphene.core.scalars import ( GraphQLSkipField ) def test_skipfield_serialize(): f = GraphQLSkipField assert f.serialize('a') is None def test_skipfield_parse_value(): f = GraphQLSkipField assert f.parse_value('a') is None def test_skipfield_parse_literal(): f = GraphQLSkipField ...
jhgg/graphene
tests/core/test_scalars.py
Python
mit
356
""" Plugin for URLResolver Copyright (C) 2020 gujal 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 program is distribute...
dknlght/dkodi
src/script.module.urlresolver/lib/urlresolver/plugins/oogly.py
Python
gpl-2.0
1,397
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-23 20:05 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0004_auto_20170824_0359'), ] operations = [ migrations.AlterField( ...
kurniantoska/ichsan_proj
unisan/base/migrations/0005_auto_20170824_0405.py
Python
apache-2.0
677
""" Create segment definitions for prjxray interconnect. """ import argparse from prjxray.db import Database import re from collections import OrderedDict def add_segment_wires(db, tile, wires, segments): """ Adds to the set segment wires. """ tile = db.get_tile_type(tile) for pip in tile.get_pips(): ...
SymbiFlow/symbiflow-arch-defs
xc/common/utils/prjxray_define_segments.py
Python
isc
6,068
# encoding: utf-8 from __future__ import unicode_literals from datetime import datetime from mongoengine import Document, ReferenceField, IntField, EmbeddedDocumentField, BooleanField, DynamicField, DateTimeField from .compat import py2, py3, unicode from .queryset import CappedQuerySet from .structure import Owner...
marrow/task
marrow/task/message.py
Python
mit
5,773
from __future__ import absolute_import from django import forms from django.contrib import messages from django.core.urlresolvers import reverse from sentry.models import Project, Team from sentry.web.forms.add_project import AddProjectForm from sentry.web.frontend.base import OrganizationView from sentry.utils.http ...
nicholasserra/sentry
src/sentry/web/frontend/create_project.py
Python
bsd-3-clause
2,910
''' Animation ========= :class:`Animation` and :class:`AnimationTransition` are used to animate :class:`~kivy.uix.widget.Widget` properties. You must specify at least a property name and target value. To use an Animation, follow these steps: * Setup an Animation object * Use the Animation object on a Widget ...
inclement/kivy
kivy/animation.py
Python
mit
24,492
#!/usr/bin/env python # -*- coding: utf-8 -*- # # registro.py - # Copyright (C) 2016-2017 Pablo Castellano <pablo@anche.no> # # 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 ...
PabloCastellano/bormeparser
bormeparser/registro.py
Python
gpl-3.0
1,466
from openerp.osv import fields, osv import time import re from datetime import datetime from datetime import timedelta from openerp.tools.translate import _ class hotel_stock_location(osv.osv): _name = "hotel.stock.location" _description = "Stock Location" _columns = { 'name': fields.char('...
jaggu303619/asylum
openerp/addons/hotel_management_system/hotel_stock.py
Python
agpl-3.0
7,499
from __future__ import unicode_literals from .fields import ExtraField, SimplePopoloField, ComplexPopoloField from django.db.models import F from ..twitter_api import update_twitter_user_id, TwitterAPITokenMissing # FIXME: handle the extra fields (e.g. cv & program for BF) # FIXME: check all the preserve_fields are...
neavouli/yournextrepresentative
candidates/models/versions.py
Python
agpl-3.0
6,545
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright 2010 Google Inc. # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated document...
matthappens/taskqueue
taskqueue/venv_tq/lib/python2.7/site-packages/boto/provider.py
Python
mit
16,356
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # 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 op...
sputnick-dev/weboob
modules/allrecipes/module.py
Python
agpl-3.0
2,008
ingredients = [] with open("inputData.txt", "r") as infile: for line in infile: line = line.split() ingredients.append( [ int(line[2][:-1]), int(line[4][:-1]), int(line[6][:-1]), int(line[8][:-1]), ...
gytdau/advent
Day15/part2.py
Python
mit
2,067
l = [(b,a) for a,b in enumerate([1,2,3])] # [list(tuple(int))] print l # [list(tuple(int))] for a,b in enumerate([1.1,2.2,3.3]): # [tuple2(int, float)] print 'huhu', a, '%.1f' % b # [str], [int], [float] def bla(): return ('1',2.2) # ...
tomspur/shedskin
tests/120.py
Python
gpl-3.0
471
"""Describe logbook events.""" from homeassistant.core import callback from .const import DOMAIN, EVENT_COMMAND_RECEIVED, SOURCE_CLOUD COMMON_COMMAND_PREFIX = "action.devices.commands." @callback def async_describe_events(hass, async_describe_event): """Describe logbook events.""" @callback def async_d...
lukas-hetzenecker/home-assistant
homeassistant/components/google_assistant/logbook.py
Python
apache-2.0
992
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import unittest from iptest import IronPythonTestCase, is_cli, is_mono, is_netcoreapp, is_posix, big, run_test,...
IronLanguages/ironpython3
Tests/test_function.py
Python
apache-2.0
56,075
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
r8b7xy/qutebrowser
scripts/dev/freeze.py
Python
gpl-3.0
4,059
from results import * import problems.hdoj as hdoj import requests import json import time config = json.load(open('config.json')) root = config['root'] username = config['judger'] token = config['token'] headers = { 'Content-Type': 'application/json', 'Cookie': 'username=' + username + '; token=' + token, } ...
Incurable-CPC/noj
judger-py/problems.py
Python
mit
548
def rpc_owner(rpc): return object.__getattribute__(rpc, 'owner') def rpc_id(rpc): return object.__getattribute__(rpc, 'id')
entwanne/pythonrpc
utils.py
Python
mit
133
import os from unittest import mock from superdesk import get_resource_service from superdesk.io.feeding_services import FTPFeedingService from superdesk.io.commands.update_ingest import ingest_items from .mocks_reuters import setup_reuters_mock, teardown_reuters_mock def setup_providers(context): app = context...
petrjasek/superdesk-core
superdesk/tests/setup_teardown.py
Python
agpl-3.0
4,734
# Rounder - Poker for the GNOME Desktop # # Copyright (C) 2006 Devan Goodwin <dgoodwin@dangerouslyinc.com> # Copyright (C) 2006 James Bowes <jbowes@dangerouslyinc.com> # Copyright (C) 2008 Kenny MacDermid <kenny@kmdconsulting.ca> # # This program is free software; you can redistribute it and/or modify # it ...
dgoodwin/rounder
test/game-tests.py
Python
gpl-2.0
17,640
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. Unit tests are in test_collections. """ from abc import ABCMeta, abstractmethod import sys __all__ = ["Hashable", "Iterable", "Iterat...
Orav/kbengine
kbe/src/lib/python/Lib/_collections_abc.py
Python
lgpl-3.0
20,720
from __future__ import print_function import sys import os.path import Config import Miranda import Action.Instances def perform(app_type): # Perform application type discovery if needed. if app_type == 'auto': if Config.app_type is not None: print('Using application type from `.veraconf`...
maarons/Cortex
Vera/Action/NewApp.py
Python
agpl-3.0
940
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com # All Rights Reserved. # info@vauxoo.com ###################################################...
3dfxsoftware/cbss-addons
account_move_line_address/__openerp__.py
Python
gpl-2.0
1,746
from commoner.works import models import django.test class WorkFormTestCase(django.test.TestCase): fixtures = ['test_users.json', 'test_profiles.json', ] def test_add_globbing_work(self): # log in as the "normal" user self.client.login(username='normal', password='testing') ...
cc-archive/commoner
src/commoner/works/tests/test_globbing.py
Python
agpl-3.0
2,974
# -*- coding: utf-8 -*- # # This file is part of CDS. # Copyright (C) 2016 CERN. # # CDS is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version...
omelkonian/cds
tests/unit/test_fixtures.py
Python
gpl-2.0
5,865
import unittest from ctypes import * from ctypes.test import need_symbol import _ctypes_test dll = CDLL(_ctypes_test.__file__) try: CALLBACK_FUNCTYPE = WINFUNCTYPE except NameError: # fake to enable this test on Linux CALLBACK_FUNCTYPE = CFUNCTYPE class POINT(Structure): _fields_ = [("x", c_int), ("y...
kenshay/ImageScript
Script_Runner/PYTHON/Lib/ctypes/test/test_as_parameter.py
Python
gpl-3.0
6,921
import os import shutil import argparse import unittest from md2remark import main class MainTest(unittest.TestCase): '''Test Class for Main module''' def setUp(self): '''Ensures the test project is destroyed.''' if os.path.exists('md2remark_build'): shutil.rmtree('md2remark_build') def test_com...
patrickayoup/md2remark
tests/main_test.py
Python
mit
1,017
from django.conf import settings from django.db import migrations from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('corehq', 'sql_proxy_accessors', 'sql_templates'), { 'PL_PROXY_CLUSTER_NAME': settings.PL_PROXY_CLUSTER_NAME }) class Migration(migrations.Migration): dependenc...
dimagi/commcare-hq
corehq/sql_proxy_accessors/migrations/0009_soft_delete.py
Python
bsd-3-clause
877
# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, includin...
catapult-project/catapult
third_party/gsutil/gslib/vendored/boto/boto/cloudformation/__init__.py
Python
bsd-3-clause
2,185
__author__ = "David Rusk <drusk@uvic.ca>" import sys from src.daomop.astrom import AstromParser, StationaryParser from src.validate.downloads.async import AsynchronousDownloadManager from src.validate.naming import ProvisionalNameGenerator, DryRunNameGenerator from src.validate.ssos import TracksParser, TrackTarget ...
CFIS-Octarine/octarine
validate/gui/app.py
Python
gpl-3.0
15,862
import asyncio, discord, base64, binascii, re, math, shutil, tempfile, os, random from discord.ext import commands from Cogs import Utils, DL, Message, Nullify from PIL import Image def setup(bot): # Add the bot and deps settings = bot.get_cog("Settings") bot.add_cog(Encode(bot, settings)) class En...
corpnewt/CorpBot.py
Cogs/Encode.py
Python
mit
17,456
# Generated by Django 2.2.1 on 2019-05-23 06:31 import diventi.accounts.models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0155_auto_20190523_0822'), ] operations = [ migrations.AlterModelManagers( name='diventiuser'...
flavoi/diventi
diventi/accounts/migrations/0156_auto_20190523_0831.py
Python
apache-2.0
452
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
anthonysandrin/kafka-utils
kafka_utils/util/error.py
Python
apache-2.0
1,785
import os from pprint import pprint import sys from twisted.conch import manhole, manhole_ssh from twisted.python import log from carapace.sdk import registry config = registry.getConfig()
oubiwann/peloid
python/peloid/app/shell/base.py
Python
mit
193
import os import glob import socket import sys import platform import shutil import inspect # appends shipped lib dir sys.path.append(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])) import simplejson as json class Stats(object): CMakeCachePathKey = "CMakeCachePath" def __init__(se...
holtgrewe/seqan
misc/seqan_instrumentation/py2exe/dist/classes/stats.py
Python
bsd-3-clause
2,848
# provide simple test data (CSV) with the same formatting as the data file # vectors.genres_tokenizer # vectors.genres # vectors.summaries # filters.genre_counts # filters.genres # filters.movies # learn.preprocess as an application of filters
epfahl/inaworld
tests/tests.py
Python
mit
252
#!/usr/bin/env python # ====================================================================== # Copyright (C) 2007-2014 Giampaolo Rodola' <g.rodola@gmail.com> # # All Rights Reserved # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and assoc...
satyamz/Tests
pyftpdlib/log.py
Python
gpl-2.0
6,094
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
cherrygirl/micronaet-mx8
order_destination/destination.py
Python
agpl-3.0
1,855
from typing import List, Tuple from functools import lru_cache import time from itertools import combinations def parse_lines(lines): sensors = [] points = [] for line in lines: if not line: sensors.append(points) points = [] continue if line.startswit...
matslindh/codingchallenges
adventofcode2021/day19.py
Python
mit
6,295
from Orange import core, feature from Orange.statistics import contingency, distribution from Orange.utils import deprecated_keywords, deprecated_members Score = core.MeasureAttribute ScoreFromProbabilities = core.MeasureAttributeFromProbabilities InfoGain = core.MeasureAttribute_info GainRatio = core.MeasureAttribut...
yzl0083/orange
Orange/feature/scoring.py
Python
gpl-3.0
8,906
VALID_CIPHER_TEXT = ( "QUVTAgAAG0NSRUFURURfQlkAcHlBZXNDcnlwdCA2LjAuMACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPzzL7yzdvBdhwJiYrRRb/0f4hmQSN9OaYNfqcXKk/c0vnzqWh1Yo7AAjOD...
guardicore/monkey
monkey/tests/unit_tests/monkey_island/cc/services/utils/ciphertexts_for_encryption_test.py
Python
gpl-3.0
11,278
################################################### # SE2017/student/views.py: Consists of all the valid methods of student module of SAMS-IIITS #__authors__ = "David", "Sri Harsha","Sajas" #__copyright__ = "Copyright 2017, SE2017 Course" #__Team__ = ["Likhith", "David", "Sri Harsha","Sajas", "Koushik", "Rajeev"] #__li...
SriHarshaGajavalli/SE2017
students/views.py
Python
mit
10,910