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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EnderCheng/pyspider | pyspider/result/result_worker.py | 1 | 1761 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-10-19 15:37:46
from six.moves import queue as Queue
import logging
logger = logging.getLogger("result")
class ResultWorker(object):
"""
do ... | apache-2.0 | -324,753,065,514,334,100 | 26.515625 | 70 | 0.51448 | false | 4.153302 | false | false | false |
pkgta1/shuffle | pogom/models.py | 1 | 119635 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import itertools
import calendar
import sys
import traceback
import gc
import time
import geopy
import math
from peewee import (InsertQuery, Check, CompositeKey, ForeignKeyField,
SmallIntegerField, IntegerField, CharField, DoubleField,
... | agpl-3.0 | 385,854,807,002,623,550 | 39.63553 | 80 | 0.502203 | false | 4.218449 | false | false | false |
aaschaer/globus-sdk-python | tests/unit/test_oauth2_native_app.py | 1 | 5541 | import hashlib
import base64
from six.moves.urllib.parse import quote
try:
import mock
except ImportError:
from unittest import mock
import globus_sdk
from globus_sdk.auth.oauth2_native_app import make_native_app_challenge
from tests.framework import CapturedIOTestCase
class GlobusNativeAppFlowManagerTests(C... | apache-2.0 | -942,154,778,371,028,500 | 37.479167 | 78 | 0.598448 | false | 4.204097 | true | false | false |
loghound/home-assistant | homeassistant/util.py | 1 | 13346 | """
homeassistant.util
~~~~~~~~~~~~~~~~~~
Helper methods for various modules.
"""
import collections
from itertools import chain
import threading
import queue
from datetime import datetime
import re
import enum
import socket
from functools import wraps
RE_SANITIZE_FILENAME = re.compile(r'(~|\.\.|/|\\)')
RE_SANITIZE_P... | mit | 1,595,207,043,161,216,500 | 29.126411 | 79 | 0.583396 | false | 3.863926 | true | false | false |
CS2103AUG2016-W10-C4/main | docs/build/convertor.py | 1 | 3205 | import markdown
from markdown.extensions.toc import TocExtension
from bs4 import BeautifulSoup
from os import path
#@@author A0135817B
files = {
"DeveloperGuide": {
"title": "Developer Guide",
"toc": [3, 4, 5, 15, 18, 19, 20, 22, 23, 27, 28, 29, 30],
},
"UserGuide": {
"title": "Use... | mit | -832,239,721,939,482,400 | 30.732673 | 97 | 0.571295 | false | 3.533627 | false | false | false |
webrecorder/webrecorder | webrecorder/test/test_ws.py | 1 | 4759 | from .testutils import FullStackTests
from webrecorder.fullstackrunner import FullStackRunner
import os
import gevent
import websocket
import requests
import json
# ============================================================================
class TestWS(FullStackTests):
@classmethod
def setup_class(cls):
... | apache-2.0 | -3,485,966,653,112,822,000 | 34.514925 | 165 | 0.583946 | false | 3.344343 | true | false | false |
jaj42/GraPhysio | graphysio/readdata/__init__.py | 1 | 1177 | from graphysio.dialogs import askOpenFilePath
from .csv import CsvReader
from .edf import EdfReader
from .parquet import ParquetReader
file_readers = {'csv': CsvReader, 'parquet': ParquetReader, 'edf': EdfReader}
class FileReader:
def __init__(self):
super().__init__()
self.reader = None
... | isc | 1,345,652,737,377,065,000 | 29.973684 | 79 | 0.595582 | false | 3.871711 | false | false | false |
kastnerkyle/pylearn2 | pylearn2/models/dbm/inference_procedure.py | 1 | 53963 | """
.. todo::
WRITEME
"""
__authors__ = ["Ian Goodfellow", "Vincent Dumoulin"]
__copyright__ = "Copyright 2012-2013, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
import logging
from theano import gof
import theano.tensor as T
import theano
from ... | bsd-3-clause | -330,707,305,821,156,700 | 37.738693 | 141 | 0.494135 | false | 3.943511 | false | false | false |
bineet-dash/maxwell-boltzmann-simulation | Regular/Visualisation.py | 1 | 5765 | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 2 04:39:22 2016
@author: reyansh
"""
import numpy as np
import pygame
import matplotlib.pyplot as plt
import time
import sys
import os
print("Visualisation Program started.\n")
location = os.getcwd()+"/HistogramData/"
pygame.init()
myfont = pygame.font.SysFont("Robo... | mit | 3,946,503,209,823,512,000 | 24.622222 | 119 | 0.604683 | false | 2.817693 | false | false | false |
pkolios/qlutter-todo | qlutter_todo/models/user.py | 1 | 2114 | from marshmallow import Schema, fields
from sqlalchemy.exc import IntegrityError
from qlutter_todo.extensions import bcrypt, db
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, nullable=False, unique=True)
password = db.Column(db.String, nullable=False)
... | mit | -5,968,849,985,339,471,000 | 24.780488 | 63 | 0.63245 | false | 3.651123 | false | false | false |
e-dub/DesOptPy | DesOptPy/OptAlgOptions.py | 1 | 46097 | # -*- coding: utf-8 -*-
'''
Title: OptAlgOptions.py
Units: -
Author: E. J. Wehrle, S. Rudolph
Date: August 6, 2017
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Description:
-------------------... | lgpl-2.1 | -7,913,292,811,251,721,000 | 44.731151 | 112 | 0.470746 | false | 3.624833 | false | false | false |
JGoutin/compilertools | compilertools/compilers/msvc.py | 1 | 4389 | """Microsoft Visual C++ Compiler"""
from compilertools.compilers import CompilerBase as _CompilerBase
__all__ = ["Compiler"]
class Compiler(_CompilerBase):
"""Microsoft Visual C++"""
@_CompilerBase._memoized_property
def option(self):
"""Compatibles Options
Returns
-------
... | bsd-2-clause | 3,867,561,973,128,674,300 | 29.692308 | 85 | 0.426065 | false | 4.855088 | false | false | false |
omar-AM/python-pgp | pgp/signature_verification.py | 1 | 14298 | # python-pgp A Python OpenPGP implementation
# Copyright (C) 2014 Richard Mitchell
#
# Portions of this code are based on code from GnuPG.
# GnuPG is Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
# 2004, 2006 Free Software Foundation, Inc.
# GnuPG is licensed under the GNU Public License version 3 or ... | gpl-3.0 | 198,886,245,694,799,170 | 38.716667 | 78 | 0.617009 | false | 4.46394 | false | false | false |
wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/nbody2t.py | 1 | 3622 | # The Computer Language Benchmarks Game
# http://shootout.alioth.debian.org/
#
# originally by Kevin Carson
# modified by Tupteq, Fredrik Johansson, and Daniel Nanz
# modified by Maciej Fijalkowski
# 2to3
import sys, time
def combinations(l):
result = []
for x in range(len(l) - 1):
ls = l[x+1:]
... | bsd-3-clause | -7,366,249,314,678,728,000 | 28.455285 | 64 | 0.497239 | false | 2.531097 | false | false | false |
jrabbit/pyborg-1up | misc/old_experimental_scripts/pyborg-msnp.py | 1 | 4836 | #! /usr/bin/env python
#
# PyBorg MSN module
#
# Copyright (c) 2006 Sebastien Dailly
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) an... | gpl-3.0 | -8,932,053,356,463,326,000 | 27.785714 | 105 | 0.673697 | false | 3 | false | false | false |
cogstat/cogstat | cogstat/cogstat_chart.py | 1 | 39371 | # -*- coding: utf-8 -*-
"""
This module contains functions for creating charts.
"""
import gettext
import os
import textwrap
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.pylab
import numpy as np
import pandas as pd
from scipy import stats
from statsmodels.graphics.mosaicplot import mosaic
impor... | gpl-3.0 | -5,437,972,585,931,252,000 | 45.866667 | 120 | 0.593401 | false | 3.509986 | false | false | false |
ActiveState/code | recipes/Python/579092_Data_A_Class_For_Arbitrary_Data/recipe-579092.py | 1 | 2505 | 'module data provides class Data(object)'
from pprint import pformat
class Data(object):
"represents arbitrary data; provides functionality for displaying itself"\
" properly"
def __init__(self, *args, **kwargs):
if args:
self.args = args
for key, value in kwargs.items():
... | mit | -1,544,197,505,485,148,000 | 35.304348 | 78 | 0.439122 | false | 4.579525 | false | false | false |
ruchee/vimrc | vimfiles/bundle/vim-python/submodules/pylint/pylint/checkers/design_analysis.py | 1 | 17053 | # Copyright (c) 2006, 2009-2010, 2012-2015 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2012, 2014 Google, Inc.
# Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Arun Persaud <arun@nubati.net>
# Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro>
# Copyri... | mit | -1,280,079,778,641,842,400 | 32.966135 | 92 | 0.557093 | false | 4.005403 | true | false | false |
googleads/googleads-python-lib | examples/adwords/v201809/optimization/get_campaign_criterion_bid_modifier_simulations.py | 1 | 3672 | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | -8,080,933,462,152,906,000 | 36.85567 | 80 | 0.651416 | false | 3.914712 | false | false | false |
livni/old-OK | src/knesset/simple/management/commands/parse_committee_members.py | 1 | 3413 | #### encoding: cp1255 ####
import urllib2
import re
import logging
logger = logging.getLogger("open-knesset.parse_committee_members")
from knesset.mks.models import Member
from knesset.committees.models import Committee
from django.core.management.base import BaseCommand
class Command(BaseCommand):
args = ''
... | bsd-3-clause | 167,328,683,025,164,200 | 36.108696 | 97 | 0.548198 | false | 3.891676 | false | false | false |
h2020-endeavour/iSDX | test/arp_demo_dashboard.py | 1 | 15859 | {
"id": 3,
"title": "ARP",
"originalTitle": "ARP",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
"rows": [
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"a... | apache-2.0 | 5,659,362,469,459,810,000 | 25.653782 | 179 | 0.290119 | false | 4.665784 | false | true | false |
easytaxibr/redash | redash/handlers/widgets.py | 1 | 2824 | import json
from flask import request
from redash import models
from redash.handlers.base import BaseResource
from redash.permissions import (require_access,
require_object_modify_permission,
require_permission, view_only)
class WidgetListResource(BaseR... | bsd-2-clause | -6,386,947,817,921,202,000 | 38.222222 | 111 | 0.644476 | false | 4.063309 | false | false | false |
ricksladkey/generateDS | tests/extensions1_sup.py | 1 | 78642 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated by generateDS.py.
#
import sys
import getopt
import re as re_
import base64
import datetime as datetime_
etree_ = None
Verbose_import_ = False
(
XMLParser_import_none, XMLParser_import_lxml,
XMLParser_import_elementtree
) = range(3)
XMLParser_impor... | mit | 4,906,190,435,529,299,000 | 41.9503 | 189 | 0.589291 | false | 4.164698 | false | false | false |
elainenaomi/sciwonc-dataflow-examples | sbbd2016/experiments/1-postgres/3_workflow_full_10files_primary_nosh_nors_annot_with_proj_3s/pegasus.bDkvI/pegasus-4.6.0/lib/python2.7/dist-packages/Pegasus/db/workflow/__init__.py | 1 | 33127 | """
Base classes that define the interface that the back-end specific
retrieval classes must expose. Each read-only property includes
inline epydoc describing what is to be returned and what type
(string, int, an object) each property must return when called.
How a subclass caches attributes or performs lazy evaluati... | gpl-3.0 | -8,262,912,749,840,123,000 | 29.336081 | 91 | 0.596734 | false | 4.812872 | false | false | false |
mihaisoloi/conpaas | conpaas-services/src/conpaas/services/helloworld/manager/manager.py | 1 | 5477 | from threading import Thread
from conpaas.core.expose import expose
from conpaas.core.manager import BaseManager
from conpaas.core.https.server import HttpJsonResponse, HttpErrorResponse
from conpaas.services.helloworld.agent import client
class HelloWorldManager(BaseManager):
# Manager states - Used by the fr... | bsd-3-clause | -8,915,813,572,362,726,000 | 38.402878 | 87 | 0.602337 | false | 4.21632 | false | false | false |
Pal3love/otRebuilder | Package/otRebuilder/Dep/fontTools/ttLib/tables/TupleVariation.py | 1 | 21422 | from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.misc.fixedTools import fixedToFloat, floatToFixed
from fontTools.misc.textTools import safeEval
import array
import io
import logging
import struct
import sys
# https://www.microsoft.com/typography/otspec... | mit | -6,449,184,711,009,154,000 | 33.440514 | 114 | 0.685323 | false | 3.086744 | false | false | false |
Suwmlee/XX-Net | gae_proxy/local/direct_handler.py | 1 | 8914 | #!/usr/bin/env python
# coding:utf-8
import errno
import time
import re
import socket
import ssl
import http.client
import OpenSSL
NetWorkIOError = (socket.error, ssl.SSLError, OpenSSL.SSL.Error, OSError)
from .connect_manager import https_manager
from .gae_handler import return_fail_message
from .google_ip impor... | bsd-2-clause | -5,936,500,115,367,728,000 | 39.518182 | 150 | 0.546107 | false | 3.745378 | false | false | false |
markwash/hoke | hoke/db.py | 1 | 1287 | import datetime
import json
import os
from . import data
def new_db(data_path):
return Db(open(data_path, 'wb+'))
def open_db(data_path):
return Db(open(data_path, 'rb+'))
class Db(object):
def __init__(self, fd):
self.fd = fd
def add_blueprint(self, raw_bp):
self.fd.seek(0, os.S... | bsd-2-clause | -9,086,741,325,495,244,000 | 26.382979 | 77 | 0.508159 | false | 3.752187 | false | false | false |
marscher/jpype | jpype/_core.py | 1 | 3476 | #*****************************************************************************
# Copyright 2004-2008 Steve Menard
#
# 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-2.0 | 8,743,039,035,161,711,000 | 25.534351 | 78 | 0.652762 | false | 3.892497 | false | false | false |
cnelsonsic/Certificator | certificator/db.py | 1 | 1716 |
# Certificator: Certificates that a person has the skills to pay the bills.
# Copyright (C) 2013 C Nelson <cnelsonsic@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foun... | agpl-3.0 | 2,368,833,109,251,465,700 | 34.020408 | 80 | 0.69289 | false | 3.779736 | false | false | false |
ITISFoundation/oSPARC_Test | templates/boilerplate/server-py-flask-eventlet/config.py | 1 | 1369 | """
TODO create create_environment_file(.) to build a template env file with defaults
"""
# pylint: disable=C0111
import os
import sys
import logging
_CDIR = os.path.dirname(sys.argv[0] if __name__ == '__main__' else __file__)
# Location of qx ourdir when compiled using docker-compose -f docker-compose.dev.yml run... | mit | -214,670,142,198,549,600 | 23.446429 | 97 | 0.68298 | false | 3.125571 | true | false | false |
odinn1984/mapi | maze/Player.py | 1 | 1915 | import random
import json
class Player:
def __init__(self, maze):
self.__path = []
self.__current_cell = maze.getOriginOfMaze()
self.__end_cell = maze.getEndOfMaze()
self.__maze = maze
self.__current_direction = None
self.__directions = {
'N': (0, -1),
... | gpl-2.0 | 2,930,629,153,704,639,500 | 33.196429 | 123 | 0.555091 | false | 3.661568 | false | false | false |
mxjeff/python-musicpd | test.py | 1 | 23232 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
"""
Test suite highly borrowed^Wsteal from python-mpd2 [0] project.
[0] https://github.com/Mic92/python-mpd2
"""
import itertools
import os
import sys
import types
import unittest
import warnings
import musicpd
try:
import unitt... | lgpl-3.0 | 9,070,605,069,085,727,000 | 37.782972 | 136 | 0.541346 | false | 3.843011 | true | false | false |
mpi-sws-rse/thingflow-python | examples/tutorial.py | 1 | 2404 | """
This is an example thingflow program that is described in tutorial.rst.
"""
# First, let's define a sensor that generates a random number each time
# it is sampled.
import random
random.seed()
from thingflow.base import SensorAsOutputThing
class RandomSensor:
def __init__(self, sensor_id, mean, stddev, sto... | apache-2.0 | 26,744,425,224,495,300 | 26.011236 | 83 | 0.659318 | false | 3.75625 | false | false | false |
cmunk/protwis | tools/management/commands/check_structure_residues.py | 1 | 6748 | from build.management.commands.base_build import Command as BaseBuild
from django.conf import settings
from django.db import connection
from django.db.models import Count
from protein.models import Protein, ProteinConformation, ProteinAnomaly, ProteinState, ProteinSegment
from residue.models import Residue, ResidueGen... | apache-2.0 | 5,751,266,634,063,414,000 | 51.71875 | 209 | 0.588915 | false | 3.577943 | false | false | false |
cc1-cloud/cc1 | src/wi/utils/__init__.py | 1 | 2483 | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
#
# 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.apac... | apache-2.0 | -1,832,022,592,089,418,000 | 29.641975 | 78 | 0.684932 | false | 3.623358 | false | false | false |
google-research/google-research | smith/bert/optimization.py | 1 | 6253 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 | -2,526,674,740,475,632,600 | 34.731429 | 80 | 0.654086 | false | 3.546795 | false | false | false |
zhangliyong/rq-cli | rq_cli.py | 1 | 1726 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
rq command line tool
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import click
import redis
from rq import get_failed_queue, Queue, use_connection
from rq.exceptions import InvalidJobOperationError
fr... | bsd-2-clause | 1,949,698,036,105,624,000 | 25.151515 | 80 | 0.62978 | false | 3.649049 | false | false | false |
xenu256/QProb | aggregator/summarize.py | 1 | 3022 | # Simple Summarizer
# Copyright (C) 2010-2012 Tristan Havelick
# Author: Tristan Havelick <tristan@havelick.com>
# URL: <https://github.com/thavelick/summarize/>
# For license information, see LICENSE.TXT
"""
A summarizer based on the algorithm found in Classifier4J by Nick Lothan.
In order to summarize a document thi... | lgpl-3.0 | -2,613,238,340,153,349,600 | 38.763158 | 96 | 0.730642 | false | 3.744734 | false | false | false |
frozstone/concept | lib/query_doc.py | 1 | 2040 | from query_all import Query_All
import modular, sigure, subtree
from collections import OrderedDict
import functools
import operator
import re
re_escape = r'([+&|!(){}[\]"~*?:\\^-])'
re_qvar = r'\bqvar\b'
class Query:
solr_url_math = ''
n_row = 0
def __init__(self, solrurlmath, nrow):
self.solr_u... | mit | -8,761,501,211,865,209 | 36.777778 | 153 | 0.589706 | false | 3.311688 | false | false | false |
cmek/radiusdev | states/webapp/files/settings.py | 1 | 4477 | import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '{{ secret_key }}'
# SECURITY WARNING:... | bsd-2-clause | 7,621,085,567,934,816,000 | 25.335294 | 95 | 0.565111 | false | 3.709196 | false | false | false |
shitolepriya/Saloon_erp | erpnext/crm/doctype/appointment/appointment-bkup.py | 1 | 7803 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from datetime import datetime
from frappe.utils import now
from frappe import m... | agpl-3.0 | 1,191,452,189,552,987,000 | 37.628713 | 190 | 0.650263 | false | 3 | false | false | false |
BrunoTh/ETS2Autopilot | model.py | 1 | 3493 | """
MIT License
Copyright (c) 2016 Sully Chen (https://github.com/SullyChen/Autopilot-TensorFlow)
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... | mit | 3,705,314,988,735,306,000 | 29.373913 | 90 | 0.691669 | false | 2.803371 | false | false | false |
benjamindeleener/odoo | addons/hr/hr.py | 1 | 17929 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import openerp
from openerp import api
from openerp import SUPERUSER_ID
from openerp import tools
from openerp.modules.module import get_module_resource
from openerp.osv import fields, osv
from openerp.to... | gpl-3.0 | -445,290,957,025,082,800 | 47.196237 | 170 | 0.600814 | false | 3.784086 | false | false | false |
sybrenstuvel/quickypano | src/quickypano/huginpto.py | 1 | 6217 | # The MIT License (MIT)
#
# Copyright (c) 2014 Matěj Šmíd
#
# 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... | gpl-2.0 | -89,577,421,704,899,800 | 32.956284 | 111 | 0.474574 | false | 3.494938 | false | false | false |
eskerda/pybikes | pybikes/bicing.py | 1 | 1637 | # -*- coding: utf-8 -*-
import json
from pybikes import BikeShareSystem, BikeShareStation, PyBikesScraper
from pybikes.exceptions import InvalidStation
class Bicing(BikeShareSystem):
meta = {
'system': 'Bicing',
'company': [
'Barcelona de Serveis Municipals, S.A. (BSM)',
'... | lgpl-3.0 | 3,905,663,632,944,719,400 | 27.719298 | 70 | 0.555284 | false | 3.637778 | false | false | false |
openwns/wrowser | openwns/wrowser/simdb/Database.py | 1 | 6569 | ###############################################################################
# This file is part of openWNS (open Wireless Network Simulator)
# _____________________________________________________________________________
#
# Copyright (C) 2004-2007
# Chair of Communication Networks (ComNets)
# Kopernikusstr. 16, D-... | gpl-2.0 | 8,944,719,750,822,819,000 | 33.756614 | 106 | 0.603593 | false | 4.593706 | false | false | false |
wearespindle/flindt | backend/flindt/user/migrations/0002_auto_20160824_1110.py | 1 | 2190 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-24 09:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auth', '0008_alter_user_username_max_length'),
('user', '0001_initial'),
]
op... | agpl-3.0 | 2,694,908,288,395,581,000 | 38.107143 | 256 | 0.595434 | false | 4.345238 | false | false | false |
a-musing-moose/cel | setup.py | 1 | 2793 | #!/usr/bin/env python
# Note: To use the 'upload' functionality of this file, you must:
# $ pip install twine
import io
import os
import sys
from shutil import rmtree
from setuptools import Command, find_packages, setup
NAME = 'cel'
DESCRIPTION = 'A function as a service build package'
URL = 'https://github.com/... | mit | -6,013,934,003,340,925,000 | 25.542857 | 86 | 0.621098 | false | 3.802183 | false | false | false |
kif/HPP | 0_Python/run_numpy.py | 1 | 1028 | #!/usr/bin/env python
# coding: utf-8
from __future__ import division
__doc__ = """
demo of inside_polygon
"""
__author__ = "Jérôme Kieffer"
__copyright__ = "2014-16 ESRF"
__contact__ = "Jerome.Kieffer@esrf.fr"
__license__ = "MIT"
import inside_polygon
import numpy
import time
N = 24
L = 1024
if __name__ == "__main... | mit | 6,442,984,957,196,446,000 | 22.860465 | 87 | 0.592593 | false | 3.081081 | false | false | false |
cubledesarrollo/cubledotes | cuble/suit/templatetags/suit_menu.py | 1 | 15841 | from django import template
from django.contrib import admin
from django.contrib.admin import AdminSite
from django.core.handlers.wsgi import WSGIRequest
from django.core.urlresolvers import reverse, resolve
try:
from django.utils.six import string_types
except ImportError:
# For Django < 1.4.2
string_type... | mit | 991,642,215,675,579,600 | 32.070981 | 80 | 0.537214 | false | 4.075379 | true | false | false |
deevarvar/myLab | baidu_code/c_monitor/monitor_api.py | 1 | 1311 | #!/usr/bin/env python
#-*- coding=utf-8 -*-
#author: yezhihua@baidu.com
import urllib,urllib2,json
import queue_monitor
def input_monitor_plat(item_id, value, content):
try:
data = {"item_id":item_id, "value": value, "content":content}
body = urllib.urlencode(data)
fp = urllib2.urlopen("http://cq02-testing-mb1... | mit | 6,823,569,927,324,277,000 | 29.833333 | 104 | 0.622394 | false | 2.85872 | false | false | false |
grammarly/browser-extensions | generate/lib/run-firefox/mozrunner/wpk.py | 3 | 2565 | from ctypes import sizeof, windll, addressof, c_wchar, create_unicode_buffer
from ctypes.wintypes import DWORD, HANDLE
PROCESS_TERMINATE = 0x0001
PROCESS_QUERY_INFORMATION = 0x0400
PROCESS_VM_READ = 0x0010
def get_pids(process_name):
BIG_ARRAY = DWORD * 4096
processes = BIG_ARRAY()
needed = DWORD()
p... | bsd-3-clause | 8,620,116,053,902,893,000 | 32.75 | 76 | 0.536452 | false | 4.384615 | false | false | false |
0todd0000/spm1d | spm1d/rft1d/examples/paper/fig13_weather_0_data.py | 1 | 1627 |
import numpy as np
from scipy.ndimage.filters import gaussian_filter1d
from matplotlib import pyplot
from spm1d import rft1d
### EPS production preliminaries:
fig_width_mm = 100
fig_height_mm = 80
mm2in = 1/25.4
fig_width = fig_width_mm*mm2in # width in inches
fig_height = fig_height_mm*mm2in # height in inch... | gpl-3.0 | -137,543,021,489,027,680 | 26.116667 | 76 | 0.657652 | false | 2.58254 | false | false | false |
ColumbiaCMB/kid_readout | apps/basic_sweep_ui.py | 1 | 21601 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'uis/basic_sweep.ui'
#
# Created: Thu Nov 7 12:01:29 2013
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except... | bsd-2-clause | -4,748,961,558,929,716,000 | 64.063253 | 145 | 0.720522 | false | 3.81778 | false | false | false |
PolarTeam/wine-vision | server/setup.py | 1 | 1975 | #! /usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
import versioneer
HERE = os.path.abspath(os.path.dirname(__file__))
__project__ = 'wine-vision'
__author__ = 'merry31'
__author_email__ = 'julien.rallo@gmail.com'
__url__ = 'https://github.com/PolarTeam/... | bsd-2-clause | 5,601,815,242,024,731,000 | 24.320513 | 67 | 0.468861 | false | 3.903162 | false | false | false |
numericube/twistranet | twistranet/project_templates/default/local_settings.py | 1 | 5123 | """
Edit this file instead of editing settings.py.
"""
import os.path
HERE = os.path.dirname(__file__)
# #
# Database settings #
# #
# Default is to use twistranet with the suboptimal sqlite engine.
... | agpl-3.0 | -4,190,787,238,554,715,600 | 34.856115 | 122 | 0.546164 | false | 3.786401 | false | false | false |
trentm/pics | lib/picslib/filesystem.py | 1 | 3607 | # Copyright (c) 2008 ActiveState Software Inc.
"""A light class the wraps file-system operations by the WorkingCopy class."""
import sys
from os.path import exists
import os
from glob import glob
from picslib.errors import PicsFSError
class FileSystem(object):
def __init__(self, log=None):
"""Create a... | mit | -2,629,381,634,152,365,600 | 32.091743 | 80 | 0.517882 | false | 4.184455 | false | false | false |
blandford/nilya | actions.py | 1 | 2000 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# actions.py - the actual actions that you type in.
#
# Copyright © 2013 Jonathan Blandford
#
# 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 v... | gpl-3.0 | 8,615,442,995,465,384,000 | 28.397059 | 70 | 0.673337 | false | 3.601802 | false | false | false |
PennyDreadfulMTG/Penny-Dreadful-Tools | modo_bugs/strings.py | 1 | 1853 | import itertools
import re
from typing import Any, Iterable, List, Match, Optional
METACATS = ['Cardset', 'Collection', 'Deck Building', 'Duel Scene', 'Leagues', 'Play Lobby', 'Trade']
CATEGORIES = ['Advantageous', 'Disadvantageous', 'Game Breaking', 'Avoidable Game Breaking', 'Graphical', 'Non-Functional ability']
BA... | gpl-3.0 | 306,731,538,405,539,600 | 33.849057 | 131 | 0.596102 | false | 2.854714 | false | false | false |
foozmeat/lack | lack/lackmanager.py | 1 | 7182 | import asyncio
import html
import logging
from datetime import datetime
from textwrap import TextWrapper
import os
import pytz
import re
import sys
from slackclient import SlackClient
from sortedcontainers import SortedDict
from websocket import WebSocketConnectionClosedException
class LackManager:
# loglines =... | mit | -5,932,631,329,873,965,000 | 30.778761 | 97 | 0.50543 | false | 4.275 | false | false | false |
mennis/oTTo | src/otto/lib/common.py | 1 | 3136 | from collections import OrderedDict
from time import sleep, time
import re
import otto.connections.ssh
from otto.lib.otypes import ReturnCode
from otto.lib.decorators import wait_until
def get_elstats(initiator):
"""
This function will translate data from /dev/ethdrv/elstat into a dictionary.
"""
els... | bsd-3-clause | -81,415,456,130,658,030 | 30.049505 | 97 | 0.545281 | false | 4.030848 | false | false | false |
gtcuth/FSWD-P4_ConferenceApp | models.py | 1 | 6283 | #!/usr/bin/env python
"""models.py
Udacity conference server-side Python App Engine data & ProtoRPC models
$Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $
created/forked from conferences.py by wesc on 2014 may 24
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
import httplib
import endpoints
from protor... | apache-2.0 | -6,205,579,420,140,094,000 | 28.087963 | 83 | 0.729429 | false | 3.936717 | false | false | false |
creimers/graphene-auth-examples | src/apps/account/models.py | 1 | 1119 | from django.contrib.auth.models import AbstractUser, BaseUserManager
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **kwars):
"""
Creates and saves a User with the given email and password.
"""
if not email:
raise ValueError('Users must ... | mit | -6,102,183,395,748,782,000 | 25.023256 | 72 | 0.603217 | false | 4.206767 | false | false | false |
Estevo-Aleixo/pylnp | tkgui/advanced.py | 1 | 5144 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint:disable=unused-wildcard-import,wildcard-import,invalid-name,attribute-defined-outside-init
"""Advanced tab for the TKinter GUI."""
from __future__ import print_function, unicode_literals, absolute_import
from . import controls, binding
from .tab import Tab
... | isc | 782,875,665,953,940,200 | 42.730435 | 99 | 0.601672 | false | 3.782353 | false | false | false |
d3adc0d3/DeadBot | extensions/filesystem.py | 1 | 2848 | # Filesystem Extension
from extensions import base
import os
import time
class Extension(base.Extension):
def __init__(self, config):
super().__init__(config)
self.root = os.path.realpath(
os.path.expanduser(
self.config['root']
)
)
if not os.path.exists(self.root):
os.mkdir(self.root)
sel... | mit | -7,929,897,289,922,807,000 | 21.784 | 64 | 0.650632 | false | 2.936082 | false | false | false |
stefanv/scipy3 | scipy/spatial/kdtree.py | 1 | 28614 | # Copyright Anne M. Archibald 2008
# Released under the scipy license
import numpy as np
from heapq import heappush, heappop
import scipy.sparse
def minkowski_distance_p(x,y,p=2):
"""Compute the pth power of the L**p distance between x and y
For efficiency, this function computes the L**p distance but does
... | bsd-3-clause | -8,677,034,059,469,271,000 | 38.741667 | 137 | 0.545991 | false | 3.892002 | false | false | false |
AlanWarren/dotfiles | .config/ranger/colorschemes/irblack.py | 1 | 3256 | # Copyright (C) 2009, 2010 Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Al... | gpl-2.0 | 1,194,552,865,320,437,000 | 21.14966 | 71 | 0.633907 | false | 3.204724 | false | false | false |
amjith/PyAlarmTimer | AlarmSetup.py | 1 | 4177 |
import sys
from PyQt4 import QtCore, QtGui
#from AlarmSetupDialog_ui import Ui_DialogAlarmSetup
from Resources.AlarmSetupDialog_ui import Ui_DialogAlarmSetup
from AlarmTimer import AlarmTimer
class AlarmSetup(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
... | mit | -3,381,765,709,241,277,000 | 34.700855 | 143 | 0.640891 | false | 3.88197 | false | false | false |
owlabs/incubator-airflow | tests/utils/test_dot_renderer.py | 1 | 2082 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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 Licen... | apache-2.0 | 6,096,084,966,008,292,000 | 36.178571 | 102 | 0.697887 | false | 3.869888 | false | false | false |
aerler/WRF-Projects | src/archive/plotInnerNARRprecip2.py | 1 | 7069 | '''
Created on 2012-11-05
A simple script that reads a WRF and NARR data and displays it in a proper geographic projection;
application here is plotting precipitation in the inner WRF domain.
@author: Andre R. Erler
'''
## includes
# matplotlib config: size etc.
import numpy as np
import matplotlib.pylab as pyl
impo... | gpl-3.0 | -6,994,880,229,796,809,000 | 40.828402 | 106 | 0.650021 | false | 2.797388 | false | false | false |
pordnajela/AlgoritmosCriptografiaClasica | Sustitucion_Monoalfabetica/CriptoanalisisCesar.py | 1 | 2655 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import math
from .Cesar import Cesar
class AnalisisFrecuencia(object):
"""docstring for AnalisisFrecuencia"""
def __init__(self, mensaje):
super(AnalisisFrecuencia, self).__init__()
self.frecuenciaIngles = {
'A': 0.08167, 'B': 0.01492, 'C': 0.02782, 'D': 0.0425... | apache-2.0 | -3,274,928,407,799,805,400 | 31.353659 | 166 | 0.628205 | false | 2.164898 | false | false | false |
co/TheLastRogue | inputhandler.py | 1 | 4065 | import libtcodpy as libtcod
import settings
NORTH = 0
SOUTH = 1
WEST = 2
EAST = 3
NORTHWEST = 4
NORTHEAST = 5
SOUTHWEST = 6
SOUTHEAST = 7
VI_NORTH = 200
VI_SOUTH = 201
VI_WEST = 202
VI_EAST = 203
VI_NORTHWEST = 204
VI_NORTHEAST = 205
VI_SOUTHWEST = 206
VI_SOUTHEAST = 207
ENTER = 104
REST = 105
ONE = 106
TWO = 107
TH... | bsd-2-clause | -6,106,260,447,207,428,000 | 20.854839 | 76 | 0.62091 | false | 2.542214 | false | false | false |
xcgd/account_asset_streamline | wizard/account_asset_depreciation_wizard.py | 1 | 4421 | from openerp.osv import osv, fields
from openerp.tools.translate import _
class account_asset_depreciation_wizard(osv.TransientModel):
"""Order the depreciation of a selection of assets for a given period"""
_name = 'account.asset.depreciation.wizard'
def _get_asset_domain(self, cr, uid, period_id, cont... | agpl-3.0 | 7,550,060,269,296,731,000 | 35.841667 | 79 | 0.533137 | false | 3.940285 | false | false | false |
DataDog/integrations-core | confluent_platform/tests/test_e2e.py | 1 | 1753 | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from typing import Any
import pytest
from datadog_checks.base.stubs.aggregator import AggregatorStub
from .common import CHECK_CONFIG
from .metrics import ALWAYS_PRESENT_METRICS, NOT_ALWAYS_PRESENT_METR... | bsd-3-clause | -173,797,079,640,007,740 | 36.297872 | 108 | 0.715916 | false | 3.614433 | false | false | false |
ni/hoplite | hoplite/api/root.py | 1 | 1579 | from flask import Blueprint
import platform
import sys
import os
import site
import pkg_resources
from hoplite.api.helpers import jsonify
bp = Blueprint('site', __name__)
def reload_site_packages():
# TODO: Can probably be replaced with reload(pkg_resources)
opsys = platform.system().lower()
python_exe_... | mit | 1,723,860,941,033,078,500 | 33.326087 | 79 | 0.607346 | false | 3.605023 | false | false | false |
jtraulle/django-ecommerce | commerce/migrations/0005_auto_20150110_1955.py | 1 | 1552 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('commerce', '0004_auto_20150110_1947'),
]
operations = [
migrations.AlterModelOptions(
name='orderdetail',
... | agpl-3.0 | 4,080,135,347,677,345,000 | 35.952381 | 170 | 0.605026 | false | 4.073491 | false | false | false |
fnp/wolnelektury | src/club/payment_methods.py | 1 | 2465 | # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.conf import settings
from django.urls import reverse
from paypal.rest import agreement_approval_url
class PaymentMethod(object):
is_onetime = Fals... | agpl-3.0 | -6,883,299,681,043,101,000 | 24.666667 | 78 | 0.634334 | false | 3.470423 | false | false | false |
google-research/google-research | clustering_normalized_cuts/train.py | 1 | 7507 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 | -3,326,871,865,316,556,300 | 35.091346 | 84 | 0.633142 | false | 3.727408 | false | false | false |
marcusmunch/DotaTools | dotatools/hero.py | 1 | 1227 | #!/usr/bin/env python
import requests, json, re
class Hero(object):
try:
r = requests.get("https://api.opendota.com/api/heroes", timeout=30)
except requests.exceptions.ReadTimeout:
print("Request timed out!")
exit(1)
__data = json.loads(r.text)
def __init__(self, hero_id):
self.hero_id = hero_id
for ... | gpl-3.0 | 8,482,299,693,440,939,000 | 18.790323 | 73 | 0.618582 | false | 2.661605 | false | false | false |
scikit-optimize/scikit-optimize | build_tools/circle/list_versions.py | 1 | 3501 | #!/usr/bin/env python3
# Copied from https://github.com/scikit-learn/scikit-learn/blob/master/
# build_tools/circle/list_versions.sh
# The scikit-learn developers.
# License: BSD-style
# List all available versions of the documentation
import json
import re
import sys
from distutils.version import LooseVersion
from ur... | bsd-3-clause | 8,502,127,329,609,859,000 | 32.663462 | 116 | 0.628963 | false | 3.432353 | false | false | false |
DayGitH/Python-Challenges | ProjectEuler/pr0018.py | 1 | 1720 | """
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from
top to bottom is 23.
3
7 4
2 4 6
8 5 9 3
That is, 3 + 7 + 4 + 9 = 23.
Find the maximum total from top to bottom of the triangle below:
75
95 64
17 47 82
18 35 87 10
20 04 82 47 65
19 01 23 75 03 ... | mit | -1,566,889,687,291,404,500 | 23.942029 | 116 | 0.663953 | false | 2.940171 | false | false | false |
lj201112/Mineral-Formula-Calculation | Python/master.py | 1 | 3794 | # -*- coding: utf-8 -*-
"""
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
Copyright 2016 LiJie, lj201112@163.com
Mineral Formula Calculation 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, eit... | gpl-3.0 | -5,003,529,934,644,702,000 | 35.490385 | 263 | 0.675013 | false | 3.089577 | false | false | false |
numbas/editor | editor/migrations/0040_auto_20191018_0643.py | 1 | 1591 | # Generated by Django 2.1.11 on 2019-10-18 05:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import editor.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('ed... | apache-2.0 | 1,946,882,530,851,335,200 | 38.775 | 185 | 0.623507 | false | 4.32337 | false | false | false |
quantumlib/Cirq | cirq-core/cirq/ops/common_gates.py | 1 | 56136 | # Copyright 2018 The Cirq Developers
#
# 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 law or agreed to in ... | apache-2.0 | 8,903,557,193,860,628,000 | 35.356031 | 100 | 0.556394 | false | 3.501843 | false | false | false |
zachwhaley/studly | server/calendarListUpdate.py | 1 | 10672 | #!/usr/bin/python
import sys
import pprint
import time
import datetime
from dateutil import parser
from google.appengine.ext import ndb
from apiclient.discovery import build
from google.appengine.ext import webapp
service = build('calendar', 'v3')
def getCalendarList(httpAuth):
request = service.calendarList(... | apache-2.0 | 4,026,066,564,738,094,000 | 48.407407 | 175 | 0.606353 | false | 4.495366 | false | false | false |
degibenz/vispa-chat | src/api/client_api.py | 1 | 3350 | # -*- coding: utf-8 -*-
__author__ = 'degibenz'
from aiohttp import web
from aiohttp.web import json_response
from models.client import Client, ObjectId
from core.middleware import check_auth
__all__ = [
'ClientInfo',
'CreateClient',
'AuthClient',
'DeleteClient'
]
class ClientInfo(web.View):
@c... | mit | -282,549,991,467,032,000 | 22.426573 | 66 | 0.461194 | false | 4.373368 | false | false | false |
m-improvement/PrincessKnight | src/common.py | 1 | 2375 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
import logging
class Characters:
PRINCESS = 0
KNIGHT = 1
ORC = 2
BOSS_ORC = 3
NAMES = {
0: 'princess',
1: 'knight',
2: 'orc',
3: 'boss-orc',
}
def name(ch):
''' コードに対応したカード名を取得します '''
return NAMES[ch]
def id(x):
return x
ACTION_ORDE... | mit | 4,196,988,226,831,942,700 | 21.293478 | 86 | 0.602633 | false | 2.214903 | false | false | false |
bacaldwell/ironic | ironic/conductor/utils.py | 1 | 17858 | # coding=utf-8
# 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,898,465,210,204,498,000 | 39.494331 | 79 | 0.609139 | false | 4.267145 | false | false | false |
deekshadangwal/PyRTL | pyrtl/analysis/estimate.py | 1 | 15271 |
"""
Estimate contains functions to esimate aspects of blocks,
either using internal models or by making calls out to external
tool chains.
"""
from __future__ import print_function, unicode_literals
import re
import os
import math
import tempfile
import subprocess
import sys
from ..core import working_block
from ..... | bsd-3-clause | -5,661,551,667,276,426,000 | 38.664935 | 98 | 0.593085 | false | 3.5797 | false | false | false |
2franix/homewatcher | homewatcher/timer.py | 1 | 3840 | #!/usr/bin/python3
# Copyright (C) 2014-2017 Cyrille Defranoux
#
# This file is part of Homewatcher.
#
# Homewatcher 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 y... | gpl-3.0 | -6,298,175,531,352,100,000 | 35.923077 | 103 | 0.616146 | false | 4.142395 | false | false | false |
noirbizarre/minibench | tasks.py | 1 | 1542 | # -*- coding: utf-8 -*-
# flake8: noqa
from __future__ import unicode_literals, absolute_import
from invoke import run, task
from os.path import join, abspath, dirname
ROOT = abspath(join(dirname(__file__)))
def lrun(cmd, **kwargs):
return run('cd {root} && {cmd}'.format(root=ROOT, cmd=cmd), **kwargs)
@task
... | mit | 1,890,465,460,556,181,500 | 20.71831 | 108 | 0.618677 | false | 3.366812 | true | false | false |
snopt/snopt-python | solvers/solution.py | 1 | 6607 | import os, sys
import numpy as np
#-------------------------------------------------------------------------------#
class SQIC_solution(object):
'''
SQIC_solution class:
'''
def __init__ (self,name=''):
self.setup(name)
def setup(self,name):
self.name = name
self.x ... | mit | -9,123,458,536,361,683,000 | 31.546798 | 94 | 0.45255 | false | 3.155205 | false | false | false |
jjdmol/LOFAR | CEP/Pipeline/recipes/sip/nodes/deprecated/flag_baseline.py | 1 | 3011 | # LOFAR IMAGING PIPELINE
#
# flag_baseline node
# John Swinbank, 2010
# swinbank@transientsk... | gpl-3.0 | 1,704,076,542,543,838,000 | 35.719512 | 90 | 0.473265 | false | 4.541478 | false | false | false |
foursquare/pants-rules | foursquare/pants/rules/validate.py | 1 | 3853 | # Copyright 2014 Foursquare Labs Inc. All Rights Reserved.
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import os
from pants.backend.core.tasks.task import Task
class Validate(Task):
def __init__(self, *arg... | apache-2.0 | 6,788,568,919,517,499,000 | 32.798246 | 93 | 0.674799 | false | 3.704808 | false | false | false |
ProbabilisticNumerics/probabilistic_line_search | probls/gaussian_process.py | 1 | 18979 | # -*- coding: utf-8 -*-
"""
Implements the Gaussian process functionality needed for the probabilistic
line search algorithm.
"""
import numpy as np
from scipy import linalg
from utils import erf
class ProbLSGaussianProcess(object):
"""Gaussian process implementation for probabilistic line searches [1].
Implement... | apache-2.0 | 3,218,967,239,260,439,000 | 32.832442 | 79 | 0.596659 | false | 2.994478 | false | false | false |
creynaud/notes-server | tests/test_api.py | 1 | 8687 | from django.core.urlresolvers import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from tests.factories import NoteFactory, UserFactory
from notes.core.models import Note
class APITestNotAuthenticated(APITestCase):
def test_get_notes_not_authenticated(self):
url =... | mit | 4,542,965,968,030,262,300 | 39.784038 | 76 | 0.634626 | false | 3.806748 | true | false | false |
papedaniel/oioioi | oioioi/filetracker/tests.py | 1 | 6316 | # coding: utf-8
from django.utils import unittest
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.core.files.base import ContentFile
from django.db.models.fields.files import FieldFile, FileField
from django.core.files.storage import default_storage
from oioioi.filetracker.mod... | gpl-3.0 | 8,694,177,677,028,593,000 | 34.875 | 79 | 0.640006 | false | 4.052632 | true | false | false |
meteoswiss-mdr/monti-pytroll | scripts/input_rad_ncfiles_PLAX_MSG2_nc.py | 1 | 14290 | from __future__ import division
from __future__ import print_function
def input(in_msg):
import inspect
in_msg.input_file = inspect.getfile(inspect.currentframe())
print("*** read input from ", in_msg.input_file)
# 8=MSG1, 9=MSG2, 10=MSG3
in_msg.sat = "Meteosat"
#in_msg.sat = "meteosat"
... | lgpl-3.0 | 2,691,281,166,103,314,400 | 43.378882 | 125 | 0.594542 | false | 2.787205 | false | false | false |
zjuchenyuan/BioWeb | Lib/Bio/Align/Applications/_Clustalw.py | 1 | 19629 | # Copyright 2009 by Cymon J. Cox. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Command line wrapper for the multiple alignment program Clustal W.
"""
from __future__ impor... | mit | -4,046,643,533,542,381,600 | 57.945946 | 94 | 0.455907 | false | 4.465196 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.