text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.login, name='login'), ]
TrivialBox/HackatonUPS2016
helpfriends/login/urls.py
Python
mit
114
0.008772
#!/usr/bin/env python import argparse import errno import hashlib import os import shutil import subprocess import sys import tempfile from io import StringIO from lib.config import PLATFORM, get_target_arch, get_env_var, s3_config, \ get_zip_name from lib.util import electron_gyp, execute, ge...
rreimann/electron
script/upload.py
Python
mit
8,894
0.011806
"""Support for Balboa Spa Wifi adaptor.""" from __future__ import annotations import asyncio from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, FAN_HIGH, FAN_LOW, FAN_MEDIUM, FAN_OFF, HVAC_MO...
home-assistant/home-assistant
homeassistant/components/balboa/climate.py
Python
apache-2.0
5,803
0.001206
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring import logging from datetime import datetime from sqlalchemy import Column, DateTime from flexget import db_schema, plugin from flexg...
tobinjt/Flexget
flexget/plugins/operate/version_checker.py
Python
mit
3,855
0.001556
from test_oop import * from beliefs.referent import * import sys TaxonomyCell.initialize(sys.modules[__name__]) m = MusicalThing() print m t = TaxonomyCell() t.to_dot()
EventTeam/beliefs
test_oop/__init__.py
Python
gpl-2.0
171
0.005848
# Lesson 3 # If arguments n3 or later aren't provided by the caller, they'll use a default value instead def add(n1, n2, n3=0, n4=0, n5=0, n6=0): # (We'll learn a better way to do something like this later) return n1 + n2 + n3 + n4 + n5 + n6 print(add(1, 2, 3, 4)) # We can explicitly fulfil arguments out of ...
JonTheBurger/python_class
chapter 3/lessons/default_arguments.py
Python
mit
383
0.007833
############################################################################### # PowerSphericalPotentialwCutoff.py: spherical power-law potential w/ cutoff # # amp # rho(r)= --------- e^{-(r/rc)^2} # r^\alpha ###########...
followthesheep/galpy
galpy/potential_src/PowerSphericalPotentialwCutoff.py
Python
bsd-3-clause
6,813
0.011449
import logging import sys from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from cms.models import Page, PagePermission from django_cms_tools.fixtures.pages import CmsPageCreator # https://github.com/jed...
wearehoods/django-model-publisher-ai
publisher_test_project/fixtures.py
Python
bsd-3-clause
6,789
0.003535
#!/usr/bin/python # Copyright: (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gregdek/ansible
lib/ansible/modules/source_control/gitlab_group.py
Python
gpl-3.0
7,470
0.002544
import sys, psutil, subprocess, time from PyQt4 import QtGui global config def kill(proc_pid): try: process = psutil.Process(proc_pid) for proc in process.children(recursive=True): proc.kill() process.kill() except Exception as e: print "Can't kill process",proc_pid,...
satiros12/MassHydra
brute-gui.py
Python
mit
4,425
0.011299
class PublishService(): def __init__(self, providers, experiment): self.rc_providers = providers self.experiment = experiment self.provider = self._get_provider() def _get_provider(self): from tardis.tardis_portal.publish.provider.rifcsprovider import RifCsProvider...
steveandroulakis/mytardis
tardis/tardis_portal/publish/publishservice.py
Python
bsd-3-clause
2,367
0.008872
from nicepy.assertions import * from nicepy.decorators import * from nicepy.shortcuts import * from nicepy.utils import *
katakumpo/nicepy
nicepy/__init__.py
Python
mit
122
0
from myfitnesspal.client import Client # noqa __version__ = "1.16.6" VERSION = tuple(int(v) for v in __version__.split("."))
coddingtonbear/python-myfitnesspal
myfitnesspal/__init__.py
Python
mit
128
0
# -*- coding: utf-8 -*- # $Id: fi.py 7119 2011-09-02 13:00:23Z milde $ # Author: Asko Soukka <asko.soukka@iki.fi> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files ...
idea4bsd/idea4bsd
python/helpers/py3only/docutils/parsers/rst/languages/fi.py
Python
apache-2.0
3,541
0.001412
from .load_samples import load_sample_group_dsi, load_sample_group_fmri, load_sample_group_qball import numpy as np import bct def test_nbs_dsi_qbi(): q = load_sample_group_qball() d = load_sample_group_dsi() _nbs_helper(q, d, .5, atol=0.3) def test_nbs_paired_dsi_qbi(): pass def test_nbs_dsi_fmri...
aestrivex/bctpy
test/nbs_test.py
Python
gpl-3.0
779
0.001284
#!/usr/bin/python # -*- coding: utf-8 -*- # Execution example : python generate_zips.py "path/to/folder/to/zip" "path/to/csv/inventory/file" "survey_name" # # Libs # import csv, logging, os, sys, zipfile, zlib # # Config # log_folder = 'log' log_level = logging.DEBUG ignored_extensions = ['jp2', 'j2k', 'jpf', 'jpx', ...
CDSP/generate_zips
generate_zips.py
Python
gpl-3.0
5,314
0.026177
#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Post-Process to CouchPotato, SickBeard, NzbDrone, Mylar, Gamez, HeadPhones. # # This script sends the download to your automated media...
DxCx/nzbToMedia
nzbToGamez.py
Python
gpl-3.0
2,702
0.011843
from __future__ import division import itertools as it import numpy as np import scipy.linalg as sl import matplotlib.pyplot as plt import csv import sys from zdict import zdict # hbar^2/2m in eV-Ang^2 hb2m0 = 3.807 # hcR_infty (eV per Rydberg) Ry = 13.60569253 def mag2(V): """ Return the magnitude squared of a ...
gregvw/EPM-FCC-bulk
epm.py
Python
mit
4,240
0.020755
""" Copyright 2018-present Airbnb, 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 to in writing, sof...
airbnb/streamalert
tests/unit/streamalert/apps/test_apps/test_aliyun.py
Python
apache-2.0
7,474
0.002141
# GONZO: A PYTHON SCRIPT TO RECORD PHP ERRORS INTO MONGO # Michael Vendivel - vendivel@gmail.com import subprocess import datetime from pymongo import MongoClient # where's the log file filename = '/path/to/php/logs.log' # set up mongo client client = MongoClient('mongo.server.address', 27017) # which DB db = clien...
mven/gonzo.py
gonzo.py
Python
mit
888
0.023649
#!/usr/bin/env python # coding: utf-8 """ multiprocessTask.py ~~~~~~~~~~~~~~~~~~~ a multiprocess model of producer/consumer task = Task(work_func, 1, 3, counter=0, a='', callback=cb) results = task.run() for i in xrange(26): lines = ["%d" % i] * random.randint(10, 20) task.put(l...
Vito2015/pyextend
pyextend/core/thread/multiprocessTask.py
Python
gpl-2.0
6,887
0.001452
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-30 01:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='USER', ...
meliora000/eb_django_app
django_eb/users/migrations/0001_initial.py
Python
mit
796
0.001256
#!/usr/bin/env python2 # Copyright (c) 2019 Erik Schilling # 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 ...
mpeuster/son-emu
examples/performance_measurements/osm_component_startup.py
Python
apache-2.0
3,883
0.000258
#!/usr/bin/env python # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
googleads/googleads-python-lib
examples/adwords/v201809/advanced_operations/add_ad_customizer.py
Python
apache-2.0
8,193
0.006713
# coding: utf8 from __future__ import unicode_literals import unittest import dotdot from pubs.query import (AuthorFilter, CitekeyFilter, FieldFilter, YearFilter, _query_block_to_filter, get_paper_filter, InvalidQuery) from pubs.paper import Paper import fixtures doe...
pubs/pubs
tests/test_queries.py
Python
lgpl-3.0
9,022
0.001331
'''author@esilgard''' # # Copyright (c) 2014-2016 Fred Hutchinson Cancer Research Center # # Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 # from OneFieldPerReport import OneFieldPerReport import global_strings as gb class Pathologist(OneFieldPerReport): ''' extract the...
esilgard/BreastMR
fhcrc_pathology/Pathologist.py
Python
apache-2.0
744
0.005376
r""" Modeling and inversion of temperature residuals measured in wells due to temperature perturbations in the surface. Perturbations can be of two kinds: **abrupt** or **linear**. Forward modeling of these types of changes is done with functions: * :func:`~fatiando.geothermal.climsig.abrupt` * :func:`~fatiando.geot...
eusoubrasileiro/fatiando_seismic
fatiando/geothermal/climsig.py
Python
bsd-3-clause
7,793
0
""" Auto Configuration Helper """ import logging import os import requests from urlparse import urlparse from constants import InsightsConstants as constants from cert_auth import rhsmCertificate from connection import InsightsConnection from config import CONFIG as config logger = logging.getLogger(__name__) APP_NAM...
wcmitchell/insights-core
insights/client/auto_config.py
Python
apache-2.0
7,561
0.000265
import cmd import json import termcolor from struct_manager import createEmptyCommandGroup, createEmptyStruct, createEmptyCommand from populator import populateDict class EditorShell ( cmd.Cmd ) : def __init__ ( self, file ) : cmd.Cmd.__init__(self) self.file = file # self.struct = json.load ( self.file ) ...
operatorequals/gatheros
gatheros/editor/cmd_interface.py
Python
bsd-3-clause
3,370
0.07092
import networkx as nx class Roadmap(nx.Graph): def __init__(self, gd, max_dist, *args, **kwargs): self.gd = gd self.max_dist = max_dist nx.Graph.__init__(self, *args, **kwargs) def insert(self, sample): self.gd.insert(sample) for smpl in self.gd.get_nearest(sample): ...
wallarelvo/racer
racer/roadmap.py
Python
apache-2.0
539
0
#!/usr/bin/env python # 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. """Audio tools for recording and analyzing audio. The audio tools provided here are mainly to: - record playing audio. - remove si...
loopCM/chromium
chrome/test/functional/media/audio_tools.py
Python
bsd-3-clause
6,222
0.010125
#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Written to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved ###############Credits#########################...
thinkasoft/ProyectoRD-dev
l10n_ve_withholding_islr/__init__.py
Python
agpl-3.0
1,587
0.002522
from math import pi import pandas as pd from bokeh.sampledata.stocks import MSFT from bokeh.plotting import * df = pd.DataFrame(MSFT)[:50] df['date'] = pd.to_datetime(df['date']) mids = (df.open + df.close)/2 spans = abs(df.close-df.open) inc = df.close > df.open dec = df.open > df.close w = 12*60*60*1000 # half d...
sahat/bokeh
examples/plotting/cloud/candlestick.py
Python
bsd-3-clause
853
0.009379
from __future__ import absolute_import, division, print_function import os class Config(object): """ Default configuration """ DEBUG = False APPR_URI = os.getenv('APPR_URI', "http://localhost:5000") class ProductionConfig(Config): """ Production configuration """ APPR_URI = "http://localhost:50...
cn-app-registry/cnr-server
appr/api/config.py
Python
apache-2.0
545
0
# Module: macchanger.py # Description: Wrapper for built-in linux tool macchanger. # Author: Nick Sanzotta/@Beamr # Version: v 1.09252017 try: import os, sys, time from subprocess import Popen, PIPE from theme import * except Exception as e: print('\n [!] MACCHANGE - Error: ' % (e)) sys.exit(1) def macRandom(int...
NickSanzotta/WiFiSuite
wifisuite/helpers/macchange.py
Python
mit
1,617
0.019171
#!/usr/bin/env python2 # # Yapps 2 - yet another python parser system # Copyright 1999-2003 by Amit J. Patel <amitp@cs.stanford.edu> # # This version of Yapps 2 can be distributed under the # terms of the MIT open source license, either found in the LICENSE file # included with the Yapps distribution # <http://theory....
swesterfeld/beast
yapps2_deb/yapps2.py
Python
lgpl-2.1
4,135
0.006288
import re from collections import namedtuple # this is almost a validating expression, it could certainly be simpler by just using [^/]* inside the groups chargeDef = r"(/q[\-\+0-9;\*mMnNi]*)?" protonationDef = r"(/p[\-\+0-9,;]*)?" isotopeDef = r"(/i[\-\+0-9,;HDT]*(?:/h[0-9HDT]+)*)?" stereoBondDef=r"(/b[\-\+0-9,\?\*;...
nbateshaus/chem-search
inchi-split/splitter.py
Python
bsd-3-clause
9,306
0.016548
# Copyright (C) 2016 Intel Corporation # Released under the MIT license (see COPYING.MIT) from functools import wraps class OETestDecorator(object): case = None # Reference of OETestCase decorated attrs = None # Attributes to be loaded by decorator implementation def __init__(self, *args, **kwargs): ...
alimon/oeqa2
oeqa2/test/decorator/__init__.py
Python
mit
1,356
0.007375
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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...
djrscally/eve-wspace
evewspace/POS/models.py
Python
gpl-3.0
7,280
0.003846
# ---------------------------------------------------------------------- # 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...
mrcslws/nupic.research
packages/backprop_structure/src/nupic/research/frameworks/backprop_structure/networks/alexnet_kwinners.py
Python
agpl-3.0
5,250
0
try: from astropy.models import ParametricModel,Parameter,_convert_input,_convert_output import numpy as np class PowerLawModel(ParametricModel): param_names = ['scale', 'alpha'] def __init__(self, scale, alpha, param_dim=1): self._scale = Parameter(name='scale', val=scale, mcl...
vlas-sokolov/pyspeckit
pyspeckit/spectrum/models/astropy_models.py
Python
mit
1,575
0.008889
#!/usr/bin/env python # -*- coding: utf-8 -*-""" # Temperature conversion constants KELVIN_OFFSET = 273.15 FAHRENHEIT_OFFSET = 32.0 FAHRENHEIT_DEGREE_SCALE = 1.8 # Wind speed conversion constants MILES_PER_HOUR_FOR_ONE_METER_PER_SEC = 2.23694 KM_PER_HOUR_FOR_ONE_METER_PER_SEC = 3.6 KNOTS_FOR_ONE_METER_PER_SEC = 1.943...
csparpa/pyowm
pyowm/utils/measurables.py
Python
mit
7,259
0.000276
from decimal import Decimal import re import web r_row = re.compile(r'<tr>(.*?)</tr>', re.S) r_td = re.compile(r'<td v[^>]+>([^<]*)</td>') r_member = re.compile(r'member=([^"]+)">([^<]+)<') def fixdec(d): d = d.strip() return Decimal(d) and Decimal(d)/100 def parse_doc(d): for row in r_row.findall(d): ...
aaronsw/watchdog
import/parse/punch.py
Python
agpl-3.0
1,090
0.008257
from django.core.management.base import BaseCommand from milkyway.models import Challenge, Hint, Category, Flag import yaml class Command(BaseCommand): help = 'Load data from yaml file' def add_arguments(self, parser): parser.add_argument('dataset', type=str) def handle(self, *args, **options): ...
galaxy-ctf/milky-way
milkyway/management/commands/load_chals.py
Python
agpl-3.0
1,410
0
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
HaebinShin/tensorflow
tensorflow/contrib/metrics/python/metrics/classification.py
Python
apache-2.0
2,307
0.002167
#----------------------------------------------------------- # Threaded, Gevent and Prefork Servers #----------------------------------------------------------- import datetime import errno import logging import os import os.path import platform import psutil import random import resource import select import signal im...
trabacus-softapps/openerp-8.0-cc
openerp/service/server.py
Python
agpl-3.0
32,015
0.003155
from abc import ABCMeta, abstractmethod import six from django.db.models import Q from dimagi.utils.chunked import chunked class DomainFilter(six.with_metaclass(ABCMeta)): @abstractmethod def get_filters(self, domain_name): """Return a list of filters. Each filter will be applied to a queryset indep...
qedsoftware/commcare-hq
corehq/apps/dump_reload/sql/filters.py
Python
bsd-3-clause
1,812
0.002208
from __future__ import with_statement import datetime import logging import pytz import rdflib from django.conf import settings from humfrey.update.transform.base import Transform from humfrey.update.uploader import Uploader from humfrey.sparql.endpoint import Endpoint from humfrey.utils.namespaces import NS logge...
ox-it/humfrey
humfrey/update/transform/upload.py
Python
bsd-3-clause
2,982
0.001341
#!/usr/bin/env python3 import copy import matplotlib.pyplot as plt import numpy as np import pytest from pysisyphus.plotters.AnimPlot import AnimPlot from pysisyphus.calculators.MullerBrownPot import MullerBrownPot #from pysisyphus.calculators.MullerBrownSympyPot import MullerBrownPot from pysisyphus.cos.NEB import ...
eljost/pysisyphus
tests_staging/test_mullerbrownpot.py
Python
gpl-3.0
6,681
0.002994
# coding=utf-8 # Copyright (C) 2014 Stefano Guglielmetti # 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 prog...
amicojeko/YouCantTouchThis
sendemail.py
Python
gpl-3.0
2,259
0.009296
import os.path from twisted.trial import unittest from allmydata.util import configutil from allmydata.test.no_network import GridTestMixin from ..scripts import create_node from .. import client class ConfigUtilTests(GridTestMixin, unittest.TestCase): def test_config_utils(self): self.basedir = "cli/C...
david415/tahoe-lafs
src/allmydata/test/test_configutil.py
Python
gpl-2.0
3,451
0.00058
import sys import os import re import imp from Tkinter import * import tkSimpleDialog import tkMessageBox import webbrowser from idlelib.MultiCall import MultiCallCreator from idlelib import idlever from idlelib import WindowList from idlelib import SearchDialog from idlelib import GrepDialog from idlelib import Repla...
ianyh/heroku-buildpack-python-opencv
vendor/.heroku/lib/python2.7/idlelib/EditorWindow.py
Python
mit
66,031
0.001817
"""Test calculate module""" from chanjo.store.models import Sample def test_mean(populated_db): """Test for calculating mean coverage""" # GIVEN a database loaded with 2 samples assert Sample.query.count() == 2 # WHEN calculating mean values across metrics query = populated_db.mean() # THEN t...
robinandeer/chanjo
tests/test_calculate.py
Python
mit
2,295
0
#!/usr/bin/python # -*- encoding: utf-8 -*- # # Print the sequence of function calls from the Imperas trace file. # import sys, string, subprocess, bisect if len(sys.argv) != 3: print "Usage: simtrace file.trace vmunix.elf" sys.exit (1) # Extract the list of symbols from the binary executable. nm_command = su...
sergev/vak-opensource
languages/python/simtrace.py
Python
apache-2.0
3,176
0.007557
# I have to modify droidbox scripts to let it work with droidbot # This is a compatible version which generate a report with the same format of original DroidBox __author__ = 'yuanchun' ################################################################################ # (c) 2011, The Honeynet Project # Author: Patrik La...
nastya/droidbot
droidbox_scripts/droidbox_compatible.py
Python
mit
24,119
0.006468
# -*- coding: UTF-8 -* ''' Created on 2015年1月18日 @author: RobinTang ''' try: import Image, ImageDraw, ImageFont, ImageFilter except: pass try: from PIL import Image, ImageDraw, ImageFont, ImageFilter except: pass import StringIO filters = { ('blur', ImageFilter.BLUR, '模糊滤镜'), ('contour', Imag...
sintrb/urlimg
img/funs.py
Python
gpl-2.0
2,541
0.006528
from selenium.webdriver import Firefox from selenium.webdriver.common.by import By driver_class = Firefox implicit_timeout = 30 wait_timeout = 30 default_search_type = By.ID try: from local_webium_settings import * except ImportError: pass
drptbl/webium
webium/settings.py
Python
apache-2.0
251
0
from bson import ObjectId import simplejson as json from eve.tests import TestBase from eve.tests.test_settings import MONGO_DBNAME from eve.tests.utils import DummyEvent from eve import STATUS_OK, LAST_UPDATED, ID_FIELD, ISSUES, STATUS, ETAG from eve.methods.patch import patch_internal class TestPatch(TestBase): ...
jzorrof/eve
eve/tests/methods/patch.py
Python
bsd-3-clause
25,507
0
# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 conditions ...
jhajek/euca2ools
euca2ools/commands/ec2/describebundletasks.py
Python
bsd-2-clause
2,642
0
from django import forms from oldcontrib.media.document.models import Document class DocumentUpload(forms.ModelForm): class Meta: model = Document fields = ('document',)
servee/django-servee-oldcontrib
oldcontrib/media/document/forms.py
Python
bsd-3-clause
190
0.010526
import json import socket from comms_manager import CommsManager from constants import * class BoardManager: def __init__(self, args): self.server_address = (args.IP, args.PORT) self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.settimeout(15) self.sock.connec...
TeamProxima/predictive-fault-tracker
board/board_manager.py
Python
mit
2,638
0.003412
"""Process `site.json` and bower package tools.""" import os import json import subprocess from functools import partial import importlib import sys from flask import Flask, render_template, g, redirect, current_app from gitloader import git_show from import_code import import_code try: from app import app exce...
cacahootie/deckmaster
deckmaster/app/process_site.py
Python
mit
4,475
0.007374
""" Test class for Pilot """ # pylint: disable=protected-access, missing-docstring, invalid-name, line-too-long # imports import unittest import json import stat import sys import os import shutil from Pilot.pilotTools import PilotParams from Pilot.pilotCommands import CheckWorkerNode, ConfigureSite, NagiosProbes ...
wkrzemien/Pilot
Pilot/tests/Test_Pilot.py
Python
gpl-3.0
4,260
0.006103
import scipy.io import scipy.signal import os import sys import matplotlib import pandas as pd import numpy as np import random # Load a matlab file into a data panel # subject = Patient_N or Dog_N # segment_type = interictal, ictal, or test # downsample = True or False # train_fraction = 0 < # <1, fraction of data to...
DryRun/seizures
code/dataIO.py
Python
gpl-3.0
3,438
0.041303
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
xlqian/navitia
source/jormungandr/jormungandr/exceptions.py
Python
agpl-3.0
5,255
0.001713
#!/usr/bin/env python from __future__ import unicode_literals from setuptools import setup setup( name='xcache', version='0.2', description='clean caches when needed', author='Sven R. Kunze', author_email='srkunze@mail.de', url='https://github.com/srkunze/xcache', license='MIT', class...
srkunze/xcache
setup.py
Python
mit
573
0
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Currency' db.create_table(u'currency_currency', ( ('iso_code', self.gf('django.d...
pombredanne/1trillioneuros
webapp/currency/migrations/0001_initial.py
Python
gpl-3.0
1,131
0.006189
from django.utils import unittest from spacescout_web.test.not_found import NotFound404Test from spacescout_web.test.url_filtering import URLFiltering
uw-it-aca/spacescout_web
spacescout_web/tests.py
Python
apache-2.0
152
0
from trex_astf_lib.api import * # IPV6 tunable example # # ipv6.src_msb # ipv6.dst_msb # ipv6.enable # class Prof1(): def __init__(self): pass def get_profile(self, **kwargs): # ip generator ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.0", "16.0.0.255"], distribution="seq") ...
kisel/trex-core
scripts/astf/param_tcp_rxbufsize_8k.py
Python
apache-2.0
1,298
0.006163
# pylint: skip-file import datetime import json import sys from unittest import mock from unittest.mock import Mock, patch import ddt import pytest from django.test import RequestFactory, TestCase from django.urls import reverse from edx_django_utils.cache import RequestCache from opaque_keys.edx.keys import CourseK...
stvstnfrd/edx-platform
lms/djangoapps/discussion/django_comment_client/tests/test_utils.py
Python
agpl-3.0
78,549
0.002928
# # colors.py -- color definitions # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import re color_dict = { 'aliceblue': (0.9411764705882353, 0.9725490196078431, 1.0...
eteq/ginga
ginga/colors.py
Python
bsd-3-clause
48,361
0.000186
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
MostlyOpen/odoo_addons
myo_base/__openerp__.py
Python
agpl-3.0
1,788
0
from core.techniques.LFIExec import LFIExec from base64 import b64encode class LFIDataURI (LFIExec): files_exec = [ # input { 'path' : '', 'type' : 'data_uri' }, ] # find LFI code execution path def check (self): return super(LFIDataURI, self)._check (prepare_check_data_uri) ...
m101/lfipwn
core/techniques/LFIDataURI.py
Python
agpl-3.0
1,128
0.018617
# Copyright 2020 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...
frreiss/tensorflow-fred
tensorflow/python/keras/engine/deferred_sequential_test.py
Python
apache-2.0
8,563
0.003503
# Copyright 2008 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by applicable law or a...
ryantierney513/capirca
tests/lib/cisco_test.py
Python
apache-2.0
23,978
0.001877
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta 4 # Copyright 2015 tvalacarta@gmail.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # --...
neno1978/pelisalacarta
python/main-classic/channels/trailertools.py
Python
gpl-3.0
26,400
0.005538
# coding: utf-8 import unittest import jokekappa class VoidTest(unittest.TestCase): def test_void(self): pass
CodeTengu/jokekappa
tests/test_core.py
Python
mit
127
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2014 University of Dundee & Open Microscopy Environment. # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foun...
simleo/openmicroscopy
components/tools/OmeroWeb/omeroweb/webclient/show.py
Python
gpl-2.0
37,362
0.00008
# TODO: Temporarily disabled due to importing old code into openshift-ansible # repo. We will work on these over time. # pylint: disable=bad-continuation,missing-docstring,no-self-use,invalid-name,no-value-for-parameter import click import os import re import sys from ooinstall import openshift_ansible from ooinstall ...
menren/openshift-ansible
utils/src/ooinstall/cli_installer.py
Python
apache-2.0
31,431
0.003213
from simple_model import *
grollins/foldkin
foldkin/simple/__init__.py
Python
bsd-2-clause
27
0
# SecuML # Copyright (C) 2016 ANSSI # # SecuML 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. # # SecuML is distributed in the hope t...
ah-anssi/SecuML
SecuML/core/DimensionReduction/Algorithms/Projection/Itml.py
Python
gpl-2.0
1,021
0
""" :copyright: (c) 2015 by OpenCredo. :license: GPLv3, see LICENSE for more details. """ from pymongo import MongoClient, DESCENDING, ASCENDING import logging from bson.objectid import ObjectId from stubo.utils import asbool from stubo.model.stub import Stub import hashlib import time import motor import os ...
Stub-O-Matic-BA/stubo-app
stubo/model/db.py
Python
gpl-3.0
23,064
0.002688
# from index import db # class MyObject(): # def __init__(self): # pass # @staticmethod # def get_something(arg1, arg2): # return something
tferreira/Flask-Redis
application/models.py
Python
mit
170
0
n = 1 while n <= 100: if (n % 3 == 0 and n % 5 == 0): print "FizzBuzz" elif (n % 3 == 0): print "Fizz" elif (n % 5 == 0): print "Buzz" else: print n n += 1
CorySpitzer/FizzBuzz
everest/FizzBuzz.py
Python
mit
175
0.091429
""" The parameters class. It is initialized with the vehicle's attributes at time of construction but it is constantly updated through attribute listeners after calling the add_listeners() function These parameters can provide the basic info for a future collision avoidance scheme. Any functions that can refer to th...
LeonNie52/dk-plus
test files/params.py
Python
gpl-3.0
13,072
0.008415
# -*- coding: utf-8 -*- """ This file is part of pyCMBS. (c) 2012- Alexander Loew For COPYING and LICENSE details, please refer to the LICENSE file """ from cdo import Cdo from pycmbs.data import Data import tempfile as tempfile import copy import glob import os import sys import ast import numpy as np from pycmbs.be...
pygeo/pycmbs
pycmbs/benchmarking/models/cmip5.py
Python
mit
20,505
0.003755
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-5, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and condition...
metaml/nupic.core
ci/travis/deploy-wheel-to-s3.py
Python
agpl-3.0
1,831
0.0071
from test import test_support import unittest nis = test_support.import_module('nis') class NisTests(unittest.TestCase): def test_maps(self): try: maps = nis.maps() except nis.error, msg: # NIS is probably not active, so this test isn't useful self.sk...
j5shi/Thruster
pylibs/test/test_nis.py
Python
gpl-2.0
1,215
0.003292
from __future__ import print_function import numpy as np import pandas as pd from bokeh.browserlib import view from bokeh.document import Document from bokeh.embed import file_html from bokeh.glyphs import Circle, Line from bokeh.objects import ( ColumnDataSource, Glyph, Grid, GridPlot, LinearAxis, Plot, Range1d ...
the13fools/Bokeh_Examples
glyphs/anscombe.py
Python
bsd-3-clause
3,251
0.021839
# # Base object of all payload sources. # # Copyright (C) 2019 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is ...
atodorov/anaconda
pyanaconda/modules/payloads/source/source_base_interface.py
Python
gpl-2.0
1,817
0.001101
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Common/Shared code related to the Settings dialog # Copyright (C) 2010-2018 Filipe Coelho <falktx@falktx.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 Softw...
falkTX/Cadence
src/shared_settings.py
Python
gpl-2.0
12,056
0.004728
#!/usr/bin/env python import subprocess """ A ssh based command dispatch system """ machines = ["10.0.1.40", "10.0.1.50", "10.0.1.51", "10.0.1.60", "10.0.1.80"] cmd = "python /src/fingerprint.py" for machine in machines: subprocess.call("ssh root@%s %s" % (machine, cmd), shell=True)
lluxury/P_U_S_A
8_OS_Soup/code/dispatch1.py
Python
mit
297
0.016835
#!/usr/bin/env python3 # Update plural forms expressions from the data collected by Unicode Consortium # (see http://www.unicode.org/cldr/charts/supplemental/language_plural_rules.html), # but from a JSON version by Transifex folks import os.path import sys import urllib.request import re import gettext import json i...
vslavik/poedit
scripts/extract-fileviewer-mappings.py
Python
mit
3,349
0.008361
"""Provides device triggers for lutron caseta.""" from __future__ import annotations from typing import Any import voluptuous as vol from homeassistant.components.automation import ( AutomationActionType, AutomationTriggerInfo, ) from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHE...
Danielhiversen/home-assistant
homeassistant/components/lutron_caseta/device_trigger.py
Python
apache-2.0
8,121
0.000739
# Copyright 2020 John Hanley. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribut...
jhanley634/testing-tools
problem/weblog/prefix/ip_addr.py
Python
mit
5,425
0.00129
"""Automated tests for entering CDI forms manually. Copyright (C) 2014 A. Samuel Pottinger ("Sam Pottinger", gleap.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...
Samnsparky/cdibase
prog_code/controller/enter_data_controllers_test.py
Python
gpl-3.0
28,902
0.001799
# $File: _ext_type.py # $Date: Wed Feb 22 15:04:06 2012 +0800 # # Copyright (C) 2012 the pynojo development team <see AUTHORS file> # # Contributors to this file: # Kai Jia <jia.kai66@gmail.com> # # This file is part of pynojo # # pynojo is free software: you can redistribute it and/or modify # it under the terms ...
zxytim/pynojo
pynojo/model/_ext_type.py
Python
gpl-3.0
2,330
0.003863
__author__ = 'Joe Linn' from . import abstract class MatchAll(abstract.AbstractQuery): def __init__(self): super(MatchAll, self).__init__() self._params = {}
jlinn/pylastica
pylastica/query/matchall.py
Python
apache-2.0
180
0.005556
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- # -------------------------------------------------------- # R*CNN # Wri...
gkioxari/RstarCNN
lib/attr_data_layer/layer.py
Python
bsd-2-clause
5,647
0.000708
# Copyright 2018 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...
xodus7/tensorflow
tensorflow/contrib/lite/python/lite_test.py
Python
apache-2.0
45,063
0.003107