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 # -*- coding: utf-8 -*- import os import argparse import multiprocessing as mp import neblio_ci_libs as nci nci.setup_travis_or_gh_actions_env_vars() working_dir = os.getcwd() build_dir = "build" deploy_dir = os.path.join(os.environ['BUILD_DIR'],'deploy', '') parser = argparse.ArgumentParser()...
NeblioTeam/neblio
ci_scripts/test_osx-gui_wallet.py
Python
mit
9,030
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.http import JsonResponse, QueryDict from django.db.models import Q, Count from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from .models import Tag, Family, Item import datetime @login_requ...
bencrowder/gent
gent/views.py
Python
mit
12,719
ximport math a = open("Q46.txt") words = [] for i in a.read().replace('"', '').strip("\"").split(","): words.append(i) triangle = [] for word in words: num = sum([ord(a)-64 for a in word]) nn = math.trunc((2*num)**.5 ) if 2*num == (nn*(nn+1)): triangle.append(True) else: triangle.a...
weiwang/project_euler
python/Q46.py
Python
mit
334
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test creating local libraries with the library manager """ def test(librepcb, helpers): """ Create new local library """ with librepcb.open() as app: # Open library manager app.widget('controlPanelOpenLibraryManagerButton').click() ...
rnestler/LibrePCB
tests/funq/librarymanager/test_create_local_library.py
Python
gpl-3.0
1,857
""" Copyright 2008 Online Agility (www.onlineagility.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 Unless required by applicable law or agreed ...
wiremine/python-payflowpro
payflowpro/classes.py
Python
apache-2.0
11,598
import time from cattle.plugins.docker.network import setup_mac_and_ip from cattle.plugins.host_info.main import HostInfo from .common_fixtures import * # NOQA from .docker_common import * # NOQA from docker.errors import APIError @if_docker def test_volume_activate(agent, responses): event_test(agent, 'docker/...
sonchang/python-agent
tests/test_docker.py
Python
apache-2.0
40,135
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import groupby from jinja2.utils...
dstufft/jinja2
jinja2/filters.py
Python
bsd-3-clause
29,972
# -*- coding: ISO-8859-1 -*- # # Copyright (C) 2011 Michael Schindler <m-schindler@users.sourceforge.net> # # This file is part of PyX (http://pyx.sourceforge.net/). # # PyX 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...
paradigmsort/MagicValidate
pyx/metapost/path.py
Python
mit
12,868
"""This is just a playing around module. Please ignore it""" import json import six from roletester.log import logging from six.moves.urllib import parse logger = logging.getLogger('roletester.actions.glance.usage') class Controller(object): def __init__(self, http_client): self.http_client = http_clien...
chalupaul/roletester
roletester/actions/glance/usage.py
Python
apache-2.0
2,200
#!/usr/bin/python # -*- coding: utf-8 -*- """ file: __main__.py Description: the entry point to SEM. author: Yoann Dupont MIT License Copyright (c) 2018 Yoann Dupont Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), t...
YoannDupont/SEM
sem/__main__.py
Python
mit
3,899
# # Example python script to generate a BOM from a KiCad generic netlist # # Example: Sorted and Grouped CSV BOM # """ @package Generate a csv BOM list. Components are sorted by ref and grouped by value Fields are (if exist) Item, Qty, Reference(s), Value, LibPart, Footprint, Datasheet """ from __f...
cybint-io/cybint-linux
live-build-config/config/includes.chroot/usr/local/share/doc/kicad/scripts/bom-in-python/bom_csv_grouped_by_value.py
Python
gpl-2.0
5,678
# -*- coding: utf-8 -*- """ kaoru.commands.dryrun ~~~~~~~~ /dryrun command implementation :copyright: (c) 2015 by Alejandro Ricoveri :license: MIT, see LICENSE for more details. """ from .. import config from .. import utils from . import bot_command # /dryrun command @bot_command def _cmd_handler(bot, update): ...
axltxl/kaoru
kaoru/commands/dryrun.py
Python
mit
702
"""File containing simple debug's code.""" from __future__ import print_function import sys import logging logging.basicConfig(stream=sys.stdout) logger = logging.getLogger() def quick_debug(func): """Decorate functions to have control over whether to debug or not. NOTE: bool `debug` kwarg is expected. ...
nitred/quick_debug
quick_debug/quick_debug.py
Python
mit
1,435
from flask import Flask, request from flask.ext.uploads import * import dbmerge import analyze import db2csv import glob import tasks app = Flask(__name__) app.config.update( USER_OPTIONS=(), CELERY_BROKER_URL='redis://localhost:6379', CELERY_RESULT_BACKEND='redis://localhost:6379' ...
Health-computation/data-processing
server.py
Python
gpl-2.0
1,112
from pycp2k.inputsection import InputSection class _velocity5(InputSection): def __init__(self): InputSection.__init__(self) self.Default_keyword = [] self._name = "VELOCITY" self._repeated_default_keywords = {'Default_keyword': 'DEFAULT_KEYWORD'} self._attributes = ['Defau...
SINGROUP/pycp2k
pycp2k/classes/_velocity5.py
Python
lgpl-3.0
334
''' Copyright (C) 2012 STFC 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 writi...
tofu-rocketry/apel
apel/parsers/blah.py
Python
apache-2.0
3,252
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
tmerrick1/spack
lib/spack/spack/test/cmd/gpg.py
Python
lgpl-2.1
5,040
# Copyright 2021 The gRPC 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 applicable law or agreed to in writ...
grpc/grpc
tools/run_tests/xds_k8s_test_driver/framework/xds_url_map_test_resources.py
Python
apache-2.0
13,995
import cx_Oracle class dailyDB(object): _db = None _connect = 'PandaBrokerageMonitor_ookey/PandaBrokerageMonitor2@devdb11' def __init__(self): # self._db = cx_Oracle.connect('PandaBrokerageMonitor_ookey/PandaBrokerageMonitor2@devdb11') self._db = cx_Oracle.connect(self._con...
jschovan/panda-bigmon-brokerage-collector
pbm_collector_obsoleted/lib/dailyDB.py
Python
apache-2.0
3,401
#!/usr/bin/env python3 class Solution: def sequentialDigits(self, low, high): ll, lh = len(str(low)), len(str(high)) ret = [] for l in range(ll, lh+1): for i in range(1, 11-l): print(f'i = {i}') d = 0 for k in range(i, i+l): ...
eroicaleo/LearningPython
interview/leet/1291_Sequential_Digits.py
Python
mit
620
import matplotlib matplotlib.use('Qt4Agg') from matplotlib.pyplot import * from numpy import * import PhysicsBasics as pb def GetAbsorptionCurve(E, WtPct, rho): """GetAbsorptionCurve(E, WtPct, rho): Given a material composition and density, and an energy axis, GetAbsorptionCurve produces a curve where the abci...
ZGainsforth/MultiLaue
SiHyperlaueFinal_shielded_results/AbsorptionCorrection.py
Python
epl-1.0
8,958
import json import mock from adgeletti.models import Size, AdSlot, AdPosition from adgeletti.templatetags import adgeletti_tags as tags from django import template from django.contrib.sites.models import Site from django.utils.unittest import TestCase class ErrorTestCase(TestCase): @mock.patch('adgeletti.template...
orokusaki/adgeletti
adgeletti/tests/test_tags.py
Python
bsd-3-clause
6,151
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import TransactionCase class TestGetMailChannel(TransactionCase): def setUp(self): super(TestGetMailChannel, self).setUp() self.operators = self.env['res.users'].create([{ ...
t3dev/odoo
addons/im_livechat/tests/test_get_mail_channel.py
Python
gpl-3.0
2,152
from __future__ import absolute_import, division, print_function import platform import sys from threading import Thread, Lock import json import warnings import time import stripe import pytest if platform.python_implementation() == "PyPy": pytest.skip("skip integration tests with PyPy", allow_module_level=True...
stripe/stripe-python
tests/test_integration.py
Python
mit
9,930
#!/usr/bin/python # -*- encoding: utf-8 -*- import operator import optparse import sys from geocaching import Geo, tools def main(): geo = Geo() parser = optparse.OptionParser(usage="%prog radius address...", description="Download caches for the given address and radius in ...
abbot/geocaching-py
save-for-address.py
Python
bsd-3-clause
2,065
# Copyright (C) 2014-2016 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, or (at your option) any later version. # This program is distributed in the hope that it will ...
mluscon/dnf
tests/cli/commands/test_updateinfo.py
Python
gpl-2.0
14,704
# # 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...
Fokko/incubator-airflow
airflow/utils/dag_processing.py
Python
apache-2.0
47,384
# __ File: ATOM3List.py __________________________________________________________________________________________________ # Implements : class ATOM3List # Author : Juan de Lara # Description : This is the class for list types. It inherits from ATOM3Type # Modified : 31 Dec 2001 # Changes : # - 3...
Balannen/LSMASOMM
atom3/Kernel/ATOM3Types/ATOM3List.py
Python
gpl-3.0
18,809
import apsw import contextlib import multiprocessing import threading class APSWStorageInitFailure(Exception): pass class APSWStorage(object): """ SQLite backed database Usage :: class BarStorage(APSWStorage): def setup(self): with self.transaction() a...
memsql/memsql-loader
memsql_loader/util/apsw_storage.py
Python
apache-2.0
3,627
#usr/bin/python # Xpath SQL injection By r0ot h3x49 ## Random String for test Str = "r0ot" Ste = Str.encode("hex","strict") Str1 = "0x"+Ste TITLE = "MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)" ## MySQL Injection Type AND MySQL Comments PREFIXES, SUFIXES = (" ", "' ", '" ', ...
hackersql/sq1map
Web/xpath_injection/Xpath/Xtract/Payload/XpathPayloads.py
Python
gpl-3.0
9,820
# -*- coding: utf-8 -*- # Created by apple on 2017/2/6. from sanic.exceptions import SanicException class BadRequest(SanicException): status_code = 200
skytoup/AppServer
app/exceptions/__init__.py
Python
mit
159
#!/usr/bin/python # # Copyright (c) 2009 Google Inc. 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 ...
sanathkumarv/RestAPIWt
tools/mongo-cxx-driver-legacy/site_scons/buildscripts/cpplint.py
Python
apache-2.0
133,877
#!/usr/bin/env python # # ibdata-shrinker for MySQL >= 5.6 # - written by Giacomo Lozito (giacomo.lozito@gmail.com) # # A tool to shrink ibdata1 by temporarily removing all InnoDB tables # from the target MySQL database. # See README.md for usage details. # # This program is free software: you can redistribute it and/o...
giacomolozito/ibdata-shrinker
ibdata-shrinker.py
Python
gpl-3.0
16,241
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
shakamunyi/ansible
v2/ansible/plugins/action/normal.py
Python
gpl-3.0
1,048
# # Copyright (C) 2003 Greg Landrum and Rational Discovery LLC # """ defines class _DbResultSet_ for lazy interactions with Db query results **Note** this uses the Python iterator interface, so you'll need python 2.2 or above. """ from __future__ import print_function import sys from rdkit.Dbase import DbInfo c...
soerendip42/rdkit
rdkit/Dbase/DbResultSet.py
Python
bsd-3-clause
6,080
""" =========================== Neighbourhood Cleaning Rule =========================== An illustration of the neighbourhood cleaning rule method. """ # Authors: Christos Aridas # Guillaume Lemaitre <g.lemaitre58@gmail.com> # License: MIT import matplotlib.pyplot as plt import numpy as np from sklearn.data...
glemaitre/UnbalancedDataset
examples/under-sampling/plot_neighbourhood_cleaning_rule.py
Python
mit
2,059
"""Add position and category in each message, so as to order the XML Revision ID: 435d360d3398 Revises: 2a68ba66c32b Create Date: 2015-05-03 19:00:38.124617 """ # revision identifiers, used by Alembic. revision = '435d360d3398' down_revision = '2a68ba66c32b' from alembic import op import sqlalchemy as sa def upgr...
porduna/appcomposer
alembic/versions/435d360d3398_add_position_and_category_in_each_.py
Python
bsd-2-clause
1,306
#!/usr/bin/python # -*- coding: UTF-8 -*- """ @author: xiaoL-pkav l@pker.in @version: 2015/8/31 16:20 """ import logging import logging.handlers import sys import os import time from common import LOG_DOC from thirdparty.ansistrm.ansistrm import ColorizingStreamHandler FORMATTER = logging.Formatter('%(asctime)s [%(...
LxiaoGirl/wySpider
common/logger.py
Python
gpl-2.0
1,235
from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import os import os.path as op import glob from copy import deepcopy import warnings import itertools as itt import numpy as np ...
yousrabk/mne-python
mne/io/fiff/tests/test_raw.py
Python
bsd-3-clause
44,685
from HTMLParser import HTMLParser class WikipediaHTMLTableParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.fed = [] self.fed_text = None self.table_counter = 0 def reset(self): self.fed = [] self.fed_text = None self.table_counter...
linksuccess/linksuccess
parsingframework/WikipediaHTMLTableParser.py
Python
mit
1,338
#!/usr/bin/env python # portable serial port access with python # # This is a module that gathers a list of serial ports including details on # GNU/Linux systems # # (C) 2011-2013 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, see license.txt import glob import sys i...
ThomasGerstenberg/serial_monitor
hardware/serial/tools/list_ports_linux.py
Python
bsd-3-clause
5,579
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
harterj/moose
modules/geochemistry/test/tests/time_dependent_reactions/dissolution_pyrite_2.py
Python
lgpl-2.1
1,882
""" Compiles Python statements that evaluate formulas in a Table. """ from mysite import settings import api_util from CodeGeneration.statement_accumulator import StatementAccumulator import os import numpy as np DEFAULT_FUNCTION_NAME = "MyFunction" IGNORE_PREFIX = ['main_', 'test_', '__'] PY_SUFFIX = ".py" API_OBJEC...
ScienceStacks/SciSheets
mysite/scisheets/core/helpers/program_generator.py
Python
apache-2.0
18,603
#!/usr/bin/env python # -*- coding: utf-8 -*- """Read pages from Parameter namespace in old wiki and save in new wiki.""" import pywikibot import pywikibot.pagegenerators FAC_NS = 102 MACHINE_NS = 116 TABLE_NS = 118 old_site = pywikibot.Site('en', 'siriuswiki') new_site = pywikibot.Site('en', 'newsiriuswiki') comm...
lnls-fac/sirius_wiki
read_and_write_pages.py
Python
mit
820
# -*- coding: utf-8 -*- # Copyright 2009-2015 MongoDB, 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 l...
YUNZHONGTAN/MY_Python_script
soft_ware/pymongo-3.2/test/test_collection.py
Python
gpl-3.0
86,849
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
kaplun/inspire-next
inspirehep/utils/template.py
Python
gpl-3.0
1,619
# pylint: disable=too-many-lines """ Component to interface with cameras. For more details about this component, please refer to the documentation at https://home-assistant.io/components/camera/ """ import asyncio import logging from aiohttp import web from homeassistant.helpers.entity import Entity from homeassista...
xifle/home-assistant
homeassistant/components/camera/__init__.py
Python
mit
5,935
# encoding: utf-8 # module samba.dcerpc.drsblobs # from /usr/lib/python2.7/dist-packages/samba/dcerpc/drsblobs.so # by generator 1.135 """ drsblobs DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class package_PrimaryKerberosString(__talloc.Object): # no doc def __init__(self, *args...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/dcerpc/drsblobs/package_PrimaryKerberosString.py
Python
gpl-2.0
875
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/models/image_object.py
Python
mit
3,968
from .processor import BodyData
danielward/python-mibody
mibody/__init__.py
Python
mit
32
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import edtf.fields class Migration(migrations.Migration): dependencies = [ ('gk_collections_work_creator', '0027_auto_20170518_1611'), ] operations = [ migrations.RemoveField( ...
ic-labs/glamkit-collections
glamkit_collections/contrib/work_creator/migrations/0028_auto_20170523_1141.py
Python
mit
399
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tracks.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
metalhelix/tracks
manage.py
Python
mit
249
# -*- coding: utf-8 -*- # (C) Copyright 2016 Hewlett Packard Enterprise Development LP # 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.a...
open-switch/ops-quagga
ops-tests/feature/bgp/test_bgp_ft_prefix_list.py
Python
gpl-2.0
10,748
import socket from subprocess import Popen, PIPE, STDOUT import os import time import string import requests import json import omxplayer class UnsupportedFileTypeException(Exception): '''Raised if the file type is not among the list of supported types''' pass class FileNotFoundException(Exception): '''...
nakamura9/deploy_ad_server
client/omxplayer/myomx.py
Python
mit
4,075
# styledtextbox1.py from wax import * class MainFrame(Frame): def Body(self): stb = StyledTextBox(self, size=(400,300)) self.AddComponent(stb) self.Pack() #) app = Application(MainFrame, title="StyledTextBox demo") app.Run()
MSMBA/msmba-workflow
msmba-workflow/srclib/wax/examples/styledtextbox1.py
Python
gpl-2.0
257
from glob import glob import os from django.conf import settings from doc_builder.base import restoring_chdir from doc_builder.backends.sphinx import Builder as ManpageBuilder from projects.utils import run from core.utils import copy_file_to_app_servers class Builder(ManpageBuilder): @restoring_chdir def ...
ojii/readthedocs.org
readthedocs/doc_builder/backends/sphinx_man.py
Python
mit
1,653
#qpy:kivy from kivy.app import App #here we are import app from kivy.app from kivy.uix.boxlayout import BoxLayout #here we are importing boxlayout from kivy.lang import Builder #here we are importing builder from kivy.uix.button import Button #here we are importing button from kivy UI from kivy.uix.popup import Popup...
priyankgada/Python_For_Android_Hacking
2.PopupApp.py
Python
gpl-3.0
1,706
import os import math from cyclops import * from omegaToolkit import * from daInput import * from daHEngine import * from daHandles import * if __name__ == '__main__': """ This simple example demonstrates how to load geometry from a Houdini digital asset and attach handles to multiple different paramete...
UTSDataArena/examples
handles/sphere.py
Python
bsd-2-clause
2,633
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Jun 6 2014) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### impo...
mad-tamu/transit
transit_gui.py
Python
gpl-3.0
24,660
#!/usr/bin/python # Author: Mihai Tudor Panu <mihai.tudor.panu@intel.com> # Copyright (c) 2015 Intel Corporation. # # 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, inclu...
whbruce/upm
examples/python/stepmotor.py
Python
mit
2,376
def validate_username(username): char_validation_result = map( lambda c: c.isalpha() or c.isdigit() or c == '-' or c == '_', username ) return all(char_validation_result) def validate_website(website): char_validation_result = map( lambda c: c.isalpha() or c.isdigit(), ...
avenet/hackerrank
python/python_functionals/validating_email_addresses_with_a_filter.py
Python
mit
1,318
""" This is the play """ import numpy as np import matplotlib.pyplot as plt import math from sklearn.cluster import KMeans from sklearn.datasets import make_blobs from functions import selection_algorithm, scl from csl import CSL plot = True verbose = False tracking = True selection = False # Generate the data n_sa...
h-mayorquin/competitive_and_selective_learning
play.py
Python
mit
1,250
#!/usr/bin/env python # -*- coding: utf-8 -*- import bottle import datetime import time @bottle.get('/') def index(): return bottle.static_file('index.html', root='.') @bottle.get('/stream') def stream(): bottle.response.content_type = 'text/event-stream' bottle.response.cache_control = 'no...
hustbeta/python-web-recipes
server-sent-events/bottle-sse.py
Python
mit
517
#!/usr/bin/env python3 # This file is part of OpenSoccerManager. # # OpenSoccerManager 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 ver...
OpenSoccerManager/opensoccermanager
uigtk/window.py
Python
gpl-3.0
3,411
#! /usr/bin/env python import sys import argparse import csv def main(): parser = argparse.ArgumentParser() parser.add_argument('input', metavar='INPUT', type=argparse.FileType('rb'), help="csv file") parser.add_argument('output', metavar='OUTPUT', type=argparse.FileType('wb'), help="yml file") args...
kiij/CoilSnake
coilsnake/tools/csv2yml.py
Python
gpl-3.0
818
""" Writes the value in the widget named 'pv_value' to the PV named in the widget called 'pv_name' """ from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil logger = ScriptUtil.getLogger() # Locate other widgets in the display based on their name children = widget.getDisplayModel().runtimeChildr...
ESSICS/org.csstudio.display.builder
org.csstudio.display.builder.model/examples/script_util/write_pv.py
Python
epl-1.0
1,121
from django.db.models import CharField from django.db.models.functions import Lower from django.test import TestCase from django.test.utils import register_lookup from ..models import Author class LowerTests(TestCase): def test_basic(self): Author.objects.create(name='John Smith', alias='smithj') ...
nesdis/djongo
tests/django_tests/tests/v22/tests/db_functions/text/test_lower.py
Python
agpl-3.0
1,453
#!/usr/bin/env python3 import os import shelve import argparse def configure(): parser = argparse.ArgumentParser() parser.add_argument( '--dev', '-d', dest='development', action='store_true', default=False, help='Run in development mode' ) parser.add_argument( '--root', '-r', de...
OpenAgInitiative/gro-api
gro_api/scripts/configure.py
Python
gpl-2.0
1,195
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
mbohlool/client-python
kubernetes/test/test_v1_self_subject_access_review.py
Python
apache-2.0
1,037
# Download the Python helper library from twilio.com/docs/python/install import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_...
TwilioDevEd/api-snippets
rest/usage-records/list-get-example-2/list-get-example-2.7.x.py
Python
mit
499
# Toil documentation build configuration file, created by # sphinx-quickstart on Tue Aug 25 12:37:16 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. # # All configuration values have ...
BD2KGenomics/slugflow
docs/conf.py
Python
apache-2.0
6,375
from flask import request, Response from uuid import UUID from zeus import auth from zeus.constants import PERMISSION_MAP from zeus.models import Artifact, Build, Job, Repository, RepositoryProvider from .base import Resource class BaseArtifactResource(Resource): def dispatch_request( self, prov...
getsentry/zeus
zeus/api/resources/base_artifact.py
Python
apache-2.0
1,544
""" Root views of api """ import json import os import markdown2 from django.http import HttpResponse from rest_framework.decorators import api_view from rest_framework.authtoken.models import Token from allauth.account.models import EmailAddress from django.contrib.auth import authenticate from seven23.models.res...
sebastienbarbier/723e_server
seven23/api/users/views.py
Python
mit
1,696
# -*- mode: python; coding: utf-8 -*- # Copyright (C) 2017 Laboratoire de Recherche et Développement de l'Epita # (LRDE). # # This file is part of Spot, a model checking library. # # Spot is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
mcc-petrinets/formulas
spot/tests/python/sbacc.py
Python
mit
2,002
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # demonstrate use of point labeling and the selection window # Create the RenderWindow, Renderer and both Actors # ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddR...
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/Rendering/Label/Testing/Python/labeledMesh.py
Python
gpl-3.0
3,661
#!/usr/bin/env python import json import logging class OBContract(object): def __init__(self, transport): self._transport = transport self._dht = transport.getDHT() self._market_id = transport.getMarketID() self._log = logging.getLogger('[%s] %s' % (self._market_id, self.__clas...
zenhacklab/OpenBazaar
node/contract.py
Python
agpl-3.0
627
import sys import os import tty import termios import shutil import time import signal import math width = 80 height = 20 terminalConfig = None cd = os.getcwd() display = [] columnLength = 20 selected = 0 keypressCache = [] def inputMode(): global terminalConfig terminalConfig = termios.tcgetattr(sys.stdin) tty...
BitNetwork/pysys
pyfile.py
Python
mit
5,243
import uuid import nose from bluesky.testing.noseclasses import KnownFailureTest from nose.tools import assert_raises from bluesky.hardware_checklist import * def test_connect_mds_mongodb(): try: import metadatastore except ImportError: raise nose.SkipTest from metadatastore.utils.testing ...
klauer/bluesky
bluesky/tests/test_hardware_checklist.py
Python
bsd-3-clause
1,845
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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...
googleapis/python-documentai
google/cloud/documentai_v1beta2/types/document.py
Python
apache-2.0
35,014
import datetime from rest_framework import viewsets, status from rest_framework.decorators import api_view from rest_framework.response import Response from django_filters.rest_framework import DjangoFilterBackend from appointment.models import Appointment from clinic.models import Doctor, Speciality from timetables.m...
memclutter/clinic-crm
src/api/views.py
Python
bsd-2-clause
1,913
import factory from mozillians.phonebook.models import Invite from mozillians.users.managers import PRIVATE from mozillians.users.models import UserProfilePrivacyModel class InviteFactory(factory.DjangoModelFactory): recipient = factory.Sequence(lambda n: 'user{0}@example.com'.format(n)) class Meta: ...
johngian/mozillians
mozillians/phonebook/tests/__init__.py
Python
bsd-3-clause
688
from sqlobject import * from sqlobject.sqlbuilder import * from sqlobject.tests.dbtest import * ######################################## ## Subqueries (subselects) ######################################## class TestIn1(SQLObject): col1 = StringCol() class TestIn2(SQLObject): col2 = StringCol() def setup(): ...
lightcode/SeriesWatcher
serieswatcher/sqlobject/tests/test_subqueries.py
Python
mit
3,093
import PetscBinaryIO import numpy as np from mpl_toolkits.axes_grid1 import make_axes_locatable import matplotlib.pyplot as plt dataDirectory='../run/output/' logname=dataDirectory+"grid.log" grid = np.loadtxt(logname) ni=grid[0][0] nj=grid[0][1] nij=ni*nj nplot=grid.size/2-1; ...
yxchenyq/Q-PIC
script/getField.py
Python
gpl-2.0
2,203
""" ************************************************************************************************* * Trabalho 01 - Linguagens Formais e Autômatos Finitos * * * * @teacher: Walace R...
calixtinn/LFA_01
Model/AFD.py
Python
gpl-3.0
2,400
# 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. import six _GOODBYE_MESSAGE = u'Goodbye' def web_socket_do_extra_handshake(_request): pass # Always accept. def web_socket_transfer_data(request)...
nwjs/chromium.src
net/data/websocket/close_wsh.py
Python
bsd-3-clause
739
# -*- coding: utf-8 -*- # ### # Copyright (c) 2013, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### """Document and collection archive web application.""" import os import warnings from pyramid.config impor...
Connexions/cnx-archive
cnxarchive/__init__.py
Python
agpl-3.0
6,423
#!/usr/bin/python -u # -*- coding: utf-8 -*- ''' Dataset generator for experiments with ENDSEQ operator ''' from gen.data import gen_all_streams from gen.directory import ENDSEQ_DIR_DICT, create_directories from gen.experiment import ATT, VAR, DEF, NSQ, RAN, SLI, PARAMETER, \ DIRECTORY, NAIVE_SUBSEQ_ALG, INC_SUBSE...
streampref/streamprefgen
endseqgen.py
Python
gpl-3.0
3,002
# -*- 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 field 'TimeEntry.invoice_type' db.add_column('cm_timeentry', 'invoice_type', ...
didorothy/Consulting
src/cm/migrations/0002_auto__add_field_timeentry_invoice_type.py
Python
bsd-3-clause
6,305
import time, sys import numpy as np import matplotlib.pyplot as plt sys.path.append('../../') from py2Periodic.physics import twoLayerTracers from numpy import pi params = { 'dt' : 2e3, 'nx' : 128, 'Lx' : 1e6, 'f0' : 1e-4, 'beta' : 1.5e-11, 'defRad...
glwagner/py2Periodic
tests/twoLayerTracers/randomFlowWithBump.py
Python
mit
1,566
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
dlab-berkeley/collaboratool-archive
bsd2/vagrant-ansible/ansible/lib/ansible/runner/action_plugins/fetch.py
Python
apache-2.0
5,289
# -*- coding: utf-8 -*- # # Author: François Rossigneux <francois.rossigneux@inria.fr> # # 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 # # Unles...
openstack/blazar
blazar/plugins/oshosts/host_plugin.py
Python
apache-2.0
39,310
API_V2 = 'v2'
zstackorg/zstack-utility
bm-instance-agent/bm_instance_agent/api/controllers/base.py
Python
apache-2.0
14
# Copyright 2015 Cloudbase Solutions Srl # # 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 l...
cmin764/cloudbase-init
cloudbaseinit/tests/utils/test_hostname.py
Python
apache-2.0
3,405
from rambutan3.check_args.iter.RNonEmptyIterableMatcher import RNonEmptyIterableMatcher NON_EMPTY_ITERABLE = RNonEmptyIterableMatcher()
kevinarpe/kevinarpe-rambutan3
rambutan3/check_args/annotation/NON_EMPTY_ITERABLE.py
Python
gpl-3.0
138
from engine.subaction import * class doAction(SubAction): subact_group = 'Control' fields = [NodeMap('action','string','doAction','NeutralAction') ] def __init__(self,_action='NeutralAction'): SubAction.__init__(self) self.action = _action def exec...
digiholic/universalSmashSystem
engine/subactions/control/doAction.py
Python
gpl-3.0
672
#!/usr/bin/python # -*- coding: utf-8 -*- # Project Apricot # Copyright (c) 2015 daiz. # import sys import os.path from PIL import Image # 末尾改行なしで出力する(print no \n) def printnn(value): sys.stdout.write(str(value)) # 画像のパスが有効であることを確認して返す def get_img_path(): if len(sys.argv) == 2: img_path = sys.argv[1...
daiz713/Apricot
make_ui_table.py
Python
mit
3,689
# # # Copyright (C) 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
ribag/ganeti-experiments
test/py/cmdlib/testsupport/__init__.py
Python
gpl-2.0
1,827
# -*- coding: utf-8 -*- # Copyright 2013 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 require...
harshilasu/LinkurApp
y/google-cloud-sdk/platform/gsutil/gslib/tests/test_ls.py
Python
gpl-3.0
15,415
import dom import treepython import boxmodel import sys from selection import Position class KeyEvent(object): def __init__(self, mode, workspace, selection, key, mods, text): self.mode = mode self.workspace = workspace self.selection = selection self.key = key self.mods = m...
cheery/textended-edit
keybindings.py
Python
mit
15,359
#! /usr/bin/env python # -*- coding: utf-8 -*- # # vim: fenc=utf-8 # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # Copyright © Appknox # ''' File name: __init__.py Version: 0.1 Author: dhilipsiva <dhilipsiva@gmail.com> Date created: 2015-03-11 ''' __author__ = "dhilipsiva" __status__ = "devel...
appknox/xysec_adb
xysec_adb/__init__.py
Python
apache-2.0
339