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
ivknv/yadisk
yadisk/objects/disk.py
1
4233
# -*- coding: utf-8 -*- from .yadisk_object import YaDiskObject __all__ = ["DiskInfoObject", "SystemFoldersObject", "UserObject", "UserPublicInfoObject"] class DiskInfoObject(YaDiskObject): """ Disk information object. :param disk_info: `dict` or `None` :ivar max_file_size: `int`, maxim...
lgpl-3.0
3,143,176,318,843,953,000
39.314286
92
0.494448
false
4.423197
false
false
false
r3c/Creep
creep/src/trackers/git.py
1
3827
#!/usr/bin/env python3 from ..action import Action from ..process import Process import os import tempfile class GitTracker: def current(self, base_path): revision = Process (['git', 'rev-parse', '--quiet', '--verify', 'HEAD']) \ .set_directory (base_path) \ .execute () if rev...
mit
-2,113,926,184,813,428,200
31.709402
116
0.53619
false
3.933196
false
false
false
crslab/Inverse-Reinforcement-Learning
irl/mdp/objectworld.py
1
6951
""" Implements the objectworld MDP described in Levine et al. 2011. Matthew Alger, 2015 matthew.alger@anu.edu.au """ import math from itertools import product import numpy as np import numpy.random as rn from .gridworld import Gridworld class OWObject(object): """ Object in objectworld. ...
mit
8,282,969,896,774,540,000
31.418269
80
0.488994
false
4.202539
false
false
false
theetcher/fxpt
fxpt/fx_smart_normal/backuper.py
1
2150
import maya.cmds as m class Backuper(object): """ :type mesh: str :type transform: str :type origMeshCopy: str :type vcDisplay: bool :type vcColorChannel: str :type normalDisplay: tuple[bool] """ def __init__(self, mesh, transform): self.mesh = mesh self.transform ...
mit
-2,571,972,561,220,745,700
32.59375
103
0.653953
false
3.571429
false
false
false
devpixelwolf/Pixelboard
fabfile.py
1
2565
#!/usr/bin/env python # -*- coding: utf-8 -*- # Version 1.0 import time import os from fabric.api import * ## ## Available environments ## # def production(): # env.domain = 'sandbox.bitsteak.com.br' # env.hosts = ['root@bitsteak.com'] # env.app_root = '/srv/sandbox.bitsteak.com.br/www/' # env.git...
gpl-3.0
-6,526,536,885,117,081,000
28.825581
99
0.630799
false
3.094089
false
false
false
sunlightlabs/the-phantom-mask
lib/imap_courier.py
1
5157
import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir)) from imaplib import IMAP4, IMAP4_SSL from config import settings from models import Legislator from models import Message from models import MessageLegislator import email from email.parser import Parser fr...
mit
8,569,206,422,131,749,000
33.851351
111
0.614892
false
3.775256
false
false
false
agiliq/Dinette
dinette/views.py
1
16008
from django.http import ( HttpResponse, Http404, HttpResponseForbidden, HttpResponseRedirect) from django.shortcuts import render_to_response, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from django.template import RequestContext from django.template.loader import rende...
bsd-3-clause
2,990,707,530,713,374,000
36.227907
141
0.658858
false
3.697852
false
false
false
sthenc/nc_packer
epoch_choicer.py
1
1149
#!/usr/bin/python # opposite direction because recent data is more important suf = ".autosave" pref1 = "run8/autosave_run8_epoch" ch1 = [i for i in range(216, 184, -4)] ch1.extend([ 184, 182]) for c in ch1: print(pref1 + ("%03d" % c) + suf) pref2 = "run7/autosave_run7_epoch" ch2 = [181, 180, 171, 145, 138, 1...
mit
4,891,696,569,208,643,000
16.953125
80
0.590949
false
2.112132
false
false
false
ivotron/teuthology
teuthology/nuke.py
1
18235
import argparse import logging import os import subprocess import time import yaml from StringIO import StringIO import teuthology from . import orchestra import orchestra.remote from .orchestra import run from .config import FakeNamespace from .lock import list_locks from .lock import unlock_one from .lock import fin...
mit
-7,906,334,562,470,363,000
31.160494
79
0.511489
false
3.831687
true
false
false
OpenOil-UG/aleph
aleph/model/collection.py
1
2558
import logging from datetime import datetime from aleph.core import db, url_for from aleph.model.role import Role from aleph.model.schema_model import SchemaModel from aleph.model.permission import Permission from aleph.model.common import SoftDeleteModel, IdModel, make_token log = logging.getLogger(__name__) class...
mit
3,249,310,778,231,797,000
32.220779
79
0.623925
false
3.965891
false
false
false
eerorika/ansible
test/units/playbook/role/test_include_role_deps.py
1
3093
# (c) 2017, Eero Rikalainen <eerorika@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) any later ve...
gpl-3.0
3,483,967,341,515,143,000
34.551724
76
0.626899
false
3.985825
true
false
false
XBMC-Addons/script.kodi.loguploader
default.py
1
7590
import os import re import socket import pyqrcode import requests import xbmc import xbmcgui import xbmcaddon import xbmcvfs ADDON = xbmcaddon.Addon() ADDONID = ADDON.getAddonInfo('id') ADDONNAME = ADDON.getAddonInfo('name') ADDONVERSION = ADDON.getAddonInfo('version') CWD = ADDON.getAddonInfo('path').decode('utf-8') ...
gpl-2.0
4,399,360,793,040,879,000
36.205882
143
0.552437
false
3.876404
false
false
false
winstonwolff/expectorant
expectorant/expector.py
1
6636
from collections import namedtuple from pathlib import Path from pprint import pformat import difflib Outcome = namedtuple("Outcome", 'source source_line passing description') def caller_source_code(frames_up=2): import inspect src = inspect.stack(context=1)[frames_up] return src # return "{} ({}:{})"...
mit
8,168,259,780,488,658,000
33.206186
111
0.575196
false
3.749153
false
false
false
watchdogpolska/watchdog-kj-kultura
watchdog_kj_kultura/organizations_requests/management/commands/send_requests_notifications.py
1
1663
from django.core.management import BaseCommand from ...models import Request, Notification, Event from ...emails import RequestNotificationEmail from django.utils.timezone import now class Command(BaseCommand): help = "Command to create and send notification to remind user about the request." email = RequestN...
mit
-8,004,863,543,553,519,000
47.911765
88
0.601323
false
5.416938
false
false
false
viaict/viaduct
migrations/versions/2016_10_08_48c16211f99_added_summary_table.py
1
1313
"""Added summary table Revision ID: 48c16211f99 Revises: 404db3c1f74 Create Date: 2016-10-08 22:36:11.305570 """ # revision identifiers, used by Alembic. revision = '48c16211f99' down_revision = '2105015bafe' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic ...
mit
-5,939,818,993,519,040,000
32.666667
112
0.675552
false
3.384021
false
false
false
kevinhikali/ml_kevin
py_demo/numpy_demo.py
1
1760
import numpy as np # there are many matrix calculation methods in numpy.linalg import numpy.linalg as nplg print 'numpy version:',np.version.version print 'array generate methods' print np.array([1,23,4,12,]) print np.array((2,1,23,412)) print np.array([[1,2,3,1,], [2131231,2123]]) print np.array([[1,2,3], [2,3,4,], ...
gpl-3.0
-3,376,515,876,725,916,700
21.564103
80
0.685227
false
2.687023
false
false
false
zaan/django-img-crop
django_img_crop/views.py
1
4380
import os import Image from time import time from django.conf import settings from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.translation import ugettext as _ from fo...
mit
5,531,487,847,155,374,000
35.806723
145
0.682877
false
2.862745
false
false
false
cgarrard/osgeopy-code
Chapter5/chapter5.py
1
9456
import os import sys from osgeo import ogr import ospybook as pb from ospybook.vectorplotter import VectorPlotter # Set this variable to your osgeopy-data directory so that the following # examples will work without editing. We'll use the os.path.join() function # to combine this directory and the filenames to make a...
mit
-5,656,014,063,191,784,000
34.954373
80
0.702623
false
3.228406
false
false
false
firebitsbr/powerline
powerline/lint/markedjson/error.py
2
3404
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import re from powerline.lib.unicode import unichr NON_PRINTABLE = re.compile('[^\t\n\x20-\x7E' + unichr(0x85) + (unichr(0xA0) + '-' + unichr(0xD7FF)) + (unichr(0xE000) + '-' + unichr(0xFFFD...
mit
5,769,383,903,245,607,000
24.787879
148
0.640423
false
2.843776
false
false
false
Netflix/security_monkey
security_monkey/common/sts_connect.py
1
4066
# Copyright 2014 Netflix, 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...
apache-2.0
9,064,242,547,383,711,000
36.648148
87
0.638711
false
3.98237
false
false
false
TriOptima/tri.declarative
lib/tri_declarative/declarative.py
1
5397
from copy import copy from .util import ( add_args_to_init_call, add_init_call_hook, ) def declarative(member_class=None, parameter='members', add_init_kwargs=True, sort_key=None, is_member=None): """ Class decorator to enable classes to be defined in the style of django models. That is, ...
bsd-3-clause
8,765,115,628,723,374,000
40.198473
160
0.629794
false
4.170788
false
false
false
zaffra/Inquire
GAE/model.py
1
3048
## # model.py # # This file is where we model the objects used by our web app # for storing in the App Engine datastore. # # Note: we're taking advantage of a great project called GeoModel # that allows us to easily query geospatial information from # the datastore. Our primary use of this model is to perform # pro...
bsd-3-clause
-2,923,595,879,642,233,300
30.75
92
0.661745
false
4.239221
false
false
false
gakarak/BTBDB_ImageAnalysisSubPortal
experimental_code/step01_Divide_Segmented_Lungs/run02_morfological_dividing_v2.py
1
1674
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'ar' import os import glob import json import matplotlib import matplotlib.pyplot as plt import nibabel as nib import run00_common as comm ############################################# if __name__ == '__main__': wdir = '../../experimental_data/resize-256x256...
apache-2.0
8,854,542,682,235,234,000
35.391304
139
0.589606
false
2.891192
false
false
false
Iepoev/vsc-mympirun
bin/mympirun.py
1
4713
#!/usr/bin/env python # # Copyright 2009-2016 Ghent University # # This file is part of vsc-mympirun, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # the Fl...
gpl-2.0
-1,473,035,800,161,169,700
37.008065
120
0.676851
false
3.570455
false
false
false
Parsl/parsl
parsl/executors/extreme_scale/executor.py
1
9106
"""HighThroughputExecutor builds on the Swift/T EMEWS architecture to use MPI for fast task distribution """ import logging try: import mpi4py except ImportError: _mpi_enabled = False else: _mpi_enabled = True from parsl.errors import OptionalModuleMissing from parsl.executors.high_throughput.executor im...
apache-2.0
-6,502,064,878,754,602,000
44.303483
128
0.561608
false
4.669744
false
false
false
ioan-dragan/python-scripts
loadLeveler/getProblems.py
1
1175
#!/usr/bin/env python # Copyright (C) 2014 Ioan Dragan # 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 progr...
gpl-2.0
2,053,442,974,124,643,000
29.921053
82
0.706383
false
3.929766
false
false
false
kendricktan/rarepepes
app.py
1
2334
import re import os import sys import flask import base64 import torchvision.transforms as transforms from io import BytesIO from PIL import Image # Append pix2pix filepath to app.py module_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pix2pix') if module_path not in sys.path: sys.path.append(m...
mit
-179,980,160,626,608,500
27.120482
81
0.657669
false
3.171196
false
false
false
tedlaz/pyted
pyQtAccounting/qtree.py
1
11616
# -*- coding: utf-8 -*- from PyQt4 import QtCore, QtGui import sys #import icons_rc import sqlite3 import decimal import qtreedata as d def isNum(value): # Einai to value arithmos, i den einai ? """ use: Returns False if value is not a number , True otherwise input parameters : 1.value : the va...
gpl-3.0
9,071,525,992,216,160,000
32.890533
197
0.576131
false
3.540649
false
false
false
mpkasp/indabom
fabfile.py
1
8105
from fabric.api import * from fabric.operations import local from fabric.contrib.console import confirm from fabric.network import ssh from time import localtime import calendar import fabric import os ssh.util.log_to_file("indabom_ssh.log", 10) """ Restarting is annoying because supervisord requires root to run star...
mit
7,624,837,114,576,980,000
28.472727
224
0.62628
false
3.248497
true
false
false
alfredodeza/execnet
execnet/multi.py
1
10365
# -*- coding: utf-8 -*- """ Managing Gateway Groups and interactions with multiple channels. (c) 2008-2014, Holger Krekel and others """ import atexit import sys from functools import partial from threading import Lock from execnet import gateway_bootstrap from execnet import gateway_io from execnet import XSpec from...
mit
8,439,840,678,968,892,000
31.697161
87
0.566233
false
4.30619
false
false
false
thorsilver/Modelling-academic-job-security
Population.py
1
20911
from random import Random from random import randint import random, math import collections import operator from FundingAgency import FundingAgency from Academic import Academic from Application import Application class Population: """ A population of academic agents. This class handles population level...
mit
-8,433,565,412,308,054,000
32.404153
137
0.550906
false
3.829152
false
false
false
Xorgon/SudokuSolver
sudoku.py
1
6233
import numpy as np import math sudoku = np.zeros([9, 9], dtype=list) def deserialize_sudoku(serialized): """ a b c d e f g h i j k l . . . . . . . . . . . . . . . would be from abcdefghijkl... """ serialized = serialized.replace(",", "") if len(serialized) != 9*9: print(...
mit
-2,852,952,344,495,978,500
26.702222
78
0.468474
false
3.003855
true
false
false
losvald/pkmin
pkmin.py
1
24781
# pkmin.py # # Copyright (C) 2014 Leo Osvald (leo.osvald@gmail.com) # # This file is part of PKMin. # # PKMin 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 opti...
gpl-3.0
6,665,192,525,232,684,000
35.123907
80
0.58444
false
3.383534
false
false
false
infolk11/btw17
Website/BTW2017/settings.py
1
3235
""" Django settings for BTW2017 project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ ...
gpl-3.0
-8,139,192,510,661,002,000
24.958333
91
0.661824
false
3.554945
false
false
false
zhengbx/BBQ
dmet_hyd.20130129/vcor_fit.py
1
9443
# This program is free software. It comes without any warranty, to the extent # permitted by applicable law. You may use it, redistribute it and/or modify # it, in whole or in part, provided that you do so at your own risk and do not # hold the developers or copyright holders liable for any claim, damages, or # other l...
gpl-3.0
-3,398,994,360,842,158,000
40.599119
101
0.602351
false
3.143475
false
false
false
DaRasch/spiceminer
spiceminer/kernel/highlevel.py
1
6296
#!/usr/bin/env python #-*- coding:utf-8 -*- import os import itertools from . import lowlevel from .. import bodies from .. import util __all__ = ['Kernel'] class Kernel(object): '''A loaded Kernel. Attributes ---------- *classattribute* LOADED: set of Kernel All loaded kernels. *class...
mit
-4,641,026,678,520,372,000
31.963351
88
0.577827
false
4.15852
false
false
false
Oros42/IMSI-catcher
simple_IMSI-catcher.py
1
24759
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: Oros # Contributors : # purwowd # puyoulu # 1kali2kali # petterreinholdtsen # nicoeg # dspinellis # fdl <Frederic.Lehobey@proxience.com> # 2020-08-15 # License : CC0 1.0 Universal """ This program shows you IMSI numbers of cellphones around you. /! This...
cc0-1.0
-2,029,567,488,360,673,000
39.455882
248
0.513349
false
3.088312
false
false
false
lingtools/lingtools
download_linked_files.py
1
3016
#!/usr/bin/env python """Download all linked files from a webpage. This is particularly handy for dowloading data from CHILDES. """ # Copyright 2012-2014 Constantine Lignos # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
apache-2.0
-765,197,504,240,066,000
29.464646
78
0.640584
false
4.005312
false
false
false
thp44/delphin_6_automation
delphin_6_automation/delphin_setup/delphin_permutations.py
1
21335
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import copy from collections import namedtuple, OrderedDict import typing # RiBuild Modules: from delphin_6_automation....
mit
1,362,833,787,734,044,200
36.962633
128
0.598781
false
4.038425
false
false
false
charlyoleg/Cnc25D
scr/micropreprocessor.py
1
4687
#!/usr/bin/env python # -*- coding:utf-8 -*- # micropreprocessor.py # read a python script, process the include statement, write the output python script # created by charlyoleg on 2013/06/06 # # (C) Copyright 2013 charlyoleg # # This file is part of the Cnc25D Python package. # # Cnc25D is free software: you can re...
gpl-3.0
2,944,187,324,606,743,600
35.333333
164
0.582675
false
3.711006
false
false
false
pemami4911/Sub8
simulation/sub8_simulation/nodes/simulate.py
1
3393
#!/usr/bin/env python from sub8_sim_tools import rendering, physics from sub8_sim_tools.widgets import Sub from sub8_sim_tools.physics import Box, Sphere, Mesh from sub8_sim_tools.meshes import Transdec from rosgraph_msgs.msg import Clock from vispy import app, gloo import numpy as np import rospy class SimWorld(rend...
mit
2,134,355,468,166,770,000
37.556818
120
0.599764
false
3.162162
false
false
false
atiaxi/chromabot
alembic/versions/4638ed8c54d9_added_ends_and_resol.py
1
1996
"""Added ends and resolved columns to SkirmishAction Revision ID: 4638ed8c54d9 Revises: 41fe909190d3 Create Date: 2013-11-12 00:33:13.881217 """ # revision identifiers, used by Alembic. revision = '4638ed8c54d9' down_revision = '41fe909190d3' from alembic import op import sqlalchemy as sa def upgrade(engine_name)...
mit
-3,239,898,689,971,482,600
28.352941
89
0.675852
false
3.394558
false
false
false
Kami/python-libcloud-dns-to-bind-zone
example.py
1
1177
# Licensed to Tomaz Muraus under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # Tomaz muraus licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in...
apache-2.0
-5,721,995,119,646,122,000
36.967742
78
0.767205
false
3.666667
false
false
false
dezede/dezede
common/utils/abbreviate.py
1
1498
import re from .html import hlp from .text import remove_diacritics VOWELS = 'AEIOUYaeiouy' def abbreviate(text, min_len=1, tags=True, enabled=True): """ Abrège les mots avec une limite de longueur (par défaut 1). >>> print(abbreviate('amélie')) <span title="Amélie">a.</span> >>> print(abbrevi...
bsd-3-clause
7,176,537,590,746,908,000
27.615385
70
0.567876
false
2.923379
false
false
false
giampaolo/psutil
scripts/procsmem.py
2
3756
#!/usr/bin/env python3 # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Show detailed memory usage about all (querable) processes. Processes are sorted by their "USS" (Unique Set Size) memory, which...
bsd-3-clause
-8,326,130,574,824,573,000
35.115385
78
0.523429
false
2.985692
false
false
false
albertfdp/dtu-data-mining
meneame/src/sentiments/sentiments.py
1
1855
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Module that computes the sentiment for a given text and a given map with word => (valence, arousal) """ from nltk.tokenize import PunktWordTokenizer from nltk.stem import SnowballStemmer STEMMER = SnowballStemmer('spanish') def get_sentiment(sentiment_db, txt...
apache-2.0
5,631,337,603,729,598,000
28.903226
70
0.61219
false
3.310714
false
false
false
silly-wacky-3-town-toon/SOURCE-COD
toontown/pets/PetGoal.py
1
7692
from direct.task import Task from direct.fsm import FSM, ClassicFSM, State from toontown.toonbase.ToonPythonUtil import randFloat, Functor from direct.directnotify import DirectNotifyGlobal from toontown.pets import PetConstants from toontown.toon import DistributedToonAI class PetGoal(FSM.FSM): notify = DirectNot...
apache-2.0
-3,622,581,156,598,336,500
28.136364
307
0.629615
false
3.730359
false
false
false
opendatakosovo/proglang-questionnaire
plq/views/index.py
1
1381
from flask import current_app, request, render_template, redirect, url_for from flask.views import MethodView from plq.views.indexform import IndexForm from plq.utils.utils import Utils from plq import mongo utils = Utils() class Index(MethodView): methods = ['GET', 'POST'] def get(self): ''' Dispat...
gpl-2.0
4,229,449,802,722,540,500
29.688889
110
0.616944
false
3.879213
false
false
false
explosion/spaCy
spacy/lang/bg/tokenizer_exceptions.py
1
2189
from ...symbols import ORTH, NORM _exc = {} _abbr_exc = [ {ORTH: "м", NORM: "метър"}, {ORTH: "мм", NORM: "милиметър"}, {ORTH: "см", NORM: "сантиметър"}, {ORTH: "дм", NORM: "дециметър"}, {ORTH: "км", NORM: "километър"}, {ORTH: "кг", NORM: "килограм"}, {ORTH: "мг", NORM: "милиграм"}, {...
mit
-1,033,455,460,664,125,600
26.044776
39
0.491722
false
1.786982
false
false
false
quiltdata/quilt-compiler
lambdas/search/tests/test_search.py
1
14286
""" Test the ES service that talks to ES for stats, queries, etc. """ import json import os from unittest import TestCase from unittest.mock import patch from urllib.parse import urlencode import responses from index import lambda_handler, post_process ES_STATS_RESPONSES = { 'all_gz': { 'took': 22, ...
apache-2.0
4,785,587,350,396,093,000
39.700855
101
0.50693
false
3.748622
true
false
false
dslutz/qemu
tests/image-fuzzer/qcow2/layout.py
27
27123
# Generator of fuzzed qcow2 images # # Copyright (C) 2014 Maria Kustova <maria.k@catit.be> # # 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...
gpl-2.0
4,030,832,591,465,905,000
43.318627
79
0.531689
false
4.168921
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/damselfly/package.py
1
1632
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
2,002,166,518,824,642,800
44.333333
78
0.670956
false
3.830986
false
false
false
bthirion/nipy
nipy/io/nifti_ref.py
1
25527
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ An implementation of some of the NIFTI conventions as desribed in: http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h A version of the same file is in the nibabel repisitory at ``doc/source/exte...
bsd-3-clause
-4,267,929,288,868,548,600
40.439935
81
0.627257
false
3.639954
false
false
false
Ernti/GG
gg/GGwindowbutton.py
1
2655
''' Created on 1 Mar 2014 @author: tore ''' from OpenGL.GL import * import pygame class WindowButton(object): def __init__(self, window, text, x, y, w, h, action): self.window = window self.text = text self.posx = x self.posy = y self.width = w self.height = h ...
gpl-2.0
5,082,579,712,952,476,000
40.5
110
0.571375
false
3.369289
false
false
false
montyly/manticore
manticore/platforms/decree.py
1
41406
from . import cgcrandom # TODO use cpu factory from ..native.cpu.x86 import I386Cpu from ..native.cpu.abstractcpu import Interruption, ConcretizeRegister, ConcretizeArgument from ..native.memory import SMemory32, Memory32 from ..core.smtlib import * from ..core.state import TerminateState from ..binary import CGCElf f...
apache-2.0
-1,126,448,859,304,932,900
35.416887
126
0.552577
false
3.971037
false
false
false
roughhawkbit/robs-python-scripts
toolbox_elmer.py
1
48287
#/usr/bin/python from __future__ import division from __future__ import with_statement import math import matplotlib from matplotlib import pyplot from mpl_toolkits.axes_grid1 import make_axes_locatable import numpy from numpy import mean as amean import os import re from scipy.spatial import Delaunay from scipy.spatia...
mit
-5,853,865,451,722,241,000
48.780412
117
0.564044
false
3.344902
false
false
false
ecell/ecell3
ecell/frontend/model-editor/ecell/ui/model_editor/LayoutBuffer.py
1
4817
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # This file is part of the E-Cell System # # Copyright (C) 1996-2016 Keio University # Copyright (C) 2008-2016 RIKEN # Copyright (C) 2005-2009 The Molecular Sciences Institute # #:::::::::::::::::::::::::::::::::::::::...
lgpl-3.0
-1,260,243,030,828,405,800
29.10625
89
0.661615
false
4.138316
false
false
false
docteurmicro50/xivo-provd-plugins
plugins/xivo-polycom/common/common.py
1
14163
# -*- coding: utf-8 -*- # Copyright (C) 2010-2014 Avencall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This p...
gpl-3.0
1,280,985,382,817,542,400
41.659639
148
0.599449
false
3.447663
true
false
false
bwohlberg/sporco
sporco/admm/rpca.py
1
7349
# -*- coding: utf-8 -*- # Copyright (C) 2015-2020 by Brendt Wohlberg <brendt@ieee.org> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """Classes for ADMM algorithm...
bsd-3-clause
-2,741,023,632,627,520,500
27.034351
78
0.555071
false
3.575949
false
false
false
mattljc/LaminateTools
oldSauce/RevB/constants.py
1
12650
import numpy as np import materials import lamination from copy import deepcopy class LaminateProperties(object): # Superclass containing the basic constructor and essential contract # through which the LaminateProperties subclasses operate. def __init__(self, lam=None): # Constructor wants a Laminate type as it...
apache-2.0
-167,906,285,634,180,700
35.988304
92
0.680474
false
2.689201
false
false
false
RevolutionMC/Revolution
plugin.program.revolutionwiz/default.py
1
98397
import xbmc, xbmcaddon, xbmcgui, xbmcplugin,os,base64,sys,xbmcvfs import shutil import urllib2,urllib import re import extract import downloader import time import plugintools from addon.common.addon import Addon from addon.common.net import Net import CheckPath import zipfile import ntpath USER_AGENT = 'Mozilla/5.0...
gpl-2.0
5,437,638,291,818,375,000
45.989971
737
0.559712
false
3.843633
false
false
false
emonty/burrow
burrow/tests/backend/test_sqlite.py
1
2619
# Copyright (C) 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
2,879,841,634,229,188,600
29.103448
76
0.714777
false
4.05418
true
false
false
DataONEorg/d1_python
lib_common/src/d1_common/revision.py
1
4980
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
apache-2.0
-5,635,555,437,426,671,000
34.571429
88
0.683133
false
3.595668
false
false
false
GwenIves/Exercises
pip3/3_1_external_sites.py
1
1034
#!/bin/env python3 import sys import collections def main(): sites = collections.defaultdict(set) for filename in sys.argv[1:]: try: with open(filename) as open_file: for line in open_file: add_sites(line, sites, filename) except EnvironmentErro...
mit
3,038,521,960,152,139,000
20.102041
61
0.510638
false
3.858209
false
false
false
talos/docker4data
images/cli/scripts/index.py
1
2986
#!/usr/bin/env python ''' Bulk add docs to an elasticsearch index. ''' import sys import os import json import logging import subprocess #import time LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.INFO) LOGGER.addHandler(logging.StreamHandler(sys.stderr)) #def shell(cmd, max_attempts=7): def shell(cm...
gpl-3.0
-567,251,282,825,132,400
26.906542
97
0.489618
false
4.062585
false
false
false
yjftsjthsd-g/imgMov
imgMov.py
1
1052
#!/usr/bin/env python3 from tkinter import * from sys import argv from PIL import Image class App: def __init__(self, master, photo, destA, destB): frame = Frame(master) frame.pack() self.f = frame self.destA = destA self.destB = destB self.button = Button(frame, text="Cancel", command=frame.quit) se...
gpl-3.0
7,543,855,924,373,979,000
24.047619
79
0.690114
false
2.718346
false
false
false
Farious/PersonTracker
Source/Detection.py
1
1396
# -*- coding: utf-8 -*- # Copyright {2014} {Instituto Superior Técnico - Lisboa} # # 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
1,183,749,409,419,942,700
33.02439
77
0.601865
false
3.861496
false
false
false
mikeakohn/naken_asm
tests/disasm/ps2_ee.py
1
3598
#!/usr/bin/env python3 import os, sys reg_nums = [] instructions = [] errors = 0 alias = [ "negu", "not" ] # -------------------------- fold here ----------------------------- print("Disassembler: PS2 EE") for i in range(0, 32): reg_nums.append("$" + str(i)) fp = open("../comparison/ps2_ee.txt", "r") out = ope...
gpl-3.0
6,130,082,124,102,843,000
23.47619
92
0.475542
false
2.94918
false
false
false
alexnikolov/German-dictionary
german_dictionary/dictionary.py
1
3165
from german_dictionary.db_handler import DatabaseHandler, DatabaseError from german_dictionary.noun import Noun from german_dictionary.verb import Verb from german_dictionary.adjective import Adjective from german_dictionary.trie import Trie import sys class Dictionary: def __init__(self, database, trie=False): ...
gpl-2.0
8,244,289,804,022,732,000
30.969697
76
0.588626
false
3.804087
false
false
false
uwosh/uwosh.grants
wfsubscribers.py
1
5133
from Products.CMFCore.utils import getToolByName def validateSubmit(obj, event): if not event.transition or \ event.transition.id not in ['submit']: return containedItems = obj.listFolderContents() if len(containedItems) < 1: from Products.CMFCore.utils import getToolByName ...
gpl-2.0
-1,217,388,438,452,703,000
43.634783
190
0.682057
false
3.876888
false
false
false
EPFL-LCSB/pytfa
pytfa/io/dict.py
1
13773
# -*- coding: utf-8 -*- """ .. module:: pytfa :platform: Unix, Windows :synopsis: Thermodynamics-based Flux Analysis .. moduleauthor:: pyTFA team Make the model serializable """ from collections import OrderedDict, defaultdict import cobra.io.dict as cbd from cobra.exceptions import SolverNotFound ...
apache-2.0
-979,109,936,395,282,300
28.072052
89
0.54861
false
3.738599
false
false
false
michaupl/wordtester
src/ui/TestDialog.py
1
6595
#-*- coding: utf-8 -*- from __future__ import division from PyQt4.QtCore import SIGNAL from PyQt4.QtGui import QDialog, QKeySequence, QMessageBox import ui_TestDialog class TestDialog(QDialog, ui_TestDialog.Ui_testDialog): """ Dialog whith which user interacts when performing a test on words. """ de...
apache-2.0
-8,151,204,724,345,546,000
41.006369
104
0.603942
false
4.32459
true
false
false
CarlosCorreiaM16e/bismarck
bismarck_cli/utils/storage.py
1
5412
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Provides: - List; like list but returns None instead of IndexOutOfBounds - Storage; like dictionary allowi...
gpl-3.0
1,520,689,136,867,035,600
30.103448
238
0.49187
false
3.371963
false
false
false
esthermm/odoo-addons
mrp_product_profit/models/mrp.py
1
7187
# -*- coding: utf-8 -*- # © 2016 Esther Martín - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import api, fields, models from openerp.addons import decimal_precision as dp class MrpProductionProductLine(models.Model): _inherit = 'mrp.production.product.line' @api.de...
agpl-3.0
4,595,033,514,409,222,000
42.023952
77
0.623382
false
3.969613
false
false
false
maycontainsoy/sdShellParameter
Test/genAndRunMods.py
1
9020
# ------------------------------------------------------------------- # # Functions of genAndRun routine # ------------------------------------------------------------------- # # :: scaledUSDB # Creates scaed USDB input files for each nuclide # # :: createNorm # Creates normal file input for Bigstick, 1 for each n...
apache-2.0
-4,359,402,522,532,452,400
39.093333
119
0.490022
false
2.459776
false
false
false
bounswe/bounswe2016group12
WEB-BACKEND/Meanco/MeancoApp/functions/search.py
1
4040
"""@package functions View documentation """ import requests import re from MeancoApp.models import * ## Gets reference from wikidata and create reference models. def getRefOfTopic(topicName,TopicId): payload = { 'action': 'wbsearchentities', 'language': 'en', 'search': topicName, ...
apache-2.0
-7,675,987,145,616,353,000
37.855769
100
0.602723
false
3.458904
false
false
false
bluefish/kdi
src/python/alien/gzdata.py
1
2444
#!/usr/bin/env python # # Copyright (C) 2006 Josh Taylor (Kosmix Corporation) # Created 2006-03-29 # # This file is part of Alien. # # Alien 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 o...
gpl-2.0
-2,639,568,294,548,950,000
34.42029
84
0.572013
false
3.993464
false
false
false
kzys/buildbot
contrib/bk_buildbot.py
1
4653
#!/usr/local/bin/python # # BitKeeper hook script. # # svn_buildbot.py was used as a base for this file, if you find any bugs or # errors please email me. # # Amar Takhar <amar@ntp.org> ''' /path/to/bk_buildbot.py --repository "$REPOS" --revision "$REV" --branch \ "<branch>" --bbserver localhost --bbport 9989 ''' im...
gpl-2.0
8,496,642,071,310,753,000
27.2
99
0.565442
false
3.842279
false
false
false
c4fcm/oped-gender-report
data_acquisition/acquire_month_data.py
1
3654
import mediacloud import yaml import base_meta import csv from byline_gender import BylineGender import time import sys def extract_metadata(extractor, url=None, file_name=None, stories_id=None, import_full_text=False): extractor.make_soup(url=url,file_name=file_name,stories_id=stories_id,import_full_text=import_...
mit
4,826,131,479,466,116,000
50.464789
609
0.635194
false
2.722802
false
false
false
hwroitzsch/DayLikeTodayClone
venv/lib/python3.5/site-packages/rdflib/plugins/serializers/turtle.py
1
12230
""" Turtle RDF graph serializer for RDFLib. See <http://www.w3.org/TeamSubmission/turtle/> for syntax specification. """ from collections import defaultdict from rdflib.term import BNode, Literal, URIRef from rdflib.exceptions import Error from rdflib.serializer import Serializer from rdflib.namespace import RDF, RDF...
mit
8,712,548,799,010,190,000
30.119593
78
0.554865
false
4.131757
false
false
false
Ambuj-UF/ConCat-1.0
src/Utils/Bio/FSSP/__init__.py
1
9430
# This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # import sys # Add path to Bio sys.path.append('../..') """Parser for FSSP files, used in a database of protein fold classifications. This is a modul...
gpl-2.0
5,115,606,278,230,312,000
32.558719
86
0.560445
false
3.327452
false
false
false
z01nl1o02/tests
pyshow/cvtcategory.py
1
2001
import pandas as pd import numpy as np import os,sys,pdb from collections import Counter import argparse class CVT_CATEG: def __init__(self,df,datadir): self._df = df self._datadir = datadir self._categ2idx = {} try: os.makedirs(datadir) except Excepti...
gpl-2.0
-4,067,194,910,317,653,500
29.265625
80
0.505247
false
3.782609
false
false
false
WorldCount/rpocheckerDev
postparse/parsererror.py
1
1796
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Ошибки парсера почтовых файлов """ __date__ = "25.03.14" __author__ = 'WorldCount' __email__ = "world.count@yandex.ru" __copyright__ = "Copyright 2014, Scr1pt1k.Ru" class PostError(Exception): """ Общий класс для ошибок почтовых файлов @author WorldCoun...
gpl-2.0
4,730,379,997,881,666,000
14.44
45
0.611795
false
2.355725
false
false
false
anthraxx/jenkins.debian.net
bin/reproducible_db_maintenance.py
1
32905
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Copyright © 2015 Mattia Rizzolo <mattia@mapreri.org> # Copyright © 2015 Holger Levsen <holger@layer-acht.org> # Based on various reproducible_* files © 2014-2015 Holger Levsen <holger@layer-acht.org> # Licensed under GPL-2 # # Depends: python3 # # Track the database schema...
gpl-2.0
450,002,395,595,993,540
45.735795
137
0.557565
false
4.35615
false
false
false
cleonard1261/georgetown-calendar
setup.py
1
1803
#!/usr/bin/env python # setup # Setup script for gtcal # # Author: Benjamin Bengfort <bb830@georgetown.edu> # Created: Thu Mar 27 16:46:11 2014 -0400 # # Copyright (C) 2014 Georgetown University # For license information, see LICENSE.txt # # ID: setup.py [] bb830@georgetown.edu $ """ Setup script for gtcal """ ###...
mit
-6,280,106,959,353,594,000
27.619048
82
0.485857
false
4.334135
false
false
false
Loodoor/UrWorld-Alpha-3.x
src/skybox.py
1
3785
import pygame import math import os class Skybox: def __init__(self, screen, color): self.screen = screen self.ratio = self.screen.get_size()[1] - 35 self.difference_y = self.screen.get_size()[1] - self.ratio self.width = self.screen.get_size()[0] self.height = self.screen....
gpl-2.0
1,240,216,389,714,878,500
35.019048
131
0.550119
false
3.262295
false
false
false
JaneliaSciComp/osgpyplusplus
examples/rough_translated1/osgvnc.py
1
2648
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgvnc" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osgDB from osgpypp import osgViewer from osgpypp import osgWidget # Translated from file 'osgvnc.cpp' #includ...
bsd-3-clause
4,142,915,854,506,427,400
28.752809
148
0.5929
false
4.018209
false
false
false
mrgloom/h2o-3
h2o-py/h2o/group_by.py
1
4438
import h2o class GroupBy: """ A class that represents the group by operation on an H2OFrame. Sample usage: >>> my_frame = ... # some existing H2OFrame >>> grouped = my_frame.group_by(by=["C1","C2"],order_by="C1") >>> grouped.sum(col="X1",na="all").mean(col="X5",na="all").max() An...
apache-2.0
2,702,840,046,411,789,000
38.274336
116
0.597792
false
3.227636
false
false
false
Guhaifudeng/zhihukankan
question_util.py
1
6382
#encoding:utf-8 import word_util import numpy as np import codecs def transform_wordseq_to_phrase_weighted(word_seq,word2vec_map,word_weighted_value = None,word_keys = None): phrase_distributed = np.zeros(256) word_freq = {} for word in word_seq: #print("0") if not word_keys: if ...
apache-2.0
5,916,725,104,980,773,000
39.392405
109
0.542463
false
3.30845
false
false
false
jackdesert/lyxblogger
src/elyxer_io/bulk.py
1
2030
#! /usr/bin/env python # -*- coding: utf-8 -*- # eLyXer -- convert LyX source files to HTML output. # # Copyright (C) 2009 Alex Fernández # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundat...
gpl-3.0
-7,524,253,225,636,297,000
27.577465
73
0.693938
false
3.743542
false
false
false
ioannistsanaktsidis/invenio
modules/bibcatalog/lib/bibcatalog_system_rt.py
1
19301
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # Li...
gpl-2.0
-6,736,097,761,406,690,000
41.050109
125
0.575877
false
4.235462
false
false
false
kyuupichan/electrum
gui/kivy/uix/dialogs/__init__.py
1
5901
from kivy.app import App from kivy.clock import Clock from kivy.factory import Factory from kivy.properties import NumericProperty, StringProperty, BooleanProperty from kivy.core.window import Window from electrum_gui.kivy.i18n import _ class AnimatedPopup(Factory.Popup): ''' An Animated Popup that animates in ...
mit
1,824,294,227,325,393,200
26.446512
80
0.587358
false
3.963062
false
false
false
ardi69/pyload-0.4.10
pyload/plugin/hoster/MystoreTo.py
1
1107
# -*- coding: utf-8 -*- # # Test link: # http://mystore.to/dl/mxcA50jKfP import re from pyload.plugin.internal.SimpleHoster import SimpleHoster class MystoreTo(SimpleHoster): __name = "MystoreTo" __type = "hoster" __version = "0.03" __pattern = r'https?://(?:www\.)?mystore\.to/dl/.+' __...
gpl-3.0
5,088,491,964,633,634,000
24.744186
83
0.532069
false
3.218023
false
false
false
amaurywalbert/twitter
hashmap/hashmap_dataset_n5_3_5_k_alters_v1.0.py
1
6886
# -*- coding: latin1 -*- ################################################################################################ import datetime, sys, time, json, os, os.path, shutil, time reload(sys) sys.setdefaultencoding('utf-8') ############################################################################################...
gpl-3.0
-8,123,385,585,487,012,000
46.965035
234
0.377898
false
4.104728
false
false
false
ahnitz/pycbc
pycbc/inference/jump/normal.py
1
14123
# Copyright (C) 2019 Collin Capano # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in t...
gpl-3.0
8,337,843,945,908,412,000
35.305913
79
0.629399
false
4.237324
true
false
false
cemagg/sucem-fem
examples/filament_source/driver.py
1
5028
## Copyright (C) 2011 Stellenbosch University ## ## This file is part of SUCEM. ## ## SUCEM 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 v...
gpl-3.0
-8,254,048,076,128,674,000
35.172662
130
0.729316
false
3
false
false
false
BobBuildTool/bob
pym/bob/cmds/archive.py
1
18385
# Bob build tool # Copyright (C) 2017 Jan Klötzke # # SPDX-License-Identifier: GPL-3.0-or-later from ..audit import Audit from ..errors import BobError from ..utils import binStat, asHexStr, infixBinaryOp import argparse import gzip import json import os, os.path import pickle import pyparsing import re import sqlite...
gpl-3.0
-2,540,051,726,761,256,000
35.40396
153
0.553362
false
4.021877
false
false
false
yrobla/nova
nova/virt/libvirt/vif.py
1
24270
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2011 Midokura KK # Copyright (C) 2011 Nicira, Inc # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may...
apache-2.0
-8,089,471,360,333,685,000
38.399351
79
0.555707
false
4.259389
true
false
false
cmc333333/regulations-parser
regparser/grammar/delays.py
1
1387
from datetime import date import string from pyparsing import Optional, Suppress, Word from regparser.grammar import utils class EffectiveDate: pass class Notice: def __init__(self, volume, page): self.volume = volume self.page = page def __repr__(self): return 'Notice( volume...
cc0-1.0
4,490,591,144,351,181,300
20.671875
70
0.626532
false
3.47619
false
false
false
jupyter/jupyter-drive
setup.py
1
2752
from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file #with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-...
bsd-2-clause
7,241,355,444,545,399,000
34.282051
98
0.647529
false
4.107463
false
false
false