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
import _plotly_utils.basevalidators class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.ternary.baxis", **kwargs ): super(NticksValidator, self).__init__( plotly_name=plotly_name, parent_nam...
plotly/plotly.py
packages/python/plotly/plotly/validators/layout/ternary/baxis/_nticks.py
Python
mit
459
0.002179
from pydatastream import Datastream import json import datetime import sys import os.path #hardcoded directories dir_input = "input/" dir_output = "output/" #check that the login credentials and input file location are being passed in numOfArgs = len(sys.argv) - 1 if numOfArgs != 3: print "Please run this python s...
jinser/automate_pydatastream
getcustom.py
Python
mit
3,917
0.038295
import unittest from .Weather_analyzer import is_not_number class BtcPriceTestCase(unittest.TestCase): def test_checking_of_input_in_form(self): input = 46 answer = is_not_number(input) # The bitcoin returned changes over time! self.assertEqual(answer, False)
AntonKuksov/Weather_analyzer
test_form.py
Python
gpl-3.0
300
0.006667
import datetime from django.shortcuts import render_to_response, get_object_or_404, HttpResponse, HttpResponseRedirect, Http404 from django.template import RequestContext from django.core.urlresolvers import reverse from articles.models import Article from taxonomy.models import TaxonomyMap from core.views ...
Kami/sgrstats.com
sgrstats/articles/views.py
Python
apache-2.0
1,447
0.026261
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2014 Sébastien Helleu <[email protected]> # # 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 opt...
guns/weechat
doc/docgen.py
Python
gpl-3.0
29,781
0.000067
from six import iteritems class Playlist: is_folder = False playlist_persistent_id = None parent_persistent_id = None distinguished_kind = None playlist_id = None def __init__(self, playListName=None): self.name = playListName self.tracks = [] def __iter__(self): f...
liamks/pyitunes
libpytunes/Playlist.py
Python
mit
470
0.002128
#!/usr/bin/python ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'version': '1.0'} DOCUMENTATION = ''' --- module: k5_novnc_console short_description: Display the URL to the NoVNC Console version_added: "1.0" description: - returns a URL to the noVN...
mohclips/k5-ansible-modules
k5_novnc_console.py
Python
gpl-3.0
5,289
0.008697
# -*- coding: utf-8 -*- """ The Yacas domain. :copyright: Copyright 2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from docutils import nodes from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.roles import XRefRole from sphinx...
martanoga/yacas
docs/util/yacasdomain.py
Python
lgpl-2.1
13,972
0.001288
import unittest from datetime import timedelta, datetime import sys import json sys.path.append("../../config") sys.path.append("../../html") import ghObjects import ghObjectRecipe class testObjects(unittest.TestCase): def setUp(self): # nothin yet self.test = "rad" def test_spawnHTML(self): # arrange spawn...
pwillworth/galaxyharvester
test/pyunit/testObjects.py
Python
gpl-3.0
2,899
0.029665
import json import dnot from mock import patch import unittest2 class NotifierTest(unittest2.TestCase): @patch("dnot.sns.connect_to_region") def test_parameters_are_submitted(self, connect_to_region_mock): topic = "abc" region = "eu-west-2" result_topic = "result" stack_name = ...
ImmobilienScout24/aws-deployment-notifier
src/unittest/python/notifier_tests.py
Python
apache-2.0
900
0.003333
from __future__ import unicode_literals from django.db import migrations, models import multiselectfield.db.fields class Migration(migrations.Migration): dependencies = [ ('user', '0018_auto_20160922_1258'), ] operations = [ migrations.AddField( model_name='userprofile', ...
defivelo/db
apps/user/migrations/0019_auto_20160922_1342.py
Python
agpl-3.0
1,161
0.001726
from __future__ import print_function import inspect import numpy as np import theano from ..layers.advanced_activations import LeakyReLU, PReLU from ..layers.core import Dense, Merge, Dropout, Activation, Reshape, Flatten, RepeatVector, Layer from ..layers.core import ActivityRegularization, TimeDistributedDense, Aut...
Cadene/keras
keras/utils/layer_utils.py
Python
mit
4,856
0.002265
import bpy from bpy.props import StringProperty, IntProperty, CollectionProperty, EnumProperty, BoolProperty, FloatProperty from bpy.types import PropertyGroup, UIList, Operator, Panel from bpy_extras.io_utils import ImportHelper from .rman_ui_base import _RManPanelHeader from ..rfb_utils import texture_utils from ..rf...
prman-pixar/RenderManForBlender
rman_ui/rman_ui_txmanager.py
Python
mit
27,755
0.00508
''' Created on Feb 23, 2015 @author: rgroten ''' import ConfigParser import ssl from datetime import datetime from flask.globals import g # Import NetApp API libraries from NaElement import NaElement from NaServer import NaServer # from flask.globals import g def connect(): try: _create_unverified_htt...
rgroten/NetApp-Snapshot-Manager
snapmgr/NaFunctions.py
Python
gpl-2.0
6,288
0.00493
from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext as _ from selvbetjening.sadmin2 import menu from selvbetjening.sadmin2.decorators import sadmin_prerequisites from selvbetjening.sadmi...
animekita/selvbetjening
selvbetjening/sadmin2/views/user.py
Python
mit
1,851
0.001621
# -*- coding: utf-8 -*- from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from inviMarket.models import User @login_required def del_partner(request, partner_id): """ Delete the :model:`auth.User`...
moiseshiraldo/inviMarket
inviMarket/views/del_partner.py
Python
agpl-3.0
1,187
0.001685
from typing import Iterable, Mapping, Optional from lib import data from ..channel import pyramid from ..channel import wall def filterMessage() -> Iterable[data.ChatCommand]: return [] def commands() -> Mapping[str, Optional[data.ChatCommand]]: if not hasattr(commands, 'commands'): setattr(comman...
MeGotsThis/BotGotsThis
pkg/spam/items/channel.py
Python
gpl-3.0
941
0
""" Class defining a production step """ from __future__ import absolute_import from __future__ import division from __future__ import print_function __RCSID__ = "$Id$" import json from DIRAC import S_OK, S_ERROR class ProductionStep(object): """Define the Production Step object""" def __init__(self, **k...
ic-hep/DIRAC
src/DIRAC/ProductionSystem/Client/ProductionStep.py
Python
gpl-3.0
2,408
0.000415
# coding=UTF8 from __future__ import absolute_import import os from celery import Celery from django.conf import settings os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mydjangoapp.settings") app = Celery('mydjangoapp') CELERY_TIMEZONE = 'UTC' app.config_from_object('django.conf:settings') app.autodiscover_task...
wenxinwilliam/docker-django-celery
mydjangoapp/mydjangoapp/celeryconf.py
Python
mit
354
0.002825
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'billdetails.end_date' db.alter_column(u'employee_billd...
asm-technologies/management
employee/migrations/0006_auto__chg_field_billdetails_end_date__chg_field_billdetails_start_date.py
Python
mit
4,781
0.008576
# -*- test-case-name: twisted.test.test_newcred -*- from twisted.internet import defer from twisted.python import components, failure from twisted.cred import error, credentials class ICredentialsChecker(components.Interface): """I check sub-interfaces of ICredentials. @cvar credentialInterfaces: A list of s...
fxia22/ASM_xf
PythonD/site_python/twisted/cred/checkers.py
Python
gpl-2.0
2,547
0.003141
# -*- 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 field 'Worker.ping_response_dts' db.add_column('job_runner_worker', 'ping_response_dts', ...
spilgames/job-runner
job_runner/apps/job_runner/migrations/0013_auto__add_field_worker_ping_response_dts.py
Python
bsd-3-clause
9,629
0.007789
from django.conf.urls import url from . import views urlpatterns = [ # ex: /album/ url(r'^$', views.index, name='index'), # ex: /album/create/ url(r'^welcome/$', views.welcome, name='welcome'), # ex: /album/create/ url(r'^create/$', views.create, name='create'), # ex: /album/vietnam_2016/ ...
AlexandreGuinaudeau/ClasseurPhoto
classeur_photo/classeur_photo/album/urls.py
Python
gpl-3.0
519
0.001927
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Lic...
egabancho/invenio
invenio/legacy/wsgi/__init__.py
Python
gpl-2.0
25,601
0.004336
import interact class EvtInteract(interact.Interact): def __init__(self): self.events = [] def checkEventInteraction(self, events): self.events = events self.checkInteraction()
m4nolo/steering-all
src/interact/evtInteract.py
Python
mit
196
0.015306
from . import ( Application, Category, Course, Designation, Major, Project, Requirement, User, Year, ) Application = Application.Application Category = Category.Category Course = Course.Course Designation = Designation.Designation Major = Major.Major Project = Project.Project Requir...
BunsenMcDubbs/cs4400-project
app/models/__init__.py
Python
mit
386
0
"""empty message Revision ID: 0047 add smtp Revises: 0046 remove long description Create Date: 2020-11-08 01:28:28.386704 """ # revision identifiers, used by Alembic. revision = '0047 add smtp' down_revision = '0046 remove long description' from alembic import op import sqlalchemy as sa def upgrade(): # ### c...
NewAcropolis/api
migrations/versions/0047.py
Python
mit
1,247
0.005613
# -*- coding: UTF-8 -*- # YaBlog # (c) Regis FLORET # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the fol...
regisf/yablog
blog/templatetags/__init__.py
Python
bsd-3-clause
1,525
0.001311
import numpy as np import os import pandas as pd import statsmodels.formula.api as smf import sys # @params: takes mobaid codes string # @returns: list of mobaid strings def splitCode(x): if type(x) is str: codes = x.split(',') return codes else: return [] # @returns binary T/F if string code is in string/lis...
DSSG-paratransit/main_repo
Access_Analysis_Project/Scripts/dwellTimeAnalysis.py
Python
agpl-3.0
4,203
0.025696
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'template.ui' # # Created: Sun Sep 18 19:19:10 2016 # by: pyside2-uic running on PySide2 2.0.0~alpha0 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWidgets class Ui_Form(object): def...
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/pyqtgraph/console/template_pyside2.py
Python
gpl-3.0
6,517
0.002302
# # # import requests from bs4 import BeautifulSoup import re import os def all_links(URL,abs=False,session=None): '''Generator function for all links in a page. ARGS: URL -> url of the page abs -> (True) returns actual 'href's of each <a> tag (False) process each 'href' to generate the full li...
RRostami/Spiderpy
spiderpy/core.py
Python
gpl-3.0
2,986
0.045211
from airflow.models import DAG from airflow.operators.dummy_operator import DummyOperator from datetime import datetime, timedelta from airflow.operators import PythonOperator from airflow.hooks import RedisHook from airflow.models import Variable from airflow.hooks import MemcacheHook from etl_tasks_functions import...
vipul-tm/DAG
dags-ttpl/subdags/utilization_kpi_subdag.py
Python
bsd-3-clause
17,641
0.03832
''' Various tools to interface with pyGSTi for running GST experiments. Created on May 16, 2018 Original Author: Guilhem Ribeill Copyright 2018 Raytheon BBN Technologies 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 ...
BBN-Q/QGL
QGL/GSTTools.py
Python
apache-2.0
7,229
0.004288
""" Based on http://vaig.be/2009/03/getting-client-os-in-django.html """ import re def client_os(user_agent): ''' Context processor for Django that provides operating system information base on HTTP user agent. A user agent looks like (line break added): "Mozilla/5.0 (X11; U; Linux i686; en-US; r...
Alwnikrotikz/marinemap
lingcod/common/uaparser/clientos.py
Python
bsd-3-clause
1,804
0.007206
import os class Config(object): SPOTIPY_REDIRECT_URI = os.environ['SPOTIPY_REDIRECT_URI'] SPOTIPY_CLIENT_ID = os.environ['SPOTIPY_CLIENT_ID'] SPOTIPY_CLIENT_SECRET = os.environ['SPOTIPY_CLIENT_SECRET'] SPOTIFY_ACCESS_SCOPE = 'playlist-modify-public playlist-modify-private playlist-read-private user-lib...
jzimbel/artist-expander
config.py
Python
mit
1,176
0.001701
""" This migration script adds a user actions table to Galaxy. """ from sqlalchemy import * from migrate import * import datetime now = datetime.datetime.utcnow import logging log = logging.getLogger( __name__ ) metadata = MetaData() def display_migration_details(): print "" print "This migration script ad...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/lib/galaxy/model/migrate/versions/0029_user_actions.py
Python
gpl-3.0
1,371
0.030635
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop try: import WebApp except ImportError, ImportWarning: import entire as WebApp if __name__ == "__main__": ip = os.environ['OPENSHIFT_DIY_IP'] port = int(os.environ['OPENSHIFT_DIY_PORT']) WebApp.application.listen(port,...
swoiow/iabe-tool
openshift.py
Python
mit
370
0.005405
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import shutil import time import subprocess import numpy as np from .phonopy_conf_creator import PhonopyConfCreator from vasp.poscar import Poscar from autotools import symlink_force class PhononCalculator(object): def _...
yuzie007/ph_analysis
ph_analysis/phonon_calculator.py
Python
mit
6,728
0.000297
# coding: utf-8 import sqlalchemy as sa import pandas as pd from niamoto.data_providers.base_occurrence_provider import \ BaseOccurrenceProvider from niamoto.exceptions import MalformedDataSourceError class SQLOccurrenceProvider(BaseOccurrenceProvider): """ SQL occurrence provider. Instantiated with a s...
dimitri-justeau/niamoto-core
niamoto/data_providers/sql_provider/sql_occurrence_provider.py
Python
gpl-3.0
2,139
0
# -*- coding: utf-8 -*- """ The :mod:`AquaponicsModeler.model` module contains all components to be used in models. All model components are classes that should inherit from :class:`BaseModelClass`. So far there are two groups of component types: containers and pumps. :class:`Containers <Container>` are compents that...
dolfandringa/AquaponicsModeler
AquaponicsModeler/model.py
Python
gpl-3.0
14,950
0.000401
print ("How old are you?",) age = input() print ("How tall are you?",) height = input() print ("How much do you weigh?",) weight = input() print ("So, you are %r years old, %r tall and %r heavy." %(age, height, weight))
SunWalter/Hard
ex11.py
Python
apache-2.0
231
0.025974
#!/usr/bin/env python3 # -*- coding: utf-8 -*- '''Hacky way to make sure imports work''' from os.path import abspath, dirname, realpath, join import sys # This allows imports to work, even if sim_game is not in python path: package_location = abspath(join(dirname(realpath(__file__)) , "..")) sys.path.insert(0, package...
olehermanse/sim_game
tests/path_fix.py
Python
mit
331
0.003021
# -*- Mode: Python; python-indent-offset: 4 -*- # # Time-stamp: <2017-06-03 11:36:32 alex> # # -------------------------------------------------------------------- # PiProbe # Copyright (C) 2016-2017 Alexandre Chauvin Hameau <[email protected]> # # This program is free software: you can redistribute it and/or modify # it...
achauvinhameau/netProbe
py-net-probe/database/__init__.py
Python
gpl-3.0
1,035
0
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import json import datetime import mimetypes import os import frappe from frappe import _ import frappe.model.document import frappe.utils import frappe.sessions import werkzeug.u...
gangadharkadam/saloon_frappe
frappe/utils/response.py
Python
mit
4,943
0.025086
from goto_file2 import foo foo
indianajohn/ycmd
ycmd/tests/python/testdata/goto_file1.py
Python
gpl-3.0
31
0
""" Tests for `pyleset` module. """ import pytest from pyleset import pyleset class TestPyleset(object): @classmethod def setup_class(cls): pass def test_something(self): pass @classmethod def teardown_class(cls): pass
westurner/pyleset
test/test_pyleset.py
Python
mit
267
0.003745
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import unittest import jsbeautifier class TestJSBeautifier(unittest.TestCase): def test_unescape(self): # Test cases contributed by <chrisjshull on GitHub.com> test_fragment = self.decodesto bt = self.bt bt('"\\\\s"'); # == "...
JT5D/Alfred-Popclip-Sublime
Sublime Text 2/JsFormat/libs/jsbeautifier/tests/testjsbeautifier.py
Python
gpl-2.0
64,176
0.013246
from tests.package.test_python import TestPythonPackageBase class TestPythonPy2Subprocess32(TestPythonPackageBase): __test__ = True config = TestPythonPackageBase.config + \ """ BR2_PACKAGE_PYTHON=y BR2_PACKAGE_PYTHON_SUBPROCESS32=y """ sample_scripts = ["tests/package/samp...
masahir0y/buildroot-yamada
support/testing/tests/package/test_python_subprocess32.py
Python
gpl-2.0
348
0
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [email protected], All rights reserved. # LLNL-CODE-64...
tmerrick1/spack
lib/spack/spack/test/svn_fetch.py
Python
lgpl-2.1
3,303
0
import logging from anubis.model import builtin from anubis.model import domain from anubis.util import argmethod _logger = logging.getLogger(__name__) def wrap(method): async def run(): _logger.info('Built in domains') for ddoc in builtin.DOMAINS: _logger.info('Domain: {0}'.format(...
KawashiroNitori/Anubis
anubis/util/domainjob.py
Python
gpl-3.0
765
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import partialdate.fields class Migration(migrations.Migration): dependencies = [ ('genealogio', '0023_auto_20160303_2105'), ] operations = [ migrations.AlterField( model...
ugoertz/django-familio
genealogio/migrations/0024_auto_20160316_2039.py
Python
bsd-3-clause
3,111
0.003214
import os, sys # to read dependencies from ./lib direcroty script_dir = os.path.dirname( os.path.realpath(__file__) ) sys.path.insert(0, script_dir + os.sep + "lib") import logging, boto3, json, random # for dynamodb filter queries from boto3.dynamodb.conditions import Key, Attr # setup log level to DEBUG log = loggi...
akranga/mafia-serverless
game/day.py
Python
apache-2.0
979
0.015322
# Copyright 2011 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 req...
fredericlepied/os-net-config
os_net_config/openstack/common/importutils.py
Python
apache-2.0
2,368
0
import numpy as np import scipy.cluster.hierarchy as hr import scipy.spatial as spa import clustering import matplotlib.pyplot as plt from sklearn.cluster import AgglomerativeClustering import filter class textMiningEac: def __init__(self,k,N,low,high=0): self.k = k # Leer datos desde ...
fbr1/textmining-eac
main.py
Python
mit
3,609
0.019119
import tornado.web from datetime import date from sqlalchemy.orm.exc import NoResultFound from pyprint.handler import BaseHandler from pyprint.models import User, Link, Post class SignInHandler(BaseHandler): def get(self): return self.background_render('login.html') def post(self): username ...
RicterZ/pyprint
pyprint/views/background.py
Python
mit
3,116
0.001284
import datetime def suffix(d): return 'th' if 11<=d<=13 else {1:'st',2:'nd',3:'rd'}.get(d%10, 'th') def custom_strftime(format, t): return t.strftime(format).replace('{S}', str(t.day) + suffix(t.day)) print "Welcome to GenerateUpdateLines, the nation's favourite automatic update line generator." start = in...
ArthurStart/arthurstart.github.io
GenerateUpdateLines.py
Python
mit
889
0.013498
# -*- coding: utf-8 -*- """ This module contains the implementation of a tab widget specialised to show code editor tabs. """ import logging import os from pyqode.core.dialogs.unsaved_files import DlgUnsavedFiles from pyqode.core.modes.filewatcher import FileWatcherMode from pyqode.core.widgets.tab_bar import TabBar f...
jmwright/cadquery-x
gui/libs/pyqode/core/widgets/tabs.py
Python
lgpl-3.0
16,288
0
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
HybridF5/jacket
jacket/storage/backup/rpcapi.py
Python
apache-2.0
4,652
0
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
napalm-automation/napalm-yang
napalm_yang/models/openconfig/network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/__init__.py
Python
apache-2.0
14,694
0.001021
"""coop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
jalibras/coop
coop/coop/urls.py
Python
apache-2.0
2,258
0.0124
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Functionality related to shake data files.** Contact : [email protected] .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License a...
opengeogroep/inasafe
realtime/shake_data.py
Python
gpl-3.0
15,213
0.000394
#*************************************************************** #* Name: LMS7002_DCCAL.py #* Purpose: Class implementing LMS7002 DCCAL functions #* Author: Lime Microsystems () #* Created: 2017-02-10 #* Copyright: Lime Microsystems (limemicro.com) #* License: #**********************************************...
bvacaliuc/pyrasdr
plugins/pyLMS7002M/pyLMS7002M/LMS7002_DCCAL.py
Python
gpl-3.0
27,053
0.007467
""" Grab screen data from OMERO based on Screen ID """ import csv import multiprocessing import progressbar import signal import sys import time import requests import json from argparse import ArgumentParser import omeroidr.connect as connect from omeroidr.data import Data parser = ArgumentParser(prog='OMERO screen ...
zegami/omero-idr-fetch
fetch_omero_data.py
Python
mit
3,129
0.003196
# Copyright (c) 2003-2014 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: lsad.py 1106 2014-01-19 14:17:01Z [email protected] $ # # Author: Alberto Solino # # Description:...
hecchi777/S3-SlaacSecuritySolution
impacket-0.9.11/impacket/dcerpc/v5/lsad.py
Python
apache-2.0
57,687
0.0121
for i in range (0, 53): filepath = '/Users/tunder/Dropbox/PythonScripts/requests/pbs/fic' + str(i) + '.pbs' with open(filepath, mode='w', encoding = 'utf-8') as file: file.write('#!/bin/bash\n') file.write('#PBS -l walltime=10:00:00\n') file.write('#PBS -l nodes=1:ppn=12\n') file...
tedunderwood/GenreProject
python/extract/GenerateExtractPBS.py
Python
mit
630
0.009524
# # Collective Knowledge (artifact description (reproducibility, ACM meta, etc)) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, [email protected], http://fursin.net # cfg={} # Will be updated by CK (meta description of this module) wor...
ctuning/ck-env
module/artifact/module.py
Python
bsd-3-clause
12,275
0.037882
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
rwl/PyCIM
CIM15/IEC61970/Informative/InfERPSupport/ErpInventory.py
Python
mit
2,914
0.001373
# -*- coding: utf-8 -*-# """ Basic Twitter Authentication requirements: Python 2.5+ tweepy (easy_install tweepy | pip install tweepy) """ __author__ = 'Bernie Hogan' __version__= '1.0' import string import codecs import os import pickle import copy import sys import json import webbrowser import tweepy from twe...
oxfordinternetinstitute/scriptingcourse
DSR-Week 2/wk02_twitter_test.py
Python
gpl-3.0
1,313
0.033511
import json from urllib import request import pymongo connection = pymongo.MongoClient('mongodb://localhost') db = connection.reddit stories = db.stories # stories.drop() # req = request.Request('http://www.reddit.com/r/technology/.json') # req.add_header('User-agent', 'Mozilla/5.0') # reddit_page = request.urlopen(...
dossorio/python-blog
reddit-data-extractor.py
Python
mit
891
0.001122
# Copyright 2012-2013 Eric Ptak - trouch.com # # 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 l...
thortex/rpi3-webiopi
webiopi_0.7.1/python/webiopi/devices/analog/mcp492X.py
Python
apache-2.0
1,847
0.005414
from multicorn import ForeignDataWrapper from cassandra_provider import CassandraProvider from properties import ISDEBUG import properties import schema_importer import time class CassandraFDW(ForeignDataWrapper): def __init__(self, options, columns): super(CassandraFDW, self).__init__(options, columns) ...
rankactive/cassandra-fdw
cassandra-fdw/__init__.py
Python
mit
4,389
0.00319
#! /usr/bin/env python import requests, json from os.path import expanduser from coinbase.wallet.client import Client home = expanduser('~') client = Client('YOUR_API_KEY', 'YOUR_API_SECRET') accounts = client.get_accounts() print accounts ['data'][0]['balance']
lightningvapes/conky-ethereum-ticker-with-graph-chart
cb_balance_grabber.py
Python
gpl-3.0
267
0.011236
import struct import numpy import io import pickle import pyctrl.packet as packet def testA(): # test A assert packet.pack('A','C') == b'AC' assert packet.pack('A','B') == b'AB' assert packet.pack('A','C') != b'AB' assert packet.unpack_stream(io.BytesIO(b'AC')) == ('A', 'C') assert packet.un...
mcdeoliveira/ctrl
test/test_packet.py
Python
apache-2.0
5,810
0.012909
""" A Tkinter based backend for piddle. Perry A. Stoll Created: February 15, 1999 Requires PIL for rotated string support. Known Problems: - Doesn't handle the interactive commands yet. - PIL based canvas inherits lack of underlining strings from piddlePIL You can find the latest version ...
rvianello/rdkit
rdkit/sping/TK/pidTK.py
Python
bsd-3-clause
16,537
0.010099
from __future__ import (absolute_import, division, print_function, unicode_literals) import logging import re logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) from kamaki.clients import astakos, cyclades from kamaki.clients import ClientError from kamaki.cli.config ...
themiszamani/okeanos-LoD
core/fokia/provisioner.py
Python
agpl-3.0
21,373
0.001544
#!/usr/bin/python import sys import urllib2 RAINX_STAT_KEYS = [ ("rainx.reqpersec", "total_reqpersec"), ("rainx.reqputpersec", "put_reqpersec"), ("rainx.reqgetpersec", "get_reqpersec"), ("rainx.avreqtime", "total_avreqtime"), ("rainx.avputreqtime", "put_avreqtime"), ("rainx.avgetreqtime", "get_avreqtime"), ] ...
redcurrant/redcurrant
svc-monitor/contrib/rainx-monitor.py
Python
lgpl-3.0
1,285
0.010117
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-28 20:51 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.Cre...
EBI-Metagenomics/emgapi
emgapi/migrations/0001_initial.py
Python
apache-2.0
19,658
0.006511
""" WSGI config for test_project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO...
mgrouchy/django-stronghold
test_project/test_project/wsgi.py
Python
mit
402
0
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-27 19:06 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('posts', '0005_post_author'), ] operations = [ migrations.CreateModel( ...
jokuf/hack-blog
posts/migrations/0006_auto_20170327_1906.py
Python
mit
843
0.003559
# 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. import os from tests import TestCase, mkstemp from .helper import temp_...
ptitjes/quodlibet
tests/test_util_config.py
Python
gpl-2.0
11,883
0
#!/usr/bin/env python # encoding: utf-8 """ update/disease.py Update the disease terms in database Created by Måns Magnusson on 2017-04-03. Copyright (c) 2017 __MoonsoInc__. All rights reserved. """ import logging import os import click from flask.cli import current_app, with_appcontext from scout.constants import...
Clinical-Genomics/scout
scout/commands/update/disease.py
Python
bsd-3-clause
3,712
0.002156
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ # SECURITY WARNING: keep the...
gvizquel/comunidad
comunidad/settings.py
Python
gpl-3.0
4,931
0.001825
# coding=utf-8 # dictionary value -> 7-segment data Font = { 0: 0b00111111, # (48) 0 1: 0b00000110, # (49) 1 2: 0b01011011, # (50) 2 3: 0b01001111, # (51) 3 4: 0b01100110, # (52) 4 5: 0b01101101, # (53) 5 6: 0b01111101, # (54) 6 7: 0b00100111, # (55) 7 8: 0b01111111, # (56) 8 9: 0b01101111, # (57) ...
thilaire/missionBoard
src/AVR/genTableCountDown.py
Python
gpl-3.0
1,264
0.019778
# -*- coding: utf-8 -*- from django.views.generic import View from django.views.decorators.csrf import csrf_exempt try: from django.http import StreamingHttpResponse as HttpResponse except ImportError: from django.http import HttpResponse from django.utils.decorators import method_decorator from sse import S...
raspberrywhite/django-sse
django_sse/views.py
Python
bsd-3-clause
1,543
0.000648
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider from mpi4py import MPI import sys from cplpy import CPL #initialise MPI and CPL comm = MPI.COMM_WORLD CPL = CPL() MD_COMM = CPL.init(CPL.CFD_REALM) nprocs_realm = MD_COMM.Get_size() ## Parameters of the cpu topology (cartesian g...
Crompulence/cpl-library
test/lammps/single/no_wall/time_varying_force/CFD_single_ball.py
Python
gpl-3.0
2,218
0.008566
# coding: utf-8 # # Copyright 2010 Alexandre Fiori # based on the original Tornado by Facebook # # 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...
shirk3y/cyclone
cyclone/httputil.py
Python
apache-2.0
9,933
0.000101
#!/usr/bin/env python # =============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: ...
alex-ip/agdc
api-examples/source/main/python/tool/summarise_dataset_time_series.py
Python
bsd-3-clause
25,656
0.004249
"""LTI integration tests""" import json import urllib from collections import OrderedDict import mock import oauthlib from django.conf import settings from django.core.urlresolvers import reverse from nose.plugins.attrib import attr from courseware.tests import BaseTestXmodule from courseware.views.views import get_...
miptliot/edx-platform
lms/djangoapps/courseware/tests/test_lti_integration.py
Python
agpl-3.0
9,169
0.002508
from xblock.fragment import Fragment from xmodule.x_module import XModule from xmodule.seq_module import SequenceDescriptor from xmodule.progress import Progress from pkg_resources import resource_string # HACK: This shouldn't be hard-coded to two types # OBSOLETE: This obsoletes 'type' class_priority = ['video', 'pro...
XiaodunServerGroup/ddyedx
common/lib/xmodule/xmodule/vertical_module.py
Python
agpl-3.0
2,477
0.002019
# coding=utf-8 # Copyright 2021 HuggingFace 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 ag...
huggingface/transformers
tests/speech_to_text/test_feature_extraction_speech_to_text.py
Python
apache-2.0
10,984
0.003733
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', include('launch.urls', namespace="launch", app_name="launch")), url(r'^admin/', include(admin.site.urls)), )
eltonsantos/dom
dom/urls.py
Python
mit
263
0.003802
#!/usr/bin/env python import pyflag.IO as IO import pyflag.Registry as Registry Registry.Init() import pyflag.FileSystem as FileSystem from FileSystem import DBFS case = "demo" ## This gives us a handle to the VFS fsfd = Registry.FILESYSTEMS.fs['DBFS'](case) ## WE just open a file in the VFS: #fd=fsfd.open(inode="It...
naototty/pyflag
tests/init.py
Python
gpl-2.0
364
0.019231
""" Provides the base class for all quadrature rules. """ import numpy as np import copy class QuadRule(object): """ Provides an abstract base class for all quadrature rules. Parameters ---------- order : int The polynomial order up to which the quadrature should be exact """ de...
pysofe/pysofe
pysofe/quadrature/base.py
Python
bsd-3-clause
977
0.002047
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/python-dialogflow
samples/generated_samples/dialogflow_generated_dialogflow_v2_intents_batch_delete_intents_sync.py
Python
apache-2.0
1,696
0.00059
# django default_app_config = "zentral.contrib.okta.apps.ZentralOktaAppConfig"
zentralopensource/zentral
zentral/contrib/okta/__init__.py
Python
apache-2.0
79
0
import os import ConfigParser import click from base64 import b64encode import requests import json class B3Notify(object): """ Build status notifier for bitbucket server """ def __init__(self, home='~/.b3notifyrc'): self.home = home self.verbose = True self.config = {} ...
xydinesh/b3notify
b3notify.py
Python
apache-2.0
3,613
0
# import the libraries that you need import requests import csv # make a GET request to the OneSearch X-Service API response = requests.get('http://onesearch.cuny.edu/PrimoWebServices' '/xservice/search/brief?' '&institution=KB' '&query=any,contai...
MarkEEaton/api-workshop
4-json-to-csv.py
Python
mit
1,093
0.000915
from __future__ import print_function, division import numpy as np class Tuning(): """ Equal temperament tuning - allows to convert between frequency and pitch. - unit pitch space - continous, unbounded - 1.0 ~ one octave - step pitch space - continous, unbounded - N steps ~ o...
bzamecnik/tfr
tfr/tuning.py
Python
mit
1,850
0.001622
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leopard, snowle...
qtekfun/htcDesire820Kernel
external/chromium_org/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
Python
gpl-2.0
9,671
0.009616
''' Pixie: FreeBSD virtualization guest configuration client Copyright (C) 2011 The Hotel Communication Network inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the Li...
masom/Puck
client/pixie/lib/setup_plugin.py
Python
lgpl-3.0
24,567
0.001628