repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
farert/farert | db/scripts/distance_exp.py | 1 | 4515 | #!python3.0.1
# -*- coding: utf-8 -*-
"""
指定路線、駅1から駅2までの営業キロ、計算キロを得る
"""
import sys
import os
import jrdb
import time
t0 = time.time()
sql = """
select
(select max(sales_km) from t_lines where line_id=?1 and (station_id=?2 or station_id=?3))-
(select min(sales_km) from t_lines where line_id=?1 and (station_id=... | gpl-3.0 | -2,113,714,231,040,063,200 | 28.711268 | 116 | 0.638017 | false | 2.271996 | false | false | false |
appcelerator/entourage | components/services/pylons/appcelerator-module/setup.py | 1 | 1264 | from setuptools import setup, find_packages
setup(name='Appcelerator',
version='0.0.0',
description="Python version of the Appcelerator web application framework for building fast, dynamic, AJAX based web 2.0 applications.",
long_description="""
""",
classifiers=[
'Development S... | apache-2.0 | 3,221,890,254,682,057,700 | 31.410256 | 142 | 0.614715 | false | 4.255892 | false | false | false |
mic4ael/indico | indico/modules/rb/notifications/blockings.py | 1 | 1361 | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from flask import render_template
from indico.core.notifications import email_sender, make_email
@email... | mit | 8,535,712,263,884,984,000 | 36.805556 | 96 | 0.709772 | false | 3.812325 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_ddos_custom_policies_operations.py | 1 | 20462 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 1,644,179,812,605,597,700 | 49.774194 | 204 | 0.657218 | false | 4.183603 | true | false | false |
kjagoo/wger_stark | wger/__init__.py | 1 | 1027 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
VERSION = (1, 8, 0, 'alpha', 3)
RELEASE = False
def get_version(version=None, release=None):
"""Derives a PEP386-compliant version number from VER... | agpl-3.0 | 6,015,827,220,061,252,000 | 26.026316 | 65 | 0.56962 | false | 3.334416 | false | false | false |
normanmaurer/autobahntestsuite-maven-plugin | src/main/resources/twisted/trial/runner.py | 1 | 26192 | # -*- test-case-name: twisted.trial.test.test_runner -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A miscellany of code used to run Trial tests.
Maintainer: Jonathan Lange
"""
__all__ = [
'TestSuite',
'DestructiveTestSuite', 'DryRunVisitor', 'ErrorHolder', 'LoggedSuite',
... | apache-2.0 | 4,596,502,648,089,220,000 | 32.029004 | 83 | 0.608048 | false | 4.376274 | true | false | false |
rvbelefonte/Rockfish2 | rockfish2/extensions/cps/model.py | 1 | 3390 | """
Tools for working with Computer Programs in Seismology velocity models
"""
import os
import numpy as np
import datetime
import pandas as pd
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
from rockfish2 import logging
from rockfish2.models.profile import Profile
class CPSModel1d(Profile):
... | gpl-2.0 | -763,694,622,314,815,400 | 31.596154 | 79 | 0.515929 | false | 3.502066 | false | false | false |
Metronote/metronotesd-alpha | lib/api.py | 1 | 26200 | #! /usr/bin/python3
import sys
import os
import threading
import decimal
import time
import json
import re
import requests
import collections
import logging
from logging import handlers as logging_handlers
D = decimal.Decimal
import apsw
import flask
from flask.ext.httpauth import HTTPBasicAuth
from tornado.wsgi impo... | mit | 844,158,280,509,889,700 | 43.328257 | 171 | 0.558554 | false | 4.273736 | true | false | false |
neeasade/qutebrowser | tests/unit/completion/test_models.py | 1 | 15355 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 Foun... | gpl-3.0 | -80,187,015,943,444,350 | 37.873418 | 79 | 0.590231 | false | 3.94021 | true | false | false |
adamnew123456/myweb | myweb/frontend/cli.py | 1 | 9534 | """
A command-line based frontend for interacting with myweb.
"""
from myweb.backend import config, db, query, utils
import argparse
import os
import re
import sys
import tempfile
HELP = """myweb-cli - A command-line interface to myweb.
Usage:
myweb-cli <command> <args>
Commands:
search QUERY
Search... | bsd-2-clause | -6,819,532,572,932,881,000 | 33.05 | 78 | 0.588316 | false | 4.039831 | true | false | false |
Lamaw/Newzer | lemonde_extractor.py | 1 | 6762 | # -*- coding: utf-8 -*-
"""
This page defines the Implementation of an analyzer for "www.lemonde.fr"
"""
from HTMLParser import HTMLParser
from Isite_extractor import ISiteExtractor
class LeMondeExtractor(ISiteExtractor):
"""
This class implements the Page analyzer interface for "lemonde.fr" website
"""
... | mit | 5,026,453,896,365,185,000 | 39.740964 | 166 | 0.587844 | false | 4.390909 | false | false | false |
murat1985/bagpipe-bgp | bagpipe/bgp/engine/worker.py | 2 | 5205 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# encoding: utf-8
# Copyright 2014 Orange
#
# 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
#
# Un... | apache-2.0 | 6,153,653,472,413,614,000 | 30.737805 | 78 | 0.634006 | false | 4.069586 | false | false | false |
Balannen/LSMASOMM | atom3/Kernel/Layout/RandomLayout.py | 1 | 2169 | """
RandomLayout.py
Generates a random layout by moving all the nodes positions randomly in
a 640x480 pixel box. The connections are then optimized for the new layout.
Guaranteed to hit an aesthetic layout at infinity, not recognize it, and
keep on going for another infinity :p
Created Summer 2004, Denis... | gpl-3.0 | 2,312,483,921,526,542,000 | 34.79661 | 94 | 0.612725 | false | 3.873214 | false | false | false |
Ell/goonauth | profiles/migrations/0012_auto__add_oauthapplication.py | 1 | 12056 | # -*- 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 model 'OAuthApplication'
db.create_table(u'profiles_oauthapplica... | mit | -8,942,637,767,845,839,000 | 73.425926 | 257 | 0.560883 | false | 3.512821 | false | false | false |
BorgERP/borg-erp-6of3 | verticals/garage61/acy_mrp_operator/mrp_operator.py | 1 | 10435 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
# Ignacio Ibeas <ignacio@acysos.com>
# $Id$
#
# This program i... | agpl-3.0 | -5,955,302,422,474,086,000 | 54.216931 | 255 | 0.589459 | false | 3.912636 | false | false | false |
merlinmarek/ICTScan | Python/perspective_transformation/perspective_transformation.py | 1 | 2001 | #!/usr/bin/env python
import sys
import cv2
import numpy as np
point_count = 0;
y = [];
x = [];
def run_prespective_transform():
global src
src_quad = np.array([(x[0], y[0]), (x[1], y[1]), (x[2], y[2]), (x[3], y[3])], np.float32);
dst_quad = np.array([(0.0, 0.0), (1032.0, 0.0), (1032.0, 581.0), (0.0, 581.0)], np.f... | bsd-2-clause | -1,209,146,062,546,825,700 | 27.183099 | 167 | 0.623188 | false | 2.250844 | false | false | false |
rzr/synapse | synapse/handlers/__init__.py | 1 | 2767 | # -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -1,623,106,301,995,591,200 | 38.528571 | 76 | 0.731117 | false | 4.205167 | false | false | false |
muratcansahin/itucsdb1626 | foodle/controllers/post_comments_controller.py | 1 | 3956 | #!/usr/bin/env python3
import foodle
import psycopg2
from psycopg2.extras import DictCursor
from flask import Blueprint, render_template, current_app, request, redirect, make_response, g
from foodle.utils.auth_hook import auth_hook_functor
post_comments_controller = Blueprint('post_comments_controller', __name__)
@po... | gpl-3.0 | 8,332,786,629,607,195,000 | 30.149606 | 105 | 0.555106 | false | 4.028513 | false | false | false |
lfblogs/aiopy | aiopy/required/aiohttp/protocol.py | 1 | 27699 | """Http related parsers and protocol."""
import collections
import functools
import http.server
import itertools
import re
import string
import sys
import zlib
from wsgiref.handlers import format_date_time
from aiopy.required import aiohttp
from aiopy.required.aiohttp import hdrs, errors
from .multidict import CIMul... | gpl-3.0 | 7,311,727,650,136,133,000 | 31.021965 | 79 | 0.567205 | false | 4.293753 | false | false | false |
devsar/ae-people | apps/stats/views.py | 1 | 1376 | """
Stats views
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils import simplejson
from django.utils.trans... | apache-2.0 | -5,724,563,752,425,288,000 | 27.081633 | 77 | 0.655523 | false | 4.744828 | false | false | false |
svensaeger/Hatschi | wetterstation2.py | 1 | 1364 | from tkinter import *
import serial
import time
def ausgeben(daten):
datenEinzeln = daten.split()
root = Tk()
root.attributes("-fullscreen", True)
root.config(bg = "light green")
frameo = Frame(root)
frameu = Frame(root, bg = "light green")
temp = "0"
luftfeu = "0"
luftdruck = "0"
gas = "0"
regen = "0"... | gpl-3.0 | -2,927,763,637,541,461,000 | 14.678161 | 47 | 0.57478 | false | 2.812371 | false | false | false |
MrHamdulay/daily-problems | yaseen/problem-3-binary-search.py | 1 | 1162 | class Node:
def __init__(self, value):
self.value = float(value)
self.parent = None
self.children = []
def addChild(self, child):
self.children.append(child)
def __repr__(self):
return '<value: %s children: (%s)>' % (self.value, len(self.children))
@property
def right(self):
return... | mit | 3,047,727,185,043,517,000 | 20.924528 | 85 | 0.641997 | false | 3.254902 | false | false | false |
beihaiguaishou/HackRunningGo-SC | HaRunGo.py | 1 | 10445 | import fileinput
import requests
import json
import base64
import random
import datetime
import re
import time
import hashlib
from Phone import *
import uuid
import codecs
# Globle Var
file1 = open('route.data')
routes = file1.readlines()
file1.close()
file2 = codecs.open('tp.data', 'r', 'utf-8')
tps = file2.readline... | mit | 6,853,569,064,474,251,000 | 29.811209 | 122 | 0.578076 | false | 3.218798 | false | false | false |
wangjiaxi/django-dynamic-forms | dynamic_forms/models.py | 2 | 8474 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
from collections import OrderedDict
from django.core.urlresolvers import reverse
from django.db import models
from django.db.transaction import atomic
from django.template.defaultfilters import slugify
from django.utils.crypto import get_rand... | bsd-3-clause | -1,659,677,495,397,635,600 | 37.60274 | 88 | 0.602792 | false | 4.070294 | false | false | false |
google/makani | config/m600/tether.py | 1 | 1922 | # Copyright 2020 Makani Technologies 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | -8,597,662,665,080,379,000 | 31.576271 | 77 | 0.680021 | false | 3.456835 | false | false | false |
fenceFoil/canopto | tween_test_pygame.py | 1 | 4093 | #!/usr/bin/python
# M.E.Farmer 2013
# demo for tween library
# showing integration with PyGame
# moves text from random points using various tweens
# changes from random color to random color using the same tween
# Mouse click rotates through tweens and ESC closes demo
import sys
import pygame
import random
import twee... | bsd-3-clause | -5,670,639,753,451,498,000 | 38.737864 | 96 | 0.638651 | false | 3.034099 | false | false | false |
ianjuma/ubuntu-git-notify | app/github-notif.py | 1 | 2513 | #!/usr/bin/python
import sys
import pynotify
capabilities = {'actions': False,
'body': False,
'body-hyperlinks': False,
'body-images': False,
'body-markup': False,
'icon-multi': False,
'icon-static': False,
'sound': False,
'image/svg+xml': False,
... | mit | 5,087,499,934,471,996,000 | 25.177083 | 66 | 0.585356 | false | 3.920437 | false | false | false |
blaiseli/p4-phylogenetics | p4/tree_optsim.py | 1 | 19918 | import sys
import string
import types
import cStringIO
import math
import copy
import os
import func
import time
import glob
from var import var
from p4exceptions import P4Error
from node import Node, NodeBranch, NodePart, NodeBranchPart
import nexustoken
from distancematrix import DistanceMatrix
import numpy
import p... | gpl-2.0 | 7,518,539,616,332,160,000 | 38.441584 | 115 | 0.566523 | false | 3.84369 | false | false | false |
jkettleb/iris | lib/iris/aux_factory.py | 1 | 70417 | # (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 option) any l... | lgpl-3.0 | 7,830,086,257,781,286,000 | 38.427212 | 79 | 0.525384 | false | 4.37835 | false | false | false |
hirobert/svgwrite | svgwrite/utils.py | 1 | 6106 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: svg util functions and classes
# Created: 08.09.2010
# Copyright (C) 2010, Manfred Moitzi
# License: GPLv3
"""
.. autofunction:: rgb
.. autofunction:: iterflatlist
.. autofunction:: strlist
.. autofunction:: get_unit
.. autofunction:... | gpl-3.0 | -841,790,652,813,798,900 | 26.138249 | 98 | 0.533082 | false | 3.837838 | false | false | false |
AlvinPH/StockTool | StockTool/core.py | 1 | 7480 |
from . import helpers
import pandas as pd
import numpy as np
from pandas import DataFrame, Series
from pandas_datareader import data
from datetime import datetime, timedelta
import re
import os
import requests
import time
class StockInfo():
def __init__(self, StockNumber):
if isinstance(StockNumber, str)... | bsd-2-clause | -3,977,140,881,011,436,500 | 27.226415 | 137 | 0.629278 | false | 2.800449 | false | false | false |
grycap/clues | cluesplugins/kubernetes.py | 1 | 13204 | #!/usr/bin/env python
#
# CLUES - Cluster Energy Saving System
# Copyright (C) 2015 - GRyCAP - Universitat Politecnica de Valencia
#
# 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 versio... | gpl-3.0 | -3,341,491,502,030,024,000 | 43.160535 | 117 | 0.529612 | false | 4.06402 | true | false | false |
Dhole/miniBoy | helpers/gen.py | 1 | 1027 |
regs = ["B", "C", "D", "E", "H", "L", "(HL)", "A"]
d = 0x80
for i in range(0, 8):
print('\tSET_OP(0x%02X, "ADD A,%s", op_add, A, %s, 4);' % (i+d, regs[i % 8], regs[i % 8]));
for i in range(8, 16):
print('\tSET_OP(0x%02X, "ADC A,%s", op_adc, A, %s, 4);' % (i+d, regs[i % 8], regs[i % 8]));
d = 0x90
for i in range... | bsd-3-clause | -4,138,096,646,816,942,000 | 34.448276 | 93 | 0.478092 | false | 1.824156 | false | false | false |
kirsty-tortoise/mathsmap | mathsmap/new_map.py | 1 | 2417 | """
Contains classes controlling wizards for making new maps
"""
import tkinter as tk
import mathsmap.colours as colours
class Wizard:
"""
A base class for all wizards in this project
"""
def clear(self):
"""
Remove all current widgets from top level of wizard
"""
for c... | mit | 4,506,016,835,669,896,000 | 31.226667 | 99 | 0.541167 | false | 4.262787 | false | false | false |
tiagocoutinho/bliss | bliss/controllers/emulators/keithley.py | 1 | 2009 | # -*- coding: utf-8 -*-
#
# This file is part of the bliss project
#
# Copyright (c) 2016 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.
import time
import random
import gevent
from bliss.comm.scpi import Commands
from bliss.controllers.keithley_scpi_mapping import COMMAND... | lgpl-3.0 | -4,398,936,189,385,790,500 | 25.786667 | 83 | 0.592832 | false | 3.16378 | false | false | false |
r-rathi/error-control-coding | perf/plot-pegd.py | 1 | 1496 | import numpy as np
import matplotlib.pyplot as plt
from errsim import *
def label(d, pe, pb, n):
if pb is None:
pb = pe
label = 'd={} pe={} n={} BSC'.format(d, pe, n)
else:
label = 'd={} pe={} n={} pb={}'.format(d, pe, n, pb)
return label
def plot(pe, fpath=None):
fig, ax = pl... | mit | -2,650,719,119,440,430,600 | 29.530612 | 82 | 0.561497 | false | 2.31221 | false | false | false |
grimli/life-game | life_thread.py | 1 | 3242 | #!/usr/bin/python3
import random
from tkinter import *
import threading
import queue
class Evolver( threading.Thread ):
""" this thread calculate next status
The result is maid available to the shower trough a queue """
def __init__(self, queue):
threading.Thread.__init__(self)
self.queue = queue
... | gpl-3.0 | -5,946,927,809,734,057,000 | 32.42268 | 374 | 0.541641 | false | 3.294715 | false | false | false |
veestr/sjsu-298-experiment | main.py | 1 | 9053 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | mit | -3,909,256,515,630,310,400 | 30.764912 | 118 | 0.709599 | false | 3.310055 | false | false | false |
xiangke/pycopia | mibs/pycopia/mibs/SNMPv2_TM.py | 1 | 2645 | # python
# This file is generated by a program (mib2py). Any edits will be lost.
from pycopia.aid import Enum
import pycopia.SMI.Basetypes
Range = pycopia.SMI.Basetypes.Range
Ranges = pycopia.SMI.Basetypes.Ranges
from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N... | lgpl-2.1 | 7,965,699,751,727,708,000 | 25.717172 | 204 | 0.727032 | false | 2.588063 | false | false | false |
alexryndin/ambari | ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py | 1 | 10470 | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | apache-2.0 | -3,688,034,880,890,380,000 | 31.71875 | 352 | 0.675454 | false | 3.677555 | false | false | false |
openpli-arm/enigma2-arm | lib/python/Components/PluginComponent.py | 1 | 4036 | from os import path as os_path, listdir as os_listdir
from traceback import print_exc
from sys import stdout
from Tools.Directories import fileExists
from Tools.Import import my_import
from Plugins.Plugin import PluginDescriptor
import keymapparser
class PluginComponent:
firstRun = True
restartRequired = False
d... | gpl-2.0 | 6,843,298,663,866,455,000 | 26.834483 | 112 | 0.665263 | false | 3.305487 | false | false | false |
SydneyUniLibrary/auto-holds | patron/migrations/0007_auto_20160316_0257.py | 1 | 1269 | # Copyright 2016 Susan Bennett, David Mitchell, Jim Nicholls
#
# This file is part of AutoHolds.
#
# AutoHolds 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 opt... | gpl-3.0 | -6,266,376,468,078,874,000 | 31.538462 | 101 | 0.708432 | false | 3.868902 | false | false | false |
xen0n/gingerprawn | gingerprawn/shrimp/academic/academic_curricula_frame.py | 1 | 8581 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# JNMaster / academic / curriculum querier interface
# the original code was contributed by Chen Huayue, later almost entirely
# rewritten by Wang Xuerui.
# Copyright (C) 2011 Chen Huayue <489412949@qq.com>
# Copyright (C) 2011 Wang Xuerui <idontknw.wang@gmail.com>
#
# This... | gpl-3.0 | 7,586,603,775,980,176,000 | 33.645833 | 80 | 0.600722 | false | 3.338017 | false | false | false |
MediffRobotics/DeepRobotics | DeepLearnMaterials/lstm_tfl.py | 1 | 1796 | # -*- coding: utf-8 -*-
"""
Simple example using LSTM recurrent neural network to classify IMDB
sentiment dataset.
References:
- Long Short Term Memory, Sepp Hochreiter & Jurgen Schmidhuber, Neural
Computation 9(8): 1735-1780, 1997.
- Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng,... | gpl-3.0 | -6,052,200,692,671,277,000 | 34.92 | 84 | 0.711581 | false | 3.080617 | true | false | false |
SeattleTestbed/repy_v2 | namespace.py | 1 | 39911 | """
<Program>
namespace.py
<Started>
September 2009
<Author>
Justin Samuel
<Purpose>
This is the namespace layer that ensures separation of the namespaces of
untrusted code and our code. It provides a single public function to be
used to setup the context in which untrusted code is exec'd (that is, the
... | mit | 8,661,446,760,081,302,000 | 31.057028 | 109 | 0.655308 | false | 4.122185 | false | false | false |
tsg-/pyeclib | pyeclib/utils.py | 1 | 3062 | # Copyright (c) 2013, 2014, Kevin Greenan (kmgreen2@gmail.com)
# Copyright (c) 2014, Tushar Gohad (tusharsg@gmail.com)
# 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... | bsd-2-clause | 2,439,260,725,972,171,000 | 39.826667 | 78 | 0.710973 | false | 4.437681 | false | false | false |
ssh0/growing-string | triangular_lattice/diecutting/result_count_on_edge.py | 1 | 9360 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# written by Shotaro Fujimoto
# 2016-12-16
import matplotlib.pyplot as plt
# from mpl_toolkits.mplot3d.axes3d import Axes3D
import matplotlib.cm as cm
import numpy as np
import set_data_path
class Visualizer(object):
def __init__(self, subjects):
self.data_... | mit | -8,337,780,784,412,532,000 | 36.44 | 89 | 0.49797 | false | 3.070866 | false | false | false |
grantcolasurdo/geras | fifth_edition/alignment.py | 1 | 3115 | """Alignment object class"""
__author__ = "Grant Colasurdo"
class Alignment:
SHORT_TO_LONG = {
'N': 'Neutral',
'G': 'Good',
'E': 'Evil',
'C': 'Chaotic',
'L': 'Lawful',
'': ''
}
def __init__(self, short_string: str=""):
if "L" in short_string:
... | gpl-2.0 | -2,634,461,766,640,477,000 | 23.527559 | 60 | 0.488925 | false | 3.32444 | false | false | false |
PJB3005/MoMMI | MoMMI/Modules/chance.py | 1 | 3714 | import asyncio
import random
from typing import Match
from discord import Message
from MoMMI import command, MChannel
@command("pick", r"(?:pick|choose)\s*\((.*?)\)")
async def pick_command(channel: MChannel, match: Match, message: Message) -> None:
choices = [x.strip() for x in match.group(1).split(",")]
if ... | mit | -9,183,143,027,374,585,000 | 37.268041 | 434 | 0.651401 | false | 3.492004 | false | false | false |
openqt/algorithms | leetcode/python/lc919-complete-binary-tree-inserter.py | 1 | 2138 | # coding=utf-8
import unittest
"""919. Complete Binary Tree Inserter
https://leetcode.com/problems/complete-binary-tree-inserter/description/
A _complete_ binary tree is a binary tree in which every level, except
possibly the last, is completely filled, and all nodes are as far left as
possible.
Write a data structu... | gpl-3.0 | -8,482,655,244,249,253,000 | 22.875 | 199 | 0.600561 | false | 3.366929 | false | false | false |
Fidge123/league-unlock-challenge | src/UpdateHallOfFame.py | 1 | 1936 | #!/usr/bin/env python3
"""Take match and player data, get champ and save it to the database"""
from os import environ
import psycopg2
# with open("db_config") as file:
# HOST = file.readline().strip()
# DBNAME = file.readline().strip()
# USER = file.readline().strip()
# PASS = file.readline().strip()
... | gpl-3.0 | -2,136,385,206,930,364,400 | 36.960784 | 134 | 0.576963 | false | 3.61194 | false | false | false |
Mandelag/util | AGSMSLayerDownloader/consolidator.py | 1 | 1493 | import os, sys, arcpy, json
def consolidate(directory, output, output_name):
#import pdb
scriptpath = sys.path[0]
inputdir = os.path.join(scriptpath, directory)
outputdir = os.path.join(scriptpath, output)
files = os.listdir(inputdir)
n_files = len(files)
jsons = []
features = {}
... | gpl-3.0 | -4,808,712,708,481,130,000 | 30.104167 | 97 | 0.556597 | false | 3.751256 | false | false | false |
boztalay/MeshnetTest | node.py | 1 | 7721 | from Tkinter import *
from basics import *
NODE_RADIUS = 5
NODE_COLOR = "green"
NODE_PENDING_COLOR = "purple"
CONNECTION_COLOR = "yellow"
PACKETS_SENT_MAX = 100
class NodeError(Exception):
pass
class Node:
def __init__(self, location):
self.location = location
self.connections = []
s... | mit | 7,091,429,230,517,577,000 | 38.594872 | 135 | 0.634892 | false | 4.424642 | false | false | false |
zhester/hzpy | examples/parseriff.py | 1 | 2368 | #!/usr/bin/env python
"""
Example RIFF (WAV contents) Data Parser
Sample data is written to a CSV file for analysis.
If matplotlib and numpy are available, signal plots (DFTs) are generated.
"""
import math
import os
import struct
import wave
try:
import matplotlib.pyplot as plot
import numpy
import nu... | bsd-2-clause | -7,917,740,915,021,355,000 | 22.919192 | 78 | 0.508868 | false | 3.819355 | false | false | false |
AnnaWyszomirska/lesson1_1 | tests/test_remove_contact_from_group.py | 1 | 1949 | from model.contact import Contact
from model.group import Group
import random
def test_remove_contact_from_group(app, db, orm):
if len(db.get_group_list()) == 0:
app.group.create(Group(name="New one"))
if len(db.get_contact_list()) == 0:
app.contact.add(Contact(firstname="Anna", middlename="Jo... | apache-2.0 | 5,070,481,090,748,076,000 | 58.090909 | 114 | 0.567984 | false | 3.615955 | false | false | false |
ext/slideshow-frontend | slideshow/lib/queue.py | 1 | 3299 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from slideshow.lib.slide import Slide
from slideshow.settings import Settings
import slideshow.event as event
import cherrypy
def div_id(id):
if id >= 0:
return 'queue_%d' % id
elif id == -1:
return 'queue_int'
else:
raise ValueError, '... | agpl-3.0 | 2,793,161,652,640,297,000 | 20.562092 | 85 | 0.449227 | false | 3.805075 | false | false | false |
marklar/fowles | py/ids_ventilator.py | 1 | 1430 | import re
import time
import zmq
#
# The input file is expected to have on each line:
# 1. a video_id
# 2. a tab
# 3. a channel_id
# The provided file (below: INPUT_FILE) matches that format.
#
# cfg
INPUT_FILE = "py/10_pairs_of_vid_and_chan_ids.txt"
PORT = 5557
# globals
context = None
pusher = None
def m... | mit | -6,243,151,740,370,340,000 | 20.029412 | 60 | 0.599301 | false | 3.023256 | false | false | false |
ThomasSweijen/TPF | doc/sphinx/conf.py | 1 | 28022 | # -*- coding: utf-8 -*-
#
# Yade documentation build configuration file, created by
# sphinx-quickstart on Mon Nov 16 21:49:34 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All co... | gpl-2.0 | -657,527,205,585,148,000 | 34.729592 | 482 | 0.695523 | false | 2.978732 | true | false | false |
armikhael/software-center | test/gtk3/test_views.py | 1 | 1845 | #!/usr/bin/python
from gi.repository import Gtk, GObject
import sys
import unittest
sys.path.insert(0,"../..")
sys.path.insert(0,"..")
#from mock import Mock
TIMEOUT=300
import softwarecenter.paths
softwarecenter.paths.datadir = "../data"
class TestViews(unittest.TestCase):
def test_viewswitcher(self):
... | gpl-3.0 | -2,807,920,920,501,459,500 | 30.271186 | 94 | 0.673713 | false | 3.639053 | true | false | false |
zhanghui9700/eonboard | eoncloud_web/biz/account/views.py | 1 | 16684 | #-*-coding-utf-8-*-
import logging
from datetime import datetime
from rest_framework import generics
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorators import api_view
from django.conf import settings
from django.contrib.auth.models import User
from django.u... | apache-2.0 | 3,498,255,991,737,627,000 | 31.972332 | 92 | 0.611664 | false | 4.188802 | false | false | false |
martindisch/Arduino | Watering/logger.py | 1 | 1285 | import os, serial, time, numpy
watchTime = 3600
measureInterval = 5
calcTime = 1.5
def receiving(ser):
global last_received
buffer_string = ''
while True:
buffer_string = buffer_string + ser.read(ser.inWaiting())
if '\n' in buffer_string:
lines = buffer_string.split('\n') # Gua... | mit | -8,848,546,226,253,781,000 | 25.770833 | 97 | 0.583658 | false | 3.463612 | false | false | false |
fahhem/plumbum | plumbum/commands/modifiers.py | 1 | 12344 | import os
from select import select
from subprocess import PIPE
import sys
from itertools import chain
from plumbum.commands.processes import run_proc, ProcessExecutionError
from plumbum.commands.base import AppendingStdoutRedirection, StdoutRedirection
from plumbum.lib import read_fd_decode_safely
class Future(obje... | mit | -2,994,591,293,210,177,000 | 35.847761 | 103 | 0.597294 | false | 4.168862 | false | false | false |
hasteur/g13bot_tools_new | scripts/maintenance/compat2core.py | 1 | 7684 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
A helper script to convert compat 1.0 scripts to the new core 2.0 framework.
NOTE: Please be aware that this script is not able to convert your codes
completely. It may support you with some automatic replacements and it gives
some warnings and hints for converting. Please... | mit | -2,691,116,725,510,714,000 | 34.906542 | 81 | 0.598386 | false | 3.748293 | false | false | false |
ActiveState/code | recipes/Python/170995_Manipulating_infinite_lists_implemented/recipe-170995.py | 1 | 3490 | """Collection of useful functions which work on infinite lists.
The infinite lists are actually the generator objects. Note that
the functions will have side effects on the passed-in gLists.
"""
from __future__ import generators
def gInfinite(obj):
"""Return infinite list of repeated objects obj"""
while 1:
... | mit | -5,975,087,572,587,617,000 | 26.698413 | 104 | 0.566476 | false | 3.301798 | false | false | false |
napalm-automation/napalm | napalm/base/netmiko_helpers.py | 1 | 1807 | # The contents of this file are licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | apache-2.0 | -5,194,614,369,650,901,000 | 36.645833 | 85 | 0.713337 | false | 3.945415 | false | false | false |
zstackio/zstack-woodpecker | integrationtest/vm/multihosts/migrate/test_migrate_vm_console_access.py | 1 | 1292 | '''
New Integration test for testing console access after vm migration between hosts.
@author: Quarkonics
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.operations.account_operations as acc_ops
vm = None
test_stub = test_lib.lib_ge... | apache-2.0 | -5,268,923,533,346,941,000 | 28.761905 | 126 | 0.651703 | false | 3.295918 | true | false | false |
xray/xray | xarray/core/options.py | 1 | 5201 | import warnings
DISPLAY_WIDTH = "display_width"
ARITHMETIC_JOIN = "arithmetic_join"
ENABLE_CFTIMEINDEX = "enable_cftimeindex"
FILE_CACHE_MAXSIZE = "file_cache_maxsize"
WARN_FOR_UNCLOSED_FILES = "warn_for_unclosed_files"
CMAP_SEQUENTIAL = "cmap_sequential"
CMAP_DIVERGENT = "cmap_divergent"
KEEP_ATTRS = "keep_attrs"
DIS... | apache-2.0 | -791,005,009,121,592,200 | 32.127389 | 86 | 0.617958 | false | 3.637063 | false | false | false |
Inspq/ansible | lib/ansible/modules/cloud/ovirt/ovirt_networks.py | 1 | 9528 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# 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
#... | gpl-3.0 | -7,966,133,857,572,089,000 | 34.552239 | 120 | 0.592045 | false | 4.305468 | false | false | false |
tanzaho/python-goose | tests/extractors.py | 1 | 18282 | # -*- coding: utf-8 -*-
"""\
This is a python port of "Goose" orignialy licensed to Gravity.com
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.
Python port was written by Xavier Grangier for Recrutae
Gravity.co... | apache-2.0 | -3,193,002,466,137,419,000 | 30.905759 | 104 | 0.639481 | false | 4.018905 | true | false | false |
SotongDJ/SotongDJ-PythonLab | Exp6-wget-batch-tools/progress/main.py | 1 | 1524 | import os
def status():
print "----RESULT-----------"
os.system("ls -1>progress/file.tmp")
for wgetlog in open("progress/file.tmp").read().splitlines():
if "wget-log" in wgetlog:
percentage="0%"
for line in open(wgetlog).read().splitlines():
if "K ." in line o... | gpl-3.0 | 8,098,244,853,867,098,000 | 42.542857 | 165 | 0.434383 | false | 4.245125 | false | false | false |
onepercentclub/django-token-auth | setup.py | 1 | 1301 | #!/usr/bin/env python
import os
import setuptools
import token_auth
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setuptools.setup(
name="django-token-auth",
version=token_a... | gpl-2.0 | -2,578,384,992,987,437,000 | 27.911111 | 78 | 0.607225 | false | 3.516216 | false | false | false |
youknowone/instantauth | python/instantauth/cryptors/aes.py | 1 | 2071 |
"""
Install 'pycrypto' package to use this module
"""
from Crypto.Cipher import AES
from . import BaseCryptor
def add_padding(data, block_size):
data_len = len(data)
pad_len = (block_size - data_len) % block_size
if pad_len == 0:
pad_len = block_size
padding = chr(pad_len)
return ''.join... | bsd-2-clause | 146,333,978,805,470,620 | 30.861538 | 89 | 0.62337 | false | 3.3136 | false | false | false |
manasgarg/flask-sauth | flask_sauth/forms.py | 1 | 3424 | #!/usr/bin/env python
from datetime import datetime
from wtforms import Form, TextField, PasswordField, HiddenField, ValidationError
from wtforms import validators as v
from models import User, authenticate
class RegistrationForm( Form):
name = TextField( validators=[v.DataRequired(), v.Length(max=256)])
ema... | bsd-3-clause | -6,195,643,495,887,408,000 | 39.282353 | 114 | 0.672897 | false | 4.22716 | false | false | false |
k-zen/Ama | ama/file_listener.py | 1 | 2550 | # -*- coding: utf-8 -*-
"""
Clase perteneciente al módulo de procesamiento de datos e inferencias Ama.
.. module:: file_listener
:platform: Unix
:synopsis: Funciones útiles para la detección de cambios en directorios. Ej. cuando se agrega un nuevo archivo de radar.
.. moduleauthor:: Andreas P. Koenzen <akc@apk... | bsd-2-clause | -5,032,125,557,542,773,000 | 37.560606 | 139 | 0.636935 | false | 3.189223 | false | false | false |
ntoll/foox | foox/species/third.py | 1 | 12608 | """
This module encapsulates the behaviour of third species counterpoint.
"""
import random
import foox.ga as ga
from .utils import is_parallel, make_generate_function, is_stepwise_motion
# Some sane defaults.
DEFAULT_POPULATION_SIZE = 4000
DEFAULT_MAX_GENERATION = 200
DEFAULT_MUTATION_RANGE = 3
DEFAULT_MUTATION_RAT... | mit | -8,580,951,361,316,207,000 | 37.206061 | 78 | 0.598509 | false | 3.806763 | true | false | false |
denibertovic/django-client-certificates | client_certs/admin.py | 1 | 1094 | from django.contrib import admin
from .models import Cert
from .cert import revoke_certificates
class CertAdmin(admin.ModelAdmin):
list_display = ('user', 'install_link', 'is_valid', 'valid_until')
fields = ('user', 'country', 'state', 'locality', 'organization',
'organizational_unit', 'common_name'... | bsd-2-clause | -7,066,993,477,669,360,000 | 32.151515 | 96 | 0.667276 | false | 3.838596 | false | false | false |
forgeservicelab/forge.insightly-sync | ldap_updater.py | 1 | 27000 | """Push updates to LDAP."""
import ldap as _ldap
import ldap.modlist as _modlist
import logging
from __init__ import sanitize, fileToRedmine
from unidecode import unidecode
from canned_mailer import CannedMailer
from insightly_updater import InsightlyUpdater
from fuzzywuzzy.process import extractOne
class ForgeLDAP(o... | mit | 6,728,499,487,768,978,000 | 51.023121 | 119 | 0.505963 | false | 4.396678 | false | false | false |
hlange/LogSoCR | pysc/usi/log/console_reporter.py | 1 | 4184 | import json
import colorlog
import logging
import logging.handlers
from elloghandler.handler import ElLogHandler
from socr_streamhandler.handler import SoCR_StreamHandler
from socr_filehandler.handler import SoCR_FileHandler
from datetime import datetime, date, time
def logger_conf(loglevel,index=None):
#Formatte... | agpl-3.0 | -30,429,728,282,431,344 | 26.526316 | 150 | 0.573853 | false | 3.65096 | false | false | false |
thewizardplusplus/micro | micro/utilities.py | 1 | 1209 | import os.path
from . import function_type
MICRO_VERSION = '2.3'
HEXADECIMAL_NUMBER = '[A-Fa-f0-9]'
def extract_and_add_function(entity, functions):
entity_type = function_type.FunctionType(
len(entity.children[0].children[1].children),
function_type.make_type(entity.children[0].children[2].child... | mit | 8,061,258,927,986,879,000 | 25.866667 | 76 | 0.65426 | false | 3.576923 | false | false | false |
kpbochenek/empireofcode | call_base.py | 1 | 1180 | # kpbochenek@gmail.com
def total_cost(calls):
result = 0
for c in calls:
length = int(c.split(' ')[2])
mins = int(round(length / 60, 0))
if mins > 100:
result += (mins - 100) * 2
mins = min(100, mins - 100)
result += mins
print(result)
retur... | apache-2.0 | 791,751,094,155,661,700 | 34.757576 | 78 | 0.482203 | false | 3.333333 | false | false | false |
waristo/opensource | tensorflow/tensorflow.py | 1 | 1806 | import tensorflow as tf #Tensorflow사용을 위한 import
from tensorflow.examples.tutorials.mnist import input_data
# Dataset loading
mnist = input_data.read_data_sets("./samples/MNIST_data/", one_hot=True)
# Set up model
x = tf.placeholder(tf.float32, [None, 784]) #심볼릭 변수들을 사용하여 상호작용하는 작업들을 기술
W = tf.Variable(tf.... | gpl-3.0 | -6,607,569,596,838,577,000 | 41.411765 | 110 | 0.660194 | false | 1.620225 | false | false | false |
jgorgulho/installs | workstationInstall.py | 1 | 8596 | #!/bin/env python
import os
import sys
import shlex
import subprocess
import shutil
#
# Constants
#
WELCOME_STRING = """
########################################################
# Running Installation Script for Workstation #
########################################################\n\n\n
"""
RAN_SCRIP_ST... | gpl-3.0 | -5,450,493,732,590,814,000 | 31.684411 | 105 | 0.684388 | false | 3.480162 | false | false | false |
justinvforvendetta/electrum-rby | gui/qt/qrcodewidget.py | 1 | 3721 | from PyQt4.QtGui import *
from PyQt4.QtCore import *
import PyQt4.QtCore as QtCore
import PyQt4.QtGui as QtGui
import os
import qrcode
import electrum_rby
from electrum_rby import bmp
from electrum_rby.i18n import _
class QRCodeWidget(QWidget):
def __init__(self, data = None, fixedSize=False):
QWidget.... | gpl-3.0 | 1,245,174,242,556,951,300 | 26.768657 | 113 | 0.52244 | false | 3.662402 | false | false | false |
jmrozanec/white-bkg-classification | scripts/preprocessing.py | 1 | 1441 | #https://github.com/tflearn/tflearn/issues/180
from __future__ import division, print_function, absolute_import
import tflearn
from tflearn.data_utils import shuffle, to_categorical
from tflearn.layers.core import input_data, dropout, fully_connected
from tflearn.layers.conv import conv_2d, max_pool_2d
from tflearn.la... | apache-2.0 | 3,670,213,307,102,543,000 | 36.921053 | 164 | 0.76891 | false | 3.216518 | false | false | false |
dimonaks/siman | siman/functions.py | 1 | 29689 |
from __future__ import division, unicode_literals, absolute_import
import os, tempfile, copy, math, itertools, sys
import numpy as np
from operator import itemgetter
from itertools import product
try:
import scipy
except:
print('functions.py: no scipy, smoother() will not work()')
from siman import header
... | gpl-2.0 | -4,048,599,918,254,212,600 | 27.993164 | 209 | 0.548688 | false | 3.113686 | false | false | false |
lukecampbell/compliance-checker | compliance_checker/tests/test_ioos_sos.py | 1 | 2367 | import unittest
from compliance_checker.suite import CheckSuite
from compliance_checker.runner import ComplianceChecker
import os
import httpretty
# TODO: Use inheritance to eliminate redundant code in test setup, etc
class TestIOOSSOSGetCapabilities(unittest.TestCase):
def setUp(self):
with open(os.path... | apache-2.0 | -7,692,406,608,126,215,000 | 44.519231 | 95 | 0.652725 | false | 3.698438 | true | false | false |
steabert/molpy | molpy/molden.py | 1 | 5280 | # molden.py -- Molden format
# Implements the Molden file format, specification can be found here:
# http://www.cmbi.ru.nl/molden/molden_format.html
#
# Copyright (c) 2016 Steven Vancoillie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | gpl-2.0 | 4,687,063,611,598,560,000 | 35.413793 | 94 | 0.575568 | false | 3.406452 | false | false | false |
SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/script.cu.lrclyrics/resources/lib/culrcscrapers/alsong/lyricsScraper.py | 1 | 3106 | # -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
"""
Scraper for http://lyrics.alsong.co.kr/
edge
"""
import sys
import socket
import hashlib
import urllib2
import xml.dom.minidom as xml
from utilities import *
from audiofile import AudioFile
__title__ = "Alsong"
__priority__ = '115'
__lrc_... | gpl-2.0 | -7,442,588,133,466,447,000 | 32.021277 | 344 | 0.585052 | false | 3.170582 | false | false | false |
dderevjanik/agescx | agescx/scenario.py | 1 | 3376 | from .models import *
from .controller import *
from .utilities import *
# utilities
from .decompress import *
from .compress import *
class Scenario:
""" Scenario class """
def __init__(self, filename=None, ver=1.21):
"""create scenario with defaults values,
check default.txt for more i... | mit | 6,019,703,332,485,331,000 | 28.876106 | 84 | 0.544135 | false | 4.442105 | false | false | false |
deanishe/alfred-packal-search | src/workflow/workflow.py | 1 | 98456 | # encoding: utf-8
#
# Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2014-02-15
#
"""The :class:`Workflow` object is the main interface to this library.
:class:`Workflow` is targeted at Alfred 2. Use
:class:`~workflow.Workflow3` if you wa... | mit | -8,473,999,698,847,352,000 | 31.602193 | 94 | 0.547717 | false | 4.174823 | false | false | false |
InUrSys/PescArt2.0 | src/srcPlus/GenericPesquisas.py | 1 | 10030 | '''
Created on 13/12/2017
@author: chernomirdinmacuvele
'''
from PyQt5.Qt import QDialog, QModelIndex, QStandardItemModel, QStandardItem,\
QGroupBox
import mixedModel
import QT_tblViewUtility
import rscForm
import frmPesquisa_Sort
class GenericPesquisas(QDialog):
def configCombox(self):
'''
... | gpl-3.0 | -1,872,132,791,458,829,000 | 48.905473 | 185 | 0.54008 | false | 3.713439 | false | false | false |
clemenshage/grslra | smmprod/__init__.py | 1 | 1426 | # # -*- coding: utf-8 -*-
import numpy as np
from . import _smmprod
def smmprod_c(A, B, Omega):
# out wird hier preallocated, kann in Schleifen dann wiederverwendet werden
out = np.zeros(Omega[0].shape[0])
_smmprod.smmprod(A, B, Omega, out)
return out
# def smmprod(A, B, Omega):
# A_rows = A[Omeg... | mit | -1,816,194,977,066,251,800 | 28.040816 | 81 | 0.602249 | false | 2.269537 | false | false | false |
krount/sslyze | sslyze/plugins/heartbleed_plugin.py | 1 | 6967 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import socket
import types
from xml.etree.ElementTree import Element
from nassl._nassl import WantReadError
from sslyze.plugins import plugin_base
from sslyze.plugins.plugin_base import PluginScanResult, PluginScan... | gpl-2.0 | 521,774,391,793,940,600 | 37.705556 | 120 | 0.679776 | false | 3.78025 | true | false | false |
keseldude/brobot | brobot/plugins/users.py | 1 | 1217 | #===============================================================================
# brobot
# Copyright (C) 2010 Michael Keselman
#
# 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... | gpl-3.0 | -2,537,083,521,998,450,000 | 40.965517 | 80 | 0.624486 | false | 4.457875 | false | false | false |
amstart/demo | vote/polls/forms.py | 1 | 1604 | from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field
from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions
class PremiseForm(forms.Form):
radio_buttons = form... | mit | -2,778,027,478,078,338,600 | 33.12766 | 121 | 0.613466 | false | 3.828162 | false | false | false |
nicfitzgerald/pyrogue-game | map_utils.py | 1 | 4764 | from tdl.map import Map
from random import randint
from components.ai import BasicMonster
from components.fighter import Fighter
from entity import Entity
class GameMap(Map):
def __init__(self, width, height):
super().__init__(width, height)
self.explored = [[False for y in range(height)] for x in ... | gpl-3.0 | 7,027,452,467,717,760,000 | 37.12 | 96 | 0.561293 | false | 3.412607 | false | false | false |
open-synergy/opnsynid-l10n-indonesia | l10n_id_taxform_faktur_pajak_common/models/faktur_pajak_common.py | 1 | 24141 | # -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api
import openerp.addons.decimal_precision as dp
from datetime import datetime
import re
class FakturPajakCommon(models.AbstractModel):
... | agpl-3.0 | -7,488,912,429,143,546,000 | 27.440244 | 77 | 0.518413 | false | 3.606903 | false | false | false |
kije/PySpyX | pyspy/migrations/0004_auto_20150515_1104.py | 1 | 1390 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('pyspy', '0003_surveillancevideos'),
]
operations = [
migrations.CreateModel(
name='SurveillanceVideo',
... | gpl-3.0 | 2,700,681,298,944,059,000 | 36.567568 | 109 | 0.553237 | false | 4.357367 | false | false | false |
misabelcarde/kivy-mobile-computing | src/BoardPlay.py | 1 | 3832 | from kivy.uix.gridlayout import GridLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
from Singleton import *
from Instructions import Instructions
from OwnBoard import BaseOwnBoard
from BoardFunctions import *
from SendPackage import *
from kivy.lang import Builder
Builder.load_string('''
<B... | mit | 9,012,469,336,740,509,000 | 29.388889 | 105 | 0.627743 | false | 2.816777 | false | false | false |
ravenshooter/BA_Analysis | Preprocess.py | 1 | 5604 |
import numpy
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import scipy
import mdp
import csv
from thread import start_new_thread
import DataSet
from DataAnalysis import plot
from Main import getProjectPath
def readFileToNumpy(fileName):
reader=csv.reader(open(fileName,"rb"),delimiter=... | mit | 5,430,040,770,081,094,000 | 27.74359 | 138 | 0.618487 | false | 3.277193 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.