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
# -*- coding: utf-8 -*- from ...core.tags.registry import register from .forms import LikeForm @register.inclusion_tag('spirit/comment/like/_form.html') def render_like_form(comment, like, next=None): form = LikeForm() return {'form': form, 'comment_id': comment.pk, 'like': like, 'next': next}
nitely/Spirit
spirit/comment/like/tags.py
Python
mit
306
0
# # Copyright 2015 Red Hat, Inc. # # 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 th...
lyarwood/virt-deploy
virtdeploy/drivers/libvirt.py
Python
gpl-2.0
12,400
0
# Copyright 2013-2020 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 PerlDevelGlobaldestruction(PerlPackage): """Makes Perl's global destruction less tricky to...
iulian787/spack
var/spack/repos/builtin/packages/perl-devel-globaldestruction/package.py
Python
lgpl-2.1
641
0.00624
from lib.loghelper import Logger import numpy as np def visitCoverMetrics(visitMetrics, visitobj): visit = visitobj['visit'] riparianStructures = visitobj['riparianStructures'] percentBigTreeCover(visitMetrics, riparianStructures) percentCanopyNoCover(visitMetrics, riparianStructures) percentG...
SouthForkResearch/CHaMP_Metrics
tools/auxmetrics/metriclib/coverMetrics.py
Python
gpl-3.0
9,707
0.003709
#!/usr/bin/env python ''' EC2 external inventory script ================================= Generates inventory that Ansible can understand by making API request to AWS EC2 using the Boto library. NOTE: This script assumes Ansible is being executed where the environment variables needed for Boto have already been set:...
jimi-c/ansible
contrib/inventory/ec2.py
Python
gpl-3.0
72,916
0.002373
#!/usr/bin/env python ''' Module to perform various time operations. Documentation convention from https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt 07.07.2016 Loris Foresti ''' from __future__ import division from __future__ import print_function import datetime import numpy as np...
meteoswiss-mdr/precipattractor
pymodules/time_tools_attractor.py
Python
gpl-3.0
12,112
0.011311
# -*- coding: utf-8 -*- from pandas.compat import range import pandas.util.testing as tm from pandas import read_csv import os import nose with tm.assert_produces_warning(FutureWarning, check_stacklevel=False): import pandas.tools.rplot as rplot def curpath(): pth, _ = os.path.split(os.path.abspath(__file__))...
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/pandas/tests/test_rplot.py
Python
artistic-2.0
11,560
0.001298
from utils import common, database from TestCase.MVSTestCase import * class TestAccount(MVSTestCaseBase): roles = () need_mine = False def test_0_new_account(self): '''create new account * 5000''' account_table_file = '/home/%s/.metaverse/mainnet/account_table' % common.get_username() ...
mvs-live/metaverse
test/test-rpc-v3/TestCase/Account/batch_account.py
Python
agpl-3.0
2,352
0.006378
from django.core.exceptions import PermissionDenied from core.models import Author, Editor def copy_author_to_submission(user, book): author = Author( first_name=user.first_name, middle_name=user.profile.middle_name, last_name=user.last_name, salutation=user.profile.salutation, ...
ubiquitypress/rua
src/submission/logic.py
Python
gpl-2.0
2,061
0
#!/usr/bin/python # This file is part of Lerot. # # Lerot is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Lerot is distribu...
hubert667/AIR
build/scripts-2.7/learning-experiment.py
Python
gpl-3.0
860
0.002326
################################################################## # Copyright 2018 Open Source Geospatial Foundation and others # # licensed under MIT, Please consult LICENSE.txt for details # ################################################################## import os import tempfile import pywps.configuratio...
geopython/pywps
pywps/processing/job.py
Python
mit
4,609
0.001519
'''Galoshes ''' from distutils.core import setup from setuptools import find_packages CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Scientific/Engineer...
bsmithyman/galoshes
setup.py
Python
mit
1,497
0.032732
# -*- coding: utf-8 -*- from __future__ import unicode_literals from nose_parameterized import parameterized, param from dateparser.languages import default_language_loader, Language from dateparser.languages.detection import AutoDetectLanguage, ExactLanguages from tests import BaseTestCase class TestBundledLanguag...
seagatesoft/dateparser
tests/test_languages.py
Python
bsd-3-clause
18,881
0.0024
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################### # Copyright/License Notice (BSD License) # ######################################################################### ###################################################...
haxwithaxe/ddp
examples/xrproxy_server.py
Python
bsd-3-clause
11,364
0.027455
"""Agent foundation for conversation integration.""" from abc import ABC, abstractmethod from typing import Optional from homeassistant.helpers import intent class AbstractConversationAgent(ABC): """Abstract conversation agent.""" @property def attribution(self): """Return the attribution.""" ...
qedi-r/home-assistant
homeassistant/components/conversation/agent.py
Python
apache-2.0
714
0
def main(): with open('file.txt'): print(42)
smmribeiro/intellij-community
python/testData/quickFixes/PyRemoveUnusedLocalQuickFixTest/withOneTarget_after.py
Python
apache-2.0
56
0.017857
my_name = 'Zed A. Shaw' my_age = 35 # not a lie my_height = 74 # Inches my_weight = 180 # lbs my_eyes = 'Blue' my_teeth = 'White' my_hair = 'Brown' print "Let's talk about %s." % my_name print "He's %d inches tall." % my_height print "He's %d pounds heavy." % my_weight print "Actually that's not too heavy" print "He's...
rdthomson/set09103
src/LPHW/ex5.py
Python
gpl-3.0
596
0.008389
# -*- coding: utf-8 -*- # Copyright 2015-2017 Quartile Limted # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, _ class StockMove(models.Model): _inherit = "stock.move" pick_partner_id = fields.Many2one( related='picking_id.partner_id', ...
rfhk/awo-custom
sale_line_quant_extended/models/stock_move.py
Python
lgpl-3.0
10,584
0.005574
from rpython.flowspace.model import Variable from rpython.rtyper.lltypesystem import lltype from rpython.translator.simplify import get_graph from rpython.tool.uid import uid class CreationPoint(object): def __init__(self, creation_method, TYPE, op=None): self.escapes = False self.returns = False ...
oblique-labs/pyVM
rpython/translator/backendopt/escape.py
Python
mit
12,552
0.001514
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Red Hat, Inc. # # This software is licensed to you under the GNU Lesser General Public # License as published by the Free Software Foundation; either version # 2 of the License (LGPLv2) or (at your option) any later version. # There is NO WARRANTY for thi...
stbenjam/katello-agent
src/setup.py
Python
gpl-2.0
1,603
0.001871
from django.conf.urls import patterns, include, url from testapp.api import PersonResource from django.contrib import admin admin.autodiscover() person_resource = PersonResource() urlpatterns = patterns('', # Examples: # url(r'^$', 'testapp.views.home', name='home'), ...
satish-suradkar/pyresttest
pyresttest/testapp/testapp/urls.py
Python
apache-2.0
535
0
# vim:set tabstop=3 shiftwidth=3 expandtab: # vim:set autoindent smarttab nowrap: from django.conf.urls.defaults import * import settings urlpatterns = patterns('', (r'^$', 'webreview.views.index'), (r'^skip/(?P<skip>.*)$', 'webreview.views.changes'), (r'^diff/...
oseemann/cvsreview
app/urls.py
Python
gpl-3.0
1,023
0.006843
# -*- coding: utf-8 -*- """ *************************************************************************** RAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
adwiputra/LUMENS-repo
processing/r/RAlgorithm.py
Python
gpl-2.0
22,835
0.001927
class Solution(object): def validWordSquare(self, words): """ :type words: List[str] :rtype: bool """ if words is None or len(words) == 0: return True ls = len(words) for i in range(ls): for j in range(1, len(words[i])): ...
qiyuangong/leetcode
python/422_Valid_Word_Square.py
Python
mit
805
0.001242
import logging from datetime import timedelta from core import Feed import pandas as pd from core.observables import Ip, Observable from core.errors import ObservableValidationError class ThreatFox(Feed): default_values = { "frequency": timedelta(hours=1), "name": "ThreatFox", "source": "...
yeti-platform/yeti
plugins/feeds/public/threatfox.py
Python
apache-2.0
2,925
0
import astropy.io.fits as pyfits import astropy.wcs as pywcs import os, sys, time import numpy as np from pdb import set_trace import montage_wrapper as montage import shutil import gal_data import config import glob from scipy.ndimage.interpolation import zoom #_TOP_DIR = '/data/tycho/0/leroy.42/allsky/' #_INDEX_DIR...
arlewis/arl_galbase
single_cutout_test_newmethod.py
Python
mit
18,179
0.004951
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011-2012 OpenERP S.A (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
john-wang-metro/metro-openerp
bug_fix/ir_mail_server.py
Python
agpl-3.0
25,985
0.005118
""" Test that no StopIteration is raised inside a generator """ # pylint: disable=missing-docstring,invalid-name,import-error, try-except-raise, wrong-import-position,not-callable,raise-missing-from import asyncio class RebornStopIteration(StopIteration): """ A class inheriting from StopIteration exception ...
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/s/stop_iteration_inside_generator.py
Python
mit
3,242
0.005552
#!/usr/bin/python # -*- coding: latin-1 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 3, or (at your option) any later # version. # # This program is distributed in t...
SEA000/uw-empathica
empathica/gluon/contrib/pysimplesoap/server.py
Python
mit
17,610
0.005849
from skidl import SKIDL, TEMPLATE, Part, Pin, SchLib SKIDL_lib_version = '0.0.1' analog_devices = SchLib(tool=SKIDL).add_parts(*[ Part(name='AD623AN',dest=TEMPLATE,tool=SKIDL,keywords='ad623 instumentation amplifier dip-8',description='Single Supply, Rail to Rail, Instumentation Amplifier, RoHS, DIP-8',ref_pr...
xesscorp/skidl
skidl/libs/analog_devices_sklib.py
Python
mit
14,637
0.042768
"""Support for HomematicIP Cloud climate devices.""" import logging from typing import Any, Dict, List, Optional, Union from homematicip.aio.device import AsyncHeatingThermostat, AsyncHeatingThermostatCompact from homematicip.aio.group import AsyncHeatingGroup from homematicip.base.enums import AbsenceType from homema...
tchellomello/home-assistant
homeassistant/components/homematicip_cloud/climate.py
Python
apache-2.0
11,473
0.000697
from django.db.models.sql import compiler from datetime import datetime import re from django.db.models.base import Model REV_ODIR = { 'ASC': 'DESC', 'DESC': 'ASC' } SQL_SERVER_8_LIMIT_QUERY = \ """SELECT * FROM ( SELECT TOP %(limit)s * FROM ( %(orig_sql)s ORDER BY %(ord)s ) AS %(table)s ORDER...
VanyaDNDZ/django-sybase-backend
sqlsybase_server/pyodbc/compiler.py
Python
unlicense
10,019
0.003394
problem = """ The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please note that the palindromic number, in either base, may not include leading zeros.) """ def is_palindromic(s): return ...
lorenyu/project-euler
problem-036.py
Python
mit
813
0.00615
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe @frappe.whitelist() def get_items(price_list, sales_or_purchase, item=None, item_group=None): condition = "" args = {"price_list": p...
suyashphadtare/vestasi-erp-1
erpnext/erpnext/accounts/doctype/sales_invoice/pos.py
Python
agpl-3.0
1,595
0.022571
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2019 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Samy Bucher <samy.bucher@outlook.com> # # The licence is in the file __manifest__...
ecino/compassion-switzerland
sponsorship_switzerland/models/correspondence.py
Python
agpl-3.0
583
0
from .evaluate_all import main if __name__ == "__main__": main()
undertherain/vsmlib
vsmlib/benchmarks/__main__.py
Python
apache-2.0
70
0
import json import os import os.path as opath import shutil import subprocess from codegen.datatypes import build_datatype_py, write_datatype_py from codegen.compatibility import ( write_deprecated_datatypes, write_graph_objs_graph_objs, DEPRECATED_DATATYPES, ) from codegen.figure import write_figure_class...
plotly/plotly.py
packages/python/plotly/codegen/__init__.py
Python
mit
11,939
0.00067
""" Manage grains on the minion =========================== This state allows for grains to be set. Grains set or altered with this module are stored in the 'grains' file on the minions, By default, this file is located at: ``/etc/salt/grains`` .. note:: This does **NOT** override any grains set in the minion con...
saltstack/salt
salt/states/grains.py
Python
apache-2.0
15,945
0.001568
# encoding: utf-8 import os import subprocess import mongoengine as db def generic_backend(): """Allow Python to handle the details of load average discovery. This is the fastest method, but may not be portable everywhere. Testing on a Linux 2.6.35 Rackspace Cloud server: 17µsec. """ ...
marrow/monitor.collector
marrow/monitor/collector/ext/load.py
Python
mit
1,855
0.012412
"""GIFImage by Matthew Roe""" import Image import pygame from pygame.locals import * import time class GIFImage(object): def __init__(self, filename): self.filename = filename self.image = Image.open(filename) self.frames = [] self.get_frames() self.cur = 0 self.p...
drfreemayn/ml-testing
sex-dice/GIFImage.py
Python
gpl-2.0
5,891
0.006451
#!/usr/bin/env python3 # bank_account.py # # Simple Bank Account class example. # # AMJ # 2017-04-01 from random import randint class BankAccount: def __init__ (self, account_holder, has_overdraft): self.account_number = self.generate_account_number () self.account_holder = account_holder ...
TonyJenkins/cfs2160-python
04classes/Bank/bank_account.py
Python
unlicense
1,282
0.0117
import django from django.db import models from django.db.models.sql.query import LOOKUP_SEP from django.db.models.deletion import Collector # from django.db.models.related import RelatedObject from django.db.models.fields.related import ForeignObjectRel as RelatedObject from django.forms.forms import pretty_name from ...
pobear/django-xadmin
xadmin/util.py
Python
bsd-3-clause
19,558
0.001534
# 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...
brchiu/tensorflow
tensorflow/python/ops/image_ops_test.py
Python
apache-2.0
165,524
0.007812
# Copyright 2019 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 __future__ import print_function from __future__ import division from __future__ import absolute_import import itertools from dashboard.pinpoint.model...
endlessm/chromium-browser
third_party/catapult/dashboard/dashboard/pinpoint/models/evaluators/job_serializer.py
Python
bsd-3-clause
10,578
0.005105
import re from tkinter import * import tkinter.messagebox as tkMessageBox from idlelib.editor import EditorWindow from idlelib import iomenu class OutputWindow(EditorWindow): """An editor window that can serve as an output file. Also the future base class for the Python shell window. This class has no...
yotchang4s/cafebabepy
src/main/python/idlelib/outwin.py
Python
bsd-3-clause
4,385
0.000456
import lxml from utils import State from .people import NCPersonScraper from .bills import NCBillScraper # from .committees import NCCommitteeScraper class NorthCarolina(State): scrapers = { "people": NCPersonScraper, # 'committees': NCCommitteeScraper, "bills": NCBillScraper, } l...
sunlightlabs/openstates
scrapers/nc/__init__.py
Python
gpl-3.0
12,386
0.000242
import re import urllib import time import sys import types import datetime import commands import xml.dom.minidom from config import panda_config from pandalogger.LogWrapper import LogWrapper from pandalogger.PandaLogger import PandaLogger _log = PandaLogger().getLogger('broker_util') # curl class class _Curl: ...
RRCKI/panda-server
pandaserver/brokerage/broker_util.py
Python
apache-2.0
16,126
0.014015
"""Generate a schema wrapper from a schema""" import copy import os import sys import json from os.path import abspath, join, dirname import textwrap from urllib import request import m2r # import schemapi from here sys.path.insert(0, abspath(dirname(__file__))) from schemapi import codegen from schemapi.codegen imp...
ellisonbg/altair
tools/generate_schema_wrapper.py
Python
bsd-3-clause
18,648
0.001448
from MQTT_UI import Ui_MainWindow #Generated by Qt Designer from PyQt4 import QtCore, QtGui #for gui import paho.mqtt.client as mqtt #for mqtt import sys #for exit class StartQT4(QtGui.QMainWindow): client1 = mqtt.Client() #for raspberry pi client2 = mqtt.Client() #for simple mqtt test def __init__(self, ...
EEEManchester/Food-Computer
Software/MQTT Test GUI/MQTT_GUI/main.py
Python
mit
7,742
0.005425
import unittest from pyramid.compat import PY3 class Test_InstancePropertyMixin(unittest.TestCase): def _makeOne(self): cls = self._getTargetClass() class Foo(cls): pass return Foo() def _getTargetClass(self): from pyramid.util import InstancePropertyMixin r...
danielpronych/pyramid-doxygen
pyramid/tests/test_util.py
Python
bsd-2-clause
21,474
0.001537
# 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 http://mozilla.org/MPL/2.0/. config = { "suite_definitions": { "gaiatest_desktop": { "options": [ "--restart"...
vladikoff/fxa-mochitest
tests/config/mozharness/marionette.py
Python
mpl-2.0
2,925
0.000342
# This is a Python module containing functions to parse and analyze ncf components # This module is designed to run on the latest major versions of the most popular # server OSes (Debian, Red Hat/CentOS, Ubuntu, SLES, ...) # At the time of writing (November 2013) these are Debian 7, Red Hat/CentOS 6, # Ubuntu 12.04 LT...
ncharles/ncf
tools/ncf.py
Python
gpl-3.0
6,835
0.016971
# _*_ encoding: utf-8 _*_ """Demonstrate doubly-linked list in python.""" from linked_list import Node class DoublyLinked(object): """Implement a doubly-linked list from a singly-linked list.""" def __init__(self, val=None): """Initialize the list.""" self.head = object() self._mark =...
palindromed/data-structures2
src/doubly_linked.py
Python
mit
4,501
0
"""This module contains classes for handling matrices in a linear algebra setting. The primary objects are the `Matrix` and `Cov`. These objects overload most numerical operators to autoalign the elements based on row and column names.""" from .mat_handler import Matrix, Cov, Jco, concat, save_coo
jtwhite79/pyemu
pyemu/mat/__init__.py
Python
bsd-3-clause
301
0.006645
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic list exercises # Fill in the code for the functions below. main() is already set ...
missyjcat/pythonexercises
basic/list1.py
Python
apache-2.0
3,070
0.011726
# 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 t...
TargetHolding/pyspark-cassandra
python/pyspark_cassandra/streaming.py
Python
apache-2.0
2,902
0.002757
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page i...
angadpc/Alexa-Project-
twilio/rest/api/v2010/account/message/feedback.py
Python
mit
5,676
0.001409
## # Copyright (c) 2009-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
macosforge/ccs-calendarserver
twistedcaldav/datafilters/filter.py
Python
apache-2.0
3,318
0.000603
# coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .norm_exceptions import NORM_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from .morph_rules import MORPH_RULES from .lemmatizer import LEMMA_...
aikramer2/spaCy
spacy/lang/en/__init__.py
Python
mit
1,389
0.00216
import mykde class ActionPackage(mykde.ActionPackage): author = 'Victor Varvaryuk <victor.varvariuc@gmail.com>' version = 2 description = """ TODO: xnview - unpack to ~/apps/ and create .desktop file in Graphics category clip2net galaxy icons libreoffice, enter key behavior in calc """
warvariuc/mykde
packages/__init__.py
Python
bsd-3-clause
301
0
# Copyright 2015 Huawei Technologies India Pvt Ltd, 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 ...
eayunstack/python-neutronclient
neutronclient/neutron/v2_0/qos/bandwidth_limit_rule.py
Python
apache-2.0
3,455
0
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2007-2019 Edgewall Software # Copyright (C) 2007 Eli Carter <retracile@gmail.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also availab...
rbaumg/trac
contrib/workflow/migrate_original_to_basic.py
Python
bsd-3-clause
1,456
0.000687
# 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 (t...
apache/incubator-allura
ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
Python
apache-2.0
14,297
0.00028
import RPi.GPIO as GPIO import time buzzer_pin = 27 notes = { 'B0' : 31, 'C1' : 33, 'CS1' : 35, 'D1' : 37, 'DS1' : 39, 'EB1' : 39, 'E1' : 41, 'F1' : 44, 'FS1' : 46, 'G1' : 49, 'GS1' : 52, 'A1' : 55, 'AS1' : 58, 'BB1' : 58, 'B1' : 62, 'C2' : 65, 'CS2' : 69, 'D2' : 73, 'DS2' : 78, 'EB2' : 78, 'E2' : 82, ...
lesscomplex/HomeSec
lock/buzz_anm.py
Python
agpl-3.0
2,986
0.081045
#!/usr/bin/env python """ books.py reads a list of books from an input file and returns them filtered and sorted features - iterates through records without holding the entire dataset in memory, allowing for large datasets - uses SQLite for storage and retrieval """ import os import argparse import sqlite3 f...
danieltalsky/gp-code-test
books.py
Python
unlicense
1,974
0.003546
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import frappe from frappe.model.document import Document from frappe.website.utils import delete_page_cache class Homepage(Document): def validate(self): if not self.description: self.descrip...
mhbu50/erpnext
erpnext/portal/doctype/homepage/homepage.py
Python
gpl-3.0
801
0.021223
def choppedRO(t,period=2e-3,RO_onoff=[0,.5],Trap_onoff=[.5,1]): ''' period: time in ms RO_onoff: tuple containing [on,off] as a percentage of period Trap_onoff: tuple containing [on,off] as a percentage of period ''' D2_switch(t,0) vODT_switch(t,0) D2_switch(t+RO_onoff[0]*pe...
QuantumQuadrate/CsPyController
python/exp_functional_waveforms/hybridChop.py
Python
lgpl-3.0
469
0.036247
# Copyright (c) 2016 Lee Cannon # Licensed under the MIT License, see included LICENSE File from collections import Counter from .filter import at_trigrams, with_words def count_trigrams(interactions: list, minimum: int = 1, n: int = None, include_unknown: bool = False) -> list: """Returns the n most common trig...
leecannon/trending
trending/count.py
Python
mit
4,854
0.004738
# "Smart" parser for handling libmagic signature results. Specifically, this implements # support for binwalk's custom libmagic signature extensions (keyword tags, string processing, # false positive detection, etc). import re import binwalk.core.module from binwalk.core.compat import * from binwalk.core.common import...
Tepira/binwalk
src/binwalk/core/smart.py
Python
mit
12,128
0.002803
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2017 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. # # *************************************...
ljx0305/ice
allTests.py
Python
gpl-2.0
476
0.006303
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^login/$', views.login, name='login'), url(r'^register/$', views.register, name='register'), url(r'^logout/$', views.logout, name='logout'), url(r'^plaza/$', views.plaza, name='plaza')...
huaiping/pandora
membership/urls.py
Python
mit
324
0
# -*- coding: utf-8 -*- """UWEC Language Tools student corpus module Provides functions for processing student corpus data. """ # Python 3 forward compatability imports. from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_liter...
SkySchermer/uweclang
uweclang/plain/clean.py
Python
mit
7,350
0.000954
# Copyright 2016 Isotoma Limited # # 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...
yaybu/touchdown
touchdown/tests/fixtures/ssh_connection.py
Python
apache-2.0
2,710
0.000369
""" Django settings for eveggie project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ import environ ROOT_DIR = environ.Path(__file__) - 3 # (eveggie/config/se...
flp9001/eveggie
config/settings/base.py
Python
mit
10,190
0.001865
class Solution: def minCut(self, s: str) -> int: cut = [0] * (len(s) + 1) cut[0] = -1 ispal = [] for _ in range(len(s)): ispal.append([False] * len(s)) for i in range(len(s)): mincut = i for j in range(i+1): # if i ...
shobhitmishra/CodingProblems
LeetCode/Session3/mincut.py
Python
mit
600
0.005
# # #March 2014 #Adam Breznicky - TxDOT TPP - Mapping Group # #This is an independent script which requires a single parameter designating a directory. #The script will walk through each subfolder and file within the designated directory, identifying the MXD files #and re-sourcing the Comanche database connections to ...
TxDOT/python
standalone/AdminPrefix_Resourcer_v1.py
Python
mit
3,702
0.006753
# -*- coding: utf-8 -*- """ sphinx.ext.napoleon.docstring ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Classes for docstring parsing and formatting. :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import collections import inspect import re # from ...
ajbouh/tfi
src/tfi/parse/docstring.py
Python
mit
17,890
0.000671
""" Copyright 2015 Sai Gopal 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 dist...
EnduranceIndia/ratelimitd
Policies/SaslSenderDomainPolicy.py
Python
apache-2.0
3,282
0.004875
#!/usr/bin/env python "Load data, create the validation split, optionally scale data, train a linear model, evaluate" import pandas as pd from sklearn.pipeline import Pipeline from sklearn.preprocessing import Normalizer, PolynomialFeatures from sklearn.preprocessing import MaxAbsScaler, MinMaxScaler, StandardScaler...
zygmuntz/numer.ai
validate_lr.py
Python
bsd-3-clause
3,382
0.041987
from flask import request, jsonify from sql_classes import UrlList, Acl, UserGroup, User, Role def _node_base_and_rest(path): """ Returns a tuple: (the substring of a path after the last nodeSeparator, the preceding path before it) If 'base' includes its own baseSeparator - return only a string after it ...
Aclz/Tentacles
python3/app/backend/maintree.py
Python
gpl-2.0
10,439
0.003172
""" GatewayScanner is an abstraction for searching for KNX/IP devices on the local network. * It walks through all network interfaces * and sends UDP multicast search requests * it returns the first found device """ from __future__ import annotations import asyncio from functools import partial import logging from ty...
XKNX/xknx
xknx/io/gateway_scanner.py
Python
mit
9,132
0.000986
"""Offer state listening automation rules.""" from __future__ import annotations from datetime import timedelta import logging from typing import Any import voluptuous as vol from homeassistant import exceptions from homeassistant.const import CONF_ATTRIBUTE, CONF_FOR, CONF_PLATFORM, MATCH_ALL from homeassistant.cor...
w1ll1am23/home-assistant
homeassistant/components/homeassistant/triggers/state.py
Python
apache-2.0
6,291
0.000795
from .mtproto_plain_sender import MtProtoPlainSender from .authenticator import do_authentication from .mtproto_sender import MtProtoSender from .connection import Connection, ConnectionMode
andr-04/Telethon
telethon/network/__init__.py
Python
mit
191
0
url = "https://skyzh.github.io/social-network-site/1.html" html_path = "wordcount/test/data/social.html" devel = False
SkyZH/ddcm-word-count
wordcount/test/const.py
Python
bsd-3-clause
119
0
#! /usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == "__main__": from build import * addroot() import pytools.build as b b.build() b.run('qtfract')
rboman/progs
apps/fractal/cpp_qt/run.py
Python
apache-2.0
179
0
# Generated by Django 2.1.7 on 2019-04-11 06:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0007_auto_20180526_1702'), ] operations = [ migrations.AlterField( model_name='article', name='image', ...
flavoi/diventi
diventi/blog/migrations/0008_auto_20190411_0806.py
Python
apache-2.0
574
0
from genetic import * from image import * from snn import * import math, random import numpy def convert_binary(data, w, h, t): ans = [[0 for x in xrange(w)] for x in xrange(h)] for x in xrange(h): for y in xrange(w): if data[x][y] > t: ans[x][y] = 1 else: ans[x][y] = 0 return ans def convert_mat(...
harshkothari410/snn-image-segmentation
imageSeg.py
Python
mit
4,893
0.02943
# ----------------------------------------------------------- # compares the creation of sorted lists using the python # bisect module, and the "usual" way #o # (C) 2015 Frank Hofmann, Berlin, Germany # Released under GNU Public License (GPL) # email frank.hofmann@efho.de # --------------------------------------------...
plasmashadow/training-python
time/sorted-list.py
Python
gpl-2.0
1,566
0.02235
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Cisco Systems, 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 # # ...
linvictor88/vse-lbaas-driver
quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py
Python
apache-2.0
29,895
0
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
ypid-bot/check_mk
web/htdocs/table.py
Python
gpl-2.0
15,132
0.005155
from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from apps.referencepool.models import * import requests import json import os __author__ = 'fki' class Command(BaseCommand): help = 'Harvest external resources to fill the Reference Pool' def handle(self, *args, *...
policycompass/policycompass-services
apps/referencepool/management/commands/harvest.py
Python
agpl-3.0
2,610
0.001149
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
iLotus/googleads-adsensehost-examples
python/v4.x/get_all_ad_units_for_publisher.py
Python
apache-2.0
2,497
0.005607
import sys, os from main import app from flask_script import Manager, Server, Command, Option from flask_security.utils import encrypt_password from models import db, populate_db, StatusData, GrowthData, LifeData, GrowthDataAverages from main import app import random from datetime import date, datetime import pandas f...
ElBell/VTDairyDB
manage.py
Python
gpl-3.0
10,171
0.005309
# coding: utf-8 # Copyright 2015 rpaas authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import unittest from rpaas import plan, storage class MongoDBStorageTestCase(unittest.TestCase): def setUp(self): self.storage = st...
vfiebig/rpaas
tests/test_storage.py
Python
bsd-3-clause
5,053
0.000396
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/vest/shared_vest_s03.iff" result.attribute_template_id = ...
anhstudios/swganh
data/scripts/templates/object/tangible/wearables/vest/shared_vest_s03.py
Python
mit
450
0.046667
import urllib from urlparse import urlparse from django.conf import settings from django.core.handlers.wsgi import WSGIHandler from django.contrib.staticfiles import utils from django.contrib.staticfiles.views import serve class StaticFilesHandler(WSGIHandler): """ WSGI middleware that intercepts ...
writefaruq/lionface-app
django/contrib/staticfiles/handlers.py
Python
bsd-3-clause
2,733
0.001098
import json import hashlib import uuid import datetime from valley.exceptions import ValidationException from kev.utils import get_doc_type from kev.query import SortingParam class DocDB(object): db_class = None indexer_class = None backend_id = None doc_id_string = '{doc_id}:id:{backend_id}:{class_n...
capless/kev
kev/backends/__init__.py
Python
gpl-3.0
3,810
0.003412
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: # # MDTraj is free software: y...
dwhswenson/mdtraj
mdtraj/reporters/hdf5reporter.py
Python
lgpl-2.1
4,749
0.000632
# -*- coding: utf-8 -*- # # Nagare documentation build configuration file, created by # sphinx-quickstart on Fri Sep 29 15:07:51 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
nagareproject/core
doc/conf.py
Python
bsd-3-clause
5,554
0.001801
def main(): """Instantiate a DockerStats object and collect stats.""" print('Docker Service Module') if __name__ == '__main__': main()
gomex/docker-zabbix
docker_service/__init__.py
Python
gpl-3.0
148
0.006757