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
from __future__ import division import sys msg = """ To run this script you need the package remembercases, which can be found at https://bitbucket.org/ccanepa/remembercases Instructions about how to install in the same page. """ try: import remembercases except ImportError: print msg sys.exit(1) import o...
shackra/thomas-aquinas
tools/autotest/repeteability.py
Python
bsd-3-clause
7,548
# -*- coding: iso-8859-1 -*- # Copyright (C) 2007-2014 CEA/DEN, EDF R&D # # 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 of the License, or (at your option) any la...
FedoraScientific/salome-paravis
src/Plugins/MEDReader/Test/testMEDReader1.py
Python
lgpl-2.1
2,143
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This s...
exocad/exotrac
contrib/checkwiki.py
Python
bsd-3-clause
6,045
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v9/services/services/geo_target_constant_service/client.py
Python
apache-2.0
21,491
# Copyright 2021 kubeflow.org. # # 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,...
kubeflow/kfserving-lts
python/paddleserver/setup.py
Python
apache-2.0
1,176
#!/usr/bin/env python import vtk def main(): colors = vtk.vtkNamedColors() diskSource = vtk.vtkDiskSource() diskSource.Update() featureEdges = vtk.vtkFeatureEdges() featureEdges.SetInputConnection(diskSource.GetOutputPort()) featureEdges.BoundaryEdgesOn() featureEdges.FeatureEdgesOff(...
lorensen/VTKExamples
src/Python/Meshes/BoundaryEdges.py
Python
apache-2.0
1,333
# -*- coding: utf-8 -*- import random from operator import attrgetter import pytest from cfme import test_requirements from cfme.cloud.provider import CloudProvider from cfme.cloud.provider.azure import AzureProvider from cfme.cloud.provider.ec2 import EC2Provider from cfme.cloud.provider.gce import GCEProvider from...
anurag03/integration_tests
cfme/tests/candu/test_utilization_metrics.py
Python
gpl-2.0
8,879
# -*- coding: utf-8 -*- """ eve.methods.get ~~~~~~~~~~~~~~~ This module implements the API 'GET' methods, supported by both the resources and single item endpoints. :copyright: (c) 2017 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ import math import copy import json fr...
bcrochet/eve
eve/methods/get.py
Python
bsd-3-clause
21,656
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-01 20:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
mjj55409/cpq-exporter
apps/exporter/migrations/0001_initial.py
Python
mit
4,604
#(C) Marek Chrusciel, # Jakub Kosinski, # Marcin Krupowicz, # Mateusz Strycharski # # $Id$ class GGException(Exception): """ Wyjatej "typu" gadu-gadu. """ pass class GGUnexceptedPacket(GGException): """ Wyjatek gadu-gadu dla nieoczekiwanego pakietu. """ pass class GGNotLogged(GGException): """ ...
DjangoCalendar/DjangoCalendar
DjangoReadyProject/DjangoProject/src/GGLibrary/Exceptions.py
Python
gpl-2.0
678
import re, csv header_end = re.compile("\s+START\s+END\s+") ## p. 1172 is missing a space between the final date and the description. Can't understand why the layout option does this; a space is clearly visible. I dunno. five_data_re = re.compile("\s*([\w\d]+)\s+(\d\d\/\d\d\/\d\d\d\d)\s+(.*?)\s+(\d\d\/\d\d\/\d\d\d\d...
jsfenfen/senate_disbursements
114_sdoc4/read_pages.py
Python
bsd-2-clause
11,865
# # # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (ht...
torbjoernk/easybuild-framework
easybuild/framework/easyconfig/default.py
Python
gpl-2.0
10,633
# 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...
kou/arrow
python/pyarrow/csv.py
Python
apache-2.0
974
import cyclesort import unittest class CycleSortTest(unittest.TestCase): def setUp(self): self.cyclesort = cyclesort.CycleSort def tearDown(self): self.cyclesort = None def test_sort(self): test_data = [8, 5, 3, 1, 9, 6, 0, 7, 4, 2, 5] sorted_lst = [0, 1, 2, 3, 4, 5, 5, 6...
rahulnadella/Sort_Algorithms
cyclesort/cyclesort_test.py
Python
bsd-2-clause
741
import tornado.ioloop from tornado.options import define, options, logging import tornado.web define("port", default=8888, help="run on the given port", type=int) settings = { "debug": True, } server_settings = { "xheaders" : True, } class MainHandler(tornado.web.RequestHandler): def get(self): ...
mehmetkose/linode-tornado-example
main.py
Python
mit
720
from .logic import LogicAdapter class ClosestMatchAdapter(LogicAdapter): def get(self, text, list_of_statements): """ Takes a statement string and a list of statement strings. Returns the closest matching statement from the list. """ from fuzzywuzzy import process ...
karajrish/ChatterBot
chatterbot/adapters/logic/closest_match.py
Python
bsd-3-clause
666
# ---------------------------------------------------------------------- # 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...
neuroidss/nupic.vision
nupicvision/regions/ImageSensorFilters/Tracking.py
Python
gpl-3.0
11,237
#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core and Deuscoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the getchaintips API. # Since the test framework does not generate orphan blo...
deuscoin/deuscoin
qa/rpc-tests/getchaintips.py
Python
mit
771
# -*- coding: utf-8 -*- # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. import logging.config import logging import os from openradar import config def _get_logging_dict(logfile_path): return { 'disable_existing_loggers': True, 'version': 1, 'formatters': { 'verbose...
nens/openradar
openradar/loghelper.py
Python
gpl-3.0
1,838
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-02-09 17:08 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('scoping', '0047_auto_20170209_1626'), ] operations...
mcallaghan/tmv
BasicBrowser/scoping/migrations/0048_auto_20170209_1708.py
Python
gpl-3.0
658
import os import unittest from vsg.rules import variable from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_002_test_input.vhd')) lExpected_lower = [] lExpected_lower.append('') utils.read_file(os.path.jo...
jeremiah-c-leary/vhdl-style-guide
vsg/tests/variable/test_rule_002.py
Python
gpl-3.0
2,053
""" prf_dot11.py The PRF function is used in a number of places in 802.11i to create psuedo random octet strings. The parameter 'prefix' is a string that shall be a unique label for each different purpose of the PRF. """ import hmac, sha # available in any Python 2.x def PRF( key, prefix, data, number_of_bi...
repotvsupertuga/tvsupertuga.repository
script.module.cryptolib/lib/cryptopy/keyedHash/prf_dot11.py
Python
gpl-2.0
1,345
from os import path, makedirs, listdir, stat, rename, remove from datetime import date from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.Console import Console from Components.ActionMap import ActionMap, NumberActionMap from Components.Sources.StaticText import StaticText from Co...
oe-alliance/oe-alliance-enigma2
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
Python
gpl-2.0
12,483
import os from marten.configurations import Configuration __author__ = 'Nick Allen <nick.allen.cse@gmail.com>' def get_supported_extensions(): """Returns a dict mapping file extension string to Configuration class that can handle it""" supported_extensions = {} for cls in Configuration.__subclasses__(): for ...
nick-allen/marten
marten/util.py
Python
mit
1,480
# coding: utf-8 from __future__ import absolute_import, print_function import warnings from bentoo.yaml.error import MarkedYAMLError, ReusedAnchorWarning from bentoo.yaml.compat import utf8, nprint, nprintf # NOQA from bentoo.yaml.events import ( StreamStartEvent, StreamEndEvent, MappingStartEvent, ...
ProgramFan/bentoo
bentoo/yaml/composer.py
Python
mit
8,292
import os import sys path_to_scripts = os.path.dirname(os.path.realpath(__file__)) assert not path_to_scripts.endswith('/') ## ## the directories db/ and external/ do not live in the github repository ## They will hopefully get created when you run the setup.py script. ## path_to_db = path_to_scripts+'/db' assert os...
phbradley/tcr-dist
paths.py
Python
mit
875
import tests.periodicities.period_test as per per.buildModel((24 , 'S' , 200));
antoinecarme/pyaf
tests/periodicities/Second/Cycle_Second_200_S_24.py
Python
bsd-3-clause
82
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
iwm911/plaso
plaso/parsers/winreg_plugins/run.py
Python
apache-2.0
2,337
''' ''' # 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");...
SolidWallOfCode/trafficserver
tests/gold_tests/slow_post/slow_post.test.py
Python
apache-2.0
3,358
import sys, arcpy, arcpy.mapping as mapping path_base = 'X://tutorial-example/' path_elevation = path_base + 'Spatial/elevation' path_landuse = path_base + 'Spatial/landuse' path_school-site = path_base + 'Spatial/School_site.shp' path_destination = path_base + 'Spatial/Stowe.gdb/destination' path_rec_sites ...
district10/homework
2014/Spatial-Analysis/ArcGIS/ArcPy/more-scripts/code.py
Python
gpl-3.0
1,521
### # Copyright (c) 2005-2009, Jeremiah Fincher # Copyright (c) 2009-2010, James McCoy # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above ...
frumiousbandersnatch/supybot-code
src/utils/python.py
Python
bsd-3-clause
4,758
#!/usr/bin/env python #-*- coding: utf-8 -*- db = { "username" : "indiana", "password" : "astropanza", "host" : "localhost", "database" : "archeolofi", } DATABASE_URL = ''.join([ "postgresql://", db["username"], ":", db["password"], "@", db["host"], "/", db["database"] ]) CO...
feedingaliencat/archeolofi
server/location.py
Python
bsd-3-clause
358
# # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
moio/spacewalk
backend/server/rhnImport.py
Python
gpl-2.0
3,346
# -*- coding: utf-8 -*- from collections.abc import MutableMapping import numpy as np import scipy.io as sio from ..structures import PLSResults _result_mapping = ( ('u', 'x_weights'), ('s', 'singvals'), ('v', 'y_weights'), ('usc', 'x_scores'), ('vsc', 'y_scores'), ('lvcorrs', 'y_loadings'),...
rmarkello/pyls
pyls/matlab/io.py
Python
gpl-2.0
6,754
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-05 14:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Board'...
annaelde/forum-app
site/boards/migrations/0001_initial.py
Python
mit
745
#! /usr/bin/python ##Copyright 2008-2015 Jelle Feringa (jelleferinga@gmail.com) ## ##This file is part of pythonOCC. ## ##pythonOCC 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 t...
chenkianwee/envuo
py4design/py3dmodel/OCCUtils/Common.py
Python
gpl-3.0
19,334
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
karllessard/tensorflow
tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/hash_table_asset_v1.py
Python
apache-2.0
3,338
# Copyright (c) 2012 OpenStack Foundation # 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 ...
mgagne/nova
nova/cmd/spicehtml5proxy.py
Python
apache-2.0
1,292
import json import re from glob import glob import pytest ignore_pattern_files = glob('db/ignore_patterns/*.json') user_agent_files = glob('db/user_agents/*.json') @pytest.mark.parametrize('filename', ignore_pattern_files) def test_ignore_pattern_file(filename): data = json.load(open(filename)) assert data['...
ArchiveTeam/ArchiveBot
test/validate_db.py
Python
mit
808
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/connection_monitor_parameters_py3.py
Python
mit
2,094
from __future__ import absolute_import, unicode_literals from django.apps import AppConfig class WagtailEmbedsAppConfig(AppConfig): name = 'wagtail.wagtailembeds' label = 'wagtailembeds' verbose_name = "Wagtail embeds"
chrxr/wagtail
wagtail/wagtailembeds/apps.py
Python
bsd-3-clause
234
# # 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...
spektom/incubator-airflow
tests/providers/cloudant/hooks/test_cloudant.py
Python
apache-2.0
1,971
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Stephane Caron <stephane.caron@normalesup.org> # # This file is part of pymanoid. # # pymanoid 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 # Foundatio...
stephane-caron/ijhr-2016
pymanoid/bodies.py
Python
gpl-3.0
3,323
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2019, 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...
chetan51/nupic.research
projects/dynamic_sparse/runs/neurips_1.py
Python
gpl-3.0
2,709
# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # Copyright (c) 2011 Jann Kleen # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this sof...
Nexenta/s3-tests
virtualenv/lib/python2.7/site-packages/boto/ec2/autoscale/__init__.py
Python
mit
35,929
# Copyright 2011 Dan Smith <dsmith@danplanet.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 Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
mach327/chirp_fork
chirp/drivers/baofeng_uv3r.py
Python
gpl-3.0
21,582
import datetime from aklub.models import AdministrativeUnit, ProfileEmail, Telephone, UserProfile from django.conf import settings from django.core.files import File from events.models import ( Event, EventType, Location, OrganizationPosition, OrganizationTeam, ) from interactions.models import ...
auto-mat/klub
apps/conftest.py
Python
gpl-3.0
9,226
""" Tests for discussion pages """ import datetime from pytz import UTC from uuid import uuid4 from nose.plugins.attrib import attr from .helpers import UniqueCourseTest from ..pages.lms.auto_auth import AutoAuthPage from ..pages.lms.courseware import CoursewarePage from ..pages.lms.discussion import ( Discussion...
xiandiancloud/edxplaltfom-xusong
common/test/acceptance/tests/test_discussion.py
Python
agpl-3.0
24,307
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Trains (a partial) imple...
calee88/ParlAI
examples/drqa/train.py
Python
bsd-3-clause
10,165
import os import socket import json import logging import ssl import http.client import time import math import random from datetime import datetime from tempfile import NamedTemporaryFile from urllib import request from cinp.common import URI __CLIENT_VERSION__ = '1.0.1' __CINP_VERSION__ = '1.0' __all__ = [ 'Timeou...
cinp/python
cinp/client.py
Python
apache-2.0
25,071
from queue import Queue from bears.elm.ElmLintBear import ElmLintBear from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.settings.Section import Section from coalib.testing.LocalBearTestHelper import verify_local_bear from coalib.testing.LocalBearTestHelper ...
horczech/coala-bears
tests/elm/ElmLintBearTest.py
Python
agpl-3.0
3,500
#!/usr/bin/python #coding=utf-8 import sys import os import shutil import pipes import getpass import subprocess import textwrap import time import ConfigParser import ecs from datetime import datetime from sys import stderr from xml.etree import ElementTree as ET from nginx import start_nginx, do_stop_nginx from commo...
aliyun/spark-on-ecs
bin/core/utils.py
Python
artistic-2.0
20,037
import json from django.template import Library, Context from django.template.loader import get_template register = Library() @register.simple_tag(takes_context=True) def ads_targeting(context): return get_template( "ads/ads-targeting.html" ).render( Context({ "targeting": conte...
theonion/django-bulbs
bulbs/ads/templatetags/ads.py
Python
mit
869
from StateRedis import StateRedis from events import * from sourcecontrol import * from shell import * from publishers import * WORKDIR=os.path.expanduser("/mnt/cicada/workspace") PUBDIR=os.path.expanduser("/mnt/cicada/artifacts") QUEUE_EVENT = StateRedis() LISTEN = [ TestOnEvent('libinjection'), TestOnTime(m...
b1v1r/ironbee
libs/libinjection/cicada/libinjection_test.py
Python
apache-2.0
27,492
# coding: utf-8 # Import from app.decorators import * ''' Affichage du menu à vignettes relatif au module de gestion des absences _req : Objet "requête" ''' @verif_acces('gest_abs') def get_menu(_req) : # Imports from app.functions import get_menu from app.functions import init_menu_vign from app.functions impor...
SMMAR11/smmarbsence
app/views/gest_abs.py
Python
gpl-3.0
22,629
import os import shutil from plistlib import Plist from util.util import * from unixprofile import UnixProfile from profile import Profile import stat from distutils.version import LooseVersion, StrictVersion # staging helper functions def match_stageable_text(path, filetype): if os.path.islink(path) or os.path....
mono/bockbuild
bockbuild/darwinprofile.py
Python
mit
14,181
#!/usr/bin/python3 import RPi.GPIO as GPIO import spidev import ctypes """ ================================================ ABElectronics ADCDAC Pi Analogue to Digital / Digital to Analogue Converter Version 1.0 Created 29/02/2015 Version 1.1 Updated 15/04/2016 Added controllable gain factor ========================...
abelectronicsuk/ABElectronics_Python3_Libraries
ADCDACPi/ABE_ADCDACPi.py
Python
mit
5,682
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015-2020 OpenCraft <contact@opencraft.com> # # 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 Fre...
open-craft/opencraft
registration/tests/test_tasks.py
Python
agpl-3.0
4,761
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The vyos lldp_interfaces fact class It is in this file the configuration is collected from the device for a given resource, parsed, and the facts tree is populated based ...
azaghal/ansible
test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/module_utils/network/vyos/facts/lldp_interfaces/lldp_interfaces.py
Python
gpl-3.0
5,314
"""enki plugins """
vi/enki
enki/plugins/__init__.py
Python
gpl-2.0
19
# Copyright Notice: This code is in Copyright. Any use leading to publication # or financial gain is prohibited without the permission of the authors # Simon O'Meara and # David Topping: simon.omeara@manchester.ac.uk. First # published 2017. # This file is part of box_model # box_model is free software: you can ...
simonom/box-model
full_stat.py
Python
gpl-3.0
6,068
from django.conf import settings from django.conf.urls import patterns, url from mapentity.registry import MapEntityOptions from geotrek.altimetry.views import (ElevationProfile, ElevationChart, ElevationArea, serve_elevation_chart) urlpatterns = patterns( '', url(r'^%s/p...
mabhub/Geotrek
geotrek/altimetry/urls.py
Python
bsd-2-clause
1,623
# -*- coding: utf-8 -*- from wexplorer.database import ( Column, db, Model ) from wexplorer.extensions import bcrypt class FileUploadPassword(Model): __tablename__ = 'file_upload_password' password = Column(db.String(128), nullable=False, primary_key=True) def __init__(self, password): ...
bsmithgall/wexplorer
wexplorer/explorer/models.py
Python
bsd-3-clause
2,184
#/*************************************************************************** # * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
sanguinariojoe/FreeCAD
src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py
Python
lgpl-2.1
27,948
#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that ...
sacsant/avocado-misc-tests
ras/supportconfig.py
Python
gpl-2.0
5,912
""" Support for the DirecTV recievers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.directv/ """ import voluptuous as vol from homeassistant.components.media_player import ( MEDIA_TYPE_TVSHOW, MEDIA_TYPE_VIDEO, SUPPORT_PAUSE, SUPPORT_...
hexxter/home-assistant
homeassistant/components/media_player/directv.py
Python
mit
5,155
# 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 the Li...
ccrouch/python-tuskarclient
tuskarclient/tests/v1/test_resource_class.py
Python
apache-2.0
2,273
#! /usr/bin/env python # -*- coding: utf-8 -*- # Andrés Aguirre Dorelo # MINA/INCO/UDELAR # # Execution of individuals resulted from the Baliero and Pias work # # 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 Softwa...
aguirrea/lucy
tests/testBalieroWalk.py
Python
gpl-3.0
2,371
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode...
zwChan/VATEC
~/eb-virt/Lib/encodings/ptcp154.py
Python
apache-2.0
9,125
""" WSGI config for ribbit project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` s...
bkold/CarbonCopy
ribbit/wsgi.py
Python
mit
1,134
import env import metaomr.midi_alignment as ma from glob import glob import os.path import pandas as pd import cPickle import re alignments = dict() for real in sorted(glob('resources/midi/beet*.mid')): f = os.path.basename(real) omr = sorted(glob('resources/midi/IMSLP*_' + f)) if not omr: continue...
ringw/MetaOMR
metaomr_tests/align_beethoven.py
Python
gpl-3.0
1,844
#!/usr/bin/python # -*- coding: utf-8 -*- # # Pyromaths # Un programme en Python qui permet de créer des fiches d'exercices types de # mathématiques niveau collège ainsi que leur corrigé en LaTeX. # Copyright (C) 2006 -- Jérôme Ortais (jerome.ortais@pyromaths.org) # # This program is free software; you can redistribute...
JeromeO/Pyromaths
src/pyromaths/ex/sixiemes/droites.py
Python
gpl-2.0
26,124
""" EM module --------- Performs EM method to fit latent variables and parameters of CAP. Usage: this module is not directly callable. """ from time import time from math import ceil from time import time from random import shuffle from numpy.random import normal, multivariate_normal, seed from math i...
lucianamaroun/review_recommendation
algo/cap/em.py
Python
mit
5,731
from spider.cloud_api.api import * __all__ = ['api_comment', 'api_song_url']
yqh231/cloudmusic_api
spider/cloud_api/__init__.py
Python
apache-2.0
77
import os.path as op import numpy as np from numpy.testing import assert_allclose, assert_array_equal import pytest from itertools import compress from mne import io, pick_types, pick_channels, read_events, Epochs from mne.channels.interpolation import _make_interpolation_matrix from mne.datasets import testing from ...
Eric89GXL/mne-python
mne/channels/tests/test_interpolation.py
Python
bsd-3-clause
10,870
# coding=utf-8 """Tvmaze indexer api module.""" from __future__ import unicode_literals import logging from collections import OrderedDict from time import time from medusa.indexers.base import (Actor, Actors, BaseIndexer) from medusa.indexers.exceptions import ( IndexerError, IndexerException, IndexerSh...
pymedusa/Medusa
medusa/indexers/tvmaze/api.py
Python
gpl-3.0
23,799
# List of modules to import when celery starts. # CELERY_IMPORTS = ('libcloud_sandbox.tasks.code_execute', ) # Result store settings. CELERY_RESULT_BACKEND = 'database' CELERY_RESULT_DBURI = 'sqlite:///mydatabase.db' # Broker settings. BROKER_TRANSPORT = 'sqlalchemy' BROKER_HOST = 'sqlite:///tasks.db' BROKER_PORT = 5...
texib/bitcoin-zoo
test/celeryconfig.py
Python
mit
525
#!/usr/bin/env python import argparse import os import shutil import sys from will.main import WillBot parser = argparse.ArgumentParser() parser.add_argument( '--profile', action='store_true', help='Run with yappi profiling.' ) args = parser.parse_args() def start_will(): if args.profile: try...
wontonst/will
start_dev_will.py
Python
mit
710
import csv import datetime import os from subprocess import PIPE from wal_e.piper import popen_nonblock from wal_e.exception import UserException PSQL_BIN = 'psql' class UTC(datetime.tzinfo): """ UTC timezone Adapted from a Python example """ ZERO = datetime.timedelta(0) HOUR = datetime....
tenstartups/wal-e
wal_e/worker/pg/psql_worker.py
Python
bsd-3-clause
4,267
import doctest import unittest import typeschema class TestCase(unittest.TestCase): def test_doc(self): fails, tested = doctest.testmod(typeschema.typeschema) if fails > 0: self.fail('Doctest failed!')
ikanor/typeschema
tests/typeschema_test.py
Python
mit
237
"""Tests for the zip storage module""" import os from zipfile import ZipFile from translate.storage import zip class TestZIPFile: """A test class to test the zip class that provides the directory interface.""" def setup_method(self, method): """sets up a test directory""" print("setup_metho...
translate/translate
translate/storage/test_zip.py
Python
gpl-2.0
2,697
#!/usr/bin/env python3 import collections import os import platform import shlex import subprocess import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..", "build", "lib", "scripts")) try: import cfg except ImportError: pass PACKAGE = {} INSTALL = {} UPDATE = {} SOURCES = {} KEYS = {} DEBIAN...
arescentral/antares
scripts/deps.py
Python
lgpl-3.0
5,787
# flake8: noqa from .base import AuthorizationView, TokenView, RevokeTokenView from .application import ApplicationRegistration, ApplicationDetail, ApplicationList, \ ApplicationDelete, ApplicationUpdate from .generic import ProtectedResourceView, ScopedProtectedResourceView, ReadWriteScopedResourceView from .token...
bleib1dj/django-oauth-toolkit
oauth2_provider/views/__init__.py
Python
bsd-2-clause
380
import xlrd import xlsxwriter from random import * mmc4_workbook = xlrd.open_workbook('/Users/dakotakim/Desktop/pySpear_Script/mmc4.xlsx') supp_workbook = xlrd.open_workbook('/Users/dakotakim/Desktop/pySpear_Script/dakota_supp_table.xlsx') mmc4_sheet = mmc4_workbook.sheet_by_index(0) supp_sheet = supp_workbook.sheet_...
GhostScientist/Setlur_Scripts
permutation/permute.py
Python
mit
3,206
default_app_config = "omero_webtagging_autotag.apps.AutotagAppConfig"
MicronOxford/webtagging
autotag/omero_webtagging_autotag/__init__.py
Python
agpl-3.0
70
# -*- 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-certificate-manager
samples/generated_samples/certificatemanager_v1_generated_certificate_manager_create_dns_authorization_async.py
Python
apache-2.0
1,908
def main(request, response): response.add_required_headers = False output = b"HTTP/1.1 220 YOU HAVE NO POWER HERE\r\n" output += b"Content-Length: 22\r\n" output += b"Content-Type: x/x\r\n" output += request.GET.first(b"nosniff") + b"\r\n" output += b"\r\n" output += b"// nothing to see her...
scheib/chromium
third_party/blink/web_tests/external/wpt/fetch/nosniff/resources/nosniff.py
Python
bsd-3-clause
394
""" relation between the length of material coiled around cylinder and its width (toilet paper) http://math.stackexchange.com/questions/1633704/the-length-of-toilet-roll """ import numpy as np x = 1 # width of one sheet w = 80 #partial radius (total radius - minus radius of paper tube) r = 30 # radius of paper tub...
jboissard/mathExperiments
toiletRoll.py
Python
apache-2.0
357
from pytabs.apps.apps import AbstractApp from pytabs.tabs import AbstractTabContent from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QMainWindow class ConsoleApp(AbstractApp): def __init__(self, mainWindow: QMainWindow): super().__init__('Console', QIcon('pytabs/resources/console.png'), mainWin...
justin88/pytabs
apps/consoleApp.py
Python
mit
2,354
MEDIUM_DIM = 'rt:medium'
mirkochip/hostinguard
src/common/google/dimensions.py
Python
gpl-3.0
24
#------------------------------------------------------------------------------ # subclass.py (Section 9.1 and 9.2) #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Copyright 2017, 2018, Oracle and/or its a...
kawamon/hue
desktop/core/ext-py/cx_Oracle-6.4.1/samples/tutorial/subclass.py
Python
apache-2.0
873
# # 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...
ueshin/apache-spark
python/pyspark/pandas/utils.py
Python
apache-2.0
35,281
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ This module implements symmetry-related structure forms. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __vers...
sonium0/pymatgen
pymatgen/symmetry/structure.py
Python
mit
2,494
default_app_config = "gallery.apps.GalleryConfig"
cdriehuys/chmvh-website
chmvh_website/gallery/__init__.py
Python
mit
50
from __future__ import unicode_literals import dateutil.parser def parse_iso_datetime(str): """ Parses an ISO-formatted datetime string in any time zone and returns in UTC timezone. :param str: Example, '2013-03-01T01:01:01Z' """ return dateutil.parser.parse(str).astimezone(dateutil.tz.t...
lucastan/django-starter-box
djbase/utils/__init__.py
Python
mit
328
# -*- coding: utf-8 -*- import codecs import os import shutil import sys import time from seleniumbase.config import settings from seleniumbase.fixtures import constants def log_screenshot(test_logpath, driver, screenshot=None, get=False): screenshot_name = settings.SCREENSHOT_NAME screenshot_path = "%s/%s" %...
seleniumbase/SeleniumBase
seleniumbase/core/log_helper.py
Python
mit
16,301
#!/usr/bin/env python3 # Written by Devon Mack April-May 2017 # This program takes a 5 parameters in the config file and runs a SNVPhyl in galaxy fully automatically # Parameters (when it doubt, delete the config.json file and the program will create it for you with defaults): # config.json # api_key: The API key wh...
OLC-LOC-Bioinformatics/auto-SNVPhyl
main.py
Python
mit
26,280
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkgutil import urlparse import logging import urllib2 import time import re from argparse import ArgumentParser __all__ = ['main'] gfwlist_url = 'https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt' def parse_args(): parser = ArgumentParser...
nucbill/gfwlist2dnsmasq
gfwlist2dnsmasq/main.py
Python
mit
5,841
""" 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 use this ...
arenadata/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HDFS/package/scripts/hdfs.py
Python
apache-2.0
6,034
## @package download # Module caffe2.python.models.download from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import os import sys import signal import re import json from caffe2.proto import caffe2_pb2 ...
ryfeus/lambda-packs
pytorch/source/caffe2/python/models/download.py
Python
mit
7,768