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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kamijawa/ogc_server | test/test_import_vcf.py | 1 | 2376 | # -*- coding: utf-8 -*-
import os, sys, codecs
import json
from pydash import py_ as _
ENCODING = 'utf-8'
ENCODING1 = 'gb18030'
def dec(aStr):
gb18030_encode, gb18030_decode, gb18030_reader, gb18030_writer = codecs.lookup(ENCODING)
text, length = gb18030_decode(aStr, 'replace')
return text
def enc(aSt... | mit | 3,756,588,771,481,258,000 | 29.792208 | 94 | 0.547679 | false | 3.207037 | false | false | false |
armills/agocontrol | devices/agosimulator.py | 4 | 1773 | #! /usr/bin/env python
import random
import sys
import syslog
import socket
import threading
import time
import agoclient
client = agoclient.AgoConnection("simulator")
def messageHandler(internalid, content):
if "command" in content:
if content["command"] == "on":
print "switching on: " + internalid
client... | gpl-3.0 | 1,214,087,210,189,917,000 | 27.142857 | 99 | 0.685843 | false | 3.320225 | false | false | false |
evgenybf/pyXLWriter | examples/simple.py | 1 | 1245 | #!/usr/bin/env python
# This example script was ported from Perl Spreadsheet::WriteExcel module.
# The author of the Spreadsheet::WriteExcel module is John McNamara
# <jmcnamara@cpan.org>
__revision__ = """$Id: simple.py,v 1.9 2004/01/31 18:56:07 fufff Exp $"""
########################################################... | lgpl-2.1 | -5,640,929,469,606,742,000 | 29.390244 | 74 | 0.643373 | false | 3.074074 | false | true | false |
levilucio/SyVOLT | ECore_Copier_MM/transformation-Large/HeclassOUTeStructuralFeaturesSolveRefEClassEStructuralFeatureEClassEStructuralFeature.py | 1 | 5144 |
from core.himesis import Himesis
class HeclassOUTeStructuralFeaturesSolveRefEClassEStructuralFeatureEClassEStructuralFeature(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HeclassOUTeStructuralFeaturesSolveRefEClassEStructuralFeatureEClassEStructuralFeatu... | mit | -6,759,567,593,965,910,000 | 48.941748 | 298 | 0.528966 | false | 2.976852 | false | false | false |
davmre/treegp | experiments/code/aggregate_results.py | 1 | 2391 | import numpy as np
import re
from treegp.experiments.code.datasets import predict_results_fname, timing_results_fname, gp_fname
from treegp.gp import GP
import scipy.sparse
model_list_fname = "models"
basedir = "experiments/models/"
class NoResultsError(Exception):
pass
def extract_results(txt, prefix, require_t... | gpl-3.0 | 2,367,399,508,398,024,000 | 33.157143 | 148 | 0.605604 | false | 3.445245 | false | false | false |
cwoebker/paxo | test_paxo.py | 1 | 3806 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for Paxo."""
import unittest
from clint import arguments
from paxo.core import Paxo
from paxo.command import Command, cmd, define_command, Collection
from paxo.util import ExitStatus, is_win, is_lin, is_osx, args
class AbstractTestCase(unittest.TestCase):
... | bsd-3-clause | 4,723,879,664,171,489,000 | 26.985294 | 89 | 0.635575 | false | 3.863959 | true | false | false |
jiangtyd/crewviewer | migrations/versions/3f82af559c8a_.py | 1 | 1772 | """empty message
Revision ID: 3f82af559c8a
Revises: None
Create Date: 2015-10-16 03:37:42.100489
"""
# revision identifiers, used by Alembic.
revision = '3f82af559c8a'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###... | mit | 5,534,465,861,928,236,000 | 33.076923 | 66 | 0.664221 | false | 3.368821 | false | false | false |
StochasticNumerics/mimclib | tests/sc/echo_test_cmd.py | 1 | 1089 | #!/usr/bin/python
import numpy as np
import argparse
parser = argparse.ArgumentParser(add_help=True)
parser.register('type', 'bool',
lambda v: v.lower() in ("yes", "true", "t", "1"))
parser.add_argument("-db", type="bool", action="store", default=False)
parser.add_argument("-qoi_dim", type=int, action=... | gpl-2.0 | -4,881,164,111,776,599,000 | 34.129032 | 98 | 0.6382 | false | 2.544393 | false | true | false |
HPENetworking/HPEIMCUtils | PythonUtilities/Gen_ICMP_Device_CSV/gen_icmp_dev_csv.py | 1 | 3635 |
#!/usr/bin/env python3
# author: @netmanchris
"""
Copyright 2016 Hewlett Packard Enterprise Development LP.
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/... | apache-2.0 | -1,490,100,215,400,305,000 | 33.951923 | 121 | 0.628336 | false | 3.690355 | false | false | false |
commaai/panda | tests/gps_stability_test.py | 1 | 5589 | #!/usr/bin/env python3
# flake8: noqa
import os
import sys
import time
import random
import threading
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
from panda import Panda, PandaSerial # noqa: E402
INIT_GPS_BAUD = 9600
GPS_BAUD = 460800
def connect():
pandas = Panda.list()
pr... | mit | 4,856,447,851,349,771,000 | 32.872727 | 192 | 0.66452 | false | 2.359223 | false | false | false |
stephanie-wang/ray | rllib/tests/test_multi_agent_env.py | 1 | 25398 | import gym
import random
import unittest
import ray
from ray.rllib.agents.pg import PGTrainer
from ray.rllib.agents.pg.pg_tf_policy import PGTFPolicy
from ray.rllib.agents.dqn.dqn_policy import DQNTFPolicy
from ray.rllib.optimizers import (SyncSamplesOptimizer, SyncReplayOptimizer,
As... | apache-2.0 | -3,413,724,919,242,403,000 | 37.077961 | 79 | 0.495551 | false | 3.699097 | true | false | false |
dgketchum/MT_Rsense | utils/raster_tools.py | 1 | 5477 | # ===============================================================================
# Copyright 2017 dgketchum
#
# 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... | apache-2.0 | -4,436,257,168,152,308,700 | 32.808642 | 105 | 0.627898 | false | 3.624752 | false | false | false |
szecsi/Gears | GearsPy/Project/Components/Tone/Erf.py | 1 | 1254 | import Gears as gears
from .. import *
class Erf(Component) :
def applyWithArgs(
self,
stimulus,
*,
toneRangeMean = 0.5,
toneRangeVar = 0.3,
dynamic = False
) :
self.stimulus = stimulus;
try:
trmean ... | gpl-2.0 | 1,520,837,245,257,952,300 | 25.125 | 63 | 0.495215 | false | 4.309278 | false | false | false |
johan92/fpga-quadtree | tb/t.py | 1 | 2226 | import random
def write_stages( stages_l, fname ):
f = open( fname, "w" )
for (i, stage) in enumerate( stages_l ):
for (addr, data) in enumerate( stage ):
wr_str = str(i) + " " + str( addr )
for d in data:
wr_str = wr_str + " " + str( d )
f.write("%s\n" % wr_str)
f.close()
def wri... | mit | -1,756,596,652,279,596,800 | 25.188235 | 89 | 0.504492 | false | 2.792974 | false | false | false |
Glottotopia/aagd | moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/action/twikidraw.py | 2 | 9397 | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - twikidraw
This action is used to call twikidraw
@copyright: 2001 by Ken Sugino (sugino@mediaone.net),
2001-2004 by Juergen Hermann <jh@web.de>,
2005 MoinMoin:AlexanderSchremmer,
2005 DiegoOngaro at ETSZONE... | mit | -8,768,357,111,359,614,000 | 39.950893 | 131 | 0.607002 | false | 3.695242 | false | false | false |
google/fuzzbench | common/test_gsutil.py | 1 | 3305 | # 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 | 1,608,385,825,253,286,700 | 38.819277 | 80 | 0.63177 | false | 3.883666 | true | false | false |
Azure/azure-storage-python | azure-storage-queue/azure/storage/queue/_serialization.py | 1 | 2173 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import sys... | mit | 1,446,944,203,333,926,400 | 28.767123 | 116 | 0.6185 | false | 4.146947 | false | false | false |
jlopezpena/bearcart | bearcart/bearcart.py | 1 | 9096 | # -*- coding: utf-8 -*-
'''
Rickshaw
-------
Python Pandas + Rickshaw.js
'''
from __future__ import print_function
from __future__ import division
import time
import json
import os
from collections import defaultdict
from pkg_resources import resource_string
import pandas as pd
import numpy as np
from jinja2 import ... | mit | -3,603,010,763,138,660,400 | 36.126531 | 80 | 0.542656 | false | 4.234637 | false | false | false |
TestInABox/stackInABox | stackinabox/util/responses/core.py | 2 | 2320 | """
Stack-In-A-Box: Python Responses Support
"""
from __future__ import absolute_import
import logging
import re
import responses
from stackinabox.stack import StackInABox
from stackinabox.util import deprecator
from stackinabox.util.tools import CaseInsensitiveDict
logger = logging.getLogger(__name__)
def respo... | apache-2.0 | 1,439,319,332,521,782,800 | 26.951807 | 75 | 0.620259 | false | 4.35272 | false | false | false |
Mirantis/mos-tempest-runner | helpers/subunit_shouldfail_filter.py | 3 | 3749 | #!/usr/bin/env python
# Copyright 2014: Mirantis 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
#... | apache-2.0 | 392,869,155,237,528,200 | 32.473214 | 78 | 0.583889 | false | 4.198208 | true | false | false |
gregthedoe/androtoolbox | androtoolbox/log.py | 1 | 1057 | from .adb import adb
_LOG_TAG_PROPERTY = 'log.tag.{tag}'
LOG_LEVELS = ('VERBOSE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'ASSERT')
def is_valid_log_level(level):
return level.upper() in LOG_LEVELS
def set_loggable_level_for_tag(tag, level='VERBOSE'):
"""
Set the minimum loggable level for a tag.
:para... | mit | -7,698,050,352,898,194,000 | 27.567568 | 76 | 0.641438 | false | 3.409677 | false | false | false |
alejo8591/maker | projects/admin.py | 1 | 1464 | # encoding: utf-8
# Copyright 2013 maker
# License
"""
Project management: admin page
"""
from maker.projects.models import Project, Milestone, Task, TaskTimeSlot, TaskStatus
from django.contrib import admin
class ProjectAdmin(admin.ModelAdmin):
""" Project admin """
list_display = ('name', 'details', 'p... | mit | -8,405,489,967,769,106,000 | 30.826087 | 94 | 0.669399 | false | 3.678392 | false | false | false |
luci/luci-py | appengine/swarming/tools/android/setup_udev.py | 2 | 4842 | #!/usr/bin/env python
# Copyright 2014 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Generates the file /etc/udev/rules.d/android_swarming_bot.rules to enable
automatic Swarming bot to be fired up when an A... | apache-2.0 | 6,577,840,882,396,699,000 | 30.647059 | 80 | 0.668319 | false | 3.309638 | true | false | false |
marcin1j/griffith | lib/cover.py | 4 | 6903 | # -*- coding: UTF-8 -*-
__revision__ = '$Id$'
# Copyright (c) 2005-2009 Vasco Nunes, Piotr Ożarowski
#
# 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... | gpl-2.0 | 2,888,838,638,765,462,500 | 33.51 | 117 | 0.627934 | false | 3.366829 | false | false | false |
gdude2002/InfoBot | bot/sections/url.py | 1 | 2959 | # coding=utf-8
from typing import List
import aiohttp
from bot.sections.base import BaseSection
from bot.utils import line_splitter
__author__ = "Gareth Coles"
class URLSection(BaseSection):
_type = "url"
cached_lines = []
def __init__(self, name, url=None, header="", footer=""):
super().__ini... | artistic-2.0 | -2,659,862,792,311,012,400 | 29.193878 | 103 | 0.520108 | false | 3.977151 | false | false | false |
Jeremy-WEI/python-mode | pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/misc.py | 17 | 3260 | # pylint: disable=W0511
# 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... | lgpl-3.0 | -2,651,672,956,548,905,500 | 35.222222 | 82 | 0.622086 | false | 4.174136 | false | false | false |
moreati/trac-gitsvn | trac/tests/perm.py | 4 | 11457 | from trac import perm
from trac.core import *
from trac.test import EnvironmentStub
import unittest
class DefaultPermissionStoreTestCase(unittest.TestCase):
def setUp(self):
self.env = EnvironmentStub(enable=[perm.DefaultPermissionStore,
perm.DefaultPermissionG... | bsd-3-clause | -1,151,009,814,084,210,800 | 41.276753 | 106 | 0.585581 | false | 4.237056 | true | false | false |
tjelvar-olsson/tinyfasta | tinyfasta/__init__.py | 1 | 5416 | """Package for parsing and generating FASTA files of biological sequences.
Use the :class:`tinyfasta.FastaParser` class to parse FASTA files.
To generate FASTA files use the :func:`tinyfasta.FastaRecord.create` static
method to create :class:`tinyfasta.FastaRecord` instances, which can be written
to file.
"""
__ve... | mit | 1,464,712,525,209,946,400 | 32.639752 | 83 | 0.605059 | false | 4.513333 | false | false | false |
FrauBluher/ShR2 | Web Stack/webapp/models.py | 2 | 9505 | from django.db import models
from django.contrib.auth.models import User
from microdata.models import Device, Appliance
from django.conf import settings
from recurrence.fields import RecurrenceField
from paintstore.fields import ColorPickerField
# Create your models here.
class EventNotification(models.Model):
"""... | mit | 9,084,803,312,958,863,000 | 38.115226 | 149 | 0.716465 | false | 4.179859 | false | false | false |
blockchain-certificates/cert-viewer | cert_viewer/helpers.py | 2 | 1312 | import binascii
import sys
from cert_core import Chain, UnknownChainError
unhexlify = binascii.unhexlify
hexlify = binascii.hexlify
if sys.version > '3':
unhexlify = lambda h: binascii.unhexlify(h.encode('utf8'))
hexlify = lambda b: binascii.hexlify(b).decode('utf8')
def obfuscate_email_display(email):
... | mit | -3,548,617,908,347,158,500 | 38.757576 | 132 | 0.681402 | false | 3.555556 | false | false | false |
yasir1brahim/OLiMS | lims/__init__.py | 2 | 9314 | import warnings
import pkg_resources
# __version__ = pkg_resources.get_distribution("bika.lims").version
# import this to create messages in the bika domain.
from dependencies.dependency import MessageFactory
bikaMessageFactory = MessageFactory('bika')
from dependencies.dependency import PloneMessageFactory as PMF
# ... | agpl-3.0 | -8,388,926,910,800,973,000 | 44.213592 | 78 | 0.762293 | false | 4.858633 | false | false | false |
mdavidsaver/jmbgsddb | tools/jb_plot.py | 2 | 6208 |
from __future__ import print_function
import sys
import numpy
from matplotlib.pylab import *
def plt_ref_orbit(s, lng):
subplot(1, 2, 1)
plot(s, lng[:, 0], '-b')
xlabel('s [m]'); ylabel('phase [rad]')
subplot(1, 2, 2)
plot(s, lng[:, 1], '-b')
xlabel('s [m]'); ylabel('E_k [MeV]')
def plt_m... | mit | 7,870,611,750,167,640,000 | 29.885572 | 79 | 0.546875 | false | 2.785105 | false | false | false |
takeshineshiro/keystone | keystone/common/manager.py | 8 | 4942 | # Copyright 2012 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 in... | apache-2.0 | -2,363,730,380,467,835,400 | 34.811594 | 79 | 0.666936 | false | 4.369584 | false | false | false |
decarlin/indra | indra/pysb_assembler.py | 1 | 4115 | from pysb import Model, Monomer, Parameter
from pysb.core import SelfExporter
from bel import bel_api
from biopax import biopax_api
from trips import trips_api
SelfExporter.do_export = False
class BaseAgentSet(object):
"""A container for a set of BaseAgents. Wraps a dict of BaseAgent instances."""
def __init_... | bsd-2-clause | 772,667,815,329,595,900 | 32.729508 | 83 | 0.619927 | false | 3.835042 | false | false | false |
ktmud/david | david/core/attachment/mixins.py | 1 | 2817 | # -*- coding: utf-8 -*-
from david.lib.mixins.props import PropsMixin, PropsItem
from .attachment import Attachment
from .form import AttachmentFieldList
def _get_ids(items):
return [(i.id if hasattr(i, 'id') else i) for i in items]
class AttachmentMixin(PropsMixin):
""" Mixin for a db.Model """
attac... | mit | 7,379,642,408,356,192,000 | 28.968085 | 91 | 0.57863 | false | 3.973202 | false | false | false |
miing/mci_migo_packages_django-adminaudit | adminaudit/models.py | 1 | 4091 | # Copyright 2010-2012 Canonical Ltd. This software is licensed under
# the GNU Lesser General Public License version 3 (see the file LICENSE).
from django.core import serializers
from django.db import models
from django.db.models.fields.files import FileField
from django.utils import simplejson
class AuditLog(model... | lgpl-3.0 | 7,664,659,598,751,858,000 | 37.59434 | 80 | 0.594476 | false | 4.187308 | false | false | false |
rreimche/infdiffusion | fetcher.py | 1 | 1566 | # Fetches twits from Twitter using one of many possible download mechanisms and parameters given via command line arguments
# This particular implementation uses twitterscraper as an example implementation.
# Warning: scraping twitter may be not completely legal in your country.
# You could use tweepy for a legal optio... | mit | 5,688,962,702,954,137,000 | 33.065217 | 123 | 0.735632 | false | 3.782609 | false | false | false |
lavalamp-/ws-backend-community | tasknode/tasks/scanning/services/fingerprinting/http.py | 1 | 3763 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from celery.utils.log import get_task_logger
from lib.fingerprinting import HttpFingerprinter, HttpsFingerprinter
from .....app import websight_app
from ....base import ServiceTask, NetworkServiceTask
logger = get_task_logger(__name__)
#USED
@websight_... | gpl-3.0 | -3,429,817,639,384,512,000 | 40.351648 | 119 | 0.685092 | false | 3.678397 | false | false | false |
kotnik/scanner | scanner/util.py | 1 | 1066 | import time
import uuid
import subprocess
import logging
log = logging.getLogger(__name__)
def check_call(*args, **kwargs):
start = time.time()
command_uuid = uuid.uuid4()
command_line = subprocess.list2cmdline(args[0])
log.debug("%s: Executing: %s" % (command_uuid, command_line))
data = None
... | mit | 3,820,264,963,204,032,500 | 26.333333 | 119 | 0.61257 | false | 3.449838 | false | false | false |
gylian/sickrage | lib/guessit/transfo/post_process.py | 6 | 2845 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free... | gpl-3.0 | 7,827,392,249,194,032,000 | 37.972603 | 83 | 0.629877 | false | 4.007042 | false | false | false |
eort/OpenSesame | opensesame_extensions/get_started/get_started.py | 2 | 3859 | #-*- coding:utf-8 -*-
"""
This file is part of OpenSesame.
OpenSesame 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.
OpenSesame is distri... | gpl-3.0 | 4,596,173,658,743,343,600 | 29.626984 | 83 | 0.700441 | false | 3.139951 | false | false | false |
rpwagner/tiled-display | flTile/configs/localTestLargeConfig.py | 1 | 1310 | import sys, os
sys.path = [os.path.join(os.getcwd(), "..") ] + sys.path
from tileConfig import TileConfig, TileDesc, MachineDesc, SaveConfig, LoadConfig, TileLocation, Rect, LocalWindow
def CreateLocalTestConfig():
c = TileConfig()
t0 = TileDesc( (400, 400), (0,0), ":0", localWindowId=0)
t1 = TileDesc... | apache-2.0 | 6,773,218,746,586,381,000 | 37.529412 | 139 | 0.644275 | false | 2.917595 | true | false | false |
JrGoodle/clowder | clowder/util/file_system.py | 1 | 2610 | """File system utilities
.. codeauthor:: Joe DeCapo <joe@polka.cat>
"""
import errno
import os
import shutil
from pathlib import Path
import clowder.util.formatting as fmt
from clowder.util.error import ExistingFileError, MissingSourceError
from clowder.util.logging import LOG
def symlink_clowder_yaml(source: Pat... | mit | 8,639,001,168,381,263,000 | 24.588235 | 92 | 0.644061 | false | 3.760807 | false | false | false |
alonsopg/AuthorProfiling | src/ef_list_baseline.py | 1 | 3394 | #!/usr/bin/env python
# -*- coding: utf-8
from __future__ import print_function
import argparse
import codecs
import cPickle as pickle
import numpy as np
import os
from load_tweets import load_tweets
from collections import Counter
NAME='ef_list_baseline'
prefix='list_baseline'
if __name__ == "__main__":
# Las o... | gpl-2.0 | 5,566,480,035,817,848,000 | 30.398148 | 91 | 0.611914 | false | 3.474385 | false | false | false |
jn0/fb2utils | fb2utils/update_librusec.py | 1 | 27958 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# (c) Lankier mailto:lankier@gmail.com
import sys, os
import time
import shutil
import sqlite3
from cStringIO import StringIO
from lxml import etree
from copy import deepcopy
from optparse import OptionParser, make_option
import zipfile
import traceback
fro... | gpl-3.0 | -3,015,341,561,297,718,300 | 32.684337 | 105 | 0.526433 | false | 3.565162 | false | false | false |
TwilioDevEd/call-tracking-django | call_tracking/migrations/0001_initial.py | 1 | 1350 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='LeadSource',
fields=[
... | mit | -8,577,940,808,367,990,000 | 38.705882 | 114 | 0.591852 | false | 4.205607 | false | false | false |
NaviRice/KinectServer | python_src/navirice_get_image.py | 1 | 3410 | # Echo client program
import socket
import time
import os
os.system("protoc -I=../proto --python_out=. ../proto/navirice_image.proto")
import navirice_image_pb2
class Image:
def __init__(self, width, height, channels, type_, data, data_size):
self.width = width
self.height = height
self.c... | mit | -5,851,558,242,900,377,000 | 33.444444 | 77 | 0.615543 | false | 3.544699 | false | false | false |
vermouth1992/Leetcode | python/661.image-smoother.py | 1 | 2408 | #
# @lc app=leetcode id=661 lang=python3
#
# [661] Image Smoother
#
# https://leetcode.com/problems/image-smoother/description/
#
# algorithms
# Easy (52.47%)
# Total Accepted: 55.7K
# Total Submissions: 106.1K
# Testcase Example: '[[1,1,1],[1,0,1],[1,1,1]]'
#
# An image smoother is a filter of the size 3 x 3 that ... | mit | 6,298,467,093,459,828,000 | 28.728395 | 90 | 0.545681 | false | 2.723982 | false | false | false |
thunderpush/thunderpush | setup.py | 1 | 1160 | #!/usr/bin/env python
from setuptools import setup, find_packages
install_requires = [
'sockjs-tornado==1.0.0',
'tornado==3.2.2',
'argparse',
# simplejson is really required for py3 support to avoid encoding problems
'simplejson'
]
tests_require = [
'mock==2.0.0'
]
setup(
name='thunderpu... | bsd-3-clause | 8,832,320,492,365,194,000 | 25.363636 | 78 | 0.625862 | false | 3.68254 | false | false | false |
flother/agate | agate/table/join.py | 1 | 5769 | #!/usr/bin/env python
# pylint: disable=W0212
from agate.rows import Row
from agate import utils
@utils.allow_tableset_proxy
def join(self, right_table, left_key, right_key=None, inner=False, require_match=False, columns=None):
"""
Create a new table by joining two table's on common values.
This method ... | mit | 3,946,371,038,658,788,400 | 33.963636 | 102 | 0.618998 | false | 3.843438 | false | false | false |
jonathanmorgan/reddit_collect | redditCollector.py | 1 | 78933 | # start to python 3 support:
from __future__ import unicode_literals
'''
Copyright 2012, 2013 Jonathan Morgan
This file is part of http://github.com/jonathanmorgan/reddit_collect.
reddit_collect is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Licens... | gpl-3.0 | 8,925,778,869,448,619,000 | 40.713745 | 358 | 0.461784 | false | 4.901453 | false | false | false |
hgdeoro/pilas | pilasengine/interprete/io.py | 1 | 1571 | # -*- encoding: utf-8 -*-
# pilas engine: un motor para hacer videojuegos
#
# Copyright 2010-2014 - Hugo Ruscitti
# License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
#
# Website - http://www.pilas-engine.com.ar
class Output(object):
"Representación abstracta de un archivo de salida de datos."
def __... | lgpl-3.0 | 4,202,209,198,047,022,600 | 33.108696 | 98 | 0.634162 | false | 3.228395 | false | false | false |
SocialCognitiveSystems/PRIMO | setup.py | 1 | 2744 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of PRIMO2 -- Probabilistic Inference Modules.
# Copyright (C) 2013-2017 Social Cognitive Systems Group,
# Faculty of Technology, Bielefeld University
#
# This program is free software: you can redistribute it and/or modify
# it ... | lgpl-3.0 | 3,088,769,804,361,078,000 | 38.753623 | 93 | 0.660955 | false | 4.010234 | false | false | false |
macarthur-lab/xbrowse | xbrowse_server/base/management/commands/load_exome_depth.py | 1 | 1027 | import os
from django.conf import settings
from django.core.management.base import BaseCommand
from xbrowse_server.base.models import Project
from xbrowse_server.mall import get_cnv_store
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('args', nargs='*')
def handle(... | agpl-3.0 | -8,306,639,866,769,281,000 | 32.16129 | 87 | 0.599805 | false | 3.748175 | false | false | false |
zsiki/ls | network_dialog.py | 1 | 9919 | # -*- coding: utf-8 -*-
"""
.. module:: network_dialog
:platform: Linux, Windows
:synopsis: GUI for adjusment calculation
.. moduleauthor: Zoltan Siki <siki@agt.bme.hu>
"""
import platform
import webbrowser
from PyQt4.QtGui import QDialog, QFont, QMessageBox
from PyQt4.QtCore import QSettings
import config
fr... | gpl-2.0 | -1,297,909,990,585,258,500 | 41.75431 | 104 | 0.506402 | false | 4.325774 | false | false | false |
Pikecillo/genna | external/PyXML-0.8.4/xml/dom/html/HTMLParamElement.py | 10 | 1949 | ########################################################################
#
# File Name: HTMLParamElement
#
#
### This file is automatically generated by GenerateHtml.py.
### DO NOT EDIT!
"""
WWW: http://4suite.com/4DOM e-mail: support@4suite.com
Copyright (c) 2000 Fourthought Inc, USA. All Right... | gpl-2.0 | -4,082,228,738,923,556,400 | 26.450704 | 77 | 0.608517 | false | 3.755299 | false | false | false |
avaitla/Haskell-to-C---Bridge | pygccxml-1.0.0/unittests/declaration_files_tester.py | 1 | 1778 | # Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import unittest
import autoconfig
import parser_test_case
import pygccxml
from pygccxml.utils import *
from pygccxm... | bsd-3-clause | 8,640,207,445,008,429,000 | 31.54717 | 92 | 0.57649 | false | 3.380228 | true | false | false |
pirsquare/askme-python | setup.py | 1 | 1573 | import sys
from setuptools import find_packages
from setuptools import setup
import io
import os
VERSION = '0.0.4'
def fpath(name):
return os.path.join(os.path.dirname(__file__), name)
def read(*filenames, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
sep = kwargs.get('sep', '\n')
buf = []
... | mit | -451,297,514,957,354,100 | 25.216667 | 89 | 0.614749 | false | 3.709906 | false | false | false |
Breta01/handwriting-ocr | src/ocr/page.py | 1 | 4255 | # -*- coding: utf-8 -*-
"""
Crop background and transform perspective from the photo of page
"""
import numpy as np
import cv2
from .helpers import *
def detection(image, area_thresh = 0.5):
"""Finding Page."""
small = resize(image)
# Edge detection
image_edges = _edges_detection(small, 200, 250)
... | mit | 3,836,286,360,424,042,500 | 34.173554 | 78 | 0.565922 | false | 3.584667 | false | false | false |
harvard-lil/h2o | web/main/storages.py | 1 | 1697 | from datetime import datetime
import posixpath
from storages.backends.s3boto3 import S3Boto3Storage
from django.conf import settings
# used only for suppressing INFO logging in S3Boto3Storage
import logging
class S3Storage(S3Boto3Storage):
# suppress boto3's INFO logging per https://github.com/boto/boto3/issues... | agpl-3.0 | 1,591,903,939,829,844,700 | 37.568182 | 88 | 0.652917 | false | 4.159314 | false | false | false |
robertsj/libdetran | src/python/pydetranutils/mesh_plot.py | 2 | 4018 | # This provides utilities for plotting things on a
# 1D or 2D mesh or a slice of a 3D mesh.
try :
import numpy as np
except ImportError :
print "Error importing Numpy."
try :
import matplotlib.pyplot as plt
import matplotlib
except ImportError :
print "Error importing matplotlib"
def plot_mesh_functi... | mit | -6,216,482,812,668,819,000 | 30.390625 | 105 | 0.558487 | false | 3.413764 | false | false | false |
MusicVisualizationUMass/TeamNameGenerator | src/musicvisualizer/pipeline/models/cirular_oscillator.py | 1 | 1151 | '''
circular_oscillator.py: defines a ModelledRepr extension that begins with a
unit circle on the screen parametrized by (r, theta) = (1, [0,2pi))
This will be the test case for the initial extension of ModelledRepr. We will
update/expand/tweak ModelledRepr based on this implementation to make further
extensions easi... | mit | -3,497,859,841,627,768,000 | 36.129032 | 77 | 0.56907 | false | 4.46124 | false | false | false |
bistack/pyStorageBenchmarkTools | raid_util.py | 1 | 11140 | #!/usr/bin/python
import os
import time
from misc_lib import run_command_list
from commands import getstatusoutput
import stat
class Speed:
def __init__(self):
self.__max = 0
self.__min = -1
self.__avg = 0
def record_value(self, val):
if float(val) > float(self.__max):
... | gpl-2.0 | 2,847,210,083,783,606,300 | 27.274112 | 76 | 0.475673 | false | 3.572803 | false | false | false |
Alexis-benoist/eralchemy | setup.py | 1 | 2202 | from setuptools import setup
try:
with open('readme.rst') as f:
long_description = f.read()
except IOError:
with open('readme.md') as f:
long_description = f.read()
def read_version():
with open('eralchemy/version.py') as f:
code = f.readlines()[0]
exec(code)
assert ('vers... | apache-2.0 | 6,218,801,769,933,792,000 | 27.597403 | 79 | 0.625341 | false | 4.123596 | false | false | false |
volatilityfoundation/volatility | volatility/plugins/linux/threads.py | 4 | 3427 | # Volatility
#
# 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 ... | gpl-2.0 | 4,537,316,562,078,674,400 | 37.943182 | 100 | 0.565217 | false | 4.387964 | false | false | false |
COMBINE-lab/matryoshka_work | coredomains-import/python-src/ResVsDomSize.py | 1 | 1219 | from CoreDomain import *
import argparse
import pylab
import glob
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--ourdoms',type=str)
parser.add_argument('--dixondoms',type=str)
parser.add_argument('--organism',type=str)
args = parser.parse_args()
if args.organism == 'mous... | gpl-3.0 | 1,189,682,126,824,560,000 | 28.756098 | 82 | 0.608696 | false | 3.117647 | false | false | false |
scottpurdy/nupic | src/nupic/support/unittesthelpers/abstract_temporal_memory_test.py | 10 | 2714 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014-2016, 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 p... | agpl-3.0 | -8,976,367,267,216,124,000 | 28.824176 | 74 | 0.661017 | false | 4.500829 | false | false | false |
stormi/tsunami | src/primaires/perso/masques/texte/__init__.py | 1 | 2742 | # -*-coding:Utf-8 -*
# Copyright (c) 2014 LE GOFF Vincent
# 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
# lis... | bsd-3-clause | -4,873,071,298,220,123,000 | 35.533333 | 79 | 0.716058 | false | 3.982558 | false | false | false |
jeffhammond/bagel | src/basis/source/turbomole.py | 2 | 2240 | #!/usr/bin/python
import sys
import string
def flash(numbers):
m = len(numbers[0])
atom = " \"prim\" : ["
for p in numbers:
atom += p[0] + ", "
atom = atom[:-2] + "],\n"
atom += " \"cont\" : ["
for p in range(1,m):
atom += "["
for q in numbers:
atom += q[p] + ", "
atom = at... | gpl-3.0 | 5,006,210,983,696,538,000 | 19.740741 | 58 | 0.439732 | false | 3.031123 | false | false | false |
veroc/Bika-LIMS | bika/lims/content/worksheet.py | 2 | 38556 | from AccessControl import ClassSecurityInfo
from bika.lims import bikaMessageFactory as _, logger
from bika.lims.config import *
from bika.lims.idserver import renameAfterCreation
from bika.lims.utils import t, tmpID, changeWorkflowState
from bika.lims.utils import to_utf8 as _c
from bika.lims.browser.fields import His... | agpl-3.0 | 3,233,029,592,291,378,700 | 42.321348 | 101 | 0.554777 | false | 4.583452 | false | false | false |
jmenashe/person-reidentification | reidentifier/results/a_detections/gen_roc.py | 1 | 4213 | #!/usr/bin/env python
import csv, sys
from os.path import splitext, dirname
def readFile(file):
data = csv.reader(open(file))
# Read the column names from the first line of the file
fields = data.next()
results = []
for row in data:
# Zip together the field names and values
items = zip(fields, r... | gpl-3.0 | -8,259,149,482,517,327,000 | 25.834395 | 96 | 0.594113 | false | 2.90953 | false | false | false |
0bserver07/One-Hundred-Layers-Tiramisu | model-dynamic.py | 1 | 4629 | from __future__ import absolute_import
from __future__ import print_function
import os
import keras.models as models
from keras.layers.core import Layer, Dense, Dropout, Activation, Flatten, Reshape, Permute
from keras.layers.convolutional import Conv2D, MaxPooling2D, UpSampling2D, Cropping2D
from keras.layers.normal... | mit | -4,171,338,367,017,541,600 | 37.907563 | 137 | 0.612875 | false | 3.179258 | false | false | false |
pajlada/tyggbot | pajbot/modules/quests/typememessage.py | 2 | 2350 | import logging
from pajbot.managers.handler import HandlerManager
from pajbot.managers.redis import RedisManager
from pajbot.modules.base import ModuleSetting
from pajbot.modules.quest import QuestModule
from pajbot.modules.quests import BaseQuest
log = logging.getLogger(__name__)
class TypeMeMessageQuestModule(Bas... | mit | 5,674,103,126,088,242,000 | 29.128205 | 133 | 0.614468 | false | 4.010239 | false | false | false |
ameily/pyjotr | pyjotr/coverage.py | 1 | 2305 |
from coverage.report import Reporter
import os
class JsonFileCoverageCounters(object):
def __init__(self):
self.hits = 0
self.misses = 0
def jsonify(self):
return dict(
hits=self.hits,
misses=self.misses
)
class JsonFileCoverage(object):
def __in... | bsd-2-clause | 723,880,484,888,024,300 | 27.109756 | 84 | 0.584816 | false | 3.822554 | false | false | false |
datapythonista/pandas | pandas/tests/frame/methods/test_value_counts.py | 2 | 3871 | import numpy as np
import pandas as pd
import pandas._testing as tm
def test_data_frame_value_counts_unsorted():
df = pd.DataFrame(
{"num_legs": [2, 4, 4, 6], "num_wings": [2, 0, 0, 0]},
index=["falcon", "dog", "cat", "ant"],
)
result = df.value_counts(sort=False)
expected = pd.Serie... | bsd-3-clause | 7,438,535,327,190,715,000 | 25.513699 | 88 | 0.535262 | false | 3.040848 | true | false | false |
Connexions/cnx-archive | cnxarchive/utils/mimetype.py | 1 | 1223 | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013-2015, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
"""Methods for handling mimetypes."""
__all__ = (
'COLLECTION_MIMETYPE',
'SUBCOLLECTION_MIMET... | agpl-3.0 | -5,410,816,853,727,015,000 | 31.184211 | 70 | 0.715454 | false | 3.080605 | false | false | false |
amyvmiwei/chromium | tools/grit/grit/grit_runner.py | 3 | 6432 | #!/usr/bin/python2.4
# Copyright (c) 2006-2008 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.
'''Command processor for GRIT. This is the script you invoke to run the various
GRIT tools.
'''
import os
import sys
if __na... | bsd-3-clause | 2,232,770,222,574,269,400 | 30.365854 | 88 | 0.635303 | false | 3.407525 | false | false | false |
bastimeyer/streamlink | tests/plugins/test_schoolism.py | 3 | 2480 | import unittest
from streamlink.plugins.schoolism import Schoolism
class TestPluginSchoolism(unittest.TestCase):
def test_can_handle_url(self):
should_match = [
'https://www.schoolism.com/watchLesson.php',
]
for url in should_match:
self.assertTrue(Schoolism.can_ha... | bsd-2-clause | 3,052,704,488,478,411,300 | 45.792453 | 250 | 0.605645 | false | 3.33782 | true | false | false |
kaldonis/ft-event-manager | src/app/models/bot.py | 1 | 2674 | from app.domain.constants import CONSTANTS
from app.models import EventSearchMixin, WeightclassEventSearchMixin, DataInterface
from app.models.database import DBObject
class Bot(DBObject, EventSearchMixin, WeightclassEventSearchMixin):
bid = None
registered_ind = None
event_id = None
name = None
t... | gpl-2.0 | 1,966,577,702,323,303,200 | 30.845238 | 143 | 0.559461 | false | 3.847482 | false | false | false |
devlights/try-python | trypython/extlib/bitstring/bitstring01.py | 1 | 2317 | # coding: utf-8
"""
bitstringモジュールに関するサンプルです。
BitArrayについて(1)。
"""
import bitstring as bs
from trypython.common.commoncls import SampleBase
from trypython.common.commonfunc import pr
class Sample(SampleBase):
def exec(self):
# ---------------------------------------------------------------
# [li... | mit | 4,366,161,010,745,510,400 | 28.208955 | 73 | 0.44047 | false | 2.725627 | false | false | false |
skuda/client-python | kubernetes/client/models/v1_vsphere_virtual_disk_volume_source.py | 1 | 4263 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | 9,144,381,890,984,104,000 | 29.021127 | 183 | 0.562515 | false | 4.220792 | false | false | false |
Zocket/goodeal | catalog/models.py | 1 | 2731 | from django.db import models
# Create your models here.
class Category(models.Model):
name=models.CharField(max_length=50)
slug=models.SlugField(max_length=50,unique=True,
help_text='Unique value for product page URL, created from name.')
description=models.TextField()
is_active=models.BooleanF... | mit | 8,190,625,543,559,492,000 | 39.176471 | 79 | 0.694984 | false | 3.862801 | false | false | false |
cc13ny/Allin | leetcode/105-Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal/ConBinTreefrPreInTraversal_001.py | 5 | 1720 | /**
* Definition for binary tree
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
import java.util.Hashtable;
public class Solution {
public TreeNode buildTree(int[] preorder, int[] inorder) {
int len = preorder.length;
... | mit | -7,307,176,108,560,812,000 | 26.301587 | 78 | 0.393023 | false | 4.321608 | false | false | false |
JavierJia/vxquery | vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py | 11 | 3568 | #!/usr/bin/env python
#
# 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 "Lic... | apache-2.0 | -9,106,545,514,342,361,000 | 36.557895 | 80 | 0.682735 | false | 2.978297 | false | false | false |
edxzw/edx-platform | common/djangoapps/student/tests/test_certificates.py | 23 | 7728 | """Tests for display of certificates on the student dashboard. """
import unittest
import ddt
import mock
from django.conf import settings
from django.core.urlresolvers import reverse
from mock import patch
from django.test.utils import override_settings
from xmodule.modulestore.tests.django_utils import ModuleStore... | agpl-3.0 | -4,790,777,539,730,320,000 | 38.228426 | 107 | 0.670807 | false | 4.188618 | true | false | false |
pmquang/python-anyconfig | anyconfig/backend/configobj.py | 1 | 2413 | #
# Copyright (C) 2013 - 2015 Satoru SATOH <ssato @ redhat.com>
# License: MIT
#
"""configobj backend.
- Format to support: configobj, http://goo.gl/JbP2Kp (readthedocs.org)
- Requirements: configobj (https://pypi.python.org/pypi/configobj/)
- Limitations: None obvious
- Special options:
- All options except for 'i... | mit | 4,402,006,248,795,226,600 | 31.608108 | 78 | 0.648156 | false | 3.672755 | true | false | false |
iphoting/healthchecks | hc/front/tests/test_add_apprise.py | 2 | 1497 | from hc.api.models import Channel
from hc.test import BaseTestCase
from django.test.utils import override_settings
@override_settings(APPRISE_ENABLED=True)
class AddAppriseTestCase(BaseTestCase):
def setUp(self):
super().setUp()
self.url = "/projects/%s/add_apprise/" % self.project.code
def t... | bsd-3-clause | 8,555,357,241,396,441,000 | 35.512195 | 76 | 0.665331 | false | 3.572792 | true | false | false |
sserrot/champion_relationships | venv/Lib/site-packages/pyrsistent/typing.py | 5 | 1767 | """Helpers for use with type annotation.
Use the empty classes in this module when annotating the types of Pyrsistent
objects, instead of using the actual collection class.
For example,
from pyrsistent import pvector
from pyrsistent.typing import PVector
myvector: PVector[str] = pvector(['a', 'b', 'c'])... | mit | -9,187,801,960,868,538,000 | 21.0875 | 80 | 0.627051 | false | 3.849673 | false | false | false |
JustF0rWork/malware | trails/feeds/malwaredomains.py | 1 | 1677 | #!/usr/bin/env python
"""
Copyright (c) 2014-2016 Miroslav Stampar (@stamparm)
See the file 'LICENSE' for copying permission
"""
import re
from core.common import retrieve_content
__url__ = "http://malwaredomains.lehigh.edu/files/domains.txt"
__check__ = "safebrowsing.clients.google.com"
__reference__ = "malwaredom... | mit | -8,636,587,465,493,791,000 | 48.323529 | 742 | 0.562314 | false | 2.886403 | false | false | false |
ProvincalInovationManagement/provinceManagement | debug_toolbar/panels/cache.py | 2 | 6845 | import inspect
import sys
import time
from django.conf import settings
from django.core import cache
from django.core.cache import get_cache as base_get_cache
from django.core.cache.backends.base import BaseCache
from django.dispatch import Signal
from django.template import Node
from django.utils.datastructures impor... | agpl-3.0 | -7,011,836,031,029,467,000 | 29.833333 | 103 | 0.547115 | false | 3.873797 | false | false | false |
LowResourceLanguages/hltdi-l3 | disambiguatr/extract.py | 1 | 1209 | #!/usr/bin/env python3
"""
Common routines for pulling useful examples of Quechua adjectives the
generation of which requires lexical choice.
Used by extractbibles and extractelicitation at least!
"""
import yaml
import l3
es_adj = set()
def load_spanish_adjectives():
spanish_adj_fn = "../l3xdg/languages/es/es_... | gpl-3.0 | 8,643,722,207,213,988,000 | 28.487805 | 75 | 0.66584 | false | 3.267568 | false | false | false |
mallconnectionorg/openerp | rrhh/l10n_cl_hr_payroll/model/hr_fixed_allocation.py | 1 | 2830 | #!/usr/bin/python
# -*- coding: utf-8 -*-
##############################################################################
#
# Pedro Arroyo M <parroyo@mallconnection.com>
# Copyright (C) 2015 Mall Connection(<http://www.mallconnection.org>).
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 | -5,406,903,646,967,186,000 | 38.873239 | 112 | 0.565371 | false | 4.066092 | false | false | false |
tholo/formhelpers2 | setup.py | 1 | 1068 | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
requires = [
'colander',
'pyramid',
'pyramid_debugtoolbar',
'WebHelpers',
]
setu... | bsd-2-clause | 2,393,569,444,776,156,700 | 25.04878 | 63 | 0.58427 | false | 3.645051 | false | true | false |
igormunkin/CMC-CTMM | task04_particles/controller.py | 1 | 5900 | import math
import model
import cython_verlet
import threading
import numpy
import matplotlib
import matplotlib.pyplot as plot
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
def pure_python_verlet(particles):
G = 6.67 * (10 ** -11)
for p in particles:
new_a = sum(map(lambda e:
... | mit | 411,129,055,774,413,700 | 32.522727 | 86 | 0.537288 | false | 3.524492 | false | false | false |
ecreall/lagendacommun | lac/views/admin_process/see_site_folders.py | 1 | 2032 | # Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
import math
from pyramid.view import view_config
from dace.objectofcollaboration.principal.util import get_current
from dace.processinstance.core import DEFAULTMAPPING_... | agpl-3.0 | 4,620,561,385,707,153,000 | 29.787879 | 73 | 0.656988 | false | 3.583774 | false | false | false |
rtucker-mozilla/mozilla_inventory | core/network/models.py | 1 | 8198 | from django.db import models
from django.core.exceptions import ValidationError
from mozdns.validation import validate_ip_type
from mozdns.ip.models import ipv6_to_longs
from core.utils import IPFilter, one_to_two, to_a
from core.vlan.models import Vlan
from core.site.models import Site
from core.mixins import Object... | bsd-3-clause | -2,350,841,018,741,059,600 | 35.598214 | 79 | 0.566236 | false | 4.319283 | false | false | false |
clchiou/garage | py/imagetools/imagetools/__init__.py | 1 | 1554 | """Image manipulation tools."""
__all__ = [
'ImageError',
'Unsupported',
'ImageFormat',
'detect_format',
'resize',
'resize_unsafe',
]
import enum
import os
import tempfile
from . import _imagetools
from ._imagetools import ImageError
class Unsupported(ImageError):
pass
@enum.unique
... | mit | 972,284,685,737,102,000 | 21.521739 | 73 | 0.658945 | false | 3.682464 | false | false | false |
nicnab/pygol | minigol.py | 1 | 1181 | #!/usr/bin/env python
# MINI PYGOL - Game of Life - Nico Nabholz (nico@nabholz.org)
gen = 1
cell = {}
import sys, os, random, time
os.system('clear')
rows, columns = os.popen('stty size', 'r').read().split()
y = int(rows) - 2
x = int(columns)
while 1:
print chr(27) + "[H" + "Game Of Life (Generation: %d)" % gen
... | mit | 9,068,482,770,594,076,000 | 38.366667 | 99 | 0.464014 | false | 2.567391 | false | false | false |
voltagex/rtorrent-python | rtorrent/file.py | 2 | 4032 | from rtorrent.rpc import RPCObject, BaseMulticallBuilder
from rtorrent.rpc.processors import *
class File(RPCObject):
def __init__(self, context, info_hash, index):
super().__init__(context)
self.rpc_id = "{0}:f{1}".format(info_hash, index)
def rpc_call(self, key, *args):
call = super... | mit | -2,445,007,893,928,782,300 | 45.344828 | 78 | 0.570685 | false | 3.625899 | false | false | false |
dc3-plaso/plaso | tests/parsers/asl.py | 1 | 2743 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for Apple System Log file parser."""
import unittest
from plaso.formatters import asl # pylint: disable=unused-import
from plaso.lib import timelib
from plaso.parsers import asl
from tests import test_lib as shared_test_lib
from tests.parsers import test_lib
clas... | apache-2.0 | -442,569,407,062,469,250 | 32.864198 | 79 | 0.687204 | false | 3.365644 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.