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
schleichdi2/OPENNFR-6.1-CORE
bitbake/lib/progressbar/progressbar.py
4
9761
# -*- coding: utf-8 -*- # # progressbar - Text progress bar library for Python. # Copyright (c) 2005 Nilton Volpato # # (With some small changes after importing into BitBake) # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publ...
gpl-2.0
-1,338,258,793,376,158,700
29.987302
79
0.599016
false
JustArchi/program-y
src/programy/parser/pattern/graph.py
2
8714
""" Copyright (c) 2016 Keith Sterling 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, distribute,...
mit
7,993,137,384,959,305,000
39.342593
126
0.648956
false
martinarjovsky/WassersteinGAN
main.py
1
11048
from __future__ import print_function import argparse import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torchvision.util...
bsd-3-clause
-8,573,831,644,375,906,000
44.652893
169
0.572773
false
tombstone/models
official/nlp/xlnet/run_squad.py
1
12035
# 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...
apache-2.0
2,555,048,123,759,506,400
38.588816
80
0.645201
false
dordyan/tls-monitoring
multiThreadedSending.py
1
2992
import subprocess import multiprocessing import logging import time import indexCreation import signal from random import * from jsonSending import flatJsonEl, sendToElastic, stringToJson, loadDefaultIndex SLEEP_TIME = 10 CALL_BACK_CALLED = False def callBackFunc(t): global CALL_BACK_CALLED CALL_BACK_CALLED...
gpl-3.0
836,660,369,670,225,000
33
109
0.603275
false
5y/kivy
kivy/lib/ddsfile.py
46
12300
''' DDS File library ================ This library can be used to parse and save DDS files. The initial version have been done by:: Alexey Borzenkov (snaury@gmail.com) All the initial work credits is going to him ! Thanks you :) This version is written without using ctypes, cause Kivy doesn't have ctypes supp...
mit
4,849,936,847,234,177,000
28.927007
80
0.52374
false
mstreatfield/anim-studio-tools
review_tool/sources/reviewTool/gui/widgets/contextwidget/contextitem.py
5
2730
## # \namespace reviewTool.gui.widgets.contextwidget.contextitem # # \remarks [desc::commented] # # \author Dr. D Studios # \date 08/08/11 # from PyQt4.QtCore import QSize from PyQt4.QtGui import QApplication,\ QTreeWidgetItem from .contextentity...
gpl-3.0
5,465,894,196,012,839,000
30.022727
81
0.547985
false
trishnaguha/ansible
lib/ansible/modules/web_infrastructure/nginx_status_facts.py
17
4924
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-7,986,477,325,581,558,000
29.955975
156
0.645063
false
NINAnor/QGIS
python/plugins/processing/algs/gdal/GridInvDist.py
11
5347
# -*- coding: utf-8 -*- """ *************************************************************************** GridInvDist.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *************...
gpl-2.0
-5,639,254,277,438,270,000
44.700855
103
0.551898
false
JonasSC/SuMPF
tests/tests/_data/_signals/test_signal_convolution.py
1
21185
# This file is a part of the "SuMPF" package # Copyright (C) 2018-2021 Jonas Schulte-Coerne # # 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 ...
lgpl-3.0
-6,537,465,826,609,021,000
61.863501
168
0.674581
false
SimonRamstedt/ezex
ezex/dashboard.py
1
5937
import matplotlib matplotlib.use("Agg") import warnings warnings.filterwarnings("ignore", module="matplotlib") from IPython.display import display from ipywidgets import widgets import signal import matplotlib.pyplot as plt import time import thread import tensorboard import numpy as np from tensorboard import Tenso...
mit
4,220,076,874,296,677,000
24.268085
138
0.546909
false
pczerkas/aodh
aodh/tests/storage/test_get_connection.py
2
3371
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2015 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 # # Un...
apache-2.0
-2,856,901,759,262,957,600
36.455556
78
0.63809
false
scopatz/Bright-lite
install.py
2
8654
#! /usr/bin/env python from __future__ import print_function, unicode_literals import os import sys import tarfile import platform import subprocess import shutil import io if sys.version_info[0] < 3: from urllib import urlopen else: from urllib.request import urlopen try: import argparse as ap except Impo...
bsd-3-clause
-2,075,006,524,233,527,300
38.515982
109
0.588283
false
stevewardle/rose
sphinx/ext/script_include.py
4
2062
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (C) 2012-2019 British Crown (Met Office) & Contributors. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under t...
gpl-3.0
8,025,571,342,219,896,000
35.821429
79
0.645975
false
fishilico/shared
windows/database_libraries/update_database.py
1
21296
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- # Copyright (c) 2020 Nicolas Iooss # # 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...
mit
-5,401,704,661,975,986,000
45.804396
111
0.543717
false
nojhan/weboob-devel
modules/mangafox/module.py
7
1479
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Noé Rubinstein # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
agpl-3.0
-3,247,803,241,937,255,400
41.228571
105
0.679296
false
tectronics/nyctos
src/data.res/scripts/rooms/trollden.py
1
1361
import parole from parole.colornames import colors from parole.display import interpolateRGB import pygame, random import sim, main from util import * from dungeon import makeFloor, Room, TemplateRoom import dungeon template = \ """ ############################### ## # # ## ## # ##### ##### #### ...
gpl-2.0
8,936,822,870,174,692,000
23.303571
78
0.484938
false
sunqm/pyscf
pyscf/gto/basis/parse_nwchem.py
1
13409
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
apache-2.0
4,682,104,300,129,427,000
31.704878
94
0.526065
false
pravisankar/python-solumclient
solumclient/builder/client.py
1
1365
# Copyright 2014 - Noorul Islam K M # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
8,043,536,850,224,060,000
36.916667
75
0.698901
false
msfernandes/anato-hub
authentication/features/steps/login.py
1
1783
# -*- coding: utf-8 -*- import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "anato.settings") from behave import given, when, then from selenium import webdriver from should_dsl import should, should_not @given(u'que o usuario acessa a url "{url}" e aparece a tela de login') def accessing_the_system(context, u...
mit
-7,248,553,602,570,134,000
30.280702
71
0.696018
false
Emercoin/emercoin
qa/rpc-tests/p2p-leaktests.py
41
5937
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test...
gpl-3.0
-5,158,401,983,889,325,000
39.944828
150
0.6825
false
gborri/SickRage
sickrage/core/nameparser/show.py
1
1820
# Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # # 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, or # (at your...
gpl-3.0
-829,648,196,904,774,300
26.575758
70
0.605495
false
sestrella/ansible
lib/ansible/modules/cloud/scaleway/_scaleway_snapshot_facts.py
14
3039
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane <yanis+ansible@guenane.org> # 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_version':...
gpl-3.0
3,701,466,844,383,188,500
26.133929
100
0.636723
false
canglade/NLP
storage/cloud-client/notification_polling.py
4
4142
#!/usr/bin/env python # 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 ...
apache-2.0
-2,905,199,260,680,260,600
34.401709
79
0.687591
false
bowlofstew/packages
archlinux/archpack_generator.py
2
4457
import archpack_settings import hashlib , urllib.request import sys # # Module for automatic generation of an AUR package for biicode # # To generate such package, a template PKGBUILD file (PKGBUILD_tenplate) is # provided, with tags of the form <TAGS> specifying certain settings and # metadata needed by the package s...
bsd-2-clause
-4,838,679,230,587,024,000
30.167832
91
0.695759
false
spesmilo/electrum
electrum/scripts/block_headers.py
1
1034
#!/usr/bin/env python3 # A simple script that connects to a server and displays block headers import time import asyncio from electrum.network import Network from electrum.util import print_msg, json_encode, create_and_start_event_loop, log_exceptions from electrum.simple_config import SimpleConfig config = SimpleC...
mit
8,057,152,137,748,668,000
26.210526
99
0.715667
false
opsdroid/opsdroid
opsdroid/_version.py
3
18480
# pylint: skip-file # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # ...
apache-2.0
8,261,087,373,806,261,000
32.11828
88
0.574459
false
RCOS-Grading-Server/HWserver
migration/tests/test_db.py
2
3165
import shutil import tempfile import unittest import migrator.db class TestDb(unittest.TestCase): def test_no_driver(self): with self.assertRaises(RuntimeError): migrator.db.Database({}, 'system') def test_invalid_driver(self): with self.assertRaises(RuntimeError): mig...
bsd-3-clause
-8,882,527,221,062,701,000
35.37931
92
0.575355
false
esthermm/odoo-addons
mrp_routing_cost/models/mrp_workcenter.py
1
6237
# -*- coding: utf-8 -*- # © 2016 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import api, fields, models from openerp.addons import decimal_precision as dp class MrpProductionWorkcenterLine(models.Model): _inherit = 'mrp.production.workcenter.line' ...
agpl-3.0
-3,816,111,438,310,628,400
40.573333
79
0.612893
false
laurentgo/arrow
python/pyarrow/tests/test_dataset.py
1
72735
# 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 u...
apache-2.0
8,966,445,009,112,606,000
33.228235
79
0.631787
false
marcelometal/pyvows
pyvows/runner/utils.py
1
1825
# -*- coding: utf-8 -*- '''Utility functions for all implementations of pyvows.runner. ''' import os.path as path #------------------------------------------------------------------------------------------------- def get_code_for(obj): # FIXME: Add Comment description code = None if hasattr(obj, '__co...
mit
-4,915,349,941,896,886,000
23.662162
98
0.567671
false
jwlawson/tensorflow
tensorflow/python/data/kernel_tests/filter_dataset_op_test.py
14
5855
# Copyright 2017 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
-555,619,580,180,054,200
35.36646
80
0.635696
false
theanalyst/cinder
cinder/volume/drivers/netapp/iscsi.py
1
66466
# Copyright (c) 2012 NetApp, Inc. # Copyright (c) 2012 OpenStack Foundation # 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/l...
apache-2.0
6,516,517,475,579,403,000
41.936693
79
0.554163
false
wasn-lab/visual-positioning
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/f77.py
34
2054
"""engine.SCons.Tool.f77 Tool-specific initialization for the generic Posix f77 Fortran compiler. 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, 2...
apache-2.0
3,906,918,171,333,421,600
32.129032
95
0.745375
false
ajylee/gpaw-rtxs
doc/install/Linux/Niflheim/el5-xeon-gcc43-acml-4.3.0.py
3
1148
scalapack = True compiler = 'gcc43' libraries = [ 'gfortran', 'scalapack', 'mpiblacsF77init', 'mpiblacs', 'scalapack', 'acml', 'mpi', 'mpi_f77' ] library_dirs = [ '/opt/openmpi/1.3.3-1.el5.fys.gfortran43.4.3.2/lib64', '/opt/acml/4.3.0/gfortran4364/lib', '/opt/blacs/1.1/24.el5.fys.gfortran43....
gpl-3.0
-5,218,069,280,643,732,000
43.153846
102
0.647213
false
coded-by-hand/mass
env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/req.py
7
64177
import sys import os import shutil import re import zipfile import pkg_resources import tempfile from pip.locations import bin_py, running_under_virtualenv from pip.exceptions import InstallationError, UninstallationError from pip.vcs import vcs from pip.log import logger from pip.util import display_path, rmtree from ...
bsd-2-clause
3,217,298,952,200,131,600
41.985265
156
0.536579
false
washort/zamboni
mkt/search/indexers.py
11
17814
import logging import sys from django.conf import settings import elasticsearch from celery import task from elasticsearch import helpers from elasticsearch_dsl import Search import mkt from lib.es.models import Reindexing from lib.post_request_task.task import task as post_request_task from mkt.constants.regions im...
bsd-3-clause
6,077,899,478,934,564,000
33.257692
79
0.560009
false
llhe/tensorflow
tensorflow/python/summary/writer/writer_cache.py
75
1987
# 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
-331,998,916,510,894,460
31.048387
80
0.683946
false
yuanzhao/gpdb
src/test/tinc/tinctest/discovery.py
12
13392
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
apache-2.0
-6,761,415,620,185,492,000
40.079755
143
0.635081
false
mariokostelac/ra
.ycm_extra_conf.py
1
2496
import os import ycm_core from clang_helpers import PrepareClangFlags # Set this to the absolute path to the folder (NOT the file!) containing the # compile_commands.json file to use that instead of 'flags'. See here for # more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html # Most projects will NOT n...
gpl-3.0
-1,568,782,254,473,104,000
29.439024
79
0.629808
false
jianghuaw/nova
nova/api/auth.py
4
3564
# Copyright (c) 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
7,230,437,164,353,476,000
32.622642
79
0.660774
false
juergenhamel/cuon
cuon_server/LoadBalancer/txlb/proxy.py
6
8042
from twisted.internet import error from twisted.internet import reactor from twisted.internet import protocol from txlb import logging class TrackerMixin(object): """ This is a simple class for setting the tracker attribute, something that is necessary when switching the active group. """ def se...
gpl-3.0
3,852,022,789,802,457,600
30.170543
79
0.61241
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/sandbox/rls.py
4
5141
"""Restricted least squares from pandas License: Simplified BSD """ import numpy as np from statsmodels.regression.linear_model import WLS, GLS, RegressionResults class RLS(GLS): """ Restricted general least squares model that handles linear constraints Parameters ---------- endog: array-like ...
apache-2.0
8,687,080,645,250,771,000
32.822368
114
0.579848
false
embray/numpy
numpy/lib/index_tricks.py
16
25867
from __future__ import division, absolute_import, print_function __all__ = ['ravel_multi_index', 'unravel_index', 'mgrid', 'ogrid', 'r_', 'c_', 's_', 'index_exp', 'ix_', 'ndenumerate', 'ndindex', 'fill_diagonal', 'diag_indices', 'diag_indices...
bsd-3-clause
-8,365,189,799,060,540,000
29.467609
81
0.533112
false
sheagcraig/sal
server/plugins/munkiinfo/munkiinfo.py
2
3841
import re import urllib.parse from django.db.models import Count, F, Q from django.http import Http404 import sal.plugin REPORT_Q = Q(pluginscriptsubmission__plugin='MunkiInfo') DATA_F = F('pluginscriptsubmission__pluginscriptrow__pluginscript_data') DATA = 'pluginscript_data' URLS = ('SoftwareRepo', 'Package', 'Ma...
apache-2.0
8,542,418,655,505,241,000
35.580952
99
0.615725
false
FUSED-Wind/fusedwind
src/fusedwind/plant_flow/basic_aep.py
1
12894
""" aep_csm_component.py Created by NWTC Systems Engineering Sub-Task on 2012-08-01. Copyright (c) NREL. All rights reserved. """ import numpy as np from openmdao.main.api import Component, Assembly, set_as_top, VariableTree from openmdao.main.datatypes.api import Int, Bool, Float, Array, VarTree from fusedwind.lib...
apache-2.0
2,126,830,884,269,281,500
37.375
137
0.629673
false
hwangjt/SMT
smt/problems/tensor_product.py
1
2075
""" Author: Dr. John T. Hwang <hwangjt@umich.edu> This package is distributed under New BSD license. Tensor-product of cos, exp, or tanh. """ from __future__ import division import numpy as np from smt.problems.problem import Problem class TensorProduct(Problem): def _initialize(self): self.options.dec...
bsd-3-clause
5,396,358,938,008,468,000
30.923077
79
0.499277
false
JackDanger/sentry
tests/sentry/api/endpoints/test_organization_repositories.py
4
1459
from __future__ import absolute_import import six from django.core.urlresolvers import reverse from sentry.models import Repository from sentry.testutils import APITestCase class OrganizationRepositoriesListTest(APITestCase): def test_simple(self): self.login_as(user=self.user) org = self.crea...
bsd-3-clause
7,456,430,513,813,714,000
30.717391
84
0.651131
false
ArmsZhou/RaspberryCarClient_iOS
PythonServer/google/protobuf/__init__.py
14
1890
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
mit
-7,661,427,574,199,071,000
47.461538
72
0.756614
false
ajoshpratt/westpa
lib/wwmgr/work_managers/__init__.py
3
2175
# Copyright (C) 2013 Matthew C. Zwier and Lillian T. Chong # # This file is part of WESTPA. # # WESTPA 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...
gpl-3.0
4,397,828,317,553,402,000
33.52381
75
0.747586
false
espressopp/espressopp
src/analysis/LBOutputVzInTime.py
1
2391
# Copyright (C) 2012-2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008-2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the GNU General...
gpl-3.0
-1,249,811,740,564,874,000
38.196721
112
0.731911
false
uranusjr/django
django/forms/models.py
2
56000
""" Helper functions for creating Form classes from Django models and database field objects. """ from collections import OrderedDict from itertools import chain from django.core.exceptions import ( NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError, ) from django.forms.fields import ChoiceField,...
bsd-3-clause
-8,641,371,848,083,704,000
40.237113
116
0.584268
false
mheap/ansible
lib/ansible/modules/network/f5/bigip_monitor_tcp_echo.py
17
15634
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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_version': '1.1', ...
gpl-3.0
8,490,944,456,108,816,000
29.416342
92
0.600614
false
pratapvardhan/pandas
pandas/tests/indexes/datetimes/test_tools.py
2
67955
""" test to_datetime """ import pytz import pytest import locale import calendar import dateutil import numpy as np from dateutil.parser import parse from datetime import datetime, time from distutils.version import LooseVersion import pandas as pd from pandas._libs import tslib from pandas._libs.tslibs import parsin...
bsd-3-clause
6,992,418,974,619,565,000
40.486569
79
0.53041
false
balloob/home-assistant
homeassistant/components/netatmo/__init__.py
8
6587
"""The Netatmo integration.""" import asyncio import logging import secrets import pyatmo import voluptuous as vol from homeassistant.components import cloud from homeassistant.components.webhook import ( async_register as webhook_register, async_unregister as webhook_unregister, ) from homeassistant.config_e...
apache-2.0
-3,397,617,016,057,103,400
30.218009
87
0.623653
false
Audish/sd-agent-plugins
base.py
1
2487
# This file contains base-classes used in the implementation of other plugins in this repo. # Author: yaniv.aknin@audish.com import sys assert sys.version_info[0] == 2 and sys.version_info[1] >= 6 or sys.version_info[0] > 2, 'needs Python >= v2.6' import os from datetime import timedelta, datetime import json class ...
mit
8,550,009,894,291,227,000
37.859375
111
0.594692
false
DepthDeluxe/ansible
lib/ansible/modules/cloud/lxd/lxd_profile.py
69
12228
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the...
gpl-3.0
-696,266,996,522,008,400
31.435013
122
0.571802
false
rgayon/l2tdevtools
l2tdevtools/review_helpers/yapf.py
1
2595
# -*- coding: utf-8 -*- """Helper for using yapf (Yet Another Python Formatter).""" from __future__ import print_function from __future__ import unicode_literals import os import subprocess from l2tdevtools.review_helpers import cli class YapfHelper(cli.CLIHelper): """yapf helper.""" MINIMUM_VERSION = '0.22.0'...
apache-2.0
-8,427,209,838,236,297,000
28.488636
78
0.635838
false
javier3407/Plugin.Video.Javiertv.ip.ar.br
resources/tools/update.py
4
6304
# -*- coding: utf-8 -*- #------------------------------------------------------------ # Actualizador de PalcoTV # Version 0.1 (22.04.2015) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www.mimediacent...
gpl-3.0
6,132,541,701,358,079,000
36.718563
113
0.619622
false
srkukarni/heron
heron/examples/src/python/word_count_dsl.py
1
1173
# copyright 2016 twitter. 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 agree...
apache-2.0
-4,584,763,997,147,920,000
39.448276
86
0.72549
false
jtyr/ansible
docs/docsite/rst/conf.py
3
10507
# -*- coding: utf-8 -*- # # documentation build configuration file, created by # sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009. # # This file is execfile()d with the current directory set to its # containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
gpl-3.0
3,254,507,260,179,415,000
34.496622
131
0.691253
false
silburt/rebound2
examples/planetesimals2/Removed_plot.py
1
3024
#This macro plots the distribution of ejections/collisions for a given run(s). Can also compare identical runs from Swifter and my Hybrid integrator. Takes *_removed.txt as input, or the corresponding file for swifter. import sys import matplotlib.pyplot as plt import numpy as np import pylab as pl import re swifter_...
gpl-3.0
-4,913,125,143,788,406,000
37.782051
218
0.628968
false
brunoseivam/chxtools
chxtools/pv_explorer/model.py
5
3202
from atom.api import * from matplotlib.figure import Figure from matplotlib.axes import Axes import numpy as np import datetime import os def _get_from_channel_archiver(pv_name, t0=0, t1=10): x = np.linspace(t0, t1, 1000) y = np.sin(x) * 10 y += np.random.randn(len(x)) return x, y class Model(Atom):...
bsd-3-clause
-840,737,823,119,470,000
29.207547
79
0.523735
false
jcrist/blaze
blaze/compatibility.py
13
3694
from __future__ import absolute_import, division, print_function import sys from types import MethodType import pandas.util.testing as tm PY3 = sys.version_info[0] == 3 PY2 = sys.version_info[0] == 2 if PY3: import builtins def apply(f, args, **kwargs): return f(*args, **kwargs) else: import __...
bsd-3-clause
-108,066,358,275,351,400
26.362963
80
0.674878
false
Rusk85/pyload
module/plugins/crypter/DuckCryptInfo.py
3
2059
# -*- coding: utf-8 -*- import re from module.lib.BeautifulSoup import BeautifulSoup from module.plugins.Crypter import Crypter class DuckCryptInfo(Crypter): __name__ = "DuckCryptInfo" __type__ = "container" __pattern__ = r"http://(?:www\.)?duckcrypt.info/(folder|wait|link)/(\w+)/?(\w*)" __version__ ...
gpl-3.0
-6,834,502,616,818,644,000
35.122807
90
0.571151
false
adamwiggins/cocos2d
samples/handling_events.py
3
3385
# 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__), '..')) # import cocos from cocos.director import director import pyglet class KeyDisplay(cocos.layer.Layer): is_event_handler = True #: enable pyglet's eve...
bsd-3-clause
3,248,205,275,094,378,000
32.186275
100
0.61418
false
qilicun/python
python2/PyMOTW-1.132/PyMOTW/asyncore/asyncore_http_client.py
1
2120
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2009 Doug Hellmann All rights reserved. # """ """ __version__ = "$Id$" #end_pymotw_header import asyncore import logging import socket from cStringIO import StringIO import urlparse class HttpClient(asyncore.dispatcher): def __init__(self, url): ...
gpl-3.0
7,338,407,338,738,751,000
26.532468
77
0.595283
false
henypan/onlinepromotion
joins/migrations/0002_auto__add_field_join_ip_address.py
5
1235
# -*- 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 field 'Join.ip_address' db.add_column(u'joins_join', 'ip_address...
mit
-7,264,672,345,260,650,000
36.454545
114
0.573279
false
nohzen/DL
ch06/weight_init_compare.py
4
1951
# coding: utf-8 import os import sys sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定 import numpy as np import matplotlib.pyplot as plt from dataset.mnist import load_mnist from common.util import smooth_curve from common.multi_layer_net import MultiLayerNet from common.optimizer import SGD # 0:MNISTデータの読み込み...
mit
6,890,459,561,318,032,000
28.428571
93
0.622774
false
drhoet/marantz-hue-adapter
hueadapter.py
1
1775
from flask import jsonify, request from marantzhueadapter import bridgeData, marantzIp @app.route('/') def index(): return "Welcome to the Marantz Hue adapter. Control you marantz receiver as if it were a Hue Light!" @app.route('/api/config', methods=['GET']) def api_config(): return jsonify( bridgeD...
mit
-6,194,130,441,710,991,000
36.630435
108
0.636056
false
petemoore/build-funsize
tests/test_funsize_fontend_api.py
1
5085
import mock from StringIO import StringIO import os # Fake celery before importing app os.environ["FUNSIZE_CELERY_CONFIG"] = "funsize.backend.config.test" from funsize.frontend.api import app, cache def test_index(): c = app.test_client() rv = c.get("/") assert rv.status_code == 200 def test_caching_lo...
mpl-2.0
8,257,331,683,139,092,000
30.78125
79
0.634022
false
kemchos/docker-sentry-sqlite
sentry/sentry.conf.py
2
2942
# This file is just Python, with a touch of Django which means # you can inherit and tweak settings to your hearts content. from sentry.conf.server import * import os.path CONF_ROOT = os.path.dirname(__file__) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.joi...
mit
-5,726,448,121,900,307,000
22.165354
85
0.618627
false
PMBio/limix
limix/io/conversion.py
2
10236
import h5py import pandas from optparse import OptionParser import scipy as sp import os import pdb import subprocess, sys, os import limix.deprecated.io.plink as PLINK class LIMIX_converter(object): ''' A class to help with file conversion in LIMIX ''' __slots__=["options","args","data", "result","i...
apache-2.0
1,846,605,991,888,723,000
45.739726
201
0.622411
false
jerbob92/CouchPotatoServer
couchpotato/core/notifications/pushalot/main.py
6
1148
from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification import traceback log = CPLog(__name__) class Pushalot(Notification): urls = { 'api': 'https://pushalot.com/api/sendmessage' } def notify(...
gpl-3.0
-1,003,823,702,681,823,200
30.027027
114
0.590592
false
chvrga/outdoor-explorer
java/play-1.4.4/python/Lib/json/scanner.py
5
2152
"""Iterator based sre token scanner """ import re import sre_parse import sre_compile import sre_constants from re import VERBOSE, MULTILINE, DOTALL from sre_constants import BRANCH, SUBPATTERN __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL) class Scanner(object): def ...
mit
-6,718,085,520,288,120,000
29.188406
78
0.534387
false
udapi/udapi-python
udapi/block/write/textmodetrees.py
1
17291
"""An ASCII pretty printer of dependency trees.""" import re import sys import colorama import collections from termcolor import colored from udapi.core.basewriter import BaseWriter COLOR_OF = { 'form': 'yellow', 'lemma': 'cyan', 'upos': 'red', 'deprel': 'blue', 'ord': 'green', } # Too many insta...
gpl-3.0
-7,230,973,201,970,188,000
42.401554
105
0.548917
false
liuwenf/moose
modules/level_set/examples/rotating_circle/area.py
8
1091
import matplotlib.pyplot as plt import tools # Create Figure and Axes figure = plt.figure(facecolor='white') axes0 = figure.add_subplot(111) # Level set alone data = tools.PostprocessorReader('circle_rotate_out.csv') axes0.plot(data('time'), data('area'), linewidth=1, color='blue', linestyle='-', label='Level set') ...
lgpl-2.1
-3,979,970,561,631,480,300
30.171429
120
0.713107
false
leesavide/pythonista-docs
Documentation/matplotlib/mpl_examples/pylab_examples/scatter_hist.py
12
1219
import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter # the random data x = np.random.randn(1000) y = np.random.randn(1000) nullfmt = NullFormatter() # no labels # definitions for the axes left, width = 0.1, 0.65 bottom, height = 0.1, 0.65 bottom_h = left_h = left+...
apache-2.0
-8,688,131,764,165,866,000
23.877551
58
0.704676
false
0todd0000/spm1d
spm1d/data/uv0d/anova1rm.py
1
2786
import numpy as np from .. import _base def _here_stack(Y): m,n = Y.shape y = np.hstack( Y.T ) A = np.hstack( [ [i]*m for i in range(n) ] ) SUBJ = np.hstack( list(range(m)) * n ) return y, A, SUBJ class Abdi2010(_base.DatasetANOVA1rm): def _set_values(self): self.cite = 'Abdi H (2010). Th...
gpl-3.0
-6,157,665,499,314,101,000
23.017241
154
0.545226
false
Shashaankar/C_programs
leet-programming/insert_and_merge_intervals.py
1
2685
""" Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1: Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9]. Example 2: Given [1,2],[3,5],[6,7],[8,...
gpl-2.0
3,081,775,714,928,363,500
29.511364
136
0.484916
false
osmocom/gr-fosphor
docs/doxygen/doxyxml/base.py
2
6204
# # Copyright 2010 Free Software Foundation, Inc. # # This file was generated by gr_modtool, a tool from the GNU Radio framework # This file is a part of gr-test # # SPDX-License-Identifier: GPL-3.0-or-later # # """ A base class is created. Classes based upon this are used to make more user-friendly interfaces to the ...
gpl-3.0
-7,724,935,490,332,527,000
28.826923
76
0.562057
false
lcpt/xc
verif/tests/preprocessor/sets/sets_boolean_operations_01.py
1
1078
# -*- coding: utf-8 -*- CooMax= 10 import xc_base import geom import xc import math from model.sets import sets_mng as sUtils __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Copyright 2014, LCPT" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" feProblem= xc.FEProblem() preprocessor= ...
gpl-3.0
-4,255,830,193,891,864,600
20.979592
67
0.712163
false
blunted2night/MyGUI
Scripts/cppcheck/cppcheck.py
4
3333
# run from root sources directory: python Scripts/cppcheck/cppcheck.py import os ignoredContent = [ # "It is safe to deallocate a NULL pointer", # ignore, fine for us "Exception thrown in destructor.", # ignore, fine for us # "::initialise' can be const.", # ignore, because some are not const and we keep all non-cons...
lgpl-3.0
2,332,324,579,294,700,000
57.473684
153
0.755476
false
tapomayukh/pyFunda
sandbox_tapo/level_3.py
2
1477
#!/usr/bin/env python # Level 3 import pylab as pyl import numpy as np import matplotlib.pyplot as pp import scipy as scp import scipy.ndimage as ni import copy import pickle import optparse import string from collections import Counter import os import re import unittest class Problem: def __init__(self, level...
bsd-3-clause
1,043,686,865,987,651,700
22.822581
102
0.530806
false
AdaptiveApplications/carnegie
tarc_bus_locator_client/numpy-1.8.1/numpy/ma/tests/test_mrecords.py
9
21134
# pylint: disable-msg=W0611, W0612, W0511,R0201 """Tests suite for mrecords. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function import sys import warnings import pickle import numpy as np import numpy.ma.testutils import numpy.ma as...
mit
-8,662,075,509,909,128,000
39.878143
86
0.509747
false
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/assumptions/handlers/sets.py
5
20765
""" Handlers for predicates related to set membership: integer, rational, etc. """ from __future__ import print_function, division from sympy.assumptions import Q, ask from sympy.assumptions.handlers import CommonHandler, test_closed_group from sympy.core.logic import fuzzy_not from sympy.core.numbers import pi from s...
bsd-3-clause
-986,589,033,971,467,400
31.193798
124
0.564122
false
yuanyelele/solfege
solfege/mpd/interval.py
1
11285
# GNU Solfege - free ear training software # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011 Tom Cato Amundsen # # 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 ...
gpl-3.0
-4,335,352,997,072,314,400
32.686567
127
0.5214
false
2013Commons/hue
desktop/core/ext-py/lxml/src/lxml/cssselect.py
35
28750
"""CSS Selectors based on XPath. This module supports selecting XML/HTML tags based on CSS selectors. See the `CSSSelector` class for details. """ import re from lxml import etree __all__ = ['SelectorSyntaxError', 'ExpressionError', 'CSSSelector'] try: _basestring = basestring except NameError: _...
apache-2.0
-5,520,218,717,146,156,000
29.359029
123
0.506191
false
jirikuncar/invenio
invenio/modules/dashboard/settings.py
14
4858
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012, 2013 CERN. # # Invenio 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...
gpl-2.0
-7,898,999,128,389,470,000
26.139665
80
0.603952
false
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/asyncio/base_events.py
6
69268
"""Base implementation of event loop. The event loop can be broken up into a multiplexer (the part responsible for notifying us of I/O events) and the event loop proper, which wraps a multiplexer with functionality for scheduling callbacks, immediately or at a given time in the future. Whenever a public API takes a c...
gpl-2.0
-4,801,156,504,577,970,000
37.482222
83
0.551034
false
analytehealth/django-analytics
djanalytics/tests/test_analytics_middleware.py
1
3427
import mock from django.conf import settings from django.conf.urls import patterns, url from django.http.response import HttpResponse from django.test import TestCase from django.test.utils import override_settings from djanalytics import models urlpatterns = [ url(r'^$', lambda request: HttpResponse(status=204)...
bsd-2-clause
1,037,362,104,546,129,800
33.969388
75
0.621827
false
hochanh/django-xadmin
xadmin/views/base.py
6
20917
import sys import copy import functools import datetime import decimal from functools import update_wrapper from inspect import getargspec from django import forms from django.utils.encoding import force_str from django.conf import settings from django.contrib import messages from django.contrib.auth import get_permis...
bsd-3-clause
-6,005,651,858,396,765,000
34.755556
129
0.556868
false
ebattenberg/librosa
docs/conf.py
1
8244
# -*- coding: utf-8 -*- # # librosa documentation build configuration file, created by # sphinx-quickstart on Tue Jun 25 13:12:33 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 file. # # All...
isc
-9,073,233,541,856,306,000
31.329412
106
0.703785
false
GustavoHennig/ansible
test/units/module_utils/test_known_hosts.py
25
4773
# -*- coding: utf-8 -*- # (c) 2015, Michael Scherer <mscherer@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
gpl-3.0
6,489,386,479,634,675,000
44.457143
112
0.582024
false
stormpath/stormpath-python-samples
project/settings.py
1
5988
# Django settings for chirper project. DEBUG = True TEMPLATE_DEBUG = DEBUG import os.path ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) PROJECT_NAME = "chirper" def ABS_PATH(*args): return os.path.join(ROOT_DIR, *args) ADMINS = ( # ('Your Name', 'your_email@example.com'), ) M...
apache-2.0
8,165,620,602,312,643,000
31.02139
109
0.695057
false
frc1418/2017-robot
robot/controllers/auto_align.py
1
2125
import hal import wpilib from magicbot import state, timed_state, StateMachine, tunable from networktables import NetworkTable from networktables.util import ntproperty from components.swervedrive import SwerveDrive from controllers.pos_controller import XPosController, YPosController from controllers.angle_controlle...
mit
-666,648,210,676,385,700
24
72
0.634824
false
practice-vishnoi/dev-spark-1
examples/src/main/python/parquet_inputformat.py
6
2293
from __future__ import print_function # # 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...
apache-2.0
-2,572,837,208,915,300,000
35.983871
97
0.68382
false
bjubes/ProjectPorcupine
Scripts/Contributor_Name_List.py
7
1640
#!/usr/bin/env python try: # For Python 3.0 and later from urllib.request import urlopen except ImportError: # Fall back to Python 2's urllib2 from urllib2 import urlopen import json def get_jsonparsed_data(url): """ Receive the content of ``url``, parse it as JSON and return the object. ...
gpl-3.0
3,172,786,680,416,703,500
24.230769
136
0.693902
false
runt18/mojo
build/android/gyp/lint.py
14
7428
#!/usr/bin/env python # # Copyright (c) 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. """Runs Android's lint tool.""" import optparse import os import sys from xml.dom import minidom from util import build_utils ...
bsd-3-clause
-1,198,407,817,836,675,300
33.548837
80
0.607297
false
delattreb/WebScraper-Le-Bon-Coin
src/lib/com_email.py
1
1770
""" Auteur: Bruno DELATTRE Date : 07/08/2016 """ import smtplib from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from lib import com_config, com_logger def send_mail_gmail(subject, table, filename = ''): conf = co...
gpl-3.0
-4,974,788,717,897,853,000
33.038462
108
0.59774
false