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
#!/usr/bin/env python ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2007 1&1 Internet AG, Germany, http://www.1and1.org # # License: # LGPL: http://www.gnu.org/licenses/lgpl.html # EPL: h...
technosaurus/samba4-GPL2
webapps/qooxdoo-0.6.5-sdk/frontend/framework/tool/icon/modules/kde-to-freedesktop.py
Python
gpl-2.0
3,279
0.017688
__author__ = 'Bram + Frank + Ricardo + Kevin + Jouke-bouwe' import csv from tkinter import * from MiniprojectProgrammerenWeek3 import FilmsOphalen, Aankoop #Verwijst naar de csv bestanden die gebruikt worden. Moet worden aangepast als deze op een andere pc wordt uitgevoerd csvKlantBestand = 'C:/Users/Rica/PycharmProje...
zothor/software
MiniprojectProgrammerenWeek3/buttons.py
Python
gpl-2.0
17,539
0.032898
""" Dingemans Wave Shoaling """ from proteus import Domain, Context from proteus.mprans import SpatialTools as st from proteus import WaveTools as wt from math import * import numpy as np opts=Context.Options([ # predefined test cases ("water_level", 0.86, "Height of free surface above seabed"), # tank ...
erdc-cm/air-water-vv
2d/waveTransformation/Dingemans_wave_shoaling/DingemansWaveShoaling.py
Python
mit
13,687
0.016001
#!/usr/bin/python # Copyright 2011 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 appli...
omererdem/honeything
src/cwmp/google3.py
Python
gpl-3.0
964
0.001037
# This file is part of Indico. # Copyright (C) 2002 - 2017 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...
nop33/indico
indico/modules/events/features/controllers.py
Python
gpl-3.0
4,902
0.003468
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://ww...
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9-SunOS-i386/lib/python/lib/python2.4/subprocess.py
Python
gpl-2.0
39,931
0.001928
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) import pytest from .. import Backend from . import AVAILABLE_BACKENDS @pytest.mark.parametrize('key', AVAILABLE_BACKENDS) def test_Dummy(key): be = Backend(key) d0 = be.Dummy() d1 = be.Dummy() assert d0 == d0 ...
bjodah/sym
sym/tests/test_Dummy.py
Python
bsd-2-clause
339
0
""" This module is responsible for doing all the authentication. Adapted from the Google API Documentation. """ from __future__ import print_function import os import httplib2 import apiclient import oauth2client try: import argparse flags = argparse.ArgumentParser( parents=[oauth2client.tools.argpar...
Anmol-Singh-Jaggi/gDrive-auto-sync
gDrive-auto-sync/api_boilerplate.py
Python
mit
1,850
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 may ...
Azure/azure-sdk-for-python
sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/operations/_favorite_processes_operations.py
Python
mit
17,645
0.005101
#Example numpy2.py from numpy import * a = arange(1.0, 2.0, 0.1) # start, stop & step print a b = linspace(1,2,11) print b c = ones(5) print c d = zeros(5) print d e = random.rand(5) print e
csparkresearch/eyes-online
app/static/scripts/Maths/numpy2.py
Python
gpl-3.0
203
0.029557
# Author: Mike 'Fuzzy' Partin # Copyright: (c) 2016-2018 # Email: fuzzy@fumanchu.org # License: See LICENSE.md for details # Stdlib imports import math import datetime def red(txt): return '\033[1;31m%s\033[0m' % txt def green(txt): return '\033[1;32m%s\033[0m' % txt def yellow(txt): return '\033[1;33m%...
fuzzy/mvm
mvm/term.py
Python
bsd-2-clause
2,114
0.009461
def get_word_pattern(word: str) -> str: """ >>> get_word_pattern("pattern") '0.1.2.2.3.4.5' >>> get_word_pattern("word pattern") '0.1.2.3.4.5.6.7.7.8.2.9' >>> get_word_pattern("get word pattern") '0.1.2.3.4.5.6.7.3.8.9.2.2.1.6.10' """ word = word.upper() next_num = 0 letter_n...
TheAlgorithms/Python
strings/word_patterns.py
Python
mit
1,293
0.000773
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
keras-team/keras
keras/distribute/dataset_creator_model_fit_test.py
Python
apache-2.0
10,240
0.004297
#!/usr/bin/env python # encoding=utf-8 # Copyright 2014 Cloudera 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 app...
AtScaleInc/Impala
tests/shell/test_shell_interactive.py
Python
apache-2.0
3,707
0.006474
#!/usr/bin/env python3 # sequence = [] defence = 0.4 for x in range(1): print(x) for x in range(10): if x == 0: defence = defence else: defence = defence + (1 - defence) * (1 / 2) print(defence) # print(defence) # print(sequence) # print(sum(sequence)) # x = input() # print(x)
mishka28/NYU-Python
advance_python_class_3/Homework1/temptest.py
Python
mit
307
0.026059
__author__ = 'thorwhalen' import requests from serialize.khan_logger import KhanLogger import logging class SimpleRequest(object): def __init__(self, log_file_name=None, log_level=logging.INFO): full_log_path_and_name = KhanLogger.default_log_path_with_unique_name(log_file_name) self.logger = Kh...
thorwhalen/ut
slurp/simple_request.py
Python
mit
787
0.007624
from .modules.buckle_embedding import * from .modules.gather import *
mlperf/training_results_v0.7
Inspur/benchmarks/dlrm/implementations/implementation_closed/dlrm/nn/__init__.py
Python
apache-2.0
70
0
# Generated by Django 3.1.2 on 2021-05-19 20:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('eventkit_cloud_auth', '0002_auto_20191127_1425'), ] operations = [ migrations.AlterField( model_name='oauth', name='...
venicegeo/eventkit-cloud
eventkit_cloud/auth/migrations/0003_auto_20210519_2024.py
Python
bsd-3-clause
399
0
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
kilon/sverchok
old_nodes/__init__.py
Python
gpl-3.0
4,863
0.008842
""" This signature containts test to see if the site is running on ExpressionEngine. """ __author__ = "Seth Gottlieb" __copyright__ = "CM Fieldguide" __credits__ = ["Seth Gottlieb",] __license__ = "Unlicense" __version__ = "0.1" __maintainer__ = "Seth Gottlieb" __email__ = "sgottlieb@alumni.duke.edu" __status__ = "Expe...
sggottlieb/cmfieldguide
cmfieldguide/cmsdetector/signatures/expressionengine.py
Python
unlicense
1,264
0.011867
#!/usr/bin/env python # 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 "Licen...
dtrodrigues/nifi-minifi-cpp
python/getFile.py
Python
apache-2.0
3,036
0.000988
# -*- coding: utf-8 -*- """Cluster Robust Standard Errors with Two Clusters Created on Sat Dec 17 08:39:16 2011 Author: Josef Perktold """ from statsmodels.compat.python import urlretrieve import numpy as np from numpy.testing import assert_almost_equal import statsmodels.api as sm import statsmodels.stats.sandwich...
DonBeo/statsmodels
statsmodels/examples/ex_sandwich3.py
Python
bsd-3-clause
1,967
0.008134
# coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud...
Chaffelson/whoville
whoville/cloudbreak/models/recipe_request.py
Python
apache-2.0
7,284
0.002059
#!/usr/bin/env python # -*- coding: utf-8 -*- # # https://github.com/michielkauwatjoe/Meta class CubicBezier: def __init__(self, bezierId=None, points=None, parent=None, isClosed=False): u""" Stores points of the cubic Bézier curve. """ self.bezierId = bezierId self.points ...
michielkauwatjoe/Meta
meta/objects/cubicbezier.py
Python
mit
392
0.002558
# -*- coding: utf-8 -*- from cms.exceptions import NoPermissionsException from cms.models import Page, PagePermission, GlobalPagePermission from cms.plugin_pool import plugin_pool from cms.utils import get_cms_setting from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.au...
pixbuffer/django-cms
cms/utils/permissions.py
Python
bsd-3-clause
11,836
0.00414
# Copyright 2018 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...
apark263/tensorflow
tensorflow/contrib/tensorrt/test/concatenation_test.py
Python
apache-2.0
3,388
0.010035
import os import requests from flask import Flask, request, abort, redirect, jsonify from requests.exceptions import RequestException import quicklatex application = Flask(__name__) slack_client_id = os.environ['SLACK_CLIENT_ID'] slack_client_secret = os.environ['SLACK_CLIENT_SECRET'] slack_verification_token = os....
jamy015/slack-latex-bot
application.py
Python
gpl-3.0
2,527
0.001979
import platform import shlex from coalib.bearlib import deprecate_settings from coalib.bearlib.abstractions.Linter import linter from coalib.bearlib.spacing.SpacingHelper import SpacingHelper from dependency_management.requirements.DistributionRequirement import ( DistributionRequirement) @linter(executable='ind...
refeed/coala-bears
bears/c_languages/GNUIndentBear.py
Python
agpl-3.0
7,940
0
# Copyright 2019 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...
sarvex/tensorflow
tensorflow/lite/micro/examples/person_detection/utils/raw_to_bitmap.py
Python
apache-2.0
5,452
0.007337
""" Copyright 2017-present Airbnb, 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 writing, sof...
airbnb/streamalert
streamalert/apps/config.py
Python
apache-2.0
18,276
0.002845
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-09 18:13 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bot', '0013_auto_20171109_1759'), ] operations = [ migratio...
foxcarlos/decimemijobot
bot/migrations/0014_auto_20171109_1813.py
Python
gpl-3.0
694
0.001441
import numpy as np import tvm from tvm.contrib import graph_runtime import topi.testing import nnvm.symbol as sym import nnvm.compiler from nnvm.testing.config import ctx_list from nnvm.testing.check_computation import check_function def check_map(symfunc, np_func, np_backward=None, dtype="float32", rnd_min=-1, rnd_ma...
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/nnvm/tests/python/compiler/test_top_level3.py
Python
apache-2.0
1,275
0.012549
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class WebPageBlock(Document): pass
adityahase/frappe
frappe/website/doctype/web_page_block/web_page_block.py
Python
mit
272
0.003676
from alembic.config import Config from alembic.environment import EnvironmentContext from alembic.migration import MigrationContext from alembic.script import ScriptDirectory from difflib import unified_diff from pytest import fixture from re import split from sqlalchemy import engine_from_config from subprocess import...
pyfidelity/rest-seed
backend/backrest/tests/test_migrations.py
Python
bsd-2-clause
3,745
0.001068
"""Base class for IKEA TRADFRI.""" from __future__ import annotations from collections.abc import Callable from functools import wraps import logging from typing import Any from pytradfri.command import Command from pytradfri.device import Device from pytradfri.device.air_purifier import AirPurifier from pytradfri.de...
aronsky/home-assistant
homeassistant/components/tradfri/base_class.py
Python
apache-2.0
4,045
0.000494
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 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 ...
sridevikoushik31/nova
nova/virt/xenapi/vm_utils.py
Python
apache-2.0
88,420
0.000373
#!/usr/bin/python # -*- coding: utf-8 -*- import random from graphviz import Digraph current_indent = 0 color_map = ['lightgrey', 'lightpink', 'orange', 'cyan', 'gold', 'lawngreen', 'sienna', 'yellow', 'red', 'hotpink'] verbose = 0 def print_simple_tree(): indent= "| " last_indent= "\_" """prints a beautiful de...
zwindler/simfrastructure
simfrastructure_core.py
Python
mit
9,266
0.015649
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for chromite.lib.git and helpers for testing that module.""" from __future__ import print_function import functools import mock import...
guorendong/iridium-browser-ubuntu
third_party/chromite/lib/git_unittest.py
Python
bsd-3-clause
13,396
0.004479
from django.contrib.sites.models import Site import factory from factory.fuzzy import FuzzyText from oscar.core.loading import get_model from oscar.test.factories import ProductFactory, StockRecordFactory as OscarStockRecordFactory from ecommerce.core.models import SiteConfiguration class PartnerFactory(factory.Djan...
mferenca/HMS-ecommerce
ecommerce/tests/factories.py
Python
agpl-3.0
1,062
0.001883
from threading import Thread, Lock import bluetooth as bt import socket class SerialPortService(Thread): def __init__(self, port): super(SerialPortService, self).__init__() self.port = port self.send_lock = Lock() self.setDaemon(True) def run(self): self.running = True ...
bcstack/btsdk
shell/service.py
Python
apache-2.0
714
0.004202
# Copyright (c) 2013 Rackspace, Inc. # Copyright (c) 2013 Red Hat, 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 b...
rackerlabs/marconi
tests/unit/common/test_request.py
Python
apache-2.0
912
0
from django.test import TestCase from versiontools.models import AssemblyInfo from django.utils.timesince import timesince from django.utils.datetime_safe import datetime # Create your tests here. class AssembyInfoTest(TestCase): def test_create(self): data = {'fullpath' : r'C:\Users\lberrocal\Doc...
luiscberrocal/rango_tutorial
versiontools/tests.py
Python
apache-2.0
948
0.009494
# Generated by Django 2.0.13 on 2020-10-09 14:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('currency_convert', '0001_initial'), ] operations = [ migrations.AddField( model_name='monthlyaverage', name='imf_ur...
openaid-IATI/OIPA
OIPA/currency_convert/migrations/0002_monthlyaverage_imf_url.py
Python
agpl-3.0
404
0
from django.shortcuts import render, RequestContext from .forms import * import datetime from django.forms import modelformset_factory from .models import SubmitReport, Student, Faculty, Staff, Course from django.http import HttpResponse, HttpResponseRedirect, HttpResponsePermanentRedirect from django.contrib import au...
ServiceLearningB/ServiceLearningNew
submit_reports/views.py
Python
mit
12,136
0.023978
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # servres_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ SERVSTAT = {} RESSTAT = {} def handler_servres_stat(conf, nick, afl, role, status, text): instance = GROUPCHATS[conf][nick] if instance.has_key('full_ji...
cobrab11/black1-bot
extensions/servres.py
Python
apache-2.0
1,659
0.027557
#!/usr/bin/env python import json import sys import web from coloredcoinlib import BlockchainState, ColorDefinition blockchainstate = BlockchainState.from_url(None, True) urls = ( '/tx', 'Tx', '/prefetch', 'Prefetch', ) class ErrorThrowingRequestProcessor: def require(self, data, key, message): ...
elkingtowa/alphacoin
Bitcoin/ngcccbase-master/server/run.py
Python
mit
2,469
0.00081
Forked processes are a traditional way to structure parallel tasks, and they are a fun- damental part of the Unix tool set. Forking is based on the notion of copying programs: when a program calls the fork routine, the operating system makes a new copy of that program and its process in memory and starts running that...
iitjee/steppinsPython
SystemProgramming/Parallel System/01 Forking.py
Python
gpl-3.0
5,146
0.021697
import pyodbc import config def main(): # formatで`{`を使うため、`{`を重ねることでエスケープ con_str = 'Driver={{Microsoft Access Driver (*.mdb, *.accdb)}};Dbq={0};'.format(config.PATH_ACCDB) conn = pyodbc.connect(con_str) cur = conn.cursor() cur.execute("select item_name from item") for c in cur.fetchall():...
thinkAmi-sandbox/python_ms_access_sample
pyodbc_runner.py
Python
unlicense
487
0.020316
#!/usr/bin/env python import glob import cv2 import cv_bridge import rospy from sensor_msgs.msg import Image from std_msgs.msg import Int32, Float32 import rospkg import sys class Animation: def __init__(self, directory): self.fnames = [fname for fname in glob.glob("%s/*" % directory)] self.fnames...
UCRoboticsLab/BaxterTictactoe
src/baxter_tictactoe/scripts/animator_server.py
Python
apache-2.0
4,046
0.005932
#coding:utf8 from baseclass.DeepRecommender import DeepRecommender import numpy as np from random import choice,random,randint,shuffle from tool import config import tensorflow as tf #According to the paper, we only class DMF(DeepRecommender): def __init__(self,conf,trainingSet=None,testSet=None,fold='[1]'): ...
Coder-Yu/RecQ
algorithm/ranking/DMF.py
Python
gpl-3.0
6,418
0.012932
# Top Rollover Lanes __author__="jim" __date__ ="$Jan 18, 2011 1:36:37 PM$" import procgame import locale from procgame import * base_path = config.value_for_key_path('base_path') game_path = base_path+"games/whirlwind/" speech_path = game_path +"speech/" sound_path = game_path +"sound/" music_path = game_path +"mu...
mypinballs/whirlwind
tilt.py
Python
gpl-3.0
2,464
0.027597
# # Copyright 2015-2019, Institute for Systems Biology # # 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 ...
isb-cgc/ISB-CGC-Webapp
seqpeek/admin.py
Python
apache-2.0
666
0
import inspect from biicode.client.shell.biistream import Color class ToolCatalog(dict): def __init__(self, main_class, tools): dict.__init__(self) self.main_class = main_class # dict from tool group name to set of classes for c in tools: self[c.group] = c self....
drodri/client
command/tool_catalog.py
Python
mit
2,824
0.001771
""" Module containing classes for HTTP client/server interactions """ # Python 2.x/3.x compatibility imports try: from urllib.error import HTTPError, URLError from urllib.parse import urlencode except ImportError: from urllib2 import HTTPError, URLError from urllib import urlencode import socket from ...
mpvoss/RickAndMortyWeatherTweets
env/lib/python3.5/site-packages/pyowm/commons/weather_client.py
Python
mit
4,935
0.001216
#!/usr/bin/python import fetch import sys from pymongo import MongoClient db = MongoClient().ppa.ticket for loc in db.distinct('location'): print loc sys.exit(1) ''' Getting the count for each date for date in sorted(db.distinct('issueDate')): print "%s: %s" % (date, db.find({'issueDate':date}).count()) ''...
di/ppa
stats.py
Python
mit
2,062
0.022793
import mimetypes from typing import Optional, Sequence import cgi from requests import Response from requests.structures import CaseInsensitiveDict from requests_toolbelt.multipart.decoder import MultipartDecoder from rets.errors import RetsApiError, RetsResponseError from rets.http.data import Object from rets.http....
opendoor-labs/rets
rets/http/parsers/parse_object.py
Python
mit
4,892
0.001635
#!/usr/bin/env python import sys import csv import json if len(sys.argv) != 3: print 'Incorrect number of arguments.' print 'Usage: csv_to_json.py path_to_csv path_to_json' exit() print 'Argument List:', str(sys.argv) csvFileName = sys.argv[1] jsonFileName = sys.argv[2] csvFile = open (csvFileName, 'rU') myRea...
stacybird/CS510CouchDB
scripts/csv_to_json.py
Python
apache-2.0
651
0.029186
# Copyright 2017 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 a...
JavaRabbit/CS496_capstone
codelabs/flex_and_vision/main.py
Python
apache-2.0
4,034
0
from main import * from django.utils import simplejson class CsvView(CachedPage): cacheName = "CsvView" mimeType = "text/csv" selfurl = "database.csv" def generatePage(self): output = [] output.append( """title, homepage, person, category, posts_url, comments_url, priority, fav...
mathblogging/mathblogging
dataexport.py
Python
agpl-3.0
4,361
0.016969
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/colin/dev/QCrash/forms/dlg_github_login.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from qcrash.qt import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupU...
ColinDuquesnoy/QCrash
qcrash/_forms/dlg_github_login_ui.py
Python
mit
3,196
0.003755
#!/usr/bin/env python # # Python-bindings support functions test script # # Copyright (C) 2010-2022, Joachim Metz <joachim.metz@gmail.com> # # Refer to AUTHORS for acknowledgements. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as ...
libyal/libfsntfs
tests/pyfsntfs_test_support.py
Python
lgpl-3.0
1,560
0.005128
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import django from django.db import models class MessageBase(models.Model): text = models.CharField(max_length=140) # TODO save connection title rather than wacky object string? identity = models.CharField(max_length=150) backend = models.CharField(max_...
takinbo/rapidsms-borno
apps/logger/models.py
Python
lgpl-3.0
675
0.013333
# I was just curious how well I could approximate the rl5 starting values # with an interpolative scheme from quadracheer.rl5 import * import numpy as np import matplotlib.pyplot as plt fnc = lambda ay, by: mu_5_4(ay, by, k1(ay, by), k2(ay, by)) ay = np.linspace(-2, 2, 100) by = np.linspace(-2.0, 2.0, 100) Ay, By = ...
tbenthompson/quadracheer
interpolate_rl5.py
Python
mit
496
0.002016
import time import math import cv2 from pymavlink import mavutil from droneapi.lib import VehicleMode, Location import sc_config from sc_video import sc_video from sc_webcam import SmartCameraWebCam from sc_SonyQX1 import SmartCamera_SonyQX """ sc_main.py - runs top level smart camera function To run this module: * R...
mazafrav/JdeRobot
src/drivers/MAVLinkServer/modules/mavproxy_smartcamera/sc_main.py
Python
gpl-3.0
7,941
0.004282
#!/usr/bin/python2.6 # -*- coding: utf8 -*- """ settings.py: Config des utilitaires pul_* permettant la consultation et l'edition des jobs en batch """ __author__ = "Jerome Samson" __copyright__ = "Copyright 2013, Mikros Image" class Settings(object): # Global tools attributes verbose = False # Initial ...
mikrosimage/OpenRenderManagement
src/pulitools/puliquery/settings.py
Python
bsd-3-clause
556
0.001799
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import re import signal import subprocess import sys import tempfile from telemetry.core import platform from telemetry.core import...
chromium2014/src
tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py
Python
bsd-3-clause
8,787
0.008649
from ..math import vectorops,so3,se3 class SimLogger: """A CSV logger for a simulation. """ def __init__(self,sim,state_fn,contact_fn=None,colliding='all',saveheader=True): """ Logs a simulation to a CSV file. Arguments: - sim: the klampt.Simulator object you wish to use ...
hpbader42/Klampt
Python/klampt/sim/simlog.py
Python
bsd-3-clause
14,115
0.011335
# Copyright (C) 2016 William Langhoff WildBill567@users.noreply.github.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
WildBill567/nn-toy
neat/phenome.py
Python
gpl-3.0
8,014
0.002496
import pygtk import gtk import dill pygtk.require('2.0') class TreeStoreFunctions(): def get_children(self, root_iter): children = [] for i in range(0, self.treestore.iter_n_children(root_iter)): children.append(self.treestore.iter_nth_child(root_iter, i)) return children
cboyce93/epitome-xl
src/util/treestore_functions.py
Python
gpl-3.0
316
0
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
drglove/SickRage
sickbeard/notifiers/libnotify.py
Python
gpl-3.0
5,007
0.003795
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-04-30 14:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('parliament', '0029_auto_20180323_1039'), ] operations = [ migrations.AlterF...
mcallaghan/tmv
BasicBrowser/parliament/migrations/0030_auto_20180430_1447.py
Python
gpl-3.0
556
0.001799
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
FederatedAI/FATE
python/federatedml/transfer_variable/transfer_class/oblivious_transfer_transfer_variable.py
Python
apache-2.0
1,391
0.002876
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright © Spyder Project Contributors # # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) # ----------------------------------------------------------------------------- ...
bgris/ODL_bgris
lib/python3.5/site-packages/spyder/widgets/projects/type/python.py
Python
gpl-3.0
2,795
0
class Video(object): def __init__(self, json): self.id = json['id'] self.slug = json['slug'] self.title = json['title'] self.presenters = json['presenters'] self.host = json['host'] self.embed_code = json['embed_code'] def presenter_names(self): return ', '.join(map(lambda p: p['first_n...
watsonbox/xbmc-confreaks
api/video.py
Python
gpl-3.0
558
0.010753
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import account_bank_statement from . import account_journal from . import barcode_rule from . import pos_category from . import pos_config from . import pos_order from . import pos_session from . import product fr...
Aravinthu/odoo
addons/point_of_sale/models/__init__.py
Python
agpl-3.0
368
0
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """build_target_lib tests.""" from __future__ import print_function import os from chromite.lib.build_target_lib import BuildTa...
endlessm/chromium-browser
third_party/chromite/lib/build_target_lib_unittest.py
Python
bsd-3-clause
1,720
0.004651
#!/usr/bin/python # Copyright (C) 2015 Patrick Happel <patrick.happel@rub.de> # # This file is part of pySICM. # # pySICM 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 (a...
patta42/pySICM
pySICM.py
Python
gpl-3.0
1,938
0.006192
import re, os.path, os, xml.sax.saxutils, time, shutil, urllib, textwrap from gettext import gettext as _ from gourmet import convert,gglobals from gourmet.exporters.exporter import ExporterMultirec, exporter_mult HTML_HEADER_START = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> "...
butchman0922/gourmet
gourmet/plugins/import_export/html_plugin/html_exporter.py
Python
gpl-2.0
12,913
0.013785
# -*- coding: utf-8 -*- from collections import Counter from copy import deepcopy from math import sqrt from random import sample as random_sample from string import ascii_uppercase class SudokuBoard(object): """Create a Sudoku Board of variable size The method will create the random sudoku Board of vari...
MsStryker/Games
sudoku/default.py
Python
mit
4,916
0
from django.contrib import admin from django import forms from django.contrib.auth.models import User from sample.models import (Doctor, Worker, Patient, SpecialtyType, TimeSlot, Case, Comment, CommentGroup, Scan) class searchDoctor(admin.ModelAdmin): list_display = ['user_first_name', 'user_last_name', '...
CSC301H-Fall2013/Ultra-Remote-Medicine
sample/admin.py
Python
mit
1,569
0.007648
# coding: utf-8 #Created on 05.06.2012 #Copyright (C) 2013 Fabian Hachenberg #This file is part of EcstaticaLib. #EcstaticaLib 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...
fHachenberg/pyecstaticalib
Ecstatica/PixelEncoding.py
Python
gpl-3.0
6,356
0.013845
import json from pimlico.datatypes.corpora.json import JsonDocumentType from pimlico.cli.browser.tools.formatter import DocumentBrowserFormatter class JsonFormatter(DocumentBrowserFormatter): DATATYPE = JsonDocumentType() def format_document(self, doc): return json.dumps(doc.data, indent=4)
markgw/pimlico
src/python/pimlico/datatypes/corpora/formatters/json.py
Python
gpl-3.0
313
0
#!/usr/bin/env python # 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 the hope that ...
narasimhan-v/avocado-misc-tests-1
io/net/bridge.py
Python
gpl-2.0
4,362
0.000229
# -*- coding: utf-8 -*- import rapidsms import datetime from rapidsms.apps.base import AppBase from .models import Poll from django.db.models import Q from rapidsms_httprouter.models import Message,MessageBatch class App(AppBase): def respond_to_message(self,message,response_msg,poll): if response_msg ==...
unicefuganda/edtrac
edtrac_project/rapidsms_polls/poll/app.py
Python
bsd-3-clause
3,327
0.010219
#encoding:utf-8 """ pythoner.net Copyright (C) 2013 PYTHONER.ORG 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. Th...
wangjun/pythoner.net
pythoner/topic/views.py
Python
gpl-3.0
9,196
0.015263
#coding=utf-8 from functools import wraps from flask import abort from flask_login import current_user from app.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission): ...
ricardonhuang/blog
app/decorators.py
Python
gpl-3.0
516
0.001938
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-19 15:28 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('races', '0001_initial'), ] opera...
bootcamptropa/django
races/migrations/0002_auto_20160119_1628.py
Python
mit
870
0.002299
import functools as ft import math from collections import OrderedDict import numba import numpy as np from sde import SDE # from simulation.strong.explicit.predictorcorrector import Order_10 as pc_e from simulation.strong.explicit.rk import Order_10 as rk_e from simulation.strong.explicit.taylor import Order_05 as E...
dbischof90/sdetools
tests/test_scheme_implementations.py
Python
mit
6,216
0.005952
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class Keep2ShareCc(SimpleHoster): __name__ = "Keep2ShareCc" __type__ = "hoster" __version__ = "0.25" __status__...
mationic/pyload
module/plugins/hoster/Keep2ShareCc.py
Python
gpl-3.0
4,411
0.007255
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 待匹配的数据 (tofill)及匹配数据池(pool),存储于csv文件中,两个csv都要包含主键列, 及数据列。脚本将对tofill的每一条数据字段,在pool文件的数据列中做匹配,如果pool 数据列包含tofile列数据,则将各自主键列建立一条关系记录,存储在结果文件csv中 以上提到的csv文件,格式要求: 使用逗号分隔,字段可以使用双引号括起。 不支持字段内换行 必须包含主键列,主键列不得重复 主键列在数据列后 ---- 事实上,两表主键列可以重复,只不过对应关系也是重复的;恰好需此...
fengyqf/wildmatch
wildmatch.py
Python
gpl-2.0
2,849
0.023619
import datetime from django.db import models from django.core.exceptions import ValidationError def validate_year(year): if year is None: return # Years can be null if year < 1800 or year > datetime.datetime.now().year: raise ValidationError("Not a valid year.") def validate_day_of_month(d...
qubs/climate-data-api
herbarium_data/models.py
Python
apache-2.0
3,109
0.002252
# Copyright (c) 2012 Patrick Dunnigan # 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, modify, merge, publish, ...
pdunnigan/namefileparse
namefileparse/__init__.py
Python
mit
1,123
0.016919
# -*- coding: utf-8 -*- ############################################################################## # # jasper_server module for OpenERP # Copyright (c) 2008-2009 EVERLIBRE (http://everlibre.fr) Eric VERNICHON # Copyright (C) 2009-2011 SYLEAM ([http://www.syleam.fr]) Christophe CHAUVET # # This file is a...
Jgarcia-IAS/Fidelizacion_odoo
openerp/extras/jasper_server/__openerp__.py
Python
agpl-3.0
2,744
0
im = open('006993_photoA.tif', 'rb') ord(im.read(1)) chr(ord(im.read(1)))
vincentdavis/corrupt_image_finder
test_images/RandomMutateImage.py
Python
bsd-3-clause
73
0.013699
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
polyaxon/polyaxon
core/tests/test_polypod/test_contexts.py
Python
apache-2.0
14,317
0.000279
"""Order a block storage replica volume.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions CONTEXT_SETTINGS = {'token_normalize_func': lambda x: x.upper()} @click.command(context_settings=CONTEXT_SETTINGS) @cli...
skraghu/softlayer-python
SoftLayer/CLI/block/replication/order.py
Python
mit
2,315
0
import os.path from gi.repository import Gst, GstPbutils DEFAULT_IMAGE_PATH = './openmedia/gui/res/img/no_image.png' class Track(object): """ This holds data about media files. The information about the media file associated with this includes the name, file path, duration and metadata. """ ...
ReapOmen/open-media
openmedia/player/track.py
Python
gpl-3.0
2,287
0
import numpy from srxraylib.plot.gol import plot_image, plot import sys from comsyl.scripts.CompactAFReader import CompactAFReader def plot_stack(mystack,what="intensity",title0="X",title1="Y",title2="Z"): from silx.gui.plot.StackView import StackViewMainWindow from silx.gui import qt app = qt.QAppl...
srio/oasys-comsyl
orangecontrib/comsyl/scripts/load_results_from_file.py
Python
mit
2,411
0.014102
""" [2017-04-14] Challenge #310 [Hard] The Guards and the Mansion https://www.reddit.com/r/dailyprogrammer/comments/65fkwh/20170414_challenge_310_hard_the_guards_and_the/ # Description I recently came into some money and built myself a mansion. And I'm afraid of robbers who now want to come and steal the rest of my m...
DayGitH/Python-Challenges
DailyProgrammer/DP20170414C.py
Python
mit
1,976
0.005567
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
google/gnxi
oc_config_validate/oc_config_validate/models/vlan.py
Python
apache-2.0
1,672
0.009569