code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
import subprocess import sys import setup_util import os def start(args, logfile, errfile): try: subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="netty", stderr=errfile, stdout=logfile) subprocess.Popen("java -jar netty-example-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="netty...
morrisonlevi/FrameworkBenchmarks
netty/setup.py
Python
bsd-3-clause
860
# Copyright 2019 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. """Signing Model Objects This module contains classes that encapsulate data about the signing process. """ import os.path class CodeSignedProduct(object):...
endlessm/chromium-browser
chrome/installer/mac/signing/model.py
Python
bsd-3-clause
12,611
import hashlib import os import re import time import uuid import subprocess from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.staticfiles.finders import find as find_static_path from olympia.lib.jingo_minify_helpers import ensure_path_exists def...
atiqueahmedziad/addons-server
src/olympia/amo/management/commands/compress_assets.py
Python
bsd-3-clause
8,858
from __future__ import unicode_literals from django.conf.urls import patterns, include, url from django.conf.urls.i18n import i18n_patterns from django.contrib import admin from mezzanine.core.views import direct_to_template from mezzanine.conf import settings from hs_core.api import v1_api from theme import views a...
hydroshare/hydroshare_temp
urls.py
Python
bsd-3-clause
5,696
#!/usr/bin/env python # -*- coding: utf-8 -*- import webapp2 import hinet import seednet import StringIO import PyRSS2Gen import urllib import datetime import hashlib #from google.appengine.ext import ndb from google.appengine.api import memcache HTTP_DATE_FMT = '%a, %d %b %Y %H:%M:%S %Z' def check_date_fmt(date): ...
ryanho/ISParser
main.py
Python
bsd-3-clause
6,603
# Create your views here. import socket from pyasn1.error import PyAsn1Error import requests from .heartbleed import test_heartbleed from .models import Check try: from OpenSSL.SSL import Error as SSLError except ImportError: # In development, we might not have OpenSSL - it's only needed for SNI class SSLE...
erikr/ponycheckup
ponycheckup/check/checker.py
Python
bsd-3-clause
4,346
# -*- coding: utf-8 -*- import csv import json from cStringIO import StringIO from datetime import datetime from django.conf import settings from django.core import mail, management from django.core.cache import cache import mock from nose.plugins.attrib import attr from nose.tools import eq_ from piston.models impor...
robhudson/zamboni
apps/zadmin/tests/test_views.py
Python
bsd-3-clause
87,057
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-07-10 12:00 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_project', '0013_auto_20160710_1124'), ] oper...
kunalsharma05/django-project
django_project/migrations/0014_auto_20160710_1200.py
Python
bsd-3-clause
558
from django.http import HttpResponse from django.template import Template def admin_required_view(request): if request.user.is_staff: return HttpResponse(Template('You are an admin').render({})) return HttpResponse(Template('Access denied').render({}))
bfirsh/pytest_django
tests/views.py
Python
bsd-3-clause
270
from django.db import models from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from press_links.enums import STATUS_CHOICES, LIVE_STATUS, DRAFT_STATUS from django.utils import timezone from parler.models import TranslatableM...
iberben/django-press-links
press_links/models.py
Python
bsd-3-clause
2,904
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). import json from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import Client from huxley.accounts.models import User f...
jmosky12/huxley
huxley/api/tests/test_user.py
Python
bsd-3-clause
17,518
from django.db import models class Entry(models.Model): title = models.CharField(max_length=200) date = models.DateTimeField() class Meta: ordering = ('date',) def __unicode__(self): return self.title def get_absolute_url(self): return "/blog/%s/" % self.pk ...
bfirsh/syndication-view
syndication/tests/models.py
Python
bsd-3-clause
486
from holoviews.element import ( ElementConversion, Points as HvPoints, Polygons as HvPolygons, Path as HvPath ) from .geo import (_Element, Feature, Tiles, is_geographic, # noqa (API import) WMTS, Points, Image, Text, LineContours, RGB, FilledContours, Path, Polygons, Sh...
ioam/geoviews
geoviews/element/__init__.py
Python
bsd-3-clause
3,017
#!/usr/bin/env python ''' Copyright (C) 2020, WAFW00F Developers. See the LICENSE file for copying permission. ''' NAME = 'Edgecast (Verizon Digital Media)' def is_waf(self): schemes = [ self.matchHeader(('Server', r'^ECD(.+)?')), self.matchHeader(('Server', r'^ECS(.*)?')) ] if any(i for ...
EnableSecurity/wafw00f
wafw00f/plugins/edgecast.py
Python
bsd-3-clause
371
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-08 22:45 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('topics', '0001_initial'), ] operations = [ migrations.AlterModelOptions( ...
GeorgiaTechDHLab/TOME
topics/migrations/0002_auto_20170308_2245.py
Python
bsd-3-clause
537
from operator import attrgetter from plyj.model.source_element import Expression from plyj.utility import assert_type class Name(Expression): simple = property(attrgetter("_simple")) value = property(attrgetter("_value")) def __init__(self, value): """ Represents a name. :param va...
Craxic/plyj
plyj/model/name.py
Python
bsd-3-clause
1,255
from .variables import * def Cell(node): # cells must stand on own line if node.parent.cls not in ("Assign", "Assigns"): node.auxiliary("cell") return "{", ",", "}" def Assign(node): if node.name == 'varargin': out = "%(0)s = va_arg(varargin, " + node[0].type + ") ;" else: ...
jonathf/matlab2cpp
src/matlab2cpp/rules/_cell.py
Python
bsd-3-clause
495
# -*-coding:Utf-8 -* # Copyright (c) 2010 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 # r...
stormi/tsunami
src/secondaires/navigation/commandes/voile/border.py
Python
bsd-3-clause
4,041
from corehq.apps.reports.models import HQToggle from corehq.apps.reports.fields import ReportField from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_noop class SubmitToggle(HQToggle): def __init__(self, type, show, name, doc_type): super(SubmitToggle, se...
gmimano/commcaretest
corehq/apps/receiverwrapper/fields.py
Python
bsd-3-clause
2,703
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20150428_2142'), ] operations = [ migrations.AddField( model_name='parentrelation', ...
oskarm91/sis
apps/users/migrations/0005_parentrelation_signature.py
Python
bsd-3-clause
488
# BridgeDB by Nick Mathewson. # Copyright (c) 2007-2009, The Tor Project, Inc. # See LICENSE for licensing information from __future__ import print_function import doctest import os import random import sqlite3 import tempfile import unittest import warnings import time from datetime import datetime import bridgedb....
wfn/bridgedb
lib/bridgedb/Tests.py
Python
bsd-3-clause
30,756
from __future__ import absolute_import, unicode_literals from six import add_metaclass, text_type from .event_encoder import Parameter, EventEncoder @add_metaclass(EventEncoder) class Event(object): hit = Parameter('t', text_type, required=True) category = Parameter('ec', text_type, required=True) acti...
enthought/python-analytics
python_analytics/events.py
Python
bsd-3-clause
583
""" ======================= Generate Surface Labels ======================= Define a label that is centered on a specific vertex in the surface mesh. Plot that label and the focus that defines its center. """ print __doc__ from surfer import Brain, utils subject_id = "fsaverage" """ Bring up the visualization. """...
aestrivex/PySurfer
examples/plot_label_foci.py
Python
bsd-3-clause
1,955
# 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 logging from telemetry.page.actions import all_page_actions from telemetry.page.actions import page_action def _GetActionFromData(action_data): ...
codenote/chromium-test
tools/telemetry/telemetry/page/page_test.py
Python
bsd-3-clause
6,182
from django.conf.urls import url, patterns from data import views urlpatterns = patterns("data.views", url(r"^$", views.IndexView.as_view()), url(r"^a/(?P<application_external_id>[^/]{,255})\.json$", views.ApplicationInstanceListView.as_view()), url(r"^(?P<model_external_id>[^/]{,255})\.json$", views....
mohawkhq/mohawk-data-platform
data/urls.py
Python
bsd-3-clause
479
from setuptools import setup, find_packages setup( name='django-facebook-comments', version=__import__('facebook_comments').__version__, description='Django implementation for Facebook Graph API Comments', long_description=open('README.md').read(), author='ramusus', author_email='ramusus@gmail....
ramusus/django-facebook-comments
setup.py
Python
bsd-3-clause
1,122
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('datasets', parent_package, top_path) config.add_subpackage('volumes') config.add_subpackage('transforms') return config if __name__ == '__main__': from numpy.distuti...
yarikoptic/NiPy-OLD
nipy/neurospin/datasets/setup.py
Python
bsd-3-clause
390
""" :Requirements: django-tagging This module contains some additional helper tags for the django-tagging project. Note that the functionality here might already be present in django-tagging but perhaps with some slightly different behaviour or usage. """ from django import template from django.core.urlresolvers imp...
zerok/django-zsutils
django_zsutils/templatetags/zsutils/taghelpers.py
Python
bsd-3-clause
1,704
#! /usr/bin/env python #Copyright (c) 2016, Buti Al Delail #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 ...
kuri-kustar/kuri_mbzirc_challenge_3
kuri_object_tracking/scripts/object_picktest.py
Python
bsd-3-clause
12,469
from setuptools import setup setup( name='pymail365', version='0.1', description='A python client for sending mail using Microsoft Office 365 rest service.', long_description=open('README.rst').read(), author='Mikko Hellsing', author_email='mikko@aino.se', license='BSD', url='https://g...
aino/pymail365
setup.py
Python
bsd-3-clause
688
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 5, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 12);
antoinecarme/pyaf
tests/artificial/transf_Quantization/trend_MovingAverage/cycle_5/ar_12/test_artificial_32_Quantization_MovingAverage_5_12_100.py
Python
bsd-3-clause
272
# Autogenerated by the mkresources management command 2014-11-13 23:53 from tastypie.resources import ModelResource from tastypie.fields import ToOneField, ToManyField from tastypie.constants import ALL, ALL_WITH_RELATIONS from ietf import api from ietf.message.models import * # pyflakes:ignore from ietf.pers...
wpjesus/codematch
ietf/message/resources.py
Python
bsd-3-clause
1,927
# -*- coding: utf-8 -*- # # Copyright (c) 2016 - 2022 -- Lars Heuer # All rights reserved. # # License: BSD License # """\ Tests if the PNG serializer does not add more colors than needed. See also issue <https://github.com/heuer/segno/issues/62> """ from __future__ import unicode_literals, absolute_import import io i...
heuer/segno
tests/test_png_plte.py
Python
bsd-3-clause
1,978
# -*- coding: utf-8 -*- from __future__ import unicode_literals from cms.models import Page from cms.utils.i18n import get_language_list from django.db import migrations, models def forwards(apps, schema_editor): BlogConfig = apps.get_model('djangocms_blog', 'BlogConfig') BlogConfigTranslation = apps.get_mod...
skirsdeda/djangocms-blog
djangocms_blog/migrations/0014_auto_20160215_1331.py
Python
bsd-3-clause
1,773
"""private_base will be populated from puppet and placed in this directory""" import logging import os import dj_database_url from lib.settings_base import CACHE_PREFIX, ES_INDEXES, KNOWN_PROXIES, LOGGING from .. import splitstrip import private_base as private ENGAGE_ROBOTS = False EMAIL_BACKEND = 'django.core.m...
anaran/olympia
sites/landfill/settings_base.py
Python
bsd-3-clause
5,402
''' Created on 9 jan. 2013 @author: sander ''' from bitstring import BitStream, ConstBitStream, Bits from ipaddress import IPv4Address, IPv6Address from pylisp.packet.ip import protocol_registry from pylisp.packet.ip.protocol import Protocol from pylisp.utils import checksum import numbers class UDPMessage(Protocol)...
steffann/pylisp
pylisp/packet/ip/udp.py
Python
bsd-3-clause
7,685
# Copyright (c) 2019 Guo Yejun # # This file is part of FFmpeg. # # FFmpeg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # #...
endlessm/chromium-browser
third_party/ffmpeg/tools/python/convert_from_tensorflow.py
Python
bsd-3-clause
18,670
# -*- coding: utf-8 -*- import os from django.conf import settings from django.core.urlresolvers import reverse from django.test import Client from .....checkout.tests import BaseCheckoutAppTests from .....delivery.tests import TestDeliveryProvider from .....order import handler as order_handler from .....payment imp...
fusionbox/satchless
satchless/contrib/checkout/singlestep/tests/__init__.py
Python
bsd-3-clause
7,298
import datetime import logging import os import numpy as np from matplotlib.path import Path from matplotlib.widgets import Cursor, EllipseSelector, LassoSelector, RectangleSelector from sastool.io.credo_cct import Exposure from scipy.io import loadmat, savemat from ..core.exposureloader import ExposureLoader from .....
awacha/cct
attic/gui/tools/maskeditor.py
Python
bsd-3-clause
11,717
import numpy as np from numpy.testing import (assert_equal, assert_almost_equal, assert_raises) import skimage from skimage import data from skimage._shared._warnings import expected_warnings from skimage.filters.thresholding import (threshold_adaptive, ...
vighneshbirodkar/scikit-image
skimage/filters/tests/test_thresholding.py
Python
bsd-3-clause
11,985
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "content_edit_proj.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
burke-software/django-content-edit
manage.py
Python
bsd-3-clause
260
# -*- coding: utf-8 -*- # __author__ = chenchiyuan from __future__ import division, unicode_literals, print_function from django.core.management import BaseCommand from applications.posts.models import Post class Command(BaseCommand): def handle(self, *args, **options): posts = Post.objects.all() ...
chenchiyuan/yajiong
applications/posts/management/commands/clear_posts_same.py
Python
bsd-3-clause
710
from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() from saef_app.core import models
echevemaster/saef
saef_app/core/database.py
Python
bsd-3-clause
96
from django.db import models from .managers import CRUDManager, CRUDException class CRUDFilterModel(models.Model): class Meta: abstract = True @classmethod def verify_user_has_role(cls, user, role, request): """ Call user-defined auth function to determine if this user can use th...
areedtomlinson/django-crud-filters
CRUDFilters/models.py
Python
mit
5,473
"""frosted/checker.py. The core functionality of frosted lives here. Implements the core checking capability models Bindings and Scopes 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 res...
timothycrosley/frosted
frosted/checker.py
Python
mit
36,119
#!/usr/bin/env python import os import re import sys import glob import argparse from copy import copy from decimal import Decimal,InvalidOperation number_pattern = re.compile("(-?\d+\.?\d*(e[\+|\-]?\d+)?)", re.IGNORECASE) # Search an input value for a number def findNumber(value): try: return Decimal(va...
scoky/pytools
data_tools/files.py
Python
mit
8,781
# Tiger/Line country shapefiles' "statefp" field is the FIPS code. # The following is http://www.epa.gov/enviro/html/codes/state.html data = """ State Abbreviation FIPS Code State Name AK 02 ALASKA AL 01 ALABAMA AR 05 ARKANSAS AS 60 AMERICAN SAMOA AZ 04 ARIZONA CA 06 CALIFORNIA CO 08 COLORADO CT 09 CONNECTICUT DC 11 ...
brendano/twitter_geo_preproc
geo2_pipeline/geocode/state_codes.py
Python
mit
1,252
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.iff" result.attr...
obi-two/Rebelion
data/scripts/templates/object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.py
Python
mit
463
# -*- coding: utf-8 -*- from unittest import TestCase # from nose.tools import eq_ import numpy as np from pysas import waveread, World from pysas.mcep import estimate_alpha, spec2mcep_from_matrix, mcep2coef from pysas.synthesis.mlsa import MLSAFilter from pysas.synthesis import Synthesis from pysas.excite import Exci...
shunsukeaihara/pyworld
test/test_filter.py
Python
mit
1,201
""" GUI progressbar decorator for iterators. Includes a default (x)range iterator printing to stderr. Usage: >>> from tqdm_gui import tgrange[, tqdm_gui] >>> for i in tgrange(10): #same as: for i in tqdm_gui(xrange(10)) ... ... """ # future division is important to divide integers and get as # a result preci...
dhaase-de/dh-python-dh
dh/thirdparty/tqdm/_tqdm_gui.py
Python
mit
13,510
EQUALS = 'equals' GT = 'gt' LT = 'lt' IN = 'in' OPERATOR_SEPARATOR = '__' REVERSE_ORDER = '-' ALL_OPERATORS = {EQUALS: 1, GT: 1, LT: 1, IN: 1} def split_to_field_and_filter_type(filter_name): filter_split = filter_name.split(OPERATOR_SEPARATOR) filter_type = filter_split[-1] if len(filter_split) > 0 else N...
Aplopio/rip
rip/filter_operators.py
Python
mit
831
__all__ = ['checker', 'transformer', 'codegen', 'common', 'numsed','numsed_lib','opcoder', 'sedcode', 'snippet_test']
GillesArcas/numsed
numsed/__init__.py
Python
mit
118
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2015, Thomas Scholtes. # # 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, including # without limitation ...
kareemallen/beets
beetsplug/types.py
Python
mit
1,775
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaegraph.business_base import NodeSearch, DeleteNode from classificacaodtm_app.commands import ListClassificacaodtmCommand, SaveClassificacaodtmCommand, UpdateClassificacaodtmCommand, \ ClassificacaodtmPublicForm, Classificacaodtm...
andersonsilvade/5semscript
Projeto/backend/apps/classificacaodtm_app/facade.py
Python
mit
2,641
from django.forms import ModelForm,forms from django import forms from appPortas.models import * from django.forms.models import inlineformset_factory class PortaForm(ModelForm): class Meta: model = Porta fields = ('descricao',) class GrupoForm(ModelForm): class Meta: model = Grupo ...
Ednilsonpalhares/SCEFA
appPortas/forms.py
Python
mit
350
"""Support for interface with a Gree climate systems.""" from __future__ import annotations from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher impor...
rohitranjan1991/home-assistant
homeassistant/components/gree/switch.py
Python
mit
5,377
from django.db import models from django.contrib.auth.models import User from django.utils.html import escape from django.db.models import Q from datetime import date from datetime import datetime from MessagesApp.models import Thread from BlockPages.models import BlockPage, BlockEvent, EventComment from SpecialInfoApp...
rishabhsixfeet/Dock-
userInfo/models.py
Python
mit
35,677
""" Experiment for XGBoost + CF Aim: To find the best tc(max_depth), mb(min_child_weight), mf(colsample_bytree * 93), ntree tc: [13, 15, 17] mb: [5, 7, 9] mf: [40, 45, 50, 55, 60] ntree: [160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360] Averaging 20 models Summary Best loss ...
tks0123456789/kaggle-Otto
exp_XGB_CF_tc_mb_mf_ntree.py
Python
mit
6,574
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-License-Identifier: GPL-3.0 # # GNU Radio Python Flow Graph # Title: Record_RX # Author: Justin Ried # GNU Radio version: 3.8.1.0 from distutils.version import StrictVersion if __name__ == '__main__': import ctypes import sys if sys.platform.startsw...
CyberVines/Universal-Quantum-Cymatics
Record_RX.py
Python
mit
6,310
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutIteration(Koan): def test_iterators_are_a_type(self): it = iter(range(1,6)) fib = 0 for num in it: fib += num self.assertEqual(__ , fib) def test_iter...
caalle/Python-koans
python 3/koans/about_iteration.py
Python
mit
4,469
"""Control switches.""" from datetime import timedelta import logging from ProgettiHWSW.relay import Relay import async_timeout from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_p...
rohitranjan1991/home-assistant
homeassistant/components/progettihwsw/switch.py
Python
mit
2,686
#!/usr/bin/python # # Copyright 2016 Canonical Ltd # # 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 agr...
konono/equlipse
openstack-install/charm/trusty/charm-keystone/hooks/manager.py
Python
mit
11,385
#!/usr/bin/env python3 # Copyright (c) 2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test p2p addr-fetch connections """ import time from test_framework.messages import msg_addr, CAddress, N...
JeremyRubin/bitcoin
test/functional/p2p_addrfetch.py
Python
mit
2,266
# -*- coding: utf-8 -*- # Copyright (c) 2006-2010 Tampere University of Technology # # 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, including # without limitation the r...
tema-mbt/tema-adapterlib
adapterlib/ToolProtocolHTTP.py
Python
mit
8,508
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
lmazuel/azure-sdk-for-python
azure-cognitiveservices-vision-face/setup.py
Python
mit
2,837
#coding: utf8 import unittest #from conf import NginxConfig from blocks import KeyValueOption, KeyOption, Block ''' s = """server { nameserver 123; }""" s = """server 123;""" a = NginxConfig() a.load(s) print(a.server) #print(a.server.nameserver) ''' class NgKVB(Block): kv = KeyValueOption('kv_value') cl...
FeroxTL/pynginxconfig
test.py
Python
mit
3,830
#!/usr/bin/env python3 import os bundleFilesDir = 'tmp/bundleSizeDownloads' yarnLockFile = 'yarn.lock' packagesFile = 'package.json' def isDividerLine(line): # At least 80 chars, all slashes except the last (which is newline). The number is inconsistent for some reason. return (len(line)>=80 and line....
Discordius/Telescope
scripts/analyzeBundle.py
Python
mit
4,048
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/poi/shared_tatooine_evil_nomad_small2.iff" result.attribute_templat...
anhstudios/swganh
data/scripts/templates/object/building/poi/shared_tatooine_evil_nomad_small2.py
Python
mit
457
# This file is generated by /tmp/pip-kUGBJh-build/-c # It contains system_info results at the time of building this package. __all__ = ["get_info","show"] lapack_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]} blas_opt_info=...
ryfeus/lambda-packs
Shapely_numpy/source/numpy/distutils/__config__.py
Python
mit
1,319
class IDObject(): """ Base class for all objects having unique id within the application """ def __init__(self, objectId): """ Constructor method for building IDObject objectId - the unique objectId of the object in the application """ self._objectId = objectId ...
rusucosmin/courses
ubb/fop/2015.Seminar.09/domain/IDObject.py
Python
mit
514
'''Support module for translating strings. This module provides several functions for definitions, keys, and transforms.''' __version__ = 1.3 ################################################################################ import random def definition(name=None): 'Returns a valid definition.' random.seed(n...
ActiveState/code
recipes/Python/496858_zcryptpy/recipe-496858.py
Python
mit
1,213
#!/usr/bin/env python from __future__ import print_function import argparse import glob import os import platform import shutil import subprocess import sys from lib.util import get_electron_branding, rm_rf, scoped_cwd PROJECT_NAME = get_electron_branding()['project_name'] PRODUCT_NAME = get_electron_branding()['prod...
electron/electron
script/verify-mksnapshot.py
Python
mit
4,821
# -*- 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 'Calendar.slug' db.add_column('schedule_calendar', 'slug', self.gf('dja...
Bionetbook/bionetbook
bnbapp/schedule/migrations/0003_auto__add_field_calendar_slug.py
Python
mit
4,571
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # dodotable documentation build configuration file, created by # sphinx-quickstart on Thu Sep 17 11:47:28 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 # ...
heejongahn/dodotable
docs/conf.py
Python
mit
9,622
""" A library of useful helper classes to the saxlib classes, for the convenience of application and driver writers. $Id: saxutils.py,v 1.19 2001/03/20 07:19:46 loewis Exp $ """ import types, sys, urllib, urlparse, os, string import handler, _exceptions, xmlreader try: _StringTypes = [types.StringType, types.Uni...
Integral-Technology-Solutions/ConfigNOW
Lib/xml/sax/saxutils.py
Python
mit
20,106
# Import a whole load of stuff from System.IO import * from System.Drawing import * from System.Runtime.Remoting import * from System.Threading import * from System.Windows.Forms import * from System.Xml.Serialization import * from System import * from Analysis.EDM import * from DAQ.Environment import * fro...
jstammers/EDMSuite
EDMScripts/EDMLoop_neg_slope.py
Python
mit
14,423
model_search = "http://api.nytimes.com/svc/search/v2/" + \ "articlesearch.response-format?" + \ "[q=search term&" + \ "fq=filter-field:(filter-term)&additional-params=values]" + \ "&api-key=9key" """http://api.nytimes.com/svc/search/v2/articlesearch.json?q=terrorism+OR+t...
polypmer/scrape
new-york-times/nytimes-scrape.py
Python
mit
1,833
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from flask import session from indico.core.db import db from ind...
mvidalgarcia/indico
indico/modules/events/tracks/operations.py
Python
mit
2,614
from pytest import approx, raises from fastats.maths.gamma import gammaln def test_gamma_ints(): assert gammaln(10) == approx(12.801827480081469, rel=1e-6) assert gammaln(5) == approx(3.1780538303479458, rel=1e-6) assert gammaln(19) == approx(36.39544520803305, rel=1e-6) def test_gamma_floats(): a...
dwillmer/fastats
tests/maths/test_gamma.py
Python
mit
878
from i3pystatus import IntervalModule from i3pystatus.core.util import internet, require from datetime import datetime from urllib.request import urlopen import json import re GEOLOOKUP_URL = 'http://api.wunderground.com/api/%s/geolookup%s/q/%s.json' STATION_QUERY_URL = 'http://api.wunderground.com/api/%s/%s/q/%s.jso...
eBrnd/i3pystatus
i3pystatus/weather/wunderground.py
Python
mit
8,899
""" NBConvert Preprocessor for sanitizing HTML rendering of notebooks. """ from bleach import ( ALLOWED_ATTRIBUTES, ALLOWED_STYLES, ALLOWED_TAGS, clean, ) from traitlets import ( Any, Bool, List, Set, Unicode, ) from .base import Preprocessor class SanitizeHTML(Preprocessor): ...
sserrot/champion_relationships
venv/Lib/site-packages/nbconvert/preprocessors/sanitize.py
Python
mit
4,070
class Solution: def containVirus(self, grid: List[List[int]]) -> int: current_set_number = 1 grid_set = [[0 for i in range(len(grid[0]))] for j in range(len(grid))] set_grid = {} threaten = {} def getAdjacentCellsSet(row, col) -> List[int]: answer = [] ...
jianjunz/online-judge-solutions
leetcode/0750-contain-virus.py
Python
mit
5,673
class Solution(object): def validWordSquare(self, words): """ :type words: List[str] :rtype: bool """ if words is None or len(words) == 0: return True ls = len(words) for i in range(ls): for j in range(1, len(words[i])): ...
qiyuangong/leetcode
python/422_Valid_Word_Square.py
Python
mit
805
# coding=utf-8 """ The NfsCollector collects nfs utilization metrics using /proc/net/rpc/nfs. #### Dependencies * /proc/net/rpc/nfs """ import diamond.collector import os class NfsCollector(diamond.collector.Collector): PROC = '/proc/net/rpc/nfs' def get_default_config_help(self): config_help ...
datafiniti/Diamond
src/collectors/nfs/nfs.py
Python
mit
8,613
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from sqlalchemy.ext.declarative import declared_attr from indico...
mvidalgarcia/indico
indico/modules/events/sessions/models/types.py
Python
mit
1,690
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit from pyqode.core.backend import server from pyqode.core.modes import RightMarginMode if __name__ == '__main__': ...
zwadar/pyqode.core
examples/modes/right_margin.py
Python
mit
640
import os import json from nose.tools import assert_equal from .project import load_lsdsng from .utils import temporary_file SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) def _test_load_store_instrument(source_lsdsng, lsdinst_path, original_index): proj = load_lsdsng(source_lsdsng) proj.song.instr...
alexras/pylsdj
pylsdj/test_instrument.py
Python
mit
1,954
""" # A Better Where WHERE2 is a near-linear time top-down clustering alogithm. WHERE2 updated an older where with new Python tricks. ## Standard Header Stuff """ from __future__ import division,print_function import sys sys.dont_write_bytecode = True from lib import * from nasa93 import * """ ## Dimensionali...
rahlk/WarnPlan
warnplan/commons/tools/axe/where2.py
Python
mit
10,028
# 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 ...
SUSE/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/virtual_network_peering.py
Python
mit
4,140
############################################################################## # Copyright (c) 2000-2016 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available ...
BenceJanosSzabo/titan.core
etc/scripts/tpd_graph_xml2dot.py
Python
epl-1.0
978
#!/usr/bin/env python3 # This is a simple command line script that can be used to backup the # TACTIC database. It is independent of TACTIC, so can be run on # servers where TACTIC is not install with the database. import datetime import os import time import subprocess import tacticenv from pyasm.common import Env...
Southpaw-TACTIC/TACTIC
src/install/backup/tactic_backup.py
Python
epl-1.0
4,220
"""A library of helper functions for the CherryPy test suite.""" import datetime import io import logging import os import re import subprocess import sys import time import unittest import warnings import portend import pytest import six from cheroot.test import webtest import cherrypy from cherrypy._cpcompat impo...
Southpaw-TACTIC/TACTIC
3rd_party/python2/site-packages/cherrypy/test/helper.py
Python
epl-1.0
17,316
__doc__ = """Random number array generators for numarray. This package was ported to numarray from Numeric's RandomArray and provides functions to generate numarray of random numbers. """ from RandomArray2 import *
fxia22/ASM_xf
PythonD/site_python/numarray/random_array/__init__.py
Python
gpl-2.0
218
# Copyright 2011 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 in the ho...
UPPMAX/nsscache
nss_cache/util/timestamps_test.py
Python
gpl-2.0
2,605
#!/usr/bin/pythonTest # -*- coding: utf-8 -*- # # Web functions want links # # 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 vers...
netvigator/myPyPacks
pyPacks/Web/WantLinks.py
Python
gpl-2.0
2,653
import BaseHTTPServer import cgi import ctypes import os import sys import threading from PySide import QtGui import MaxPlus PORT = 8000 class MyThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.exiting = False address = ('localhost', PORT) self...
maxwellalive/YCDIVFX_MaxPlus
Examples/simplewebserver.py
Python
gpl-2.0
3,452
######################################################################## # # File Name: HTMLButtonElement # # Documentation: http://docs.4suite.com/4DOM/HTMLButtonElement.html # ### This file is automatically generated by GenerateHtml.py. ### DO NOT EDIT! """ WWW: http://4suite.com/4DOM ...
carvalhomb/tsmells
guess/src/Lib/xml/dom/html/HTMLButtonElement.py
Python
gpl-2.0
2,860
# -*- coding: utf-8 -*- # MouseTrap # # Copyright 2009 Flavio Percoco Premoli # # This file is part of mouseTrap. # # MouseTrap is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the Free Software Foundation. # # mouseTrap is distributed ...
lhotchkiss/mousetrap
src/mousetrap/app/commons.py
Python
gpl-2.0
1,477
import ppc_commands ppc_model = 'ppc440gx' funcs = {} ppc_commands.setup_local_functions(ppc_model, funcs) class_funcs = { ppc_model: funcs } ppc_commands.enable_generic_ppc_commands(ppc_model) ppc_commands.enable_4xx_tlb_commands(ppc_model) ppc_commands.enable_440_tlb_commands(ppc_model)
iniverno/RnR-LLC
simics-3.0-install/simics-3.0.31/amd64-linux/lib/python/mod_ppc440gx_turbo_commands.py
Python
gpl-2.0
293
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-22 14:09 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('eighth', '0036_eighthscheduledactivity_administrative'), ('eighth', '0037_auto_20160307_2342'...
jacobajit/ion
intranet/apps/eighth/migrations/0038_merge.py
Python
gpl-2.0
329