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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fujimotos/fastcomp | mbleven.py | 1 | 1757 | """An implementation of mbleven algorithm"""
#
# Constants
REPLACE = 'r'
INSERT = 'i'
DELETE = 'd'
TRANSPOSE = 't'
MATRIX = [
['id', 'di', 'rr'],
['dr', 'rd'],
['dd']
]
MATRIX_T = [
['id', 'di', 'rr', 'tt', 'tr', 'rt'],
['dr', 'rd', 'dt', 'td'],
['dd']
]
#
# Library API
def compare(str1, s... | mit | -5,861,236,381,234,552,000 | 19.670588 | 68 | 0.430848 | false | 3.296435 | false | false | false |
kubeflow/tf-operator | py/kubeflow/tf_operator/k8s_util.py | 1 | 6344 | """K8s util class for E2E tests."""
import datetime
import json
import logging
import re
import time
from kubeflow.testing import util
from kubernetes import client as k8s_client
from kubernetes.client import rest
def get_container_start_time(client, namespace, pod_selector, index, phase):
""" get start time of c... | apache-2.0 | -723,238,186,295,833,700 | 27.44843 | 80 | 0.660309 | false | 3.747194 | false | false | false |
zhangyage/Python-oldboy | day12/service_manager/manager/views.py | 1 | 4028 | # -*- coding:utf-8 -*-
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.shortcuts import redirect
#导入跳转连接模块
from django.http.response import HttpResponse
#导入模块该模块可以加载处理html网页
from manager import models
from models import UserInfo
from models import Asset
from models import... | apache-2.0 | 279,347,164,223,201,250 | 33.223301 | 87 | 0.608116 | false | 2.953898 | false | false | false |
YourCyborg/Sun-RPI | src/server/caches.py | 1 | 10627 | """
Central caching module.
"""
from sys import getsizeof
from collections import defaultdict
from django.conf import settings
_ENABLE_LOCAL_CACHES = settings.GAME_CACHE_TYPE
_GA = object.__getattribute__
_SA = object.__setattr__
_DA = object.__delattr__
# OOB hooks (OOB not yet functional, don't use yet)
_OOB_FIE... | bsd-3-clause | 2,784,834,849,276,704,300 | 31.59816 | 111 | 0.56714 | false | 3.513058 | false | false | false |
ebt-hpc/cca | cca/scripts/materialize_fact.py | 1 | 4532 | #!/usr/bin/env python3
'''
Base library for fact materialization
Copyright 2012-2020 Codinuum Software Lab <https://codinuum.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
... | apache-2.0 | -7,902,259,919,020,810,000 | 27.503145 | 100 | 0.560459 | false | 3.717801 | false | false | false |
apanda/modeling | tests/examples/AclContentCacheSimpleTest.py | 1 | 1446 | import components
def AclContentCacheSimpleTest ():
"""ACL content cache test"""
ctx = components.Context (['a', 'b', 'cc'],\
['ip_a', 'ip_b', 'ip_cc'])
net = components.Network (ctx)
a = components.EndHost(ctx.a, net, ctx)
b = components.EndHost(ctx.b, net, ctx)
... | bsd-3-clause | 4,938,725,288,037,914,000 | 38.081081 | 67 | 0.559474 | false | 3.199115 | false | false | false |
seishei/multiprocess | py3.4/multiprocess/queues.py | 1 | 11410 | #
# Module implementing queues
#
# multiprocessing/queues.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
__all__ = ['Queue', 'SimpleQueue', 'JoinableQueue']
import sys
import os
import threading
import collections
import time
import weakref
import errno
from queue import... | bsd-3-clause | 1,002,262,573,594,378,100 | 30.089918 | 80 | 0.539965 | false | 4.364958 | false | false | false |
splotz90/urh | src/urh/plugins/MessageBreak/MessageBreakPlugin.py | 1 | 1516 | from PyQt5.QtWidgets import QAction, QUndoStack, QMessageBox
from urh.signalprocessing.ProtocolAnalyzer import ProtocolAnalyzer
from ..Plugin import ProtocolPlugin
from ..MessageBreak.MessageBreakAction import MessageBreakAction
class MessageBreakPlugin(ProtocolPlugin):
def __init__(self):
super().__ini... | gpl-3.0 | -3,533,856,325,746,229,000 | 35.97561 | 107 | 0.631266 | false | 4.042667 | false | false | false |
monkeython/scriba | scriba/schemes/scriba_pop.py | 1 | 2120 | """Handle mailto URL"""
import email
import os
import poplib
import socket
import multipla
content_encodings = multipla.power_up('scriba.content_encodings')
content_types = multipla.power_up('scriba.content_types')
email_mimes = multipla.power_up('scriba.email_mimes')
class BadPOP3Response(Exception):
pass
d... | bsd-3-clause | -8,228,334,765,132,890,000 | 30.176471 | 77 | 0.641038 | false | 3.772242 | false | false | false |
AnnalisaS/migration_geonode | setup.py | 1 | 3970 | #########################################################################
#
# 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 | -922,430,017,735,541,800 | 32.361345 | 104 | 0.602519 | false | 3.706816 | false | false | false |
nion-software/nionswift | nion/swift/model/Model.py | 1 | 14253 | """Description of data model.
Reference: https://en.wikipedia.org/wiki/Data_modeling
"""
from __future__ import annotations
import copy
import datetime
import gettext
import typing
import uuid
from nion.swift.model import Schema
_ = gettext.gettext
# TODO: description of physical schema
# TODO: created and modifi... | gpl-3.0 | -2,147,612,418,482,599,200 | 36.806366 | 140 | 0.704343 | false | 3.554364 | false | false | false |
OriHoch/pysiogame | classes/layout.py | 1 | 5022 | class Layout:
def __init__(self,mainloop, screen_w, screen_h,x_count=26,y_count=11,game_type="Board"):
self.screen_w = screen_w
self.screen_h = screen_h
self.mainloop = mainloop
self.game_type = game_type
self.update_layout(x_count,y_count)
def update_layout(self,x_count... | gpl-3.0 | 3,021,111,897,255,968,300 | 49.22 | 164 | 0.602748 | false | 2.805587 | false | false | false |
calancha/DIRAC | ResourceStatusSystem/Agent/CacheFeederAgent.py | 1 | 6141 | # $HeadURL: $
''' CacheFeederAgent
This agent feeds the Cache tables with the outputs of the cache commands.
'''
from DIRAC import S_OK#, S_ERROR, gConfig
from DIRAC.AccountingSystem.Client.ReportsClient import ReportsClient
from DIRAC.Core.Base.... | gpl-3.0 | -431,948,442,126,667,650 | 41.645833 | 141 | 0.528741 | false | 4.143725 | false | false | false |
Mo-Talha/Nomad | data/analysis/importer.py | 1 | 16902 | import re
from datetime import datetime
from dateutil.relativedelta import relativedelta
import engine
import data.search.elastic as elastic
from models.exceptions import DataIntegrityError
from models.employer import Employer
from models.job import Job
from models.applicant import Applicant
from models.location imp... | mit | -3,097,911,385,798,250,000 | 35.663774 | 122 | 0.601941 | false | 4.077684 | false | false | false |
brennv/pyArango | pyArango/index.py | 1 | 1497 | import json
from .theExceptions import (CreationError, DeletionError, UpdateError)
class Index(object) :
"""An index on a collection's fields. Indexes are meant to de created by ensureXXX functions of Collections.
Indexes have a .infos dictionary that stores all the infos about the index"""
def __init__(self... | apache-2.0 | 3,545,663,154,695,710,700 | 40.583333 | 138 | 0.61857 | false | 4.045946 | false | false | false |
a3qz/networked_platformer | board.py | 1 | 1909 | import spikes
import wall
import constants
import collectable
import data
class Board:
def __init__(self, game):
self.xsize = 10000
self.ysize = constants.HEIGHT
self.game = game
# create a reference dict for the parser based off of the json dicts of cards + the wall and spikes
... | gpl-3.0 | 3,744,833,302,310,442,000 | 37.959184 | 107 | 0.542169 | false | 3.960581 | false | false | false |
grengojbo/st2 | st2client/st2client/commands/action.py | 1 | 41136 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | 1,807,176,016,032,545,500 | 39.85005 | 100 | 0.540257 | false | 4.600828 | false | false | false |
davidh-ssec/pyresample | pyresample/geometry.py | 1 | 79231 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pyresample, Resampling of remote sensing image data in python
#
# Copyright (C) 2010-2016
#
# Authors:
# Esben S. Nielsen
# Thomas Lavergne
# Adam Dybbroe
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Les... | lgpl-3.0 | 5,741,735,107,686,649,000 | 37.991634 | 116 | 0.577325 | false | 3.950095 | false | false | false |
bwc126/MLND-interview-practice | Q4.py | 1 | 4809 | # Find the least common ancestor between two nodes on a binary search tree. The least common ancestor is the farthest node from the root that is an ancestor of both nodes. For example, the root is a common ancestor of all nodes on the tree, but if both nodes are descendents of the root's left child, then that left chil... | gpl-3.0 | 289,486,961,979,072,200 | 56.939759 | 851 | 0.6309 | false | 2.890024 | false | false | false |
swharden/SWHLab | doc/uses/EPSCs-and-IPSCs/variance method/2016-12-17 02 graphTime2.py | 1 | 4977 | import os
import sys
sys.path.append("../../../../")
import swhlab
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
class ABF2(swhlab.ABF):
def phasicTonic(self,m1=None,m2=None,chunkMs=50,quietPercentile=10,
histResolution=.5,plotToo=False):
"""
... | mit | 254,409,926,683,854,400 | 37.589147 | 86 | 0.594334 | false | 3.162008 | false | false | false |
rhyolight/nupic.son | app/soc/modules/gsoc/logic/proposal.py | 1 | 10718 | # Copyright 2011 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | -2,249,792,019,297,273,300 | 31.283133 | 79 | 0.726721 | false | 3.911679 | false | false | false |
saeki-masaki/cinder | cinder/api/contrib/consistencygroups.py | 1 | 15052 | # Copyright (C) 2012 - 2014 EMC Corporation.
# 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
#
# Unle... | apache-2.0 | -6,583,478,272,288,918,000 | 38.506562 | 79 | 0.628289 | false | 4.597434 | false | false | false |
freeslugs/eventum | app/routes/admin/auth.py | 1 | 8194 | """
.. module:: auth
:synopsis: All routes on the ``auth`` Blueprint.
.. moduleauthor:: Dan Schlosser <dan@danrs.ch>
"""
import string
import random
import httplib2
from app import app
from app.lib.networking import json_response
from app.models import User, Whitelist
from app.forms import CreateProfileForm
from ... | mit | 264,916,467,931,780,160 | 33.57384 | 78 | 0.594703 | false | 4.097 | false | false | false |
ricardodeazambuja/BrianConnectUDP | examples/InputNeuronGroup_multiple_inputs_2.py | 1 | 1910 | '''
Example of a spike generator (only outputs spikes)
In this example spikes are generated and sent through UDP packages. At the end of the simulation a raster plot of the
spikes is created.
'''
from brian import *
import numpy
from brian_multiprocess_udp import BrianConnectUDP
number_of_neurons_total = 60
numbe... | cc0-1.0 | 6,487,044,346,386,210,000 | 35.730769 | 168 | 0.733508 | false | 3.453888 | false | false | false |
our-city-app/oca-backend | src/solutions/common/migrations/update_city_app_locations.py | 1 | 1337 | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 appl... | apache-2.0 | 685,562,577,361,089,500 | 35.135135 | 118 | 0.712042 | false | 3.623306 | false | false | false |
mifit/miexpert | mi_convertlib_ui.py | 1 | 2010 | import sys, os, os.path, getopt, subprocess, pickle
from PyQt4 import QtCore, QtGui, uic
def Usage():
print "Usage: %s [options]" % sys.argv[0]
print "Options are:"
print " -w, --workdir=DIR working dir to use"
print " -r, --refprogram=PROG shelx (default), cns, or cnx"
print ""
print ... | gpl-3.0 | 1,804,050,816,562,054,400 | 30.904762 | 83 | 0.591542 | false | 3.501742 | true | false | false |
SacNaturalFoods/django-pm | helpdesk/migrations/0004_auto__add_timeentry__add_field_ticket_estimate.py | 1 | 20252 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'TimeEntry'
db.create_table('helpdesk_timeentry', (
('id', self.gf('django.db.mod... | agpl-3.0 | -5,653,047,034,389,954,000 | 75.139098 | 182 | 0.543946 | false | 3.682182 | false | false | false |
cjayb/mne-python | mne/utils/mixin.py | 1 | 18553 | # -*- coding: utf-8 -*-
"""Some utility functions."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD (3-clause)
from collections import OrderedDict
from copy import deepcopy
import logging
import json
import numpy as np
from .check import _check_pandas_installed, _check_preload, _valida... | bsd-3-clause | -6,368,250,695,348,627,000 | 34.955426 | 79 | 0.541745 | false | 4.437455 | false | false | false |
mytestcoin/mytestcoin | contrib/devtools/update-translations.py | 1 | 6859 | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | mit | -4,654,621,701,439,158,000 | 35.291005 | 121 | 0.616125 | false | 4.182317 | false | false | false |
CarterBain/AlephNull | setup.py | 1 | 2483 | #!/usr/bin/env python
#
# Copyright 2013 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | 5,700,843,569,520,440,000 | 33.013699 | 79 | 0.677406 | false | 3.985554 | false | false | false |
stackforge/python-openstacksdk | openstack/tests/functional/cloud/test_cluster_templates.py | 1 | 4186 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -4,948,767,063,280,651,000 | 36.711712 | 75 | 0.640229 | false | 4.075949 | true | false | false |
marcsans/cf-cold-start | src/ALS.py | 1 | 14546 | """
Alternating Least Square with lambda weighted regularization
Zhou et al
both explicit and implicit version (of Koren) are implemented
code can be run in parallel in local with setting parallel = True
"""
import numpy as np
from multiprocessing import Pool
from scipy.sparse import diags, csr_matrix
from utils import... | mit | 1,536,631,358,738,374,000 | 38.313514 | 139 | 0.526262 | false | 3.610325 | false | false | false |
JackyChou/SGRS | GeneralReport/models.py | 1 | 7496 | #coding:utf-8
import json
from django.db import models
from django.db import connections
from django.core.exceptions import ValidationError
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import AbstractUser
CONDITION_TYPES = [
'choice',
... | gpl-2.0 | -6,067,342,202,493,637,000 | 34.14554 | 132 | 0.623564 | false | 3.741129 | false | false | false |
MagicUmom/pattern_recognition_project | circle.py | 1 | 19680 | # coding=<utf-8>
import numpy as np
import cv2
from matplotlib import pyplot as plt
from matplotlib.widgets import Slider
from numpy import *
import copy
import time
import sys
import math
import operator
import os
pic_path = 'dataset/true/1.png'
pic_dir = 'dataset/true_resize_rotate/'
rect_scale = 5
r... | mit | 461,858,287,817,124,300 | 30.529801 | 109 | 0.52601 | false | 3.096296 | false | false | false |
libavg/libavg | samples/videochooser.py | 1 | 4046 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# libavg - Media Playback Engine.
# Copyright (C) 2010-2021 Ulrich von Zadow
#
# 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
# vers... | lgpl-2.1 | 2,171,723,810,859,796,700 | 37.169811 | 90 | 0.613198 | false | 3.94347 | false | false | false |
CiscoSystems/python-neutronclient | neutronclient/neutron/v2_0/lb/vip.py | 1 | 3800 | # Copyright 2013 Mirantis Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | -3,435,352,296,504,954,400 | 32.043478 | 78 | 0.581842 | false | 4.068522 | false | false | false |
MCGallaspy/kolibri | kolibri/auth/migrations/0002_auto_20160318_0557.py | 1 | 1291 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-03-18 05:57
from __future__ import unicode_literals
import django.db.models.deletion
import mptt.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kolibriauth', '0001_initial'),
]
... | mit | 1,152,220,117,495,291,100 | 35.885714 | 133 | 0.606507 | false | 3.996904 | false | false | false |
wackerly/faucet | faucet/valve.py | 1 | 64797 | """Implementation of Valve learning layer 2/3 switch."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2018 The Contributors
#
# L... | apache-2.0 | 3,192,262,531,037,498,000 | 40.245703 | 117 | 0.568468 | false | 3.668932 | true | false | false |
Homegateway/SDTTool | sdtv3/SDT3PrintSDT4.py | 1 | 7637 | # SDT2PrintSDT4.py
#
# Print SDT4 to SDT4
from .SDT3Classes import *
from common.SDTHelper import decTab, incTab, newLine
#
# Print functions
#
def print2DomainSDT4(domain, options):
result = printXMLHeader(domain)
incTab()
result += r(printIncludes(domain.includes)) if len(domain.includes) > 0 else ''
result +... | apache-2.0 | 8,722,265,272,410,320,000 | 26.875912 | 151 | 0.675265 | false | 3.144092 | false | false | false |
132nd-etcher/EMFT | emft/miz/miz.py | 1 | 9797 | # coding=utf-8
import tempfile
from filecmp import dircmp
from os.path import exists, join
from zipfile import BadZipFile, ZipFile, ZipInfo
from emft.core.constant import ENCODING
from emft.core.logging import make_logger
from emft.core.path import Path
from emft.core.progress import Progress
from emft.core.sltp impo... | gpl-3.0 | 6,541,689,551,129,313,000 | 31.541528 | 110 | 0.57417 | false | 4.001225 | false | false | false |
agnivesh/aft | aft.py | 1 | 1983 | import os
import re
from lib.adb import AndroidDebugBridge
import string
from lib.read_db import *
adb = AndroidDebugBridge()
def main():
dir = raw_input("Enter the location at which the workspace is to be created: ")
if not os.path.exists(dir):
os.makedirs(dir)
os.makedirs("%s/database" % dir)
os.makedirs("%s... | mit | -5,867,725,327,053,168,000 | 28.61194 | 124 | 0.697932 | false | 2.785112 | false | false | false |
rudhir-upretee/Sumo17_With_Netsim | tools/output/analyze_teleports.py | 1 | 2664 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@file analyze_teleports.py
@author Jakob Erdmann
@date 2012-11-20
@version $Id: analyze_teleports.py 13811 2013-05-01 20:31:43Z behrisch $
Extract statistics from the warning outputs of a simulation run for plotting.
SUMO, Simulation of Urban MObility; see http... | gpl-3.0 | -8,322,608,231,631,647,000 | 35 | 118 | 0.618994 | false | 3.715481 | false | false | false |
priyawadhwa/runtimes-common | ftl/node/layer_builder.py | 1 | 5885 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 1,859,227,329,433,316,600 | 36.724359 | 79 | 0.564146 | false | 3.97904 | false | false | false |
PayloadSecurity/VxAPI | helper_classes/cli_helper.py | 1 | 3316 | import datetime
import traceback
from colors import Color
from constants import *
class CliHelper:
@staticmethod
def print_call_info(cli_object):
print(Color.control('Request was sent at ' + '{:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now())))
print('Endpoint URL: {}'.format(cli_object.ap... | gpl-3.0 | -5,135,808,133,144,333,000 | 58.214286 | 256 | 0.637817 | false | 3.966507 | false | false | false |
tommo/gii | lib/mock/asset/EffectAsset.py | 1 | 1692 | import os.path
import logging
import subprocess
import shutil
import json
from gii.core import *
from mock import _MOCK
from gii.qt.dialogs import requestString, alertMessage, requestConfirm
##----------------------------------------------------------------##
class EffectAssetManager( AssetManager ):
def getName(... | mit | -8,692,634,086,864,370,000 | 26.737705 | 72 | 0.637116 | false | 3.743363 | false | false | false |
KelvinLu/krotos-convnet | krotos/convnet/model/training.py | 1 | 1158 | import tensorflow as tf
def training_mse_loss(output, labels):
with tf.variable_scope('loss') as scope:
loss = tf.reduce_mean(tf.square(tf.sub(output, labels)), name='mse_loss')
return loss
def training_sigmoid_cross_entropy(output, labels):
with tf.variable_scope('loss') as scope:
loss ... | mit | 5,099,103,527,940,317,000 | 34.090909 | 100 | 0.670984 | false | 3.541284 | false | false | false |
nsf/gotris | Tools/fontcompile.py | 1 | 1537 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# compiled font is a binary blob:
# 1. magic (MFNT) - 4 bytes
# 2. number of symbols - 4 bytes
# 3. font y advance - 4 bytes
# 4. an array of glyphs (offset_x, offset_y, width, height, tx, ty, tx2, ty2, x_advance) - 36 * number of symbols
# (iiIIffffI)
# 5. png texture
imp... | mit | 693,089,028,628,242,800 | 25.050847 | 170 | 0.648666 | false | 2.42812 | false | false | false |
pypingou/kittystore | kittystore/storm/store.py | 1 | 20364 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2012 Aurélien Bompard <abompard@fedoraproject.org>
Author: Aurélien Bompard <abompard@fedoraproject.org>
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; eit... | gpl-3.0 | -7,081,884,858,392,199,000 | 38.082534 | 81 | 0.59169 | false | 4.267868 | false | false | false |
overridelogic/bruces | src/bruces/ui/console.py | 1 | 3385 | from __future__ import print_function
import os
import sys
import math
from collections import OrderedDict
class Console(object):
"""
Basic console outputter.
"""
def __init__(self, stream=sys.stdout, error_stream=sys.stderr):
"""
Initialize the console.
stream -- the stream... | mit | -6,089,991,959,096,628,000 | 24.839695 | 92 | 0.483604 | false | 4.367742 | false | false | false |
thuswa/subdms | subdms/propseturl.py | 1 | 1720 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# $Id$
# Last modified Wed Jul 7 20:51:13 2010 on stalker
# update count: 102
#
# subdms - A document management system based on subversion.
# Copyright (C) 2009 Albert Thuswaldner
#
# This program is free software: you can redistribute it and/or modify
# it under the te... | gpl-3.0 | 4,931,710,476,619,434,000 | 30.272727 | 74 | 0.710465 | false | 3.659574 | false | false | false |
zhuhang1/vccrResult | monitor.py | 1 | 1392 | from time import sleep, time
from subprocess import *
import re
default_dir = '.'
def monitor_qlen(iface, interval_sec = 0.01, fname='%s/qlen.txt' % default_dir):
#pat_queued = re.compile(r'backlog\s[^\s]+\s([\d]+)p')
pat_dropped = re.compile(r'dropped\s([\d]+),')
pat_queued = re.compile(r'backlog\s([\d]+... | mit | 5,945,054,590,180,469,000 | 36.621622 | 80 | 0.556034 | false | 3.052632 | false | false | false |
jonas-eberle/pyEOM | pyEOM/datasets/predefined/MODIS/MYD10CM.py | 1 | 2137 | __author__ = 'we32zac'
from pyEOM.datasets import Dataset as DatasetAbs
class Dataset(DatasetAbs):
shortname = 'MYD10CM'
platform = 'Aqua'
collection = '005'
rastertype = 'CMG'
timeInterval = 'P1M'
host = 'n5eil01u.ecs.nsidc.org'
dir = '/SAN/MOSA/MYD10CM.005'
sources = ... | mit | 7,872,655,397,594,822,000 | 38.358491 | 302 | 0.605054 | false | 3.4192 | false | false | false |
nagyistoce/netzob | src/netzob/Export/TextExport.py | 1 | 3142 | # -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocol... | gpl-3.0 | 300,121,780,484,130,560 | 49.612903 | 105 | 0.416507 | false | 4.996815 | false | false | false |
gixxi/comparareetpendere | setup.py | 1 | 1143 | '''
:copyright: Copyright 2013 by christian.meichsner@informatik.tu-chemnitz.de, see AUTHORS.
:license: BSD, see LICENSE for details.
'''
from distutils.core import setup
setup(name='ComparareEtPendere',
version='0.9',
packages=['MultisourceHtmlFormatter'],
provides=['MultisourceHtmlFormatter'],
... | bsd-2-clause | -4,088,039,210,472,963,000 | 42.961538 | 89 | 0.623797 | false | 4.396154 | false | false | false |
JQIamo/artiq | artiq/compiler/builtins.py | 1 | 7849 | """
The :mod:`builtins` module contains the builtin Python
and ARTIQ types, such as int or float.
"""
from collections import OrderedDict
from . import types
# Types
class TNone(types.TMono):
def __init__(self):
super().__init__("NoneType")
class TBool(types.TMono):
def __init__(self):
super... | lgpl-3.0 | 6,893,321,347,055,614,000 | 23.605016 | 83 | 0.60581 | false | 3.347122 | false | false | false |
Laucoonte/cpmx | socketVideoDesk.py | 1 | 1385 | import io
import socket
import struct
from PIL import Image
import cv2
import numpy
# Start a socket listening for connections on 0.0.0.0:8000 (0.0.0.0 means
# all interfaces)
server_socket = socket.socket()
server_socket.bind(('0.0.0.0', 8000))
server_socket.listen(0)
# Accept a single connection and make a file-lik... | mit | 4,973,504,160,257,981,000 | 32.780488 | 82 | 0.641877 | false | 3.616188 | false | false | false |
DolotovEvgeniy/ml-lib | 3rdparty/cpplint.py | 1 | 241896 | #!/usr/bin/env python
#
# Copyright (c) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | bsd-3-clause | -4,940,472,272,440,915,000 | 37.256524 | 97 | 0.639118 | false | 3.820215 | false | false | false |
achawkins/Forsteri | forsteri/interface/sql.py | 1 | 33446 | """
SQLite Database Interface for Information
Copyright (c) 2014, 2015 Andrew Hawkins
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... | mit | -6,560,678,926,358,750,000 | 26.103728 | 79 | 0.631555 | false | 4.32063 | false | false | false |
Sup3r-Us3r/HashCode | hashcode-en.py | 1 | 12188 | #!/usr/bin/env python
#coding: utf-8
'''
HashCode
'''
import hashlib
from base64 import b64encode, b64decode
import codecs
import binascii
import re
from time import sleep
import sys
import os
from platform import python_version
Limpar = "clear"
if sys.version_info[0] < 3:
versao = python_version()
print("\n\033[... | gpl-3.0 | -8,936,845,709,316,746,000 | 26.985882 | 154 | 0.639146 | false | 2.200555 | false | false | false |
pollitosabroson/idneo | src/catalogs/migrations/0001_initial.py | 1 | 1867 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(ver... | apache-2.0 | 388,971,664,067,969,900 | 42.418605 | 133 | 0.559186 | false | 4.195506 | false | false | false |
smallbigcake/PodcastSubmitter | podcast.py | 1 | 2191 | #!/usr/bin/env python
# coding=utf-8
import os
import time
DEFAULT_AUTHOR = "大饼"
DEFAULT_SUMMARY = "通过手机上传"
URL_PREFIX = "http://www.42kr.com/podcast/"
XML_FILE_PATH = "/home/Cake/site/42kr/feed.xml"
SUBMIT_FOLDER = "/home/Cake/tool/podcast_submit/submit_folder/"
PODCAST_FOLDER = "/home/Cake/site/42kr/podcast/"
clas... | gpl-2.0 | 8,360,900,979,805,299,000 | 32.984375 | 100 | 0.611494 | false | 3.198529 | false | false | false |
zjutjsj1004/third | boost/tools/build/src/tools/symlink.py | 1 | 4071 | # Status: ported.
# Base revision: 64488.
# Copyright 2003 Dave Abrahams
# Copyright 2002, 2003 Rene Rivera
# Copyright 2002, 2003, 2004, 2005 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Defines... | mit | -5,131,955,878,686,185,000 | 34.348214 | 93 | 0.634733 | false | 3.664266 | false | false | false |
Esri/mdcs-py | scripts/CreateRefMD/CreateRefMD.py | 1 | 12899 | #------------------------------------------------------------------------------
# Copyright 2013 Esri
# 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/LICENS... | apache-2.0 | 3,505,991,447,788,889,000 | 51.864754 | 177 | 0.41856 | false | 5.00932 | false | false | false |
puttarajubr/commcare-hq | corehq/apps/reminders/models.py | 1 | 70624 | import pytz
from pytz import timezone
from datetime import timedelta, datetime, date, time
import re
from corehq.apps.casegroups.models import CommCareCaseGroup
from corehq.apps.hqcase.dbaccessors import get_case_ids_in_domain
from corehq.apps.reminders.dbaccessors import get_surveys_in_domain
from dimagi.ext.couchdbki... | bsd-3-clause | -1,628,130,193,549,512,200 | 42.947729 | 204 | 0.614621 | false | 4.170544 | false | false | false |
amenonsen/ansible | lib/ansible/modules/network/fortios/fortios_system_replacemsg_ec.py | 1 | 9923 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | gpl-3.0 | -4,127,854,104,198,008,000 | 28.445104 | 101 | 0.582082 | false | 4.2118 | false | false | false |
biosustain/marsi | marsi/nearest_neighbors/model.py | 1 | 19310 | # Copyright 2016 Chr. Hansen A/S and The Novo Nordisk Foundation Center for Biosustainability, DTU.
# 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.... | apache-2.0 | 1,223,818,149,547,254,800 | 30.655738 | 120 | 0.594303 | false | 4.145556 | false | false | false |
nagaozen/my-os-customizations | home/nagaozen/.gnome2/gedit/plugins/align-columns/window_helper.py | 1 | 3590 | # Align columns - Gedit plugin
#
# Copyright (c) 2011 Hugo Henriques Maia Vieira
#
# 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 late... | gpl-3.0 | 3,712,914,509,710,296,000 | 35.262626 | 101 | 0.613928 | false | 4.243499 | false | false | false |
carquois/blobon | blobon/blogs/migrations/0124_auto__add_field_model_hidden__add_field_modelfielddata_foreign.py | 1 | 32164 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Model.hidden'
db.add_column('blogs_model', 'hidden',
self.gf('django.d... | mit | 1,610,596,835,419,017,700 | 88.846369 | 206 | 0.53762 | false | 3.490775 | false | false | false |
winxos/python | udpdebug.py | 1 | 1786 | # -*- coding: utf-8 -*-
'''
p2p server.
winxos 2015-12-04
'''
import socket
import threading
import os
import time
port = 9010
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # DGRAM -> UDP
is_exit = False
class getcmd(threading.Thread):
global s, clients
def __init__(self):
threading.Thread.__... | mit | 4,525,472,451,138,704,400 | 24.514286 | 76 | 0.469205 | false | 3.705394 | false | false | false |
bjlittle/iris | lib/iris/analysis/__init__.py | 1 | 98473 | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
A package providing :class:`iris.cube.Cube` analysis support.
This module defines a suite of :class:`~iris.analysis.Aggreg... | lgpl-3.0 | -819,444,969,164,042,900 | 33.845364 | 86 | 0.611345 | false | 4.366486 | false | false | false |
tek/amino | amino/util/string.py | 1 | 1818 | import re
import abc
from typing import Any, Sized
from functools import singledispatch
import amino
def snake_case(name: str) -> str:
s1 = re.sub('([^_])([A-Z][a-z]+)', r'\1_\2', name)
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
@singledispatch
def decode(value: Any) -> Any:
return value
... | mit | -1,971,569,151,118,819,800 | 20.903614 | 86 | 0.612761 | false | 3.050336 | false | false | false |
cemarchi/biosphere | Src/BioAnalyzer/DataAccess/Entities/GenePrioritization/DifferentialMicroRnaExpressionLevelValue.py | 1 | 1220 | from typing import Dict
from Src.BioAnalyzer.DataAccess.Entities.GenePrioritization.DifferentialValueBase import DifferentialValueBase
from Src.Core.Entity.EntityBase import EntityBase
class DifferentialMicroRnaExpressionLevelValue(DifferentialValueBase, EntityBase):
"""description of class"""
def __init__(s... | bsd-3-clause | 9,078,911,514,230,646,000 | 24.978723 | 110 | 0.603279 | false | 4.250871 | false | false | false |
benoitc/offset | offset/net/fd_poll_base.py | 1 | 2955 | # -*- coding: utf-8 -
#
# This file is part of offset. See the NOTICE for more information.
import errno
from .util import fd_
from .. import syscall
from ..syscall import select
class PollerBase(object):
POLL_IMPL = None
def __init__(self):
self.poll = self.POLL_IMPL()
self.fds = {}
... | mit | -3,990,348,844,032,737,000 | 22.830645 | 71 | 0.466328 | false | 4.004065 | false | false | false |
yadayada/acd_cli | acdcli/cache/schema.py | 1 | 4661 | import logging
from sqlite3 import OperationalError
from .cursors import *
logger = logging.getLogger(__name__)
# _KeyValueStorage
_CREATION_SCRIPT = """
CREATE TABLE metadata (
"key" VARCHAR(64) NOT NULL,
value VARCHAR,
PRIMARY KEY ("key")
);
CREATE TABLE nodes (
id VAR... | gpl-2.0 | -3,150,155,047,534,967,000 | 24.894444 | 84 | 0.561038 | false | 3.842539 | false | false | false |
lihengl/dizu-api | bin/compile.py | 1 | 1532 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import json
import sys
def translate(cond):
if cond == u"全": return "true"
return "false"
js_head = "function(n){"
js_body = "if(%s)return'%s';"
js_tail = "return'00000';}"
ifile = codecs.open("tmp/weighted.json", "r", encoding="utf-8")
rules = j... | mit | -93,413,502,931,058,780 | 22.90625 | 63 | 0.529412 | false | 3.11609 | false | false | false |
9and3r/RPi-InfoScreen-Kivy | screens/mopidy/screen.py | 1 | 10795 | from functools import partial
import json
from kivy import Config
from kivy.animation import Animation
from kivy.clock import Clock
from kivy.uix.label import Label
from kivy.uix.screenmanager import Screen
from kivy.uix.widget import Widget
import mopidy
import os
from threading import Thread
import sys
from ws4py.cli... | gpl-3.0 | 5,999,849,611,848,619,000 | 42.882114 | 139 | 0.654748 | false | 3.570956 | false | false | false |
Yorlmar/Glyphs-Scripts-1 | Path/Report Glyphs with Acute Node.py | 1 | 1780 | #MenuTitle: Report Glyphs with Acute-angled Node
# -*- coding: utf-8 -*-
__doc__="""
Reports glyphs that have nodes with very acute angle (default: less than 15 degrees).
"""
import GlyphsApp
import math
# The user can change this value.
checkAngle = 15
thisFont = Glyphs.font # frontmost font
thisFontMaster = thisFo... | apache-2.0 | -6,774,239,172,743,482,000 | 27.269841 | 94 | 0.713483 | false | 2.78125 | false | false | false |
toobaz/pandas | pandas/core/arrays/interval.py | 1 | 39950 | from operator import le, lt
import textwrap
import numpy as np
from pandas._config import get_option
from pandas._libs.interval import Interval, IntervalMixin, intervals_to_interval_bounds
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender
from pandas.core.dtypes.cast import... | bsd-3-clause | -2,661,808,452,706,448,400 | 31.880658 | 87 | 0.564906 | false | 4.285101 | false | false | false |
mrustl/flopy | flopy/modflow/mfriv.py | 1 | 10564 | """
mfriv module. Contains the ModflowRiv class. Note that the user can access
the ModflowRiv class as `flopy.modflow.ModflowRiv`.
Additional information for this MODFLOW package can be found at the `Online
MODFLOW Guide
<http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?riv.htm>`_.
"""
import... | bsd-3-clause | -192,336,370,051,171,000 | 34.808362 | 97 | 0.539284 | false | 4.139498 | false | false | false |
bingopodcast/bingos | bingo_emulator/hi_fi/game.py | 1 | 125064 | #!/usr/bin/python
import logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
import procgame.game, sys, os
import procgame.config
import random
import procgame.sound
sys.path.insert(0,os.path.pardir)
import bingo_emulator.common.units as units
import bingo_em... | gpl-3.0 | -4,097,567,572,759,612,400 | 48.549921 | 222 | 0.470735 | false | 4.266794 | false | false | false |
r-rathi/mint | mint/max.py | 1 | 19101 | #-------------------------------------------------------------------------------
import collections
import sys
import re
import min
#-------------------------------------------------------------------------------
class Registry(object):
Entry = collections.namedtuple('Entry', 'obj, type')
_registry = collecti... | mit | 1,716,885,049,944,189,700 | 31.707192 | 81 | 0.513324 | false | 4.01619 | false | false | false |
black3r/periscope3 | periscope/plugins/TvSubtitles.py | 1 | 10030 | # -*- coding: utf-8 -*-
# This file is part of periscope3.
# Copyright (c) 2013 Roman Hudec <black3r@klikni.cz>
#
# This file contains parts of code from periscope.
# Copyright (c) 2008-2011 Patrick Dessalle <patrick@dessalle.be>
#
# periscope is free software; you can redistribute it and/or modify
# ... | gpl-2.0 | -7,217,574,329,386,500,000 | 24.586735 | 129 | 0.663509 | false | 2.611979 | false | false | false |
jmwoll/goccs | benchmark/benchmark_ehs.py | 1 | 2555 | # Copyright (C) 2017-2018 Jan Wollschläger <janmwoll@gmail.com>
# This file is part of goccs.
#
# goccs 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) a... | gpl-3.0 | -1,809,881,434,326,050,000 | 37.666667 | 126 | 0.621865 | false | 2.903299 | false | false | false |
WebMole/crawler-benchmark | project/controllers/base.py | 1 | 2040 | # -*- coding: utf-8 -*-
from flask import render_template, url_for, request, make_response
from project import app, config
from project.controllers.form import RecaptchaForm
@app.route('/')
def index():
return render_template('index.html', modes=config.modes, title='Home')
@app.route('/print', methods=['GET',... | gpl-2.0 | -3,903,466,145,937,501,700 | 27.333333 | 102 | 0.637745 | false | 3.915547 | false | false | false |
poeschlr/kicad-3d-models-in-freecad | cadquery/FCAD_script_generator/Package_SIP/cq_SIP_3.py | 1 | 41500 | # -*- coding: utf-8 -*-
#!/usr/bin/python
#
# This is derived from a cadquery script for generating PDIP models in X3D format
#
# from https://bitbucket.org/hyOzd/freecad-macros
# author hyOzd
# This is a
# Dimensions are from Microchips Packaging Specification document:
# DS00000049BY. Body drawing is the same as QFP ... | gpl-2.0 | -2,194,463,664,417,142,500 | 35.759079 | 157 | 0.487663 | false | 3.02412 | false | false | false |
Erotemic/ibeis | ibeis/algo/graph/mixin_groundtruth.py | 1 | 3713 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
import numpy as np
import vtool_ibeis as vt
import pandas as pd
from ibeis.algo.graph.nx_utils import ensure_multi_index
from ibeis.algo.graph.state import POSTV, NEGTV, INCMP
print, rrr, profil... | apache-2.0 | -1,429,025,023,087,172,600 | 38.084211 | 82 | 0.568543 | false | 3.369328 | false | false | false |
niamiot/RGPA | Algebraic_loc/TDoALocation.py | 1 | 16413 | # -*- coding:Utf-8 -*-
#####################################################################
#This file is part of RGPA.
#Foobar 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, ... | gpl-3.0 | 4,081,457,488,185,537,000 | 44.97479 | 195 | 0.420338 | false | 3.750686 | false | false | false |
eseidel/native_client_patches | tools/modular-build/build.py | 1 | 18574 | #!/usr/bin/python
# Copyright 2010 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can
# be found in the LICENSE file.
import glob
import os
import sys
import dirtree
import btarget
import treemappers
script_dir = os.path.abspath(os.path.dirname(__... | bsd-3-clause | -2,210,853,609,687,808,800 | 38.268499 | 79 | 0.619307 | false | 3.369128 | true | false | false |
gocept/ajja | docs/conf.py | 1 | 7887 | # -*- coding: utf-8 -*-
#
# classjs documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 3 09:48:09 2012.
#
# 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... | mit | -8,961,386,320,135,922,000 | 31.191837 | 80 | 0.702675 | false | 3.730842 | true | false | false |
demisto/content | Packs/VMRay/Integrations/VMRay/VMRay.py | 1 | 28702 | import requests
from CommonServerPython import *
''' GLOBAL PARAMS '''
API_KEY = demisto.params()['api_key']
SERVER = (
demisto.params()['server'][:-1]
if (demisto.params()['server'] and demisto.params()['server'].endswith('/'))
else demisto.params()['server']
)
SERVER += '/rest/'
USE_SSL = not demisto.par... | mit | 5,731,929,574,141,218,000 | 29.730193 | 116 | 0.559578 | false | 3.79355 | false | false | false |
ironchicken/pycoon | src/pycoon/throw.py | 1 | 1735 | """
Copyright (C) Richard Lewis 2006
This software is licensed under the terms of the GNU GPL.
The module provides the throw component which handles <throw> elements
in pipeline configurations causing the given error condition.
"""
import sys
#from pycoon import apache
from pycoon.components import syntax_component,... | gpl-2.0 | 1,053,809,978,688,109,000 | 31.12963 | 99 | 0.67781 | false | 3.855556 | false | false | false |
kapteyn-astro/kapteyn | doc/source/EXAMPLES/mu_insidelabeldemo.py | 1 | 1047 | from kapteyn import maputils
from matplotlib import pylab as plt
header = {'NAXIS': 2 ,'NAXIS1':100 , 'NAXIS2': 100 ,
'CDELT1': -7.165998823000E-03, 'CRPIX1': 5.100000000000E+01 ,
'CRVAL1': -5.128208479590E+01, 'CTYPE1': 'RA---NCP', 'CUNIT1': 'DEGREE ',
'CDELT2': 7.165998823000E-03 , 'CRPIX2': 5.100000000000E+01,
'CRV... | bsd-3-clause | 4,027,872,272,133,733,400 | 37.777778 | 78 | 0.723018 | false | 2.24197 | false | true | false |
openstack/cliff | cliff/formatters/shell.py | 1 | 2377 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | apache-2.0 | -7,770,657,797,840,382,000 | 36.140625 | 79 | 0.561632 | false | 4.725646 | false | false | false |
LuisAverhoff/FractalTrees | FractalTrees.py | 1 | 4019 | import numpy as np
from math import sin, cos
import random as rand
from pyglet.gl import *
import sys
AMOUNT_TO_SHRINK = rand.uniform(0.50, 0.75)
# Becareful of setting this too high as it will take longer to create the tree the higher you put it.
# At values higher than 15(2^15 branches) is where you will notice this... | apache-2.0 | 7,781,901,745,459,489,000 | 33.350427 | 118 | 0.618811 | false | 3.354758 | false | false | false |
lawrencejones/neuro | iz/Plotters.py | 1 | 2512 | import matplotlib.pyplot as plt
import numpy as np
def plot_show():
"""
Shows the current plot
"""
plt.show()
def plot_connectivity_matrix(CIJ, title="", plot_figure=None):
"""
Plots a scatter matrix
"""
plot = plt.figure(plot_figure).add_subplot(1, 1, 1)
plt.title(title)
x... | gpl-3.0 | -8,637,677,998,799,325,000 | 26.604396 | 94 | 0.619029 | false | 3.24129 | false | false | false |
fogasl/konyvtar | mysite/settings.py | 1 | 1986 | """
Django settings for mysite project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | unlicense | -6,279,535,683,423,094,000 | 23.219512 | 71 | 0.723061 | false | 3.224026 | false | false | false |
boothead/karl | karl/models/community.py | 1 | 2573 | # Copyright (C) 2008-2009 Open Society Institute
# Thomas Moroz: tmoroz@sorosny.org
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License Version 2 as published
# by the Free Software Foundation. You may not use, modify or distribu... | gpl-2.0 | -6,446,608,426,487,927,000 | 31.987179 | 74 | 0.676642 | false | 3.934251 | false | false | false |
thisismyrobot/dnstwister | dnstwister/api/__init__.py | 1 | 5575 | """The analysis API endpoint."""
import urllib.parse
import whois as whois_mod
import flask
from flask import current_app
from dnstwister.api.checks import parked
from dnstwister.api.checks import safebrowsing
from dnstwister import tools
from dnstwister.core.domain import Domain
app = flask.Blueprint(... | unlicense | -3,811,934,243,629,404,000 | 31.584337 | 95 | 0.626726 | false | 3.701859 | false | false | false |
KILLER-CHIEF/uqcs-hackathon-2016 | MultogoGameSession.py | 1 | 9745 | from MultogoBoard import Board
from MultogoPlayer import Player
from random import randint
class GameState(object):
PreGame = 0
InGame = 1
PostGame = 2
class GameHandler(object):
#
def __init__(self, gameId, name, width, height, max_players):
self.gameId = gameId
self.name = name
self.width = width
sel... | gpl-3.0 | 5,336,595,952,036,579,000 | 33.31338 | 125 | 0.70354 | false | 3.090707 | false | false | false |
wdmchaft/taskcoach | taskcoachlib/meta/gpl.py | 1 | 73031 | '''
Task Coach - Your friendly task manager
Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org>
Task Coach 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 | 3,643,659,713,676,730,000 | 51.31447 | 95 | 0.787419 | false | 4.144308 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.