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
#!/usr/bin/env python # Copyright (c) 2012 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. """Generate keyboard layout and hotkey data for the keyboard overlay. This script fetches data from the keyboard layout and hotkey...
codenote/chromium-test
tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
Python
bsd-3-clause
17,272
from PyQt5 import QtCore, QtWidgets import os class Welcome(QtWidgets.QWidget): """ This class contains content of dock area part of initial esim Window. It creates Welcome page of eSim. """ def __init__(self): QtWidgets.QWidget.__init__(self) self.vlayout = QtWidgets.QVBoxLayout(...
FOSSEE/eSim
src/browser/Welcome.py
Python
gpl-3.0
795
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-04-25 20:19 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('programs', '0016_add_allowed_language'), ] operations = [ migrations.RenameField( ...
sio2project/oioioi
oioioi/programs/migrations/0017_auto_20210425_2019.py
Python
gpl-3.0
457
"""Implement Prometheus statistics.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2018 The Contributors # # Licensed under the ...
trentindav/faucet
faucet/faucet_metrics.py
Python
apache-2.0
8,839
# Spawn Area file created with PSWG Planetary Spawn Tool import sys def addSpawnArea(core): core.spawnService.addLairSpawnArea('mixed_lair_group_1', -4014, -1966, 1024, 'dantooine') return
agry/NGECore2
scripts/mobiles/spawnareas/dantooine_imperial_op_lair.py
Python
lgpl-3.0
192
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from decimal import Decimal from oscar_docdata import appsettings class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ] operations = [ migration...
edoburu/django-oscar-docdata
oscar_docdata/migrations/0001_initial.py
Python
apache-2.0
6,455
"""This module extends the generic mainline code to add periodic query for availability of spiders and caches the resutls of the query for use both other services. """ import datetime import logging import tornado.ioloop from . import __api_version__ from async_actions import AsyncGetAndCacheSpiderMetadataForAllRepo...
simonsdave/cloudfeaster_infrastructure
cloudfeaster_services/discovery/main.py
Python
mit
4,090
import SASModels.sas_models as sas_models import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors import sys, lmfit from mpl_toolkits.axes_grid1 import make_axes_locatable sas_models.math.n_integration_cuts = 1 I0 = 0.00002 RL = 3000 R0 = 600 phi = 90 SLDspindle = 42.209e-6 #a-Fe2O3 at ...
DomiDre/SASModels
tests/sabrina_simulations.py
Python
gpl-3.0
2,566
import os from gevent import spawn from logging import INFO from tuntap import Tun from utils import create_logger from net import VPNServerConnection from config import VPNClientConfig import traceback client_logger = create_logger(name="PyVPN Client Logger", file=os.path.join(".", "client.log"), level=INFO) class ...
mitin123/PyVPN
src/client.py
Python
apache-2.0
1,920
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Vote' db.create_table('event_vote', ( ('id', self.gf('django.db.models.fields.Au...
elin-moco/ffclub
ffclub/event/migrations/0002_added_activity_campaign_participation_vote_models.py
Python
bsd-3-clause
13,005
"Interactions with the Juju environment" # Copyright 2013 Canonical Ltd. # # Authors: # Charm Helpers Developers <juju@lists.ubuntu.com> import os import json import yaml import subprocess import sys import UserDict from subprocess import CalledProcessError CRITICAL = "CRITICAL" ERROR = "ERROR" WARNING = "WARNING" I...
chuckbutler/shoutcast-charm
lib/charmhelpers/core/hookenv.py
Python
mit
14,883
# pylint: disable=redefined-outer-name,protected-access import pickle from collections import OrderedDict import pytest import matplotlib.pyplot as plt from dtocean_core.core import OrderedSim, Project from dtocean_core.data import CoreMetaData from dtocean_core.extensions import StrategyManager from dtocean_core.s...
DTOcean/dtocean-core
tests/test_extensions_strategy.py
Python
gpl-3.0
18,979
import re import os from lxml import etree from .utils import * from .namespaces import NAMESPACES CONTEXTS = ('root', 'body', 'p0', 'p', 'r', 't', 'tbl', 'tr', 'tc') META_COMMANDS = ('up', 'prev', 'next', 'cloneprev', 'clonenext', 'delete') DEFAULT_CMD_TO_CONTEXT_MAPPING = { 'for-each': ('w', 'p'), # xs...
backbohne/docx-xslt
docxxslt/xsl.py
Python
mit
10,619
#!/usr/bin/python """ Make single page versions of the documentation for release and conversion into man pages etc. """ import os import re from datetime import datetime docpath = "docs/content" outfile = "MANUAL.md" # Order to add docs segments to make outfile docs = [ "about.md", "install.md", "docs.md...
X1011/rclone
make_manual.py
Python
mit
1,945
""" The structure of Expression Tree is a binary tree to evaluate certain expressions. All leaves of the Expression Tree have an number string value. All non-leaves of the Expression Tree have an operator string value. Now, given an expression array, build the expression tree of this expression, return the root of thi...
algorhythms/LintCode
Expression Tree Build.py
Python
apache-2.0
2,906
from __future__ import print_function import os import yaml from flask.ext.debugtoolbar import DebugToolbarExtension from flask.ext.script import Manager from flask.ext.shellplus import Shell from flask_migrate import MigrateCommand, Migrate from sigh.apps import create_app from sigh.models import db from sigh.models...
kxxoling/Programmer-Sign
manage.py
Python
mit
1,772
#!/usr/bin/python # -*- coding: latin-1 -*- # Copyright 2013 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE LiveDemo App # # FI-WARE LiveDemo App 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 ...
telefonicaid/fiware-livedemoapp
scripts/get-issues.py
Python
agpl-3.0
1,429
''' Simulation Based on Hippocampus Recordings Copyright Nate Sutton 2015 References: Data from CRCNS.org hc3 . Izhikevich neuron parameters from: http://f1000research.com/articles/3-104/v1 ''' import pylab import nest ''' Create objects to run experiment with ''' multimeter = nest.Create("multimeter",10) nest.SetSt...
nmsutton/MemoryModule
python_version/archive/memory_module_all_types.py
Python
mit
2,677
import sys from os import path sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) ) import MySQLdb import pandas as pd from scraper import utility class kOptionRelatedTesting: def __init__(self, csvFileName): #parser = lambda date: pd.datetime.strptime(date, '%Y%m%d') self.df ...
puchchi/stock_scraper_latest
MainDriver/OptionRelatedTesting.py
Python
mit
2,849
import os import xlrd import urllib import libxml2 from BeautifulSoup import BeautifulSoup def initialize(): print "Initializing" htmlDirectory = os.path.join(os.getcwd(), 'html') if not os.path.exists(htmlDirectory): os.makedirs(htmlDirectory) return htmlDirectory else: print "Director...
tpmccallum/web-site-creator
oer_modules.py
Python
mit
8,998
import urllib.parse import requests import time import json import os from bs4 import BeautifulSoup def search_momo(query): query_enc = urllib.parse.quote(query) url = "https://m.momoshop.com.tw/mosearch/" + query_enc + ".html" headers = {'User-Agent': 'mozilla/5.0 (Linux; Android 6.0.1; ' ...
jwlin/web-crawler-tutorial
ch7/search_momo.py
Python
mit
1,677
from __future__ import absolute_import from .Errors import error, message from . import ExprNodes from . import Nodes from . import Builtin from . import PyrexTypes from .. import Utils from .PyrexTypes import py_object_type, unspecified_type from .Visitor import CythonTransform, EnvTransform class TypedExprNode(Exp...
thedrow/cython
Cython/Compiler/TypeInference.py
Python
apache-2.0
20,789
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################### # GXMAIL - COMMAND LINE SMTP USER AGENT ############################################################### # # gxmail.py # # Copyright 2014 GaboXandre <gabo.xandre@gmail.com> # # This program is free softwa...
GaboXandre/gxmail
gxmail.py
Python
gpl-3.0
14,299
from concert.devices.samplechangers.dummy import SampleChanger from concert.tests import TestCase class TestSampleChanger(TestCase): def setUp(self): super(TestSampleChanger, self).setUp() self.samplechanger = SampleChanger() def test_set_sample(self): self.samplechanger.sample = Non...
ufo-kit/concert
concert/tests/unit/devices/test_samplechanger.py
Python
lgpl-3.0
380
# -*- coding: utf-8 -*- """ *************************************************************************** r_mapcalc.py ------------ Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr **********************************...
dwadler/QGIS
python/plugins/processing/algs/grass7/ext/r_mapcalc.py
Python
gpl-2.0
2,550
from . import func from .Var import var class NodeBranchPart(object): def __init__(self): self.rMatrixNum = -1 self.gdasrvNum = -1 #self.bigP = None class NodeBranch(object): def __init__(self): self.len = 0.1 #self.textDrawSymbol = '-' # See var.modelSymbols for some...
Anaphory/p4-phylogeny
p4/Node.py
Python
gpl-2.0
9,304
import os import django TEST_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'tests') COMPRESS_CACHE_BACKEND = 'locmem://' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } INSTALLED_APPS = ( 'compressor', 'jingo', ) TEMPLATE_...
rtucker-mozilla/WhistlePig
vendor-local/lib/python/jingo_offline_compressor/test_settings.py
Python
bsd-3-clause
912
from App.model import UserAgents async def agent_save(request, user): ua = request.headers['User-Agent'] now = datetime.datetime.now() uas = [await i for i in user.ips] if ua in [i.content for i in contents]: ua_in = [i for i in uas if i.content == content][0] ua_in.utime = now ...
Basic-Components/auth-center
auth-center/App/auth/login_agents.py
Python
mit
533
""" Registration page. """ import os from edxapp_acceptance.pages.lms.login_and_register import CombinedLoginAndRegisterPage from edxapp_acceptance.pages.common.utils import disable_animations from regression.pages.whitelabel import LMS_URL_WITH_AUTH, ORG from regression.tests.helpers.utils import click_checkbox, fil...
edx/edx-e2e-tests
regression/pages/whitelabel/registration_page.py
Python
agpl-3.0
3,344
# Copyright (c) 2012 LE GOFF Vincent # 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 must retain the above copyright notice, this # list of conditions and th...
v-legoff/pa-poc3
src/tests/dc/test.py
Python
bsd-3-clause
13,883
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
google-research/google-research
bangbang_qaoa/two_sat/dnf_circuit_lib_test.py
Python
apache-2.0
11,116
import unittest.mock from labonneboite.common.models import Office from labonneboite.common import pdf from labonneboite.tests.test_base import DatabaseTest from labonneboite.common.load_data import load_groupements_employeurs class DownloadTest(DatabaseTest): def setUp(self): super().setUp() #...
StartupsPoleEmploi/labonneboite
labonneboite/tests/web/front/test_companies.py
Python
agpl-3.0
4,969
# 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, software # d...
masayukig/tempest
tempest/tests/lib/services/volume/v3/test_types_client.py
Python
apache-2.0
10,619
# Copyright 2012-2021 The Meson development team # 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 agree...
QuLogic/meson
mesonbuild/coredata.py
Python
apache-2.0
52,406
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # # Easy AVR USB Keyboard Firmware Keymapper # Copyright (C) 2018 David Howland # # 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 ...
dhowland/EasyAVR
keymapper/easykeymap/__init__.py
Python
gpl-2.0
911
import numpy as np import sys import imp try: imp.find_module('pycuda') found_pycuda = True except ImportError: found_pycuda = False try: import mobility_cpp found_cpp = True except ImportError: try: from .mobility import mobility_cpp found_cpp = True except ImportError: pass sys.pa...
stochasticHydroTools/RigidMultiblobsWall
mobility/test_blobs.py
Python
gpl-3.0
11,090
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
dag/genshi
genshi/core.py
Python
bsd-3-clause
25,672
# -*- coding: 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/. from __future__ import absolute_import PROJECT_NAME = 'releng-treestatus' APP_NAME = 'releng_t...
srfraser/services
src/releng_treestatus/releng_treestatus/config.py
Python
mpl-2.0
331
import sys import getopt from src.main import Main def main(argv): __keyword, __path = '', '' try: opts, args = getopt.getopt(argv, 'a:p:', ['list']) except getopt.GetoptError: raise Exception('Something went wrong') sys.exit(2) for opt, arg in opts: if opt == '-a': ...
Artie18/goto
app.py
Python
apache-2.0
823
from rest_framework.response import Response from rest_framework.views import APIView from mymoney.transactions.models import Transaction from .utils import get_currencies class ConfigAPIView(APIView): def get(self, request, *args, **kwargs): return Response({ 'currencies': dict(get_currenc...
ychab/mymoney-server
mymoney/core/views.py
Python
bsd-3-clause
457
# encoding: utf-8 import datetime import django from south.db import db from south.v2 import SchemaMigration from django.db import models # Django 1.5+ compatibility if django.VERSION >= (1, 5): from django.contrib.auth import get_user_model else: from django.contrib.auth.models import User def get_user...
mark-adams/django-waffle
waffle/south_migrations/0001_initial.py
Python
bsd-3-clause
7,674
############################################################################## # # Copyright (C) 2004-2014 Pexego Sistemas Informáticos All Rights Reserved # $Marta Vázquez Rodríguez$ <marta@pexego.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU A...
Comunitea/CMNT_004_15
project-addons/sale_display_stock/__init__.py
Python
agpl-3.0
1,022
from app.oauth import OAuthSignIn from flask import render_template, flash, redirect, url_for, g from flask.ext.login import login_user, logout_user, current_user, login_required from app import app, db, lm from app.forms import SettingsForm, EventForm from app.models import User, Settings, Event @lm.user_loader def ...
kozak127/gherkins
app/views.py
Python
mit
4,115
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
renatofb/weblate
weblate/trans/admin.py
Python
gpl-3.0
8,277
# Copyright (C) 2013, Daniel Narvaez # # 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. # # This program is distributed i...
erilyth/sugar
tests/views/activitieslist.py
Python
gpl-2.0
1,613
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Integration tests for loading and saving netcdf files.""" # Import iris.tests first so that some things can be initialised ...
SciTools/iris
lib/iris/tests/integration/test_climatology.py
Python
lgpl-3.0
3,735
name0_1_1_0_1_0_0 = None name0_1_1_0_1_0_1 = None name0_1_1_0_1_0_2 = None name0_1_1_0_1_0_3 = None name0_1_1_0_1_0_4 = None
siosio/intellij-community
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_1/_pkg0_1_1_0/_pkg0_1_1_0_1/_mod0_1_1_0_1_0.py
Python
apache-2.0
128
#!/usr/bin/python3 # # pkgvalidator.py # # Copyright (C) 2015 Endless Mobile, Inc. # Authors: # Mario Sanchez Prada <mario@endlessm.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 Free Software Foundation; either...
endlessm/eos-config-printer
pkgvalidator.py
Python
gpl-2.0
7,289
# Copyright (C) 2013-2014 Computer Sciences Corporation # # 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 a...
ezbake/ezbake-frontend
ezReverseProxy/ezReverseProxy.py
Python
apache-2.0
4,998
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
pyfa-org/eos
tests/integration/restriction/restriction/test_max_group_active.py
Python
lgpl-3.0
7,182
# vim:tw=50 """String Escaping There is no difference between |'| and |"| - they both form equivalent strings. People usually pick one based on preference, changing only to include quotes inside, like this: "Don't touch my quoting." 'I need to "work", now.' Occasionally, you need to include both kinds of quotes...
shiblon/pytour
tutorials/string_escaping.py
Python
apache-2.0
1,145
import zmq import json from . import redis import logging log = logging.getLogger(__name__) def utf(val): """Little helper function which turns strings to utf-8 encoded bytes""" if isinstance(val, str): return val.encode('utf-8') else: return val def blob(val): """Little helper fu...
tailhook/debian-zerogw
examples/tabbedchat/tabbedchat/loop.py
Python
mit
3,628
FILES = [ '../../vhdl_utils/io_utils.vhd', '../../vhdl_utils/txt_util.vhd', '../../../luz_uc_rtl/peripherals/memory/sim_memory_onchip_wb.vhd', '../../../luz_uc_rtl/cpu/defs.vhd', '../../../luz_uc_rtl/cpu/utils.vhd', '../../../luz_uc_rtl/cpu/alu.vhd', '../../../luz_uc_rtl/cpu/control...
eliben/luz-cpu
experimental/luz_uc/luz_uc_testbench/cpu/cpu_top/compile.py
Python
unlicense
1,075
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import hashlib impor...
pombredanne/pants
contrib/python/src/python/pants/contrib/python/checks/tasks2/python_eval.py
Python
apache-2.0
11,131
from anchore_engine.subsys import logger from anchore_engine.subsys.auth.realms import CaseSensitivePermission logger.enable_test_logging() def test_anchore_permissions(): """ Test permission comparisons with mixed-case, wild-cards, etc :return: """ logger.info("Testing permission wildcard matc...
anchore/anchore-engine
tests/unit/anchore_engine/subsys/auth/test_permissions.py
Python
apache-2.0
1,020
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # --------------------------------------------------------------------------...
sergey-shandar/autorest
Samples/2a-validation/Python/storage/models/storage_account_keys.py
Python
mit
800
from libcloud.container.types import Provider from libcloud.container.providers import get_driver cls = get_driver(Provider.KUBERNETES) # 1. Client side cert auth conn = cls(host='192.168.99.103', port=8443, secure=True, key_file='/home/user/.minikube/client.key', cert_file...
Kami/libcloud
docs/examples/container/kubernetes/instantiate_driver.py
Python
apache-2.0
801
from backend import db from . import models from cruds.crud_courses.models import Courses from cruds.crud_course_section_students.models import CourseSectionStudents from cruds.crud_course_sections.models import CourseSections from cruds.crud_users.models import Users from sqlalchemy import or_, func class Manager: ...
sandroandrade/emile-server
cruds/crud_program/manager.py
Python
gpl-3.0
3,163
from __future__ import unicode_literals import argparse import os import io import itertools import csv import shutil from django.db import connection from django.core.management.base import BaseCommand from django.core.management import settings from django.core import management from odm2admin.models import Datalogg...
miguelcleon/ODM2-Admin
odm2admin/management/commands/create_sqlite_export.py
Python
mit
1,980
# -*- coding: utf-8 -*- # # QuBricks documentation build configuration file, created by # sphinx-quickstart2 on Thu Mar 12 13:10:30 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
matthewwardrop/python-qubricks
docs/conf.py
Python
mit
8,595
# coding=utf-8 class bbs_property(): headers= { } host = '172.31.3.73:6020'
NJ-zero/Android
requests_demo/bbs/bbs_property.py
Python
mit
89
r''' Fold the logo of Engineered Folding Research Center --------------------------------------------------- This example shows one possible The target face is defined as horizontal plane at the height 8 and nodes [0,1,2] are involved in the minimum distance criterion. ''' from oricreate.gu import GuConstantLengt...
simvisage/oricreate
docs/howtos/ex08_rigid_facets/sim02_single_fold_quad.py
Python
gpl-3.0
2,817
from context import nflinterface import pytest import tempfile from flask import json @pytest.fixture def client(request): nflinterface.app.config['TESTING'] = True client = nflinterface.app.test_client() return client def test_app(): assert nflinterface.app != None def test_home(client): respo...
strandx/nflstats
tests/test_nflinterface.py
Python
mit
2,644
# Copyright (c) 2011, 2012 Free Software Foundation # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later vers...
gnowledge/ncert_nroer
gstudio/views/nodetypes1.py
Python
agpl-3.0
3,600
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup APP = ['Burner.py'] DATA_FILES = [] PACKAGES = ['argparse', 'pyserial', 'wxPython'] OPTIONS = {'argv_emulation': False, 'iconfile':'Burner.icns'} setup( app=APP, data_files=DATA_FILES, ...
atom3dp/Burner
setup_mac.py
Python
gpl-3.0
383
""" Main routine of GSEA. """ import sys import config from analysis import Analysis def main(args=None): # Determine filenames. if args is None: args = sys.argv[1:] out_name = 'results.csv' # Analyze the data and write the results. A = Analysis(args[0], args[1], con...
tristanbrown/gsea
gsea/__main__.py
Python
mit
446
# Copyright 2020 Alfredo de la fuente - AvanzOSC # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Stock Production Lot With Partner", "version": "12.0.1.0.0", "category": "Customized modules", "license": "AGPL-3", "author": "AvanzOSC", "website": "http://www.avanz...
oihane/odoo-addons
stock_production_lot_with_partner/__manifest__.py
Python
agpl-3.0
497
############################################################################### # Copyright (C) 2008 Johann Haarhoff <johann.haarhoff@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of Version 2 of the GNU General Public License as # published by the Free Softwar...
djhenderson/shape2ge
src/xmlwriter.py
Python
gpl-2.0
4,246
import sys import base64 import os import pytest import shutil import subprocess import yaml yaml_loader = yaml.SafeLoader yaml_dumper = yaml.SafeDumper try: yaml_loader = yaml.CSafeLoader yaml_dumper = yaml.CSafeDumper except AttributeError: pass from typing import Any, ClassVar, Dict, List, Optional, ...
datawire/ambassador
python/tests/kat/abstract_tests.py
Python
apache-2.0
16,480
""" WSGI config for roomfinder 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.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
thyagostall/roomfinder
server/roomfinder/wsgi.py
Python
gpl-2.0
397
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-03 13:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('frontend', '0001_initial'), ] operations = [ migrations.AlterField( ...
sussexstudent/falmer
falmer/frontend/migrations/0002_auto_20170703_1345.py
Python
mit
462
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.base.build_environment import pants_version from pants.version import VERSION as _VERSION from pants.testutil.test_base import TestBase class PantsPluginPantsRequirementTest(T...
tdyas/pants
testprojects/pants-plugins/tests/python/test_pants_plugin/test_pants_plugin_pants_requirement.py
Python
apache-2.0
404
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (c) 2014 CarlLee # Copyright (c) 2015 Troels Kofoed Jacobsen # Thanks to CarlLee for providing this file under the MIT license # https://github.com/CarlLee/ENML_PY import os from bs4 import BeautifulSoup MIME_TO_EXTESION_MAPPING = { 'image/png': '.png', ...
tkjacobsen/enote
enote/enmltohtml.py
Python
mit
3,150
# -*- coding: UTF-8 -*- # # Copyright 2012 Michinobu Maeda. # # 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 applicabl...
MichinobuMaeda/jpzipcode
src/gae/jpzipcode/controller/zipprovider.py
Python
apache-2.0
1,556
try: 1/1 print('Depois da excecao de divisão por 0') except ZeroDivisionError : print('Tratando qualquer excecao') else: print('Executado se não houver erro') finally: print('Sempre é executado')
renzon/poo-python
execao/tratamento.py
Python
mit
218
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2013,2015,2016 Contributor # # 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...
guillaume-philippon/aquilon
lib/aquilon/worker/commands/status.py
Python
apache-2.0
1,392
"""Implementation of various utilitaries""" import bisect import itertools from collections import deque def sliding(sequence:iter, size:int) -> iter: """Yield tuple of `size` elements""" sequence = iter(sequence) cont = deque(itertools.islice(sequence, 0, size), maxlen=size) yield tuple(cont) f...
Aluriak/MusicGenerator
generator/utils.py
Python
gpl-2.0
1,028
# This file is part of Copernicus # http://www.copernicus-computing.org/ # # Copyright (C) 2011, Sander Pronk, Iman Pouya, Erik Lindahl, and others. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as published # by the Free Soft...
soellman/copernicus
cpc/util/cmd_line_utils.py
Python
gpl-2.0
5,176
from django import forms from multiemailfield.widgets import MultiEmailWidget from multiemailfield import utils class MultiEmailFormField(forms.CharField): def __init__(self, *args, **kwargs): if 'widget' not in kwargs: kwargs['widget'] = MultiEmailWidget super(MultiEmailFormField, se...
sophilabs/django-multiemail-field
multiemailfield/forms.py
Python
mit
452
""" The bundled WSGI apps. * Routing: Uses URL prefixes to route to applications * StaticFiles: Serves a directory * StaticResources: Serves the resources from a python package """ import email.utils # For datetime formatting import functools from http import HTTPStatus import logging import mimetypes import os impo...
r0x0r/pywebview
webview/wsgi.py
Python
bsd-3-clause
12,536
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
agry/NGECore2
scripts/mobiles/yavin4/gackle_bat.py
Python
lgpl-3.0
1,708
import sqlalchemy sqlalchemy.__version__ from sqlalchemy import create_engine # Creating an inmemory sqlite database for the tutorial purposes from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String, Sequence, ForeignKey from sqlalchemy.orm import sessionmaker, aliased, r...
micknh/EdFirst
relationships.py
Python
mit
5,104
import sys import os import os.path import logging import linecache import time #sys.path.remove('/usr/lib/python2.7/site-packages') # para test, probar dependencias custom_path = '{0}/{1}' sys.path.insert(1, custom_path.format(os.getcwd(), 'depen_packages')) sys.path.insert(1, custom_path.format(os.getcwd(), 'payfi')...
rnov/Fingerpay
work_unit/watchfile_db.py
Python
mit
3,816
import json import os from django.conf import settings from django.core.management.base import BaseCommand import commonware.log import amo from applications.models import Application, AppVersion log = commonware.log.getLogger('z.cron') # The validator uses the file created here to keep up to date with the # apps a...
jbalogh/zamboni
apps/applications/management/commands/dump_apps.py
Python
bsd-3-clause
1,065
import jsonpickle import json import xlwings as xw DEBUG = False SMOOTH_E = 0.1 testdata_results_file = open("data/intrusion.testlabels.categorized", "r") testdata_results_str = testdata_results_file.read() testdata_results = testdata_results_str.split("\n") testdata_results = testdata_results[:-1] print("Reading a...
maher460/cmu10601
hw3/code/part2_validator.py
Python
mit
4,069
# Copyright 2018 Mycroft AI 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 writin...
MycroftAI/adapt
test/IntentEngineTest.py
Python
apache-2.0
9,429
import select import socket import types from base import SMB, NotConnectedError, SMBTimeout from smb_structs import * class SMBConnection(SMB): log = logging.getLogger('SMB.SMBConnection') #: SMB messages will never be signed regardless of remote server's configurations; access errors will occur if the re...
Hernanarce/pelisalacarta
python/main-classic/lib/sambatools/smb/SMBConnection.py
Python
gpl-3.0
25,187
#!/usr/bin/env python2 from eagle import * def changed(app, entry, value): print "app %s, entry %s, value %r" % (app.id, entry.id, value) App(title="Entries Test", center=(Entry(id="single"), Entry(id="multi", multiline=True), Entry(id="non-editable", label="non-edi...
ramalho/eagle-py
tests/entries.py
Python
lgpl-2.1
572
from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from core.models import Claim class Command(BaseCommand): help = 'Cleans up old unauthorized claims' def add_arguments(self, parser): parser.add_argument('days_old', type=int) ...
dchaplinsky/badparking.in.ua
badparking/core/management/commands/cleanclaims.py
Python
mit
890
# This file is part of Invenio. # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. # # Invenio 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 o...
zenodo/invenio
invenio/legacy/webalert/api.py
Python
gpl-2.0
18,014
# encoding: UTF-8 ''' 本文件中实现了CTA策略引擎,针对CTA类型的策略,抽象简化了部分底层接口的功能。 关于平今和平昨规则: 1. 普通的平仓OFFSET_CLOSET等于平昨OFFSET_CLOSEYESTERDAY 2. 只有上期所的品种需要考虑平今和平昨的区别 3. 当上期所的期货有今仓时,调用Sell和Cover会使用OFFSET_CLOSETODAY,否则 会使用OFFSET_CLOSE 4. 以上设计意味着如果Sell和Cover的数量超过今日持仓量时,会导致出错(即用户 希望通过一个指令同时平今和平昨) 5. 采用以上设计的原因是考虑到vn.trader的用户主要是对TB、MC和...
ujfjhz/vnpy
docker/dockerTrader/ctaStrategy/ctaEngine.py
Python
mit
25,335
""" Django settings for model_my_watershed project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ from os import environ from os.path import abspath, basename, d...
lewfish/model-my-watershed
src/mmw/mmw/settings/base.py
Python
apache-2.0
10,648
""" SAX driver for the pyexpat C module. This driver works with pyexpat.__version__ == '2.22'. """ version = "0.20" from xml.sax._exceptions import * from xml.sax.handler import feature_validation, feature_namespaces from xml.sax.handler import feature_namespace_prefixes from xml.sax.handler import feature_external_...
ztane/zsos
userland/lib/python2.5/xml/sax/expatreader.py
Python
gpl-3.0
14,504
from pipeline.compilers import SubProcessCompiler, CompilerBase from os.path import dirname from django.conf import settings import subprocess # DEPRECATED ... NOT REQUIRED. USED DJANGO-COMPRESSOR INSTEAD OF # DJANGO-PIPELINES class BabelCompiler(SubProcessCompiler): output_extension = 'js' def match_file...
grvty-labs/A1-136
contrib/django_pipeline/compilers.py
Python
mit
957
# example.py from collections import namedtuple Stock = namedtuple('Stock', ['name', 'shares', 'price']) def compute_cost(records): total = 0.0 for rec in records: s = Stock(*rec) total += s.shares * s.price return total # Some Data records = [ ('GOOG', 100, 490.1), ('ACME', 100,...
tuanavu/python-cookbook-3rd
src/1/mapping_names_to_sequence_elements/example1.py
Python
mit
386
""" Command based UI for the obfuscator. """ # OAT - Obfuscation and Analysis Tool # Copyright (C) 2011 Andy Gurden # # This file is part of OAT. # # OAT 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 Softwar...
andyrooger/OAT
src/interactive/solidconsole.py
Python
gpl-3.0
1,759
import os import json from mako.lookup import TemplateLookup globalsJson = [] beginFileText = "/// GENERATED CODE START\n/// WARNING! This code has been generated automatically. Any changes will be overwritten.\n" endFileText = "\n\n/// GENERATED CODE END\n" def list(words): wordsStr = "" if words != None: lastWo...
creepydragon/r2
tools/generator/rcg.py
Python
gpl-3.0
3,256
import argparse default_move_command = "/opt/quads/quads/tools/move_and_rebuild_hosts.py" parser = argparse.ArgumentParser(description="Query current cloud for a given host") action_group = parser.add_mutually_exclusive_group() # ---- Generic actions action_group.add_argument( "--version", dest="action", ...
redhat-performance/quads
quads/cli/parser.py
Python
gpl-3.0
12,769
# -*- coding: utf-8 -*- # # This file is part of Radicale Server - Calendar Server # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # Copyright © 2008-2013 Guillaume Ayoub # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
wohnsinn2/Radicale
radicale/auth/__init__.py
Python
gpl-3.0
1,784
""" Mostly equivalent to the views from django.contrib.auth.views, but implemented as class-based views. """ from __future__ import unicode_literals from django.conf import settings from django.contrib.auth import get_user_model, REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required from django...
ziposoft/godiva
src/members/views.py
Python
mit
11,223