repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
hevvieevvie/osmc
package/mediacenter-addon-osmc/src/script.module.osmccommon/resources/lib/cli_remote.py
2
5945
#!/usr/bin/env python2 import curses import fcntl import json import os import requests import sys import termios import traceback settings = { 'ip' : '127.0.0.1', 'port' : '80', 'user' : '', 'pssw' : '', } keymap = { 'i' : 'ip', 'p' : 'port', 'u' : 'user', 'w' : 'pssw', } try: with open('/home/...
gpl-2.0
-2,989,239,561,721,670,000
29.64433
138
0.608579
false
2.682762
false
false
false
udapi/udapi-python
udapi/tool/udpipe.py
1
5219
"""Wrapper for UDPipe (more pythonic than ufal.udpipe).""" import io import sys from ufal.udpipe import Model, Pipeline, ProcessingError, Sentence # pylint: disable=no-name-in-module from udapi.core.resource import require_file from udapi.block.read.conllu import Conllu as ConlluReader from udapi.core.root import Roo...
gpl-3.0
4,394,618,749,325,299,000
40.420635
103
0.57808
false
3.932931
false
false
false
barrettd/Gimp-python-scripts
resize.py
1
4370
# -------------------------------------------------------------------------------------------- # Image collection generation. # I used this python script to generate a number of scaled images for Apple device slices. # # Run from Gimp->Filters->Python-Fu console # # Assume that we have a collection of related images th...
mit
-5,434,776,783,087,981,000
41.019231
94
0.668879
false
3.152958
false
false
false
felipeadner/python-udacity
movie/entertainment_center.py
1
1951
import fresh_tomatoes import media the_matrix = media.Movie("The Matrix", "A computer hacker learns from mysterious rebels about the true nature of his reality and his role in the war against its controllers.", "https://images-na.ssl-images-amazon.com/images/M/MV5...
gpl-3.0
1,046,688,482,501,946,400
70.259259
251
0.663762
false
2.996928
false
false
false
caronc/nzbget-subliminal
Subliminal/chared/detector.py
4
8144
# Copyright (c) 2011-2012 Vit Suchomel and Jan Pomikalek # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Character encoding detection library.""" import os import sys import struct ENCODE_REPLACEMENT_CHARACTER = ...
gpl-3.0
3,656,220,390,151,236,000
36.529954
98
0.583374
false
4.161472
false
false
false
google/atheris
example_fuzzers/idna_fuzzer/idna_uts46_fuzzer.py
1
3534
#!/usr/bin/python3 # coding=utf-8 # 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 appli...
apache-2.0
-3,643,984,312,124,780,000
35.030612
125
0.721609
false
3.353276
false
false
false
lduarte1991/edx-platform
pavelib/utils/envs.py
2
9977
""" Helper functions for loading environment settings. """ from __future__ import print_function import json import os import sys from time import sleep import memcache from lazy import lazy from path import Path as path from paver.easy import sh from pavelib.utils.cmd import django_cmd def repo_root(): """ ...
agpl-3.0
-4,616,542,683,458,343,000
33.051195
104
0.585747
false
3.481158
true
false
false
pagepart/chinup
chinup/allauth.py
1
3972
from __future__ import absolute_import, unicode_literals from allauth.socialaccount.models import SocialToken from django.conf import settings as django_settings from django.contrib.auth import get_user_model from django.db.models import Q from . import chinup, exceptions class NoSuchUser(exceptions.ChinupError): ...
mit
-4,171,972,535,024,200,000
32.661017
91
0.590383
false
3.650735
false
false
false
PAIR-code/lit
lit_nlp/examples/lm_demo.py
1
4428
# Lint as: python3 r"""Example demo loading pre-trained language models. Currently supports the following model types: - BERT (bert-*) as a masked language model - GPT-2 (gpt2* or distilgpt2) as a left-to-right language model To run locally: python -m lit_nlp.examples.pretrained_lm_demo \ --models=bert-base-u...
apache-2.0
8,364,995,779,032,836,000
31.8
184
0.677507
false
3.472941
false
false
false
bayazee/flacon
setup.py
1
1084
""" Flacon ------------- Flask application manager """ from setuptools import setup setup( name='Flacon', version='0.0.1', url='', license='BSD', author='Mehdi Bayazee, Mostafa Rokooie', author_email='bayazee@gmail.com, mostafa.rokooie@gmail.com', description='Flask based web framework', ...
bsd-3-clause
-7,783,147,430,495,596,000
27.526316
70
0.608856
false
3.871429
false
true
false
bhtucker/agents
abm/xypops.py
1
9877
# -*- coding: utf-8 -*- """ abm.xypops ~~~~~~~~~~ Environments not backed by networkx whose x, y traits are used in visualization """ from scipy.stats.distributions import norm from scipy.stats.distributions import uniform from sklearn.metrics.pairwise import euclidean_distances from abm.viz import displ...
mit
-684,730,633,897,218,800
36.555133
97
0.611927
false
4.261001
false
false
false
phil-lidar1-fmc/hec-automation
run.py
1
1379
''' Copyright (c) 2013, Kenneth Langga (klangga@gmail.com) All rights reserved. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program i...
gpl-3.0
-2,840,593,574,524,956,700
33.475
75
0.635243
false
3.873596
false
false
false
wfwei/ReadWeibo
ranking/MultiRank.py
1
5429
# !/usr/bin/python # -*- coding: utf-8 -*- from ReadWeibo.mainapp.models import Category, Weibo, Comment from ReadWeibo.account.models import Account from main import Config import DataUtil as du from scipy.sparse import * from scipy import * import numpy as np import logging import operator import math, random, sys...
apache-2.0
8,863,134,820,167,962,000
32.306748
91
0.471173
false
3.163753
false
false
false
markgw/jazzparser
bin/models/ngram/ngram_model_suite.py
1
7424
#!/usr/bin/env ../../jazzshell from subprocess import PIPE, Popen, STDOUT from optparse import OptionParser import os, csv from jazzparser.utils.config import ConfigFile BASE_TRAINING_OPTIONS = """ # Model type %% ARG 0 ngram-multi # Input data %% ARG 2 %{PROJECT_ROOT}/input/fullseqs # Input type specification filet...
gpl-3.0
-4,326,134,430,385,559,600
46.896774
186
0.517376
false
4.225384
true
false
false
wkentaro/termsaver
termsaverlib/screen/base/__init__.py
1
12282
############################################################################### # # file: __init__.py # # Purpose: refer to module documentation for details # # Note: This file is part of Termsaver application, and should not be used # or executed separately. # #######################################...
apache-2.0
-7,446,971,719,490,099,000
33.994302
79
0.612522
false
4.593119
false
false
false
coburnw/hp5334-ivi
local/agilentBase5334.py
1
17724
""" Python Interchangeable Virtual Instrument Driver Copyright (c) 2017 Coburn Wightman derived from agilent436a.py driver by: Copyright (c) 2012-2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to...
mit
4,786,143,389,363,991,000
35.695652
114
0.572726
false
4.128581
false
false
false
tudarmstadt-lt/taxi
graph_pruning/methods/m_mfas.py
1
6788
import networkx as nx import numpy as np import methods.util.write_graph as write_graph import methods.util.util as util g = nx.DiGraph() def prepare(line): g.add_edge(line[1], line[2]) def do(filename_out, delimiter, mode, gephi_out): edges_to_be_removed = remove_cycle_edges_by_mfas() cycles_removed ...
apache-2.0
6,720,313,174,056,933,000
31.792271
165
0.580141
false
2.982425
false
false
false
Bladrak/thumbor
thumbor/handlers/upload.py
6
2585
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com import uuid import mimetypes from thumbor.handlers import ImageApiH...
mit
-7,515,603,351,654,393,000
36.463768
102
0.622824
false
4.162641
false
false
false
CG-F16-24-Rutgers/steersuite-rutgers
steerstats/tools/gameobjects/gametime.py
8
4870
class GameClock(object): """Manages time in a game.""" def __init__(self, game_ticks_per_second=20): """Create a Game Clock object. game_ticks_per_second -- The number of logic frames a second. """ self.game_ticks_per_second = f...
gpl-3.0
8,472,696,090,217,853,000
27.150289
100
0.501232
false
4.21645
false
false
false
CauldronDevelopmentLLC/buildbot
buildbot/status/mail.py
1
21677
# -*- test-case-name: buildbot.test.test_status -*- # the email.MIMEMultipart module is only available in python-2.2.2 and later import re from email.Message import Message from email.Utils import formatdate from email.MIMEText import MIMEText try: from email.MIMEMultipart import MIMEMultipart canDoAttachment...
gpl-2.0
-8,253,264,787,955,298,000
40.368321
104
0.555058
false
4.723687
false
false
false
sql-analytics/openvstorage
ovs/dal/dataobject.py
1
37746
# Copyright 2014 CloudFounders NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-2,780,434,259,696,459,300
42.486175
138
0.535103
false
4.804735
false
false
false
drestuart/delvelib
src/creatures/PlayerClass.py
1
1552
''' Created on Mar 13, 2013 @author: dstu ''' from sqlalchemy.schema import Column, ForeignKey from sqlalchemy.types import Integer import AIClass as AI import CreatureClass as Cr import colors import Game as G class Player(Cr.Creature): color = colors.white description = 'player' species = 'player'...
lgpl-3.0
7,175,754,097,030,793,000
24.459016
79
0.578608
false
3.919192
false
false
false
paulopatto/dotfiles
fonts/bin/scripts/Hack/fix-dsig.py
3
1461
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013,2016 The Font Bakery Authors # # 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 ...
mit
-2,454,767,404,344,025,000
30.085106
94
0.703628
false
3.405594
false
false
false
benthomasson/behave
behave/model.py
1
59326
# -*- coding: utf-8 -*- # pylint: disable=too-many-lines """ This module provides the model element class that represent a behave model: * :class:`Feature` * :class:`Scenario` * :class:`ScenarioOutline` * :class:`Step` * ... """ from __future__ import absolute_import, with_statement, unicode_literals import copy impo...
bsd-2-clause
355,775,774,216,674,050
33.815728
82
0.587112
false
4.437911
true
false
false
bccBalloon/HiBalloon
extTemp_gopro.py
1
1385
#Written for the 135-102DAG-J01 Thermistor import Adafruit_BBIO.ADC as ADC import time import math as mt import goprohero as gp ADC.setup() camera = gp.GoProHero('10.5.5.9', 'goprohero316') cameraOn = False recording = False #See June 4 comment on http://ealmberg.blogspot.com/2015/06/4-june-15.html Bvalue = 3348 #Be...
gpl-2.0
8,119,238,455,491,777,000
29.777778
79
0.631769
false
2.694553
false
false
false
ooici/coi-services
ion/util/pydap/handlers/coverage/coverage_handler.py
1
18170
import re import os import numpy as np import numexpr as ne from urllib import unquote from pyon.util.log import log from email.utils import formatdate from stat import ST_MTIME from coverage_model.coverage import AbstractCoverage from coverage_model.parameter_types import QuantityType,ConstantRangeType,ArrayType, Con...
bsd-2-clause
-661,066,451,977,343,600
36.933194
154
0.557567
false
4.063968
false
false
false
bitesofcode/projexui
projexui/widgets/xquerybuilderwidget/xquerybuilderwidget.py
2
9247
#!/usr/bin/python """ Defines an interface to allow users to build their queries on the fly. """ # define authorship information __authors__ = ['Eric Hulser'] __author__ = ','.join(__authors__) __credits__ = [] __copyright__ = 'Copyright (c) 2011, Projex Software' __license__ = ...
lgpl-3.0
5,430,064,327,202,641,000
29.153595
80
0.533254
false
4.575458
false
false
false
kubeflow/kfp-tekton
sdk/python/tests/compiler/testdata/basic_no_decorator.py
1
3734
# Copyright 2020 kubeflow.org # # 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,977,434,732,202,649,000
36.34
91
0.657204
false
3.69703
false
false
false
lowiki-org/localwiki-backend-server
localwiki/utils/views.py
1
12193
import time from django.utils.decorators import classonlymethod from django.conf import settings from django.http import HttpResponse, Http404, HttpResponseForbidden, HttpResponseServerError from django.utils import simplejson as json from django.utils.cache import patch_response_headers from django.utils.decorators i...
gpl-2.0
-5,861,725,121,537,733,000
33.541076
104
0.637989
false
4.224879
false
false
false
nandoflorestan/poorbox
setup.py
1
2232
#!/usr/bin/env python # -*- coding: utf-8 -*- # http://peak.telecommunity.com/DevCenter/setuptools#developer-s-guide # from distutils.core import setup from setuptools import setup, find_packages def read_text(filename, dir=None): import codecs import os if dir is None: dir = os.path.abspath(os.p...
bsd-3-clause
-8,014,234,604,394,212,000
36.2
77
0.627688
false
3.97861
false
false
false
power12317/weblate
weblate/trans/management/commands/import_project.py
1
4304
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
gpl-3.0
3,533,665,913,927,857,000
31.097015
87
0.608231
false
4.216667
false
false
false
timole/assortment-planning-self-organizing-map
src/csv2sompack-eur-js.py
1
5522
#!/usr/bin/python import re, sys, json import xml.etree.ElementTree as et import numpy def parseColumnNames(csv): columnNames = re.split(',', csv) result = [] for columnName in columnNames: result.append(columnName.replace(' ', '').replace('"', '').strip()) return result def parseRowData(csv)...
mit
-2,577,288,095,223,949,000
22.801724
122
0.601594
false
3.035734
false
false
false
wagtail/wagtail
wagtail/admin/rich_text/converters/editor_html.py
7
6380
from django.utils.functional import cached_property from django.utils.html import escape from wagtail.core.models import Page from wagtail.core.rich_text import features as feature_registry from wagtail.core.rich_text.rewriters import EmbedRewriter, LinkRewriter, MultiRuleRewriter from wagtail.core.whitelist import Wh...
bsd-3-clause
3,345,996,623,950,275,600
34.642458
95
0.624608
false
4.156352
false
false
false
ISMiller101/vpsolver
pyvpsolver/vpsolver.py
1
10870
""" This code is part of the Arc-flow Vector Packing Solver (VPSolver). Copyright (C) 2013-2015, Filipe Brandao Faculdade de Ciencias, Universidade do Porto Porto, Portugal. All rights reserved. E-mail: <fdabrandao@dcc.fc.up.pt>. This program is free software: you can redistribute it and/or modify it under the terms ...
gpl-3.0
849,976,155,841,555,500
31.642643
123
0.533947
false
3.33129
false
false
false
hthompson6/contrail-controller
src/vnsw/agent/uve/cpuinfo.py
7
1958
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # import os import psutil from vrouter.cpuinfo.ttypes import * class CpuInfoData(object): def __init__(self): self._process = psutil.Process(os.getpid()) self._num_cpu = 0 #end __init__ def _get_num_cpu(self): re...
apache-2.0
7,329,107,654,032,415,000
28.666667
65
0.590909
false
3.054602
false
false
false
tvd-dataset/GameOfThrones
GameOfThrones/__init__.py
1
9809
#!/usr/bin/env python # encoding: utf-8 # # The MIT License (MIT) # # Copyright (c) 2013-2015 CNRS # # 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 li...
mit
5,265,190,896,439,193,000
32.023569
79
0.512439
false
4.059603
false
false
false
kdeloach/model-my-watershed
src/mmw/apps/modeling/geoprocessing.py
1
10022
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import import requests import json from ast import literal_eval as make_tuple from celery import shared_task from celery.exceptions import MaxRetriesExceededError, Retry from request...
apache-2.0
8,929,279,760,388,009,000
33.919861
79
0.597186
false
4.252015
false
false
false
ProjectQ-Framework/ProjectQ
projectq/setups/linear.py
1
3413
# -*- coding: utf-8 -*- # Copyright 2018 ProjectQ-Framework (www.projectq.ch) # # 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
8,752,461,956,665,076,000
50.712121
118
0.693232
false
3.905034
false
false
false
Eomys/MoSQITo
mosqito/functions/tonality_tnr_pr/find_highest_tone.py
1
2208
# -*- coding: utf-8 -*- """ Created on Wed Dec 16 20:23:01 2020 @author: Salomé """ # Standard library imports import numpy as np # Mosqito functions import from mosqito.functions.tonality_tnr_pr.critical_band import critical_band def find_highest_tone(freqs, spec_db, index, nb_tones, ind): """ Method to f...
apache-2.0
6,190,862,336,084,805,000
27.294872
85
0.613502
false
3.641914
false
false
false
poderomedia/node-mapper
server/db.py
1
1621
import pymongo from bson.objectid import ObjectId def formatObjectIDs(collectionName, results): for result in results: # For each result is passed, convert the _id to the proper mID, cID, etc. result[collectionName[0]+'ID'] = str(result.pop('_id')) # Note the .pop removes the _id from the dict return ...
mit
-9,180,188,330,341,057,000
32.081633
123
0.62739
false
3.963325
true
false
false
jayhorn/DynSlicer
do_like_javac/arg.py
1
2759
import argparse import os import sys import tools import capture DEFAULT_OUTPUT_DIRECTORY = os.path.join(os.getcwd(), 'dljc-out') # token that identifies the end of the options for do-like-javac and the beginning # of the compilation command CMD_MARKER = '--' class AbsolutePathAction(argparse.Action): """Conver...
apache-2.0
-8,718,145,238,980,006,000
33.924051
110
0.633563
false
3.924609
false
false
false
mikeckennedy/write-pythonic-code-demos
code/ch_04_collections/_04_generators.py
1
1132
# ############ yield and generators ############# # Create by Michael Kennedy (@mkennedy) # Fibonacci numbers: # 1, 1, 2, 3, 5, 8, 13, 21, ... def classic_fibonacci(limit): nums = [] current, nxt = 0, 1 while current < limit: current, nxt = nxt, nxt + current nums.append(current) r...
mit
-471,263,068,550,504,060
17.866667
51
0.537102
false
3.430303
false
false
false
zenefits/sentry
src/sentry/plugins/base/configuration.py
4
4816
from __future__ import absolute_import import logging import six from django.utils.translation import ugettext as _ from django.utils.safestring import mark_safe from django.template.loader import render_to_string from django.core.urlresolvers import reverse from django.template import RequestContext from django.http...
bsd-3-clause
-1,648,359,412,165,057,500
33.647482
85
0.617317
false
4.109215
true
false
false
angdraug/nova
nova/scheduler/client/report.py
23
1801
# Copyright (c) 2014 Red Hat, 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 require...
apache-2.0
8,584,580,416,695,243,000
32.981132
78
0.625208
false
4.371359
false
false
false
xuru/bowling
app/models/frame.py
1
3912
from app import db from app.models.base import BaseMixin class Roll(db.Model, BaseMixin): """ The number of pins on a turn in bowling .. py:attribute:: pins The number of pins knocked down in a roll. :type: int """ id = db.Column(db.Integer, primary_key=True) pins = db.Colu...
mit
-4,616,859,188,055,716,000
23.45
95
0.554448
false
3.776062
false
false
false
forallsystems/21stbadgepathways
users/middleware.py
1
2303
from django.conf import settings from forallschools.apps import constants from forallschools.apps.core.models import App from django.http import HttpResponseRedirect, HttpResponse #import six from django.contrib import messages from django.shortcuts import redirect from django.utils.http import urlquote f...
gpl-2.0
9,084,169,206,132,100,000
39.160714
79
0.647851
false
4.768116
false
false
false
hlmgreen/LeafPy
Linux/Capturev9.py
3
18774
__author__ = 'mark greenwood' import wx import time import pygame import pygame.camera import os # initialises connected devices pygame.camera.init() camList = pygame.camera.list_cameras() class MyApp(wx.App): """Builds the main GUI application""" def OnInit(self): self.frame = MyFrame() self...
apache-2.0
7,260,016,199,539,547,000
48.275591
124
0.577448
false
3.689133
true
false
false
jbradberry/django-diplomacy
diplomacy/templatetags/maps.py
1
1280
import json from django import template from ..engine import standard from ..engine.utils import subregion_display register = template.Library() colors = {'austria-hungary': '#a41a10', 'england': '#1010a3', 'france': '#126dc0', 'germany': '#5d5d5d', 'italy': '#30a310', ...
mit
-5,957,185,914,430,594,000
26.826087
78
0.5375
false
3.431635
false
false
false
menpo/lsfm
lsfm/visualize.py
1
2233
import numpy as np from menpo.image import Image from menpo.shape import ColouredTriMesh from menpo.transform import AlignmentSimilarity from menpo3d.rasterize import rasterize_mesh from scipy.stats import chi2 from .camera import perspective_camera_for_template from .data import load_template from .shading import lam...
bsd-3-clause
-179,740,341,825,600,160
35.606557
80
0.640842
false
3.033967
false
false
false
cgio/invader
invader.py
1
6905
# Invader # https://github.com/cgio/invader def fs(path, pattern, start_offset=0, chunk_size=-1, chunk_limit=-1, find_all=True): """ Yields offset of found byte pattern within a file. Supports wildcard bytes, starting offset, reading in chunks, and read limits. Args: ...
mit
4,482,172,912,568,077,300
35.123656
74
0.459232
false
4.960489
false
false
false
umlfri/umlfri2
umlfri2/application/addon/online/addon.py
1
1390
class OnlineAddOn: def __init__(self, application, identifier, versions): self.__application = application self.__identifier = identifier self.__versions = tuple(sorted(versions, key=lambda ver: ver.version, reverse=True)) for version in self.__versions: version....
gpl-3.0
-5,201,756,451,669,748,000
23.821429
92
0.597122
false
4.66443
false
false
false
frewsxcv/servo
components/style/binding_tools/check_bindings.py
10
1110
# 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 os import re LICENSE = """\ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v...
mpl-2.0
-5,468,983,674,139,104,000
29
73
0.654955
false
3.162393
false
false
false
antivirtel/Flexget
flexget/plugins/input/betaseries_list.py
18
6366
"""Input plugin for www.betaseries.com""" from __future__ import unicode_literals, division, absolute_import from hashlib import md5 import logging from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils import requests from flexget.utils.cached_input import cached...
mit
-1,441,884,288,757,939,200
30.98995
118
0.587653
false
3.828022
true
false
false
junkoda/fs2
py/fs/lpt.py
1
1448
import fs._fs as c from fs.particles import Particles def init(nc, boxsize, a, ps, seed, kind): """Generate 2LPT displacements and particle positions. This function generates a random Gaussian initial condition and create a grid of particles with 2LPT displacements. The velocities are 0. Args: ...
gpl-3.0
-7,267,806,520,855,188,000
27.392157
77
0.615331
false
3.751295
false
false
false
mapleoin/obswatch
tests.py
1
9851
import unittest import smtplib import minimock from minimock import assert_same_trace, mock, Mock, TraceTracker from StringIO import StringIO import osc.core import obswatch class TestObswatch(unittest.TestCase): # nose knows about setUpClass, but python 2.6's unittest doesn't # @classmethod # def setUp...
gpl-3.0
7,210,041,340,860,714,000
39.706612
251
0.584509
false
3.576979
true
false
false
frespa81/tellduscontroller
MacroParser/Macros.py
1
3739
#!/usr/bin/python import threading import time import glob import MacroParser import Telldus class MacroCollection(object): """This is a collection of macros defined in xml format that are read from a list of folders. Attribute: folder_list -- The list with the paths from where to collect t...
gpl-3.0
-8,679,974,787,027,215,000
26.5
110
0.507087
false
4.799743
false
false
false
bolkedebruin/airflow
airflow/_vendor/nvd3/cumulativeLineChart.py
6
4048
#!/usr/bin/python # -*- coding: utf-8 -*- """ Python-nvd3 is a Python wrapper for NVD3 graph library. NVD3 is an attempt to build re-usable charts and chart components for d3.js without taking away the power that d3.js gives you. Project location : https://github.com/areski/python-nvd3 """ from .NVD3Chart import NVD...
apache-2.0
-8,209,313,798,998,288,000
37.923077
114
0.513587
false
3.650135
false
false
false
schriftgestalt/Mekka-Scripts
Paths/New Tab with Small Paths.py
1
7421
#MenuTitle: New Tab with Small Paths # -*- coding: utf-8 -*- __doc__=""" Finds small paths (smaller tahn a user-definable threshold) in glyphs and open a new tab with affected glyphs. """ import vanilla import GlyphsApp class FindSmallPaths( object ): def __init__( self ): # Window 'self.w': windowWidth = 250 ...
apache-2.0
-4,299,180,225,305,441,000
37.455959
186
0.703814
false
3.156529
false
false
false
Zorro666/renderdoc
util/test/tests/D3D11/D3D11_Shader_ISA.py
2
2951
import renderdoc as rd from typing import List import rdtest class D3D11_Shader_ISA(rdtest.TestCase): demos_test_name = 'D3D11_Shader_ISA' def check_capture(self): action = self.find_action("GPU=") self.check(action is not None) is_amd = 'AMD' in action.customName self.cont...
mit
-3,720,529,310,528,970,000
36.367089
118
0.626228
false
4.127273
true
false
false
IEEE-SB-Passau/pelican-deployment-system
example_config.py
1
3488
# Copyright 2016 Peter Dahlberg # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
5,242,572,374,823,577,000
39.55814
87
0.678899
false
3.656184
false
false
false
1Strategy/security-fairy
denied_notification.py
1
11240
import boto3 import gzip import json import logging import os import re from tools import Arn from setup_logger import create_logger from aws_session_manager import AWS_Session from botocore.exceptions import ProfileNotFound logger = create_logger(name="denied_notification.py") try: SESSION = boto3.session.Sessio...
apache-2.0
3,453,758,107,201,995,000
46.829787
382
0.56895
false
3.781965
false
false
false
mrquim/repository.mrquim
repo/script.module.myconnpy/lib/mysql/connector/dbapi.py
16
2252
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
gpl-2.0
3,972,306,058,080,460,000
30.71831
78
0.732682
false
3.697865
false
false
false
carmark/vbox
src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py
1
12445
# -*- coding: utf-8 -*- # $Id: wuihlpgraphmatplotlib.py 56295 2015-06-09 14:29:55Z vboxsync $ """ Test Manager Web-UI - Graph Helpers - Implemented using matplotlib. """ __copyright__ = \ """ Copyright (C) 2012-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http:...
gpl-2.0
1,656,052,364,727,503,000
37.649068
120
0.568742
false
3.536516
false
false
false
tijn/hosts.tmLanguage
support.py
1
1215
import sublime import sublime_plugin class HostsFileViewListener(sublime_plugin.ViewEventListener): SYNTAX = 'hosts.sublime-syntax' @classmethod def is_applicable(cls, settings): try: return (settings and settings.get('syntax', '').lower().endswith(cls.SYNTAX)) ...
mit
-2,744,826,861,513,747,500
29.375
78
0.57284
false
3.919355
false
false
false
showerst/openstates
openstates/al/bills.py
1
18080
import datetime import re from billy.scrape.bills import BillScraper, Bill from billy.scrape.votes import Vote import lxml.html import scrapelib _action_re = ( ('Introduced', 'bill:introduced'), ('(Forwarded|Delivered) to Governor', 'governor:received'), ('Amendment (?:.*)Offered', 'amendment:introduced'...
gpl-3.0
1,621,733,867,048,164,000
39.357143
118
0.516593
false
3.869863
false
false
false
soccermetrics/soccermetrics-client-py
soccermetrics/rest/resources/match.py
1
7424
from soccermetrics.rest.resources import Resource from soccermetrics.rest.resources.events import MatchEvents from soccermetrics.rest.resources.statistics import MatchStatistics class MatchResource(Resource): """ Represents a Match REST resource (<play>/matches/<resource> endpoints). The Match Resources a...
mit
204,587,171,825,993,250
33.21659
91
0.573006
false
4.328863
false
false
false
miguelgrinberg/api-pycon2014
manage.py
3
1068
#!/usr/bin/env python from flask import Flask, g, jsonify from flask.ext.script import Manager from api.app import create_app from api.models import db, User manager = Manager(create_app) @manager.command def createdb(): app = create_app() with app.app_context(): db.drop_all() db.create_all()...
mit
8,564,597,526,883,689,000
23.272727
71
0.638577
false
3.747368
false
false
false
evenmarbles/mlpy
mlpy/mdp/stateaction.py
1
42394
from __future__ import division, print_function, absolute_import import copy import math import numpy as np from .distrib import ProbabilityDistribution class Experience(object): """Experience base class. Representation of an experience occurring from acting in the environment. Parameters --------...
mit
6,059,188,938,365,483,000
29.281429
117
0.533613
false
4.236434
false
false
false
miku/graphapi
app.py
1
4720
# coding: utf-8 from flask import Flask from flask.ext.cors import CORS import requests import json app = Flask(__name__) app.config['SPARQL_ENDPOINT'] = 'http://localhost:18890/sparql' cors = CORS(app) QUERY = """ CONSTRUCT {{ <http://d-nb.info/gnd/{gnd}> <http://xmlns.com/foaf/0.1/depiction> ?c . <http:...
mit
-1,085,193,435,221,097,500
35.589147
116
0.540254
false
2.807852
false
false
false
hansroh/skitai
skitai/corequest/pth/sp_task.py
1
1692
# Subprocess Task from . import task import subprocess from concurrent.futures import TimeoutError from ..tasks import Mask import time from skitai import was class Task (task.Task): def __init__ (self, cmd, timeout): self._timeout = timeout self._name = cmd self._started = ti...
mit
9,199,092,943,771,288,000
26.2
104
0.543735
false
4.272727
false
false
false
Foggalong/scraps
files/other/launcher.py
1
3136
#!/usr/bin/env python3 # This was created in response to this program by the ModuloProject which # aims to make a command line app launcher. The method they were using to # get data from launchers seemed sub-optimal so I reworked it to be a bit # more efficient. Their original version is found at: http://git.io/vWJcm ...
gpl-2.0
5,570,224,233,192,500,000
29.745098
79
0.549426
false
3.96962
false
false
false
cellnopt/cellnopt
test/core/test_base.py
1
1215
from cno.core.base import CNORBase, CNOBase from cno import cnodata from easydev import TempFile # To test some of the base functions, need to use something else such as cnorbool def test_cnobase(): c = CNOBase(cnodata('PKN-ToyMMB.sif'), cnodata("MD-ToyMMB.csv")) c.pknmodel c.midas c.data c.prep...
bsd-2-clause
3,892,661,275,343,669,000
17.984375
84
0.624691
false
2.8125
false
false
false
vasilenkomike/xen-api
ocaml/idl/binding_sanity_checks/create_vm.py
34
2997
#!/usr/bin/env python import XenAPI import provision import sanitychecklib #log in session=sanitychecklib.getsession() sx=session.xenapi #find the template for Debian Etch vms = sx.VM.get_all() print "Server", sanitychecklib.server, "has ", len(vms), "VMs", etch_template_list = [x for x in vms if (('Etch' in sx.VM....
lgpl-2.1
-2,022,794,108,201,293,800
28.97
115
0.718385
false
3.201923
false
false
false
pakodekker/oceansar
oceansar/nrcs/kodis.py
1
3385
import numpy as np from oceansar import constants as const class RCSKodis(): """ Specular model (R.D. Kodis '66) Physical optics model as described in R.D. Kodis (1966) paper 'A Note on the Theory of Scattering from an Irregular Surface'. E.M. solved using Stationary Phase Method. ...
gpl-3.0
7,093,026,212,739,581,000
37.044944
135
0.51551
false
2.898116
false
false
false
mnubo/kubernetes-py
kubernetes_py/models/v1alpha1/PetSetStatus.py
3
1970
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # class PetSetStatus(object): """ http://kubernetes.io/docs/api-reference/apps/v1alpha1/definitions/#_v1alpha1_petsetstatus """ ...
apache-2.0
-5,121,746,485,660,542,000
30.774194
110
0.538071
false
4.65721
false
false
false
platinummonkey/trolliusgremlin
tests/tests.py
1
7626
""" """ import asyncio import unittest import uuid from aiogremlin import (submit, GremlinConnector, GremlinClient, GremlinClientSession) class SubmitTest(unittest.TestCase): def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(None) def tear...
mit
3,746,226,251,642,800,600
29.626506
78
0.548387
false
3.963617
true
false
false
realm01/gnome-quota-indicator
lib/mvc/quota_window/view.py
1
3093
"""View of QuotaWindowView.""" from gi.repository import Gtk from lib.mvc.bases import WindowViewBase from lib.exception_feedback import add_default_exception_handling class QuotaWindowView(Gtk.Window, WindowViewBase): """View of QuotaWindowView.""" def __init__(self, app, model): """Ctor of QuotaWi...
mit
1,402,789,660,148,587,000
31.557895
76
0.624636
false
3.713085
false
false
false
mtasende/Machine-Learning-Nanodegree-Capstone
predictor/evaluation.py
1
10656
""" This module contains some functions to evaluate the stock prices predictor. """ import sys import numpy as np from pandas.errors import UnsortedIndexError from sklearn.metrics import r2_score import pandas as pd import predictor.feature_extraction as fe import datetime as dt def mre(y_true, y_pred): """ M...
mit
-719,197,982,344,996,700
45.532751
119
0.668262
false
3.321696
false
false
false
Freeseer/freeseer
src/freeseer/tests/framework/config/persist/test_jsonstorage.py
1
1605
#!/usr/bin/env python # -*- coding: utf-8 -*- # freeseer - vga/presentation capture software # # Copyright (C) 2011, 2013 Free and Open Source Software Learning Centre # http://fosslc.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-3.0
-2,208,351,403,935,526,400
29.283019
76
0.71215
false
3.681193
true
false
false
RedhawkSDR/framework-codegen
redhawk/codegen/jinja/cpp/service/generator.py
1
2253
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK core. # # REDHAWK core 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 ...
lgpl-3.0
-3,264,611,436,901,658,000
34.761905
90
0.689303
false
4.203358
false
false
false
imarin/Odoo-Mexico-localization
l10n_mx_company_multi_address/invoice.py
1
4507
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ####################################...
agpl-3.0
7,326,353,656,462,540,000
46.442105
83
0.584868
false
4.086129
false
false
false
SekoiaLab/Fastir_Collector
factory/factory.py
1
3844
# -*- coding: utf-8 -*- from __future__ import unicode_literals from settings import FASTIR_ROOT import os import sys import inspect import importlib import pkgutil def _list_packages(): directories = [] lib_dir = FASTIR_ROOT if lib_dir.endswith('.zip'): lib_dir = lib_dir[0:-4] ...
gpl-3.0
4,597,551,051,461,007,400
31.137931
98
0.574922
false
4.32396
false
false
false
giruenf/GRIPy
classes/ui/base/toplevel.py
1
21399
from collections import OrderedDict import wx from pubsub import pub from classes.ui import UIManager from classes.ui import UIControllerObject from classes.ui import UIViewObject from app.pubsub import AUTO_TOPIC from app.app_utils import GripyIcon """ Add(self, item, int proportion=0, int flag=0, int border=0, ...
apache-2.0
7,788,121,389,774,640,000
30.891207
99
0.588579
false
3.806974
false
false
false
edusegzy/pychemqt
lib/mEoS/mXylene.py
1
2664
#!/usr/bin/python # -*- coding: utf-8 -*- from lib.meos import MEoS from lib import unidades class mXylene(MEoS): """Multiparameter equation of state for m-xylene""" name = "m-xylene" CASNumber = "108-38-3" formula = "C8H10" synonym = "1,3-dimethylbenzene" rhoc = unidades.Density(282.929725) ...
gpl-3.0
-1,377,790,976,608,276,000
33.153846
107
0.477477
false
2.298533
false
false
false
Natim/sentry
tests/sentry/api/endpoints/test_group_details.py
10
5479
from __future__ import absolute_import, print_function from django.core.urlresolvers import reverse from sentry.models import ( Activity, Group, GroupAssignee, GroupBookmark, GroupSeen, GroupStatus, GroupTagValue, Release ) from sentry.testutils import APITestCase class GroupDetailsTest(APITestCase): de...
bsd-3-clause
-8,151,098,734,682,799,000
27.836842
74
0.583318
false
3.941727
true
false
false
0todd0000/rft1d
rft1d/examples/val_max_7_cca_0d.py
2
1937
from math import sqrt,log import numpy as np from scipy import stats from matplotlib import pyplot def here_cca(y, x): N = y.shape[0] X,Y = np.matrix(x.T).T, np.matrix(y) Z = np.matrix(np.ones(N)).T Rz = np.eye(N) - Z*np.linalg.inv(Z.T*Z)*Z.T XStar = Rz * X YStar = R...
gpl-3.0
-7,678,448,358,227,951,000
26.671429
105
0.571502
false
2.496134
false
false
false
Laurawly/tvm-1
tests/python/relay/test_pass_convert_op_layout.py
1
54890
# 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
7,701,969,506,247,526,000
33.609079
98
0.515613
false
3.256987
true
false
false
mufaddalq/cloudstack-datera-driver
test/integration/smoke/test_scale_vm.py
1
7802
# 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
5,259,124,030,613,860,000
33.522124
120
0.54345
false
4.589412
true
false
false
beingmeta/mongo-c-driver
build/generate-opts.py
1
15865
#!/usr/bin/env python # # Copyright 2017-present MongoDB, 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 applicab...
apache-2.0
2,346,167,994,309,864,400
38.6625
443
0.625969
false
3.640431
false
false
false
wadevries/froggle
froggle.py
1
5491
#!/usr/bin/env python import argparse from collections import defaultdict import datetime import json import os from freckle_client.client import FreckleClientV2 from api_client import TogglClientApi FRECKLE_PROJECTS = None def get_freckle_projects(): global FRECKLE_PROJECTS if FRECKLE_PROJECTS is None: ...
mit
8,678,679,941,755,807,000
33.10559
127
0.637771
false
3.53119
true
false
false
bgossele/geminicassandra
geminicassandra/sql_utils.py
1
2703
""" these are utilities to parse and transform SQL statements """ import re import sys def get_select_cols_and_rest(query): """ Separate the a list of selected columns from the rest of the query Returns: 1. a list of the selected columns 2. a string of the rest of the query after the...
mit
36,348,952,126,758,340
28.380435
71
0.613393
false
3.682561
false
false
false
springmeyer/djmapnik
djmapnik/utils.py
1
2379
# std lib import os import tempfile import platform from subprocess import Popen, PIPE # mapnik import mapnik def call(cmd,fail=False): try: response = Popen(cmd.split(' '),stdin=PIPE, stdout=PIPE, stderr=PIPE) cm = response.communicate() return cm[0] except Exception, e: if fa...
bsd-3-clause
-4,765,666,503,474,054,000
30.733333
86
0.570828
false
3.626524
false
false
false
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_visum/models/visum_functions.py
2
1174
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE import win32com.client as com def load_version_file(visum_dir, version_filename, visum_version_number=10): #Start up Visum COM server - requires win32com library try: Visum...
gpl-2.0
-5,944,514,526,650,683,000
32.529412
122
0.660988
false
3.612308
false
false
false
opennode/opennode-knot
opennode/knot/model/console.py
2
6957
from __future__ import absolute_import import subprocess import time from grokcore.component import context, baseclass from twisted.internet import defer from zope import schema from zope.component import provideSubscriptionAdapter from zope.interface import Interface, implements from opennode.oms.model.model.action...
gpl-3.0
-2,150,379,436,596,722,200
27.9875
107
0.628001
false
4.000575
false
false
false
bartoszj/Mallet
mallet/UIKit/UIScreen.py
1
3798
#! /usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2013 Bartosz Janda # # 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 w...
mit
-3,023,414,776,274,798,600
44.214286
103
0.675355
false
4.234114
false
false
false
madfist/aoc2016
aoc2016/day21/main.py
1
4813
import sys import re def rotate(i,d,s): if d == 'right': i = -i return s[i:] + s[:i] def rotate_pos_table(n): table = [-1]*n for i in range(n): j = i + 1 if i >= 4: j += 1 if j >= n: j -= n if i + j >= n: table[i+j-n] = j ...
mit
6,083,369,895,224,008,000
37.206349
84
0.468523
false
3.061705
false
false
false
mennanov/django-blueprint
project_name/apps/staticpages/models.py
1
3932
# -*- coding: utf-8 -*- from urlparse import urlparse import os.path from django.core.urlresolvers import resolve, Resolver404, reverse from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.validators import RegexValidator from mptt.models import MPTTModel, TreeForeignKey...
gpl-2.0
2,181,705,280,944,567,800
35.407407
120
0.577823
false
4.205348
false
false
false
UnnikrishnanBhargavakurup/git-report
util.py
2
3002
import locale import sys import os import os.path import subprocess if sys.platform == 'win32': import ctypes def safe_unicode(s): '''Creates unicode object from string s. It tries to decode string as UTF-8, fallbacks to current locale or ISO-8859-1 if both decode attemps fail''' if type(s) == uni...
gpl-2.0
3,501,534,165,444,827,600
24.65812
90
0.592938
false
3.729193
false
false
false
cortesi/mitmproxy
mitmproxy/version.py
3
1296
import os import subprocess import sys VERSION = "5.0.0.dev" PATHOD = "pathod " + VERSION MITMPROXY = "mitmproxy " + VERSION # Serialization format version. This is displayed nowhere, it just needs to be incremented by one # for each change in the file format. FLOW_FORMAT_VERSION = 7 def get_dev_version() -> str: ...
mit
-1,990,845,984,088,747,300
27.173913
100
0.617284
false
3.681818
false
false
false
d3banjan/polyamide
polyamide/polyamide/settings.py
1
2713
""" Django settings for polyamide project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
bsd-2-clause
2,909,604,421,848,923,000
25.086538
71
0.689274
false
3.451654
false
false
false