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
# Generated by Django 2.1.12 on 2019-12-06 15:22 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ('rdrf', '0118_auto_20191125_1514'), ] operations = [ ...
muccg/rdrf
rdrf/rdrf/migrations/0119_customaction.py
Python
agpl-3.0
1,049
""" wasi-sdk installation and maintenance """ from mod import log, wasisdk def run(fips_dir, proj_dir, args): if len(args) > 0: cmd = args[0] if cmd == 'install': wasisdk.install(fips_dir) elif cmd == 'uninstall': wasisdk.uninstall(fips_dir) else: ...
floooh/fips
verbs/wasisdk.py
Python
mit
682
from __future__ import absolute_import import difflib import errno import functools import io import itertools import getopt import os, signal, subprocess, sys import re import stat import platform import shutil import tempfile import threading import io try: from StringIO import StringIO except ImportError: f...
apple/swift-llvm
utils/lit/lit/TestRunner.py
Python
apache-2.0
63,764
###### configuration start ######## job_target = 'thingiverse' ###### configuration finish ######## import sqlite3 import db_insert_jobs_base as myinsert from datetime import datetime import sys import platform client_id = platform.node() print "## hello, ", client_id, job_target def make_job(i): thing_id = str(i)...
jianhuashao/WebDownloadJobsManage
server/db_insert_jobs_thingivers.py
Python
apache-2.0
2,023
from django.contrib import admin from django.db import models from django.shortcuts import redirect from django.utils.safestring import mark_safe from django.forms import CheckboxSelectMultiple from .models import * class FunkySaveAdmin(object): ''' Redirects to the object on site when clicking the save butto...
JaapJoris/bps
autodidact/admin.py
Python
agpl-3.0
3,733
# 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 writing, software # distributed under t...
dstanek/keystone
keystone/token/providers/fernet/core.py
Python
apache-2.0
10,692
#!/usr/bin/env python # -*- coding: utf-8 -*- i = 30 def pri(): print i i = 50 pri() print i
huangby/javaweb
pythonfile/test/build.py
Python
epl-1.0
111
import pyspark.sql.functions as func from pyspark import SparkContext, SparkConf, SparkFiles from pyspark.sql import SQLContext, Row import ConfigParser as configparser import os from datetime import datetime from vina_utils import get_directory_pdb_analysis, get_ligand_from_receptor_ligand_model from database_io impor...
rodrigofaccioli/drugdesign
virtualscreening/vina/spark/mult_objective_selection.py
Python
apache-2.0
2,716
import unittest class MercuryInventoryControllerTest(unittest.TestCase): """Base class for mercury-inventory unit tests.""" def test_init(self): assert True
jr0d/mercury
src/tests/inventory/unit/test_db_controller.py
Python
apache-2.0
174
#!/usr/bin/env python import optparse import os def main(): p = optparse.OptionParser(description="Python 'ls' command clone", prog="pyls", version="0.1a", usage="%prog [directory]") p.add_option("--verbose", "-v", ...
lluxury/P_U_S_A
13_commandline/true_false.py
Python
mit
830
# (C) 2015 Elke Schaper """ :synopsis: Input/output for sequences .. moduleauthor:: Elke Schaper <elke.schaper@sib-sib.ch> """ from Bio import SeqIO import logging LOG = logging.getLogger(__name__) # ########## READ SEQUENCE ################################################### def read_fasta(file, indice...
elkeschaper/tral
tral/sequence/sequence_io.py
Python
gpl-2.0
1,655
# 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 re import telemetry.timeline.bounds as timeline_bounds from telemetry import decorators # Enables the fast metric for this interaction IS_FAST = 'is...
7kbird/chrome
tools/telemetry/telemetry/web_perf/timeline_interaction_record.py
Python
bsd-3-clause
9,910
# REFERENCE # http://flask.pocoo.org/docs/0.10/quickstart/#a-minimal-application # https://pythonhosted.org/Flask-SQLAlchemy/ # http://zetcode.com/db/postgresqlpythontutorial/ # http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask # http://blog.luisrei.com/articles/flaskrest.html # DEPENDE...
WikimapsAtlas/wikimapsatlas-server
api/api.py
Python
unlicense
2,949
import sys sys.path.insert(0, ".") from coalib.misc.StringConverter import StringConverter import unittest class ProcessTest(unittest.TestCase): def setUp(self): self.uut = StringConverter("\n \\1 \n ") def test_construction(self): self.assertRaises(TypeError, Strin...
andreimacavei/coala
coalib/tests/misc/StringConverterTest.py
Python
agpl-3.0
5,178
import cPickle as pickle import numpy as np from scipy.io import loadmat import random def GetData(image_complete, data_type, train_mean, train_std): """Return simple array of pixels (shuffled)""" if data_type == "train": random.shuffle(image_complete) else: print "Shuffling training data" ...
jvpoulos/cs289-hw6
code-alt/prepare_data.py
Python
mit
1,948
#!/usr/bin/env python """ MultiQC submodule to parse output from Bamtools bam_stat.py http://bamtools.sourceforge.net/#bam-stat-py """ from collections import OrderedDict import logging import re from multiqc import config from multiqc.plots import beeswarm # Initialise the logger log = logging.getLogger(__name__) ...
robinandeer/MultiQC
multiqc/modules/bamtools/stats.py
Python
gpl-3.0
5,028
# -*- coding: utf-8 -*- # # Cipher/PKCS1_OAEP.py : PKCS#1 OAEP # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpet...
chronicwaffle/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/PKCS1_OAEP.py
Python
mit
9,899
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
vitaly-krugl/nupic
src/nupic/frameworks/opf/two_gram_model.py
Python
agpl-3.0
7,631
#!/usr/bin/env python # # # Thomas "Mr Men" Etcheverria # <tetcheve (at) gmail .com> # # Created on : 10-12-2013 16:49:07 # Time-stamp: <17-12-2013 13:06:02> # # File name : /home/mrmen/calcul-litteral.py # Description : # import random import sympy EXER = 5 QUESTION = 10 MONOME = 5 # preparation v...
mrmen/scriptsMaths
temp/simplification.py
Python
gpl-2.0
4,052
# -*- coding: utf-8 -*- """ beeswarmplot.py is part of Coquery. Copyright (c) 2016-2018 Gero Kunter (gero.kunter@coquery.org) Coquery is released under the terms of the GNU General Public License (v3). For details, see the file LICENSE that you should have received along with Coquery. If not, see <http://www.gnu.org/...
gkunter/coquery
coquery/visualizer/beeswarmplot.py
Python
gpl-3.0
2,584
from .archesmixin import ArchesMixin from .base import BaseModelClass from .rnamixin import RNASeqMixin from .vaemixin import VAEMixin __all__ = ["ArchesMixin", "BaseModelClass", "RNASeqMixin", "VAEMixin"]
YosefLab/scVI
scvi/core/models/__init__.py
Python
bsd-3-clause
207
import gc from unittest import mock import aioodbc import pytest @pytest.mark.parametrize('db', pytest.db_list) @pytest.mark.asyncio async def test___del__(loop, dsn, recwarn, executor): conn = await aioodbc.connect(dsn=dsn, loop=loop, executor=executor) exc_handler = mock.Mock() loop.set_exception_hand...
aio-libs/aioodbc
tests/test_slow.py
Python
apache-2.0
688
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Integration'] , ['ConstantTrend'] , ['Seasonal_MonthOfYear'] , ['NoAR'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_ConstantTrend_Seasonal_MonthOfYear_NoAR.py
Python
bsd-3-clause
170
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<https://micronaet.com>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebr...
Micronaet/micronaet-campaign
product_export_excel/__openerp__.py
Python
agpl-3.0
1,632
# coding: utf-8 from vale.parser import ValeParser, get_by_name, annotate_form from vale.codegen import ValeCodegen # ... creates an instance of Vale parser vale = ValeParser() # ... # ... def test_linear_form_11(): # ... parse the Vale code stmts = "Domain(dim=1,kind='structured') :: Omega" + "\n" stm...
ratnania/vale
tests/test_codegen_1d.py
Python
mit
4,709
from flask import Flask, request app = Flask(__name__) @app.route('/') def hello_world(): hello_str = ''' Hello, I am Keith. Who are you? ''' return hello_str if __name__ == '__main__': app.run(host='0.0.0.0', debug=True)
KeithYue/FanancialAnalyse
hello.py
Python
gpl-2.0
248
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_modes', '0004_auto_20151113_1457'), ] operations = [ migrations.SeparateDatabaseAndState( ...
ESOedX/edx-platform
common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py
Python
agpl-3.0
1,085
import re import copy import logging import datetime import objectpath from indra.statements import * logger = logging.getLogger(__name__) class EidosProcessor(object): """This processor extracts INDRA Statements from Eidos JSON-LD output. Parameters ---------- json_dict : dict A JSON dicti...
johnbachman/belpy
indra/sources/eidos/processor.py
Python
mit
18,394
from pyuploadcare.client import Uploadcare from pyuploadcare.ucare_cli.commands.helpers import pprint def register_arguments(subparsers): subparser = subparsers.add_parser( "list_webhooks", help="list all webhooks" ) subparser.set_defaults(func=list_webhooks) return subparser def list_webhoo...
uploadcare/pyuploadcare
pyuploadcare/ucare_cli/commands/list_webhooks.py
Python
mit
450
import re from gwibber.microblog import network, util import gnomekeyring from oauth import oauth from gwibber.microblog.util import log, resources from gettext import lgettext as _ log.logger.name = "StatusNet" PROTOCOL_INFO = { "name": "StatusNet", "version": 1.1, "config": [ "private:secret_token", ...
rhg/Qwibber
gwibber/microblog/plugins/statusnet/__init__.py
Python
gpl-2.0
9,075
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
rajul/tvb-framework
tvb/tests/framework/adapters/uploaders/obj_file_test.py
Python
gpl-2.0
2,987
################################################################################ # # This program is part of the ZenODBC Zenpack for Zenoss. # Copyright (C) 2009, 2010 Egor Puzanov. # # This program can be used under the GNU General Public License version 2 # You can find full information here: http://www.zenoss.com/os...
anksp21/Community-Zenpacks
ZenPacks.community.ZenODBC/ZenPacks/community/ZenODBC/interfaces.py
Python
gpl-2.0
947
#!/usr/bin/python import pytricia import reading_file_to_dict import sys import pprint import csv import p_trie def patricia(device_values): pyt_src = pytricia.PyTricia() pyt_dst = pytricia.PyTricia() return pyt_src,pyt_dst def check_tcp_udp(flow_rule): if(flow_rule["nw_proto"]=="6"): return Tru...
VRaviTheja/SDN-policy
testing/testing_detection.py
Python
apache-2.0
3,341
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
neudesk/neucloud
openstack_dashboard/dashboards/router/nexus1000v/forms.py
Python
apache-2.0
7,463
""" Django ORM model specifications for the Course Structures sub-application """ import json import logging from collections import OrderedDict from model_utils.models import TimeStampedModel from opaque_keys.edx.django.models import CourseKeyField, UsageKey from util.models import CompressedTextField logger = log...
BehavioralInsightsTeam/edx-platform
openedx/core/djangoapps/content/course_structures/models.py
Python
agpl-3.0
3,148
# coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # URL: http://sickchill.github.io # # This file is part of SickChill. # # SickChill 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 o...
dfalt974/SickRage
sickbeard/providers/kat.py
Python
gpl-3.0
6,455
from __future__ import unicode_literals from memory.mem import _Memory class Windows2003ServerR2Memory(_Memory): def __init__(self, params): super(Windows2003ServerR2Memory, self).__init__(params) def csv_all_modules_dll(self): super(Windows2003ServerR2Memory, self)._csv_all_modules_dll() ...
SekoiaLab/Fastir_Collector
memory/windows2003ServerR2Memory.py
Python
gpl-3.0
674
#!/usr/bin/env python """ @file edgeObj.py @author Simon Box @date 31/01/2013 Class for reading an edg.xml file and storing edgeObj data. """ from xml.dom.minidom import parse class readEdges: def __init__(self,filePath): self.dom = parse(filePath) #for node in dom.getElementsByTagNam...
intelaligent/tctb
legacy_src/corridor/readEdges.py
Python
gpl-3.0
1,235
from xml.etree import ElementTree RESULT_MAPPING = { 'failure': 'fail', 'error': 'error', 'skipped': 'skipped' } def get_ms(val): return int(float(val) * 1000) class Parser(object): def __init__(self, i): self.input = i self.tests = [] def parse(self, _badge_dir): xml...
InfraBox/infrabox
src/pyinfraboxutils/testresult.py
Python
mit
2,210
# coding=utf-8 from __future__ import unicode_literals import os from importlib import import_module def path_for_import(name): """ Returns the directory path for the given package or module. """ return os.path.dirname(os.path.abspath(import_module(name).__file__)) def import_dotted_path(path): ...
hyperwood/Flask-Project
flask_project/importing.py
Python
mit
719
import graphene import thefederation.schema class Query(thefederation.schema.Query, graphene.ObjectType): pass schema = graphene.Schema(query=Query)
jaywink/diaspora-hub
config/schema.py
Python
agpl-3.0
158
#!/usr/bin/env python """ Card Explorer Written by Colin Keigher http://afreak.ca All items in here are licensed under the LGPL (see LICENCE.TXT) Release notes ==================================================================== X.X (Dec 15, 2012) - pylint related fixes - error checking on invalid stripes...
armyofevilrobots/Card-Explorer
issuer.py
Python
lgpl-3.0
9,686
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- ##---------------------------------------------------------------------------## ## ## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer ## Copyright (C) 2003 Mt. Hood Playing Card Co. ## Copyright (C) 2005-2009 Skomoroh ## ## This program is free ...
TrevorLowing/PyGames
pysollib/winsystems/win32.py
Python
gpl-2.0
2,104
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
addition-it-solutions/project-all
addons/mail/res_partner.py
Python
agpl-3.0
2,880
#!/usr/bin/python #coding:utf-8 import os import sys import time import cPickle as pickle BASE_PATH = "/root/exp/ibr/" def get_host_num(path): files = os.listdir(path) for name in files: if name.find('cgr_l') >= 0: pos = name.find('.') + 1 return int(name[pos:]) return -1 ...
melon-li/netem
netem-agent.py
Python
apache-2.0
8,478
from types import MethodType from inspect import getmodule from ..simplified.modelapi import _require_metaattr from restful_api import restful_api from searchform import _create_seachform from editform import _create_editform def _copy_supports_metaattrs_from_simplified(cls): """ Copy all supports_[method] bo...
vegarang/devilry-django
devilry/restful/restful_modelapi.py
Python
bsd-3-clause
2,970
""" FEniCS tutorial demo program: Poisson equation with Dirichlet and Neumann conditions. As dn2_p2D.py, but the linear system is explicitly formed and solved. -Laplace(u) = f on the unit square. u = 1 + 2y^2 on x=0. u = 2 + 2y^2 on x=1. -du/dn = g on y=0 and y=1. u = 1 + x^2 + 2y^2, f = -6, g = -4y. """ from dolfin ...
maciekswat/dolfin_1.3.0
test/unit/book/python/chapter_1_files/stationary/poisson/dn3_p2D.py
Python
gpl-3.0
2,868
# coding: utf-8 # In[16]: import pandas as pd import numpy as np get_ipython().magic('matplotlib inline') import matplotlib.pyplot as plt import os import csv # In[17]: print (os.getcwd()) # In[18]: fn = "stops.txt" with open(fn, "r") as f: reader = csv.reader(f) header = next(reader) data = {} ...
yingjun2/project-spring2017
part1/bin/Final+Project+Question+1+Xiaoliang+-+v+1.0.py
Python
bsd-3-clause
6,913
from django.apps import AppConfig from django.db.models.signals import post_save, post_delete from django.conf import settings class CustomerBillConfig(AppConfig): name = 'retail.customer_bill' def __init__(self, app_name, app_module): super(self.__class__, self).__init__(app_name, app_module) ...
Semprini/cbe-retail
retail/customer_bill/apps.py
Python
apache-2.0
1,070
""" Dictionary of playerinfo that cannot be easily obtained while retrieving match pages """ players = dict( Cruzerthebruzer=['top', 'Dignitas'], Crumbzz=['jungle', 'Dignitas'], Scarra=['mid', 'Dignitas'], Imaqtpie=['adc', 'Dignitas'], KiWiKiD=['support', 'Dignitas'], Balls=['top', 'Cloud 9'], ...
johnttan/lolesports_scraper
playerinfo.py
Python
mit
3,471
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Handling of the <message> element. ''' from __future__ import print_function import re import six from grit.node import base from grit import cli...
endlessm/chromium-browser
tools/grit/grit/node/message.py
Python
bsd-3-clause
12,578
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiwallet. Verify that a bitcoind node can load multiple wallet files """ import os import shut...
droark/bitcoin
test/functional/wallet_multiwallet.py
Python
mit
17,262
# Copyright (c) 2015 Telefonica I+D. # Copyright (c) 2016 Mirantis, 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 # # ...
satish-avninetworks/murano
murano_tempest_tests/tests/api/application_catalog/test_env_templates.py
Python
apache-2.0
9,494
# Copyright (C) 2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 versio...
espressomd/espresso
testsuite/scripts/samples/test_rigid_body.py
Python
gpl-3.0
983
# Esperienza sull'acquisizione di d.d.p. tramite Arduino. # Lo script scrive sulla porta seriale a cui e' collegato arduino un numero che viene interpretato da Arduino come ritardo in unita' di 10 ms e fa partire l'acquisizione. # Poi attende l'arrivo dei dati elaborati da Arduino sulla seriale e li salva in un file....
fedebell/Laboratorio3
Laboratorio2/scriptACaso/ardu_multicount_v1.py
Python
gpl-3.0
1,880
import unittest import os from test.aiml_tests.client import TestClient from programy.config.brain import BrainFileConfiguration class BasicTestClient(TestClient): def __init__(self): TestClient.__init__(self) def load_configuration(self, arguments): super(BasicTestClient, self).load_configur...
dkamotsky/program-y
src/test/aiml_tests/udc_tests/star/test_star_udc_aiml.py
Python
mit
1,236
"""Installation script.""" from os import path from setuptools import find_packages, setup HERE = path.abspath(path.dirname(__file__)) with open(path.join(HERE, 'README.rst')) as f: LONG_DESCRIPTION = f.read().strip() setup( name='fuel', version='0.0.1', # PEP 440 compliant description='Data pipelin...
laurent-dinh/fuel
setup.py
Python
mit
1,421
"""Support for Z-Wave controls using the number platform.""" from __future__ import annotations from zwave_js_server.client import Client as ZwaveClient from homeassistant.components.number import DOMAIN as NUMBER_DOMAIN, NumberEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import...
sander76/home-assistant
homeassistant/components/zwave_js/number.py
Python
apache-2.0
4,601
# -*- coding: utf-8 -*- """ Created on oct. 19, 2014, 21:04 Copyright François Durand 2014 fradurand@gmail.com This file is part of SVVAMP. SVVAMP 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, eith...
francois-durand/svvamp
svvamp/utils/my_log.py
Python
gpl-3.0
3,739
""" Tests the crowdsourced hinter xmodule. """ from mock import Mock, MagicMock import unittest import copy from xmodule.crowdsource_hinter import CrowdsourceHinterModule from xmodule.vertical_module import VerticalModule, VerticalDescriptor from xblock.field_data import DictFieldData from xblock.fragment import Frag...
TsinghuaX/edx-platform
common/lib/xmodule/xmodule/tests/test_crowdsource_hinter.py
Python
agpl-3.0
22,068
#!/usr/bin/env python2 # IRPF90 is a Fortran90 preprocessor written in Python for programming using # the Implicit Reference to Parameters (IRP) method. # Copyright (C) 2009 Anthony SCEMAMA # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public...
scemama/irpf90
src/codelet.py
Python
gpl-2.0
1,981
# -*- coding: utf-8 -*- """ @author: Peter Morgan <pete@daffodil.uk.com> """ from Qt import QtGui, QtCore, Qt, pyqtSignal from ogt import ags4 import app_globals as G from img import Ico import xwidgets from ags4_models import CG, AGS4_COLORS, HeadingsModel, AbbrevItemsModel class AGS4DataDictBrowser( QtGui.QWidg...
open-geotechnical/ogt-ags-py
ogtgui/ags4_widgets.py
Python
gpl-2.0
27,425
from __future__ import print_function from builtins import str from pomdpy.discrete_pomdp import DiscreteState class TigerState(DiscreteState): """ Enumerated state for the Tiger POMDP Consists of a boolean "door_open" containing info on whether the state is terminal or not. Terminal states are reach...
pemami4911/POMDPy
examples/tiger/tiger_state.py
Python
mit
2,337
import os config = { "buildbot_json_path": "buildprops.json", "hostutils_manifest_path": "testing/config/tooltool-manifests/linux64/hostutils.manifest", "tooltool_manifest_path": "testing/config/tooltool-manifests/androidx86/releng.manifest", "tooltool_cache": "/home/worker/tooltool_cache", "downlo...
Yukarumya/Yukarum-Redfoxes
testing/mozharness/configs/android/androidx86-tc.py
Python
mpl-2.0
3,677
# -*- coding: utf-8 -*- ''' Checks ground_motion_record function by integrating the accelerations calculated as follows: x= 9*t**3+10*t**2 xdot= 27*t**2+20*t xdotdot= 54*t+20 ''' import xc_base import geom import xc __author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)" __copyright__= "Copyrig...
lcpt/xc
verif/tests/loads/test_ground_motion_04.py
Python
gpl-3.0
2,458
from _external import * from glut import * ssba = LibWithHeaderChecker( ['V3D','ldl','colamd'], 'Geometry/v3d_metricbundle.h', 'c++', name='ssba', defines=['V3DLIB_ENABLE_SUITESPARSE'], ...
tuttleofx/sconsProject
autoconf/ssba.py
Python
mit
355
import wx import wx.lib.agw.pycollapsiblepane as PCP class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, "PyCollapsiblePane Demo") panel = wx.Panel(self) title = wx.StaticText(panel, label="PyCollapsiblePane") title.SetFont(wx.Font(18, wx.SWI...
ODM2/ODM2StreamingDataLoader
src/wizard/controller/old/a.py
Python
bsd-3-clause
2,472
from pyramid.events import NewRequest from pyramid.httpexceptions import HTTPBadRequest from pyramid_restler.view import RESTfulView def add_restful_routes(self, name, factory, view=RESTfulView, route_kw=None, view_kw=None): """Add a set of RESTful routes for an entity. URL patterns f...
wylee/pyramid_restler
pyramid_restler/config.py
Python
mit
4,625
"""Generates constants for use in blinkpy.""" import os MAJOR_VERSION = 0 MINOR_VERSION = 19 PATCH_VERSION = "0.rc0" __version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}.{PATCH_VERSION}" REQUIRED_PYTHON_VER = (3, 6, 0) PROJECT_NAME = "blinkpy" PROJECT_PACKAGE_NAME = "blinkpy" PROJECT_LICENSE = "MIT" PROJECT_AUTHOR = "K...
fronzbot/blinkpy
blinkpy/helpers/constants.py
Python
mit
1,967
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
vlegoff/tsunami
src/primaires/supenr/__init__.py
Python
bsd-3-clause
20,738
import os import logging class Config(object): # environment DEBUG = False TESTING = False PRODUCTION = False # log LOG_LEVEL = logging.DEBUG SYS_ADMINS = ['foo@example.com'] SITE_NAME = 'Shiritori' basedir = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI...
Rassilion/shiritori
website/config.py
Python
mit
1,025
from .mockups import *
polyrabbit/WeCron
WeCron/common/tests/__init__.py
Python
gpl-3.0
23
# Posterior for z # Author: Aleyna Kara # This file is translated from sensorFusionUnknownPrec.m import superimport import pyprobml_utils as pml import numpy as np import matplotlib.pyplot as plt from scipy.stats import multivariate_normal xs, ys = [1.1, 1.9], [2.9, 4.1] nx, ny = len(xs), len(ys) xbar = np.mean(xs)...
probml/pyprobml
scripts/sensor_fusion_unknown_prec.py
Python
mit
1,301
import os import platform import tempfile import unittest import mock import numpy import six from chainer import cuda from chainer import functions from chainer import links from chainer import sequential from chainer import testing from chainer.testing import attr from chainer import variable class TestSequential...
rezoo/chainer
tests/chainer_tests/test_sequential.py
Python
mit
20,769
#!/usr/bin/env python import freenect import cv from misc.demo import frame_convert cv.NamedWindow('Depth') cv.NamedWindow('RGB') keep_running = True def display_depth(dev, data, timestamp): global keep_running cv.ShowImage('Depth', frame_convert.pretty_depth_cv(data)) if cv.WaitKey(10) == 27: ...
Dining-Engineers/left-luggage-detection
misc/demo/demo_cv_async.py
Python
gpl-2.0
732
from launcher.utils.imports import import_submodules import_submodules(globals(),__name__,__path__)
hikelee/launcher
launcher/views/mixins/__init__.py
Python
mit
101
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', #url(r'^$', TemplateView.as_view(template_name='ba...
newrelic/newrelic-python-kata
newrelic_python_kata/urls.py
Python
mit
1,300
import time, os, sys, math from string import split, join from altitude import decode_alt import cpr import exceptions def charmap(d): if d > 0 and d < 27: retval = chr(ord("A")+d-1) elif d == 32: retval = " " elif d > 47 and d < 58: retval = chr(ord("0")+d-48) else: ret...
koppa/ADSB-Sniffer
evaluation/adsb/decoder.py
Python
gpl-3.0
3,826
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2016 Anler Hernández <hello@anler.me> # This ...
Rademade/taiga-back
tests/integration/test_searches.py
Python
agpl-3.0
5,639
""" You are given an array of desired filenames in the order of their creation. Since two files cannot have equal names, the one which comes later will have an addition to its name in a form of (k), where k is the smallest positive integer such that the obtained name is not used yet. Return an array of names that will...
coingraham/codefights
python/fileNaming/fileNaming.py
Python
mit
1,136
from settings import RED, YELLOW, GREEN, WHITE from random import randint class Scheme(object): visual_generic = "{}|{}|{}\n{}|{}|{}\n{}|{}|{}" def __init__(self, scheme, mine_class): if not (0 < scheme < 512): raise ValueError("Scheme must be between 1 and 511") self.scheme = sch...
Nozdi/miner
board/mine.py
Python
mit
3,065
#!/usr/bin/env python3 """regex-tokenize input text""" # 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 progra...
fnl/libfnl
scripts/fnltok.py
Python
agpl-3.0
2,812
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hickle as hkl import numpy as np np.random.seed(2 ** 10) from keras import backend as K K.set_image_dim_ordering('tf') from keras.layers import Dropout from keras.models import Sequential from keras.lay...
pratikgujjar/DeepIntent
code/autoencoder_model/scripts/attention_autoencoder.py
Python
mit
20,029
#!/usr/bin/env python2.7 import numpy as np import matplotlib.pyplot as plt Freq=np.array([20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320]) Db=np.array([70,76.7,87.1,95.4,94.2,93.2,93.2,93.9,95.4,97.7,101.3,106.3,110.7,106,104.1,103.3,103.1,103.9,105...
P1R/cinves
TrabajoFinal/tubo180cm/2-DbvsFreq/DbvsFreq-Ampde0.01v-CERRADOeENEXTREMO.py
Python
apache-2.0
676
from os.path import join from bundlewrap.utils.testing import make_repo, run def test_empty(tmpdir): make_repo(tmpdir) stdout, stderr, rcode = run("bw hash", path=str(tmpdir)) assert stdout == b"bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f\n" assert stderr == b"" def test_nondeterministic(tmpdir): ...
timbuchwaldt/bundlewrap
tests/integration/bw_hash.py
Python
gpl-3.0
8,581
# -*- coding:utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') import scrapy from function import get_title key_word = '计算机视觉' start_year, end_year = 2015, 2017 all_name = get_title() # all_name = [] class Data_Spider(scrapy.Spider): name = 'Crawler' start_urls = ['http://s.wanfangdata.com.cn/Paper....
hbtech-ai/ARPS
classification_data/classification_data/spiders/data_crawler.py
Python
mit
1,714
''' http://inside.wot.kongzhong.com/inside/wotinside/signact/signinfo?jsonpcallback=jQuery&useraccount=&login=<base64(<login>)>=&zoneid=1500100 http://inside.wot.kongzhong.com/inside/wotinside/signact/sign?jsonpcallback=jQuery&useraccount=&login=<base64(<login>)>&zoneid=1500100 ''' # coding: utf-8 import base64 import ...
zhaipro/misc
hack_wot.py
Python
mit
1,354
# Copyright (c) 2011-2016 Rackspace US, 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 agreed ...
audip/lunr
lunr/storage/controller/volume.py
Python
apache-2.0
13,157
# # Copyright © 2012–2022 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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 Free Software Foundation, either version 3 of the Licens...
nijel/weblate
weblate/machinery/models.py
Python
gpl-3.0
2,648
from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^jobs/', include('transparencyjobs.jobs.urls')), (r'^admin/', include(admin.site.urls)), (r'^$', 'django.views.generic.simple.redirect_to', {'url': '/jobs/'}), )
codeforamerica/transparencyjobs
urls.py
Python
bsd-3-clause
299
# -*- 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-monitoring-dashboards
google/cloud/monitoring_dashboard_v1/types/metrics.py
Python
apache-2.0
9,974
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from urllib import urlencode import hashlib import csv from product_spiders.item...
0--key/lib
portfolio/Python/scrapy/applejack/klwines.py
Python
apache-2.0
2,489
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
artemsok/sockeye
test/unit/test_attention.py
Python
apache-2.0
18,317
## \file ## \ingroup tutorial_roofit ## \notebook ## Special pdf's: special decay pdf for B physics with mixing and/or CP violation ## ## \macro_code ## ## \date February 2018 ## \authors Clemens Lange, Wouter Verkerke (C++ version) import ROOT # B-decay with mixing # ------------------------- # Construct pdf # ---...
root-mirror/root
tutorials/roofit/rf708_bphysics.py
Python
lgpl-2.1
7,789
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Convert IPv6 addresses between textual representation and binary. These functions are missing when python is compile...
zverevalexei/trex-http-proxy
trex_client/external_libs/scapy-2.3.1/python3/scapy/pton_ntop.py
Python
mit
3,502
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup file for the SkCode project. """ import os from setuptools import setup from skcode import __version__ as skcode_version # Dump readme content as text with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() # All...
TamiaLab/PySkCode
setup.py
Python
agpl-3.0
1,531
__author__ = 'Eleonor Bart' from models import db, User, Role from main import app from flask_security import SQLAlchemyUserDatastore, Security from flask_security.forms import ConfirmRegisterForm from wtforms import StringField, validators class ExtendedConfirmRegisterForm(ConfirmRegisterForm): first_name = St...
ElBell/VTDairyDB
controllers/security.py
Python
gpl-3.0
618
from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file # with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf...
brooksc/bugherd
setup.py
Python
mit
4,028
"""A DjangoCMS plugin to build a product page with a 'single page only' layout""" __version__ = '0.3.0'
emencia/emencia-product-onepage
product_onepage/__init__.py
Python
mit
104
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY __priority__ = PRIORITY.HIGHEST def dependencies(): pass def tamper(payload, **kwargs): """ Replaces instances like 'CONCAT(...
pwnieexpress/raspberry_pwn
src/pentest/sqlmap/tamper/concat2concatws.py
Python
gpl-3.0
766