repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
aevri/mel
mel/cmddebug/meldebug.py
1
3100
"""Mel Debug - for debugging the internals of the 'mel' command.""" import argparse import sys import mel.cmd.error import mel.cmddebug.benchautomark import mel.cmddebug.genrepo import mel.cmddebug.rendervaluefield import mel.lib.ui def main(): parser = argparse.ArgumentParser( formatter_class=argparse...
apache-2.0
-5,583,005,775,866,671,000
31.978723
79
0.660968
false
FarnazH/horton
horton/__init__.py
4
1447
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
gpl-3.0
5,630,239,729,071,877,000
30.456522
69
0.756738
false
tgillet1/PASTA
tree.py
1
1739
from sequence import NeuriteSequence class TreeIndexLogic(): ''' A class which captures tree-specific logic given two characters. @param char1: First character @param char2: Second character ''' def __init__(self, char1, char2): self.char1 = char1 self.char2 = char2 ...
mit
-1,689,353,366,102,372,600
36.804348
98
0.562967
false
zak-k/iris
docs/iris/example_code/General/cross_section.py
6
1297
""" Cross section plots =================== This example demonstrates contour plots of a cross-sectioned multi-dimensional cube which features a hybrid height vertical coordinate system. """ import matplotlib.pyplot as plt import iris import iris.plot as iplt import iris.quickplot as qplt def main(): # Enable...
gpl-3.0
-1,278,188,299,362,343,400
27.195652
79
0.639167
false
calexil/FightstickDisplay
pyglet/event.py
1
19212
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2021 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
gpl-3.0
4,335,954,009,987,605,500
36.017341
99
0.616229
false
Svalorzen/AI-Toolbox
test/Python/POMDP/GapMinTests.py
1
1985
import unittest import sys import os sys.path.append(os.getcwd()) from AIToolbox import POMDP class POMDPPythonGapMin(unittest.TestCase): def chengD35(self): # Actions are: 0-listen, 1-open-left, 2-open-right S = 3 A = 3 O = 3 model = POMDP.Model(O, S, A) # SAS ...
gpl-3.0
2,645,549,243,620,513,300
19.255102
58
0.379849
false
Lamecarlate/gourmet
gourmet/importers/html_importer.py
6
20973
import urllib, re, tempfile, os.path import importer import BeautifulSoup import socket from gourmet.gdebug import debug from gettext import gettext as _ import traceback DEFAULT_SOCKET_TIMEOUT=45.0 URLOPEN_SOCKET_TIMEOUT=15.0 socket.setdefaulttimeout(DEFAULT_SOCKET_TIMEOUT) # To add additional HTML import sites, see...
gpl-2.0
-2,221,629,064,807,461,600
35.989418
102
0.536166
false
grofte/NAMI
ConvertScripts/steponeplus_v2.2-to-NAMI.py
1
1068
# # steponeplus_v2.2-to-NAMI.py # # Pedro Sousa Lacerda <pslacerda@gmail.com> # LaBiMM, UFBA # # This script converts XLS data from a StepOnePlus (v2.2.2) to CSV format # # You need pandas and xlrd installed in order to run this script. # pip install pandas xlrd # # To run type # python steponeplus_v2.2-...
bsd-3-clause
-4,377,033,368,681,352,000
26.384615
73
0.70412
false
cyx1231st/nova
nova/api/openstack/compute/fixed_ips.py
11
4459
# Copyright 2012 IBM Corp. # # 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 t...
apache-2.0
8,456,095,108,908,163,000
35.252033
78
0.630859
false
alexus37/AugmentedRealityChess
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGL/GL/SGIX/sprite.py
7
3385
'''OpenGL extension SGIX.sprite This module customises the behaviour of the OpenGL.raw.GL.SGIX.sprite to provide a more Python-friendly API Overview (from the spec) This extension provides support for viewpoint dependent alignment of geometry, in particular geometry that rotates about a point or a ...
mit
-4,355,365,621,870,238,000
41.860759
83
0.770162
false
firecat53/py-multistatus
plugins/worker.py
1
1861
import psutil from threading import Thread class Worker(Thread): """Worker thread skeleton class. """ def __init__(self, cfg, interval, **kwargs): Thread.__init__(self) self.cfg = cfg self.interval = int(interval) self.daemon = True def _update_queue(self): se...
mit
3,264,540,620,264,844,300
30.542373
79
0.534121
false
timsloan/prometeo-erp
core/auth/admin.py
3
1195
#!/usr/bin/env python # -*- coding: utf-8 -*- """This file is part of the prometeo project. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option...
lgpl-3.0
-3,862,497,090,343,114,000
33.142857
76
0.769038
false
MridulS/sympy
sympy/core/basic.py
4
59519
"""Base class for all the objects in SymPy""" from __future__ import print_function, division from .assumptions import ManagedProperties from .cache import cacheit from .core import BasicType, C from .sympify import _sympify, sympify, SympifyError from .compatibility import (reduce, iterable, Iterator, ordered, st...
bsd-3-clause
-1,768,743,844,078,496,000
31.347283
94
0.521783
false
matt-desmarais/P0Wcrosshair
Book.py
1
1837
addressbook = { 'MAG_ADDRESS': 0x1E, 'ACC_ADDRESS': 0x1E, 'GYR_ADDRESS' : 0x6A, #LSM9DS0 Gyro Registers 'WHO_AM_I_G': 0x0F, 'CTRL_REG1_G': 0x20, 'CTRL_REG2_G': 0x21, 'CTRL_REG3_G': 0x22, 'CTRL_REG4_G': 0x23, 'CTRL_REG5_G': 0x24, 'REFERENCE_G': 0x25, 'STATUS_REG_G': 0x27, 'OUT_X_L_G': 0x28, 'OUT_X_H_G': 0x29, 'OUT_Y_L_...
mit
-1,842,013,110,187,638,800
20.611765
36
0.612956
false
samnashi/howdoflawsgetlonger
Conv1D_LSTM_AuxRegressor.py
1
20107
from __future__ import print_function import numpy as np from random import shuffle import matplotlib.lines as mlines import matplotlib.pyplot as plt import pickle as pkl from keras.models import Sequential, Model, load_model from keras.utils import plot_model from keras.layers import Dense, LSTM, GRU, Flatten, Input, ...
gpl-3.0
-7,266,670,127,247,519,000
56.778736
153
0.618591
false
jimi-c/ansible
lib/ansible/modules/network/aci/aci_interface_selector_to_switch_policy_leaf_profile.py
10
7609
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_...
gpl-3.0
5,042,319,242,676,004,000
29.805668
156
0.635957
false
fp7-netide/Usecases
Usecase1/POX/Application/basic_bridge.py
1
2013
from pox.core import core import pox.openflow.libopenflow_01 as of ETH_ARP = 0x0806 ETH_IP = 0x0800 # Lifetime of rules, in seconds. FLOW_LIFE = 30 """ Everything received at a port is forwarded thru the other. The bridge learns the src ARP address that comes thru each port, so to filter messages doing a loop. ...
epl-1.0
4,620,845,121,418,771,000
26.202703
78
0.700944
false
nikitanovosibirsk/jj
tests/logs/test_simple_formatter.py
1
1188
from unittest.mock import Mock, sentinel import pytest from jj.logs import SimpleFormatter from .._test_utils.steps import given, then, when from ._log_record import TestLogRecord @pytest.fixture() def formatter(): return SimpleFormatter() @pytest.fixture() def record(): return TestLogRecord(sentinel.mes...
apache-2.0
-1,510,866,519,037,399,600
23.244898
96
0.691077
false
steveb/paunch
paunch/tests/test_builder_compose1.py
1
7561
# -*- 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...
apache-2.0
-3,199,082,565,730,056,700
33.525114
79
0.459595
false
gangadharkadam/vlinkerp
erpnext/accounts/doctype/pos_profile/pos_profile.py
23
2364
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import msgprint, _ from frappe.utils import cint from frappe.model.document import Document class POSProfile(Document): def...
agpl-3.0
-314,239,003,495,290,240
32.771429
97
0.686548
false
ro0lz/Stino
stino/pyarduino/base/i18n.py
14
2332
#!/usr/bin/env python #-*- coding: utf-8 -*- # # Documents # """ Documents """ from __future__ import absolute_import from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import glob from . import deco from . import sys_info from . import language_...
mit
-2,367,766,367,153,444,000
28.518987
79
0.590051
false
OpenMOOC/moocng
moocng/courses/security.py
1
5074
# -*- coding: utf-8 -*- # Copyright 2012-2013 UNED # # 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...
apache-2.0
-7,393,958,337,664,639,000
33.753425
142
0.645447
false
100star/h2o
py/testdir_multi_jvm/notest_build_cloud_relaxed.py
9
1284
import unittest, time, sys # not needed, but in case you move it down to subdir sys.path.extend(['.','..','../..','py']) import h2o class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): print "Test cloud building with completio...
apache-2.0
7,457,234,420,988,644,000
29.571429
97
0.591121
false
bdoner/SickRage
sickbeard/show_queue.py
4
26177
# 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,...
gpl-3.0
-8,123,828,560,539,287,000
38.36391
213
0.611147
false
inteos/IBAdmin
utils/Collect/Client.py
1
3095
# -*- coding: UTF-8 -*- # # Copyright (c) 2015-2019 by Inteos Sp. z o.o. # All rights reserved. See LICENSE file for details. # from __future__ import print_function import psycopg2 import psycopg2.extras import lib PARAMS = {} CLIENTS = [] STAT = {} NR = 0 def setparam(cur, param, types, descr, unit, chart, dis...
agpl-3.0
6,708,109,047,721,927,000
31.505263
191
0.584845
false
DanielSBrown/osf.io
website/project/licenses/__init__.py
10
3353
import functools import json import os import warnings from modularodm import fields, Q from modularodm.exceptions import NoResultsFound from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) from website import settings def _serialize(fields, instance): return { field...
apache-2.0
-6,147,909,438,561,658,000
28.156522
99
0.581569
false
petewarden/tensorflow
tensorflow/compiler/tests/bucketize_op_test.py
14
3065
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
8,985,892,302,065,821,000
37.3125
80
0.62447
false
ISIFoundation/influenzanet-website
apps/accounts/forms.py
1
3653
from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.forms import UserCreationForm, UserChangeForm from django.conf import settings from django.contrib.auth.models import User from registration.forms import RegistrationForm from apps.reminder.models import UserRemin...
agpl-3.0
-828,040,422,963,893,800
43.54878
179
0.644128
false
breezjw/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/g77.py
61
2486
"""engine.SCons.Tool.g77 Tool-specific initialization for g77. 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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundatio...
apache-2.0
7,687,149,388,932,123,000
33.054795
95
0.71078
false
childresslab/MicrocavityExp1
hardware/simple_data_acq.py
2
2043
# -*- coding: utf-8 -*- """ Simple data acquisition from serial port. Qudi 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. Qudi is distribu...
gpl-3.0
5,258,174,774,416,298,000
30.430769
90
0.670093
false
duncanmmacleod/gwpy
gwpy/signal/spectral/_scipy.py
3
5371
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
gpl-3.0
7,788,211,428,837,832,000
30.409357
79
0.63936
false
spoki0/AI3
AI3/opencv/sources/modules/ts/misc/xls-report.py
1
15757
#!/usr/bin/env python """ This script can generate XLS reports from OpenCV tests' XML output files. To use it, first, create a directory for each machine you ran tests on. Each such directory will become a sheet in the report. Put each XML file into the corresponding directory. Then, create your ...
mit
-4,614,468,257,560,552,000
41.471698
114
0.584566
false
zaheerm/gst-python
testsuite/test_buffer.py
3
5921
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # gst-python - Python bindings for GStreamer # Copyright (C) 2002 David I. Lehn # Copyright (C) 2004 Johan Dahlin # Copyright (C) 2005 Edward Hervey # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General...
lgpl-2.1
-7,369,971,035,358,484,000
32.264045
74
0.619828
false
canfar/cadcstats
svc_plots/condor.py
1
26090
#!/Users/will/anaconda3/bin/python from elasticsearch import Elasticsearch, TransportError from elasticsearch.helpers import scan from elasticsearch_xpack import XPackClient import requests import pandas as pd import numpy as np import re from ipaddress import IPv4Address as ipv4, AddressValueError import time from bo...
mit
2,742,119,125,383,871,000
27.420479
174
0.524645
false
ramnes/qtile
libqtile/widget/spacer.py
2
2695
# Copyright (c) 2008, 2010 Aldo Cortesi # Copyright (c) 2011 Mounier Florian # Copyright (c) 2012 Tim Neumann # Copyright (c) 2012 Craig Barnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Tycho Andersen # # Permission is hereby granted, free of charge, to any person obtaining a co...
mit
-4,544,435,534,959,907,000
37.5
79
0.682004
false
desmovalvo/virtualsib-part2bis
test/sp2b/python/query.py
1
9410
#!/usr/bin/python # requirements import sys import pygal import getopt import timeit from SIBLib import * # Queries q1 = """PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX bench: <http://localhost/vo...
lgpl-3.0
-6,130,149,182,655,621,000
27.953846
135
0.643464
false
etingof/pyasn1
tests/type/test_useful.py
2
4718
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # import datetime import pickle import sys from copy import deepcopy import unittest from tests.base import BaseTestCase from pyasn1.type import useful class Fix...
bsd-2-clause
-5,369,962,743,174,861,000
33.188406
135
0.688215
false
nathanielvarona/airflow
tests/providers/jenkins/operators/test_jenkins_job_trigger.py
3
12070
# # 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 # "License"); you may not...
apache-2.0
-7,008,159,877,831,536,000
38.061489
107
0.544656
false
sorenk/ansible
test/units/module_utils/urls/test_open_url.py
12
9742
# -*- coding: utf-8 -*- # (c) 2018 Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type import datetime import os from ansible.module_utils.urls import open_url, u...
gpl-3.0
6,766,792,710,714,387,000
30.025478
125
0.675221
false
jenrik/guake
src/guake/about.py
15
1602
# -*- coding: utf-8; -*- """ Copyright (C) 2007-2012 Lincoln de Sousa <lincoln@minaslivre.org> Copyright (C) 2007 Gabriel Falcão <gabrielteratos@gmail.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 Foundat...
gpl-2.0
-3,269,167,323,656,883,700
32.354167
67
0.715178
false
redhatrises/freeipa
ipaserver/install/plugins/update_nis.py
4
3156
# # Copyright (C) 2015 FreeIPA Contributors see COPYING for license # from ipalib.plugable import Registry from ipalib import errors from ipalib import Updater from ipaplatform.paths import paths from ipapython.dn import DN from ipaserver.install import sysupgrade from ipaserver.install.ldapupdate import LDAPUpdate ...
gpl-3.0
3,364,193,865,065,096,700
35.697674
79
0.590938
false
tanglei528/horizon
openstack_dashboard/dashboards/project/networks/ports/tabs.py
8
1493
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 NEC Corporation # # 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 #...
apache-2.0
6,224,038,831,314,055,000
32.931818
78
0.697254
false
TintypeMolly/Yuzuki
resource/reply.py
2
3281
# -*- coding: utf-8 -*- import json from exception import BadRequest, Unauthorized from helper.model_control import get_article, get_reply_page, get_reply,\ delete_reply, edit_reply, create_reply from helper.permission import is_anybody, can_comment, is_author_or_admin,\ is_author from helper.resource import Y...
mit
-9,149,046,863,757,112,000
35.033333
76
0.595128
false
daltonmaag/robofab
Scripts/RoboFabIntro/intro_FoundrySettings.py
9
2906
#FLM: RoboFab Intro, FoundrySettings.plist # # # demo FoundrySettings.plist # # # Setting all the data strings in the FontLab font header can be a repetitive and # tedious exercise. RoboFab to the rescue! RoboFab features some nifty tools # that help automate this process. These tools read a .plist file that you are ...
bsd-3-clause
-2,668,712,273,434,922,000
37.746667
92
0.775981
false
krkhan/azure-linux-extensions
VMEncryption/main/BackupLogger.py
8
1482
#!/usr/bin/env python # # VM Backup extension # # Copyright 2015 Microsoft Corporation # # 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 # # ...
apache-2.0
2,927,821,668,167,324,700
31.173913
78
0.659459
false
tst-ahernandez/earthenterprise
earth_enterprise/src/google/protobuf-py/google/protobuf/internal/type_checkers.py
9
12112
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
apache-2.0
4,025,457,730,975,738,000
41.498246
80
0.748844
false
ProstoMaxim/incubator-airflow
airflow/ti_deps/deps/valid_state_dep.py
44
2218
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-4,903,598,234,940,261,000
36.59322
90
0.658702
false
mattvonrocketstein/smash
smashlib/ipy3x/core/inputsplitter.py
1
24256
"""Input handling and transformation machinery. The first class in this module, :class:`InputSplitter`, is designed to tell when input from a line-oriented frontend is complete and should be executed, and when the user should be prompted for another line of code instead. The name 'input splitter' is largely for histor...
mit
4,596,734,243,576,576,500
34.10275
91
0.583155
false
galaxy001/monkey-videos
build/build.py
6
1309
#!/usr/bin/env python3 import os handlers = [ '56.js', 'acfun.js', 'bilibili.js', 'cntv.js', 'funshion.js', 'ifeng.js', 'iqiyi.js', 'letv.js', 'justing.js', 'ku6.js', 'netease.js', 'pps.js', 'sina.js', 'sohu.js', 'tucao.js', 'tudou.js', 'wasu.js', ...
gpl-3.0
6,570,973,924,532,993,000
21.964912
63
0.514133
false
nishantjr/pjproject
tests/pjsua/mod_media_playrec.py
40
2921
# $Id$ # PLAYFILE -> RECFILE: # Input file is played and is recorded to output, then compare them. # Useful to tes clock rates compatibility and resample quality # null-audio # port 1: wav file input xxxxxx.clock_rate.wav, e.g: test1.8.wav # port 2: wav file ouput xxxxxx.clock_rate.wav, e.g: res1.8.wav # wav input mus...
gpl-2.0
-6,874,661,052,290,806,000
26.046296
102
0.709688
false
anusornc/vitess
py/vtdb/vtdb_logger.py
7
3102
# Copyright 2014, 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. import logging # VtdbLogger's methods are called whenever something worth noting happens. # The default behavior of the class is to log using the logging module. # ...
bsd-3-clause
8,214,899,324,859,678,000
34.25
92
0.720503
false
shiminasai/ciat_plataforma
guias_cacao/migrations/0009_auto__add_actividadescierre__add_cierremanejo2__add_cierreplaga2__add_.py
3
113662
# -*- 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 'ActividadesCierre' db.create_table(u'guias_cacao_activida...
mit
-1,066,311,567,676,605,200
68.903444
156
0.560064
false
flixcloud/flix_cloud-python
FlixCloud.py
1
13916
""" FlixCloud API Python Library Version: 0.2 Author: Pawel Markowski <pawmar@gmail.com> """ import xml.dom.minidom import httplib def xml_str(doc, tag, parentTag=None, debug=False): """Returns string from xml document from tag (and parentTag)""" if parentTag: try: el = doc.getElementsByT...
mit
-7,951,541,377,709,118,000
34.958656
80
0.56374
false
ellipsis14/dolfin-adjoint
dolfin_adjoint/adjglobals.py
1
3176
import coeffstore import expressions import caching import libadjoint from dolfin_adjoint import backend if backend.__name__ == "dolfin": import lusolver # Create the adjointer, the central object that records the forward solve # as it happens. adjointer = libadjoint.Adjointer() mem_checkpoints = set() disk_checkpo...
lgpl-3.0
133,383,022,570,906,910
31.742268
101
0.729534
false
michele-mada/cv-eyetracking-project-2017
py_eyetracker_v1.0/utils/histogram/iif.py
1
1085
from math import exp, sqrt import numpy as np from utils.histogram.cl_run_iif import CL_IIF, CL_IIF_BINID from utils.histogram.lsh import num_bins def illumination_invariant_features_hybrid(image, histogram, k=0.1, debug_ax=None): width, height, nbins = np.shape(histogram) fast_binid = CL_IIF_BINID() fas...
mit
-2,282,565,088,396,295,200
28.351351
83
0.645161
false
yterauchi/primecloud-controller
auto-tool/auto-cli/lib/common/CommonUtils.py
5
15572
# -*- coding: utf-8 -*- import subprocess import sys import re import os import json import glob import socket from urlparse import urlparse from ArgumentManager import ArgumentManager from db.MysqlConnector import MysqlConnector from ast import literal_eval from sqlalchemy.sql.expression import and_ def checkDbConnec...
gpl-2.0
-4,635,138,895,080,776,000
28.388235
197
0.602682
false
Jeff-Tian/mybnb
Python27/Lib/bsddb/test/test_sequence.py
3
5410
import unittest import os from test_all import db, test_support, get_new_environment_path, get_new_database_path class DBSequenceTest(unittest.TestCase): def setUp(self): self.int_32_max = 0x100000000 self.homeDir = get_new_environment_path() self.filename = "test" se...
apache-2.0
-9,132,995,850,701,812,000
37.779412
86
0.597412
false
rimbalinux/MSISDNArea
django/contrib/sessions/middleware.py
3
1931
import time from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date from django.utils.importlib import import_module class SessionMiddleware(object): def process_request(self, request): engine = import_module(settings.SESSION_EN...
bsd-3-clause
7,323,104,570,838,352,000
42.906977
79
0.584671
false
MartinHjelmare/home-assistant
homeassistant/components/google_assistant/trait.py
1
42398
"""Implement the Google Smart Home traits.""" import logging from homeassistant.components import ( binary_sensor, camera, cover, group, fan, input_boolean, media_player, light, lock, scene, script, switch, vacuum, ) from homeassistant.components.climate import const...
apache-2.0
-8,771,102,119,974,407,000
33.895473
79
0.573329
false
konradcybulski/GameTheory1041
Python_Resources/InstanceVariables.py
1
1919
""" @author Konrad Cybulski @since 14/09/2016 @modified 14/09/2016 """ import numpy as np class InstanceVariables: def __init__(self, runs, generations, population_size, mutation_rate, execution_error, reputation_assignment_error, private_assessment_error, reputation_update_rate, ...
gpl-3.0
5,178,484,987,363,511,000
41.644444
109
0.665451
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/_operator.py
1
11985
# encoding: utf-8 # module _operator # from (built-in) # by generator 1.135 """ Operator interface. This module exports a set of functions implemented in C corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. The function names are those used for sp...
gpl-2.0
-966,062,011,599,680,600
29.809769
101
0.585982
false
ZhangAustin/deepy
deepy/layers/recurrent.py
3
6446
#!/usr/bin/env python # -*- coding: utf-8 -*- from . import NeuralLayer from deepy.utils import build_activation, FLOATX import numpy as np import theano import theano.tensor as T from collections import OrderedDict OUTPUT_TYPES = ["sequence", "one"] INPUT_TYPES = ["sequence", "one"] class RNN(NeuralLayer): """ ...
mit
2,185,468,890,153,826,000
40.057325
129
0.581601
false
ChristosChristofidis/twitter_nlp
python/chunk_tagger_stdin.py
9
2094
#!/usr/bin/python import sys import os import re import subprocess import time from signal import * #BASE_DIR = '/home/aritter/twitter_nlp' #BASE_DIR = os.environ['HOME'] + '/twitter_nlp' #BASE_DIR = '/homes/gws/aritter/twitter_nlp' BASE_DIR = 'twitter_nlp.jar' if os.environ.has_key('TWITTER_NLP'): BASE_DIR = o...
gpl-3.0
879,652,631,219,626,800
31.215385
199
0.579274
false
DennyZhang/devops_public
python/java_tool/java_analyze.py
3
6390
#!/usr/bin/python ##------------------------------------------------------------------- ## File : java_analyze.py ## Description : ## -- ## Created : <2017-01-25> ## Updated: Time-stamp: <2017-07-18 10:18:59> ##------------------------------------------------------------------- import sys, os import argparse import req...
mit
-6,139,812,882,418,273,000
42.175676
104
0.586228
false
tcpcloud/openvstorage
ovs/extensions/storage/volatile/dummystore.py
1
3090
# Copyright 2014 Open vStorage NV # # 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 writ...
apache-2.0
2,469,989,809,427,970,600
25.637931
76
0.530744
false
dchaplinsky/declarations.com.ua
declarations_site/spotter/management/commands/runsearchtasks.py
1
2812
import logging from time import time from threading import Lock, get_ident from concurrent.futures import ThreadPoolExecutor from django.core.management.base import BaseCommand from spotter.models import SearchTask from spotter.utils import do_search, create_report, create_notify logger = logging.getLogger(__name__)...
mit
-3,874,970,097,778,877,400
34.594937
101
0.610242
false
nyalldawson/QGIS
tests/src/python/test_qgsprojectbadlayers.py
15
15588
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsProject bad layers handling. .. note:: 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...
gpl-2.0
3,818,613,502,525,002,000
43.664756
186
0.629779
false
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/site-packages/dask/array/tests/test_array_core.py
2
110011
from __future__ import absolute_import, division, print_function import copy import pytest np = pytest.importorskip('numpy') import os import sys import time from distutils.version import LooseVersion import operator from operator import add, sub, getitem from threading import Lock import warnings from toolz import ...
gpl-3.0
8,126,485,098,563,362,000
29.306061
94
0.520393
false
TaskEvolution/Task-Coach-Evolution
taskcoach/tests/unittests/thirdPartySoftwareTests/APSchedulerTest.py
1
1826
''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
gpl-3.0
-2,661,469,799,451,025,000
36.265306
119
0.708105
false
clouserw/zamboni
sites/stage/settings_mkt.py
1
5626
"""private_mkt will be populated from puppet and placed in this directory""" from mkt.settings import * # noqa from settings_base import * # noqa import private_mkt DOMAIN = 'marketplace.allizom.org' SERVER_EMAIL = 'zmarketplacestage@addons.mozilla.org' DOMAIN = "marketplace.allizom.org" SITE_URL = 'https://marke...
bsd-3-clause
5,491,280,167,152,898,000
31.709302
180
0.724849
false
h4ck3rm1k3/pywikibot-core
pywikibot/xmlreader.py
3
6434
# -*- coding: utf-8 -*- """ XML reading module. Each XmlEntry object represents a page, as read from an XML source The XmlDump class reads a pages_current XML dump (like the ones offered on https://dumps.wikimedia.org/backup-index.html) and offers a generator over XmlEntry objects which can be used by other bots. ""...
mit
6,881,866,051,588,237,000
32.863158
78
0.587193
false
ooici/marine-integrations
mi/dataset/driver/mflm/dosta/driver.py
1
6129
""" @package mi.dataset.driver.mflm.dosta.driver @file marine-integrations/mi/dataset/driver/mflm/dosta/driver.py @author Emily Hahn @brief Driver for the mflm_dosta Release notes: initial release """ __author__ = 'Emily Hahn' __license__ = 'Apache 2.0' import string from mi.core.common import BaseEnum from mi.core...
bsd-2-clause
1,925,026,545,317,230,000
38.541935
117
0.640561
false
r-mibu/ceilometer
ceilometer/tests/network/services/test_vpnaas.py
11
7391
# # Copyright 2014 Cisco Systems,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 writ...
apache-2.0
5,796,234,400,559,251,000
41.234286
77
0.575159
false
secynic/nfsinkhole
nfsinkhole/iptables.py
1
13411
# Copyright (c) 2016-2017 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and...
bsd-2-clause
5,636,203,261,590,857,000
36.356546
79
0.575498
false
JPJPJPOPOP/zulip
zerver/webhooks/helloworld/tests.py
37
1526
# -*- coding: utf-8 -*- from typing import Text from zerver.lib.test_classes import WebhookTestCase class HelloWorldHookTests(WebhookTestCase): STREAM_NAME = 'test' URL_TEMPLATE = "/api/v1/external/helloworld?&api_key={api_key}" FIXTURE_DIR_NAME = 'hello' # Note: Include a test function per each disti...
apache-2.0
-4,778,303,683,667,878,000
48.225806
179
0.651376
false
akash1808/nova
nova/tests/unit/virt/test_block_device.py
11
36872
# 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 agreed to in...
apache-2.0
6,771,117,812,992,498,000
41.381609
79
0.554649
false
ngokevin/zamboni
mkt/downloads/views.py
1
1434
from django import http from django.shortcuts import get_object_or_404 import commonware.log import amo from amo.utils import HttpResponseSendFile from mkt.access import acl from mkt.files.models import File from mkt.site.decorators import allow_cross_site_request from mkt.webapps.models import Webapp log = commonw...
bsd-3-clause
-5,565,101,115,594,177,000
33.97561
78
0.663877
false
ghchinoy/tensorflow
tensorflow/python/keras/layers/noise.py
7
6944
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
1,387,097,785,866,963,700
32.708738
109
0.691388
false
jyeatman/dipy
doc/examples/sfm_reconst.py
9
5785
""" .. _sfm-reconst: ============================================== Reconstruction with the Sparse Fascicle Model ============================================== In this example, we will use the Sparse Fascicle Model [Rokem2014]_, to reconstruct the fiber orientation distribution function (fODF) in every voxel. First...
bsd-3-clause
176,874,845,774,013,950
32.439306
111
0.700605
false
agoraplex/platform
docs/conf.py
1
9043
# -*- coding: utf-8 -*- # # Agoraplex Platform documentation build configuration file, created by # sphinx-quickstart2 on Fri Jan 11 20:37:25 2013. # # 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 f...
bsd-3-clause
-5,002,838,928,667,051,000
31.883636
126
0.704744
false
ABcDexter/python-weka-wrapper
python/weka/core/converters.py
2
11100
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # b...
gpl-3.0
-3,305,952,681,374,735,000
37.811189
112
0.642252
false
dawran6/zulip
contrib_bots/bots/googlesearch/googlesearch.py
8
2823
# See zulip/contrib_bots/lib/readme.md for instructions on running this code. from __future__ import print_function import logging import http.client from six.moves.urllib.request import urlopen # Uses the Google search engine bindings # pip install --upgrade google from google import search def get_google_result(s...
apache-2.0
-3,737,393,330,933,600,000
31.825581
78
0.581651
false
kaifabian/lana-dashboard
lana_dashboard/lana_data/models/autonomous_system.py
1
1459
from django.db import models from django.db.models import Q from django.utils.translation import ugettext_lazy as _, ungettext_lazy from lana_dashboard.lana_data.models.institution import Institution class AutonomousSystem(models.Model): as_number = models.BigIntegerField(unique=True, verbose_name=_("AS Number")) ...
agpl-3.0
-8,018,120,222,579,425,000
38.432432
111
0.747772
false
sgiavasis/C-PAC
CPAC/GUI/interface/windows/config_window.py
1
38458
import wx from CPAC.GUI.interface.utils.constants import substitution_map import pkg_resources as p from CPAC.GUI.interface.pages import WorkflowConfig, Motion, AnatomicalPreprocessing, \ DerivativesConfig, Segmentation, Registration, FunctionalPreProcessing,\ MotionOptions, Scrubbing, AnatToFuncRegistration, ...
bsd-3-clause
7,788,789,616,095,713,000
36.337864
129
0.483228
false
mweisman/QGIS
python/plugins/processing/admintools/AdminToolsAlgorithmProvider.py
4
2875
# -*- coding: utf-8 -*- """ *************************************************************************** AdminToolsAlgorithmProvider.py --------------------- Date : October 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********...
gpl-2.0
-8,173,116,093,009,160,000
33.638554
75
0.577739
false
uwescience/raco
examples/sp2bench/sp2bench_rdf_brackets.py
1
8029
from emitcode import emitCode import raco.algebra as algebra from raco.language import CCAlgebra, GrappaAlgebra import logging logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger(__name__) tr = "sp2bench_1m" queries = {} queries['Q1'] = """A(yr) :- %(tr)s(journal, '<http://www.w3.org/1999/02/22-rdf-synt...
bsd-3-clause
6,690,524,987,756,424,000
60.290076
204
0.567318
false
valdecdev/odoo
addons/fetchmail/fetchmail.py
1
14764
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import time from imaplib import IMAP4 from imaplib import IMAP4_SSL from poplib import POP3 from poplib import POP3_SSL try: import cStringIO as StringIO except ImportError: import StringIO import...
agpl-3.0
7,128,425,773,505,944,000
48.878378
195
0.519236
false
yamt/tempest
tempest/api/orchestration/stacks/test_neutron_resources.py
5
8944
# 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 # d...
apache-2.0
9,194,123,329,594,989,000
45.583333
79
0.621758
false
hasecbinusr/pysal
pysal/spreg/diagnostics_sp.py
9
22185
""" Spatial diagnostics module """ __author__ = "Luc Anselin luc.anselin@asu.edu, Daniel Arribas-Bel darribas@asu.edu" from utils import spdot from scipy.stats.stats import chisqprob from scipy.stats import norm import numpy as np import numpy.linalg as la __all__ = ['LMtests', 'MoranRes', 'AKtest'] class LMtests: ...
bsd-3-clause
-4,186,144,807,814,660,600
27.333333
121
0.543791
false
SivilTaram/edx-platform
common/lib/xmodule/xmodule/seq_module.py
30
12026
""" xModule implementation of a learning sequence """ # pylint: disable=abstract-method import json import logging import warnings from lxml import etree from xblock.core import XBlock from xblock.fields import Integer, Scope, Boolean from xblock.fragment import Fragment from pkg_resources import resource_string f...
agpl-3.0
-7,704,655,475,082,857,000
34.370588
117
0.591385
false
evolvIQ/iqserialization
PerformanceTest/generate-test-data.py
1
2026
import json,xmlrpclib import random import sys def random_object(maxdepth=1): choices = [random_double, random_int, random_bool, random_string, lambda:None] if maxdepth > 0: for i in range(1,4): choices.append(lambda:random_object(maxdepth-i)) return random.choice(choices)() def ra...
apache-2.0
-2,748,689,251,981,267,500
30.184615
104
0.568115
false
leeseuljeong/leeseulstack_neutron
neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py
17
1377
# Copyright 2013 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 applicable law ...
apache-2.0
374,444,057,740,654,400
25.480769
78
0.705156
false
NMGRL/pychron
pychron/applications/pydiode.py
2
1412
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
apache-2.0
4,916,240,546,597,766,000
39.342857
81
0.572946
false
klmitch/appathy
appathy/types.py
1
5024
# Copyright (C) 2012 by Kevin L. Mitchell <klmitch@mit.edu> # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This p...
gpl-3.0
806,268,398,094,400,000
31.623377
72
0.669586
false
MisterPup/OpenStack-Neat-Ceilometer
tests/locals/overload/mhod/test_multisize_estimation.py
5
35207
# Copyright 2012 Anton Beloglazov # # 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 writ...
apache-2.0
8,894,116,129,880,409,000
39.607843
77
0.292158
false
arakcheev/python-data-plotter
parkerWind/old/wind.py
1
1123
import math import params MASS = params.STAR_MASS accuracy = params.accuracy # Radius in cm def sonic_radius(t): return 2.0e11 * 2e6 / t * MASS # Sound speed in km/s def sound_speed(t): return 180 * math.sqrt(t / 2.0e6) def right_part(r, t): rs = sonic_radius(t) return 4.0 * math.log(1.0 * r / r...
mit
-659,596,711,728,893,400
16.276923
58
0.508459
false
congma/pypar
examples/MPIMapReducer.py
2
6166
""" MapReduce-over-MPI sample Run as (as exsample) mpirun -np 2 python MPIMapReducer.py (perhaps try number of processors more than 2) GPC JAN 2013 """ import sys try: import numpy except: raise Exception, 'Module numpy must be present to run pypar' try: import pypar except: raise E...
gpl-3.0
8,002,693,074,652,983,000
33.066298
156
0.570224
false
gojira/tensorflow
tensorflow/contrib/opt/python/training/adamax_test.py
13
14685
# 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
-4,885,842,497,378,936,000
40.957143
80
0.598434
false
nekulin/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/idlelib/CallTips.py
50
7587
"""CallTips.py - An IDLE Extension to Jog Your Memory Call Tips are floating windows which display function, class, and method parameter and docstring information when you type an opening parenthesis, and which disappear when you type a closing parenthesis. """ import re import sys import types import CallTipWindow ...
apache-2.0
-1,792,947,935,949,947,100
33.330317
79
0.534599
false
Hasimir/brython
scripts/make_VFS.py
1
2495
# -*- coding: utf-8 -*- import json import os import re import python_minifier def process(filename, exclude_dirs=['test','site-packages']): """Process a VFS filename for Brython.""" print("Generating {}".format(filename)) nb = 0 nb_err = 0 main_root = os.path.dirname(filename) VFS = {} f...
bsd-3-clause
192,025,640,154,851,200
33.652778
78
0.467735
false