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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cidadania/ecidadania-ng | src/ecidadania/views/invite.py | 2 | 2374 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Clione Software
# Copyright (c) 2010-2013 Cidadania S. Coop. Galega
#
# 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.or... | apache-2.0 | 8,266,754,755,651,584,000 | 40.649123 | 130 | 0.670598 | false | 4.086059 | false | false | false |
robdennis/sideboard | tests/plugins/different_versions/rdflib3_0_0/env/lib/python2.7/site-packages/rdflib/plugins/parsers/ntriples.py | 7 | 6700 | #!/usr/bin/env python
__doc__="""
N-Triples Parser
License: GPL 2, W3C, BSD, or MIT
Author: Sean B. Palmer, inamidst.com
Documentation: http://inamidst.com/proj/rdf/ntriples-doc
Command line usage::
./ntriples.py <URI> - parses URI as N-Triples
./ntriples.py --help - prints out this help message
# @@ fu... | bsd-3-clause | -4,974,506,439,557,729,000 | 25.693227 | 73 | 0.564776 | false | 3.298868 | false | false | false |
x4dr/NossiNet | NossiPack/krypta.py | 1 | 4355 | import ctypes
import os
import random
import sqlite3
import threading
from contextlib import closing
from decimal import ROUND_HALF_UP, Decimal
from pathlib import Path
import numexpr
import Data
class DescriptiveError(Exception):
pass
def tuple_overlap(a: tuple, b: tuple) -> bool:
"""
checks if the f... | gpl-2.0 | 6,972,973,575,226,754,000 | 23.744318 | 91 | 0.554994 | false | 3.50362 | false | false | false |
stanta/darfchain | ICO/ico/cmd/rawinvestments.py | 1 | 2095 | """Extract crowdsale raw investmetn data."""
import csv
import datetime
import click
from eth_utils import from_wei
from populus import Project
@click.command()
@click.option('--chain', nargs=1, default="mainnet", help='On which chain to deploy - see populus.json')
@click.option('--address', nargs=1, help='Crowdsale... | gpl-3.0 | -3,446,575,058,190,066,000 | 33.916667 | 112 | 0.603819 | false | 3.865314 | false | false | false |
ssyuzev/django-mailbox | django_mailbox/migrations/0009_remove_references_table.py | 3 | 2544 | # -*- 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):
# Removing M2M table for field references on 'Message'
db.delete_table('django_mailbox_message_references')
... | mit | -4,273,775,299,072,861,000 | 52 | 181 | 0.580582 | false | 3.763314 | false | false | false |
helixyte/TheLMA | thelma/tools/iso/libcreation/jobcreator.py | 1 | 5642 | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Creator for library creation ISO jobs.
"""
from thelma.tools.semiconstants import \
get_rack_specs_from_reservoir_specs
from thelma.tools.semiconstants i... | mit | -9,135,050,248,493,287,000 | 42.736434 | 80 | 0.610599 | false | 4.004258 | false | false | false |
pydcs/dcs | dcs/vehicles.py | 1 | 60786 | # This file is generated from pydcs_export.lua
import dcs.unittype as unittype
class Artillery:
class _2B11_mortar(unittype.VehicleType):
id = "2B11 mortar"
name = "Mortar 2B11 120mm"
detection_range = 0
threat_range = 7000
air_weapon_dist = 7000
class SAU_Gvozdika(u... | lgpl-3.0 | -7,687,351,654,465,233,000 | 28.11159 | 82 | 0.579633 | false | 2.859798 | false | false | false |
umkcdcrg01/ryu_openflow | ryu/app/host_tracker_rest.py | 1 | 3378 | # Copyright (C) 2014 SDN Hub
#
# Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.
# You may not use this file except in compliance with this License.
# You may obtain a copy of the License at
#
# http://www.gnu.org/licenses/gpl-3.0.txt
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | 2,639,174,920,022,244,400 | 32.117647 | 109 | 0.647128 | false | 3.636168 | false | false | false |
mikeywaites/flask-arrested | tests/test_handlers.py | 1 | 3543 | import pytest
import json
from mock import patch
from werkzeug.exceptions import BadRequest
from arrested import (
Handler, Endpoint, ResponseHandler,
RequestHandler, JSONRequestMixin, JSONResponseMixin)
def test_handler_params_set():
endpoint = Endpoint()
handler = Handler(endpoint, payload_key='f... | mit | -4,878,512,467,761,809,000 | 26.679688 | 88 | 0.620943 | false | 3.945434 | true | false | false |
paulmadore/Eric-IDE | 6-6.0.9/eric/Helpviewer/Passwords/PasswordsDialog.py | 2 | 3538 | # -*- coding: utf-8 -*-
# Copyright (c) 2009 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a dialog to show all saved logins.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import pyqtSlot, QSortFilterProxyModel
from PyQt5.QtGui import QFont, QFontMetrics
from PyQt5.QtW... | gpl-3.0 | 4,459,828,073,297,611,000 | 35.474227 | 79 | 0.628321 | false | 4.478481 | false | false | false |
gtesei/fast-furious | competitions/microsoft-malware-prediction/base.py | 1 | 8792 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 1 23:05:32 2019
@author: gtesei
"""
import pandas as pd
import numpy as np
import lightgbm as lgb
#import xgboost as xgb
from scipy.sparse import vstack, csr_matrix, save_npz, load_npz
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
from sklearn.model_sele... | mit | 2,492,126,143,849,511,400 | 51.963855 | 99 | 0.433576 | false | 4.639578 | true | false | false |
CyBHFal/plugin.video.freplay | resources/lib/channels/rtbf.py | 2 | 1735 | # -*- coding: utf-8 -*-
from resources.lib import utils
import re
title = ['RTBF Auvio']
img = ['rtbf']
readyForUse = True
url_root = 'http://www.rtbf.be/auvio'
categories = {
'/categorie/series?id=35': 'Séries',
'/categorie/sport?id=9': 'Sport',
'/categorie/divertissement?id=29': 'Divertissement',
... | gpl-2.0 | -7,676,071,606,240,000,000 | 33 | 121 | 0.622261 | false | 2.851974 | false | false | false |
CWTGMBH/ERPNext2Alfresco | erpnext2alfresco/actions/cmislibalf/extension.py | 1 | 13272 | #
# 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 ... | mit | -2,067,185,787,698,772,500 | 41.379085 | 141 | 0.606088 | false | 4.228098 | false | false | false |
nrkumar93/bnr_workspace | label_training_detection/scripts/visualize_classifier.py | 1 | 4111 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# visualize_classifier.py
#
# Copyright 2016 Ramkumar Natarajan <ram@ramkumar-ubuntu>
#
# 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; e... | gpl-3.0 | -4,139,936,041,857,228,000 | 33.838983 | 140 | 0.622476 | false | 3.312651 | false | false | false |
Bojak4616/Mobile_Phone_Tracking | utils/deauth.py | 1 | 2188 | #!/usr/bin/python
import argparse
import subprocess
from sys import exit
from scapy.all import *
# Credit: https://gist.githubusercontent.com/jordan-wright/4576966/raw/5f17c9bfb747d6b2b702df3630028a097be8f399/perform_deauth.py
def deauth(iface, ap, client, count, channel):
subprocess.call(['iwconfig', iface, 'chan... | mit | -4,704,566,407,926,638,000 | 45.553191 | 143 | 0.653565 | false | 3.290226 | false | false | false |
astocko/statsmodels | statsmodels/stats/tests/results/results_panelrobust.py | 37 | 3264 | import numpy as np
cov_clu_stata = np.array([ .00025262993207,
-.00065043385106,
.20961897960949,
-.00065043385106,
.00721940994738,
-1.2171040967615,
.20961897... | bsd-3-clause | -4,662,529,930,910,888,000 | 40.316456 | 226 | 0.401348 | false | 3.853601 | false | false | false |
InverseLina/python-practice | DataBase/Postgres/PostgresTest.py | 1 | 2205 | import psycopg2
# encoding=utf-8
__author__ = 'Hinsteny'
def get_conn():
conn = psycopg2.connect(database="hello_db", user="hinsteny", password="welcome", host="127.0.0.1", port="5432")
return conn
def create_table(conn):
cur = conn.cursor()
cur.execute('''CREATE TABLE if not exists COMPANY
... | apache-2.0 | -7,581,728,928,613,393,000 | 23.5 | 116 | 0.564626 | false | 3.233138 | false | false | false |
jamilatta/opac_ssm | grpc_ssm/grpc_server.py | 1 | 9839 | #!/usr/bin/env python
import time
import logging
import json
from concurrent import futures
import grpc
from grpc_ssm import opac_pb2
from grpc_health.v1 import health
from grpc_health.v1 import health_pb2
from celery.result import AsyncResult
from assets_manager import tasks
from assets_manager import models
MAX_... | bsd-3-clause | -7,292,785,968,008,391,000 | 30.838188 | 97 | 0.584875 | false | 4.01551 | false | false | false |
colloquium/spacewalk | backend/server/taskomatic.py | 1 | 2010 |
"""
Module for taskomatic related functions (inserting into queues, etc)
"""
from spacewalk.server import rhnSQL
class RepodataQueueEntry(object):
def __init__(self, channel, client, reason, force=False,
bypass_filters=False):
self.channel = channel
self.client = client
self.... | gpl-2.0 | -5,680,111,563,538,335,000 | 29.454545 | 78 | 0.610448 | false | 3.996024 | false | false | false |
geobricks/pgeo | pgeo/gis/raster_scatter_workers.py | 1 | 14596 | import numpy as np
from osgeo import gdal
from pgeo.gis.raster import get_nodata_value
import time
# from pylab import hexbin,show
# from scipy.ndimage import measurements
# from scipy.stats import itemfreq
# import rasterio
from pysal.esda import mapclassify
import brewer2mpl
from threading import Thread
# import Queu... | gpl-2.0 | -3,450,618,132,551,992,300 | 31.7287 | 187 | 0.564744 | false | 3.369344 | false | false | false |
andrei4ka/fuel-web-redhat | fuel_agent/fuel_agent/drivers/nailgun.py | 1 | 17344 | # Copyright 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | -1,639,415,933,257,223,700 | 45.005305 | 79 | 0.520699 | false | 4.327345 | true | false | false |
umitproject/openmonitor-aggregator | model_utils/choices.py | 1 | 2893 | class Choices(object):
"""
A class to encapsulate handy functionality for lists of choices
for a Django model field.
Each argument to ``Choices`` is a choice, represented as either a
string, a two-tuple, or a three-tuple.
If a single string is provided, that string is used as the
database ... | agpl-3.0 | 433,746,921,144,594,300 | 37.573333 | 98 | 0.620809 | false | 4.606688 | false | false | false |
MathieuLeocmach/colloids | python/colloids/povray.py | 1 | 9924 | ## {{{ http://code.activestate.com/recipes/205451/ (r1)
import sys, os
import numpy as np
import networkx as nx
#from pygraph.classes.graph import graph
#from pygraph.algorithms.accessibility import connected_components
class File:
def __init__(self,fnam="out.pov",*items):
self.file = open(fnam,"w")
self.__i... | gpl-3.0 | 7,666,974,326,671,625,000 | 29.819876 | 139 | 0.556429 | false | 3.027456 | false | false | false |
masteroncluster/py-censure | censure/base.py | 1 | 15444 | # -*- coding: utf-8 -*-
# Author: masteroncluster@gmail.com
# Py-Censure is an obscene words detector/replacer for Russian / English languages
# Russian patterns are from PHP-Matotest, http://php-matotest.sourceforge.net/,
# that was written by Scarab
# Ported to Python by Master.Cluster <masteroncluster@gmail.c... | gpl-3.0 | 1,629,060,773,592,175,900 | 34.916279 | 98 | 0.520267 | false | 3.785294 | false | false | false |
bigswitch/nova | nova/console/manager.py | 1 | 4707 | # Copyright (c) 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | -7,606,692,687,360,827,000 | 39.577586 | 78 | 0.575313 | false | 4.491412 | false | false | false |
arbrandes/django-oscar-vat_moss | tests/test_forms.py | 1 | 4943 | # coding=utf-8
from __future__ import print_function, unicode_literals
from django.test import TestCase
from oscar.core.compat import get_user_model
from oscar_vat_moss.address.forms import UserAddressForm
from oscar_vat_moss.address.models import Country
User = get_user_model()
class UserAddressFormTest(TestCase):... | bsd-3-clause | -8,278,369,489,824,878,000 | 33.531469 | 78 | 0.541515 | false | 3.76659 | true | false | false |
rbharath/vs-utils | vs_utils/utils/pdb_utils.py | 3 | 3495 | """
Handle PDB files.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "BSD 3-clause"
from collections import OrderedDict
class PdbReader(object):
"""
Handle PDB files.
Also supports conversion from PDB to Amber-style PQR files.
"""
def parse... | gpl-3.0 | 635,821,456,009,302,500 | 28.618644 | 79 | 0.515308 | false | 4.008028 | false | false | false |
soarlab/gelpia | src/frontend/function_transforms/pass_lift_consts.py | 1 | 6605 |
import sys
from expression_walker import walk
from pass_utils import BINOPS, UNOPS
try:
import gelpia_logging as logging
import color_printing as color
except ModuleNotFoundError:
sys.path.append("../")
import gelpia_logging as logging
import color_printing as color
logger = logging.make_module_l... | mit | -6,429,824,082,319,303,000 | 29.437788 | 80 | 0.537926 | false | 3.543455 | false | false | false |
awuth/bot-mv-telegram | modules/reddit.py | 1 | 2024 | import threading
import queue
import modules.loggers
import logging
from modules.tools import GetJson
logger = logging.getLogger(__name__)
porn_dict = dict()
lock = threading.Lock()
def Reddits(key):
global porn_dict # un poco guarrete...
if key in porn_dict.keys():
try:
lock.acquire()
... | gpl-3.0 | -6,717,088,257,358,481,000 | 34.508772 | 120 | 0.561759 | false | 3.550877 | false | false | false |
jcan37/startupcrate | app/views.py | 1 | 7575 | from app.models import Address, Subscription
from django.contrib.auth import authenticate, login, logout, update_session_auth_hash
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from django.shortcuts import render
from i... | mit | 7,088,152,949,236,364,000 | 38.659686 | 114 | 0.60198 | false | 4.363479 | false | false | false |
quantopian/zipline | tests/pipeline/test_pipeline_algo.py | 1 | 27098 | """
Tests for Algorithms using the Pipeline API.
"""
from os.path import (
dirname,
join,
realpath,
)
from nose_parameterized import parameterized
import numpy as np
from numpy import (
array,
arange,
full_like,
float64,
nan,
uint32,
)
from numpy.testing import assert_almost_equal
i... | apache-2.0 | -4,739,068,483,770,382,000 | 33.301266 | 79 | 0.56458 | false | 4.068158 | true | false | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.3/Lib/sre_parse.py | 3 | 24761 | #
# Secret Labs' Regular Expression Engine
#
# convert re-style regular expression to sre pattern
#
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved.
#
# See the sre.py file for information on usage and redistribution.
#
"""Internal support module for sre"""
# XXX: show string offset and offending ch... | mit | 5,199,229,913,976,841,000 | 32.506089 | 78 | 0.448851 | false | 4.455821 | false | false | false |
edonyM/toolkitem | updatesys/kernelclean.py | 1 | 8622 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
r"""
# .---. .-----------
# / \ __ / ------
# / / \( )/ ----- (`-') _ _(`-') <-. (`-')_
# ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .->
# //// / // : : --- (,------... | mit | -4,482,638,685,100,434,400 | 36.982379 | 93 | 0.454651 | false | 3.936986 | false | false | false |
pyblish/pyblish-mindbender | mindbender/tools/loader/app.py | 1 | 9863 | import os
import sys
import itertools
from ...vendor.Qt import QtWidgets, QtCore
from ... import api
from .. import lib
self = sys.modules[__name__]
self._window = None
# Store previous results from api.ls()
self._cache = list()
self._use_cache = False
# Custom roles
AssetRole = QtCore.Qt.UserRole + 1
SubsetRole =... | mit | 8,429,649,018,812,399,000 | 28.441791 | 74 | 0.513738 | false | 4.448805 | false | false | false |
jpavel/cms-ucl-tau | SFrame/bin/sframe_parMaker.py | 1 | 3110 | #!/usr/bin/env python
# $Id: sframe_parMaker.py 344 2012-12-13 13:10:53Z krasznaa $
#***************************************************************************
#* @Project: SFrame - ROOT-based analysis framework for ATLAS
#* @Package: Core
#*
#* @author Stefan Ask <Stefan.Ask@cern.ch> - Manchester
#* @... | mit | 6,622,113,963,117,501,000 | 42.194444 | 80 | 0.533119 | false | 4.119205 | false | false | false |
WilliamDiakite/ExperimentationsACA | processing/basic_text_processing.py | 1 | 4416 |
import nltk
import re
import sys
import math
import matplotlib.pyplot as plt
from nltk import ne_chunk
from nltk.util import ngrams
from wordcloud import WordCloud, STOPWORDS
from collections import defaultdict, Counter
from pos_tagger import POSTagger
sys.path.insert(
0, '/Users/diakite_w/Documents/Dev/Experim... | mit | 3,313,733,803,383,973,400 | 22.089005 | 82 | 0.608617 | false | 3.186416 | false | false | false |
Stargrazer82301/CAAPR | CAAPR/CAAPR_AstroMagic/PTS/pts/magic/plot/imagegrid.py | 1 | 23629 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | mit | 437,920,909,444,803,900 | 30.462051 | 198 | 0.509819 | false | 3.697074 | false | false | false |
arbuz001/sms-tools | workspace/A6/A6Part1.py | 1 | 5633 | import os
import sys
import numpy as np
import math
from scipy.signal import get_window
import matplotlib.pyplot as plt
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../software/models/'))
import utilFunctions as UF
import harmonicModel as HM
import sineModel as SM
import stft
import d... | agpl-3.0 | 1,876,600,063,382,683,600 | 41.674242 | 103 | 0.693591 | false | 3.599361 | false | false | false |
aliparsai/LittleDarwin | littledarwin/JavaIO.py | 1 | 6794 | import fnmatch
import io
import os
import shutil
from typing import Dict, List
class JavaIO(object):
"""
"""
def __init__(self, verbose=False):
self.verbose = False
self.sourceDirectory = None
self.targetDirectory = None
self.fileList = list()
def filterFiles(self, m... | gpl-3.0 | -3,523,335,284,614,272,500 | 34.94709 | 131 | 0.59479 | false | 4.254227 | false | false | false |
jgillis/casadi | documentation/api-doc/extra/doxy2swigX.py | 1 | 5378 | #
# This file is part of CasADi.
#
# CasADi -- A symbolic framework for dynamic optimization.
# Copyright (C) 2010 by Joel Andersson, Moritz Diehl, K.U.Leuven. All rights reserved.
#
# CasADi is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Pub... | lgpl-3.0 | -6,184,439,807,509,266,000 | 31.203593 | 90 | 0.544812 | false | 3.714088 | false | false | false |
DxCx/plugin.video.9anime | resources/lib/ui/js2py/constructors/jsarraybuffer.py | 22 | 1059 | # this is based on jsarray.py
# todo check everything :)
from ..base import *
try:
import numpy
except:
pass
@Js
def ArrayBuffer():
a = arguments[0]
if isinstance(a, PyJsNumber):
length = a.to_uint32()
if length!=a.value:
raise MakeError('RangeError', 'Invalid array lengt... | gpl-3.0 | -1,120,671,688,988,825,900 | 30.147059 | 78 | 0.494806 | false | 4.880184 | false | false | false |
jungle85gopy/pyPractice | class_demo/class_demo.py | 1 | 1874 | #!/usr/bin/env python
# coding=utf-8
def func1(lens):
for i in xrange(lens):
print(i)
def p1():
print(" ... 1")
def p2():
print(" ... 2")
def pxx():
print(" ... pxx")
# test func
def test_func():
print('\n------- test func ------')
print("... style 1 ...")
func1(3)
pri... | gpl-2.0 | -6,402,338,555,262,592,000 | 16.514019 | 68 | 0.51334 | false | 3.181664 | true | false | false |
ZeitOnline/zeit.content.image | src/zeit/content/image/metadata.py | 1 | 5422 | from zeit.cms.content.interfaces import WRITEABLE_ALWAYS
import grokcore.component as grok
import lxml.objectify
import zeit.cms.content.dav
import zeit.content.image.interfaces
import zeit.content.image.image
import zope.component
import zope.interface
import zope.schema
class ImageMetadata(object):
zope.interf... | bsd-3-clause | -102,362,284,878,301,070 | 35.884354 | 79 | 0.655662 | false | 3.909156 | false | false | false |
azumimuo/family-xbmc-addon | plugin.video.hive/default.py | 1 | 36889 | '''
Hive for XBMC Plugin
Copyright (C) 2013-2014 ddurdle
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... | gpl-2.0 | -1,367,562,831,503,683,000 | 34.849368 | 302 | 0.576161 | false | 4.247927 | false | false | false |
samitnuk/urlsaver | app/forms.py | 1 | 2339 | from flask.ext.wtf import Form
# from flask.ext.wtf.file import FileField, FileRequired, FileAllowed
from wtforms import TextField, PasswordField, validators
from app import db
from models import User, Locator
#----------------------------------------------------------------------------
class LoginForm(Form):
ema... | mit | 2,473,511,311,918,441,000 | 40.035088 | 79 | 0.536554 | false | 5.174779 | false | false | false |
Kronuz/pyXapiand | xapiand/platforms.py | 1 | 19568 | from __future__ import unicode_literals, absolute_import, print_function
import os
import sys
import math
import errno
import atexit
import importlib
import signal as _signal
import numbers
import itertools
try:
from io import UnsupportedOperation
FILENO_ERRORS = (AttributeError, ValueError, UnsupportedOperat... | gpl-2.0 | 7,963,018,132,772,073,000 | 28.425564 | 79 | 0.585139 | false | 4.043811 | false | false | false |
vicnala/ampabooks | config.py | 1 | 1274 | import web
import os.path
import sys
import shutil
DATABASE = 'db/libros.sqlite'
def _touch(fname, times=None):
fhandle = open(fname, 'a')
try:
os.utime(fname, times)
finally:
fhandle.close()
return True
return False
def _init():
import sqlite3
conn = sqlite3.connect(... | gpl-3.0 | 4,701,388,009,988,527,000 | 21.767857 | 131 | 0.629513 | false | 3.326371 | false | false | false |
multiphrenic/GooeyPi | gooeypi/util.py | 1 | 1052 | import os
import subprocess
import sys
import controller
def pyversion(installdir):
config = controller.getConfig()
sys.path.insert(0, installdir)
from PyInstaller import get_version
return float(get_version()[:3])
def getflags(fname):
config = controller.getConfig()
flags=[]
flags.append(... | gpl-2.0 | 7,363,234,715,685,705,000 | 28.222222 | 92 | 0.618821 | false | 3.839416 | true | false | false |
gnovis/scheduler | scheduler.py | 1 | 13569 | #!/usr/bin/env python3
import argparse
import json
import time
import subprocess
import fcntl
import errno
import datetime
import os
import sys
import signal
import threading
import shlex
# CONSTANTS - Scheduler settings
SEC_DELAY = 3
PATH = "/tmp/"
GPU_INFO_FILE = os.path.join(PATH, "gpu_scheduler_info")
DEFAULT_GPU... | mit | 5,005,323,656,014,090,000 | 32.503704 | 121 | 0.552509 | false | 3.686227 | false | false | false |
brkt/brkt-cli | brkt_cli/config/__init__.py | 1 | 23015 | # Copyright 2017 Bracket Computing, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# https://github.com/brkt/brkt-cli/blob/master/LICENSE
#
# or in the "license" file... | apache-2.0 | 6,100,424,114,709,933,000 | 32.59854 | 91 | 0.578883 | false | 4.143114 | true | false | false |
sbussmann/kaggle-right-whale | Code/whaleutil.py | 1 | 3147 | """
2015 September 30
Shane Bussmann
Find the whale. Model the whale as a rectangle with aspect ratio = 3.0.
"""
import numpy as np
from skimage.color import rgb2gray, rgb2hsv
from scipy.ndimage import gaussian_filter
def xy_rotate(x, y, x0, y0, phi):
phirad = np.deg2rad(phi)
xnew = (x - x0) * np.cos(phi... | mit | -8,273,047,915,708,201,000 | 24.585366 | 72 | 0.568796 | false | 2.637888 | false | false | false |
vipod/pyzimbra | test/base.py | 3 | 2551 | # -*- coding: utf-8 -*-
"""
################################################################################
# Copyright (c) 2010, Ilgar Mashayev
#
# E-mail: pyzimbra@lab.az
# Website: http://github.com/ilgarm/pyzimbra
################################################################################
# This file is part... | lgpl-3.0 | 766,115,566,635,475,800 | 41.516667 | 80 | 0.53626 | false | 4.45979 | false | false | false |
praekelt/sideloader | skeleton/settings.py | 1 | 6214 | # Django settings for skeleton project.
import os, datetime, socket
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
def abspath(*args):
"""convert relative paths to absolute paths relative to PROJECT_ROOT"""
return os.path.join(PROJECT_ROOT, *args)
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = ... | mit | 2,228,628,026,273,977,300 | 30.226131 | 88 | 0.701641 | false | 3.668241 | false | false | false |
tavallaie/pypot | pypot/server/snap.py | 1 | 10724 | import os
import shutil
import bottle
import socket
import re
import logging
from ast import literal_eval as make_tuple
from ..utils.appdirs import user_data_dir
from .server import AbstractServer
from .httpserver import EnableCors
logger = logging.getLogger(__name__)
def get_snap_user_projects_directory():
snap... | gpl-3.0 | 4,437,873,530,799,601,700 | 40.727626 | 114 | 0.596512 | false | 3.79745 | false | false | false |
MaterialsDiscovery/PyChemia | pychemia/analysis/matching.py | 1 | 5441 | import numpy as np
from pychemia.utils.mathematics import lcm, shortest_triple_set
from pychemia import Structure
import itertools
class StructureMatch:
def __init__(self, structure1, structure2):
"""
Creates a structure match between 2 structures
The structures will be change to match the... | mit | -5,938,888,186,492,161,000 | 40.853846 | 115 | 0.570851 | false | 3.986081 | false | false | false |
rosswhitfield/mantid | scripts/Diffraction/isis_powder/hrpd.py | 3 | 9155 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
impo... | gpl-3.0 | -5,944,348,338,016,820,000 | 48.755435 | 116 | 0.64391 | false | 3.744376 | false | false | false |
fengyuanjs/catawampus | dm/storage.py | 6 | 15462 | #!/usr/bin/python
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | -1,964,247,422,968,195,000 | 27.475138 | 86 | 0.667895 | false | 3.429142 | false | false | false |
polyaxon/polyaxon | core/polyaxon/polytune/matrix/utils.py | 1 | 7553 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | apache-2.0 | -4,968,710,938,983,054,000 | 29.828571 | 85 | 0.677214 | false | 3.668286 | false | false | false |
cocreature/pytracer | color.py | 1 | 2055 | def dot(a, b):
''' Matrixmultiplication
:param RaytracerColor a: color triple
:param RaytracerColor b: color triple
:returns matrixmultiplicition of a and b
'''
return RaytracerColor(a.r * b.r, a.g * b.g, a.b * b.b)
class RaytracerColor:
''' represents a color
'''
def _... | mit | -8,807,139,461,773,170,000 | 28.782609 | 73 | 0.526521 | false | 3.637168 | false | false | false |
boxcontrol/lowendspirit | lowendspirit/solusvmAPI.py | 1 | 2282 | import requests
class Solus_Enduser_API:
def __init__(self, url, api_hash, api_key):
self.url = url
self.api_hash = api_hash
self.api_key = api_key
self.values = ({'rdtype': 'json', 'hash': self.api_hash, 'key': self.api_key})
def to_json(self, data):
data=data.replace(... | mit | -4,944,491,562,993,256,000 | 36.409836 | 106 | 0.556529 | false | 3.346041 | false | false | false |
endlessm/chromium-browser | third_party/grpc/src/test/cpp/naming/utils/run_dns_server_for_lb_interop_tests.py | 5 | 4060 | #!/usr/bin/env python2.7
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | bsd-3-clause | -3,485,082,946,779,672,600 | 36.247706 | 85 | 0.632512 | false | 3.80863 | true | false | false |
jackzhao-mj/ok-client | client/utils/timer.py | 1 | 1403 | """Timeout mechanism."""
from client import exceptions
import threading
import traceback
def timed(timeout, fn, args=(), kargs={}):
"""Evaluates expr in the given frame.
PARAMETERS:
fn -- function; Python function to be evaluated
args -- tuple; positional arguments for fn
kargs -- dict;... | apache-2.0 | -3,628,445,723,920,096,000 | 27.632653 | 61 | 0.623664 | false | 4.277439 | false | false | false |
ekholabs/ekholabs-es | service/ElasticsearchConnection.py | 1 | 1129 | import pkg_resources
from requests_aws4auth import AWS4Auth
from elasticsearch import Elasticsearch, RequestsHttpConnection
import json
class Resource:
__instance = None
__elasticsearch = None
def __new__(cls, val):
if Resource.__instance is None:
Resource.__instance = object.__new__... | mit | -8,098,267,506,412,627,000 | 27.948718 | 115 | 0.627104 | false | 4.704167 | true | false | false |
gitcoinco/web | app/grants/sync/zil.py | 1 | 2614 |
import time
from django.conf import settings
import requests
from grants.sync.helpers import is_txn_done_recently, record_contribution_activity, txn_already_used
headers = {
"X-APIKEY" : settings.VIEW_BLOCK_API_KEY
}
DECIMALS = 12
def find_txn_on_zil_explorer(contribution):
subscription = contribution.su... | agpl-3.0 | 526,148,667,346,131,840 | 29.045977 | 100 | 0.612854 | false | 3.728959 | false | false | false |
ikben/troposphere | tests/test_logs.py | 2 | 1275 | import unittest
from troposphere import Retain
from troposphere.logs import LogGroup, Destination
class TestLogs(unittest.TestCase):
def test_loggroup_deletionpolicy_is_preserved(self):
log_group = LogGroup(
"LogGroupWithDeletionPolicy",
DeletionPolicy=Retain
)
self... | bsd-2-clause | -4,810,851,735,974,841,000 | 29.357143 | 60 | 0.581961 | false | 4.396552 | true | false | false |
NuSTAR/nustar_lunar_pointing | nustar_lunar_pointing/filter.py | 1 | 3932 | import numpy as np
def bad_pix(evtdata, fpm='A'):
"""Do some basic filtering on known bad pixels.
Parameters
----------
evtdata: FITS data class
This should be an hdu.data structure from a NuSTAR FITS file.
fpm: {"FPMA" | "FPMB"}
Which FPM you're filtering on. Assumes A if not set.
Returns
-... | mit | 262,317,687,391,917,280 | 27.492754 | 107 | 0.606053 | false | 2.814603 | false | false | false |
gorakhargosh/pyoauth | pyoauth/oauth1/client/twitter.py | 1 | 1860 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com>
# Copyright 2012 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
#
# ... | apache-2.0 | -3,775,858,283,001,651,000 | 31.068966 | 75 | 0.662903 | false | 4.025974 | false | false | false |
obriencj/python-javatools | javatools/dirutils.py | 2 | 5709 | # This library 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 later version.
#
# This library is distributed in the hope that it will be usefu... | lgpl-3.0 | -9,175,640,514,125,958,000 | 23.930131 | 70 | 0.616745 | false | 3.945404 | false | false | false |
FederatedAI/FATE | python/federatedml/secureprotol/fixedpoint.py | 1 | 8060 | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 7,395,149,713,591,440,000 | 29.646388 | 91 | 0.561538 | false | 4.08308 | false | false | false |
badele/pyRFXtrx | RFXtrx/lowlevel.py | 1 | 52885 | # This file is part of pyRFXtrx, a Python library to communicate with
# the RFXtrx family of devices from http://www.rfxcom.com/
# See https://github.com/woudt/pyRFXtrx for the latest version.
#
# Copyright (C) 2012 Edwin Woudt <edwin@woudt.nl>
#
# pyRFXtrx is free software: you can redistribute it and/or modify it
# ... | gpl-3.0 | -4,641,288,713,968,356,000 | 33.251943 | 79 | 0.499593 | false | 3.802488 | false | false | false |
oknuutti/visnav-py | visnav/iotools/make-const-noise-shapemodel.py | 1 | 2362 | import math
import pickle
import sys
import numpy as np
import numba as nb
from visnav.algo import tools
from visnav.iotools import objloader
from visnav.settings import *
# data/ryugu+tex-d1-80k.obj data/ryugu+tex-d1-16k.obj data/ryugu+tex-d1-16k.nsm
# data/ryugu+tex-d1-80k.obj data/ryugu+tex-d1-4k.obj ... | mit | 395,161,987,018,459,400 | 34.90625 | 106 | 0.612616 | false | 2.35964 | false | true | false |
heroku/django-heroku-connect | setup.py | 1 | 1282 | #!/usr/bin/env python
import os
import sys
import connect_client
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
packages = [
'connect_client',
'connect_client.tests',
]... | mit | 4,392,016,882,430,501,400 | 22.309091 | 58 | 0.634945 | false | 3.591036 | false | true | false |
julienledem/arrow | python/pyarrow/parquet.py | 2 | 7044 | # 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"); you may not u... | apache-2.0 | 6,071,365,985,521,752,000 | 33.529412 | 79 | 0.644946 | false | 4.397004 | false | false | false |
xyuanmu/XX-Net | python3.8.2/Lib/site-packages/pip/_internal/commands/show.py | 14 | 6273 | from __future__ import absolute_import
import logging
import os
from email.parser import FeedParser
from pip._vendor import pkg_resources
from pip._vendor.packaging.utils import canonicalize_name
from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR, SUCCESS
logger = lo... | bsd-2-clause | -1,771,152,429,629,429,200 | 36.339286 | 78 | 0.575801 | false | 4.159814 | false | false | false |
medunigraz/outpost | src/outpost/django/campusonline/migrations/0047_finalthesis.py | 1 | 4551 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-04-25 06:50
from __future__ import unicode_literals
from django.db import migrations
from django.conf import settings
class Migration(migrations.Migration):
ops = [
(
'''
CREATE FOREIGN TABLE "campusonline"."abschlussa... | bsd-2-clause | 4,544,212,875,813,517,300 | 33.740458 | 129 | 0.504285 | false | 4.202216 | false | false | false |
pypa/warehouse | warehouse/sessions.py | 1 | 12344 | # 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, software
# distributed under the Li... | apache-2.0 | -3,302,074,025,038,041,600 | 33.099448 | 87 | 0.623218 | false | 4.060526 | false | false | false |
openqt/algorithms | leetcode/python/ac/lc002-add-two-numbers.py | 1 | 1931 | # coding=utf-8
import unittest
"""2. Add Two Numbers
https://leetcode.com/problems/add-two-numbers/description/
You are given two **non-empty** linked lists representing two non-negative
integers. The digits are stored in **reverse order** and each of their nodes
contain a single digit. Add the two numbers and return... | gpl-3.0 | -17,463,024,899,245,644 | 24.746667 | 76 | 0.553081 | false | 3.517304 | false | false | false |
TDaglis/argus | argus/argus/handler.py | 1 | 6968 | """
Argus websocket handler and event handler
"""
import os
from re import sub
from json import dumps
from tornado import ioloop
from tornado import websocket
from watchdog.events import RegexMatchingEventHandler
from watchdog.observers import Observer
from settings import ARGUS_ROOT
active_handlers = {}
active_obse... | mit | 788,149,961,402,902,500 | 32.180952 | 77 | 0.532577 | false | 4.368652 | false | false | false |
lpechacek/cpuset | cpuset/commands/set.py | 1 | 18675 | """Cpuset manipulation command
"""
from __future__ import unicode_literals
from builtins import str
__copyright__ = """
Copyright (C) 2007-2010 Novell Inc.
Copyright (C) 2013-2018 SUSE
Author: Alex Tsariounov <tsariounov@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the term... | gpl-2.0 | -4,110,054,007,725,781,500 | 36.65121 | 93 | 0.610977 | false | 3.740236 | false | false | false |
neldom/qessera | careers/models.py | 1 | 2634 | from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.conf import settings
from django.db import models
from django.core.urlresolvers import reverse
from django.db.models.signals import pre_save
from django.utils import timezone
from django.utils.text import... | mit | 6,271,758,748,411,158,000 | 29.275862 | 106 | 0.669324 | false | 3.549865 | false | false | false |
Grumbel/dirtool | dirtools/fileview/sorter.py | 1 | 1839 | # dirtool.py - diff tool for directories
# Copyright (C) 2018 Ingo Ruhnke <grumbel@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | gpl-3.0 | 2,956,501,709,050,638,300 | 33.698113 | 99 | 0.695487 | false | 3.692771 | false | false | false |
ktan2020/legacy-automation | win/Lib/site-packages/junitxml/tests/test_runner.py | 1 | 3623 | """Test XmlTestRunner functionality for junitxml.
:Author: Duncan Findlay <duncan@duncf.ca>
"""
import xml.dom.minidom
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
try:
import unittest2 as unittest
except ImportError:
import unittest
import junitxml.runner
# Old v... | mit | 1,243,737,621,717,691,600 | 30.504348 | 72 | 0.581562 | false | 4.282506 | true | false | false |
nvarini/espresso_iohpc | test-suite/testcode/lib/testcode2/__init__.py | 5 | 29590 | '''
testcode2
---------
A framework for regression testing numerical programs.
:copyright: (c) 2012 James Spencer.
:license: modified BSD; see LICENSE for more details.
'''
import glob
import os
import pipes
import shutil
import subprocess
import sys
try:
import yaml
_HAVE_YAML = True
except ImportError:
... | gpl-2.0 | -3,160,720,281,275,061,000 | 43.362819 | 105 | 0.534471 | false | 4.252048 | true | false | false |
enflow-nl/cast-viewer | ansible/roles/network/files/cast_viewer_net_watchdog.py | 1 | 3960 | #!/usr/bin/env python
import configparser
import netifaces
import os
import re
import requests
import sh
import socket
import sys
import time
import logging
from time import sleep
NETWORK_PATH = '/boot/network.ini'
logging.basicConfig(level=logging.INFO,
format='%(message)s')
def get_default_gw(... | gpl-2.0 | -8,181,382,529,827,038,000 | 25.4 | 74 | 0.607323 | false | 3.882353 | true | false | false |
munhyunsu/Hobby | KawiBawiBo/kwb_server.py | 1 | 3895 | #!/usr/bin/env python3
import sys
import asyncio
import threading
import base64
import os
SRCPATH = './src/'
class KWBServerProtocol(asyncio.Protocol):
def connection_made(self, transport):
print('Connected: {}'.format(transport.get_extra_info('peername')))
self.transport = transport
self... | gpl-3.0 | 5,680,759,800,586,388,000 | 36.166667 | 75 | 0.505671 | false | 3.977964 | false | false | false |
hxddh/thefuck | thefuck/rules/ssh_known_hosts.py | 17 | 1068 | import re
from thefuck.utils import for_app
commands = ('ssh', 'scp')
@for_app(*commands)
def match(command):
if not command.script:
return False
if not command.script.startswith(commands):
return False
patterns = (
r'WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!',
r'W... | mit | -6,222,417,361,600,427,000 | 27.864865 | 101 | 0.618914 | false | 3.59596 | false | false | false |
gkadillak/rockstor-core | src/rockstor/storageadmin/views/share_helpers.py | 2 | 6394 | """
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any la... | gpl-3.0 | -6,850,788,140,572,486,000 | 38.714286 | 90 | 0.554582 | false | 3.616516 | false | false | false |
naparuba/opsbro | data/core-configuration/packs/core-functions/module/frandom.py | 2 | 1119 | import random as random_lib
import copy
from opsbro.evaluater import export_evaluater_function
FUNCTION_GROUP = 'random'
@export_evaluater_function(function_group=FUNCTION_GROUP)
def random():
"""**random()** -> Returns a random float between 0 and 1
<code>
Example:
random()
Returns:
... | mit | -6,978,043,257,205,839,000 | 15.954545 | 102 | 0.637176 | false | 3.36036 | false | false | false |
luckydonald/pytgbot | pytgbot/api_types/receivable/media.py | 1 | 123436 | # -*- coding: utf-8 -*-
__all__ = ['Media', 'MessageEntity', 'DownloadableMedia', 'PhotoSize', 'Audio', 'Animation', 'Document', 'Sticker', 'Video', 'Voice', 'VideoNote', 'Contact', 'Location', 'Venue', 'UserProfilePhotos', 'File', 'ChatPhoto', 'Game']
from luckydonaldUtils.encoding import unicode_type, to_unicode as ... | gpl-3.0 | -5,835,422,778,018,785,000 | 34.429392 | 497 | 0.617664 | false | 3.765129 | false | false | false |
ndawe/rootpy | rootpy/ROOT.py | 2 | 4217 | """
:py:mod:`rootpy.ROOT`
=====================
This module is intended to be a drop-in replacement for ordinary
PyROOT imports by mimicking PyROOT's interface. If you find a case where it is
not, please report an issue to the rootpy developers.
Both ROOT and rootpy classes can be accessed in a harmonized way through... | bsd-3-clause | -4,648,580,643,503,857,000 | 28.284722 | 79 | 0.609912 | false | 3.81629 | false | false | false |
jrutila/django-reportengine | reportengine/jsonfield.py | 1 | 5953 | """
Django JSON Field. This extends Django Model Fields to store JSON as a field-type.
"""
#TODO - Move this to utils or another application. This is tangential to reporting and useful for other things.
from django.db import models
try:
import json as simplejson
except ImportError:
from django.utils import s... | bsd-3-clause | -8,755,492,323,825,175,000 | 35.29878 | 112 | 0.605409 | false | 4.40963 | false | false | false |
ftrautsch/mecoSHARK | mecoshark/processor/javaprocessor.py | 1 | 4793 | import logging
import os
import shutil
import subprocess
import sys
from mecoshark.processor.baseprocessor import BaseProcessor
from mecoshark.resultparser.sourcemeterparser import SourcemeterParser
class JavaProcessor(BaseProcessor):
"""
Implements :class:`~mecoshark.processor.baseprocessor.BaseProcessor` ... | apache-2.0 | -6,460,808,054,946,578,000 | 31.828767 | 100 | 0.606092 | false | 4.017603 | false | false | false |
hsharrison/pyglet2d | src/pyglet2d.py | 1 | 14357 | __version__ = '0.2.1'
from itertools import chain
import numpy as np
import pyglet
from Polygon import Polygon, setDataStyle, STYLE_NUMPY
from Polygon.Utils import pointList as point_list
setDataStyle(STYLE_NUMPY)
class Shape:
"""Graphical polygon primitive for use with `pyglet`_.
Alternative constructor... | bsd-2-clause | -220,555,798,109,811,740 | 28.3 | 115 | 0.559866 | false | 4.246377 | false | false | false |
dede67/tresor | tresor2.py | 1 | 40870 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import wx.lib.mixins.listctrl as listmix
import sqlite3
cfgFile_g=".tresor2.settings"
# ###########################################################
# Die Verschluesselungs-Klasse
# braucht: python-pycrypto - Cryptographic modules for Python
import struct
import... | gpl-3.0 | 4,122,978,496,484,508,000 | 36.832407 | 108 | 0.606256 | false | 2.875369 | false | false | false |
june-yang/megautils | megautils/raid_ircu/virtual_driver.py | 1 | 5356 | # Copyright 2016 Mellanox Technologies, 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 applicable law or agreed to... | apache-2.0 | -1,302,649,952,105,430,300 | 32.267081 | 79 | 0.546303 | false | 3.988086 | false | false | false |
Verizon/libcloud | libcloud/pricing.py | 18 | 6632 | # 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"); you may not use ... | apache-2.0 | -5,401,085,464,402,850,000 | 29.145455 | 125 | 0.663299 | false | 3.525784 | false | false | false |
DamienIrving/ocean-analysis | visualisation/energy_budget/plot_zonal_toa_breakdown.py | 1 | 10737 | """
Filename: plot_zonal_toa_breakdown.py
Author: Damien Irving, irving.damien@gmail.com
Description:
"""
# Import general Python modules
import sys, os, pdb, glob
import argparse
import numpy
import iris
from iris.experimental.equalise_cubes import equalise_attributes
import iris.plot as iplt
import mat... | mit | 3,990,422,921,149,656,600 | 37.346429 | 203 | 0.61656 | false | 3.391346 | false | false | false |
tensorflow/tensorboard | tensorboard/uploader/server_info.py | 1 | 9363 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -9,042,173,694,021,370,000 | 38.340336 | 158 | 0.702125 | false | 3.757223 | false | false | false |
Phoenix1369/site | judge/models/problem.py | 1 | 14046 | from operator import attrgetter
from django.conf import settings
from django.contrib.contenttypes.fields import GenericRelation
from django.core.cache import cache
from django.core.urlresolvers import reverse
from django.core.validators import RegexValidator
from django.db import models
from django.db.models import F,... | agpl-3.0 | 6,084,416,906,760,643,000 | 43.590476 | 120 | 0.638331 | false | 4.136042 | true | false | false |
hane1818/Simple-HMM | hmm.py | 1 | 12664 | from math import log, exp
class HMM:
"""Simple implement for Hidden Markov Model"""
def __init__(self, state_num, observation_list,
initial_probability=None, transition_probability=None, observation_probability=None):
self.state_num = state_num
# Initial probability for choosi... | mit | -4,213,058,366,093,229,600 | 46.040892 | 116 | 0.534139 | false | 3.681699 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.