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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mahak/neutron | neutron/objects/floatingip.py | 2 | 1314 | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | apache-2.0 | 6,196,161,757,057,274,000 | 34.513514 | 78 | 0.704718 | false | 3.922388 | false | false | false |
KmolYuan/pyslvs | pyslvs/expression_parser.py | 1 | 9940 | # -*- coding: utf-8 -*-
"""Lark parser to parse the expression."""
__author__ = "Yuan Chang"
__copyright__ = "Copyright (C) 2016-2021"
__license__ = "AGPL"
__email__ = "pyslvs@gmail.com"
from abc import abstractmethod
from typing import (
cast, Tuple, List, Dict, Iterator, Optional, Union, TypeVar, Generic,
)
fr... | agpl-3.0 | -1,177,047,438,729,620,200 | 26.458564 | 94 | 0.548491 | false | 3.260085 | false | false | false |
wa3l/BookSearch | main.py | 1 | 2709 | #!/usr/bin/python
"""
BookSearch
Module: main
Author: Wael Al-Sallami
Date: 2/10/2013
"""
import sys, re, cmd, gen, engn, timer
class Prompt(cmd.Cmd):
"""Search query interface"""
engine = None
store = None
line = None
prompt = "\nquery> "
welcome = "\n### Welcome to BookSearch!\n### Enter your q... | unlicense | 5,852,404,163,806,000,000 | 24.8 | 134 | 0.601698 | false | 3.490979 | false | false | false |
huangziwei/MorphoPy | morphopy/_utils/representation.py | 1 | 2273 |
import copy
import random
import numpy as np
import pandas as pd
from .graph_utils import get_tips, get_root
def get_persistence_barcode(G, dist='radDist'):
if dist == 'radDist':
f = _radial_dist_to_soma
else:
raise NotImplementedError
return _get_persistence_barcode(G, f)
def _get_pe... | mit | 1,829,698,795,874,876,000 | 28.907895 | 112 | 0.549054 | false | 3.412913 | false | false | false |
wikimedia/operations-debs-contenttranslation-hfst | test/tools/fsmbook-tests/python-scripts/EinsteinsPuzzle.hfst.py | 2 | 5097 | exec(compile(open('CompileOptions.py', 'rb').read(), 'CompileOptions.py', 'exec'))
# matches all symbols
pi = hfst.read_att_string("0 0 @_IDENTITY_SYMBOL_@ @_IDENTITY_SYMBOL_@\n\
0")
# matches all symbols except "|"
pi_house = hfst.read_att_string("0 0 @_IDENTITY_SYMBOL_@ @_IDENTITY_SYMBOL_@\n\
0 1 | |\n\
0")
# The ... | gpl-3.0 | 5,359,581,569,216,738,000 | 39.133858 | 108 | 0.671179 | false | 2.753647 | false | false | false |
tripatheea/Simple-IMDB-Scraper | scraper.py | 1 | 2978 | import urllib2
import mechanize
from bs4 import BeautifulSoup
import os
def get_html(url):
header = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Ac... | mit | 8,651,847,595,360,548,000 | 32.088889 | 133 | 0.636333 | false | 2.712204 | false | false | false |
Jumpscale/jumpscale6_core | lib/JumpScale/baselib/codetools/TemplateEngine.py | 1 | 2642 | # from JumpScale.core.System import System
from JumpScale import j
import urllib
class TemplateEngine(object):
def __init__(self):
self.replaceDict = {}##dict(string,string)
#System ##System
def add(self, search, replace,variants=False):
if not j.basetype.string.check(search):
... | bsd-2-clause | -7,447,887,505,872,092,000 | 37.289855 | 129 | 0.635125 | false | 4.121685 | false | false | false |
ljean/djaloha | djaloha/widgets.py | 1 | 3739 | # -*- coding: utf-8 -*-
"""widgets to be used in a form"""
from bs4 import BeautifulSoup
from django.forms import Media
from floppyforms.widgets import TextInput
from djaloha import settings
class AlohaInput(TextInput):
"""
Text widget with aloha html editor
requires floppyforms to be installed
""... | bsd-3-clause | -2,580,920,205,617,877,500 | 32.088496 | 116 | 0.581439 | false | 3.890739 | false | false | false |
bswartz/cinder | cinder/tests/unit/test_rpc.py | 1 | 4298 | # Copyright 2015 Intel Corp.
#
# 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 agr... | apache-2.0 | -1,170,877,304,757,852,000 | 41.554455 | 79 | 0.647278 | false | 3.737391 | true | false | false |
hkaushalya/IntroDataScienceCoursera | Ass1_TwitterSentimentAnalysis/rawcode/happiest_state.py | 1 | 4500 | import sys
import json
#try: import simplejson as json
#except ImportError: import json
DEBUG = True
STATES = {
'AK': 'Alaska',
'AL': 'Alabama',
'AR': 'Arkansas',
'AS': 'American Samoa',
'AZ': 'Arizona',
'CA': 'California',
'CO': 'Colorado',
'CT': 'Conne... | apache-2.0 | -7,029,859,394,640,567,000 | 25.946108 | 96 | 0.473556 | false | 3.345725 | false | false | false |
philanthropy-u/edx-platform | common/djangoapps/philu_commands/management/commands/fetch_course_structures.py | 1 | 1681 | """
Django management command to fetch course structures for given course ids
"""
import json
from logging import getLogger
from django.core.management.base import BaseCommand
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from philu_commands.helpers import generate_course_structur... | agpl-3.0 | 5,931,398,817,853,859,000 | 31.326923 | 115 | 0.64069 | false | 4.555556 | false | false | false |
invitecomm/asterisk-ivr | pigeonhole/agi_record.py | 1 | 1378 | #!/usr/bin/python
"""
Example to get and set variables via AGI.
You can call directly this script with AGI() in Asterisk dialplan.
"""
from asterisk.agi import *
agi = AGI()
agi.answer()
agi.verbose("python agi started")
# record file <filename> <format> <escape_digits> <timeout> [<offset samples>] [<BEEP>] [<s=si... | gpl-3.0 | 6,374,965,588,502,300,000 | 24.054545 | 101 | 0.669086 | false | 2.750499 | false | false | false |
jschaf/ibolcdb | ibolc/person/models.py | 2 | 1593 | from ibolc.database import (
Column,
db,
Email,
Model,
PhoneNumber,
ReferenceCol,
relationship,
SSN,
SurrogatePK,
Zipcode
)
# pylint: disable=too-few-public-methods
class State(Model, SurrogatePK):
__tablename__ = 'state'
code = Column(db.String(2), nullable=False)
... | bsd-3-clause | 8,387,545,558,255,241,000 | 25.55 | 60 | 0.633396 | false | 3.604072 | false | false | false |
nrgaway/qubes-tools | builder-tools/libs/dialog.py | 1 | 150374 | # dialog.py --- A Python interface to the ncurses-based "dialog" utility
# -*- coding: utf-8 -*-
#
# Copyright (C) 2002, 2003, 2004, 2009, 2010, 2013 Florent Rougon
# Copyright (C) 2004 Peter Åstrand
# Copyright (C) 2000 Robb Shecter, Sultanbek Tezadov
#
# This library is free software; you can redistribute it and/o... | gpl-2.0 | 3,278,259,654,904,537,000 | 40.017458 | 161 | 0.603412 | false | 4.448553 | false | false | false |
ShashaQin/erpnext | erpnext/projects/doctype/time_log/time_log.py | 1 | 11405 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from datetime import datetime,timedelta
from frappe.utils import cstr, flt, get_datetime, get_time, getdate, cint ,ge... | agpl-3.0 | 5,370,010,735,895,954,000 | 34.752351 | 115 | 0.694257 | false | 3.05273 | false | false | false |
ekcs/congress | congress/datalog/builtin/congressbuiltin.py | 1 | 13313 | #! /usr/bin/python
#
# Copyright (c) 2014 IBM, Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | -8,263,622,788,772,332,000 | 37.700581 | 79 | 0.577631 | false | 3.663456 | true | false | false |
openwebcc/ba | www/lib/Laser/Util/las.py | 1 | 20558 | #!/usr/bin/python
#
# utility library
#
# lasinfo: parser library that parses LASFILE.info.txt files
# created by: lasinfo -i LASFILE -o ../meta/LASFILE.info.txt -compute_density -repair
# rawdata: helpers to clean up ASCII rawdata
#
import os
import re
import simplejson
from gps import gps_week_from_doy
cl... | gpl-3.0 | 7,783,275,557,073,702,000 | 42.371308 | 149 | 0.527532 | false | 4.163224 | false | false | false |
blakfeld/Bash-To-Python | bash_to_python/cat.py | 1 | 2231 | """
cat.py -- Emulate UNIX cat.
Author: Corwin Brown
E-Mail: blakfeld@gmail.com
Date: 5/25/2015
"""
import os
import sys
class Cat(object):
def __init__(self, fname=None, stdin=None):
"""
Constructor
Args:
fname (str): File to print to screen
stdin (str): Input ... | mit | 6,770,552,773,676,666,000 | 21.31 | 79 | 0.494845 | false | 4.233397 | false | false | false |
tochikuji/chainer-libDNN | libdnn/visualizer.py | 1 | 4553 | # coding: utf-8
import chainer
import numpy
import matplotlib
import matplotlib.pyplot as plt
import cv2
class Visualizer(object):
def __init__(self, network):
self.nnbase = network
self.model = network.model
plt.subplots_adjust(hspace=0.5)
def __convert_filters(self, layer, shape=(... | mit | -5,844,995,503,812,205,000 | 32.477941 | 106 | 0.520316 | false | 3.491564 | false | false | false |
harankumar/MultiDimensionalHeuristics | src/pathfinder.py | 1 | 5368 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from Queue import PriorityQueue
from scipy.spatial.distance import *
from grid import Grid
def find_path(grid, start_c... | mpl-2.0 | 5,993,779,184,779,561,000 | 36.02069 | 85 | 0.560358 | false | 4.148377 | false | false | false |
pitunti/alfaPitunti | plugin.video.alfa/core/channeltools.py | 1 | 12463 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# channeltools - Herramientas para trabajar con canales
# ------------------------------------------------------------
import os
import jsontools
from platformcode import config, logger
DEFAULT_UPDATE_URL = "/channels/"
dict_chann... | gpl-3.0 | -5,649,340,184,223,636,000 | 44.137681 | 120 | 0.586531 | false | 4.213054 | true | false | false |
CERT-BDF/Cortex-Analyzers | analyzers/OTXQuery/otxquery.py | 1 | 9023 | #!/usr/bin/env python
# encoding: utf-8
import json
import requests
import urllib
import hashlib
import io
from cortexutils.analyzer import Analyzer
class OTXQueryAnalyzer(Analyzer):
def __init__(self):
Analyzer.__init__(self)
self.otx_key = self.get_param('config.key', None, 'Missing OTX ... | agpl-3.0 | 4,062,654,437,126,525,400 | 43.668317 | 118 | 0.458495 | false | 4.022737 | false | false | false |
Katello/katello-cli | src/katello/client/api/custom_info.py | 1 | 1815 | # -*- coding: utf-8 -*-
#
# Copyright 2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should hav... | gpl-2.0 | 2,375,057,709,698,116,000 | 43.268293 | 90 | 0.677135 | false | 3.282098 | false | false | false |
SDSG-Invenio/invenio | invenio/ext/logging/backends/legacy.py | 17 | 1757 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 | 458,113,086,534,045,800 | 33.45098 | 79 | 0.654525 | false | 4.505128 | false | false | false |
ctb/pygr | tests/sqlsequence_test.py | 1 | 3025 | # test will be skipped if MySqlDB is unavailable
import unittest, string
from testlib import testutil, SkipTest, PygrTestProgram
from pygr import sqlgraph, seqdb, classutil, logger
class SQLSequence_Test(unittest.TestCase):
'''Basic SQL sequence class tests
This test setup uses the common (?) method of h... | bsd-3-clause | -8,949,302,890,382,394,000 | 32.611111 | 99 | 0.618182 | false | 3.938802 | true | false | false |
Anderson-Lab/anderson-lab.github.io | csc_466_2021_spring/MLCode/Ch6/kernelpca.py | 3 | 2005 |
# Code from Chapter 6 of Machine Learning: An Algorithmic Perspective (2nd Edition)
# by Stephen Marsland (http://stephenmonika.net)
# You are free to use, change, or redistribute the code in any way you wish for
# non-commercial purposes, but please maintain the name of the original author.
# This code comes with no... | mit | -4,231,561,555,081,488,000 | 31.33871 | 110 | 0.601496 | false | 2.848011 | false | false | false |
procamora/Wiki-Personal | make_entrymd.py | 1 | 1396 | #!/usr/bin/env python3
import sys
from datetime import datetime
TEMPLATE = """
---
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified: {year}-{month}-{day} {hour}:{minute:02d}
Category:
Tags:
Authors: procamora
Slug: {slug}
Summary:
Status: draft
---
"""
def make_entrymdAntiguo(title):
today ... | gpl-3.0 | -4,138,845,697,370,725,400 | 23.491228 | 84 | 0.59957 | false | 2.797595 | false | false | false |
icelinker/pylsge | pylsge/rot3z.py | 1 | 2515 | #tested beta
#function [U] = rot3z(a)
#% --------------------------------------------------------------------------
#% ROT3Z.M Form rotation matrix U to rotate the vector a to a point along
#% the positive z-axis.
#%
#% Version 1.0
#% Last amended I M Smith 2 May 2002.
#% Created I M Smit... | lgpl-3.0 | -6,474,368,271,176,664,000 | 25.765957 | 78 | 0.405964 | false | 2.695606 | false | false | false |
OCA/reporting-engine | report_label/wizards/report_label_wizard.py | 1 | 3190 | from odoo import api, models, fields
class ReportLabelWizard(models.TransientModel):
_name = "report.label.wizard"
_description = "Report Label Wizard"
@api.model
def _default_line_ids(self):
""" Compute line_ids based on context """
active_model = self.env.context.get("active_model")... | agpl-3.0 | 6,794,300,847,196,247,000 | 29.970874 | 77 | 0.562696 | false | 3.761792 | false | false | false |
galtys/galtys-addons | simple_barcoding/simple_barcoding.py | 1 | 2337 | from datetime import datetime, timedelta
import time
from openerp import pooler, tools
from openerp.osv import fields, osv
from openerp.tools.translate import _
import math
import base64
from openerp import netsvc
import openerp.addons.decimal_precision as dp
def print_barcode(code):
import barcodes
from barco... | agpl-3.0 | -8,593,698,705,259,154,000 | 28.2125 | 64 | 0.645272 | false | 3.406706 | false | false | false |
idrogeno/enigma2 | lib/python/Screens/Satconfig.py | 1 | 44050 | from enigma import eDVBDB, eDVBResourceManager
from Screens.Screen import Screen
from Components.SystemInfo import SystemInfo
from Components.ActionMap import ActionMap
from Components.ConfigList import ConfigListScreen
from Components.NimManager import nimmanager
from Components.Button import Button
from Components.La... | gpl-2.0 | 3,012,844,069,604,993,500 | 45.466245 | 234 | 0.711283 | false | 3.113514 | true | false | false |
sti-lyneos/shop | softwarecenter/ui/gtk3/panes/historypane.py | 2 | 14758 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Canonical
#
# Authors:
# Olivier Tilloy
#
# 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; version 3.
#
# This program is distributed in the hope t... | lgpl-3.0 | 67,786,787,943,351,736 | 37.633508 | 79 | 0.578127 | false | 3.820347 | false | false | false |
f2nd/yandex-tank | yandextank/stepper/config.py | 4 | 5340 | import logging
from netort.resource import manager as resource
from . import info
from . import instance_plan as ip
from . import load_plan as lp
from . import missile
from .mark import get_marker
from .module_exceptions import StepperConfigurationError, AmmoFileError
class ComponentFactory():
def __init__(
... | lgpl-2.1 | 9,019,727,846,882,107,000 | 37.978102 | 136 | 0.540262 | false | 4.191523 | false | false | false |
ddaeschler/pyrax | samples/queueing/list_messages.py | 13 | 2283 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c)2013 Rackspace US, 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.ap... | apache-2.0 | 669,154,186,075,380,400 | 29.851351 | 81 | 0.655716 | false | 3.501534 | false | false | false |
kenshay/ImageScripter | ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_console.py | 6 | 2034 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import StringIO
from telemetry.internal.backends.chrome_inspector import websocket
class InspectorConsole(object):
def __init__(self, inspector_websocket... | gpl-3.0 | -497,377,246,031,039,600 | 36.666667 | 80 | 0.682891 | false | 4.168033 | false | false | false |
s20121035/rk3288_android5.1_repo | external/lldb/test/python_api/function_symbol/TestDisasmAPI.py | 2 | 5025 | """
Test retrieval of SBAddress from function/symbol, disassembly, and SBAddress APIs.
"""
import os, time
import re
import unittest2
import lldb, lldbutil
from lldbtest import *
class DisasmAPITestCase(TestBase):
mydir = os.path.join("python_api", "function_symbol")
@unittest2.skipUnless(sys.platform.start... | gpl-3.0 | -6,948,422,901,882,527,000 | 38.566929 | 105 | 0.639403 | false | 3.956693 | true | false | false |
ericholscher/fabric | tests/test_network.py | 1 | 12649 | from __future__ import with_statement
from datetime import datetime
import copy
import getpass
import sys
import paramiko
from nose.tools import with_setup
from fudge import (Fake, clear_calls, clear_expectations, patch_object, verify,
with_patched_object, patched_context, with_fakes)
from fabric.context_manager... | bsd-2-clause | -4,260,805,784,873,929,700 | 34.136111 | 79 | 0.59064 | false | 4.110822 | true | false | false |
laetrid/learning | First_course/ex3_1.py | 1 | 1676 | #!/usr/bin/env python
'''
Learning Python
Class#3
I. Create an IP address converter (dotted decimal to binary). This will be
similar to what we did in class2 except:
A. Make the IP address a command-line argument instead of prompting the user
for it.
./binary_converter.py 10.88.17.23
B. Simplify ... | apache-2.0 | -7,259,612,408,708,792,000 | 28.403509 | 95 | 0.656921 | false | 3.365462 | false | false | false |
davzhang/helix-python-binding | org/apache/helix/model/Message.py | 1 | 16701 | # package org.apache.helix.model
#from org.apache.helix.model import *
#from java.util import ArrayList
#from java.util import Collections
#from java.util import Comparator
#from java.util import Date
#from java.util import List
#from java.util import Map
#from java.util import UUID
from org.apache.helix.HelixException... | apache-2.0 | 1,717,234,319,124,727,300 | 20.549677 | 341 | 0.573618 | false | 4.282308 | false | false | false |
clayshieh/cal_hacks_2015 | maps/views.py | 1 | 2868 | from django.shortcuts import render
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
# from userauth.forms import UserForm, UserProfileForm, ForgotForm
from maps.models import Report, Route
from django.contrib.auth import authenticate, login, logout
from django.con... | gpl-2.0 | 2,449,341,097,109,716,000 | 26.056604 | 128 | 0.668759 | false | 2.806262 | false | false | false |
MindPass/Code | Interface_graphique/mindmap/svgwrite-1.1.6/examples/linearGradient.py | 2 | 2959 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: svg examples
# Created: 08.09.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
try:
import svgwrite
except ImportError:
# if svgwrite is not 'installed' append parent dir of __file__ to sys.path
import sys, os
sys.path.ins... | gpl-3.0 | 8,424,221,764,480,674,000 | 35.9875 | 106 | 0.680297 | false | 3.168094 | false | false | false |
nirzari18/Query-Analysis-Application-on-Google-App-Engine | main.py | 1 | 5291 | #NAME: NIRZARI IYER
#Assignment-2
#ID NUMBER: 1001117633
#BATCH TIME- 6:00 to 8:00 p.m.
import MySQLdb
import io
import os
import cloudstorage as gcs
import csv
import timeit
from bottle import Bottle
from google.appengine.api import app_identity
from StringIO import StringIO
from bottle import route, request, response... | apache-2.0 | 6,828,932,704,761,010,000 | 34.993197 | 137 | 0.585334 | false | 3.272109 | false | false | false |
rsepassi/tensor2tensor | tensor2tensor/bin/t2t_decoder.py | 1 | 3766 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 1,882,406,023,209,351,400 | 30.915254 | 77 | 0.692512 | false | 3.645692 | false | false | false |
gborri/SickRage | sickrage/providers/torrent/filelist.py | 1 | 6225 | # coding=utf-8
#
# URL: https://sickrage.ca
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later vers... | gpl-3.0 | -1,395,110,156,816,859,100 | 34.375 | 125 | 0.540723 | false | 4.386892 | false | false | false |
mesuutt/snipper | setup.py | 1 | 1413 | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='snipper',
version=__import__('snipper').__version__,
url='https://github.com/mesuutt/snipper',
author='Mesut Tasci',
author_email='mst.tasci@gmail.com',
... | mit | 3,697,633,336,880,219,000 | 29.717391 | 70 | 0.576079 | false | 3.892562 | false | false | false |
kbrebanov/ansible | lib/ansible/plugins/filter/cast_type.py | 3 | 2207 | # Author Ken Celenza <ken@networktocode.com>
# Author Jason Edelman <jason@networktocode.com>
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors import AnsibleError, AnsibleFilterError
def cast_list_to_dict(data, key):
new_o... | gpl-3.0 | 6,155,710,773,830,494,000 | 34.031746 | 120 | 0.617127 | false | 3.588618 | false | false | false |
MahjongRepository/mahjong | mahjong/hand_calculating/yaku_config.py | 1 | 4030 | # -*- coding: utf-8 -*-
from itertools import count
from mahjong.hand_calculating.yaku_list import (
AkaDora,
Chankan,
Chantai,
Chiitoitsu,
Chinitsu,
Chun,
DaburuOpenRiichi,
DaburuRiichi,
Dora,
Haitei,
Haku,
Hatsu,
Honitsu,
Honroto,
Houtei,
Iipeiko,
I... | mit | 7,555,421,368,102,794,000 | 25.688742 | 66 | 0.604963 | false | 2.5 | false | false | false |
alphagov/notifications-api | tests/app/service/test_service_data_retention_rest.py | 1 | 6703 | import json
import uuid
from app.models import ServiceDataRetention
from tests import create_authorization_header
from tests.app.db import create_service_data_retention
def test_get_service_data_retention(client, sample_service):
sms_data_retention = create_service_data_retention(service=sample_service)
emai... | mit | 7,344,810,703,973,433,000 | 40.63354 | 110 | 0.659257 | false | 3.861175 | true | false | false |
AndyDeany/pygame-template | pygametemplate/_game.py | 1 | 6185 | import os
from contextlib import suppress
import time
from importlib import import_module
import pygame
with suppress(ImportError):
import pygame._view # sometimes necessary. If it isn't this will cause an error
#! UPDATE: this might only be necessary for py2exe to work, so if you can
# compile without... | mit | -5,954,415,052,953,735,000 | 32.074866 | 89 | 0.596766 | false | 4.029316 | false | false | false |
tedunderwood/20cgenres | organizetags.py | 1 | 5190 | #!/usr/bin/env python3
# Based on gathertags, this goes further by identifying owners and
# sorting files by genre.
import csv, os, sys
from collections import Counter
import numpy as np
import pandas as pd
# import utils
currentdir = os.path.dirname(__file__)
libpath = os.path.join(currentdir, '../lib')
sys.path.ap... | mit | -4,027,922,656,061,283,000 | 27.833333 | 119 | 0.566281 | false | 3.497305 | false | false | false |
hovel/django-s3direct | s3direct/widgets.py | 1 | 2392 | # coding=utf-8
from __future__ import unicode_literals
import os
from django.forms import widgets
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from django.conf import settings
HTML = (
'<div class="s3direct" data-url="{policy_url}">'
' <div class="link-controls">... | mit | -8,850,921,872,194,016,000 | 33.463768 | 136 | 0.545837 | false | 3.431457 | false | false | false |
StevenTouzard/pyHFSS | test_hfss.py | 2 | 1131 | from hfss import get_active_project
project = get_active_project()
design = project.new_em_design("TestDesign")
modeler = design.modeler
# Cavity
bx = design.set_variable("bx", "10mm")
by = design.set_variable("by", "25mm")
bz = design.set_variable("bz", "15mm")
# Tunnel
tx = design.set_variable("tx", "10mm")
ty = de... | mit | -258,912,402,121,123,200 | 29.567568 | 101 | 0.645447 | false | 2.381053 | false | false | false |
zrafa/mipsx | mipsx.py | 1 | 12389 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Autor original del ejemplo de una aplicacion Tk: Jan Bodnar
last modified: December 2010 website: www.zetcode.com
Modificado y ampliado para ser una GUI de GDB para MIPS.
(C) 2014 - Rafael Ignacio Zurita <rafa@fi.uncoma.edu.ar>
Lea el archivo README.md para conocer la ... | gpl-2.0 | 2,601,857,939,086,007,000 | 27.946262 | 458 | 0.648398 | false | 2.621456 | false | false | false |
jirenz/CS229_Project | learning/model.py | 1 | 7449 | import numpy as np
from sklearn import linear_model
from sknn.mlp import Regressor, Layer
import learning.mdp
from projectfiles.random_deck_generator import RandomDeckGenerator
from hearthbreaker.engine import Deck, card_lookup, Game
from hearthbreaker.agents import *
import projectfiles.util
from projectfiles.featur... | mit | -6,037,777,014,030,121,000 | 31.528384 | 100 | 0.696872 | false | 3.088308 | false | false | false |
muniri92/portfolio-remastered | portfolio/portfolio_app/migrations/0001_initial.py | 1 | 1917 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-12 02:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='About',... | mit | -9,137,160,564,085,212,000 | 35.865385 | 114 | 0.53782 | false | 4.406897 | false | false | false |
ShareDVI/adventofcode | day10.py | 1 | 1039 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""Day 10 of AdventOfCode.com: What's common in between digits and nuclear decay?"""
import os
# ToDo: rewrite this one with groupby, and\or ConwayMendeleevTable, and\or multithreading
def look_and_say(numbers):
"""
Performs a look'n'say iteration. Repeated digits ar... | mit | -1,406,064,836,263,220,500 | 28.685714 | 106 | 0.592878 | false | 3.486577 | false | false | false |
zhangfangyan/devide | module_kits/matplotlib_kit/__init__.py | 7 | 2895 | # $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $
# importing this module shouldn't directly cause other large imports
# do large imports in the init() hook so that you can call back to the
# ModuleManager progress handler methods.
"""matplotlib_kit package driver file.
Inserts the following modules in sys.modu... | bsd-3-clause | -4,838,247,926,058,217,000 | 34.304878 | 81 | 0.691192 | false | 3.912162 | false | false | false |
mlvander/montasola | imageManager/migrations/0001_initial.py | 1 | 1758 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-17 02:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | mit | 7,176,416,791,405,718,000 | 34.16 | 124 | 0.552901 | false | 4.530928 | false | false | false |
mc2014/anvil | anvil/origins.py | 1 | 1234 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 Yahoo! 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
#
# ... | apache-2.0 | -1,253,710,296,261,885,700 | 29.85 | 78 | 0.683144 | false | 3.868339 | false | false | false |
jeffmahoney/crash-python | crash/infra/lookup.py | 1 | 12098 | # -*- coding: utf-8 -*-
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
from typing import Tuple, Any, Union, Optional
from crash.infra.callback import ObjfileEventCallback
from crash.infra.callback import Callback
from crash.exceptions import DelayedAttributeError
import gdb
class NamedCallback(Objfil... | gpl-2.0 | 6,585,040,455,276,762,000 | 31.769648 | 86 | 0.598495 | false | 4.271282 | false | false | false |
nickjstevens/eCIP | eCIP/settings.py | 1 | 3869 | """
Django settings for eCIP project.
Generated by 'django-admin startproject' using Django 1.10.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
#... | mit | 2,021,033,068,940,957,000 | 25.875 | 91 | 0.689842 | false | 3.439111 | false | false | false |
rupumped/Gen2-UHF-RFID-Reader | gr-rfid/apps/reader.py | 1 | 5065 | #Developed by: Nikos Kargas
from gnuradio import gr
from gnuradio import uhd
from gnuradio import blocks
from gnuradio import filter
from gnuradio import analog
from gnuradio import digital
from gnuradio import qtgui
import rfid
DEBUG = False
class reader_top_block(gr.top_block):
# Configure usrp source
def u_... | gpl-3.0 | 5,839,815,719,848,992,000 | 37.371212 | 152 | 0.643633 | false | 3.138166 | false | false | false |
eneldoserrata/marcos_openerp | oemedical/hms_lite/medical_inpatient/medical_inpatient.py | 1 | 4138 | import time
# from mx import datetime
import datetime
from openerp.osv import fields, osv
from openerp.tools.translate import _
import sys
class inpatient_registration (osv.osv):
# Method to check for availability and make the hospital bed reservation
def registration_confirm(self, cr, uid, ids, context={}):
... | agpl-3.0 | 4,914,711,355,959,508,000 | 33.198347 | 302 | 0.697438 | false | 3.278922 | false | false | false |
rbwinslow/hq | hq/hquery/functions/core_node_set.py | 1 | 1395 | from hq.hquery.evaluation_error import HqueryEvaluationError
from hq.hquery.expression_context import peek_context, get_context_node
from hq.hquery.functions.core_number import number
from hq.hquery.object_type import string_value, is_sequence, object_type_name
from hq.hquery.sequences import make_node_set
from hq.soup... | mit | -1,951,695,412,253,512,700 | 26.9 | 77 | 0.636559 | false | 3.419118 | false | false | false |
sernst/cauldron | cauldron/runner/__init__.py | 1 | 7585 | import glob
import importlib
import os
import sys
import typing
import cauldron
from cauldron import environ
from cauldron.environ import Response
from cauldron.runner import source
from cauldron.session.projects import Project
from cauldron.session.projects import ProjectStep
def add_library_path(path: str) -> bool... | mit | -1,016,467,438,664,873,500 | 26.18638 | 84 | 0.628345 | false | 4.251682 | false | false | false |
elimence/edx-platform | lms/djangoapps/courseware/features/video.py | 1 | 1147 | #pylint: disable=C0111
from lettuce import world, step
from lettuce.django import django_url
from common import TEST_COURSE_NAME, TEST_SECTION_NAME, i_am_registered_for_the_course, section_location
############### ACTIONS ####################
@step('when I view the video it has autoplay enabled')
def does_autoplay(... | agpl-3.0 | -8,000,588,326,078,077,000 | 32.735294 | 104 | 0.644289 | false | 3.584375 | true | false | false |
atealxt/web-crawler | src/com/zhyfoundry/spider/impl/s2/Spider2.py | 1 | 3477 | from com.zhyfoundry.spider import Configuration
from com.zhyfoundry.spider.impl import BaseSpider
from com.zhyfoundry.spider.impl.CRM import CRM
from com.zhyfoundry.spider.impl.s2 import Fetcher2, Parser2, Tracker2
import time
import traceback
class Spider2(BaseSpider.BaseSpider):
def __init__(self):
supe... | gpl-2.0 | 7,434,002,309,375,221,000 | 44.155844 | 124 | 0.542134 | false | 4.515584 | true | false | false |
kobe25/gasistafelice | gasistafelice/gf/base/models.py | 3 | 48753 | """
This is the base model for Gasista Felice.
It includes common data on which all (or almost all) other applications rely on.
"""
from django.db import models
from django.utils.translation import ugettext, ugettext_lazy as _
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyCon... | agpl-3.0 | 8,131,172,791,004,369,000 | 35.355705 | 190 | 0.618936 | false | 4.167992 | false | false | false |
bert9bert/statsmodels | statsmodels/sandbox/mcevaluate/arma.py | 34 | 4556 |
import numpy as np
from statsmodels.tsa.arima_process import arma_generate_sample
from statsmodels.tsa.arma_mle import Arma
#TODO: still refactoring problem with cov_x
#copied from sandbox.tsa.arima.py
def mcarma22(niter=10, nsample=1000, ar=None, ma=None, sig=0.5):
'''run Monte Carlo for ARMA(2,2)
DGP para... | bsd-3-clause | 8,047,128,683,676,541,000 | 29.993197 | 78 | 0.561238 | false | 2.518519 | false | false | false |
AnhellO/DAS_Sistemas | Ene-Jun-2021/aguilar-cedillo-jonathan-ivan/primerparcial/ejercicio4/ejercicio4.py | 1 | 2219 | from abc import ABCMeta, abstractclassmethod
class Cajero(metaclass=ABCMeta):
#Interfaz
@abstractclassmethod
def next_succesor(succesor):
pass
@abstractclassmethod
def handle(cantidad):
pass
class Cajero50(Cajero):
def __init__(self):
self._succesor = None
def nex... | mit | -3,379,360,154,780,902,000 | 26.395062 | 56 | 0.572781 | false | 3.248902 | false | false | false |
topic2k/EventGhost | plugins/CyberlinkUniversalRemote/__init__.py | 1 | 4075 | # -*- coding: utf-8 -*-
#
# This file is a plugin for EventGhost.
# Copyright © 2005-2019 EventGhost Project <http://www.eventghost.org/>
#
# EventGhost 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-2.0 | 6,561,192,143,097,264,000 | 29.402985 | 77 | 0.515709 | false | 2.756428 | false | false | false |
abilian/abilian-core | src/abilian/web/tags/admin.py | 1 | 9205 | """Admin panel for tags."""
import logging
from typing import Callable, List
import sqlalchemy as sa
import sqlalchemy.orm
from flask import current_app, flash, redirect, render_template, request
from sqlalchemy.sql import functions as func
from abilian.core.entities import Entity
from abilian.core.extensions import ... | lgpl-2.1 | -2,298,058,158,841,750,800 | 29.889262 | 88 | 0.567518 | false | 3.676118 | false | false | false |
DigitalCampus/django-swaziland-oppia | oppia/migrations/0012_auto__add_field_media_filesize__add_field_media_media_length.py | 1 | 18168 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Media.filesize'
db.add_column(u'oppia_media', 'filesize',... | gpl-3.0 | 6,404,917,616,971,633,000 | 72.558704 | 195 | 0.545465 | false | 3.639423 | false | false | false |
tiagocardosos/stoq | plugins/optical/opticalui.py | 2 | 14886 | # -*- Mode: Python; coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2013 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Sof... | gpl-2.0 | 6,566,709,317,868,000,000 | 38.693333 | 87 | 0.623043 | false | 3.95142 | false | false | false |
BechtelCIRT/cassava | cassava/Automater/outputs.py | 2 | 33878 | """
The outputs.py module represents some form of all outputs
from the Automater program to include all variation of
output files. Any addition to the Automater that brings
any other output requirement should be programmed in this module.
Class(es):
SiteDetailOutput -- Wrapper class around all functions that pass #NOM... | mit | 8,456,188,284,988,222,000 | 51.039939 | 219 | 0.443857 | false | 5.006354 | false | false | false |
Natalia-28028/kpk2016 | Cath_the_ball/ball_1.py | 2 | 1945 | from tkinter import *
from random import *
root = Tk()
canvas = Canvas(root)
canvas.pack()
def create_scores_text():
global scores_text
scores_text = canvas.create_text(60, 12,
text="Scores: " + str(scores),
font="Sans 18")
def chang... | gpl-3.0 | 5,534,573,525,987,266,000 | 22.060241 | 71 | 0.572399 | false | 2.91172 | false | false | false |
mes3hacklab/sajuke | handlers/dao.py | 1 | 4078 | import sqlalchemy
from sqlalchemy import Table, MetaData, Column, Integer, Text, ForeignKey
from dbconnection import dbconnection
authors = Table('authors', MetaData(),
Column('id', Integer, primary_key=True),
Column('name', Text))
albums = Table('albums', MetaData(),
C... | mit | -7,827,855,297,687,735,000 | 30.129771 | 83 | 0.529181 | false | 3.761993 | false | false | false |
pyladieshre/pyladies | harare/settings.py | 1 | 4469 | """
Django settings for harare project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
... | mit | -8,864,186,225,389,897,000 | 26.757764 | 91 | 0.692996 | false | 3.325149 | false | false | false |
romanofski/superorganism | src/superorganism/gui/keys.py | 1 | 1061 | import zope.interface
import zope.event
import superorganism.gui.interfaces
import urwid
class CharKeyPressed(object):
zope.interface.implements(superorganism.gui.interfaces.ICharKeyPressEvent)
def __init__(self, screen, key):
self.screen = screen
self.key = key
class FunctionKeyPressed(Ch... | gpl-3.0 | 2,086,409,582,921,099,800 | 26.205128 | 82 | 0.6541 | false | 3.762411 | false | false | false |
silps/solesite | solesite/settings.py | 1 | 5012 | # Django settings for SOLE project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
import os
settings_dir = os.path.dirname(__file__)
PROJECT_ROOT = os.path.abspath(os.path.dirname(settings_dir))
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'dja... | bsd-3-clause | -5,469,266,478,667,101,000 | 26.23913 | 89 | 0.662809 | false | 3.372813 | false | false | false |
pw31/GGchem | tools/Plot_fast.py | 1 | 3437 | import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import MultipleLocator, FormatStrFormatter, ScalarFormatter, LogLocator
from matplotlib.backends.backend_pdf import PdfPages
plt.rcParams['axes.linewidth'] = 1.5
pp = PdfPages('ggchem.pdf')
file = 'Static_fast.dat'
data = open(file)
dummy ... | gpl-3.0 | -5,654,245,361,752,050,000 | 31.733333 | 150 | 0.643875 | false | 2.467337 | false | false | false |
schleichdi2/OPENNFR-6.1-CORE | opennfr-openembedded-core/meta/lib/oeqa/utils/metadata.py | 1 | 3931 | # Copyright (C) 2016 Intel Corporation
#
# Released under the MIT license (see COPYING.MIT)
#
# Functions to get metadata from the testing host used
# for analytics of test results.
from collections import OrderedDict
from collections.abc import MutableMapping
from xml.dom.minidom import parseString
from xml.etree.Ele... | gpl-2.0 | -6,370,462,564,864,132,000 | 32.313559 | 103 | 0.624269 | false | 3.779808 | false | false | false |
expressly/expressly-plugin-sdk-python3-core | expressly/tests/api/test_banner.py | 1 | 1224 | from unittest import TestCase
from httpretty import activate, register_uri, GET
from schematics.validate import validate
from expressly import Api
from expressly.api_responses import BannerResponse
from expressly.tests import dummy_api_key, api_dev_url, dummy_campaign_uuid
class BannerTest(TestCase):
def setUp(... | mit | -976,098,644,903,744,400 | 35 | 108 | 0.651961 | false | 3.578947 | true | false | false |
SpotlightKid/mididings | mididings/live/widgets.py | 2 | 3258 | # -*- coding: utf-8 -*-
#
# mididings
#
# Copyright (C) 2008-2014 Dominic Sacré <dominic.sacre@gmx.de>
#
# 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
# (... | gpl-2.0 | -8,183,129,618,553,754,000 | 26.837607 | 70 | 0.595333 | false | 3.971951 | true | false | false |
Skytim/nccuTEG | pybossa/api/task_run.py | 4 | 2652 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2014 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | agpl-3.0 | -6,216,720,680,259,834,000 | 35.833333 | 77 | 0.682881 | false | 3.642857 | false | false | false |
ovnicraft/odoo_addons | smile_decimal_precision/models/decimal_precision.py | 5 | 2306 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 | 3,048,453,814,624,087,000 | 36.803279 | 96 | 0.629662 | false | 4.177536 | false | false | false |
lucuma/Clay | clay/server.py | 1 | 4505 | import mimetypes
import socket
from urllib.parse import quote
import gunicorn.app.base
from whitenoise import WhiteNoise
from .request import Request
from .utils import make_active_helper
def _get_local_ip():
ip = socket.gethostbyname(socket.gethostname())
if not ip.startswith("127."):
return ip
... | apache-2.0 | 5,077,850,476,091,318,000 | 28.294521 | 82 | 0.535656 | false | 3.643101 | false | false | false |
remram44/gitobox | gitobox/watch.py | 1 | 2264 | """Directory-watching logic.
Contains :class:`~gitobox.watch.DirectoryWatcher`, the class that monitors the
directory for changes. Uses `pyinotify`, so it's only available on Linux.
"""
from __future__ import unicode_literals
import logging
from watchdog.observers import Observer
from watchdog.events import FileSyst... | bsd-3-clause | -7,034,034,042,734,324,000 | 30.887324 | 78 | 0.626325 | false | 3.856899 | false | false | false |
zo7/ios-s3-dist | ios-s3-dist.py | 1 | 3680 | '''
ios-s3-dist.py
Python 3 Script to assist in distributing ad-hoc and enterprise iOS builds.
Uploads build to S3 and creates a manifest.plist file to install it with.
Required information should be profiled in a 'config.json' file.
Usage:
ios-dist.py {filename or path to build}
'''
... | mit | 9,146,017,136,505,671,000 | 25.285714 | 79 | 0.597554 | false | 3.4619 | false | false | false |
justanr/objtoolz | objtoolz/metas/memoize.py | 1 | 1696 | '''
objtoolz.metas.memoized
```````````````````````
Metaclass that allows memoization of instances
'''
from toolz import memoize
from ..compat import wraps
__all__ = ('Memoized',)
def _default_cache_key(args, kwargs):
"""By default, toolz.memoize will only cache positional args if no cache
key ... | mit | -205,143,517,975,639,360 | 31.615385 | 79 | 0.628538 | false | 3.845805 | false | false | false |
kizniche/Mycodo | mycodo/functions/examples/custom_function_simple_loop_with_status.py | 1 | 5392 | # coding=utf-8
#
# custom_function_example.py - Custom function example file for importing into Mycodo
#
# Copyright (C) 2015-2020 Kyle T. Gabriel <mycodo@kylegabriel.com>
#
# This file is part of Mycodo
#
# Mycodo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | gpl-3.0 | -7,562,899,649,561,917,000 | 34.708609 | 106 | 0.620549 | false | 4.222396 | false | false | false |
aholkner/bacon | bacon/window.py | 2 | 5950 | from ctypes import *
import sys
import os
import bacon
from bacon.core import lib
from bacon import native
from bacon import graphics
class Window(object):
'''Properties of the game window.
The window is constructed automatically when :func:`run` is called. The :data:`window` singleton
provides access t... | mit | -1,834,301,251,757,115,100 | 36.904459 | 160 | 0.635126 | false | 3.836235 | false | false | false |
GetSomeBlocks/Score_Soccer | resources/src/mythbox/ui/recordingdetails.py | 5 | 15736 | #
# MythBox for XBMC - http://mythbox.googlecode.com
# Copyright (C) 2011 analogue@yahoo.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at you... | mit | 5,722,216,857,312,534,000 | 39.043257 | 157 | 0.596467 | false | 3.983797 | false | false | false |
ashleywaite/django-more | django_cte/django_db_models_query.py | 1 | 2770 | import django
from itertools import chain
from .django_db_models_expressions import CTERef
from django.db.models import sql
class QuerySet:
def attach(self, *querysets):
clone = sql.WithQuery(self.query)
for qs in querysets:
clone.query.add_with(qs.query)
return clone
def... | bsd-3-clause | 2,937,635,270,745,801,700 | 31.209302 | 94 | 0.639711 | false | 4.18429 | false | false | false |
jdonkervliet/crazyflie-for-newbs | Android.py | 1 | 3469 | '''
Created on Nov 5, 2014
@author: jesse
'''
import Queue
import SocketServer
from BaseCommand import BaseCommand
from FlyCommand import FlyCommand
from TerminateCommand import TerminateCommand
from getch import getch
from multiprocessing import Process
import multiprocessing
from threading import Thread
import time
... | mit | 83,067,341,520,781,780 | 26.531746 | 96 | 0.551167 | false | 3.863029 | false | false | false |
mesnardo/snake | snake/solutions/koumoutsakosLeonard1995.py | 2 | 2230 | """
Implementation of the class `KoumoutsakosLeonard1995` that contains the
instantaneous drag coefficients of an impulsively-started 2D cylinder for
Reynolds numbers 40, 550, and 3000.
The drag coefficient data files are located in the folder
`resources/results` of the snake package.
_References:_
* Koumoutsakos, P.... | mit | -4,460,972,278,539,322,400 | 28.342105 | 73 | 0.60852 | false | 3.851468 | false | false | false |
pcapriotti/pledger | pledger/parser.py | 1 | 5762 | import itertools
import re
import codecs
from datetime import datetime, date
from .account import Account, AccountFactory
from .value import Value
from .ledger import Ledger
from .transaction import Transaction, UndefinedTransaction, UnbalancedTransaction
from .directive import Directive, UnsupportedDirective
from .ent... | mit | -3,773,451,124,369,703,400 | 29.326316 | 81 | 0.515793 | false | 3.946575 | false | false | false |
SnabbCo/neutron | neutron/services/provider_configuration.py | 20 | 6052 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | apache-2.0 | 1,647,451,946,463,824,000 | 36.358025 | 78 | 0.559154 | false | 4.479645 | false | false | false |
nakednamor/naked-python | Python Crash Course/chapter 9/e6.py | 1 | 1217 | class Restaurant():
"""Describes a place where you can get somethint to eat and drink"""
def __init__(self, restaurant_name, cuisine_type):
self.name = restaurant_name
self.cuisine = cuisine_type
self.number_served = 0
def describe_restaurant(self):
print('name: ' + self.na... | mit | -880,110,721,172,269,800 | 27.97619 | 72 | 0.602301 | false | 3.622024 | false | false | false |
maxamillion/product-definition-center | pdc/apps/compose/tests.py | 1 | 97007 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
import json
import mock
from StringIO import StringIO
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import Client
from rest_framew... | mit | 1,463,572,128,155,624,400 | 49.842243 | 125 | 0.579505 | false | 3.655262 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.