repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
ronin-gw/PyMaSC
PyMaSC/utils/progress.py
1
7404
import sys import array import fcntl from termios import TIOCGWINSZ class ProgressBase(object): global_switch = False @classmethod def _pass(self, *args, **kwargs): pass class ProgressBar(ProgressBase): def __init__(self, body="<1II1>" * 12, prefix='>', suffix='<', output=sys.stderr): ...
mit
-6,938,976,517,183,165,000
28.498008
93
0.53201
false
3.61347
false
false
false
okfn-brasil/gastos_abertos
manage.py
1
2907
# -*- coding: utf-8 -*- from flask.ext.script import Manager, Shell from gastosabertos.extensions import db from gastosabertos import create_app manager = Manager(create_app) manager.add_option('-i', '--inst', dest='instance_folder', required=False) manager.add_command('shell', Shell(make_context=lambda: { 'app...
agpl-3.0
7,894,687,137,202,703,000
25.427273
101
0.665291
false
3.23
false
false
false
pragya1990/pox_whole_code
pox/boot.py
1
15054
#!/bin/sh - # Copyright 2011-2012 James McCauley # # This file is part of POX. # # POX 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....
gpl-3.0
-8,790,270,044,505,829,000
29.722449
75
0.605885
false
3.613538
true
false
false
lipari/slurm
doc/man/man2html.py
1
7210
#!/usr/bin/env python import re import sys import os include_pat = r'(<!--\s*#include\s*virtual\s*=\s*"([^"]+)"\s*-->)' include_regex = re.compile(include_pat) url_pat = r'(\s+href\s*=\s*")([^"#]+)(#[^"]+)?(")' url_regex = re.compile(url_pat) dirname = '' # Instert tags for options # Two styles are processed. # ...
gpl-2.0
4,936,683,348,735,532,000
35.231156
140
0.580166
false
3.137511
false
false
false
sujitmhj/document_similarity_based_on_bloom_filter
main/views.py
1
3367
from django.shortcuts import render, HttpResponse from django.views.generic import View from pybloom.pybloom import BloomFilter import uuid from django import forms import json from nltk.corpus import stopwords import nltk nltk.data.path.append('/home/sujit/nltk_data') # Create your views here. ### Settings for simi...
mit
-6,982,455,363,895,425,000
24.507576
105
0.647461
false
3.2913
false
false
false
mrnkv/MCMaker
main.py
1
25645
#!/usr/bin/python # -*- coding: utf-8 -*- import os import codecs import sys import string import zipfile import codecs import shutil import uuid from ConfigParser import SafeConfigParser from datetime import date from PyQt4.QtGui import QApplication, QDialog, QMainWindow, QFileDialog from PyQt4.QtGui import QTableWid...
gpl-2.0
-6,862,576,893,923,554,000
38.309006
139
0.620976
false
3.571529
false
false
false
RuthAngus/K2rotation
tests/fit_all_the_light_curves.py
1
3471
import numpy as np import matplotlib.pyplot as plt import h5py import glob import fitsio from gatspy.periodic import LombScargle from scipy.signal import lombscargle from SIP import SIP """ Fit all the light curves with the basis from c1 and then sample from those weights 1. assemble_fnames - make a list of all K2 li...
mit
-3,739,128,414,029,228,500
26.768
75
0.594641
false
2.826547
false
false
false
ua-snap/downscale
snap_scripts/old_scripts/tem_iem_older_scripts_april2018/tem_inputs_iem/downscale_cru_tem_iem.py
1
5457
# downscale cru data in a CLI way if __name__ == '__main__': import glob, os, itertools, rasterio from downscale import DeltaDownscale, Baseline, Dataset, utils, Mask from functools import partial import numpy as np import argparse # parse the commandline arguments parser = argparse.ArgumentParser( description...
mit
-4,452,507,993,191,676,400
38.543478
168
0.684809
false
2.846635
false
false
false
Letractively/spiff
src/FooLib/Interact.py
1
1430
# Copyright (C) 2007 Samuel Abels, http://debain.org # # 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 be useful, # but WITHOU...
gpl-2.0
3,094,274,287,615,304,000
34.75
77
0.681818
false
4.144928
false
false
false
tulsluper/sanscript
apps/bc/scripts/x.py
1
1064
#!/usr/bin/env python3 import os import importlib import logging from defs import run_with_locker basepath = os.path.realpath(__file__)[:-3] lockfile = basepath + '.lock' logfile = basepath + '.log' open(logfile, 'w').close() logFormatter = logging.Formatter( '%(asctime)s %(module)s %(levelname)s %(message)s',...
gpl-3.0
-1,863,859,130,094,256,600
20.28
55
0.677632
false
3.421222
false
false
false
Mystler/ShadowCraft-Engine
shadowcraft/objects/buffs.py
1
8063
from shadowcraft.core import exceptions class InvalidBuffException(exceptions.InvalidInputException): pass class Buffs(object): allowed_buffs = frozenset([ 'short_term_haste_buff', # Heroism/Blood Lust, Time Warp #'stat_multiplier_buff', # Mark of the Wild, Blessing of Ki...
lgpl-3.0
4,676,780,736,006,268,000
48.466258
119
0.546199
false
3.185697
false
false
false
acuros/noopy
noopy/deployer/apigateway.py
1
5571
import importlib import uuid import boto3 from botocore.exceptions import ClientError from noopy import settings from noopy.endpoint import Endpoint, Resource class ApiGatewayDeployer(object): def __init__(self, function_arn, stage): self.function_arn = function_arn self.stage = stage s...
mit
5,562,871,211,197,979,000
34.265823
97
0.55771
false
4.166791
false
false
false
pnisarg/ABSA
tools/hindi_wordnet_python/demo.py
1
1955
# -*- coding: utf-8 -*- """ Demo program of Hindi WordNet in Python. Here I demonstrate all the functionalities of the libraries, but note you can load only the pickle files which are necessary for your task rather than loading every pickle file. Loading of pickle files takes time and memory. But once loaded, all yo...
mit
7,751,544,496,335,239,000
45.166667
342
0.649819
false
3.237062
false
false
false
p2pu/learning-circles
studygroups/migrations/0001_initial.py
1
2548
# -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Course', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_cre...
mit
1,566,064,058,333,559,000
38.2
114
0.517661
false
4.692449
false
false
false
Eric89GXL/vispy
vispy/geometry/calculations.py
1
4246
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """Miscellaneous functions """ import numpy as np ############################################################################### # These fast normal calcula...
bsd-3-clause
-4,810,434,838,505,294,000
30.451852
79
0.521432
false
3.258634
false
false
false
epfl-lts2/pygsp
pygsp/graphs/randomring.py
1
2637
# -*- coding: utf-8 -*- import numpy as np from scipy import sparse from pygsp import utils from . import Graph # prevent circular import in Python < 3.5 class RandomRing(Graph): r"""Ring graph with randomly sampled vertices. Parameters ---------- N : int Number of vertices. angles : a...
bsd-3-clause
6,646,018,641,626,723,000
31.555556
79
0.555556
false
3.568336
false
false
false
ZeroCater/linty
interface/utils.py
1
1341
from github import Github from social.apps.django_app.default.models import UserSocialAuth def get_github(user): if user.is_authenticated(): try: data = UserSocialAuth.objects.filter(user=user).values_list('extra_data')[0][0] username = data['login'] password = data['ac...
mit
9,190,143,782,192,360,000
31.707317
91
0.611484
false
3.403553
false
false
false
luqasz/mcm
mcm/datastructures.py
1
1260
# -*- coding: UTF-8 -*- from posixpath import join as pjoin from collections import namedtuple from mcm.cmdpathtypes import MENU_PATHS CmdPath = namedtuple('CmdPath', ('absolute', 'type', 'keys', 'modord', 'strategy')) def make_cmdpath(path, strategy): attrs = dict() attrs['absolute'] = pjoin('/', path )....
gpl-2.0
-8,474,907,335,657,072,000
25.25
103
0.596825
false
3.579545
false
false
false
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/core/dtypes/concat.py
1
19917
""" Utility functions related to concat """ import numpy as np import pandas._libs.tslib as tslib from pandas import compat from pandas.core.dtypes.common import ( is_categorical_dtype, is_sparse, is_datetimetz, is_datetime64_dtype, is_timedelta64_dtype, is_period_dtype, is_object_dtype, ...
apache-2.0
8,689,723,675,431,700,000
32.084718
79
0.603956
false
3.959642
false
false
false
SylvainCecchetto/plugin.video.catchuptvandmore
plugin.video.catchuptvandmore/resources/lib/channels/tn/nessma.py
1
6252
# -*- coding: utf-8 -*- """ Catch-up TV & More Copyright (C) 2018 SylvainCecchetto This file is part of Catch-up TV & More. Catch-up TV & More 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,812,057,039,132,161,000
32.31016
90
0.585006
false
3.64269
false
false
false
JSBCCA/pythoncode
exercises/anagram.py
1
4271
from random import shuffle, choice import time import sys original = ['purple', 'blue', 'green', 'yellow', 'orange', 'red', 'pink', 'white', 'gray', 'black', 'brown', 'ant', 'horse', 'dog', 'cat', 'food', 'house', 'cheese', 'pizza', 'hamburger', 'shark', 'bird', 'bat', 'baseball', '...
mit
-5,148,330,549,776,378,000
43.957895
79
0.498712
false
2.990896
false
false
false
fayimora/osprey
crawlers/one337x.py
1
2198
import requests from .common import fetch_html from bs4 import BeautifulSoup from torrent import Torrent class One337x(object): """Crawler for https://1337x.to""" def __init__(self): super(One337x, self).__init__() self.domain = 'https://1337x.to' def fetch_torrents(self, search_term): ...
mit
1,446,172,408,346,031,000
36.896552
116
0.547316
false
3.725424
false
false
false
zsjohny/jumpserver
apps/settings/forms/security.py
1
3532
# coding: utf-8 # from django import forms from django.utils.translation import ugettext_lazy as _ from .base import BaseForm __all__ = ['SecuritySettingForm'] class SecuritySettingForm(BaseForm): # MFA global setting SECURITY_MFA_AUTH = forms.BooleanField( required=False, label=_("MFA"), ...
gpl-2.0
4,208,873,372,663,636,500
36.978495
87
0.62769
false
4.482234
false
false
false
sbhowmik89/oppia
core/domain/summary_services.py
1
3602
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-3,810,459,752,714,880,000
42.926829
80
0.66935
false
4.508135
false
false
false
raonyguimaraes/mendelmd
variants/migrations/0001_initial.py
1
14536
# Generated by Django 2.0.1 on 2018-02-12 19:47 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('individuals', '0001_initial'), ] operations = [ migrations.CreateModel( nam...
bsd-3-clause
7,776,012,488,357,304,000
83.023121
130
0.611172
false
3.516207
false
false
false
Foxfanmedium/python_training
OnlineCoursera/mail_ru/Python_1/Week_5/2_creating_processes.py
1
1801
""" Создание/вызов процесса в всистем производится при помощи системного вызова fork Вывод доступных аттрибутов для модуля OS print(dir(os)) В Windows fork недоступен для использования Вывод всех процессов $ ls -l Поиск процессов по имени процесса $ ps uax| grep ex.p """ # import time # import os # # pid = os.for...
apache-2.0
2,430,489,199,370,699,300
13.75
117
0.505867
false
2.470209
false
false
false
GISAElkartea/tresna-kutxa
tk/material/migrations/0001_initial.py
1
9308
# Generated by Django 2.0 on 2018-06-23 18:27 from django.db import migrations, models import django.db.models.deletion import localized_fields.fields.char_field import localized_fields.fields.text_field import localized_fields.fields.uniqueslug_field import localized_fields.mixins import tk.material.fields import tk....
agpl-3.0
8,054,153,607,170,225,000
54.404762
196
0.584981
false
4.527237
false
false
false
Castronova/EMIT
gui/views/EMITView.py
1
5874
import wx import wx.html2 import wx.lib.agw.aui as aui from wx.lib.newevent import NewEvent from LowerPanelView import ViewLowerPanel from gui.controller.CanvasCtrl import CanvasCtrl from gui.controller.ToolboxCtrl import ToolboxCtrl from gui.controller.ModelCtrl import ModelDetailsCtrl # create custom events wxCreate...
gpl-2.0
-8,642,003,472,008,537,000
40.659574
159
0.519408
false
3.990489
false
false
false
GenericMappingTools/gmt-python
examples/gallery/symbols/multi_parameter_symbols.py
1
3546
""" Multi-parameter symbols ------------------------- The :meth:`pygmt.Figure.plot` method can plot individual multi-parameter symbols by passing the corresponding shortcuts (**e**, **j**, **r**, **R**, **w**) to the ``style`` parameter: - **e**: ellipse - **j**: rotated rectangle - **r**: rectangle - **R**: rounded ...
bsd-3-clause
8,020,776,406,592,209,000
38.842697
88
0.607727
false
2.904177
false
false
false
iproduct/course-social-robotics
image-recognition-python-new/cv2_haar_cascade_demo.py
1
1814
# import numpy as np import cv2 as cv faceCascade = cv.CascadeClassifier(cv.data.haarcascades + 'haarcascade_frontalface_default.xml') eyeCascade = cv.CascadeClassifier(cv.data.haarcascades + 'haarcascade_eye.xml') # img = cv.imread('sachin.jpg') video_capture = cv.VideoCapture(0) while True: # Capture...
gpl-2.0
-1,039,303,057,272,358,000
29.275862
96
0.57828
false
2.703428
false
false
false
Samneetsingh/OutlierDetection
odt/nearestneighbour/gknn.py
1
1899
############################### ## Global KNN Implementation ## ############################### ### Import Python Libraries ### import pandas as pd from pandas import DataFrame from numpy import array, matrix ### Import R Libraries ### import rpy2.robjects as R from rpy2.robjects.packages import importr from rpy2.rob...
gpl-3.0
7,724,768,562,600,736,000
26.521739
87
0.589784
false
3.459016
false
false
false
plumgrid/plumgrid-nova
nova/network/floating_ips.py
1
32330
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (t...
apache-2.0
-7,822,012,265,129,886,000
44.923295
79
0.548283
false
4.791049
false
false
false
jaraco/aspen
aspen/http/mapping.py
1
3764
""" aspen.http.mapping ~~~~~~~~~~~~~~~~~~ """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals NO_DEFAULT = object() class Mapping(dict): """Base class for HTTP mappings: Path, Querystring, Headers, Cookie, Body...
mit
3,913,725,705,590,676,500
28.40625
80
0.570404
false
4.19621
false
false
false
USGSDenverPychron/pychron
pychron/extraction_line/tasks/extraction_line_actions.py
1
4998
# =============================================================================== # Copyright 2011 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,341,163,700,956,145,700
30.2375
93
0.611645
false
3.913861
false
false
false
allenai/allennlp
tests/modules/feedforward_test.py
1
4285
from numpy.testing import assert_almost_equal import inspect import pytest import torch from allennlp.common import Params from allennlp.common.checks import ConfigurationError from allennlp.modules import FeedForward from allennlp.nn import InitializerApplicator, Initializer, Activation from allennlp.common.testing i...
apache-2.0
-2,292,689,591,873,804,000
40.601942
99
0.589498
false
3.916819
true
false
false
pytorch/fairseq
fairseq/tasks/__init__.py
1
4326
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """isort:skip_file""" import argparse import importlib import os from fairseq.dataclass import FairseqDataclass from fairseq.dataclass.utils ...
mit
2,169,655,994,506,281,200
30.808824
99
0.591308
false
3.907859
false
false
false
CubicERP/odoo
addons/mrp/__openerp__.py
1
3590
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
5,567,801,789,478,058,000
40.744186
330
0.639833
false
4.033708
true
false
false
lmr/avocado-virt
avocado/virt/test.py
1
2787
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-2.0
8,708,044,856,643,234,000
38.814286
78
0.594905
false
4.178411
true
false
false
levelcert/freesugars
setup.py
1
2343
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import, print_function import io import os import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import relpath from os.path import splitext from setuptools import f...
mit
9,200,520,328,663,304,000
30.24
116
0.597098
false
3.815961
false
false
false
City-of-Bloomington/green-rental
building/migrations/0019_auto__chg_field_building_air_conditioning__add_field_unit_deposit__add.py
2
27229
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Building.air_conditioning' db.alter_column(u'building_building', 'air_conditioning', self...
agpl-3.0
339,383,079,143,093,100
78.387755
195
0.54688
false
3.648533
false
false
false
agile-geoscience/bruges
setup.py
1
1888
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Python installation file. """ from setuptools import setup import re verstr = 'unknown' VERSIONFILE = "bruges/_version.py" with open(VERSIONFILE, "r")as f: verstrline = f.read().strip() pattern = re.compile(r"__version__ = ['\"](.*)['\"]") mo = pattern.sear...
apache-2.0
-1,214,113,653,251,901,000
31
79
0.548729
false
3.949791
false
true
false
warrickball/figures
animate_sph_harm_pyplot.py
1
3709
#!/usr/bin/env python import numpy as np from matplotlib import pyplot as pl from matplotlib import animation from mpl_toolkits.mplot3d import Axes3D from scipy.special import sph_harm from numpy import sin, cos, pi from argparse import ArgumentParser parser = ArgumentParser(description="""Uses matplotlib to animates...
gpl-3.0
-4,441,925,569,285,819,400
35.722772
101
0.602049
false
3.344454
false
false
false
jctanner/odp-scripts
jartools/jardumper.py
1
1524
#!/usr/bin/env python import json import os import sys import subprocess import tempfile def run_command(cmd): p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (so, se) = p.communicate() return (p.returncode, so, se) def which(cmd): ''' Get the path for a command...
apache-2.0
-5,818,770,157,537,226,000
22.446154
89
0.591864
false
3.21519
false
false
false
JoeGermuska/agate
tests/test_table.py
1
86346
#!/usr/bin/env python # -*- coding: utf8 -*- try: from cdecimal import Decimal except ImportError: # pragma: no cover from decimal import Decimal import warnings import json try: from StringIO import StringIO except ImportError: from io import StringIO import os import sys import six from six.move...
mit
3,156,826,707,891,739,600
32.14176
122
0.564821
false
3.472527
true
false
false
gkc1000/pyscf
pyscf/df/grad/rks.py
1
5142
#!/usr/bin/env python # # This code was copied from the data generation program of Tencent Alchemy # project (https://github.com/tencent-alchemy). # # # # # # Copyright 2019 Tencent America LLC. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file e...
apache-2.0
-6,712,460,053,075,018,000
32.174194
79
0.600739
false
2.844027
false
false
false
YannThorimbert/ThorPy-1.4.3
thorpy/elements/inserter.py
1
11544
"""Inserter""" # ! to forbid other element to react during insert, they should not be in # the same menu as the inserter, and maybe use _hide_mouse = True from pygame import event, K_ESCAPE, K_RETURN, K_BACKSPACE, KEYDOWN, K_LEFT, K_RIGHT from pygame.mouse import set_visible as mouse_set_visible from pygame.key import...
mit
-3,377,540,179,149,502,000
39.791519
84
0.557432
false
4.016701
false
false
false
nextgis/ngq_compulink
qgis-installer/customization-conf/plugins/ru_geocoder/rb_result_renderer.py
1
2612
""" /*************************************************************************** RuGeocoder A QGIS plugin Geocode your csv files to shp ------------------- begin : 2012-02-20 copyright : (C) 2012 by Nikulin Evgeni...
gpl-2.0
-404,471,387,088,012,400
37.985075
94
0.498469
false
4.639432
false
false
false
bieschke/nuffle
lib/python/cherrypy/test/test_combinedfilters.py
1
2482
""" Copyright (c) 2004, CherryPy Team (team@cherrypy.org) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list o...
gpl-2.0
-4,207,088,237,905,795,600
37.184615
81
0.72361
false
4.331588
false
false
false
erykoff/longdouble_conv
longdouble_conv/longdouble_lib.py
1
1908
""" longdouble_conv Copyright (C) 2013 Eli Rykoff, SLAC. erykoff at gmail dot com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your optio...
gpl-2.0
-7,293,097,500,366,783,000
33.690909
78
0.748428
false
3.966736
false
false
false
itslukej/zirc
zirc/test.py
1
2395
from six import print_ from .event import Event from .wrappers import connection_wrapper from . import errors, util class TestCase(object): def start(self, log): print_("Starting...\n", flush=True) log = log.split("\n") for line in log: try: event = Event(line) ...
gpl-3.0
3,439,073,094,418,084,400
42.545455
131
0.577871
false
3.718944
false
false
false
amaudy/django-report-builder
report_builder/views.py
1
32211
from django.contrib.contenttypes.models import ContentType from django.core import exceptions from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import permission_required from django.contrib.contenttypes.models import ContentType...
bsd-3-clause
3,142,864,098,546,205,700
41.327201
125
0.58955
false
4.193049
false
false
false
skarlekar/chehara
objectpath/core/interpreter.py
1
20142
#!/usr/bin/env python # This file is part of ObjectPath released under AGPL v3 license. # Copyright (C) 2010-2014 Adrian Kalbarczyk import sys, re from .parser import parse from objectpath.core import * import objectpath.utils.colorify as color # pylint: disable=W0614 from objectpath.utils import flatten, filter_dict...
mit
-2,233,151,904,477,407,200
31.698052
161
0.59577
false
2.904817
false
false
false
sunlightlabs/sunlight-rfid-doorman
acl.py
1
3455
#!/home/pi/.virtualenvs/sunlight_rfid_doorman/bin/python import pickle import datetime import time import itertools from functools import wraps import errno import os import signal import redis import gspread from settings import * ACL_KEY = 'sunlight-doorman-acl' LOG_KEY = 'sunlight-doorman-log' class TimeoutErro...
mit
3,621,352,978,966,756,400
25.992188
129
0.675543
false
2.841283
false
false
false
adamfisk/littleshoot-client
server/appengine/customRegistration/forms.py
1
3346
# -*- coding: utf-8 -*- from django import forms from django.contrib.auth.models import User from django.core.files.uploadedfile import UploadedFile from django.utils.translation import ugettext_lazy as _, ugettext as __ #from myapp.models import Person, File, Contract from ragendja.auth.models import UserTraits from r...
gpl-2.0
5,029,836,949,590,700,000
38.364706
126
0.646145
false
4.497312
false
false
false
akarol/cfme_tests
cfme/scripting/ipyshell.py
1
1660
# -*- coding: utf-8 -*- import click import sys from IPython.terminal.interactiveshell import TerminalInteractiveShell IMPORTS = [ 'from cfme.utils import conf', 'from fixtures.pytest_store import store', 'from cfme.utils.appliance.implementations.ui import navigate_to', 'from cfme.utils import provid...
gpl-2.0
3,850,137,921,904,999,000
37.604651
97
0.677711
false
3.824885
false
false
false
cnchanghai/ctest
prtmon.py
1
3402
#!/usr/bin/env python #coding:utf-8 import requests import time import sys import os from bs4 import BeautifulSoup as bss import threading import smtplib from email.mime.text import MIMEText from email.header import Header mylock = threading.Lock() global prtnum prtnum=dict() ## 定义2420打印机类 class th24(threading.Thread)...
apache-2.0
2,923,097,582,591,195,600
29.054545
123
0.554749
false
2.99728
false
false
false
tomsilver/nupic
nupic/encoders/logenc.py
1
10933
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
-7,972,900,606,985,096,000
32.64
80
0.58017
false
4.424524
false
false
false
jtrobec/pants
src/python/pants/core_tasks/targets_help.py
1
1872
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from colors import b...
apache-2.0
-4,069,224,662,935,813,000
39.695652
94
0.663996
false
3.828221
false
false
false
ua-snap/downscale
snap_scripts/data_requests/extract_profiles_keith_dot_precip_cru_ts40.py
1
5743
# extraction for Keith Cunningham -- Glitter Gulch DOT def make_gdf(): df = pd.DataFrame({'name':['Long Lake','Glitter Gulch'], 'lat':[61.8,63.76],'lon':[-148.2,-148.9]}) df['geometry'] = df.apply(lambda x: Point(x.lon, x.lat), axis=1) shp = gpd.GeoDataFrame( df, crs={'init':'epsg:4326'}, geometry='geometry') re...
mit
8,534,226,147,032,637,000
40.316547
195
0.692495
false
2.800098
false
false
false
texuf/whiskeynode
examples/friendsoffriends.py
1
3757
''' to run in python terminal: python -c "execfile('examples/friendsoffriends.py')" ''' from examples.helpers import Nameable from random import random from whiskeynode import WhiskeyNode from whiskeynode.db import db from whiskeynode.edges import Edge from whiskeynode.terminals import outbound_node, bidirectional_lis...
apache-2.0
-5,178,659,917,334,447,000
30.308333
133
0.461538
false
4.565006
false
false
false
akusok/website-ibc
wibc_old/wibc_config.py
1
3538
"""Setup for an IBC experiment. Contains all configs from the application scheme. Experiments should differ by this setup only. Can create HDF5-based or fast online experiments. """ __author__ = "Anton Akusok" __license__ = "PSFL" __version__ = "0.0.1" class IBCConfig(object): """Global parameters for WIC system...
gpl-2.0
-4,770,503,214,068,694,000
27.532258
78
0.559073
false
3.415058
false
false
false
updownlife/multipleK
bin/fast_multipleK/batchQuery.py
1
2371
#!/usr/bin/env python klength = 8 startk = 9 endk = 25 querynum = 1000 theta = -1 patternId = '0' import os import sys import time import timeit from optparse import OptionParser WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../../") read_file = WORKING_DIR + 'data/sample/read.fasta' #read...
gpl-2.0
5,775,841,275,727,426,000
40.596491
207
0.628427
false
2.658072
false
false
false
ericmjonas/Sim2600
sim2600/sim2600Console.py
1
17332
# Copyright (c) 2014 Greg James, Visual6502.org # # 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, p...
cc0-1.0
4,285,064,449,283,350,500
38.480638
85
0.587064
false
3.579513
false
false
false
google/dqm
backend/dqm/checks/check_non_useful_parameters.py
1
2448
# Copyright 2020 Google LLC # # 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, ...
apache-2.0
4,856,807,815,189,841,000
30
80
0.671977
false
3.748851
false
false
false
krzysztof/zenodo
zenodo/modules/records/config.py
1
3258
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2015 CERN. # # Zenodo 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 v...
gpl-2.0
-8,156,797,694,020,821,000
28.089286
78
0.611111
false
3.397289
false
false
false
cedwards/Nova
_modules/oscap.py
1
2187
# -*- coding: utf-8 -*- ''' OpenSCAP scanner execution module. :maintainer: Christer Edwards (christer.edwards@gmail.com) :maturity: 20160430 :platform: Linux :requires: SaltStack :upstream: http://open-scap.org This execution module uses the openSCAP scanner utility and an argument of an XML guide. The returned dat...
apache-2.0
-2,844,935,003,297,489
25.349398
88
0.639232
false
3.4992
false
false
false
F5Networks/f5-common-python
f5/bigip/contexts.py
1
4118
# coding=utf-8 # # Copyright 2014 F5 Networks 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 a...
apache-2.0
-7,644,202,878,223,179,000
38.980583
78
0.647644
false
4.850412
false
false
false
openstack/openstack-ansible-lxc_hosts
doc/source/conf.py
1
9923
#!/usr/bin/env python3 # 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,027,649,898,609,721,300
31.857616
79
0.700091
false
3.77157
false
false
false
nansencenter/nansat
nansat/mappers/mapper_amsre_uham_leadfraction.py
1
1565
#------------------------------------------------------------------------------- # Name: mapper_amsre_UHAM_lead_fraction.py # Purpose: # # Author: Morten Wergeland Hansen # Modified: Morten Wergeland Hansen # # Created: 18.02.2015 # Last modified:24.02.2015 09:26 # Copyright: (c) NERSC # License: #-----------...
gpl-3.0
-8,877,827,143,350,893,000
28.528302
94
0.513099
false
3.873762
false
false
false
ReconOS/reconos
tools/_pypack/reconos/scripts/info.py
1
1406
import logging import argparse log = logging.getLogger(__name__) def get_cmd(prj): return "info" def get_call(prj): return info_cmd def get_parser(prj): parser = argparse.ArgumentParser("info", description=""" Prints informations regarding the active project. """) return parser def info_cmd(args): info(ar...
gpl-2.0
-1,182,149,986,920,027,400
30.977273
126
0.613798
false
2.551724
false
false
false
m8ttyB/socorro
socorro/unittest/submitter/test_submitter_app.py
1
16998
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import time from configman.dotdict import DotDict import mock import pytest from socorro.submitter.submitt...
mpl-2.0
7,488,123,512,661,564,000
34.63522
91
0.572597
false
3.696021
true
false
false
jeanfeydy/lddmm-ot
LDDMM_Python/lddmm_python/modules/io/level_lines.py
1
1478
from numpy import * from skimage.measure import find_contours from scipy import misc from scipy.ndimage.filters import gaussian_filter from scipy.interpolate import interp1d from ..manifolds.curves import Curve def arclength_param(line) : vel = line[1:, :] - line[:-1, :] vel = sqrt(sum( vel ** 2, 1 )) return hsta...
mit
-2,916,201,283,628,472,300
25.854545
71
0.665538
false
2.755597
false
false
false
intelxed/xed
pysrc/enc2gen.py
1
194883
#!/usr/bin/env python3 # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel 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...
apache-2.0
2,318,196,300,557,789,000
33.572113
173
0.524746
false
3.088283
false
false
false
errordeveloper/fe-devel
Native/Clients/Python/__init__.py
1
63982
# # Copyright 2010-2012 Fabric Engine Inc. All rights reserved. # import os import sys import json import ctypes import collections import atexit import Queue import signal # FIXME Windows if os.name == 'posix': _fabric = ctypes.CDLL( os.path.dirname( __file__ ) + '/libFabricPython.so' ) else: _fabric = ctypes.C...
agpl-3.0
9,016,573,328,412,113,000
30.847685
128
0.61597
false
3.916866
false
false
false
dankilman/clash
clash/tests/commands/test_user_commands.py
1
4763
######## # Copyright (c) 2016 GigaSpaces Technologies Ltd. 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...
apache-2.0
8,647,986,952,816,754,000
38.691667
78
0.619358
false
3.77118
true
false
false
HybridF5/jacket
jacket/conf/netconf.py
1
1108
import socket from oslo_config import cfg from oslo_utils import netutils CONF = cfg.CONF netconf_opts = [ cfg.StrOpt('my_ip', default=netutils.get_my_ipv4(), help='IP address of this host'), cfg.StrOpt('my_block_storage_ip', default='$my_ip', hel...
apache-2.0
-5,560,293,642,524,442,000
28.972973
77
0.579422
false
3.94306
false
false
false
whitingjp/whitgl
scripts/process_model.py
1
2957
#!/usr/bin/python import struct import argparse import sys import os.path def process_mtl(filename): materials = [] file = open(filename) for line in file: tokens = line.split() if(len(tokens) == 0): continue ident = tokens.pop(0) if(ident == 'newmtl'): m = {} m['name'] = tokens[0] m['color'] =...
mit
-4,945,124,057,508,311,000
28.868687
111
0.619547
false
2.859768
false
false
false
bittwiddler1/dNES
libdnes/specs/perfect6502/create_opcode_info.py
1
2777
# Copyright (c) 2015 Saul D Beniquez # used to parse the output of perfect6502's measure test program and generate # a table cycle timings per opcode import re #regular expressions import sys # stdio timing_table = [int(-1)] * 256 addressmode_table = [int(-1)] * 256 lines = list() def address_mode_value(x): ...
gpl-3.0
-3,885,315,377,486,115,300
26.77
129
0.5009
false
3.21412
false
false
false
arthurdejong/python-stdnum
update/cn_loc.py
1
3075
#!/usr/bin/env python3 # update/cn_loc.py - script to fetch data from the CN Open Data community # # Copyright (C) 2014-2015 Jiangge Zhang # Copyright (C) 2015-2019 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as...
lgpl-2.1
5,329,826,409,305,947,000
32.064516
79
0.663415
false
3.613396
false
false
false
spdx/tools-python
spdx/config.py
1
2638
# Copyright (c) 2014 Ahmed H. Ismail # 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...
apache-2.0
7,593,922,663,134,030,000
34.173333
82
0.705838
false
3.715493
false
false
false
davidcox/glumpy
glumpy/atb/handlers_glut.py
1
2701
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (C) 2009-2010 Nicolas P. Rougier # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #---------------...
bsd-3-clause
-7,359,036,954,441,203,000
27.734043
78
0.547945
false
3.521512
false
false
false
bradmontgomery/word2html
setup.py
1
1173
#!/usr/bin/env python # -*- coding: utf-8 -*- """Setup script for python-bitbucket.""" from setuptools import setup from word2html import VERSION SHORT_DESC = ( "A quick and dirty script to convert a Word " "(docx) document to html." ) setup( name='word2html', version=VERSION, description=SHORT_...
mit
993,002,640,202,158,300
25.066667
77
0.606138
false
3.609231
false
false
false
ssdi-drive/nuxeo-drive
nuxeo-drive-client/nxdrive/wui/modal.py
1
2265
# coding: utf-8 from PyQt4.QtCore import Qt, pyqtSlot from nxdrive.wui.dialog import WebDialog, WebDriveApi class WebModalApi(WebDriveApi): @pyqtSlot(str) def result(self, button_id): self.dialog.set_result(button_id) def _json_default(self, obj): if isinstance(obj, WebModalButton): ...
lgpl-2.1
-4,551,620,661,134,086,700
26.621951
109
0.600883
false
3.832487
false
false
false
micahflee/securedrop
securedrop/tests/conftest.py
1
2229
# -*- coding: utf-8 -*- import os import shutil import signal import subprocess import psutil import pytest os.environ['SECUREDROP_ENV'] = 'test' # noqa import config # TODO: the PID file for the redis worker is hard-coded below. # Ideally this constant would be provided by a test harness. # It has been intentional...
agpl-3.0
1,630,277,785,121,707,500
27.948052
75
0.645581
false
3.660099
true
false
false
TemoaProject/temoa
temoa_model/pformat_results.py
1
29209
""" Tools for Energy Model Optimization and Analysis (Temoa): An open source framework for energy systems optimization modeling Copyright (C) 2015, NC State University 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 S...
gpl-2.0
-683,635,195,755,906,400
37.082138
158
0.623746
false
2.804513
false
false
false
kvvzr/Melete
melete/login_util.py
1
1999
import os, inspect, config from functools import wraps from flask import ( request, g, session, url_for, redirect ) from flask_oauthlib.client import OAuth from melete.models import * app = inspect.getmodule(inspect.stack()[1][0]).app oauth = OAuth(app) def login_required(f): @wraps(f) de...
mit
1,977,923,067,768,644,400
30.234375
134
0.671336
false
3.446552
false
false
false
UdK-VPT/Open_eQuarter
mole/extensions/eval_enev/oeq_UE_Window.py
1
1187
# -*- coding: utf-8 -*- import os,math from qgis.core import NULL from mole import oeq_global from mole.project import config from mole.extensions import OeQExtension from mole.stat_corr import rb_contemporary_window_uvalue_by_building_age_lookup from mole.stat_corr import nrb_contemporary_window_uvalue_by_building_ag...
gpl-2.0
-469,534,712,401,246,140
32.914286
80
0.709351
false
3.381766
false
false
false
yaybu/touchdown
touchdown/aws/vpc/nat_gateway.py
1
1925
# Copyright 2015 Isotoma Limited # # 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...
apache-2.0
8,066,024,475,042,157,000
28.166667
88
0.717922
false
3.92057
false
false
false
Neill3d/MoPlugs
PythonScripts/Startup/CompositionPropertyView.py
1
19176
# Copyright 2016-2017 Sergey Solokhin (Neill3d) # # Github repo - https://github.com/Neill3d/MoPlugs # Licensed under BSD 3-clause # https://github.com/Neill3d/MoPlugs/blob/master/LICENSE # # Script description: # Creating property views for the Composition Toolkit components # # Topic: Composition Toolkit # from pyfb...
bsd-3-clause
6,401,903,315,452,361,000
46.117936
103
0.728567
false
3.889655
false
false
false
csengstock/geonames_tagger
gnt_request.py
1
1998
# geonames tagger # # Copyright (c) 2015 Christian Sengstock, All rights reserved. # # This library 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.0 of the License, or (at your optio...
lgpl-3.0
1,893,786,140,158,874,600
29.272727
87
0.624625
false
3.548845
false
false
false
SouthForkResearch/CHaMP_Metrics
tools/topoauxmetrics/methods/sidechannel.py
1
2433
from lib.exception import MissingException from lib.sitkaAPI import latestMetricInstances from lib.metrics import CHaMPMetric import numpy as np class SidechannelMetrics(CHaMPMetric): TEMPLATE = { 'VisitMetrics': { 'Area': None, 'AreaPercent': None, } } def calc(se...
gpl-3.0
-8,742,559,488,343,693,000
34.779412
136
0.65187
false
4.733463
false
false
false
chromium/chromium
tools/binary_size/libsupersize/integration_test.py
5
24468
#!/usr/bin/env python3 # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import contextlib import copy import glob import io import itertools import os import unittest import re import shutil...
bsd-3-clause
-8,642,651,884,959,645,000
38.211538
80
0.62972
false
3.367002
true
false
false
praekelt/vumi-go
go/api/go_api/utils.py
1
1071
"""Utilities for Go API.""" from txjsonrpc.jsonrpc import BaseSubhandler from txjsonrpc.jsonrpclib import Fault class GoApiError(Fault): """Raise this to report an error from within an action handler.""" def __init__(self, msg, fault_code=400): super(GoApiError, self).__init__(fault_code, msg) cla...
bsd-3-clause
6,002,199,370,488,510,000
35.931034
73
0.661998
false
3.680412
false
false
false
Crazepony/crazepony-gitbook
wiki/changelink.py
1
4252
#!/usr/bin/env python # -*- coding: utf-8 -*- # Filename: deleteline.py import os import sys reload(sys) #sys.setdefaultencoding('utf8') def ChangeLineInFile(infile,isOverwrite): isOverwrite = isOverwrite.upper() _dir = os.path.dirname(infile) oldbasename = os.path.basename(infile) newbasename = ol...
apache-2.0
-3,856,531,406,230,458,000
27.41958
74
0.534449
false
3.274778
false
false
false
plone/plone.server
src/plone.server/plone/server/commands/cli.py
1
2320
from plone.server import app_settings from plone.server import logger from plone.server.commands import Command from plone.server.testing import PloneRequester from plone.server.testing import TESTING_SETTINGS from pprint import pformat import asyncio import logging import threading import time def format_headers(he...
bsd-2-clause
1,884,047,753,443,460,400
26.951807
89
0.590948
false
3.979417
false
false
false
tp199911/PyTables
tables/attributeset.py
1
25523
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: May 26, 2003 # Author: Francesc Alted - faltet@pytables.com # # $Id$ # ######################################################################## """Here is defined the AttributeSet class.""" im...
bsd-3-clause
4,261,707,770,689,709,000
35.989855
78
0.592368
false
4.214498
false
false
false
marzig76/blexplor
block.py
1
1804
""" This module contains a class for parsing a bitcoin block. Author: Mike Marzigliano """ import datetime from tx import tx from blockutil import * class block(object): """This class is for parsing the block header and block data fields.""" def __init__(self, blockstream): """ Parse the va...
gpl-3.0
-5,536,994,658,962,147,000
31.214286
75
0.563747
false
3.704312
false
false
false
NINAnor/QGIS
python/plugins/processing/algs/qgis/VoronoiPolygons.py
1
9670
# -*- coding: utf-8 -*- """ *************************************************************************** VoronoiPolygons.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
gpl-2.0
-1,948,047,915,561,625,900
37.525896
103
0.431748
false
3.880417
false
false
false
jimporter/bfg9000
bfg9000/tools/cc/compiler.py
1
5277
from itertools import chain from ... import options as opts, safe_str from .flags import optimize_flags from ..common import BuildCommand from ...file_types import ObjectFile, PrecompiledHeader from ...iterutils import iterate from ...path import Path from ...versioning import SpecifierSet class CcBaseCompiler(Build...
bsd-3-clause
754,488,575,035,242,800
33.266234
79
0.540838
false
4.000758
false
false
false
recap/pumpkin
examples/fasta/fastainject.py
1
2143
###START-CONF ##{ ##"object_name": "fastainject", ##"object_poi": "qpwo-2345", ##"auto-load": true, ##"remoting" : false, ##"parameters": [ ## ## ], ##"return": [ ## { ## "name": "fasta", ## "description": "raw fasta", ## "required...
mit
1,529,830,487,479,376,100
27.959459
119
0.486701
false
3.607744
false
false
false