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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
teamosceola/bitbake | lib/bb/ui/knotty.py | 1 | 12691 | #
# BitBake (No)TTY UI Implementation
#
# Handling output to TTYs or files (no TTY)
#
# Copyright (C) 2006-2007 Richard Purdie
#
# 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.
#
# Thi... | gpl-2.0 | -854,224,645,206,136,700 | 38.908805 | 175 | 0.532897 | false | 4.772847 | false | false | false |
MaxLinCode/tardy-HackIllinois-2017 | alexa/lambda_function.py | 1 | 6803 | """
This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
The Intent Schema, Built-in Slots, and Sample Utterances for this skill, as well
as testing instructions are located at http://amzn.to/1LzFrj6
For additional samples, visit the Alexa Skills Kit Getting Started guide at
http://amzn.to/1... | mit | 3,407,677,043,786,212,400 | 32.850746 | 132 | 0.641482 | false | 3.68327 | false | false | false |
quru/qis | src/imageserver/errors.py | 1 | 2593 | #
# Quru Image Server
#
# Document: errors.py
# Date started: 31 Mar 2011
# By: Matt Fozard
# Purpose: Internal errors and exceptions
# Requires:
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 6,222,362,547,311,885,000 | 22.36036 | 79 | 0.649055 | false | 4.209416 | false | false | false |
lukas-bednar/python-rrmngmnt | rrmngmnt/ssh.py | 1 | 10209 | import os
import time
import socket
import paramiko
import contextlib
import subprocess
from rrmngmnt.executor import Executor
AUTHORIZED_KEYS = os.path.join("%s", ".ssh/authorized_keys")
KNOWN_HOSTS = os.path.join("%s", ".ssh/known_hosts")
ID_RSA_PUB = os.path.join("%s", ".ssh/id_rsa.pub")
ID_RSA_PRV = os.path.join("... | gpl-2.0 | -7,273,027,268,052,574,000 | 33.962329 | 77 | 0.515526 | false | 4.467834 | false | false | false |
lipro-yocto/git-repo | subcmds/cherry_pick.py | 1 | 3421 | # Copyright (C) 2010 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 | 5,867,796,251,983,264,000 | 28.747826 | 78 | 0.621163 | false | 3.597266 | false | false | false |
CloudBoltSoftware/cloudbolt-forge | ui_extensions/multilevelapprovals/views.py | 1 | 14185 | from urllib.parse import urlparse
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.template import loader
from django.urls import reverse
from django.utils.translation import ugettext as _, ungettext
from accou... | apache-2.0 | -6,349,238,309,283,162,000 | 38.298295 | 111 | 0.582023 | false | 4.323377 | true | false | false |
LeandroRoberto/sapl | sapl/comissoes/views.py | 1 | 3353 |
from django.core.urlresolvers import reverse
from django.db.models import F
from django.views.generic import ListView
from sapl.crud.base import RP_DETAIL, RP_LIST, Crud, CrudAux, MasterDetailCrud
from sapl.materia.models import MateriaLegislativa, Tramitacao
from .models import (CargoComissao, Comissao, Composicao,... | gpl-3.0 | 4,696,481,446,960,925,000 | 32.53 | 78 | 0.638831 | false | 3.012579 | false | false | false |
mdovgialo/steam-vr-wheel | steam_vr_wheel/pyvjoy/_wrapper.py | 1 | 2789 | import os
import sys
from ctypes import *
dll_filename = "vJoyInterface.dll"
dll_path = os.path.dirname(__file__) + os.sep + dll_filename
try:
_vj = cdll.LoadLibrary(dll_path)
except OSError:
sys.exit("Unable to load vJoy SDK DLL. Ensure that %s is present" % dll_filename)
def vJoyEnabled():
"""... | mit | 8,956,066,866,461,069,000 | 21.241667 | 102 | 0.688777 | false | 2.783433 | false | false | false |
millken/simple-rtmp-server | trunk/research/community/server.py | 1 | 4633 | #!/usr/bin/python
'''
The MIT License (MIT)
Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, cop... | mit | -3,654,521,204,986,091,500 | 31.398601 | 98 | 0.668465 | false | 3.671157 | false | false | false |
golya/FuzzLabs | engine/tests/steps/modules.py | 1 | 1961 | from behave import *
import os
import sys
import inspect
ROOT_DIR = os.path.dirname(
os.path.abspath(
inspect.getfile(inspect.currentframe()
)))
sys.path.append(ROOT_DIR + "/../../classes")
from ConfigurationHandler import ConfigurationHandler
from ModuleHandler imp... | gpl-2.0 | 9,094,677,830,503,925,000 | 29.640625 | 74 | 0.63743 | false | 3.793037 | true | false | false |
amanzi/ats-dev | tools/utils/transect_data.py | 2 | 7741 | """Loads and/or plots 2D, topologlically structured data on quadrilaterals using matplotlib.
"""
import sys,os
import numpy as np
import h5py
import mesh
import colors
def fullname(varname):
fullname = varname
if not '.cell.' in fullname:
fullname = fullname+'.cell.0'
return fullname
def transec... | bsd-3-clause | -6,002,022,548,617,249,000 | 35.687204 | 143 | 0.575119 | false | 3.435863 | false | false | false |
gunan/tensorflow | tensorflow/python/keras/layers/preprocessing/benchmarks/categorical_encoding_benchmark.py | 1 | 3177 | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,262,048,413,489,094,000 | 35.517241 | 80 | 0.652188 | false | 4.052296 | false | false | false |
mommermi/callhorizons | callhorizons/callhorizons.py | 1 | 60381 | """CALLHORIZONS - a Python interface to access JPL HORIZONS
ephemerides and orbital elements.
This module provides a convenient python interface to the JPL
HORIZONS system by directly accessing and parsing the HORIZONS
website. Ephemerides can be obtained through get_ephemerides,
orbital elements through get_elements.... | mit | 2,673,770,013,249,938,400 | 44.952055 | 90 | 0.409781 | false | 4.403194 | false | false | false |
torkelsson/meta-package-manager | meta_package_manager/managers/mas.py | 1 | 5319 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016-2018 Kevin Deldycke <kevin@deldycke.com>
# and contributors.
# All Rights Reserved.
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software F... | gpl-2.0 | -8,493,799,302,312,990,000 | 31.432927 | 79 | 0.536943 | false | 4.275723 | false | false | false |
apuigsech/CryptoAPI | CryptoAPI/CryptoAPI.py | 1 | 8197 | #!/usr/bin/env python
# CryptoAPI: Python Crypto API implementation
#
# Copyright (c) 2014 - Albert Puigsech Galicia (albert@puigsech.com)
#
# 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 w... | gpl-3.0 | 8,747,078,000,745,754,000 | 27.866197 | 127 | 0.654508 | false | 3.276179 | false | false | false |
jbq/ufw | src/backend.py | 1 | 24402 | '''backend.py: interface for ufw backends'''
#
# Copyright 2008-2011 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in th... | gpl-3.0 | 7,539,033,067,947,464,000 | 35.475336 | 93 | 0.489017 | false | 4.356722 | false | false | false |
craigderington/studentloan5 | tests/engine.py | 1 | 5088 | from subprocess import call
from os import path
import hitchpostgres
import hitchselenium
import hitchpython
import hitchserve
import hitchredis
import hitchtest
import hitchsmtp
# Get directory above this file
PROJECT_DIRECTORY = path.abspath(path.join(path.dirname(__file__), '..'))
class ExecutionEngine(hitchtest... | bsd-3-clause | -3,658,331,897,922,075,600 | 33.378378 | 114 | 0.612225 | false | 4.076923 | false | false | false |
opnsense/core | src/opnsense/scripts/netflow/lib/flowparser.py | 1 | 8475 | """
Copyright (c) 2019 Ad Schellevis <ad@opnsense.org>
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 of source code must retain the above copyright notice,
... | bsd-2-clause | 991,364,815,688,320,300 | 41.80303 | 125 | 0.520354 | false | 4.2375 | false | false | false |
paulbersch/django-locus | locus/utils/location.py | 1 | 1360 | import math
# add back later
# import GeoIP
nauticalMilePerLat = 60.00721
nauticalMilePerLongitude = 60.10793
rad = math.pi / 180.0
milesPerNauticalMile = 1.15078
def calcDistance(lat1, lon1, lat2, lon2):
"""
Caclulate distance between two lat lons in NM
"""
lat1 = float(lat1)
lat2 = float(... | mit | 4,176,555,150,693,318,000 | 28.565217 | 107 | 0.696324 | false | 2.792608 | false | false | false |
MinoMino/minqlx | python/minqlx/_handlers.py | 1 | 18535 | # minqlx - Extends Quake Live's dedicated server with extra functionality and scripting.
# Copyright (C) 2015 Mino <mino@minomino.org>
# This file is part of minqlx.
# minqlx 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 Softw... | gpl-3.0 | 3,269,673,672,761,068,500 | 35.201172 | 120 | 0.580523 | false | 3.98003 | true | false | false |
mediatum/mediatum | utils/hash.py | 1 | 1599 | """
mediatum - a multimedia content repository
Copyright (C) 2007 Arne Seifert <seiferta@in.tum.de>
Copyright (C) 2007 Matthias Kramm <kramm@in.tum.de>
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 Foun... | gpl-3.0 | -1,159,093,611,323,354,600 | 27.052632 | 76 | 0.676673 | false | 3.853012 | false | false | false |
baseclue/django-rest-test | tests/test_compare.py | 1 | 15578 | import unittest
from rest_test import compare
class DictTestCase(unittest.TestCase):
def test_basic(self):
data = dict(
a=1,
b='2'
)
expected_data = dict(
b='2',
a=1
)
assert compare(data, expected_data)
def test_basic_... | apache-2.0 | 7,426,249,069,602,658,000 | 18.399751 | 57 | 0.29991 | false | 4.53376 | true | false | false |
apeyrard/sjtu-work | DIP/exercises/ex3/ex3.py | 1 | 3652 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import sys
from PIL import Image
import numpy as np
import math
import argparse
def getMatrix(image):
data = list(image.getdata())
width, height = image.size
matrix = np.array(data).reshape(height,width)
return matrix
def getData(matrix):
data = lis... | mit | 3,300,094,426,064,420,000 | 31.035088 | 89 | 0.589266 | false | 3.275336 | false | false | false |
luk156/minimo | minimo/documento/migrations/0004_auto__add_unitamisura__add_field_riga_unita.py | 1 | 10331 | # -*- 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 'UnitaMisura'
db.create_table(u'documento_unitamisura', (
(u'id', self.gf('django... | gpl-2.0 | 823,570,124,755,032,000 | 74.416058 | 209 | 0.55106 | false | 3.467942 | false | false | false |
fzimmermann89/pyload | module/plugins/hoster/FastixRu.py | 1 | 1366 | # -*- coding: utf-8 -*-
import re
import urllib
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
from module.plugins.internal.utils import json
class FastixRu(MultiHoster):
__name__ = "FastixRu"
__type__ = "hoster"
__version__ = "0.17"
__status__ = "testing"
__... | gpl-3.0 | 3,599,834,605,401,120,300 | 29.355556 | 90 | 0.533675 | false | 3.520619 | false | false | false |
Purg/kwiver | vital/bindings/python/vital/types/landmark_map.py | 1 | 4829 | """
ckwg +31
Copyright 2016 by Kitware, 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 of conditions and the ... | bsd-3-clause | -1,191,061,869,346,105,300 | 30.562092 | 88 | 0.61607 | false | 3.820411 | false | false | false |
tectronics/openmalaria-git | util/compareOutput.py | 1 | 7178 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of OpenMalaria.
#
# Copyright (C) 2005-2010 Swiss Tropical Institute and Liverpool School Of Tropical Medicine
#
# OpenMalaria is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#... | gpl-2.0 | -189,319,169,589,652,500 | 38.224044 | 165 | 0.617721 | false | 3.43445 | false | false | false |
linyc74/CaMNIST | view.py | 1 | 12377 | import numpy as np
import cv2, time, sys, threading, json, os
from PyQt4 import QtCore, QtGui
from controller import *
class CamnistGUI(QtGui.QMainWindow):
def __init__(self, controller_obj):
super(CamnistGUI, self).__init__()
self.controller = controller_obj
pkg_dir = os.path.dirname(__... | mit | 6,695,720,950,841,457,000 | 32.271505 | 95 | 0.586329 | false | 3.997739 | false | false | false |
google-research/google-research | poem/core/keypoint_profiles.py | 1 | 48752 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 | 7,232,078,692,394,039,000 | 41.027586 | 80 | 0.556059 | false | 3.58708 | false | false | false |
stilobique/UE4-Tools | controllers/data_buffer.py | 1 | 3448 | import bpy
import pyperclip
from math import degrees
class DataBuffer(bpy.types.Operator):
"""Export data Position, Rotation and Scale of all selected element"""
bl_idname = "object.data_buffer"
bl_label = "Paste information buffer"
def execute(self, context):
objs = context.selected_objects... | gpl-3.0 | -6,769,097,919,469,354,000 | 37.322222 | 114 | 0.49739 | false | 4.099881 | false | false | false |
posquit0/dotfiles | vim/.vim/ycm_extra_conf.py | 1 | 6657 | # This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either... | mit | -7,185,472,345,298,154,000 | 32.964286 | 107 | 0.705122 | false | 3.55609 | true | false | false |
AceSrc/datagon | datagon/generator/translator.py | 1 | 3802 | import parser
import random
result = ''
symbol = {}
cnt = 0
def Translator(ast):
def PrintError(x):
print(x)
exit(1)
def PrintMsg(x):
print(x)
def Output(x):
global result
result += str(x) + ' '
def GetRandomInt(interval):
if isinstance(interval, str)... | mit | 9,119,672,105,469,806,000 | 29.66129 | 111 | 0.553919 | false | 3.779324 | false | false | false |
sesh/djver | djver/djver.py | 1 | 6137 | #!/usr/bin/env python
"""
djver.
Usage:
djver.py [<url>] [--static-path=<static-path>] [--find-diffs] [--verbose]
Options:
--static-path=<static-path> URL path to the site's static files [default: /static/].
--find-diffs Attempt to find differences between the known versions of Django
... | mit | 6,160,630,217,541,258,000 | 31.994624 | 131 | 0.536093 | false | 3.455518 | false | false | false |
pythonbyexample/PBE | dbe/classviews/edit_custom.py | 1 | 5732 | from django.forms import formsets
from django.contrib import messages
from django.db.models import Q
from detail import *
from edit import *
from dbe.shared.utils import *
class SearchFormViewMixin(BaseFormView):
ignore_get_keys = ["page"]
def get_form_kwargs(self):
""" Returns the keyword arguments... | bsd-3-clause | -6,290,611,191,496,170,000 | 32.325581 | 112 | 0.629449 | false | 3.834114 | false | false | false |
CINPLA/expipe-dev | expipe-templates-cinpla/get_templates.py | 1 | 1153 | import expipe
import os.path as op
import os
import json
overwrite = True
base_dir = op.join(op.abspath(op.dirname(op.expanduser(__file__))), 'templates')
templates = expipe.core.FirebaseBackend("/templates").get()
for template, val in templates.items():
identifier = val.get('identifier')
if identifier is No... | gpl-3.0 | -6,103,008,432,294,853,000 | 33.939394 | 80 | 0.611448 | false | 3.743506 | false | false | false |
prontodev/stillwithus | stillwithus/clientsites/tests.py | 1 | 6014 | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from .models import ClientSite
from servers.models import Server
class ClientSiteTest(TestCase):
def test_create_new_clientsite(self):
clientsite = ClientSite()
clientsite.dom... | mit | -631,185,773,679,272,400 | 37.305732 | 78 | 0.618557 | false | 3.490424 | true | false | false |
MMohan1/dwitter | dwitter_app/models.py | 1 | 1342 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
import hashlib
class Dweet(models.Model):
content = models.CharField(max_length=140)
user = models.ForeignKey(User)
creation_date = models.DateTimeField(auto_now=True, ... | mit | 5,100,131,809,558,829,000 | 28.822222 | 98 | 0.716095 | false | 3.569149 | false | false | false |
opensemanticsearch/open-semantic-etl | src/opensemanticetl/enhance_extract_law.py | 1 | 5028 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import etl_plugin_core
#
# get taxonomy for aggregated facets / filters
#
# example: '§ 153 Abs. 1 Satz 2' -> ['§ 153', '§ 153 Absatz 1', '§ 153 Absatz 1 Satz 2']
# todo:
def get_taxonomy(law_clause, law_code = None):
law_clauses = [law_clause]
ret... | gpl-3.0 | -8,537,179,740,462,621,000 | 32.657718 | 147 | 0.498504 | false | 3.701107 | false | false | false |
LeonidasAntoniou/dk-plus | test files/beacon.py | 1 | 1799 | """
A simple program that sends/listens broadcast packets through UDP socket
Used to test the system if it is able to send/receive packets
"""
import time, math, sys, socket, threading, select, uuid
from collections import namedtuple
import cPickle as pickle
from params import Params
MAX_STAY = 5 #seconds until entry... | gpl-3.0 | -9,053,915,557,494,988,000 | 25.850746 | 81 | 0.699277 | false | 3.101724 | false | false | false |
afb/0install | zeroinstall/injector/handler.py | 1 | 9160 | """
Integrates download callbacks with an external mainloop.
While things are being downloaded, Zero Install returns control to your program.
Your mainloop is responsible for monitoring the state of the downloads and notifying
Zero Install when they are complete.
To do this, you supply a L{Handler} to the L{policy}.
"... | lgpl-2.1 | 4,241,712,712,980,864,500 | 31.253521 | 125 | 0.69083 | false | 3.199441 | false | false | false |
OpenDroneMap/WebODM | app/api/common.py | 1 | 1763 | from django.core.exceptions import ObjectDoesNotExist, SuspiciousFileOperation
from rest_framework import exceptions
import os
from app import models
def get_and_check_project(request, project_pk, perms=('view_project',)):
"""
Django comes with a standard `model level` permission system. You can
check whe... | mpl-2.0 | 4,351,260,022,897,503,700 | 40.023256 | 92 | 0.724334 | false | 4.197619 | false | false | false |
zlcnup/csmath | hw4_lm/lm.py | 1 | 2784 | # -*- coding: utf-8 -*-
#!/usr/bin/enzl_v python
from pylab import *
from numpy import *
from math import *
def data_generator(N):
#生成向量函数F:ai*exp(bi*x)的系数数组
zl_mean = [3.4,4.5]
zl_cozl_v = [[1,0],[0,10]]
zl_coff = np.random.multivariate_normal(zl_mean,zl_cozl_v,N)
#生成观测值向量y
x = np.random.unif... | mit | -685,786,909,710,917,200 | 28.573034 | 124 | 0.518237 | false | 2.270923 | false | false | false |
atizo/pygobject | ltihooks.py | 1 | 2327 | # -*- Mode: Python; py-indent-offset: 4 -*-
# ltihooks.py: python import hooks that understand libtool libraries.
# Copyright (C) 2000 James Henstridge.
#
# 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 Fou... | lgpl-2.1 | -552,883,266,822,510,400 | 37.783333 | 75 | 0.593468 | false | 4.032929 | false | false | false |
eBay/cronus-agent | agent/agent/lib/agent_thread/deactivate_manifest.py | 1 | 5040 | #pylint: disable=W0703,R0912,R0915,R0904,W0105
'''
Copyright 2014 eBay Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless req... | apache-2.0 | 1,921,334,820,953,624,800 | 38.069767 | 153 | 0.639286 | false | 4.405594 | false | false | false |
cizixs/tftp | tftp/tftp_client.py | 1 | 7600 | import sys
import struct
import binascii
import argparse
import tftp
from tftp import SocketBase
from tftp import get_opcode
from tftp import default_port
from tftp import make_data_packet
from tftp import make_ack_packet
class State(object):
START, DATA = range(2)
# Make packet functions.
def make_request_pa... | mit | -6,937,391,200,844,491,000 | 31.340426 | 83 | 0.550526 | false | 3.830645 | false | false | false |
mduggan/toumeika | shikin/review.py | 1 | 4611 | # -*- coding: utf-8 -*-
"""
Shikin review page and associated API
"""
from sqlalchemy import func
import datetime
import random
from flask import render_template, abort, request, jsonify, session
from . import app, ocrfix
from .model import DocSegment, DocSegmentReview, User
from .util import dologin
def get_user_o... | bsd-2-clause | 2,451,348,942,650,668,500 | 27.81875 | 114 | 0.605942 | false | 3.402952 | false | false | false |
falkTX/Cadence | src/systray.py | 1 | 23718 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# KDE, App-Indicator or Qt Systray
# Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; e... | gpl-2.0 | 3,553,723,061,951,008,000 | 33.624818 | 130 | 0.548571 | false | 3.674361 | false | false | false |
Griffiths117/TG-s-IRC | client/IRClient.py | 1 | 4985 | import socket, _thread, tkinter as tk, tkinter.ttk as ttk
from time import strftime, sleep
from tkinter import messagebox, simpledialog
#===========================================================================#
class BasicInputDialog:
def __init__(self,question,title=None,hideWindow=True):
if title == ... | mit | -6,780,789,818,688,822,000 | 29.956522 | 141 | 0.595907 | false | 3.632653 | false | false | false |
TraceContext/tracecontext-spec | test/server.py | 1 | 3239 | from aiohttp import ClientSession, ClientTimeout, ContentTypeError, web
from multidict import MultiDict
class AsyncTestServer(object):
scopes = {}
def __init__(self, host, port, timeout = 5):
self.host = host
self.port = port
self.timeout = ClientTimeout(total = timeout)
self.app = web.Application()
self.... | apache-2.0 | -567,431,452,355,279,040 | 27.663717 | 82 | 0.661624 | false | 3.138566 | false | false | false |
kichkasch/pisi | pisiconstants.py | 1 | 4235 | """
Module for definition of shared constants between the modules.
This file is part of Pisi.
Pisi 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 ... | gpl-3.0 | -7,278,563,369,972,107,000 | 48.244186 | 178 | 0.756789 | false | 3.885321 | false | false | false |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/openmdao.main-0.13.0-py2.7.egg/openmdao/main/test/test_scaler_adder_example.py | 1 | 5419 | """ Tests the scaler/adder example in our docs. This test was inconvenient to test
in its place in the docs. """
# pylint: disable-msg=C0111,C0103
import unittest
from openmdao.lib.datatypes.api import Float
from openmdao.lib.drivers.api import SLSQPdriver
from openmdao.main.api import Assembly,Component
from openmda... | gpl-2.0 | -6,789,788,535,626,708,000 | 33.737179 | 114 | 0.60823 | false | 3.314373 | true | false | false |
ruuk/service.xbmc.tts | enabler.py | 1 | 3477 | # -*- coding: utf-8 -*-
import os, sys, xbmc, xbmcaddon
DISABLE_PATH = os.path.join(xbmc.translatePath('special://profile').decode('utf-8'), 'addon_data', 'service.xbmc.tts', 'DISABLED')
ENABLE_PATH = os.path.join(xbmc.translatePath('special://profile').decode('utf-8'), 'addon_data', 'service.xbmc.tts', 'ENABLED')
de... | gpl-2.0 | 9,017,643,453,152,437,000 | 32.12381 | 187 | 0.625252 | false | 3.494472 | false | false | false |
uclouvain/osis | base/models/session_exam_deadline.py | 1 | 4136 | ##############################################################################
#
# 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 | -3,591,662,348,334,433,300 | 42.072917 | 117 | 0.685127 | false | 3.897267 | false | false | false |
mabhub/Geotrek | geotrek/settings/base.py | 1 | 17906 | import os
import sys
from django.contrib.messages import constants as messages
from geotrek import __version__
from . import PROJECT_ROOT_PATH
def gettext_noop(s):
return s
DEBUG = False
TEMPLATE_DEBUG = DEBUG
TEST = 'test' in sys.argv
VERSION = __version__
ADMINS = (
('Makina Corpus', 'geobi@makina-corp... | bsd-2-clause | -7,784,692,578,393,617,000 | 30.414035 | 108 | 0.631744 | false | 3.229798 | true | false | false |
sojournexx/python | Assignments/TanAndrew_assign6.py | 1 | 5318 | #Andrew Tan, 3/25, Section 010
import myfunctions
import random
#Ask user for inputs and check validity
while True:
qns = int(input("How many problems would you like to attempt? "))
if qns <= 0:
print("Invalid number, try again\n")
continue
else:
break
while True:
... | mit | -6,892,856,213,811,609,000 | 28.045198 | 223 | 0.511847 | false | 3.924723 | false | false | false |
FEniCS/dolfin | demo/undocumented/adaptive-poisson/python/demo_adaptive-poisson.py | 1 | 2889 | """This demo program solves Poisson's equation
- div grad u(x, y) = f(x, y)
on the unit square with source f given by
f(x, y) = exp(-100(x^2 + y^2))
and homogeneous Dirichlet boundary conditions.
Note that we use a simplified error indicator, ignoring
edge (jump) terms and the size of the interpolation con... | lgpl-3.0 | -1,866,448,215,433,288,200 | 29.410526 | 87 | 0.661821 | false | 3.324511 | false | false | false |
theintencity/flash-videoio | examples/django-apps/project/experts/models.py | 1 | 3541 | import datetime
from google.appengine.api import users
from google.appengine.ext import db
class User(db.Model):
name = db.StringProperty('Full Name')
account = db.UserProperty()
phone_number = db.PhoneNumberProperty('Phone Number')
address = db.PostalAddressProperty('Postal Address')
website = db.... | lgpl-3.0 | -634,891,817,617,899,600 | 36.680851 | 153 | 0.672409 | false | 3.78312 | false | false | false |
thesilencelies/SonnetConvs | InceptionModule.py | 1 | 1790 | #implimentation of the standard inceptionnet v3 inception module in sonnet
import tensorflow as tf
import sonnet as snt
class InceptionModule(snt.AbstractModule):
def __init__(self, output_channels, name="inception_module"):
super(InceptionModule, self).__init__(name=name)
self._output_channels = output_cha... | apache-2.0 | -6,797,985,732,095,887,000 | 43.75 | 81 | 0.632961 | false | 3.429119 | false | false | false |
YutingZhang/lmdis-rep | exp-ae-aflw-30.py | 1 | 2231 | import tensorflow as tf
import os
import sys
from copy import copy
from model.pipeline import Pipeline
from tensorflow.python import debug as tf_debug
if __name__ == "__main__":
num_keypoints = 30
patch_feature_dim = 8
decoding_levels = 5
kp_transform_loss = 1e4
recon_weight = 0.001
learni... | apache-2.0 | -6,170,820,400,219,724,000 | 32.298507 | 121 | 0.618557 | false | 3.390578 | false | true | false |
q14035/pimouse_ros | scripts/motors2.py | 1 | 2178 | #!/usr/bin/env python
#encoding: utf8
import sys, rospy, math
from pimouse_ros.msg import MotorFreqs
from geometry_msgs.msg import Twist
from std_srvs.srv import Trigger, TriggerResponse
class Motor():
def __init__(self):
if not self.set_power(False): sys.exit(1)
rospy.on_shutdown(self.set_power)
self.sub_raw ... | gpl-3.0 | 1,233,239,839,957,850,400 | 29.676056 | 87 | 0.674472 | false | 2.574468 | false | false | false |
antoinecarme/pyaf | tests/perf/test_ozone_debug_perf.py | 1 | 1566 | import pandas as pd
import numpy as np
# from memory_profiler import profile
# from memprof import *
import pyaf.ForecastEngine as autof
import pyaf.Bench.TS_datasets as tsds
#get_ipython().magic('matplotlib inline')
# @memprof
def test_ozone_debug_perf():
b1 = tsds.load_ozone()
df = b1.mPastData
# df... | bsd-3-clause | 6,925,707,315,643,373,000 | 25.1 | 87 | 0.664112 | false | 2.89464 | false | false | false |
assamite/TwatBot | tweets/reasoning.py | 1 | 4674 | '''
.. py:module:: reasoning
:platform: Unix
Reasoning object for the tweets.
'''
import logging
import traceback
logger = logging.getLogger('tweets.default')
class Reasoning():
'''Reasoning for the tweets.
Class is used to hold information about the tweet's construction, and contains
few u... | mit | 2,346,785,769,061,129,700 | 34.409091 | 104 | 0.545999 | false | 4.485605 | false | false | false |
swarna-k/MyDiary | app/models.py | 1 | 1566 | from app import db
from werkzeug import generate_password_hash, check_password_hash
class User(db.Model):
id = db.Column(db.Integer, primary_key = True)
firstname = db.Column(db.String(100))
lastname = db.Column(db.String(100))
email = db.Column(db.String(120), unique=True)
pwdhash = db.Column(db.String(5... | bsd-3-clause | 1,779,423,689,113,203,200 | 29.705882 | 75 | 0.65645 | false | 3.303797 | false | false | false |
omarkadry/rsa_algorithm | RSA.py | 1 | 5283 | #!/usr/bin/python
#Algoriths Project Part 1a
#Omar Kadry
#CMSC 441
#Dr. Marron
#IMPLEMENTATION NOTES
#Python's built in pow function uses Binary Exponentiation and reducing modulo n to compute modular
#exponentiation. This is the same algorithm as MODULAR-EXPONENTIATION(a,b,n) as used in the text
#For large number mutl... | mit | 2,305,337,433,324,493,600 | 33.305195 | 633 | 0.769071 | false | 2.381876 | false | false | false |
mprat/learningjulia | nbconvert_config.py | 1 | 7416 | from nbconvert.preprocessors import ExecutePreprocessor, Preprocessor
import numpy as np
def jekyllurl(path):
"""
Take the filepath of an image output by the ExportOutputProcessor
and convert it into a URL we can use with Jekyll
"""
return path.replace("../..", "")
def svg_filter(svg_xml):
"... | mit | -4,977,311,403,519,195,000 | 38.238095 | 132 | 0.551106 | false | 4.175676 | false | false | false |
KmolYuan/pyslvs | test/test_core.py | 1 | 3764 | # -*- coding: utf-8 -*-
"""Pyslvs core module test."""
__author__ = "Yuan Chang"
__copyright__ = "Copyright (C) 2016-2021"
__license__ = "AGPL"
__email__ = "pyslvs@gmail.com"
from math import sqrt, radians
from pyslvs import (
Coord, SolverSystem, pxy, ppp, plap, pllp, plpp, palp, expr_solving,
t_config, par... | agpl-3.0 | -3,383,056,336,825,432,600 | 33.53211 | 80 | 0.582359 | false | 3.328028 | true | false | false |
bubbleboy14/cantools | cantools/scripts/index.py | 1 | 8655 | """
### Usage: ctindex [--mode=MODE] [--domain=DOMAIN] [--port=PORT] [--skip=SKIP]
### Options:
-h, --help show this help message and exit
-m MODE, --mode=MODE may be: 'refcount' (default - count up all foreignkey
references for sort orders and such); 'index' (assign
... | mit | -251,470,952,256,595,680 | 37.300885 | 118 | 0.645407 | false | 3.305959 | false | false | false |
mpeuster/son-emu | src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py | 1 | 16828 | # Copyright (c) 2015 SONATA-NFV and Paderborn University
# 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 re... | apache-2.0 | -1,443,519,102,164,560,100 | 35.822757 | 120 | 0.455253 | false | 4 | false | false | false |
arpadpe/plover | plover/machine/keyboard.py | 1 | 4230 | # Copyright (c) 2010 Joshua Harlan Lifton.
# See LICENSE.txt for details.
"For use with a computer keyboard (preferably NKRO) as a steno machine."
from plover.machine.base import StenotypeBase
from plover.oslayer.keyboardcontrol import KeyboardCapture
class Keyboard(StenotypeBase):
"""Standard stenotype interfa... | gpl-2.0 | -4,720,774,508,469,126,000 | 35.153846 | 86 | 0.591253 | false | 3.960674 | false | false | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/nose-0.10.1-py2.5.egg/nose/plugins/isolate.py | 1 | 3674 | """Use the isolation plugin with --with-isolation or the
NOSE_WITH_ISOLATION environment variable to clean sys.modules after
each test module is loaded and executed.
The isolation module is in effect similar to wrapping the following
functions around the import and execution of each test module::
def setup(module... | bsd-3-clause | -7,653,814,076,835,601,000 | 36.489796 | 76 | 0.67828 | false | 4.431846 | true | false | false |
graik/labhamster | labhamster/admin.py | 1 | 12409 | ## Copyright 2016 - 2018 Raik Gruenberg
## This file is part of the LabHamster project (https://github.com/graik/labhamster).
## LabHamster is released under the MIT open source license, which you can find
## along with this project (LICENSE) or at <https://opensource.org/licenses/MIT>.
from __future__ import unicode... | mit | 5,380,798,477,713,165,000 | 34.864162 | 128 | 0.539608 | false | 4.361687 | false | false | false |
wa3l/mailr | email_model.py | 1 | 1590 | from flask.ext.sqlalchemy import SQLAlchemy
import html2text as convert
import time
db = SQLAlchemy()
class Email(db.Model):
"""
Email model
Store emails going through the app in a database.
"""
id = db.Column(db.Integer, primary_key=True)
to_email = db.Column(db.String(254))
to_name ... | mit | -104,383,001,852,401,000 | 28.444444 | 74 | 0.583648 | false | 3.319415 | false | false | false |
juju/juju-gui-charm | hooks/charmhelpers/core/templating.py | 1 | 3186 | # Copyright 2014-2015 Canonical Limited.
#
# This file is part of charm-helpers.
#
# charm-helpers is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
#
# charm-helpers is distributed in the hope ... | agpl-3.0 | -3,079,095,182,892,421,000 | 38.333333 | 84 | 0.677652 | false | 4.231076 | false | false | false |
nkalodimas/invenio | modules/bibupload/lib/bibupload.py | 1 | 143104 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 CERN.
##
## Invenio 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 ... | gpl-2.0 | 413,680,829,889,584,100 | 48.092281 | 287 | 0.555743 | false | 4.103105 | false | false | false |
kivy/plyer | plyer/facades/wifi.py | 1 | 4169 | '''
Wifi Facade.
=============
The :class:`Wifi` is to provide access to the wifi of your mobile/ desktop
devices.
It currently supports `connecting`, `disconnecting`, `scanning`, `getting
available wifi network list` and `getting network information`.
Simple examples
---------------
To enable/ turn on wifi scannin... | mit | -8,623,485,429,783,333,000 | 21.294118 | 74 | 0.623411 | false | 4.284687 | false | false | false |
jakevdp/lombscargle | lombscargle/implementations/utils.py | 1 | 5934 | from __future__ import print_function, division
import numpy as np
try:
from scipy import special as scipy_special
except ImportError:
scipy_special = None
# Precomputed factorials
FACTORIALS = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800,
39916800, 479001600, 6227020800, 8717829120... | bsd-3-clause | 7,082,537,745,301,977,000 | 30.903226 | 79 | 0.582406 | false | 3.333708 | false | false | false |
17zuoye/luigi | luigi/contrib/hdfs/snakebite_client.py | 1 | 10933 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -2,731,325,352,027,294,000 | 38.90146 | 120 | 0.60697 | false | 4.171309 | true | false | false |
a25kk/biobee | docs/conf.py | 1 | 5997 | # -*- coding: utf-8 -*-
# Build configuration file.
# This file is execfile()d with the current directory set to its
# containing dir.
# Note that not all possible configuration values are present in this
# autogenerated file.
# All configuration values have a default; values that are commented out
# serve to show the ... | mit | -6,147,307,173,122,633,000 | 31.770492 | 79 | 0.711689 | false | 3.771698 | true | false | false |
jonathanstrong/functor | setup.py | 1 | 1091 | #!/usr/bin/env python
# Bootstrap installation of Distribute
import distribute_setup
distribute_setup.use_setuptools()
import os
from setuptools import setup
PROJECT = u'Functor'
VERSION = '0.1'
URL = ''
AUTHOR = u'Jonathan Strong'
AUTHOR_EMAIL = u'jonathan.strong@gmail.com'
DESC = "Implements a function-object pa... | mit | 4,604,809,639,414,675,000 | 20.82 | 63 | 0.628781 | false | 3.519355 | false | false | false |
fusic-com/flask-webcache | tests/test_storage.py | 1 | 12927 | from __future__ import unicode_literals
import unittest
from datetime import timedelta, datetime
from six.moves.cPickle import dumps, loads
from six import iteritems
from flask import Flask, send_file
from werkzeug.wrappers import Response
from werkzeug.datastructures import HeaderSet
from werkzeug.contrib.cache impor... | mit | -3,667,972,195,193,208,300 | 45.003559 | 117 | 0.61886 | false | 3.773205 | true | false | false |
eroicaleo/LearningPython | interview/leet/124_Binary_Tree_Maximum_Path_Sum.py | 1 | 1054 | #!/usr/bin/env python
from tree import *
class Solution:
def maxPathSum(self, root):
"""
:type root: TreeNode
:rtype: int
"""
if root == None:
return 0
self.maxSum = root.val
self.maxPathSumNode(root)
return self.maxSum
def maxPathSu... | mit | -2,902,822,416,752,697,000 | 30 | 118 | 0.598672 | false | 3.020057 | false | false | false |
niklasf/python-prompt-toolkit | prompt_toolkit/layout/utils.py | 1 | 2590 | from __future__ import unicode_literals
from prompt_toolkit.utils import get_cwidth
__all__ = (
'token_list_len',
'token_list_width',
'token_list_to_text',
'explode_tokens',
'find_window_for_buffer_name',
)
def token_list_len(tokenlist):
"""
Return the amount of characters in this token ... | bsd-3-clause | 693,291,599,595,765,100 | 23.205607 | 80 | 0.602317 | false | 3.894737 | false | false | false |
devbitstudio/portfolio | settings.py | 1 | 5950 | # Django settings for devbitstudio project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DOMAIN = 'devbitstudio.com'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
#~ DEFAULT_FROM_EMAIL = 'contact@devbitstudio.com'
SERVER_EMAIL = 'contact@devbitstudio.com'
EMAIL_SUBJECT_PREFIX = 'DevBitStudio - '
CURRENT_PATH = os.path... | mit | -7,184,461,981,706,605,000 | 32.806818 | 120 | 0.689412 | false | 3.573574 | false | false | false |
ChromeDevTools/devtools-frontend | scripts/deps/roll_deps.py | 2 | 2410 | #!/usr/bin/env vpython
#
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Update manually maintained dependencies from Chromium.
"""
import argparse
import os
import shutil
import subprocess
import sys
... | bsd-3-clause | 2,989,384,766,150,173,000 | 36.076923 | 84 | 0.692946 | false | 3.347222 | false | false | false |
google/makani | avionics/motor/motor_client.py | 1 | 50178 | #!/usr/bin/python
# Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | -5,446,123,190,470,756,000 | 35.626277 | 103 | 0.645343 | false | 3.509442 | false | false | false |
JarbasAI/JarbasAI | jarbas_models/tf_tacotron/models/modules.py | 1 | 3455 | import tensorflow as tf
from tensorflow.contrib.rnn import GRUCell
def prenet(inputs, is_training, layer_sizes=[256, 128], scope=None):
x = inputs
drop_rate = 0.5 if is_training else 0.0
with tf.variable_scope(scope or 'prenet'):
for i, size in enumerate(layer_sizes):
dense = tf.layers... | gpl-3.0 | 2,314,599,216,257,785,300 | 31.28972 | 100 | 0.541245 | false | 3.767721 | false | false | false |
zhangg/trove | trove/guestagent/datastore/mysql/service.py | 1 | 3685 | # Copyright 2013 OpenStack Foundation
# Copyright 2013 Rackspace Hosting
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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 co... | apache-2.0 | -3,997,285,619,942,811,600 | 33.764151 | 78 | 0.612212 | false | 3.907741 | false | false | false |
mikemintz/neutron | modules/iq.py | 1 | 4752 | # -*- coding: koi8-r -*-
## OJAB iq module
## Copyright (C) Boris Kotov <admin@avoozl.ru>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your op... | gpl-2.0 | -6,113,828,099,328,659,000 | 39.271186 | 195 | 0.62016 | false | 2.915337 | false | false | false |
smurfix/pybble | pybble/cache/__init__.py | 1 | 1978 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division, unicode_literals
##
## This is part of Pybble, a WMS (Whatever Management System) based on
## Jinja2/Haml, Werkzeug, Flask, and Optimism.
##
## Pybble is Copyright © 2009-2014 by Matthias Urlichs <matthias@urlichs.de>,
## it is li... | gpl-3.0 | 7,012,280,615,499,374,000 | 24.960526 | 82 | 0.695895 | false | 3.116904 | false | false | false |
natj/bender | paper/figs/fig9.py | 1 | 4141 | import numpy as np
import math
from pylab import *
from palettable.wesanderson import Zissou_5 as wsZ
import matplotlib.ticker as mtick
from scipy.interpolate import interp1d
from scipy.interpolate import griddata
from scipy.signal import savgol_filter
def smooth(xx, yy):
yy = savgol_filter(yy, 7, 2)
np.cl... | mit | 426,456,998,150,507,200 | 23.358824 | 92 | 0.63632 | false | 2.155648 | false | false | false |
gaborvecsei/Color-Tracker | examples/tracking.py | 1 | 2306 | import argparse
from functools import partial
import cv2
import color_tracker
# You can determine these values with the HSVColorRangeDetector()
HSV_LOWER_VALUE = [155, 103, 82]
HSV_UPPER_VALUE = [178, 255, 255]
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("-low", "--low", nargs=3,... | mit | -4,765,477,397,888,369,000 | 34.476923 | 127 | 0.647008 | false | 3.737439 | false | false | false |
jefftc/changlab | Betsy/Betsy/modules/convert_simplevariantfile_to_matrix.py | 1 | 8224 | from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, in_data, out_attributes, user_options, num_cores,
out_filename):
from genomicode import filelib
from genomicode import SimpleVariant... | mit | 3,985,949,250,645,467,600 | 36.552511 | 79 | 0.508512 | false | 3.812703 | false | false | false |
dzorlu/sdc-segmentation | train.py | 1 | 4118 | import sys
import tensorflow as tf
from tensorflow.python.ops import math_ops
sys.path.append("slim/")
slim = tf.contrib.slim
TRAIN_DIR = "/tmp/tf"
class Trainer(object):
def __init__(self, nb_classes, optimizer, learning_rate):
self.nb_classes = nb_classes
# learning rate can be a placeholder tensor
... | mit | 8,798,008,712,275,257,000 | 41.453608 | 99 | 0.639631 | false | 3.830698 | false | false | false |
Aorjoa/aiyara-ceph-dash | .tox/flake8/lib/python2.7/site-packages/flake8/formatting/default.py | 1 | 2191 | """Default formatting class for Flake8."""
from flake8.formatting import base
class SimpleFormatter(base.BaseFormatter):
"""Simple abstraction for Default and Pylint formatter commonality.
Sub-classes of this need to define an ``error_format`` attribute in order
to succeed. The ``format`` method relies o... | bsd-2-clause | -733,534,517,707,735,400 | 26.3875 | 78 | 0.624829 | false | 4.181298 | false | false | false |
WisniewskiP/meson | install_meson.py | 1 | 3639 | #!/usr/bin/env python3
# Copyright 2013-2014 The Meson development team
# 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 | -5,287,735,341,432,281,000 | 35.029703 | 89 | 0.710085 | false | 3.004955 | false | false | false |
Gricha/django-empty | django-empty-auth/newproject/settings.py | 1 | 3305 | """
Django settings for newproject 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, ...)... | unlicense | 1,989,905,234,812,430,300 | 25.653226 | 75 | 0.722844 | false | 3.482613 | false | false | false |
SKIRT/PTS | magic/region/panda.py | 1 | 4117 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 | -4,254,293,722,206,895,000 | 30.661538 | 110 | 0.548105 | false | 4.609183 | false | false | false |
jor-/matrix-decomposition | setup.py | 1 | 2841 | # Copyright (C) 2017-2018 Joscha Reimer jor@informatik.uni-kiel.de
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later versi... | agpl-3.0 | -9,103,944,859,064,064,000 | 35.423077 | 246 | 0.699754 | false | 4.105491 | false | false | false |
bpsinc-native/src_third_party_libjingle_source_talk | PRESUBMIT.py | 2 | 5115 | # libjingle
# Copyright 2013 Google Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following dis... | bsd-3-clause | -1,188,175,575,473,091,600 | 43.094828 | 80 | 0.682502 | false | 3.886778 | false | false | false |
EvangelouSotiris/flightradiationcalc | main.py | 1 | 5469 | import time
import requests
##############################################################
############## REQUESTS MANAGEMENT/ LINKS ####################
##############################################################
headers = {'User-Agent' : 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52... | gpl-3.0 | -8,451,631,178,383,616,000 | 41.069231 | 135 | 0.588956 | false | 3.32462 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.