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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hugs/django | django/db/models/fields/related.py | 1 | 42717 | from django.db import connection, transaction
from django.db.models import signals, get_model
from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist
from django.db.models.related import RelatedObject
from django.db.models.query import Query... | bsd-3-clause | -879,966,623,721,259,000 | 44.735546 | 217 | 0.60641 | false | 4.126449 | false | false | false |
kirberich/gerber_to_scad | vector.py | 1 | 3314 | # Basic vector maths class
import math
class V(object):
def __init__(self, x=0, y=0):
self.x = float(x)
self.y = float(y)
def __unicode__(self):
return "(%s, %s)" % (self.x, self.y)
__repr__ = __unicode__
@classmethod
def from_tuple(cls, coordinates):
x, y = coord... | mit | -2,852,812,981,836,606,500 | 27.324786 | 90 | 0.521123 | false | 3.430642 | false | false | false |
popazerty/beyonwiz-4.1 | lib/python/Components/Converter/EventName.py | 1 | 4665 | from enigma import eEPGCache
from Components.Converter.Converter import Converter
from Components.Element import cached
from Components.Converter.genre import getGenreStringSub
class EventName(Converter, object):
NAME = 0
SHORT_DESCRIPTION = 1
EXTENDED_DESCRIPTION = 2
FULL_DESCRIPTION = 3
ID = 4
NAME_NOW = 5
... | gpl-2.0 | -8,038,430,678,504,437,000 | 30.52027 | 92 | 0.646731 | false | 3.17563 | false | false | false |
qqfly/arc | hks_gripper/src/hksGripperSrv2.py | 1 | 1469 | #!/usr/bin/env python
#from beginner_tutorials.srv import *
from aimm_srv.srv import hksGripper
import rospy
import socket
import string
from PIL import Image,ImageFont,ImageDraw
HOST = '192.168.1.101' # The remote host
PORT = 13000 # The same port as used by the server
s = None
state = 0;
def h... | bsd-3-clause | -5,293,182,609,316,089,000 | 22.31746 | 95 | 0.682777 | false | 2.627907 | false | false | false |
projectatomic/osbs-client | tests/throughput-test-harness.py | 1 | 8369 | #!/usr/bin/python
from __future__ import absolute_import
import re
import sys
import time
import logging
import argparse
import subprocess
from dockerfile_parse import DockerfileParser
DEFAULT_BRANCH_PREFIX = "branch"
DEFAULT_BRANCH_COUNT = 100
DEFAULT_STAGGER_NUMBER = 10
DEFAULT_STAGGER_WAIT = 60
DEFAULT_KOJI_BIN ... | bsd-3-clause | 6,371,666,067,306,513,000 | 34.918455 | 99 | 0.590752 | false | 3.971998 | false | false | false |
Torkvamedo/smx | tasks/part_2_Se7en.py | 1 | 5139 | #--------Gof (порождающие паттерны) Builder-----------------------------------------------------------------------------
#
# class Building:
# def make_basement(self,basement):
# pass
# def make_walls(self,walls):
# pass
# def make_roof(self,roof):
# pass
#
# class Sky_scriber(Buildi... | unlicense | -9,211,868,288,961,263,000 | 25.989362 | 120 | 0.440284 | false | 3.282018 | false | false | false |
SuLab/biothings.api | biothings/databuild/mapper.py | 1 | 2870 | from biothings.utils.dataload import alwayslist
class BaseMapper(object):
"""
Basic mapper used to convert documents.
if mapper's name matches source's metadata's mapper,
mapper.convert(docs) call will be used to
process/convert/whatever passed documents
"""
def __init__(self, name=None,... | apache-2.0 | 3,674,017,107,009,157,000 | 29.860215 | 84 | 0.591986 | false | 4.251852 | false | false | false |
rafaelferrero/sigcaw | grados/migrations/0001_initial.py | 1 | 2325 | # Generated by Django 2.1.2 on 2018-12-01 20:06
import colorfield.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Escalafon',
... | gpl-3.0 | -1,061,136,195,948,800,800 | 39.034483 | 175 | 0.55814 | false | 4.024263 | false | false | false |
Abogical/borg-gtk | src/filetree.py | 1 | 11077 | import common, enums
import borg, importlib
importlib.import_module('.helpers', 'borg')
importlib.import_module('.fuse', 'borg')
import os, stat, pwd, grp, gi, collections
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gio, GObject
def toggle_hide_column(checkbox, column):
column.set_visible(checkb... | bsd-2-clause | -472,546,436,021,843,840 | 36.296296 | 112 | 0.701363 | false | 2.972893 | false | false | false |
20tab/twentytab-gmapsmarkers | gmapsmarkers/fields.py | 1 | 2307 | from . import conf
from django.conf import settings
from django.db import models
from django import forms
from gmapsmarkers.widgets import GmapsSelectAutocomplete, GeotypeSelect
class GmapsField(models.CharField):
def __init__(self, *args, **kwargs):
kwargs['max_length'] = kwargs.pop("max_length", 250)
... | mit | 1,255,904,685,461,706,200 | 33.432836 | 78 | 0.641959 | false | 3.890388 | false | false | false |
dreucifer/chargenstart | vehicle_lookup/models.py | 1 | 2049 | import uuid
from sqlalchemy import Column, Integer, String, ForeignKey, Table, Text
from sqlalchemy.orm import relationship, backref
import database as db
from core.types import GUID
class Level():
id_ = Column(Integer, primary_key=True)
name = Column(String)
def __unicode__(self):
return "%s" % s... | mit | 7,943,113,298,090,685,000 | 29.132353 | 80 | 0.662274 | false | 3.557292 | false | false | false |
twitter/heron | heron/shell/src/python/handlers/filestatshandler.py | 2 | 2386 | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# 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 Apach... | apache-2.0 | 1,211,499,568,843,792,600 | 31.684932 | 93 | 0.650042 | false | 3.799363 | false | false | false |
c-oreills/before_after | before_after/__init__.py | 1 | 1517 | """Package for before_after."""
__project__ = 'before_after'
__version__ = '1.0.1'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
import sys
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
from contextlib ... | gpl-2.0 | 7,272,649,427,314,903,000 | 24.711864 | 78 | 0.550428 | false | 3.889744 | false | false | false |
allthroughthenight/aces | python/functions/WADJ.py | 1 | 2758 | import math
import numpy as np
from WAGEOS import WAGEOS
from WAPBL import WAPBL
from WASBL import WASBL
# Perform wind adjustments
# INPUT
# uobs: observed windspeed
# zobs: elevation of wind observation
# delt: air-sea temperature difference
# F: fetch length
# tobs: duration of wind observation
# tf... | gpl-3.0 | -1,940,398,384,674,519,300 | 30 | 75 | 0.58847 | false | 2.783047 | false | false | false |
baalansellers/OrbNotifier | colorificworker.py | 1 | 4923 | import pexpect, numpy
import threading, Queue, time
SLEEP_SEC = 0.001
def grange(start, stop, step):
r = start
while r < stop:
yield r
r += step
def npindex(alist, target):
i = 0
for x in alist:
if numpy.array_equal(x, target): return i
i += 1
return None
class Co... | mit | -7,959,778,125,772,076,000 | 33.426573 | 258 | 0.572415 | false | 3.59081 | false | false | false |
eagleamon/home-assistant | homeassistant/components/binary_sensor/zwave.py | 1 | 4553 | """
Interfaces with Z-Wave sensors.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/binary_sensor.zwave/
"""
import logging
import datetime
import homeassistant.util.dt as dt_util
from homeassistant.helpers.event import track_point_in_time
from homeassistant... | apache-2.0 | -4,397,521,756,478,201,300 | 35.717742 | 79 | 0.623984 | false | 3.657028 | false | false | false |
miettal/pypdp11simulator | test_vm.py | 1 | 2330 | #!/usr/bin/env python
# coding:utf-8
#
# test_vm.py
#
# Author: Hiromasa Ihara (miettal)
# URL: http://miettal.com
# License: MIT License
# Created: 2014-09-13
#
import sys
import os
import glob
import traceback
import re
import six
if six.PY3 :
from io import StringIO
else :
from StringIO import StringI... | mit | -5,143,977,169,533,136,000 | 22.3 | 105 | 0.545064 | false | 2.78043 | true | false | false |
RuiNascimento/krepo | script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/en_DebridOnly/2ddl.py | 1 | 6029 | # -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want wit... | gpl-2.0 | 1,075,875,589,911,131,800 | 37.903226 | 120 | 0.462763 | false | 3.937949 | false | false | false |
nityas/6869-finalproject | hog/cpreprocess.py | 1 | 2059 | # based on http://cs229.stanford.edu/proj2013/JimenezNguyen_MathFormulas_final_paper.pdf
import sys
sys.path.append('/usr/local/lib/python2.7/site-packages/') # not necessary for all computers, depending on how OpenCV was installed
import cv2
import numpy as np
from skimage import morphology
from PIL import Image
de... | mit | 5,092,538,566,527,311,000 | 33.898305 | 145 | 0.542496 | false | 2.928876 | false | false | false |
shamshad-npti/kafka-spark-streaming | producer/sales_receipt.py | 1 | 2781 | """
SalesReceipt and ItemOrder model classes
"""
import json
def _assign_with_type_check(obj, attr, value, type_info):
if isinstance(value, type_info):
setattr(obj, attr, value)
else:
raise TypeError("Expected type: %s but found: %s" % (type_info, type(value)))
class SalesReceipt(object):
... | gpl-3.0 | -6,758,974,663,050,205,000 | 25.740385 | 85 | 0.592233 | false | 3.602332 | false | false | false |
sohonetlabs/qbe | django_qbe/operators.py | 1 | 3919 | from builtins import object
from django.conf import settings
from django.db import connections
from django.db.models.fields import Field
from importlib import import_module
from future.utils import with_metaclass
DATABASES = settings.DATABASES
BACKEND_TO_OPERATIONS = {
'mysql': 'MySQLOperations',
'oracle': 'O... | mit | -3,223,715,422,294,490,000 | 33.991071 | 79 | 0.577954 | false | 4.63787 | false | false | false |
OSSOS/MOP | src/ossos/core/ossos/downloads/core.py | 1 | 3503 | import os
__author__ = "David Rusk <drusk@uvic.ca>"
from astropy.io import fits
import io
from ossos.gui import logger
from .. import storage
import sys
class Downloader(object):
"""
Downloads data from VOSpace.
"""
def download_hdulist(self, uri, **kwargs):
"""
Downloads a FITS ima... | gpl-3.0 | -1,030,849,070,742,915,700 | 27.25 | 106 | 0.554382 | false | 3.679622 | false | false | false |
havaeimo/smartlearner | smartlearner/interfaces/loss.py | 1 | 1599 | from collections import OrderedDict
from theano import tensor as T
from abc import ABCMeta, abstractmethod
class Loss(object):
__metaclass__ = ABCMeta
def __init__(self, model, dataset):
self.model = model
self.dataset = dataset
self.consider_constant = [] # Part of the computation... | bsd-3-clause | -3,206,657,585,251,132,400 | 29.169811 | 102 | 0.629769 | false | 4.368852 | false | false | false |
jcurbo/astronomy-stuff | moon-rise-set/gen-dates.py | 1 | 2418 | import ephem
from astropy.coordinates import EarthLocation
from astropy.time import Time
from astroplan import moon_illumination
from icalendar import Calendar, Event
from datetime import date, time, timedelta, datetime
my_lat = '39.0209321'
my_lon = '-77.01722708'
my_elev = 122
date_start = '2017/01/01 00:00'
obs =... | mit | 1,291,823,558,686,291,500 | 26.793103 | 87 | 0.636063 | false | 2.732203 | false | false | false |
brigittebigi/proceed | proceed/src/DataIO/Read/readgeneric.py | 1 | 2212 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# ---------------------------------------------------------------------------
# ___ __ ___ ___ ____ ____ __
# | \ | \ | | / | | | \ Automatic
# |__/ |__/ | | | |__ |__ | | Conference
# | |\... | gpl-3.0 | -2,115,020,616,265,497,600 | 37.137931 | 78 | 0.44575 | false | 4.397614 | false | false | false |
Kim-Seonghyeon/youtube_8m | imagenet.py | 1 | 1225 | import inspect
import os
from tensorflow import gfile
import numpy as np
import tensorflow as tf
import time
from tensorflow import logging
out_file = gfile.Open("gs://ksh_imagenet/ILSVRC/feature.csv", "w+")
out_file.write("filename," + ",".join(["feature" + str(i) for i in range(1, 2049)]) + "\n")
files = tf.gfile.Gl... | apache-2.0 | -6,206,226,487,434,061,000 | 33.027778 | 95 | 0.626122 | false | 2.987805 | false | false | false |
iEngage/python-sdk | iengage_client/models/idea.py | 1 | 20100 | # coding: utf-8
"""
Stakeholder engagement API
This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers.
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger... | apache-2.0 | 2,531,994,326,339,373,000 | 25.447368 | 581 | 0.558806 | false | 3.970763 | false | false | false |
prim/ocempgui | ocempgui/widgets/ScrolledList.py | 1 | 22987 | # $Id: ScrolledList.py,v 1.61.2.6 2007/03/26 11:44:41 marcusva Exp $
#
# Copyright (c) 2004-2007, Marcus von Appen
# 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 co... | bsd-2-clause | -6,080,596,617,264,534,000 | 38.160136 | 79 | 0.560447 | false | 4.536609 | false | false | false |
root-mirror/root | tutorials/roofit/rf513_wsfactory_tools.py | 11 | 3106 | ## \file
## \ingroup tutorial_roofit
## \notebook -nodraw
## Organization and simultaneous fits: illustration use of ROOT.RooCustomizer and
## ROOT.RooSimWSTool interface in factory workspace tool in a complex standalone B physics example
##
## \macro_code
##
## \date February 2018
## \authors Clemens Lange, Wouter Ver... | lgpl-2.1 | -7,665,077,572,355,572,000 | 39.337662 | 111 | 0.672569 | false | 3.166157 | false | false | false |
ray-project/ray | python/ray/tune/function_runner.py | 1 | 22498 | import logging
import os
import sys
import time
import inspect
import shutil
import threading
import traceback
import uuid
from functools import partial
from numbers import Number
from six.moves import queue
from ray.util.debug import log_once
from ray.tune import TuneError, session
from ray.tune.trainable import Tra... | apache-2.0 | 4,263,119,803,300,873,700 | 37.196944 | 79 | 0.610721 | false | 4.594241 | true | false | false |
ktan2020/legacy-automation | win/Lib/site-packages/runsnakerun/pstatsadapter.py | 1 | 2843 | import wx, sys, os, logging
log = logging.getLogger( __name__ )
from squaremap import squaremap
from runsnakerun import pstatsloader
class PStatsAdapter(squaremap.DefaultAdapter):
percentageView = False
total = 0
TREE = pstatsloader.TREE_CALLS
def value(self, node, parent=None):
if isins... | mit | -1,293,131,002,213,503,000 | 33.670732 | 83 | 0.590925 | false | 4.049858 | false | false | false |
suutari/shoop | shuup/notify/typology.py | 1 | 4215 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
import enumfields
from dja... | agpl-3.0 | 6,544,060,943,024,604,000 | 22.948864 | 91 | 0.61637 | false | 3.995261 | false | false | false |
rex/Buffy | scripts/fetch-all.py | 1 | 3681 | #!/usr/bin/env python
import requests
import json
import os
from fabric.colors import red, green, blue, cyan, magenta
from time import sleep
api_key = 'be25c8a17fdcd031f54dd3417ee4d083'
api_base_url = 'http://api.themoviedb.org/3'
def pretty(data):
print ""
print json.dumps(data, sort_keys=True, indent=2)
prin... | mit | -3,976,199,772,057,554,000 | 25.292857 | 176 | 0.655257 | false | 3.022167 | false | false | false |
mkhuthir/catkin_ws | src/patrol/src/shapes.py | 1 | 2024 | #!/usr/bin/python
# BEGIN ALL
import rospy
from smach import State,StateMachine
from time import sleep
class Drive(State):
def __init__(self, distance):
State.__init__(self, outcomes=['success'])
self.distance = distance
def execute(self, userdata):
print 'Driving', self.distance
... | gpl-3.0 | -2,396,415,034,136,510,000 | 32.733333 | 80 | 0.623518 | false | 3.783178 | false | false | false |
bbchung/clighter | misc/highlighting.py | 1 | 8169 | import vim
import string
import clighter_helper
from clang import cindex
OCCURRENCES_PRI = -11
SYNTAX_PRI = -12
CUSTOM_SYNTAX_GROUP = {
cindex.CursorKind.INCLUSION_DIRECTIVE: 'cligherInclusionDirective',
cindex.CursorKind.MACRO_INSTANTIATION: 'clighterMacroInstantiation',
cindex.CursorKind.VAR_DECL: 'cli... | gpl-3.0 | 3,283,609,485,844,957,000 | 29.595506 | 100 | 0.62933 | false | 3.428032 | false | false | false |
ak64th/thug | docs/conf.py | 1 | 8332 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# thug documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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
# autoge... | mit | 749,671,583,136,281,000 | 29.298182 | 76 | 0.702112 | false | 3.713012 | true | false | false |
AlexandreAbraham/brainhack2013 | plot_craddock_spectral_clustering.py | 1 | 6073 | from brainhack.datasets import fetch_craddock_2012_test
from nilearn.input_data import NiftiMasker
from joblib import Memory
from sklearn.feature_extraction.image import grid_to_graph
import nibabel
from sklearn.cluster import spectral_clustering
from scipy.sparse import coo_matrix
from brainhack.metrics.cluster import... | bsd-3-clause | 3,756,520,446,555,159,000 | 31.650538 | 78 | 0.628684 | false | 3.470286 | false | false | false |
andydavidson/pypeer | lib/pypeer/PeeringDBClient.py | 1 | 1386 | #!/usr/bin/env python
import urllib2
class PeeringDBClient:
def __init__(self):
return
def asn(self, asn):
try:
loadasn = int(asn)
except ValueError:
print("asn is not an integer")
return
load_url = "https://beta.peeringdb.com/api/asn/" + s... | mit | 1,337,078,391,708,123,600 | 27.895833 | 75 | 0.556277 | false | 3.562982 | false | false | false |
pet-finder/pet-finder | app/config.py | 1 | 3052 | #!/usr/bin/python2.5
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 7,669,520,440,358,117,000 | 36.219512 | 80 | 0.697903 | false | 4.091153 | true | false | false |
itdagene-ntnu/quiz | quiz/main/models.py | 1 | 1039 | from django.db import models
class Quiz(models.Model):
title = models.CharField(max_length=200)
description = models.TextField()
start = models.DateTimeField()
end = models.DateTimeField()
def __unicode__(self):
return self.title
class Meta:
verbose_name_plural = 'quizes'
c... | bsd-3-clause | -6,409,692,976,992,742,000 | 22.111111 | 55 | 0.6795 | false | 3.996154 | false | false | false |
unt-libraries/django-nomination | nomination/url_handler.py | 1 | 25446 | import datetime
import itertools
import json
import re
import string
import time
from urllib.parse import urlparse
from django import http
from django.conf import settings
from django.shortcuts import get_object_or_404
from django.db import IntegrityError
from nomination.models import Project, Nominator, URL, Value
... | bsd-3-clause | -2,891,498,525,979,208,700 | 37.671733 | 99 | 0.519217 | false | 4.156485 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/operations/_service_endpoint_policy_definitions_operations.py | 1 | 24305 | # 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 | -3,697,808,724,107,169,000 | 53.617978 | 285 | 0.667682 | false | 4.411071 | true | false | false |
kilisimba/gluten-free-tax | dbref/models.py | 1 | 2223 | from django.db import models
class Note(models.Model):
note = models.TextField(max_length=800)
def __unicode__(self): # Python 3: def __str__(self):
return self.note
class Company(models.Model):
name = models.CharField(max_length=200, default='Unknown')
validation_date = models.CharFiel... | mit | 4,382,392,098,167,966,000 | 33.734375 | 89 | 0.65587 | false | 3.736134 | false | false | false |
mkocikowski/u8 | u8.py | 1 | 3925 | # -*- coding: UTF-8 -*-
import sys
import logging
import unicodedata
from collections import defaultdict
import HTMLParser
logger = logging.getLogger(__name__)
C_PUNCTUATION = frozenset(("Pc", "Pd", "Ps", "Pe", "Po", "Lm"))
C_QUOTE = frozenset(("Pi", "Pf"))
C_MARK = frozenset(("Mn", "Mc", "Me"))
C_SYMBOL = frozens... | mit | 4,791,592,369,525,969,000 | 25.166667 | 109 | 0.642293 | false | 3.377797 | false | false | false |
MatthewCox/MoronBot | MBPyFunctionServer/FunctionHandler.py | 1 | 1060 | import os
import GlobalVars
def LoadFunction(path, loadAs=''):
loadType = 'l'
name = path
src = __import__('PythonFunctions.' + name, globals(), locals(), [])
if loadAs != '':
name = loadAs
if name in GlobalVars.functions:
loadType = 'rel'
reload(src)
components = name.spli... | mit | -6,151,578,014,082,445,000 | 22.043478 | 72 | 0.574528 | false | 4.092664 | false | false | false |
sissaschool/xmlschema | xmlschema/validators/identities.py | 1 | 16757 | #
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... | mit | -9,066,070,327,560,499,000 | 37.170843 | 97 | 0.564003 | false | 4.091064 | false | false | false |
googleads/googleads-python-lib | examples/adwords/adwords_appengine_demo/views/show_adgroups_view.py | 1 | 2673 | #!/usr/bin/env python
#
# Copyright 2014 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 | 3,225,096,587,231,493,000 | 35.121622 | 78 | 0.654695 | false | 3.989552 | false | false | false |
tanium/pytan | BUILD/doc/source/examples/ask_saved_question_refresh_data_code.py | 1 | 3079 | # import the basic python packages we need
import os
import sys
import tempfile
import pprint
import traceback
# disable python from generating a .pyc file
sys.dont_write_bytecode = True
# change me to the path of pytan if this script is not running from EXAMPLES/PYTAN_API
pytan_loc = "~/gh/pytan"
pytan_static_path =... | mit | 2,296,055,094,753,374,000 | 32.835165 | 90 | 0.71809 | false | 3.467342 | false | false | false |
edvardlindelof/ERICA-prediction | models/linear/train_and_export_model.py | 1 | 1230 | import tensorflow as tf
from tensorflow.contrib.learn import LinearRegressor
from tensorflow.contrib import layers
from tensorflow.contrib.learn.python.learn.utils import input_fn_utils
tf.logging.set_verbosity(tf.logging.INFO)
import pandas as pd
FEATURES = ["ttt30", "all", "MEP", "triaged", "PRIO3", "PRIO4"]
pdfra... | mit | 5,681,200,717,155,857,000 | 30.538462 | 90 | 0.715447 | false | 3.186528 | false | false | false |
arthurdejong/python-pskc | pskc/scripts/csv2pskc.py | 1 | 5421 | # csv2pskc.py - script to convert a CSV file to PSKC
#
# Copyright (C) 2018 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at yo... | lgpl-2.1 | 6,463,509,971,803,191,000 | 35.14 | 78 | 0.653754 | false | 3.769819 | false | false | false |
isagalaev/sm-openid | openid/test/test_ax.py | 1 | 18276 | """Tests for the attribute exchange extension module
"""
import unittest
from openid.extensions import ax
from openid.message import NamespaceMap, Message, OPENID2_NS
from openid.consumer import Response
class BogusAXMessage(ax.AXMessage):
mode = 'bogus'
getExtensionArgs = ax.AXMessage._newArgs
class Dumm... | apache-2.0 | -2,085,521,261,451,490,300 | 32.289617 | 77 | 0.570037 | false | 3.750462 | true | false | false |
nielsmadan/mercury | plugin/mercury/python.py | 1 | 1771 | import parser
import mercury.util
import re
_STD_MODULES = ['re', 'random', 'itertools', 'string']
_IMPORT_1_REGEX = re.compile(r'^import (\S+)')
_IMPORT_2_REGEX = re.compile(r'^from (\S+) import (\S+)')
_INDENT_REGEX = re.compile(r'^(\s*).*')
def execute(code, buff):
code_lines = code.split("\n")
last_exp... | isc | -7,417,111,132,614,242,000 | 25.833333 | 91 | 0.567476 | false | 3.255515 | false | false | false |
detrout/pykolab | pykolab/setup/setup_kolabd.py | 1 | 2939 | # -*- coding: utf-8 -*-
# Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com)
#
# Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.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 | -5,576,212,773,111,987,000 | 34.841463 | 87 | 0.626744 | false | 3.811933 | false | false | false |
rafaduran/django-pluggable-registration | registration/admin.py | 1 | 1928 | from django.contrib import admin
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
actions = ['resend_activation_em... | bsd-3-clause | -5,219,089,974,694,655,000 | 34.703704 | 79 | 0.674274 | false | 4.760494 | false | false | false |
shawnchain/mclub-talkbox | test/test_record2.py | 1 | 3253 | #!/usr/bin/python
import pyaudio
import wave
import opus
from opus import encoder, decoder
import time
import RPIO
#the gpio routines
PTT_PIN = 27
def gpio_init():
global PTT_PIN, COR_PIN
print "RPi Board rev %d" % (RPIO.RPI_REVISION)
RPIO.setwarnings(False)
#RPIO.setmode(RPIO.BOARD)
RPIO.setup(P... | gpl-3.0 | -1,605,328,599,768,575,500 | 24.614173 | 119 | 0.659084 | false | 2.96536 | false | false | false |
gajduk/social-networks-analysis-wan-bms | python code/compute_network_statistics.py | 1 | 4168 | import networkx as nx
from load_data import *
from compute_metrics_multiplex import *
def numNodes(g):
return g.number_of_nodes()
def numEdges(g):
return g.number_of_edges()
def avgDeg(g):
return g.number_of_edges()*1.0/g.number_of_nodes()
def getGiantComponent(g):
return g.subgraph(max(... | mit | -1,605,592,017,539,149,000 | 31.061538 | 124 | 0.610365 | false | 3.261346 | false | false | false |
uclouvain/OSIS-Louvain | base/forms/proposal/learning_unit_proposal.py | 1 | 9376 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | -4,709,324,834,823,567,000 | 37.739669 | 118 | 0.631147 | false | 4.042691 | false | false | false |
delete/spymanager | src/flooder.py | 1 | 1306 | import gevent
from gevent import monkey, pool
monkey.patch_all()
class Flooder():
def __init__(self, site, publisher, image_cache_handler):
self.site = site
self.publisher = publisher
self.image_cache_handler = image_cache_handler
self.cache_handlers = []
def _push_to(self,... | mit | -7,102,846,170,723,223,000 | 29.372093 | 79 | 0.627871 | false | 3.841176 | false | false | false |
liuyang1/ssh | newcifar/radius.py | 1 | 1432 | import conf
import numpy as np
import random
import load
import scipy.spatial
import hashing
def query(q, hashingArray):
rank = [scipy.spatial.distance.hamming(q, h) for h in hashingArray]
K = len(q)
r = 2.0 / len(q)
return [idx for idx, val in enumerate(rank) if val <= r]
if __name__ == "__main__":... | gpl-2.0 | 1,308,179,569,570,913,000 | 26.538462 | 81 | 0.586592 | false | 3.261959 | false | false | false |
cellnopt/cellnopt | test/io/test_mapback.py | 1 | 1156 | from cno.io.mapback import MapBack
from cno import CNOGraph, cnodata
def test_mapback():
# init
pknmodel = CNOGraph(cnodata("PKN-ToyMMB.sif"), cnodata("MD-ToyMMB.csv"))
model = CNOGraph(cnodata("PKN-ToyMMB.sif"), cnodata("MD-ToyMMB.csv"))
model.preprocessing()
mp = MapBack(pknmodel, model)
... | bsd-2-clause | 1,428,987,621,450,412,000 | 27.9 | 84 | 0.625433 | false | 2.38843 | false | false | false |
sberrydavis/Forager | bin/cb/generate_feed.py | 1 | 4065 | __author__ = 'CarbonBlack, byt3smith'
# stdlib imports
import re
import sys
import time
import urllib
import json
import optparse
import socket
import base64
import hashlib
# cb imports
sys.path.insert(0, "../../")
from cbfeeds.feed import CbReport
from cbfeeds.feed import CbFeed
from cbfeeds.feed import CbFeedInfo
... | mit | 3,383,304,211,393,348,600 | 25.743421 | 92 | 0.565806 | false | 3.73965 | false | false | false |
geggo/pyface | examples/chained_wizard.py | 3 | 3371 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | 1,969,681,704,659,646,500 | 30.504673 | 79 | 0.503115 | false | 4.801994 | false | false | false |
skinkie/SleekXMPP--XEP-0080- | sleekxmpp/xmlstream/handler/callback.py | 2 | 2874 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.xmlstream.handler.base import BaseHandler
class Callback(BaseHandler):
"""
The Callback handler will execute a callbac... | mit | 3,967,132,389,688,762,400 | 33.214286 | 77 | 0.612735 | false | 4.946644 | false | false | false |
dacsunlimited/dacplay-game-samples | tools/burn-btc.py | 1 | 2064 | #! /usr/bin/env python
"""
burn-btc: create a bitcoin burn address
By James C. Stroud
This program requries base58 (https://pypi.python.org/pypi/base58/0.2.1).
Call the program with a template burn address as the only argument::
% burn-btc 1BurnBTCForFunBurnBTCForFunXXXXXXX
1BurnBTCForFunBurnBTCForFunXTmJX... | unlicense | -1,859,950,050,534,061,000 | 21.692308 | 73 | 0.692345 | false | 3.146341 | false | false | false |
bjornaa/roppy | examples/makecoast.py | 1 | 1894 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Extract a closed coast line
Extracts a coast line from GSHHS using the
advanced polygon handling features in Basemap
The polygons are saved to a two-columns
text file, using Nans to sepatate the polygons.
An example of how to read back the data and
plot filled land i... | mit | -6,324,998,205,786,012,000 | 24.567568 | 64 | 0.536998 | false | 3.465201 | false | false | false |
sdispater/poet | poet/installer.py | 1 | 18571 | # -*- coding: utf-8 -*-
import tempfile
import os
import shutil
import subprocess
from packaging.utils import canonicalize_name
from pip.download import unpack_url
from pip.index import Link
from piptools.resolver import Resolver
from piptools.repositories import PyPIRepository
from piptools.scripts.compile import g... | mit | -7,657,989,580,882,023,000 | 31.637961 | 103 | 0.520274 | false | 4.769132 | false | false | false |
sameersingh/uci-statnlp | hw2/generator.py | 1 | 2604 | #!/bin/python
from __future__ import print_function
from lm import LangModel
import random
import numpy as np
class Sampler:
def __init__(self, lm, temp = 1.0):
"""Sampler for a given language model.
Supports the use of temperature, i.e. how peaky we want to treat the
dist... | apache-2.0 | -1,307,023,713,031,869,000 | 32.72 | 81 | 0.566436 | false | 3.915789 | false | false | false |
fbradyirl/home-assistant | homeassistant/components/hive/binary_sensor.py | 1 | 2420 | """Support for the Hive binary sensors."""
from homeassistant.components.binary_sensor import BinarySensorDevice
from . import DATA_HIVE, DOMAIN
DEVICETYPE_DEVICE_CLASS = {"motionsensor": "motion", "contactsensor": "opening"}
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Hive se... | apache-2.0 | 6,885,640,137,103,015,000 | 33.084507 | 81 | 0.645868 | false | 3.922204 | false | false | false |
gilbertpilz/solum | solum/tests/api/camp/test_camp_v1_1_endpoint.py | 1 | 1393 | # -*- coding: utf-8 -*-
#
# 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, soft... | apache-2.0 | 9,157,043,422,705,384,000 | 36.648649 | 75 | 0.731515 | false | 3.675462 | true | false | false |
vquinones/admindemo | content/models.py | 1 | 7173 | from django.db import models
from django.conf import settings
from django.utils import timezone
from easy_thumbnails.files import get_thumbnailer
from easy_thumbnails.fields import ThumbnailerImageField
from easy_thumbnails.signals import saved_file
from easy_thumbnails.signal_handlers import generate_aliases_global
s... | gpl-2.0 | 7,148,862,275,792,738,000 | 27.019531 | 88 | 0.602677 | false | 3.943375 | false | false | false |
twilio/twilio-python | tests/integration/sync/v1/service/sync_map/test_sync_map_permission.py | 1 | 7856 | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class SyncMapPermissionTestCase... | mit | -2,522,647,256,466,869,000 | 40.566138 | 164 | 0.55499 | false | 4.85838 | true | false | false |
PurityControl/uchi-komi-python | problems/euler/0007-10001st-prime/ichi/primes.py | 1 | 1314 | def prime_at(position):
""" returns the nth prime number
args:
position: the nth numbered prime
"""
primes_list = list(take(position, primes()))
return primes_list[-1]
def take(num, seq):
"""Generator takes num items from seq
Args:
num: number of items to take from list
... | mit | 4,598,691,187,448,797,700 | 22.890909 | 74 | 0.552511 | false | 3.590164 | false | false | false |
TwistedHardware/roshanRush | operation/migrations/0003_auto__chg_field_location_parent.py | 1 | 3186 | # -*- 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):
# Changing field 'Location.parent'
db.alter_column(u'operation_location'... | gpl-2.0 | -2,541,884,486,197,036,000 | 53.948276 | 155 | 0.567797 | false | 3.748235 | false | false | false |
lipro-yocto/git-repo | subcmds/gitc_init.py | 1 | 3060 | # Copyright (C) 2015 The Android Open Source Project
#
# 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 ... | apache-2.0 | 8,735,617,120,058,002,000 | 36.777778 | 84 | 0.699673 | false | 3.74541 | false | false | false |
mohamed-aziz/realworld-flask | conduit/commands.py | 1 | 4204 | # -*- coding: utf-8 -*-
"""Click commands."""
import os
from glob import glob
from subprocess import call
import click
from flask import current_app
from flask.cli import with_appcontext
from werkzeug.exceptions import MethodNotAllowed, NotFound
HERE = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path... | mit | -989,138,570,625,253,100 | 32.632 | 78 | 0.599191 | false | 3.750223 | true | false | false |
PyThaiNLP/pythainlp | pythainlp/util/normalize.py | 1 | 7109 | # -*- coding: utf-8 -*-
"""
Text normalization
"""
import re
import warnings
from pythainlp import thai_above_vowels as above_v
from pythainlp import thai_below_vowels as below_v
from pythainlp import thai_follow_vowels as follow_v
from pythainlp import thai_lead_vowels as lead_v
from pythainlp import thai_tonemarks ... | apache-2.0 | -8,998,425,384,468,573,000 | 27.1875 | 88 | 0.637103 | false | 2.688792 | false | false | false |
sankha93/selenium | py/test/selenium/webdriver/common/element_attribute_tests.py | 1 | 11886 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -259,758,264,384,351,170 | 44.193916 | 95 | 0.698553 | false | 3.924067 | true | false | false |
Pikecillo/genna | external/PyXML-0.8.4/test/test_encodings.py | 1 | 1292 | #!/usr/bin/env python
"""
This will show russian text in koi8-r encoding.
"""
from xml.parsers import expat
import string
# Produces ImportError in 1.5, since this test can't possibly pass there
import codecs
class XMLTree:
def __init__(self):
pass
# Define a handler for start element events
de... | gpl-2.0 | 5,979,302,557,912,319,000 | 24.333333 | 76 | 0.619969 | false | 3.903323 | false | false | false |
CRAWLZSTAGE/infra | store/store.py | 1 | 6657 | import os, sys
import pika
import json
import time
import traceback
from peewee import *
# DEBUG = int(os.environ.get('DEBUG'))
MQTT_HOST = os.environ.get('MQTT_HOST')
MQTT_USER = os.environ.get('MQTT_USER')
MQTT_PASSWORD = os.environ.get('MQTT_PASSWORD')
import sys
import signal
def handler(signum, frame):
sys... | mit | -2,677,906,427,138,695,700 | 34.59893 | 207 | 0.625507 | false | 3.920495 | false | false | false |
davy39/eric | E5Gui/E5MainWindow.py | 1 | 2118 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a main window class with styling support.
"""
from __future__ import unicode_literals
from PyQt5.QtWidgets import QMainWindow, QStyleFactory, QApplication
from .E5Application import e5App
from ... | gpl-3.0 | 6,563,336,699,552,753,000 | 30.61194 | 77 | 0.557129 | false | 4.421712 | false | false | false |
Qwaz/solved-hacking-problem | WhiteHat/2017 Quals/bank/solver.py | 1 | 1948 | from pwn import *
from time import sleep
def wait_menu():
p.recvuntil('---> ')
def show_my_info():
wait_menu()
p.sendline('1')
def transfer(bank, amount):
wait_menu()
p.sendline('2')
wait_menu()
p.sendline(str(bank))
wait_menu()
p.sendline(str(amount))
def deposit(bank, amou... | gpl-2.0 | -6,671,868,945,516,682,000 | 15.649573 | 56 | 0.632444 | false | 2.569921 | false | false | false |
jhartz/masterchess | MasterChess/__init__.py | 1 | 2533 | """
MasterChess library
Copyright (C) 2013 Jake Hartz
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 distribu... | gpl-3.0 | -2,665,703,317,323,300,000 | 35.2 | 177 | 0.647059 | false | 4.065811 | false | false | false |
Ircam-Web/mezzanine-organization | organization/network/management/commands/import-ircam-project.py | 1 | 8883 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016-2017 Ircam
# Copyright (c) 2016-2017 Guillaume Pellerin
# Copyright (c) 2016-2017 Emilie Zawadzki
# This file is part of mezzanine-organization.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 | -1,341,572,315,020,319,200 | 36.0125 | 99 | 0.620061 | false | 3.587641 | false | false | false |
vsilent/smarty-bot | example/daemon.py | 1 | 2773 | from sys import exit
#from multiprocessing import Process
#from core.config import settings
from core.config.settings import logger
import zmq
class Daemon():
sock = None
bsock = None
response = {}
def __init__(self, name="undefined"):
"""docstring for __init__"""
context = zmq.Conte... | mit | -6,112,931,179,038,487,000 | 29.811111 | 66 | 0.498017 | false | 4.523654 | false | false | false |
marcelometal/python-semanticversion | setup.py | 1 | 2387 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2014 The python-semanticversion project
import codecs
import os
import re
import sys
from setuptools import setup
root_dir = os.path.abspath(os.path.dirname(__file__))
def get_version(package_name):
version_re = re.compile(r"^__version__ = [\"... | bsd-2-clause | 6,003,106,888,543,752,000 | 31.684932 | 89 | 0.595977 | false | 3.763407 | false | false | false |
tartakynov/enso | enso/platform/linux/graphics.py | 1 | 13206 | """
Author : Guillaume "iXce" Seguin
Email : guillaume@segu.in
Copyright (C) 2008, Guillaume Seguin <guillaume@segu.in>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions ... | bsd-3-clause | 1,813,447,158,428,719,600 | 39.012422 | 99 | 0.564213 | false | 4.410822 | false | false | false |
melodous/designate | designate/api/v2/__init__.py | 1 | 1664 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hp.com>
#
# 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/L... | apache-2.0 | -2,081,888,719,544,165,000 | 29.254545 | 75 | 0.643029 | false | 3.834101 | false | false | false |
RazerM/ratelimiter | setup.py | 1 | 1597 | # Original work Copyright 2013 Arnaud Porterie
# Modified work Copyright 2015 Frazer McLean
#
# 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 | -4,260,098,636,080,958,000 | 29.132075 | 74 | 0.696306 | false | 3.713953 | false | false | false |
WalterSchaertl/NYRP | question_maker.py | 1 | 5644 | # Takes a .txt semi-edited version of an exam and creates questions from it
# Inputs:
# A .txt version of the exam (requires some pre-possessing)
# A .txt version of the answers (question # question answer, 1 per line)
# A path of the folder of images that go with the question, named as subject_year_month_question#... | mit | -3,043,786,063,696,455,000 | 34.055901 | 114 | 0.606485 | false | 2.846193 | false | false | false |
xray/xray | xarray/core/accessor_dt.py | 1 | 16105 | import numpy as np
import pandas as pd
from .common import (
_contains_datetime_like_objects,
is_np_datetime_like,
is_np_timedelta_like,
)
from .pycompat import dask_array_type
def _season_from_months(months):
"""Compute season (DJF, MAM, JJA, SON) from month ordinal"""
# TODO: Move "season" acce... | apache-2.0 | 4,147,006,790,076,963,300 | 33.560086 | 90 | 0.626824 | false | 3.73406 | false | false | false |
nortxort/tinybot-rtc | apis/youtube.py | 1 | 8787 | # -*- coding: utf-8 -*-
""" Contains functions to fetch info from youtube's API (googleapis.com/youtube/v3/) """
import logging
import util.web
import _track
from util import string_util
API_KEY = 'AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg'
ALLOWED_COUNTRIES = ['DK', 'PL', 'UK']
REFERER = 'https://tinychat.com'
SEA... | mit | -1,263,738,826,153,310,200 | 34.273092 | 107 | 0.542525 | false | 4.273966 | false | false | false |
e-koch/VLA_Lband | 14B-088/HI/imaging/imaging_tests/sd_combo_tests/sd_combo_imaging.py | 1 | 2852 |
'''
Compare feathering with different SD data.
'''
import os
from shutil import copytree
from copy import copy
import subprocess
# Job parameters
NODE = "1"
PROCS = "12"
PMEM = "4000mb"
HOURS = "72"
# Run imaging tests w/ different parameters/CASA versions
output_path = os.path.expanduser("~/m33/14B-088/testing")
... | mit | -7,503,296,971,442,701,000 | 30.340659 | 74 | 0.576438 | false | 3.278161 | false | false | false |
ingadhoc/account-financial-tools | account_ux/models/account_payment.py | 1 | 1171 | # © 2016 ADHOC SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
import datetime
class AccountPayment(models.Model):
_inherit = "account.payment"
def _get_liquidity_move_line_vals(self, amount):
vals = super()._get_liquidity_move_line_vals(amount)
... | agpl-3.0 | 9,087,780,728,242,621,000 | 35.5625 | 81 | 0.625641 | false | 3.762058 | false | false | false |
rocket-league-replays/rocket-league-replays | rocket_league/apps/replays/models.py | 1 | 27055 | import logging
import math
import re
from itertools import zip_longest
import bitstring
from django.conf import settings
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.core.validators imp... | gpl-3.0 | 6,570,715,833,901,000,000 | 24.839542 | 159 | 0.536741 | false | 3.929412 | false | false | false |
jxwufan/AssociativeRetrieval | FastWeightsRNN.py | 1 | 4632 | """
Fast Weights Cell.
Ba et al. Using Fast Weights to Attend to the Recent Past
https://arxiv.org/abs/1610.06258
"""
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import init_ops
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import nn_ops
from tensorflow.python.ops im... | apache-2.0 | -2,072,723,172,511,365,600 | 33.311111 | 114 | 0.62975 | false | 3.390922 | false | false | false |
xkmato/casepro | casepro/msgs/migrations/0053_faq.py | 1 | 1113 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orgs', '0016_taskstate_is_disabled'),
('msgs', '0052_triggers'),
]
operations = [
migrations.CreateModel(
... | bsd-3-clause | 3,345,618,433,227,566,000 | 40.222222 | 144 | 0.585804 | false | 4.137546 | false | false | false |
praekelt/vumi-go | go/contacts/parsers/test_parsers.py | 1 | 7412 | from os import path
from go.vumitools.tests.helpers import djangotest_imports
parser_classes = ['CSVFileParser', 'XLSFileParser']
with djangotest_imports(globals(), dummy_classes=parser_classes):
from django.conf import settings
from django.core.files.storage import default_storage
from django.core.files.... | bsd-3-clause | 2,594,425,094,356,202,500 | 39.282609 | 78 | 0.584188 | false | 3.779704 | true | false | false |
USGSDenverPychron/pychron | pychron/graph/guide_overlay.py | 1 | 3622 | # ===============================================================================
# Copyright 2011 Jake Ross
#
# 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/licens... | apache-2.0 | -3,389,673,578,266,769,000 | 31.630631 | 88 | 0.532579 | false | 4.139429 | false | false | false |
gicsi/aap | src/machine_learning/nltk-trainer-master/classify_corpus.py | 1 | 6324 | #!/usr/bin/env python
import argparse, itertools, operator, os, os.path, string
import nltk.data
from nltk.corpus import stopwords
from nltk.misc import babelfish
from nltk.tokenize import wordpunct_tokenize
from nltk.util import ngrams
from nltk_trainer import load_corpus_reader, join_words, translate
from nltk_traine... | gpl-3.0 | 918,427,968,374,105,300 | 35.560694 | 100 | 0.722011 | false | 3.497788 | false | false | false |
PyWiFeS/tools | spectroastro2D.py | 1 | 4907 | """
From the 26 March meeting, the plan was:
1) Fix 2D separation and overall R flux ratio. Find best fit PSF.
Issues... the best fit PSF can't just be a Gaussian. It is naturally the convolution of
multiple functional forms, i.e. something that is positive everywhere. On a quick search,
I can't find any obvious para... | mit | 2,472,486,503,515,506,700 | 30.056962 | 111 | 0.619931 | false | 2.861224 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.