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
############################################################################ ## ## Copyright (C) 2006-2007 University of Utah. All rights reserved. ## ## This file is part of VisTrails. ## ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundat...
Nikea/VisTrails
contrib/TetGenBridge/TetGen.py
Python
bsd-3-clause
19,551
#! /usr/bin/env python # -*- coding: utf-8 -*- """Scatter Plots. For two algorithms, this generates the scatter plot of log(ERT1(df)) vs. log(ERT0(df)), where ERT0(df) is the ERT of the reference algorithm, ERT1(df) is the ERT of the algorithm of concern, both for target precision df. Different symbols are used for d...
oaelhara/numbbo
code-postprocessing/bbob_pproc/comp2/ppscatter.py
Python
bsd-3-clause
17,703
""" Authentication token detection tool for Python ============================================== """ __all__ = ['crawler']
bluesurfer/AuthTokens
authtokens/__init__.py
Python
mit
127
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
Python
gpl-3.0
29,128
__author__ = "Wren J. R. (uberfastman)" __email__ = "wrenjr@yahoo.com" # code snippets taken from: http://stackoverflow.com/questions/24419188/automating-pydrive-verification-process import datetime import logging from pathlib import Path from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from...
uberfastman/yahoo-fantasy-football-metrics
integrations/drive_integration.py
Python
gpl-3.0
8,962
#!/usr/bin/env python """ process_file(filename) takes templated file .xxx.src and produces .xxx file where .xxx is .pyf .f90 or .f using the following template rules: '<..>' denotes a template. All function and subroutine blocks in a source file with names that contain '<..>' will be replicated according...
ryfeus/lambda-packs
pytorch/source/numpy/distutils/from_template.py
Python
mit
7,979
# -*- 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): # Removing unique constraint on 'DataPointAbstracted', fields ['region_id', 'camp...
SeedScientific/polio
datapoints/migrations/0073_auto__del_field_datapointabstracted_region_id__del_field_datapointabst.py
Python
agpl-3.0
22,049
"""SCons.Tool.Packaging.tarbz2 The tarbz2 SRC packager. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # 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, includ...
engineer0x47/SCONS
engine/SCons/Tool/packaging/tarbz2.py
Python
mit
1,750
import time import inspect # If the stack becomes too complex to figure out a caller we go through and assume the first valid module is the caller. # This works reasonably well but isn't 100% accurate and will only happen if the caller is a thread. def print_out(message, color): stack = inspect.stack() # Interestin...
PhilipTrauner/PackageUtil
PackageUtil/Logging.py
Python
mit
1,253
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.d...
UnrememberMe/pants
src/python/pants/backend/docgen/register.py
Python
apache-2.0
1,019
""" Course Goals Models """ import uuid import logging from datetime import datetime, timedelta from django.contrib.auth import get_user_model from django.db import models from django.utils.translation import gettext_lazy as _ from edx_django_utils.cache import TieredCache from model_utils import Choices from model_u...
edx/edx-platform
lms/djangoapps/course_goals/models.py
Python
agpl-3.0
7,106
# -*- coding: utf-8 -*- """ celery.task.http ~~~~~~~~~~~~~~~~ Task webhooks implementation. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sys import urllib2 from urllib import urlencode from urlparse impo...
mozilla/make.mozilla.org
vendor-local/lib/python/celery/task/http.py
Python
bsd-3-clause
6,477
DEBUG = False UNIT_TEST_DEBUG = False import os try: import sublime except ImportError: from mocking.sublime import sublime if UNIT_TEST_DEBUG: DEBUG = True print("SublimeWindowFunctions: sublime and sublime_plugin not imported in " + __file__) else: DEBUG = False """try: ...
anconaesselmann/ClassesAndTests
classes_and_tests/src/SublimeWindowFunctions.py
Python
mit
1,987
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
111pontes/ydk-py
cisco-ios-xe/ydk/models/cisco_ios_xe/_meta/_TOKEN_RING_RMON_MIB.py
Python
apache-2.0
104,936
#!/usr/bin/env python # -*- coding: utf-8 -*- """Plotting functions for magnetic resonance data.""" import numpy as np from pygimli.viewer.mpl import drawModel1D # def drawModel1D(ax, thickness, values, plotfunction='plot', # xlabel='', *args, **kwargs): # """Draw 1d block model into axis ax defined ...
gimli-org/gimli
pygimli/physics/sNMR/plotting.py
Python
apache-2.0
2,475
#------------------------------------------------ # Monkeyrunner Test Report # 10/08/2012 #------------------------------------------------ from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.utils im...
sdkbox/sdkbox-facebook-sample-v2
tools/jenkins_scripts/ReportManager.py
Python
mit
1,901
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free S...
mdavid/cherokee-webserver-svnclone
admin/consts.py
Python
gpl-2.0
6,961
""" A toplevel window to display licensing-related widgets """ from Tkinter import * from ttk import * from widgets.licensing import Licensing class LicensingWindow( Toplevel ): def __init__( self, master ): Toplevel.__init__( self, master ) self.geometry( "640x200-10-40" ) self.transient...
xaroth8088/sprite-magic
windows/licensing_window.py
Python
gpl-3.0
529
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup #A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >= 3: import builtins else: import __builtin_...
bwgref/nustar_moving_target
setup.py
Python
mit
4,050
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Brian Coca <bcoca@ansible.com> # 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 DOCUMENTATION = ''' module: systemd autho...
Fale/ansible
lib/ansible/modules/systemd.py
Python
gpl-3.0
22,523
# vim:ts=4:sts=4:sw=4:expandtab import os import satori.web.setup def manage(): from django.core.management import execute_manager import satori.web.settings as settings # HACK import django.core.management old_fmm = django.core.management.find_management_module def find_management_module(a...
zielmicha/satori
satori.web/satori/web/__init__.py
Python
mit
616
from django.contrib import admin from . import models as mdpage # The following classes define the admin interface for your models. # See http://docs.djangoproject.com/en/dev/ref/contrib/admin/ for # a full list of the options you can use in these classes. @admin.register(mdpage.MarkdownPage) class MarkdownPageAdmin...
dakrauth/django-markdown-page
mdpage/admin.py
Python
mit
1,348
# -*- coding: utf-8 -*- from http import client import json from openfisca_country_template import entities # /entities def test_return_code(test_client): entities_response = test_client.get('/entities') assert entities_response.status_code == client.OK def test_response_data(test_client): entities_...
openfisca/openfisca-core
tests/web_api/test_entities.py
Python
agpl-3.0
1,096
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. """Sparse implementations of n-dimensional ...
aringh/odl
odl/discr/grid.py
Python
mpl-2.0
38,354
# coding=utf-8 # # 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");...
lukecwik/incubator-beam
sdks/python/apache_beam/examples/snippets/transforms/elementwise/pardo.py
Python
apache-2.0
4,045
# Copyright 2014 Open Data Science Initiative and other authors. See AUTHORS.txt # Licensed under the BSD 3-clause license (see LICENSE.txt) import IPython if int(IPython.__version__[0])>3: from ipywidgets import interact, fixed else: from IPython.html.widgets.interaction import interact, fixed from IP...
alansaul/ods
pods/notebook.py
Python
bsd-3-clause
7,352
""" @author: CarolinaFernandez """ from django.conf.urls.defaults import patterns, url urlpatterns = patterns('expedient.clearinghouse.help.views', url(r'^', 'home', name="help_home"), )
dana-i2cat/felix
expedient/src/python/expedient/clearinghouse/help/urls.py
Python
apache-2.0
193
# -*- coding: ISO-8859-1 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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 # # Unl...
bbondy/brianbondy.gae
libs/sx/pisa3/pisa_tables.py
Python
mit
13,877
from hachoir_py3.field import Field, FieldSet, ParserError class GenericVector(FieldSet): def __init__(self, parent, name, nb_items, item_class, item_name="item", description=None): # Sanity checks assert issubclass(item_class, Field) assert isinstance(item_class.static_size, int) ...
SickGear/SickGear
lib/hachoir_py3/field/vector.py
Python
gpl-3.0
1,391
import sys, os, json, time from shapely.geometry import Polygon # http://toblerity.org/shapely/manual.html contains = {} intersects = {} dPoly = {} unmatched = [] TRACTCOL = 'BoroCT2010' # rename this for 2000 census def addPoly(coords): polys = [] if (isinstance(coords[0][0], float)): polys.append(P...
capntransit/tract2council
tract2council.py
Python
gpl-3.0
2,643
from django.shortcuts import render from django.core import serializers from django.http import HttpResponse from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.conf import settings from registrar.m...
AcademicsToday/py-academicstoday
academicstoday_project/student/views/assignment.py
Python
apache-2.0
21,683
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013-2014 Red Hat, 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 # # Unl...
phoenixsbk/kvmmgr
packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/all-in-one/cpu.py
Python
apache-2.0
4,987
#!/usr/bin/python # # Dicziunari-Hunspell -- Rhaeto-Romance hunspell dictionary generation # # Copyright (C) 2012-2013 Uli Franke (cls) et al. # # 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,...
cls-nebadje/dicziunari-hunspell
tools/dzhs/wordlist.py
Python
gpl-3.0
1,455
# CTK: Cherokee Toolkit # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2009-2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free Software Foundation....
chetan/cherokee
admin/CTK/CTK/util.py
Python
gpl-2.0
3,017
class Application: def __init__(self, application_id, application_key, application_secret_key, redirect_uri): self.id = application_id self.key = application_key self.secret_key = application_secret_key self.redirect_uri = redirect_uri
wi34rd/pyokapi
pyokapi/application.py
Python
mit
272
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os from waflib import Options,Utils,Task from waflib.TaskGen import before_method,feature,extension from waflib.Configure import conf @feature('rubyext') @before_method('apply_incpaths','proce...
Gnurou/glmark2
waflib/Tools/ruby.py
Python
gpl-3.0
3,848
#!/usr/bin/env python class RoundFloatManual(object): def __init__(self, val): assert isinstance(val, float), \ "Value must be a float!" self.value = round(val, 2) def __str__(self): return '%.2f' % self.value __repr__ = __str__
opensvn/test
src/study/python/cpp/ch13/roundFloat2.py
Python
gpl-2.0
280
import datetime from imap_tools import EmailAddress DATA = dict( subject='Redacted', from_='redacted@flashmail.net', to=('redacted@Enron.com',), cc=(), bcc=(), reply_to=(), date=datetime.datetime(1900, 1, 1, 0, 0), date_str='', text='', html='<p>foo</p>\n', headers={'from': ...
ikvk/imap_tools
tests/messages_data/error_emails/multiple_invalid_content_dispositions.py
Python
apache-2.0
909
import numpy as np import scipy.interpolate as interp import warnings from astropy.io import fits def concentration(radii, phot, eta_radius=0.2, eta_radius_factor=1.5, interp_kind='linear', add_zero=False): """ Calculates the concentration parameter C = 5 * log10(r_80 / r2_0) Inputs: radii -- 1d a...
astronomeralex/morphology-software
morphology.py
Python
mit
3,255
# file: runme.py import wolfssl print "" print "Trying to connect to the example server -d..." wolfssl.wolfSSL_Init() #wolfssl.wolfSSL_Debugging_ON() ctx = wolfssl.wolfSSL_CTX_new(wolfssl.wolfTLSv1_2_client_method()) if ctx == None: print "Couldn't get SSL CTX for TLSv1.2" exit(-1) ret = wolfssl.wolfSSL_CTX...
yashdsaraf/bb-bot
wolfssl/swig/runme.py
Python
gpl-3.0
1,174
#!/usr/bin/env python # # Created by Samvel Khalatyan on Mar 23, 2014 # Copyright (c) 2014 Samvel Khalatyan. All rights reserved # # Use of this source code is governed by a license that can be found in # the LICENSE file. import random import unittest from lib import unigraph class UnigraphExtra(unigraph.Unigraph)...
ksamdev/algorithms_old
ch4/python/ch4_ex4.1.4.py
Python
mit
1,523
# Webhooks pfor external integrations. from typing import Any, Dict, Text from django.utils.translation import ugettext as _ from django.http import HttpRequest, HttpResponse from zerver.lib.actions import check_send_stream_message from zerver.lib.response import json_success, json_error from zerver.decorator import ...
amanharitsh123/zulip
zerver/webhooks/pingdom/view.py
Python
apache-2.0
2,434
import numpy as np import pandas as pd input_file = "3_floor.csv" # comma delimited is the default df = pd.read_csv(input_file, header = 0) # for space delimited use: # df = pd.read_csv(input_file, header = 0, delimiter = " ") # for tab delimited use: # df = pd.read_csv(input_file, header = 0, delimiter = "\t") # ...
Silvia333/ASleep
my_importData.py
Python
apache-2.0
1,589
#! /usr/bin/env python # -*- coding: utf-8 import sys import os import cv2 import numpy as np import time import StringIO from misc import WithTimer from numpy_cache import FIFOLimitedArrayCache from app_base import BaseApp from image_misc import norm01, norm01c, norm0255, tile_images_normalize, ensure_float01, tile_...
yosinski/deep-visualization-toolbox
caffevis/app.py
Python
mit
33,221
# metafits format version number _VERSION=2.0 import logging,datetime,math import numpy,ephem try: import astropy.io.fits as pyfits except ImportError: import pyfits import json,urllib,urllib2 USEWEB = True # If true, use the web services to get metadata, otherwise call functions in obssched.tilestatus if...
ryandougherty/mwa-capstone
MWA_Tools/mwapy/metadata.py
Python
gpl-2.0
50,133
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
pacoqueen/upy
formularios/cuentas_destino.py
Python
gpl-2.0
15,409
class Solution: def selfDividingNumbers(self, left: int, right: int) -> List[int]: # check every digit return [x for x in range(left, right+1) if all([int(i) != 0 and x % int(i)==0 for i in str(x)])] # def selfDividingNumbers(self, left: int, right: int) -> List[int]: # return [x for x ...
qiyuangong/leetcode
python/728_Self_Dividing_Numbers.py
Python
mit
398
# -*- coding: utf-8 -*- from django.views.generic import TemplateView from maps.models import ReviewGroup, Map class IndexView(TemplateView): template_name = 'map_review/home.html' def get_context_data(self, **kwargs): ctx = super(IndexView, self).get_context_data(**kwargs) ctx['groups'] = R...
mapaction/map_review
map_review/views.py
Python
gpl-2.0
429
#!/usr/bin/python import os import sys import gzip import simplejson as json from datetime import datetime as dt from pprint import pprint as pp SAMPLE_VALUE = 5000 # 1 for no sampling SAMPLE_END = 1000 # -1 for no end SAMPLE_VALUE = 1 # 1 for no sampling SAMPLE_END = -1 # -1 for no end def openfile(infile...
sauloal/vcf_stats
vcf_stats.py
Python
mit
10,221
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. ''' Created on Jun 27, 2012 ''' __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail.com" __da...
dongsenfo/pymatgen
pymatgen/entries/tests/test_exp_entries.py
Python
mit
1,172
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist from django.views.decorators.cache import never_cache from django.http import HttpResponse, HttpResponseRedirect from session_csrf import anonymous_csrf from ..models import ...
mozilla/BanHammer
BanHammer/blacklist/views/zlb.py
Python
bsd-3-clause
9,627
""" Copyright (c) 2015 Tim Waugh <tim@cyberelk.net> ## 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 progra...
twaugh/journal-brief
journal_brief/format/__init__.py
Python
gpl-2.0
2,779
import smtplib import imaplib import time import sys from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText msg = MIMEMultipart() msg['From'] = "admin@mailu.io" msg['To'] = "replyusea@mailu.io" msg['Subject'] = "Reply Test" msg.attach(MIMEText("Reply Text", 'plain')) try: smtp_server ...
kaiyou/freeposte.io
tests/reply_test.py
Python
mit
2,104
''' ____ _ _ _ _ _ ____ ___ | _ \ ___ __| | \ | | ___| |_ / \ | _ \_ _| | |_) / _ \ / _` | \| |/ _ \ __| / _ \ | |_) | | | __/ (_) | (_| | |\ | __/ |_ / ___ \| __/| | |_| \___/ \__,_|_| \_|\___|\__| /_/ \_\_| |___| File: PodNet.py Author: Zach Podbieln...
zachpodbielniak/PodNet
Linux/Python/CSerial.py
Python
gpl-3.0
3,399
#!/usr/bin/python # -*- coding: utf-8 -*- from copy import deepcopy class TreeNode(dict): def __init__(self, *args, **kwargs): super(TreeNode, self).__init__(*args, **kwargs) @property def is_leaf(self): raise NotImplementedError() @property def children(self, *args, **kwargs): ...
sebastiandev/plyse
plyse/query_tree.py
Python
mit
4,740
# -*- coding: utf-8 -*- """Init and utils.""" from zope.i18nmessageid import MessageFactory _ = MessageFactory('apm.sitetheme') def initialize(context): """Initializer called when used as a Zope 2 product."""
a25kk/apm
src/apm.sitetheme/apm/sitetheme/__init__.py
Python
mit
217
# -*- coding: utf-8 -*- from flask import render_template, session, redirect, url_for, request, flash from flask.ext.login import login_required, current_user from .. import db from ..models import Step, Project, User, Commit, Record from . import main import json from datetime import datetime @main.route('/', method...
bigzhao/flask-projects-manage
app/main/views.py
Python
mit
15,703
# -*- coding: utf-8 -*- # # SelfTest/Cipher/test_pkcs1_oaep.py: Self-test for PKCS#1 OAEP encryption # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone...
ktan2020/legacy-automation
win/Lib/site-packages/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py
Python
mit
17,292
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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 versi...
tomprince/gemrb
gemrb/GUIScripts/iwd2/Feedback.py
Python
gpl-2.0
5,453
# 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 agreed to in...
openstack/neutron-lib
neutron_lib/api/definitions/network_mtu.py
Python
apache-2.0
2,378
""" Definition of a sample, corresponding to a multilayer. A multilayer a series of horizontal layers deposited on a substrate. A multilayer may also have no layer and simply be considered as a substrate. The substrate composition, and the composition, thickness and mass thickness of each layer are defined by the :cla...
ppinard/stratagemtools
stratagemtools/sample.py
Python
mit
11,132
#!/usr/bin/env python """ ================================================= sMRI: Regional Tessellation and Surface Smoothing ================================================= Introduction ============ This script, tessellation_tutorial.py, demonstrates the use of create_tessellation_flow from nipype.workflows.smri.f...
BrainIntensive/OnlineBrainIntensive
resources/nipype/nipype/examples/tessellation_tutorial.py
Python
mit
3,562
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- ''' BitBake 'Fetch' implementations This implementation is for Secure Shell (SSH), and attempts to comply with the IETF secsh internet draft: http://tools.ietf.org/wg/secsh/draft-ietf-secsh-scp-sftp-ssh-uri/ Currently doe...
hulifox008/bitbake
lib/bb/fetch2/ssh.py
Python
gpl-2.0
3,701
""" The guts for the i386 envi opcode disassembler. """ import struct import envi import envi.bits as e_bits import opcode86 all_tables = opcode86.tables86 # Grab our register enums etc... from envi.archs.i386.regs import * # Our instruction prefix masks # NOTE: table 3-4 (section 3.6) of intel 1...
foreni-administrator/pyew
envi/archs/i386/disasm.py
Python
gpl-2.0
35,078
# -*- coding: utf-8 -*- """Order Model unit tests.""" import pytest from store.orders.models import Order, OrderConsistsOf from store.book.models import Book from store.customer.models import Customer # from .factories import ConsistsOfFactory @pytest.mark.usefixtures('db') class TestOrderConsistsOf: """Order ...
William93/store
tests/test_order_consists_of_models.py
Python
bsd-3-clause
1,715
# ~*~ coding:utf-8 ~*~ import sys from PyQt5.QtWidgets import QApplication from window import Window if __name__ == '__main__': app = QApplication(sys.argv) window = Window() window.show() sys.exit(app.exec_())
katya-malyk/sphere_approximation
__init__.py
Python
apache-2.0
229
# 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 # d...
Vaidyanath/tempest
tempest/api/volume/test_volumes_snapshots_negative.py
Python
apache-2.0
1,938
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) """ This module provides generic time-stepping algorithms for the solution of instationary problems. The algorith...
michaellaier/pymor
src/pymor/algorithms/timestepping.py
Python
bsd-2-clause
7,154
# /xhr/resources/conditional.py -- to fake a 304 response def main(request, response): tag = request.GET.first("tag", None) match = request.headers.get("If-None-Match", None) date = request.GET.first("date", "") modified = request.headers.get("If-Modified-Since", None) if tag: response.head...
Varentsov/servo
tests/wpt/web-platform-tests/resource-timing/resources/fake_responses.py
Python
mpl-2.0
678
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import os import pytest from django.core.urlresolvers import rever...
suutari/shoop
shuup_tests/browser/admin/test_order_list.py
Python
agpl-3.0
3,132
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import copy import pickle from abc import abstractmethod from builtins import object, str...
foursquare/pants
tests/python/pants_test/util/test_objects.py
Python
apache-2.0
20,881
""" Application file for the anti-spam app. """ from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class AntiSpamConfig(AppConfig): """ Application configuration class for the anti-spam app. """ name = 'apps.antispam' verbose_name = _('Anti-spam')
TamiaLab/carnetdumaker
apps/antispam/apps.py
Python
agpl-3.0
311
from main.emails import send_member_email, send_multimember_email from main.management.helpers import SendNotificationEmailCommand from main.models import Membership, SentMemberEmail class Command(SendNotificationEmailCommand): help = 'Send emails to everyone who has been added to a page.' model = Membership ...
reverie/jotleaf.com
jotleaf/main/management/commands/send_membership_emails.py
Python
mit
790
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, comma_or from frappe import msgprint, _, throw from frappe.model.document import Document def validate_stat...
treejames/erpnext
erpnext/controllers/status_updater.py
Python
agpl-3.0
9,429
# The Hazard Library # Copyright (C) 2015 GEM Foundation # # 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 Foundation, either version 3 of the # License, or (at your option) any later version. # # Th...
silviacanessa/oq-hazardlib
openquake/hazardlib/gsim/dost_2004.py
Python
agpl-3.0
5,676
try: from setuptools import setup except ImportError: from distutils.core import setup setup(name='tornadozencoder', version='0.6.5', description='Integration library for Zencoder', author='Alex Schworer', author_email='alex.schworer@gmail.com', url='http://github.com/schworer/zen...
Didacti/tornadozencoder
setup.py
Python
mit
943
# Copyright 2013 VMware, 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 a...
mahak/neutron
neutron/db/allowedaddresspairs_db.py
Python
apache-2.0
7,023
from textwrap import dedent import json import re class NotSpecified(object): """Tell the difference between empty and None""" class AssertionsAssertionsMixin: def assertSortedEqual(self, one, two): """Assert that the sorted of the two equal""" assert sorted(one) == sorted(two) def asse...
delfick/harpoon
tests/helpers/mixins/assertions.py
Python
mit
2,082
# -*- coding: utf-8 -*- filename = "/data/id16b/inhouse1/comm_17jan/restart/sofc/26jan/6100h_fluoXAS_0/results/6100h_fluoXAS_0/test.h5" name = ["/detectorsum/Ni-K_norm", "/counters/arr_srcurr"] new = "/detectorsum/Ni-K_norm2" ###### Import libraries ###### import spectrocrunch.io.nexus as nexus from spectrocrunch.h5...
woutdenolf/spectrocrunch
scraps/id16norm.py
Python
mit
904
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='mhef', version='1.0.0b6', description='Monster Hunter Encryption Functions', url='https://github.com/svanheulen/mhef', author='Seth VanHeulen', author_email='svanheulen@gmail.com', l...
didix16/mh4editor
setup.py
Python
mit
723
# BlenderBIM Add-on - OpenBIM Blender Add-on # Copyright (C) 2020, 2021 Dion Moult <dion@thinkmoult.com> # # This file is part of BlenderBIM Add-on. # # BlenderBIM Add-on 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 Fo...
IfcOpenShell/IfcOpenShell
src/blenderbim/blenderbim/bim/module/classification/prop.py
Python
lgpl-3.0
3,717
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse from csv import DictReader import codecs import logging from os import path import re import sys from pyknp import Juman import utils import preprocess reload(sys) sys.setdefaultencoding('utf8') verbose = False logger = None DIR_SCRIPT = path.dirname(...
jntkym/rappers
rhyme.py
Python
mit
4,537
# Copyright 2015 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...
rabipanda/tensorflow
tensorflow/python/ops/gradients_impl.py
Python
apache-2.0
40,448
from django.conf.urls import patterns, include, url from django.conf import settings from django.views.generic import RedirectView from api.urls import router # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # change Langua...
GeoODK/formhub
formhub/urls.py
Python
bsd-2-clause
10,051
import pygame """ Monitors the users mouse and their selections """ class PickingHandler(object): SUCCESS_COLOR = (0,0,255) ERROR_COLOR = (255,0,0) def __init__(self, viewport, transmutation_manager, physics_manager): self.viewport = viewport self.transmutation_manager = transmutation_mana...
Desolace/LudumDare32
picking_handler.py
Python
mit
3,675
## # Copyright 2009-2020 Ghent University, Forschungszentrum Juelich # # 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://www.vscentrum.be), # the...
pescobar/easybuild-easyblocks
easybuild/easyblocks/m/mpich.py
Python
gpl-2.0
7,319
import os import sys import re import json from distutils.cmd import Command from setuptools.command.test import test def read_requirements(file_name): return [i.strip() for i in open( os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "requirements", "%s" % file_name)) ).readlines() if l...
SolutionsCloud/apidoc
setup_cmd/__init__.py
Python
gpl-3.0
6,276
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['ConstantTrend'] , ['Seasonal_Hour'] , ['MLP'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_ConstantTrend_Seasonal_Hour_MLP.py
Python
bsd-3-clause
156
import unittest, mock, tempfile, types, os, datetime from django.db.models.signals import post_save from rdflib import Graph, Literal, BNode, Namespace, RDF, URIRef from rdflib.namespace import DC, FOAF, DCTERMS BIB = Namespace('http://purl.org/net/biblio#') RSS = Namespace('http://purl.org/rss/1.0/modules/link/') Z...
diging/jars
cookies/tests/test_import.py
Python
gpl-3.0
14,911
#!/bin/env python #function: # demo to show how to use converted model using caffe2fluid # import sys import os import numpy as np import paddle.fluid as fluid import paddle.v2 as paddle def test_model(exe, test_program, fetch_list, test_reader, feeder): acc_set = [] for data in test_reader(): ac...
lcy-seso/models
fluid/image_classification/caffe2fluid/examples/mnist/evaluate.py
Python
apache-2.0
2,349
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. """ String manipulation functions """ import binascii import re import string import unicodedata from en...
DirkHoffmann/indico
indico/util/string.py
Python
gpl-3.0
20,141
from builtins import property import collections import json import re from django import template from django.conf import settings from django.conf.locale import ru from django.contrib import messages from django.contrib.auth.mixins import PermissionRequiredMixin from django.contrib.contenttypes.models import Conten...
cmjatai/cmj
cmj/core/views.py
Python
gpl-3.0
23,280
#!/usr/local/bin/python3.4 # dbh.ph debounce hardware """ Pyboard: Switch pins: Y1 or X19 usage: >>> init() >>> loop() """ from pyb import ExtInt,Pin # declare the pin id pinId = 'X19' # interrupt 0 'Y1' # interrupt 6 # itnerrupt mechanics and debounce globals flag= False interCount=0 eObj = None # define ISR d...
gratefulfrog/ArduGuitar
Ardu2/design/POC-3_MAX395/pyboard/DraftDevt/dbh.py
Python
gpl-2.0
761
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # mandelbrot_bsm.py # # Copyright 2015 Gabriel Hondet <gabrielhondet@gmail.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...
gabrielhdt/dynamics_experiments
mandelbrot_bsm.py
Python
gpl-2.0
2,643
from tests.integration.create_token import create_token from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.mci import mci_test_urls class TestEmptyQuestionnaire(IntegrationTestCase): def test_empty_questionnaire(self): # Get a token token = create_token...
qateam123/eq
tests/integration/mci/test_empty_questionnaire.py
Python
mit
1,909
# -*- coding: utf-8 -*- import urllib2, urllib, json class SaltAPI(object): def __init__(self, url, username, password): self.__url = url.rstrip('/') self.__user = username self.__password = password self.__token_id = self.saltLogin() def saltLogin(self): params = {'e...
Hasal/dzhops
saltstack/saltapi.py
Python
apache-2.0
4,592
#!/usr/bin/python import time import os import sqlite3 import subprocess import sys conn = sqlite3.connect("remote.db") cursor = conn.cursor() def playlist_add(key): conn = sqlite3.connect("remote.db") cursor = conn.cursor() cursor.execute("SELECT file_keys FROM playlists WHERE key = 1") row = cursor....
bmbove/omxremote
controls.py
Python
bsd-3-clause
3,762
import os import pickle import numpy as np import pandas as pd from os import path import seaborn as sns from operator import add from scipy import sparse, io import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap from dotenv import load_dotenv, find_dotenv from sklearn.preprocessing import LabelEncod...
Kebniss/TalkingData-Mobile-User-Demographics
src/data/phone_exploration.py
Python
mit
10,784
############################################################################## # Copyright (c) 2017-2018, The VOTCA Development Team (http://www.votca.org) # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, see https://github.com/spack/...
mfherbst/spack
var/spack/repos/builtin/packages/votca-xtp/package.py
Python
lgpl-2.1
2,206
import unittest from conans.test.utils.tools import TestClient, TestServer from collections import OrderedDict from conans.util.files import load class RemoteTest(unittest.TestCase): def setUp(self): self.servers = OrderedDict() self.users = {} for i in range(3): test_server =...
tivek/conan
conans/test/command/remote_test.py
Python
mit
7,032