repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
kaankizilagac/sozluk
config/urls.py
1
1795
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from s...
mit
4,076,073,840,083,351,600
41.738095
110
0.699721
false
mathLab/RBniCS
rbnics/eim/problems/exact_parametrized_functions_decorated_problem.py
1
9290
# Copyright (C) 2015-2021 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later import inspect from rbnics.eim.backends import OfflineOnlineBackend from rbnics.eim.utils.decorators import (DefineSymbolicParameters, StoreMapFromParametrizedOperatorsToProblem, ...
lgpl-3.0
-4,619,943,413,212,641,000
54.297619
114
0.64155
false
xiaolingzi/deploy-tool-lingploy
lingploy/view/aes.py
1
1426
from PyQt5 import QtWidgets from view.aes_window import Ui_AESWindow from view.ui_thread import UIThread from view.base import Base from utils.aes_handler import AESHandler class AES(QtWidgets.QMainWindow, Ui_AESWindow, Base): def __init__(self, parent=None): QtWidgets.QMainWindow.__init__(self, parent) ...
gpl-3.0
-8,237,361,051,983,861,000
33.780488
66
0.629032
false
cnamejj/PollEngine
just-otp.py
1
4562
#!/usr/bin/env python """ Driver for OpenVPN client """ import time import base64 import hashlib import struct import hmac import pollengine # --- class OVDriveData: """OpenVPN authentication data""" def __init__( self ): self.otp_secret = NO_SECRET # --- class ShellAdmin: """Driver for admin ...
apache-2.0
-972,208,901,866,818,200
26.481928
79
0.511618
false
numerical-mathematics/extrapolation
ex_serial.py
1
12151
from __future__ import division import numpy as np import math def error_norm(y1, y2, atol, rtol): tol = atol + np.maximum(y1,y2)*rtol return np.linalg.norm((y1-y2)/tol)/(len(y1)**0.5) def adapt_step(method, f, tn_1, yn_1, y, y_hat, h, p, atol, rtol): ''' Checks if the step size is accepted. If n...
mit
3,576,681,026,400,465,000
35.271642
104
0.458398
false
skosukhin/spack
var/spack/repos/builtin/packages/ps-lite/package.py
1
1768
############################################################################## # Copyright (c) 2013-2016, 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...
lgpl-2.1
7,886,909,420,478,296,000
41.095238
81
0.669118
false
uehara1414/serverctl-prototype
serverctl_prototype/settings.py
1
3666
""" Django settings for serverctl_prototype project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ ""...
mit
-4,818,082,104,645,412,000
25.185714
91
0.683306
false
lsbardel/python-stdnet
stdnet/utils/skiplist.py
1
5251
# Modified version of skiplist # http://code.activestate.com/recipes/ # 576930-efficient-running-median-using-an-indexable-skipli/ # import sys from random import random from math import log ispy3k = int(sys.version[0]) >= 3 if not ispy3k: range = xrange __all__ = ['skiplist'] class Node(object): __slo...
bsd-3-clause
3,151,889,869,157,624,300
30.071006
78
0.517997
false
lago-project/lago
lago/templates.py
1
20977
# encoding: utf-8 from __future__ import absolute_import from __future__ import division """ This module contains any disk template related classes and functions, including the repository store manager classes and template providers, some useful definitions: * Template repositories: Repository where to fe...
gpl-2.0
3,427,605,394,685,809,700
28.254545
79
0.551035
false
pedroeml/t1-fcg
CrowdDataAnalysis/analysis/grouping.py
1
3888
from collections import deque def detect_group(people_graph, everyone_in_frame, grouping_max_distance): """ :param people_graph: :type people_graph: Graph :param everyone_in_frame: [PersonPath] :type everyone_in_frame: list :param grouping_max_distance: :return: """ groups = deq...
mit
2,369,166,324,165,528,600
35
159
0.655864
false
AnhellO/DAS_Sistemas
Ene-Jun-2021/pena-balderas-bryan/ExamenParcial1/Ejercicio 5/srp.py
1
1887
import json # Descarga esta librería con el comando 'pip install json2html' from json2html import * class Usuario(object): #si ya tenemos definidos nuestros atributos no es necesario pedir con **args def __init__(self, nombre,edad,direccion): self.nombre = nombre self.edad = edad self.d...
mit
5,022,539,029,547,369,000
35.823529
127
0.688332
false
adcomp/piwadio
piwardio.py
1
4411
#!/usr/bin/python # -*- coding: utf-8 -*- # PIWADIO - Web Radio Player # Python WebSocket Server / wrp / HTML5 client # by David Art [aka] adcomp <david.madbox@gmail.com> import json import os import sys import subprocess import select import tornado.httpserver import tornado.websocket import tornado.ioloop import ...
gpl-2.0
4,014,646,459,952,775,000
20.945274
89
0.635684
false
samj1912/picard
picard/webservice/api_helpers.py
1
10816
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2017 Sambhav Kothari # # 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 Licens...
gpl-2.0
-4,988,077,440,481,802,000
41.920635
120
0.59976
false
amaurywalbert/twitter
evaluation/chen_paralell/hashmap/old/hashmap_chen_s_metrics_with_ground_truth_v1.0.py
1
12948
# -*- coding: latin1 -*- ################################################################################################ import datetime, sys, time, json, os, os.path, shutil, time, struct, random import subprocess reload(sys) sys.setdefaultencoding('utf-8') ########################################################...
gpl-3.0
1,110,181,253,667,685,800
41.993333
231
0.421073
false
sonicxml/PennApps-2016f
server.py
1
2384
import flask import config import yelp_handler import json import requests slack_posturl = "https://slack.com/api/chat.postMessage" slack_reacturl = "https://slack.com/api/reactions.add" app = flask.Flask(__name__) class InvalidTokenException(Exception): pass @app.errorhandler(InvalidTokenException) def handle_...
gpl-3.0
603,276,408,014,567,700
29.974026
78
0.626258
false
MGautier/security-sensor
trunk/Documentacion/Memoria/trozos-codigo/codigo-9-additional-class.py
1
1844
class PacketAdditionalInfoTestCase(TestCase): # Atributos internos de la clase timestamp = timezone.now() timestamp_insertion = timezone.now() def setUp(self): ip_source = Ips.objects.create(Ip="127.0.0.2", Hostname="localhost", Tag="localhost") ip_dest = Ips.objects.create(Ip="127.0.0...
mit
-8,364,452,860,194,801,000
36.632653
93
0.560195
false
diana-hep/carl
tests/distributions/test_histogram.py
1
1901
# Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. import numpy as np from numpy.testing import assert_raises from numpy.testing import assert_array_almost_equal from numpy.testing import assert_almost_equal from carl.d...
bsd-3-clause
1,730,187,702,484,390,400
26.955882
76
0.577065
false
nagyistoce/netzob
src/netzob/Common/Plugins/Extensions/CapturerMenuExtension.py
1
3757
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
gpl-3.0
7,366,559,778,283,444,000
47.74026
84
0.417
false
time-river/wander
practice/urllib/baidutieba_spider.py
1
5915
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ''' from http://cuiqingcai.com/993.html I just copy it and use python3 to rewrite it. ''' import urllib.request import urllib.parse import urllib.error import re class Tool: ''' 除去页面标签 ''' def __init__(self): self.removeImg = re.compile(r'<img.*?>|...
mit
-6,150,374,476,879,375,000
28
150
0.497399
false
nicko7i/vcnc
api-python/tests/simple/test_pcapi_workspace.py
1
3026
import pytest import json from velstor.restapi import Session from velstor.pcapi import Workspace from velstor.pcapi import RESTException def test_as_json(): """Tests whether the Workspace JSON representation is valid JSON""" w = Workspace('session') json.loads(w.json) def test_get_well_known_workspace(...
apache-2.0
-2,666,719,511,131,740,700
24.008264
72
0.560476
false
supernathan23/dn_availability
dn_availability/reports.py
1
5431
""" reports.py This file contains report definitions. A report definition is some kind callable that should output data in whatever format. Once defined, it should be added to the ALL_REPORTS dictionary, where the key is the public name used to reference the report, like from the CLI. Example definition: def...
mit
-6,912,152,011,082,097,000
35.212329
95
0.608728
false
JuanDaniel/DBOJ
Engine/src/Execute/qualifieldThread.py
1
1262
''' Created on 30/01/2014 @author: jdsantana ''' import threading import time from Common.Request import Request import json class qualifieldThread(threading.Thread): def __init__(self, dbManager, parameters): threading.Thread.__init__(self) self.__dbManager = dbManager self.__parameters...
mit
-4,865,329,643,605,331,000
26.434783
132
0.574485
false
intelie/pycollector
src/third/stomp/__init__.py
1
1595
"""Stomp Protocol Connectivity This provides basic connectivity to a message broker supporting the 'stomp' protocol. At the moment ACK, SEND, SUBSCRIBE, UNSUBSCRIBE, BEGIN, ABORT, COMMIT, CONNECT and DISCONNECT operations are supported. This changes the previous version which required a listener...
bsd-3-clause
-3,484,393,463,302,203,400
34.295455
113
0.691536
false
cs2c-zhangchao/nkwin1.0-anaconda
pyanaconda/ui/gui/spokes/lib/resize.py
1
17819
# Disk resizing dialog # # Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed...
gpl-2.0
7,598,323,766,163,763,000
41.629187
122
0.590662
false
katekim/stellarya
src/stellarya/Preferences.py
1
1812
import os import yaml from PyQt4.QtCore import * import stellarya class Preferences(QObject): changed = pyqtSignal(str) def __init__(self): QObject.__init__(self) self._data = {} @property def _cfgpath(self): return os.path.join(stellarya._.confdir, "stellarya.cfg") d...
mit
7,850,103,655,720,551,000
25.26087
85
0.551876
false
Teagan42/home-assistant
homeassistant/components/fan/__init__.py
1
5555
"""Provides functionality to interact with fans.""" from datetime import timedelta import functools as ft import logging from typing import Optional import voluptuous as vol from homeassistant.const import SERVICE_TOGGLE, SERVICE_TURN_OFF, SERVICE_TURN_ON import homeassistant.helpers.config_validation as cv from home...
apache-2.0
6,271,439,153,283,638,000
27.782383
84
0.646445
false
aselle/tensorflow
tensorflow/python/keras/engine/training_utils.py
1
37405
# 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...
apache-2.0
-8,599,687,522,877,374,000
37.013211
86
0.626521
false
purpleidea/bash-tutor
examples/0.2/gitbisect/homework/tests/fibonacciTestCase2.py
1
2850
#!/usr/bin/python # -*- coding: utf-8 -*- """tests.fibonacciTestCase Model test case for adding tests into the automatic suite. To add a test case: 3) modify methods in the class, building your test case 4) edit this docstring to show the correct name and short description 5) test by running this file. will automat...
agpl-3.0
567,258,592,141,781,250
32.529412
92
0.710877
false
stephanos/subvoc
web/routing.py
1
1967
import os import jinja2 from flask_json import as_json from web.routes.api_analysis import analysis_api from web.routes.api_search import search_api from web.routes.api_word import words_api from web.routes.bootstrap import bootstrap from web.routes.error import error from api.dictionary.wordnik import Wordnik from ...
mit
2,810,889,148,646,337,500
25.581081
99
0.695984
false
icisneros/uav_landing
OtherssCode/SmartCamera-master/vehicle_control.py
1
7922
#!/usr/bin/python import time import math from pymavlink import mavutil from droneapi.lib import VehicleMode, Location import sc_config from sc_video import sc_video from sc_logger import sc_logger """ This class encapsulates the vehicle and some commonly used controls via the DroneAPI """ ''' TODO: At rally point su...
mit
958,851,344,772,216,300
37.086538
121
0.558697
false
djsegal/ahab_legacy_
pequod/createVectorLists.py
1
6291
# -*- coding: utf-8 -*- """ Created on Fri May 30 19:52:46 2014 @author: dan """ from getMultiCurVals import getMultiCurVals from readCurVectorInput import readCurVectorInput from readValue import readValue from copy import deepcopy def ...
apache-2.0
-3,726,841,644,481,246,700
40.394737
87
0.35368
false
jandom/rdkit
rdkit/Chem/Draw/UnitTestSimilarityMaps.py
1
7019
# $Id$ # # Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc. # 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 c...
bsd-3-clause
-6,318,957,341,486,780,000
39.108571
96
0.69782
false
theetcher/fxpt
fxpt/fx_texture_manager/harvesters.py
1
2482
import maya.cmds as m from fxpt.fx_texture_manager import tex_node TEX_ATTRIBUTES = { 'file': [ 'fileTextureName' ], # 'mentalrayTexture': [ # 'fileTextureName' # ] } class HarvesterBase(object): def getTexNodes(self): raise NotImplementedError('Call to abstract method.'...
mit
-5,509,195,213,790,897,000
27.860465
99
0.568896
false
DeflatedPickle/Colony
colony/resource.py
1
2949
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """""" from colony.entities.attributes import Age, Health from colony.entities import Entity from colony.item import Item from colony.references import * __title__ = "Resource" __author__ = "DeflatedPickle" __version__ = "1.0.2" class Resource(Entity, Age, Health): ...
mit
-4,868,313,324,769,137,000
40.535211
127
0.505256
false
nttks/edx-platform
biz/djangoapps/gx_member/builders.py
1
3466
# -*- coding: utf-8 -*- from collections import OrderedDict from django.utils.translation import ugettext as _ from biz.djangoapps.gx_member.models import Member FIELD_GROUP_CODE = 'group_code' FIELD_CODE = 'code' FIELD_EMAIL = 'email' FIELD_FIRST_NAME = 'first_name' FIELD_LAST_NAME = 'last_name' FIELD_PASSWORD = 'pas...
agpl-3.0
-4,143,055,898,418,332,000
34.010101
102
0.560589
false
Jet-Streaming/gyp
test/small/gyptest-small.py
1
1532
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Runs small tests. """ import imp import os import sys import unittest import TestGyp test = TestGyp.TestGyp() #...
bsd-3-clause
1,676,917,526,871,446,300
25.854545
72
0.691906
false
CS-SI/QGIS
python/plugins/processing/algs/gdal/tri.py
1
4263
# -*- coding: utf-8 -*- """ *************************************************************************** tri.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********************...
gpl-2.0
9,072,826,177,340,879,000
40.38835
116
0.545156
false
QwertyManiac/seal-cdh4
seal/lib/mr/filter_link.py
1
1740
# Copyright (C) 2011-2012 CRS4. # # This file is part of Seal. # # Seal 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. # # Seal is dis...
gpl-3.0
884,195,564,982,591,200
36.021277
91
0.71092
false
fabeschan/midigeneration
playback-demo.py
1
1282
import data import time import mido import playback def main(): # initialize a PlaybackUtility for each midi file, put them into a list -> playback_utils playback_utils = [] for f in ['mid/owl.mid', 'mid/lost.mid']: musicpiece = data.piece(f) pbu = playback.PlaybackUtility() pbu.add...
mit
-4,767,020,812,574,751,000
32.736842
97
0.638846
false
kaste/pytest-beds
testbeds/fixtures.py
1
3023
import pytest fixture = pytest.fixture @fixture def bed(request): from google.appengine.ext import testbed bed = testbed.Testbed() bed.activate() request.addfinalizer(lambda: teardown_bed(bed)) return bed def teardown_bed(bed): bed.deactivate() @fixture def mailer(bed): from google.appe...
mit
-5,951,949,498,737,973,000
20.446809
74
0.69302
false
openstack/barbican
barbican/objects/fields.py
1
3518
# Copyright 2018 Fujitsu. # # 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...
apache-2.0
4,955,053,650,329,911,000
34.897959
78
0.800171
false
PMBio/limix
limix/scripts/iSet_postprocess.py
1
2451
#! /usr/bin/env python # Copyright(c) 2014, The mtSet developers (Francesco Paolo Casale, Barbara Rakitsch, Oliver Stegle) # All rights reserved. from optparse import OptionParser from limix.mtSet.core.iset_utils import calc_emp_pv_eff import pandas as pd import glob import os import time import sys def entry_point()...
apache-2.0
6,777,799,267,604,765,000
33.521127
99
0.569563
false
angus-ai/angus-service-facedetection
angus/services/facedetection.py
1
1997
#!/usr/bin/env python # -*- 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 Licens...
apache-2.0
-6,569,452,880,651,726,000
27.126761
65
0.664997
false
mitdbg/aurum-datadiscovery
nearpy/storage/storage_redis.py
1
5855
# -*- coding: utf-8 -*- # Copyright (c) 2013 Ole Krause-Sparmann # 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 # -*- coding: u...
mit
-6,178,399,285,993,410,000
34.920245
79
0.594364
false
ztane/python-Levenshtein
setup.py
1
1550
from setuptools import setup import os import sys from distutils.core import Extension version = '0.12.2' extLevensthein = Extension('Levenshtein._levenshtein', sources = ['Levenshtein/_levenshtein.c'], ) if sys.version_info >= (3, 0): _open = lambda f: open...
gpl-2.0
3,761,975,170,363,939,300
31.978723
91
0.599355
false
mitsei/dlkit
dlkit/handcar/id/objects.py
1
3208
# -*- coding: utf-8 -*- # This module contains all the Object classes used by the MIT Core Concept # Catalog (MC3) Handcar based implementation of the OSID Id Service. from ...abstract_osid.id import objects as abc_id_objects from ..osid import objects as osid_objects from .. import settings from ..primitives import ...
mit
8,675,160,027,935,675,000
34.252747
139
0.608167
false
emilioriosvz/EmilioRiosExamen
peachestore/Gestor.py
1
4821
__author__ = 'Emilio' import sys, json, datetime, os from random import randrange class Gestor(): files = {} cwd = os.getcwd() files['aplicacionesgratuitas'] = os.path.join(cwd, "aplicacionesgratuitas.json") files['aplicacionesdepago'] = os.path.join(cwd, "aplicacionesdepago.json") applistfree = [...
apache-2.0
860,530,872,228,743,400
38.834711
187
0.574601
false
bendmorris/retriever
engines/sqlite.py
1
1726
import os import platform from retriever.lib.models import Engine, no_cleanup from retriever import DATA_DIR class engine(Engine): """Engine instance for SQLite.""" name = "SQLite" abbreviation = "sqlite" datatypes = { "auto": "INTEGER", "int": "INTEGER", ...
mit
-7,740,125,364,134,082,000
34.958333
98
0.505794
false
eouti/megapy
main.py
1
2237
#!/usr/bin/env python """main.py: Script to download links using mega-debrid.eu.""" __author__ = "eoutin" import argparse import ast import urllib from urllib2 import * import subprocess parser = argparse.ArgumentParser() parser.add_argument("link", help="link to download", type=str) parser.add_argument("path", hel...
gpl-3.0
-4,732,943,757,378,375,000
25.951807
89
0.643719
false
gkno/gkno_launcher
src/gkno/fileErrors.py
1
4112
#!/usr/bin/python from __future__ import print_function import inspect from inspect import currentframe, getframeinfo import errors from errors import * import os import sys class fileErrors: # Initialise. def __init__(self): # Get general error writing and termination methods. self.errors = errors()...
mit
269,886,199,515,153,630
45.202247
154
0.699173
false
HEG-Arc/voices
arc/tests.py
1
1186
# -*- coding: UTF-8 -*- # tests.py # # Copyright (C) 2013 HES-SO // Haute école de gestion Arc # # Author: Cédric Gaspoz <cedric@gaspoz-fleiner.com> # # This file is part of voices. # # voices is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
gpl-3.0
-797,811,566,359,866,200
30.157895
79
0.717905
false
Zenohm/crusoe
travis_pypi_setup.py
1
3751
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
mit
4,224,383,735,861,574,000
29.745902
79
0.679019
false
klmitch/nova
nova/tests/unit/api/openstack/compute/test_server_start_stop.py
1
9355
# Copyright (c) 2012 Midokura Japan K.K. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
9,134,414,122,101,168,000
41.912844
78
0.62031
false
kelvinguu/lang2program
third-party/gtd/gtd/tests/test_persist.py
1
15908
import json import logging import time from abc import ABCMeta, abstractmethod from collections import Counter import pytest from gtd.persist import LazyMapping, EagerMapping, TableMapping, ORM, ORMColumn, FileSequence, FileSerializer, SimpleORM, \ ShardedSequence, CustomSerializer, LazyIterator, BatchIterator, Si...
apache-2.0
4,992,345,303,471,828,000
28.082267
123
0.588886
false
pytorch/vision
.circleci/unittest/linux/scripts/run-clang-format.py
1
11280
#!/usr/bin/env python """ MIT License Copyright (c) 2017 Guillaume Papin 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,...
bsd-3-clause
-5,974,119,727,037,007,000
30.07438
87
0.596543
false
aissehust/sesame-paste-noodle
mlbase/tests/smoke.py
1
26037
import theano import theano.tensor as T import mlbase.network as N import h5py import numpy as np import mlbase.layers.activation as act import mlbase.loaddata as l from mlbase.layers import * import mlbase.cost as cost from skimage.measure import block_reduce def test_generative(): import mlbase.cost as cost ...
bsd-3-clause
4,741,205,503,026,675,000
33.855422
121
0.631601
false
com4/eventmq
eventmq/publisher.py
2
2447
# This file is part of eventmq. # # eventmq 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 License, or (at your option) # any later version. # # eventmq is distributed in the ...
lgpl-2.1
9,049,493,517,715,643,000
29.974684
79
0.629342
false
VaclavDedik/classifier
classifier/models.py
1
5190
import numpy as np import operator from sklearn import naive_bayes from sklearn import svm, tree from kernels import GaussianKernel class AbstractModel(object): """Abstract model of a learning algorithm. When implementing a subclass, you have to implement method ``train``. Method ``predict`` is implemented ...
mit
-3,483,062,381,400,961,000
32.921569
78
0.618304
false
igabriel85/dmon-adp
pyadp.py
1
10665
from dataformatter import DataFormatter from pyQueryConstructor import QueryConstructor import os from dmonconnector import Connector from adplogger import logger from datetime import datetime import time if __name__ == '__main__': dataDir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') mode...
apache-2.0
4,747,426,054,977,383,000
43.810924
163
0.672386
false
Jeff-Tian/mybnb
Python27/Lib/idlelib/AutoCompleteWindow.py
2
17725
""" An auto-completion window for IDLE, used by the AutoComplete extension """ from Tkinter import * from idlelib.MultiCall import MC_SHIFT from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>" HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>...
apache-2.0
-8,441,115,935,815,127,000
41.550369
80
0.554697
false
pawhewitt/Dev
SU2_PY/parse_config.py
2
9159
#!/usr/bin/env python ## \file parse_config.py # \brief Builds a worksheet of all SU2.cpp options # \author A. Aranake, F. Palacios # \version 5.0.0 "Raven" # # SU2 Original Developers: Dr. Francisco D. Palacios. # Dr. Thomas D. Economon. # # SU2 Developers: Prof. Juan J. Alonso's group at...
lgpl-2.1
-5,697,584,729,431,939,000
34.777344
349
0.62354
false
DFEC-R2D2/r2d2
tests/example.py
1
1074
from __future__ import print_function import time from dual_mc33926_rpi import motors, MAX_SPEED # Set up sequences of motor speeds. test_forward_speeds = list(range(0, MAX_SPEED, 1)) + \ [MAX_SPEED] * 200 + list(range(MAX_SPEED, 0, -1)) + [0] test_reverse_speeds = list(range(0, -MAX_SPEED, -1)) + \ [-MAX_SPEED...
mit
-8,810,767,270,861,297,000
25.85
60
0.634078
false
djangraw/PsychoPyParadigms
BasicExperiments/MovieListTask_Builder_d1.py
1
24389
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This experiment was created using PsychoPy2 Experiment Builder (v1.90.1), on Tue May 8 15:02:31 2018 Created 5/8/18 by DJ. Updated 5/8/18 by DJ - added NetStationEEG code from https://github.com/imnotamember/PyNetstation (per Pete's instructions) Updated 6/8/18 by...
mit
2,653,068,431,553,983,500
38.400646
164
0.67797
false
osrsbox/osrsbox-db
osrsbox/items_api_examples/print_f2p_weapons.py
1
1661
""" Author: PH01L Email: phoil@osrsbox.com Website: https://www.osrsbox.com Description: A very simple example script of how to load the osrsbox-db item database, loop through the loaded items, and print and items that are both weapons and available in free to play. Copyright (c) 2019, PH01L #####################...
gpl-3.0
4,822,616,301,344,140,000
40.525
84
0.647803
false
Azure/azure-sdk-for-python
sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models.py
1
49380
# 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 ...
mit
-4,076,056,713,243,702,000
34.96504
150
0.619907
false
connect2ocbc/pyocbc
ocbc/__init__.py
1
1511
#!/usr/bin/env python # # A library that provides a Python interface to the OCBC API # Copyright (C) 2016 # Naveen Sanmane <naveen.sanmane@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Software Foundat...
lgpl-3.0
-8,216,884,998,903,073,000
35.878049
81
0.74454
false
sethmbaker/fewsn-web
agent/tests.py
1
1963
from django.test import TestCase from sensor_net.models import Node, Reading, Sensor from agent import utils from agent.models import * class AlertLogTestCase(TestCase): # When a reading is created, the value is checked against def setUp(self): # This test case supposes a humidity monitor for a guit...
apache-2.0
-6,219,476,835,745,085,000
34.709091
113
0.687723
false
mwishoff/mattsWork
Cracking The Coding Interview/FindMissingNumbers.py
1
1145
from bitarray import bitarray def MissingNumbers(array): bArray = bitarray(100) missingNums = [] tempPair = [] strList = [] itr = iter(range(100)) strRange = "" for num in array: bArray[num] = 1 for i in itr: print(i) if bArray[i] == 0: tempPair.a...
gpl-3.0
-7,503,232,586,219,784,000
20.203704
55
0.470742
false
jpachecot/Programa_Organizacion_Hotel_Royal_Decameron_Punta_Sal
modulobdreservaciones.py
1
17320
#MODULO RESERVACIONES - BASE DE DATOS import os import sys import sqlite3 import moduloinicio import moduloreservaciones def nombre(): letras = [' ','A','B','C','D','E','F','G','H','I','J','K','L','M','N','Ñ','O','P','Q','R','S','T','U','V','W','X','Y','Z','a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'...
gpl-3.0
-6,831,424,874,366,414,000
37.511416
304
0.385011
false
arangodb/arangodb
3rdParty/V8/gyp/MSVS/MSVSSettings.py
1
45377
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. r"""Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. Th...
apache-2.0
-3,895,816,195,586,645,000
39.953971
80
0.648588
false
SteveDiamond/cvxpy
cvxpy/interface/base_matrix_interface.py
2
5011
""" Copyright 2013 Steven Diamond 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...
gpl-3.0
1,837,893,221,666,258,700
35.311594
89
0.645979
false
unknowfly/npa-bbs
NpaForum/apps/users/models.py
1
1981
# -*- coding: utf8 -*- from __future__ import unicode_literals from django.contrib.auth.models import AbstractUser from django.db import models from datetime import datetime from utils.common_utils import * # Create your models here. class UserProfile(AbstractUser): nickname = models.CharField(max_length=60, ve...
mit
-713,898,654,345,017,200
37.4375
125
0.673171
false
kepstin/picard
picard/plugin.py
1
6881
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2007 Lukáš Lalinský # # 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...
gpl-2.0
-1,107,018,417,051,953,000
31.443396
92
0.573423
false
elektro-NIK/P3DA
setup.py
1
1037
from setuptools import setup, find_packages from pip import get_installed_distributions from sys import exit PACKAGE = 'software' NAME = 'P3DA' DESCRIPTION = 'P3DA - RGB controller based on Arduino board' AUTHOR = 'Bogdan Kalinin' AUTHOR_EMAIL = 'bogdan.kalinin@gmail.com' URL = 'https://github.com/elektro-NIK/P3DA' VE...
gpl-3.0
3,551,913,329,480,088,000
31.40625
65
0.621022
false
atzengin/OCC
occ/gui/Bars.py
1
4767
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio OpenCV Companion 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) a...
gpl-3.0
5,145,827,815,054,436,000
31.650685
118
0.632893
false
summanlp/textrank
summa/preprocessing/snowball.py
1
166890
# Adapted from the NLTK package v3.0.1: # https://github.com/nltk/nltk/blob/3.0.1/nltk/stem/snowball.py # # Natural Language Toolkit: Snowball Stemmer # # Copyright (C) 2001-2014 NLTK Project # Author: Peter Michael Stahl <pemistahl@gmail.com> # Peter Ljunglof <peter.ljunglof@heatherleaf.se> (revisions) # Algo...
mit
-7,996,408,616,791,845,000
37.813796
102
0.420733
false
pkill-nine/qutebrowser
tests/unit/config/test_config.py
1
16989
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser 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 Sof...
gpl-3.0
7,556,874,685,535,554,000
39.258294
79
0.574666
false
jreback/pandas
pandas/conftest.py
1
37035
""" This file is very long and growing, but it was decided to not split it yet, as it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989 Instead of splitting it was decided to define sections here: - Configuration / Settings - Autouse fixtures - Common arguments - Missing values & co. - Classes - Indices - Serie...
bsd-3-clause
-4,583,032,823,071,654,400
24.297131
88
0.583286
false
haggi/OpenMaya
src/mayaToCorona/mtco_devmodule/scripts/Corona/AETemplate/AECoronaLayeredTemplate.py
1
10391
import pymel.core as pm import logging import traceback import sys from getpass import getuser log = logging.getLogger("ui") class BaseTemplate(pm.ui.AETemplate): def addControl(self, control, label=None, **kwargs): pm.ui.AETemplate.addControl(self, control, label=label, **kwargs) def be...
mit
-1,501,525,835,912,991,700
46.669725
129
0.626407
false
Berkeley-BORIS/BORIS_Code
notebooks/stereocalibrationtesting/stereo_calibration_orig.py
1
8634
import sys import os import random import fnmatch import cv import cv2 import numpy as np #print cv2.__version__ #if not cv2.__version__.startswith('2.3'): # raise NotImplementedError("WARNING: cv2 is version {0}!! We haven't implemented the inverted transform direction changed after 2.3!".format(cv2.__version__)) de...
mit
-3,516,562,591,805,934,000
36.703057
315
0.702571
false
shenaishiren/xiaodi
xiaodi/api/abc.py
1
2864
# coding=utf-8 import types import logging from tornado.gen import coroutine from tornado.web import asynchronous from tornado.web import RequestHandler from tornado.web import HTTPError from xiaodi.api.errors import HTTPAPIError from xiaodi.api.errors import INTERNAL_SERVER_ERROR from xiaodi.api.errors import BAD_REQ...
gpl-3.0
-5,720,625,523,224,219,000
31.179775
90
0.622556
false
nataliemcmullen/WikiMiney
db/data/2012/10/get_gzs.py
1
24893
urls = [ "pagecounts-20121001-000000.gz", "pagecounts-20121001-010000.gz", "pagecounts-20121001-020000.gz", "pagecounts-20121001-030000.gz", "pagecounts-20121001-040000.gz", "pagecounts-20121001-050000.gz", "pagecounts-20121001-060001.gz", "pagecounts-20121001-070000.gz", "pagecounts-20121001-080000.gz", "pagecounts-20...
mit
190,367,817,570,999,400
31.883752
82
0.78512
false
jenskutilek/Glyphs-Scripts
Layers/Delete all non-Master layers.py
1
1836
# MenuTitle: Delete all non-Master layers # -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals, ) __doc__ = """ Goes through selected glyphs and deletes all glyph layers which are not a Master, Bracket or Brace layer. """ Font = Glyphs.font sele...
mit
-8,980,516,049,966,369,000
28.142857
105
0.592593
false
jacoor/sew_django
config/dev/local_settings.py
1
1070
# -*- coding: utf-8 -*- import os DEBUG=True SASS_DEBUG = DEBUG TEMPLATE_DEBUG=DEBUG #COMPRESS_ENABLED=True PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) ADMINS = ( ('jacek', 'jacek@ivolution.pl'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', ...
mit
-7,958,092,836,899,876,000
19.596154
82
0.575701
false
freeserver/readerss
grabber/engines/base.py
1
2008
from models.model import Feed, Entry class BaseDB(object): """ The base implementation of the database interface. """ TABLES = [ Feed, Entry ] def __init__(self, connection_string): """ Sets up connection to mongo database. :param connection_str...
agpl-3.0
3,253,627,756,864,543,000
30.873016
71
0.601594
false
Oldentide/Oldentide
db/tools/character_builder_scraper.py
2
9353
#!/bin/python # This script will parse and reformat all of the race and profession modifiers in the RoE files. # Modules. import argparse import os import pprint import re import sys import time # Set up command line arguments. parser = argparse.ArgumentParser(description='This script will parse and reformat all of t...
gpl-2.0
-4,958,627,607,280,227,000
26.431085
143
0.651449
false
ACCUConf/ACCUConf_Submission_Web_Application
accuconf_cfp/views/review.py
1
11087
"""Routes associated with reviewing submitted proposals.""" from flask import jsonify, render_template, request, session from accuconf_cfp import app, db, year from accuconf_cfp.utils import is_acceptable_route, is_logged_in, md from models.proposal import Proposal from models.proposal_types import sessiontype_descr...
gpl-3.0
8,220,997,768,545,114,000
42.478431
120
0.582394
false
fritzgerald/NehePyOpenGL
01-05/nehe-02.py
1
2520
#!/usr/bin/env python import glfw import OpenGL.GL as gl import OpenGL.GLU as glu window_width = 640 window_height = 480 def main(): # Initialize the library if not glfw.init(): return # Create a windowed mode window and its OpenGL context window = glfw.create_window(window_width, window_heig...
mit
-5,422,371,594,309,356,000
27.325843
111
0.666667
false
ArchiveTeam/ftp-grab
pipeline.py
1
10356
from distutils.version import StrictVersion import datetime import hashlib import os import re import socket import shutil import time import sys import urllib try: import requests except ImportError: print('Please install or update the requests module.') sys.exit(1) import seesaw from seesaw.config import...
unlicense
-4,047,015,062,139,173,400
33.868687
174
0.565856
false
arrabito/DIRAC
tests/Integration/Framework/Test_LoggingDB.py
1
2988
""" This is a test of the SystemLoggingDB It supposes that the DB is present and installed in DIRAC """ # pylint: disable=invalid-name,wrong-import-position,protected-access import unittest from DIRAC.Core.Base.Script import parseCommandLine parseCommandLine() from DIRAC import gLogger from DIRAC.Core.Utilitie...
gpl-3.0
-3,121,295,232,823,107,000
30.787234
108
0.711847
false
evenmarbles/mlpy
mlpy/knowledgerep/cbr/similarity.py
1
17713
from __future__ import division, print_function, absolute_import import math import numpy as np from abc import ABCMeta, abstractmethod from sklearn.neighbors import NearestNeighbors from sklearn.cluster import KMeans from sklearn.metrics.pairwise import cosine_similarity from sklearn.neighbors.dist_metrics import M...
mit
-1,097,991,111,061,715,100
31.985102
119
0.603342
false
larsks/cobbler-larsks
koan/utils.py
1
16252
""" koan = kickstart over a network general usage functions Copyright 2006-2008 Red Hat, Inc. Michael DeHaan <mdehaan@redhat.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 2 of ...
gpl-2.0
3,835,868,868,866,504,700
28.549091
126
0.580852
false
h4wkmoon/shinken
shinken/macroresolver.py
1
17498
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # 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 c...
agpl-3.0
-1,762,913,324,187,749,400
39.133028
171
0.552349
false
bbondy/brianbondy.gae
libs/markdown/extensions/meta.py
1
2697
#!usr/bin/python """ Meta Data Extension for Python-Markdown ======================================= This extension adds Meta Data handling to markdown. Basic Usage: >>> import markdown >>> text = '''Title: A Test Doc. ... Author: Waylan Limberg ... John Doe ... Blank_Data:...
mit
-9,115,914,859,540,492,000
27.966667
99
0.531702
false
shadowmint/nwidget
lib/cocos2d-0.5.5/test/test_transition_fadebl.py
1
1224
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "s, t 0.5, s, t 1, s, t 1.5, s, t 2.1, s, q" tags = "FadeBLTransition" import cocos from cocos.director import director from cocos.act...
apache-2.0
-6,601,661,051,400,266,000
24.608696
72
0.619281
false
akanouras/dm-tool
dm_tool.py
1
11221
#! /usr/bin/env python # -*- coding:utf-8 -*- from __future__ import print_function # , unicode_literals # Based on dm-tool.c from the LightDM project. # Original Author: Robert Ancell <robert.ancell@canonical.com> # Copyright (C) 2013 Antonis Kanouras <antonis@metadosis.eu> # # This program is free software: you can...
gpl-3.0
4,424,071,183,432,009,000
33.420245
85
0.583014
false
jrtaal/pyramid_handlebars
test/test_renderers.py
1
9484
''' Created on 3 mei 2012 @author: jacco ''' import unittest import os from lifeshare.lib.renderers import stackdict from lifeshare.lib.renderers.ajax_renderer import AjaxRendererFactory from lifeshare.lib.renderers.pybars_renderer import PybarsRendererFactory from pyramid import testing from pyramid.threadlocal im...
mit
4,120,112,888,118,071,300
34.924242
333
0.578132
false
ceball/param
setup.py
1
2666
import os from setuptools import setup ########## autover ########## def get_setup_version(reponame): """Use autover to get up to date version.""" # importing self into setup.py is unorthodox, but param has no # required dependencies outside of python from param.version import Version return Ver...
bsd-3-clause
-6,838,050,883,231,067,000
32.746835
105
0.615904
false
robmadole/jig
src/jig/output.py
1
15443
# coding=utf-8 import sys import codecs from functools import wraps from StringIO import StringIO from contextlib import contextmanager from jig.exc import ForcedExit # Message types INFO = u'info' WARN = u'warn' STOP = u'stop' def strip_paint(payload): """ Removes any console specific color characters. ...
bsd-2-clause
4,069,934,028,138,322,000
30.324544
79
0.538885
false
dtaht/ns-3-dev-old
src/wimax/bindings/modulegen__gcc_ILP32.py
1
738879
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
8,624,872,013,894,432,000
63.379106
748
0.607677
false