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
dwaiter/django-filebrowser-old
filebrowser/base.py
1
5606
# coding: utf-8 # imports import os, re, datetime from time import gmtime, strftime # django imports from django.conf import settings # filebrowser imports from filebrowser.settings import * from filebrowser.functions import get_file_type, url_join, is_selectable, get_version_path # PIL import if STRICT_PIL: fr...
bsd-3-clause
1,552,659,356,722,771,000
26.082126
117
0.539422
false
thingsboard/thingsboard-gateway
thingsboard_gateway/extensions/mqtt/custom_mqtt_uplink_converter.py
1
2643
# Copyright 2021. ThingsBoard # # 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
-568,845,879,882,896,600
59.068182
192
0.655316
false
derekjchow/models
research/object_detection/utils/label_map_util_test.py
1
9044
# 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
-1,022,607,647,608,463,600
26.077844
80
0.560593
false
iotile/coretools
iotilesensorgraph/test/test_datastream.py
1
8473
"""Tests for DataStream objects.""" import pytest from iotile.core.exceptions import InternalError from iotile.sg import DataStream, DataStreamSelector def test_stream_type_parsing(): """Make sure we can parse each type of stream.""" # Make sure parsing stream type works stream = DataStream.FromString('...
gpl-3.0
-1,828,324,736,327,478,800
35.364807
135
0.732208
false
gsi-upm/senpy
senpy/__init__.py
1
1141
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 Grupo de Sistemas Inteligentes (GSI) DIT, UPM # # 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.ap...
apache-2.0
761,096,362,766,294,100
31.6
77
0.696757
false
grengojbo/st2
st2client/st2client/models/core.py
1
11692
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
1,653,460,699,954,385,700
33.187135
91
0.595621
false
lammps/lammps-packages
mingw-cross/cmake-win-on-linux.py
1
14980
#!/usr/bin/env python # Script to build windows installer packages for LAMMPS # (c) 2017,2018,2019,2020 Axel Kohlmeyer <akohlmey@gmail.com> from __future__ import print_function import sys,os,shutil,glob,re,subprocess,tarfile,gzip,time,inspect try: from urllib.request import urlretrieve as geturl except: from urllib ...
mit
-3,950,353,748,060,748,000
38.21466
128
0.672029
false
tinybike/catchcoin
qa/rpc-tests/listtransactions.py
1
5892
#!/usr/bin/env python # Exercise the listtransactions API # Add python-catchcoinrpc to module search path: import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-catchcoinrpc")) import json import shutil import subprocess import tempfile import traceback from catchcoin...
mit
-3,156,501,602,563,602,400
38.019868
105
0.563306
false
Kopachris/seshet
seshet/bot.py
1
18891
"""Implement SeshetBot as subclass of ircutils3.bot.SimpleBot.""" import logging import os from io import StringIO from datetime import datetime from ircutils3 import bot, client from .utils import KVStore, Storage, IRCstr class SeshetUser(object): """Represent one IRC user.""" def __init__(self, nick...
bsd-3-clause
1,934,334,764,152,155,100
34.984762
85
0.505214
false
Naeka/vosae-app
www/organizer/api/resources/event.py
1
10316
# -*- coding:Utf-8 -*- from django.conf.urls import url from django.core.exceptions import ObjectDoesNotExist from tastypie import fields as base_fields, http from tastypie.utils import trailing_slash from tastypie.validation import Validation from tastypie_mongoengine import fields from dateutil.parser import parse ...
agpl-3.0
-4,812,843,896,607,923,000
38.830116
190
0.630186
false
m-tmatma/svnmailer
src/lib/svnmailer/settings.py
1
19703
# -*- coding: utf-8 -*- # # Copyright 2004-2006 André Malo or his licensors, as applicable # # 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
704,259,331,109,030,700
39.206122
81
0.526115
false
polyaxon/polyaxon-api
polyaxon_lib/estimators/hooks/general_hooks.py
1
2631
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from collections import OrderedDict from tensorflow.python.training import basic_session_run_hooks from tensorflow.python.training import evaluation from polyaxon_lib.estimators.hooks.utils import can_run_hook class GlobalStep...
mit
-773,701,700,634,766,200
34.08
96
0.717598
false
sigma-geosistemas/django-tenants
docs/conf.py
1
6550
# -*- coding: utf-8 -*- # # dinnertime documentation build configuration file, created by # sphinx-quickstart on Wed Aug 19 10:27:46 2009. # # 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. # # ...
mit
-1,764,868,686,530,571,300
31.914573
86
0.710992
false
ShovanSarker/mango_office
actions/views.py
1
15639
from django.shortcuts import render, redirect from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from users.models import AllUsers, ACL from status.models import Status from task.models import Task im...
gpl-2.0
-5,272,535,817,592,566,000
53.114187
127
0.475478
false
qingtech/weibome
weibome/settings.py
1
5454
# Django settings for weibome project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS import os if 'SERVER_SOFTWARE' in os.environ: from sae.const import ( MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, MYSQL_DB ) else: # Make ...
gpl-2.0
3,294,211,815,736,853,500
30.526012
88
0.688302
false
vbraun/SageUI
src/sageui/view/trac_window.py
1
13199
""" Window showing a Trac Ticket """ ############################################################################## # SageUI: A graphical user interface to Sage, Trac, and Git. # Copyright (C) 2013 Volker Braun <vbraun.name@gmail.com> # # This program is free software: you can redistribute it and/or modify # it u...
gpl-3.0
6,258,722,187,542,107,000
39.48773
101
0.608152
false
berkeley-stat159/project-lambda
code/stat159lambda/utils/tests/test_parse_demographics.py
1
1388
from __future__ import absolute_import from stat159lambda.utils import parse_demographics import os import csv def prepare_for_tests(): with open('demographics.csv', 'w') as csvfile: file_writer = csv.writer(csvfile, delimiter=',', quotechar='"') file_writer.writerow(['id', 'gender', 'age', 'forr...
bsd-3-clause
-6,484,319,558,559,641,000
26.215686
75
0.676513
false
trabucayre/gnuradio
gr-audio/examples/python/dial_tone_daemon.py
1
1411
#!/usr/bin/env python # # Copyright 2004,2005,2007,2008,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gru from gnuradio import audio from gnuradio.eng_arg import eng_float from argparse import ArgumentParser import os ...
gpl-3.0
-8,665,632,935,623,739,000
29.673913
83
0.61871
false
mtl/svg2mod
svg2mod/svg2mod.py
1
39409
#!/usr/bin/python from __future__ import absolute_import import argparse import datetime import os from pprint import pformat, pprint import re import svg2mod.svg as svg import sys #---------------------------------------------------------------------------- DEFAULT_DPI = 96 # 96 as of Inkscape 0.92 def main(): ...
cc0-1.0
9,195,613,608,947,256,000
26.103851
97
0.414905
false
mikehulluk/morphforge
src/morphforge/constants/ions.py
1
1668
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
bsd-2-clause
4,506,075,776,726,834,700
37.790698
72
0.67446
false
paninetworks/neutron
neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
1
46084
#!/usr/bin/env python # Copyright 2012 Cisco Systems, 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...
apache-2.0
-1,381,419,549,410,301,700
42.230769
79
0.552578
false
intel-hpdd/intel-manager-for-lustre
tests/unit/services/test_plugin_runner.py
1
1732
import mock from chroma_core.models import VolumeNode from tests.unit.lib.iml_unit_test_case import IMLUnitTestCase from chroma_core.services.plugin_runner import AgentPluginHandlerCollection from tests.unit.chroma_core.helpers import synthetic_host, synthetic_volume_full from tests.unit.chroma_core.helpers import loa...
mit
-8,590,990,271,830,882,000
39.27907
100
0.718245
false
pyrochlore/cycles
src/blender/addon/__init__.py
1
3388
# # Copyright 2011-2013 Blender 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 or agreed to in...
apache-2.0
-5,977,137,211,679,149,000
27.957265
82
0.634002
false
leppa/home-assistant
homeassistant/components/minio/__init__.py
1
8056
"""Minio component.""" import logging import os from queue import Queue import threading from typing import List import voluptuous as vol from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP import homeassistant.helpers.config_validation as cv from .minio_helper import MinioEventThread...
apache-2.0
4,996,086,234,179,014,000
29.4
85
0.566783
false
matejsuchanek/pywikibot-scripts
fix_qualifiers.py
1
4360
#!/usr/bin/python """This script is obsolete!""" import pywikibot from pywikibot import pagegenerators from .query_store import QueryStore from .wikidata import WikidataEntityBot class QualifiersFixingBot(WikidataEntityBot): blacklist = frozenset(['P143', 'P248', 'P459', 'P518', 'P577', 'P805', ...
gpl-2.0
4,387,339,838,632,818,700
38.636364
92
0.482569
false
ppke-nlpg/purepos-python3
purepos.py
1
17540
#!/usr/bin/env python3 # -*- coding: utf-8, vim: expandtab:ts=4 -*- ############################################################################### # Copyright (c) 2015 Móréh, Tamás # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Lesser Public License v...
lgpl-3.0
4,538,679,995,033,387,500
47.960894
100
0.560646
false
KelSolaar/Manager
manager/tests/tests_manager/tests_globals/tests_constants.py
1
5659
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **tests_constants.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines units tests for :mod:`manager.globals.constants` module. **Others:** """ from __future__ import unicode_literals import sys if sys.version_info[:2] <= (2, 6): imp...
gpl-3.0
3,851,480,431,661,635,600
29.424731
94
0.587913
false
pwong-mapr/private-hue
apps/useradmin/src/useradmin/tests.py
1
40345
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 ...
apache-2.0
4,844,797,381,928,160,000
45.886047
283
0.693244
false
jakbob/guitarlegend
gamescene.py
1
13650
# -*- coding: utf-8 -*- # # gamescene.py # Defines the behaviour of the actual game scene # # (c) Jakob Florell and Jonne Mickelin 2009 import error #################### # Standard library # #################### import math import heapq import os #################### # Required Modules # #################### impor...
gpl-3.0
8,430,830,132,402,125,000
35.271277
151
0.568412
false
mediatum/mediatum
workflow/addtofolder.py
1
4475
# -*- coding: utf-8 -*- """ mediatum - a multimedia content repository Copyright (C) 2011 Arne Seifert <arne.seifert@tum.de> 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 ...
gpl-3.0
92,644,555,041,265,800
36.25
121
0.625056
false
greggian/TapdIn
django/core/handlers/base.py
1
9267
import sys from django import http from django.core import signals from django.utils.encoding import force_unicode from django.utils.importlib import import_module class BaseHandler(object): # Changes that are always applied to a response (in this order). response_fixes = [ http.fix_location...
apache-2.0
-8,968,178,709,805,447,000
42.985437
143
0.604726
false
luksan/kodos
modules/urlDialog.py
1
1874
# -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; truncate-lines: 0 -*- # vi: set fileencoding=utf-8 filetype=python expandtab tabstop=4 shiftwidth=4 softtabstop=4 cindent: # :mode=python:indentSize=4:tabSize=4:noTabs=true: #-----------------------------------------------------...
gpl-2.0
-2,844,676,749,710,994,000
28.28125
112
0.47492
false
luzhuomi/collamine-client-python
scrapybot/scrapybot/spiders/hwz.py
1
1627
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import HtmlXPathSelector from scrapybot.items import ScrapybotItem from scrapybot.utils import normalizeFriendlyDate import datetime from dateutil.parser import parse from django...
apache-2.0
-3,216,291,927,608,126,000
35.977273
217
0.690227
false
oudalab/phyllo
phyllo/extractors/germanicusDB.py
1
3002
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup def main(): # The collection URL below. collURL = 'http://www.thelatinlibrary.com/germanicus.html' collOpen = urllib.request.urlopen(collURL) collSOUP = BeautifulSoup(collOpen, 'html5lib') autho...
apache-2.0
-921,874,890,846,832,400
34.738095
111
0.476682
false
bird-house/esgf-pyclient
pyesgf/test/test_context.py
1
7082
""" Test the SearchContext class """ from pyesgf.search import SearchConnection, not_equals from unittest import TestCase import os class TestContext(TestCase): def setUp(self): self.test_service = 'http://esgf-index1.ceda.ac.uk/esg-search' self.cache = os.path.join(os.path.dirname(__file__), 'u...
bsd-3-clause
8,450,543,210,295,021,000
37.48913
78
0.617905
false
kubernetes-client/python
kubernetes/client/models/v1_job_spec.py
1
13937
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
6,172,444,438,612,771,000
43.244444
685
0.664705
false
andrewjpage/gubbins
python/scripts/gubbins_drawer.py
1
26242
#!/usr/bin/env python3 ################################# # Import some necessary modules # ################################# import argparse import pkg_resources from Bio.Nexus import Trees, Nodes from Bio.Graphics.GenomeDiagram._Colors import ColorTranslator from Bio.GenBank import Scanner from Bio.GenBank import _...
gpl-2.0
-7,902,293,239,757,884,000
31.198773
323
0.685657
false
jupyter/jupyterlab
examples/cell/main.py
4
2644
""" An example demonstrating a stand-alone "notebook". Copyright (c) Jupyter Development Team. Distributed under the terms of the Modified BSD License. Example ------- To run the example, see the instructions in the README to build it. Then run ``python main.py``. """ import os import json from jupyterlab_server i...
bsd-3-clause
-5,810,901,252,969,317,000
28.707865
94
0.621785
false
cjvogl/finite_volume_seismic_model
3d/setplot_pwaves.py
1
3701
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ import numpy as np import os, shutil from mapping import Mapping import dtopotools_horiz_okada_and_1d as dtopotools lengt...
gpl-3.0
-4,647,494,930,394,782,000
31.464912
90
0.640367
false
VitorHugoAguiar/ProBot
ProBot_BeagleBone/PIDControllersFile.py
1
4310
#!/usr/bin/python # Python Standard Library Imports import time # Local files import ProBotConstantsFile # Initialization of classes from local files Pconst = ProBotConstantsFile.Constants() # PID functions class PIDControllersClass(): # Build a constructor def __init__(self): self.error = 0 ...
agpl-3.0
-3,683,972,053,555,202,600
39.280374
163
0.547796
false
FarzanHajian/CreateSwap
src/createswap2.py
1
4347
#!/usr/bin/env python # encoding: utf-8 ''' create_swap.py A Python 2 script for creating and removing Linux swap files. Copyright (C) 2016 Farzan Hajian 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 Foundatio...
gpl-3.0
-7,813,304,307,696,668,000
30.5
145
0.635381
false
Ghini/ghini.desktop
bauble/prefs.py
1
10011
# -*- coding: utf-8 -*- # # Copyright 2008-2010 Brett Adams # Copyright 2015 Mario Frasca <mario@anche.no>. # # This file is part of ghini.desktop. # # ghini.desktop 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
2,704,010,954,225,511,000
30.984026
79
0.636899
false
hbldh/sudokuextract
sudokuextract/imgproc/binary.py
1
1736
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :mod:`binary` ================== Created by hbldh <henrik.blidh@nedomkull.com> Created on 2016-01-26 """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import import numpy...
mit
2,918,771,141,372,004,400
24.910448
76
0.597926
false
GerbenJavado/LinkFinder
linkfinder.py
1
13951
#!/usr/bin/env python # Python 3 # LinkFinder # By Gerben_Javado # Fix webbrowser bug for MacOS import os os.environ["BROWSER"] = "open" # Import libraries import re, sys, glob, html, argparse, jsbeautifier, webbrowser, subprocess, base64, ssl, xml.etree.ElementTree from gzip import GzipFile from string import Templ...
mit
-3,957,937,958,894,511,600
33.70398
149
0.514587
false
ownport/ansiblite
src/ansiblite/utils/path.py
1
2926
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 License, or # (at your option) an...
gpl-3.0
-6,000,778,393,953,600,000
40.211268
141
0.698906
false
rigdenlab/SIMBAD
simbad/command_line/simbad_full.py
1
6513
#!/usr/bin/env python __author__ = "Adam Simpkin, and Felix Simkovic" __contributing_authors__ = "Jens Thomas, and Ronan Keegan" __credits__ = "Daniel Rigden, William Shepard, Charles Ballard, Villi Uski, and Andrey Lebedev" __date__ = "05 May 2017" __email__ = "hlasimpk@liv.ac.uk" __version__ = "0.1" import argparse...
bsd-3-clause
6,700,612,757,377,132,000
39.70625
146
0.614617
false
mdavidsaver/spicetools
spicetools/bench/fileframe.py
1
2613
# -*- coding: utf-8 -*- """ Copyright (C) 2014 Michael Davidsaver License is GPL3+, see file LICENSE for details """ import logging _log=logging.getLogger(__name__) import os, os.path from PyQt4 import QtCore, QtGui from PyQt4.QtCore import Qt from .fileframe_ui import Ui_FileFrame class FileFrame(QtGui.QFrame): ...
gpl-3.0
-8,681,363,298,104,596,000
28.359551
73
0.606965
false
zathras777/pywind
pywind/ofgem/objects.py
1
8218
# coding=utf-8 # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compiled # binary, for any purpose, commercial or non-commercial, and by any # means. # In jurisdi...
unlicense
3,872,703,660,219,905,000
33.970213
100
0.586152
false
robertnishihara/ray
python/ray/autoscaler/_private/aws/utils.py
1
4590
from collections import defaultdict from ray.autoscaler._private.cli_logger import cli_logger import colorful as cf class LazyDefaultDict(defaultdict): """ LazyDefaultDict(default_factory[, ...]) --> dict with default factory The default factory is call with the key argument to produce a new value w...
apache-2.0
369,375,581,428,346,560
34.859375
78
0.621133
false
zaneveld/picrust
picrust/util.py
1
16630
#!/usr/bin/env python # File created on 23 Nov 2011 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2015, The PICRUSt Project" __credits__ = ["Greg Caporaso", "Morgan Langille", "Daniel McDonald"] __license__ = "GPL" __version__ = "1.1.0" __maintainer__ = "Greg Caporaso" __email...
gpl-3.0
4,356,464,400,882,689,000
33.936975
243
0.632111
false
certik/chess
common/appenginepatch/appenginepatcher/patch.py
1
9983
# -*- coding: utf-8 -*- from google.appengine.ext import db import logging, os, sys def patch_all(): patch_python() patch_app_engine() patch_django() setup_logging() def patch_python(): # Remove modules that we want to override for module in ('httplib', 'urllib', 'urllib2', 'memcache',): ...
mit
7,800,223,992,368,336,000
36.389513
80
0.650005
false
ronin13/pyvolume
pyvolume/sshfs.py
1
4118
# -*- coding: utf-8 -*- """ Module providing SSHFileSystem implementation.""" from __future__ import unicode_literals from __future__ import absolute_import import logging import os import os.path from plumbum import ProcessExecutionError from plumbum.cmd import sshfs from plumbum.cmd import sudo from plumbum.cmd imp...
mit
-1,407,974,807,998,446,800
29.279412
84
0.578679
false
PhilLidar-DAD/geonode
geonode/eula/models.py
1
2090
from django.db import models from geonode.layers.models import Layer from geonode.documents.models import Document from datetime import datetime from django.utils.translation import ugettext_lazy as _ from geonode.base.models import ResourceBase from geonode.people.models import OrganizationType from django_enumfield i...
gpl-3.0
5,668,980,210,110,807,000
42.541667
114
0.710526
false
wikimedia/pywikibot-core
tests/textlib_tests.py
1
76796
# -*- coding: utf-8 -*- """Test textlib module.""" # # (C) Pywikibot team, 2011-2019 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, division, unicode_literals import codecs from collections import OrderedDict import functools import os import re import pywikibot import p...
mit
-5,682,923,183,788,997,000
41.833705
79
0.480028
false
Griger/Intel-CervicalCancer-KaggleCompetition
featureHOG.py
1
1456
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img import numpy as np from math import pi from keras.preprocessing.image import ImageDataGenerator import cv2 from sklearn.cluster import KMeans import sklearn.preprocessing as prepro # Generamos nuevos ejemplos ''' ...
gpl-3.0
4,660,950,177,554,977,000
21.483871
94
0.665522
false
m3z/HT
openstack_dashboard/api/swift.py
1
9568
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
-1,708,836,969,548,699,400
35.10566
79
0.599289
false
chrisseto/osf.io
api_tests/reviews/mixins/comment_settings.py
1
3030
from datetime import timedelta import pytest from furl import furl from osf_tests.factories import ( AuthUserFactory, PreprintFactory, PreprintProviderFactory, ) from reviews.permissions import GroupHelper from reviews_tests.factories import ReviewLogFactory from website.util import permissions as osf_per...
apache-2.0
-4,667,580,536,789,115,000
33.431818
125
0.630033
false
350dotorg/Django
django/core/mail/message.py
1
10976
import mimetypes import os import random import time from email import Charset, Encoders from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.Header import Header from email.Utils import formatdate, getaddresses, formataddr from django.conf im...
bsd-3-clause
5,907,717,041,566,670,000
36.979239
122
0.622449
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gtk/_gtk/InputDialog.py
1
10376
# encoding: utf-8 # module gtk._gtk # from /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so # by generator 1.135 # no doc # imports import atk as __atk import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject from Dialog import Dialog class InputDialog(Dialog): """ O...
gpl-2.0
-1,359,174,951,522,913,800
39.217054
104
0.667406
false
erichaase/topcoder-python
topcoder/knights_tour.py
1
2012
""" `KnightsTour <http://community.topcoder.com/stat?c=problem_statement&pm=10577>`__ """ def solution (board): b, n = Board(board), 1 while b.update(): n += 1 return n class Board: def __init__ (self, board): self.board = [list(row) for row in board] def update (self): k, t = sel...
mit
-7,622,723,604,843,863,000
21.863636
81
0.394135
false
WladimirSidorenko/SentiLex
scripts/vo.py
1
10974
#!/usr/bin/env python2.7 # -*- mode: python; coding: utf-8; -*- """Module for generating lexicon using Velikovich's method (2010). """ ################################################################## # Imports from __future__ import unicode_literals, print_function from collections import Counter from copy import...
mit
-5,583,059,324,348,303,000
34.286174
78
0.551394
false
fupadev/FuME
fume/threads/DownloadProcessor.py
1
5680
#!/usr/bin/env python # -*- coding: utf-8 -*- # # -------------------------------------------------------------------------- # FuME FuPa Match Explorer Copyright (c) 2017 Andreas Feldl <fume@afeldl.de> # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Publi...
gpl-3.0
-4,301,365,850,361,170,000
38.423611
121
0.543773
false
ibc/MediaSoup
worker/deps/catch/projects/TestScripts/testRandomOrder.py
1
2135
#!/usr/bin/env python3 """ This test script verifies that the random ordering of tests inside Catch2 is invariant in regards to subsetting. This is done by running the binary 3 times, once with all tests selected, and twice with smaller subsets of tests selected, and verifying that the selected tests are in the same r...
isc
6,595,939,224,350,894,000
35.186441
79
0.640749
false
arpitprogressive/arpittest
intergration_test/banner.py
1
18254
# -*- coding: utf-8 -*- """ banner Description goes here... :copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Limited :license: BSD, see LICENSE for more details. """ import unittest from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException...
bsd-3-clause
7,783,938,493,523,269,000
60.461279
238
0.7165
false
YannChemin/wxGIPE
pyplottest.py
1
3074
# -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: wxGIPE # Purpose: Satellite image [multi/hyper][spectral/temporal] pixel plotting # Author: Yann Chemin, <yann.chemin@gmail.com> # #####################################################...
unlicense
6,034,506,263,572,517,000
35.487805
112
0.596942
false
belkinsky/SFXbot
src/pyAudioAnalysis/audioTrainTest.py
1
46228
import sys import numpy import time import os import glob import pickle import shutil import audioop import signal import csv import ntpath from . import audioFeatureExtraction as aF from . import audioBasicIO from matplotlib.mlab import find import matplotlib.pyplot as plt import scipy.io as sIO from scipy import lina...
mit
-8,503,863,699,730,873,000
39.729515
237
0.609652
false
alfa-addon/addon
plugin.video.alfa/channels/bloghorror.py
1
5917
# -*- coding: utf-8 -*- # -*- Channel BlogHorror -*- # -*- Created for Alfa-addon -*- # -*- By the Alfa Develop Group -*- import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int import os import re from bs4 import BeautifulSoup from core import httptools from core impor...
gpl-3.0
5,249,670,684,535,636,000
28.575
123
0.572612
false
NicholasHoCode/Galaxy
assets/code/GF.py
1
2040
from PIL import Image import numpy as np import math from scipy import signal def boxfilter(n): assert (n%2 != 0),"Dimension must be odd" a = np.empty((n, n)) a.fill(1/(n*n)) return a def gauss1d(sigma): arr_length = 6*sigma if arr_length % 2 == 0: val = ((arr_length)/2)+1 elif arr...
mit
-6,833,917,436,678,237,000
34.172414
208
0.659314
false
Azure/azure-sdk-for-python
common/smoketest/key_vault_keys_async.py
1
1475
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import uuid from azure.keyvault.keys.aio import KeyClient from key_vault_base_async import KeyVaultBaseAsync class KeyVaultKeys(KeyVaultBaseAsync): def __init__(se...
mit
5,781,894,766,305,510,000
31.086957
75
0.541695
false
pytroll/pygac
pygac/tests/test_calibrate_pod.py
1
5529
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, 2015 Martin Raspaud # Author(s): # Martin Raspaud <martin.raspaud@smhi.se> # 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 Foundatio...
gpl-3.0
4,917,036,265,671,069,000
35.375
85
0.477302
false
mind1master/aiohttp
tests/test_client_session.py
1
14280
import asyncio import contextlib import gc import http.cookies import re import types from unittest import mock import pytest from multidict import CIMultiDict, MultiDict import aiohttp from aiohttp import web from aiohttp.client import ClientSession from aiohttp.connector import BaseConnector, TCPConnector @pytest...
apache-2.0
8,333,107,715,438,681,000
33
78
0.55112
false
masayukig/tempest
tempest/api/compute/admin/test_hosts_negative.py
1
6175
# Copyright 2013 Huawei Technologies Co.,LTD. # # 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
-5,796,808,752,177,502,000
41.881944
78
0.617976
false
dnanexus/rseqc
rseqc/scripts/read_distribution.py
1
11931
#!/usr/bin/env python '''------------------------------------------------------------------------------------------------- Check reads distribution over exon, intron, UTR, intergenic ... etc -------------------------------------------------------------------------------------------------''' #import built-in modules im...
gpl-3.0
-9,165,150,322,009,244,000
39.036913
165
0.693068
false
nickname456/pbots
poker.py
1
5255
#-----------------------------------------------------------# # Heads Up Omaha Challange - Starter Bot # #===========================================================# # # # Last update: 22 May, 2014 # # ...
mit
5,522,409,518,547,737,000
27.873626
109
0.479163
false
certifiedloud/e6b
tests.py
1
2317
from e6b import E6B import unittest class TimeSpeedDistance(unittest.TestCase): '''Test time, speed and distance calculations''' def setUp(self): self.e6b = E6B() def test_time(self): '''Test time calculations''' time = self.e6b.time(1, 60) self.assertEqual(60, time) ...
mit
-1,729,810,929,808,543,700
26.258824
62
0.615019
false
cmbclh/vnpy1.7
vnpy/trader/app/login/uiLoginWidget.py
1
7055
# encoding: UTF-8 ''' 登陆模块相关的GUI控制组件 ''' import sys sys.path.append('../') #sys.path.append('D:\\tr\\vnpy-master\\vn.trader\\DAO') sys.path.append('D:\\tr\\vnpy-1.7\\vnpy\\DAO') sys.path.append('D:\\tr\\vnpy-1.7\\vnpy\\common') import vnpy.DAO import vnpy.common from vnpy.DAO import * import pandas as pd import Tki...
mit
3,855,137,239,608,203,000
36.542857
260
0.507992
false
fast90/christian
modules/hq.py
1
1507
from datetime import datetime class HQ(object): def __init__(self): self.people_in_hq = 0 self.keys_in_hq = 0 self.joined_users = [] self.hq_status = 'unknown' self.status_since = datetime.now().strftime('%Y-%m-%d %H:%M') self.is_clean = True self.joined_key...
gpl-3.0
6,626,186,680,984,100,000
24.542373
78
0.558062
false
micbou/YouCompleteMe
python/ycm/client/completer_available_request.py
2
1716
# Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 vers...
gpl-3.0
-4,551,042,928,777,884,700
33.32
78
0.726107
false
vivisect/synapse
synapse/cryotank.py
1
49542
import os import types import shutil import struct import logging import threading import contextlib from functools import partial, wraps from collections import defaultdict import lmdb # type: ignore import synapse.lib.cell as s_cell import synapse.lib.lmdb as s_lmdb import synapse.lib.queue as s_queue import synap...
apache-2.0
-7,920,170,919,440,636,000
35.214912
120
0.568669
false
mdhaman/superdesk-core
tests/es_utils_test.py
1
2861
from superdesk.tests import TestCase from superdesk import es_utils class ESUtilsTestCase(TestCase): def test_filter2query(self): """Check that a saved_searches style filter is converted correctly to Elastic Search DSL""" filter_ = {"query": {"spike": "exclude", "notgenre": '["Article (news)"]'}}...
agpl-3.0
1,550,914,024,326,518,300
37.146667
118
0.431667
false
Tufin/pytos
pytos/securetrack/xml_objects/rest/nat_rules.py
1
13490
import logging from pytos.common.base_types import XML_List, XML_Object_Base, Comparable from pytos.common.definitions.xml_tags import Elements from pytos.common.logging.definitions import XML_LOGGER_NAME from pytos.common.functions import get_xml_int_value, get_xml_text_value, get_xml_node, create_tagless_xml_objects...
apache-2.0
-5,468,314,753,821,417,000
43.820598
132
0.646256
false
Texju/DIT-Machine_Learning
Codes/validation.py
1
1983
# -*- coding: utf-8 -*- """ Created on Wed May 24 15:00:15 2017 @author: Julien Couillard & Jean Thevenet """ from sklearn import cross_validation from sklearn import metrics import numpy class MLValidation: """This class calculates the preciseness of our tree against a set of data""" def __init__(self, ...
gpl-3.0
-9,109,253,405,910,331,000
32.627119
102
0.599597
false
brandonw/photo-album
photo_album/rotate_and_thumbs.py
1
1245
import os, sys from PIL import Image, ExifTags size = (128, 128) for infile in os.listdir(sys.argv[1]): inpath = os.path.join(sys.argv[1], infile) pieces = os.path.splitext(inpath) outpath = pieces[0] + ".thumb" + pieces[1] if (inpath != outpath and not os.path.exists(outpath) and 'thumb' not ...
bsd-3-clause
8,823,710,597,784,660,000
36.727273
81
0.526104
false
innovation-cat/DeepLearningBook
cifar10 classification/py3/softmax.py
1
4468
# coding: utf-8 # # softmax.py # # Author: Huang Anbu # Date: 2017.3 # # Description: Implementation of softmax classification # # Copyright©2017. All Rights Reserved. # =============================================================================================== from __future__ import print_function, division fro...
mit
-4,965,939,120,042,824,000
33.393701
218
0.63499
false
Thierry46/CalcAl
database/DatabaseReaderFactory.py
1
3131
# -*- coding: utf-8 -*- """ ************************************************************************************ Class : DatabaseReaderFactory Author : Thierry Maillard (TMD) Date : 13/6/2016 - 17/12/2016 Role : Return a database reader according parameters. Licence : GPLv3 Copyright (c) 2016 - Thierry Maillard Th...
gpl-3.0
1,505,146,703,561,911,800
44.376812
96
0.554136
false
sthesing/Podstatty
db.py
1
4858
# -*- coding: utf8 -*- ## Copyright (c) 2013 Stefan Thesing ## ##This file is part of Podstatty. ## ##Podstatty 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 op...
gpl-3.0
-6,791,800,694,305,659,000
37.251969
87
0.594072
false
SabaFar/plc
examples/plc-ccphy-example.py
1
4082
# -*- Mode:Python; -*- # /* # * Copyright (c) 2010 INRIA # * # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This program is distributed in the hope that it will b...
gpl-3.0
-16,086,139,063,123,222
29.691729
84
0.695492
false
mquad/DNN_Lab_UPF
exercise/img_classification/logreg_raw.py
1
4523
# -*- coding: utf-8 -*- # @Author: massimo # @Date: 2016-03-10 17:09:49 # @Last Modified by: massimo # @Last Modified time: 2016-03-11 15:54:15 import numpy as np import theano import theano.tensor as T from collections import OrderedDict import gzip import cPickle as pkl # python 2.x import time def load_gz(gz...
mit
2,625,091,526,244,373,500
37
128
0.687749
false
ayepezv/GAD_ERP
addons/website_sale/models/product.py
1
8355
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools, _ class ProductStyle(models.Model): _name = "product.style" name = fields.Char(string='Style Name', required=True) html_class = fields.Char(string='HTML Classes'...
gpl-3.0
7,746,958,657,846,388,000
47.017241
183
0.641412
false
zstackio/zstack-woodpecker
integrationtest/vm/vpc/test_vpc_ospf_stub_md5.py
1
3923
''' @author: Hengguo Ge ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.operations.vpc_operations as vpc_ops import os import time from itertools import izip VPC1_VLAN, VPC1_VXLAN = ['l3VlanNetwork...
apache-2.0
-9,100,616,342,536,122,000
35.333333
154
0.665817
false
poldracklab/cogat
cognitive/apps/atlas/forms.py
1
18517
from django import forms from django.core.exceptions import ValidationError from django.urls import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Div, Field, HTML, Layout, Reset, Submit from cognitive.apps.atlas.query import Assertion, Disorder, Task, Battery, ConceptClass, Concep...
mit
-3,327,605,317,850,539,000
38.736052
96
0.596155
false
CSAILVision/sceneparsing
evaluationCode/utils_eval.py
1
1826
import numpy as np # This function takes the prediction and label of a single image, returns intersection and union areas for each class # To compute over many images do: # for i in range(Nimages): # (area_intersection[:,i], area_union[:,i]) = intersectionAndUnion(imPred[i], imLab[i]) # IoU = 1.0 * np.sum(area_inters...
bsd-3-clause
-2,552,586,764,081,443,000
42.47619
117
0.727273
false
hexid/WordGenerator
GenerateChain.py
1
1975
#!/bin/env python # usage: depth , inDictionary [, outJSON] def generateChain(depth, inFile): import collections, re numChar, endChar = '#', '.' regexWord = re.compile('^[a-z]+$') depthRange = range(depth - 1) padStr = ' ' * (depth - 1) chars = collections.deque(maxlen = depth) # limit to depth chars de...
mit
-1,638,003,219,230,873,600
36.980769
127
0.658734
false
smartforceplus/SmartForceplus
.local/share/Odoo/addons/8.0/builder/models/demo/base.py
1
5437
import json import pickle import os import random from openerp import models, api, fields, _ class GeneratorInterface(models.AbstractModel): _name = 'builder.ir.model.demo.generator.base' _description = 'Generator Interface' @api.multi def get_generator(self, field): raise NotImplementedErro...
agpl-3.0
1,007,184,603,457,756,800
32.98125
130
0.606401
false
akariv/redash
redash/handlers/data_sources.py
1
4792
from flask import make_response, request from flask_restful import abort from funcy import project from redash import models from redash.utils.configuration import ConfigurationContainer, ValidationError from redash.permissions import require_admin, require_permission, require_access, view_only from redash.query_runne...
bsd-2-clause
5,638,463,786,395,855,000
32.51049
110
0.603297
false
hiidef/hiicart
hiicart/tests/paypal_express.py
1
2736
import base from hiicart.gateway.paypal_express.gateway import PaypalExpressCheckoutGateway STORE_SETTINGS = { 'API_USERNAME': 'sdk-three_api1.sdk.com', 'API_PASSWORD': 'QFZCWN5HZM8VBG7Q', 'API_SIGNATURE': 'A-IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU', 'RETURN_URL': 'http:/...
mit
-8,636,027,602,864,837,000
43.129032
84
0.659357
false
marmarek/qubes-core-admin
qubes/vm/adminvm.py
1
9608
# # The Qubes OS Project, https://www.qubes-os.org/ # # Copyright (C) 2010-2015 Joanna Rutkowska <joanna@invisiblethingslab.com> # Copyright (C) 2013-2015 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # Copyright (C) 2014-2015 Wojtek Porczyk <woju@invisiblethingslab.com>...
lgpl-2.1
412,797,591,439,523,840
29.791667
79
0.596128
false
danielsunzhongyuan/my_leetcode_in_python
lowest_common_ancestor_of_a_binary_tree_236.py
1
1928
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def lowestCommonAncestor(self, root, p, q): """ :type root: TreeNode :type p: TreeNode :...
apache-2.0
-4,629,820,916,250,762,000
28.661538
95
0.48029
false
beyondvalence/scratch
chp01.py
1
1697
# !/usr/bin/env python27 # -*- coding: utf-8 -*- """ Created on Fri Dec 2 16:15:29 2016 @author: waynetliu """ #%% from __future__ import division users = [ { "id": 0, "name": "Hero" }, { "id": 1, "name": "Dunn" }, { "id": 2, "name": "Sue" }, { "id": 3, "name": "Chi" }, {...
bsd-2-clause
5,344,159,609,228,425,000
27.283333
71
0.524455
false
arcyfelix/ML-DL-AI
Supervised Learning/GANs/GAN.py
1
3364
# -*- coding: utf-8 -*- """ GAN Example Use a generative adversarial network (GAN) to generate digit images from a noise distribution. References: - Generative adversarial nets. I Goodfellow, J Pouget-Abadie, M Mirza, B Xu, D Warde-Farley, S Ozair, Y. Bengio. Advances in neural information processing system...
apache-2.0
2,824,382,926,397,684,000
36.388889
82
0.678062
false