code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
from os import statvfs, uname import time from socket import socket import psutil import uuid import json import requests import subprocess from django.shortcuts import render, HttpResponse, get_object_or_404, redirect from django.http import JsonResponse, HttpResponseRedirect, StreamingHttpResponse, Http404 from docki...
MicroPyramid/docker-box
dockit/views.py
Python
mit
22,934
#!/usr/bin/env python import os import sys import platform import urllib.request import zipfile import tarfile import shutil import bpy import site REQUIRED_VERSION = (2, 79, 0) DOWNLOAD_URLS = { "Linux": "https://mirror.clarkson.edu/blender/release/Blender2.79/" "blender-2.79-linux-glibc219-x86_64.t...
wphicks/Writing3D
scripts/blender_update.py
Python
gpl-3.0
2,828
# Copyright (c) Siemens AG, 2013 # # This file is part of MANTIS. MANTIS 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 progr...
siemens/django-dingos
dingos/filter.py
Python
gpl-2.0
13,612
"""Functions related to analyzing npm packages.""" import http # http.py import util # util.py def get_package_name(package_json_obj): """Get the name of the package. Args: package_json_obj (dict): The object returned by calling json.load() on the packages `package.json` file. Return...
kristovatlas/npm-dependency-check
npm.py
Python
unlicense
2,256
#!/usr/bin/env python3 # This sample demonstrates how to use the siem endpoint in the # REST API. # This sample is interactive. # THIS SAMPLE WILL MAKE CHANGES TO THE OFFENSE IT IS RUN AGAINST # The scenario demonstrates the following actions: # - How to get a list of closing reasons # - How to create a new closing ...
ibm-security-intelligence/api-samples
siem/05_ClosingReasons.py
Python
apache-2.0
2,569
#Contem todo o gerenciamento do banco de dados #Imports from operator import itemgetter, attrgetter, methodcaller from google.appengine.ext import ndb #BD que grava as palavras class Chats(ndb.Model): chats = ndb.StringProperty(repeated=True) def checkChat(chat_id): c = ndb.Key(Chats, 'chats').get() if n...
0Cristofer/forca_bot
bds.py
Python
apache-2.0
7,877
""" Generalized Linear models. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Vincent Michel <vincent.michel@inria.fr> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # ...
Fireblend/scikit-learn
sklearn/linear_model/base.py
Python
bsd-3-clause
16,019
""" Process thrasher """ import logging import gevent import random import time from teuthology.orchestra import run log = logging.getLogger(__name__) class ProcThrasher: """ Kills and restarts some number of the specified process on the specified remote """ def __init__(self, config, remote, *pr...
SUSE/teuthology
teuthology/task/proc_thrasher.py
Python
mit
2,404
""" Django settings for mysite project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # ...
JonnyWaffles/AWS-Test-Respository
mysite/settings.py
Python
mit
3,276
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
xme1226/horizon
openstack_dashboard/dashboards/project/instances/workflows/create_instance.py
Python
apache-2.0
38,880
import os import sys from time import time as clock from rpython.rlib import jit from rpython.rlib import rrandom from rpython.jit.codewriter.policy import JitPolicy # The regex is built up from a combination individual Regex objects. # Each is responsiblef for implementing a specific operator. class Regex(object...
perkinslr/pypyjs
tools/rematcher.py
Python
mit
4,972
from neo4j import GraphDatabase, basic_auth def diagnose_symptoms_neo4j(symptoms): # performs anomaly diagnosis using the neo4j knowledge database # setup neo4j database connection driver = GraphDatabase.driver("bolt://13.58.54.49:7687", auth=basic_auth("neo4j", "goSEAKers!")) session = driver.session() ...
seakers/daphne_brain
AT/diagnosis/dialogue_functions.py
Python
mit
993
def _dfswalk(atom, visitedAtoms, visitedBonds, nonPathBonds, path, paths, depth, mindepth, maxdepth): if depth >= maxdepth: return mark = len(path) markNonPathBonds = len(nonPathBonds) for bond in atom.bonds: oatom = bond.xatom(atom) if not visitedAtoms.has_ke...
tuffery/Frog2
frowns/build/lib/frowns/Utils/LinearWalk.py
Python
gpl-3.0
2,051
from __future__ import (absolute_import, division, print_function) from .numtransform import NumTransformer from .numtransform import lambdify assert NumTransformer assert lambdify
bjodah/symvarsub
symvarsub/numtransform/__init__.py
Python
bsd-2-clause
183
#!/usr/bin/env python # encoding: utf-8 """ rndMedKnocks.py Created by Nikolaus Sonnenschein on 2008-05-02. Copyright (c) 2008 Jacobs University of Bremen. All rights reserved. Modified by Moritz Beber on 2008-11-26. """ import sys import os from ifba.GlpkWrap import util, metabolism, randomMedia, fluxdist, knockouts...
phantomas1234/fbaproject
moritzlLabRotate/essentiality_byratio/client_task.py
Python
mit
3,054
#!/usr/bin/env python # # Copyright (c) 2009 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...
wy1iu/sphereface
tools/caffe-sphereface/scripts/cpp_lint.py
Python
mit
187,569
"""distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library...
qenter/vlc-android
toolchains/arm/lib/python2.7/distutils/unixccompiler.py
Python
gpl-2.0
12,848
"""Test valid __all__ format.""" # pylint: disable=import-error, unused-import from foo import bar __all__ = tuple(globals().keys())
PyCQA/pylint
tests/functional/i/invalid/invalid_all_format_valid_6.py
Python
gpl-2.0
136
from sklearn import datasets digits = datasets.load_digits() from sklearn.naive_bayes import MultinomialNB from sklearn.model_selection import cross_val_score nb = MultinomialNB() scores = cross_val_score(nb, digits.data, digits.target, cv=10) print(scores) print(scores.mean())
lukas/ml-class
examples/scikit/digits.py
Python
gpl-2.0
284
# Copyright (C) 2009 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in ...
levibostian/launchpad-2-github
bzr-fastimport/build/lib.linux-x86_64-2.7/bzrlib/plugins/fastimport/branch_mapper.py
Python
mit
2,184
# Copyright (c) 2017 Dell Inc. or its subsidiaries. # 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 # # ...
eharney/cinder
cinder/volume/drivers/dell_emc/vmax/fc.py
Python
apache-2.0
20,364
""" StackState. Splunk topology extraction """ # 3rd party import sys import time from checks import AgentCheck, CheckException, FinalizeException, TokenExpiredException from checks.check_status import CheckData from utils.splunk.splunk import SplunkSavedSearch, SplunkInstanceConfig, SavedSearches, chunks, ta...
StackVista/sts-agent-integrations-core
splunk_topology/check.py
Python
bsd-3-clause
17,535
"""functions that directly handle user input """ import sys import time import logging from askbot.utils import path def start_printing_db_queries(): """starts logging database queries into console, should be used for debugging only""" logger = logging.getLogger('django.db.backends') logger.setLevel(lo...
simalytics/askbot-devel
askbot/utils/console.py
Python
gpl-3.0
5,470
#!/usr/bin/python # (c) 2016, Timothy Vandenbrande <timothy.vandenbrande@gmail.com> # # This file is part of Ansible # # Ansible 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...
civisanalytics/ansible
lib/ansible/modules/cloud/misc/rhevm.py
Python
gpl-3.0
52,300
import os import platform if platform.system() == "Windows": if os.getcwd() != "C:\\Python27\Lib\cofee": if os.path.exists("C:\\Python27\Lib\cofee"): os.system("rd C:\\Python27\Lib") os.system("move "+os.getcwd()+"")
CofeePy/Cofee
commands/install.py
Python
apache-2.0
258
import os import chemcoord as cc import numpy as np def get_script_path(): return os.path.dirname(os.path.realpath(__file__)) def get_structure_path(script_path): test_path = os.path.join(script_path) while True: structure_path = os.path.join(test_path, 'structures') if os.path.exists(s...
mcocdawc/chemcoord
tests/cartesian_coordinates/Cartesian/test_symmetry.py
Python
lgpl-3.0
1,739
"""Case for generic interpreter-style tests.""" from client.sources.common import core from client.sources.common import models import re import textwrap class CodeCase(models.Case): """TestCase for doctest-style Python tests.""" code = core.String() def __init__(self, console, setup='', teardown='', **...
jathak/ok-client
client/sources/common/interpreter.py
Python
apache-2.0
11,061
import time import requests import requests_cache from flask import Flask, render_template, request, jsonify app = Flask(__name__) requests_cache.install_cache('github_cache', backend='sqlite', expire_after=180) @app.route('/', methods=['GET', 'POST']) def home(): if request.method == 'POST': # user in...
ankitpandey2708/flask_app2
app.py
Python
mit
836
from django.shortcuts import render_to_response, redirect from django.template import RequestContext from forms import RegisterForm, EditAccountForm, ChangeEmailForm from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.contrib.auth.forms import AuthenticationForm,...
tekton/DocuCanvas
auth/views.py
Python
gpl-3.0
7,927
from django.conf.urls import url, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from api.views import router urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include(router.urls)), url(r'^ui/', include('ui.urls', namespace...
TangentMicroServices/BuildService
buildservice/urls.py
Python
mit
697
#!/usr/bin/env python # -*- coding: utf-8 -* import ctypes class MLPNetwork(ctypes.Structure): pass
benoitfragit/libBrain
MLP/plugin/exchange/mlpnetwork.py
Python
gpl-3.0
106
""" Read graphs in LEDA format. See http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html """ # Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at http://www.ics.uci.edu/~eppstein/PADS/ is public domain. __author__ = """Aric Hagberg (hagberg@lanl.gov)""...
JaneliaSciComp/Neuroptikon
Source/lib/CrossPlatform/networkx/readwrite/leda.py
Python
bsd-3-clause
2,097
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Dec 3 23:10:05 2016 @author: cham """ #!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Nov 23 17:37:24 2016 @author: cham """ #%% import os import re import numpy as np import ccdproc from collections import OrderedDict from astrop...
hypergravity/hrs
song/test_script2.py
Python
bsd-3-clause
26,377
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018 João Pedro Rodrigues # # 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...
JoaoRodrigues/pdb-tools
tests/test_pdb_delinsertion.py
Python
apache-2.0
8,094
import sys import midi del midi sys.modules.pop("midi") import midi
fabeschan/midigeneration
legacy/daniel-midigeneration/reset.py
Python
mit
67
# -*- coding: utf-8 -*- from PyQt4 import QtCore, QtGui class ComboBox(QtGui.QComboBox): """Extends QComboBox with some extra functionality: - remembers argument to setValue, restores correct selection after contents have been cleared/repopulated """ def __init__(self, *args): QtGui.QComboBox....
hiuwo/acq4
acq4/util/ComboBox.py
Python
mit
1,897
""" Support for Google Play Music Desktop Player. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.gpmdp/ """ import logging import json import os import socket import time import voluptuous as vol from homeassistant.components.media_player ...
kyvinh/home-assistant
homeassistant/components/media_player/gpmdp.py
Python
apache-2.0
12,418
#!/usr/bin/env python import md5 with open("../input/04.txt") as fileobj: for word in fileobj: i = 1 base = md5.new(word.rstrip()) while True: m = base.copy() # according to the interwebs, this is more efficient than .new() m.update(str(i)) if m.hexdigest()[:6] == '000000': print word,i break ...
dsumike/adventofcode
python/04p2.py
Python
mit
329
###################################################### # -*- coding: utf-8 -*- # File Name: plot_log_data.py # Author: James Hong & Qian Li # Created Date: 2017-11-29 # Description: Plot data from parsed logs ###################################################### #!/usr/bin/env python import json import argparse impor...
qinglan233/vass
log_parser/plot_log_data.py
Python
apache-2.0
2,532
#!/usr/bin/python # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google 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...
xlzdew/seleniumpr
py/test/selenium/webdriver/common/element_attribute_tests.py
Python
apache-2.0
12,253
import diplib as dip import numpy as np import matplotlib.pyplot as plt import random import math ### img = dip.ImageReadICS('../cermet') grad = dip.GradientMagnitude(img, 5) grad.Show() a = dip.Watershed(grad) a.Show() seeds = dip.CreatePoissonPointProcess(img.Sizes(), 0.001) b = dip.SeededWatershed(grad, seeds, f...
DIPlib/diplib
examples/python/pydip_examples.py
Python
apache-2.0
8,424
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/aio/operations/_express_route_circuit_peerings_operations.py
Python
mit
21,960
00000 0 output/rewire.py.err 16118 1 output/rewire.py.out
Conedy/Conedy
testing/createNetwork/expected/sum_rewire.py
Python
gpl-2.0
66
class TwoSum(object): def __init__(self): """ initialize your data structure here """ self.numbers=[] self.mapping={} def add(self, number): """ Add the number to an internal data structure. :rtype: nothing """ if number not in se...
Tanych/CodeTracking
170-Two-Sum-III---Data-structure-design/solution.py
Python
mit
1,026
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
nchammas/spark
python/pyspark/ml/param/shared.py
Python
apache-2.0
23,507
# # tempsens.py # # class controlling the DS18B20 1-wire temperature sensor from a Raspberry Pi # # Taken (almost verbatim) from: # https://www.modmypi.com/blog/ds18b20-one-wire-digital-temperature-sensor-and-the-raspberry-pi # # Feels a bit silly, I'd rather directly control the sensor but w/e # # Requires ...
cbosoft/pi_rheo_proj
bin/tempsens.py
Python
gpl-3.0
1,555
from pudzu.charts import * df = pd.read_csv("datasets/flagspurple.csv") groups = list(remove_duplicates(df.group)) array = [[dict(r) for _,r in df.iterrows() if r.group == g] for g in groups] data = pd.DataFrame(array, index=list(remove_duplicates(df.group))) FONT = calibri or sans fg, bg="black", "#EEEEEE" ...
Udzu/pudzu
dataviz/flagspurple.py
Python
mit
1,866
""" This module contains some plotting functions and plot types for easy plot creation """ import os import sys import math from collections import OrderedDict import numpy as np import matplotlib.pyplot as plt from matplotlib import rcParams import time from . import astroquantities as aq from . import astroclasses ...
ryanvarley/ExoData
exodata/plots.py
Python
mit
29,348
#!/usr/bin/env python # -*- coding: utf-8 -*- from lettuce import step @step(u'何もしない') def nanimo_shinai(step): pass
alrusdi/lettuce
tests/functional/language_specific_features/ja/success/dumb_steps.py
Python
gpl-3.0
132
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster class FastshareCz(SimpleHoster): __name__ = "FastshareCz" __type__ = "hoster" __version__ = "0.40" __status__ = "testing" __pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+' __...
rlindner81/pyload
module/plugins/hoster/FastshareCz.py
Python
gpl-3.0
3,056
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
squidsoup/snapcraft
snapcraft/internal/deprecations.py
Python
gpl-3.0
1,600
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id: handler.py,v ...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.2/Lib/xml/sax/handler.py
Python
mit
13,058
BLACKLIST_MODULES = [ # l10n_be cannot be reinstalled as the module's yaml data installs # the chart of accounts at installation time, and the other modules # depend on this module and the chart installation itself. 'l10n_be', 'l10n_be_intrastat', 'l10n_be_hr_payroll_account', # the hw_* mod...
grap/OpenUpgrade
openerp/addons/openupgrade_records/blacklist.py
Python
agpl-3.0
583
from django.contrib import auth from django.contrib.auth import load_backend from django.contrib.auth.backends import RemoteUserBackend from django.core.exceptions import ImproperlyConfigured from django.utils.functional import SimpleLazyObject def get_user(request): if not hasattr(request, '_cached_user'): ...
BitWriters/Zenith_project
zango/lib/python3.5/site-packages/django/contrib/auth/middleware.py
Python
mit
5,116
from google.oauth2 import service_account from googleapiclient.discovery import build class GcloudService(object): """ A meta-class for wrapping Gcloud services. """ gc_info = ( "type", "project_id", "private_key_id", "private_key", "client_email", "cli...
arbrandes/hastexo-xblock
hastexo/gcloud.py
Python
agpl-3.0
1,560
# Copyright 2015 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 requ...
kevin-zhaoshuai/zun
zun/tests/unit/objects/test_image.py
Python
apache-2.0
4,208
"""Tenderloin database models.""" from sqlalchemy import Column, String import pbkdf2 from .core import Base class User(Base): """Represents a user.""" __tablename__ = 'users' username = Column(String(32), primary_key=True, nullable=False) password_hash = Column(String(100), nullable=False) d...
baconshrimp/tenderloin
tenderloin/db/models.py
Python
mit
826
from generativepy.drawing import make_image_frame, setup from generativepy.movie import save_frame from generativepy.geometry import text from generativepy.color import Color from generativepy.utils import temp_file ''' Illustrates simple use of make_image_frame ''' def draw(ctx, pixel_width, pixel_height, frame_no, ...
martinmcbride/pytexture
examples/drawing/simple-make-frame.py
Python
mit
807
################################################################################ """ DESCRIPTION: Helpers for telecommand wrapper functions. PACKAGE: spell.lang.helpers.tchelper PROJECT: SPELL Copyright (C) 2008, 2015 SES ENGINEERING, Luxembourg S.a.r.l. This file is part of SPELL. This library is free sof...
Spacecraft-Code/SPELL
src/spell/spell/lang/helpers/tchelper.py
Python
lgpl-3.0
37,359
'''avant_link: Python library to extract revenue data from AvantLink ''' __version__ = '1.0' __author__ = 'Siddharth Saha (sidchilling@gmail.com)' import requests import xml.etree.ElementTree as ET class AvantLink(object): BASE_URL = 'https://www.avantlink.com/api.php' affiliate_id = '' auth_key = ...
sidchilling/avantlink-revenue-report
avant_link/avant_link.py
Python
mit
3,086
#!/usr/bin/env python import sys def cut(v,s): return v[:s],v[s:] format=[('tipo',2), ('data',8), ('bdi',2), ('papel',12), ('merc',3), ('nomeres',12), ('especi',10), ('prazo',3), ('moeda',4), ('open',13), ('high',13), ('low',1...
atilaromero/finance
finance/bmf2.py
Python
agpl-3.0
1,678
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
elijah513/ice
java/test/src/main/java/test/Ice/invoke/run.py
Python
gpl-2.0
1,078
"""add a spam field Revision ID: 41804fbf1862 Revises: 4d7d5b95ddef Create Date: 2014-12-17 19:04:09.190962 """ # revision identifiers, used by Alembic. revision = '41804fbf1862' down_revision = '4d7d5b95ddef' from alembic import op import sqlalchemy as sa from os.path import join, dirname, abspath, realpath impo...
geekosphere/wootpaste
alembic/versions/41804fbf1862_add_a_spam_field.py
Python
agpl-3.0
757
"""Production cloud deployments of fig infrastructure with docker""" from ficloud import metadata __version__ = metadata.version __author__ = metadata.authors[0] __license__ = metadata.license __copyright__ = metadata.copyright
pywizard/ficloud
ficloud/__init__.py
Python
apache-2.0
231
#这个文件储存了数据库的所有基本配置信息 #你们可以在这里修改数据库信息 DBL_CONNECTION_HOST = '120.77.37.235' DBL_CONNECTION_USER = 'zhuaqu' DBL_CONNECTION_PASSWORLD = 'MpGZ7FurG3jfxcNS' DBL_CONNECTION_DATABASE_NAME = 'tieba_zhuaqu'
ankanch/tieba-zhuaqu
DSV-tieba-zhuaqu/linux-dist/_database_.py
Python
gpl-3.0
277
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
dstufft/warehouse
warehouse/cli/db/upgrade.py
Python
apache-2.0
964
from sympy.diffgeom.rn import R2, R2_p, R2_r, R3_r, R3_c, R3_s from sympy.diffgeom import (Commutator, Differential, TensorProduct, WedgeProduct, BaseCovarDerivativeOp, CovarDerivativeOp, LieDerivative, covariant_order, contravariant_order, twoform_to_matrix, metric_to_Christoffel_1st, metric_to...
wxgeo/geophar
wxgeometrie/sympy/diffgeom/tests/test_diffgeom.py
Python
gpl-2.0
9,569
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, _ from odoo.exceptions import UserError class PosOpenStatement(models.TransientModel): _name = 'pos.open.statement' _description = 'Open Statements' @api.multi def open_st...
chienlieu2017/it_management
odoo/addons/point_of_sale/wizard/pos_open_statement.py
Python
gpl-3.0
1,894
# -*- coding: utf-8 -*- # # papylib - an emesene extension for papyon # # Copyright (C) 2009-2010 Riccardo (C10uD) <c10ud.dev@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 ...
emesene/emesene
emesene/e3/papylib/Session.py
Python
gpl-3.0
7,997
def histogramOfGradients(img): ''' --- I: O: ''' import numpy as np import cv2 # Calculate Sobel derivatives of each cell in x/y direction gx = cv2.Sobel(img, cv2.CV_32F, 1, 0) gy = cv2.Sobel(img, cv2.CV_32F, 0, 1) # Find magnitude/direction of gradient at each pix...
mattdelhey/kaggle-galaxy
histogramOfGradients.py
Python
mit
776
"""Tests for the Google authentication.""" import unittest from unittest import mock from bob_emploi.frontend.server import server from bob_emploi.frontend.server.test import base_test @mock.patch(server.__name__ + '.auth.id_token.verify_oauth2_token') class AuthenticateEndpointGoogleTestCase(base_test.ServerTestC...
bayesimpact/bob-emploi
frontend/server/test/auth_google_test.py
Python
gpl-3.0
11,110
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
Azure/azure-sdk-for-python
sdk/servicebus/azure-servicebus/samples/sync_samples/authenticate_using_azure_named_key_credential.py
Python
mit
1,073
import atexit import json import math import os import re import time from collections import namedtuple from datetime import date from datetime import datetime from datetime import timedelta from math import ceil from tempfile import NamedTemporaryFile from cached_property import cached_property from jsmin import jsm...
izapolsk/integration_tests
widgetastic_manageiq/__init__.py
Python
gpl-2.0
209,048
# -*- coding: utf-8 -*- """ Created on Thu Aug 4 08:23:00 2016 @author: hclqaVirtualBox1 """ class testOne: def testOne(): """ This is testOne """ print("Namaskar")
mayankjohri/LetsExplorePython
Section 1 - Core Python/Chapter 08 - Modules/modules sample/pacOne/modOne.py
Python
gpl-3.0
203
#! /usr/bin/env python # Copyright (c) 2020 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. # Linker wrapper that performs distributed ThinLTO on Goma. # # Usage: Pass the original link command as parameters to this script...
endlessm/chromium-browser
tools/clang/scripts/goma_ld.py
Python
bsd-3-clause
2,071
from pathlib import Path import jinja2 from django.conf import settings from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.utils.functional import cached_property from django.utils.module_loading import import_string from .base import BaseEngine class Jinja2(BaseEngine): app_dir...
ar4s/django
django/template/backends/jinja2.py
Python
bsd-3-clause
4,038
########################################################################## # # Copyright (c) 2011, John Haddon. 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...
DoubleNegativeVisualEffects/gaffer
python/GafferUITest/EventSignalCombinerTest.py
Python
bsd-3-clause
4,005
# SPDX-License-Identifier: AGPL-3.0-or-later """ Dummy """ # about about = { "website": None, "wikidata_id": None, "official_api_documentation": None, "use_official_api": False, "require_api_key": False, "results": 'empty array', } # do search-request def request(query, params): return p...
dalf/searx
searx/engines/dummy.py
Python
agpl-3.0
397
# # The Python Imaging Library. # $Id$ # # im.show() drivers # # History: # 2008-04-06 fl Created # # Copyright (c) Secret Labs AB 2008. # # See the README file for information on usage and redistribution. # from __future__ import print_function from PIL import Image import os import sys import subprocess import te...
ryfeus/lambda-packs
pytorch/source/PIL/ImageShow.py
Python
mit
6,237
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/enums/form.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import...
bellowsj/aiopogo
aiopogo/pogoprotos/enums/form_pb2.py
Python
mit
5,970
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from lmsensors import LMSensorsCollector class TestLMSensorsCollector(CollectorTestCase): def setUp(self, allowed_names=None)...
thardie/Diamond
src/collectors/lmsensors/test/testlmsensors.py
Python
mit
656
# Copyright (C) 2013-2018 ycmd contributors. # # This file is part of ycmd. # # ycmd 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. # ...
SolaWing/ycmd
ycmd/completers/cs/solutiondetection.py
Python
gpl-3.0
4,855
from hpp.corbaserver.rbprm.rbprmbuilder import Builder from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.gepetto import Viewer import omniORB.any import stair_bauzil_hrp2_path as tp import time packageName = "hrp2_14_description" meshPackageName = "hrp2_14_description" rootJointType = "freeflyer" ## ...
rlefevre1/hpp-rbprm-corba
script/dynamic/stair_bauzil_hrp2_interp.py
Python
lgpl-3.0
5,990
# Copyright 2017 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...
xuleiboy1234/autoTitle
tensorflow/tensorflow/python/debug/lib/debug_service_pb2_grpc.py
Python
mit
3,162
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class ZhispiderPipeline(object): def process_item(self, item, spider): return item
henofdante/ZhiSpider
ZhiSpider/pipelines.py
Python
gpl-3.0
289
from django.conf.urls import url, include from .views import HomeView urlpatterns = [ url(r'^$', HomeView.as_view(), name='home'), ]
tbeadle/docker-gunicorn
samples/django_channels/app/urls.py
Python
mit
139
# left_column[9] = disparity # left_column[8] = conrtol # left_column[7:0] = decoded 8 # right column[9:0] = encoded 10 in correct order : abcdefgh. Need to flip it, because gtx spits out flipped data with flipped bit order # mem7f = [] for i in range(0x80): mem7f.append(0); filecontent = {} for line in open('gtx...
Elphel/x393_sata
host/gtx_10x8dec_geninit.py
Python
gpl-3.0
2,126
class Solution(object): def getHint(self, secret, guess): """ :type secret: str :type guess: str :rtype: str """ A = sum([secret[i] == guess[i] for i in range(len(secret))]) from collections import Counter B = sum((Counter(secret) & Counter(guess)).val...
xinqiu/My-LeetCode-Notes
Leetcode/299.py
Python
gpl-2.0
429
print 4
ArcherSys/ArcherSys
skulpt/test/interactive/t00.py
Python
mit
8
# Created By: Virgil Dupras # Created On: 2008-07-21 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/g...
tuxlifan/moneyguru
core/tests/gui/search_field_test.py
Python
gpl-3.0
8,239
# 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...
hehongliang/tensorflow
tensorflow/python/training/optimizer_test.py
Python
apache-2.0
12,617
''' Triple Tap ========== .. versionadded:: 1.7.0 Search touch for a triple tap ''' __all__ = ('InputPostprocTripleTap', ) from time import time from kivy.config import Config from kivy.vector import Vector class InputPostprocTripleTap(object): ''' InputPostProcTripleTap is a post-processor to check if ...
andnovar/kivy
kivy/input/postproc/tripletap.py
Python
mit
3,483
import numpy as np import re import sys import operator import matplotlib.pyplot as plt def parse_transposes(fn): size = re.compile('(\d+) x (\d+)') tp = re.compile('Throughput: ([\d\.]+) GB') sizes = [] tps = [] with open(fn, 'r') as f: for l in f: s = size.search(l) ...
denizyuret/inplace
extras/python/summarize.py
Python
gpl-2.0
1,163
# Copyright 2006 Edward Loper. May be distributed under the same terms # as Python itself. # # From http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116 import re import sys class TerminalController: """ A class that can be used to portably generate formatted output to a terminal. `Termina...
f3at/feat
src/feat/extern/log/termcolor.py
Python
gpl-2.0
8,291
""" WSGI config for todolists project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`...
danjac/django-angular-tasks
todolists/todolists/wsgi.py
Python
mit
1,566
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
dfranco/shinken
shinken/http_daemon.py
Python
agpl-3.0
17,840
#!/usr/bin/env python # # Copyright 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks from multiprocessing import Process import numpy # This block just exists to pass data through and throw an excepti...
jdemel/gnuradio
gnuradio-runtime/python/gnuradio/gr/qa_uncaught_exception.py
Python
gpl-3.0
2,500
# file openpyxl/tests/test_iter.py # Copyright (c) 2010 openpyxl # # 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 u...
chronossc/openpyxl
openpyxl/tests/test_iter.py
Python
mit
4,013
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
mancoast/CPythonPyc_test
fail/314_test_io.py
Python
gpl-3.0
98,059
# -*- coding: utf-8 -*- import types import datetime from decimal import Decimal class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str__(self): original = UnicodeDecodeError.__str__(self) ...
vivyly/parcellate
python-goose/goose/utils/encoding.py
Python
bsd-3-clause
4,889