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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ecell/libmoleculizer | python-src/language_parser/moleculizer/moleculizerrules.py | 1 | 21379 | ###############################################################################
# Copyright (C) 2007, 2008, 2009 The Molecular Sciences Institute
# Original Author:
# Nathan Addy, Scientific Programmer Email: addy@molsci.org
# The Molecular Sciences Institute
#
##################################################... | gpl-2.0 | -8,921,513,987,681,306,000 | 36.245645 | 189 | 0.658263 | false | 4.037583 | false | false | false |
nevermoreluo/privateoverseas | overseas/migrations/0001_initial.py | 1 | 3314 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-05 02:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | gpl-3.0 | -9,114,533,386,148,599,000 | 44.39726 | 124 | 0.573929 | false | 4.287193 | false | false | false |
zstackio/zstack-woodpecker | integrationtest/vm/mini/paths/path54.py | 1 | 2373 | import zstackwoodpecker.test_state as ts_header
import os
TestAction = ts_header.TestAction
def path():
return dict(initial_formation="template5", path_list=[
[TestAction.add_image, 'image1', 'root', os.environ.get('isoForVmUrl')],
[TestAction.create_vm_by_image, 'image1', 'iso', 'vm1'],
[TestAction.create_v... | apache-2.0 | -4,760,517,556,792,538,000 | 39.220339 | 104 | 0.686473 | false | 2.616318 | true | false | false |
v6ak/qubes-core-admin | core/storage/__init__.py | 2 | 15124 | #!/usr/bin/python2
#
# The Qubes OS Project, http://www.qubes-os.org
#
# Copyright (C) 2013 Marek Marczykowski <marmarek@invisiblethingslab.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... | gpl-2.0 | 4,979,779,882,463,710,000 | 32.910314 | 91 | 0.583047 | false | 3.872983 | true | false | false |
eloquence/unisubs | apps/teams/models.py | 1 | 128528 | # Amara, universalsubtitles.org
#
# Copyright (C) 2013 Participatory Culture Foundation
#
# 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 op... | agpl-3.0 | -5,704,561,719,830,586,000 | 36.958653 | 232 | 0.608513 | false | 4.212928 | false | false | false |
codedsk/hubcheck | hubcheck/pageobjects/po_time_overview_page.py | 1 | 1349 | from hubcheck.pageobjects.po_time_base_page import TimeBasePage
from hubcheck.pageobjects.basepageelement import Link
class TimeOverviewPage(TimeBasePage):
"""time overview page"""
def __init__(self,browser,catalog,groupid=None):
super(TimeOverviewPage,self).__init__(browser,catalog)
self.path... | mit | 2,818,290,263,119,417,000 | 28.977778 | 80 | 0.673091 | false | 3.768156 | false | false | false |
madeso/prettygood | dotnet/Tagger/TagValidator.py | 1 | 2567 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MusicBrainz;
using PrettyGood.Util;
namespace Tagger
{
class TagValidator
{
public bool validate(IdTag tag)
{
Artist artist = null;
if (string.IsNullOrEmpty(tag.Artist) == false)... | mit | -570,241,561,569,758,850 | 27.186813 | 96 | 0.475244 | false | 4.47644 | false | false | false |
clasnake/recommender | similarity.py | 1 | 6369 | from __future__ import division
from math import sqrt
def sim_distance(prefs, item1, item2):
#get the list of shared items
si = {};
for item in prefs[item1]:
if item in prefs[item2]:
si[item] = 1;
#if they have no shared items,return 0;
if len(si) == 0: return 0;
#Add the s... | mit | 2,447,981,508,787,601,000 | 27.560538 | 107 | 0.566808 | false | 3.040095 | false | false | false |
fossdevil/Assignments | Machine Learning/Assignment3Final/ML4.py | 1 | 3746 | import numpy as np
import scipy
import matplotlib.pyplot as plt
import random
# N points in d dimensions
def generatePoints(n,d):
points = []
for i in range(0,n):
point = np.random.normal(0,1,d);
p = point**2;
den = np.sqrt(sum(p));
point = list(point/den);
points.append... | mit | 5,465,868,872,613,046,000 | 26.544118 | 82 | 0.652429 | false | 2.77071 | false | false | false |
4383/street-workout-database | sport/web/commons/templatetags/common_tags.py | 1 | 3392 | __author__ = 'herve.beraud'
from datetime import datetime, timedelta
from django import template
from django.core.exceptions import ObjectDoesNotExist
from django.conf import settings
from django.utils.timesince import timesince
from community.models import InformationMessage
from exercises.models import Category
fr... | gpl-2.0 | 5,402,247,503,451,819,000 | 29.558559 | 120 | 0.680425 | false | 3.916859 | false | false | false |
openprocurement/openprocurement.auctions.dgf | openprocurement/auctions/dgf/views/other/question.py | 1 | 3280 | # -*- coding: utf-8 -*-
from openprocurement.auctions.core.utils import (
apply_patch,
context_unpack,
get_now,
json_view,
opresource,
save_auction,
)
from openprocurement.auctions.core.validation import (
validate_question_data,
validate_patch_question_data,
)
from openprocurement.aucti... | apache-2.0 | -685,575,204,288,687,500 | 51.063492 | 141 | 0.651829 | false | 3.995128 | false | false | false |
tommy-u/chaco | chaco/multi_line_plot.py | 1 | 16640 | """ Defines the MultiLinePlot class.
"""
from __future__ import with_statement
# Standard library imports
import warnings
from math import ceil, floor
# Major library imports
import numpy as np
from numpy import argsort, array, invert, isnan, take, transpose
# Enthought library imports
from enable.api import black_... | bsd-3-clause | -2,342,800,567,750,205,400 | 34.031579 | 134 | 0.534796 | false | 4.275437 | false | false | false |
pylover/network-interfaces | network_interfaces/stanza.py | 1 | 4473 | # -*- coding: utf-8 -*-
import re
from .helpers import clean_list, list_hash
__author__ = 'vahid'
class Stanza(object):
_type = None
_filename = None
_headers = None
def __init__(self, filename, *headers):
self._filename = filename
self._headers = list(headers)
def __repr__(sel... | gpl-3.0 | -2,740,219,951,952,730,600 | 27.673077 | 84 | 0.521127 | false | 4.066364 | false | false | false |
regardscitoyens/twitter-parlementaires | download_twitter.py | 1 | 1413 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os, json
from twitter import Twitter, OAuth
from twitterconfig import KEY, SECRET, OAUTH_TOKEN, OAUTH_SECRET
if len(sys.argv) < 3:
sys.stderr.write("Please input both Twitter list's owner_screen_name and slug\n")
exit(1)
LIST_USER, LIST_ID = sys.argv[... | agpl-3.0 | -6,752,805,189,565,542,000 | 29.717391 | 134 | 0.602265 | false | 3.025696 | false | false | false |
senser/xmppBot | ZenPacks/community/xmppBot/Jabber/plugins/setjid.py | 1 | 4107 | """Check if the sender is a valid zenoss admin. For access control"""
from Jabber.Plugins import Plugin
from Jabber.ZenAdapter import ZenAdapter
from Jabber.Options import Options
from optparse import OptionError
import transaction
class SetJid(Plugin):
name = 'mapuser'
capabilities = ['setjid', 'mapuser', ... | gpl-2.0 | -3,075,416,412,988,753,400 | 45.146067 | 267 | 0.582177 | false | 4.359873 | false | false | false |
daymer/xWIKI_Karma | CustomModules/mysql-connector-python-2.1.7/lib/cpy_distutils.py | 1 | 24414 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... | apache-2.0 | -3,967,664,341,499,863,600 | 35.712782 | 84 | 0.560908 | false | 3.964599 | true | false | false |
thorwhalen/ut | ml/skwrap/feature_extraction/dict_vectorizer.py | 1 | 7588 |
__author__ = 'thor'
from sklearn.feature_extraction import DictVectorizer
from sklearn.externals import six
import numpy as np
from pandas import DataFrame
from collections import Counter
class IterDictVectorizer(DictVectorizer):
"""Transforms lists of feature-value mappings or rows of a dataframe to vectors... | mit | 8,670,410,577,151,383,000 | 37.912821 | 123 | 0.599895 | false | 4.031881 | false | false | false |
pebble/spacel-provision | src/test/provision/orbit/test_provider.py | 1 | 1145 | from mock import MagicMock
from spacel.provision.orbit.provider import ProviderOrbitFactory
from test import BaseSpaceAppTest, ORBIT_REGION
TEST_PROVIDER = 'test'
class TestProviderOrbitFactory(BaseSpaceAppTest):
def setUp(self):
super(TestProviderOrbitFactory, self).setUp()
self.provider = Mag... | mit | 3,872,497,890,873,925,000 | 34.78125 | 78 | 0.638428 | false | 4.03169 | true | false | false |
tensorflow/addons | tensorflow_addons/image/dense_image_warp.py | 1 | 10213 | # Copyright 2019 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 | 6,193,261,979,639,195,000 | 41.202479 | 87 | 0.61784 | false | 3.840918 | false | false | false |
Lana-B/Pheno4T | madanalysis/layout/histogram_core.py | 1 | 2479 | ################################################################################
#
# Copyright (C) 2012-2013 Eric Conte, Benjamin Fuks
# The MadAnalysis development team, email: <ma5team@iphc.cnrs.fr>
#
# This file is part of MadAnalysis 5.
# Official website: <https://launchpad.net/madanalysis5>
#
# MadAnal... | gpl-3.0 | 4,464,193,754,576,342,000 | 27.494253 | 80 | 0.541751 | false | 3.837461 | false | false | false |
Pandaaaa906/ChemErpSystem | ERP/templatetags/erp_extras.py | 1 | 1616 | # -*- coding: utf-8 -*-
from django import template
from django.db.models.query import QuerySet
import datetime
from django import template
from django.contrib.auth.models import Group
from django.contrib.auth.models import User
from django.db.models import Q
register = template.Library()
@register.inclusion_tag('side... | apache-2.0 | 684,355,398,414,032,100 | 25.080645 | 66 | 0.667698 | false | 3.467811 | false | false | false |
rplevka/robottelo | tests/upgrades/test_repository.py | 1 | 9545 | """Test for Repository related Upgrade Scenarios
:Requirement: Upgraded Satellite
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: Repositories
:Assignee: tpapaioa
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import os
from fabric.api import execute
from fabric.api import run
... | gpl-3.0 | 6,445,310,977,398,865,000 | 35.996124 | 95 | 0.651545 | false | 3.811901 | true | false | false |
YevgeniyaK/python_training | fixture/group.py | 1 | 4957 | from model.group import Group
class GroupHelper:
def __init__(self, app):
self.app = app
def open_group_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0):
wd.find_element_by_link_text("groups").click()
... | apache-2.0 | -8,982,111,332,978,443,000 | 26.114943 | 100 | 0.569097 | false | 3.128647 | false | false | false |
patcorwin/fossil | pdil/tool/fossil/rigging/splineTwist.py | 1 | 24347 | from __future__ import absolute_import, division, print_function
from collections import OrderedDict
import math
from pymel.core import curve, cluster, delete, dt, duplicate, expression, group, hide, ikHandle, insertKnotCurve, joint, move, orientConstraint, parent, parentConstraint, pointConstraint, xform
from ....a... | bsd-3-clause | -3,334,268,302,058,666,000 | 37.341732 | 194 | 0.60759 | false | 3.658452 | false | false | false |
t00mas/datascience-python | classification/knearest.py | 1 | 1554 | import matplotlib
import matplotlib.pyplot as pyplot
import numpy
from matplotlib.colors import ListedColormap
from sklearn import neighbors, datasets
def get_iris_dataset():
iris = datasets.load_iris()
return iris.data[:, :2], iris.target
def get_knn_classifier(X, y, n_neighbors=None):
if not n_neighbo... | mit | 2,858,620,498,153,865,000 | 28.320755 | 80 | 0.63964 | false | 2.971319 | false | false | false |
arduino-org/s4t-iotronic | lib/test_pub.py | 1 | 2229 |
wampAddress = 'ws://172.17.3.139:8181/ws'
wampRealm = 's4t'
#from threading import Thread
from autobahn.twisted.wamp import ApplicationRunner
from autobahn.twisted.wamp import ApplicationSession
from twisted.internet.defer import inlineCallbacks
#import per test
from twisted.internet.defer import DeferredQueue
from... | apache-2.0 | -9,203,456,461,136,472,000 | 21.979381 | 77 | 0.746074 | false | 3.126227 | false | false | false |
pitunti/alfaPitunti | plugin.video.alfa/channels/tupornotv.py | 1 | 10715 | # -*- coding: utf-8 -*-
import re
import urlparse
from core import scrapertools
from core.item import Item
from platformcode import logger
def mainlist(item):
logger.info()
itemlist = []
itemlist.append(Item(channel=item.channel, title="Pendientes de Votación", action="novedades",
... | gpl-3.0 | 8,343,848,909,474,973,000 | 39.549242 | 167 | 0.567865 | false | 3.560027 | false | false | false |
designcc/django-ccbasket | ccbasket_testproject/shop/views.py | 1 | 1061 | # -*- coding: utf-8 -*-
import logging
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.template.response import TemplateResponse
from models import SimpleProduct, ComplexProduct
logger = logging.getLogger('ccbasket')
def home(request):
return render_to_respon... | bsd-3-clause | -8,419,915,165,657,524,000 | 26.921053 | 76 | 0.71065 | false | 4.278226 | false | false | false |
david-abel/simple_rl | simple_rl/tasks/maze_1d/Maze1DPOMDPClass.py | 1 | 2420 | # Python imports.
from collections import defaultdict
import random
# Other imports.
from simple_rl.pomdp.POMDPClass import POMDP
from simple_rl.tasks.maze_1d.Maze1DStateClass import Maze1DState
class Maze1DPOMDP(POMDP):
''' Class for a 1D Maze POMDP '''
ACTIONS = ['west', 'east']
OBSERVATIONS = ['nothin... | apache-2.0 | 2,584,774,365,799,531,000 | 35.666667 | 145 | 0.579752 | false | 3.543192 | false | false | false |
tenable/Tenable.io-SDK-for-Python | tenable_io/api/plugins.py | 1 | 1572 | from tenable_io.api.base import BaseApi
from tenable_io.api.models import PluginDetails, PluginFamilyDetails, PluginFamilyList
class PluginsApi(BaseApi):
def families(self, include_all=None):
"""Return list of plugin families.
:param include_all: Whether or not to include all plugins. Defaults t... | mit | 4,282,903,785,587,915,000 | 42.666667 | 104 | 0.67112 | false | 3.900744 | false | false | false |
anarchivist/pyflag | src/plugins/Flash/AdvancedCommands.py | 1 | 13927 | """ These Flash commands allow more sophisticated operations, most of
which may not be needed by most users. Some operations are
specifically designed for testing and have little use in practice.
"""
import pyflag.pyflagsh as pyflagsh
import pyflag.Registry as Registry
import pyflag.DB as DB
import fnmatch
import pyfla... | gpl-2.0 | -4,366,271,114,927,967,700 | 36.438172 | 178 | 0.575644 | false | 3.877227 | false | false | false |
mobarski/sandbox | parallel/p7cat.py | 1 | 1316 | ## p7cat.py - parallel concatenation
## (c) 2017 by mobarski (at) gmail (dot) com
## licence: MIT
## version: x1
from __future__ import print_function
import sys
import os
from multiprocessing import Process
from time import time
def write_part(path_in, path_out, offset, blocksize=4096):
fi = open(path_in,'rb')
fo ... | mit | -6,190,227,077,822,655,000 | 20.933333 | 75 | 0.647416 | false | 2.626747 | false | false | false |
stoq/stoqdrivers | docs/fiscal-driver-template.py | 1 | 5263 | #
# Stoqdrivers template driver
#
# Copyright (C) 2007 Async Open Source <http://www.async.com.br>
# All rights reserved
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the... | lgpl-2.1 | -2,792,795,015,464,589,300 | 27.737705 | 78 | 0.610953 | false | 3.969057 | false | false | false |
waheedahmed/edx-platform | openedx/core/djangoapps/api_admin/views.py | 1 | 9646 | """Views for API management."""
import logging
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.urlresolvers import reverse_lazy, reverse
from django.http.response import JsonResponse
from django.shortcuts import redirect
from django.utils.translation import... | agpl-3.0 | -1,986,569,222,691,623,200 | 40.222222 | 98 | 0.651669 | false | 4.16494 | false | false | false |
chfoo/fogchamp | util/csv2json.py | 1 | 4170 | '''Convert CSV files into JSON files needed for the visualizer page.'''
import argparse
import json
import os
import functools
from util.readers.addarash1 import AddarashReader
from util.readers.bulbapedia import BulbapediaReader
from util.readers.chfoo import ChfooReader
from util.readers.editornotes import EditorNote... | mit | -2,807,500,552,308,781,000 | 35.26087 | 86 | 0.642206 | false | 3.178354 | false | false | false |
vpelletier/neoppod | neo/lib/event.py | 1 | 9556 | #
# Copyright (C) 2006-2016 Nexedi SA
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed... | gpl-2.0 | 4,390,888,818,905,951,000 | 36.03876 | 80 | 0.57409 | false | 4.287124 | false | false | false |
AndKyr/GETELEC | python/JFplot.py | 1 | 1648 | #! /usr/bin/python
import numpy as np
import getelec_mod as gt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import matplotlib as mb
font = 30
# mb.rcParams["font.family"] = "Serif"
mb.rcParams["font.size"] = font
mb.rcParams["axes.labelsize"] = font
mb.rcParams["xtick.labelsize"] = font
mb.... | gpl-3.0 | -1,551,624,963,708,100,600 | 20.402597 | 83 | 0.586772 | false | 2.478195 | false | false | false |
goyal-sidd/BLT | website/models.py | 1 | 10857 | import os
from urlparse import urlparse
import requests
import tweepy
from PIL import Image
from annoying.fields import AutoOneToOneField
from colorthief import ColorThief
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.core.fi... | agpl-3.0 | 2,311,262,947,357,958,700 | 32.717391 | 112 | 0.634153 | false | 3.692857 | false | false | false |
mark-r-g/hydrus | tests/test_rapidclus.py | 1 | 1819 | # Mark Gatheman <markrg@protonmail.com>
#
# This file is part of Hydrus.
#
# Hydrus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... | gpl-3.0 | -8,838,705,027,626,463,000 | 35.38 | 80 | 0.671798 | false | 2.943366 | false | false | false |
labase/surdonews | src/surdonews/leao/main.py | 1 | 5477 | from jqueryui import jq
from browser import document, html
from superpython.virgem.main import Sala, Labirinto, Cena, INVENTARIO # importando do virgem
STYLE = dict(position="absolute", width=300, left=0, top=0, background="blue") # mudar cor do background lá embaixo
STYLE["min-height"] = "300px"
IMAGEM = "http://s1... | gpl-3.0 | -6,861,895,350,810,168,000 | 39.288889 | 182 | 0.633388 | false | 2.627536 | false | false | false |
levilucio/SyVOLT | GM2AUTOSAR_MM/transformation/HMapPartition.py | 1 | 3685 | from core.himesis import Himesis
import uuid
class HMapPartition(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the DSLTrans rule MapPartition.
"""
# Flag this instance as compiled now
self.is_compiled = True
super(HMapPa... | mit | 4,636,470,346,832,838,000 | 32.5 | 104 | 0.493623 | false | 3.962366 | false | false | false |
benpetty/Code-Katas | katas/sort_cards/sort_cards.py | 1 | 1347 | """Sort Cards.
https://www.codewars.com/kata/56f399b59821793533000683
Write a function sort_cards() that sorts a shuffled list of cards,
so that any given list of cards is sorted by rank,
no matter the starting collection.
All cards in the list are represented as strings,
so that sorted list of cards looks like this... | mit | 3,330,309,443,274,831,400 | 23.944444 | 76 | 0.513734 | false | 2.986696 | false | false | false |
karlnapf/kameleon-mcmc | kameleon_mcmc/tools/Visualise.py | 1 | 5656 | """
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Written (W) 2013 Heiko Strathmann
Written (W) 2013 Dino Sejdinovic
"""
fro... | bsd-2-clause | 31,964,555,859,623,480 | 33.072289 | 90 | 0.563296 | false | 3.793427 | false | false | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/add_newdocs.py | 1 | 44163 | from lib import add_newdoc
add_newdoc('numpy.core','dtype',
[('fields', "Fields of the data-type or None if no fields"),
('names', "Names of fields or None if no fields"),
('alignment', "Needed alignment for this data-type"),
('byteorder',
"Little-endian (<),... | bsd-3-clause | -6,906,141,212,455,126,000 | 29.797071 | 83 | 0.613206 | false | 4.158475 | false | false | false |
italomaia/turtle-linux | games/BubbleKing/lib/menu.py | 1 | 13774 | import os
import pygame
from pygame.locals import *
from pgu import engine
import data
from cnst import *
import levels
class Menu(engine.State):
def __init__(self,game):
self.game = game
def init(self):
self.font = self.game.font
self.bkgr = pygame.image.load(data.filepat... | gpl-3.0 | 2,693,359,161,638,019,000 | 29.074236 | 102 | 0.483665 | false | 3.370198 | false | false | false |
mathiasertl/fabric | fabric/context_managers.py | 1 | 20926 | """
Context managers for use with the ``with`` statement.
.. note:: If you are using multiple directly nested ``with`` statements, it can
be convenient to use multiple context expressions in one single with
statement. Instead of writing::
with cd('/path/to/app'):
with prefix('workon myvenv... | bsd-2-clause | -7,542,093,378,251,034,000 | 33.760797 | 91 | 0.632132 | false | 4.195269 | false | false | false |
LokiW/extendable-cards | extendable_cards/view/game_view.py | 1 | 6424 | from extendable_cards.view.graphics import Rectangle, Point, Text
from tkinter import Button
class GameOutline(object):
def __init__(self, window, dx, dy, w, h):
self.top_y = dy
self.bottom_y = dy+h
self.right_x = dx+w
self.left_x = dx
self.discard_end_x = dx + (w/6.0)
... | bsd-2-clause | 7,205,527,144,953,349,000 | 30.960199 | 103 | 0.538294 | false | 3.411577 | false | false | false |
google/tf-quant-finance | tf_quant_finance/experimental/pricing_platform/framework/market_data/rate_curve.py | 1 | 13760 | # Lint as: python3
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | apache-2.0 | -6,346,764,848,289,983,000 | 44.114754 | 102 | 0.672456 | false | 4.101341 | false | false | false |
Davasny/CCAS | ccas/models/exchanges/__init__.py | 1 | 1783 | from . import poloniex, btc_e, bittrex, bitfinex
from ccas.models import database, coinmarketcap
def get_balances(exchange, public_key, secret_key):
if exchange == "poloniex":
return poloniex.get_balances(public_key, secret_key)
if exchange == "btc-e":
return btc_e.get_balances(public_key, sec... | mit | 4,158,025,492,351,887,000 | 33.960784 | 113 | 0.615816 | false | 3.402672 | false | false | false |
veryhappythings/discord-gather | gather/discord_gather.py | 1 | 2123 | import asyncio
import logging
import discord
from .gatherbot import GatherBot
from .organiser import Organiser
from . import commands
logger = logging.getLogger(__name__)
class DiscordGather:
def __init__(self, token):
self.token = token
self.bot = None
self.client = discord.Client()
... | mit | -7,811,874,497,295,730,000 | 33.803279 | 76 | 0.628356 | false | 3.647766 | false | false | false |
GoogleCloudPlatform/cloudml-samples | chainer/containers/quickstart/mnist/trainer/mnist.py | 1 | 6554 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the \"License\");
# you may not use this file except in compliance with the License.\n",
# 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 writ... | apache-2.0 | 508,161,105,582,383,800 | 30.209524 | 80 | 0.652121 | false | 3.529348 | true | false | false |
yasserglez/pytiger2c | packages/pytiger2c/ast/integerliteralexpressionnode.py | 1 | 2204 | # -*- coding: utf-8 -*-
"""
Clase C{IntegerLiteralExpressionNode} del árbol de sintáxis abstracta.
"""
from pytiger2c.ast.valuedexpressionnode import ValuedExpressionNode
from pytiger2c.types.integertype import IntegerType
class IntegerLiteralExpressionNode(ValuedExpressionNode):
"""
Clase C{IntegerLiteralE... | mit | 7,899,778,051,832,931,000 | 33.587302 | 77 | 0.652134 | false | 3.54886 | false | false | false |
jgmanzanas/CMNT_004_15 | project-addons/sale_display_stock/report/sale_order_line_report.py | 1 | 4447 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Comunitea All Rights Reserved
# $Jesús Ventosinos Mayor <jesus@comunitea.com>$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 | 516,351,656,280,464,100 | 47.326087 | 137 | 0.550157 | false | 4.143523 | false | false | false |
gevannmullins/linux_server | add_items.py | 1 | 4498 | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from database_setup import Category, Base, Item, User
engine = create_engine('postgresql://catalog:password@localhost/catalog')
# engine = create_engine('sqlite:///catalog.db')
# Bind the engine to the metadata of the Base class so that th... | mit | 530,226,847,194,362,200 | 32.318519 | 174 | 0.765229 | false | 3.026918 | false | false | false |
alphagov/backdrop | tests/read/test_parse_request_args.py | 1 | 5035 | from datetime import datetime
import re
import unittest
from hamcrest import assert_that, is_, has_item
import pytz
from werkzeug.datastructures import MultiDict
from backdrop.read.query import parse_request_args
class Test_parse_request_args(unittest.TestCase):
def test_start_at_is_parsed(self):
reques... | mit | -5,928,915,904,435,119,000 | 29.70122 | 74 | 0.555511 | false | 3.498958 | true | false | false |
imgrant/fit2tcx | fit2tcx.py | 1 | 40690 | #!/usr/bin/env python
#
# fit2tcx - convert a FIT file to a TCX file
#
# Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> [https://github.com/Tigge/FIT-to-TCX/]
# Copyright (c) 2014-2016, Ian Grant <ian@iangrant.me> [https://github.com/imgrant/fit2tcx]
#
# Permission is hereby granted, free of charge, to any person... | mit | 1,875,265,608,820,062,500 | 36.641073 | 131 | 0.541239 | false | 4.032706 | false | false | false |
gkabbe/cMDLMC | mdlmc/IO/converters.py | 1 | 1764 | # coding=utf-8
import logging
import os
import pathlib
import tables
import h5py
import daiquiri
import fire
import numpy as np
from typing import Union, Iterable
from ..atoms.numpy_atom import dtype_xyz
from ..atoms import numpy_atom as npa
from ..IO.trajectory_parser import XYZTrajectory
logger = logging.getLogg... | gpl-3.0 | -4,830,993,265,289,770,000 | 31.072727 | 97 | 0.652494 | false | 3.431907 | false | false | false |
chromium2014/src | tools/perf/page_sets/intl_ko_th_vi.py | 1 | 1913 | # Copyright 2014 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.
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.page import ... | bsd-3-clause | -6,543,040,283,645,747,000 | 31.423729 | 101 | 0.644015 | false | 2.989063 | false | false | false |
jakevdp/altair | altair/utils/deprecation.py | 1 | 1447 | import warnings
# import functools
class AltairDeprecationWarning(UserWarning):
pass
def _deprecated(obj, name=None, message=None):
"""Return a version of a class or function that raises a deprecation warning.
Parameters
----------
obj : class or function
The object to create a deprecat... | bsd-3-clause | 4,549,240,084,075,891,000 | 29.787234 | 81 | 0.583967 | false | 4.425076 | false | false | false |
kd0aij/matrixpilot_old | Tools/MAVLink/MAVProxy/modules/antenna.py | 1 | 2346 | #!/usr/bin/env python
'''
antenna pointing module
Andrew Tridgell
June 2012
'''
import sys, os, time
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'cuav', 'lib'))
import cuav_util
mpstate = None
class module_state(object):
def __init__(self):
self... | gpl-3.0 | 5,135,345,788,596,944,000 | 30.583333 | 104 | 0.602728 | false | 3.222527 | false | false | false |
kubernetes-client/python | kubernetes/client/models/v1alpha1_webhook_throttle_config.py | 1 | 4435 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.18
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | apache-2.0 | -7,392,792,150,688,209,000 | 28.566667 | 124 | 0.583089 | false | 3.988309 | true | false | false |
adamcaudill/yawast | yawast/scanner/plugins/http/applications/wordpress.py | 1 | 7344 | # Copyright (c) 2013 - 2020 Adam Caudill and Contributors.
# This file is part of YAWAST which is released under the MIT license.
# See the LICENSE file or go to https://yawast.org/license/ for full license details.
import re
from typing import Tuple, Union, List, cast
from urllib.parse import urljoin
from packagi... | mit | 6,941,804,610,785,816,000 | 38.483871 | 111 | 0.564134 | false | 3.881607 | false | false | false |
cysuncn/python | spark/crm/PROC_M_R_RET_CUST_FLOW.py | 1 | 4734 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_M_R_RET_CUST_FLOW').setMaster(sys.argv[2])
sc = SparkContext(conf = conf)
sc.... | gpl-3.0 | 6,747,739,261,989,934,000 | 42.150943 | 177 | 0.580892 | false | 2.453863 | false | true | false |
thomastweets/PythonRSA | GUI_RSA.py | 1 | 15279 | ############################
### GUI for RS analysis ###
############################
import wx
import rsa
import os
import webbrowser
files_number = 0
class RSA_GUI(wx.Frame):
def __init__(self, parent, title):
super(RSA_GUI,self).__init__(parent, style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER, title =... | gpl-2.0 | 8,023,130,351,131,065,000 | 35.995157 | 179 | 0.59729 | false | 3.290052 | false | false | false |
Vijfhoek/oyoyo | oyoyo/cmdhandler.py | 1 | 6875 | # Copyright (c) 2008 Duncan Fordyce
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distri... | mit | -8,005,940,691,711,680,000 | 31.429245 | 85 | 0.613236 | false | 4.291511 | false | false | false |
RIKSOF/scspell-jenkins | scspell_lib/_util.py | 1 | 1481 | ############################################################################
# scspell
# Copyright (C) 2009 Paul Pelzl
#
# 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.
#
# This prog... | gpl-2.0 | 4,990,107,826,805,204,000 | 32.659091 | 76 | 0.654288 | false | 3.991914 | false | false | false |
robotgear/robotgear | robotgear/settings.py | 1 | 3588 | """
Django settings for robotgear project.
Generated by 'django-admin startproject' using Django 1.11.7.
"""
import os
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.static... | mit | 421,187,835,858,788,700 | 21.566038 | 91 | 0.62709 | false | 3.410646 | false | false | false |
commonsense/divisi | csc/divisi/flavors.py | 1 | 5345 | from csc.divisi.tensor import DictTensor
from csc.divisi.ordered_set import OrderedSet
from csc.divisi.labeled_view import LabeledView
def add_triple_to_matrix(matrix, triple, value=1.0):
'''
Adds a triple (left, relation, right) to the matrix in the 2D unfolded format.
This is the new add_assertion_tupl... | gpl-3.0 | -1,865,229,490,018,606,000 | 32.198758 | 82 | 0.637605 | false | 3.80427 | false | false | false |
moyaproject/moya | moya/elements/registry.py | 1 | 4712 | from __future__ import unicode_literals
from .. import errors
from ..tools import extract_namespace
from .. import namespaces
from ..compat import itervalues
from collections import defaultdict
import inspect
class Meta(object):
logic_skip = False
virtual_tag = False
is_call = False
is_try = False
... | mit | -1,306,243,355,464,368,600 | 31.951049 | 82 | 0.610781 | false | 4.543877 | false | false | false |
cmcqueen/simplerandom | python/python3/simplerandom/iterators/_iterators_py.py | 1 | 40947 |
from simplerandom._bitcolumnmatrix import BitColumnMatrix
__all__ = [
"Cong",
"SHR3",
"MWC1",
"MWC2",
"MWC64",
"KISS",
"KISS2",
"LFSR113",
"LFSR88",
"_traverse_iter",
]
def _traverse_iter(o, tree_types=(list, tuple)):
"""Iterate over nested containers and/or iterators.
... | mit | -5,898,886,228,180,015,000 | 35.298759 | 125 | 0.576945 | false | 3.21465 | false | false | false |
GNOME/gedit-plugins | plugins/commander/modules/align.py | 1 | 8900 | # -*- coding: utf-8 -*-
#
# align.py - align commander module
#
# Copyright (C) 2010 - Jesse van den Kieboom
#
# 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 Licens... | gpl-2.0 | 2,460,157,650,009,915,400 | 30.448763 | 190 | 0.637978 | false | 3.574297 | false | false | false |
Teagan42/home-assistant | homeassistant/components/google_assistant/const.py | 1 | 4660 | """Constants for Google Assistant."""
from homeassistant.components import (
alarm_control_panel,
binary_sensor,
camera,
climate,
cover,
fan,
group,
input_boolean,
light,
lock,
media_player,
scene,
script,
sensor,
switch,
vacuum,
)
DOMAIN = "google_assist... | apache-2.0 | 8,215,510,004,811,099,000 | 30.486486 | 80 | 0.71824 | false | 2.971939 | false | false | false |
LoyolaCSDepartment/LDA-ICPC-2014 | topic-models/topic-count/xmlsplit.py | 1 | 1409 | #! /usr/bin/env /usr/bin/python3
import os
import sys
def ensure_dir(f):
d = os.path.dirname(f)
if not os.path.exists(d):
os.makedirs(d)
def xmlSplit(infile_name, dest_dir):
try:
# in_file = open('{0}{1}'.format(folder, filename), 'r', encoding='latin_1')
in_file = open(infile_name, 'r', encoding='... | mit | 8,342,931,913,768,487,000 | 25.092593 | 80 | 0.582683 | false | 2.773622 | false | false | false |
AMOboxTV/AMOBox.LegoBuild | plugin.video.salts/scrapers/izlemeyedeger_scraper.py | 1 | 3982 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | gpl-2.0 | -3,967,336,712,143,353,000 | 40.479167 | 165 | 0.592416 | false | 3.742481 | false | false | false |
nhazekam/cctools | chirp/src/bindings/python/chirp.binding.py | 1 | 22645 | ## @package ChirpPython
#
# Python Chirp bindings.
#
# The objects and methods provided by this package correspond to the native
# C API in @ref chirp_reli.h and chirp_swig_wrap.h
#
# The SWIG-based Python bindings provide a higher-level interface that
# revolves around:
#
# - @ref Chirp.Client
# - @ref Chirp.Stat
imp... | gpl-2.0 | -4,008,700,873,344,837,600 | 33.678407 | 118 | 0.573151 | false | 4.129285 | false | false | false |
kralf/morsel | python/lib/morsel/nodes/ode/solids/mesh.py | 1 | 1092 | from morsel.panda import *
from morsel.nodes.node import Node
from morsel.nodes.ode.object import Object
from morsel.nodes.facade import Mesh as _Mesh
from morsel.nodes.ode.solid import Solid
#-------------------------------------------------------------------------------
class Mesh(Solid):
def __init__(self, **kar... | gpl-2.0 | -6,021,325,268,098,747,000 | 29.361111 | 80 | 0.519231 | false | 4.216216 | false | false | false |
alexhilton/miscellaneous | python/pygrep.py | 1 | 3334 | #!/usr/bin/env python
"""A Python version of grep utility.
Search one or more named input files against one ore more given patterns.
Print the line containing the match, if there are any.
"""
from optparse import OptionParser;
import re;
import fileinput;
import os.path;
FILENAME = '\033[92m';
LINENO = '\033... | apache-2.0 | 1,519,449,779,832,885,800 | 37.321839 | 118 | 0.607379 | false | 3.913146 | false | false | false |
etkirsch/legends-of-erukar | erukar/content/inventory/weapons/standard/Focus.py | 1 | 1029 | import numpy as np
from erukar.system.engine.inventory import ArcaneWeapon
class Focus(ArcaneWeapon):
Probability = 1
BaseName = "Focus"
EssentialPart = "devotion"
AttackRange = 3
RangePenalty = 3
BaseWeight = 1.0
# Damage
DamageRange = [2, 5]
DamageType = 'force'
DamageModifi... | agpl-3.0 | -8,065,563,989,550,132,000 | 27.583333 | 138 | 0.640428 | false | 3.298077 | false | false | false |
fishroot/qdeep | lib/qdeep/objects/script/__init__.py | 1 | 6352 | # -*- coding: utf-8 -*-
__author__ = 'Patrick Michl'
__email__ = 'patrick.michl@gmail.com'
__license__ = 'GPLv3'
import nemoa
import qdeep.objects.common
from PySide import QtGui, QtCore
class Editor(qdeep.objects.common.Editor):
objType = 'script'
def createCentralWidget(self):
self.textArea = Q... | gpl-3.0 | -1,445,960,790,410,959,600 | 37.035928 | 97 | 0.614137 | false | 3.916153 | false | false | false |
quantosauros/cppyProject | cppy/cybosPlus/cpRqRp/StockOrderCash.py | 1 | 1827 | # coding=utf-8
'''
Created on 2016. 8. 14.
@author: Jay
'''
from cppy.adaptor import CpRqRpClass
import win32com.client
@CpRqRpClass('CpTrade.CpTd0311')
class StockOrderCash(object):
'''
장내주식/코스닥주식/ELW 주문(현금주문) 데이터를 요청하고 수신한다.
'''
def __init__(self):
self.instCpTdUtil = win32c... | mit | 1,099,986,482,034,040,200 | 26.525424 | 74 | 0.544319 | false | 2.61838 | false | false | false |
jieter/f-engrave | application/settings.py | 1 | 9320 | import os
def cast_boolean(value):
if type(value) is bool:
return bool(value)
elif len(value) > 1:
return value == 'True'
else:
return bool(int(value))
def cast_string(value):
value = str(value).strip()
value = value.replace('\\n', '\n')
# unquote string
if value... | gpl-3.0 | -4,150,245,928,453,565,400 | 25.704871 | 100 | 0.517275 | false | 3.370705 | true | false | false |
ic-labs/django-icekit | icekit/api/images/serializers.py | 1 | 2783 | from django.apps import apps
from rest_framework import serializers
from rest_framework.settings import api_settings
from drf_queryfields import QueryFieldsMixin
from icekit.api.base_serializers import WritableSerializerHelperMixin, \
WritableRelatedFieldSettings
Image = apps.get_model('icekit_plugins_image.Ima... | mit | 2,230,048,733,898,857,700 | 26.83 | 78 | 0.564499 | false | 4.403481 | false | false | false |
rmcauley/rainwave | rainwave/playlist_objects/artist.py | 1 | 5684 | from libs import db
from libs import config
from rainwave.playlist_objects.metadata import (
AssociatedMetadata,
MetadataUpdateError,
make_searchable_string,
)
class Artist(AssociatedMetadata):
select_by_name_query = "SELECT artist_id AS id, artist_name AS name FROM r4_artists WHERE lower(artist_name... | gpl-2.0 | 7,762,295,732,175,003,000 | 46.764706 | 257 | 0.574771 | false | 3.281755 | false | false | false |
dgjnpr/py-junos-eznc | lib/jnpr/junos/factory/view.py | 1 | 8729 | import warnings
from contextlib import contextmanager
from copy import deepcopy
from lxml import etree
from jnpr.junos.factory.viewfields import ViewFields
class View(object):
"""
View is the base-class that makes extracting values from XML
data appear as objects with attributes.
"""
ITEM_NAME_... | apache-2.0 | -8,300,979,280,519,996,000 | 33.366142 | 79 | 0.500745 | false | 4.567766 | false | false | false |
2baOrNot2ba/AntPat | scripts/viewJonespat_dual.py | 1 | 2897 | #!/usr/bin/env python
"""A simple viewer for Jones patterns for dual-polarized representations.
"""
import argparse
import numpy
import matplotlib.pyplot as plt
from antpat.reps.sphgridfun.pntsonsphere import ZenHemisphGrid
from antpat.dualpolelem import DualPolElem, jones2gIXR, IXRJ2IXRM
from antpat.reps.hamaker impo... | isc | 7,596,389,316,562,434,000 | 33.488095 | 78 | 0.613393 | false | 3.111708 | false | false | false |
bgmerrell/desmod | tests/test_timescale.py | 1 | 1953 | import pytest
from desmod.timescale import parse_time, scale_time
@pytest.mark.parametrize('test_input, expected', [
('12 s', (12, 's')),
('12s', (12, 's')),
('+12s', (12, 's')),
('-12s', (-12, 's')),
('12.0 s', (12.0, 's')),
('12. s', (12.0, 's')),
('+12.0 s', (12.0, 's')),
('-12.0 s... | mit | -2,659,281,447,644,491,300 | 24.697368 | 62 | 0.453661 | false | 2.453518 | true | false | false |
bourguet/operator_precedence_parsing | operator_precedence.py | 1 | 7999 | #! /usr/bin/env python3
import sys
import lexer
from tree import Node, CompositeNode
class SymbolDesc:
def __init__(self, symbol, lprio, rprio, evaluator):
self.symbol = symbol
self.lprio = lprio
self.rprio = rprio
self.evaluator = evaluator
self.value = None
def __re... | bsd-2-clause | -1,557,918,058,041,208,000 | 33.478448 | 115 | 0.56182 | false | 3.537815 | false | false | false |
hernandito/SickRage | sickbeard/providers/generic.py | 1 | 26015 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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 ... | gpl-3.0 | -7,911,745,144,782,687,000 | 37.944611 | 189 | 0.554757 | false | 4.353975 | false | false | false |
eclee25/flu-SDI-exploratory-age | scripts/create_fluseverity_figs/export_zOR_classif.py | 1 | 10068 | #!/usr/bin/python
##############################################
###Python template
###Author: Elizabeth Lee
###Date: 6/18/14
###Function: Export zOR retrospective and early warning classifications into csv file format (SDI and ILINet, national and regional for SDI)
### Use nation-level peak-based retrospective classi... | mit | -8,794,785,964,571,561,000 | 58.934524 | 206 | 0.698153 | false | 2.526474 | false | false | false |
RoboCupULaval/StrategyIA | ai/GameDomainObjects/ball.py | 1 | 1041 | # Under MIT License, see LICENSE.txt
from typing import Dict
from Util import Position
class Ball:
def __init__(self, position=Position()):
self._position = position
self._velocity = Position()
def update(self, new_dict: Dict):
self.position = new_dict['position']
self.velo... | mit | -1,920,990,554,748,314,000 | 23.209302 | 56 | 0.630163 | false | 4.034884 | false | false | false |
RogerRueegg/lvw-young-talents | src/profiles/views.py | 1 | 2796 | from __future__ import unicode_literals
from django.views import generic
from django.shortcuts import get_object_or_404, redirect
from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from . import forms
from . import models
import datetime
class ShowProfile(LoginRequiredMixin,... | mit | 7,446,359,648,485,783,000 | 41.348485 | 106 | 0.598927 | false | 4.086257 | false | false | false |
Erotemic/ibeis | super_setup.py | 1 | 26677 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Requirements:
pip install gitpython click ubelt
"""
import re
from os.path import exists
from os.path import join
from os.path import dirname
from os.path import abspath
import ubelt as ub
import functools
class ShellException(Exception):
"""
Raised when s... | apache-2.0 | -6,734,773,674,303,073,000 | 34.009186 | 125 | 0.52922 | false | 4.09722 | false | false | false |
ToonTownInfiniteRepo/ToontownInfinite | toontown/toon/GroupPanel.py | 1 | 18189 | from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from otp.nametag import NametagGlobals
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from direct.showbase import DirectObject
from toontown.toon import ToonAv... | mit | 558,389,024,408,593,340 | 45.164975 | 415 | 0.630601 | false | 3.357143 | false | false | false |
endlessm/chromium-browser | third_party/chromite/scripts/cros_oobe_autoconfig_unittest.py | 1 | 6578 | # -*- coding: utf-8 -*-
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unittests for cros_oobe_autoconfig.py"""
from __future__ import print_function
import json
import os
import pwd
import sys
f... | bsd-3-clause | 1,724,904,975,207,223,000 | 36.352273 | 79 | 0.65896 | false | 3.291938 | true | false | false |
jonberliner/keras | keras/optimizers.py | 1 | 7022 | from __future__ import absolute_import
import theano
import theano.tensor as T
import numpy as np
from .utils.theano_utils import shared_zeros, shared_scalar
from six.moves import zip
def clip_norm(g, c, n):
if c > 0:
g = T.switch(T.ge(n, c), g * c / n, g)
return g
def kl_divergence(p, p_hat):
... | mit | 6,855,293,725,898,082,000 | 32.122642 | 104 | 0.548277 | false | 3.44047 | true | false | false |
errikos/amtt | amtt/exporter/isograph/__init__.py | 1 | 2915 | """Exporter module for Isograph Availability Workbench."""
import logging
import networkx as nx
from itertools import count
from amtt.translator.ir import component_basename
from amtt.exporter import Exporter
from amtt.exporter.isograph.emitter.xml import XmlEmitter
from amtt.exporter.isograph.rbd import Rbd
from amtt... | gpl-3.0 | 8,075,975,394,118,118,000 | 39.486111 | 78 | 0.64048 | false | 4.236919 | false | false | false |
corredD/upy | autodeskmaya/mayaHelper.py | 1 | 118218 |
"""
Copyright (C) <2010> Autin L. TSRI
This file git_upy/autodeskmaya/mayaHelper.py is part of upy.
upy 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 | -7,838,186,313,154,218,000 | 39.361557 | 212 | 0.542971 | false | 3.67479 | false | false | false |
phenoxim/nova | nova/tests/json_ref.py | 1 | 2271 | # 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 agreed to in... | apache-2.0 | 7,998,802,605,201,372,000 | 35.047619 | 78 | 0.625716 | false | 3.772425 | false | false | false |
claytantor/coinbase4py | webapp/settings.py | 1 | 4533 | import os
from ConfigParser import RawConfigParser
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
PROJECT_DIR = os.path.dirname(__file__)
CONF_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
# you will need to copy... | apache-2.0 | 6,435,432,027,036,842,000 | 33.869231 | 86 | 0.701302 | false | 3.591918 | true | false | false |
rddim/Notepad-plus-plus | scintilla/qt/ScintillaEdit/WidgetGen.py | 5 | 8222 | #!/usr/bin/env python3
# WidgetGen.py - regenerate the ScintillaWidgetCpp.cpp and ScintillaWidgetCpp.h files
# Check that API includes all gtkscintilla2 functions
import sys
import os
import getopt
scintillaDirectory = "../.."
scintillaScriptsDirectory = os.path.join(scintillaDirectory, "scripts")
sys.path.... | gpl-3.0 | -2,808,446,952,764,096,500 | 28.679104 | 114 | 0.610071 | false | 3.096798 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.