code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
KhronosGroup/COLLADA-CTS
StandardDataSets/1_5/collada/library_kinematics_model/kinematics_model/technique_common/joint/revolute/revolute/revolute.py
Python
mit
4,499
# -*- coding: utf-8 -*- # # This file is part of JSONAlchemy. # Copyright (C) 2014, 2015 CERN. # # JSONAlchemy 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 opt...
hachreak/jsonalchemy
jsonalchemy/jsonext/parsers/parse_first_parser.py
Python
gpl-2.0
1,970
# # 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 us...
jasonkuster/beam
sdks/python/apache_beam/transforms/display.py
Python
apache-2.0
10,948
# Copyright 2007-2012 University Of Southern California # # 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 ...
elainenaomi/sciwonc-dataflow-examples
sbbd2016/experiments/1-postgres/3_workflow_full_10files_primary_nosh_nors_annot_with_proj_3s/pegasus.bDkvI/pegasus-4.6.0/lib/python2.7/dist-packages/Pegasus/service/dashboard/dashboard.py
Python
gpl-3.0
20,107
import numpy as np from codim1.fast_lib import single_integral, ConstantBasis, InteriorPoint from codim1.core.quad_strategy import single_integral_wrapper def interior_pt(mesh, pt_normal, kernel, basis_grabber = lambda e: e.soln, integrator = InteriorPoint, override_qs = None): """ Calc...
tbenthompson/codim1
codim1/assembly/interior_point.py
Python
mit
852
from __future__ import absolute_import, unicode_literals import unittest from distutils.version import StrictVersion from mopidy import __version__ class VersionTest(unittest.TestCase): def assertVersionLess(self, first, second): # noqa: N802 self.assertLess(StrictVersion(first), StrictVersion(second)...
rawdlite/mopidy
tests/test_version.py
Python
apache-2.0
3,001
#!/usr/bin/env python3 from sfmutils.api_client import ApiClient import argparse import logging import sys log = logging.getLogger(__name__) def main(sys_argv): # Arguments parser = argparse.ArgumentParser(description="Return WARC filepaths for passing to other commandlines.") parser.add_argument("--har...
gwu-libraries/sfm-utils
sfmutils/find_warcs.py
Python
mit
3,455
"""Cpuset class and cpuset graph, importing module will create model """ from __future__ import unicode_literals from __future__ import print_function from future.utils import lrange import io from builtins import str from builtins import object __copyright__ = """ Copyright (C) 2007-2010 Novell Inc. Copyright (C) 201...
lpechacek/cpuset
cpuset/cset.py
Python
gpl-2.0
19,462
import json from os.path import join, dirname from watson_developer_cloud import SpeechToTextV1 speech_to_text = SpeechToTextV1( username="5e08ce2c-705b-4dec-a2ec-90549582a835", password="Gkek4uUEhPn7", x_watson_learning_opt_out=False ) print(json.dumps(speech_to_text.models(), indent=2))
adam2392/paremap
paremap_nih_rotation/notebooks/bluemix/speech_to_text.py
Python
mit
294
""" Django settings for lwc project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
OscarBastardo/launch-with-code
lwc/settings.py
Python
gpl-2.0
2,107
# coding: utf-8 from django.conf.urls.defaults import * import views urlpatterns = patterns('', (r'^view/$', views.normal_view), (r'^not_found/$', views.not_found), (r'^error/$', views.server_error), (r'^null_view/$', views.null_view), (r'^permission_denied/$', views.permission_denied), )
faun/django_test
tests/regressiontests/middleware_exceptions/urls.py
Python
bsd-3-clause
312
from setuptools import setup, find_packages from os.path import join, dirname # parse_requirements() returns generator of pip.req.InstallRequirement objects def parse_requirements(filename): """ load requirements from a pip requirements file """ lineiter = (line.strip() for line in open(filename)) return ...
EvgeniyBlinov/estimate
setup.py
Python
mit
724
# -*- coding: utf-8 -*- # # kiknetAPI documentation build configuration file, created by # sphinx-quickstart on Wed Jun 26 18:54:28 2013. # # 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. # # A...
shreyshahi/kiknetAPI
docs/conf.py
Python
mit
8,343
from .symbol_mapping import ( SYMBOL ) from .display import ( SevenSegmentDisplay ) from .message import ( Message, TimedMessage )
lhess/rpi-gpio-7segment-display
seven_seg/__init__.py
Python
unlicense
149
# Copyright 2019 Akretion - Renato Lima <renato.lima@akretion.com.br> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from datetime import timedelta from odoo import fields from odoo.exceptions import ValidationError from odoo.tests import common from odoo.tools.misc import format_date from ..tools ...
OCA/l10n-brazil
l10n_br_fiscal/tests/test_certificate.py
Python
agpl-3.0
4,074
files = [ "addsb_11_0_293aa5f110d040c2.ngc", "addsb_11_0_293aa5f110d040c2.vhd", "addsb_11_0_3537d66a2361cd1e.ngc", "addsb_11_0_3537d66a2361cd1e.vhd", "addsb_11_0_44053abf11139d96.ngc", "addsb_11_0_44053abf11139d96.vhd", "cc_cmplr_v3_0_964aa42461b15ac2.ngc", "cc_cmplr_v3_0_964aa42461b15ac2.vhd", "cc_cmplr_v3_0_e58a4eb9f...
lerwys/GitTest
hdl/modules/position_calc/generated/artix7/Manifest.py
Python
lgpl-3.0
1,092
#!/usr/bin/env python2 from flask import Flask, render_template, request from flask_bootstrap import Bootstrap import sys sys.path.append("../lib") from madras import MADRASClient # Needed because of unicode strings import locale locale.setlocale(locale.LC_ALL, '') # Uses flask-bootstrap: # https://pythonhosted.org/...
liamfraser/MADRAS
frontends/web/madras-web.py
Python
gpl-3.0
2,292
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 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/LICE...
DirectXMan12/nova-hacking
nova/tests/virt/xenapi/test_volumeops.py
Python
apache-2.0
8,113
import json import logging import os from hpfeeds.broker.server import ServerException from hpfeeds.broker.utils.inotify import start_watching # An authenticator where the data is backed by JSON: # { # "bob": { # "owner": "bob", # "secret": "secret", # "pubchans": ["chan1"], # "subchans": ["cha...
rep/hpfeeds
hpfeeds/broker/auth/json.py
Python
gpl-3.0
2,380
#!/usr/bin/env python # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
googleads/googleads-python-lib
examples/adwords/v201809/advanced_operations/create_and_attach_shared_keyword_set.py
Python
apache-2.0
3,790
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="heatmapgl.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent...
plotly/python-api
packages/python/plotly/plotly/validators/heatmapgl/hoverlabel/font/_sizesrc.py
Python
mit
470
__author__ = 'jerrico'
jameserrico/phishnetpy
tests/__init__.py
Python
mit
24
# # Copyright 2016 The BigDL 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 ...
intel-analytics/BigDL
python/orca/test/bigdl/orca/data/test_spark_backend.py
Python
apache-2.0
9,923
from django.conf.urls import patterns, include, url from django.contrib import admin from calculator.views import RegistrationView urlpatterns = patterns('', # Examples: # url(r'^$', 'CompostCalculator.views.home', name='home'), url(r'^calculator/', include('calculator.urls')), url(r'^admin/', include...
lnhubbell/CompostCalculator
CompostCalculator/CompostCalculator/urls.py
Python
mit
585
import json import os from decimal import Decimal from unittest import TestCase from nba_data.data.team import Team from nba_data.deserializers.box_scores.advanced import AdvancedTeamBoxScoresDeserializer from tests.config import ROOT_DIRECTORY class TestAdvancedBoxScoreTeamStatsDeserializer(TestCase): def test_...
jaebradley/nba_data
tests/test_advancedTeamBoxScoreTeamStatsDeserializer.py
Python
mit
1,991
from flask import render_template, abort, request from . import bookmarks from ..models import Bookmark from ..helpers import Pagination PER_PAGE = 20 @bookmarks.route('/', defaults={'page': 1}) @bookmarks.route('/page/<int:page>') def index(page): tag = request.args.get('tag') if tag: count = Bookma...
jhh/puka-server-flask
puka/bookmarks/views.py
Python
apache-2.0
755
# Reaktoro is a unified framework for modeling chemically reactive systems. # # Copyright (C) 2014-2018 Allan Leal # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 o...
Reaktoro/Reaktoro
demos/python/demo-equilibrium-fixed-ph-hcl-naoh.py
Python
gpl-3.0
1,169
#!/usr/bin/env python3 # # Postprocess a junit results xml file and reformat the failure and exception # messages for usage in vim # # The script takes a logfile, a folder containing *.xml files as arguments # or can get piped the output of another program as input. # # ** Settings ** # # In vim, set makeprg and errorf...
DirkR/junitlog2vim
junitlog2vim.py
Python
mit
3,905
import _plotly_utils.basevalidators class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="streamtube.colorbar", **kwargs ): super(ShowtickprefixValidator, self).__init__( plotly_name=plotly_na...
plotly/python-api
packages/python/plotly/plotly/validators/streamtube/colorbar/_showtickprefix.py
Python
mit
573
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
tensorflow/agents
tf_agents/bandits/environments/dataset_utilities_test.py
Python
apache-2.0
1,638
# 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...
RapidApplicationDevelopment/tensorflow
tensorflow/python/ops/io_ops.py
Python
apache-2.0
15,301
"""Too complicated to do this right.""" import sys from pandas.io.sql import read_sql from pyiem.util import get_dbconn, logger LOG = logger() def main(argv): """Run for a scenario.""" scenario = int(argv[1]) myhucs = [s.strip() for s in open("myhucs.txt")] # Get df of flowpaths pgconn = get_dbc...
akrherz/idep
scripts/tillage_timing/copy_flowpaths.py
Python
mit
1,802
# encoding: utf-8 import datetime __all__ = [ 'info', ] def info(): return { 'birthday': datetime.date(1992, 2, 10), 'class': 3, 'family_name_en': u'nakagawa', 'family_name_kana': u'なかがわ', 'first_name_en': u'haruka', 'first_name_kana'...
moriyoshi/pyakb48
akb48/member/nakagawa_haruka.py
Python
mit
655
""" WSGI config for Fabric_PyPOA14 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Fabric_PyPOA14.settings") from...
voliveirajr/Fabric_PyPOA14
Fabric_PyPOA14/wsgi.py
Python
gpl-3.0
403
""" Ax_Metrics - MQL Metrics Query Language Parser ------------------------------------------------------------------------------ Author: Dan Kamins <dos at axonchisel dot net> Copyright (c) 2014 Dan Kamins, AxonChisel.net """ # ---------------------------------------------------------------------------- import co...
axonchisel/ax_metrics
py/axonchisel/metrics/foundation/query/mql.py
Python
mit
11,429
""" Commerce API v0 view tests. """ import itertools import json from datetime import datetime, timedelta from unittest import mock from uuid import uuid4 import ddt import pytz from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from django.urls import r...
edx/edx-platform
lms/djangoapps/commerce/api/v0/tests/test_views.py
Python
agpl-3.0
12,266
from __future__ import annotations from django.core.management import call_command from django.test import TestCase, TransactionTestCase from django_mysql.checks import check_variables from django_mysql.test.utils import override_mysql_variables from tests.testapp.utils import skip_if_django_3_1_plus, skip_if_django_...
adamchainz/django-mysql
tests/testapp/test_checks.py
Python
mit
2,757
# -*- coding: utf-8 -*- """ Selected Filters ================ Some selected filters of data (e.g. European countries, Czech rivers). """ import collections from datetime import timedelta from . import tools _cache = {} def place_type(data, type_id): """Filters data by any given place type. :param data...
paveldedik/thesis
models/filters.py
Python
mit
6,398
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Bit...
high5coin/high5coin
contrib/spendfrom/spendfrom.py
Python
mit
10,053
file_handler = open('tests/_data/archive-file.zip', 'rb') scenarios = [ { "url": "/key/current", "method": "get", "status_code": 200, "json": {"api_key": "111", "auth_level": 500, "auth_level_name": "elevated"}, "headers": { "content-type": "application/json", ...
PayloadSecurity/VxAPI
tests/_requests_scenarios/report/report_demo_bulk.py
Python
gpl-3.0
1,354
from django.shortcuts import render __all__ = ['inform','confirm'] def inform(request,message,title=None,next_url=None,template='bolts/inform.html'): next_url = next_url or request.get_full_path() ctx = {'message':message,'title':title,'next_url':next_url} return render(request,template,ctx)...
vivek2010/django_bolts
django_bolts/views/utils.py
Python
mit
914
#!/usr/bin/python # # FROM pykeylogger-1.2.1 !! # # pyxhook -- an extension to emulate some of the PyHook library on linux. # # Copyright (C) 2008 Tim Alexander <dragonfyre13@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
idnael/ctxsearch
ctxsearch/old/old_pyxhook.py
Python
gpl-2.0
15,876
from contextional import GCM with GCM("A") as A: @GCM.add_setup def setUp(): pass @GCM.add_teardown def tearDown(): pass with GCM.add_group("B"): @GCM.add_setup def setUp(): pass @GCM.add_test("some test") def test(case): ...
SalmonMode/contextional
contextional/test_resources/verbose_fixtures.py
Python
mit
7,418
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014 Jan-Philip Gehrcke (http://gehrcke.de). # See LICENSE file for details. """beautiful-readme. """ from __future__ import unicode_literals import os import re import sys import shutil import urllib import logging import argparse from collections import ...
jgehrcke/beautiful-readme
beautifulreadme/beautifulreadme.py
Python
mit
13,592
#!/usr/bin/python # #Copyright (c) 2009-2010 Francesco Romani <fromani at gmail dot com> # #This software is provided 'as-is', without any express or implied #warranty. In no event will the authors be held liable for any damages #arising from the use of this software. # #Permission is granted to anyone to use this sof...
BackupTheBerlios/tcforge
testsuite/test_tcinterface.py
Python
gpl-2.0
2,773
# Copyright (C) 2010-2011 Richard Lincoln # # 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 # rights to use, copy, modify, merge, publish...
rwl/PyCIM
CIM14/ENTSOE/Dynamics/IEC61970/Core/CorePSRType.py
Python
mit
2,441
from vsg.rules import token_indent_between_tokens from vsg import token lTokens = [] lTokens.append(token.interface_constant_declaration.constant_keyword) lTokens.append(token.interface_signal_declaration.signal_keyword) lTokens.append(token.interface_variable_declaration.variable_keyword) lTokens.append(token.inter...
jeremiah-c-leary/vhdl-style-guide
vsg/rules/procedure/rule_004.py
Python
gpl-3.0
1,629
#!/usr/bin/env python # vim: sw=4:ts=4:sts=4:fdm=indent:fdl=0: # -*- coding: UTF8 -*- # # Player functions # Copyright (C) 2012 Josiah Gordon <josiahg@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Sof...
zepto/musio
musio/player_util.py
Python
gpl-3.0
26,917
# -*- coding: utf8 -*- from .. import TestCase, Mock from eventize.events import Handler, Event from eventize.typing import modifier class EventHandlerTest(TestCase): def test_a_Handler_is_callable(self): handler = self.new_handler() self.assertTrue(callable(handler)) def test_a_Handler_is_a_...
apieum/eventize
eventize/tests/events/testHandler.py
Python
lgpl-3.0
7,205
from app import db from sqlalchemy import Column from sqlalchemy import DateTime, func FALSE = 0 TRUE = 1 class User(db.Model): __tablename__ = 'user' id = db.Column(db.Integer, primary_key = True) name = db.Column(db.String(65)) email = db.Column(db.String(120), unique = True) tasks = db.relation...
vianuevm/Spitlist
app/models.py
Python
gpl-2.0
1,636
# -*- coding: utf-8 -*- ''' diacamma.invoice view package @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
Diacamma2/financial
diacamma/invoice/views.py
Python
gpl-3.0
56,088
#!/usr/bin/env python # Jonas Schnelli, 2013 # make sure the TakeiCoin-Qt.app contains the right plist (including the right version) # fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267) from string import Template from datetime import date bitcoinDir = "./"; i...
takeicoin/takeicoin
share/qt/clean_mac_info_plist.py
Python
mit
898
# -*- coding: utf-8 -*- # # Debian Changes Bot # Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the...
xtaran/debian-devel-changes-bot
DebianDevelChangesBot/mailparsers/bug_closed.py
Python
agpl-3.0
2,006
class Event(object): def __init__(self, action, timeBound): self.action = action self.timeBound = timeBound def occur(self, current): if self.timeBound.getValue() == current: result = self.action.do() return result def reset(self): self.timeBound.res...
SESoS/SIMSoS
src/new main/Integrated/prototype/Event.py
Python
mit
324
import sys if sys.version_info[0:2] < (2, 7) or \ sys.version_info[0:2] in ( (3, 0), (3, 1) ): try: import unittest2 as unittest except ImportError: import unittest else: import unittest from pysmi.parser.smi import parserFactory from pysmi.codegen.pysnmp import PySnmpCodeGen from pysmi.c...
shreesundara/netsnmp
tests/test_valuedeclaration_smiv2_pysnmp.py
Python
bsd-2-clause
2,547
# Copyright 2013 Regionbibliotek Halland # # This file is part of Digitala skyltar. # # Digitala skyltar 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...
regionbibliotekhalland/digitalaskyltar
selector.py
Python
gpl-3.0
3,611
__author__ = 'AeroCano' import jderobot, time, threading lock = threading.Lock() class Pose3DI(jderobot.Pose3D): def __init__(self,_x,_y,_z,_h,_q0,_q1,_q2,_q3): self.x = _x self.y = _y self.z = _z self.h = _h self.q0 = _q0 self.q1 = _q1 self.q2 = _q2 ...
Diegojnb/JdeRobot
src/drivers/MAVLinkServer/MAVProxy/Pose3D.py
Python
gpl-3.0
1,096
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack LLC. # 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/...
tomasdubec/openstack-cinder
cinder/tests/api/middleware/test_faults.py
Python
apache-2.0
7,407
# Copyright 2012, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
tlakshman26/cinder-bug-fix-volume-conversion-full
cinder/scheduler/rpcapi.py
Python
apache-2.0
5,463
# -*- coding: utf-8 -*- ############################################################################### # # GetQuota # Retrieves account quota and storage availability information. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # yo...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/CloudDrive/Account/GetQuota.py
Python
apache-2.0
4,671
# 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 ...
Azure/azure-sdk-for-python
sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py
Python
mit
660
# Copyright (c) 2013 Hesky Fisher # See LICENSE.txt for details. """Stenography translation. This module handles translating streams of strokes in translations. Two classes compose this module: Translation -- A data model class that encapsulates a sequence of Stroke objects in the context of a particular dictionary....
arpadpe/plover
plover/translation.py
Python
gpl-2.0
16,264
# # 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 us...
jasonkuster/incubator-beam
sdks/python/apache_beam/io/filebasedsource.py
Python
apache-2.0
14,060
from decimal import Decimal from django.contrib.gis.db.models.fields import BaseSpatialField, GeometryField from django.contrib.gis.db.models.sql import AreaField, DistanceField from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as Distan...
Beauhurst/django
django/contrib/gis/db/models/functions.py
Python
bsd-3-clause
19,277
"""Collector base classes for the Checkmarx CxSAST product.""" from abc import ABC from typing import cast import aiohttp from base_collectors import SourceCollector from collector_utilities.type import URL, Response from model import SourceResponses class CxSASTBase(SourceCollector, ABC): # pylint: disable=abstr...
ICTU/quality-time
components/collector/src/source_collectors/cxsast/base.py
Python
apache-2.0
3,832
# # 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 n...
wangyixiaohuihui/spark2-annotation
python/pyspark/shuffle.py
Python
apache-2.0
28,525
import atexit import logging import sys import tempfile from os.path import dirname, join from shutil import rmtree from time import sleep from easyprocess import EasyProcess import pyscreenshot from genimg import generate_image from pyscreenshot.util import platform_is_osx, platform_is_win log = logging.getLogger(_...
ponty/pyscreenshot
tests/fillscreen.py
Python
bsd-2-clause
2,269
from google.appengine.ext import db from google.appengine.ext import blobstore ##################################################################### # ##################################################################### class TableComments(db.Model): date = db.DateTimeProperty(auto_now_add=True) author ...
susundberg/simasammio
simakarryt/datatables.py
Python
gpl-3.0
1,092
from django.http import HttpResponse from .util import generate_image def generate(request, size, image): data = generate_image(image, size) return HttpResponse( data.read(), content_type='image/jpeg' )
wq/django-media-thumbnailer
dmt/views.py
Python
mit
232
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'ClinicStatistic', fields ['clinic', 'statistic', '...
myvoice-nigeria/myvoice
myvoice/clinics/migrations/0020_auto__add_unique_clinicstatistic_clinic_statistic_month.py
Python
bsd-2-clause
13,258
# Copyright (C) 2015 University of Nebraska at Omaha # # This file is part of dosocs2. # # dosocs2 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 lat...
bwolatz/CSCI4900
schema.updated.py
Python
mit
14,631
import sys import gc from sparsehc_dm import sparsehc_dm import random import time import mdtraj as md import numpy import json Nk=1 if len(sys.argv)>1: Nk=int(sys.argv[1]) traj_filename='aMD-148l-first{}k.nc'.format(Nk) top_filename='aMD-148l-all_1.pdb' first_frame = md.load_frame(traj_filename, 0,top=top_filename...
Burning-Daylight/sparsehc-dm
examples/sparsehc-dm_load.py
Python
gpl-3.0
1,461
#!/usr/bin/env python # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*- # # NetProfile: Access module - Views # © Copyright 2013 Alex 'Unik' Unigovsky # # This file is part of NetProfile. # NetProfile is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public ...
nikitos/npui
netprofile_access/netprofile_access/views.py
Python
agpl-3.0
37,955
#!/usr/bin/env python3 # Copyright (C) 2020 Inria # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. """Generate the vectors table for a given STM32 CPU line.""" import os import argparse import re ...
cgundogan/RIOT
cpu/stm32/dist/irqs/gen_vectors.py
Python
lgpl-2.1
4,271
# Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. # Client ID and secret. client_id = '{your_app_client_ID}' client_secret = '{your_app_secret}' ####################################################################### # # O365-Python-Unified-...
DJO3/O365-Python-Unified-API-Connect
connect/config.py
Python
mit
1,604
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
nkhare/rockstor-core
src/rockstor/smart_manager/replication/receiver.py
Python
gpl-3.0
13,902
#!/usr/bin/env python # Copyright (c) 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. """Creates a Python telemetry page_set from the specified webpages CSV. This module does the following steps: * Downloads a ZIP fr...
Tiger66639/skia-buildbot
ct/py/create_page_set.py
Python
bsd-3-clause
5,447
#!/usr/bin/env python3 import os, re, sqlite3 from bs4 import BeautifulSoup, NavigableString, Tag import sys import os.path res_dir = sys.argv[1] doc_id = "autoconf" db = sqlite3.connect("{}/docSet.dsidx".format(res_dir)) cur = db.cursor() try: cur.execute('DROP TABLE searchIndex;') except: pass cur.execute('CREATE...
pekingduck/dash-tools
docsets/GNU_Autoconf/gen_autoconf_doc.py
Python
gpl-3.0
1,428
""" Support for Wink Shades. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/rollershutter.wink/ """ import logging from homeassistant.components.rollershutter import RollershutterDevice from homeassistant.components.wink import WinkDevice from homeassis...
devdelay/home-assistant
homeassistant/components/rollershutter/wink.py
Python
mit
2,013
from django.conf.urls.defaults import * from osp.reports import views urlpatterns = patterns('', (r'^learning-style/', views.learning_style_report, {}, 'learning-style-report'), (r'^personality-type/', views.personality_type_report, {}, 'personality-type-report'), (r'^visit/', views.visit_...
mariajosefrancolugo/osp
osp/reports/urls.py
Python
lgpl-3.0
351
from django import forms from django.forms import ModelForm from django.utils.translation import ugettext_lazy as _ from volunteers.models import EKnight, Expertise, Volunteer import datetime class Add_volunteer(ModelForm): birth_date = forms.DateField(input_formats = ['%d/%m/%Y'], required=False) class Meta: mode...
moshe742/vpms
volunteers/forms.py
Python
agpl-3.0
1,117
# Copyright 2016 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...
AndreasMadsen/tensorflow
tensorflow/contrib/copy_graph/python/util/copy_test.py
Python
apache-2.0
3,323
__all__ = ['loop'] import asyncio loop = asyncio.get_event_loop() #loop.set_debug(True)
juergenz/pie
src/pie/asyncio_loop.py
Python
mit
89
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2012,2013,2014,2015,2016,2017 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
quattor/aquilon
tests/broker/test_del_personality.py
Python
apache-2.0
4,895
""" Given an n-ary tree, return the preorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value (See examples).   Follow up: Recursive solution is trivial, could you do it iteratively?   Example 1: Input: ...
franklingu/leetcode-solutions
questions/n-ary-tree-preorder-traversal/Solution.py
Python
mit
1,229
from twilio.rest import TwilioRestClient # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "AC433e7b0bec93dc5996e4fb80b1e56eec" auth_token = "9cc9267fe09dab362d3be160f711a09d" client = TwilioRestClient(account_sid, auth_token) message = client.sms.messages.create(body="Jenny please?! I lo...
spicyramen/sipLocator
tools/testSmS.py
Python
gpl-2.0
471
"""TODO """ __author__ = "Sudipto Bhowmik, whit.com.au" __license__ = "GPL" __version__ = "1.0.0" elem_name = 'genbus' elem_primaries = ('NUMBER',) COMMON_READ_FN_KEY = 'genbus' # flags: # flag # 1 - only inservice plant buses (type 2 or 3) with at least one inservice # machine. (default) # 2 - only inservice p...
sbhowmik7/PSSEcompare
meta/genbus_outline.py
Python
gpl-3.0
1,631
# -*- coding: utf-8 -*- # Copyright(C) 2016 Edouard Lambert # # This file is part of a weboob module. # # This weboob module 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 3 of the...
laurentb/weboob
modules/spirica/test.py
Python
lgpl-3.0
947
""" Preoricess a raw json dataset into hdf5/json files. Caption: Use NLTK or split function to get tokens. """ from random import shuffle, seed import sys import os.path import argparse import numpy as np import scipy.io import pdb import h5py from nltk.tokenize import word_tokenize import json import re import math ...
ashkamath/VQA
preprocess/prepro_cocoqa.py
Python
mit
9,170
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2017 Rodrigo Ramírez Norambuena <a@rodrigoramirez.com> # from __future__ import absolute_import import six.moves.configparser import os from distutils.util import strtobool from .convert import convert_time_when_param class NotConfigFileQPanel(BaseException): ''' ...
skazancev/qpanel
qpanel/config.py
Python
mit
4,996
""" Implement a hash table with arrays. """ class Dictionary: """ A hash table is an array of arrays. The outer array's index refers to the "hashed" index generated from a given key. Two different keys could potentially hash to the same index. To handle this collision, the inner array is used. As l...
JDFagan/InterviewInPython
questions/dictionary.py
Python
mit
1,877
import socket,struct,sys,time Port=2222 #assume a socket disconnect (data returned is empty string) means all data was #done being sent. def recv_basic(the_socket): total_data=[] while True: data = the_socket.recv(8192) if not data: break total_data.append(data) return ''.join(tot...
ActiveState/code
recipes/Python/408859_socketrecv__three_ways_turn_it/recipe-408859.py
Python
mit
3,612
from __future__ import absolute_import import numpy as np import os import shutil import tempfile import matplotlib matplotlib.use('Agg', warn=False) from matplotlib.pyplot import Artist, savefig, clf, cm from matplotlib.testing.noseclasses import ImageComparisonFailure from matplotlib.testing.compare import compare_...
perrygeo/geopandas
tests/test_plotting.py
Python
bsd-3-clause
4,605
""" Selective Kernel Networks (ResNet base) Paper: Selective Kernel Networks (https://arxiv.org/abs/1903.06586) This was inspired by reading 'Compounding the Performance Improvements...' (https://arxiv.org/abs/2001.06268) and a streamlined impl at https://github.com/clovaai/assembled-cnn but I ended up building somet...
rwightman/pytorch-image-models
timm/models/sknet.py
Python
apache-2.0
8,742
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
UManPychron/pychron
pychron/spectrometer/jobs/cdd_operating_voltage_scan.py
Python
apache-2.0
5,060
# # Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/] # # This file is part of IGE - Outer Space. # # IGE - Outer Space 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 Lice...
OuterDeepSpace/OuterDeepSpace
libs/server/ige/IssueMngr.py
Python
gpl-2.0
1,318
""" Test parsing of strings that are phrases with the ptc.StartTimeFromSourceTime flag set to True """ import unittest, time, datetime import parsedatetime as pdt class test(unittest.TestCase): @pdt.tests.assertEqualWithComparator def assertExpectedResult(self, result, check, **kwargs): return pdt.t...
r3tard/BartusBot
lib/parsedatetime/tests/TestStartTimeFromSourceTime.py
Python
apache-2.0
1,808
# !/usr/bin/python # -*- coding: utf-8 -*- # # Created on Oct 16, 2015 # @author: Bo Zhao # @email: bo_zhao@hks.harvard.edu # @website: http://yenching.org # @organization: Harvard Kennedy School import sys sys.path.append("/home/bo/.local/lib/python2.7/site-packages") # sys.path.append("/home/bo/Wo...
jakobzhao/wbcrawler3
cga/crawler-3.py
Python
mit
1,662
import caching.base as caching import jingo import jinja2 from tower import ugettext_lazy as _ import amo from addons.models import Addon from api.views import addon_filter from bandwagon.models import Collection, MonthlyPick as MP from versions.compare import version_int # The global registry for promo modules. Ma...
robhudson/zamboni
apps/discovery/modules.py
Python
bsd-3-clause
10,563
import configparser import asyncio from aiosmtpd.controller import Controller from aiosmtpd.handlers import Proxy import logging import aiosmtpd from xmediusmailrelayserver.relayhandler import RelayHandler from xmediusmailrelayserver.emailsender import EmailSender from os.path import dirname, join import yaml import io...
xmedius/xmedius-mailrelayserver
xmediusmailrelayserver/server.py
Python
mit
1,408