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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vishu-guntupalli/spring-batch-dashboard | spring_batch_dashboard/spring_batch_dashboard/settings.py | 1 | 3308 | """
Django settings for spring_batch_dashboard project.
Generated by 'django-admin startproject' using Django 1.10.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/... | mit | -5,535,245,436,612,907,000 | 24.84375 | 91 | 0.678053 | false | 3.534188 | false | false | false |
countrymarmot/mccdaq | setup.py | 1 | 2031 | #!/usr/bin/env python
"""Build script for mccdaq.
unzip mccdaq-x.x.zip
>>>> setup.py install
mccdaq-x.x.win32-py2.x.exe
>>>> setup.py bdist_wininst --bitmap mccdaq.bmp
"""
from distutils.core import setup, Extension
import os, re, sys, string
VERSION_MAJOR = 0
VERSION_MINOR = 2
mccdaq_version = str(VERSION_MAJOR) ... | bsd-3-clause | 5,043,339,858,986,041,000 | 30.246154 | 84 | 0.583949 | false | 3.47774 | false | false | false |
linuxwhatelse/plugin.audio.linuxwhatelse.gmusic | addon/routes/actions.py | 1 | 21782 | import os
import json
import shutil
import urlparse
import re
import uuid
import codecs
import xbmc
import xbmcgui
import xbmcplugin
import mapper
import gmusicapi
from addon.gmusic_wrapper import GMusic
from addon import utils
from addon import listing
from addon import thumbs
from addon import ADDON
from addon im... | gpl-3.0 | 2,312,730,938,915,822,000 | 27.325098 | 80 | 0.553485 | false | 3.717699 | false | false | false |
hacklabr/timtec | accounts/forms.py | 1 | 4697 | # -*- coding: utf-8 -*-
from __builtin__ import super
from django.contrib.auth import get_user_model
from django import forms
from localflavor.br.forms import BRCPFField
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from timtec.settings import ACCOUNT_REQUIRED_FIELDS as field... | agpl-3.0 | 5,552,133,178,344,531,000 | 35.410853 | 106 | 0.631254 | false | 4.03176 | false | false | false |
GrAndSE/lighty-template | setup.py | 1 | 2990 | #!/usr/bin/env python
"""
Lighty-template
~~~~~~~~~~~~~~~
Lighty-template is very simple template engine for python (python.org).
Template syntax looks like django-template or jinja2 template. But template
engine code is easier and gives a way to write all needed tags without any
hacks.
Now it does not include all fe... | bsd-3-clause | 1,835,447,419,314,017,500 | 31.857143 | 79 | 0.631438 | false | 4.295977 | false | false | false |
plotly/plotly.py | packages/python/plotly/plotly/validators/layout/ternary/_caxis.py | 1 | 11077 | import _plotly_utils.basevalidators
class CaxisValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="caxis", parent_name="layout.ternary", **kwargs):
super(CaxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | mit | -2,687,160,254,442,917,000 | 48.013274 | 84 | 0.528482 | false | 4.741866 | false | false | false |
ajinabraham/Mobile-Security-Framework-MobSF | scripts/mass_static_analysis.py | 1 | 3070 | #!/usr/bin/env python
# Mass Static Analysis
import os
import urllib.request
import urllib.error
import urllib.parse
import argparse
import requests
import logging
logger = logging.getLogger(__name__)
def is_server_up(url):
try:
response = urllib.request.urlopen(url, timeout=5)
return True
exc... | gpl-3.0 | 169,144,342,619,840,500 | 35.547619 | 108 | 0.587296 | false | 3.895939 | false | false | false |
luzi82/HiSocial | core/user/UserGroup.py | 1 | 2042 | from sqlalchemy import Column, String
from sqlalchemy.schema import ForeignKey
from user import User
import Group
from base.DatabaseBase import DBB
class UserGroup(DBB):
__tablename__ = "hs_user_usergroup"
user_id = Column(String(User.USER_ID_LENGTH),ForeignKey("hs_user_user.user_id"), primary_key=Tr... | gpl-3.0 | -638,250,286,764,452,500 | 26.594595 | 119 | 0.653771 | false | 3.490598 | false | false | false |
foxcarlos/trelar | pruebaCliente.py | 1 | 4112 | from trello import TrelloClient
import json
# api_key='your-key' - 05571f7ecf0d9177c020b9ab3495aaac
# api_secret='your-secret' - 03a65f30fb4946c03cba7998327f7e10025493f7e036408d6efbcdbd63fc66f5
# token='your-oauth-token-key' - 1316a12594687b611d0c631896b9b421436bd955d0d376162521c5ed267155d8
# token_secret='your-oauth-... | mit | 4,625,675,501,696,865,000 | 23.046784 | 100 | 0.71571 | false | 2.414563 | false | false | false |
ctk3b/InterMol | intermol/forces/nonlinear_bond_type.py | 1 | 1553 | import simtk.unit as units
from intermol.decorators import accepts_compatible_units
from intermol.forces.abstract_bond_type import AbstractBondType
class NonlinearBondType(AbstractBondType):
__slots__ = ['epsilon', 'r0', 'lamda', 'order', 'c']
@accepts_compatible_units(None, None,
... | mit | 6,348,931,378,617,034,000 | 36 | 77 | 0.542176 | false | 3.537585 | false | false | false |
immo/pyTOM | df/df_volume_control.py | 1 | 1322 | # coding: utf-8
#
# drums-backend a simple interactive audio sampler that plays vorbis samples
# Copyright (C) 2009 C.D. Immanuel Albrecht
#
# 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 Fou... | gpl-3.0 | -985,648,683,511,073,000 | 30.47619 | 80 | 0.689864 | false | 3.460733 | false | false | false |
ZeitOnline/zeit.content.article | src/zeit/content/article/browser/form.py | 1 | 4236 | from zeit.cms.checkout.interfaces import ILocalContent
from zeit.content.article.i18n import MessageFactory as _
import gocept.form.grouped
import uuid
import zeit.cms.browser.form
import zeit.cms.content.browser.form
import zeit.cms.interfaces
import zeit.cms.settings.interfaces
import zeit.content.article.interfaces
... | bsd-3-clause | 3,718,190,842,757,117,400 | 33.721311 | 77 | 0.652266 | false | 3.896964 | false | false | false |
TaliesinSkye/evennia | wintersoasis-master/objects/examples/player.py | 1 | 3539 | """
Template module for Players
Copy this module up one level and name it as you like, then
use it as a template to create your own Player class.
To make the default account login default to using a Player
of your new type, change settings.BASE_PLAYER_TYPECLASS to point to
your new class, e.g.
settings.BASE_PLAYER_... | bsd-3-clause | 298,927,947,473,682,300 | 38.322222 | 129 | 0.716869 | false | 3.949777 | false | false | false |
cwaldbieser/txcas | txcas/couchdb_ticket_store.py | 1 | 29177 |
# Standard library
from __future__ import print_function
import datetime
from functools import partial
import json
import random
import string
import sys
from textwrap import dedent
import uuid
from xml.sax.saxutils import escape as xml_escape
# Application modules
from txcas.ca_trust import createCustomPolicyFactoryF... | gpl-3.0 | -1,356,178,428,908,347,000 | 37.040417 | 118 | 0.546595 | false | 4.045618 | false | false | false |
InsightSoftwareConsortium/ITKExamples | src/Core/Common/StreamAPipeline/Code.py | 1 | 1786 | #!/usr/bin/env python
# Copyright NumFOCUS
#
# 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.txt
#
# Unless required by applicable law or ... | apache-2.0 | -5,310,177,088,434,555,000 | 29.271186 | 74 | 0.759798 | false | 3.495108 | false | false | false |
saltastro/timDIMM | analyze_cube.py | 1 | 2145 | #!/usr/bin/env python
import sys
import numpy as np
from find_boxes import rfits, daofind
pixel_scale = 1.22
dx = pixel_scale / 206265.0
rd = 0.13
d = 0.06
lamb = 0.65e-6
def moments(data):
"""Returns (height, x, y, width_x, width_y)
the gaussian parameters of a 2D distribution by calculating its
moment... | bsd-3-clause | -1,732,175,487,684,662,800 | 23.94186 | 77 | 0.46993 | false | 2.520564 | false | false | false |
nrz/ylikuutio | external/bullet3/examples/pybullet/examples/sleeping.py | 2 | 1235 | import pybullet as p
import time
useMaximalCoordinates = False
flags = p.URDF_ENABLE_SLEEPING
import pybullet_data
p.connect(p.GUI)
p.setAdditionalSearchPath(pybullet_data.getDataPath())
p.configureDebugVisualizer(p.COV_ENABLE_RENDERING, 0)
p.loadURDF("plane100.urdf", flags=flags, useMaximalCoordinates=useMaximalCo... | agpl-3.0 | -7,437,638,780,242,373,000 | 32.378378 | 85 | 0.723887 | false | 2.684783 | false | false | false |
mboman/vxcage-jobs | job-filemagic.py | 1 | 2312 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import time
import tempfile
from pymongo import MongoClient
import gridfs
try:
import magic
except ImportError:
pass
from utils import get_file, clean_data, get_type, Config
JOBNAME = 'FILEMAGIC'
SLEEPTIME = 1
# create logger
logger = logging.getLo... | bsd-3-clause | 7,086,037,901,708,765,000 | 24.130435 | 82 | 0.553201 | false | 4.013889 | false | false | false |
blueyed/coveragepy | coverage/parser.py | 1 | 45600 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Code parsing for coverage.py."""
import ast
import collections
import os
import re
import token
import tokenize
from coverage import env
from coverage.backward... | apache-2.0 | -742,420,493,542,686,700 | 37.77551 | 99 | 0.573136 | false | 4.080172 | false | false | false |
alexshepard/aledison | contacts.py | 1 | 1436 | #!/usr/bin/python
import os.path
import pickle
import yaml
config = yaml.safe_load(open("config.yml"))
contacts_filename = config["contacts"]["filename"]
class Contacts:
"""An address book, with entries for people."""
def get_contacts(self):
if (os.path.isfile(contacts_filename)):
return pickle.load(op... | mit | -1,437,390,145,994,924,000 | 24.210526 | 79 | 0.662953 | false | 3.881081 | false | false | false |
mpurg/qtools | packages/Qpyl/core/qstructure.py | 1 | 13331 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# MIT License
#
# Copyright (c) 2018 Miha Purg <miha.purg@gmail.com>
#
# 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, in... | mit | -7,656,438,831,662,270,000 | 34.454787 | 82 | 0.547221 | false | 4.311449 | false | false | false |
tensorflow/quantum | tensorflow_quantum/core/ops/tfq_simulate_ops.py | 1 | 6879 | # Copyright 2020 The TensorFlow Quantum Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | 2,645,374,472,230,637,000 | 49.955556 | 80 | 0.671319 | false | 4.351044 | false | false | false |
Education-Numerique/api | lxxl/services/graph/activities/thumbnail.py | 1 | 1736 | from lxxl.lib import router, output
from lxxl.lib.app import Error, Controller
from lxxl.lib.storage import Db, DbError
from lxxl.model.activities import Activity, Factory as ActivityFactory
from lxxl.model.blob import Factory as BlobFactory
class Thumbnail(router.Root):
def save(self, environ, params):
... | agpl-3.0 | -8,801,622,417,008,714,000 | 30 | 74 | 0.464862 | false | 4.835655 | false | false | false |
MarkusH/django-osm-field | tests/test_fields.py | 1 | 10045 | # -*- coding: utf-8 -*-
import copy
from unittest import skipIf
import django
from django.db import models
from django.test import SimpleTestCase, TestCase
from osm_field.fields import LatitudeField, Location, LongitudeField, OSMField
from osm_field.validators import validate_latitude, validate_longitude
from osm_fi... | mit | 917,209,673,852,079,500 | 33.400685 | 85 | 0.607068 | false | 3.919235 | true | false | false |
sighill/shade_app | apis/raw/001_raw/001_cleaner.py | 1 | 1564 | # 001_cleaner.py
#####################################################################
##################################
# Import des modules et ajout du path de travail pour import relatif
import sys
sys.path.insert(0 , 'D:/Projets/shade_django/apis/')
from voca import AddLog , StringFormatter , OutFileCreate... | mit | -4,217,137,144,357,580,000 | 33.409091 | 90 | 0.581515 | false | 3.343348 | false | false | false |
levilucio/SyVOLT | ECore_Copier_MM/transformation-Large/HepackageOUTeClassifiersSolveRefEPackageEClassifierEPackageEClassifier.py | 1 | 5036 |
from core.himesis import Himesis
class HepackageOUTeClassifiersSolveRefEPackageEClassifierEPackageEClassifier(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HepackageOUTeClassifiersSolveRefEPackageEClassifierEPackageEClassifier.
"""
# Flag... | mit | -3,944,586,932,985,144,300 | 47.893204 | 298 | 0.518864 | false | 3.002982 | false | false | false |
roam/machete | machete/vendor/marshmallow/fields.py | 1 | 25137 | # -*- coding: utf-8 -*-
"""Field classes for formatting and validating the serialized object.
"""
# Adapted from https://github.com/twilio/flask-restful/blob/master/flask_restful/fields.py.
# See the `NOTICE <https://github.com/sloria/marshmallow/blob/master/NOTICE>`_
# file for more licensing information.
from __futu... | bsd-2-clause | 5,213,536,666,867,892,000 | 33.961057 | 95 | 0.597685 | false | 4.269917 | false | false | false |
salrashid123/gcpsamples | id_token/iam_svc_tokens/main.py | 1 | 3398 | import logging
import os
import sys
import json
import time
import pprint
from apiclient.discovery import build
import httplib2
from oauth2client.service_account import ServiceAccountCredentials
from oauth2client.client import GoogleCredentials
from apiclient import discovery
custom_claim = "some custom_claim"
audien... | apache-2.0 | 2,382,444,408,897,355,000 | 26.184 | 150 | 0.662743 | false | 3.299029 | false | false | false |
cbpygit/pypmj | projects/scattering/photonic_crystals/slabs/hexagonal/half_spaces/hex_plane_tools.py | 1 | 4284 | from scipy.linalg import expm, norm
import numpy as np
def rot_mat(axis, theta):
return expm(np.cross(np.eye(3), axis/norm(axis)*theta))
def rotate_vector(v, axis, theta):
M = rot_mat(axis, theta)
return np.tensordot(M,v,axes=([0],[1])).T #np.dot(M, v)
def rotate_around_z(v, theta):
return rotate_ve... | gpl-3.0 | 4,831,893,324,004,283,000 | 32.732283 | 74 | 0.535247 | false | 2.920245 | false | false | false |
JoshAshby/seshat | seshat/actions.py | 1 | 3451 | #!/usr/bin/env python
"""
Actions allow you to write code that looks like::
class RandomController(BaseController):
def GET(self):
return Redirect("/")
which I think looks a lot nicer than::
class RandomController(BaseController):
def GET(self):
self.head.status = "303 SEE OTHER"
... | gpl-3.0 | 7,935,633,218,518,734,000 | 25.960938 | 87 | 0.485656 | false | 3.994213 | false | false | false |
beingzy/user_recommender_framework | groupwise_distance_learning/tests/test_helper_func.py | 1 | 2232 | """ functions for developing
Author: Yi Zhang <beingzy@gmail.com>
Date: 2016/03/10
"""
import os
import os.path
from os.path import dirname, abspath, join
import pandas as pd
def get_file_parent_dir_path(level=1):
""" return the path of the parent directory of current file """
current_dir_path = dirname(absp... | gpl-3.0 | 5,844,418,779,091,332,000 | 35 | 103 | 0.675627 | false | 3.206897 | false | false | false |
nkhumphreys/django-documentregister | documentregister/documents/tests.py | 1 | 7760 | from django.test import TestCase
from django.core.urlresolvers import reverse
from documents.models import DocumentType, Document
from documents.forms import DocumentRegistrationForm
from django_webtest import WebTest
class DocumentModelTest(TestCase):
def setUp(self):
self.dt = DocumentType.objects.crea... | mit | -5,455,818,955,410,780,000 | 33.185022 | 89 | 0.576804 | false | 3.971341 | true | false | false |
dials/dials | command_line/slice_sequence.py | 1 | 8896 | from os.path import basename, splitext
from dxtbx.model.experiment_list import ExperimentList
import dials.util
from dials.algorithms.refinement.refinement_helpers import calculate_frame_numbers
from dials.array_family import flex
from dials.util import Sorry
from dials.util.multi_dataset_handling import generate_exp... | bsd-3-clause | -2,975,352,729,658,704,000 | 34.870968 | 88 | 0.60589 | false | 4.208136 | false | false | false |
urbn/kombu | kombu/__init__.py | 1 | 4315 | """Messaging library for Python."""
from __future__ import absolute_import, unicode_literals
import os
import re
import sys
if sys.version_info < (2, 7): # pragma: no cover
raise Exception('Kombu 4.0 requires Python versions 2.7 or later.')
from collections import namedtuple # noqa
__version__ = '4.6.6'
__aut... | bsd-3-clause | -6,484,372,662,189,597,000 | 32.976378 | 74 | 0.593975 | false | 3.647506 | false | false | false |
RedHatInsights/insights-core | insights/parsers/tests/test_journal_since_boot.py | 1 | 1683 | from insights.parsers.journal_since_boot import JournalSinceBoot
from insights.tests import context_wrap
MSGINFO = """
-- Logs begin at Wed 2017-02-08 15:18:00 CET, end at Tue 2017-09-19 09:12:59 CEST. --
May 18 15:13:34 lxc-rhel68-sat56 jabberd/sm[11057]: session started: jid=rhn-dispatcher-sat@lxc-rhel6-sat56.redhat... | apache-2.0 | 1,267,607,497,514,420,700 | 55.1 | 131 | 0.686275 | false | 2.493333 | false | false | false |
TylerTemp/md-video | md_video.py | 1 | 7634 | """
Video block for python-markdown
This is aimed to provide best output even without this extension
Title is case insensitive, title is no use, can also be `[video]`.
This is only to avoid the quick reference link
Format:
[Video: Title of the Video]

[download.m... | mit | -9,049,451,487,628,241,000 | 30.415638 | 122 | 0.517684 | false | 3.988506 | true | false | false |
gencer/sentry | src/sentry/south_migrations/0362_auto__add_userip__add_unique_userip_user_ip_address.py | 1 | 89359 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... | bsd-3-clause | 5,967,626,897,996,228,000 | 89.904374 | 233 | 0.579516 | false | 3.886019 | false | false | false |
openmotics/gateway | src/gateway/api/serializers/group_action.py | 1 | 1889 | # Copyright (C) 2020 OpenMotics BV
#
# This program 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 option) any later version.
#
# This program is distribu... | agpl-3.0 | -3,511,298,968,444,998,000 | 38.354167 | 105 | 0.670196 | false | 3.831643 | false | false | false |
thepaul/uftrace | tests/t098_dump_tid.py | 1 | 2454 | #!/usr/bin/env python
from runtest import TestBase
import subprocess as sp
TDIR='xxx'
class TestCase(TestBase):
def __init__(self):
TestBase.__init__(self, 'fork', """
uftrace file header: magic = 4674726163652100
uftrace file header: version = 4
uftrace file header: header size = 40
uftr... | gpl-2.0 | 676,877,935,123,326,600 | 35.088235 | 119 | 0.603912 | false | 2.935407 | true | false | false |
h4ck3rm1k3/orca-sonar | src/orca/generator.py | 1 | 46495 | # Orca
#
# Copyright 2009 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This libr... | lgpl-2.1 | -3,497,708,915,490,167,000 | 41.734375 | 176 | 0.521841 | false | 4.835171 | false | false | false |
OpenTransitTools/utils | ott/utils/parse/cmdline/db_cmdline.py | 1 | 1334 | from .base_cmdline import *
def is_spatial(parser):
parser.add_argument(
'--is_geospatial',
'-geo',
'-g',
action="store_true",
help="add geometry columns"
)
def db_parser(prog_name='bin/loader', tables=['Could be (Decarative) Base.metadata.sorted_tables'], url_require... | mpl-2.0 | -1,641,518,630,436,433,000 | 24.169811 | 151 | 0.572714 | false | 3.768362 | false | false | false |
MikeCurrington/LedPinky | main.py | 1 | 4174 | import xml.etree.ElementTree as ET
import ConfigParser
import SimpleHTTPServer
import SocketServer
import os
from LedWiz import LedWiz
from LedHttp import LedHttp
from gpio import ArcadeGpio
from GameData import GameData
from PinMap import PinMap
from DeviceManager import DeviceManager
from Sequencer import Sequencer
... | mit | 5,146,564,350,527,761,000 | 26.826667 | 117 | 0.758265 | false | 3.377023 | false | false | false |
projectshift/shift-boiler | boiler/routes/lazy_views.py | 1 | 1700 | from werkzeug.utils import import_string, cached_property
class LazyView:
"""
Lazy view
Callable class that provides loading views on-demand as soon as they
are hit. This reduces startup times and improves general performance.
See flask docs for more:
http://flask.pocoo.org/docs/0.10/patterns... | mit | -3,940,850,781,304,468,000 | 29.357143 | 78 | 0.583529 | false | 4.3257 | false | false | false |
SEMAFORInformatik/femagtools | femagtools/forcedens.py | 1 | 6880 | # -*- coding: utf-8 -*-
"""
femagtools.forcedens
~~~~~~~~~~~~~~~~~~~~
Read Force Density Plot Files
"""
import os
import re
import glob
import numpy as np
import logging
logger = logging.getLogger('femagtools.forcedens')
filename_pat = re.compile(r'^(\w+)_(\d{3}).PLT(\d+)')
num_pat = re.compile(r'([+-]... | bsd-2-clause | -4,452,825,694,495,662,000 | 29.990991 | 73 | 0.459738 | false | 3.839286 | false | false | false |
Towellang/Fabric | towel.py | 1 | 3116 | #!/usr/bin/env python2
import sys
import random
from string import join
STACK = []
LOOPS = [] # Loops are stacks too
PNT = 0
BREAK = False # Break mode
ENV = {
"[": lambda: LOOPS.append(PNT),
"]": lambda: loop(),
"drop": lambda: STACK.pop(),
"dup": lambda: push(str(STACK[-1])) if STACK != [] else panic("Tried d... | gpl-3.0 | -3,585,480,334,938,244,600 | 23.155039 | 102 | 0.603338 | false | 2.638442 | false | false | false |
mrunge/openstack_horizon | openstack_horizon/dashboards/project/data_processing/job_executions/tables.py | 1 | 4946 | # 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
# distributed under the... | apache-2.0 | 407,357,235,437,798,500 | 28.795181 | 74 | 0.598868 | false | 4.205782 | false | false | false |
Diti24/python-ivi | ivi/agilent/agilent8156A.py | 1 | 8762 | """
Python Interchangeable Virtual Instrument Library
Copyright (c) 2014-2016 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the... | mit | -8,041,004,866,283,276,000 | 36.767241 | 99 | 0.589249 | false | 4.363546 | false | false | false |
cwgreene/Nanostructure-Simulator | kdtree_c.py | 1 | 3883 | import ctypes
import time #test only
#init
kdtree = ctypes.cdll.LoadLibrary("c_optimized/kdtree.so")
kdtree3 = ctypes.cdll.LoadLibrary("c_optimized/kdtree3.so")
kdtree.call_this()
#types
vector2 = ctypes.c_double*2
vector2p = ctypes.c_double*3
vector3 = ctypes.c_double*3
vector3p = ctypes.c_double*4
kdtree_p = ctypes... | mit | -5,357,662,318,989,151,000 | 24.546053 | 73 | 0.692506 | false | 2.54623 | false | false | false |
GEMScienceTools/oq-subduction | openquake/sub/grid3d.py | 1 | 6450 | """
:module:
"""
import rtree
import numpy as np
from pyproj import Proj
from scipy.interpolate import griddata
from shapely.geometry import Point
from openquake.sub.misc.alpha_shape import alpha_shape
def generator_function(mesh):
"""
Generator function for quick loading of a 3D spatial index
:param ... | agpl-3.0 | -156,947,146,470,911,140 | 32.076923 | 79 | 0.528527 | false | 3.185185 | false | false | false |
tremblerz/breach-detection-system | dashboard/bds/views.py | 1 | 2233 | from django.shortcuts import render,redirect
import random,json
from django.http import HttpResponse
from django.contrib.auth import authenticate,logout,login
from bds.models import Packet
# Create your views here.
"""
def send_data(request):
"""
def login_v(request):
message = ""
if request.method == "POST":
use... | gpl-3.0 | 7,901,635,335,165,355,000 | 26.580247 | 84 | 0.659651 | false | 2.808805 | false | false | false |
chrischoy/3D-R2N2 | lib/blender_renderer.py | 1 | 10773 | #!/usr/bin/env python3
import _init_paths
import time
import os
import contextlib
from math import radians
import numpy as np
from PIL import Image
from tempfile import TemporaryFile
from lib.utils import stdout_redirected
from lib.config import cfg
import bpy
def voxel2mesh(voxels):
cube_verts = [[0, 0, 0],
... | mit | 1,062,251,790,059,312,600 | 32.77116 | 101 | 0.560475 | false | 3.5 | false | false | false |
spantaleev/sijax-python | sijax/core.py | 1 | 16018 | # -*- coding: utf-8 -*
from __future__ import (absolute_import, unicode_literals)
"""
sijax.core
~~~~~~~~~~
Implements the main Sijax class, an instance of which is used to
register callbacks, invoke callbacks, setup events handlers, etc.
:copyright: (c) 2011 by Slavi Pantaleev.
:license: BS... | bsd-3-clause | 8,143,440,697,030,521,000 | 38.163814 | 84 | 0.629667 | false | 4.567437 | false | false | false |
markwal/Cura | plugins/CuraEngineBackend/CuraEngineBackend.py | 1 | 10593 | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.Backend.Backend import Backend
from UM.Application import Application
from UM.Scene.SceneNode import SceneNode
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
from UM.Preferences import Preferenc... | agpl-3.0 | -7,926,261,142,368,935,000 | 37.380435 | 180 | 0.652412 | false | 4.269649 | false | false | false |
adamsumm/CausalMario | HiddenCauses/irm/Mario/parse.py | 1 | 2165 | import sys
import re
import random
vevent = re.compile("V\s+([\-\d\w]+)\s+(\w+)")
sevent = re.compile("S\s+([\-\d\w]+)\s+([\-\d\w]+)")
aevent = re.compile("A\s+([\-\d\w]+)")
devent = re.compile("D\s+([\-\d\w]{2,})")
cevent = re.compile("C\s+([\-\d\w]+)\s+[\-\d]*\s*([\-\d\w]+)\s+([\-\d\w]+)")
animate = ["Goomba","Mario"... | mit | 7,378,686,023,350,711,000 | 28.256757 | 76 | 0.579677 | false | 2.451869 | false | false | false |
arenaoftitans/arena-of-titans-api | aot/game/cards/deck.py | 1 | 4174 | ################################################################################
# Copyright (C) 2015-2020 by Last Run Contributors.
#
# This file is part of Arena of Titans.
#
# Arena of Titans is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publ... | agpl-3.0 | -7,988,025,100,036,046,000 | 28.814286 | 94 | 0.594873 | false | 3.922932 | false | false | false |
petebachant/CFT-vectors | cft_vectors.py | 1 | 18584 | #!/usr/bin/env python
"""
This script generates a force and velocity vector diagram for a cross-flow
turbine.
"""
from __future__ import division, print_function
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
from scipy.interpolate import interp1d
import seaborn as sns
from px... | mit | -164,932,162,652,562,180 | 35.296875 | 79 | 0.562096 | false | 2.90103 | false | false | false |
bluecube/codecad | codecad/rendering/svg.py | 1 | 1105 | from . import polygon2d
def render_svg(obj, filename):
polygons = polygon2d.polygon(obj)
with open(filename, "w") as fp:
box = obj.bounding_box()
box_size = box.size()
fp.write('<svg xmlns="http://www.w3.org/2000/svg" ')
fp.write('width="{}mm" height="{}mm" '.format(box_size.... | gpl-3.0 | -1,875,038,684,060,846,800 | 30.571429 | 86 | 0.483258 | false | 3.230994 | false | false | false |
jmwenda/hypermap | hypermap/aggregator/tasks.py | 1 | 5215 | from __future__ import absolute_import
from django.conf import settings
from celery import shared_task
@shared_task(bind=True)
def check_all_services(self):
from aggregator.models import Service
service_to_processes = Service.objects.filter(active=True)
total = service_to_processes.count()
count = 0... | mit | 2,542,782,802,133,991,400 | 27.812155 | 76 | 0.60767 | false | 3.968798 | false | false | false |
slzatz/esp8266 | iot_generic.py | 1 | 2478 | '''
The basic setup here is to have an Adafruit Feather HUZZAH ESP8266 plus a Featherwing OLED SSD1306
This is a non-specific script that writes the MQTT message to the OLED display.
The MQTT broker is running on an EC2 instance.
The esp8266+OLED that subscribes to the topic can be used to turn on and off a Data Logg... | mit | 7,950,682,271,571,295,000 | 24.546392 | 111 | 0.657385 | false | 2.939502 | false | false | false |
suraj-deshmukh/myCodes | crout.py | 1 | 1270 | #!/usr/bin/python2.7
import numpy as num
import sys
import csv
def crout(A):
n = A.shape
if(n[0]!=n[1]):
print("Give matrix is not square matrix. Code Terminated")
sys.exit()
n=n[0]
A = num.mat(A,dtype=float)
U = num.matrix(A*0)
L = num.matrix(U)
for i in range(0,n):
L[i,0] = A[i,0]
U[i,i] = 1
... | mit | 1,452,418,819,009,944,600 | 29.97561 | 103 | 0.60315 | false | 2.382739 | false | false | false |
mrclro/kbxrec | project/people/migrations/0001_initial.py | 1 | 4164 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-22 19:46
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('events', '0... | mit | 2,426,154,979,955,103,000 | 46.318182 | 168 | 0.555716 | false | 4.3375 | false | false | false |
classicsxdx/puzzlecoin | contrib/bitrpc/bitrpc.py | 1 | 7844 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:11814")
else:
access = Se... | mit | 3,194,827,894,278,671,400 | 23.209877 | 79 | 0.662035 | false | 3.055707 | false | false | false |
midnightradio/gerrit | tools/pack_war.py | 1 | 1943 | #!/usr/bin/python
# Copyright (C) 2013 The Android Open Source Project
#
# 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 ap... | apache-2.0 | -142,233,088,232,519,580 | 33.087719 | 79 | 0.685538 | false | 3.310051 | false | false | false |
jpurma/Kataja | plugins/TreesAreMemory/TreesAreMemoryParser.py | 1 | 9791 | from itertools import chain
try: # When this is imported in Kataja context
from plugins.TreesAreMemory.Constituent import Constituent
from plugins.TreesAreMemory.Feature import Feature
from kataja.syntax.SyntaxState import SyntaxState
from plugins.TreesAreMemory.utils import simple_bracket_tree_... | gpl-3.0 | -4,325,917,991,685,196,300 | 39.659574 | 114 | 0.575077 | false | 4.111718 | false | false | false |
hxxft/lynx-native | Core/build/jni_generator.py | 1 | 52358 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Extracts native methods from a Java file and generates the JNI bindings.
If you change this, please run and update the tests."""... | mit | 1,661,477,151,239,666,400 | 34.739249 | 103 | 0.6196 | false | 3.607662 | false | false | false |
djs55/planex | planex/debiancontrol.py | 1 | 3069 | """
Utility functions for generating Debian control files from RPM
spec files.
"""
from planex.tree import Tree
from planex import mappkgname
import textwrap
STANDARDS_VERSION = "3.9.3"
def control_from_spec(spec):
"""
Create the contents of the debian/control file from spec.
"""
res = Tree()
s... | lgpl-2.1 | -5,583,763,980,021,387,000 | 30 | 79 | 0.576735 | false | 3.467797 | false | false | false |
uvemas/ViTables | vitables/csv/export_csv.py | 1 | 11064 | # Copyright (C) 2008-2019 Vicent Mas. All rights reserved
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | gpl-3.0 | 3,280,593,357,724,348,400 | 36.505085 | 81 | 0.574657 | false | 4.473918 | false | false | false |
flockchat/pyflock | flockos/models/image.py | 1 | 1421 | # coding: utf-8
from pprint import pformat
from ..utils import to_dict
class Image(object):
def __init__(self, src=None, width=None, height=None):
self._src = src
self._width = width
self._height = height
@property
def src(self):
return self._src
@src.setter
... | apache-2.0 | -9,079,618,273,298,583,000 | 18.202703 | 75 | 0.525686 | false | 4.254491 | false | false | false |
Denon/syncPlaylist | WYtoQQ.py | 1 | 5106 | import urlparse
import re
from time import sleep
from base import BaseSpider
from settings import *
from urllib2 import quote
from api.wy import get_playlist_detail
from utils import _print, retry, RetryException
class WYtoQQ(BaseSpider):
@retry(retry_times=3, notice_message="login failed and retry")
def pre... | mit | 7,395,140,910,663,368,000 | 43.017241 | 164 | 0.591069 | false | 3.621277 | true | false | false |
tanium/pytan | EXAMPLES/PYTAN_API/invalid_export_basetype_csv_bad_sort_type.py | 1 | 3820 | #!/usr/bin/env python
"""
Export a BaseType from getting objects using a bad header_sort
"""
# import the basic python packages we need
import os
import sys
import tempfile
import pprint
import traceback
# disable python from generating a .pyc file
sys.dont_write_bytecode = True
# change me to the path of pytan if th... | mit | -7,229,140,398,507,273,000 | 35.730769 | 198 | 0.712565 | false | 3.32463 | false | false | false |
indautgrp/frappe | frappe/api.py | 1 | 4534 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import json
import frappe
import frappe.handler
import frappe.client
from frappe.utils.response import build_response
from frappe import _
from urlparse import urlparse
from urlli... | mit | 2,075,036,741,239,225,300 | 29.02649 | 133 | 0.679091 | false | 3.261871 | false | false | false |
sgmap/openfisca-france | openfisca_france/model/prestations/minima_sociaux/aefa.py | 1 | 2983 | # -*- coding: utf-8 -*-
from openfisca_france.model.base import *
from openfisca_france.model.prestations.prestations_familiales.base_ressource import nb_enf
class aefa(Variable):
'''
Aide exceptionelle de fin d'année (prime de Noël)
Instituée en 1998
Apparaît sous le nom de complément de rmi dans le... | agpl-3.0 | -1,951,170,180,763,779,300 | 47.583333 | 120 | 0.672384 | false | 2.871921 | false | false | false |
olyhaa/OlyEats | olyeats/recipe/forms.py | 1 | 3642 | from django.forms import ModelForm
from django.template.loader import render_to_string
from models import Recipe
import django.forms as forms
from django.forms.models import BaseInlineFormSet
from django.conf import settings
from django.contrib.sites.models import Site
from django.template import loader, RequestContext... | gpl-2.0 | 7,721,903,612,825,831,000 | 35.42 | 129 | 0.731192 | false | 3.471878 | false | false | false |
leonardoarroyo/django-react-cms | react_cms/widgets.py | 1 | 1852 | import json
from django.forms.widgets import Widget
from django.conf import settings
from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from collections import OrderedDict
from react_cms.finders import ComponentFinder
class ResourceEditorWidget(Widget):
template_name ... | mit | 8,283,340,780,235,129,000 | 36.04 | 121 | 0.689525 | false | 4.043668 | false | false | false |
autogestion/sh_ctracker | ctracker/sql.py | 1 | 7452 | from django.db import connection
claim_to_polygon_join = """
LEFT OUTER JOIN ctracker_polygon_organizations ON (houses.polygon_id = ctracker_polygon_organizations.polygon_id)
LEFT OUTER JOIN ctracker_organization ON (ctracker_polygon_organizations.organization_id = ctracker_organization.id)
LEFT OU... | bsd-3-clause | -1,031,291,130,743,859,500 | 50.4 | 151 | 0.543076 | false | 3.940772 | false | false | false |
password123456/lotto | get_random_generate_number_sendmessage.py | 1 | 5900 | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
__author__ = 'https://github.com/password123456/'
import random
import numpy as np
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import requests
import urllib
import urllib2
import json
import datetime
import time
import dateutil.relativedelta as REL
class b... | apache-2.0 | -2,032,991,578,046,145,300 | 25.928571 | 86 | 0.512505 | false | 2.262323 | false | false | false |
selvasingh/azure-sdk-for-java | eng/pipelines/scripts/generate_overview_from_readme.py | 1 | 3812 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Use case: Given a README.md file, generate a readme_overview.html file and place it next
# to the README.md. This will allow the javadocs jar step to append the contents of the
# readme onto the landing page.
#
# This scrip... | mit | 3,548,446,964,432,801,300 | 49.157895 | 164 | 0.695435 | false | 3.897751 | false | false | false |
crustymonkey/pylibgal3 | libg3/Errors.py | 1 | 1431 | #
# Author: Jay Deiman
# Email: admin@splitstreams.com
#
# This file is part of pylibgal3.
#
# pylibgal3 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
# ... | gpl-3.0 | 4,734,498,918,985,512,000 | 27.058824 | 73 | 0.671558 | false | 3.507353 | false | false | false |
opensvn/python | pygame/bpwpapcode/Chapter06/joystickdemo.py | 1 | 3510 | import pygame
from pygame.locals import *
from sys import exit
pygame.init()
screen = pygame.display.set_mode((640, 480), 0, 32)
# Get a list of joystick objects
joysticks = []
for joystick_no in xrange(pygame.joystick.get_count()):
stick = pygame.joystick.Joystick(joystick_no)
stick.init()
jo... | gpl-2.0 | 2,817,038,411,529,330,000 | 29.909091 | 78 | 0.533903 | false | 2.954545 | false | false | false |
cgwalters/imagefactory | imagefactory_plugins/OVA/OVA.py | 1 | 3390 | # encoding: utf-8
# Copyright 2013 Red Hat, 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 applica... | apache-2.0 | 5,084,509,486,704,579,000 | 37.965517 | 113 | 0.666372 | false | 3.974209 | false | false | false |
armanpazouki/chrono | src/demos/python/demo_crank_plot.py | 1 | 5655 | #------------------------------------------------------------------------------
# Name: pychrono example
# Purpose:
#
# Author: Alessandro Tasora
#
# Created: 1/01/2019
# Copyright: (c) ProjectChrono 2019
#------------------------------------------------------------------------------
import pychrono... | bsd-3-clause | -6,782,592,407,969,920,000 | 31.125 | 99 | 0.649098 | false | 3.116869 | false | false | false |
vitek/wwwatch | wwwatch/storage.py | 1 | 3245 | import socket
import json
from collections import defaultdict
import redis
class BasicStorage(object):
def __init__(self):
self.counters = {}
def register_counter(self, name=''):
if name not in self.counters:
self.counters[name] = defaultdict(int)
return self.counters[nam... | mit | -7,546,837,987,552,991,000 | 31.45 | 79 | 0.561479 | false | 4.24183 | false | false | false |
ysrc/xunfeng | vulscan/kunpeng.py | 1 | 4090 | # coding:utf-8
from ctypes import *
import _ctypes
import json
import platform
import os
import urllib2
import sys
from urllib import urlretrieve
import zipfile
class kunpeng:
def __init__(self):
self.kunpeng = None
self.system = platform.system().lower()
self.pwd = os.path.split(os.path.... | gpl-3.0 | -7,708,567,594,290,426,000 | 29.059259 | 106 | 0.55101 | false | 3.337171 | false | false | false |
widowild/messcripts | exercice/python3/chap13/base_exercice_13_23.py | 1 | 1776 | # -*- coding:Utf8 -*-
# Examen de programmation Python - 6TSIb - Juin 2004
from tkinter import *
class FaceDom(object):
def __init__(self, can, val, pos, taille =70):
self.can =can
# ***
x, y, c = pos[0], pos[1], taille/2
can.create_rectangle(x -c, y-c, x+c, y+c, fill ='ivory', wi... | gpl-3.0 | -3,131,348,597,347,846,000 | 27.645161 | 78 | 0.469032 | false | 2.869144 | false | false | false |
praekelt/molo.polls | molo/polls/admin_views.py | 1 | 1756 | import csv
from collections import OrderedDict
from django.http.response import HttpResponse
from django.shortcuts import get_object_or_404, render
from django.views.generic.edit import FormView
from molo.polls.models import Question
class QuestionResultsAdminView(FormView):
def get(self, request, *args, **kwarg... | bsd-2-clause | -880,368,398,644,271,100 | 31.518519 | 74 | 0.610478 | false | 4.1513 | false | false | false |
liboyin/algo-prac | arrays/weighted_schedule.py | 1 | 2080 | from lib import bin_search_right, snd
def search(arr):
"""
Given a list of tasks, represented as tuple of starting time, finishing time, and profit (non-negative). Returns
the maximum profit achievable by choosing non-conflicting tasks.
Solution is binary search on tasks sorted by finishing time.
... | gpl-3.0 | -3,536,597,105,274,693,000 | 45.222222 | 116 | 0.574519 | false | 3.354839 | false | false | false |
purpleidea/gedit-plugins | plugins/commander/commander/commands/method.py | 1 | 3558 | # -*- coding: utf-8 -*-
#
# method.py - commander
#
# Copyright (C) 2010 - Jesse van den Kieboom
#
# 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 | -6,270,523,070,650,933,000 | 27.015748 | 149 | 0.577853 | false | 4.011274 | false | false | false |
sirio81/vmcli | libguest.py | 1 | 3653 | from libvmcli import *
class Guest:
def __init__(self, all_opt, global_cluster_options, cluster_options):
self.global_cluster_options = global_cluster_options
self.cluster_options = cluster_options
self.all_opt = all_opt
self.opt = self.parse_opt(all_opt)
self.host_name = No... | lgpl-2.1 | -349,600,212,241,541,060 | 39.142857 | 146 | 0.545305 | false | 3.485687 | false | false | false |
umago/kabukiman | kabukiman/module.py | 1 | 1400 | #!/usr/bin/python
# coding: utf-8
# Copyright (C) 2010 Lucas Alvares Gomes <lucasagomes@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at you... | gpl-2.0 | -1,178,434,302,922,153,500 | 33.146341 | 72 | 0.661429 | false | 4.105572 | false | false | false |
ArcherSys/ArcherSys | Lib/sre_compile.py | 1 | 19904 |
#
# Secret Labs' Regular Expression Engine
#
# convert template to internal format
#
# Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved.
#
# See the sre.py file for information on usage and redistribution.
#
"""Internal support module for sre"""
import _sre
import sre_parse
from sre_constants import *... | mit | -6,332,745,429,824,574,000 | 32.50253 | 109 | 0.4963 | false | 3.933281 | false | false | false |
vipul-tm/DAG | dags-ttpl/createPreviousState.py | 1 | 14429 | from airflow import DAG
from airflow.operators import PythonOperator
from airflow.hooks import RedisHook
from datetime import datetime, timedelta
from airflow.models import Variable
from airflow.hooks import RedisHook
from shutil import copyfile
import logging
import traceback
from airflow.hooks import MemcacheHook
d... | bsd-3-clause | 4,937,185,614,881,251,000 | 37.787634 | 153 | 0.563934 | false | 3.472684 | false | false | false |
andrewyoung1991/supriya | supriya/tools/requesttools/NodeFreeRequest.py | 1 | 1577 | # -*- encoding: utf-8 -*-
import collections
from supriya.tools import osctools
from supriya.tools.requesttools.Request import Request
class NodeFreeRequest(Request):
r'''A /n_free request.
::
>>> from supriya.tools import requesttools
>>> request = requesttools.NodeFreeRequest(
... ... | mit | 6,297,036,571,516,061,000 | 20.324324 | 63 | 0.551046 | false | 4.04359 | false | false | false |
maxisi/gwsumm | gwsumm/channels.py | 1 | 6672 | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2013)
#
# This file is part of GWSumm.
#
# GWSumm 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) ... | gpl-3.0 | -6,511,334,062,866,690,000 | 32.86802 | 79 | 0.542866 | false | 4.100799 | false | false | false |
sevenian3/ChromaStarPy | LevelPopsGasServer.py | 1 | 55996 | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 24 14:13:47 2017
@author: ishort
"""
import math
import Useful
import ToolBox
#import numpy
#JB#
#from matplotlib.pyplot import plot, title, show, scatter
#storage for fits (not all may be used)
uw = []
uwa = []
uwb = []
uwStage = []
uwbStage = []
uwu ... | mit | 3,178,557,225,868,192,000 | 39.977511 | 287 | 0.575238 | false | 2.860441 | false | false | false |
codelieche/codelieche.com | apps/article/views/pages/article.py | 1 | 11474 | # -*- coding:utf-8 -*-
import json
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponse, HttpResponseRedirect, Http404, JsonResponse
from django.shortcuts import render, get_object_or_404, redirect
from django.views.generic... | mit | -1,462,004,923,378,391,000 | 32.350482 | 101 | 0.54811 | false | 3.170896 | false | false | false |
updownlife/multipleK | dependencies/biopython-1.65/Tests/test_SearchIO_hmmer3_tab.py | 1 | 20424 | # Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SearchIO HmmerIO hmmer3-tab parser."""
import os
import unittest
from Bio ... | gpl-2.0 | -5,258,293,306,572,943,000 | 39.766467 | 117 | 0.632393 | false | 3.20276 | true | false | false |
SathyaBhat/spotify-dl | spotify_dl/youtube.py | 1 | 3746 | import urllib.request
from os import path
import mutagen
import youtube_dl
from mutagen.easyid3 import EasyID3
from mutagen.id3 import APIC, ID3
from mutagen.mp3 import MP3
from spotify_dl.scaffold import log
from spotify_dl.utils import sanitize
def default_filename(song):
return sanitize(f"{song.get('artist')... | mit | -4,171,133,412,178,890,000 | 40.622222 | 120 | 0.571543 | false | 3.951477 | false | false | false |
artkolev/QuizBot | src/bot.py | 1 | 16410 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import Skype4Py
import datetime
import time
import random
import logging
import sqlite3
from hashlib import sha1
from collections import deque
FORMAT=u'%(name)s %(thread)d %(levelname)s: %(message)s'
logging.basicConfig(format=FORMAT, level=logging.INFO)
logging.getLogg... | gpl-2.0 | 7,940,548,997,084,515,000 | 44.736842 | 99 | 0.461194 | false | 3.961003 | false | false | false |
salceson/PJN | lab8/main.py | 1 | 6484 | # coding: utf-8
import pickle
import sys
from heapq import nlargest, nsmallest
from operator import itemgetter
from pprint import pprint
from gensim import corpora, models
from utils import calculate_lda, calculate_lsi, cosine_metric, preprocess_data, create_tfidf
__author__ = "Michał Ciołczyk"
_DATA_FILE = 'data/pa... | mit | -4,748,124,683,531,162,000 | 38.284848 | 109 | 0.51265 | false | 3.979128 | false | false | false |
waliens/sldc | sldc/merger.py | 1 | 10691 | # -*- coding: utf-8 -*-
import numpy as np
from shapely.geometry import JOIN_STYLE, Polygon
from shapely.ops import cascaded_union
__author__ = "Begon Jean-Michel <jm.begon@gmail.com>"
__contributor__ = ["Romain Mormont <romainmormont@hotmail.com>"]
__version = "0.1"
class Graph(object):
"""A class for represent... | mit | -6,005,729,276,697,479,000 | 40.277992 | 132 | 0.609391 | false | 4.520507 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.