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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PyBossa/pybossa | pybossa/model/counter.py | 2 | 1787 | # -*- coding: utf8 -*-
# This file is part of PYBOSSA.
#
# Copyright (C) 2017 Scifabric LTD.
#
# PYBOSSA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... | agpl-3.0 | -4,575,830,606,666,470,400 | 39.613636 | 77 | 0.684947 | false | 4.244656 | false | false | false |
gogogo/gogogo-hk | gogogo/models/property.py | 1 | 3233 | from google.appengine.ext import db
from django import forms
from django.utils.translation import ugettext_lazy as _
class TransitTypeProperty(db.IntegerProperty):
"""
Transit Type Property - Storage of transit type
"""
def __init__ (self,*args,**kwargs):
kwargs["choices"] = range(0,8) ... | agpl-3.0 | 2,126,706,793,343,167,200 | 30.086538 | 93 | 0.554903 | false | 4.102792 | false | false | false |
Saevon/webdnd | shared/utils/debug_toolbars.py | 1 | 1502 | import django
from django.conf import settings
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from debug_toolbar.panels import DebugPanel
import sys
class VersionDebugPanel(DebugPanel):
'''
Panel that displays the Django version.
'''
name =... | mit | -4,841,625,695,873,232,000 | 18.25641 | 78 | 0.608522 | false | 3.973545 | false | false | false |
stefco/geco_data | geco_irig_plot.py | 1 | 5662 | #!/usr/bin/env python
# (c) Stefan Countryman, 2016-2017
DESC="""Plot an IRIG-B signal read from stdin. Assumes that the timeseries
is a sequence of newline-delimited float literals."""
FAST_CHANNEL_BITRATE = 16384 # for IRIG-B, DuoTone, etc.
# THE REST OF THE IMPORTS ARE AFTER THIS IF STATEMENT.
# Quits immediately... | mit | 2,641,587,764,302,819,300 | 40.028986 | 80 | 0.628753 | false | 3.588086 | false | false | false |
TNick/pyl2extra | pyl2extra/datasets/images.py | 1 | 13590 | """
Dataset for images and related functionality.
This module does not have dependencies inside pyl2extra package, so you
can just copy-paste it inside your source tree.
To use this dataset prepare a .csv file with targets (integers or real numbers)
on first column and file paths on the second column:
.. code::
... | bsd-3-clause | 5,339,343,264,149,101,000 | 36.960894 | 79 | 0.576306 | false | 4.471866 | false | false | false |
mahak/cloudify-cli | cloudify_cli/commands/users.py | 1 | 9023 | ########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | -221,964,532,561,751,600 | 30.883392 | 78 | 0.654217 | false | 3.5 | false | false | false |
openstack/heat | heat/engine/update.py | 1 | 12695 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | 3,472,610,170,852,946,400 | 41.316667 | 79 | 0.579992 | false | 4.446585 | false | false | false |
diefenbach/django-lfs | lfs/marketing/models.py | 1 | 1821 | # django imports
from django.db import models
from django.utils.translation import ugettext_lazy as _, ugettext
# lfs imports
from lfs.catalog.models import Product
from lfs.order.models import Order
class Topseller(models.Model):
"""Selected products are in any case among topsellers.
"""
product = model... | bsd-3-clause | -2,391,349,366,419,636,700 | 29.864407 | 93 | 0.667216 | false | 3.891026 | false | false | false |
benregn/itu-courses | itu/pipelines.py | 1 | 1027 | import pymongo
from scrapy.exceptions import DropItem
from scrapy.conf import settings
from scrapy import log
class MongoDBPipeline(object):
def __init__(self):
connection = pymongo.Connection(
settings['MONGODB_SERVER'], settings['MONGODB_PORT'])
db = connection[settings['MONGODB_DB... | mit | 7,761,366,228,736,481,000 | 33.233333 | 77 | 0.581305 | false | 4.426724 | false | false | false |
robertnishihara/ray | streaming/python/tests/test_word_count.py | 1 | 1689 | import os
import ray
from ray.streaming import StreamingContext
def test_word_count():
ray.init(_load_code_from_local=True)
ctx = StreamingContext.Builder() \
.build()
ctx.read_text_file(__file__) \
.set_parallelism(1) \
.flat_map(lambda x: x.split()) \
.map(lambda x: (x, 1... | apache-2.0 | -5,655,306,037,818,127,000 | 27.15 | 63 | 0.536412 | false | 3.087751 | false | false | false |
letolab/airy | airy/utils/cache.py | 1 | 9676 | """
This module contains helper functions for controlling caching. It does so by
managing the "Vary" header of responses. It includes functions to patch the
header of response objects directly and decorators that change functions to do
that header-patching themselves.
For information on the Vary header, see:
http... | bsd-2-clause | -6,054,072,846,640,393,000 | 39.655462 | 88 | 0.671042 | false | 3.816963 | false | false | false |
QQuick/Transcrypt | transcrypt/modules/org/transcrypt/autotester/__init__.py | 1 | 12645 | # First run a test from the command prompt, generating an HTML file.
# The output of the test is stored in a DIV.
# Also the script is automatically included in the HTML file.
# Loading the HTML file will run the script.
# This will compare the output of the script running in the browswer to the output in the DIV.
... | apache-2.0 | -3,752,604,880,992,353,000 | 37.515625 | 129 | 0.535152 | false | 4.482453 | true | false | false |
walterbender/Pippy | pippy_app.py | 2 | 59457 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007,2008,2009 Chris Ball, based on Collabora's
# "hellomesh" demo.
#
# Copyright (C) 2013,14 Walter Bender
# Copyright (C) 2013,14 Ignacio Rodriguez
# Copyright (C) 2013 Jorge Gomez
# Copyright (C) 2013,14 Sai Vineet
#
# This program is free software; you ca... | gpl-3.0 | -1,851,500,253,610,730,000 | 37.860784 | 79 | 0.564677 | false | 3.765484 | false | false | false |
infrascloudy/flask-base | app/models/user.py | 1 | 6385 | from flask import current_app
from flask_login import AnonymousUserMixin, UserMixin
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from itsdangerous import BadSignature, SignatureExpired
from werkzeug.security import check_password_hash, generate_password_hash
from app import db, login_manager
... | mit | 1,365,562,869,490,029,800 | 31.576531 | 76 | 0.592482 | false | 4.077267 | true | false | false |
ME-ICA/me-ica | meica.libs/mdp/graph/graph.py | 1 | 13012 | # inspired by some code by Nathan Denny (1999)
# see http://www.ece.arizona.edu/~denny/python_nest/graph_lib_1.0.1.html
try:
# use reduce against BDFL's will even on python > 2.6
from functools import reduce
except ImportError:
pass
class GraphException(Exception):
"""Base class for exception in the g... | lgpl-2.1 | -8,937,105,326,309,814,000 | 31.448878 | 80 | 0.587919 | false | 4.013572 | false | false | false |
caffeinehit/yell | yell/backends/celery.py | 1 | 2316 | from __future__ import absolute_import
from celery.task import Task
from yell import Notification, notify, registry
class CeleryNotificationTask(Task):
""" Dispatch and run the notification. """
def run(self, name=None, backend=None, *args, **kwargs):
"""
The Celery task.
Deli... | mit | -3,298,192,501,619,146,000 | 32.565217 | 105 | 0.603195 | false | 4.755647 | false | false | false |
CiNC0/Cartier | cartier-python-resign-linux/tests/test_versioning.py | 1 | 1194 | #!/usr/bin/env python
import os.path
import importlib
import unittest
tests_dir = os.path.abspath(os.path.dirname(__file__))
package_name = tests_dir.split(os.path.sep)[-2].replace('-', '_')
package = importlib.import_module(package_name)
class VersioningTestCase(unittest.TestCase):
def assert_proper_attribute(... | apache-2.0 | -6,473,486,557,290,887,000 | 28.85 | 65 | 0.60804 | false | 4.174825 | true | false | false |
rgerkin/pyNeuroML | pyneuroml/tune/NeuroMLSimulation.py | 1 | 5357 | '''
A class for running a single instance of a NeuroML model by generating a
LEMS file and using pyNeuroML to run in a chosen simulator
'''
import sys
import time
from pyneuroml import pynml
from pyneuroml.lems import generate_lems_file_for_neuroml
try:
import pyelectro # Not used here, just f... | lgpl-3.0 | -7,017,770,894,526,758,000 | 31.271084 | 127 | 0.417958 | false | 4.563032 | false | false | false |
Azure/azure-sdk-for-python | sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_py3.py | 1 | 1163 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 5,197,764,973,507,058,000 | 33.205882 | 78 | 0.574377 | false | 4.473077 | false | false | false |
Anderson0026/mapproxy | mapproxy/script/conf/app.py | 1 | 6606 | # -:- encoding: utf-8 -:-
# This file is part of the MapProxy project.
# Copyright (C) 2013 Omniscale <http://omniscale.de>
#
# 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.a... | apache-2.0 | -2,084,402,879,449,501,700 | 34.713514 | 110 | 0.65607 | false | 3.879037 | true | false | false |
SonarOpenCommunity/sonar-cxx | cxx-sensors/src/tools/clangsa_createrules.py | 1 | 6838 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# SonarQube C++ Community Plugin (cxx plugin)
# Copyright (C) 2010-2021 SonarOpenCommunity
# http://github.com/SonarOpenCommunity/sonar-cxx
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Lic... | lgpl-3.0 | 6,750,779,244,084,423,000 | 33.0199 | 81 | 0.580579 | false | 4.089713 | false | false | false |
mikedh/trimesh | trimesh/proximity.py | 1 | 19400 | """
proximity.py
---------------
Query mesh- point proximity.
"""
import numpy as np
from . import util
from .grouping import group_min
from .constants import tol, log_time
from .triangles import closest_point as closest_point_corresponding
from .triangles import points_to_barycentric
try:
from scipy.spatial im... | mit | 8,312,762,869,782,250,000 | 32.448276 | 88 | 0.609227 | false | 4.020725 | false | false | false |
hcseob/py_spectre | py_spectre/psf.py | 1 | 50756 | # -*- coding: latin-1 -*-
"""
Copyright (c) 2008 Pycircuit Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
a. Redistributions of source code must retain the above copyright notice,
... | mit | 7,594,775,208,493,014,000 | 31.022713 | 190 | 0.569805 | false | 3.659145 | false | false | false |
unix-beard/matasano | set1/detect_single_character_xor/detect_single_character_xor.py | 1 | 1514 | #!/usr/bin/env python3
################################################################################
# The matasano crypto challenges
# http://cryptopals.com/sets/1/challenges/4/
# Set 1 Challenge 4
# Detect single-character XOR
################################################################################
# On... | mit | 4,528,978,805,032,337,400 | 30.541667 | 94 | 0.509247 | false | 3.488479 | false | false | false |
looker/sdk-examples | python/soft_delete_dashboard.py | 1 | 1367 | import sys
from typing import Sequence
import exceptions
from looker_sdk import client, error, models
sdk = client.setup("../looker.ini")
def main():
"""Given a dashboard title, get the ids of all dashboards with matching titles
and move them to trash.
$ python soft_delete_dashboard.py "An Unused Dash... | mit | -5,936,345,032,288,775,000 | 26.897959 | 86 | 0.675933 | false | 4.080597 | false | false | false |
robmcmullen/peppy | peppy/major_modes/fortran_95.py | 1 | 1742 | # peppy Copyright (c) 2006-2009 Rob McMullen
# Licenced under the GPLv2; see http://peppy.flipturn.org for more info
"""Fortran 95 programming language editing support.
Major mode for editing Fortran 95 files.
Supporting actions and minor modes should go here only if they are uniquely
applicable to this major mode an... | gpl-2.0 | -6,352,703,335,974,964,000 | 32.5 | 85 | 0.723307 | false | 3.629167 | false | false | false |
awacha/cct | cct/qtgui/devices/motor/movemotor/movemotor.py | 1 | 4527 | import logging
from PyQt5 import QtWidgets, QtGui
from .movemotor_ui import Ui_Form
from ....core.mixins import ToolWindow
from .....core.devices import Motor
from .....core.instrument.privileges import PRIV_MOVEMOTORS
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
class MoveMotor(QtWidgets.QWi... | bsd-3-clause | 2,612,978,641,138,935,300 | 38.365217 | 95 | 0.664237 | false | 4.056452 | false | false | false |
tracyjacks/PyMetWeather | pymetweather/pymetweather.py | 1 | 13941 | import curses
from datetime import date, timedelta
import locale
from textwrap import fill
from pymetweather.forecasts import WeatherForecast
from pymetweather.get_args import get_command_line_args, get_config_args
locale.setlocale(locale.LC_ALL, '')
class WeatherPrinter(object):
def __init__(self, forecast, sc... | gpl-2.0 | -7,420,689,951,984,828,000 | 35.413613 | 79 | 0.492955 | false | 3.184524 | false | false | false |
jcarva/digital_image_processing_assignments | spatial_domain/python/task1_6.py | 1 | 1722 | # coding=UTF-8
# 1.6. Limiarização aplicada sobre Y, com limiar m e duas opções: a) m
# escolhido pelo usuáio; b) m = média de valores da banda Y;
import numpy as np
import utils
import color
def main():
image = utils.load_image('lenna.png')
yiq_image = color.rgb2yiq(image)
grayscale_image = yiq_image[:... | gpl-3.0 | -4,424,867,651,343,764,500 | 34.770833 | 117 | 0.689977 | false | 3.171904 | false | false | false |
PXke/invenio | invenio/legacy/websubmit/functions/Create_Modify_Interface.py | 1 | 12922 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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
## License, or (at... | gpl-2.0 | 429,905,731,939,165,250 | 46.682657 | 252 | 0.580019 | false | 3.946854 | false | false | false |
quonb/atom-generator | atom_generator/video.py | 1 | 2028 | import re
class YouTube(object):
def __init__(self, url=None):
self._video_id = self._extract_id(url)
def __call__(self, url=False):
if url is None or url:
self._video_id = self._extract_id(url)
return self._video_id
def _extract_id(self, url=None):
"""Extract... | apache-2.0 | -9,203,827,087,365,975,000 | 37.264151 | 97 | 0.446746 | false | 3.840909 | false | false | false |
nikolhm/Pokus | knownpaths.py | 1 | 9583 | import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
]
def __init__(self, uuid_):
... | mit | -3,393,526,364,773,057,500 | 57.432927 | 93 | 0.627883 | false | 2.45844 | false | false | false |
tanghaibao/jcvi | jcvi/projects/vanilla.py | 1 | 11915 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Plotting scripts for the vanilla genome paper.
"""
import logging
import sys
from jcvi.apps.base import ActionDispatcher, OptionParser
from jcvi.compara.synteny import AnchorFile, check_beds
from jcvi.formats.base import get_number
from jcvi.formats.bed import Bed
fro... | bsd-2-clause | 6,120,270,252,504,517,000 | 25.07221 | 83 | 0.573059 | false | 3.071668 | false | false | false |
cwacek/python-jsonschema-objects | python_jsonschema_objects/wrapper_types.py | 1 | 11522 | import collections
import logging
import six
from python_jsonschema_objects import util
from python_jsonschema_objects.validators import registry, ValidationError
from python_jsonschema_objects.util import lazy_format as fmt
logger = logging.getLogger(__name__)
class ArrayWrapper(collections.abc.MutableSequence):
... | mit | 6,283,899,650,825,311,000 | 34.343558 | 96 | 0.518486 | false | 4.837112 | false | false | false |
franciscogmm/FinancialAnalysisUsingNLPandMachineLearning | SentimentAnalysis - Polarity - Domain Specific Lexicon.py | 1 | 2667 | import csv
import pandas as pd
import nltk
from nltk import FreqDist,ngrams
from nltk.corpus import stopwords
import string
from os import listdir
from os.path import isfile, join
def ngram_list(file,n):
f = open(file,'rU')
raw = f.read()
raw = raw.replace('\n',' ')
#raw = raw.decode('utf8')
#raw =... | mit | 7,485,374,827,431,947,000 | 21.420168 | 98 | 0.578178 | false | 2.886364 | false | false | false |
sassoftware/mint | mint/django_rest/rbuilder/querysets/views/v1/views.py | 1 | 8001 | #!/usr/bin/python
#
# Copyright (c) SAS Institute 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 | -5,749,486,631,042,150,000 | 36.56338 | 122 | 0.699038 | false | 3.678621 | false | false | false |
Anonymike/pasta-bot | plugins/google_broken.py | 1 | 3457 | import random
from util import hook, http, text, database, web
import re
def api_get(kind, query):
"""Use the RESTful Google Search API"""
url = 'http://ajax.googleapis.com/ajax/services/search/%s?' \
'v=1.0&safe=off'
return http.get_json(url % kind, q=query)
@hook.command('search')
@hook.comma... | gpl-3.0 | 2,788,865,380,336,183,000 | 33.919192 | 119 | 0.639283 | false | 3.429563 | false | false | false |
Himon-SYNCRAFT/taskplus | tests/core/actions/test_get_task_status_details.py | 1 | 3408 | from unittest import mock
from taskplus.core.actions import (GetTaskStatusDetailsAction,
GetTaskStatusDetailsRequest)
from taskplus.core.domain import TaskStatus
from taskplus.core.shared.response import ResponseFailure
def test_get_status_details_action():
status = mock.Mock()... | bsd-3-clause | -939,071,211,444,209,800 | 29.159292 | 63 | 0.701585 | false | 3.774086 | true | false | false |
codeforamerica/comport | migrations/versions/0d78d545906f_.py | 1 | 1135 | """Add 'is_public' flags for datasets
Revision ID: 0d78d545906f
Revises: 6d30846080b2
Create Date: 2016-06-27 15:30:14.415519
"""
# revision identifiers, used by Alembic.
revision = '0d78d545906f'
down_revision = '6d30846080b2'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('depar... | bsd-3-clause | -5,945,847,998,224,271,000 | 39.535714 | 139 | 0.732159 | false | 2.902813 | false | false | false |
madgik/exareme | Exareme-Docker/src/exareme/exareme-tools/madis/src/functionslocal/vtable/dummycoding.py | 1 | 2450 | import setpath
import functions
import json
registered=True
def convert(data):
if isinstance(data, basestring):
return str(data)
elif isinstance(data, collections.Mapping):
return dict(map(convert, data.iteritems()))
elif isinstance(data, collections.Iterable):
return type(data)(map... | mit | -3,340,337,105,526,376,000 | 29.259259 | 88 | 0.517959 | false | 4.3058 | false | false | false |
gnarula/eden_deployment | modules/s3db/msg.py | 1 | 88933 | # -*- coding: utf-8 -*-
""" Sahana Eden Messaging Model
@copyright: 2009-2014 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software wit... | mit | 2,607,987,622,534,597,000 | 37.903325 | 141 | 0.390586 | false | 5.521045 | false | false | false |
cdubz/babybuddy | reports/graphs/feeding_amounts.py | 1 | 1422 | # -*- coding: utf-8 -*-
from django.utils import timezone
from django.utils.translation import gettext as _
import plotly.offline as plotly
import plotly.graph_objs as go
from reports import utils
def feeding_amounts(instances):
"""
Create a graph showing daily feeding amounts over time.
:param instance... | bsd-2-clause | -5,724,312,530,632,887,000 | 29.913043 | 72 | 0.627286 | false | 3.802139 | false | false | false |
geraldinepascal/FROGS | tools/phyloseq_beta_diversity/phyloseq_beta_diversity.py | 1 | 7336 | #!/usr/bin/env python3
#
# Copyright (C) 2018 INRA
#
# 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... | gpl-3.0 | -1,608,606,170,957,709,000 | 54.157895 | 350 | 0.598555 | false | 3.626298 | false | false | false |
Detailscool/YHSpider | JiraStoryMaker/JiraStoryMaker2.py | 1 | 5993 | #!/usr/bin/python
# -*- coding:utf-8 -*-
# JiraStoryMaker.py
# Created by Henry on 2018/4/9
# Description :
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selen... | mit | -496,559,804,413,257,400 | 31.78453 | 215 | 0.607281 | false | 3.294281 | true | false | false |
sdgathman/pymilter | testsample.py | 1 | 5060 | import unittest
import Milter
import sample
import template
import mime
import zipfile
from Milter.test import TestBase
from Milter.testctx import TestCtx
class TestMilter(TestBase,sample.sampleMilter):
def __init__(self):
TestBase.__init__(self)
sample.sampleMilter.__init__(self)
class BMSMilterTestCase(un... | gpl-2.0 | 4,102,225,718,785,301,500 | 33.189189 | 77 | 0.651383 | false | 3.227041 | true | false | false |
StuartGordonReid/Comp-Finance | Optimizers/Solution.py | 1 | 1512 | __author__ = 'Stuart Gordon Reid'
__email__ = 'stuartgordonreid@gmail.com'
__website__ = 'http://www.stuartreid.co.za'
"""
File description
"""
class Solution(object):
solution = []
def __init__(self, solution, problem):
"""
Abstract initialization method for a solution to some optimization ... | lgpl-3.0 | 2,597,317,269,718,818,000 | 25.526316 | 83 | 0.587963 | false | 4.295455 | false | false | false |
ModoUnreal/PyWeather | setup.py | 1 | 99122 | '''
_______
| \ \ / @@@;
| \ \ / `#....@
| | \ / ,;@.....;,;
| | \ / @..@........@` PyWeather Setup
| | \ / .............@ version 0.6.3 beta
| / \ / .............@ ... | gpl-3.0 | 5,827,768,068,210,387,000 | 47.070297 | 167 | 0.616019 | false | 4.047117 | true | false | false |
lambdaq/pytr | core.py | 1 | 7912 | #!/usr/bin/env python
# coding: utf8
# from gevent import monkey
# monkey.patch_all()
import socket
import os, sys
import random, struct
import logging
from collections import deque, Counter, defaultdict
logger = logging.getLogger(__file__)
logger.addHandler(logging.StreamHandler(sys.stderr))
logger.setLevel(loggin... | bsd-2-clause | -1,979,069,231,076,845,000 | 27.056738 | 98 | 0.523129 | false | 3.452007 | false | false | false |
ajstarna/RicochetRobots | Brobot/model.py | 1 | 9336 | import itertools
import random
# Directions
NORTH = 'N'
EAST = 'E'
SOUTH = 'S'
WEST = 'W'
DIRECTIONS = [NORTH, EAST, SOUTH, WEST]
REVERSE = {
NORTH: SOUTH,
EAST: WEST,
SOUTH: NORTH,
WEST: EAST,
}
OFFSET = {
NORTH: -16,
EAST: 1,
SOUTH: 16,
WEST: -1,
}
# Masks
M_NORTH = 0x01
M_EAST =... | bsd-2-clause | -6,690,397,051,170,826,000 | 23.439791 | 76 | 0.487575 | false | 2.67354 | false | false | false |
wolfgangmauerer/prosoda | prosoda/interactive.py | 1 | 1232 | # Commands that are useful after adist.yp has been
# run in ipython
# This file is part of prosoda. prosoda 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, version 2.
#
# This program is distributed in the h... | gpl-2.0 | -7,668,178,328,738,901,000 | 41.482759 | 81 | 0.729708 | false | 3.242105 | false | false | false |
kdebrab/pandas | pandas/core/indexes/category.py | 1 | 30548 | import operator
import numpy as np
from pandas._libs import index as libindex
from pandas import compat
from pandas.compat.numpy import function as nv
from pandas.core.dtypes.generic import ABCCategorical, ABCSeries
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas.core.dtypes.common import (
is_... | bsd-3-clause | -6,292,839,324,184,888,000 | 34.52093 | 79 | 0.57097 | false | 4.50494 | false | false | false |
chop-dbhi/varify-data-warehouse | vdw/genes/models.py | 1 | 4984 | from django.db import models
from django.contrib.auth.models import User
from objectset.models import ObjectSet, SetObject
from vdw.literature.models import PubMed
from vdw.genome.models import Chromosome
from vdw.phenotypes.models import Phenotype, PhenotypeThrough
from .managers import GeneManager
class GeneFamily(... | bsd-2-clause | 2,703,393,772,772,176,400 | 33.372414 | 79 | 0.660112 | false | 3.787234 | false | false | false |
numericube/twistranet | twistranet/twistapp/forms/fields.py | 1 | 7275 | """
The twistranet Fields
"""
import os
import urlparse
from django import forms
from django.core.validators import URL_VALIDATOR_USER_AGENT
from django.db import models
from django.core.validators import EMPTY_VALUES
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext as _
fro... | agpl-3.0 | 4,674,477,367,613,389,000 | 37.492063 | 120 | 0.619794 | false | 4.244457 | false | false | false |
PhyloStar/PyBayes | params_moves.py | 1 | 1027 | import numpy as np
from scipy.stats import dirichlet
import random, math
dir_alpha = 100.0
scaler_alpha = 1.25
epsilon = 1e-10
def mvDirichlet(pi):
pi_new = dirichlet.rvs(dir_alpha*pi)[0]
#print(pi, pi_new)
hastings_ratio = dirichlet.logpdf(pi, pi_new) - dirichlet.logpdf(pi_new, pi)
return pi_new, has... | gpl-2.0 | -2,911,197,455,575,236,000 | 21.822222 | 80 | 0.589094 | false | 2.542079 | false | false | false |
The-WebOps-Club/odia-forum | pybbm_tag/views.py | 1 | 2818 | from django.shortcuts import render
from pybb.models import *
from pybbm_tag.models import Tag
from pybb.views import ForumView,AddPostView,EditPostView,TopicView
def add_tag(request,**kwargs):
# check permissions before calling this function
# in kwargs we expect the LABEL of the tag to add(not object) and the TO... | gpl-2.0 | -5,345,528,752,191,889,000 | 28.061856 | 94 | 0.689851 | false | 2.982011 | false | false | false |
lichengshuang/createvhost | others/webvirtmgr/delServer.py | 1 | 1305 | #!/usr/bin/python
#-*-encoding:utf-8-*-
#author: asher
#date: 20160429 on train D909
# this scripts useed for add server ip to webvirtmgr
# if not , each server must add by website,it's too slow, and very not interesting.
# use this , it's make you feel very happy
import sqlite3
try:
conn = sqlite3.connect('../... | apache-2.0 | -621,791,100,471,414,800 | 33.342105 | 95 | 0.603065 | false | 3.246269 | false | false | false |
louisq/staticguru | utility/artifact_archiver.py | 1 | 4495 | """
The MIT License (MIT)
Copyright (c) 2016 Louis-Philippe Querel l_querel@encs.concordia.ca
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the... | mit | -329,184,961,511,472,600 | 34.96 | 121 | 0.729032 | false | 3.806097 | false | false | false |
MCFlowMace/Wordom | src/setup.py | 1 | 1423 | #! /usr/bin/env python
# System imports
from distutils.core import *
from distutils import sysconfig
# Third-party modules - we depend on numpy
import numpy
# in order to check whether lapack are present ...
import numpy.distutils.system_info as sysinfo
# Obtain the numpy include directory. This works across nu... | gpl-3.0 | 8,072,262,394,954,524,000 | 32.880952 | 96 | 0.575545 | false | 3.658098 | false | true | false |
montefra/dodocs | dodocs/__init__.py | 1 | 1068 | """Main function
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import os
import sys
from dodocs.cmdline import parse
import dodocs.logger as dlog
__version__ = "0.0.1"
def main(argv=None):
"""
Main code
Parameters
----------
argv : list of strings, optional
command line argum... | mit | 1,274,893,821,913,090,000 | 21.723404 | 73 | 0.549625 | false | 3.695502 | false | false | false |
mozilla/kitsune | kitsune/wiki/permissions.py | 1 | 4844 | import logging
from django.conf import settings
log = logging.getLogger("k.wiki")
# Why is this a mixin if it can only be used for the Document model?
# Good question! My only good reason is to keep the permission related
# code organized and contained in one place.
class DocumentPermissionMixin(object):
"""Ad... | bsd-3-clause | 3,488,450,285,851,385,000 | 35.69697 | 99 | 0.652147 | false | 4.267841 | false | false | false |
aussendorf/bareos-fd-python-plugins | plugin/BareosFdPluginBaseclass.py | 1 | 5778 | #This file is now part of the main Bareos repo. Do not use this version, use the package bareos-filedaemon-python-plugin instead
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Baseclass for Bareos python plugins
# Functions taken and adapted from bareos-fd.py
# (c) Bareos GmbH & Co. KG, Maik Aussendorf
# AGPL v.3
... | agpl-3.0 | -9,126,865,445,505,169,000 | 40.271429 | 132 | 0.607823 | false | 3.560074 | false | false | false |
juanka1331/VAN-applied-to-Nifti-images | final_scripts/tests_over_3dmask_generator.py | 1 | 1589 | import sys
import os
from lib.data_loader import utils_mask3d
sys.path.append(os.path.dirname(os.getcwd()))
from lib.utils import output_utils
from lib.data_loader import mri_atlas
from lib.data_loader import pet_atlas
from lib.data_loader import PET_stack_NORAD
from lib.data_loader import MRI_stack_NORAD
from lib.uti... | gpl-2.0 | 1,206,515,291,192,381,200 | 27.375 | 69 | 0.713027 | false | 2.73494 | false | true | false |
stevenwudi/Kernelized_Correlation_Filter | CNN_training.py | 1 | 3640 | import numpy as np
from keras.optimizers import SGD
from models.CNN_CIFAR import cnn_cifar_batchnormalisation, cnn_cifar_small, cnn_cifar_nodropout, \
cnn_cifar_small_batchnormalisation
from models.DataLoader import DataLoader
from scripts.progress_bar import printProgress
from time import time, localtime
# this is... | gpl-3.0 | -7,064,727,878,876,511,000 | 39.898876 | 161 | 0.657143 | false | 3.033333 | false | false | false |
Cubitect/ASMModSuit | ASMVillageMarker.py | 1 | 5318 | import SRenderLib
from asmutils import *
def create_mod(util):
print '\nSearching for mappings for ASMVillageMarker...'
SRenderLib.setup_lib(util)
lines = util.readj('World')
pos = findOps(lines,0,[['.field','protected',';'],['.field','protected','Z'],['.field','protected',';'],['.field','protected',... | gpl-3.0 | 2,978,141,941,346,353,700 | 52.717172 | 136 | 0.668672 | false | 3.097263 | false | false | false |
shadowmint/nwidget | lib/cocos2d-0.5.5/test/test_menu_items.py | 1 | 2268 | # This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
testinfo = "s, q"
tags = "menu items, ToggleMenuItem, MultipleMenuItem, MenuItem, EntryMenuItem, ImageMenuItem, ColorMenuItem"
from pyglet import i... | apache-2.0 | 510,545,519,956,225,660 | 28.648649 | 108 | 0.609788 | false | 3.705882 | false | false | false |
jpwhite3/python-whirlwind-tour | examples/lab4.py | 1 | 1539 | from __future__ import print_function
import sys
import re
import glob
import argparse
def eprint(*args, **kwargs):
# Print to STDERR instead of STDOUT
print(*args, file=sys.stderr, **kwargs)
def grep(expression, filepath, ignorecase=False, invert=False):
raw_expression = re.escape(expression)
... | cc0-1.0 | -776,733,871,353,268,600 | 30.744681 | 117 | 0.680962 | false | 3.367615 | false | false | false |
bcarr092/pyCovertAudio | src/pyCovertAudio/BFSKModulator.py | 1 | 2146 | from pyCovertAudio_lib import *
from BaseModulator import BaseModulator
from SignalFunctions import SignalFunctions
class BFSKModulator(BaseModulator):
def __init__(
self, bitsPerSymbol, sampleRate, samplesPerSymbol,
symbolExpansionFactor, separationIntervals, configuration
):
... | apache-2.0 | -7,536,725,190,212,510,000 | 29.225352 | 79 | 0.55685 | false | 4.615054 | false | false | false |
dhhagan/PAM | Python/PAM.py | 1 | 5037 | #PAM.py
import re
import glob, os, time
from numpy import *
from pylab import *
def analyzeFile(fileName,delim):
cols = {}
indexToName = {}
lineNum = 0
goodLines = 0
shortLines = 0
FILE = open(fileName,'r')
for line in FILE:
line = line.strip()
if lineNum < 1:
lineNu... | mit | -279,067,604,541,142,340 | 27.297753 | 97 | 0.561842 | false | 3.237147 | false | false | false |
ypid/series60-remote | pc/lib/log.py | 1 | 1490 | # -*- coding: utf-8 -*-
# Copyright (c) 2008 - 2009 Lukas Hetzenecker <LuHe@gmx.at>
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import logging
class QtStreamHandler(logging.Handler):
def __init__(self, parent, main):
logging.Handler.__init__(self)
self.parent = parent
self.main... | gpl-2.0 | 9,074,983,590,830,688,000 | 25.140351 | 69 | 0.606711 | false | 3.706468 | false | false | false |
virt-who/virt-who | virtwho/manager/subscriptionmanager/subscriptionmanager.py | 1 | 16260 | # -*- coding: utf-8 -*-
from __future__ import print_function
"""
Module for communication with subscription-manager, part of virt-who
Copyright (C) 2011 Radek Novacek <rnovacek@redhat.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as pub... | gpl-2.0 | 2,120,471,579,209,106,700 | 40.692308 | 124 | 0.610701 | false | 4.460905 | true | false | false |
kata198/usrsvc | usrsvcmod/Monitoring/ActivityFile.py | 1 | 3670 | '''
Copyright (c) 2016 Tim Savannah All Rights Reserved.
This software is licensed under the terms of the GPLv3.
This may change at my discretion, retroactively, and without notice.
You should have received a copy of this with the source distribution as a file titled, LICENSE.
The most current lic... | lgpl-2.1 | 5,772,787,185,983,751,000 | 40.704545 | 212 | 0.687193 | false | 4.453883 | true | false | false |
stefanoteso/musm-adt17 | musm/pc.py | 1 | 4018 | import numpy as np
import gurobipy as gurobi
from .problem import Problem
class PC(Problem):
_ATTRIBUTES = [
('cpu', 37),
('hd', 10),
('manufacturer', 8),
('ram', 10),
('monitor', 8),
('pctype', 3),
]
_ATTR_TO_COSTS = {
'pctype': [50, 0, 80],
... | mit | 4,937,620,061,646,593,000 | 43.153846 | 112 | 0.498507 | false | 2.735194 | false | false | false |
hikelee/launcher | launcher/templatetags/helpers.py | 1 | 6201 | """
sentry.templatetags.sentry_helpers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import functools
import os.path
from collections import namedtuple
from datetime... | mit | 335,523,952,679,000,960 | 22.13806 | 100 | 0.687631 | false | 3.33029 | false | false | false |
vigneshkarthi/satireguru | satire-bot.py | 1 | 3178 | import twitter
import yaml
import time
import pickle
import re
global match, api, msg, oldID
import random
msg = ''
#RegEx for parsing twitter handle from retrived
keyword = '';
#UTF_CHARS = ur'a-z0-9_\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff'
#TAG_EXP = ur'(^|[^0-9A-Z&/]+)(#|\uff03)([0-9A-Z_]*[A-Z_]+[%s]*)' % UTF_CHARS... | gpl-2.0 | -6,554,156,474,092,308,000 | 35.113636 | 174 | 0.538704 | false | 3.64868 | false | false | false |
shadowk29/cusumtools | legacy/minimal_psd.py | 1 | 12009 | ## COPYRIGHT
## Copyright (C) 2015 Kyle Briggs (kbrig035<at>uottawa.ca)
##
## This file is part of cusumtools.
##
## 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 Soft... | gpl-3.0 | 2,097,180,032,333,189,600 | 38.503289 | 126 | 0.615955 | false | 3.252709 | false | false | false |
syhpoon/xyzcmd | libxyz/vfs/vfsobj.py | 1 | 8497 | #-*- coding: utf8 -*
#
# Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008
#
# This file is part of XYZCommander.
# XYZCommander is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free Software Foundation, either version 3 of the Licens... | gpl-3.0 | -442,618,524,861,205,300 | 26.146965 | 79 | 0.485348 | false | 5.012979 | false | false | false |
317070/kaggle-heart | ira/configurations/gauss_roi10_maxout.py | 1 | 9185 | from collections import namedtuple
import lasagne as nn
from lasagne.layers.dnn import Conv2DDNNLayer, MaxPool2DDNNLayer
import data_iterators
import numpy as np
import theano.tensor as T
from functools import partial
import utils_heart
import nn_heart
from pathfinder import PKL_TRAIN_DATA_PATH, TRAIN_LABELS_PATH, PKL_... | mit | 3,756,646,750,156,495,400 | 39.10917 | 119 | 0.552314 | false | 3.31948 | false | false | false |
SafeW3rd/Ciphers | primeSieve.py | 1 | 1139 | # Prime Number Sieve
# http://inventwithpython.com/hacking (BSD Licensed)
import math
def isPrime(num):
# Returns True if num is a prime number, otherwise False.
# Note: Generally, isPrime() is slower than primeSieve().
# all numbers less than 2 are not prime
if num < 2:
return... | mit | -7,295,585,561,268,958,000 | 23.886364 | 72 | 0.587357 | false | 3.559375 | false | false | false |
iamaris/CMUAnalysis | Common/generateObjectTree.py | 1 | 11728 | import re
import os
objects = ['Photon', 'Electron', 'Muon', 'Jet', 'Vertex']
susyObjects = {'Photon': 'Photon', 'Electron': 'Electron', 'Muon': 'Muon', 'Jet': 'PFJet', 'Vertex': 'Vertex'}
objectVars = file('ObjectVars.h')
classPat = re.compile('^[ ]*class[ ]+([a-zA-Z0-9]+)Vars[ ]*{')
cTorPat = re.compile('^[ ]*[a-z... | apache-2.0 | 6,525,613,012,333,786,000 | 21.339048 | 125 | 0.548857 | false | 3.303662 | false | false | false |
dsimic/taxsims | ss.py | 1 | 1112 | import pandas as pd
import numpy as np
def ss_calc(
contrib_yearly, inv_gwth_rt, num_years, safe_withdrw_rate, start_age=28
):
"""
inv_gwth_rt is infaltion adjusted.
contrib_yearly is in first years dollars
"""
tot_years = max(0, 62 - start_age - num_years) + num_years
df = pd.DataFrame({
... | gpl-2.0 | -1,677,530,639,553,851,100 | 31.705882 | 75 | 0.57554 | false | 2.949602 | false | false | false |
pacoqueen/bbinn | PyChart-1.39/demos/linestyles.py | 1 | 1258 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.path.append("..")
#
# Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com)
#
# Pychart 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 Foundati... | gpl-2.0 | 5,223,164,027,098,408,000 | 26.347826 | 72 | 0.68283 | false | 3.201018 | false | false | false |
Psycojoker/wanawana | wanawana/settings.py | 1 | 2687 | """
Django settings for wanawana project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | gpl-3.0 | 4,815,851,771,319,772,000 | 23.87963 | 71 | 0.723483 | false | 3.305043 | false | false | false |
jasper-meyer/Platformer | platformer.py | 1 | 3751 | """
platformer.py
Author: Jasper Meyer
Credit: You, the internet, Brendan
Assignment:
Write and submit a program that implements the sandbox platformer game:
https://github.com/HHS-IntroProgramming/Platformer
"""
from ggame import App, RectangleAsset, ImageAsset, Sprite, LineStyle, Color, Frame
SCREEN_WIDTH = 1080
S... | mit | 2,481,779,371,456,941,600 | 17.76 | 82 | 0.546254 | false | 3.084704 | false | false | false |
polaris-gslb/polaris-core | tests/test-polaris-pdns.py | 2 | 1937 | #!/usr/bin/env python3
import subprocess
import sys
import time
import json
POLARIS_PDNS_FILE = '/opt/polaris/bin/polaris-pdns'
def pretty_json(s):
d = json.loads(s)
return json.dumps(d, indent=4, separators=(',', ': '))
class TestPolarisPDNS:
def __init__(self, polaris_pdns_file):
sel... | bsd-3-clause | 3,387,221,317,398,084,600 | 24.486842 | 62 | 0.497161 | false | 3.398246 | false | false | false |
daniel20162016/my-first | read_xml_all/calcul_matrix_compare_je_good_192matrix.py | 1 | 6357 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 31 15:45:22 2016
@author: wang
"""
#from matplotlib import pylab as plt
#from numpy import fft, fromstring, int16, linspace
#import wave
from read_wav_xml_good_1 import*
from matrix_24_2 import*
from max_matrix_norm import*
import numpy as np
# open a wave file
filename... | mit | 1,603,875,107,597,510,700 | 38.484472 | 147 | 0.46028 | false | 2.768728 | false | false | false |
wholland/env | env.py | 1 | 6119 | #!/usr/bin/python
import argparse
import json
import shutil
import os
def copy_file(src, dest, backup):
success = True
if not backup is None:
(backup_folder, backup_file) = os.path.split(backup)
print("Creating backup file for " + dest + " at " + backup)
try:
if not os.path.exists(backup_folder):
os.ma... | mit | 4,431,598,936,096,710,000 | 34.575581 | 110 | 0.648962 | false | 3.113995 | false | false | false |
jailuthra/misc | python/quicksort.py | 1 | 1066 | import sys
import random
comparisons = 0
def main():
global comparisons
with open(sys.argv[1], 'r') as f:
arr = [int(x) for x in f.read().split()]
quicksort(arr, 0, len(arr)-1)
# print(arr)
print(comparisons)
def getPivot(arr, l, r):
first = arr[l]
mid = arr[(l+r)//2]
last = a... | mit | 7,158,383,021,174,650,000 | 21.208333 | 54 | 0.5 | false | 2.812665 | false | false | false |
mistercrunch/panoramix | superset/views/base_api.py | 2 | 21953 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 3,086,351,560,622,024,000 | 36.398637 | 88 | 0.605475 | false | 4.016282 | false | false | false |
sippy/voiptests | test_cases/reinv_brkn2.py | 1 | 2000 | # Copyright (c) 2016 Sippy Software, Inc. All rights reserved.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
... | bsd-2-clause | 1,664,678,858,462,998,500 | 43.444444 | 82 | 0.74 | false | 3.831418 | true | false | false |
csmart/jockey-yum | setup.py | 1 | 1204 | #!/usr/bin/env python
# (c) 2007 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
# This script needs python-distutils-extra, an extension to the standard
# distutils which provides i18n, icon support, etc.
# https://launchpad.net/python-distutils-extra
from glob import glob
from distutils.version impor... | gpl-2.0 | 4,649,148,657,068,648,000 | 31.540541 | 98 | 0.680233 | false | 3.143603 | false | false | false |
gersolar/stations | stations_configuration/settings.py | 1 | 5198 | # Only Celery settings for stations project.
#import djcelery
#djcelery.setup_loader()
#BROKER_TRANSPORT = 'amqplib'
#BROKER_URL = 'django://'
##CELERY_RESULT_BACKEND = 'database'
#CELERY_DEFAULT_QUEUE = "default"
#CELERY_QUEUES = {
# "default": {
# "binding_key": "task.#",
# },
# "mailer": {
# "binding_key": "t... | mit | 4,052,354,373,346,144,000 | 28.039106 | 85 | 0.729127 | false | 3.263026 | false | false | false |
lizardsystem/lizard-measure | lizard_measure/migrations/0010_auto__del_score__del_measuringrod__del_field_measurestatusmoment_is_pl.py | 1 | 23606 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Score'
db.delete_table('lizard_measure_score')
# Deleting model 'MeasuringRod'
... | gpl-3.0 | 1,789,020,140,202,263,800 | 77.949833 | 219 | 0.57604 | false | 3.614454 | false | false | false |
konrad/kufpybio | kufpybiotools/generate_igr_gff.py | 1 | 1881 | #!/usr/bin/env python
__description__ = ""
__author__ = "Konrad Foerstner <konrad@foerstner.org>"
__copyright__ = "2013 by Konrad Foerstner <konrad@foerstner.org>"
__license__ = "ISC license"
__email__ = "konrad@foerstner.org"
__version__ = ""
import argparse
import csv
import sys
sys.path.append(".")
from kufpybio.g... | isc | -7,492,041,156,369,239,000 | 30.35 | 70 | 0.61563 | false | 3.053571 | false | false | false |
jakobmoss/tsa | utils/makeweights.py | 1 | 2350 | # -*- coding: utf-8 -*-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Time Series Analysis -- Generate statistical weigts from scatter
#
# Author: Jakob Rørsted Mosumgaard
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##############################... | mit | 56,344,320,398,218,080 | 28.3625 | 79 | 0.43593 | false | 4.302198 | false | false | false |
erstis-go-botting/sexy-bot | misc.py | 1 | 1888 | import os
#checks if settings.ini should be generated. if not given universe, username and password it will generate a settings.ini with the default account
#This settings_generator will only work for universe 82 if the flag argument is given als True(to make sure that universe 82 is intended)
def settings_generator(... | mit | 7,923,967,946,050,228,000 | 50.027027 | 146 | 0.678496 | false | 4.16777 | false | false | false |
ActiveState/code | recipes/Python/275366_Email_address_leech/recipe-275366.py | 1 | 1624 | import re
def test():
text = \
''' You can contact us at myname@server.site.com
or at yourname AT server DOT site DOT com.
Also at o u r n a m e @ s e r v e r dot s i t e dot c o m
and t.h.e.i.r.n.a.m.e at server dot s/i/t/e DOT COM.
'''
for email in emailLee... | mit | 6,945,036,452,348,633,000 | 35.088889 | 80 | 0.513547 | false | 3.069943 | false | false | false |
mosdef-hub/foyer | foyer/tests/test_forcefield_parameters.py | 1 | 10029 | import numpy as np
import pytest
from foyer import Forcefield, forcefields
from foyer.exceptions import MissingForceError, MissingParametersError
from foyer.forcefield import get_available_forcefield_loaders
from foyer.tests.base_test import BaseTest
from foyer.tests.utils import get_fn
@pytest.mark.skipif(
cond... | mit | 3,671,707,264,193,672,000 | 33.582759 | 79 | 0.5172 | false | 3.650892 | true | false | false |
ecell/ecell3 | ecell/pyecell/ecell/analysis/PathwayProxy.py | 1 | 13263 | #!/usr/bin/env python
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# 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,427,795,092,905,206,500 | 30.133803 | 121 | 0.586594 | false | 4.485289 | false | false | false |
Syralist/pixels_clock | clock.py | 1 | 3227 | # -*- coding: utf-8 -*-
import pygame, led, sys, os, random, csv
import smbus
from pygame.locals import *
from led.PixelEventHandler import *
from time import gmtime, strftime
""" A very simple arcade shooter demo :)
"""
random.seed()
BLACK = pygame.Color(0,0,0)
WHITE = pygame.Color(255, 255, 255)
RED = pygame.Color... | gpl-3.0 | 2,032,024,441,789,479,700 | 26.117647 | 89 | 0.578866 | false | 3.700688 | false | false | false |
tylerclair/py3canvas | py3canvas/apis/modules.py | 1 | 54047 | """Modules API Version 1.0.
This API client was generated using a template. Make sure this code is valid before using it.
"""
import logging
from datetime import date, datetime
from .base import BaseCanvasAPI
from .base import BaseModel
class ModulesAPI(BaseCanvasAPI):
"""Modules API Version 1.0."""
def __i... | mit | 998,213,574,905,809,700 | 37.412935 | 354 | 0.624493 | false | 4.208285 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.