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
# Copyright 2020 Red Hat, Inc. Jake Hunsaker <jhunsake@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General ...
slashdd/sos
sos/cleaner/mappings/username_map.py
Python
gpl-2.0
1,265
0
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyIlmbase(AutotoolsPackage): """The PyIlmBase libraries provides python bindings for the I...
LLNL/spack
var/spack/repos/builtin/packages/py-ilmbase/package.py
Python
lgpl-2.1
1,026
0.004873
from __future__ import absolute_import, print_function, division import unittest from pony.orm.core import * from pony.orm.tests.testutils import * from pony.orm.tests import setup_database, teardown_database db = Database() db = Database('sqlite', ':memory:') class Product(db.Entity): id = PrimaryKey(int) ...
ponyorm/pony
pony/orm/tests/test_prop_sum_orderby.py
Python
apache-2.0
5,191
0.000385
def test_help_message(testdir): result = testdir.runpytest( '--help', ) result.stdout.fnmatch_lines([ 'pytest-random-order options:', '*--random-order-bucket={global,package,module,class,parent,grandparent,none}*', '*--random-order-seed=*', ]) def test_markers_message(t...
jbasko/pytest-random-order
tests/test_cli.py
Python
mit
503
0.001988
"core.Pixmap tests" from unittest import SkipTest from testutils import * from gfxprim.core import Pixmap from gfxprim import gfx, core def test_gfx_submodule_loads(): "gfx is present in a Pixmap" c = Pixmap(1, 1, core.C.PIXEL_RGB888) assert c.gfx def test_gfx_submodule_has_C(): "gfx contains C" c = Pix...
gfxprim/gfxprim
tests/pylib/test_gfx.py
Python
lgpl-2.1
3,030
0.032013
"""Clean up notifications schema, some other parts. Revision ID: 2979a1322381 Revises: 2b478162b2b7 Create Date: 2020-03-03 07:32:54.113550 """ from alembic import op # revision identifiers, used by Alembic. revision = "2979a1322381" down_revision = "2b478162b2b7" def upgrade(): op.drop_index("ix_notification_...
pudo/aleph
aleph/migrate/versions/2979a1322381_cleanup.py
Python
mit
712
0.001404
# Natural Language Toolkit: PanLex Corpus Reader # # Copyright (C) 2001-2016 NLTK Project # Author: David Kamholz <kamholz@panlex.org> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ CorpusReader for PanLex Lite, a stripped down version of PanLex distributed as an SQLite database. See the READ...
JFriel/honours_project
venv/lib/python2.7/site-packages/nltk/corpus/reader/panlex_lite.py
Python
gpl-3.0
5,153
0.004463
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
iohannez/gnuradio
gr-filter/python/filter/qa_pfb_arb_resampler.py
Python
gpl-3.0
8,395
0.004169
#! /usr/bin/python3 import pygame from colors import Colors class Heart(pygame.sprite.Sprite): def __init__(self, pos): pygame.sprite.Sprite.__init__(self) self.image, self.rect = self.load_image("heart.png") self.rect.x = pos[0] self.rect.y = pos[1] def load_image(self...
joalcava/space_invaders
heart.py
Python
gpl-3.0
626
0.004808
__author__ = 'panzer' from swampy.TurtleWorld import * from math import radians, sin def initTurtle(delay = 0.01): """ Initializes a turtle object :param delay: Delay before each action of the turtle. Lower it is the faster the turtle moves. :return: turtle object """ TurtleWorld() t = Turtle() t.delay...
BigFatNoob-NCSU/x9115george2
hw/code/2/4_3.py
Python
mit
1,206
0.024876
__version__ = "0.3.9"
nschloe/pyfvm
src/pyfvm/__about__.py
Python
gpl-3.0
22
0
""" Notes: - Brugia protein sequences: https://www.ncbi.nlm.nih.gov/bioproject/PRJNA10729 - wBm protein sequences: https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=292805 - BLASTP against Reference proteins (refseq protein) from Human, using BLOSUM45 matrix. - BLASTP against nr proteins from O. volvulus and ...
dave-the-scientist/brugia_project
get_knockout_info.py
Python
gpl-3.0
20,007
0.006998
#!/usr/bin/env python2.7 # -*- mode: python; coding: utf-8; -*- """Module for generating lexicon using Rao and Ravichandran's method (2009). """ ################################################################## # Imports from __future__ import unicode_literals, print_function from blair_goldensohn import build_mtx...
WladimirSidorenko/SentiLex
scripts/rao.py
Python
mit
8,962
0
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2013, 2014 CERN # Author: Pawel Szostek (pawel.szostek@cern.ch) # Multi-tool support by Javier D. Garcia-Lasheras (javier@garcialasheras.com) # # This file is part of Hdlmake. # # Hdlmake is free software: you can redistribute it and/or modify # it under the t...
JamesHyunKim/myhdl
hdlmake/tools/aldec/aldec.py
Python
gpl-3.0
3,541
0.003106
# Copyright 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 import decorators from telemetry.internal.actions import loop from telemetry.testing import tab_test_case import py_utils AUDIO_1_LOOP_CHEC...
benschmaus/catapult
telemetry/telemetry/internal/actions/loop_unittest.py
Python
bsd-3-clause
2,356
0.002971
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="sankey.link.hoverlabel", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
plotly/python-api
packages/python/plotly/plotly/validators/sankey/link/hoverlabel/_font.py
Python
mit
1,877
0.000533
#!/usr/bin/env python """beanstalkc - A beanstalkd Client Library for Python""" import logging import socket import sys __license__ = ''' Copyright (C) 2008-2016 Andreas Bolka Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obt...
earl/beanstalkc
beanstalkc.py
Python
apache-2.0
10,921
0.000458
""" Imports all submodules """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals from deepchem.dock.pose_generation import PoseGenerator from deepchem.dock.pose_generation import VinaPoseGenerator from deepchem.dock.pose_scoring import PoseScorer from deepch...
bowenliu16/deepchem
deepchem/dock/__init__.py
Python
gpl-3.0
637
0.00157
import findspark #pyspark can't be detected if file is at other folders than where it is installed findspark.init('/home/jake/spark/spark-2.2.0-bin-hadoop2.7') ## 1) SPARK DATAFRAME #-------------------------------------------------------- from pyspark.sql import SparkSession from pyspark.sql.functions import ...
mapattacker/cheatsheets
python/pyspark.py
Python
mit
10,361
0.02326
from generate_chain_system import * class BezierConstraintSolverOdd( BezierConstraintSolver ): ''' Free direction, magnitude fixed (for G1 or A). ''' def update_system_with_result_of_previous_iteration( self, solution ): ### Iterate only over the parts of the matrix that will change, ### such as the lagrange...
songrun/VectorSkinning
src/bezier_constraint_odd_solver.py
Python
apache-2.0
9,730
0.063412
from typing import TypedDict class Point(TypedDict): x: int y: int def is_even(x: Point) -> bool: pass is_even({'<caret>'})
jwren/intellij-community
python/testData/completion/dictLiteralCompletion/EmptyLiteralsInCallExpressionsWithQuotes/main.py
Python
apache-2.0
142
0
# -*- coding: utf-8 -*- # Copyright (C) 2014 Accuvant, Inc. (bspengler@accuvant.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class Authenticode(Signature): name = "static_authentico...
lixiangning888/whole_project
modules/signatures_merge_tmp/static_authenticode.py
Python
lgpl-3.0
876
0.002326
# -*- coding: utf-8 -*- try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='historic_cadastre', version='0.1', description='SITN, a sitn project', author='sitn...
kalbermattenm/historic_cadastre
setup.py
Python
gpl-2.0
1,011
0.000989
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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.apach...
plumgrid/plumgrid-nova
nova/api/openstack/compute/contrib/os_tenant_networks.py
Python
apache-2.0
7,948
0.000881
"""Axis switch platform tests.""" from unittest.mock import Mock, call as mock_call from homeassistant.components import axis import homeassistant.components.switch as switch from homeassistant.setup import async_setup_component from .test_device import NAME, setup_axis_integration EVENTS = [ { "operati...
postlund/home-assistant
tests/components/axis/test_switch.py
Python
apache-2.0
2,374
0.000842
# -*- coding: utf-8 -*- import pytest from numpy import array from numpy.testing import assert_array_almost_equal from gdal2mbtiles.constants import (EPSG_WEB_MERCATOR, EPSG3857_EXTENTS) from gdal2mbtiles.gdal import SpatialReference @pytest.fixture def epsg_3857_from_proj4(): ...
ecometrica/gdal2mbtiles
tests/test_spatial_reference.py
Python
apache-2.0
1,178
0
# coding=utf-8# # Copyright (c) 2014-2018, F5 Networks, 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 applicabl...
F5Networks/f5-openstack-agent
f5_openstack_agent/lbaasv2/drivers/bigip/icontrol_driver.py
Python
apache-2.0
112,266
0
#!/usr/bin/python # -*- coding: utf-8 -*- # # SchoolTool - common information systems platform for school administration # Copyright (c) 2003 Shuttleworth Foundation # # 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...
HomeRad/TorCleaner
test.py
Python
gpl-2.0
32,033
0.00103
# -*- coding: utf-8 -*- import cPickle as pickle GEO_FILES = './geo_files' def gen_db(): u'''Функция для генерации pickle базы ipgeobase.ru ''' res = [] tmp_list = [] cities_dict = {} # cidr_optim.txt for line in open('%s/cidr_optim.txt' % GEO_FILES, 'r'): a = line.split('\t'...
greggy/python-ipgeobase
cidr_create.py
Python
bsd-3-clause
1,230
0.010906
#!/usr/bin/python # -*- coding: utf-8 -*- # @author Philip import tarfile as tf import zipfile as zf import os, re, shutil, sys, platform pyversion = platform.python_version() islinux = platform.system().lower() == 'linux' if pyversion[:3] in ['2.6', '2.7']: import urllib as urllib_request import codecs ...
OpenConextApps/OpenConextApps-MediaWiki
includes/zhtable/Makefile.py
Python
gpl-2.0
13,107
0.036927
############################################################################### # lazyflow: data flow based lazy parallel computation framework # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/o...
stuarteberg/lazyflow
tests/testRESTfulBlockwiseFileset.py
Python
lgpl-3.0
7,468
0.014596
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 Softwar...
jjgomera/pychemqt
lib/elemental.py
Python
gpl-3.0
7,567
0.000264
#!/usr/bin/env python import os import sys import argparse import json # tempate2json.py -k SYSTEM=lonestar.tacc.utexas.edu # PATH=/home/vaughn/apps -i template.jsonx -o file.json if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("-k", dest='keys', help='Spac...
iPlantCollaborativeOpenSource/cyverse-sdk
src/scripts/template2json.py
Python
bsd-3-clause
1,718
0.001164
#!/usr/bin/env python #Takes a table and index of Exon Lens, calculates RPKMs import sys import os import re import fileinput from decimal import Decimal from decimal import getcontext from fractions import Fraction def main(table,index): indf = open(index) out_file = "%s_rpkm.table" % os.path.splitext(table)...
Luminarys/Bioinformatics
Scripts/GetRPKM.py
Python
gpl-2.0
1,450
0.006207
#! /usr/bin/env python """ ############################################################################################# # # # Name: LogFileAccessManager.py # # @author: Nicholas Lemay # # @license: MetPX Copyright (C) 2004-2006 Environment Canada # MetPX comes with ABSOLUTELY NO WARRANTY; For details type s...
khosrow/metpx
pxStats/lib/LogFileAccessManager.py
Python
gpl-2.0
12,296
0.024723
# coding=utf-8 # (c) 2018, NetApp Inc. # 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 try: from unittest import mock except ImportError: import mock from ansible.module_utils.net...
cchurch/ansible
test/units/modules/storage/netapp/test_netapp_e_volume.py
Python
gpl-3.0
58,947
0.005038
# This file is part of cclib (http://cclib.github.io), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2014, the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1 or later. You s...
andersx/cclib
src/cclib/writer/xyzwriter.py
Python
lgpl-2.1
4,078
0.000981
#!/usr/bin/env python from setuptools import setup if __name__ == "__main__": setup()
centaurialpha/pireal
setup.py
Python
gpl-3.0
91
0
from __future__ import print_function from glyphNameFormatter.tools import camelCase doNotProcessAsLigatureRanges = [ (0xfc5e, 0xfc63), (0xfe70, 0xfe74), #(0xfc5e, 0xfc61), (0xfcf2, 0xfcf4), (0xfe76, 0xfe80), ] def process(self): # Specifically: do not add suffixes to these ligatures, ...
LettError/glyphNameFormatter
Lib/glyphNameFormatter/rangeProcessors/helper_arabic_ligature_exceptions.py
Python
bsd-3-clause
1,516
0.005937
#!/usr/bin/env python # coding=utf-8 import traceback try: raise SyntaxError, "traceback test" except: traceback.print_exc()
zhaochl/python-utils
utils/except_util.py
Python
apache-2.0
134
0.014925
# # (C) Copyright 2001/2002 Kai Sterker <kaisterker@linuxgames.com> # Part of the Adonthell Project http://adonthell.linuxgames.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License. # This program is distributed in the hope that it will...
ksterker/wastesedge
scripts/schedules/mapcharacters/sarin.py
Python
gpl-2.0
2,833
0.012354
# # 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 # ...
gnocchixyz/python-gnocchiclient
gnocchiclient/v1/resource_cli.py
Python
apache-2.0
10,591
0
import shutil import os import jinja2 import string import subprocess import re from xen.provisioning.HdManager import HdManager from settings.settingsLoader import OXA_XEN_SERVER_KERNEL,OXA_XEN_SERVER_INITRD,OXA_DEBIAN_INTERFACES_FILE_LOCATION,OXA_DEBIAN_UDEV_FILE_LOCATION, OXA_DEBIAN_HOSTNAME_FILE_LOCATION, OXA_DEB...
avlach/univbris-ocf
vt_manager/src/python/agent/xen/provisioning/configurators/ofelia/OfeliaDebianVMConfigurator.py
Python
bsd-3-clause
6,611
0.039782
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase class UtilsTests(TestCase): """docstring for UtilsTests""" def setUp(self): self.username = 'theskumar' self.email = 'theskumar@example.com' def test_foo(self): self.assertEqual('foo'...
theskumar/django-unsubscribe
unsubscribe/tests/test_utils.py
Python
bsd-3-clause
329
0
import numpy as np import matplotlib.pyplot as pl def f(x): return np.exp(-x**2) def main(): N = 100000 x = np.arange(N,dtype=np.float) x[0] = 0.2 counter = 0 for i in range(0, N-1): x_next = np.random.normal(x[i], 1.) if np.random.random_sample() < min(1, f(x_next)/f...
fbeutler/Metropolis-Hastings
Metropolis_Hastings2.py
Python
gpl-2.0
579
0.008636
# python3 # 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 ...
google/TaglessCRM
src/plugins/pipeline_plugins/hooks/ads_uac_hook.py
Python
apache-2.0
9,520
0.004832
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfgen/pdfgeom.py __version__=''' $Id: pdfgeom.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__=""" This module includes any mathematical methods ...
nickpack/reportlab
src/reportlab/pdfgen/pdfgeom.py
Python
bsd-3-clause
3,119
0.00545
import tensorflow as tf import matplotlib.pyplot as plt import math x_node = tf.random_uniform([1], minval=-1, maxval=1, dtype=tf.float32, name='x_node') y_node = tf.random_uniform([1], minval=-1, maxval=1, dtype=tf.float32, name='y_node') times = 5000 hits = 0 pis = [] with tf.Session() as sessio...
thiswind/nn_practice
tensorflow/calculate_pi_old.py
Python
gpl-3.0
581
0.032702
from django.db import models from django.db.models.fields.related import ManyToOneRel, ForeignObjectRel from elasticsearch_dsl.mapping import Mapping from elasticsearch_dsl.field import Field from djes.conf import settings FIELD_MAPPINGS = { "AutoField": {"type": "long"}, "BigIntegerField": {"type": "long"},...
theonion/djes
djes/mapping.py
Python
mit
5,823
0.002919
# 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...
asimshankar/tensorflow
tensorflow/contrib/model_pruning/python/pruning.py
Python
apache-2.0
21,323
0.00469
# Lint as: python3 # Copyright 2021 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 ...
tensorflow/lingvo
lingvo/jax/base_model.py
Python
apache-2.0
37,124
0.004067
class ComplexClause(object): type_string = '' def __init__(self, *args): self.clauses = args self.add_prefix(self.type_string) def is_matrix(self): for c in self.clauses: if not c.is_matrix(): return False return True def involves(self, an...
PhonologicalCorpusTools/PolyglotDB
polyglotdb/query/base/complex.py
Python
mit
2,772
0.000722
import logging from django.conf import settings from django.contrib import messages from django.contrib.auth import views as auth_views, get_user_model, update_session_auth_hash, logout from django.contrib.auth.tokens import default_token_generator from django.contrib.messages.views import SuccessMessageMixin from dja...
crypotex/taas
taas/user/views.py
Python
gpl-2.0
6,005
0.001166
# -*- encoding: utf-8 -*- import datetime from django import forms from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from django.core import exceptions as django_exceptions from lyra import models class Reservation(forms.ModelForm): def __init__(self, *args, **kw...
hylje/Lyra
lyra/forms.py
Python
bsd-3-clause
3,064
0.00359
# Copyright 2012, Nachi Ueno, NTT MCL, 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 applic...
xuweiliang/Codelibrary
openstack_dashboard/dashboards/project/routers/ports/views.py
Python
apache-2.0
3,508
0
import unittest import nest from nix4nest.nest_api.models.multimeter import NestMultimeter class TestNode(unittest.TestCase): def setUp(self): nest.ResetKernel() self.neuron_id = nest.Create('iaf_neuron')[0] rec_params = {'record_from': ['V_m'], 'withtime': True} self.mm_id = n...
asobolev/nix4nest
nix4nest/test/test_nest_api/test_multimeter.py
Python
lgpl-3.0
967
0.001034
#!/usr/bin/env python2.7 # -*- encoding: utf-8 -*- """ Home-monitor ~~~~~~~~~~~~ :copyright: (c) 2013 by Aurélien Chabot <aurelien@chabot.fr> :license: GPLv3, see COPYING for more details. """ try: import threading import sys, os, time, datetime import json import urllib2 from ConfigParser import ...
trishika/home-monitor
monitor.py
Python
gpl-3.0
2,393
0.033445
from phovea_server.ns import Namespace, abort from phovea_server.util import jsonify from phovea_server.config import get as get_config from phovea_server.plugin import list as list_plugins import logging app = Namespace(__name__) _log = logging.getLogger(__name__) @app.route('/<path:path>') def _config(path): pat...
datavisyn/tdp_core
tdp_core/config.py
Python
bsd-3-clause
688
0.011628
# pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2018 pywws contributors # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; ei...
jim-easterbrook/pywws
src/pywws/service/pwsweather.py
Python
gpl-2.0
3,827
0.001045
# coding: utf-8 import json import logging import webapp2 from webapp2_extras import sessions from google.appengine.api.taskqueue import TombstonedTaskError, TaskAlreadyExistsError, DuplicateTaskNameError from domain.entity import User import error class BaseHandler(webapp2.RequestHandler): def dispatch(self): ...
hagifoo/gae-pomodoro
app/src/application/handler/__init__.py
Python
mit
2,303
0.000868
from glob import glob import fitsio import sys from astrometry.util.fits import * from astrometry.util.file import * from astrometry.util.starutil_numpy import * from astrometry.libkd.spherematch import * from collections import Counter from legacypipe.oneblob import _select_model from legacypipe.survey import wcs_for_...
legacysurvey/pipeline
py/legacyanalysis/fix-model-selection.py
Python
gpl-2.0
4,976
0.007838
# -*- coding: utf-8 -*- """ Copyright 2010 cloudControl UG (haftungsbeschraenkt) 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 ...
cloudControl/cctrl
cctrl/error.py
Python
apache-2.0
7,677
0.00482
#!/usr/bin/env python import ibus import dbus bus = dbus.SessionBus() e = ibus.interface.IPanel() print e.Introspect("/", bus)
ibus/ibus-qt
src/interfaces/introspect_panel.py
Python
gpl-2.0
130
0.007692
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2011 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. # # *************************************...
joshmoore/zeroc-ice
py/demo/Ice/latency/Client.py
Python
gpl-2.0
1,349
0.005189
from .base import BaseInterface import eventlet from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler from flask import Flask, render_template, session, request, send_from_directory from flask_socketio import SocketIO, emit, join_room, leave_room, close_room, rooms, disconnect ...
Hemisphere-Project/HPlayer2
core/interfaces/regie.py
Python
gpl-3.0
10,996
0.012095
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
dnjohnstone/hyperspy
hyperspy/misc/export_dictionary.py
Python
gpl-3.0
7,725
0.000647
#!/usr/bin/env python # encoding: utf-8 """ For local testing purposes """ from itertools import compress, chain, product, ifilter from functools import partial from reader import read_input, list_files def is_valid(task, solution): """ :param reader.Task task: :param list[1|0] solution: :return bool...
discreteoptimization/setcover
cp_homebrew_003/validator.py
Python
mit
2,676
0.002242
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import datetime from collections import OrderedDict from typing import Dict, List, Tuple, Union import frappe from frappe import _ from frappe.utils import date_diff from erpnext.accounts.report.gen...
frappe/erpnext
erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.py
Python
gpl-3.0
5,496
0.025291
"""DeeCluster: provides a namespace for a set of DeeDatabases""" __version__ = "0.1" __author__ = "Greg Gaughan" __copyright__ = "Copyright (C) 2007 Greg Gaughan" __license__ = "MIT" #see Licence.txt for licence information from Dee import Relation, Tuple from DeeDatabase import Database class Cluster(dict):...
ggaughan/dee
DeeCluster.py
Python
mit
1,475
0.008814
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
freezmeinster/teh-manis
django/conf/global_settings.py
Python
bsd-3-clause
21,140
0.00175
import io import math import random from contextlib import redirect_stdout from unittest import TestCase from hamcrest import * from array_util import get_random_unique_array from chapter16.problem16_1 import greedy_make_change, make_change, print_change from datastructures.array import Array from util import between...
wojtask/CormenPy
test/test_chapter16/test_problem16_1.py
Python
gpl-3.0
1,843
0.00217
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
Tigerwhit4/taiga-back
taiga/projects/tasks/api.py
Python
agpl-3.0
7,479
0.002541
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name: Wascan - Web Application Scanner # @repo: https://github.com/m4ll0k/Wascan # @author: Momo Outaadi (M4ll0k) # @license: See the file 'LICENSE.txt from re import search,I def jiasule(headers,content): _ = False for header in headers.items(): _ |= sea...
m4ll0k/Spaghetti
plugins/fingerprint/waf/jiasule.py
Python
gpl-3.0
587
0.040886
#!/usr/bin/env python # -*- coding: UTF-8 -*- import re tags = ['Satellite_5', 'Spacewalk'] name = 'Basic Cobbler settings are correct' def etc_cobbler_settings(data): """ Verify settings in /etc/cobbler/settings: redhat_management_type: "site" redhat_management_server: "satellite.example.com" server...
RedHatSatellite/satellite-sanity
satellite_sanity_lib/rules/sat5_cobbler_config.py
Python
gpl-3.0
3,726
0.021202
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Thomas Amland # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This ...
tamland/trakt-sync
xbmc_library.py
Python
gpl-3.0
4,438
0.001127
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import unittest from flypy import jit class TestCallingConventionFromPython(unittest.TestCase): def test_varargs(self): @jit def f(a, b, *args): return [a, b, args[1]] self.assertEqual(f...
flypy/flypy
flypy/tests/test_calling_conv.py
Python
bsd-2-clause
1,235
0.004049
""" Scrape yahoo industry database through YQL """ import mysql.connector import stockretriever import sys cnx = mysql.connector.connect(user='root', password='root', database='yahoo') cursor = cnx.cursor() add_employee = ("INSERT INTO stocks " "(symbol, name, industry) " "VALUES (%s,...
pettersoderlund/fondout
script/StockScraper-master/import_symbols_from_industry.py
Python
bsd-3-clause
1,827
0.004379
# -*- coding: utf-8 -*- import logging import argparse from .imdb import find_movies logger = logging.getLogger('mrot') def parse_args(): parser = argparse.ArgumentParser(prog='mrot', description='Show movie ratings over time.', formatter_class=argparse.ArgumentDefaultsHelpF...
abrenaut/mrot
mrot/cli.py
Python
mit
1,423
0.003514
''' Created on Apr 30, 2017 @author: jamie ''' import numpy as np class CartState(object): ''' Defines a Cartesian state information ''' pos_I = np.array([0., 0., 0.]) vel_I = np.array([0., 0., 0.])
jamielapointe/PyPassiveRangingFilters
pyPassiveRanging/dynamicsModels/cartState.py
Python
mit
236
0.016949
short_name = "godot" name = "Godot Engine" major = 2 minor = 1 patch = 4 status = "beta"
pixelpicosean/my-godot-2.1
version.py
Python
mit
89
0
from __future__ import division import datetime import pytz from app.models import Patch def get_match_patch(match_date): utc = pytz.UTC #pylint: disable=no-value-for-parameter match_date = utc.localize(datetime.datetime.fromtimestamp(match_date)) for patch in Patch.objects.all().order_by('-start_dat...
lucashanke/houseofdota
app/util/match_util.py
Python
mit
2,180
0.005046
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'PushResult' db.create_table(u'notos_pushresult', ( (u'id', self.gf('django.db.mo...
Sigmapoint/notos
src/notos/migrations/0001_initial.py
Python
mit
3,961
0.007321
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-03 10:44 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('domains', '0003_auto_20161103_1031'), ] operations...
adithyabhatkajake/kompile
domains/migrations/0004_auto_20161103_1044.py
Python
gpl-2.0
678
0.001475
from paraview.simple import * import os import sys import numpy as np path = os.getcwd() + "/" file_name = sys.argv[1] inp = file_name + ".e" outCSV = file_name + ".csv" reader = ExodusIIReader(FileName=path+inp) tsteps = reader.TimestepValues writer = CreateWriter(path+file_name+"_Cells.csv", reader) writer.FieldA...
jhaase1/zapdos
tests/reflections/low_initial/ToCSV.py
Python
lgpl-2.1
586
0.003413
# # 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...
dhuang/incubator-airflow
airflow/providers/ssh/hooks/ssh.py
Python
apache-2.0
14,364
0.001601
import os.path import argparse import arrow import iso8601 import requests import json import re import datetime from yaml import load from repoze.lru import lru_cache from dateutil.parser import parse from time import sleep from retrying import retry from logging import getLogger RE = re.compile(r'(^.*)@(\d{4}-\d{...
openprocurement/reports
reports/helpers.py
Python
apache-2.0
9,179
0.000545
#!/usr/bin/env python3 ######################################################################## # Solves problem 142 from projectEuler.net. # ??? # Copyright (C) 2011 Santiago Alessandri # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
sanSS/programming-contests
project-euler/problem142.py
Python
gpl-3.0
1,119
0.003575
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2009 Tom Kralidis # # Authors : Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Contact email: tomkralidis@gmail.com # ================================...
Gaia3D/QGIS
python/ext-libs/owslib/iso.py
Python
gpl-2.0
36,451
0.005816
import lie_group_diffeo as lgd import odl import numpy as np # Select space and interpolation space = odl.uniform_discr([-1, -1], [1, 1], [200, 200], interp='linear') # Select template and target as gaussians template = space.element(lambda x: np.exp(-(5 * x[0]**2 + x[1]**2) / 0.4**2)) target = space.element(lambda x...
adler-j/lie_grp_diffeo
examples/deformation_closest_pt_2d.py
Python
gpl-3.0
3,110
0.000322
from radar.auth.passwords import ( check_password_hash, generate_password, generate_password_hash, get_password_length, is_strong_password, password_to_nato_str, ) from radar.models.users import User def test_password_to_nato_str(): password = 'aAzZ123' assert password_to_nato_str(pass...
renalreg/radar
tests/auth/test_passwords.py
Python
agpl-3.0
1,704
0.000587
# This file is autogenerated by the get_windows_info.py script # Do not edit. win_tz = { 'AUS Central Standard Time': 'Australia/Darwin', 'AUS Eastern Standard Time': 'Australia/Sydney', 'Afghanistan Standard Time': 'Asia/Kabul', 'Alaskan Standard Time': 'America/Anchorage', 'Arab Standard Time': 'A...
immanetize/nikola
nikola/packages/tzlocal/windows_tz.py
Python
mit
26,452
0
# ----------------------------------------------------------------------------- # Download data: # - Browser: # http://midas3.kitware.com/midas/folder/10409 => VisibleMale/vm_head_frozenct.mha # - Terminal # curl "http://midas3.kitware.com/midas/download?folders=&items=235235" -o vm_head_frozenct.mha # ----...
Kitware/arctic-viewer
scripts/examples/vtk/medical/head-ct-volume.py
Python
bsd-3-clause
3,622
0.002485
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import sys import json from prjxray.x...
SymbiFlow/prjxray
utils/xjson.py
Python
isc
558
0
#!/usr/bin/env python2 # Copyright (C) 2013: # Gabes Jean, naparuba@gmail.com # Pasche Sebastien, sebastien.pasche@leshop.ch # # 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...
naparuba/check-linux-by-ssh
check_ntp_sync_by_ssh.py
Python
mit
8,784
0.006717
# -*- coding: utf-8 -*- from __future__ import unicode_literals from abc import ABCMeta import csv from performance_tools.exceptions import ProgressBarException, ElasticsearchException from performance_tools.utils.progress_bar import create_progress_bar class BaseURLFlowBackend(object): """Collect URL flow fro...
PeRDy/performance-tools
performance_tools/urls_flow/backends/base.py
Python
gpl-2.0
2,681
0.001865
""" Python script 'process_NCEI_03_prcp_180d.py' by Matthew Garcia, PhD student Dept. of Forest and Wildlife Ecology University of Wisconsin - Madison matt.e.garcia@gmail.com Copyright (C) 2015-2016 by Matthew Garcia Licensed Gnu GPL v3; see 'LICENSE_GnuGPLv3.txt' for complete terms Send questions, bug reports, any re...
megarcia/GT16_JGRA
source/process_NCEI_03_prcp_180d.py
Python
gpl-3.0
5,554
0
# Copyright 2012 Leonidas Poulopoulos # # 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 w...
leopoul/mupy
muparse/__init__.py
Python
apache-2.0
582
0.001718
# Copyright 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. """Runs linker tests on a particular device.""" import logging import os.path import sys import traceback from pylib import constants from pylib.base impor...
patrickm/chromium.src
build/android/pylib/linker/test_runner.py
Python
bsd-3-clause
3,271
0.007031
def linear_search(lst,size,value): i = 0 while i < size: if lst[i] == value: return i i = i + 1 return -1 def main(): lst = [-31, 0, 1, 2, 2, 4, 65, 83, 99, 782] size = len(lst) original_list = "" value = int(input("\nInput a value to search for: ")) print...
EverythingAbout/Python
Searches/linear_search.py
Python
mit
775
0.009032
import pytest import numpy as np import noisily as ns # FIXME This has got to be an abuse of fixtures, right? @pytest.fixture(scope='module', params=[(1, 1), (37, 57), (128, 128)]) def indices2D(request): shape = request.param return np.transpose(np.indices(shape)) @pytest.fixture(scope='module', params=[(1...
tocubed/noisily
tests/test_noise.py
Python
apache-2.0
2,684
0.007079