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 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models class ModelExportDocumentItem(models.Model): _description = 'Model Export Document Item' _name = "clv.model_expor...
CLVsol/clvsol_odoo_addons
clv_document_export/models/model_export_document_item.py
Python
agpl-3.0
2,203
0.001362
# -*- coding: utf-8 -*-} """ A dummy executor that process Lemonade jobs and only returns fake statuses and data. Used to test Stand clients in an integration test. """ import datetime import json import logging import logging.config import random import eventlet import socketio from flask_script import Manager # Log...
eubr-bigsea/stand
stand/util/dummy_executor.py
Python
apache-2.0
7,975
0.000502
# -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # # Copyright (C) 2012 - fossfreedom # Copyright (C) 2012 - Agustin Carrasco # # 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 Fou...
fossfreedom/coverart-browser
coverart_listview.py
Python
gpl-3.0
2,367
0
letras=[] i=1 while i <= 10: letras.append(input("letras : ")) i+=1 i=0 cont=0 while i <=9: if letras[i] not in 'aeiou': cont+=1 i+=1 print("foram lidos %d consoantes" %cont)
andersonsilvade/python_C
Python32/aulas/letras.py
Python
mit
199
0.045226
#!/cshome/pranjali/410/CMPUT410-Lab6-Django/v1/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
pranner/CMPUT410-Lab6-Django
v1/bin/django-admin.py
Python
apache-2.0
164
0
# -*- coding: utf8 -*- # # 国家统计局 行政区域代码 文本: # # http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/ # from __future__ import print_function from collections import OrderedDict class Area(object): level = None def __init__(self, code, name, parent=None): '''use unicode name''' self.code = int(code) ...
dlutxx/memo
data/nation_parse.py
Python
mit
3,087
0.000984
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl, # K.U. Leuven. All rights reserved. # Copyright (C) 2011-2014 Greg Horn # # CasADi is free software; you can...
ghorn/debian-casadi
docs/examples/python/vdp_indirect_single_shooting.py
Python
lgpl-3.0
4,479
0.013842
from tests.unit.dataactcore.factories.staging import AppropriationFactory from tests.unit.dataactcore.factories.domain import SF133Factory from tests.unit.dataactvalidator.utils import number_of_errors, query_columns _FILE = 'a26_appropriations' _TAS = 'a26_appropriations_tas' def test_column_headers(database): ...
chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend
tests/unit/dataactvalidator/test_a26_appropriations.py
Python
cc0-1.0
1,546
0.003881
# # Copyright (c) SAS Institute 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 applicable law or agreed to in w...
fedora-conary/conary
conary/repository/netrepos/netauth.py
Python
apache-2.0
50,922
0.003613
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Image utilities Created by: Rui Carmo License: MIT (see LICENSE for details) """ from operator import itemgetter def linear_partition(seq, k): if k <= 0: return [] n = len(seq) - 1 if k > n: return map(lambda x: [x], seq) table, soluti...
Velmont/digital-signage-server
lib/utils/imagekit.py
Python
mit
4,036
0.006442
#!/usr/bin/env python3 import os, sys import time from ..utils import (std, strip_site, MGet, urlparse, HTMLParser) class FileDownloader(MGet): def __init__(self, info = {}): self.last_len = 0 self.alt_prog = 0.0 def getLocalFilesize(self, filename): tmp_name = self.temp_name(filename) if os.path.exists(f...
FrogLogics/mget
build/lib.linux-x86_64-3.5/Mget/downloader/common.py
Python
gpl-2.0
3,835
0.041982
# [\0] # # # # This code is confidential and proprietary, All rights reserved. # # # # Tamar Labs 2015. # # # # @author: Adam Lev-Libfeld (adam@tamarlabs....
daTokenizer/quickstorm
storm/virtualenvs/_resources/resources/bolts/action_bolt.py
Python
apache-2.0
1,292
0.023994
"""Constants for the pi_hole intergration.""" from datetime import timedelta DOMAIN = "pi_hole" CONF_LOCATION = "location" CONF_SLUG = "slug" DEFAULT_LOCATION = "admin" DEFAULT_METHOD = "GET" DEFAULT_NAME = "Pi-Hole" DEFAULT_SSL = False DEFAULT_VERIFY_SSL = True SERVICE_DISABLE = "disable" SERVICE_DISABLE_ATTR_DURA...
leppa/home-assistant
homeassistant/components/pi_hole/const.py
Python
apache-2.0
1,452
0.002066
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Filters ======= Filter bank construction ------------------------ .. autosummary:: :toctree: generated/ mel chroma constant_q semitone_filterbank Window functions ---------------- .. autosummary:: :toctree: generated/ window_bandwidth ...
bmcfee/librosa
librosa/filters.py
Python
isc
37,764
0.001059
# coding: utf-8 import numpy as np from chainer import cuda from builtins import range class Experience: def __init__(self, use_gpu=0, data_size=10**5, replay_size=32, hist_size=1, initial_exploration=10**3, dim=10240): self.use_gpu = use_gpu self.data_size = data_size self.replay_size =...
wbap/hackathon-2017-sample
agent/ml/experience.py
Python
apache-2.0
3,373
0.004447
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-16 21:51 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
ava-project/ava-website
website/apps/user/migrations/0003_emailvalidationtoken.py
Python
mit
973
0.002055
# -*- coding: utf-8 -*- print '''<!DOCTYPE html><html>''' incluir(data,"head") print '''<body>''' incluir(data,"header") print '''</body></html>'''
ZerpaTechnology/AsenZor
apps/votSys/user/vistas/templates/inicio.py
Python
lgpl-3.0
147
0.020408
# Copyright 2017 onwards LabsLand Experimentia S.L. # This software is licensed under the GNU AGPL v3: # GNU Affero General Public License version 3 (see the file LICENSE) # Read in the documentation about the license from __future__ import unicode_literals, print_function, division from .redis_manager import RedisMa...
weblabdeusto/weblablib
weblablib/backends/__init__.py
Python
agpl-3.0
326
0
from django.conf.urls import patterns, url urlpatterns = patterns('cityproblems.accounts.views', url(r'^register/$', 'register', name="accounts_register"), url(r'^profile/edit/$', 'accounts_profile_edit', name="accounts_profile_edit"), url(r'^profil...
SimplyCo/cityproblems
cityproblems/accounts/urls.py
Python
mit
1,489
0.006716
from math import radians, cos, sin, asin, sqrt def haversine(lon1, lat1, lon2, lat2): """ Calculate the great circle distance between two points on the earth (specified in decimal degrees) """ # convert decimal degrees to radians lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2]) ...
anduslim/codex
codex_project/actors/haversine.py
Python
mit
554
0.001805
# -*- coding: utf-8 -*- from __future__ import print_function, division, unicode_literals, absolute_import import sys try: from unittest.mock import Mock, patch except ImportError: from mock import Mock, patch import pytest from espwrap.base import batch from espwrap.adaptors.sendgrid_v3 import SendGridMass...
SpotOnInc/espwrap
tests/test_sendgrid_v3.py
Python
mit
6,880
0.003351
#!/usr/bin/env python import os import re import sys group_id = '142394' def stamp(html): """Stamp a Python HTML documentation page with the SourceForge logo""" def replace(m): return ('<span class="release-info">%s ' 'Hosted on <a href="http://sourceforge.net">' '<im...
PyQwt/PyQwt5
Doc/sourceforge.py
Python
gpl-2.0
990
0.005051
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('get_feedback', '0001_initial'), ] operations = [ migrations.AddField( model_name='course', name='fee...
david30907d/feedback_django
example/get_feedback/migrations/0002_auto_20160519_0326.py
Python
mit
1,184
0.000845
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FormPlugin' db.create_table(u'cmsplugin_formplugin', ( ...
metzlar/cms-form-plugin
cms_form_plugin/migrations/0001_initial.py
Python
gpl-2.0
3,411
0.007916
import datetime as dt from io import StringIO from locale import LC_CTYPE, getlocale, setlocale from django.contrib.auth.models import Permission, User from django.contrib.gis.geos import Point from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase, override_settings from model...
kickapoo/enhydris
enhydris/tests/admin/test_station.py
Python
agpl-3.0
16,487
0.00182
#!/usr/bin/env python3 from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pytest from pysisyphus.calculators.AnaPot import AnaPot from pysisyphus.calculators.MullerBrownSympyPot import MullerBrownPot from pysisyphus.calculators.PySCF import PySCF from pysisyphus.calculators import Gau...
eljost/pysisyphus
tests/test_irc/test_irc.py
Python
gpl-3.0
7,603
0.000921
"""Support for IKEA Tradfri.""" import logging import voluptuous as vol from homeassistant import config_entries from homeassistant.const import EVENT_HOMEASSISTANT_STOP import homeassistant.helpers.config_validation as cv from homeassistant.util.json import load_json from .const import ( CONF_IMPORT_GROUPS, CON...
HydrelioxGitHub/home-assistant
homeassistant/components/tradfri/__init__.py
Python
apache-2.0
3,856
0
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-web/azure/mgmt/web/models/reissue_certificate_order_request.py
Python
mit
2,522
0.00119
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import os import configparser from fabric.context_managers import cd from fabric.decorators import task from fabric.api import env from fabric.operations import put, run, local from fabric.utils import abort from zip_dir.utils import create_zip_archive...
illagrenan/gtask-client
fabfile.py
Python
mit
2,356
0.000424
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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 th...
ezequielpereira/Time-Line
timelinelib/wxgui/dialogs/editevent/view.py
Python
gpl-3.0
12,695
0.000788
# -*- 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, softw...
openstack-packages/DLRN
dlrn/tests/test_driver_koji.py
Python
apache-2.0
24,497
0
from collections import * from config import main import heapq class UserPreference: def __init__(self): self.results = [] self.list1 = [] self.list2 = [] self.list3 = [] self.list4 = [] self.categories = [] self.sold_average = [] self.bought_averag...
adarshdec23/Market
core/preference/main.py
Python
apache-2.0
3,319
0.008738
from time import time from itertools import groupby from vial import vfunc, vim, dref from vial.utils import echon, redraw from os.path import split MAX_HISTORY_SIZE = 100 VHIST = 'vial_buf_hist' VLAST = 'vial_last_buf' def add_to_history(w, bufnr): history = list(w.vars[VHIST]) history[:] = [r for r in his...
guilhermedallanol/dotfiles
vim/plugged/vial/vial/plugins/bufhist/plugin.py
Python
mit
3,812
0.000787
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## udp-echo-client.h: ns3::UdpEchoClient [class] module.add_class('UdpEchoClient', parent=root_module['ns3::Application']) ## udp-echo-server.h: ns3::UdpEch...
annegabrielle/secure_adhoc_network_ns-3
ns3_source_code/ns-3.10/bindings/python/apidefs/gcc-LP64/ns3_module_udp_echo.py
Python
gpl-2.0
8,335
0.017876
import os import ntpath import xlrd import openpyxl from openpyxl.utils import coordinate_from_string, column_index_from_string from openpyxl.utils.exceptions import CellCoordinatesException class ExcelManager: """ Wrapper that opens and operates on .xls, .xlsx or .xlsm excel files. By default we take in ...
erik-sn/xlwrap
xlwrap.py
Python
mit
14,765
0.001422
# -*- coding:utf-8 -*- from bottle import route, run @route("/") def access(): return "OK!" # hostデフォルト値は、127.0.0.1 # OK - localhost / 127.0.0.1 # NG - 192.168.0.10 / hostname # run(port=8080, debug=True, reloader=True) # run(host="localhost", port=8080, debug=True, reloader=True) # OK - 192.168....
thinkAmi-sandbox/Bottle-sample
lan_access.py
Python
unlicense
589
0.005236
# GNU Enterprise Common Library - Schema support for MS-SQL # # Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise 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 Foun...
HarmonyEnterpriseSolutions/harmony-platform
src/gnue/common/datasources/drivers/sql/mssql/Behavior.py
Python
gpl-2.0
1,600
0.00625
import falcon import json class QuoteResource: def on_get(self, req, resp): """Handles GET requests""" quote = { 'quote': 'I\'ve always been more interested in the future than in the past.', 'author': 'Grace Hopper' } resp.body = json.dumps(quote) api = fal...
lotrekagency/heimdall
server/server.py
Python
mit
371
0.008086
#!/usr/bin/python -u # Copyright (c) 2010-2012 OpenStack Foundation # # 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 ap...
gotostack/swift
test/functional/tests.py
Python
apache-2.0
82,395
0.000158
# -*-coding:Utf-8 -* # Copyright (c) 2013 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # lis...
stormi/tsunami
src/secondaires/navigation/commandes/matelot/liste.py
Python
bsd-3-clause
3,827
0.00131
# -*- test-case-name: mamba.test.test_application mamba.test.test_mamba -*- # Copyright (c) 2012 - Oscar Campos <oscar.campos@member.fsf.org> # See LICENSE for more details """ .. module: app :platform: Linux :synopsis: Mamba Application Manager .. moduleauthor:: Oscar Campos <oscar.campos@member.fsf.org> """...
DamnWidget/mamba
mamba/application/app.py
Python
gpl-3.0
7,315
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2012-2013 Zuza Software Foundation # # This file is part of Pootle. # # Pootle 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 th...
ttreeagency/PootleTypo3Org
pootle/apps/staticpages/views.py
Python
gpl-2.0
5,490
0
def solve(N, R, P, S): if max([R, P, S]) > 2**(N-1): return "IMPOSSIBLE" if N > 2 and max([R, P, S]) == 2**(N-1): return "IMPOSSIBLE" min_val = min([R, P, S]) rep = 2**N//3 if min_val < rep: return "IMPOSSIBLE" if N == 1: tmp = "" if P: tmp += "P" if R: tmp += "R" ...
zuun77/givemegoogletshirts
codejam/2016/Round2/q1.py
Python
apache-2.0
877
0.013683
# -*- coding: utf-8 -*- # Author: Alexandre Fayolle # Copyright 2013 Camptocamp SA # Author: Damien Crier # Copyright 2015 Camptocamp SA # © 2015 Eficent Business and IT Consulting Services S.L. - # Jordi Ballester Alomar # © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya # License LGPL-3.0 or lat...
SerpentCS/purchase-workflow
purchase_order_line_sequence/models/__init__.py
Python
agpl-3.0
413
0
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import pdb import unittest from datetime import date from testing_utils import setupTestDB, fake_response_from_file from scrapy.http import Response, Request, HtmlResponse from sgfSpider.dbsgf import DBsgf, DBNewsItem from sgfSpider.spiders.igokis...
dhodges/sgfspider
tests/test_igokisen.py
Python
mit
1,778
0.006187
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/krl1to5/Work/FULL/Sequence-ToolKit/2016/resources/ui/gensec/process/tl.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_pro...
carlos-ferras/Sequence-ToolKit
view/gensec/dialogs/processes/ui_tl.py
Python
gpl-3.0
8,875
0.001691
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net> # (c) 2016, Justin Mayer <https://justinmayer.com/> # # This file is part of Ansible. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fre...
GustavoHennig/ansible
contrib/vault/vault-keyring.py
Python
gpl-3.0
3,430
0.001166
# Copyright (c) Microsoft Corporation 2015 from z3 import * x = Real('x') y = Real('y') s = Solver() s.add(x + y > 5, x > 1, y > 1) print(s.check()) print(s.model())
sccblom/vercors
deps/z3/4.4.1/Windows NT/intel/bin/example.py
Python
mpl-2.0
178
0
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2011 Thomas Perl and the gPodder Team # # gPodder 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...
elelay/gPodderAsRSSReader
src/gpodder/gtkui/desktop/sync.py
Python
gpl-3.0
13,131
0.003427
import re from modularodm import Q from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import PermissionDenied, ValidationError, NotFound, MethodNotAllowed, NotAuthenticated from rest_framework.status import HTTP_204_NO_CONTENT from rest_framework.response import Response ...
rdhyee/osf.io
api/nodes/views.py
Python
apache-2.0
141,472
0.004298
# Copyright 2016 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 by applicable law or agre...
google/smilesparser
test_smilesparser_rdkit.py
Python
apache-2.0
6,797
0.010152
# 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...
jamielennox/python-kiteclient
kiteclient/tests/v1/utils.py
Python
apache-2.0
1,915
0
#! /usr/bin/env python from sys import argv script, q1, q2, k = argv fw = open('c.txt', 'w+') for docid in range(1,192): filename = 'data/' + str(docid) + '.txt' fr = open(filename) string = fr.read() pp1 = [] pp2 = [] l = [] position = 0 for token in string.split(): if token == q1: pp1.append(position...
fortesit/search-engine
posting-list-search-k-distanced-words.py
Python
mit
663
0.045249
__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' ''' Post installation script for linux ''' import sys, os, cPickle, textwrap, stat, errno from subprocess import check_call, check_output from functools import partial from calibre import __appname__, prints, guess_type from calib...
jelly/calibre
src/calibre/linux.py
Python
gpl-3.0
45,645
0.003856
# © 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo.exceptions import UserError from odoo.tests import common class TestRecursion(common.SavepointCase): @classmethod def setUpClass(cls): super(TestRecursion, cls).setUpClass() cls.d...
OCA/partner-contact
partner_contact_department/tests/test_recursion.py
Python
agpl-3.0
915
0
# # The MIT License # # Copyright (c) 2009 Ben Morris # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
bnmrrs/runkeeper-api
runkeeper/httpclient.py
Python
mit
1,887
0.00159
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE # Utility classes that can be used to generate parse tree patterns. These # utilities take a sample expression or statement, and return a parse tree that...
apdjustino/DRCOG_Urbansim
src/opus_core/variables/utils/parse_tree_pattern_generator.py
Python
agpl-3.0
1,882
0.005845
#!/usr/bin/env python from collections import namedtuple Payload = namedtuple('Payload', ['iden', 'body', 'send_date', 'sender']) class Handler(object): @staticmethod def config(): return def __init__(self, logger): self.logger = logger def create_translator(): return de...
JimboMonkey1234/pushserver
handlers/Handler.py
Python
mit
725
0.002759
class StreamCache: def __init__(self): self.initiated = False self.new_cache = [] self.old_cache = [] def push(self, streams): assert isinstance(streams, list) self.old_cache = self.new_cache self.new_cache = streams if not self.initiated: self.initiated = True def get_all(self): return set(self...
moopie/botologist
plugins/streams/cache.py
Python
mit
445
0.031461
#!/usr/bin/env python """ Assignment 1, Exercise 3, INF1340, Fall, 2015. Troubleshooting Car Issues. This module contains one function diagnose_car(). It is an expert system to interactive diagnose car issues. """ __author__ = 'Susan Sim' __email__ = "ses@drsusansim.org" __copyright__ = "2015 Susan Sim" __license__...
SLiana/inf1340_2015_asst1
exercise3.py
Python
mit
2,130
0.004695
import bpy import os # join them together ctrl+j bpy.ops.object.join() def get_override(area_type, region_type): for area in bpy.context.screen.areas: if area.type == area_type: for region in area.regions: if region.type == region_type: ...
22i/minecraft-voxel-blender-models
models/extra/blender-scripting/lib/iron_golem.py
Python
gpl-3.0
1,325
0.018113
import time import appium import selenium from common.helper import * from common.processes import * capabilities = { "androidDeviceSocket": "com.peerio_devtools_remote", "chromeOptions": { 'androidPackage': 'com.peerio', 'androidActivity': '.MainActivity', "androidDeviceSocket": "com.p...
PeerioTechnologies/peerio-client-mobile
tests/test.py
Python
gpl-3.0
414
0.002415
# # Utility stackables # from __future__ import print_function, absolute_import, unicode_literals, division from stackable.stackable import Stackable, StackableError import json, pickle from time import sleep from threading import Thread, Event from datetime import datetime, timedelta class StackablePickler(Stackable...
joushou/stackable
utils.py
Python
mit
3,175
0.033701
from django.urls import path, include from .routers import router from . import views app_name = "milage" urlpatterns = [ path("api/", include(router.urls), name="api_router"), path("class-based/", views.ClassBasedView.as_view(), name="class_based_drf"), path( "class-based-detail/<int:pk>", ...
GarrettArm/TheDjangoBook
mysite_project/milage/urls.py
Python
gpl-3.0
452
0.002212
import os, extended_messages from setuptools import setup, find_packages if extended_messages.VERSION[-1] == 'final': CLASSIFIERS = ['Development Status :: 5 - Stable'] elif 'beta' in extended_messages.VERSION[-1]: CLASSIFIERS = ['Development Status :: 4 - Beta'] else: CLASSIFIERS = ['Development Status ::...
Anber/django-extended-messages
setup.py
Python
bsd-3-clause
1,190
0.017647
[ { "name": "syoukuloader", "status": "0" }, { "name": "syoukuplayer", "status": "0" }, { "name": "sku6", "status": "0" }, { "name": "studou", "status": "0" }, { "name": "sletv", "status": "0" }, ...
kafan15536900/ADfree-Player-Offline
onServer/ruletool/oconfiglist.py
Python
gpl-3.0
562
0
from .item_status import * # noqa
vyos-legacy/vyconfd
vyconf/utils/__init__.py
Python
lgpl-2.1
35
0
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
belokop/indico_bare
indico/modules/groups/forms.py
Python
gpl-3.0
1,904
0.000525
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008-2011 University of Dundee. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
jballanc/openmicroscopy
components/tools/OmeroWeb/omeroweb/webclient/forms.py
Python
gpl-2.0
111,021
0.010998
import time import glob import os import types import socket def read_paths (): fulllist = [] for file in glob.glob("*96*messages"): print 'reading ' + file fullfile = (open(file).read().splitlines()) for x in fullfile: if 'RPD_MPLS_LSP_CHANGE'in x and 'Sep 1...
shashankjagannath/shashankfoo
genresigpath.py
Python
cc0-1.0
1,485
0.032997
# _V!(3, 3) # This file was automatically generated by `dump_dis.py`. # This file is designed for Python (3, 3). import sys # Check Python version if sys.version_info[0:2] != (3, 3): raise SystemError("Inappropriate Python version for these bytecode symbols.") # Begin tokens. These are ordered. POP_TOP = 1 ROT_T...
SunDwarf/Pyte
pyte/tokens_33.py
Python
mit
2,143
0.000467
"""SCons.Tool.applelink Tool-specific initialization for the Apple gnu-like linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby...
EmanueleCannizzaro/scons
src/engine/SCons/Tool/applelink.py
Python
mit
2,828
0.003182
""" Profiling hooks This module contains a couple of decorators (`profile` and `coverage`) that can be used to wrap functions and/or methods to produce profiles and line coverage reports. There's a third convenient decorator (`timecall`) that measures the duration of function execution without the extra profiling ove...
kzlin129/practice-typing
lib/python2.7/site-packages/profilehooks.py
Python
apache-2.0
26,416
0.000341
#这个题面试时遇到过, 本身matrix是有特点的, 如果从左下角开始搜索 就可以看到规律 class Solution: def searchMatrix(self, matrix, target): """ :type matrix: List[List[int]] :type target: int :rtype: bool """ i = len(matrix) - 1 j = 0 flag = 0 if not matrix or not matrix[0]: ...
MingfeiPan/leetcode
array/74.py
Python
apache-2.0
655
0.003396
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-05-28 00:55 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('clog', '0010_auto_20160410_2149'), ] operations = [ migrations.AlterUniqueTogether( ...
jaufrec/whatnext
clog/migrations/0011_auto_20160528_0055.py
Python
gpl-3.0
419
0
# -*- coding: utf-8 -*- # # This file is part of kwalitee # Copyright (C) 2014, 2015 CERN. # # kwalitee 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) an...
greut/invenio-kwalitee
kwalitee/cli/prepare.py
Python
gpl-2.0
6,883
0
from .cal_var_byPCA *
stephenliu1989/HK_DataMiner
hkdataminer/template_matching/Select_angle/__init__.py
Python
apache-2.0
23
0.043478
# -*- coding:utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lice...
globocom/GloboNetworkAPI-client-python
networkapiclient/EquipamentoAmbiente.py
Python
apache-2.0
6,040
0.002815
# # Copyright (c) SAS Institute 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 applicable law or agreed to in w...
fedora-conary/conary
conary_test/verifytest.py
Python
apache-2.0
12,956
0.015282
import abc import logging from time import sleep, time from subprocess import call, check_output from config import sim_dump_location, safe_location, devel import infoli_diagnostics import sys class countermeasure(object): ''' Countermeasure class ''' __metaclass__ = abc.ABCMeta @abc.abstractmet...
A-Kokolis/thesis-ntua
scc_implementation/scc_countermeasures.py
Python
gpl-3.0
2,957
0.00372
from . xml import EVECACHEPATH import time from os import path import urllib import MySQLdb as mysql from urllib2 import urlopen class EveDb(object): """ This class is responsible for loading up an instance of the eve static dump information. Without this, most functionality of this library will not wor...
pkovac/evedustrial
eve/db.py
Python
mit
1,136
0.011444
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_l10n_es_aeat_mod347
OCA/l10n-spain
l10n_es_aeat_mod347/tests/__init__.py
Python
agpl-3.0
104
0
# -*- coding: utf-8 -*- # The Hazard Library # Copyright (C) 2013-2014, GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your opt...
mmpagani/oq-hazardlib
openquake/hazardlib/gsim/edwards_fah_2013a.py
Python
agpl-3.0
9,481
0
""" WSGI config for thumbor_project project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLIC...
lCharlie123l/django-thumborstorage
tests/thumbor_project/thumbor_project/wsgi.py
Python
mit
1,446
0.000692
#!/usr/bin/env python import luigi import dynamic_range_simulation import darknoise_simulation import pde_simulation import relative_pde_simulation import n_pe_simulation import crosstalk_neighbour_simulation class All(luigi.WrapperTask): def requires(self): yield crosstalk_neighbour_simulation.All() yie...
ntim/g4sipm
sample/run/luigi/all.py
Python
gpl-3.0
561
0.023173
from __future__ import absolute_import from sentry.testutils import TestCase class EventTest(TestCase): def test_legacy_tags(self): event = self.create_event(data={ 'tags': [ ('logger', 'foobar'), ('site', 'foo'), ('server_name', 'bar'), ...
alexm92/sentry
tests/sentry/models/test_event.py
Python
bsd-3-clause
1,907
0
from . import foo
asedunov/intellij-community
python/testData/completion/relativeFromImportInNamespacePackage2/nspkg1/a.after.py
Python
apache-2.0
17
0.058824
#!/usr/bin/env python # pylint: disable=too-many-lines # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) ...
joelsmith/openshift-tools
ansible/roles/lib_openshift_3.2/library/oadm_ca.py
Python
apache-2.0
35,621
0.002892
# -*- coding: utf-8 -*- import sys, os extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'ssp' copyright = u'2013, Yury Konovalov' version = '0.0.1' release = '0.0.1' exclude_patterns = [] pygments_style = 'sphinx' html_theme ...
mdcic/ssp
docs/source/conf.py
Python
gpl-3.0
752
0.00133
#!/usr/bin/python # email_url.py # emails the video URL to the presenters from email_ab import email_ab class email_url(email_ab): ready_state = 7 subject_template = "[{{ep.show.name}}] Video up: {{ep.name}}" body_body = """ The video of your talk is posted: {{url}} {% if ep.state == 7 %} Look...
yoe/veyepar
dj/scripts/email_url.py
Python
mit
1,390
0.009353
""" Django settings for votainteligente project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bu...
opencorato/votainteligente-portal-electoral
votainteligente/settings.py
Python
gpl-3.0
2,935
0.000681
# -*- coding: utf-8 -*- # # Flask-RQ documentation build configuration file, created by # sphinx-quickstart on Mon Mar 12 15:35:21 2012. # # 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...
xen/flask-rq
docs/conf.py
Python
mit
9,809
0.006932
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # # 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/LICEN...
Havate/havate-openstack
proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/openstack/common/rpc/impl_fake.py
Python
apache-2.0
5,854
0
""" Room Typeclasses for the TutorialWorld. This defines special types of Rooms available in the tutorial. To keep everything in one place we define them together with the custom commands needed to control them. Those commands could also have been in a separate module (e.g. if they could have been re-used elsewhere.)...
feend78/evennia
evennia/contrib/tutorial_world/rooms.py
Python
bsd-3-clause
40,655
0.001746
#!/usr/bin/env python import os, Queue import sys from time import sleep from threading import Thread from libs.qemu import QemuInstance, UARTLineParser # External if len(sys.argv) > 1: print "ARGS:", str(sys.argv) sys.path.append(os.path.dirname( sys.argv[1] )) ########################################...
Colibri-Embedded/FABEmu
examples/rpiemu.py
Python
gpl-2.0
909
0.006601
# -*- coding: utf-8 -*- import classes.level_controller as lc import classes.game_driver as gd import classes.extras as ex import classes.board import random import pygame class Board(gd.BoardGame): def __init__(self, mainloop, speaker, config, screen_w, screen_h): self.level = lc.Level(self,mainloop,5,...
OriHoch/pysiogame
game_boards/game070.py
Python
gpl-3.0
12,968
0.018124
import json import random import time import re try: from StringIO import StringIO # Python 2 except ImportError: from io import BytesIO as StringIO # Python 3 from datetime import date, datetime, timedelta import requests from requests.adapters import HTTPAdapter try: from requests.packages.urlli...
jbms/mintapi
mintapi/api.py
Python
mit
25,488
0.000471
# -*- coding: UTF-8 -*- # Copyright 2012-2015 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """See :doc:`/specs/isip`. """ from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from lino.api import ad class Plugin(ad.Plugin): "See :class:`lino.core.plu...
lsaffre/lino-welfare
lino_welfare/modlib/isip/__init__.py
Python
agpl-3.0
413
0
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-05 03:11 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency...
tyagow/AdvancingTheBlog
src/posts/migrations/0002_post_user.py
Python
mit
633
0.00158
from outsourcer import Code from . import utils from .base import Expression from .constants import BREAK, POS, RESULT, STATUS class Sep(Expression): num_blocks = 2 def __init__( self, expr, separator, discard_separators=True, allow_trailer=False, ...
jvs/sourcer
sourcer/expressions/sep.py
Python
mit
2,062
0.000485