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
# -*- coding: utf-8 -*- from .connection import Connection from .pool import Pool # Backward comparability with versions prior to 0.1.7 from .connection import Connection as Conn __title__ = 'tinys3' __version__ = '0.1.7' __author__ = 'Shlomi Atar' __license__ = 'Apache 2.0'
URXtech/tinys3
tinys3/__init__.py
Python
mit
279
from django.apps import AppConfig class LibraryConfig(AppConfig): name = 'library'
airportmarc/the416life
src/apps/library/apps.py
Python
mit
89
# -*- coding: utf-8 -*- #------------------------------------------------------------ # Movie Ultra 7K # Version 0.2 (09.01.2016) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www.mimediacenter.info) ...
corvorepack/REPOIVAN
plugin.video.movie.ultra.7k/resources/tools/chollotv.py
Python
gpl-2.0
9,416
from duralex.AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * import duralex.tree class ForkReferenceVisitor(AbstractVisitor): def visit_node(self, node): if duralex.tree.is_reference(node) and 'children' in node and len(node['children']) > 1: ref_nodes = [n for n in...
Legilibre/duralex
duralex/ForkReferenceVisitor.py
Python
mit
693
### BEGIN LICENSE # Copyright (C) 2011 Guillaume Hain <zedtux@zedroot.org> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation # # This program is distributed in the hope that it will be...
cemmanouilidis/naturalscrolling
naturalscrolling_lib/gconfsettings.py
Python
gpl-3.0
8,829
''' Module: cell Author: David Frye Description: Contains the Cell class. ''' from utility import Direction class Cell: ''' Class: Cell Description: Represents an individual cell in a maze. ''' # The print character for a visited cell. VISITED_STRING = " " # The print character for an unvisited cell. UNVISIT...
DFrye333/DynamicMaze
cell.py
Python
mit
3,827
# Copyright 2015, Cisco Systems. # 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...
redhat-openstack/ironic
ironic/tests/drivers/ucs/test_power.py
Python
apache-2.0
15,208
""" Discrete Fourier Transforms - FFT.py The underlying code for these functions is an f2c translated and modified version of the FFTPACK routines. fft(a, n=None, axis=-1) ifft(a, n=None, axis=-1) rfft(a, n=None, axis=-1) irfft(a, n=None, axis=-1) hfft(a, n=None, axis=-1) ihfft(a, n=None, axis=-1) fftn(a, s=None, axe...
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/fft/fftpack.py
Python
bsd-3-clause
10,629
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __open...
Secheron/compassion-switzerland
password_pusher_compassion/gp_connector.py
Python
agpl-3.0
1,024
from django.shortcuts import render def index(request): return render(request, 'bs_brochure_site/index.html')
zmetcalf/django-webdev
bs_brochure_site/views.py
Python
gpl-3.0
115
from django.conf.urls import include, url urlpatterns = [ url(r'^one/', include('sample_project.app_one.urls')), url(r'^one/(?P<realm_slug>[\w-]+)/news/', include('micropress.urls', namespace='app_one'), {'realm_content_type': 'app_one.onegame'}), url(r'^two/', include('sample_project.app_...
jbradberry/django-micro-press
sample_project/urls.py
Python
mit
665
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Flibcpp(CMakePackage): """Fortran bindings to the C++ Standard Library. """ homep...
LLNL/spack
var/spack/repos/builtin/packages/flibcpp/package.py
Python
lgpl-2.1
3,945
#!/usr/bin/env python # Copyright 2012, 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option...
michaelld/gnuradio
gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py
Python
gpl-3.0
9,911
# Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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...
dnanexus/dx-toolkit
src/python/dxpy/app_builder.py
Python
apache-2.0
44,192
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re import subprocess import sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os....
vadimtk/chrome4sdp
content/test/gpu/run_gpu_test.py
Python
bsd-3-clause
3,766
from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ("forum", "0005_auto_20151119_2224"), ] state_operations = [ migrations.CreateModel( name="TopicFollowed", fields=[ ("...
ChantyTaguan/zds-site
zds/notification/migrations/0001_initial.py
Python
gpl-3.0
1,221
#!/usr/bin/python # -*- coding: utf-8 -*- ''' freeseer - vga/presentation capture software Copyright (C) 2013 Free and Open Source Software Learning Centre http://fosslc.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 ...
Freeseer/freeseer
src/freeseer/frontend/talkeditor/TalkDetailsWidget.py
Python
gpl-3.0
6,299
import unittest, time, re from selenium import selenium class Action(unittest.TestCase): def __init__ (self, selenium): self.sel = selenium self._diag = True # make True for profiling diagnostics self._diagResults = None self._diag_sleepTime = None self._diag_performCalls = ...
sinsai/Sahana_eden
static/selenium/scripts/actions.py
Python
mit
19,331
#!/usr/bin/env python import sys from multiprocessing import Process sys.path.append("../") from laspy import file as File inFile = File.File(sys.argv[1],mode= "r") outFile = File.File(sys.argv[2],mode= "w", header = inFile.header) outFile.writer.pad_file_for_point_recs(len(inFile)) outFile.close(ignore_header_changes...
blazbratanic/laspy
misc/file_copy3.py
Python
bsd-2-clause
995
## @file # This file is used to parse meta files # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the ...
MattDevo/edk2
BaseTools/Source/Python/Workspace/MetaFileParser.py
Python
bsd-2-clause
107,232
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 Vertel AB (<http://vertel.se>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
vertelab/odoo-smart
sale_sequence/__init__.py
Python
agpl-3.0
1,050
from __future__ import print_function import argparse import fnmatch import functools import logging import os import pprint import subprocess from pkg_resources import iter_entry_points logging.basicConfig() logger = logging.getLogger('mfind') class Primary(object): """This will be extended by all primaries ...
meitham/mfind
mfinder.py
Python
bsd-3-clause
11,002
import tkinter as tk from tkinter import ttk from collections import namedtuple import sqlite3 from enum import Enum import re import datetime import logging import os import time # Regular expression we rely upon win_loss_pattern = r'PowerTaskList\.DebugPrintPower\(\) - TAG_CHANGE Entity=(.+) tag=PLAYSTATE value=...
Seek/ValueTracker
hs.py
Python
gpl-3.0
16,651
from raven.contrib.flask import Sentry from flask import Flask from flask.ext.babel import Babel from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.markdown import Markdown from flask.ext.login import LoginManager from flask.ext.gravatar import Gravatar from flask.ext.migrate import Migrate, MigrateCommand from...
RalfJung/dudel
dudel/__init__.py
Python
gpl-3.0
1,320
# This file is part of the Simulation Manager project for VecNet. # For copyright and licensing information about this project, see the # NOTICE.txt and LICENSE.md files in its top-level directory; they are # available at https://github.com/vecnet/simulation-manager # # This Source Code Form is subject to the terms of ...
vecnet/simulation-manager
sim_manager/scripts/models/base.py
Python
mpl-2.0
1,216
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from gaebusiness.business import CommandExecutionException from gaecookie.decorator import no_csrf from gaepermission import facade from livro_app import fachada from tekton import r...
renzon/appengine-video
backend/appengine/routes/books.py
Python
mit
2,726
from __future__ import absolute_import import scanomatic.generics.model as model class SegmentationModel(model.Model): def __init__(self, dydt=None, dydt_ranks=None, dydt_signs=None, d2yd2t=None, d2yd2t_signs=None, phases=None, offset=0, log2_curve=None, times=None, plate=None,...
Scan-o-Matic/scanomatic
scanomatic/models/phases_models.py
Python
gpl-3.0
1,102
# Copyright 2019 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
alexgorban/models
research/delf/delf/python/google_landmarks_dataset/compute_recognition_metrics.py
Python
apache-2.0
3,676
import urllib import re __all__ = ["safe_quote_tuple", "etree_to_dict", "return_true"] camelcase_to_underscore = lambda s: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', '_\\1', s).lower().strip('_') def safe_quote_tuple(tuple_): """Convert a 2-tuple to a string for use with AWS""" key = urllib.quote(str(t...
wehriam/awspider
awspider/aws/lib.py
Python
mit
1,539
# -*- 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-essential-contacts
samples/generated_samples/essentialcontacts_v1_generated_essential_contacts_service_create_contact_async.py
Python
apache-2.0
1,560
from __future__ import unicode_literals import json import re import os import jinja2 from nipype.utils.filemanip import loadcrash from pkg_resources import resource_filename as pkgrf class Element(object): def __init__(self, name, file_pattern, title, description): self.name = name self.file_pa...
chrisfilo/fmriprep
fmriprep/viz/reports.py
Python
bsd-3-clause
8,063
from django.db import models from django.conf import settings from django.contrib.auth.models import AbstractUser, UserManager class Server (models.Model): name = models.CharField(max_length=30) url = models.URLField() def __str__ (self): return self.name class Meta: db_table = 'serv...
AHAPX/dimib
dimib/models.py
Python
gpl-3.0
1,512
from __future__ import unicode_literals from cms.models import CMSPlugin from cms.models.fields import PageField from django.db import models from django.utils.six import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from filer.fields.folder import FilerFolderField from filer.mode...
django-de/django-de-v4
djangode/schedule/models.py
Python
mit
1,484
# 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 ...
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2015_06_15/operations/routes_operations.py
Python
mit
17,924
""" Module for abstract base class Capability Essentially adaptor to give nengo objects interfaces with functionality we require (related to observable data they support). Capability represents observable data that a given object in a nengo model has to offer. The capability defines how to connect an observer node to...
chairmanmeow50/Brainspawn
brainspawn/simulator/capabilities/capability.py
Python
bsd-3-clause
2,188
from django.contrib import admin from responseTemplates.models import ResponseTemplate, Paragraph class ParagraphInline(admin.StackedInline): model = Paragraph extra = 1 class ResponseTemplateAdmin(admin.ModelAdmin): inlines = [ParagraphInline] admin.site.register(ResponseTemplate, ResponseTemplateAd...
wispwisp/supportNotebook
responseTemplates/admin.py
Python
mit
325
#!/bin/python3 # Integers Come In All Sizes # https://www.hackerrank.com/challenges/python-integers-come-in-all-sizes/problem if __name__ == '__main__': a, b, c, d = int(input()), int(input()), int(input()), int(input()) print((a ** b) + (c ** d))
neiesc/Problem-solving
HackerRank/Python/Math/python-integers-come-in-all-sizes.py
Python
mit
257
""" Run some experiments using SyntheticDataset1 """ import os import sys import errno import logging import numpy import argparse from apgl.graph import * from exp.recommendexp.RecommendExpHelper import RecommendExpHelper from exp.recommendexp.SyntheticDataset1 import SyntheticDataset1 #if __debug__: # raise ...
charanpald/wallhack
wallhack/recommendexp/SyntheticExp.py
Python
gpl-3.0
2,304
import StringIO from fabric.api import run, sudo, cd, put, env, settings, hide from fabric.context_managers import shell_env from fabric.contrib.files import append, exists from shuttle.services.postgis import * from shuttle.services.service import Service from shuttle.hooks import hook from shuttle.shared import ( ...
mvx24/fabric-shuttle
shuttle/services/postgres.py
Python
mit
6,149
from __future__ import print_function import sys import time import argparse from time import sleep from distutils.version import LooseVersion from typing import Any from Tests.scripts.utils import logging_wrapper as logging import urllib3 import demisto_client.demisto_api from Tests.scripts.utils.log_util import ins...
VirusTotal/content
Tests/private_build/run_content_tests_private.py
Python
mit
19,711
import sys import hashlib from pyftpdlib.authorizers import AuthenticationFailed class Authorizer: def __init__(self, username, password, directory, permission=None): self.username = username self.password = password self.directory = directory self.permission = permission or "elrad...
tokibito/soloftpd
soloftpd/authorizers.py
Python
mit
1,493
""" WSGI config for bookmarklets project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATI...
assertnotnull/bookmarklets
bookmarklets/bookmarklets/wsgi.py
Python
mit
1,572
#!/usr/bin/python from base import Persistence class ErrorI18n(Persistence): pass
tLDP/lampadas
pylib/persistence/error_i18n.py
Python
gpl-2.0
89
#!/usr/bin/env python # -*- encoding: utf-8 -*- from datetime import datetime from scrapy import log from scrapy.exceptions import DropItem from scrapy.item import Item, Field from webbot.utils import utils, dateparser import pprint import re import traceback # 字段映射(mapping) def item2post(item): post = {} f...
vimagick/webbot
webbot/pipelines.py
Python
gpl-3.0
6,947
# pylint: disable=missing-docstring from pathlib import Path from textwrap import dedent from beancount.loader import load_file from beancount.loader import load_string from fava.plugins.link_documents import DocumentError def test_plugins(tmp_path: Path) -> None: # Create sample files expenses_foo = tmp_pa...
aumayr/beancount-web
tests/test_plugins_link_documents.py
Python
mit
3,350
#!/usr/bin/env python ### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2009, James McCoy # 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...
jeffmahoney/supybot
setup.py
Python
bsd-3-clause
4,830
#!/bin/env python # Copyright 2019 Arm Limited. # SPDX-License-Identifier: Apache-2.0 # # 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 # # U...
ARM-software/bob-build
tests/implicit_outs/generate.py
Python
apache-2.0
1,819
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function """ This module implements a friendly (well, friendlier) interface between the raw JSON responses from JIRA and the Resource/dict abstractions provided by this library. Users will construct a JIRA ob...
m42e/jira
jira/client.py
Python
bsd-2-clause
107,593
from datetime import date from bs4 import BeautifulSoup from django.template import Context, Template from freezegun import freeze_time from ws import enums, models from ws.tests import TestCase, factories class TripTagsTest(TestCase): @freeze_time("Jan 11 2019 20:30:00 EST") def test_simple_trip_list(self)...
DavidCain/mitoc-trips
ws/tests/templatetags/test_trip_tags.py
Python
gpl-3.0
5,738
#!/usr/bin/python import os drc_base_path = os.getenv("DRC_BASE") import sys sys.path.append(os.path.join(drc_base_path, "software", "models", "model_transformation")) import convertCollada import mitUrdfUtils as mit import copy from jointNameMap import jointNameMap from lxml import etree...
openhumanoids/oh-distro
software/models/atlas_v5/mit_modifications/atlas_skeleton_v5.py
Python
bsd-3-clause
7,241
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
petewarden/tensorflow
tensorflow/python/keras/applications/vgg19.py
Python
apache-2.0
9,934
__all__ = ["Decoder"] import struct from array import array import pyconspack.header as H import pyconspack.types as T import pyconspack.error as E import pyconspack.index as I class ForwardRef: def __init__(self, tag): self.tag = tag def set(self, place, index = None, is_key = False): self....
conspack/pyconspack
decode.py
Python
bsd-2-clause
8,451
"""Backends for Browser based Authentication """ import time from functools import wraps from pulsar.api import ( Http401, PermissionDenied, Http404, HttpRedirect, BadRequest ) from pulsar.apps.wsgi import Route from lux.utils.date import to_timestamp, date_from_now, iso8601 from lux.utils.context import app_attr...
quantmind/lux
lux/ext/sessions/browser.py
Python
bsd-3-clause
5,814
# Copyright 2016 Hewlett Packard Enterprise Development Company LP. # Copyright 2017 IBM Corp # 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...
SauloAislan/ironic
ironic/common/cinder.py
Python
apache-2.0
18,721
# Copyright 2020 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import _, api, models from odoo.exceptions import ValidationError class StockLocation(models.Model): _inherit = "stock.location" @api.constrains("active") def _check_active_stock_a...
OCA/stock-logistics-warehouse
stock_archive_constraint/models/stock_location.py
Python
agpl-3.0
2,452
from django import VERSION from django.conf import settings from django.core.exceptions import ImproperlyConfigured def import_from_settings(attr, *args): """ Load an attribute from the django settings. :raises: ImproperlyConfigured """ try: if args: return getattr(set...
cloudera/hue
desktop/core/ext-py/mozilla-django-oidc-1.0.0/mozilla_django_oidc/utils.py
Python
apache-2.0
1,174
#!/usr/bin/env python3 # Copyright (c) 2017 Intel Corporation. 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 r...
minggangw/rclnodejs-1
test/py/service.py
Python
apache-2.0
1,255
SECRET_KEY = 'SEKRIT' INSTALLED_APPS = ('combocache', 'tests',) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': './test.db', } }
hzdg/django-combocache
tests/settings.py
Python
mit
182
""" """ from __future__ import absolute_import from ..unitquantity import UnitQuantity from .mass import gram, kg, ounce, lb from .length import cm, m, ft from .time import s from .acceleration import g_0 N = newton = UnitQuantity( 'newton', kg*m/s**2, symbol='N', aliases=['newtons'] ) dyne = UnitQua...
AdaptiveApplications/carnegie
tarc_bus_locator_client/quantities-0.10.1/quantities/units/force.py
Python
mit
1,292
# -*- coding:utf8 -*- from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.statsgov.items import StatsGovItemLoader, StatsGovItem from scrapy.http.request import Request class StatsgovSpider(BaseSpider): name = "statsgov" allowed_domains = ["statsgov.org"] start_...
535521469/crawler_sth
scrapy/statsgov/spiders/statsgov_spider.py
Python
bsd-3-clause
1,553
# app/mod_user/__init__.py
cisko3000/flask-inventory
app/mod_user/__init__.py
Python
mit
27
import time import os import re import logging from autotest.client.shared import error from virttest import utils_misc from virttest import utils_test from virttest import env_process from virttest import data_dir from autotest.client import utils @error.context_aware def run(test, params, env): """ KVM whql...
uni-peter-zheng/tp-qemu
generic/tests/whql_env_setup.py
Python
gpl-2.0
7,490
from django import template from greyjay.jobs.models import JobPostingListPage, JobPostingPage register = template.Library() @register.simple_tag(takes_context=True) def get_active_posting_page(context): if JobPostingPage.objects.live().count() == 0: return None listing_page = JobPostingListPage.ob...
CIGIHub/greyjay
greyjay/jobs/templatetags/jobs_tags.py
Python
mit
365
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
deepmind/dm_env_rpc
dm_env_rpc/v1/dm_env_utils_test.py
Python
apache-2.0
8,223
from __future__ import absolute_import, print_function, division __author__ = 'Alistair Miles <alimanfoo@googlemail.com>'
rs/petl
src/petl/test/transform/__init__.py
Python
mit
124
from relier.web.views import AuthenticatedView from relier.models import Invitation from flask import g, render_template, abort, request class Invitations(AuthenticatedView): def get(self): if not g.user.is_admin: abort(403) invitations = Invitation.select().where(Invitation.organiza...
citruspi/relier-api
relier/web/views/invitations.py
Python
unlicense
1,056
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
50thomatoes50/blender.io_mqo
io_scene_mqo/__init__.py
Python
gpl-2.0
8,539
# noinspection PyProtectedMember from podcast_transcribe_episode.bcp47_lang import _country_tld_from_url, iso_639_1_code_to_bcp_47_identifier def test_country_tld_from_url(): assert _country_tld_from_url("https://www.bbc.co.uk/news/politics/eu-regions/vote2014_sitemap.xml") == "uk" def test_iso_639_1_code_to_bc...
berkmancenter/mediacloud
apps/podcast-transcribe-episode/tests/python/test_bcp47_lang.py
Python
agpl-3.0
732
#!/usr/bin/python # -*- coding: UTF-8 -*- # convert ctp to pyctp def structmember(bodycode): import re ret = [] iterater = re.finditer(r"[\n^]\s*(?P<type>[a-zA-Z][ \w]*[\s\*])(?P<name>[a-zA-Z]\w*)([ \t]*\[[ \t]*(?P<length>\d+)[ \t]*\])?\s*;", bodycode) for i in iterater: d = i.groupdict() ret...
shizhuolin/PyCTP
APIToPyCTP.py
Python
lgpl-3.0
11,679
# Copyright 2013 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. """Finds android browsers that can be controlled by telemetry.""" import logging import os from telemetry import decorators from telemetry.core import brow...
Jonekee/chromium.src
tools/telemetry/telemetry/core/backends/chrome/android_browser_finder.py
Python
bsd-3-clause
7,601
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-01-04 09:38 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('uth_db', '0011_auto_20170102_1649'), ] operations ...
GeoCSBI/UTH_DB
mysite/uth_db/migrations/0012_auto_20170104_0938.py
Python
gpl-3.0
547
# # Executable template for Challenge scoring application # # To use this script, first install the Synapse Python Client # http://python-docs.synapse.org/ # # Log in once using your user name and password # import synapseclient # syn = synapseclient.Synapse() # syn.login(<username>, <password>, rememberMe=True) ...
javigx2/alsdream
src/alsdream/challenge_template.py
Python
gpl-2.0
28,520
"""ds""" from __future__ import absolute_import, print_function from socket import error __revision__ = '$Id: socketerror_import.py,v 1.2 2005-12-28 14:58:22 syt Exp $' print(error)
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/s/socketerror_import.py
Python
mit
183
# -*- coding: utf-8 -*- #Config for the synt project import os import nltk PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)) #Where collected databases and user config are stored by default SYNT_PATH = os.path.expanduser("~/.synt") USER_CONFIG_PATH = os.path.join(SYNT_PATH, 'config.py') #Emoticons may serve...
lrvick/synt
synt/config.py
Python
agpl-3.0
1,196
import sys import csv import parsers import yaml ####################################################################################### # From MCP (create_dic_class, create_dic_member, parse_all_files), just modified to death. ####################################################################################### def...
N3X15/MiddleCraft
lib/scripts/ImportMCP.py
Python
bsd-3-clause
10,116
## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS 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 (...
ppiotr/Bibedit-some-refactoring
configure-tests.py
Python
gpl-2.0
12,323
#Script for predicting a phrase as Entity or relation(predicate) #Run the script with the phrase as a parameter. import pandas as pd import numpy as np import re from collections import defaultdict from keras.engine import Input from keras.engine import Model from keras.layers import Dense, Dropout, Embedding, LSTM, Bi...
AskNowQA/EARL
scripts/ER_predictor/predict_phrase.py
Python
gpl-3.0
3,993
from __future__ import unicode_literals # import datetime import difflib import itertools import json import math import os import time import datetime from pokemongo_bot import inventory from pokemongo_bot.base_dir import _base_dir from pokemongo_bot.base_task import BaseTask from pokemongo_bot.human_behaviour impor...
Gobberwart/PokemonGo-Bot
pokemongo_bot/cell_workers/pokemon_optimizer.py
Python
mit
50,727
import os import pickle import pandas import logging from indra.databases import hgnc_client from indra.statements import Phosphorylation, Agent, Evidence from indra.preassembler import Preassembler from indra.ontology.bio import bio_ontology from indra.preassembler.grounding_mapper import default_mapper from indra.pre...
johnbachman/indra
indra/benchmarks/phosphorylations/__init__.py
Python
bsd-2-clause
8,646
{ 'name': "POS debranding", 'version': '1.0.0', 'author': 'IT-Projects LLC, Ivan Yelizariev', 'license': 'GPL-3', 'category': 'Debranding', 'website': 'https://twitter.com/yelizariev', 'depends': ['point_of_sale'], 'price': 30.00, 'currency': 'EUR', 'data': [ 'views.xml',...
bmya/pos-addons
pos_debranding/__openerp__.py
Python
lgpl-3.0
425
#!/usr/bin/env python # Mass Static Analysis import tornado.httpclient import os import urllib2 import argparse import mimetypes import re import json import hashlib import urllib from threading import Thread def HTTP_GET_Request(url): response = None http_client = tornado.httpclient.HTTPClient() try: ...
h4ng3r/YSO-Mobile-Security-Framework
mass_static_analysis.py
Python
gpl-3.0
5,413
#!/usr/bin/env python # # Author: helour # Copyright: 2013-2015 helour # Based on the cr33dog's script Export Layers as PNG (http://registry.gimp.org/node/18440) # Modified by: jmunsch (11-25-2015) # License: GPL v3+ # # Version: 0.7 # # GIMP plugin to export layers as a multiple pages PDF file # # # Note for Windows u...
jmunsch/gimp_export_layers_to_pdf
export-layers-to-pdf.py
Python
gpl-3.0
6,324
from share1 import ShareAnalysis1 from share1_dot_1 import ShareAnalysis1Dot1 from share2 import ShareAnalysis2 from share3 import ShareAnalysis3 from share_matrix import ShareMatrix class ShareAnalysisFactory(object): def __init__(self, share_name): self.share_name = share_name def new_share_analy...
lcameron05/PCWG
pcwg/share/share_factory.py
Python
mit
780
from setuptools import setup, find_packages setup(name='BIOMD0000000275', version=20140916, description='BIOMD0000000275 from BioModels', url='http://www.ebi.ac.uk/biomodels-main/BIOMD0000000275', maintainer='Stanley Gu', maintainer_url='stanleygu@gmail.com', packages=find_packages(...
biomodels/BIOMD0000000275
setup.py
Python
cc0-1.0
377
#!/usr/bin/python # Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for the namespaces.py module.""" from __future__ import print_function import errno import os import sys import unittest ...
mxOBS/deb-pkg_trusty_chromium-browser
third_party/chromite/lib/namespaces_unittest.py
Python
bsd-3-clause
1,522
# Module to run tests on ampsec definition from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import pytest import os import numpy as np from pypeit.core import pixels from pypeit.core import procimg from pypeit.spectro...
PYPIT/PYPIT
pypeit/tests/test_datasec.py
Python
gpl-3.0
1,269
from staticfiles.settings import StaticfilesSettings settings = StaticfilesSettings("STATICFILES")
zodman/django-staticfiles
staticfiles/conf.py
Python
bsd-3-clause
100
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
BTA-BATA/electrum-bta-master
gui/qt/version_getter.py
Python
gpl-3.0
4,574
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
ivano666/tensorflow
tensorflow/models/rnn/__init__.py
Python
apache-2.0
839
from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User, Group from optparse import make_option from sys import stdout from csv import writer FORMATS = [ 'address', 'emails', 'google', 'outlook', 'linkedin', 'vcard', ] def full_name(first_...
fusionbox/django-extensions
django_extensions/management/commands/export_emails.py
Python
mit
5,084
# pylint: disable=missing-docstring, too-few-public-methods # pylint: disable=too-many-ancestors, no-absolute-import, import-error, multiple-imports,wrong-import-position from __future__ import print_function import socket, binascii, abc, six class MyException(object): """Custom 'exception'.""" class MySecondExc...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/test/functional/invalid_exceptions_caught.py
Python
apache-2.0
2,380
#!/usr/bin/env python # -*- coding: iso-8859-15 -*- """ Raspymc is a multimedia centre exposed via a http server built with bottlepy Copyright (C) 2013 Giancarlo Fringuello This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
GiancarloF/raspymc_server
core/conf_manager.py
Python
gpl-3.0
4,528
import pandas as pd import json import os from lda_pipeline import Ranker from top_words import top_words_by_key def task_1(lda_model, topic_df,args): ''' Get a list of the n most important words :param lda_model: Scikit pipeline that vectorizes and does lda :param topic_df: A dataframe of documents/t...
talolard/Interview
tasks.py
Python
gpl-3.0
2,431
# 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/. import datetime import os import socorro from nose.plugins.attrib import attr from nose.tools import eq_ from socorro.e...
cliqz/socorro
socorro/unittest/external/postgresql/test_server_status.py
Python
mpl-2.0
6,873
from django.conf import settings from django.test.simple import run_tests as django_test_runner def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=None, **kwargs): """ Test runner that only runs tests for the apps listed in ``settings.TEST_APPS``. """ extra_tests = extra_tes...
kumar303/rockit
vendor-local/djcelery/tests/runners.py
Python
bsd-3-clause
751
# orm/interfaces.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Contains various base classes used throughout the ORM. Defines the now depreca...
Drvanon/Game
venv/lib/python3.3/site-packages/sqlalchemy/orm/interfaces.py
Python
apache-2.0
28,514
import random import numpy as np import pandas as pd import pdb import django_standalone from gui.models import Vectors, Experiment, Results, FullResults, Expansions, Clusters from matplotlib import pylab as plt import seaborn as sns from gui.output_utils import get_cv_scores_many_experiment from gui.user_code import ...
mbatchkarov/ExpLosion
notebooks/common_imports.py
Python
bsd-3-clause
13,446
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 from __future__ import division, with_statement import re import os import shutil from glob import glob import subprocess from urllib import quote import ox from ox.django.fields import TupleField from django.conf import settings from django.db import models, transac...
maysara/pandora_image
pandora/edit/models.py
Python
gpl-3.0
14,651
from starlette.datastructures import URL from starlette.responses import RedirectResponse from starlette.types import ASGIApp, Receive, Scope, Send class HTTPSRedirectMiddleware: def __init__(self, app: ASGIApp) -> None: self.app = app async def __call__(self, scope: Scope, receive: Receive, send: Se...
encode/starlette
starlette/middleware/httpsredirect.py
Python
bsd-3-clause
848
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/dns/dnsaction64.py
Python
apache-2.0
10,595