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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
maciekswat/Twedit | Messaging/__init__.py | 1 | 5405 | ## {{{ http://code.activestate.com/recipes/144838/ (r1)
#messaging.py
#this is a module used for messaging. It allows multiple classes
#to handle various types of messages. It should work on all python
#versions >= 1.5.2
# These are useful slides explaining bacis usage of regex in Notepad++
# http://www.sli... | gpl-3.0 | -8,712,596,599,570,487,000 | 32.870968 | 232 | 0.638483 | false | 3.766551 | false | false | false |
matachi/hydra | blog/models.py | 1 | 1621 | from django.core.urlresolvers import reverse
from django.db import models
from django.db.models.signals import pre_save
from django.dispatch import receiver
from django.template.defaultfilters import slugify, stringformat
import markdown
import re
from bs4 import BeautifulSoup
class Tag(models.Model):
name = mode... | mit | 2,736,807,335,183,461,400 | 32.081633 | 72 | 0.648982 | false | 3.778555 | false | false | false |
erdc/proteus | proteus/tests/HotStart_3P/twp_navier_stokes_p.py | 1 | 7823 | from __future__ import absolute_import
from builtins import object
from proteus import *
from proteus.default_p import *
from .NS_hotstart import *
from proteus.mprans import RANS3PF
LevelModelType = RANS3PF.LevelModel
name="momentum_eqn"
coefficients = RANS3PF.Coefficients(epsFact=epsFact_viscosity,
... | mit | -4,424,440,856,964,118,000 | 33.768889 | 133 | 0.448677 | false | 3.027477 | false | false | false |
davidvossel/pcs | pcs/usage.py | 1 | 51366 | import re
examples = ""
def full_usage():
global examples
out = ""
out += main(False)
out += strip_extras(resource([],False))
out += strip_extras(cluster([],False))
out += strip_extras(stonith([],False))
out += strip_extras(property([],False))
out += strip_extras(constraint([],False))
... | gpl-2.0 | -8,839,699,227,347,467,000 | 42.715745 | 108 | 0.65226 | false | 4.369343 | true | false | false |
anbangr/trusted-nova | nova/notifier/capacity_notifier.py | 5 | 2731 | # Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -4,728,226,966,872,645,000 | 32.716049 | 78 | 0.652142 | false | 3.857345 | false | false | false |
OpenGrow/OpenGrow | app/views/others.py | 1 | 1060 | # -*- coding: utf-8 -*-
# System Imports
from xml.dom.minidom import parseString
# Flask Imports
from flask import render_template, redirect
from flask import url_for, request, send_from_directory, session
from werkzeug import secure_filename
# Local Imports
from app import app
from app.forms import *
# Package Imp... | gpl-3.0 | -1,451,137,897,622,250,800 | 24.853659 | 106 | 0.729245 | false | 3.521595 | false | false | false |
MasterofNumbers17/slight-fimulator | objects.py | 2 | 19346 | #!/usr/bin/env python
"""The package's classes
Slight Fimulator - Flight simulator in Python
Copyright (C) 2017, 2018 Hao Tian and Adrien Hopkins
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, eit... | gpl-3.0 | 8,012,471,856,915,746,000 | 34.5625 | 72 | 0.564148 | false | 3.935313 | false | false | false |
pankajp/pyface | examples/tasks/advanced/i_python_editor.py | 5 | 1868 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | -6,642,441,349,226,259,000 | 31.206897 | 79 | 0.558887 | false | 4.729114 | false | false | false |
watchdogpolska/feder | feder/letters/logs/migrations/0002_auto_20170820_1447.py | 1 | 1032 | # Generated by Django 1.11.4 on 2017-08-20 14:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("logs", "0001_initial")]
operations = [
migrations.AddField(
model_name="emaillog",
name="status",
field=models.CharF... | mit | -8,732,192,234,525,978,000 | 28.485714 | 82 | 0.440891 | false | 4.566372 | false | false | false |
pulsar-chem/Pulsar-Core | test/math/TestMathSet.py | 1 | 4763 | import pulsar as psr
def run_test():
tester=psr.PyTester("Testing MathSet and MathSet Iterator C++ Interface")
U1=psr.DoubleUniverse([1.0,2.0,3.0])
U2, U3=psr.DoubleUniverse([3.0,4.0,5.0]),psr.DoubleUniverse([3.0])
U4=psr.DoubleUniverse([9.0,51.0,100.0])
#Constructors
S1=psr.DoubleSet(... | bsd-3-clause | 4,405,880,014,321,268,000 | 46.63 | 87 | 0.69557 | false | 2.737356 | true | false | false |
Yukarumya/Yukarum-Redfoxes | ipc/ipdl/test/cxx/genIPDLUnitTests.py | 1 | 4210 | # 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/.
import string, sys
def usage():
print >>sys.stderr, """
%s template_file -t unit_tests... -e extra_protocols...
... | mpl-2.0 | -1,677,121,679,776,948,700 | 28.858156 | 81 | 0.547268 | false | 3.459326 | true | false | false |
kartoza/geonode | geonode/catalogue/backends/pycsw_local.py | 3 | 6624 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... | gpl-3.0 | 5,982,822,532,873,200,000 | 36.213483 | 112 | 0.578653 | false | 4.119403 | true | false | false |
BoGoEngine/bogo-win | interfaces/gen/_6A160507_C2CC_4C37_A435_B4D645642BDD_0_0_0.py | 1 | 15081 | # -*- coding: mbcs -*-
typelib_path = 'd:\\bogo\\bogo-win32\\interfaces\\tsf.tlb'
_lcid = 0 # change this if required
from ctypes import *
from comtypes import GUID
from comtypes import IUnknown
from comtypes import GUID
from ctypes import HRESULT
from comtypes import BSTR
from ctypes.wintypes import HKL
from comtypes ... | gpl-3.0 | 4,124,624,088,685,188,600 | 35.693431 | 116 | 0.531861 | false | 3.302891 | false | false | false |
husman/WoTrack | apps/wordtrack/lyrics_track.py | 1 | 4034 | import string
import nltk
from nltk.collocations import *
from nltk.tokenize import word_tokenize
from apps.wordtrack.levenshtein_reduce import LevenshteinReduce
from spotify.utils.spotify_client import SpotifyClient
class LyricsTrack(object):
def __init__(self, lyrics):
"""
Converts the input lyr... | mit | -120,597,018,416,039,790 | 35.672727 | 104 | 0.612543 | false | 3.637511 | false | false | false |
shanot/imp | modules/display/test/test_colormap.py | 2 | 4345 | from __future__ import print_function
import IMP
import IMP.test
import IMP.core
import IMP.display
import io
import re
class Tests(IMP.test.TestCase):
def assertColorEqual(self, c, red, green, blue, delta=1e-6):
self.assertAlmostEqual(c.get_red(), red, delta=delta)
self.assertAlmostEqual(c.get_g... | gpl-3.0 | -8,221,678,464,184,445,000 | 41.598039 | 78 | 0.576525 | false | 3.16691 | true | false | false |
heihachi/PokemonGo-Bot | pokemongo_bot/test/spin_fort_test.py | 4 | 2151 | import os
import pickle
import unittest
from mock import MagicMock, patch
from pokemongo_bot.cell_workers.spin_fort import SpinFort
from pokemongo_bot.inventory import Items
config = {
"spin_wait_min": 0,
"spin_wait_max": 0,
"daily_spin_limit": 100,
}
response_dict = {'responses':
{'FORT_SEARCH': {
... | mit | 7,088,395,926,541,534,000 | 30.632353 | 105 | 0.635053 | false | 3.153959 | false | false | false |
V-FEXrt/Pokemon-Spoof-Plus | Pokemon/pokemon_team.py | 1 | 3569 | import random
from Utilities.text_converter import *
from pokemon import Pokemon
from pokemon_species import Species
def pokemon_type_block_encode(pokemon):
length = len(pokemon)
if(length > 6):
raise ValueError("Cannot have more than 6 Pokemon")
out = []
out.append(length)
for i in ran... | mit | -6,775,644,329,612,869,000 | 26.244275 | 93 | 0.568507 | false | 3.656762 | false | false | false |
jamesgk/ufo2fdk | Lib/ufo2ft/filters/flattenComponents.py | 2 | 1865 | from fontTools.misc.transform import Transform
from ufo2ft.filters import BaseFilter
import logging
logger = logging.getLogger(__name__)
class FlattenComponentsFilter(BaseFilter):
def __call__(self, font, glyphSet=None):
if super(FlattenComponentsFilter, self).__call__(font, glyphSet):
mod... | mit | 736,537,670,217,299,000 | 34.865385 | 78 | 0.647185 | false | 4.6625 | false | false | false |
AnhellO/DAS_Sistemas | Ago-Dic-2018/Ruben Campos/Practica 2/user.py | 1 | 1274 | class User():
def __init__(self, first_name, last_name, phone, email, twitter):
self.first_name = first_name
self.last_name = last_name
self.phone = phone
self.email = email
self.twitter = twitter
def describe_user(self):
print("The user first name is: {} \nThe ... | mit | 8,742,256,785,471,636,000 | 28.627907 | 219 | 0.624804 | false | 2.728051 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/wx-2.8-msw-unicode/wx/glcanvas.py | 2 | 5669 | # This file was created automatically by SWIG 1.3.29.
# Don't modify this file, modify the SWIG interface instead.
"""
`GLCanvas` provides an OpenGL Context on a `wx.Window`.
"""
import _glcanvas
import new
new_instancemethod = new.instancemethod
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
... | gpl-3.0 | -3,196,066,498,643,484,700 | 35.10828 | 101 | 0.653025 | false | 3.286377 | false | false | false |
Fanris/PySched | PySched/PySchedServer/Scheduler/Compiler/__init__.py | 1 | 1848 | # -*- coding: utf-8 -*-
'''
Created on 2013-01-04 12:10
@summary:
@author: Martin Predki
'''
from twisted.internet import reactor
from CompilerProcessProtocol import CompilerProcessProtocol
import logging
import os
class Compiler(object):
'''
@summary: Class containing the compile logic for jobs.
'''
... | lgpl-3.0 | 3,638,450,454,956,575,000 | 24.666667 | 107 | 0.568723 | false | 4.431655 | false | false | false |
vhbit/rust-docset | builder.py | 1 | 1230 | from docset.index import Index
from docset import rules
import os
import shutil
def build_docset(info, ds_rules, src_dir, out_dir):
root_dir = os.path.join(out_dir, info['name'] + '.docset')
content_dir = os.path.join(root_dir, 'Contents')
resources_dir = os.path.join(content_dir, 'Resources')
doc_dir... | mit | -32,142,809,591,768,190 | 29.75 | 67 | 0.58374 | false | 3.253968 | false | false | false |
chengdh/openerp-ktv | openerp/addons/auction/report/buyer_form_report.py | 9 | 2671 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -4,328,688,751,632,081,000 | 37.710145 | 138 | 0.588544 | false | 3.826648 | false | false | false |
nmittler/grpc | src/python/src/grpc/framework/base/packets/_ingestion.py | 5 | 16408 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | -7,925,192,769,846,485,000 | 36.375854 | 80 | 0.698501 | false | 4.389513 | false | false | false |
Merinorus/adaisawesome | Homework/05 - Taming Text/HW05_awesometeam_Q2.py | 1 | 8304 |
# coding: utf-8
# Question 2) Find all the mentions of world countries in the whole corpus,
# using the pycountry utility (HINT: remember that there will be different surface forms
# for the same country in the text, e.g., Switzerland, switzerland, CH, etc.)
# Perform sentiment analysis on every email message usin... | gpl-3.0 | -6,314,052,537,993,812,000 | 25.530351 | 167 | 0.668353 | false | 3.261587 | false | false | false |
klingebj/regreg | doc/examples/svm.py | 4 | 1152 | import numpy as np
import regreg.api as rr
np.random.seed(400)
N = 500
P = 2
Y = 2 * np.random.binomial(1, 0.5, size=(N,)) - 1.
X = np.random.standard_normal((N,P))
X[Y==1] += np.array([3,-2])[np.newaxis,:]
X_1 = np.hstack([X, np.ones((N,1))])
X_1_signs = -Y[:,np.newaxis] * X_1
transform = rr.affine_transform(X_1_s... | bsd-3-clause | -3,753,613,559,502,926,000 | 29.315789 | 84 | 0.635417 | false | 2.39501 | false | true | false |
yxd-hde/lambda-poll-update-delete | py-tornado-botocore/delete.py | 2 | 1236 | from tornado import gen
from itertools import izip_longest
from functools import partial
from operator import is_not
class Delete(object):
def __init__(self):
self.delete_count = 0
self.message_count = 0
@gen.coroutine
def _one_request(self, sqs_delete_message_batch, queue_url, ids):
... | mit | 6,247,602,740,467,058,000 | 28.428571 | 69 | 0.575243 | false | 3.886792 | false | false | false |
looker/sentry | src/sentry/models/eventmapping.py | 2 | 1684 | """
sentry.models.groupmeta
~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.db import models
from django.utils import timezone
from sentry.db.models import (BoundedB... | bsd-3-clause | -4,767,315,554,122,112,000 | 29.618182 | 75 | 0.6538 | false | 3.853547 | false | false | false |
deadsoft/Reklaminiai-Parduotuviu-Lankstinukai | gui.py | 1 | 71891 | # -*- coding: utf-8 -*-
"""
ReklaminiaiParduotuviųLankstinukai
Copyright (C) <2014> <Algirdas Butkus> <butkus.algirdas@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 Foundation, either version ... | agpl-3.0 | -3,426,794,644,451,782,700 | 60.519692 | 192 | 0.722246 | false | 3.714589 | false | false | false |
lord63/wonderful_bing | tests/test_computer.py | 1 | 2119 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from os import path
import mock
import pytest
from wonderful_bing.wonderful_bing import Computer
@pytest.fixture
def computer():
computer = Computer()
return computer
def test_computer(computer):
gnome_based = ("DIS... | mit | 8,599,398,593,725,011,000 | 34.915254 | 78 | 0.652666 | false | 3.45677 | true | false | false |
kste/aeshash | rebound/rebound.py | 1 | 4025 | '''
Created on Jan 9, 2014
@author: Stefan Koelbl
'''
from random import sample
from gost.gost import GOST
DDT = []
SBOX_MATCH = []
LinearStepList = []
InverseLinearStepList = []
possibleOutputDifferences = []
possibleInputDifferences = []
def propagateDifferencesThroughSout(state):
"""
Returns a state con... | mit | 6,187,724,085,738,073,000 | 29.270677 | 97 | 0.627329 | false | 3.493924 | false | false | false |
lnsp/tea | runtime/parser.py | 1 | 23001 | """Parse an tokenized expression into an AST."""
import codecs
from runtime import ast, lexer, env, lib, flags
class ParseException(Exception):
def __init__(self, msg):
super().__init__("ParseException: " + msg)
class MissingOperand(ParseException):
def __init__(self, op):
super().__init__("%s... | mit | -2,216,747,502,606,387,700 | 32.334783 | 140 | 0.573627 | false | 3.907747 | false | false | false |
eugeniominissale/ecommerce_api | models.py | 1 | 10882 | """
Models contains the database models for the application.
"""
import datetime
from uuid import uuid4
from passlib.hash import pbkdf2_sha256
from peewee import DateTimeField, TextField, CharField, BooleanField
from peewee import SqliteDatabase, DecimalField
from peewee import UUIDField, ForeignKeyField, IntegerField... | gpl-3.0 | -8,139,326,945,449,712,000 | 29.914773 | 100 | 0.61496 | false | 4.458009 | false | false | false |
pgmillon/ansible | lib/ansible/modules/network/fortimanager/fmgr_secprof_web.py | 38 | 43801 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... | gpl-3.0 | 5,868,044,743,491,713,000 | 39.332413 | 119 | 0.60695 | false | 4.128664 | false | false | false |
bamford/astrobamf | errors.py | 1 | 2901 | import numpy as N
def log10(x, xerr, mask=False):
z = N.log10(x)
zerr = N.absolute(xerr * N.log10(N.e)/x)
if not mask:
return N.array([z, zerr])
else:
ok = x > 0.0
return N.array([z, zerr]), ok
def pow10(x, xerr, mask=False):
z = 10**x
zerr = N.absolute(N.log(10) * xerr... | mit | 4,019,453,284,759,647,700 | 26.628571 | 49 | 0.521889 | false | 2.580961 | false | false | false |
adam-rabinowitz/ngs_python | structure/unittest/alignedPairTest.py | 2 | 5114 | import unittest
import tempfile
import collections
import os
import multiprocessing
from ngs_python.structure import alignedPair
class PairTestCase(unittest.TestCase):
def setUp(self):
''' Create temporary directory and example read pairs '''
# Make temporary file
self.dirName = tempfi... | gpl-2.0 | -3,708,043,065,017,505,300 | 43.086207 | 78 | 0.609894 | false | 3.553857 | true | false | false |
boundlessgeo/QGIS | python/console/console_settings.py | 32 | 28058 | # -*- coding:utf-8 -*-
"""
/***************************************************************************
Python Console for QGIS
-------------------
begin : 2012-09-10
copyright : (C) 2012 by Salvatore Larosa
email : lrssvtml (at) gmail (dot) com
***... | gpl-2.0 | 4,391,739,771,873,995,000 | 63.645161 | 167 | 0.715818 | false | 4.255422 | false | false | false |
zeqing-guo/SPAKeyManager | MergeServer/views.py | 1 | 2698 | import time
from django.shortcuts import render
from django.http import HttpResponse, Http404
from MergeServer.models import Results
from KeyManager.Util.Paillier import mul, add
from KeyManager.Util.TimeCost import SPATime
from CommunicationServer.models import Transaction
# Create your views here.
def get_merge_... | gpl-3.0 | -5,128,217,341,293,719,000 | 38.676471 | 96 | 0.575982 | false | 3.843305 | false | false | false |
ludwig-n/fchess | old_code.py | 1 | 21297 | # def comet(mvs, pcs, recdepth, maxrecdepth):
# options = []
# curxp = xp_diff(mvs[0][0].color, pcs)
# intro = '// ' + ('-' * (recdepth * 2)) + ' COMET: '
# if DEBUG_OUTPUT:
# print(intro + '{} opts'.format(len(mvs)))
# else:
# print(' ' * recdepth + '*')
# if len(mvs) ==... | gpl-3.0 | 4,026,633,267,642,389,500 | 42.372917 | 124 | 0.357562 | false | 3.246989 | false | false | false |
puiterwijk/bugwarrior | tests/test_jira.py | 3 | 1728 | import mock
from bugwarrior.services.jira import JiraService
from .base import ServiceTest
class TestJiraIssue(ServiceTest):
SERVICE_CONFIG = {
'jira.username': 'one',
'jira.base_uri': 'two',
'jira.password': 'three',
}
def setUp(self):
with mock.patch('jira.client.JIRA.... | gpl-3.0 | 4,223,890,027,943,420,400 | 27.8 | 74 | 0.542824 | false | 4.075472 | false | false | false |
GeorgeArgyros/symautomata | symautomata/pdastring.py | 1 | 26889 | """
This module retrieves a simple string from a PDA
using the state removal method
"""
from pda import PDAState
class PdaString():
"""Retrieves a string from a PDA"""
def __init__(self):
"""Class Initialization"""
self.statediag = []
self.quickresponse = {}
self.quickresponse... | mit | 5,705,872,241,703,846,000 | 49.638418 | 97 | 0.322846 | false | 6.098662 | false | false | false |
msfrank/Higgins | higgins/core/manager.py | 1 | 5601 | # Higgins - A multi-media server
# Copyright (c) 2007-2009 Michael Frank <msfrank@syntaxjockey.com>
#
# This program is free software; for license information see
# the COPYING file.
import os, tempfile
from higgins.http import resource, http_headers
from higgins.http.http import Response as HttpResponse
from higgins... | lgpl-2.1 | 7,229,447,080,898,060,000 | 40.488889 | 99 | 0.579182 | false | 4.3151 | false | false | false |
bitdeli/bitdeli-py | bitdeli/pipeline.py | 1 | 2654 | import traceback, threading, sys
class ExitPipeline(Exception):
pass
class Pipeline(object):
def __init__(self, pipeline):
self.lock = threading.Condition(threading.Lock())
self.thread = threading.Thread(target=self._run, args=(pipeline,))
self.item = None
self.error = None
... | mit | -7,850,849,799,641,166,000 | 28.820225 | 74 | 0.515448 | false | 4.560137 | false | false | false |
mafagafogigante/algorithms-and-data-structures | python/maximum-subarray/maximum-subarray.py | 1 | 3211 | # This are my implementations of two algorithms that find a maximum subarray
# (a subarray whose sum is maximum).
#
# It is also possible to find the maximum subarray by testing C(n, 2) pairs.
# This is the brute-force approach and it is O(n^2). Don't use this.
#
# The first one finds the maximum subarray using D&C in ... | unlicense | 2,358,794,061,456,667,600 | 34.677778 | 80 | 0.584865 | false | 2.935101 | false | false | false |
SteveParrington/jukeboxify | server/jukeboxify_cli.py | 1 | 1300 | import zmq
from getpass import getpass
def jsonify(text_command):
tokens = text_command.split()
args = []
if len(tokens) > 1:
args = tokens[1:]
json = { "opcode": tokens[0], "args": args }
return json
def login_prompt():
login_payload = {
"opcode": "login",
"args": [
... | apache-2.0 | -735,574,770,677,182,100 | 25.530612 | 59 | 0.532308 | false | 3.927492 | false | false | false |
morinted/plover | plover/machine/txbolt.py | 4 | 3417 | # Copyright (c) 2011 Hesky Fisher
# See LICENSE.txt for details.
"Thread-based monitoring of a stenotype machine using the TX Bolt protocol."
import plover.machine.base
# In the TX Bolt protocol, there are four sets of keys grouped in
# order from left to right. Each byte represents all the keys that
# were pressed ... | gpl-2.0 | -7,353,870,886,692,571,000 | 36.966667 | 84 | 0.566579 | false | 3.662379 | false | false | false |
Petr-Kovalev/nupic-win32 | examples/prediction/data/extra/hotgym/raw/makeDataset.py | 2 | 4119 | #! /usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditi... | gpl-3.0 | -9,085,653,973,188,496,000 | 25.574194 | 80 | 0.62758 | false | 3.603675 | false | false | false |
sbarton272/AcousticBarcodes-Explorations | barcodes/dxfwrite/build/lib/dxfwrite/insert2.py | 2 | 3245 | #!/usr/bin/env python
#coding:utf-8
# Purpose: insert block references with appended attributes
# Created: 11.04.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
"""
Provides the Insert2 composite-entity.
Insert a new block-reference with auto-creating of attribs from attdefs,
and setting attrib-text b... | mit | -7,397,871,041,693,382,000 | 37.630952 | 87 | 0.59322 | false | 3.933333 | false | false | false |
dallaspythondojo/python | Woodall_Robert/Assignments/python_fundamentals/names.py | 2 | 2297 | '''
Part 1:
Given the following list:
students = [
{'first_name': 'Michael', 'last_name' : 'Jordan'},
{'first_name' : 'John', 'last_name' : 'Rosales'},
{'first_name' : 'Mark', 'last_name' : 'Guillen'},
{'first_name' : 'KB', 'last_name' : 'Tonel'}
]
Create a program that outputs:
Michael Jordan... | mit | 360,202,921,939,173,440 | 25.709302 | 106 | 0.542011 | false | 2.922392 | false | false | false |
meego-tablet-ux/meego-app-browser | third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_XML.py | 33 | 24745 | #!/usr/bin/env python
# (C) Copyright IBM Corporation 2004, 2005
# All Rights Reserved.
#
# 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
# ... | bsd-3-clause | -8,889,399,866,411,980,000 | 24.589452 | 210 | 0.666114 | false | 3.14342 | false | false | false |
PixelStereo/pybush | pybush/state.py | 1 | 1455 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
"""
A State is a copy of a Value at a certain state
"""
from pybush.value import Value
from pybush.basic import Basic
from pybush.constants import __dbug__
from pybush.functions import set_attributes
class State(Value, Basic):
"""
A State is afrozen state of ... | gpl-3.0 | -7,981,826,928,319,378,000 | 32.837209 | 63 | 0.42268 | false | 4.89899 | false | false | false |
kurrik/laulik | src/server/server.py | 1 | 2251 | from ansi2html import Ansi2HTMLConverter
import argparse
from flask import Flask
from flask import Markup
from flask import Response
from flask import make_response
from flask import render_template
from flask import request
from flask import send_file
import github
import laulik
import os
app = Flask(__name__)
repopa... | apache-2.0 | 6,871,222,778,806,686,000 | 31.157143 | 77 | 0.676588 | false | 3.248196 | false | false | false |
gsamokovarov/frames.py | frames/__init__.py | 1 | 5858 | '''
__
/ _|_ __ __ _ _ __ ___ ___ ___ _ __ _ _
| |_| '__/ _` | '_ ` _ \ / _ \/ __| | '_ \| | | |
| _| | | (_| | | | | | | __/\__ \_| |_) | |_| |
|_| |_| \__,_|_| |_| |_|\___||___(_) .__/ \__, |
|_| |__/
'''
__all__ = [... | mit | -8,642,424,317,072,030,000 | 22.813008 | 81 | 0.534483 | false | 4.169395 | false | false | false |
hamukichi/ironpycompiler | ironpycompiler/exceptions.py | 1 | 1978 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" This module contains execptions of IronPyCompiler.
"""
class IPCError(Exception):
"""This is the base class for exceptions in this module.
"""
pass
class IronPythonDetectionError(IPCError):
"""This exception will be raised if IronPython cannot b... | mit | -8,640,078,560,626,378,000 | 23.419753 | 82 | 0.609707 | false | 4.262931 | false | false | false |
ZombieNinjaPirate/pypkg | HonSSH/GEO.py | 1 | 1855 | """
Copyright (c) 2014, Are Hansen - Honeypot Development.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditi... | gpl-3.0 | 809,056,899,135,910,100 | 38.489362 | 100 | 0.750943 | false | 4.177928 | false | false | false |
jawilson/home-assistant | homeassistant/components/notify/aws_lambda.py | 2 | 2919 | """
AWS Lambda platform for notify component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.aws_lambda/
"""
import logging
import json
import base64
import voluptuous as vol
from homeassistant.const import (
CONF_PLATFORM, CONF_NAME)
from h... | mit | -5,085,784,450,656,886,000 | 30.728261 | 74 | 0.666324 | false | 3.781088 | true | false | false |
npinto/Oger | Oger/examples/cma_es.py | 1 | 2538 | import Oger
import scipy as sp
import time
import mdp.parallel
if __name__ == '__main__':
''' Example of using CMA_ES to optimize the parameters of a reservoir+readout on the NRMSE for NARMA30, once sequentially and once in parallel if the machine is multicore.
The CMA-ES is given an initial value x0 and stand... | gpl-3.0 | 5,014,727,968,097,656,000 | 46.886792 | 183 | 0.710402 | false | 3.520111 | false | false | false |
opencog/destin | Destin/Bindings/Python/czt_mod.py | 2 | 2158 | # -*- coding: utf-8 -*-
"""
Created on Wed May 8 12:49:09 2013
@author: teaera
"""
import os
import cv2.cv as cv
import pydestin as pd
#cl = pd.czt_lib()
cm = pd.CztMod()
#############################################################################
"""
Save the current user's home folder.
"""
homeFld = os.getenv("... | lgpl-3.0 | -3,027,028,483,499,630,600 | 23.247191 | 84 | 0.601483 | false | 3.141194 | false | false | false |
ahri/flask-snooze | flask_snooze.py | 1 | 9579 | # coding: utf-8
"""
Snooze: a backend-agnostic REST API provider for Flask.
e.g.
from flask import app, Blueprint
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.snooze import Snooze, SqlAlchemyEndpoint
from my_model import sqlalchemy_db, Book
api = Blueprint('api_v1', __name__)
a... | mit | 4,601,263,358,545,292,300 | 27.679641 | 81 | 0.540766 | false | 3.981297 | false | false | false |
Weasyl/weasyl | weasyl/controllers/messages.py | 1 | 2514 | import itertools
from pyramid.httpexceptions import HTTPSeeOther
from pyramid.response import Response
from weasyl import define, message
from weasyl.controllers.decorators import login_required, token_checked
"""Contains view callables dealing with notification messages."""
@login_required
@token_checked
def mess... | apache-2.0 | 1,569,868,763,633,523,200 | 32.972973 | 115 | 0.696897 | false | 4.081169 | false | false | false |
dfang/odoo | addons/product/models/product_pricelist.py | 6 | 23258 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from itertools import chain
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError, ValidationError
import odoo.addons.decimal_precision as dp
class Pricelist(models.Model):
_name = ... | agpl-3.0 | 8,119,668,476,666,350,000 | 48.802998 | 181 | 0.581735 | false | 4.091837 | false | false | false |
Rubisk/mcedit2 | src/mcedit2/rendering/rendergraph.py | 1 | 11465 | """
${NAME}
"""
from __future__ import absolute_import, division, print_function
import collections
import logging
import weakref
from OpenGL import GL
import numpy
from mcedit2.rendering import cubes
from mcedit2.rendering.depths import DepthOffset
from mcedit2.util import profiler
from mcedit2.util.glutils import... | bsd-3-clause | -7,526,664,301,518,456,000 | 27.95202 | 113 | 0.614653 | false | 3.78258 | false | false | false |
google/jws | jws/ecdsa_verify.py | 1 | 2742 | # Copyright 2018 Google LLC
#
# 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 writing, ... | apache-2.0 | 4,097,409,235,211,034,600 | 36.054054 | 78 | 0.698031 | false | 3.911555 | false | false | false |
zhumengyuan/kallithea | kallithea/bin/kallithea_config.py | 2 | 5327 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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.
#
# This program is distr... | gpl-3.0 | 5,297,344,204,185,463,000 | 32.086957 | 87 | 0.617796 | false | 3.860145 | true | false | false |
gingerpayments/python-libmt94x | libmt94x/info_acct_owner_subfields.py | 1 | 5732 | from libmt94x.remittance_info import AbstractRemittanceInfo
from libmt94x.transfer_failed_codes import TransferFailed
class InfoToAcccountOwnerSubField(object):
'''Abstract base class for all subfields of InformationToAcccountOwner'''
pass
class BeneficiaryParty(InfoToAcccountOwnerSubField):
tag = 'BENM... | mit | -7,662,192,650,122,778,000 | 24.475556 | 89 | 0.654047 | false | 3.544836 | false | false | false |
altugkarakurt/morty | morty/evaluator.py | 1 | 3243 | # -*- coding: utf-8 -*-
from converter import Converter
class Evaluator(object):
"""----------------------------------------------------------------
This class is used for evaluating the validity of our estimations.
We return a dictionary entry as our evaluation result. See the
return statements in ea... | agpl-3.0 | -4,064,247,050,701,572,000 | 42.24 | 79 | 0.53284 | false | 3.540393 | false | false | false |
jtauber/cleese | necco/kernel/monkey.py | 1 | 6153 | ################################################################################
import pyvga
import blit
import buf
ss = buf.sym('sokoscreen')
pyvga.exittext()
pyvga.framebuffer[:len(ss)] = ss
################################################################################
import py8042
import keyb
import pybeep
# I... | mit | -4,385,249,557,267,020,000 | 29.919598 | 289 | 0.322932 | false | 2.902358 | false | false | false |
JonasSC/SuMPF | sumpf/_data/_filters/_bands.py | 1 | 8876 | # This file is a part of the "SuMPF" package
# Copyright (C) 2018-2021 Jonas Schulte-Coerne
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your ... | lgpl-3.0 | -2,893,990,470,551,838,700 | 53.790123 | 155 | 0.604664 | false | 4.610909 | false | false | false |
pulilab/django-collectform | collectform/views.py | 1 | 1327 | from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from rest_framework.decorators import api_view
from rest_framework.response import Response
from .forms import DistributionRequestForm
from .models import mail_request_to_managers
@api_view(['POST'])
def handle_post(request):
... | bsd-3-clause | -286,069,211,578,861,470 | 33.921053 | 149 | 0.639035 | false | 3.824207 | false | false | false |
Ernestyj/PyStudy | finance/HurstExponent.py | 1 | 5306 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.finance as mpf
import math
# Step1:时间序列分段
# 子区间长度n是可变的,如果进行回归分析需要进行将时间序列进行分段,例如若时间序列长度为240,则其可以分解成4段长度为60的等长子区间,
# 或者6段长度为40的等长子区间……
'''
输入:数据长度
输出:分段方案矩阵
'''
def getSegmentationMatr... | apache-2.0 | 3,487,723,096,175,357,400 | 31.02027 | 86 | 0.644576 | false | 2.371371 | false | false | false |
ecreall/lagendacommun | lac/content/processes/film_schedule_management/definition.py | 1 | 3125 | # Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from dace.processdefinition.processdef import ProcessDefinition
from dace.processdefinition.activitydef import ActivityDefinition
from dace.processdefinition.gatewaydef ... | agpl-3.0 | 676,595,774,552,225,900 | 41.808219 | 81 | 0.56384 | false | 5.139803 | false | false | false |
MariusWirtz/TM1py | TM1py/Objects/Element.py | 1 | 2041 | # -*- coding: utf-8 -*-
import collections
import json
from TM1py.Objects.TM1Object import TM1Object
from TM1py.Utils.Utils import lower_and_drop_spaces
class Element(TM1Object):
""" Abstraction of TM1 Element
"""
valid_types = ('Numeric', 'String', 'Consolidated')
def __init__(self, name, element... | mit | -332,317,142,393,231,940 | 25.855263 | 90 | 0.601666 | false | 4.009823 | false | false | false |
erigones/esdc-ce | api/template/base/serializers.py | 1 | 6476 | from copy import deepcopy
from django.utils.translation import ugettext_lazy as _
from django.utils.six import iteritems
from api import serializers as s
from api.validators import validate_alias
from api.vm.utils import get_owners
from api.vm.define.serializers import VmDefineSerializer, KVmDefineDiskSerializer, VmD... | apache-2.0 | -164,667,068,585,603,100 | 36.433526 | 119 | 0.677424 | false | 4.009907 | false | false | false |
DamnWidget/mamba | mamba/test/dummy_app/twisted/plugins/dummy_plugin.py | 3 | 1260 | from zope.interface import implements
from twisted.python import usage
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.application import internet
from mamba.utils import config
from dummy import MambaApplicationFactory
settings = config.Application('config/appli... | gpl-3.0 | -5,399,313,289,844,860,000 | 29.731707 | 70 | 0.743651 | false | 4.315068 | false | false | false |
Petr-By/qtpyvis | qtgui/panels/advexample.py | 1 | 8103 | """
File: logging.py
Author: Ulf Krumnack
Email: krumnack@uni-osnabrueck.de
Github: https://github.com/krumnack
"""
# standard imports
from base import Runner
from toolbox import Toolbox
# Qt imports
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QPushButton, QSpinBox,
QVBoxLayo... | mit | -4,019,713,716,060,868,000 | 36.688372 | 80 | 0.569049 | false | 4.316995 | false | false | false |
SistemasAgiles/pyafipws.simulador | models/db.py | 2 | 3441 | # -*- coding: utf-8 -*-
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################
if request.env.web2py_runtime_gae: # if running on Google App E... | agpl-3.0 | -8,921,984,654,793,008,000 | 52.765625 | 176 | 0.57367 | false | 4.170909 | false | false | false |
danaukes/popupcad | popupcad/graphics2d/interactivevertex.py | 2 | 2746 | # -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""
import qt.QtCore as qc
import qt.QtGui as qg
#import popupcad.graphics2d.modes as modes
#from popupcad.graphics2d.graphicsitems import Common
from popupcad.graphics2d.interactiv... | mit | 5,964,751,136,130,698,000 | 27.905263 | 91 | 0.676621 | false | 3.956772 | false | false | false |
ptaq666/Mechatronika_2015-16_Proj_TN | Piatkowski/Update 2 - 18.05.2016 - program w pythonie.py | 1 | 1295 | from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
import numpy as np
# inicjalizacja kamery, referencja do przechwyconego obrazu
camera = PiCamera()
camera.resolution = (640, 480)
camera.framerate = 32
rawCapture = PiRGBArray(camera, size=(640, 480))
# chwila na ... | gpl-3.0 | 9,041,613,082,836,389,000 | 25.595745 | 122 | 0.697297 | false | 2.85872 | false | false | false |
johankaito/fufuka | microblog/flask/venv/lib/python2.7/site-packages/celery/worker/autoscale.py | 5 | 4864 | # -*- coding: utf-8 -*-
"""
celery.worker.autoscale
~~~~~~~~~~~~~~~~~~~~~~~
This module implements the internal thread responsible
for growing and shrinking the pool according to the
current autoscale settings.
The autoscale thread is only enabled if :option:`--autoscale`
has been enabled ... | apache-2.0 | 8,019,987,817,766,772,000 | 29.024691 | 70 | 0.590872 | false | 3.928918 | false | false | false |
Naoto-Imamachi/MIRAGE | scripts/mirage_run.py | 1 | 4126 | #!/usr/bin/env python
"""
MIRAGE: Comprehensive miRNA target prediction pipeline.
Created by Naoto Imamachi on 2015-04-23.
Copyright (c) 2015 Naoto Imamachi. All rights reserved.
Updated and maintained by Naoto Imamachi since Apr 2015.
Usage:
mirage.py <analysis_type> <miRNA.fasta> <targetRNA.fasta> [opt... | mit | -6,552,360,622,212,059,000 | 38.851485 | 301 | 0.672079 | false | 3.359935 | false | false | false |
Jordan-Zhu/EdgeSegmentFitting | Unit_Tests/lineseg_unit_test.py | 1 | 4388 | import cv2
import numpy as np
from lineseg import lineseg
from drawedgelist import drawedgelist
def find_contours(im):
# im = cv2.imread('circle.png')
imgray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
ret, thresh = cv2.threshold(imgray, 127, 255, 0)
contours, hierarchy = cv2.findContours(thresh, cv2.RETR... | agpl-3.0 | -2,009,959,262,978,577,000 | 27.134615 | 109 | 0.567001 | false | 2.883049 | false | false | false |
Iristyle/ChocolateyPackages | EthanBrown.SublimeText2.GitPackages/tools/PackageCache/Git/flow.py | 3 | 3101 | import sublime
from git import GitWindowCommand
class GitFlowCommand(GitWindowCommand):
def is_visible(self):
s = sublime.load_settings("Git.sublime-settings")
if s.get('flow'):
return True
class GitFlowFeatureStartCommand(GitFlowCommand):
def run(self):
self.get_window()... | mit | 3,764,561,798,035,181,600 | 33.455556 | 97 | 0.633022 | false | 3.639671 | false | false | false |
orotib/RetroBookDownloader | retro.py | 1 | 2684 | #!/usr/bin/env python
#!encoding: utf-8
"""
Retro Book Downloader
A simple python script for downloading retro books from pcvilag.muskatli.hu.
All books on this website: http://pcvilag.muskatli.hu/
Written by Tibor Oros, 2015 (oros.tibor0@gmail.com)
Recommended version: Python 2.7
"""
import os
import shutil
impo... | gpl-2.0 | 2,992,041,773,091,996,700 | 23.4 | 84 | 0.59687 | false | 3.593039 | false | false | false |
hazelcast/hazelcast-python-client | hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py | 1 | 1192 | from hazelcast.serialization.bits import *
from hazelcast.protocol.builtin import FixSizedTypesCodec
from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer
from hazelcast.protocol.builtin import StringCodec
from hazelcast.protocol.builtin import DataCodec
from hazelcas... | apache-2.0 | -2,616,293,637,833,377,300 | 38.733333 | 105 | 0.777685 | false | 3.145119 | false | false | false |
cryvate/project-euler | project_euler/framework/solve.py | 1 | 4943 | #!/usr/bin/env python
"""Solver for Project Euler problems.
Usage:
solve <problem_number>
solve (-h | --help)
Options:
-h --help Show this screen.
"""
from importlib import import_module
from os.path import join, split
import time
import warnings
from typing import Any, Callable, Tuple
from docopt i... | mit | -2,727,328,987,806,650,000 | 29.140244 | 196 | 0.599029 | false | 3.816988 | false | false | false |
Mercy-Nekesa/sokoapp | sokoapp/coupons/migrations/0001_initial.py | 2 | 5104 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Coupon'
db.create_table('coupons_coupon', (
('id', self.gf('django.db.models.fie... | mit | 5,946,749,823,817,242,000 | 64.448718 | 182 | 0.559757 | false | 3.65616 | false | false | false |
liosha2007/temporary-groupdocs-python3-sdk | groupdocs/models/JobOutputDocument.py | 1 | 1667 | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
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 | -4,815,947,096,797,974,000 | 28.767857 | 77 | 0.556089 | false | 4.209596 | false | false | false |
brew/fruitynutters | webapps/fruitynutters/cart/migrations/0001_initial.py | 1 | 3090 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-22 11:39
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('catalogue', '__first__'),
]
ope... | mit | -7,955,866,565,930,108,000 | 45.818182 | 164 | 0.567961 | false | 4.098143 | false | false | false |
ViderumGlobal/ckanext-orgdashboards | ckanext/orgdashboards/logic/action.py | 1 | 2689 | import logging
import json
from pylons import config
from ckan import logic
import ckan.plugins as p
import ckan.lib.helpers as h
import ckan.logic.action.update as update_core
import ckan.logic.action.get as get_core
from ckanext.orgdashboards.helpers import (_get_action,
... | agpl-3.0 | 7,214,593,898,849,147,000 | 28.877778 | 80 | 0.662328 | false | 3.561589 | false | false | false |
kgullikson88/DSD-Paper | plotters/make_average_detrate_plot.py | 1 | 4156 | """
This script goes through the marginalized detection rate files,
and gets the average detection rate as a function of temperature.
"""
from __future__ import print_function, division
import pandas as pd
import numpy as np
import sys
import os
import datetime
import matplotlib.pyplot as plt
import seaborn as sns
imp... | mit | 1,911,644,103,055,812,900 | 34.529915 | 119 | 0.61718 | false | 3.251956 | false | false | false |
tanderegg/mesos-spawner | mesos_spawner/executor.py | 1 | 1027 | #!/usr/bin/env python2.7
from __future__ import print_function
import sys
import time
from threading import Thread
from pymesos import MesosExecutorDriver, Executor, decode_data
class JupyterHubExecutor(Executor):
"""
May not be necessary
"""
def launchTask(self, driver, task):
def run_task(t... | mit | -4,009,985,223,627,947,000 | 26.026316 | 62 | 0.497566 | false | 4.261411 | false | false | false |
Petraea/jsonbot | jsb/lib/persist.py | 1 | 11970 | # jsb/persist.py
#
#
"""
allow data to be written to disk or BigTable in JSON format. creating
the persisted object restores data.
"""
## jsb imports
from jsb.utils.trace import whichmodule, calledfrom, callstack, where
from jsb.utils.lazydict import LazyDict
from jsb.utils.exception import handle_excepti... | mit | -6,698,152,806,198,385,000 | 32.909348 | 159 | 0.568421 | false | 3.739456 | false | false | false |
jithinbp/vLabtool-v0 | v0/experiment.py | 2 | 18475 | # Set the QT API to PyQt4
import os
import pkg_resources
os.environ['QT_API'] = 'pyqt'
import sip
sip.setapi("QString", 2)
sip.setapi("QVariant", 2)
from PyQt4 import QtGui,QtCore
import sys
import functools,random
from templates import template_exp
import time,sys
import custom_widgets as Widgets
import numpy as ... | gpl-3.0 | -2,923,714,953,830,845,400 | 31.355517 | 149 | 0.704736 | false | 2.878623 | false | false | false |
lhl/vrdev | 013-glfw-pyopengl/run.py | 1 | 1480 | #!/usr/bin/env python
import envoy
import subprocess
import sys
import time
import logging
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler, LoggingEventHandler
try:
WATCH = sys.argv[1]
except:
WATCH = '001-initial.py'
LASTRUN = 0
class watcher(FileSystemEventHandler):... | apache-2.0 | -4,814,636,934,122,627,000 | 26.924528 | 118 | 0.641216 | false | 3.288889 | false | false | false |
drvinceknight/Axelrod | axelrod/strategies/grumpy.py | 1 | 1668 | from axelrod import Player
class Grumpy(Player):
"""A player that defects after a ceratin level of grumpiness. Grumpiness increases when the opponent defects and decreases when the opponent co-operates."""
name = 'Grumpy'
def __init__(self, starting_state = 'Nice', grumpy_threshold = 10, nice_threshold =... | mit | 951,406,063,209,069,400 | 37.790698 | 160 | 0.619305 | false | 3.971429 | false | false | false |
Jumpscale/ays9 | tests/test_services/test_validate_service_args/actions.py | 1 | 1737 | def init_actions_(service, args):
"""
this needs to returns an array of actions representing the depencies between actions.
Looks at ACTION_DEPS in this module for an example of what is expected
"""
# some default logic for simple actions
return {
'test': ['install']
}
def t... | apache-2.0 | -3,026,263,630,030,186,000 | 28.948276 | 97 | 0.586644 | false | 3.86 | false | false | false |
elkingtowa/pyrake | tests/test_spidermanager/__init__.py | 1 | 2733 | import sys
import os
import shutil
from zope.interface.verify import verifyObject
from twisted.trial import unittest
# ugly hack to avoid cyclic imports of pyrake.spider when running this test
# alone
from pyrake.interfaces import ISpiderManager
from pyrake.spidermanager import SpiderManager
from pyrake.http import ... | mit | -162,390,153,043,694,340 | 37.492958 | 97 | 0.66008 | false | 3.544747 | true | false | false |
barseghyanartur/django-haystack | haystack/management/commands/clear_index.py | 12 | 2182 | # encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from django.core.management.base import BaseCommand
from django.utils import six
from haystack import connections
class Command(BaseCommand):
help = "Clears out the search index completely."
def add_argume... | bsd-3-clause | -8,526,028,623,413,117,000 | 37.964286 | 145 | 0.617782 | false | 4.337972 | false | false | false |
koriaf/djfp2 | src/djfp2/settings/base.py | 1 | 2704 | import os
from envparse import env
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = env.bool('PL_DEBUG', default=True)
SECRET_KEY = env('PL_SECRET_KEY', default="DefaultSecretKey")
ALLOWED_HOSTS = ['*'] # change to actual before production
CSRF_COOKIE_SECURE = not DEBUG # change it to False if you ar... | apache-2.0 | 4,497,029,765,264,549,000 | 27.166667 | 88 | 0.64645 | false | 3.444586 | false | false | false |
lucalianas/ProMort | promort/rois_manager/migrations/0015_focusregion_tissue_status.py | 2 | 1660 | # -*- coding: utf-8 -*-
# Copyright (c) 2019, CRS4
#
# 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,... | mit | -2,482,427,241,874,219,000 | 40.5 | 145 | 0.713253 | false | 3.980815 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.