code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#!/usr/bin/env python import os import csv import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport ''' You can use this file to test your DBW code against a bag recorded with a reference implementation. The bag can be found at https://s3-us-west-1.a...
zegnus/self-driving-car-machine-learning
p13-final-project/ros/src/twist_controller/dbw_test.py
Python
mit
3,850
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Zuza Software Foundation # Copyright 2016 F Wolff # # This file is part of Virtaal. # # 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 Foundat...
translate/virtaal
virtaal/views/propertiesview.py
Python
gpl-2.0
8,186
# -*- coding: utf-8 -*- """ pygments.lexers.theorem ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for theorem-proving languages. :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, default, words from py...
tmm1/pygments.rb
vendor/pygments-main/pygments/lexers/theorem.py
Python
mit
19,316
from flask import Flask, render_template, flash, request, Markup, session, redirect, url_for, escape, Response, current_app, send_file from impschedules import app, db, models, usermanagement, properties import random, string from iatiimplementationxml import toxml from lxml import etree import datetime import requests...
pwyf/IATI-Implementation-Schedules
impschedules/isimport.py
Python
agpl-3.0
8,114
#!/usr/bin/env python """ # # Description: # originally based on copy_media.py # updated to use JSON playlists pointing to Content objects... # should use other scripts to help with that conversion as needed # # copy the refrenced files to a new directory # # By: Charles Brandt [code at charlesbrandt dot com] # On: ...
charlesbrandt/medley
scripts/copy_media_content_version.py
Python
mit
3,312
__author__ = 'Stephanie' import sys import os from ... import serviceBase from ..model import * # from ODMconnection import SessionFactory class createLabAnalyses (serviceBase): def test(self): return None
Castronova/EMIT
api_old/ODM2/LabAnalyses/services/createLabAnalyses.py
Python
gpl-2.0
223
# -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or mo...
timvideos/flumotion
flumotion/test/test_component_padmonitor.py
Python
lgpl-2.1
3,361
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' Golconde Client Client for acting upon the Golconde queues for data distribution ''' class GolcondeClient: # Connect to the ActiveMQ Server def Connect(self, host, port): # Connect to Stomp # Add to the Golconde Distribution Queue def Add(self, queue...
gmr/golconde
clients/golcondeClient.py
Python
bsd-3-clause
359
"Doc comment stays intact" import ImportTarget ImportTarget.foo foo = 1
asedunov/intellij-community
python/testData/inspections/AddImportDoc_after.py
Python
apache-2.0
74
# 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 may ...
Azure/azure-sdk-for-python
sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_redis_enterprise_operations.py
Python
mit
30,682
# 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 rights to use, copy, modi...
tema-tut/tema-tg
TemaLib/tema/model/prepostmodel_example.py
Python
mit
2,050
import pytest import unittest from mock import patch, MagicMock, PropertyMock from contextlib import nested import httpretty import re class TestCloudElements(unittest.TestCase): def setUp(self): from cloudelements import CloudElements self.cloud_elements = CloudElements( user_secret...
rsimba/cloudelements
tests/unit/test_cloudelements.py
Python
mit
20,646
# 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. from __future__ import absolute_import from telemetry.internal.backends.chrome import cros_browser_backend from telemetry.internal.browser import browser c...
catapult-project/catapult
telemetry/telemetry/internal/backends/chrome/cros_browser_with_oobe.py
Python
bsd-3-clause
1,307
""" A module containing a class that produces Python code for simulating a PySB model without requiring PySB itself (note that NumPy and SciPy are still required). This offers a way of distributing a model to those who do not have PySB. For information on how to use the model exporters, see the documentation for :py:m...
johnbachman/pysb
pysb/export/python.py
Python
bsd-2-clause
10,425
# Copyright (c) 2009, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of co...
sorki/rosdep
src/rosdep2/platforms/opensuse.py
Python
bsd-3-clause
2,965
'''interpol - module for interpolation of wind data for input coordinates list uses NMCWind as a datasource ''' import math from siku import geocoords try: from geocoords import norm_lat,norm_lon,norm_delta,norm_delta_rad except: norm_lat = geocoords.norm_lat norm_lon = geocoords.norm_lon norm_delta =...
Atoku/siku
python/siku/interpolate.py
Python
gpl-2.0
8,765
#!/usr/bin/env python # -*- coding: latin-1 -*- # This program 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, or (at your option) any later # version. # # This program is distr...
ccpgames/eve-metrics
web2py/gluon/contrib/pysimplesoap/client.py
Python
mit
36,225
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2014 Brian Douglass bhdouglass@gmail.com # 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 Softwa...
bhdouglass/agui
agui/backends/pyside/widgets/indicator.py
Python
gpl-3.0
2,521
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import os import string from lib.core.enums import PRIORITY from lib.core.common import singleTimeWarnMessage __priority__ = PRIORITY.LOWEST def dependencies(): singleT...
goofwear/raspberry_pwn
src/pentest/sqlmap/tamper/charunicodeencode.py
Python
gpl-3.0
1,627
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
jlongever/redfish-client-python
on_http_redfish_1_0/models/thermal_1_0_0_temperature.py
Python
apache-2.0
8,295
from flask import Flask from .core import wx_oauth, wxpay from .veiws import bp def create_app(): app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile('config.py') wx_oauth.init_app(app) wxpay.init_app(app) app.register_blueprint(bp) return app
codeif/Flask-WXPay
example/demo/__init__.py
Python
mit
298
''' A versioning plugin for Elixir. Entities that are marked as versioned with the `acts_as_versioned` statement will automatically have a history table created and a timestamp and version column added to their tables. In addition, versioned entities are provided with four new methods: revert, revert_to, compare_with ...
gjhiggins/elixir
elixir/ext/versioned.py
Python
mit
11,245
import numpy import math import random import time ##---------------------------------------------------------------------------## # compute the inf norm of a vector def inf_norm(x): m = len(x) error = [] for i in xrange(m): error.append( x[i][0] ) return max(error) ##------------------------...
sslattery/Chimera
doc/kaczmarz/python/mcsa_sketch.py
Python
bsd-3-clause
11,279
# Load python packages import re, sys, math from collections import OrderedDict # Load Moose packages from FactorySystem import MooseObject from ..slides import * ## # Base class for markdown slide generation class SlideSet(MooseObject): ## # Defines the available properties for the SlideSet base class @static...
zzyfisherman/moose
python/PresentationBuilder/slidesets/SlideSet.py
Python
lgpl-2.1
11,362
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function import sys import os.path import argparse from . import censuscsv from . import dbfwriter def main(): '''Command line util for converting census CSV to DBF''' parser = argparse.ArgumentParser(description='Convert a US Census csv to d...
fitnr/census2dbf
census2dbf/cli.py
Python
gpl-3.0
1,842
import re from django.core import mail from django.core.urlresolvers import reverse from django_webtest import WebTest from oscar.test.testcases import WebTestCase from oscar.core.compat import get_user_model User = get_user_model() class TestAUserWhoseForgottenHerPassword(WebTest): def test_can_reset_her_pa...
DrOctogon/unwash_ecom
tests/functional/customer/auth_tests.py
Python
bsd-3-clause
4,811
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= # FileName: swan_api.py # Desc: 2015-15/1/5:下午1:24 # Author: 苦咖啡 # Email: voilet@qq.com # HomePage: http://blog.kukafei520.net # History: # ===================...
voilet/cmdb
swan/swan_api.py
Python
agpl-3.0
1,818
# 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 u...
eric-haibin-lin/mxnet
tests/python/unittest/test_subgraph.py
Python
apache-2.0
7,634
import re from raco import algebra, expression from raco.representation import RepresentationProperties from .expression import (accessed_columns, UnnamedAttributeRef, rebase_local_aggregate_output, rebase_finalizer, to_unnamed_recursive, StateVar, RANDOM) from abc im...
uwescience/raco
raco/rules.py
Python
bsd-3-clause
38,249
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from...
crowning-/dash
qa/rpc-tests/p2p-acceptblock.py
Python
mit
12,477
import bigbang.parse as parse import math import numpy as np import networkx as nx import bigbang.process as process # import matplotlib.pyplot as plt from pprint import pprint as pp from collections import Counter import pandas def messages_to_reply_graph(messages): """Return a graph given messages.""" G = ...
sbenthall/bigbang
bigbang/graph.py
Python
agpl-3.0
4,723
from __future__ import unicode_literals from django.apps import AppConfig class MemberConfig(AppConfig): name = 'member'
boyombo/asn
member/apps.py
Python
mpl-2.0
128
import logging from framework.celery_tasks.handlers import enqueue_task from website import settings logger = logging.getLogger(__name__) if settings.SEARCH_ENGINE == 'elastic': import website.search.elastic_search as search_engine else: search_engine = None logger.warn('Elastic search is not set to loa...
pattisdr/osf.io
website/search/search.py
Python
apache-2.0
4,935
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014,2020 Clayton Smith. # # This 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) # any later version. # # This...
argilo/gr-ham
python/varicode_rx.py
Python
gpl-3.0
5,209
"""This module detects potential secrets in content files. It is built on the functionality of Yelp's detect-secrets. See: https://github.com/Yelp/detect-secrets """ import pathlib import typing from detect_secrets import main as detect_secrets_main from detect_secrets.plugins.common import ( initialize as detect_s...
ChrisCummins/clgen
datasets/github/scrape_repos/preprocessors/secrets.py
Python
gpl-3.0
1,806
import os from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, redirect import pusher #create app app = Flask(__name__) app.secret_key = 'sdfjaiAWFa3092%@' def get_pusher(): if not hasattr(g,'pusher'): g.pusher = pusher.Pusher( app_id = '79029', key='1d81fdd2355a...
polaris340/sygchat
main.py
Python
apache-2.0
1,162
# -*- coding: utf-8 -*- # Generated by Django 1.11b1 on 2017-03-22 13:27 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('quiz', '0010_auto_20170322_1413'), ] operations = ...
Sirikam/Gravitas
apps/quiz/migrations/0011_auto_20170322_1427.py
Python
mit
761
from slpp import SLPP import re class diObj(object): def __init__(self,type,name,luaData): self.objectType=type self.objectName=name self.objectKey=type+name self.DictLuaData=luaData self.DictTotal={} self.setDict() def setDict(self): self.DictTotal["Name"]=self.objectName self.DictTotal["Type"]=sel...
guzzijones/parseDI
parseDI.py
Python
gpl-2.0
1,926
#!/usr/bin/env python from __future__ import print_function, division from scapy.all import * import time import json import hashlib import urllib2 import urllib class StudySniffer(): def __init__(self): self.clientInfoDictStack = [] self.clients = [] self.clientTypes = (0, 2, 4) self.initTime = time.time() ...
B0bby/StudySniffer
StudySniffer.py
Python
gpl-2.0
4,065
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Pelix Shell commands for Herald :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 1.0.1 :status: Alpha .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); ...
isandlaTech/cohorte-devtools
qualifier/deploy/cohorte-home/repo/herald/rshell.py
Python
apache-2.0
17,486
#!/usr/bin/env python3 # # Copyright 2014 Simone Campagna # # 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 ...
simone-campagna/rubik
testing/rubik_testing/tests/test_help/rubik_test_help.py
Python
apache-2.0
2,308
''' @author: Michael Foord http://www.voidspace.org.uk/python/weblog ''' import tkinter class ToolTip(object): def __init__(self, widget, text): self.widget = widget self.window = None self.id = None widget.bind('<Enter>', lambda e : self.show(text)) widget.b...
MatthewDaggitt/AshCalc
desktop/tooltip.py
Python
mit
1,315
# Generated by Django 1.11.25 on 2019-10-24 20:48 from django.conf import settings from django.db import migrations USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME NEW_EMAIL = USERNAME + '@example.com' OLD_EMAIL = USERNAME + '@fake.email' class Migration(migrations.Migration): def forwards(apps, schema_e...
eduNEXT/edx-platform
lms/djangoapps/commerce/migrations/0008_auto_20191024_2048.py
Python
agpl-3.0
1,271
# -*- coding: utf-8 -*- # # # Copyright 2013 Netflix, 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 ...
nhamplify/aminator
aminator/plugins/blockdevice/base.py
Python
apache-2.0
1,648
""" Copyright (C) 2011-2015 Parametric Products Intellectual Holdings, LLC This file is part of CadQuery. CadQuery 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...
jmwright/cadquery-freecad-module
Libs/cadquery/cadquery/freecad_impl/__init__.py
Python
lgpl-3.0
6,339
""" @author: Thomas PERROT Contains models for tournaments app """ from typing import Dict from collections import defaultdict from datetime import date from django.db import models from cards.models import Card, CardName class Format(models.Model): """Class which represents a format (e.g Legacy, Modern, etc...
thomasperrot/MTGTrader
mtg/tournaments/models.py
Python
mit
3,976
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2017 GEM Foundation and G. Weatherill # # OpenQuake 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 F...
g-weatherill/gmpe-smtk
smtk/response_spectrum.py
Python
agpl-3.0
15,504
#!/usr/bin/env python # # Copyright 2008-2009 Jose Fonseca # # This program 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 License, or # (at your option) any later version. # # ...
amiller/blockplayer
scripts/gprof2dot.py
Python
mpl-2.0
88,597
# Copyright 2015 Patrick Putnam # # 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 ...
putnampp/clotho
examples/simupop/json_reformatter.py
Python
apache-2.0
1,233
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from unittest import TestCase from unittest.mock import patch, MagicMock from UM.OutputDevice.OutputDeviceManager import OutputDeviceManager from cura.UltimakerCloudAuthentication import CuraCloudAPIRoot from ...src.Cloud i...
Patola/Cura
plugins/UM3NetworkPrinting/tests/Cloud/TestCloudOutputDeviceManager.py
Python
lgpl-3.0
5,463
import ast import json import sys import requests from requests.auth import HTTPBasicAuth from st2reactor.sensor.base import Sensor class KubeSystemSecret(Sensor): def __init__(self, sensor_service, config=None): super(KubeSystemSecret, self).__init__(sensor_service=sensor_service, config=config) ...
pearsontechnology/st2contrib
packs/kubernetes/sensors/kube_system_secret.py
Python
apache-2.0
3,882
# -*- coding: utf-8 -*- # Copyright 2020 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-aiplatform
samples/generated_samples/aiplatform_generated_aiplatform_v1_job_service_create_data_labeling_job_sync.py
Python
apache-2.0
1,991
# Reference: http://hetland.org/coding/python/levenshtein.py def levenshtein(a,b): "Calculates the Levenshtein distance between a and b." n, m = len(a), len(b) if n > m: # Make sure n <= m, to use O(min(n,m)) space a,b = b,a n,m = m,n current = range(n+1) for i in ra...
singhj/locality-sensitive-hashing
utils/levenshtein.py
Python
mit
745
# This file is part of Indico. # Copyright (C) 2002 - 2021 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 blinker import Namespace _signals = Namespace() folder_created = _signals.signal('folder-created'...
pferreir/indico
indico/core/signals/attachments.py
Python
mit
2,311
import os import urlparse import zipfile import requests from bs4 import BeautifulSoup from downloader import Downloader from common import Subtitles, User class Subscene(object): def __init__(self): super(Subscene, self).__init__() self._base_url = u'http://subscene.com/' self._search_url = self._get_full_ur...
scorpiontahir02/easysub
src/easysub/subscene.py
Python
mit
2,817
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource) from neuralnilm.source import (standardise, discretize, fdiff, power_and_fdiff, ...
mmottahedi/neuralnilm_prototype
scripts/e572.py
Python
mit
15,490
# 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 u...
zhreshold/mxnet
tests/python/unittest/test_numpy_gluon.py
Python
apache-2.0
16,943
## # SurrogateBenchmarks: A program making it easy to benchmark hyperparameter # optimization software . # Copyright (C) 2014 Katharina Eggensperger # # 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 Foundat...
KEggensperger/SurrogateBenchmarks
Surrogates/DataExtraction/handle_configurations.py
Python
gpl-3.0
10,847
from rest_framework import generics from rest_framework.permissions import DjangoModelPermissions from common.views import AuditableDetailViewMixin from .models import ( GeoCodeSource, GeoCodeMethod, FacilityCoordinates, WorldBorder, CountyBoundary, ConstituencyBoundary, WardBoundary ) from...
urandu/mfl_api
mfl_gis/views.py
Python
mit
4,344
""" The ``scaling`` module contains functions for manipulating irradiance or other variables to account for temporal or spatial characteristics. """ import numpy as np import pandas as pd import scipy.optimize from scipy.spatial.distance import pdist def wvm(clearsky_index, positions, cloud_speed, dt=None): """...
mikofski/pvlib-python
pvlib/scaling.py
Python
bsd-3-clause
10,964
# This module has moved to zope.app.testing # and will go away in Zope 3.5 import zope.deprecation zope.deprecation.moved( 'zope.app.testing.setup', "Zope 3.5", )
Donkyhotay/MoonPy
zope/app/tests/setup.py
Python
gpl-3.0
175
#!/usr/bin/python # Copyright (c) 2009 Las Cumbres Observatory (www.lcogt.net) # # 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 #...
chiiph/protobuf-socket-rpc
src/protobuf/socketrpc/tests/__init__.py
Python
mit
1,136
match x: case (42 <caret>): pass
smmribeiro/intellij-community
python/testData/editing/noBackslashOnEnterInGroupPattern.after.py
Python
apache-2.0
48
""" ========= Array I/O ========= Placeholder for array I/O documentation. """
beiko-lab/gengis
bin/Lib/site-packages/numpy/doc/io.py
Python
gpl-3.0
91
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'acq4/analysis/modules/MosaicEditor/MosaicEditorTemplate.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def se...
campagnola/acq4
acq4/analysis/modules/MosaicEditor/MosaicEditorTemplate_pyqt5.py
Python
mit
7,012
# -*- coding: utf-8 -*- import pytest import pyroonga class TestGroonga(object): def test_connect_with_default(self): grn = pyroonga.connect() assert grn.connected is True assert grn.host == '0.0.0.0' assert grn.port == 10041 def test_connect_with_params(self): grn =...
naoina/pyroonga
pyroonga/tests/functional/__init__.py
Python
mit
750
import sys # where RobotControl.py, etc lives sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary') from RobotControl import * ################################# ### Define Deck Layout ################################# deck="""\ DW96P DW96P DW96W DW96W BLANK DW96P DW96P DW96W DW96W BLANK DW96P DW...
tdlong/YeastRobot
UserPrograms/ASE/Mon_ToBeads_3.py
Python
gpl-3.0
2,655
#!/usr/bin/env python # Copyright 2012 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 ...
googlearchive/titan
titan/users/users.py
Python
apache-2.0
8,639
""" relu where each channel has a different leak rate """ import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX @treeano.register_node("interval_relu") class IntervalReLUNode(treeano.NodeImpl): hyperparameter_names = ("leak_min", ...
diogo149/treeano
treeano/sandbox/nodes/interval_relu.py
Python
apache-2.0
1,043
import requests import sys def process_robots(target): ''' Return a list of entries if robots.txt is found and has meat otherwise return None ''' interesting_entries = [] try: result = requests.get(target + "robots.txt") if not result.status_code == 200: retu...
deibit/cansina
plugins/robots.py
Python
gpl-3.0
738
# romanNumerals.py # # Copyright (c) 2006, Paul McGuire # from pyparsingOD import * def romanNumeralLiteral(numeralString, value): return Literal(numeralString).setParseAction(replaceWith(value)) one = romanNumeralLiteral("I",1) four = romanNumeralLiteral("IV",4) five = roma...
schlichtanders/pyparsing-2.0.3-OrderedDict
examples/romanNumerals.py
Python
mit
2,368
def say(words): print words name = "this is a import demo"
Cloudlie/pythonlearning
module.py
Python
mit
62
from oscar.apps.checkout.app import CheckoutApplication from apps.checkout import views class OverriddenCheckoutApplication(CheckoutApplication): # Specify new view for payment details payment_details_view = views.PaymentDetailsView application = OverriddenCheckoutApplication()
django-oscar/django-oscar-gocardless
sandbox/apps/checkout/app.py
Python
bsd-3-clause
292
#!/usr/bin/env python3 import mysql.connector import sys import mypasswords if len(sys.argv) != 2 and len(sys.argv) != 3: print ("Not correct argument") sys.exit(-1) muninumber = int(sys.argv[1]) if len(sys.argv) == 3: mode = int(sys.argv[2]) else: mode = 1 db = mysql.connector.connect(host="localhost",user=...
rubund/addrnodeimport
python/updatetime.py
Python
gpl-2.0
950
""" default resource """ from zunzuncito import tools class APIResource(object): def dispatch(self, request, response): request.log.debug(tools.log_json({ 'API': request.version, 'URI': request.URI, 'method': request.method, 'vroot': request.vroot ...
nbari/zunzuncito
my_api/beta_zunzun_io/v0/zun_default/zun_default.py
Python
bsd-3-clause
773
import numpy as np from math import sqrt class NPVector: def __init__(self, vec, features): self.vec = vec # precompute an absolute value self.abs = sqrt(np.square(vec).sum()) self.features = features @classmethod def fromdist(cls, dist, features): vec = np.array([d...
summerlight/anlp
src/vector.py
Python
apache-2.0
1,477
# -*- coding: utf-8 -*- from __future__ import absolute_import import base64 import copy import functools import json import os import weakref import uuid from PyQt4.QtCore import QObject, QSize, Qt, QTimer, QUrl, pyqtSlot from PyQt4.QtNetwork import QNetworkRequest from PyQt4.QtWebKit import QWebPage, QWebSettings fr...
kmike/splash
splash/browser_tab.py
Python
bsd-3-clause
39,033
""" This is the script for porkchop plotting """ import matplotlib.pyplot as plt import numpy as np from astropy import coordinates as coord, units as u from poliastro.bodies import ( Earth, Jupiter, Mars, Mercury, Moon, Neptune, Pluto, Saturn, Sun, Uranus, Venus, ) from po...
Juanlu001/poliastro
src/poliastro/plotting/porkchop.py
Python
mit
6,777
# Copyright 2014 Diamond Light Source 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 agreed t...
FedeMPouzols/Savu
savu/tomo_recon.py
Python
gpl-3.0
4,968
import logging import mr.config.kv import mr.models.kv.data_layer _logger = logging.getLogger(__name__) _logger.setLevel(logging.INFO) # TODO(dustin): This is a base-class. We need to be able to represent trees of # models, where each of these mappings don't necessarily have an # identi...
dsoprea/JobX
mr/models/kv/trees/tree.py
Python
gpl-2.0
4,810
from google.appengine.api import memcache from google.appengine.ext import db import random class GeneralCounterShardConfig(db.Model): """Tracks the number of shards for each named counter.""" name = db.StringProperty(required=True) num_shards = db.IntegerProperty(required=True, default=20) class General...
systempuntoout/buckethandle
app/db/counter.py
Python
bsd-3-clause
2,769
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='WorkerServerMessa...
NickRuiz/mt-serverland
protobuf/WorkerServerMessage_pb2.py
Python
bsd-3-clause
5,861
# -*- coding: utf-8 -*- from __future__ import unicode_literals from actstream.actions import follow from actstream.actions import unfollow from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import redirect ...
aldwyn/effigia
apps/interactions/views.py
Python
mit
4,391
from .sender import SignalSender, connect_with from .base import ValueModel, AttachAbility from .base import ValueInterface, ChangedInterface from .base import AbstractItem, Item, AbstractProperty from .multi_types import StringValueModel, StringProperty, StringItemInterface, StringItem from .multi_types import IntVa...
SF-Zhou/prett
prett/__init__.py
Python
mit
1,611
# -*- coding: utf-8 -*- import sys import logging import logging.config from __init__ import __version__ from sodexo import Sodexo from unica import Unica from db_manager import DB_manager def main(argv): logging.basicConfig(level=logging.INFO) logger = logging.getLogger(" {0}".format(__name__)) logge...
aatkin/mobileparser
mobileparser/main.py
Python
mit
1,466
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
nharraud/invenio-records-rest
docs/conf.py
Python
gpl-2.0
10,965
# # 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...
DataReplyUK/datareplyuk
GenesAssociation/spark-2.0.0-bin-hadoop2.7/python/pyspark/ml/tests.py
Python
apache-2.0
63,204
from django.contrib.contenttypes.models import ContentType from django.urls import reverse from rest_framework import status from dcim.models import Device, DeviceRole, DeviceType, Manufacturer, Platform, Region, Site from extras.constants import GRAPH_TYPE_SITE from extras.models import ConfigContext, Graph, ExportTe...
lampwins/netbox
netbox/extras/tests/test_api.py
Python
apache-2.0
19,948
from __future__ import unicode_literals import re import unicodedata from gzip import GzipFile from io import BytesIO from django.utils.encoding import force_text from django.utils.functional import allow_lazy, SimpleLazyObject from django.utils import six from django.utils.six.moves import html_entities from django....
Sonicbids/django
django/utils/text.py
Python
bsd-3-clause
14,595
from awuproject.settings import *
actwithus/actwithus
awuproject/awuproject/production.py
Python
apache-2.0
34
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2011 Geisha Tokyo Entertainment, Inc. # # 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 witho...
geishatokyo-lightning/lightning
lightning_core/test/testlightningutil.py
Python
mit
3,522
"""Add flat INSEE column Revision ID: 9e58c66f1ac1 Revises: d21933db9ad8 Create Date: 2021-02-08 16:31:18.961186 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "9e58c66f1ac1" down_revision = "d21933db9ad8" branch_labels = None depends_on = None def upgrade()...
Phyks/Flatisfy
migrations/versions/9e58c66f1ac1_add_flat_insee_column.py
Python
mit
462
#!/usr/bin/python # -*- coding: UTF-8 -*- # 基础语法的学习 print "############################## 1. 中文处理方式"; # 或者直接使用 #coding=utf-8 也可以 print "中文处理方式" print "############################## 2. 标识符"; # _foo 表示不能直接访问的类属性,不能使用 from xxx import * 导入 # __foo__ python中特殊方法专用的标志 : __init__() 表示类的构造函数 print "##########...
userYKK/pythonTry
python27/Basic/demo1.py
Python
apache-2.0
1,531
# Copyright (C) 2010-2014 GRNET S.A. # # 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 your option) any later version. # # This program is distributed i...
grnet/synnefo
snf-pithos-app/pithos/api/services.py
Python
gpl-3.0
1,791
#!/usr/bin/python # -*- coding: utf-8 -*- # # installation_devce_page.py - Copyright (C) 2013 Red Hat, Inc. # Written by Fabian Deutsch <fabiand@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software...
sdoumbouya/ovirt-node
src/ovirt/node/installer/core/installation_device_page.py
Python
gpl-2.0
4,718
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-02-22 23:20:39 import socket from six import iteritems, itervalues from flask import render_template, request, json from flask.ext import login from ...
snakeliwei/pyspider
pyspider/webui/index.py
Python
apache-2.0
4,583
#!/usr/bin/env python """ Find and delete all of the log files before a given date This script, when run from a directory that contains a set of log files with names following the pattern YYYY-MM-DD-* will delete all of the files dated prior to the first supplied date (also given in the form YYYY-MM-DD ) and great...
jimwaldo/HarvardX-Tools
src/main/python/logs/cullLogFiles.py
Python
bsd-3-clause
1,494
#coding=UTF-8 ''' This is a demo that how to use Mosaic Model to detect image. Usage: python mosaic_porngraphic_cnn_demo.py the_path_of_image Output: The PORNGRAPHIC probability Author: boozyguo mail: 44167841@qq.com update: 2017-04-27 changlist: 2016-11-04: first version, using 2 CNN layers and 3 FC layers 2017-04-...
boozyguo/mosaic
mosaic_porngraphic_cnn_demo.py
Python
apache-2.0
3,044
#MPS object # # # # # # # # # #!-------- Object Class ---------!# class object_class(): def __init__(self, x_pos, y_pos, z_pos, x_movement, y_movement, z_movement, x_rot = 0, y_rot = 0, z_rot = 0, cw = 1, m = 1, density = 1, diameter_x = 1, diameter_y = 1, diameter_z = 1, metal = False, state = "solid"): self.data =...
Sauron754/MS
MPS_object.py
Python
mit
5,808
#!/usr/bin/env python """Alfredo Command Line Interface Usage: alfredo login [-i <input>] alfredo logout alfredo ruote [-C|-R|-U|-D|-X] [-i <input>] [-o <output>] <path>... Options: Operations: -C --create Create. -R --retrieve Retrieve (default operation). -X --repla...
teamjamon/alfredo-python-sdk
alfredo/cli.py
Python
lgpl-2.1
8,284