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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ajaygarg84/sugar | src/jarabe/frame/clipboardpanelwindow.py | 1 | 5219 | # Copyright (C) 2007, One Laptop Per Child
#
# 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 | 9,051,991,144,524,601,000 | 35.496503 | 79 | 0.569266 | false | 4.205479 | false | false | false |
yCanta/yCanta | convert/higherpraise.py | 1 | 2030 | import urllib2
import re
def convert(input_url):
'''return a dictionary as documented in __init__.py '''
# Example higherpraise.com content
# <div aligni="center"><!-- #BeginEditable "1" -->
# <table attrs=". . . ">
# ...
# <h1 align="center"><b><font class="default"><u>
# Title text </u... | unlicense | 8,676,968,065,586,122,000 | 24.061728 | 90 | 0.550246 | false | 3.108729 | false | false | false |
shlomozippel/ansible | lib/ansible/playbook/play.py | 1 | 14133 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 | -539,593,946,497,060,400 | 42.352761 | 141 | 0.521333 | false | 4.411049 | false | false | false |
maribhez/DietasBot | fabfile.py | 1 | 1342 | # coding: utf-8
from fabric.api import *
import os
#Paso inicial para poner a punto nuestra maquina.
def Instala():
#Aseguramos la limpieza de la maquina.
run ('sudo rm -rf DietasBot')
#Descargamos nuestra aplicacion desde GitHub.
run('git clone https://github.com/maribhez/DietasBot.git')
#Entra... | gpl-3.0 | 6,034,723,090,547,334,000 | 28.822222 | 69 | 0.590164 | false | 3.218225 | false | false | false |
evilhero/mylar | lib/comictaggerlib/comicapi/comet.py | 1 | 9192 | """A class to encapsulate CoMet data"""
# Copyright 2012-2014 Anthony Beville
# 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 requi... | gpl-3.0 | 3,675,850,606,253,734,400 | 32.304348 | 97 | 0.546997 | false | 4.081705 | false | false | false |
ArcaniteSolutions/truffe2 | truffe2/vehicles/models.py | 2 | 13930 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django import forms
from django.shortcuts import get_object_or_404
from generic.models import GenericModel, GenericStateModel, FalseFK, GenericGroupsModel, GenericStateRootValidable, GenericGroupsModerab... | bsd-2-clause | -4,125,093,519,237,388,300 | 33.147783 | 185 | 0.59247 | false | 3.675504 | false | false | false |
jonnybazookatone/ADSimportpipeline | lib/conversions.py | 1 | 1831 | #!/usr/bin/env python
import ads
from ads.Looker import Looker
class ConvertBibcodes:
def __init__(self):
self.bib2alt = Looker(ads.alternates).look
self.bib2epr = Looker(ads.pub2arx).look
self.alt2bib = Looker(ads.altlist).look
self.epr2bib = Looker(ads.ematches).look
def get... | gpl-3.0 | -3,548,930,736,092,136,400 | 32.290909 | 72 | 0.541234 | false | 3.830544 | false | false | false |
nickraptis/fidibot | src/modules/help.py | 1 | 2615 | # Author: Nick Raptis <airscorp@gmail.com>
"""
Module for listing commands and help.
"""
from basemodule import BaseModule, BaseCommandContext
from alternatives import _
class HelpContext(BaseCommandContext):
def cmd_list(self, argument):
"""List commands"""
arg = argument.lower()
index ... | bsd-2-clause | -5,116,395,268,455,257,000 | 32.961039 | 79 | 0.521606 | false | 4.035494 | false | false | false |
google-research/leaf-audio | example/train.py | 1 | 2594 | # coding=utf-8
# Copyright 2021 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 agreed ... | apache-2.0 | 7,620,625,562,801,573,000 | 35.027778 | 79 | 0.692367 | false | 3.877429 | false | false | false |
moagstar/xsorted | docs/conf.py | 1 | 8799 | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
# ... | mit | -1,019,507,065,598,080,300 | 33.778656 | 85 | 0.690533 | false | 3.689308 | false | false | false |
buckets1337/MotherMUD | Objects.py | 1 | 25773 | # Objects.py
"""
This file defines the various different objects that can be found in the world
"""
#--------------------------
# This file defines the objects in the world. Best practice for naming an object follows: <region><Room><Name>, where the region is lowercase and every other word in the smashed string is ca... | apache-2.0 | 8,426,455,827,758,730,000 | 31.665399 | 333 | 0.702867 | false | 2.862077 | false | false | false |
bjornaa/roppy | roppy/averator.py | 1 | 1728 | # -*- coding: utf-8 -*-
"""Generator for moving averages from ROMS file(s)"""
import numpy as np
def roms_averator(ncid, var_name, L, grd):
"""Generator for moving averages from ROMS file(s)
var_name : text string, name of NetCDF variable
ncid : an open NetCDF Dataset or MFDataset
grd : a roppy.S... | mit | 2,815,143,418,121,291,300 | 29.315789 | 73 | 0.545718 | false | 2.860927 | false | false | false |
PrincetonML/AND4NMF | code/compute_error.py | 1 | 1397 | import numpy as np
from numpy.linalg import norm
def compute_error(A_in, Ag_in):
A = A_in
Ag = Ag_in
#reallign
D = A.shape[1]
inner = np.zeros((D, D))
for i in range(D):
for j in range(D):
inner[i, j] = np.asscalar(A[:, i].transpose() * Ag[:, j] )/(norm(A[:, i]) * norm(Ag[:... | mit | -702,603,614,609,093,800 | 30.75 | 103 | 0.531854 | false | 2.755424 | false | false | false |
Tong-Chen/scikit-learn | sklearn/ensemble/gradient_boosting.py | 1 | 44936 | """Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressio... | bsd-3-clause | 8,973,508,359,669,950,000 | 36.260365 | 81 | 0.582228 | false | 4.10337 | false | false | false |
linuxdeepin/deepin-ui | dtk/ui/tooltip.py | 1 | 22624 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 ~ 2012 Deepin, Inc.
# 2011 ~ 2012 Xia Bin
#
# Author: Xia Bin <xiabin@linuxdeepin.com>
# Maintainer: Xia Bin <xiabin@linuxdeepin.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... | gpl-3.0 | -150,503,247,418,591,170 | 30.730715 | 230 | 0.594457 | false | 3.41649 | false | false | false |
jackjlynch/github-activity-mirror | gh_copy.py | 1 | 1333 | from lxml import html
import requests
import argparse
from datetime import datetime
from git import Repo, Actor
def main():
parser = argparse.ArgumentParser(description='Copy a user\'s Github commit activity')
parser.add_argument('user')
parser.add_argument('repo_dir')
parser.add_argument('name')
p... | gpl-3.0 | 1,612,143,610,113,723,100 | 30 | 104 | 0.642911 | false | 3.652055 | false | false | false |
AISystena/web_crawler | lib/image_cnn/ImagePredictor.py | 1 | 1517 | # coding: utf-8
import os.path
import pickle
import numpy as np
#from chainer import cuda
import chainer.functions as F
import Util
"""
CNNによる画像分類 (posi-nega)
- 5層のディープニューラルネット
"""
class ImagePredictor:
def __init__(self, gpu=0):
current_dir_path = os.path.dirname(__file__)
self.model_pkl = cu... | mit | 6,428,009,083,430,815,000 | 23.810345 | 66 | 0.540653 | false | 3.016771 | false | false | false |
oscarpilote/Ortho4XP | src/O4_Mesh_Utils.py | 1 | 24769 | import time
import sys
import os
import pickle
import subprocess
import numpy
import requests
from math import sqrt, cos, pi
import O4_DEM_Utils as DEM
import O4_UI_Utils as UI
import O4_File_Names as FNAMES
import O4_Geo_Utils as GEO
import O4_Vector_Utils as VECT
import O4_OSM_Utils as OSM
import O4_Version
if 'dar'... | gpl-3.0 | -8,716,772,008,718,751,000 | 45.039033 | 197 | 0.559772 | false | 3.142477 | false | false | false |
Treeki/NewerSMBW | Koopatlas/src/worldeditor.py | 1 | 5227 | from common import *
import re
def editableColourStr(array):
return '#%02X%02X%02X (%d)' % tuple(array)
NICE_STR_RE = re.compile('^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})\s*(?:\((\d+)\))?$')
def colourFromNiceStr(thing):
match = NICE_STR_RE.match(thing)
try:
if match:
r,g,b,a = match.groups()
ret... | mit | 4,182,107,282,050,427,000 | 27.562842 | 96 | 0.650277 | false | 2.89745 | false | false | false |
daviddrysdale/pynamo | dynamo2.py | 1 | 10913 | """Implementation of Dynamo
Second iteration, adding detection of missing responses and expansion of the preference list."""
import copy
import random
import logging
import logconfig
from node import Node
from framework import Framework
from hash_multiple import ConsistentHashTable
from dynamomessages import ClientPu... | gpl-2.0 | 6,073,878,917,768,870,000 | 43.004032 | 121 | 0.607441 | false | 3.802439 | false | false | false |
3WiseMen/python | pystock/pystock_xingAPI/xarequest.py | 1 | 23907 | #xarequest.py
import os
import threading
import time
import win32com.client
from .abstract_component import AbstractQueryProviderComponent
from .abstract_component import AbstractSubscriptionProviderComponent
class XAQueryEvents:
def __init__(self):
self._event_object_connector = XAQueryEvents.event_obj... | mit | 6,547,232,836,483,975,000 | 31.366959 | 138 | 0.660839 | false | 2.479465 | false | false | false |
hosseinoliabak/learningpy | 13_51_googleApi.py | 1 | 2968 | '''
Calling a JSON API
In this assignment, you will write a Python program somewhat similar to
http://www.py4e.com/code3/geojson.py. The program will prompt for a location,
contact a web service and retrieve JSON for the web service and parse that data,
and retrieve the first place_id from the JSON. A place ID is a te... | gpl-3.0 | 1,357,545,549,673,138,400 | 37.545455 | 80 | 0.723383 | false | 3.550239 | false | false | false |
mgp/sharebears | sharebears/url_decoder_github.py | 1 | 5196 | import re
import url_decoder
from url_decoder import UrlDecoder, UrlDecoderException
class _GitHubUrlDecoder(UrlDecoder):
@staticmethod
def can_decode_url(url, parsed_url):
if not parsed_url.netloc.startswith("github."):
return False
return True
class GitHubRepositoryOwnerItem:
"""The owner in ... | apache-2.0 | 2,276,164,251,358,414,600 | 26.0625 | 89 | 0.672825 | false | 3.57605 | false | false | false |
zhlinh/leetcode | 0142.Linked List Cycle II/solution.py | 1 | 1073 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
*****************************************
Author: zhlinh
Email: zhlinhng@gmail.com
Version: 0.0.1
Created Time: 2016-03-17
Last_modify: 2016-03-17
******************************************
'''
'''
Given a linked list,
return the node where... | apache-2.0 | -6,262,251,490,648,963,000 | 22.844444 | 44 | 0.50699 | false | 3.930403 | false | false | false |
harkrishan/TwitterBot | TwitterBot.py | 1 | 3213 | #!/usr/bin/python
# Importing Twython
from twython import Twython
# Importing Wolfram
import urllib
import wolframalpha
import urllib2
from xml.etree import ElementTree as etree
import sys
import time
#Setting variables for Twitter
app_key = "*****YOUR APP KEY******"
app_secret = "****YOUR APP SECRET*****"
oauth_tok... | gpl-2.0 | 5,662,756,556,183,229,000 | 29.894231 | 112 | 0.498599 | false | 3.815914 | false | false | false |
alpha-beta-soup/errorgeopy | tests/test_geocoders.py | 1 | 6649 | import os
import encodings.idna
import pytest
import yaml
import geopy
import shapely
import errorgeopy.geocoders
@pytest.fixture
def addresses():
return (
'66 Great North Road, Grey Lynn, Auckland, 1021, New Zealand',
'Grey Lynn, Auckland, 1021, New Zealand',
'High Street, Lower Hutt, N... | mit | 523,301,348,730,464,060 | 34.747312 | 99 | 0.638893 | false | 3.56706 | true | false | false |
onshape-public/onshape-clients | python/onshape_client/oas/models/card.py | 1 | 9994 | # coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | mit | 5,214,020,824,491,918,000 | 38.976 | 82 | 0.537823 | false | 3.787041 | true | false | false |
Wajihulhassan/SelfContainedPrevirt | tools/occam/occam/targets/ld.py | 1 | 7705 | # ------------------------------------------------------------------------------
# OCCAM
#
# Copyright © 2011-2012, SRI International
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redis... | bsd-3-clause | 6,475,538,266,495,347,000 | 46.850932 | 84 | 0.579439 | false | 3.665081 | false | false | false |
HiroyukiAbe/pimouse_ros | scripts/lightsensors.py | 1 | 1406 | #!/usr/bin/env python
#encoding: utf8
import sys, rospy
from pimouse_ros.msg import LightSensorValues
def get_freq():
f = rospy.get_param('lightsensors_freq',10)
try:
if f <= 0.0:
raise Exception()
except:
rospy.logerr("value error: lightsensors_freq")
sys.exit(1)
return f
if __name__ == '__main__':
... | bsd-3-clause | -61,620,430,447,069,090 | 29.565217 | 78 | 0.45377 | false | 3.938375 | false | false | false |
shadsbot/AutoCrop | CropImage.py | 1 | 4681 | from PIL import Image, ImageTk, ImageDraw
class Crop:
"""Object that contains the tools to manipulate a spritesheet"""
def __init__(self, file="example.png", cropSize=[64,64], padding=0, offset=[0,0], direction="Both", numberCrops=0, useUserCrops=False):
self.direction = direction
self.offset = {"x" : offset[0]... | mit | -8,013,426,775,849,068,000 | 33.681481 | 136 | 0.660543 | false | 2.877074 | false | false | false |
wdv4758h/flake8 | flake8/engine.py | 1 | 11434 | # -*- coding: utf-8 -*-
import errno
import io
import platform
import re
import sys
import warnings
import pep8
from flake8 import __version__
from flake8 import callbacks
from flake8.reporter import (multiprocessing, BaseQReport, FileQReport,
QueueReport)
from flake8 import util
_flake8... | mit | 5,101,505,648,745,265,000 | 35.298413 | 79 | 0.620255 | false | 4.255303 | false | false | false |
hughsaunders/keystone | keystone/common/ldap/core.py | 1 | 71345 | # Copyright 2012 OpenStack Foundation
#
# 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 | -522,299,333,275,910 | 38.969188 | 79 | 0.571266 | false | 4.124942 | false | false | false |
rphillips/bitbake | lib/bb/__init__.py | 1 | 4327 | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# BitBake Build System Python Library
#
# Copyright (C) 2003 Holger Schurig
# Copyright (C) 2003, 2004 Chris Larson
#
# Based on Gentoo's portage.py.
#
# This program is free software; you can redistribute it and/or modify
# it... | gpl-2.0 | 6,545,991,354,082,631,000 | 30.816176 | 94 | 0.645251 | false | 3.68569 | false | false | false |
akaariai/django-reverse-unique | reverse_unique_tests/models.py | 1 | 3974 | from __future__ import unicode_literals
from datetime import date
from django.db import models
from django.db.models import Q, F
from django.utils.translation import get_language
from reverse_unique import ReverseUnique
def filter_lang():
return Q(lang=get_language())
class Article(models.Model):
pub_date... | bsd-3-clause | -8,017,831,775,881,084,000 | 26.79021 | 91 | 0.693256 | false | 3.724461 | false | false | false |
kobotoolbox/kpi | kpi/management/commands/remove_duplicate_assetversions.py | 1 | 9498 | # coding: utf-8
import json
from collections import defaultdict
from hashlib import md5
from django.core.management.base import BaseCommand
from django.db import transaction
from ...models import Asset, AssetVersion
ROUGH_BATCH_MEM_LIMIT_MB = 100
MAX_BATCH_SIZE = 100
def find_original_and_duplicate_versions(versio... | agpl-3.0 | 5,937,014,375,773,076,000 | 39.589744 | 81 | 0.540114 | false | 4.535817 | false | false | false |
mihaelacr/pydeeplearn | code/lib/trainingoptions.py | 1 | 1144 | """ Defines a training options class as a holder for options that can be passed
for training a neural network.
"""
__author__ = "Mihaela Rosca"
__contact__ = "mihaela.c.rosca@gmail.com"
import numpy as np
# TODO: move from common here
import common
class TrainingOptions(object):
def __init__(self, miniBatchSize,
... | bsd-3-clause | -2,303,735,449,736,076,000 | 32.647059 | 79 | 0.733392 | false | 3.530864 | false | false | false |
Goldmund-Wyldebeast-Wunderliebe/raven-python | raven/contrib/django/client.py | 1 | 6779 | """
raven.contrib.django.client
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import logging
from django.conf import settings
from django.core.exceptions import Suspicio... | bsd-3-clause | 4,290,953,358,476,939,000 | 34.678947 | 129 | 0.569258 | false | 4.474587 | false | false | false |
dallingham/regenerate | regenerate/writers/c_defines.py | 1 | 3670 | #
# Manage registers in a hardware design
#
# Copyright (C) 2008 Donald N. Allingham
#
# 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... | gpl-2.0 | -6,252,778,430,328,302,000 | 32.981481 | 79 | 0.53188 | false | 3.937768 | false | false | false |
sh-chris110/chris | python/cube.py | 1 | 5099 | import sys
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
from PIL import Image
class MyPyOpenGLTest:
def __init__(self,
width=640,
height=480,
title='MyPyOpenGLTest'.encode()):
glutInit(sys.argv)
glutInitDisplayMode(GLU... | gpl-2.0 | -7,546,414,518,466,473,000 | 30.670807 | 68 | 0.513434 | false | 2.707913 | false | false | false |
m1093782566/openstack_org_ceilometer | ceilometer/openstack/common/fileutils.py | 1 | 4033 | # Copyright 2011 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 req... | apache-2.0 | 1,907,550,172,417,568,500 | 26.435374 | 78 | 0.661294 | false | 4.08612 | false | false | false |
khughitt/cats | test/formatters/test_fasta.py | 1 | 1635 | """
FASTAFormatter tests.
"""
import cats
import io
import os
import pytest
class TestFASTAFormatter:
@pytest.mark.parametrize('filename', [
'dna.fasta',
'dna_grep.fasta',
'dna.txt',
'dna_grep.txt',
'dna_zgrep.txt',
'rna.txt',
'rna_grep.txt',
'protein... | bsd-2-clause | 1,545,673,285,899,150,600 | 28.196429 | 78 | 0.529052 | false | 3.811189 | true | false | false |
USDA-ARS-NWRC/AWSF | awsm/interface/smrf_ipysnobal.py | 1 | 12538 | """
Functions for running PySnobal as well as SMRF and Pysnobal
threaded together
20170731 Micah Sandusky
"""
from datetime import datetime
import numpy as np
import pandas as pd
import pytz
import smrf.framework
from topocalc.shade import shade
from smrf.envphys import sunang
from smrf.utils import queue
from awsm... | gpl-3.0 | -4,230,425,102,818,562,600 | 30.822335 | 86 | 0.544664 | false | 3.702894 | false | false | false |
XianliangJ/collections | DCTCPTest/plot_queue.py | 1 | 2255 | '''
Plot queue occupancy over time
'''
from helper import *
import plot_defaults
from matplotlib.ticker import MaxNLocator
from pylab import figure
parser = argparse.ArgumentParser()
parser.add_argument('--files', '-f',
help="Queue timeseries output to one plot",
required=True... | gpl-3.0 | 1,796,765,571,080,518,000 | 26.839506 | 114 | 0.534812 | false | 3.770903 | false | false | false |
diggcoin/diggcoin | qa/rpc-tests/p2p-acceptblock.py | 1 | 12336 | #!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
from... | mit | -6,203,074,944,724,320,000 | 41.537931 | 107 | 0.634484 | false | 3.912464 | true | false | false |
hunter-87/binocular-dense-stereo | sfm_templeRing.py | 1 | 4749 | import cv2
import numpy as np
import scipy.spatial
#!/usr/bin/env python
#coding: utf8
import os
from matplotlib.pyplot import subplot
import matplotlib.pyplot as plt
# figsize(12,8)
T1 = cv2.imread('../dataset_templeRing/templeR0034.png', cv2.IMREAD_GRAYSCALE)
sift = cv2.SIFT(nfeatures=5000)
kpts1, D_i = sift.detec... | gpl-2.0 | -5,787,413,777,145,128,000 | 25.836158 | 84 | 0.562855 | false | 2.189488 | false | false | false |
jeffpiazza/derbynet | extras/scripts/lib/read_barcode.py | 1 | 2226 | #!/usr/bin/env python
import struct
import sys
scanner_device = sys.argv[1]
# Values taken from include/uapi/linux/input-event-codes.h
keys = {
2: '1', 3: '2', 4: '3', 5: '4', 6: '5', 7: '6', 8: '7', 9: '8', 10: '9', 11: '0', \
12: '-', 13: '=', \
16: 'q', 17: 'w', 18: 'e', 19: 'r', 20: 't', 21: 'y', 22: 'u', 23: 'i... | mit | -1,319,456,822,116,887,600 | 29.081081 | 91 | 0.469901 | false | 2.403888 | false | false | false |
kubeflow/kfserving | docs/samples/v1beta1/triton/torchscript/image_transformer_v2/image_transformer_v2.py | 1 | 1981 | # Copyright 2019 kubeflow.org.
#
# 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 | -6,574,397,262,375,359,000 | 31.47541 | 90 | 0.647148 | false | 3.861598 | false | false | false |
ipselium/cpyvke | cpyvke/objects/panel.py | 1 | 28277 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © 2016-2018 Cyril Desjouy <ipselium@free.fr>
#
# This file is part of cpyvke
#
# cpyvke 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 vers... | gpl-3.0 | -6,112,869,070,022,161,000 | 30.439377 | 115 | 0.539096 | false | 3.768533 | false | false | false |
pdl30/pynoncode | pynoncode/fasta_parsers.py | 1 | 3648 | #!/usr/bin/python
########################################################################
# 28 Apr 2014
# Patrick Lombard, Centre for Stem Stem Research
# Core Bioinformatics Group
# University of Cambridge
# All right reserved.
########################################################################
import argparse... | gpl-2.0 | 8,414,638,851,961,033,000 | 25.064286 | 72 | 0.584704 | false | 2.628242 | false | false | false |
eklinkhammer/gym-ctf | gym_ctf/state/flag.py | 1 | 3158 | import numpy as np
import random
import math
class Flag():
""" A flag is target that agents use to score in capture the flag.
Once captured, it is marked as taken and stores the scoring team.
"""
def __init__(self, pos, scoring_radius):
assert scoring_radius >= 0
self.... | mit | 6,347,739,872,781,049,000 | 33.703297 | 80 | 0.578214 | false | 4.160738 | false | false | false |
gajim/python-nbxmpp | nbxmpp/modules/register/util.py | 1 | 4233 | # Copyright (C) 2018 Philipp Hörist <philipp AT hoerist.com>
#
# This file is part of nbxmpp.
#
# 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 | 3,761,805,763,904,235,000 | 31.305344 | 75 | 0.661153 | false | 3.861314 | false | false | false |
thomasmoelhave/TerraNNI | data-generator.py | 1 | 2762 | #!/usr/bin/env python
# encoding: utf-8
import sys
import os
import math
import random
from optparse import OptionParser
# Simple function to write out results in a (which contains three arrays) to file fn
def writeArray(fn, a):
if fn:
f = open(fn, 'w')
for i in range(0,len(a)):
f.write("%f %f %f %d\n" % (a[i... | gpl-3.0 | -3,000,724,322,534,402,000 | 25.815534 | 118 | 0.60391 | false | 2.317114 | false | false | false |
lym/allura-git | Allura/allura/lib/utils.py | 1 | 20481 | # 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 (t... | apache-2.0 | 4,468,536,068,037,648,400 | 30.953198 | 92 | 0.609541 | false | 3.780177 | false | false | false |
jmoss2020/moss-advprog | Shapes.py | 1 | 3209 | class Circle():
def __init__(self, r):
self.r = r
def area(self):
return (self.r ** 2) * 3.14
def perimeter(self):
return self.r * 6.28
def __str__(self):
return "Circle has a radius of %.2f, an area of %.2f, and a perimeter of %.2f." % (self.r, self.area, self.perimet... | gpl-3.0 | 700,869,985,878,508,000 | 27.651786 | 196 | 0.569959 | false | 2.976809 | false | false | false |
jonathanhowells/sentimentCSV | sentimentCSV.py | 1 | 4119 | import os
import subprocess
import sys
import timeit
import csv
import pandas as pd
import re
import string
import numpy as np
import shutil
directory = os.getcwd()
os.chdir(directory)
stanford_directory = raw_input("Enter path to Stanford CoreNLP: ")
input_filename = raw_input("Enter input csv filename: ")
output_... | gpl-2.0 | 6,229,005,747,004,761,000 | 26.278146 | 112 | 0.62151 | false | 3.223005 | false | false | false |
MalmoUniversity-DA366A/calvin-base | calvin/runtime/north/calvincontrol.py | 1 | 20945 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 | -3,372,114,627,838,210,600 | 32.836834 | 195 | 0.575651 | false | 3.404031 | false | false | false |
lyzardiar/RETools | PublicTools/bin/tools/packLuaJit.py | 1 | 1726 | #coding=utf-8
import os
import os.path
import shutil
import sys
import getopt
import string
import fnmatch
import md5
import hashlib
import zipfile
import time
import threading
import struct
from pprint import pprint
from struct import *
projectdir = os.path.dirname(os.path.realpath(__file__))
compileBin = os.pa... | mit | 5,455,863,543,919,101,000 | 26.854839 | 81 | 0.598494 | false | 3.351456 | false | false | false |
CIGIHub/greyjay | greyjay/themes/models.py | 1 | 4991 | from __future__ import absolute_import, division, unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from modelcluster.fields import ParentalKey
from modelcluster.models import ClusterableModel
from wagtail.wagtailadmin.edit_handlers import (
FieldPanel,
... | mit | -7,877,395,620,834,723,000 | 23.707921 | 106 | 0.651773 | false | 3.9928 | false | false | false |
devilry/devilry-django | devilry/devilry_frontpage/cradminextensions/listbuilder/listbuilder_role.py | 1 | 5167 | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.utils.translation import pgettext_lazy
from cradmin_legacy import crapp
from cradmin_legacy.crinstance import reverse_cradmin_url
from cradmin_legacy.viewhelpers import listbuilder
from devilry.devilry_cradmin import devilry_lis... | bsd-3-clause | 8,373,252,969,505,380,000 | 30.315152 | 99 | 0.660538 | false | 3.827407 | false | false | false |
serkansokmen/qn | qn/wsgi.py | 1 | 2213 | """
WSGI config for qn project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` setti... | bsd-3-clause | 1,427,026,455,742,831,900 | 34.126984 | 79 | 0.729327 | false | 3.80895 | false | false | false |
chiara-paci/costruttoridimondi | costruttoridimondi/functional_tests/test_sharing.py | 1 | 1528 | from selenium import webdriver
from . import pages,base
class SharingTest(base.MultiuserFunctionalTest):
def test_logged_in_users_stories_are_saved_as_my_stories(self):
# Edith is a logged-in user
self.set_browser('edith@example.com',size=(700,900),position=(0,0))
# Her friend Oniciferous... | gpl-3.0 | 7,599,141,757,490,930,000 | 36.268293 | 120 | 0.644634 | false | 3.336245 | false | false | false |
jpancoast/aws-py-tools | checkSGForOutboundAll.py | 1 | 1424 | #!/usr/bin/env python
import sys
import signal
import boto.ec2
import operator
import getopt
from lib.AWSPyTools import ParseOptions
from lib.AWSPyTools import AWSPyTools
def main(argv):
signal.signal(signal.SIGINT, signal_handler)
po = ParseOptions(sys.argv)
(env, region, vpc_id) = po.getAwsOptions()
... | gpl-2.0 | -3,898,750,051,795,106,300 | 26.921569 | 200 | 0.605337 | false | 3.406699 | false | false | false |
barentsen/dave | diffimg/fastpsffit.py | 1 | 4310 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 19 16:39:13 2018
A much faster PRF fitter, with the caveat that the psf model is hardcoded.
psffit.py can fit an arbitrary PSF model to an image. The cost of this flexibility
is that it must perform numerical intergration to calculate the flux in each pixel.
This is slo... | mit | 5,773,724,286,923,327,000 | 24.502959 | 93 | 0.639675 | false | 3.705933 | false | false | false |
caedesvvv/b2rex | scripts/b2rexpkg/charexporter.py | 1 | 8874 | """
RealXtend character exporter
"""
import os
import b2rexpkg
from b2rexpkg.siminfo import GridInfo
from b2rexpkg.simconnection import SimConnection
from b2rexpkg.ogre_exporter import OgreExporter
from b2rexpkg.hooks import reset_uuids
from ogrepkg.base import indent
from ogrepkg.armatureexport import GetArmatureObj... | lgpl-3.0 | -3,429,808,671,769,813,000 | 37.751092 | 102 | 0.564683 | false | 3.733277 | false | false | false |
ARM-software/bob-build | tests/source_encapsulation/gen_fun3.py | 1 | 2535 | #!/usr/bin/env python
# Copyright 2020 Arm Limited.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | apache-2.0 | -6,791,542,741,674,078,000 | 32.355263 | 98 | 0.589349 | false | 4.155738 | false | false | false |
zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/125_IntheNameofEvilPart1/__init__.py | 1 | 6260 | import sys
from com.l2scoria.gameserver.datatables import SkillTable
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
qn = "125_IntheNameofEvilPart1"
# NPCs
MUSHIKA = 32114
... | gpl-3.0 | 3,013,677,245,302,723,600 | 29.691176 | 118 | 0.652236 | false | 2.452978 | false | false | false |
wannabeCitizen/projectsystem | lib/verify.py | 1 | 2667 | """
For handling permission and verification requests
"""
import json
import datetime
from lib.model import User, Organization, MiniOrganization, IdeaMeta, Project
#Checks if someone is an owner of an organization they are trying to modify
def is_owner(org_id, user_id):
my_org = Organization.objects.get(unique=or... | mit | 8,657,110,029,647,846,000 | 29.306818 | 84 | 0.665542 | false | 3.260391 | false | false | false |
credativ/pulp | server/test/unit/server/webservices/views/test_consumers.py | 1 | 76384 | import json
import unittest
import mock
from django.http import HttpResponseBadRequest
from base import assert_auth_CREATE, assert_auth_DELETE, assert_auth_READ, assert_auth_UPDATE
from pulp.server.exceptions import (InvalidValue, MissingResource, MissingValue,
OperationPostponed, ... | gpl-2.0 | -1,395,906,513,170,108,400 | 46.414029 | 100 | 0.639558 | false | 3.978955 | true | false | false |
pmghalvorsen/gramps_branch | gramps/gui/filters/sidebar/_sidebarfilter.py | 1 | 9432 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2010 Nick Hall
#
# 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 v... | gpl-2.0 | 512,867,680,985,231,900 | 33.423358 | 95 | 0.586514 | false | 3.759267 | false | false | false |
Bioto/Huuey-python | huuey/hue/lights/light.py | 1 | 2617 | from huuey.hue.state import State
from huuey.paths import Paths
class Light:
"""
Description:
Holds data for a single Light from the hues API
Attrs:
state: Holds instance of State()
name: Name of the group
modelid: Type of Light
swversion: Software Version
... | mit | -8,591,549,799,090,077,000 | 24.163462 | 71 | 0.504776 | false | 4.689964 | false | false | false |
eviljeff/olympia | src/olympia/files/tests/test_admin.py | 1 | 3053 | from django.utils.encoding import force_text
from olympia.amo.tests import TestCase, addon_factory, user_factory
from olympia.amo.urlresolvers import reverse
class TestFileAdmin(TestCase):
def setUp(self):
self.list_url = reverse('admin:files_file_changelist')
def test_can_list_files_with_admin_adva... | bsd-3-clause | 1,612,477,954,414,876,000 | 38.649351 | 71 | 0.63151 | false | 3.797264 | true | false | false |
sergesyrota/Splunk-license-watchdog | splunk-license-watchdog.py | 1 | 11265 | #!/usr/bin/env python
##################
#
# DEPENDENCIES
#
# Python 2.6+
# Python packages: sys, getopt, requests, time
# Splunk: 4.2+
#
##################
from __future__ import print_function
#
# CONFIGURATION
#
# Authentication information for your Splunk setup
_splunkUser = "user"
_splunkPass = "pass"
# host ... | mit | -5,825,861,814,609,172,000 | 44.06 | 370 | 0.653262 | false | 3.908744 | true | false | false |
calico/basenji | bin/basenji_fetch_app2.py | 1 | 10874 | #!/usr/bin/env python
from optparse import OptionParser
import collections
import functools
import os
import pdb
import sys
import numpy as np
import pandas as pd
import h5py
from google.cloud import bigquery
import dash
import dash_table as dt
import dash.dependencies as dd
import dash_core_components as dcc
import... | apache-2.0 | 4,630,189,006,834,960,000 | 30.068571 | 86 | 0.469101 | false | 3.84648 | false | false | false |
OpenTTD-Ladder/ladder-web | ladder/matchmaking/admin.py | 1 | 1149 | from django.contrib import admin
from translations.admin import TranslationInline
from .models import Ladder, LadderTranslation
class LadderTranslationAdmin(TranslationInline):
model = LadderTranslation
class LadderAdmin(admin.ModelAdmin):
inlines = [LadderTranslationAdmin]
fieldsets = (
(None,... | gpl-2.0 | -7,043,679,489,068,449,000 | 31.857143 | 74 | 0.575283 | false | 4.017483 | false | false | false |
JshWright/home-assistant | homeassistant/components/notify/telegram.py | 2 | 6078 | """
Telegram platform for notify component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.telegram/
"""
import io
import logging
import urllib
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from ho... | apache-2.0 | -8,644,028,738,815,384,000 | 31.15873 | 78 | 0.607108 | false | 3.996055 | false | false | false |
wangjeaf/CSSCheckStyle | setup.py | 1 | 2417 | #!/usr/bin/env python
#
# Copyright 2012 The CSSCheckStyle 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
#
... | bsd-3-clause | -7,363,632,864,279,290,000 | 31.226667 | 85 | 0.65784 | false | 3.747287 | false | false | false |
ibackus/diskpy | diskpy/ICgen/sigma_profile.py | 1 | 9111 | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 23 10:17:53 2014
@author: ibackus
"""
# External modules
import numpy as np
import pynbody
SimArray = pynbody.array.SimArray
# diskpy modules
from diskpy.pdmath import smoothstep
from diskpy.utils import match_units
def make_profile(ICobj):
"""
A wrapper for g... | mit | -394,328,247,553,542,200 | 25.955621 | 89 | 0.584897 | false | 3.41236 | false | false | false |
erigones/esdc-ce | api/dc/template/api_views.py | 1 | 3081 | from django.utils.translation import ugettext_noop as _
from api import status
from api.api_views import APIView
from api.exceptions import PreconditionRequired, ObjectAlreadyExists
from api.task.response import SuccessTaskResponse
from api.utils.db import get_object
from api.dc.utils import remove_dc_binding_virt_obj... | apache-2.0 | 5,641,864,116,140,040,000 | 37.037037 | 119 | 0.586173 | false | 3.919847 | false | false | false |
isralopez/geonode | setup.py | 1 | 5140 | #########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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
#... | gpl-3.0 | -7,154,889,025,022,198,000 | 35.197183 | 104 | 0.609728 | false | 3.482385 | false | false | false |
hradec/cortex | test/IECoreHoudini/FromHoudiniPointsConverter.py | 1 | 49213 | ##########################################################################
#
# Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
# its affiliates and/or its licensors.
#
# Copyright (c) 2010-2015, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary ... | bsd-3-clause | 3,866,630,561,449,466,000 | 46.919182 | 155 | 0.708268 | false | 3.047433 | true | false | false |
bung87/django-moe-auth | setup.py | 1 | 1126 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# import codecs
# import os
from distutils.core import setup
from setuptools import find_packages
# version_tuple = __import__('django_js_reverse').VERSION
# version = '.'.join([str(v) for v in version_tuple])
setup(
name='django-moe-auth',
version='0.0.1',
cl... | mit | -3,784,006,114,095,165,400 | 29.432432 | 73 | 0.618117 | false | 3.597444 | false | false | false |
revdotcom/babelsubs | babelsubs/utils.py | 2 | 7601 | import re
import bleach
import htmllib
import htmlentitydefs
import formatter
from itertools import chain
from xmlconst import *
DEFAULT_ALLOWED_TAGS = ['i', 'b', 'u']
MULTIPLE_SPACES = re.compile('\s{2,}')
BLANK_CHARS = re.compile('[\n\t\r]*')
# We support unsyced subs, meaning there is not timing data for them
# in... | bsd-3-clause | 4,482,841,142,669,328,000 | 33.393665 | 129 | 0.616629 | false | 3.621248 | false | false | false |
markfasheh/ocfs2-tools | ocfs2console/ocfs2interface/mount.py | 1 | 5115 | # OCFS2Console - GUI frontend for OCFS2 management and debugging
# Copyright (C) 2002, 2005 Oracle. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of th... | gpl-2.0 | 519,026,439,820,794,300 | 27.416667 | 76 | 0.608798 | false | 3.825729 | false | false | false |
ProjectQ-Framework/FermiLib | src/fermilib/utils/_trotter_error_test.py | 1 | 6490 | # Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# 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 app... | apache-2.0 | 837,469,697,044,621,600 | 38.333333 | 79 | 0.642527 | false | 3.254764 | true | false | false |
tadamic/sokoenginepy | src/sokoenginepy/tessellation/hexoban_tessellation/hexoban_tessellation.py | 1 | 3295 | from ...utilities import COLUMN, ROW, index_1d, inverted, is_on_board_2d
from ..direction import Direction, UnknownDirectionError
from ..tessellation_base import TessellationBase, TessellationBaseInheritableDocstrings
class HexobanTessellation(
TessellationBase, metaclass=TessellationBaseInheritableDocstrings
):
... | gpl-3.0 | -4,547,235,167,960,441,300 | 34.053191 | 87 | 0.598786 | false | 3.702247 | false | false | false |
tolteck/stripe_mock_server | localstripe/errors.py | 1 | 1326 | # -*- coding: utf-8 -*-
# Copyright 2017 Adrien Vergé
#
# 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... | gpl-3.0 | 9,209,162,390,930,675,000 | 32.974359 | 71 | 0.678491 | false | 3.88563 | false | false | false |
lanhel/pyzombie | setup/lib/distutils_local/build_docutils.py | 1 | 4094 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#-------------------------------------------------------------------------------
"""test
Implements a Distutils 'test' command."""
__author__ = ('Lance Finn Helsten',)
__version__ = '1.0.1'
__copyright__ = """Copyright 2009 Lance Finn Helsten (helsten@acm.org)"""
__license... | apache-2.0 | -7,969,874,219,492,791,000 | 37.990476 | 148 | 0.586957 | false | 3.776753 | false | false | false |
yxdong/ybk | ybk/lighttrade/sysframe/client.py | 1 | 7588 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import random
import logging
from concurrent.futures import ThreadPoolExecutor
import requests
from requests.packages.urllib3.util import is_connection_dropped
import xmltodict
from .protocol import (UserProtocol, TradeProtocol,
MoneyP... | mit | 2,448,941,336,220,080,600 | 32.707763 | 77 | 0.518288 | false | 3.689155 | false | false | false |
tensorflow/tpu | models/experimental/show_and_tell/show_and_tell_model.py | 1 | 13116 | # Copyright 2016 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 | 4,280,079,833,549,058,000 | 34.448649 | 80 | 0.658432 | false | 3.816119 | true | false | false |
mganeva/mantid | scripts/HFIR_4Circle_Reduction/optimizelatticewindow.py | 1 | 3900 | # 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
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=C0103
from __future__ import... | gpl-3.0 | -8,642,162,336,785,655,000 | 27.057554 | 101 | 0.554103 | false | 4.193548 | false | false | false |
alexandregz/simian | src/simian/util/compile_js.py | 1 | 1961 | #!/usr/bin/env 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 require... | apache-2.0 | 2,229,931,755,863,811,600 | 31.147541 | 92 | 0.721061 | false | 3.27379 | false | false | false |
gonicus/gosa | doc/sphinx-cindex/setup.py | 1 | 1188 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the cindex Sphinx extension.
Allows declaring cindex specs wherever in the documentation (for instance,
in docstrings of UnitTest.test_* methods) and displaying them as a single
list.
'''
... | lgpl-2.1 | -4,032,579,850,245,826,600 | 27.285714 | 74 | 0.648148 | false | 4 | false | false | false |
npawelek/rpc-maas | playbooks/files/rax-maas/plugins/neutron_api_local_check.py | 1 | 3562 | #!/usr/bin/env python
# Copyright 2014, Rackspace US, 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 applicabl... | apache-2.0 | -165,083,766,257,173,760 | 36.104167 | 74 | 0.623526 | false | 4.13705 | false | false | false |
billzorn/msp-pymodel | lib/msp_assem.py | 1 | 7687 | import msp_fr5969_model as model
from msp_isa import isa
# low level wrappers for isa methods
def _as(fmt, name, smode, dmode, fields):
ins = isa.modes_to_instr(fmt, name, smode, dmode)
#print('{:s} {:s} {:s} {:s}'.format(name, smode, dmode, repr(fields)))
words = isa.inhabitant(ins, fields)
return wo... | mit | 1,911,821,831,308,556,000 | 33.164444 | 89 | 0.525433 | false | 3.704578 | false | false | false |
myfavouritekk/TPN | tools/propagate/sequence_roi_propagation.py | 1 | 6286 | #!/usr/bin/env python
# --------------------------------------------------------
# Test regression propagation on ImageNet VID video
# Modified by Kai KANG (myfavouritekk@gmail.com)
# --------------------------------------------------------
"""Test a Fast R-CNN network on an image database."""
import argparse
import... | mit | 6,455,828,710,421,682,000 | 37.802469 | 92 | 0.592587 | false | 3.598168 | false | false | false |
TomasTomecek/osbs | osbs/exceptions.py | 1 | 1766 | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
Exceptions raised by OSBS
"""
from traceback import format_tb
class OsbsException(Exception):
def __init__(self, message=None, cause=None... | bsd-3-clause | -7,734,197,998,496,036,000 | 29.982456 | 78 | 0.61778 | false | 4.031963 | false | false | false |
baderj/domain_generation_algorithms | proslikefan/dga.py | 1 | 1425 | import argparse
from ctypes import c_int
from datetime import datetime
def dga(date, magic, tlds):
# tlds = ["eu", "biz", "se", "info", "com", "net", "org", "ru", "in",
# "name"]
for i in range(10):
for tld in tlds:
seed_string = '.'.join([str(s) for s in
[ma... | gpl-2.0 | -7,406,160,187,670,002,000 | 32.139535 | 85 | 0.490526 | false | 3.275862 | false | false | false |
fujicoin/fujicoin | test/functional/wallet_listreceivedby.py | 1 | 8103 | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Fujicoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the listreceivedbyaddress RPC."""
from decimal import Decimal
from test_framework.test_framework... | mit | -8,886,061,812,897,744,000 | 46.385965 | 197 | 0.623473 | false | 3.8549 | true | false | false |
maoy/zknova | nova/api/openstack/compute/contrib/security_groups.py | 1 | 21752 | # Copyright 2011 OpenStack LLC.
# Copyright 2012 Justin Santa Barbara
# 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/license... | apache-2.0 | 8,453,430,313,926,961,000 | 36.37457 | 79 | 0.594796 | false | 4.262591 | false | false | false |
vaidap/zulip | zerver/views/home.py | 1 | 11809 | from __future__ import absolute_import
from typing import Any, List, Dict, Optional, Text
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse, HttpRequest
from django.shortcuts import redirect, render
from django.utils import translat... | apache-2.0 | -5,072,437,405,447,221,000 | 43.394737 | 109 | 0.65594 | false | 3.981457 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.