repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
icce-p/bbgc-ws | BBGCNetCDF.py | 1 | 5082 | """ Class to solve the creation, serialisation etc. of NetCDF files used
in the BioVel Biome-BGC project. The module is used from the
:mod:`ResultEvaluator`.
"""
# Copyright (c) 2014 MTA Centre for Ecological Research
# Distributed under the GNU GPL v3. For full terms see the file LICENSE.
from Scientific.IO... | gpl-3.0 | 2,878,319,306,538,595,000 | 42.067797 | 106 | 0.591696 | false | 3.79537 | false | false | false |
agabrown/PyGaia | pygaia/errors/spectroscopic.py | 1 | 1717 | __all__ = ['vrad_error_sky_avg']
import numpy as np
_vradErrorACoeff = {'B0V': 0.90, 'B5V': 0.90, 'A0V': 1.0, 'A5V': 1.15, 'F0V': 1.15, 'G0V': 1.15, 'G5V': 1.15,
'K0V': 1.15, 'K1IIIMP': 1.15, 'K4V': 1.15, 'K1III': 1.15}
_vradErrorBCoeff = {'B0V': 50.00, 'B5V': 26.00, 'A0V': 5.50, 'A5V': 4.00, 'F0V... | lgpl-3.0 | 1,875,366,522,975,445,200 | 37.155556 | 112 | 0.609785 | false | 2.764895 | false | false | false |
useEvil/flickr-photo-sync | flickrphotosync/photosync/management/commands/download.py | 1 | 3263 | import os, errno, sys, pytz, urllib
import datetime as date
from PIL import Image
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from django.conf import settings
from photosync.models import Photo, PhotoSet, Collection
fro... | mit | -2,673,812,735,853,304,000 | 45.614286 | 115 | 0.614465 | false | 3.969586 | false | false | false |
vikhyat/dask | dask/array/tests/test_wrap.py | 7 | 1577 | import pytest
pytest.importorskip('numpy')
from dask.array.wrap import ones
import dask.array as da
import numpy as np
import dask
def test_ones():
a = ones((10, 10), dtype='i4', chunks=(4, 4))
x = np.array(a)
assert (x == np.ones((10, 10), 'i4')).all()
def test_size_as_list():
a = ones([10, 10], dty... | bsd-3-clause | 5,999,699,896,511,672,000 | 31.854167 | 75 | 0.570704 | false | 2.742609 | true | false | false |
vxvinh1511/djangoproject.com | fundraising/tests.py | 1 | 18822 | import json
import os
from datetime import date
from functools import partial
from unittest.mock import patch
import stripe
from django.conf import settings
from django.core import mail
from django.core.urlresolvers import reverse
from django.test import TestCase
from django_hosts.resolvers import reverse as django_ho... | bsd-3-clause | 2,764,254,014,664,502,000 | 38.294363 | 115 | 0.626873 | false | 3.802424 | true | false | false |
pferreir/indico-backup | indico/MaKaC/webinterface/rh/fileAccess.py | 1 | 5634 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; eith... | gpl-3.0 | -4,598,389,109,649,951,000 | 38.398601 | 110 | 0.664714 | false | 3.987261 | false | false | false |
inflatus/Python | Networking/portscanner.py | 1 | 1792 | # portsanner for IPv4 addresses and/or hostnames
# probing addresses is invasive
# make sure you are doing the right thing
import validators
import socket
import subprocess
import sys
from datetime import datetime
# clearing the screen
subprocess.call('clear', shell=True)
def is_valid(address):
# returns the va... | mit | -9,015,522,186,552,988,000 | 24.971014 | 88 | 0.68192 | false | 3.687243 | false | false | false |
recap/pumpkin | examples/prefactor/tasks/calibcalc.py | 1 | 1395 | __author__ = 'reggie'
###START-CONF
##{
##"object_name": "calibcalc",
##"object_poi": "my-calibcalc-1234",
##"auto-load" : true,
##"parameters": [ {
## "name": "skymodel",
## "description": "",
## "required": true,
## "type": "String",
## ... | mit | 4,136,251,798,795,798,500 | 23.910714 | 89 | 0.499642 | false | 3.184932 | false | false | false |
c3e/TanteMateLaden | TanteMateLaden/TanteMateLaden/urls.py | 1 | 2415 | """TanteMateLaden URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
C... | mit | -705,898,773,161,818,200 | 42.142857 | 133 | 0.689027 | false | 3.331034 | false | false | false |
nmpiazza/Hermes | app/mod_check/IMAP.py | 1 | 2529 | from ..mod_check import app
import imaplib
from logging import getLogger
logger = getLogger('mod_check.IMAP')
@app.task
def check(host, port, username, password, use_ssl=False):
# initialize result to None
result = None
try:
# create the IMAP connection object
if use_ssl:
con... | mit | -3,881,200,669,202,220,500 | 37.318182 | 94 | 0.497825 | false | 4.556757 | false | false | false |
ajdiaz/mole | mole/action/timespan.py | 1 | 2018 | #! /usr/bin/env python
# -*- encoding: utf-8 -*-
# vim:fenc=utf-8:
from mole.event import Event
from mole.action import Action, ActionSyntaxError
from mole.helper.timeformat import Timespan
def func_avg(field, events):
return reduce(lambda x,y:x+y, map(lambda x:float(x[field]), events)) / len(events)
def func_mi... | gpl-3.0 | 1,233,472,038,927,200,000 | 32.633333 | 86 | 0.560951 | false | 3.800377 | false | false | false |
adamcharnock/lightbus | lightbus/path.py | 1 | 7391 | from typing import Optional, TYPE_CHECKING, Any, Generator
from lightbus.client.utilities import OnError
from lightbus.exceptions import InvalidBusPathConfiguration, InvalidParameters
from lightbus.utilities.async_tools import block
if TYPE_CHECKING:
# pylint: disable=unused-import,cyclic-import
from lightbus... | apache-2.0 | -5,512,542,352,097,787,000 | 33.863208 | 100 | 0.602084 | false | 4.156918 | false | false | false |
kibernick/pycontacts | pycontacts/managers.py | 1 | 4040 | from .models import (
EmailAddress,
Group,
PhoneNumber,
Person,
StreetAddress,
)
from .exceptions import ImproperlyConfigured
class BaseManager:
cls = None # Override this in a concrete manager
def __init__(self, book):
self.book = book
def _get_table(self):
return s... | mit | -8,262,843,655,173,583,000 | 32.114754 | 80 | 0.541089 | false | 4.284199 | false | false | false |
brython-dev/brython | setup/brython/list_modules.py | 1 | 26213 | """Detect all Python scripts in HTML pages in current folder and subfolders.
Generate brython_modules.js, a bundle with all the modules and packages used
by an application.
Generate a Python package ready for installation and upload on PyPI.
"""
import os
import shutil
import html.parser
import json
import traceback
... | bsd-3-clause | 3,624,906,521,840,438,300 | 36.340456 | 80 | 0.495441 | false | 4.501631 | false | false | false |
aykol/pymatgen | pymatgen/transformations/advanced_transformations.py | 2 | 33514 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import numpy as np
from fractions import gcd, Fraction
from itertools import groupby
from warnings import warn
import logging
import math
import six
from mont... | mit | -7,162,670,660,788,724,000 | 39.232893 | 80 | 0.579788 | false | 4.259532 | false | false | false |
aitormf/JdeRobot | src/libs/comm_py/comm/ros/publisherCmdVel.py | 5 | 4391 | import rospy
from geometry_msgs.msg import TwistStamped
import threading
from math import pi as PI
from jderobotTypes import CMDVel
from .threadPublisher import ThreadPublisher
def cmdvel2Twist(vel):
'''
Translates from JderobotTypes CMDVel to ROS Twist.
@param vel: JderobotTypes CMDVel to translate
... | gpl-3.0 | -1,091,195,975,461,559,400 | 19.712264 | 115 | 0.53177 | false | 3.59918 | false | false | false |
keras-team/keras-io | examples/vision/semantic_image_clustering.py | 1 | 19556 | """
Title: Semantic Image Clustering
Author: [Khalid Salama](https://www.linkedin.com/in/khalid-salama-24403144/)
Date created: 2021/02/28
Last modified: 2021/02/28
Description: Semantic Clustering by Adopting Nearest neighbors (SCAN) algorithm.
"""
"""
## Introduction
This example demonstrates how to apply the [Sema... | apache-2.0 | 6,607,691,726,261,113,000 | 31.750419 | 116 | 0.691387 | false | 3.688361 | false | false | false |
ViDA-NYU/domain_discovery_API | elastic/get_documents.py | 1 | 5691 | #!/usr/bin/python
from os import environ
import sys
from config import es as default_es
from pprint import pprint
def get_documents(terms, term_field, fields=["text"], es_index='memex', es_doc_type='page', es=None):
if es is None:
es = default_es
results = {}
if len(terms) > 0:
for term ... | gpl-3.0 | 3,535,834,563,850,043,000 | 25.469767 | 166 | 0.465648 | false | 3.832323 | false | false | false |
tomtor/QGIS | python/console/console_settings.py | 25 | 10378 | # -*- coding:utf-8 -*-
"""
/***************************************************************************
Python Console for QGIS
-------------------
begin : 2012-09-10
copyright : (C) 2012 by Salvatore Larosa
email : lrssvtml (at) gmail (dot) com
***... | gpl-2.0 | -6,853,548,758,034,385,000 | 43.34188 | 119 | 0.630301 | false | 4.352349 | false | false | false |
Stanford-Online/edx-ora2 | openassessment/xblock/schema.py | 1 | 4867 | """
Schema for validating and sanitizing data received from the JavaScript client.
"""
import dateutil
from pytz import utc
from voluptuous import All, Any, In, Invalid, Range, Required, Schema
def utf8_validator(value):
"""Validate and sanitize unicode strings.
If we're given a bytestring, assume that the e... | agpl-3.0 | -1,597,207,349,564,080,000 | 30 | 108 | 0.564208 | false | 4.213853 | false | false | false |
metaperl/karatbars-utils | k0de/upgraded/login.py | 1 | 1933 | #!/usr/bin/python
# system
from collections import defaultdict
from functools import wraps
import pdb
import pprint
import re
import sys
import time
import traceback
# pypi
from splinter import Browser
from treelib import Tree
# local
import user as userdata
import list_to_tree
pp = pprint.PrettyPrinter(indent=4)
... | mit | -5,121,185,275,655,001,000 | 20.477778 | 60 | 0.58924 | false | 3.592937 | false | false | false |
ychaim/snappy | snAppyModules/snParsers.py | 2 | 33783 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from twisted.python import log
from lxml import etree
from requests import Response
##########################
##########################
##
## each QUERY gets its own little class.
## this is important to keep modularity
##
##########################
class Parser_RPC_B... | mit | 2,204,642,186,154,606,000 | 25.168087 | 115 | 0.64124 | false | 3.421063 | false | false | false |
sangh/LaserShow | glyph.py | 1 | 6471 |
from header import *
import json
import math
# This used to be a class, but I want to use json w/o all the
# manual mangling needed, so it's just going to be a dictionary.
# It must have X and Y grid points and keys for
# the 'name' and a 'path' (list of (x,y) points or "on"/"off" cmds).
def pointIsValid( pt ):
... | bsd-3-clause | 2,095,060,305,932,436,500 | 30.876847 | 87 | 0.533302 | false | 3.440191 | false | false | false |
pnprog/goreviewpartner | gnugo_analysis.py | 1 | 13115 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from gtp import gtp
from Tkinter import *
from toolbox import *
from toolbox import _
def get_full_sequence_threaded(worker,current_color,deepness):
sequence=get_full_sequence(worker,current_color,deepness)
threading.current_thread().sequence=sequence
... | gpl-3.0 | 9,138,587,210,094,939,000 | 28.015487 | 154 | 0.682425 | false | 2.833225 | false | false | false |
notion/a_sync | a_sync/examples.py | 1 | 3254 | """Example Use."""
# [ Imports ]
# [ -Python ]
import asyncio
import time
# [ -Project ]
import a_sync
def examples() -> None:
"""Run examples."""
def hello(name: str, seconds: int) -> str:
"""
Hello.
Prints 'hello <name>', waits for <seconds> seconds, and then
prints 'bye <... | apache-2.0 | 1,119,202,184,153,480,200 | 28.315315 | 83 | 0.618316 | false | 3.428872 | false | false | false |
naritotakizawa/ngo | ngo/admin.py | 1 | 1524 | #!/usr/bin/env python
"""ngo-admin で呼ばれる管理用コマンドモジュール."""
import os
import sys
from ngo.backends import NgoTemplate
def startproject(project_name):
"""ngoプロジェクトを作成する."""
import ngo
top_dir = os.getcwd()
origin_project_path = os.path.join(ngo.__path__[0], 'project_template')
# manaeg.p... | mit | -69,341,242,456,434,130 | 27.583333 | 75 | 0.576056 | false | 2.828685 | false | false | false |
TheStackBox/xuansdk | SDKLibrary/com/cloudMedia/theKuroBox/sdk/util/oauth.py | 1 | 2010 | ##############################################################################################
# Copyright 2014-2015 Cloud Media Sdn. Bhd.
#
# This file is part of Xuan Application Development SDK.
#
# Xuan Application Development SDK is free software: you can redistribute it and/or modify
# it under the terms of... | gpl-3.0 | 5,437,459,701,332,692,000 | 28.923077 | 131 | 0.581592 | false | 4.599542 | false | false | false |
emencia/emencia_paste_djangocms_2 | emencia_paste_djangocms_2/django_buildout/project/mods_available/socialaggregator/settings.py | 1 | 2719 | """
Settings for emencia-django-socialaggregator (EDSA)
"""
INSTALLED_APPS = add_to_tuple(INSTALLED_APPS,
'django_extensions',
'taggit',
'socialaggregator')
# Optional specific formatter
#RESSOURCE_FORMATTER = "project.mods_available.socialaggregator.formatter.RessourceFormatterCustom"
# Twitter access ke... | mit | -5,816,126,432,303,117,000 | 27.333333 | 99 | 0.662376 | false | 3.210153 | false | false | false |
Crystal-SDS/dashboard | crystal_dashboard/api/swift.py | 1 | 12025 | from __future__ import unicode_literals
from django.conf import settings
import six.moves.urllib.parse as urlparse
from horizon.utils.memoized import memoized # noqa
from openstack_dashboard.api.swift import swift_api
from openstack_dashboard.api.swift import Container
from openstack_dashboard.api.swift import GLOBAL_... | gpl-3.0 | -5,493,002,323,249,835,000 | 25.372807 | 114 | 0.641663 | false | 3.462424 | false | false | false |
mvo5/snapcraft | tests/unit/plugins/test_plainbox_provider.py | 1 | 8465 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016-2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | gpl-3.0 | 3,288,589,442,993,010,000 | 31.557692 | 84 | 0.54117 | false | 4.182312 | true | false | false |
cfc603/django-twilio-sms-models | django_twilio_sms/management/commands/sync_responses.py | 1 | 1166 | from django.conf import settings
from django.core.management.base import BaseCommand
from django.utils.six import iteritems
from django_twilio_sms.models import Action, Response
class Command(BaseCommand):
help = "Sync responses from settings.DJANGO_TWILIO_SMS_RESPONSES"
def handle(self, *args, **options):
... | bsd-3-clause | 2,446,544,624,477,179,000 | 35.4375 | 75 | 0.586621 | false | 4.554688 | false | false | false |
bsipocz/ginga | ginga/qtw/plugins/Contents.py | 1 | 5110 | #
# Contents.py -- Table of Contents plugin for fits viewer
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga import GingaPlugin
from ginga.misc import Bunch... | bsd-3-clause | -7,208,640,380,648,436,000 | 30.349693 | 68 | 0.57319 | false | 3.732652 | false | false | false |
ieatnerds/rath_bot | rath_bot.py | 1 | 1285 | """
Author: importantnk@gmail.com
Rath Twitter Bot
This is a simple bot for twitter that is being used for several functions.
The main function of the bot is to provide an easy learning experience with
the Twitter API and pulling information from other sources to post on twitter.
"""
# Imports
import check_weather
imp... | gpl-3.0 | -710,473,560,557,177,200 | 25.770833 | 78 | 0.628794 | false | 3.893939 | false | false | false |
yaoguai/sanzang-lib | sanzang.py | 1 | 8885 | # Copyright (c) 2014 the Sanzang Lib authors
#
# 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, modify, merge, publ... | mit | 6,251,118,874,616,566,000 | 32.842308 | 79 | 0.634049 | false | 3.792672 | false | false | false |
IS-ENES-Data/submission_forms | dkrz_forms/config/project_config.py | 1 | 6967 | # -*- coding: utf-8 -*-
"""
Project dictionaries
======================
The dictionaries defining the keywords for the individual projects are defined here.
They get accessible to the FormFabric code by adding them to the PROJECT_DICT dictionary.
Thus e.g. PROJECT_DICT['CMIP6'] defines to the overall keyword diction... | apache-2.0 | 6,383,556,357,326,457,000 | 36.86413 | 157 | 0.51299 | false | 4.34081 | false | false | false |
erinspace/scrapi | scrapi/processing/base.py | 3 | 3577 | import six
import json
from abc import abstractproperty, abstractmethod
from requests.structures import CaseInsensitiveDict
class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
... | apache-2.0 | -6,993,924,686,997,156,000 | 25.109489 | 130 | 0.656696 | false | 5.045134 | false | false | false |
Fusion-Data-Platform/fdf | fdf/factory.py | 2 | 39038 | # -*- coding: utf-8 -*-
"""
Root module for the FDF package.
**Classes**
* Machine - root class for the FDF package
* Shot - shot container class
* Logbook - logbook connection class
* Container - diagnostic container class
* Node - mdsplus signal node class
"""
"""
Created on Thu Jun 18 10:38:40 201... | mit | -7,257,784,443,417,488,000 | 33.264679 | 90 | 0.518648 | false | 4.147243 | false | false | false |
hanfang/scikit-ribo | scripts/NProt2013/Compare_RPM_norm_read_dens.py | 1 | 1911 | """
Supplementary Note 9: Compare RPM-normalized read densities
Author: Annemarie Becker
inputFile1:
RPM-normalized read densities along the whole genome or in protein coding regions on plus or minus strand from sample 1 (Supplementary Note 7 or 8)
col0: position along genome
col1: RPM-normalized re... | gpl-2.0 | -2,494,370,387,285,067,000 | 24.915493 | 147 | 0.608059 | false | 3.732422 | false | false | false |
eirannejad/pyRevit | extensions/pyRevitTools.extension/pyRevit.tab/Selection.panel/select.stack/Select.pulldown/Invert Selection.pushbutton/script.py | 1 | 1456 | """Inverts selection in active view.
Shift-Click:
Select group members instead of parent group elements.
"""
#pylint: disable=import-error,invalid-name,broad-except
from pyrevit import revit, DB
# get view elements
viewelements = DB.FilteredElementCollector(revit.doc, revit.active_view.Id)\
.WhereEl... | gpl-3.0 | 7,466,079,972,496,531,000 | 33.666667 | 78 | 0.724588 | false | 3.733333 | false | false | false |
MrLpk/nba | mode2/MTool.py | 1 | 2045 | #-*- coding: utf-8 -*-
'''
Created on 2013-8-27
@author: liaopengkai
'''
import urllib2
import os
import json
import re
import time
class MTool:
def isNum(self, tempStr):
"""判断字符串是否为数字,整型和浮点型皆适用"""
try:
float(tempStr)
return True
except Exception:
r... | agpl-3.0 | -2,248,984,619,081,911,800 | 23.683544 | 76 | 0.475115 | false | 3.41331 | false | false | false |
dronir/EM | python/xrInspect_qt3.py | 1 | 4382 | #!/usr/bin/python
import sys
#from PyQt4 import Qt
#from PyQt4 import QtGui
#from PyQt4 import QtCore
import qt
import Qwt5 as Qwt
import numpy as np
import math
from gather import *
class elementList(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
s... | gpl-3.0 | 2,774,238,473,935,634,400 | 26.734177 | 121 | 0.590826 | false | 3.314675 | false | false | false |
gridsync/gridsync | gridsync/network.py | 1 | 1321 | import errno
import logging
import socket
import sys
from random import randint
def get_local_network_ip() -> str:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.connect(("10.255.255.255", 1))
ip = s.getsockname()[0]
s.close()
ret... | gpl-3.0 | -780,984,637,094,630,900 | 32.025 | 72 | 0.531416 | false | 3.908284 | false | false | false |
drkatnz/CombinedOneClass | example.py | 1 | 1682 | import numpy as np
from scipy import stats
from oneclass import oneclass
from sklearn.tree import DecisionTreeClassifier
rng = np.random.RandomState(42)
# Example settings
n_samples = 2000
outliers_fraction = 0.25
clusters_separation = [0,1,2]
# define two or more outlier detection tools to be compared
classifiers... | mit | 4,941,039,829,575,862,000 | 34.808511 | 147 | 0.664685 | false | 3.357285 | false | false | false |
SUSE/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/network_interface_dns_settings.py | 9 | 2698 | # 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 | -7,172,057,725,379,304,000 | 48.962963 | 151 | 0.669755 | false | 4.222222 | false | false | false |
tavultesoft/keymanweb | linux/keyman-config/experiments/list_kmp.py | 1 | 4610 | #!/usr/bin/python3
import datetime
import logging
import os
import requests
import requests_cache
import subprocess
import tempfile
import time
from dirlist import list_keyboards
#from keymankeyboards import get_api_keyboards
#from keyman_config import get_kmp, install_kmp
from keyman_config.get_kmp import get_keyboa... | apache-2.0 | -5,219,260,245,291,101,000 | 38.067797 | 119 | 0.673536 | false | 2.930706 | false | false | false |
trakt/script.trakt | resources/lib/rating.py | 1 | 9061 | # -*- coding: utf-8 -*-
"""Module used to launch rating dialogues and send ratings to Trakt"""
import xbmc
import xbmcaddon
import xbmcgui
from resources.lib import utilities
from resources.lib import kodiUtilities
from resources.lib import globals
import logging
logger = logging.getLogger(__name__)
__addon__ = xbmc... | gpl-2.0 | -4,677,418,030,784,672,000 | 36.912134 | 157 | 0.556671 | false | 4.012843 | false | false | false |
ch1bo/ambicam | calibrate_capture.py | 1 | 3853 | import picamera
import picamera.array
import cv2
import time
import numpy as np
import multiprocessing as mp
import queue
import signal
def capture(q, stop, resolution=(640,480), framerate=30):
print('Start capturing...')
with picamera.PiCamera(resolution=resolution, framerate=framerate) as camera:
wit... | mpl-2.0 | 5,458,559,826,258,748,000 | 32.504348 | 104 | 0.540618 | false | 3.455605 | false | false | false |
TylerSandman/mopy | mopy/impl/nim/game.py | 1 | 2195 | """This module contains a concrete implementation of the game Nim."""
from random import choice
from mopy.game import Game
from mopy.impl.nim.state import NimState
from mopy.impl.nim.action import NimAction
class NimGame(Game):
def __init__(self):
pass
def new_game(self):
"""
... | mit | 2,817,251,315,706,340,400 | 28.486111 | 69 | 0.560364 | false | 4.173004 | false | false | false |
secgroup/MTFGatheRing | code/web.py | 1 | 7006 | #!/usr/bin/env python3
import time
import random
import socket
from flask import Flask, render_template, redirect, url_for, request, jsonify
import config
log = None
# classes
class Agent():
def __init__(self, ip, cw=True, node=None, state='initial'):
self.ip = ip
self.cw = cw
self.state... | mit | 5,087,806,801,212,509,000 | 27.024 | 140 | 0.58193 | false | 3.334603 | true | false | false |
Chukwunonso/ndi_anambra | blog/migrations/migrations/0001_initial.py | 1 | 6723 | # Generated by Django 2.1.7 on 2019-02-18 20:43
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.contrib.taggit
import modelcluster.fields
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
initia... | mit | -8,735,230,153,706,615,000 | 53.658537 | 234 | 0.599435 | false | 4.111927 | false | false | false |
JorisBolsens/PYNQ | python/pynq/iop/iop_const.py | 2 | 7201 | # Copyright (c) 2016, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of ... | bsd-3-clause | 1,644,779,637,057,130,800 | 33.625 | 79 | 0.652409 | false | 2.472022 | true | false | false |
laginha/django-alo-forms | src/alo/decorators.py | 1 | 2238 | from django.http import HttpRequest
try:
from django.http import JsonResponse
native_json_response = True
except ImportError:
from easy_response.http import JsonResponse
native_json_response = False
from django.shortcuts import get_object_or_404
from django.forms import ModelForm
from functools import w... | mit | -6,294,782,326,722,869,000 | 37.603448 | 77 | 0.529491 | false | 4.844156 | false | false | false |
pexip/pygobject | examples/demo/demos/links.py | 2 | 2664 | #!/usr/bin/env python
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2010 Red Hat, Inc., John (J5) Palmieri <johnp@redhat.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License a... | lgpl-2.1 | 4,680,339,128,670,448,000 | 33.597403 | 83 | 0.631006 | false | 3.982063 | false | false | false |
stevejefferies/robotframework-selenium2library | src/Selenium2Library/keywords/_browsermanagement.py | 8 | 20035 | import os
import robot
from robot.errors import DataError
from selenium import webdriver
from Selenium2Library import webdrivermonkeypatches
from Selenium2Library.utils import BrowserCache
from Selenium2Library.locators import WindowManager
from keywordgroup import KeywordGroup
ROOT_DIR = os.path.abspath(os.path.join(... | apache-2.0 | -4,220,819,633,051,470,300 | 41.62766 | 164 | 0.615323 | false | 4.334704 | false | false | false |
vladan-m/ggrc-core | src/ggrc/models/object_control.py | 1 | 3050 | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: dan@reciprocitylabs.com
# Maintained By: dan@reciprocitylabs.com
from ggrc import db
from sqlalchemy.ext.associationproxy import association_proxy
... | apache-2.0 | 333,521,147,788,283,970 | 29.19802 | 78 | 0.661967 | false | 3.665865 | false | false | false |
cjahangir/geodash-new | geonode/contrib/metadataxsl/models.py | 21 | 2098 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | 6,332,501,313,276,306,000 | 32.301587 | 73 | 0.619638 | false | 4.221328 | false | false | false |
srgtrujillo/TuiterPy | controller/command_line.py | 1 | 1644 | # -*- encoding: utf-8 -*-
################################################################################
# TuiterPy - A Python Command Line Social Network Application
# Copyright (C) 2016 Sergio Trujillo (sergiotrujillomartinez@gmail.com)
#
# This program is free software: you can redistribute it and/or mod... | gpl-3.0 | -5,209,058,976,015,899,000 | 35.533333 | 80 | 0.596107 | false | 4.28125 | false | false | false |
djgroen/flee-release | flee/SimulationSettings.py | 1 | 4308 | import sys
import csv
class SimulationSettings:
Softening = 10.0 # KM added to every link distance to eliminate needless distinction between very short routes.
#TurnBackAllowed = True # feature disabled for now.
AgentLogLevel = 0 # set to 1 for basic agent information.
CampLogLevel = 0 # set to 1 to obtain av... | bsd-3-clause | 5,661,824,005,492,261,000 | 43.875 | 148 | 0.668524 | false | 3.635443 | false | false | false |
kwameboame/newsdex | news/views/settings_views.py | 1 | 1307 | # coding=utf-8
import logging
from django.shortcuts import render, redirect
from news.models import Feed
from news.tasks import twitter_task
from news.utils.common import get_active_tasks
from newsproject import celery_app
__author__ = 'ilov3'
logger = logging.getLogger(__name__)
def settings(request):
feeds =... | bsd-2-clause | 4,652,564,497,210,808,000 | 31.675 | 114 | 0.664116 | false | 3.913174 | false | false | false |
adamacosta/hacks | school/course_availability.py | 1 | 5055 | """
IMPORTANT: DO NOT USE THIS SCRIPT TO DOS THE SCHOOL SERVER. THIS IS
INTENDED TO MAKE IT EASIER TO CHECK WHICH COURSES ARE OPEN WITHOUT
HAVING TO LOG IN AND MANUALLY GO THROUGH EACH STEP TO SELECT THE
TERM AND DEPARTMENT. USE IT ONCE AND THEN REGISTER. AT MOSE USE IT
ONCE EVERY 15 MINUTES, ABOUT THE RATE AT WHI... | mit | -1,649,449,341,379,516,400 | 33.104167 | 79 | 0.624332 | false | 3.481405 | false | false | false |
ravello/testmill | lib/testmill/inflect.py | 1 | 1307 | # Copyright 2012-2013 Ravello Systems, 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 agree... | apache-2.0 | -2,928,847,715,319,305,700 | 32.512821 | 76 | 0.671767 | false | 3.913174 | false | false | false |
tylerlong/toolkit_library | toolkit_library/input_util.py | 1 | 1526 | # coding=utf-8
"""
toolkit_library.input_util
~~~~~~~~~~~~~~~~~~~~~~~~~~
Get inputs from user and validate them
"""
import re
class InputUtil(object):
"""get inputs from user and validate them"""
@staticmethod
def get_input(name, default = None, pattern = None):
"""get ... | bsd-3-clause | -7,760,437,563,598,933,000 | 34.333333 | 100 | 0.516383 | false | 4.954545 | false | false | false |
ToontownUprising/src | otp/avatar/PositionExaminer.py | 5 | 4046 | from pandac.PandaModules import *
from direct.showbase.DirectObject import DirectObject
from otp.otpbase import OTPGlobals
class PositionExaminer(DirectObject, NodePath):
def __init__(self):
try:
self.__initialized
return
except:
self.__initialized = 1
... | mit | 7,802,838,456,947,292,000 | 42.042553 | 86 | 0.657934 | false | 3.434635 | false | false | false |
zlsun/XX-Net | code/default/gae_proxy/server/lib/google/appengine/ext/ndb/tasklets.py | 5 | 42437 | #
# Copyright 2008 The ndb 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 applicable l... | bsd-2-clause | 1,676,909,870,192,614,000 | 32.573576 | 80 | 0.650776 | false | 3.717327 | false | false | false |
Zaharid/reportengine | src/reportengine/configparser.py | 1 | 10215 | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 11 15:31:29 2015
@author: Zahari Kassabov
"""
import inspect
import difflib
import logging
import functools
import yaml
from reportengine import namespaces
from reportengine.utils import ChainMap
log = logging.getLogger(__name__)
_config_token = 'parse_'
class Confi... | gpl-2.0 | 5,674,606,203,002,205,000 | 33.744898 | 86 | 0.558982 | false | 4.18476 | true | false | false |
reneetrei/agile-bayou-76491 | snipts/views.py | 1 | 11881 | from annoying.decorators import render_to
from annoying.functions import get_object_or_None
from blogs.views import blog_list
from django.conf import settings
from django.contrib.auth.models import User
from django.core.mail import send_mail
from django.core.paginator import Paginator, InvalidPage
from django.db.models... | mit | 8,332,129,242,457,065,000 | 28.628429 | 91 | 0.591533 | false | 3.67719 | false | false | false |
glasslion/SPF | spf/extra/sitecloner.py | 8 | 8290 | import json
import sys
import urllib2
import re
import os
from HTMLParser import HTMLParser
class htmltagparser(HTMLParser):
def __init__(self):
self.reset()
self.NEWATTRS = []
def handle_starttag(self, tag, attrs):
self.NEWATTRS = attrs
def clean(self):
self.NEWATTRS = []
... | bsd-3-clause | -7,408,070,258,081,257,000 | 31.896825 | 89 | 0.483353 | false | 4.120278 | false | false | false |
Iristyle/ChocolateyPackages | EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Tag/tag_indent.py | 3 | 5979 | import sublime, sublime_plugin
import re
# to find on which indentation level we currently are
current_indentation_re = re.compile("^\s*")
# to leave additional new lines as is
aditional_new_lines_re = re.compile("^\s*\n+\s*\n+\s*$")
# no indentation
no_indent = re.compile("^</?(head|body)[>| ]", re.I)
# possible s... | mit | -2,178,400,988,483,608,800 | 32.595506 | 126 | 0.607459 | false | 2.751496 | false | false | false |
aaboffill/django-allmedia | media/utils.py | 1 | 2102 | # coding=utf-8
import os
import re
import unicodedata
from django.utils import six
from .settings import (MEDIA_IMAGE_EXTENSION, MEDIA_IMAGE_FORMAT, MEDIA_IMAGE_QUALITY,
MEDIA_NORMALIZE_FILENAME, MEDIA_CONVERT_FILENAME)
def thumbnail_path(path, size, method):
"""
Returns the path for ... | bsd-3-clause | 8,028,434,819,355,424,000 | 29.028571 | 105 | 0.619886 | false | 3.885397 | false | false | false |
timothyryanwalsh/cca-diskimageprocessor | main.py | 1 | 6150 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
import subprocess
import sys
import design
class StartScanThread(QThread):
def __init__(self, process_list):
QThread.__init__(self)
self.process_list = process_list
... | mit | 3,563,083,440,929,152,000 | 33.943182 | 173 | 0.658049 | false | 4.119223 | false | false | false |
UManPychron/pychron | pychron/monitors/pumping_monitor.py | 2 | 2731 | # ===============================================================================
# Copyright 2011 Jake Ross
#
# 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/licens... | apache-2.0 | 1,754,242,747,121,334,000 | 29.344444 | 81 | 0.517759 | false | 4.208012 | false | false | false |
wodore/wodore-ng | main/model/icon.py | 1 | 11758 | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
#from api import fields
import model
import util
import config
from .counter import CountableLazy
from .collection import Collection, AddCollection
import config
import cloudstorage as gcs
from google.appengine.api import im... | mit | 4,735,112,402,842,403,000 | 35.178462 | 109 | 0.609117 | false | 3.950941 | false | false | false |
Splawik/pytigon | pytigon/prj/_schtools/schtools/views.py | 1 | 8305 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render, redirect
from django import forms
from django.template.loader import render_to_string
from django.template import Context, Template
from django.template import RequestContext
from d... | lgpl-3.0 | 3,185,471,773,918,943,700 | 31.065637 | 112 | 0.429741 | false | 4.82288 | false | false | false |
cmsdaq/hltd | lib/elasticsearch-py-7.0.0/elasticsearch/transport.py | 2 | 15172 | import time
from itertools import chain
from .connection import Urllib3HttpConnection
from .connection_pool import ConnectionPool, DummyConnectionPool
from .serializer import JSONSerializer, Deserializer, DEFAULT_SERIALIZERS
from .exceptions import ConnectionError, TransportError, SerializationError, \
... | lgpl-3.0 | -6,250,744,510,277,125,000 | 41.617978 | 151 | 0.615476 | false | 4.719129 | false | false | false |
treejames/viewfinder | backend/services/sms_util.py | 13 | 2242 | # -*- coding: utf-8 -*-
# Copyright 2012 Viewfinder Inc. All Rights Reserved.
"""SMS utilities.
Helper methods used when sending SMS messages.
"""
__author__ = 'andy@emailscrubbed.com (Andy Kimball)'
import re
from tornado import escape
# Regular expression used to identify valid GSM characters, which is the 7-b... | apache-2.0 | -8,735,502,104,594,132,000 | 36.982759 | 140 | 0.719927 | false | 3.001362 | false | false | false |
wangzitian0/BOJ-V4 | submission/migrations/0001_initial.py | 1 | 1249 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('problem', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | mit | -6,486,124,797,967,729,000 | 38.03125 | 114 | 0.578062 | false | 4.525362 | false | false | false |
brclark-usgs/flopy | flopy/modflow/mflpf.py | 1 | 25430 | """
mflpf module. Contains the ModflowLpf class. Note that the user can access
the ModflowLpf class as `flopy.modflow.ModflowLpf`.
Additional information for this MODFLOW package can be found at the `Online
MODFLOW Guide
<http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?lpf.htm>`_.
"""
impo... | bsd-3-clause | -4,485,107,904,453,336,000 | 38.950081 | 127 | 0.527133 | false | 3.827514 | false | false | false |
stadtgestalten/stadtgestalten | grouprise/features/subscriptions/migrations/0014_auto_20171102_1045.py | 1 | 1144 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-02 09:45
from __future__ import unicode_literals
from django.db import migrations
from django.db.transaction import atomic
from django.db.utils import IntegrityError
def add_subscriptions_for_memberships(apps, schema_editor):
ContentType = apps.get_... | agpl-3.0 | 4,482,073,682,586,433,500 | 32.647059 | 95 | 0.651224 | false | 4.333333 | false | false | false |
gavinjackson/junkcode | eco_scrapy/ecocrackenback.py | 1 | 3671 | import scrapy
import time
from openpyxl import Workbook
import sqlite3
# This app prints data to standard out, creates a spreadsheet and updates an sqlite3 database
class EcocrackenbackSpider(scrapy.Spider):
name = 'Ecocrackenback Availability'
wb = Workbook()
properties = {
'33': 'Ecocrackenback ... | unlicense | 6,534,433,803,781,908,000 | 48.608108 | 184 | 0.550804 | false | 3.364803 | false | false | false |
breunigs/livestreamer | src/livestreamer/plugins/livestream.py | 4 | 3365 | import re
from collections import defaultdict
from livestreamer.compat import urljoin
from livestreamer.exceptions import PluginError, NoStreamsError
from livestreamer.plugin import Plugin
from livestreamer.stream import AkamaiHDStream, HLSStream
from livestreamer.utils import urlget, verifyjson, res_xml, parse_json
... | bsd-2-clause | 2,662,027,426,692,755,500 | 34.421053 | 94 | 0.564636 | false | 3.828214 | false | false | false |
DRL/GenomeBiology2016_globodera_rostochiensis | scripts/extractRegionFromCoordinates.py | 1 | 9707 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
File : extractRegionFromCoordinates.py
Author : Dominik R. Laetsch, dominik.laetsch at gmail dot com
Version : 0.1
Description :
- INPUT: fasta file, gff file (with intron features), coordinates
- OUTPUT: line for each intron
"""
from __future__ import divisi... | gpl-3.0 | -4,000,169,579,499,924,000 | 34.043321 | 176 | 0.606882 | false | 2.596149 | false | false | false |
rshk/clitools | clitools/__init__.py | 1 | 11875 | """
CLI Tools - Command Line Interface building tools
Example usage::
from clitools import CliApp
cli = CliApp()
@cli.command
def hello(args):
print("Hello, world!")
@cli.command
@cli.parser_arg('--name')
def hello2(args):
print("Hello, {0}!".format(args.name))
if _... | bsd-3-clause | -4,145,025,209,179,156,500 | 31.181572 | 78 | 0.544 | false | 4.205028 | false | false | false |
kurtraschke/camelot | camelot/core/constants.py | 1 | 1553 | # ============================================================================
#
# Copyright (C) 2007-2010 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | gpl-2.0 | -5,293,704,356,363,386,000 | 34.295455 | 79 | 0.671603 | false | 3.428256 | false | false | false |
python/pythondotorg | blogs/parser.py | 3 | 1552 | import datetime
import feedparser
from django.conf import settings
from django.template.loader import render_to_string
from django.utils.timezone import make_aware, utc
from boxes.models import Box
from .models import BlogEntry, Feed
def get_all_entries(feed_url):
""" Retrieve all entries from a feed URL """
... | apache-2.0 | -3,155,940,080,421,918,000 | 26.22807 | 74 | 0.590206 | false | 4.052219 | false | false | false |
NeoGeographyToolkit/Tools | pbs_parallel_stereo.py | 1 | 7453 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# __BEGIN_LICENSE__
# Copyright (c) 2009-2013, United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The NGT platform is licensed under the Apache License, Version 2.0 (the
# "Lic... | apache-2.0 | 8,849,569,182,561,258,000 | 42.080925 | 140 | 0.584999 | false | 3.810327 | false | false | false |
kernelci/kernelci-backend | app/models/report.py | 1 | 4253 | # Copyright (C) Linaro Limited 2015,2017
# Author: Milo Casagrande <milo.casagrande@linaro.org>
#
# This program 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... | lgpl-2.1 | 2,941,570,709,900,832,000 | 28.950704 | 79 | 0.626852 | false | 4.004708 | false | false | false |
mlperf/training_results_v0.5 | v0.5.0/nvidia/submission/code/single_stage_detector/pytorch/eval.py | 1 | 7472 | # Copyright (c) 2018, NVIDIA CORPORATION. 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 applic... | apache-2.0 | -6,352,871,810,177,470,000 | 35.096618 | 78 | 0.534261 | false | 3.630709 | false | false | false |
cqychen/quants | quants/loaddata/skyeye_ods_invest_refer_sh_margins.py | 1 | 2056 | #coding=utf8
import tushare as ts;
import pymysql;
import time as dt
from datashape.coretypes import string
from pandas.io.sql import SQLDatabase
import sqlalchemy
import datetime
from sqlalchemy import create_engine
from pandas.io import sql
import threading
import pandas as pd;
import sys
sys.path.append('../') #添加配... | epl-1.0 | -8,458,707,878,542,335,000 | 34.471698 | 98 | 0.583511 | false | 2.822823 | false | false | false |
fboers/jumegX | connectivity/con_viz.py | 1 | 10426 | #!/usr/bin/env python
""" Visualization functions for connectivity analysis. """
import sys
import os.path as op
import numpy as np
import scipy as sci
import matplotlib.pyplot as pl
import mne
import yaml
import pickle
def sensor_connectivity_3d(raw, picks, con, idx, n_con=20, min_dist=0.05,
... | bsd-3-clause | -2,334,218,166,791,869,000 | 38.642586 | 109 | 0.573182 | false | 3.792652 | false | false | false |
alivecor/tensorflow | tensorflow/contrib/framework/python/framework/__init__.py | 43 | 1458 | # Copyright 2015 The TensorFlow 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 applica... | apache-2.0 | 921,204,177,520,799,200 | 47.6 | 83 | 0.758573 | false | 4.643312 | false | false | false |
giancds/attentive_lm | utils.py | 1 | 3590 | # -*- coding: utf-8 -*-
"""
utility functions to train the RNN-based VariationalAutoencoder
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import os
import numpy as np
import tensorflow as tf
import attention
import cells
# TODO: pydocs
... | apache-2.0 | -6,731,724,072,265,585,000 | 22.933333 | 78 | 0.645961 | false | 3.314866 | false | false | false |
wcainboundary/boundary-api-cli | boundary/alarm_create.py | 1 | 1368 | #
# Copyright 2014-2015 Boundary, 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 wri... | apache-2.0 | -1,871,054,217,826,630,000 | 29.4 | 104 | 0.678363 | false | 4.145455 | false | false | false |
Finntack/pootle | tests/models/translationproject.py | 1 | 10435 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
import os
import shutil
import pytest
from... | gpl-3.0 | -3,743,231,149,240,998,000 | 31.711599 | 82 | 0.676186 | false | 3.714845 | true | false | false |
schollz/extract_recipe | build_database.py | 1 | 6286 | from dbcommands import *
import logging
import json
from recipe import *
import os.path
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M:%S',
filename='log',
... | apache-2.0 | 6,716,819,749,854,889,000 | 34.546512 | 243 | 0.61629 | false | 3.340064 | false | false | false |
sigmunau/nav | python/nav/ipdevpoll/plugins/virtualrouter.py | 1 | 2946 | #
# Copyright (C) 2012 UNINETT AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope... | gpl-2.0 | -2,532,902,995,663,710,000 | 36.769231 | 77 | 0.668364 | false | 3.959677 | false | false | false |
Jazende/ProjectEuler | problem_038.py | 1 | 1397 | ##Take the number 192 and multiply it by each of 1, 2, and 3:
##
##192 × 1 = 192
##192 × 2 = 384
##192 × 3 = 576
##
##By concatenating each product we get the 1 to 9 pandigital, 192384576.
##We will call 192384576 the concatenated product of 192 and (1,2,3)
##
##The same can be achieved by starting with 9 and multiply... | gpl-3.0 | 3,013,663,619,253,840,400 | 28.659574 | 80 | 0.563845 | false | 3.295508 | false | false | false |
vallemrv/tpvB3 | receptor/valle_libs/components/pagenavigations.py | 2 | 3118 | # @Author: Manuel Rodriguez <valle>
# @Date: 14-Jul-2017
# @Email: valle.mrv@gmail.com
# @Filename: pagenavigations.py
# @Last modified by: valle
# @Last modified time: 13-Aug-2017
# @License: Apache license vesion 2.0
from kivy.uix.relativelayout import RelativeLayout
from kivy.uix.floatlayout import FloatLayout... | apache-2.0 | 1,133,843,800,251,685,900 | 28.695238 | 98 | 0.609044 | false | 3.555302 | false | false | false |
dlzhangxg/cloud-ml-sdk | cloud_ml_sdk/cloud_ml_sdk/models/train_job.py | 1 | 15082 | # Copyright 2017 Xiaomi, 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 writing,... | apache-2.0 | -5,845,657,298,114,418,000 | 26.174775 | 95 | 0.628763 | false | 4.006908 | false | false | false |
lrt512/emol | emol/emol/initialize/errors.py | 1 | 1517 | # -*- coding: utf-8 -*-
"""Set up custom error handlers."""
# standard library imports
# third-party imports
from flask import render_template, request, Response, current_app
# application imports
def init_error_handlers():
"""Custom error pages for the app."""
current_app.logger.info('Initialize error han... | mit | 3,753,175,237,952,431,000 | 32.711111 | 71 | 0.66381 | false | 4.023873 | false | false | false |
numbas/editor | first_setup.py | 1 | 12406 | import random
import re
import os
import traceback
import urllib.parse
import importlib
def print_notice(s):
print('\033[92m'+s+'\033[0m\n')
def path_exists(path):
if not os.path.exists(path):
answer = input("That path doesn't exist. Create it? [y/n]").strip().lower()
if answer=='y':
... | apache-2.0 | -3,493,529,359,381,949,000 | 36.593939 | 172 | 0.550298 | false | 4.145005 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.