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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tortib/nzbToMedia | nzbtomedia/nzbToMediaSceneExceptions.py | 1 | 5773 | import os
import re
import nzbtomedia
from nzbtomedia import logger
from nzbtomedia.nzbToMediaUtil import listMediaFiles
reverse_list = [r"\.\d{2}e\d{2}s\.", r"\.[pi]0801\.", r"\.p027\.", r"\.[pi]675\.", r"\.[pi]084\.", r"\.p063\.", r"\b[45]62[xh]\.", r"\.yarulb\.", r"\.vtd[hp]\.",
r"\.ld[.-]?bew\.", ... | gpl-3.0 | 6,233,365,788,758,214,000 | 44.81746 | 172 | 0.569548 | false | 3.230554 | false | false | false |
zmitchell/realms | realms/decks.py | 1 | 13782 | # -*- coding: utf-8 -*-
"""
.. module:: deck
:synopsis: Encapsulates the behavior of card collections
.. moduleauthor:: Zach Mitchell <zmitchell@fastmail.com>
"""
from random import shuffle
from typing import List
from .cards import (
Card,
CardFaction,
CardEffect,
CardAction,
CardTarget
)
from... | mit | 7,875,620,094,829,225,000 | 30.040541 | 100 | 0.572486 | false | 4.355879 | false | false | false |
nicolasderam/ikaaro | ikaaro/autoadd.py | 1 | 11925 | # -*- coding: UTF-8 -*-
# Copyright (C) 2011 Juan David Ibáñez Palomar <jdavid@itaapy.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... | gpl-3.0 | 484,154,630,696,823,000 | 30.794667 | 81 | 0.57192 | false | 4.273477 | false | false | false |
paulboal/pexpect-curses | swearjar/test/menu01.py | 1 | 4723 | #!/usr/bin/python
import curses, curses.textpad, curses.ascii
import math, os, sys, fcntl, struct, termios, array, time
import logging
logging.basicConfig(filename='menu01.log',level=logging.DEBUG)
__doc__="""\
The program presents a series of menus that we're going to use for testing.
1. Enter new person
2. Update ... | mit | -1,247,154,064,368,957,200 | 26.143678 | 96 | 0.61571 | false | 3.070871 | false | false | false |
AgentM-GEG/Tidal-Feature-Extraction-using-CNN | cutout_images.py | 1 | 3446 | def cut_out_gals(image_file,information,cutout_save_location):
'''
Task : To cut out images given the main mosaic, and an information array with necessary
parameters.
Input : 1) Image Mosaic location
2) Information array : This array should be loaded using np.genfromtxt with the head... | mit | -3,117,631,306,226,541,600 | 41.036585 | 158 | 0.628265 | false | 3.77437 | false | false | false |
lindegroup/lookback | server.py | 1 | 2699 | # This Python file uses the following encoding: utf-8
# Part of the Lookback project (https://github.com/lindegroup/lookback)
# Copyright 2015 The Linde Group Computer Support, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | apache-2.0 | -6,897,162,168,143,685,000 | 31.914634 | 78 | 0.743979 | false | 3.738227 | false | false | false |
initcrash/django-denorm | setup.py | 2 | 1220 | #!/usr/bin/python
from setuptools import setup
setup(
name='django-denorm',
version='1.0.0',
description='Denormalization magic for Django',
long_description='django-denorm is a Django application to provide automatic management of denormalized database fields.',
author=', '.join((
'Christ... | bsd-3-clause | 6,549,055,604,552,360,000 | 30.282051 | 126 | 0.617213 | false | 3.800623 | false | false | false |
titouanc/lechbot | plugins/reminder.py | 1 | 4249 | import asyncio
import random
from ircbot.persist import Persistent
from ircbot.text import parse_time
from ircbot.plugin import BotPlugin
from .helpers import public_api, mkurl, protect, full_pamela, spaceapi
from datetime import datetime
from time import time
from operator import itemgetter
minutes = 60
hours = 60 * ... | unlicense | 1,959,366,140,816,231,400 | 33.120968 | 82 | 0.544552 | false | 3.591681 | false | false | false |
lidaobing/itcc | itcc/molecule/relalist.py | 1 | 2841 | # $Id$
__all__ = ['Relalist', 'genconns', 'genR', 'genA', 'genD', 'genI']
__revision__ = '$Rev$'
class Relalist:
"""
Relalist: Relation list, include
bonds
angles
torsions
imptors
"""
def __init__(self, mol = None):
if mol is not None:
mol.confirmconnect()
... | gpl-3.0 | 2,679,282,110,201,428,000 | 26.057143 | 77 | 0.500528 | false | 3.414663 | false | false | false |
jreinhardt/constraining-order | src/constrainingorder/solver.py | 1 | 6166 | #Constraining Order - a simple constraint satisfaction library
#
#Copyright (c) 2015 Johannes Reinhardt <jreinhardt@ist-dein-freund.de>
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without ... | mit | -9,198,803,084,648,208,000 | 33.836158 | 79 | 0.656666 | false | 4.12994 | false | false | false |
GNS3/gns3-server | gns3server/handlers/api/compute/vmware_handler.py | 1 | 16403 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 GNS3 Technologies Inc.
#
# 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-3.0 | -7,035,415,358,963,364,000 | 37.686321 | 173 | 0.584588 | false | 4.020343 | false | false | false |
xbed/Mixly_Arduino | mixly_arduino/sample/mixpy/海龟画图/py/海龟画图10公共汽车_01公共汽车.py | 1 | 1069 | import turtle
def moveandgo(x, y, distance):
tina.penup()
tina.goto(x,y)
tina.pendown()
tina.setheading(0)
tina.forward(distance)
def moveandcircle(x, y, radius):
tina.fillcolor("#ffffff")
tina.penup()
tina.goto(x,y)
tina.pendown()
tina.begin_fill()
tina.setheading(90)
... | apache-2.0 | -6,258,536,222,794,368,000 | 19.557692 | 46 | 0.594949 | false | 2.582126 | false | false | false |
trombastic/PyScada | pyscada/visa/signals.py | 1 | 1330 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pyscada.models import Device, Variable
from pyscada.visa.models import VISAVariable, VISADevice, VISADeviceHandler, ExtendedVISAVariable, ExtendedVISADevice
from django.dispatch import receiver
from django.db.models.signals import post_save
import ... | gpl-3.0 | 1,911,460,458,046,570,200 | 38.117647 | 117 | 0.755639 | false | 3.5 | false | false | false |
pawkoz/dyplom | blender/release/scripts/startup/bl_ui/properties_constraint.py | 2 | 30186 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-2.0 | 5,697,486,073,241,071,000 | 31.423201 | 102 | 0.551779 | false | 3.448646 | false | false | false |
BrianGuilardi/sjsu-cs158b-2010-noname | widgets/treestore.py | 1 | 3145 | # Copyright (c) 2010 Arthur Mesh
# 2010 Christopher Nelson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | mit | 3,913,113,329,938,206,700 | 31.091837 | 79 | 0.68744 | false | 3.407367 | false | false | false |
shortaj/pyramid-learning-journal | learning_journal/learning_journal/views/default.py | 1 | 1105 | from pyramid.response import Response
from pyramid.view import view_config
from sqlalchemy.exc import DBAPIError
from ..models import MyModel
@view_config(route_name='home', renderer='../templates/mytemplate.jinja2')
def my_view(request):
try:
query = request.dbsession.query(MyModel)
one = query... | mit | 5,299,190,196,649,907,000 | 32.484848 | 74 | 0.727602 | false | 3.836806 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/feed_item_set_service/transports/grpc.py | 1 | 11807 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -3,564,819,177,203,839,000 | 43.554717 | 112 | 0.608622 | false | 4.641116 | false | false | false |
eacoin-project/eacore | contrib/linearize/linearize-data.py | 1 | 8927 | #!/usr/bin/python
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_func... | mit | 6,783,939,829,147,210,000 | 28.268852 | 108 | 0.675591 | false | 2.802826 | false | false | false |
levythu/swift-layerC | kernel/distributedvc/internodevc.py | 1 | 11214 | # coding=utf-8
from utils.decorator.synchronizer import syncClassBase,sync,sync_
from threading import Thread
from kernel.filetype import filemap
import ex.exception_logic
import utils.datastructure.splittree
import filehandler
import config.nodeinfo
import cStringIO
overhaulOrder=[]
def addoverhaulOrder(node,lay):
... | gpl-2.0 | 5,076,079,122,552,938,000 | 43.324111 | 175 | 0.587569 | false | 3.818182 | false | false | false |
Xowap/django-leaflet | leaflet/admin.py | 1 | 1986 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.admin import ModelAdmin
from django.core.exceptions import ImproperlyConfigured
try:
from djgeojson.fields import GeoJSONField
except ImportError:
GeoJSONField = type(object)
try:
from django.contrib.gis.db.models import G... | lgpl-3.0 | 4,714,559,723,167,269,000 | 31.557377 | 94 | 0.642497 | false | 4.163522 | false | false | false |
gskielian/Creating-a-Neural-Net-From-Scratch-With-Theano-Python | 02-logistic-regression.py | 1 | 1490 | #!/usr/bin/python
import numpy as np
import sklearn
import matplotlib.pyplot as plt
import sklearn.datasets
import sklearn.linear_model
######################
## Helper Functions ##
######################
def plot_decision_boundary(pred_func):
# Set min and max values and give it some padding
x_min, x_max = ... | mit | 5,034,935,029,688,332,000 | 27.653846 | 80 | 0.560403 | false | 3.333333 | false | false | false |
hizhangp/yolo_tensorflow | utils/timer.py | 1 | 1125 | import time
import datetime
class Timer(object):
'''
A simple timer.
'''
def __init__(self):
self.init_time = time.time()
self.total_time = 0.
self.calls = 0
self.start_time = 0.
self.diff = 0.
self.average_time = 0.
self.remain_... | mit | -6,506,947,281,513,849,000 | 26.125 | 71 | 0.530667 | false | 3.87931 | false | false | false |
negrinho/deep_architect | dev/tutorials/weight_sharing/weight_sharing/main.py | 1 | 2524 | ###${MARKDOWN}
# Recently, with the success of papers such as
# [Efficient Neural Architecture Search via Parameter Sharing](https://arxiv.org/abs/1802.03268),
# weight sharing has emerged as a popular way to speed up evaluation of sampled
# architectures in architecture search. Weight sharing simply involves sharing
#... | mit | 4,993,573,131,159,879,000 | 39.725806 | 97 | 0.746038 | false | 3.871166 | false | false | false |
IDMIPPM/reliability-aware-resynthesis | resynthesis/dynamic.py | 1 | 2807 | # coding: utf-8
__author__ = 'IDM.IPPM (Mihail Myachikov)'
from itertools import product
import copy
def make_func(code):
"""
:param code: Source code of function definition.
:return: Function defined in the input code.
"""
d = {}
exec(code, d)
return d['f']
def __make_operation_str(op, ... | apache-2.0 | 6,166,772,483,586,295,000 | 30.897727 | 118 | 0.529747 | false | 3.271562 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/operations/_network_watchers_operations.py | 1 | 106175 | # 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 | 2,492,714,922,565,979,600 | 51.797116 | 250 | 0.652282 | false | 4.265427 | true | false | false |
xbmcmegapack/plugin.video.megapack.dev | resources/data/xsports.py | 1 | 9003 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This file is part of XBMC Mega Pack Addon.
Copyright (C) 2014 Wolverine (xbmcmegapack@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... | gpl-3.0 | 1,473,721,082,253,633,800 | 42.917073 | 390 | 0.540598 | false | 3.266691 | false | false | false |
Tigge/advent-of-code-2015 | day_16.py | 1 | 1117 | #!/usr/bin/env python3
def which_sue(part=1):
sues = []
for line in open("day_16.txt").read().strip().split("\n"):
parts = line.split(" ")
sues.append({parts[2][:-1]: int(parts[3][:-1]),
parts[4][:-1]: int(parts[5][:-1]),
parts[6][:-1]: int(parts[7])})... | mit | -7,158,631,042,694,402,000 | 33.90625 | 76 | 0.442256 | false | 3.395137 | false | false | false |
md6113/404cmputProject | social/api/paginator.py | 1 | 1105 | from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from collections import OrderedDict
class CustomPagination(PageNumberPagination):
def get_paginated_posts(self, data, request):
result = OrderedDict([
('count', self.page.paginator.count),
... | apache-2.0 | 2,874,166,160,473,792,500 | 33.5625 | 58 | 0.567421 | false | 4.473684 | false | false | false |
SKIRT/PTS | modeling/data/inspector.py | 1 | 15721 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 | -7,193,105,397,903,090,000 | 27.529946 | 156 | 0.481107 | false | 4.189765 | false | false | false |
thucoldwind/ucore_mips | Decaf/submit.py | 1 | 2484 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ts=4 sw=4 expandtab:
"""
完成作业以后,运行本文件,它会将你的代码、实验报告一起打包为 submit.zip。
"""
from __future__ import print_function # Requires Python 2.7+
import locale
import os
import re
import sys
import zipfile
# Python3's input == Python2's raw_input
try:
... | unlicense | -4,549,149,207,741,161,000 | 27.584416 | 95 | 0.609745 | false | 2.8475 | false | false | false |
underyx/hiss | hiss/client.py | 1 | 3351 | import ssl
import time
import struct
import asyncio
import platform
import functools
import collections
from . import Mumble_pb2
from .constants import MESSAGE_TYPES
class Client:
version = (1, 3, 0)
def __init__(self, host, port=64738, username='snek', password=None):
self.host = host
self... | mit | 6,261,956,060,427,688,000 | 30.914286 | 106 | 0.600716 | false | 4.247148 | false | false | false |
ric2b/Vivaldi-browser | chromium/build/mac_toolchain.py | 1 | 6819 | #!/usr/bin/env python
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
If should_use_hermetic_xcode.py emits "1", and the current toolchain is out of
date:
* Downloads the hermetic mac toolchain
*... | bsd-3-clause | 3,694,559,448,522,492,400 | 34.149485 | 80 | 0.706702 | false | 3.579528 | false | false | false |
tomsimonart/GLM-web-interface | GLM/source/libs/slide.py | 1 | 1940 | #!/usr/bin/env python3
from .image import Image
from .streamtools import MAT_WIDTH, MAT_HEIGHT
from time import sleep
from .rainbow import msg
R = 'right'
L = 'left'
U = 'up'
D = 'down'
RU = 'right_up'
LU = 'left_up'
RD = 'right_down'
LD = 'left_down'
F = 'fluid'
S = 'stop'
class Slide:
"""
Slide is used to ... | mit | -2,837,132,528,465,262,600 | 23.871795 | 68 | 0.539175 | false | 3.333333 | false | false | false |
d-qoi/TelegramBots | RoseAssassins/RoseAssassins.py | 1 | 1869 |
import logging
import argparse
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO) # To make sure that it is just pushing modism debug into the log
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
from telegram.ext import Updater
from pymongo ... | lgpl-3.0 | 1,104,310,580,972,480,100 | 30.15 | 149 | 0.685928 | false | 3.56 | false | false | false |
lorenghoh/ent_analysis | time_profiles/surface_profiles.py | 1 | 3385 | #!/usr/bin/env python
#Runtime (690, 130, 128, 128): 3 hours 40 minutes
from pylab import *
import numpy
import cPickle
from netCDF4 import Dataset
import sys, os
from thermo import SAM
import model_param as mc
# Load mean cloud field stat
stat_file = Dataset(mc.get_stat())
data = {'z': stat_file.variables['z'][:].a... | mit | 1,303,065,000,916,682,800 | 30.342593 | 76 | 0.55421 | false | 3.148837 | false | false | false |
bgris/ODL_bgris | lib/python3.5/site-packages/docutils/writers/html4css1/__init__.py | 1 | 33611 | # $Id: __init__.py 7977 2016-11-29 12:00:39Z milde $
# Author: David Goodger
# Maintainer: docutils-develop@lists.sourceforge.net
# Copyright: This module has been placed in the public domain.
"""
Simple HyperText Markup Language document tree Writer.
The output conforms to the XHTML version 1.0 Transitional DTD
(*al... | gpl-3.0 | 3,137,856,337,254,234,000 | 39.839611 | 85 | 0.556098 | false | 4.0593 | false | false | false |
napjon/moocs_solution | robotics-udacity/brute_stochastic.py | 1 | 3934 | # -------------- # USER INSTRUCTIONS
#
# Write a function called stochastic_value that
# takes no input and RETURNS two grids. The
# first grid, value, should contain the computed
# value of each cell as shown in the video. The
# second grid, policy, should contain the optimum
# policy for each cell.
#
# Stay ... | mit | 8,246,745,066,848,094,000 | 29.472 | 120 | 0.601678 | false | 3.016871 | false | false | false |
capitalone/cloud-custodian | tools/c7n_gcp/c7n_gcp/resources/pubsub.py | 1 | 3103 | # Copyright 2018 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from c7n.utils import type_schema
from c7n_gcp.actions import MethodAction
from c7n_gcp.provider import resources
from c7n_gcp.query import QueryResourceManager, TypeInfo
"""
todo, needs detail_sp... | apache-2.0 | 5,589,301,755,121,085,000 | 30.343434 | 98 | 0.643893 | false | 3.840347 | false | false | false |
mmihaltz/huwn-util | wn2to3.py | 1 | 3799 | #! /usr/bin/env python
# coding=utf8
"""Add PWN30 synset ids to HuWN XML
Author: Ivan Mittelholcz
"""
import os.path
import argparse
import copy
import xml.etree.cElementTree as ET
def check_xml(xml_file):
"""Fájl létezésének és xml-ségének ellenőrzése.
- input: fájlnév
- output: xml tree
"""... | gpl-3.0 | 2,634,651,109,779,618,000 | 27.412214 | 78 | 0.56475 | false | 2.754996 | false | false | false |
bat-serjo/vivisect | vstruct/defs/windows/win_5_2_i386/win32k.py | 5 | 49833 | # -*- coding: utf8 -*-
# Version: 5.2
# Architecture: i386
# CompanyName: Microsoft Corporation
# FileDescription: Multi-User Win32 Driver
# FileVersion: 5.2.3790.5019 (srv03_sp2_gdr.120613-0334)
# InternalName: win32k.sys
# LegalCopyright: Microsoft Corporation. All rights reserved.
# OriginalFilename: win32k.sys
# P... | apache-2.0 | 4,592,170,121,099,246,000 | 30.5 | 104 | 0.657356 | false | 3.223976 | false | false | false |
jonmorehouse/vimhub | lib/git.py | 1 | 1552 | import os
import subprocess
import re
import utils
import config
try:
import vim
except:
vim = False
remote_hash = {}
path_hash = {}
def remotes(path):
if remote_hash.get(path):
return remote_hash.get(path)
# grab only the remotes - this is safer than using python due to global character di... | mit | 7,164,358,429,620,938,000 | 24.866667 | 131 | 0.590206 | false | 3.669031 | false | false | false |
tesssny/Final-Project | final.py | 1 | 10917 | """
sources: http://stackoverflow.com/questions/306400/how-do-i-randomly-select-an-item-from-a-list-using-python, https://inventwithpython.com/chapter9.html, http://stackoverflow.com/questions/14667578/check-if-a-number-already-exist-in-a-list-in-python, mary feyrer, Glen Passow (game tester), http://stackoverflow.com/... | mit | -4,924,845,815,985,236,000 | 31.591045 | 706 | 0.457452 | false | 3.857597 | false | false | false |
tommy-u/enable | enable/savage/svg/svg_extras.py | 1 | 5270 | """ Extra math for implementing SVG on top of Kiva.
"""
import sys
from math import acos, sin, cos, hypot, ceil, sqrt, radians, degrees
import warnings
def bezier_arc(x1,y1, x2,y2, start_angle=0, extent=90):
""" Compute a cubic Bezier approximation of an elliptical arc.
(x1, y1) and (x2, y2) are the corners o... | bsd-3-clause | 506,576,931,082,259,000 | 30.746988 | 85 | 0.552562 | false | 2.833333 | false | false | false |
gkc1000/pyscf | pyscf/nao/test/test_0072_tddft_iter_dens_spatial.py | 1 | 2632 | from __future__ import print_function, division
import os,unittest
from pyscf.nao import tddft_iter
from pyscf.nao.m_comp_spatial_distributions import spatial_distribution
import h5py
import numpy as np
dname = os.path.dirname(os.path.abspath(__file__))
Ha = 27.211386024367243
td = tddft_iter(label='water', iter_broa... | apache-2.0 | -66,785,252,218,591,430 | 37.144928 | 119 | 0.590426 | false | 2.73029 | false | false | false |
bitforks/drawbot | drawBot/context/baseContext.py | 1 | 52299 | import AppKit
import CoreText
import Quartz
from drawBot.misc import DrawBotError, cmyk2rgb, warnings
from tools import openType
_FALLBACKFONT = "LucidaGrande"
class BezierContour(list):
def __init__(self, *args, **kwargs):
super(BezierContour, self).__init__(*args, **kwargs)
self.open = True
... | bsd-2-clause | -2,830,084,130,208,015,000 | 34.313302 | 159 | 0.594581 | false | 3.9 | false | false | false |
srgblnch/skippy | skippylib/instructions/pumpController/norhof900.py | 1 | 2779 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is ... | gpl-3.0 | -8,703,218,580,630,605,000 | 28.206522 | 71 | 0.534005 | false | 3.513274 | false | false | false |
naveensan1/nuage-openstack-neutron | nuage_neutron/vsdclient/restproxy.py | 1 | 16519 | # Copyright 2016 NOKIA
#
# 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... | apache-2.0 | 2,564,187,209,822,340,000 | 38.519139 | 79 | 0.556692 | false | 4.116372 | true | false | false |
haticeerturk/Turkce-Ingilizce-Sozluk | Turkce-Ingılızce-Sozluk.py | 1 | 3507 | def kelimeEkleme() :
dosya = open("sozluk.dat","a")
m = raw_input("Turkce kelimeyi giriniz: ")
h = raw_input("Ingilizce karsiligini girin: ")
satir = m + "\t"+ ":" + "\t" + h + "\n"
dosya.write(satir)
dosya.close()
def ingGuncelle() :
dosya = open("sozluk.dat","r")
istek = raw_input("Guncelleme yapacagin... | gpl-3.0 | 7,969,239,480,229,963,000 | 16.892857 | 88 | 0.64414 | false | 2.156827 | false | false | false |
collective/mr.poe | raven/transport/base.py | 1 | 9752 | """
raven.transport.builtins
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import logging
import sys
import urllib2
from raven.utils import all
try:
# Google App Engine blacklists parts of the socket module, ... | bsd-3-clause | -6,220,213,269,785,607,000 | 29.763407 | 106 | 0.601928 | false | 4.076923 | false | false | false |
beefoo/hollywood-diversity | scripts/imdb_enrich_movies.py | 1 | 5115 | # -*- coding: utf-8 -*-
# Description:
# This file takes in a .csv file of movies and adds IMDB information to it.
# The script prompts user for input if there are ambiguities for a title.
#
# Example usage:
# python imdb_enrich_movies.py ../data/box_office_top_50_movies_1995-2014.csv
# .csv file must have... | mit | 1,726,664,564,098,523,100 | 33.560811 | 171 | 0.556403 | false | 3.630234 | false | false | false |
noslenfa/tutorialdjango | polls/views.py | 1 | 1528 | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.views import generic
from .models import Choice, Question
class IndexView(generic.ListView):
template_name = 'polls/index.html'
context_object_name = 'latest_... | apache-2.0 | 7,863,918,660,426,906,000 | 30.854167 | 70 | 0.734948 | false | 3.496568 | false | false | false |
OfficialWiddin/DeliBot | delibot/cogs/community.py | 1 | 4455 | import asyncio
import json
import logging
import discord
from discord.ext import commands
from requests_html import AsyncHTMLSession
log = logging.getLogger()
class Community(commands.Cog):
"""
Commands for Community-day.
"""
def __init__(self, bot):
self.bot = bot
self.bot.loop.crea... | unlicense | -3,989,333,684,454,574,600 | 39.135135 | 145 | 0.59596 | false | 3.651639 | false | false | false |
HKuz/Test_Code | CodeFights/groupDating.py | 1 | 1057 | #!/usr/local/bin/python
# Code Fights Group Dating Problem
def groupDating(male, female):
return ([list(t) for t in zip(*filter(lambda x: x[0] != x[1],
zip(male, female)))] if male != female else [[], []])
def main():
tests = [
[
[5, 28, 14, 99, 17],
[5, 14, 28, 9... | mit | -2,475,177,488,335,346,000 | 21.978261 | 65 | 0.350047 | false | 3.262346 | false | false | false |
arinbjornk/ssh-log-plot | matter.py | 1 | 2016 | import os
import binascii
import re
import urllib
import datetime
import time
import collections
import json
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import sys
def tochunks(l, n):
for i in range(0, len(l), n):
yield l[i:i + n]
# Ge... | mit | 6,537,396,677,565,067,000 | 29.089552 | 94 | 0.654762 | false | 2.871795 | false | false | false |
Distrotech/system-config-printer | cupshelpers/cupshelpers.py | 1 | 29627 | ## system-config-printer
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
## Authors:
## Florian Festi <ffesti@redhat.com>
## Tim Waugh <twaugh@redhat.com>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public... | gpl-2.0 | -3,591,450,159,415,630,300 | 32.820776 | 207 | 0.518716 | false | 4.130926 | false | false | false |
toobaz/pandas | doc/make.py | 1 | 11832 | #!/usr/bin/env python
"""
Python script for building documentation.
To build the docs you must have all optional dependencies for pandas
installed. See the installation instructions for a list of these.
Usage
-----
$ python make.py clean
$ python make.py html
$ python make.py latex
"""
import importlib
im... | bsd-3-clause | 3,600,651,155,578,478,000 | 30.806452 | 88 | 0.537863 | false | 4.160338 | false | false | false |
smarkets/marge-bot | marge/gitlab.py | 1 | 5888 | import json
import logging as log
from collections import namedtuple
import requests
class Api:
def __init__(self, gitlab_url, auth_token):
self._auth_token = auth_token
self._api_base_url = gitlab_url.rstrip('/') + '/api/v4'
def call(self, command, sudo=None):
method = command.metho... | bsd-3-clause | -735,677,503,771,333,900 | 23.635983 | 99 | 0.59392 | false | 4 | false | false | false |
dturner-tw/pants | src/python/pants/backend/android/tasks/dx_compile.py | 1 | 8292 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from twit... | apache-2.0 | -5,050,217,490,291,312,000 | 45.324022 | 99 | 0.695731 | false | 3.982709 | false | false | false |
S4kur4/Sepia | lib/parse/cmdline.py | 1 | 3329 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import argparse
import sys
from lib.core.settings import VERSION
def cmdLineParser():
parser = argparse.ArgumentParser(description='Example: python sepia.py -s s2045-rce -baidu "inurl:login.action"', add_help=False)
#第一项optional_arguments,基础相关项
optional_argume... | gpl-2.0 | -8,655,583,691,603,335,000 | 69.065217 | 183 | 0.686317 | false | 3.141326 | false | false | false |
Aloomaio/googleads-python-lib | examples/adwords/v201806/advanced_operations/create_and_attach_shared_keyword_set.py | 1 | 3787 | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 7,618,941,297,881,909,000 | 28.585938 | 79 | 0.64695 | false | 3.994726 | false | false | false |
spaceninja/mltshp | handlers/incoming.py | 1 | 2481 | from lib.utilities import base36decode
import tornado.web
from base import BaseHandler
from models import User, Sharedfile
class IncomingHandler(BaseHandler):
@tornado.web.authenticated
def get(self, before_or_after=None, base36_id=None):
"""
path: /incoming
"""
older_link, new... | mpl-2.0 | -2,518,924,442,536,953,300 | 39.016129 | 96 | 0.585651 | false | 3.925633 | false | false | false |
excid3/irc_bothost | daemon/manager.py | 1 | 2341 | #!/usr/bin/env python
# Database imports
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from models import Bot
# Dbus imports
import dbus
import dbus.service
import dbus.mainloop.glib as glib
import gobject
# Import bots
from bots import GoogleSearchBot
DATABASE = '../website/database... | gpl-3.0 | -6,609,378,455,593,678,000 | 24.445652 | 75 | 0.586074 | false | 3.825163 | false | false | false |
mtholder/rbg | setup.py | 1 | 2523 | #!/usr/bin/env python
import sys
import os
# setup.py largely based on
# http://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
# Also see Jeet Sukumaran's DendroPy
###############################################################################
# setuptools/distutils/etc. import and configuration
... | bsd-2-clause | 781,373,712,850,792,400 | 31.779221 | 103 | 0.60761 | false | 3.732249 | false | false | false |
O-T-L/PyOptimization | parameters/termination.py | 1 | 3577 | """
Copyright (C) 2014, 申瑞珉 (Ruimin Shen)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed i... | lgpl-3.0 | -2,597,556,617,497,607,000 | 42.54878 | 106 | 0.649398 | false | 3.778836 | false | false | false |
UMN-Hydro/GSFLOW_pre-processor | python_scripts/MODFLOW_scripts/print_MODFLOW_inputs_res_NWT_test.py | 1 | 3888 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 17 22:06:52 2017
Based on: print_MODFLOW_inputs_res_NWT.m
@author: gcng
"""
# print_MODFLOW_inputs
import numpy as np
import MODFLOW_NWT_lib as mf # functions to write individual MODFLOW files
import os # os functions
# - directories
sw_2005_NWT = 2 # 1 for MODFLOW-... | gpl-3.0 | 1,733,408,204,424,383,500 | 39.926316 | 164 | 0.705247 | false | 2.701876 | false | false | false |
suutari-ai/shoop | shuup/front/checkout/addresses.py | 2 | 5615 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django import forms
... | agpl-3.0 | 3,144,817,363,670,558,000 | 38.822695 | 109 | 0.628139 | false | 4.039568 | false | false | false |
MarkLark/dstore | manage.py | 1 | 2013 | #!/usr/bin/python
import pyman
from os import getcwd, path
class VM( pyman.Page ):
def __init__( self, pkg ):
super( VM, self ).__init__( "VM" )
self.host = None
self.pkg = pkg
self.dir = path.split( getcwd() )[1]
def choices( self ):
if not self.actions:
... | mit | -5,047,512,776,818,711,000 | 43.733333 | 209 | 0.539493 | false | 3.140406 | false | false | false |
smartbgp/libbgp | libbgp/examples/bgp/update.py | 1 | 2799 | # Copyright 2015-2017 Cisco Systems, 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 req... | apache-2.0 | -8,200,692,678,786,274,000 | 34.43038 | 118 | 0.527688 | false | 2.476991 | false | false | false |
artefactual/archivematica-storage-service | storage_service/administration/tests/test_languages.py | 1 | 1350 | from django.contrib.auth.models import User
from django.test import TestCase, override_settings
class TestLanguageSwitching(TestCase):
@classmethod
def setUpClass(cls):
super(TestLanguageSwitching, cls).setUpClass()
User.objects.create_user(
username="admin", password="admin", emai... | agpl-3.0 | 8,192,030,659,953,039,000 | 35.486486 | 73 | 0.655556 | false | 4.041916 | true | false | false |
cloudburst/libheap | libheap/ptmalloc/malloc_par.py | 1 | 6212 | import sys
import struct
from libheap.frontend.printutils import color_title
from libheap.frontend.printutils import color_value
from libheap.frontend.printutils import print_error
class malloc_par:
"python representation of a struct malloc_par"
def __init__(self, addr=None, mem=None, debugger=None, version... | mit | -8,286,559,115,292,539,000 | 33.898876 | 79 | 0.528976 | false | 3.574223 | false | false | false |
shaheershabbir/language_samples | Python/Numbers/04_prime_factorization.py | 1 | 1274 | #Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them.
import sys
from math import ceil, sqrt
primeList = set()
def prime_factors(n):
currentPrime = 2
primeList.add(currentPrime)
primeFactors = set()
while (n/currentPrime) != 0:
if... | mit | -5,048,515,791,447,680,000 | 25.020408 | 115 | 0.622449 | false | 3.59887 | false | false | false |
akulakov/mangotrac | proj_issues/issues/migrations/0007_auto__add_report.py | 1 | 10888 | # -*- 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 'Report'
db.create_table(u'issues_report', (
(... | mit | 8,550,388,397,958,276,000 | 72.574324 | 195 | 0.541514 | false | 3.60172 | false | false | false |
daq-tools/kotori | test/settings/basic.py | 1 | 1363 | # -*- coding: utf-8 -*-
# (c) 2020 Andreas Motl <andreas@getkotori.org>
from test.util import InfluxWrapper, GrafanaWrapper
PROCESS_DELAY_MQTT = 0.2
class BasicSettings:
# InfluxDB settings.
influx_database = 'basic_node42'
influx_measurement_sensors = 'sensors'
influx_measurement_events = 'events'... | agpl-3.0 | 8,097,248,373,965,345,000 | 31.452381 | 114 | 0.725605 | false | 3.126147 | false | false | false |
jdf76/plugin.video.youtube | resources/lib/youtube_plugin/kodion/items/audio_item.py | 1 | 2203 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2014-2016 bromix (plugin.video.youtube)
Copyright (C) 2016-2018 plugin.video.youtube
SPDX-License-Identifier: GPL-2.0-only
See LICENSES/GPL-2.0-only for more information.
"""
from six.moves import html_parser
from .base_item import BaseItem
class AudioItem... | gpl-2.0 | -2,743,679,854,100,303,400 | 24.321839 | 66 | 0.610077 | false | 3.677796 | false | false | false |
shful/python-rrlog | rrlog/server/xmlrpc.py | 1 | 3971 | # Copyright (c) 2007 Ruben Reifenberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | mit | -3,357,021,823,589,365,000 | 33.232759 | 177 | 0.742634 | false | 3.571043 | false | false | false |
Boris-Barboris/rsoi | lab01/authserver/lab01_authserver/lab01_authserver_app/migrations/0004_auto_20170131_1542.py | 1 | 1545 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-31 12:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lab01_authserver_app', '0003_refreshtoken'),
]
operations = [
migrations.Re... | mit | -6,635,733,589,395,761,000 | 28.711538 | 86 | 0.552751 | false | 4.256198 | false | false | false |
nik124seleznev/ZC500TG | tools/dct/obj/EintObj.py | 2 | 10768 | #! /usr/bin/python
# -*- coding: utf-8 -*-
import re
import os
import string
import ConfigParser
import xml.dom.minidom
from data.EintData import EintData
from data.GpioData import GpioData
from utility.util import log
from utility.util import LogLevel
from utility.util import compare
from obj.ModuleObj import Modu... | gpl-2.0 | 6,046,764,472,813,506,000 | 35.876712 | 132 | 0.507708 | false | 3.377666 | false | false | false |
andrewrhyder/epicsqt | resources/release.py | 1 | 21749 | #!/usr/bin/python
__author__ = "Ricardo Fernandes"
__email__ = "ricardo.fernandes@synchrotron.org.au"
__copyright__ = "(C) 2013 Australian Synchrotron"
__version__ = "1.5"
__date__ = "2014/MAR/21"
__description__ = "Script to automate the release of a new version of the EPICS Qt Framework"
__status__ = "Production"
... | lgpl-3.0 | -2,284,528,836,557,499,400 | 37.562057 | 277 | 0.559934 | false | 3.467081 | false | false | false |
BioModelTools/TemplateSB | TemplateSB/executor.py | 1 | 1452 | '''Evaluates expressions in a namespace.'''
from api import Api
class Executor(object):
"""
Executes statements and expressions.
Manages the name space and access to definitions.
"""
def __init__(self):
self._api = Api()
self._namespace = {'api': self._api}
def addNamespace(self, namespace):
... | mit | -9,153,446,962,193,678,000 | 23.610169 | 66 | 0.658402 | false | 4.295858 | false | false | false |
jrd/urwidm | examples/testurwidmore.py | 1 | 3457 | #!/usr/bin/env python
# coding: utf-8
# vim:et:sta:sts=2:sw=2:ts=2:tw=0:
from __future__ import division, unicode_literals, print_function, absolute_import
import urwidm
import time
palette = [
('body', 'light gray', 'black'),
('header', 'white', 'dark blue'),
('footer', 'light green', 'black'),
('foot... | lgpl-2.1 | 7,806,341,142,959,790,000 | 28.05042 | 102 | 0.651432 | false | 2.87604 | false | false | false |
psychopy/psychopy | psychopy/tests/data/correctScript/python/correctKeyboardComponent.py | 1 | 6908 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v3.1.1),
on Thu May 9 17:56:54 2019
If you publish work using this script please cite the PsychoPy publications:
Peirce, JW (2007) PsychoPy - Psychophysics software in Python.
Journal of N... | gpl-3.0 | 4,762,683,122,813,199,000 | 39.623529 | 101 | 0.694179 | false | 3.56163 | false | false | false |
lavende/crawlers | hosts/netsh_hosts.py | 1 | 1700 | import requests
class NetshHostsCrawler(object):
def __init__(self, opts):
self.method_get = requests.get
self.url = 'http://serve.netsh.org/pub/hosts.php'
self.params = {
'passcode': '16675',
'validate': '34b8c',
'gs': 'on',
'wk': 'on',
... | gpl-2.0 | -3,571,758,606,071,751,000 | 28.310345 | 80 | 0.47 | false | 3.624733 | false | false | false |
angr/angr | angr/storage/memory_mixins/bvv_conversion_mixin.py | 1 | 2872 | import logging
import claripy
from angr.storage.memory_mixins import MemoryMixin
l = logging.getLogger(__name__)
class DataNormalizationMixin(MemoryMixin):
"""
Normalizes the data field for a store and the fallback field for a load to be BVs.
"""
def store(self, addr, data, size=None, **kwargs):
... | bsd-2-clause | 4,994,363,071,060,576,000 | 38.888889 | 120 | 0.590181 | false | 3.778947 | false | false | false |
fchauvel/flap | flap/latex/macros/factory.py | 1 | 2669 | #!/usr/bin/env python
#
# This file is part of Flap.
#
# Flap 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.
#
# Flap is distributed ... | gpl-3.0 | -9,029,698,916,133,774,000 | 33.217949 | 72 | 0.653803 | false | 3.890671 | false | false | false |
kailucky/AngelEyes | Client/LcvSearch/LcvSearch/settings.py | 1 | 3221 | """
Django settings for LcvSearch project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | mit | 7,777,674,801,871,668,000 | 24.571429 | 91 | 0.682707 | false | 3.478402 | false | false | false |
RedHatInsights/insights-core | insights/util/content_type.py | 1 | 1264 | import shlex
import subprocess
from subprocess import PIPE
import six
from threading import Lock
try:
from insights.contrib import magic
except Exception:
magic_loaded = False
else:
# RHEL 6 does not have MAGIC_MIME_TYPE defined, but passing in the value
# found in RHEL 7 (16, base 10), seems to work.
... | apache-2.0 | -7,738,235,413,183,998,000 | 27.727273 | 92 | 0.642405 | false | 3.570621 | false | false | false |
danishm/mritopng | mritopng/__init__.py | 1 | 3339 | import os
import png
import pydicom
import numpy as np
from .models import GrayscaleImage
from .contrast import auto_contrast
def mri_to_png(mri_file, png_file, do_auto_contrast=False):
""" Function to convert from a DICOM image to png
@param mri_file: An opened file like object to read te dicom data
... | mit | 3,070,402,333,887,180,000 | 34.147368 | 87 | 0.627733 | false | 3.305941 | false | false | false |
andremiller/beets | beets/autotag/__init__.py | 1 | 4813 | # This file is part of beets.
# Copyright 2015, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, ... | mit | -4,673,383,253,398,398,000 | 35.18797 | 79 | 0.608352 | false | 4.185217 | false | false | false |
supergis/QGIS | python/plugins/processing/algs/qgis/Union.py | 1 | 9640 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Union.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*********************************... | gpl-2.0 | -2,703,767,474,371,595,300 | 45.796117 | 154 | 0.509129 | false | 5.15508 | false | false | false |
rnehra01/tanner | tanner/emulators/base.py | 1 | 5384 | import asyncio
import mimetypes
import re
import urllib.parse
import yarl
from tanner.config import TannerConfig
from tanner.emulators import lfi, rfi, sqli, xss, cmd_exec
from tanner.utils import patterns
class BaseHandler:
def __init__(self, base_dir, db_name, loop=None):
self.emulators = {
... | gpl-3.0 | 609,411,455,688,115,100 | 43.131148 | 120 | 0.622214 | false | 3.994065 | true | false | false |
zangzhe/douban-review-api-testing | douban_client/api/user.py | 1 | 1356 | # -*- coding: utf-8 -*-
from .base import DoubanAPIBase, DoubanAPIBase_v1, DEFAULT_START, DEFAULT_COUNT
class User(DoubanAPIBase):
def __repr__(self):
return '<DoubanAPI User>'
def get(self, id):
return self._get('/v2/user/%s' % id)
@property
def me(self):
return self.get('... | mit | 6,569,993,671,127,126,000 | 32.097561 | 143 | 0.625369 | false | 3.124424 | false | false | false |
dhrproject/mydatasource | DataSource/app/views/user.py | 1 | 3813 | import hashlib
from app import app
from flask import request
from flask_restful import Resource, reqparse
from app import api
from app.auth import require_token
from app.handler.dbHelper import DBHelper
from app.handler.error_handler import CustomError, NotAllowed
__author__ = 'Xiaoxiao.Xiong'
class UserAPI(Resourc... | mit | -3,294,375,466,812,133,400 | 25.303448 | 107 | 0.579334 | false | 4.095596 | false | false | false |
woobe/h2o | py/testdir_multi_jvm/test_rf_1ktrees_job_cancel_fvec.py | 1 | 2557 | import unittest, time, sys
sys.path.extend(['.','..','py'])
import h2o, h2o_cmd, h2o_hosts, h2o_import as h2i
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_errors()
@classmethod
def setUpClass(cls):
localhost = h2o.decide_if_localhost()
if (localhost):
... | apache-2.0 | -8,900,377,676,768,941,000 | 35.014085 | 129 | 0.551819 | false | 3.282413 | false | false | false |
saidsl/weigh_bridge_management | weigh_bridge_management/weigh_bridge_management/report/sales_order_and_purchase_order/sales_order_and_purchase_order.py | 1 | 2985 | # Copyright (c) 2013, MN Technique and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import msgprint, _
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_columns(filters)
entries... | gpl-3.0 | -8,633,921,102,127,154,000 | 32.550562 | 168 | 0.646566 | false | 2.996988 | false | false | false |
armvixl/vixl | tools/clang_format.py | 1 | 6973 | #!/usr/bin/env python2.7
# Copyright 2016, ARM Limited
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this li... | bsd-3-clause | -1,877,088,501,541,297,000 | 35.129534 | 81 | 0.666284 | false | 3.966439 | false | false | false |
joetainment/mmmmtools | MmmmToolsMod/Dynamic/PlatformManager.py | 1 | 5585 | ## MmmmTools - Usability Improvements For Maya
## Copyright (C) <2008> Joseph Crawford
##
## This file is part of MmmmTools.
##
## MmmmTools 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 ... | gpl-3.0 | 2,413,451,922,855,330,000 | 33.386076 | 120 | 0.576544 | false | 3.870409 | false | false | false |
lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/matrices/expressions/inverse.py | 2 | 1483 | from sympy.core.sympify import _sympify
from sympy.core import S, Basic
from sympy.matrices.expressions.matexpr import ShapeError
from sympy.matrices.expressions.matpow import MatPow
class Inverse(MatPow):
"""
The multiplicative inverse of a matrix expression
This is a symbolic object that simply stores... | gpl-3.0 | -8,102,763,116,967,621,000 | 23.311475 | 74 | 0.595415 | false | 3.726131 | false | false | false |
bbinet/PyGall | pygall/models/fspot.py | 1 | 2369 | # Define mapping for f-spot database
# This is used by the script to synchronize pygall with fspot
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker, relation, column_property
from sqlalchemy.sql import and_
from sqlalchemy import Table, Column, Sequence, D... | bsd-3-clause | -8,369,909,924,245,037,000 | 29.766234 | 86 | 0.669481 | false | 3.748418 | false | false | false |
Stratoscale/dirbalak | py/dirbalak/rackrun/jobqueue.py | 1 | 6176 | from upseto import gitwrapper
from dirbalak.rackrun import solventofficiallabels
from dirbalak.rackrun import buildstate
from dirbalak.rackrun import traversefilterbuildbanned
from dirbalak import repomirrorcache
from dirbalak.server import tojs
import collections
import logging
class JobQueue:
NON_MASTER_DEPENDE... | apache-2.0 | -2,125,154,884,264,883,000 | 42.492958 | 101 | 0.600227 | false | 4.12008 | false | false | false |
xashenx/anotherDungeonTB | dungeon_bot/persistence.py | 1 | 2158 | #!/usr/bin/env python3
import json
from .creatures import Player
players_file_path = "./data/players.json"
class PersistenceController(object):
players = {}
instance = None
def __init__(self):
PersistenceController.instance = self
self.players = self.load_players()
def is_registered(self, user):
if str(us... | gpl-3.0 | 9,082,832,071,063,998,000 | 25.975 | 74 | 0.686747 | false | 3.043724 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.