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 -*-. import dxf2gmlcatastro # carpeta de trabajo path = '/carpeta/archivos/' # define archivos dxf = 'parcelacad.dxf' gml = 'catastrogml.gml' #Define variables dxffile = path + dxf gmlfile = path + gml src = '25830' # Crea GML dxf2gmlcatastro.crea_gml(dxffile, gmlfile, src) #Añade capa GML a QG...
sigdeletras/dxf2gmlcatastro
ejemplo/catastroqgis.py
Python
gpl-3.0
383
0.007853
from toee import * import char_class_utils ################################################### def GetConditionName(): return "Loremaster" def GetSpellCasterConditionName(): return "Loremaster Spellcasting" def GetCategory(): return "Core 3.5 Ed Prestige Classes" def GetClassDefinitionFlags(): return CDF_CoreC...
GrognardsFromHell/TemplePlus
tpdatasrc/tpgamefiles/rules/char_class/class029_loremaster.py
Python
mit
2,110
0.030806
# # getlangnames.py # # Copyright (C) 2007 Red Hat, Inc. All rights reserved. # # 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...
kalev/anaconda
scripts/getlangnames.py
Python
gpl-2.0
1,386
0.002886
class ReversiLogic(object): def __init__(self): self.turn = 'b' self.board = Board() # Check if the current self.turn can play. If not, change to the other # player. If he can't play either, return None (game over). def get_whose_turn(self): if self.can_play(): ...
tupes/School
CS175/Asn2/Reversi/model.py
Python
gpl-3.0
5,899
0.003051
from cloudify.models_states import VisibilityState from cloudify_rest_client.exceptions import CloudifyClientError from manager_rest.test import base_test from manager_rest.utils import get_formatted_timestamp from manager_rest.manager_exceptions import BadFilterRule from manager_rest.storage import models, get_storag...
cloudify-cosmo/cloudify-manager
rest-service/manager_rest/test/endpoints/test_filters.py
Python
apache-2.0
22,691
0
from . import views from django.urls import path urlpatterns = [ path("", views.PublicWidgets.as_view(), name="home"), path("create/widget", views.WidgetCreate.as_view(), name="widget-create"), path("subscription/<pk>/delete", views.SubscriptionDelete.as_view(), name="subscription-delete"), path("user...
kfdm/django-simplestats
quickstats/urls.py
Python
mit
1,550
0.006452
# Twisted, the Framework of Your Internet # Copyright (C) 2001 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in t...
fxia22/ASM_xf
PythonD/site_python/twisted/internet/stdio.py
Python
gpl-2.0
3,287
0.003347
#!/bin/env python # -*- coding: utf-8 -*- """ Description: Compute Phase Tensors from ModEM Dat File and output to CSV files Usage Examples: python scripts/modem_data_to_phase_tensor.py examples/data/ModEM_files/Modular_MPI_NLCG_028.dat [OutDir] python scripts/modem_data_to_phase_tensor.py /e/MTPY2_Outputs...
MTgeophysics/mtpy
legacy/modem_data_to_phase_tensor.py
Python
gpl-3.0
919
0.007617
# -*- coding: utf-8 -*- from openerp import tools from openerp import models, fields, api class AccountInvoiceReport(models.Model): _name = "account.invoice.report" _description = "Invoices Statistics" _auto = False _rec_name = 'date' @api.multi @api.depends('currency_id', 'date', 'price_tot...
minhphung171093/GreenERP_V9
openerp/addons/account/report/account_invoice_report.py
Python
gpl-3.0
9,959
0.004719
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Domain', fields=[ ('id', models.AutoField(help_...
erigones/esdc-ce
pdns/migrations/0001_initial.py
Python
apache-2.0
9,038
0.003098
from django import forms __all__ = ('RatingField',) class RatingField(forms.ChoiceField): pass
hzlf/openbroadcast
website/djangoratings/forms.py
Python
gpl-3.0
100
0.02
# License: MIT License https://github.com/passalis/sef/blob/master/LICENSE.txt from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import sklearn from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sef_dr.classification import evaluate_svm from se...
passalis/sef
examples/supervised_reduction.py
Python
mit
2,019
0.005448
from __future__ import (absolute_import, division, print_function) from collections import OrderedDict import numpy as np import os import pickle from qtpy.QtWidgets import QDialog, QTreeWidgetItem, QTableWidgetItem, QMenu, QFileDialog, QApplication from addie.utilities import load_ui from qtpy import QtCore, QtGui ...
neutrons/FastGR
addie/processing/mantid/master_table/table_tree_handler.py
Python
mit
66,023
0.001287
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope 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 Foundati...
bnewbold/diffoscope
tests/comparators/test_debian.py
Python
gpl-3.0
5,786
0.004842
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Stat', fields=[ ('id', models.AutoField(verbose...
mtskelton/huawei-4g-stats
stats/migrations/0001_initial.py
Python
mit
718
0.001393
# -*- coding: utf8 -*- """ File Operations """ from __future__ import with_statement import os import io import shutil import hashlib import zlib import base64 import tempfile import time import struct import sympy import mpmath import math from mathics.core.expression import (Expression, Real, Complex, String, Symb...
benley/Mathics
mathics/builtin/files.py
Python
gpl-3.0
138,763
0.000649
# -*- coding: utf-8 -*- """ This generate diagram in .png and .svg from neo.core Author: sgarcia """ from datetime import datetime import numpy as np import quantities as pq from matplotlib import pyplot from matplotlib.patches import Rectangle, ArrowStyle, FancyArrowPatch from matplotlib.font_manager import FontP...
CINPLA/expipe-dev
python-neo/doc/source/images/generate_diagram.py
Python
gpl-3.0
7,653
0.000523
#!/usr/local/autopkg/python # encoding: utf-8 # # Copyright 2015 The Pennsylvania State University. # """ BESTemplater.py Created by Matt Hansen (mah60@psu.edu) on 2015-04-30. AutoPkg Processor for importing tasks using the BigFix RESTAPI Updated by Rusty Myers (rzm102@psu.edu) on 2020-02-21. Work in progress. Does...
CLCMacTeam/AutoPkgBESEngine
Code/BESTemplater.py
Python
gpl-2.0
2,795
0.003936
from base import Phase preparation = Phase('Preparation', 'Initializing connections, fetching data etc.') volume_creation = Phase('Volume creation', 'Creating the volume to bootstrap onto') volume_preparation = Phase('Volume preparation', 'Formatting the bootstrap volume') volume_mounting = Phase('Volume mounting', 'M...
brianspeir/Vanilla
vendor/bootstrap-vz/common/phases.py
Python
bsd-3-clause
1,251
0.005596
from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='TinyContent', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_ke...
dominicrodger/django-tinycontent
tinycontent/migrations/0001_initial.py
Python
bsd-3-clause
570
0.001754
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from...
UnrememberMe/pants
src/python/pants/engine/isolated_process.py
Python
apache-2.0
2,261
0.008403
# (C) British Crown Copyright 2014, Met Office # # This file is part of Iris. # # Iris 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 ve...
Jozhogg/iris
lib/iris/tests/unit/fileformats/grib/test_GribWrapper.py
Python
lgpl-3.0
6,115
0
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2014 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free S...
cherokee/webserver
admin/Handler.py
Python
gpl-2.0
1,775
0.007324
import numpy as np from bmtools.filters import filtfilt_butter def derivatefilterQ(model, q, t, cutoff, fs, filter_order=4): ''' Differentiate data using backwards finite differences and butterworth low pass filter. Takes care of quaternions Inputs: ...
GaloMALDONADO/motorg
motorog/filterKinematics.py
Python
gpl-3.0
2,952
0.013211
import requests import json from JumpScale import j from mongoengine import * ENTRY_POINT ="" TOKEN="" class ModelGogsRepo(j.core.models.getBaseModel()): name = StringField(default='') description = StringField(default='') private = BoolField(default=False) readme = StringField(default='Default') ...
Jumpscale/play7
gogsclient/gogsclient.py
Python
apache-2.0
4,050
0.010123
""" This page is in the table of contents. Stretch is very important Skeinforge plugin that allows you to partially compensate for the fact that extruded holes are smaller then they should be. It stretches the threads to partially compensate for filament shrinkage when extruded. The stretch manual page is at: http://...
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/stretch.py
Python
agpl-3.0
21,092
0.022331
# -*- coding: utf-8 -*- """ flask.ctx ~~~~~~~~~ Implements the objects required to keep the context. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import sys from functools import update_wrapper from werkzeug.excep...
MjAbuz/flask
flask/ctx.py
Python
bsd-3-clause
14,399
0.000625
# -*- coding: utf-8 -*- # # 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 ...
zack3241/incubator-airflow
airflow/sensors/base_sensor_operator.py
Python
apache-2.0
2,492
0
# coding: utf-8 # Copyright (c) Pymatgen Development Team. <<<<<<< HEAD # Distributed under the terms of the MIT License. ======= # Distributed under the terms of the MIT License. >>>>>>> a41cc069c865a5d0f35d0731f92c547467395b1b
Bismarrck/pymatgen
pymatgen/optimization/__init__.py
Python
mit
229
0.026201
''' Copyright 2021 Travel Modelling Group, Department of Civil Engineering, University of Toronto This file is part of the TMG Toolbox. The TMG Toolbox 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 Fou...
TravelModellingGroup/TMGToolbox
TMGToolbox/src/XTMF_internal/import_function_batch_file.py
Python
gpl-3.0
2,153
0.010218
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-5 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
ScottWales/rose
lib/python/rose/config_editor/data_helper.py
Python
gpl-3.0
21,509
0.000372
"""Artist puzzles from <http://code.org> built on `tkinter` only. Artist is similar to the great `turtle` standard module for teaching programming but builds on a foundation of puzzle and solution, (which `turtle` does not): - Subset of basic Python turtle commands (all needed for puzzles). - Puzzles created by stu...
skilstak/code-dot-org-python
codestudio/artist.py
Python
unlicense
10,452
0.00995
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Basic message object for the email package object model.""" import re import uu import binascii import warnings from cStringIO import StringIO # Intrapackage imports from email import Utils from email impor...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4.3/Lib/email/Message.py
Python
mit
31,201
0.000609
# 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...
tongwang01/tensorflow
tensorflow/python/ops/array_ops.py
Python
apache-2.0
86,939
0.004911
# -*- coding: utf-8 -*- import csv import os import gzip class File: def read(self, path, **kwargs): path = os.path.join(kwargs.get('root_path', ''), path) content_type = kwargs.get('content_type', 'txt') if content_type == 'txt': with file(path, 'r') as f: co...
alibozorgkhan/utils
utils/fileoo.py
Python
mit
1,696
0
# -*- encoding: utf-8 -*- # # Copyright 2013-2021 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 ...
unioslo/cerebrum
Cerebrum/modules/virthome/base.py
Python
gpl-2.0
29,202
0.001609
# -*- coding: utf-8 -*- #above helps to declare what encoding we want to use in the module #note this is copied from the first json lab #above is used to set the encoding for this module, (unfortunately didn't help that much) #used for seeing our data in nicest string format possible import pprint #again idiom for ...
razzius/PyClassLessons
instructors/course-2015/functions_gens_and_ducks/examples/in_class/parsetext_trade_2015.py
Python
mit
2,835
0.018342
# shipHeavyMissileExpDmgPirateCruiser # # Used by: # Ship: Gnosis type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Heavy Missiles"), "explosiveDamage", ship.getModifiedItemAttr("shipBonusRole7"))
bsmr-eve/Pyfa
eos/effects/shipheavymissileexpdmgpiratecruiser.py
Python
gpl-3.0
309
0.006472
import urllib.request import json from modules import userDatabase def get_what_pulse_url(param: str): return "http://api.whatpulse.org/user.php?user=" + str(param) + "&formatted=yes&format=json" # noinspection PyUnusedLocal def on_channel_pm(irc, user_mask, user, channel, message): command = message.split(...
pbombnz/IRCBot
modules/whatPulse.py
Python
gpl-2.0
4,737
0.004222
from .dispatch import dispatch from .compatibility import basestring from blaze.expr.literal import BoundSymbol, data as bz_data @dispatch(object, (basestring, list, tuple)) def create_index(t, column_name_or_names, name=None): """Create an index on a column. Parameters ---------- o : table-like ...
ContinuumIO/blaze
blaze/index.py
Python
bsd-3-clause
1,644
0.001217
"""ApacheParser is a member object of the ApacheConfigurator class.""" import copy import fnmatch import logging import os import re import subprocess import sys import six from certbot import errors from certbot_apache import constants logger = logging.getLogger(__name__) class ApacheParser(object): """Class...
jsha/letsencrypt
certbot-apache/certbot_apache/parser.py
Python
apache-2.0
27,616
0.000036
"""docker""" import http.client import json import socket __all__ = ['HTTPConnection', 'HTTPError', 'get'] class HTTPConnection(http.client.HTTPConnection): def __init__(self): http.client.HTTPConnection.__init__(self, 'localhost') def connect(self): sock = socket.socket(socket.AF_UNIX, so...
mesoscloud/events
0.5.6/docker.py
Python
mit
1,100
0.002727
import csv import os import sys import traceback import sqlite3 import fnmatch import decimal import datetime def valid_dt(dt): try: datetime.datetime.strptime(dt, "%m/%d/%Y") return True except: return False def adapt_decimal(d): return str(d) def convert_decimal(s): return decimal.Decimal(s) def db_cur(...
frederick623/wat
date_transform.py
Python
apache-2.0
2,296
0.037021
import datetime from django.db import models from django.utils.translation import ugettext, ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib import admin from schedule.models import Occurrence from django_attendance.conf import settings as attendance_settings class EventAttendance(...
winhamwr/django-attendance
django_attendance/models.py
Python
bsd-3-clause
1,202
0.000832
# coding: utf-8 # general imports import os, re from time import gmtime, strftime # django imports from django.shortcuts import render_to_response, HttpResponse from django.template import RequestContext as Context from django.http import HttpResponseRedirect from django.contrib.admin.views.decorators import staff_me...
sandow-digital/django-filebrowser-no-grappelli-sandow
filebrowser/views.py
Python
bsd-3-clause
19,288
0.005081
""" Provides a more structured call to the nodejs bing """ import os import sys import argparse import subprocess def main(): parser = argparse.ArgumentParser(description="Use Bing's API services") parser.add_argument("query", nargs="*", help="Query string") parser.add_argument("-s", "--service", default...
AAorris/search
src/bing/runtime.py
Python
mit
523
0.003824
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # Copyright © 2015 Clemens Lang <cal@macports.org> # # diffoscope is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
brettcs/diffoscope
tests/comparators/test_macho.py
Python
gpl-3.0
2,299
0.003486
#!/usr/bin/python3 import re import sys ######## Global Variables # Stacks dictionary = [] execution = [] operand = [] # Sept 21, 2011 -- fixed the handling of }{ -- each brace should be a separate token # A regular expression that matches postscript each different kind of postscript token pattern = '/?[a-zA-Z][a-zA-...
vonderborch/CS355
sps - working/sps.py
Python
mit
9,305
0.013649
# testStr = "Hello {name}, How long have you bean?. I'm {myName}" # # testStr = testStr.format(name="Leo", myName="Serim") # # print(testStr) limit = None hello = str(limit, "") print(hello) # print( "4" in "3.5")
SELO77/seloPython
3.X/ex/strFormat.py
Python
mit
217
0.004608
''' Reads scrambled Vigenere Cipher text from stdin and attempts to decrypt it. Written for Python 2.7. Copyright (C) 2014 leechy9 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 ...
leechy9/Vigilante
vigilante.py
Python
gpl-3.0
5,186
0.016969
""" Run example scripts. @author J. Chiang <jchiang@slac.stanford.edu> @author Paul F. Kunz <Paul_Kunz@slac.stanford.edu> """ #$Id: run_examples.py,v 1.13 2006/10/03 20:02:20 pfkeb Exp $ import sys from load_hippo import app, canvas prompt = 1 scripts = [] scripts.append('static_vs_dynamic') scripts.append('loglo...
plasmodic/hippodraw
examples/run_examples.py
Python
gpl-2.0
1,052
0.004753
# -*- coding: ISO-8859-1 -*- """ Form Widget classes specific to the geoSite admin site. """ # A class that corresponds to an HTML form widget, # e.g. <input type="text"> or <textarea>. # This handles rendering of the widget as HTML. import json from django.template.loader import render_to_string from .conf import ...
ivandm/django-geopositionmap
geopositionmap/geoWidgets.py
Python
mit
2,620
0.003817
import elastic import nlp def lookup(description, synonyms=None): ''' Look up words by their definitions using the indexed terms and their synonyms. ''' description = nlp.correct(description) query = {'bool':{'must':get_definition_query(description)}} synonym_query = get_synonym_query(descr...
whosken/reversedict
reversedict/__init__.py
Python
mit
1,266
0.014218
# Copyright (c) 2008 Mikeal Rogers # # 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 agre...
carsongee/edx-platform
common/djangoapps/edxmako/__init__.py
Python
agpl-3.0
676
0.001479
import scrapenhl_globals import scrape_game def scrape_games(season, games, force_overwrite = False, pause = 1, marker = 10): """ Scrapes the specified games. Parameters ----------- season : int The season of the game. 2007-08 would be 2007. games : iterable of ints (e.g. list) ...
muneebalam/scrapenhl
scrapenhl/scrape_season.py
Python
mit
13,272
0.008137
import bpy from ... base_types.node import AnimationNode class CombineVectorNode(bpy.types.Node, AnimationNode): bl_idname = "an_CombineVectorNode" bl_label = "Combine Vector" dynamicLabelType = "HIDDEN_ONLY" def create(self): self.newInput("Float", "X", "x") self.newInput("Float", "Y"...
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/vector/combine_vector.py
Python
gpl-3.0
729
0.002743
def extractRumorsBlock(item): """ """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or 'preview' in item['title'].lower(): return None if "Rumor's Block" in item['tags'] and 'chapter' in item['title'].lower(): return buildReleaseMessageWithType(item, "Rumor's Bl...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractRumorsBlock.py
Python
bsd-3-clause
393
0.022901
# Copyright 2016 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...
kamcpp/tensorflow
tensorflow/contrib/rnn/python/ops/lstm_ops.py
Python
apache-2.0
23,693
0.005149
# -*- coding: utf-8 -*- __doc__ = """\ Copyright Puzzlebox Productions, LLC (2010) This code is released under the GNU Pulic License (GPL) version 2 For more information please refer to http://www.gnu.org/copyleft/gpl.html """
PuzzleboxIO/orbit-python
Puzzlebox/Orbit/__init__.py
Python
agpl-3.0
229
0
import os import gtk import time import locale import fnmatch import user from plugin_base.provider import FileType, Support as ProviderSupport from common import get_user_directory, UserDirectory from widgets.completion_entry import PathCompletionEntry from queue import OperationQueue # constants class OverwriteOpt...
ArseniyK/Sunflower
application/gui/input_dialog.py
Python
gpl-3.0
60,030
0.023755
""" Contains tests for the collector base class. """ import pytest from tests.base import TestBase from statsite.metrics import Counter, KeyValue, Timer from statsite.collector import Collector class TestCollector(TestBase): def test_stores_aggregator(self): """ Tests that collectors will store ag...
kiip/statsite
tests/unit/test_collector.py
Python
bsd-3-clause
2,419
0.000827
from django.contrib.auth import get_user_model User = get_user_model() from rest_framework import serializers from nodeshot.core.base.serializers import ModelValidationSerializer from nodeshot.community.profiles.serializers import ProfileRelationSerializer from .models import Comment, Vote, Rating, NodeRatingCount ...
SCORE42/nodeshot
nodeshot/community/participation/serializers.py
Python
gpl-3.0
2,237
0.001788
__author__ = 'jbowman' # https://pythonspot.com/inner-classes/ class Human: def __init__(self, name): self.name = name self.head = self.Head() def addhead(self): self.head2 = self.Head() class Head: def __init__(self): self.brain = self.Brain() def t...
deo1/deo1
Legacy/PythonTutorial/18InnerClasses.py
Python
mit
630
0.006349
#!/usr/bin/env python3.5 import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
PabloVallejo/docker-django
manage.py
Python
mit
249
0
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_aws ''' from ansible import errors class FilterModule(object): ''' Custom ansible filters for use by openshift_aws role''' @staticmethod def scale_groups_serial(scale_group_info, upgrade=False): ''' This function w...
zhiwliu/openshift-ansible
roles/openshift_aws/filter_plugins/openshift_aws_filters.py
Python
apache-2.0
2,484
0.003221
def get_attendance_records(file_path): attendance_file = open(file_path,'r') lines = attendance_file.readlines() attendance_file.close() header = lines[0] attendance_records = lines[1:] return attendance_records def convert_attendance_record_to_bools(sessions): sessions_bool = [] for...
pathespe/MarkerBot
tests/resources/session_6.py
Python
mit
2,838
0.015856
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # 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 can redis...
xorpaul/shinken
shinken/objects/checkmodulation.py
Python
agpl-3.0
4,462
0.00381
# Copyright (C) 2012-2015, Alphan Ulusoy (alphan@bu.edu) # # 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 pr...
wasserfeder/lomap
lomap/algorithms/__init__.py
Python
gpl-2.0
765
0.003922
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
krafczyk/spack
lib/spack/spack/test/cmd/test_compiler_cmd.py
Python
lgpl-2.1
3,159
0
# Copyright (C) 2013 Claudio "nex" Guarnieri (@botherder) # # 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 pro...
0x00ach/zer0m0n
signatures/network_irc.py
Python
gpl-3.0
1,128
0.000887
from . import utils import bpy from bpy.types import NodeTree, Node, NodeSocket # Implementation of custom nodes from Python # Derived from the NodeTree base type, similar to Menu, Operator, Panel, etc. class GameGraph(NodeTree): # Description string '''A custom node tree type that will show up in the node e...
joeedh/gameblendjs
blender/dm/node_types.py
Python
mit
4,508
0.00488
# __init__.py - collection of Luxembourgian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # This library 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 2.1 of the Lic...
arthurdejong/python-stdnum
stdnum/lu/__init__.py
Python
lgpl-2.1
954
0
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2020 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...
chipaca/snapcraft
snapcraft/internal/db/datastore.py
Python
gpl-3.0
4,171
0
from django.db import models, DEFAULT_DB_ALIAS, connection from django.contrib.auth.models import User from django.conf import settings class Animal(models.Model): name = models.CharField(max_length=150) latin_name = models.CharField(max_length=150) count = models.IntegerField() weight = models.FloatF...
mzdaniel/oh-mainline
vendor/packages/Django/tests/regressiontests/fixtures_regress/models.py
Python
agpl-3.0
5,411
0.000185
from django.apps import AppConfig class AuditorConfig(AppConfig): name = 'auditor'
sheanmassey/django-audit-trails
django_audit/apps.py
Python
unlicense
89
0
def extractFeelinthedarkWordpressCom(item): ''' Parser for 'feelinthedark.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractFeelinthedarkWordpressCom.py
Python
bsd-3-clause
566
0.033569
from SDWLE.cards.base import MinionCard from SDWLE.cards.heroes import Jaraxxus from SDWLE.cards.weapons.warlock import BloodFury from SDWLE.constants import CHARACTER_CLASS, CARD_RARITY, MINION_TYPE from SDWLE.game_objects import Minion from SDWLE.tags.action import Summon, Kill, Damage, Discard, DestroyManaCrystal, G...
jomyhuang/sdwle
SDWLE/cards_copy/minions/warlock.py
Python
mit
8,778
0.005354
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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...
openstack/octavia
octavia/tests/unit/controller/worker/v1/flows/test_amphora_flows.py
Python
apache-2.0
20,294
0
#!/usr/bin/python # -*- coding: utf-8 -*- """ Code128 Barcode Detection & Analysis (c) Charles Shiflett 2011 Finds Code128 barcodes in documents scanned in Grayscale at 300 dpi. Usage: Each page of the PDF must be converted to a grayscale PNG image, and should be ordered as follows: 1001/1001-...
cbears/octoform
ocr/findBarcode.py
Python
gpl-3.0
15,096
0.036235
import os import sys import textwrap import warnings from stripe import error, util # - Requests is the preferred HTTP library # - Google App Engine has urlfetch # - Use Pycurl if it's there (at least it verifies SSL certs) # - Fall back to urllib2 with a warning if needed try: import urllib2 except ImportError:...
Rio517/pledgeservice
lib/stripe/http_client.py
Python
apache-2.0
10,566
0
from game.models import (Card, HEART, SPADE, CLUB, DIAMOND) def test_card_creation_without_name(): c = Card('heart', 5) assert c.name == 'heart' assert c.suit == 'heart' assert c.value == 5 def test_ca...
setphen/Donsol
tests/test_card.py
Python
mit
860
0.005814
import numpy as np import os __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__)) ) + "/" class Dataset(): """ I want to create a similar object to that one existing in R: Dataframe """ def __init__(self, tra...
omartrinidad/schiffsdiebe
schiffsdiebe/datasets/__init__.py
Python
mit
2,327
0.008595
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, getopt from datetime import datetime import math from gann import * def print_usage(): print """ classic Gann square: gann.py -o <output file name> -s <square size> Gann square based on date: gann.py -o <output file name> -a <base date...
Galarius/gann-square
gann.py
Python
mit
3,346
0.003586
from m1 import <error descr="Cannot find reference 'foo' in 'm1.pyi'">foo</error> from m1 import <error descr="Cannot find reference 'bar' in 'm1.pyi'">bar</error> from m1 import bar_imported from m1 import <error descr="Cannot find reference 'm2' in 'm1.pyi'">m2</error> from m1 import m2_imported print(foo, bar, bar_...
goodwinnk/intellij-community
python/testData/pyi/inspections/hiddenPyiImports/HiddenPyiImports.py
Python
apache-2.0
347
0.048991
#!/usr/bin/python2 # Copyright (C) 2014 Red Hat # see file 'COPYING' for use and warranty information # # 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...
ofayans/freeipa
ipaplatform/setup.py
Python
gpl-3.0
1,334
0
""" This is helper module to profile the whole package in Python 3.7 profiling modules from command line will be supported and this module will no longer be needed """ import cProfile from .__main__ import main if __name__ == "__main__": cProfile.run("main()", filename=".nemchmarker.cprofile")
undertherain/benchmarker
benchmarker/__profile__.py
Python
mpl-2.0
301
0
""" Unit tests for the stem.version.Version parsing and class. """ import unittest import stem.util.system import stem.version from stem.version import Version from test import mocking TOR_VERSION_OUTPUT = """Mar 22 23:09:37.088 [notice] Tor v0.2.2.35 \ (git-73ff13ab3cc9570d). This is experimental software. Do not ...
wfn/stem
test/unit/version.py
Python
lgpl-3.0
9,206
0.002716
#!/usr/bin/python3 import os # import logging import logger as logger_ WS_SERVER = 'ws://127.0.0.1:4055/ws' WS_TIMEOUT = 10 APP_DIR = os.path.dirname(__file__) # SQL_DIR = os.path.join(APP_DIR, 'sql') logger = logger_.rotating_log(os.path.join( APP_DIR, 'kts_snmp.log'), 'kts_snmp_log') SNMP_IP = '192.168.222.17...
andrewisakov/taximaster_x
snmp/settings.py
Python
unlicense
379
0
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2013-2015 Pervasive Displays, Inc. # Copyright 2015, Syed Faisal Akber # # 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...
VA3SFA/rpi_hw_demo
pcd8544/IP.py
Python
gpl-2.0
2,974
0.003026
from django.shortcuts import render from django.conf import settings from django.http import HttpResponseRedirect, HttpResponse from django.urls import reverse from django.views.decorators.csrf import csrf_exempt from fetcher import api import requests import json def index(request): return render(request, 'fetc...
zyphrus/fetch-django
fetcher/views.py
Python
mit
1,510
0.009272
from django import template register = template.Library() @register.filter() def is_assistant_or_coordinator(user, course): return course.is_assistant_or_coordinator(user)
mupi/tecsaladeaula
core/templatetags/is_assistant_or_coordinator.py
Python
agpl-3.0
179
0
#!/usr/bin/env python # Python Network Interface Library # # Author: Yandy Ramirez # Twitter: @IPyandy (https://twitter.com/IPyandy) # Site: http://ipyandy.net # Code Verion: 0.0.1 # # ---------------------------------------------------------------- ''' Library to make A...
IPyandy/pnil
eapi.py
Python
bsd-3-clause
12,608
0.000635
""" Test objconfig.writer.Json """ from objconfig.writer import Json as JsonWriter from objconfig.reader import Json as JsonReader from objconfig.writer import AbstractWriter from objconfig.writer import WriterInterface import os def test_emptyinstantiation_json(): writer = JsonWriter() assert isinstance(wri...
asherwunk/objconfig
tests/writer/test_json_writer.py
Python
mit
1,712
0.014019
from __future__ import division, print_function, absolute_import import math import sys import numpy as np from numpy import sqrt, cos, sin, arctan, exp, log, pi, Inf from numpy.testing import (assert_, TestCase, run_module_suite, dec, assert_allclose, assert_array_less, assert_almost_equal...
DailyActie/Surrogate-Model
01-codes/scipy-master/scipy/integrate/tests/test_quadpack.py
Python
mit
13,179
0.000531
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Base package for building Invenio application factories.""" import os from setup...
tiborsimko/invenio-base
setup.py
Python
mit
2,590
0
for x in undefined(): # ty<caret>pe: int pass
smmribeiro/intellij-community
python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/simpleForLoop.py
Python
apache-2.0
50
0.02
""" MooseGesture Test application Al Sweigart al@coffeeghost.net http://coffeeghost.net/2011/05/09/moosegesture-python-mouse-gestures-module Run the app and then draw by dragging the mouse. When you release the mouse button, the gesture you drew will be identified. This script requires the MooseGesture library, whic...
asweigart/moosegesture
tests/demoGestureApp.py
Python
bsd-3-clause
3,638
0.004948
""" Support for Neato Connected Vaccums switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.neato/ """ import logging import requests from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.helpers.entity import ToggleEntity fr...
MungoRae/home-assistant
homeassistant/components/switch/neato.py
Python
apache-2.0
4,019
0
# 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...
gooddata/openstack-nova
api-guide/source/conf.py
Python
apache-2.0
9,312
0.000966
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('kirppu', '0006_item_lost_property'), ] operations = [ migrations.AlterField( model...
jlaunonen/kirppu
kirppu/migrations/0007_auto_misc_adjustments.py
Python
mit
1,699
0.002354