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
# Copyright 2016 Google 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 required by applicable law or a...
google/citest
examples/keystore/sync_keystore_test.py
Python
apache-2.0
11,635
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
paulrouget/servoshell
python/servo/command_base.py
Python
mpl-2.0
25,852
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe.utils import cstr, flt, getdate from frappe import _ from frappe.utils.file_manager import save_file from frappe.tra...
gangadharkadam/office_erp
erpnext/setup/page/setup_wizard/setup_wizard.py
Python
agpl-3.0
12,993
from django.conf.urls.defaults import patterns, url, include from django.shortcuts import redirect from addons.urls import ADDON_ID from . import views # These will all start with /addon/<addon_id>/ addon_patterns = patterns('', url('^$', views.addon_detail, name='discovery.addons.detail'), url('^eula/(?P<fi...
jbalogh/zamboni
apps/discovery/urls.py
Python
bsd-3-clause
1,420
#!/usr/bin/env python3 # -*-coding:UTF-8 -* import socks import socket import urllib.request import io import gzip import base64 import sys import tempfile # Max size in Mb max_size = 5 def create_connection(address, timeout=None, source_address=None): sock = socks.socksocket() sock.connect(address) retu...
CIRCL/AIL-framework
bin/tor_fetcher.py
Python
agpl-3.0
1,654
"""Constants for waze_travel_time.""" from homeassistant.const import CONF_UNIT_SYSTEM_IMPERIAL, CONF_UNIT_SYSTEM_METRIC DOMAIN = "waze_travel_time" ATTR_DESTINATION = "destination" ATTR_DURATION = "duration" ATTR_DISTANCE = "distance" ATTR_ORIGIN = "origin" ATTR_ROUTE = "route" ATTRIBUTION = "Powered by Waze" CONF...
kennedyshead/home-assistant
homeassistant/components/waze_travel_time/const.py
Python
apache-2.0
1,149
# -*- 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_account_check/models/__init__.py
Python
agpl-3.0
1,038
# -*- coding: utf-8 -*- """ This file is not runnable, but it only consists of various lists which are required by some other programs. """ # # © Rob W.W. Hooft, 2003 # © Daniel Herding, 2004 # © Ævar Arnfjörð Bjarmason, 2004 # © Andre Engels, 2004-2005 # © Yuri Astrakhan, 2005-2006 FirstnameLastname@gmail.com # ...
races1986/SafeLanguage
CEM/date.py
Python
epl-1.0
120,033
# The Fuck settings file # # The rules are defined as in the example bellow: # # rules = ['cd_parent', 'git_push', 'python_command', 'sudo'] # # The default values are as follows. Uncomment and change to fit your needs. # See https://github.com/nvbn/thefuck#settings for more information. # # no_colors = False # priori...
jjt/dotfiles-holman
config.symlink/thefuck/settings.py
Python
mit
558
#!/bin/env python # # This file is part Protein Engineering Analysis Tool (PEAT) # (C) Copyright Jens Erik Nielsen, University College Dublin 2003- # All rights reserved # # Damien Farrell April 2010 from Tkinter import * import Pmw class YasaraControl(Frame): """A yasara controller for comparison use...
dmnfarrell/peat
PEATDB/Yasara.py
Python
mit
1,231
import asyncio import os import os.path import shutil import unittest from syncrypt.pipes import (Buffered, Count, FileReader, Limit, Once, Repeat, SnappyCompress, SnappyDecompress, StreamReader) __all__ = ("PipesTests",) async def test_once(): stream = Once(b"0123456789abcdef") ...
syncrypt/client
tests/test_pipes.py
Python
gpl-3.0
2,902
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
docusign/docusign-python-client
docusign_esign/models/tabs.py
Python
mit
46,688
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
detiber/openshift-ansible
roles/lib_openshift/library/oc_adm_policy_group.py
Python
apache-2.0
71,827
class DisplayFlight: def __init__(self, id, date, airline_short, source_short, dest_short, number, departure_time, airline_id, dest_id, source_id): self.id = id self.date = date self.airline_short = airline_short self.source_short = source_short self.dest_short = dest_short self.number = number self.depa...
sumiquitous/Goshna-Server
goshna/DisplayFlight.py
Python
mit
783
import click from .. import templates @click.group() def generate(): pass @generate.command() @click.argument('name') @click.option('--path', required=True) @click.pass_context def blueprint(ctx, name, path): app = ctx.obj templates.extract_template( 'snippets/blueprint.py', app.get_bluep...
vmalloc/weber-cli
weber/cli/generate.py
Python
bsd-3-clause
427
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement from cms.models import Page from django import forms from .utils import get_model class ArticleForm(forms.ModelForm): def __init__(self, *args, **kwargs): ...
misli/cmsplugin-articles
cmsplugin_articles/forms.py
Python
bsd-3-clause
867
#!/usr/bin/env python3 # # Copyright (c) 2017 Weitian LI <liweitianux@live.com> # MIT license # # Weitian LI # 2017-02-11 """ Manage the analysis results in YAML format. """ import logging from _context import acispy from acispy import results logging.basicConfig(level=logging.INFO) if __name__ == "__main__": ...
liweitianux/chandra-acis-analysis
bin/results.py
Python
mit
337
""" The crypto.hash package. Part of the CryptoPy framework. """
realms-team/basestation-fw
libs/smartmeshsdk-REL-1.3.0.1/external_libs/cryptopy/crypto/hash/__init__.py
Python
bsd-3-clause
72
import logging import time from datetime import date from django.conf import settings from django.contrib.sites.models import Site from django.core.cache import cache from django.core.exceptions import ValidationError from django.core.mail import mail_admins from django.core.urlresolvers import reverse as django_rever...
MikkCZ/kitsune
kitsune/wiki/tasks.py
Python
bsd-3-clause
10,622
__author__ = 'Irwan Fathurrahman <irwan@kartoza.com>' __date__ = '10/05/17' from flask_wtf import FlaskForm from wtforms.fields import ( DateField, SelectField, SelectMultipleField, StringField, SubmitField, HiddenField, TextAreaField, RadioField, BooleanField ) from wtforms.validat...
meomancer/field-campaigner
flask_project/campaign_manager/forms/campaign.py
Python
bsd-3-clause
3,391
# Copyright 2011 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 ...
takeshineshiro/nova
nova/api/openstack/compute/scheduler_hints.py
Python
apache-2.0
1,768
#!/usr/bin/env python # # $File: statHeteroFreq.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can redistri...
BoPeng/simuPOP
docs/statHeteroFreq.py
Python
gpl-2.0
1,443
# init from base import Timescaner
tjlane/timescans
timescans/__init__.py
Python
mit
37
""" WSGI config for gamechat project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamechat.settings") from django.core...
nbeck90/game-chat
gamechat/gamechat/wsgi.py
Python
mit
391
""" This module defines the mechanism by which errors are handled in FoxySheep. """ import sys from antlr4.ParserRuleContext import ParserRuleContext from AST import ASTNode def _print_err(*args, flush=False): sys.stderr.write(' '.join(map(str, args)) + '\n') if flush: sys.stderr.flush() class Err...
rljacobson/FoxySheep
python_target/FoxySheep/Errors/ErrorHandler.py
Python
bsd-2-clause
2,893
import logging from api import API LOGGER = logging.getLogger('APICompare.Datumbox') class Datumbox(API): def __init__(self, api_key): self.name = 'datumbox' self.api_key = api_key self.url = "http://api.datumbox.com/1.0/SentimentAnalysis.json" def extract_label(self, label): ...
skyttle/sentiment-evaluation
datumbox.py
Python
apache-2.0
869
# # James Laska <jlaska@redhat.com> # # Copyright 2005, 2006, 2007 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # wi...
bcl/pykickstart
tests/commands/autostep.py
Python
gpl-2.0
2,273
############################################ # This file contains an interface for # accessing Sonar sensors on GPIO pins and # determining distance ot objects. ############################################ # Multi-Rotor Robot Design Team # Missouri University of Science Technology # Spring 2017 # Innocent Niyibizi # py...
MST-MRR/DroneKit
Collision/sonarsLib.py
Python
mit
1,013
__all__ = ["optimization_levels"]
MrWinstead/pybytecompile
pybytecompile/__init__.py
Python
mit
34
from pynetfilter_conntrack import \ nfct_new, nfct_destroy, nfct_snprintf,\ nfct_get_attr, nfct_get_attr_u8, nfct_get_attr_u16, nfct_get_attr_u32,\ nfct_set_attr, nfct_set_attr_u8, nfct_set_attr_u16, nfct_set_attr_u32,\ nfct_setobjopt,\ NFCT_O_DEFAULT, NFCT_OF_SHOW_LAYER3,\ ATTRIBUTES, NFCT_Q_UP...
regit/pynetfilter_conntrack
pynetfilter_conntrack/conntrack_entry.py
Python
gpl-2.0
4,867
from derpbot import plugin import time class TestPlugin(plugin.Plugin): def __init__(self, *args, **kwargs): super(TestPlugin, self).__init__(*args, **kwargs) def enable(self): pass def disable(self): pass @plugin.command("hello", name="hel...
m0r13/derpbot
derpbot/plugins/test.py
Python
mit
1,056
from django.utils.html import escape from ajax_select import LookupChannel from gf.base.models import Place, Person class PlaceLookup(LookupChannel): model = Place def get_query(self,q,request): qs = Place.objects.filter(name__icontains=q) qs |= Place.objects.filter(address__icontains=q) ...
michelesr/gasistafelice
gasistafelice/gf/base/forms/lookups.py
Python
agpl-3.0
2,408
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig import sys sys.path.append("..") sys.path.append(".") import aetherguild.config as aetherguild_config from aetherguild.listener_service import tables # this is the A...
katajakasa/aetherguild2
alembic/env.py
Python
mit
2,267
# SPDX-FileCopyrightText: 2014-2020 Martin Roelfs # # SPDX-License-Identifier: MIT import symfit as sf import numpy as np import pytest def setup_module(): np.random.seed(0) def test_1_1_model(): '''Tests the case with 1 component and 1 parameter''' x, y = sf.variables('x, y') a = sf.Parameter(name...
tBuLi/symfit
tests/test_finite_difference.py
Python
gpl-2.0
7,202
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def WarningUpgradeEvent(vim, *args, **kwargs): '''This event is a general warning event f...
xuru/pyvisdk
pyvisdk/do/warning_upgrade_event.py
Python
mit
1,158
#------------------------------------------------------------------------------- # Copyright 2017 Cognizant Technology Solutions # # 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://...
CognizantOneDevOps/Insights
PlatformAgents/com/cognizant/devops/platformagents/agents/scm/gitlab/GitLabAgent.py
Python
apache-2.0
31,541
#!/usr/bin/env python # coding: utf-8 ''' Software License Agreement (BSD License) Copyright (c) 2013, Yota Ichino All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code mus...
nus/display-mjpeg_server-timestamp
display-mjpeg_server-timestamp.py
Python
bsd-2-clause
3,479
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy from tweepy import OAuthHandler import cPickle as pickle import os import time import json import collections import functional from helper import Helper consumer_key = 'hS9KuselTd4AjDABVEWIMTGzS' consumer_secret = 'HA2VLDFsN18d5tfV49e1O21OnOaAs2X8CRqMf3o51L2...
ChuyuHsu/twitter_timeline
test.py
Python
gpl-2.0
3,780
#-*- coding: utf-8 -*- import sys class Std(object): verbose = 1 def stdout(self, m, crlf=True): if Std.verbose > 0: sys.stdout.write("[*] " + msg) if crlf: sys.stdout.write("\n") def stderr(self, msg): if Std.verbose >= 0: sys.stderr....
Frky/scat
src/shell/std.py
Python
mit
348
# -*- coding: utf-8 -*- """ *************************************************************************** GdalAlgorithmProvider.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************...
camptocamp/QGIS
python/plugins/processing/gdal/GdalOgrAlgorithmProvider.py
Python
gpl-2.0
5,314
# 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) 2017 Mozilla Corporation from positive_alert_test_case import PositiveAlertTestCase from negative_alert_...
Phrozyn/MozDef
tests/alerts/test_bruteforce_ssh.py
Python
mpl-2.0
7,170
# Unicorn Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const from .unicorn_const import * from .unicorn import Uc, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__
eltongo/unicorn
bindings/python/unicorn/__init__.py
Python
gpl-2.0
279
# ----------------------------------------------------------------------------- # Copyright (c) 2014-2016 Leandro T. C. Melo (ltcmelo@gmail.com) # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foun...
ltcmelo/uaiso
Scripts/GenAstVisitor.py
Python
lgpl-2.1
9,049
# Test 32-bit COMPARE IMMEDIATE AND BRANCH in cases where the sheer number of # instructions causes some branches to be out of range. # RUN: python %s | llc -mtriple=s390x-linux-gnu | FileCheck %s # Construct: # # before0: # conditional branch to after0 # ... # beforeN: # conditional branch to after0 # main: # ...
endlessm/chromium-browser
third_party/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/SystemZ/Large/branch-range-05.py
Python
bsd-3-clause
3,580
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import traceback from statistics import variance, mean from pyqrllib.pyqrllib import hstr2bin, QRLHelper, QRLDescriptor from qrl.core import config from qrl.core.Addr...
jleni/QRL
src/qrl/services/PublicAPIService.py
Python
mit
20,496
#!/usr/bin/env python # -*- coding: utf-8 -*- from twisted.internet import reactor from twisted.internet import task from twisted.internet.protocol import Factory from echonetlite import shellservice from echonetlite import ipv4adapter from echonetlite import middleware from echonetlite import protocol class Message...
keiichishima/echonetlite
echonetlite/interfaces.py
Python
bsd-2-clause
4,916
# Spreading Udaciousness # One of our modest goals is to teach everyone in the world to program and # understand computer science. To estimate how long this will take we have # developed a (very flawed!) model: # Everyone answering this question will convince a number, spread, (input to # the model) of their friends ...
JoseALermaIII/python-tutorials
pythontutorials/Udacity/CS101/Lesson 23 - Problem Set/Q3-Spreading Udaciousness.py
Python
mit
1,742
# coding=UTF-8 '''Copyright [2012] [Ricardo García Fernández] [ricarodgarfe@gmail.com] 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 ...
ricardogarfe/primaverasound
retrieve_schedule.py
Python
gpl-3.0
1,317
# To change this template, choose Tools | Templates # and open the template in the editor. import time class GPGEncryption(): ON_POSIX = 'posix' in sys.builtin_module_names def __init__(self, encrypt_or_decrypt, iterable = None, user = None, passphrase = None, test_branch = False): self.test_branch =...
houseurmusic/my-swift
swift/encryption-middleware/test_gpgencrytption.py
Python
apache-2.0
4,897
# Copyright 2013 Canonical Corp. # 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 ...
srajag/nova
nova/tests/virt/vmwareapi/test_vif.py
Python
apache-2.0
16,794
#!/usr/bin/env python """ Tests the trained data. """ import cv2 import numpy as np import os import time import argparse def draw_detections(img, rects): for x, y, w, h in rects: cv2.rectangle(img, (x,y), (x+w, y+h), (0, 255, 0), 3) if __name__ == "__main__": parser = argparse.ArgumentParser(descrip...
agiantwhale/trainer
test.py
Python
mit
2,509
#### PATTERN | FR | INFLECT ######################################################################## # -*- coding: utf-8 -*- # Copyright (c) 2013 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). ######################################################...
EricSchles/pattern
pattern/text/fr/inflect.py
Python
bsd-3-clause
12,878
from copy import copy import json import time import random import operator from datetime import datetime import copy from datetime import datetime from dream.plugins import plugin """{"CAD": ["ENG", "CAD"], "CAM": ["CAM"], "MILL": ["MILL"], "TURN": ["TURN"], "DRILL": ["DRILL"], "EDM": ["EDM"], ...
jerome-nexedi/dream
dream/plugins/ReadJSSkills.py
Python
gpl-3.0
2,139
#!/usr/bin/env python """This script solves the Project Euler problem "Primes with runs". The problem is: Find the sum of all S(10, d). """ import argparse import math from itertools import combinations, product def main(args): """Primes with runs""" total = 0 for d in range(10): other_digits =...
iansealy/projecteuler
111.py
Python
gpl-3.0
2,030
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2015 NXEZ.COM. # http://www.nxez.com # # Licensed under the GNU General Public 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.gnu.org/licen...
spoonysonny/SAKS-SDK
saks-v1.x/sakshat.py
Python
gpl-2.0
3,423
''' Extends main URL dispatcher in GeoConverter.urls ''' from django.conf.urls import patterns, url from OGRgeoConverter.jobs import jobidentification urlpatterns = patterns('', url(r'^$', 'OGRgeoConverter.views.show_main_page'), url(r'^forms/fi...
geometalab/geoconverter
OGRgeoConverter/urls.py
Python
mit
1,366
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-04 13:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('journal', '0026_journal_keywords'), ] operations = [ migrations.AddField( ...
BirkbeckCTP/janeway
src/journal/migrations/0027_auto_20190404_1358.py
Python
agpl-3.0
966
import sys import picklemigrate class KeyRenameMigrator(picklemigrate.PickleMigrator): def __init__(self, db): super(KeyRenameMigrator, self).__init__(db) def latest_version(self): return 1 def do_single_migration(self, target_version): if target_version == 1: key_a ...
mpillar/pickle-migrate
examples/key_rename.py
Python
mit
776
from bs4 import BeautifulSoup from com.zhyfoundry.spider import Parser class DemoParser(Parser.Parser): def __init__(self): pass def parse(self, source): soup = BeautifulSoup(source) # print soup.prettify() logo = soup.find('img', id="logo") return Parser...
atealxt/web-crawler
src/com/zhyfoundry/spider/impl/demo/DemoParser.py
Python
gpl-2.0
397
import os import subprocess import sublime import sublime_plugin class GithubCommand(sublime_plugin.WindowCommand): def run(self): filename = self.window.active_view().file_name() dirname = os.path.dirname(filename) while dirname != '/': if '.git' in os.listdir(dirname): ...
JT5D/Alfred-Popclip-Sublime
Sublime Text 2/GitHub.app Menu/GitCommand.py
Python
gpl-2.0
500
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Nicole Thomas <nicole@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import # Import Salt Libs from salt.modules import mac_sysctl from salt.exceptions import CommandExecutionError # Import Salt Testing Libs from salttesting import skipIf...
stephane-martin/salt-debian-packaging
salt-2016.3.3/tests/unit/modules/mac_sysctl_test.py
Python
apache-2.0
3,705
#!/usr/bin/python3 # # create web proxy sso keytab # thomas@linuxmuster.net # 20200311 # import constants import getopt import os import sys from functions import datetime from functions import firewallApi from functions import getSetupValue from functions import printScript from functions import readTextfile # ch...
linuxmuster/linuxmuster-base7
share/firewall/opnsense/create-keytab.py
Python
gpl-3.0
2,968
import unittest import example as ex class TestSimpleNumber(unittest.TestCase): def test_simple(self): self.assertEqual(4, ex.SimpleNumber(1).add(3)) self.assertEqual(6, ex.SimpleNumber(2).multiply(3)) self.assertAlmostEqual(0.06, ex.SimpleNumber(0.2).multiply(0.3)) d...
bbn-bernard/testing-circleci
test_example.py
Python
mit
603
""" kombu.transport.virtual ======================= Virtual transport implementation. Emulates the AMQ API for non-AMQ transports. :copyright: (c) 2009, 2011 by Ask Solem. :license: BSD, see LICENSE for more details. """ import base64 import socket from itertools import count from time import sleep, time from Queu...
mzdaniel/oh-mainline
vendor/packages/kombu/kombu/transport/virtual/__init__.py
Python
agpl-3.0
23,332
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-07 07:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('info', '0002_auto_20170505_1252'), ] operations = [ migrations.RemoveField( ...
AlanFor301/Django-heroku-practice
website/info/migrations/0003_auto_20170507_0110.py
Python
apache-2.0
757
from django.apps import AppConfig class UsuariosConfig(AppConfig): name = 'usuarios'
eduardoedson/scp
usuarios/apps.py
Python
mit
91
# -*- coding: utf-8 -*- # Copyright 2017 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from __future__ import division, print_function, unicode_literals import logging from odoo import api, fields, models, _ import odoo.addons.decimal_precision as dp from odoo.addons.sped_imposto.models.sped_c...
thinkopensolutions/l10n-brazil
sped_stock/models/inherited_stock_move.py
Python
agpl-3.0
6,120
#!/usr/bin/env python3 # Copyright (c) 2018 The Navcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import NavCoinTestFramework from test_framework.util import * #import time...
navcoindev/navcoin-core
qa/rpc-tests/coldstaking_staking.py
Python
mit
8,392
#!/usr/bin/env python # -*- coding: utf-8 -*- from os.path import abspath, dirname from os import chdir, environ from setuptools import setup, find_packages import DiscoNet environ['USE_OSX_FRAMEWORKS'] = '0' if environ.get('READTHEDOCS', None) == 'True': import pip pip.main(['install', 'https://github.com/ki...
jasmas/DiscoNet
setup.py
Python
mit
1,518
# -*- coding: utf-8 -*- """ tests/test_views_depends.py """ import unittest import trytond.tests.test_tryton from trytond.tests.test_tryton import test_view, test_depends class TestViewsDepends(unittest.TestCase): ''' Test views and depends ''' def setUp(self): """ Set up data u...
priyankajain18/trytond-sale-available-stock
tests/test_views_depends.py
Python
bsd-3-clause
1,011
from __future__ import absolute_import from django.template import Context, Template from sentry.testutils import TestCase class SerializeDetailedOrgTest(TestCase): TEMPLATE = Template( """ {% load sentry_api %} {% serialize_detailed_org org %} """ ) def test_escapes_js(self...
ifduyue/sentry
tests/sentry/templatetags/test_sentry_api.py
Python
bsd-3-clause
597
import libNeuroProofPriority as npp import sys import random # read file status = npp.initialize_priority_scheduler(sys.argv[1], .1, .9, .5) print(status) # body mode #npp.set_edge_mode(0.1, 0.9, 0.5) num_examined = 0 npp.set_body_mode(25000, 0) decision = 0 undo = 0 num_undo = 0 npp.estimate_work() estimated = np...
janelia-flyem/NeuroProof
integration_tests/testpriority_manual.py
Python
bsd-3-clause
1,871
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0017_auto_20160324_2131'), ] operations = [ migrations.AlterField( model_name='suggestedevent', ...
blossomica/airmozilla
airmozilla/main/migrations/0018_auto_20160325_1951.py
Python
bsd-3-clause
567
# coding: utf-8 # python 2 and python 3 compatibility library from six import iteritems from ..api_client import call_api def list_contacts(token, **kwargs): """ This method makes a synchronous HTTP request. :param str token: (required) :return: response dict """ params = locals(...
flockchat/pyflock
flockos/apis/roster.py
Python
apache-2.0
568
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM 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 # #...
epam/DLab
infrastructure-provisioning/src/general/scripts/aws/dataengine_prepare.py
Python
apache-2.0
10,473
from django import template from math import log10 register = template.Library() def do_tags_cloud(parser, token): try: # split_contents() knows not to split quoted strings. tag_name, tag_list = token.split_contents() except ValueError: raise template.TemplateSyntaxError("%r tag require...
openpolis/open_municipio
open_municipio/taxonomy/templatetags/tags_cloud.py
Python
agpl-3.0
2,799
"""SCons.Tool.JavaCommon Stuff for processing Java. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation # # 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 Softw...
carlos-lopez-garces/mapnik-trunk
scons/scons-local-1.2.0/SCons/Tool/JavaCommon.py
Python
lgpl-2.1
12,539
#!/usr/bin/python3 def parse(): s = "\ 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08\n\ 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00\n\ 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65\n\ 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91\n\ 22 3...
smith-erik/project-euler
11-20/p11.py
Python
unlicense
3,008
""" Extended CoursePage. """ import abc from edxapp_acceptance.pages.studio.course_page import CoursePage from regression.tests.helpers import get_url class CoursePageExtended(CoursePage): """ Extended CoursePage. """ @abc.abstractmethod def is_browser_on_page(self): pass @property ...
raeeschachar/edx-e2e-mirror
regression/pages/studio/course_page_studio.py
Python
agpl-3.0
473
# Copyright 2015 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...
sambooo/pachyderm
examples/tensor_flow/code/__init__.py
Python
apache-2.0
905
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
huiyiqun/check_mk
web/plugins/sidebar/search.py
Python
gpl-2.0
16,151
# (c) 2012 Urban Airship and Contributors from django.test import TestCase from mithril.tests.utils import fake_settings from mithril.tests.fake_strategy import FakeStrategy from mithril.middleware import WhitelistMiddleware import random import mithril class RaisesAttributeError(WhitelistMiddleware): def get_str...
urbanairship/django-mithril
mithril/tests/test_middleware.py
Python
bsd-3-clause
2,491
# 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...
RobinQuetin/CAIRIS-web
cairis/cairis/EnvironmentProperties.py
Python
apache-2.0
940
from __future__ import division, absolute_import, print_function import pytest from numpy import array from numpy.compat import long from numpy.testing import assert_, assert_raises from . import util class TestReturnComplex(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] ...
tynn/numpy
numpy/f2py/tests/test_return_complex.py
Python
bsd-3-clause
4,741
from __future__ import division, absolute_import, print_function import sys import operator import pytest import ctypes import numpy as np from numpy.core._rational_tests import rational from numpy.testing import assert_, assert_equal, assert_raises from numpy.core.numeric import pickle def assert_dtype_equal(a, b):...
ryfeus/lambda-packs
Opencv_pil/source36/numpy/core/tests/test_dtype.py
Python
mit
36,811
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import api, fields, models import openerp.addons.decimal_precision as dp class ProductTemplate(models.Model): _inherit = "product.template" uos_id = fields.Many2one('product.uom', 'Unit of Sale', ...
minhphung171093/GreenERP
openerp/addons/product_uos/models/product_uos.py
Python
gpl-3.0
1,586
""" bilateral filter """ from __future__ import print_function, unicode_literals, absolute_import, division import logging logger = logging.getLogger(__name__) import numpy as np from gputools import OCLArray,OCLImage, OCLProgram, get_device from ._abspath import abspath def _tv2(data,weight,Niter=50): """ ...
maweigert/gputools
gputools/denoise/tv2.py
Python
bsd-3-clause
3,981
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import datet...
marwoodandrew/superdesk
server/aap_mm/aap_mm_datalayer.py
Python
agpl-3.0
15,809
import pandas as pd import numpy as np import holoviews as hv # hv.extension('bokeh') def read_files(file): # TODO Fix search into the dictionary for increased speed """ 1. Reads in the files and does quick cleaning 2. sets the temperature as the index :param file: .txt file of the data :retur...
mannyfin/IRAS
plotTPD_data programs/test.py
Python
bsd-3-clause
2,055
import fnmatch import importlib from datetime import datetime from typing import Any, Callable, Dict, List, Optional, Union from urllib.parse import unquote from django.http import HttpRequest from django.utils.translation import gettext as _ from zerver.lib.actions import ( check_send_private_message, check_...
eeshangarg/zulip
zerver/lib/webhooks/common.py
Python
apache-2.0
9,283
""" Copyright (c) 2020, Battelle Memorial Institute All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and...
VOLTTRON/volttron-applications
pnnl/EconomizerRCxAgent/economizer/diagnostics/InsufficientOutsideAir.py
Python
bsd-3-clause
8,832
from . import pyjsparser #from pyesprima import esprima from . import translating_nodes import hashlib import re # the re below is how we'll recognise numeric constants. # it finds any 'simple numeric that is not preceded with an alphanumeric character # the numeric can be a float (so a dot is found) but # it does no...
xcoder123/KodiLatviesiem
plugin.video.filmaslatviski/js2py/translators/translator.py
Python
gpl-3.0
6,293
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana 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.o...
ypkang/neon
neon/models/dbn.py
Python
apache-2.0
5,473
from atom.ext.crispy_forms.forms import SingleButtonMixin from django import forms from django.utils.translation import ugettext_lazy as _ from yubico_client.yubico_exceptions import SignatureVerificationError, StatusCodeError from watchdog_id.auth_factories.yubico_otp.models import YubicoOTPDevice from watchdog_id.au...
watchdogpolska/watchdog-id
watchdog_id/auth_factories/yubico_otp/forms.py
Python
mit
3,377
""" WSGI config for gri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_...
mansonul/gri
server/config/wsgi.py
Python
agpl-3.0
379
from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from django.template.context import Context from django.shortcuts import redirect from django.template import RequestContext from django.shortcuts import render from connections.models import Connection, ConnectionRequest from...
mdavoodi/konkourse-python
endorsements/views.py
Python
mit
1,144
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Notification.data' db.add_column(u'notifications_notifica...
alazaro/django-notifications
notifications/south_migrations/0008_auto__add_field_notification_data.py
Python
bsd-3-clause
5,995
# Shows how many cars ar available today cars = 100 # Every car has 4 seats space_in_a_car = 4 # The amount of drivers available drivers = 30 # How many passangers need a ride passengers = 90 # What amount of cars will not be used cars_not_driven = cars - drivers # How many cars will be driven cars_driven = driver...
seravok/LPTHW
ex4.py
Python
gpl-3.0
1,138
from __future__ import absolute_import, print_function import random import socket import string import sys import time import unittest2 as unittest import warnings import weakref from nose import SkipTest from kombu import Connection from kombu import Exchange, Queue from kombu.five import range if sys.version_inf...
cce/kombu
funtests/transport.py
Python
bsd-3-clause
9,512
# functional.property import string def get_file(filename): ''' Opens file, strips whitespace ''' try: fop = open(filename, 'r') contents = fop.readlines() except: print "No file found" return contents = map(str.strip, contents) return contents def write_to(word_l...
AmandaMoen/AmandaMoen
students/PatPrendergast/session5/functional.py
Python
gpl-2.0
961