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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jGaboardi/LP_MIP | Gurobi_Dual_Standard.py | 1 | 3689 | '''
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
'''
# Building a Standard Dual Linear Program... | lgpl-3.0 | -634,265,576,286,617,500 | 35.9 | 89 | 0.465709 | false | 3.953912 | false | false | false |
OpenMined/PySyft | packages/syft/src/syft/lib/pandas/categorical_dtype.py | 1 | 1173 | # third party
import pandas as pd
# syft relative
from ...generate_wrapper import GenerateWrapper
from ...lib.python.list import List
from ...lib.python.primitive_factory import PrimitiveFactory
from ...proto.lib.pandas.categorical_pb2 import (
PandasCategoricalDtype as PandasCategoricalDtype_PB,
)
def object2pr... | apache-2.0 | -2,055,834,329,634,423,300 | 32.514286 | 84 | 0.768116 | false | 3.631579 | false | false | false |
catkin/xylem | xylem/load_url.py | 1 | 2512 | # Copyright 2014 Open Source Robotics Foundation, 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 or ... | apache-2.0 | 5,625,816,946,383,272,000 | 34.885714 | 74 | 0.662022 | false | 4.15894 | false | false | false |
nuagenetworks/vspk-python | vspk/v5_0/nuvirtualfirewallrule.py | 1 | 40053 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyrigh... | bsd-3-clause | -8,485,020,749,954,375,000 | 31.777414 | 292 | 0.587896 | false | 4.578532 | false | false | false |
motlib/mqtt-ts | src/sensors/sysinfo.py | 1 | 1526 | '''System info related sensor implementations.'''
from sensors.sbase import SensorBase
from datetime import datetime
class NetTraffic(SensorBase):
'''Measures the average rx and tx throughput of a network interface.'''
def __init__(self, scfg):
super().__init__(scfg)
self.device = scfg['de... | gpl-3.0 | 6,934,267,668,239,048,000 | 24.433333 | 76 | 0.532765 | false | 3.805486 | false | false | false |
nimbusproject/epumgmt | src/python/epumgmt/sbin/most-recent-log.py | 1 | 1325 | #!/usr/bin/env python
import os
import sys
import time
from epumgmt.sbin import sbin_common
def get_logfiledir(p):
logfiledir = p.get_conf_or_none("logging", "logfiledir")
if not logfiledir:
sys.stderr.write("There is no logfiledir configuration")
return None
return sbin_common.apply_vardi... | apache-2.0 | -2,352,648,267,245,581,000 | 24.480769 | 97 | 0.655094 | false | 3.088578 | false | false | false |
Aperturedimigo/Complete | QT/GUI_Privasee_notYourFace.py | 1 | 1271 | import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import QPainter
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
windowSizeX = 440
windowSizeY = 250
fontMajor = "Arial"
fontMinor = "Dotum"
class Form(QWidget):
# __init__ : 생성자
# parent : 부모객체
... | mit | 8,769,573,910,723,589,000 | 21.446429 | 62 | 0.640414 | false | 3.397297 | false | false | false |
ICGC-TCGA-PanCancer/pancancer-sandbox | pcawg_metadata_parser/generate_all_donors.py | 1 | 24480 | #!/usr/bin/env python
import sys
import os
import re
import glob
import xmltodict
import json
import yaml
import copy
import logging
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
from elasticsearch import Elasticsearch
from collections import OrderedDict
import datetime
import d... | gpl-2.0 | -5,105,432,271,745,159,000 | 51.758621 | 168 | 0.615891 | false | 3.015521 | false | false | false |
mozbhearsum/balrog | auslib/blobs/systemaddons.py | 1 | 4440 | from auslib.AUS import isForbiddenUrl
from auslib.blobs.base import Blob
from auslib.errors import BadDataError
class SystemAddonsBlob(Blob):
jsonschema = "systemaddons.yml"
def __init__(self, **kwargs):
Blob.__init__(self, **kwargs)
if "schema_version" not in self:
self["schema_v... | mpl-2.0 | -1,265,025,930,622,100,000 | 43.848485 | 127 | 0.62973 | false | 4.431138 | false | false | false |
HaiFangHui/cf_log_parser | models.py | 1 | 2248 | import gzip
import re
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy import Column, Integer, String, DateTime, Text, func, desc
from config import config
db_spec = config.get('DATABASE', 'DB_SPEC')
en... | mit | 6,871,069,050,997,379,000 | 27.1 | 74 | 0.620107 | false | 3.496112 | false | false | false |
rogeriofalcone/treeio | core/migrations/0008_auto__add_field_attachment_filename.py | 1 | 21062 | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
# 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):
#... | mit | 1,028,083,438,358,553,200 | 85.319672 | 217 | 0.552891 | false | 3.628877 | false | false | false |
alabarga/SocialLearning | SocialLearning/apps/learningobjects/management/commands/describe.py | 1 | 6166 | #-*- coding: UTF-8 -*-
from learningobjects.utils.search import *
from learningobjects.utils.parsers import *
from django.core.management.base import BaseCommand, CommandError
from learningobjects.models import *
from optparse import make_option
from learningobjects.utils import feedfinder
from learningobjects.manageme... | gpl-3.0 | 3,285,137,839,453,769,700 | 41.496552 | 162 | 0.493833 | false | 4.564444 | false | false | false |
OpenTechFund/WebApp | addressfield/fields.py | 1 | 1809 | import json
from os import path
from django import forms
from django.core.exceptions import ValidationError
from .widgets import AddressWidget
basepath = path.dirname(__file__)
filepath = path.abspath(path.join(basepath, "static", "addressfield.min.json"))
with open(filepath, encoding='utf8') as address_data:
c... | gpl-2.0 | 7,997,557,167,834,397,000 | 28.655738 | 110 | 0.632946 | false | 4.236534 | false | false | false |
40023256/W17test | wsgi.py | 1 | 27073 | # coding=utf-8
# 上面的程式內容編碼必須在程式的第一或者第二行才會有作用
################# (1) 模組導入區
# 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝
import cherrypy
# 導入 Python 內建的 os 模組, 因為 os 模組為 Python 內建, 所以無需透過 setup.py 安裝
import os
# 導入 random 模組
import random
import math
from cherrypy.lib.static import serve_file
# ... | agpl-3.0 | 8,563,548,445,470,714,000 | 34.536797 | 180 | 0.552605 | false | 2.718512 | false | false | false |
RoboAvatar65/ChessRobot | algorithm.py | 1 | 5095 | ############################################################
###algorithm.py Chess Algorithm Engine ###
###Written by Nicholas Maselli ###
### ###
###Purpose: The Algorithm class creates a minimax tree ###
##... | mit | -5,972,521,656,114,823,000 | 26.160221 | 66 | 0.547203 | false | 3.312744 | false | false | false |
zeha/multiapt | extlib/paramiko-1.7.3/paramiko/common.py | 1 | 4059 | # Copyright (C) 2003-2007 Robey Pointer <robey@lag.net>
#
# This file is part of paramiko.
#
# Paramiko 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 op... | mit | -5,328,580,210,442,775,000 | 31.214286 | 80 | 0.71052 | false | 3.318888 | false | false | false |
richtermondt/inithub-web | inithub/manager/views/interest_manager.py | 1 | 1278 | '''
@author: rtermondt
'''
from django.shortcuts import render_to_response
from django.template import RequestContext
from manager.models import Interest, Interests
from django.contrib.auth.decorators import login_required
@login_required()
def interest_manager(request):
system_message = None
if request.POST... | mit | -5,919,080,515,784,932,000 | 37.727273 | 69 | 0.623631 | false | 4.317568 | false | false | false |
compas-dev/compas | src/compas_rhino/conduits/faces.py | 1 | 2740 | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
try:
basestring
except NameError:
basestring = str
from System.Drawing.Color import FromArgb
from Rhino.Geometry import Point3d
from compas.utilities import color_to_rgb
from compas_rhino.conduits.bas... | mit | 8,426,798,086,672,952,000 | 28.782609 | 83 | 0.605839 | false | 3.953824 | false | false | false |
cym13/anime_verif | anime_verif.py | 1 | 4001 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013 Cédric Picard
#
# LICENSE
# 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) ... | gpl-3.0 | 253,679,824,081,122,340 | 28.62963 | 79 | 0.6225 | false | 3.700278 | false | false | false |
hanlind/nova | nova/conf/service_token.py | 1 | 2573 | # 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
# d... | apache-2.0 | 8,061,595,397,624,959,000 | 37.984848 | 78 | 0.720171 | false | 4.001555 | false | false | false |
marrow/schema | test/transform/test_boolean.py | 1 | 1445 | from marrow.schema.testing import TransformTest
from marrow.schema.transform.type import Boolean, boolean, WebBoolean, web_boolean
class TestBooleanNative(TransformTest):
transform = boolean.native
invalid = ('x', )
@property
def valid(self):
yield None, None
if boolean.none:
yield '', None
for ... | mit | -1,062,259,557,086,997,800 | 21.578125 | 82 | 0.667128 | false | 3.155022 | true | false | false |
r-owen/TUI | TUI/Models/PermsModel.py | 1 | 1598 | #!/usr/bin/env python
"""A model of the state of the perms actor.
It contains instance variables that are KeyVariables
or sets of KeyVariables. All are directly associated
with status keywords.
History:
2003-12-10 ROwen
2003-12-17 ROwen Moved KeyVarFactory to RO.KeyVariable.
2004-05-18 ROwen Eliminated unused t... | bsd-3-clause | -8,059,034,035,777,778,000 | 26.551724 | 75 | 0.602003 | false | 4.04557 | false | false | false |
j-be/wien-geodatenviewer-exporter | convert_coordinates.py | 1 | 1134 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
from get_size import getSize
import os
# Fetch parameters from environment
start_major = int(os.environ['__VJ_START_MAJOR__'])
start_minor = int(os.environ['__VJ_START_MINOR__'])
# Specific do internet data
LINE_SHIFT=10
def getNext((major, minor) = (None, None), n = 0):... | mit | 1,745,236,984,340,221,200 | 21.68 | 66 | 0.577601 | false | 2.589041 | false | false | false |
UrLab/incubator | events/tests/test_forms.py | 1 | 1547 | from events.forms import EventForm
from datetime import datetime
import pytest
from users.models import User
@pytest.fixture(scope='function')
def user():
user = User.objects.create(username="test", email="test@test.be", first_name="Test", last_name="Test")
return user.id
@pytest.mark.django_db
def test_onl... | agpl-3.0 | -8,803,743,879,468,728,000 | 24.262295 | 106 | 0.606749 | false | 3.210417 | true | false | false |
Yipit/pyeqs | tests/functional/test_connection.py | 1 | 1657 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from sure import scenario
from pyeqs import QuerySet
from tests.helpers import prepare_data, cleanup_data, add_document
@scenario(prepare_data, cleanup_data)
def test_simple_search_with_host_string(context):
"""
Connect with host string
"""... | mit | -8,015,881,604,622,951,000 | 24.106061 | 66 | 0.630054 | false | 3.540598 | false | false | false |
projectexpert/pmis | analytic_resource_plan/wizard/resource_plan_line_make_purchase.py | 1 | 6559 | # Copyright 2019 LUXIM, Slovenia (Matjaž Mozetič)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
from odoo.tools.translate import _
from odoo.exceptions import ValidationError
class ResourcePlanLineMakePurchase(models.TransientModel):
_name = "res... | agpl-3.0 | 8,725,401,470,347,737,000 | 36.255682 | 80 | 0.522648 | false | 4.065096 | false | false | false |
liberatetheweb/blockedinrussia.org | code.py | 1 | 9146 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import web, bcrypt, redis, json, requests, dns.resolver, re, M2Crypto, cgi
from urlparse import urlsplit
from zbase62 import zbase62
web.config.debug = False
r_server = redis.Redis('localhost')
urls = (
'/', 'index',
'/check', 'check',
'/logout', 'logout',
'/registe... | cc0-1.0 | -4,965,741,691,448,358,000 | 45.746914 | 533 | 0.654034 | false | 2.256555 | false | false | false |
tareqalayan/pytest | _pytest/monkeypatch.py | 1 | 9043 | """ monkeypatching and mocking functionality. """
from __future__ import absolute_import, division, print_function
import os
import sys
import re
import six
from _pytest.fixtures import fixture
RE_IMPORT_ERROR_NAME = re.compile("^No module named (.*)$")
@fixture
def monkeypatch():
"""The returned ``monkeypatch... | mit | -8,587,276,179,298,903,000 | 34.050388 | 108 | 0.585204 | false | 4.459073 | false | false | false |
mpobrien/see | see.py | 1 | 6339 | #!/usr/bin/env python
"""
see
A human alternative to dir().
>>> from see import see
>>> help(see)
Copyright (c) 2009 Liam Cooke
http://inky.github.com/see/
Licensed under the GNU General Public License v3. {{{
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU... | gpl-3.0 | -980,045,166,100,666,000 | 25.302905 | 71 | 0.485881 | false | 3.630584 | false | false | false |
JASchilz/RoverMUD | simple_universe/attachments/ooc_commands.py | 1 | 1072 | from basics import BaseAttachment
class OOCComands(BaseAttachment):
character = False
def __init__(self, character):
self.character = character
self.action_matrix = [
["help", self.do_help,
"Open the help screen, or receive help on a specific command. \
... | apache-2.0 | -3,326,857,299,222,098,000 | 33.580645 | 108 | 0.583955 | false | 3.814947 | false | false | false |
kushG/osf.io | website/addons/dataverse/views/crud.py | 1 | 13076 | # -*- coding: utf-8 -*-
import os
import httplib
import logging
import datetime
import requests
from bs4 import BeautifulSoup
from flask import request, make_response
from framework.flask import redirect
from framework.exceptions import HTTPError
from framework.utils import secure_filename
from framework.auth.utils ... | apache-2.0 | -2,003,208,364,250,141,200 | 29.268519 | 89 | 0.619073 | false | 3.622161 | false | false | false |
SublimeText/PackageDev | plugins/settings/known_settings.py | 1 | 29813 | import collections
import logging
import os
import re
import textwrap
import time
import weakref
import sublime
from sublime_lib import encodings, ResourcePath
from ..lib.weakmethod import WeakMethodProxy
from ..lib import get_setting
from .region_math import VALUE_SCOPE, get_value_region_at, get_last_key_name_from
... | mit | 2,889,114,320,144,689,000 | 37.567917 | 95 | 0.55127 | false | 4.726221 | false | false | false |
cbertinato/pandas | pandas/io/excel/_openpyxl.py | 1 | 14098 | from pandas.io.excel._base import ExcelWriter
from pandas.io.excel._util import _validate_freeze_panes
class _OpenpyxlWriter(ExcelWriter):
engine = 'openpyxl'
supported_extensions = ('.xlsx', '.xlsm')
def __init__(self, path, engine=None, mode='w', **engine_kwargs):
# Use the openpyxl module as t... | bsd-3-clause | 6,980,768,126,160,941,000 | 30.121413 | 79 | 0.474394 | false | 4.323214 | false | false | false |
RRZE-HPC/pycachesim | setup.py | 1 | 4792 | #!/usr/bin/env python
from __future__ import absolute_import
from setuptools.extension import Extension
from setuptools import setup, find_packages # Always prefer setuptools over distutils
from codecs import open # To use a consistent encoding
import os
import io
import re
#import numpy
here = os.path.abspath(os.... | agpl-3.0 | -7,722,935,823,156,337,000 | 33.228571 | 91 | 0.643573 | false | 4.030278 | false | false | false |
yorvic/.vim | bundle/python-mode/pylibs/pylama/checkers/pylint/logilab/common/modutils.py | 1 | 21802 | # -*- coding: utf-8 -*-
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser Genera... | gpl-3.0 | 4,864,961,915,379,925,000 | 32.133739 | 97 | 0.622236 | false | 4.060719 | false | false | false |
tanglei528/glance | glance/tests/unit/common/test_property_utils.py | 1 | 23549 | # Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 1,898,010,542,779,827,200 | 48.162839 | 78 | 0.618115 | false | 4.069293 | true | false | false |
agopalak/football_pred | pre_proc/proc_data.py | 1 | 4667 |
import sys
import yaml
import re
import datetime as DT
import logging
from rainbow_logging_handler import RainbowLoggingHandler
import pandas as pd
import numpy as np
from sklearn import preprocessing
from sklearn_pandas import DataFrameMapper
# Capturing current module. Needed to call getattr on this module
this_m... | mit | -8,975,530,814,334,559,000 | 34.090226 | 106 | 0.668738 | false | 3.701031 | false | false | false |
jtrebosc/JTutils | TSpy/zeroim3D.py | 1 | 1091 | # -*- coding: utf-8 -*-
import sys
import os
PYTHONPATH=os.getenv("PYTHONPATH","not_defined")
if "not_defined" in PYTHONPATH:
MSG("cannot acces to PYTHONPATH environment. It's required for accessing to brukerPARIO lib" )
EXIT()
#add the Library path for importing brukerPARIO
sys.path.append(PYTHONPATH)
import bruke... | bsd-3-clause | 4,196,901,395,096,500,700 | 22.212766 | 95 | 0.692026 | false | 3.108262 | false | false | false |
RoanokeHobby/Robots | CamJamRobot/9-avoidance.py | 1 | 4715 | # CamJam EduKit 3 - Robotics
# Worksheet 9 – Obstacle Avoidance
# Copyright (c) 2016 CamJam-EduKit
# The MIT License (MIT)
import RPi.GPIO as GPIO # Import the GPIO Library
import time # Import the Time library
# Set the GPIO modes
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
# Set variables for the GPIO motor pin... | gpl-3.0 | -1,776,289,787,637,158,400 | 26.723529 | 68 | 0.719711 | false | 3.217065 | false | false | false |
sharpbitmessage/PyBitmessage | regenerateaddresses.py | 1 | 8348 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'regenerateaddresses.ui'
#
# Created: Thu Jan 24 15:52:24 2013
# by: PyQt4 UI code generator 4.9.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
ex... | mit | 7,812,533,412,955,256,000 | 71.591304 | 372 | 0.750958 | false | 3.998084 | false | false | false |
EmadMokhtar/halaqat | students/forms.py | 1 | 6022 | from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Div, Layout
from django import forms
from django.utils.translation import ugettext_lazy as _
from students.models import Student
class StudentForm(forms.ModelForm):
dob = forms.DateField(widget=forms.DateInput(
... | mit | -5,507,447,061,664,380,000 | 38.359477 | 79 | 0.436898 | false | 4.153103 | false | false | false |
antonvino/inmoov-basic | hexapod_scripts_base/maestro_lib.py | 1 | 13426 | ###########################################################################################
# Filename:
# Device.py
###########################################################################################
# Project Authors:
# Juhapekka Piiroinen
# Brian Wu
#
# Changes:
# June 14, 2010 by Juhapekka Pi... | mit | 5,167,666,572,091,440,000 | 48.725926 | 165 | 0.562565 | false | 4.361923 | false | false | false |
mimoralea/king-pong | multicnet.py | 1 | 6980 | import tensorflow as tf
import cv2
import numpy as np
class MultilayerConvolutionalNetwork:
"""
This class manages the deep neural network
that will be used by the agent to learn
and extrapolate the state space
"""
def __init__(self, input_width, input_height, nimages, nchannels):
self.... | mit | -3,459,783,105,853,825,500 | 35.544503 | 89 | 0.5851 | false | 3.566684 | false | false | false |
wilsonkichoi/zipline | zipline/data/data_portal.py | 1 | 64491 | #
# Copyright 2016 Quantopian, 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 or agreed to in wr... | apache-2.0 | -865,142,654,808,246,400 | 35.830954 | 79 | 0.516025 | false | 4.383564 | false | false | false |
trinitysoulstars/astralturf | lyriscisssor.py | 1 | 2800 | import nltk
from nltk import FreqDist
import json
import csv
print "* Loading corpus"
#raw = gutenberg.raw('melville-moby_dick.txt')
#raw = gutenberg.raw('bible-kjv.txt')
#raw = gutenberg.raw('tss-lyrics.txt')
lines = []
with open("tss-lyrics.txt", 'r') as raw:
lines = raw.read()
print "* Tokenizing"
#tokens =... | agpl-3.0 | 4,980,310,506,052,259,000 | 19.588235 | 85 | 0.5575 | false | 3.050109 | false | false | false |
praekelt/django-football365 | football365/migrations/0001_initial.py | 1 | 1330 | # -*- coding: 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):
# Adding model 'Call'
db.create_table('football365_call', (
('id', self.gf('django.db.models.fie... | bsd-3-clause | -9,080,950,197,422,033,000 | 35.972222 | 98 | 0.588722 | false | 3.735955 | false | false | false |
albatrossandco/brubeck_cms | brubeck/articles/views.py | 1 | 4971 | # Imports from standard libraries
from datetime import date, datetime, time, timedelta
# Imports from Django
from django.core.paginator import EmptyPage, InvalidPage, Paginator
from django.contrib.sites.models import Site
from django.http import Http404, HttpResponsePermanentRedirect
from django.template import Reques... | bsd-3-clause | 8,039,887,085,016,300,000 | 30.264151 | 179 | 0.62241 | false | 3.820907 | false | false | false |
Baz2013/blog_demo | leetcode/easy/pascal_triangle.py | 1 | 1246 | # -*- coding:utf-8 -*-
# 118. Pascal's Triangle QuestionEditorial Solution My Submissions
# Difficulty: Easy
# Contributors: Admin
# Given numRows, generate the first numRows of Pascal's triangle.
#
# For example, given numRows = 5,
# Return
#
# [
# [1],
# [1,1],
# [1,2,1],
# [1,3,3,1],
# [1,4,6,4,1]... | gpl-3.0 | -6,662,119,099,640,546,000 | 21.25 | 69 | 0.460674 | false | 3.278947 | false | false | false |
SukkoPera/Arduino-Sensoria | python/server2.py | 1 | 1152 | #!/usr/bin/env python
import time
import server
import argparse
DEFAULT_NAME = "Server2"
class OutdoorSensor (server.TemperatureSensor):
def __init__ (self):
super (OutdoorSensor, self).__init__ ("OS", "Outdoor Sensor", "20171127")
class OutdoorLight (server.ControlledRelayActuator):
def __init__ (self):
supe... | gpl-3.0 | -1,972,986,873,049,436,200 | 30.135135 | 147 | 0.717014 | false | 3.291429 | false | false | false |
sitigrema/sitigrema.github.io | build.py | 1 | 10927 | #!/usr/bin/env python3
import os
import shutil
import json
import yaml
from PIL import Image
from nxtools import *
class GremaProduct():
def __init__(self, parent, title):
self.parent = parent
self.title = title
self.slug = slugify(title)
@property
def data_dir(self):
re... | mit | 2,389,932,027,173,189,600 | 32.314024 | 129 | 0.560996 | false | 3.695299 | false | false | false |
django-notifications/django-notifications | notifications/migrations/0001_initial.py | 1 | 2201 | # -*- coding: utf-8 -*-
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
import swapper
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0001_initial'),
]
... | bsd-3-clause | 6,760,268,480,087,502,000 | 54.025 | 183 | 0.614266 | false | 4.358416 | false | false | false |
gsalgado/pyethapp | pyethapp/accounts.py | 1 | 20516 | import json
import os
from random import SystemRandom
import shutil
from uuid import UUID
from devp2p.service import BaseService
from ethereum.tools import keys
from ethereum.slogging import get_logger
from ethereum.utils import privtopub # this is different than the one used in devp2p.crypto
from ethereum.utils impo... | mit | -40,519,088,334,624,580 | 38.152672 | 99 | 0.604748 | false | 4.294746 | true | false | false |
mikjo/bigitr | unit_test/daemonconfig_test.py | 1 | 4363 | #
# Copyright 2012 SAS Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | 3,015,315,161,100,464,600 | 37.610619 | 80 | 0.65047 | false | 3.465449 | true | false | false |
oaubert/advene | lib/advene/plugins/tts.py | 1 | 14814 | #
# Advene: Annotate Digital Videos, Exchange on the NEt
# Copyright (C) 2008-2017 Olivier Aubert <contact@olivieraubert.net>
#
# Advene 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 ... | gpl-2.0 | -6,785,914,089,887,248,000 | 35.220049 | 208 | 0.601256 | false | 3.700724 | true | false | false |
d9pouces/StarterPyth | starterpyth/model.py | 1 | 13326 | # -*- coding=utf-8 -*-
import datetime
import os
import shutil
import subprocess
from jinja2 import ChoiceLoader
import pkg_resources
from six import u
from starterpyth.cliforms import BaseForm
from starterpyth.utils import binary_path, walk
from starterpyth.log import display, GREEN, CYAN, RED
from starterpyth.trans... | gpl-2.0 | -4,413,395,872,870,266,400 | 44.640411 | 120 | 0.55523 | false | 4.132093 | false | false | false |
algorhythms/LeetCode | 652 Find Duplicate Subtrees.py | 1 | 2915 | #!/usr/bin/python3
"""
Given a binary tree, return all duplicate subtrees. For each kind of duplicate
subtrees, you only need to return the root node of any one of them.
Two trees are duplicate if they have the same structure with same node values.
Example 1:
1
/ \
2 3
/ / \
4 2 ... | mit | 6,062,483,486,887,231,000 | 22.134921 | 86 | 0.560549 | false | 3.933873 | false | false | false |
civisanalytics/civis-python | civis/cli/_cli_commands.py | 1 | 11952 | #!/usr/bin/env python3
"""
Additional commands to add to the CLI beyond the OpenAPI spec.
"""
from __future__ import print_function
import functools
import operator
import os
import sys
import time
import click
import requests
import webbrowser
import civis
from civis.io import file_to_civis, civis_to_file
# From ... | bsd-3-clause | 2,283,246,677,349,149,700 | 36.118012 | 79 | 0.589525 | false | 3.346025 | false | false | false |
catapult-project/catapult | telemetry/telemetry/internal/backends/chrome/android_browser_finder.py | 3 | 20134 | # Copyright 2013 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.
"""Finds android browsers that can be started and controlled by telemetry."""
from __future__ import absolute_import
import contextlib
import logging
import... | bsd-3-clause | -6,664,016,816,628,379,000 | 39.348697 | 80 | 0.703387 | false | 4.074884 | false | false | false |
vipulsabhaya/cue | cue/openstack/common/policy.py | 1 | 28680 | # Copyright (c) 2012 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | -7,924,507,737,262,820,000 | 30.038961 | 78 | 0.598326 | false | 4.311485 | false | false | false |
chriscauley/django-registration | registration/admin.py | 1 | 1630 | from django.contrib import admin, messages
from django.contrib.sites.requests import RequestSite
from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
from registration.models import RegistrationProfile
class RawMixin(object):
def formfield_for_dbfield(self, db_field, ... | bsd-3-clause | -7,230,500,162,756,277,000 | 37.809524 | 76 | 0.722086 | false | 3.808411 | false | false | false |
apache/incubator-allura | ForgeSVN/forgesvn/tests/model/test_repository.py | 1 | 44587 | # 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 (t... | apache-2.0 | 8,255,370,146,006,055,000 | 38.24912 | 115 | 0.538722 | false | 3.585317 | true | false | false |
unioslo/cerebrum | contrib/no/uio/user_per_sko.py | 1 | 20843 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2004 University of Oslo, Norway
#
# This file is part of Cerebrum.
#
# Cerebrum 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 t... | gpl-2.0 | -8,248,292,858,385,225,000 | 33.45124 | 80 | 0.58101 | false | 3.739996 | false | false | false |
darrengarvey/procfs-snapshot | parsers/smaps.py | 1 | 3160 | from model import MemoryRegion
import util
import re
def parse_smaps_header(header):
info = MemoryRegion(free=False)
# Example line is:
# 011e6000-01239000 rw-p 00000000 00:00 0 [heap]
# 8ec00000-8ec01000 rw-s 00000000 00:14 20 /dev/shm/NS2371 (deleted)
# All numbers are hex except for the ino... | apache-2.0 | -3,556,137,785,705,143,000 | 31.244898 | 95 | 0.575633 | false | 3.3942 | false | false | false |
raygeeknyc/ohgee | visionanalyzer.py | 1 | 19670 | #!/usr/bin/python3
import logging
# Used only if this is run as main
_DEBUG = logging.DEBUG
SENTIMENT_CONFIDENCE_THRESHOLD = 0.25
GOOD_SENTIMENT_THRESHOLD = SENTIMENT_CONFIDENCE_THRESHOLD
BAD_SENTIMENT_THRESHOLD = -1*SENTIMENT_CONFIDENCE_THRESHOLD
# Import the packages we need for drawing and displaying images
from ... | gpl-3.0 | -6,442,731,910,641,957,000 | 43.401806 | 275 | 0.618607 | false | 3.5 | false | false | false |
sovaa/backdoorme | backdoors/shell/bash2.py | 1 | 1323 | from backdoors.backdoor import *
import subprocess
import threading
class Bash2(Backdoor):
prompt = Fore.RED + "(bash) " + Fore.BLUE + ">> " + Fore.RESET
def __init__(self, core):
cmd.Cmd.__init__(self)
self.intro = GOOD + "Using second Bash module..."
self.core = core
self.opt... | mit | 3,782,052,884,608,909,000 | 41.677419 | 174 | 0.589569 | false | 3.614754 | false | false | false |
lem-usp/Bio507 | site.py | 1 | 3672 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals # unicode by default
import sys
import datetime
from collections import OrderedDict
import pandoc
#import bib
from flask import Flask
from flask import render_template, redirect, url_for
from flaskext.babel import Babel
from flask... | mit | 510,964,192,068,874,800 | 24.324138 | 85 | 0.663399 | false | 3.215412 | true | false | false |
alexandrucoman/vbox-nova-driver | nova/compute/manager.py | 1 | 323194 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | apache-2.0 | -8,592,144,729,025,166,000 | 45.071846 | 79 | 0.559565 | false | 4.722504 | false | false | false |
cubells/l10n-spain | l10n_es_aeat_mod130/models/mod130.py | 1 | 10541 | # Copyright 2014-2019 Tecnativa - Pedro M. Baeza
from odoo import _, api, fields, exceptions, models
def trunc(f, n):
slen = len('%.*f' % (n, f))
return float(str(f)[:slen])
class L10nEsAeatMod130Report(models.Model):
_description = "AEAT 130 report"
_inherit = "l10n.es.aeat.report"
_name = "l1... | agpl-3.0 | 2,714,379,535,093,566,500 | 42.551867 | 79 | 0.550114 | false | 3.462884 | false | false | false |
benvand/alexa-stackoverflow | strings.py | 1 | 1340 | """Strings for Alexa to say"""
from settings import SITE_NAME_SPEAKABLE
SITE_NAME = SITE_NAME_SPEAKABLE
# Breaks
BREAK = '<break strength="{strength}">'
XS_BREAK = BREAK.format(strength='x-strong')
S_BREAK = BREAK.format(strength='strong')
# Greet and dismiss
WELCOME_REPROMPT = \
"""
You can ask {site_name} for an... | mit | 671,700,695,409,543,000 | 37.285714 | 107 | 0.723881 | false | 2.977778 | false | false | false |
seewindcn/tortoisehg | src/mercurial/ui.py | 1 | 45732 | # ui.py - user interface bits for mercurial
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
import errno
import getpass
import inspect
... | gpl-2.0 | -7,963,893,888,895,642,000 | 35.209026 | 80 | 0.551233 | false | 4.211438 | true | false | false |
Azure/azure-sdk-for-python | sdk/applicationinsights/azure-applicationinsights/azure/applicationinsights/models/events_user_info_py3.py | 1 | 1277 | # 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 | -2,469,813,432,503,886,300 | 34.472222 | 108 | 0.570086 | false | 4.173203 | false | false | false |
davidvon/pipa-pay-server | admin/api/cards.py | 1 | 18567 | # -*- coding: utf-8 -*-
import datetime
import time
import traceback
from flask import request
from flask.ext.restful import Resource
from api import API_PREFIX
from api.order import create_order
from app import restful_api, db, logger
from cache.order import cache_qrcode_code, get_cache_order
from cache.weixin impor... | apache-2.0 | 424,458,567,064,073,000 | 41.844186 | 119 | 0.558975 | false | 3.784511 | false | false | false |
StanislavQA/python_task | timeweb2.py | 1 | 2037 | # -*- coding: utf-8 -*-
from selenium.webdriver.firefox.webdriver import WebDriver
import unittest
def is_alert_present(wd):
try:
wd.switch_to_alert().text
return True
except:
return False
class timeweb2(unittest.TestCase):
def setUp(self):
self.wd = WebDriver()
sel... | apache-2.0 | 2,199,998,941,769,938,200 | 35 | 104 | 0.599495 | false | 2.882096 | false | false | false |
Lilykos/inspire-next | inspire/modules/workflows/views/holdingpen_edit.py | 1 | 3372 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2015 CERN.
#
# INSPIRE is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 | -2,135,099,619,901,420,800 | 30.222222 | 87 | 0.694247 | false | 3.594883 | false | false | false |
FedoraScientific/salome-kernel | src/KERNEL_PY/iparameters.py | 1 | 9144 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesse... | lgpl-2.1 | -3,224,081,632,475,024,400 | 34.858824 | 107 | 0.610127 | false | 3.729201 | false | false | false |
google-research/robel | robel/robot_env.py | 1 | 21356 | # Copyright 2019 The ROBEL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | 211,426,022,284,709,200 | 37.548736 | 80 | 0.594306 | false | 4.408753 | false | false | false |
kingmotley/SickRage | sickbeard/providers/torrentproject.py | 1 | 4736 | # coding=utf-8
# Author: Gonçalo M. (aka duramato/supergonkas) <supergonkas@gmail.com>
#
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage 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 Fo... | gpl-3.0 | -4,328,285,688,660,908,500 | 35.992188 | 137 | 0.568321 | false | 4.208889 | false | false | false |
refstudycentre/versification | util.py | 1 | 11774 |
import numpy as np
import unicodecsv
import codecs
import goslate
import sqlite3
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
def imp_load(filename):
texts = []
books = []
chapters = []
verses = []
# Read in a whole bible
w... | gpl-2.0 | 5,110,724,472,901,213,000 | 28.14604 | 125 | 0.590029 | false | 3.857798 | false | false | false |
oesteban/mriqc | mriqc/qc/anatomical.py | 1 | 21553 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
# pylint: disable=no-member
r"""
Measures based on noise measurements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. _iqms_cjv:
- :py:func:`~mriqc.qc.anatomical.cj... | bsd-3-clause | 3,528,858,505,162,906,600 | 32.726135 | 97 | 0.62605 | false | 3.081796 | false | false | false |
eng-tools/sfsimodels | tests/test_interaction.py | 1 | 2586 | from sfsimodels import models
import sfsimodels as sm
import json
import numpy as np
def test_link_building_and_soil():
number_of_storeys = 6
interstorey_height = 3.4 # m
n_bays = 3
fb = models.FrameBuilding(number_of_storeys, n_bays)
fb.id = 1
fb.interstorey_heights = interstorey_height * n... | mit | 9,039,624,404,153,438,000 | 27.119565 | 77 | 0.650812 | false | 2.986143 | false | false | false |
tensorflow/agents | tf_agents/replay_buffers/replay_buffer.py | 1 | 13019 | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -2,854,422,179,412,945,000 | 41.545752 | 117 | 0.675858 | false | 4.300958 | false | false | false |
edbrannin/Robotframework-SQLAlchemy-Library | src/SQLAlchemyLibrary/__init__.py | 1 | 2769 | # Copyright (c) 2010 Franz Allan Valencia See
#
# 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... | apache-2.0 | -1,904,054,005,682,905,600 | 39.130435 | 162 | 0.701697 | false | 3.950071 | false | false | false |
synctree/synctree-awsebcli | ebcli/operations/deployops.py | 1 | 1403 | # Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | apache-2.0 | 9,145,680,478,374,849,000 | 35.947368 | 93 | 0.669993 | false | 3.897222 | false | false | false |
lorisercole/thermocepstrum | thermocepstrum/i_o/read_lammps_dump.py | 1 | 19682 | # -*- coding: utf-8 -*-
################################################################################
###
### ReadLAMMPSDump - v0.1.8 - May 03, 2018
###
################################################################################
###
### a package to read LAMMPS Dump files
### (it assumes that the data colu... | gpl-3.0 | -2,670,496,408,608,816,000 | 44.878788 | 160 | 0.511381 | false | 3.869839 | false | false | false |
MAECProject/MAECProject.github.io | documentation/idioms/av_classification/maec_av_classification.py | 1 | 1818 | # Code for MAEC AV Classification Idiom
from maec.package.package import Package
from maec.package.malware_subject import MalwareSubject
from maec.package.analysis import Analysis
from maec.bundle.bundle import Bundle
from maec.bundle.av_classification import AVClassification
from cybox.core import Object
from cybox.ob... | bsd-3-clause | 7,595,617,559,653,435,000 | 32.666667 | 101 | 0.79703 | false | 3.081356 | false | false | false |
arthurdarcet/riverrun | riverrun/http/utils.py | 1 | 1593 | import bson
import cherrypy
import functools
import json
import logging
import traceback
logger = logging.getLogger(__name__)
def json_exposed(fn):
@cherrypy.expose
@functools.wraps(fn)
def wrapper(*args, **kwargs):
try:
code = 200
value = fn(*args, **kwargs)
excep... | mit | 6,930,416,923,213,202,000 | 28.5 | 91 | 0.578154 | false | 3.885366 | false | false | false |
khchine5/xl | lino_xl/lib/ledger/mixins.py | 1 | 10913 | # -*- coding: UTF-8 -*-
# Copyright 2008-2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""Model mixins for `lino_xl.lib.ledger`.
.. autosummary::
"""
from __future__ import unicode_literals
from builtins import str
from django.db import models
from lino.api import dd, rt, _
from lino.mixins impor... | bsd-2-clause | -9,218,203,295,538,878,000 | 28.101333 | 81 | 0.598461 | false | 3.77874 | false | false | false |
anandpdoshi/frappe | frappe/core/page/data_import_tool/importer.py | 1 | 8937 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, json
import frappe.permissions
import frappe.async
from frappe import _
from frappe.utils.csvutils import getlink
from frappe.utils.dateutils import parse_date
... | mit | 5,914,226,990,042,675,000 | 28.398026 | 110 | 0.651449 | false | 3.042901 | false | false | false |
philetus/geosolver | workbench/tree.py | 1 | 7545 | from includes import *
from parameters import Settings
class Tree:
def __init__(self, root):
self.settings = Settings()
self.orientation = self.settings.dvData.treeAlignment
self.maxDepth = 100
self.siblingSeperation = 5
self.subtreeSeperation = 5
self.levelSeperation = 40
self.maxLevelHeight = []
sel... | gpl-3.0 | -2,403,995,811,492,989,000 | 28.826087 | 176 | 0.705765 | false | 3.099836 | false | false | false |
Belxjander/Kirito | Python-2.3.3-Amiga/Tools/pynche/ChipViewer.py | 1 | 5028 | """Chip viewer and widget.
In the lower left corner of the main Pynche window, you will see two
ChipWidgets, one for the selected color and one for the nearest color. The
selected color is the actual RGB value expressed as an X11 #COLOR name. The
nearest color is the named color from the X11 database that is closest ... | gpl-3.0 | -1,817,869,015,905,354,800 | 36.804511 | 79 | 0.594073 | false | 3.943529 | false | false | false |
PaulWay/insights-core | insights/parsers/tests/test_rabbitmq_log.py | 1 | 1163 | from insights.parsers.rabbitmq_log import RabbitMQStartupLog
from insights.parsers.rabbitmq_log import RabbitMQStartupErrLog
from insights.tests import context_wrap
STARTUP_LOG = """
starting file handle cache server ...done
starting worker pool ... | apache-2.0 | -3,291,138,868,375,819,000 | 37.766667 | 121 | 0.588134 | false | 4.229091 | false | false | false |
SCP-028/UGA | protein_pka/mcce/mcce.py | 1 | 17127 | #!python3
"""
Predict protein pKa based on MCCE method.
http://pka.engr.ccny.cuny.edu/
Require MCCE 3.0 to work: https://anaconda.org/SalahSalah/mcce/files
"""
import asyncio
import glob
import gzip
import locale
import logging
import math
import os
import re
import shutil
import subprocess
import sys... | apache-2.0 | -3,913,487,000,637,415,000 | 38.11007 | 166 | 0.517896 | false | 3.777459 | false | false | false |
Einsteinish/PyTune3 | utils/bootstrap_story_hash.py | 1 | 1046 | import time
import pymongo
from django.conf import settings
from apps.rss_feeds.models import MStory, Feed
db = settings.MONGODB
batch = 0
start = 0
for f in xrange(start, Feed.objects.latest('pk').pk):
if f < batch*100000: continue
start = time.time()
try:
cp1 = time.time() - start
# if fe... | mit | -1,049,889,034,965,736,000 | 35.068966 | 100 | 0.547801 | false | 3.418301 | false | false | false |
xerxes2/gpodder | src/gpodder/sync.py | 1 | 41915 | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2011 Thomas Perl and the gPodder Team
#
# gPodder 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... | gpl-3.0 | 4,256,110,186,213,595,000 | 38.805318 | 197 | 0.578122 | false | 3.999905 | true | false | false |
pusnik/pyexchange | pyexchange/connection.py | 1 | 4274 | """
(c) 2013 LinkedIn Corp. 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 applicable law or agreed to in writing... | apache-2.0 | 4,606,826,240,127,029,000 | 32.390625 | 212 | 0.726954 | false | 3.990663 | false | false | false |
jyundt/oval | app/main/views.py | 1 | 16557 | from collections import OrderedDict
from itertools import groupby
from operator import itemgetter, and_
import datetime
from flask import render_template, redirect, request, url_for, current_app, flash
from slackclient import SlackClient
from sqlalchemy import extract, or_
from sqlalchemy import func
from app import... | gpl-2.0 | 5,109,266,585,834,278,000 | 38.705036 | 115 | 0.59872 | false | 3.401191 | false | false | false |
google/grr | grr/server/grr_response_server/bin/config_updater_util.py | 1 | 44739 | #!/usr/bin/env python
"""Utilities for modifying the GRR server configuration."""
import argparse
import getpass
import os
import re
import shutil
import socket
import subprocess
import sys
import time
from typing import Optional, Text, Generator
from urllib import parse as urlparse
import MySQLdb
from MySQLdb.consta... | apache-2.0 | -8,097,962,447,948,236,000 | 38.803381 | 90 | 0.663359 | false | 3.823193 | true | false | false |
CanalTP/navitia | source/jormungandr/tests/kirin_realtime_tests.py | 1 | 155835 | # Copyright (c) 2001-2015, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 | 6,100,804,965,290,161,000 | 47.759387 | 127 | 0.599788 | false | 3.541705 | true | false | false |
Shadow6363/Competitions | 2015/Advent of Code/Day23.py | 1 | 1537 | # -*- coding: utf-8 -*-
import sys
class ChristmasComputer(object):
def __init__(self, a=0, b=0):
self.registers = {
'a': a,
'b': b,
'pc': 0
}
def hlf(self, r):
self.registers[r] /= 2
self.registers['pc'] += 1
def tpl(self, r):
... | unlicense | 1,569,794,654,536,664,000 | 22.287879 | 83 | 0.510085 | false | 3.599532 | false | false | false |
msteinhoff/foption-bot | src/python/interaction/irc/commands.py | 1 | 42748 | # -*- coding: UTF-8 -*-
"""
$Id$
$URL$
Copyright (c) 2010 foption
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 rights
to use, copy, modif... | mit | -386,239,166,133,980,860 | 32.686367 | 112 | 0.544447 | false | 4.504531 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.