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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
micjabbour/AndroidGuard-WebApp | AndroidGuard/models.py | 1 | 3073 | from . import db
from .config import AppConfig
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from sqlalchemy import desc
from itsdangerous import Serializer, BadSignature
class Location(db.Model):
id = db.Column(db.Integer... | unlicense | 256,992,587,173,349,120 | 31.691489 | 96 | 0.649528 | false | 3.860553 | false | false | false |
noironetworks/neutron | neutron/db/rbac_db_mixin.py | 1 | 6467 | # Copyright (c) 2015 Mirantis, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 5,662,070,589,634,627,000 | 43.909722 | 79 | 0.613422 | false | 3.742477 | false | false | false |
eyurtsev/FlowCytometryTools | FlowCytometryTools/core/docstring.py | 1 | 2522 | from __future__ import print_function
import string
from matplotlib import inspect
class FormatDict(dict):
"""Adapted from http://stackoverflow.com/questions/11283961/partial-string-formatting"""
def __missing__(self, key):
return "{" + key + "}"
class DocReplacer(object):
"""Decorator object... | mit | 8,740,734,155,669,062,000 | 30.135802 | 102 | 0.560666 | false | 4.355786 | false | false | false |
JustFixNYC/who-owns-what | wow/tests/conftest.py | 1 | 1024 | import pytest
import psycopg2
import dbtool
@pytest.fixture(scope='session')
def django_db_setup(django_db_setup, django_db_blocker):
from django.conf import settings
wow = settings.DATABASES['wow']
with django_db_blocker.unblock():
db = dbtool.DbContext(
host=wow['HOST'],
... | gpl-3.0 | -1,612,363,369,483,214,000 | 29.117647 | 70 | 0.553711 | false | 4.047431 | false | false | false |
borgaster/SpaceWarsEvolved | main.py | 1 | 16816 | import time
from animation import *
from asteroidField import *
from background import *
from loader import *
from physics import *
from player import *
from powerup import *
import pygame
from pygame.locals import *
from rotatingMenu_img import *
from spacemenu import *
from starField import *
# teclas dos jogadore... | mit | -5,715,220,330,823,720,000 | 33.178862 | 110 | 0.506185 | false | 3.822687 | false | false | false |
kgullikson88/GSSP_Analyzer | gsspy/fitting.py | 1 | 19991 | from __future__ import print_function, division, absolute_import
import numpy as np
import matplotlib.pyplot as plt
import os
import sys
import subprocess
from astropy.io import fits
from astropy import time
import DataStructures
from ._utils import combine_orders, read_grid_points, ensure_dir
from .analyzer import ... | mit | -6,591,718,950,300,025,000 | 43.523385 | 97 | 0.516182 | false | 3.486397 | false | false | false |
JuBra/GEMEditor | GEMEditor/database/ui/MetaboliteEntryDisplayWidget.py | 1 | 8059 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\MetaboliteEntryDisplayWidget.ui'
#
# Created by: PyQt5 UI code generator 5.8.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MetaboliteEntryDisplayWidget(object):
def set... | gpl-3.0 | 1,646,370,832,036,293,600 | 61.960938 | 106 | 0.755056 | false | 4.057905 | false | false | false |
highlander12rus/whatsupmoscow.ru | demon/main.py | 1 | 3580 | # -*- coding: utf-8 -*-
__author__ = 'meanwhile'
import ssl
import time
import socket
import sys
import logging
import vkontakte
import ProvaderStorage
import Constants
import FileWriter
import ProccessingResponce
import daemon
class VkParserDemon(daemon.Daemon):
def run(self):
#read code for method vk... | apache-2.0 | 35,188,145,789,785,108 | 34.58 | 119 | 0.540472 | false | 4.052392 | false | false | false |
rmac75/mboxparser | mbox.py | 1 | 3399 | #!/usr/bin/python2
#--------------------------------
#Takes in mbox, spits out csv with email info and basic geolocation, plus other header fields.
#--------------------------------
#This product includes GeoLite2 data created by MaxMind, available from
#<a href="http://www.maxmind.com">http://www.maxmind.com</a>.
i... | gpl-2.0 | -8,993,837,695,608,072,000 | 28.556522 | 204 | 0.657546 | false | 2.978966 | false | false | false |
enriquecoronadozu/HMPy | src/borrar/modificar/hmpy.py | 1 | 6228 | #!/usr/bin/env python
"""@See preprocessed data
"""
from numpy import*
import matplotlib.pyplot as plt
from GestureModel import*
from Creator import*
from Classifier import*
def plotResults(gr_points,gr_sig, b_points,b_sig,name_model):
from scipy import linalg
import matplotlib.pyplot as plt
gr_points ... | gpl-3.0 | -8,411,053,304,711,118,000 | 25.278481 | 77 | 0.617213 | false | 2.855571 | false | false | false |
SportySpice/Collections | src/file/File.py | 1 | 3600 | import xbmc
import xbmcvfs
import Folder
import urllib
import urlparse
NAME_QUERY = 'fileName'
FOLDER_NAME_QUERY = 'folderName'
FOLDER_PATH_QUERY = 'folderPath'
class File(object):
def __init__(self, name, folder):
self.name = name
self.folder = folder
self.path = folder.fullpath
... | gpl-2.0 | 3,374,206,890,298,877,400 | 21.36646 | 72 | 0.556667 | false | 4.417178 | false | false | false |
ZhangJun-GitHub/Cycle | dialogs.py | 1 | 20748 | #====================================================
# Cycle - calendar for women
# Distributed under GNU Public License
# Original author: Oleg S. Gints
# Maintainer: Matt Molyneaux (moggers87+git@moggers87.co.uk)
# Home page: http://moggers.co.uk/cgit/cycle.git/about
#==================================... | gpl-2.0 | 7,211,397,491,379,076,000 | 35.852575 | 100 | 0.502699 | false | 3.445939 | false | false | false |
rolobio/sshm | sshm/main.py | 1 | 5215 | #! /usr/bin/env python3
"""
This module allows the console to use SSHM's functionality.
This module should only be run by the console!
"""
from __future__ import print_function
import sys
try: # pragma: no cover version specific
from lib import sshm
except ImportError: # pragma: no cover version specific
from... | gpl-2.0 | 6,128,735,719,583,437,000 | 33.536424 | 135 | 0.595781 | false | 4.116022 | false | false | false |
jmathai/elodie | elodie/tests/config_test.py | 1 | 3912 | from __future__ import absolute_import
# Project imports
import os
import sys
import unittest
from mock import patch
from tempfile import gettempdir
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))))
from elodie import constants
from elodie.config im... | apache-2.0 | 2,237,664,676,632,507,000 | 28.862595 | 114 | 0.652607 | false | 3.369509 | true | false | false |
dparaujo/projeto | app_inscricoes/questionarios/migrations/0002_auto_20170220_2126.py | 1 | 1224 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-02-21 00:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('questionarios', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | gpl-3.0 | -3,572,128,225,930,525,000 | 36.090909 | 237 | 0.588235 | false | 3.326087 | false | false | false |
crespyl/pcre2 | maint/MultiStage2.py | 1 | 23077 | #! /usr/bin/python
# Multistage table builder
# (c) Peter Kankowski, 2008
##############################################################################
# This script was submitted to the PCRE project by Peter Kankowski as part of
# the upgrading of Unicode property support. The new code speeds up property
# matching... | gpl-3.0 | 2,237,033,308,509,130,800 | 41.894052 | 143 | 0.604325 | false | 3.357143 | true | false | false |
leebird/legonlp | annotation/align.py | 1 | 2062 | # -*- coding: utf-8 -*-
import os
import sys
import re
import codecs
from alignment import Alignment,Hirschberg
from readers import AnnParser
from writers import AnnWriter
writer = AnnWriter()
def get_phrase(text):
p = re.compile(ur'[a-zA-Z]+|[0-9]+|\s+|[.,;!\(\)]+')
lista = []
pre = 0
for m in p.fin... | gpl-2.0 | -4,057,926,957,120,265,700 | 27.638889 | 76 | 0.548497 | false | 3.425249 | false | false | false |
cloudburst/libheap | libheap/pydbg/pygdbpython.py | 1 | 4894 | import sys
from functools import wraps
from libheap.frontend.printutils import print_error
try:
import gdb
except ImportError:
print("Not running inside of GDB, exiting...")
sys.exit()
def gdb_is_running(f):
"decorator to make sure gdb is running"
@wraps(f)
def _gdb_is_running(*args, **kwa... | mit | -2,558,321,440,610,970,000 | 29.397516 | 76 | 0.53964 | false | 4.109152 | false | false | false |
Panos512/inspire-next | inspirehep/modules/records/receivers.py | 1 | 12132 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014, 2015, 2016 CERN.
#
# INSPIRE 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 optio... | gpl-2.0 | -3,472,888,303,116,580,000 | 40.406143 | 105 | 0.585889 | false | 4.143443 | false | false | false |
so-sure/tagged-route53 | tagged-route53.py | 1 | 10149 | #!/usr/bin/python
import requests
import boto3
import argparse
class Dns(object):
# Default constructor of the class.
def __init__(self):
self.ec2_client = boto3.client('ec2')
self.dns_client = boto3.client('route53')
self.role = None
self.env = None
self.instance_id = ... | apache-2.0 | -2,124,829,672,126,975,700 | 38.034615 | 185 | 0.549611 | false | 4.09399 | false | false | false |
diegojromerolopez/djanban | src/djanban/apps/password_reseter/email_sender.py | 1 | 1645 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from crequest.middleware import CrequestMiddleware
from django.core.mail import send_mail
from django.template.loader import get_template
from django.conf import settings
from django.urls import reverse
def send_password_request_link(password_request, u... | mit | -3,453,166,151,156,797,000 | 43.459459 | 112 | 0.743465 | false | 3.888889 | false | false | false |
seanxwzhang/LeetCode | 148 Sort List/solution.py | 1 | 1263 | #! /usr/bin/env python
# Sort a linked list in O(n log n) time using constant space complexity.
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
# a merge sort implementation
class Solution(object):
def sortList(self, head... | mit | 6,358,962,998,563,687,000 | 33.162162 | 72 | 0.568488 | false | 3.946875 | false | false | false |
crazcalm/chat-server | server.py | 1 | 11418 | import help_text
import asyncio
import argparse
import logging
from random import randint
clients = []
class SimpleChatClientProtocol(asyncio.Protocol):
"""
This class is the heart of the Chat Server. For each client that
connects to the server, an instance of this class is created. These
instances ... | mit | 894,940,125,265,857,700 | 32.881306 | 79 | 0.532055 | false | 4.287646 | false | false | false |
jonwright/ImageD11 | ImageD11/sparseframe.py | 1 | 10124 |
from __future__ import print_function, division
import time, sys
import h5py, scipy.sparse, numpy as np, pylab as pl
from ImageD11 import cImageD11
# see also sandbox/harvest_pixels.py
NAMES = {
"filename" : "original filename used to create a sparse frame",
"intensity" : "corrected pixel values",
"nla... | gpl-2.0 | 6,007,533,981,669,690,000 | 34.398601 | 86 | 0.55077 | false | 3.664133 | false | false | false |
nksheridan/elephantAI | test_Deter_as_Server_and_Play_Audio.py | 1 | 1414 | # DETER DEVICE
# this is test code for putting the deter device into server mode, and getting a message via bluetooth from the detection device, and
# then going ahead and playing scare sounds. You need to determine your MAC address. It is for the server in this case, so the MAC address
# of the deter device. You also ... | mit | 6,251,672,956,260,858,000 | 27.857143 | 138 | 0.737624 | false | 3.128319 | false | false | false |
tyler-cromwell/Acid | client.py | 1 | 2439 | #!/usr/bin/python3
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The MIT License (MIT)
Copyright (c) 2016 Tyler Cromwell
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 th... | mit | -3,025,028,006,687,815,700 | 30.675325 | 80 | 0.621976 | false | 3.763889 | false | false | false |
metwit/django-fulmine | fulmine/forms.py | 1 | 2406 | from django import forms
from django.core.exceptions import ValidationError
from fulmine.models import parse_scope
class SeparatedValuesField(forms.CharField):
def __init__(self, *args, **kwargs):
self.separator = kwargs.pop('separator', ' ')
super(SeparatedValuesField, self).__init__(*args, **kwa... | bsd-3-clause | -1,758,042,214,765,443,600 | 24.870968 | 71 | 0.618869 | false | 4.003328 | false | false | false |
gitcoinco/web | app/marketing/management/commands/no_applicants_email.py | 1 | 1922 | '''
Copyright (C) 2021 Gitcoin Core
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 version.
This progra... | agpl-3.0 | 4,106,764,754,830,823,400 | 39.041667 | 132 | 0.689386 | false | 3.875 | false | false | false |
karlwithak/nowradio | nowradio/stationInfoUpdater.py | 1 | 1896 | import requests
import ourUtils
from dbManager import Queries, get_connection
# This program goes through the list of stations in the db and updates information such as
# current listeners, max listeners, peak listeners, status(up or not)
def worker(id_url_list, connection):
cur = connection.cursor()
for ... | mit | 3,592,722,863,100,787,000 | 34.111111 | 90 | 0.533228 | false | 3.792 | false | false | false |
scavallero/mydomus | auth.py | 1 | 3792 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# MyDomus - Polling Service
# Copyright (c) 2016 Salvatore Cavallero (salvatoe.cavallero@gmail.com)
# https://github.com/scavallero/mydomus
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public ... | gpl-3.0 | -3,929,618,149,276,053,000 | 26.882353 | 86 | 0.531909 | false | 4.07304 | false | false | false |
Stanford-Online/edx-analytics-data-api | analytics_data_api/v0/views/__init__.py | 1 | 10029 | from itertools import groupby
from django.db import models
from django.db.models import Q
from django.utils import timezone
from rest_framework import generics, serializers
from opaque_keys.edx.keys import CourseKey
from analytics_data_api.v0.exceptions import CourseNotSpecifiedError
from analytics_data_api.v0.view... | agpl-3.0 | 8,010,458,603,060,841,000 | 36.561798 | 109 | 0.626683 | false | 4.001995 | false | false | false |
vvoZokk/dnn | dnn_project/generate_protos.py | 1 | 4557 | #!/usr/bin/env python
import os
import argparse
import re
from collections import defaultdict
import sys
KNOWN_TYPES = {
"double" : "double",
"int" : "int32",
"size_t" : "uint32",
"float" : "float",
"string" : "string",
"bool" : "bool",
"complex<double>" : "double",
... | mit | 8,567,659,111,309,439,000 | 43.242718 | 126 | 0.432521 | false | 4.025618 | false | false | false |
yasserglez/pytiger2c | packages/pytiger2c/dot.py | 1 | 2786 | # -*- coding: utf-8 -*-
"""
Clases utilizadas en la generación de un archivo Graphviz DOT con el
árbol de sintáxis abstracta creado a partir de un programa Tiger.
"""
class DotGenerator(object):
"""
Clase utilizada para la generación de grafos en formato Graphviz DOT.
"""
def __init__(self):
... | mit | -712,239,282,687,048,000 | 33.575 | 74 | 0.574476 | false | 3.414815 | false | false | false |
Arzaroth/virtualnetwork | network/mapParser.py | 1 | 4727 | #!/usr/bin/python3.3 -O
from pyrser import grammar,meta
from pyrser.directives import ignore
from network import Host, Router
import sys
def insensitiveCase(s):
return "[" + " ".join("['" + "'|'".join(x) + "']" for x in map((lambda each: [each.lower(), each.upper()]), s)) + "]"
class MapParser(grammar.Grammar):
... | gpl-3.0 | 5,205,902,679,381,287,000 | 31.826389 | 121 | 0.533108 | false | 3.136695 | false | false | false |
qma/pants | src/python/pants/backend/jvm/tasks/resources_task.py | 1 | 3335 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from abc import abst... | apache-2.0 | 8,281,013,611,547,203,000 | 37.333333 | 99 | 0.704648 | false | 4.382392 | false | false | false |
opennode/waldur-mastermind | src/waldur_core/structure/managers.py | 1 | 4844 | from django.db import models
from waldur_core.core.managers import GenericKeyMixin
def get_permission_subquery(permissions, user):
subquery = models.Q()
for entity in ('customer', 'project'):
path = getattr(permissions, '%s_path' % entity, None)
if not path:
continue
if p... | mit | 4,239,172,662,321,143,000 | 31.293333 | 94 | 0.579067 | false | 4.510242 | false | false | false |
mkocka/galaxytea | modeling/domcek/plots.py | 1 | 4294 | import matplotlib.pyplot as plt
from numpy import *
###List of variables
# r_in [10**10 cm] innder radius
# r_out [10**10 cm] outer radius
# step [10**10 cm] step of plot
# alfa [] parameter of accretion
# M_16 [10**16 g.s**(-1)] accretion flow
# m_1 [solar mass] mass of compact object
# R_hv [10**1... | mit | 4,655,926,774,987,794,000 | 29.671429 | 109 | 0.608058 | false | 2.229491 | false | false | false |
MobSF/Mobile-Security-Framework-MobSF | mobsf/StaticAnalyzer/views/ios/view_source.py | 1 | 5000 | # -*- coding: utf_8 -*-
"""iOS View Source."""
import io
import json
import logging
import ntpath
import os
from pathlib import Path
import biplist
from django.conf import settings
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.utils.html import escape
from mobsf.MobSF.f... | gpl-3.0 | 7,384,499,573,915,808,000 | 31.258065 | 72 | 0.4996 | false | 4.05515 | false | false | false |
alexandrevicenzi/pycompat | tests/test.py | 1 | 2225 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# These tests run only under Linux and Python 2.x +
# This is the Travis CI environment.
#
from pycompat import python as py
from pycompat import system
import sys
import unittest
class TestPyCompat(unittest.TestCase):
def test_python_is_64bits(self):
se... | mit | -7,611,998,995,524,017,000 | 27.525641 | 100 | 0.649888 | false | 2.966667 | true | false | false |
mitsuhiko/zine | zine/utils/exceptions.py | 1 | 1632 | # -*- coding: utf-8 -*-
"""
zine.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~
Exception utility module.
:copyright: (c) 2010 by the Zine Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from zine.i18n import _
class ZineException(Exception):
"""Baseclass for all... | bsd-3-clause | -1,362,887,440,807,812,400 | 24.5 | 72 | 0.579657 | false | 3.84 | false | false | false |
kasperschmidt/TDOSE | tdose_extract_spectra.py | 1 | 43824 | # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
import numpy as np
import sys
import astropy.io.fits as afits
import collections
import tdose_utilities as tu
import tdose_extract_spectra as tes
import tdose_build_mock_cube as tbmc
import pdb
import scipy.ndi... | mit | 2,141,411,611,090,954,000 | 50.925355 | 143 | 0.5421 | false | 3.423483 | false | false | false |
mbeyeler/pulse2percept | examples/implants/plot_custom_electrode_array.py | 1 | 6434 | """
============================================================================
Creating your own electrode array
============================================================================
This example shows how to create a new
:py:class:`~pulse2percept.implants.ElectrodeArray` object.
As the base class for all el... | bsd-3-clause | 1,638,808,666,672,022,800 | 35.765714 | 84 | 0.614081 | false | 3.889964 | false | false | false |
asterix135/whoshouldivotefor | explorer/migrations/0008_auto_20170627_0253.py | 1 | 1741 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 06:53
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('explorer', '0007_auto_20170626_0543'),
]
operation... | mit | 2,262,988,717,029,549,800 | 34.530612 | 138 | 0.589316 | false | 4.23601 | false | false | false |
Geoportail-Luxembourg/geoportailv3 | geoportal/geoportailv3_geoportal/scripts/db2es.py | 1 | 3233 | # -*- coding: utf-8 -*-
from pyramid.paster import bootstrap
import psycopg2
from psycopg2.extras import DictCursor
import sys
import getopt
import json
from elasticsearch import helpers
from elasticsearch.helpers import BulkIndexError
from elasticsearch.exceptions import ConnectionTimeout
from geoportailv3_geoportal.... | mit | 1,212,416,682,987,955,200 | 28.390909 | 91 | 0.534488 | false | 4.051378 | false | false | false |
dlsun/symbulate | symbulate/index_sets.py | 1 | 1353 | import numbers
class IndexSet(object):
def __init__(self):
return
def __getitem__(self, t):
if t in self:
return t
else:
raise KeyError("Time %.2f not in index set." % t)
def __contains__(self, value):
return False
def __eq__(self, other):
... | mit | 5,717,099,780,918,022,000 | 18.328571 | 61 | 0.503326 | false | 4.112462 | false | false | false |
MPBAUnofficial/cmsplugin_image_gallery | cmsplugin_image_gallery/models.py | 1 | 4086 | import threading
from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from inline_ordering.models import Orderable
from filer.fields.image import FilerImageField
from django.core.exceptions import ValidationError
import utils
localdata = threading.loca... | bsd-2-clause | -7,195,980,818,986,026,000 | 37.186916 | 117 | 0.453255 | false | 5.477212 | false | false | false |
eyzhou123/python-games | tetris.py | 1 | 10241 | #tetris.py
from Tkinter import *
import random
def tetrisMousePressed(canvas,event):
tetrisRedrawAll(canvas)
def tetrisKeyPressed(canvas,event):
if event.keysym == "r":
tetrisInit(canvas)
if (canvas.data.isTetrisGameOver == False):
if event.keysym == "Left":
moveFallingPiece(c... | mit | 5,614,054,969,684,136,000 | 36.375912 | 91 | 0.671224 | false | 3.19532 | false | false | false |
KeserOner/where-artists-share | was/artists/models.py | 1 | 1280 | from django.contrib.auth.models import User
from django.db import models
from django.dispatch.dispatcher import receiver
class Artists(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
artist_image = models.ImageField(
verbose_name="Artist's profile image",
null=True,... | mit | 6,011,123,594,670,129,000 | 25.666667 | 83 | 0.646094 | false | 3.855422 | false | false | false |
zinid/mrim | src/protocol.py | 1 | 19357 | from mmptypes import *
import utils
import UserDict
import cStringIO
import socket
import struct
import email
from email.Utils import parsedate
wp_request = {}
wp_request_reversed = {}
for k,v in [(key, locals()[key]) for key in locals().keys() if key.startswith('MRIM_CS_WP_REQUEST_PARAM')]:
wp_request[v] = k
for ... | gpl-3.0 | -3,714,155,334,947,474,000 | 26.613409 | 107 | 0.631916 | false | 2.664418 | false | false | false |
gw280/skia | tools/test_pictures.py | 1 | 6084 | '''
Compares the rendererings of serialized SkPictures to expected images.
Launch with --help to see more information.
Copyright 2012 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
'''
# common Python modules
import os
import optparse
import sys
import ... | bsd-3-clause | -5,432,955,374,800,524,000 | 33.179775 | 80 | 0.609796 | false | 4.11916 | false | false | false |
nosix/PyCraft | src/pycraft/service/composite/entity/monster.py | 1 | 1206 | # -*- coding: utf8 -*-
from pycraft.service.const import EntityType
from pycraft.service.primitive.geometry import Size
from .base import MobEntity
from .player import PlayerEntity
class MonsterEntity(MobEntity):
def has_hostile(self, entity):
return isinstance(entity, PlayerEntity)
class Zombie(M... | lgpl-3.0 | 2,602,586,687,267,260,000 | 18.451613 | 51 | 0.64262 | false | 2.963145 | false | false | false |
diofant/diofant | diofant/core/function.py | 1 | 77992 | """
There are three types of functions implemented in Diofant:
1) defined functions (in the sense that they can be evaluated) like
exp or sin; they have a name and a body:
f = exp
2) undefined function which have a name but no body. Undefined
functions can be defined using a Function c... | bsd-3-clause | -4,774,232,828,554,274,000 | 32.3727 | 107 | 0.553057 | false | 3.799113 | false | false | false |
droundy/deft | papers/thesis-kirstie/figs/plot_LJ_Potential.py | 1 | 1142 | #!/usr/bin/python3
#RUN this program from the directory it is listed in
#with command ./plot_LJ_Potential.py
from scipy import special
import numpy as np
import matplotlib.pyplot as plt
import math
#Plot WCA Potential vs r
#R=1/1.781797436 #for a sigma=1 DOESN'T WORK!! graph wrong shape!
R=1/1.781797436
epsilo... | gpl-2.0 | -5,032,273,101,040,815,000 | 23.826087 | 113 | 0.697023 | false | 2.344969 | false | false | false |
MRCIEU/melodi | melodi/settings.py | 1 | 8804 | """
Django settings for melodi project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths... | mit | -2,412,759,635,708,730,400 | 26.860759 | 100 | 0.578828 | false | 3.29491 | false | false | false |
JonathanSeguin/Mariana | Mariana/regularizations.py | 1 | 1924 | from Mariana.abstraction import Abstraction_ABC
__all__ = ["SingleLayerRegularizer_ABC", "L1", "L2", "ActivationL1"]
class SingleLayerRegularizer_ABC(Abstraction_ABC) :
"""An abstract regularization to be applied to a layer."""
def apply(self, layer) :
"""Apply to a layer and update networks's log"""
hyps = {}... | apache-2.0 | -8,295,609,861,615,857,000 | 26.898551 | 79 | 0.692308 | false | 3.228188 | false | false | false |
crentagon/chess-with-benefits | game/chess/show_piece_stats.py | 1 | 2090 |
def run(self, board_input, i, j):
origin_piece = board_input[i][j].piece
max_control = {
1: 2,
3: 8,
4: 13,
5: 14,
9: 27,
0: 8
}
origin_piece.status = 'Healthy'
is_threatened_undefended = len(origin_piece.attackers) > len(origin_piece.defenders)
is_threatened_by_lower_rank = [x for x in origin_pie... | gpl-3.0 | -6,851,965,051,956,522,000 | 36.339286 | 107 | 0.728708 | false | 2.906815 | false | false | false |
leahrnh/ticktock_text_api | breakdown_detector.py | 1 | 1533 | import readall
import gensim
import nltk
import numpy as np
import pickle
# we need to extract some features, now we make it easy now to just use the word2vec, one turn previous turn.
#
model = gensim.models.Word2Vec.load('/tmp/word2vec_50_break')
all_v1 = readall.readall('/home/ubuntu/zhou/Backend/rating_log/v1')
all... | gpl-2.0 | 3,179,714,820,388,494,300 | 40.432432 | 109 | 0.589693 | false | 3.275641 | false | false | false |
PercyODI/PythonCSharpOOComparison | Utilities/checkLinks.py | 1 | 1091 | import sys, os, re
pattern = re.compile('\[.+\]\((?P<file>.+?)\)', re.MULTILINE) # Matches [text](directory/file.md)
folderDict = {}
numBadLinks = 0;
os.chdir("..") # Assumes this utility is one directory deep.
startDirectory = os.path.abspath(".")
mdFiles = []
for root, subFolders, files in os.walk("."):
if("\... | mit | 8,224,985,454,478,719,000 | 30.171429 | 97 | 0.583868 | false | 3.388199 | false | false | false |
ActiveState/code | recipes/Python/577746_Inherit_Method_Docstrings_Using_Only/recipe-577746.py | 1 | 2640 | """docfunc module"""
from deferred_binder import DeferredBinder
class DocFunc(DeferredBinder):
TRIGGER = None
def __init__(self, f):
super().__init__(f.__name__, f)
self.f = self.target
@staticmethod
def transform(name, context, target, obj=None):
"""The DeferredBinder trans... | mit | 191,561,495,246,149,060 | 31.592593 | 81 | 0.5875 | false | 4.714286 | false | false | false |
google/cauliflowervest | cauliflowervest/client/base_client.py | 1 | 9496 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 633,161,878,087,102,700 | 32.202797 | 86 | 0.682393 | false | 3.763773 | false | false | false |
jeremiedecock/pyai | ailib/optimize/functions/unconstrained.py | 1 | 31848 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017,2018,2019 Jeremie DECOCK (http://www.jdhp.org)
# 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, inclu... | mit | -930,977,634,268,075,000 | 28.453284 | 209 | 0.565847 | false | 3.447272 | false | false | false |
gavein/sleeping-god | SleepingGodObjects/Vessel.py | 1 | 2849 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
from Constants import WEAR_AT_TURN, OXYGEN_AT_TURN, CARGO_WATER, CARGO_MINERALS
from SleepingGodObjects.GameObjects import GameObject
class Vessel(GameObject):
def __init__(
self,
pos_x,
pos_y,
char,
... | gpl-3.0 | -8,537,353,593,604,741,000 | 25.259259 | 79 | 0.420663 | false | 4.158358 | false | false | false |
ipfire/collecty | src/collecty/plugins/processor.py | 1 | 7032 | #!/usr/bin/python3
###############################################################################
# #
# collecty - A system statistics collection daemon for IPFire #
# Copyright (C) 2012 IPFire development team ... | gpl-3.0 | -3,983,568,614,264,902,000 | 29.441558 | 83 | 0.558447 | false | 2.773964 | false | false | false |
cloudify-cosmo/cloudify-nsx-plugin | cloudify_nsx/network/dhcp_bind.py | 1 | 5021 | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. 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... | apache-2.0 | 6,749,471,616,254,207,000 | 33.390411 | 79 | 0.468632 | false | 4.495076 | false | false | false |
cajone/pychess | lib/pychess/widgets/pydock/PyDockTop.py | 1 | 9627 | from __future__ import absolute_import
from __future__ import print_function
import os
from xml.dom import minidom
from collections import defaultdict
from pychess.System.prefix import addDataPrefix
from .PyDockLeaf import PyDockLeaf
from .PyDockComposite import PyDockComposite
from .ArrowButton import ArrowButton
... | gpl-3.0 | 4,931,489,659,849,762,000 | 36.901575 | 112 | 0.52976 | false | 4.469359 | false | false | false |
xju2/hzzws | scripts/low_mass.py | 1 | 2906 | #!/usr/bin/env python
import common
import glob
name = "Low"
binning = "60, 110, 140"
branch = "m4l_constrained, "+binning
###in workspace
obs_binning = binning
# key: category name
# value: TCut on mini-tree
categories = {
"ggF_4mu_13TeV" : "(event_type==0)",
"ggF_2mu2e_13TeV" : "(event_type==2)",
"ggF... | mit | -8,342,612,487,512,922,000 | 32.790698 | 174 | 0.652787 | false | 2.41965 | false | false | false |
Lothiraldan/OneTask | onetask/tests.py | 1 | 4351 | # -*- coding: utf-8 -*-
import os
import json
import tempfile
import unittest
from .collection import TaskCollection
from subprocess import check_output, CalledProcessError
class TaskCollectionTest(unittest.TestCase):
def _create_db(self, **kwargs):
temp = tempfile.NamedTemporaryFile(prefix='onetasktest... | mit | -1,090,320,991,968,640,100 | 38.198198 | 80 | 0.580326 | false | 3.84364 | true | false | false |
looooo/pivy | scons/scons-local-1.2.0.d20090919/SCons/Tool/ifort.py | 1 | 3365 | """SCons.Tool.ifort
Tool-specific initialization for newer versions of the Intel Fortran Compiler
for Linux/Windows (and possibly Mac OS X).
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) ... | isc | -7,407,020,927,223,222,000 | 36.388889 | 89 | 0.685587 | false | 3.714128 | false | false | false |
bitglue/shinysdr | shinysdr/plugins/vor/__init__.py | 1 | 9491 | # Copyright 2013, 2014, 2015, 2016, 2017 Kevin Reid <kpreid@switchb.org>
#
# This file is part of ShinySDR.
#
# ShinySDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... | gpl-3.0 | 5,031,653,032,306,906,000 | 37.738776 | 203 | 0.611632 | false | 3.458819 | false | false | false |
yafeunteun/wikipedia-spam-classifier | revscoring/revscoring/utilities/fit.py | 1 | 2484 | """
``revscoring fit -h``
::
Fits a dependent (an extractable value like a Datasource or Feature) to
observed data. These are often used along with bag-of-words
methods to reduce the feature space prior to training and testing a model
or to train a sub-model.
Usage:
fit -h | --help
... | mit | -7,085,234,002,436,981,000 | 30.846154 | 77 | 0.593398 | false | 4.167785 | false | false | false |
stensonowen/spim-grader | spim-grader.py | 2 | 3172 | #!/usr/bin/python
'''
SPIM Auto-grader
Owen Stenson
Grades every file in the 'submissions' folder using every test in the 'samples' folder.
Writes to 'results' folder.
'''
import os, time, re
from subprocess import Popen, PIPE, STDOUT
def run(fn, sample_input='\n'):
#start process and write input
p... | gpl-2.0 | 1,135,793,950,941,566,300 | 34.45977 | 116 | 0.57913 | false | 3.7717 | false | false | false |
FCP-INDI/C-PAC | CPAC/utils/tests/test_datasource.py | 1 | 2537 |
import os
import json
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from CPAC.utils.test_resources import setup_test_wf
from CPAC.utils.datasource import match_epi_fmaps
def test_match_epi_fmaps():
# good data to use
s3_prefix = "s3://fcp-indi/data/Projects... | bsd-3-clause | -464,176,579,860,499,840 | 37.439394 | 99 | 0.573906 | false | 2.876417 | false | false | false |
elishowk/flaskexperiment | commonecouteserver/data/__init__.py | 1 | 6483 | # -*- coding: utf-8 -*-
# Copyright (c) 2011 CommOnEcoute http://commonecoute.com
#
# 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.
#
# This program is distributed in the hope that it... | agpl-3.0 | 1,303,229,853,120,405,800 | 31.742424 | 126 | 0.586303 | false | 3.849762 | false | false | false |
alexherns/biotite-scripts | cluster_coverage.py | 1 | 2808 | #!/usr/bin/env python2.7
import sys, operator, argparse
from Bio import SeqIO
parser = argparse.ArgumentParser(description='''Prints out the coverage values for each cluster, by sample and total.
Also lists number of hits in each cluster.''', formatter_class=argparse.ArgumentDefaultsHelpFormatter, add_help=False,
epil... | mit | 7,550,752,532,490,339,000 | 32.428571 | 118 | 0.691595 | false | 3.319149 | false | false | false |
mackong/gitql | prettytable/prettytable.py | 1 | 54214 | #!/usr/bin/env python
#
# Copyright (c) 2009-2013, Luke Maurits <luke@maurits.id.au>
# All rights reserved.
# With contributions from:
# * Chris Clark
# * Klein Stephane
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:... | mit | 8,584,577,250,778,788,000 | 35.755254 | 207 | 0.569927 | false | 4.066762 | false | false | false |
croxis/SpaceDrive | spacedrive/renderpipeline/rpplugins/vxgi/voxelization_stage.py | 1 | 8394 | """
RenderPipeline
Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.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 without restriction, including without limitation the right... | mit | -8,389,214,982,361,238,000 | 40.826531 | 99 | 0.644508 | false | 3.399757 | false | false | false |
rameshg87/pyremotevbox | pyremotevbox/ZSI/twisted/WSsecurity.py | 1 | 13760 | ###########################################################################
# Joshua R. Boverhof, LBNL
# See Copyright for copyright notice!
# $Id: WSsecurity.py 1134 2006-02-24 00:23:06Z boverhof $
###########################################################################
import sys, time, warnings
import sha, base6... | apache-2.0 | 5,371,576,649,039,104,000 | 34.372751 | 90 | 0.566061 | false | 4.688245 | false | false | false |
o5k/openerp-oemedical-v0.1 | openerp/addons/smsclient/smsclient.py | 1 | 17026 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2011 SYLEAM (<http://syleam.fr/>)
# Copyright (C) 2013 Julius Network Solutions SARL <co... | agpl-3.0 | -7,570,020,406,153,420,000 | 40.730392 | 148 | 0.508458 | false | 4.061546 | false | false | false |
bderembl/mitgcm_configs | eddy_airsea/analysis/ode_wave.py | 1 | 1112 | #!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate as integrate
plt.ion()
f0 = 1e-4
u0 = 1.0
R0 = 40e3 # radius
vmax = -1.0 # m/s
def v1(rr):
v = -vmax*rr/R0*np.exp(-0.5*(rr/R0)**2)
# v = -vmax*np.tanh(rr/R0)/(np.cosh(rr/R0))**2/(np.tanh(1.0)/(np.cosh(1.0))... | mit | -6,112,656,027,416,300,000 | 23.173913 | 133 | 0.579137 | false | 1.891156 | false | false | false |
cmc333333/regulations-parser | regparser/tree/paragraph.py | 1 | 6226 | import hashlib
import re
from regparser.tree import struct
from regparser.tree.depth import markers as mtypes
from regparser.search import segments
p_levels = [list(mtypes.lower), list(mtypes.ints), list(mtypes.roman),
list(mtypes.upper), list(mtypes.em_ints), list(mtypes.em_roman)]
def p_level_of(mark... | cc0-1.0 | 749,164,101,625,689,200 | 40.785235 | 79 | 0.596209 | false | 3.905897 | false | false | false |
eamars/webserver | site-package/roster/sql.py | 1 | 4194 | import mysql.connector
SQL_CREATE_TABLE = \
"""
CREATE TABLE `{}` (
`date` date NOT NULL UNIQUE,
`chair` char(64) NOT NULL DEFAULT '',
`minute` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
"""
def create_database(cursor, database_name):
try:
curs... | mit | -4,404,401,249,818,260,000 | 27.147651 | 97 | 0.572246 | false | 4.083739 | false | false | false |
shear/rppy | rppy/fluid.py | 2 | 5952 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# rppy - a geophysical library for Python
# Copyright (c) 2014, Sean M. Contenti
# 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. Re... | bsd-2-clause | -4,058,591,948,400,436,700 | 36.670886 | 79 | 0.544859 | false | 2.808872 | false | false | false |
cmacmackin/ford | ford/graphs.py | 1 | 48315 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# graphs.py
# This file is part of FORD.
#
# Copyright 2015 Christopher MacMackin <cmacmackin@gmail.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 Softwa... | gpl-3.0 | 925,564,929,856,560,600 | 39.329716 | 206 | 0.522881 | false | 3.937653 | false | false | false |
fedora-desktop-tests/evolution | features/steps/calendar_event_editor.py | 1 | 22024 | # -*- coding: UTF-8 -*-
from behave import step, then
from dogtail.predicate import GenericPredicate
from dogtail.tree import root
from dogtail.rawinput import keyCombo, typeText
from time import sleep
from behave_common_steps import wait_until
import datetime
import os
@step(u'Create new appointment')
def create_new... | gpl-2.0 | -8,544,367,351,086,763,000 | 38.188612 | 98 | 0.65583 | false | 3.618203 | false | false | false |
elioth010/lugama | src/model/orm/Model.py | 1 | 1482 | '''
Created on Jan 8, 2016
@author: elioth010
'''
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.session import sessionmaker
from sqlalchemy.sql.expression import text
from model.orm.DB import DB
class Model(DB):
'''
classdocs
'''
base = None
SessionFactory = No... | gpl-2.0 | -388,907,434,122,378,400 | 22.903226 | 78 | 0.557355 | false | 4.384615 | false | false | false |
mushtaqak/edx-platform | lms/envs/devstack.py | 1 | 6327 | """
Specific overrides to the base prod settings to make development easier.
"""
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
# Don't use S3 in devstack, fall back to filesystem
del DEFAULT_FILE_STORAGE
MEDIA_ROOT = "/edx/var/edxapp/uploads"
DEBUG = True
USE_I18N = True
TEMPLATE_DEB... | agpl-3.0 | 8,309,838,323,921,532,000 | 32.47619 | 126 | 0.595543 | false | 3.825272 | false | false | false |
adbar/htmldate | htmldate/validators.py | 1 | 7114 | # pylint:disable-msg=E0611,I1101
"""
Filters for date parsing and date validators.
"""
## This file is available from https://github.com/adbar/htmldate
## under GNU GPL v3 license
# standard
import datetime
import logging
import time
from collections import Counter
from functools import lru_cache
from .settings imp... | gpl-3.0 | -6,857,535,308,415,212,000 | 36.640212 | 103 | 0.606129 | false | 4.051253 | true | false | false |
openqt/algorithms | extras/kaprekar_number.py | 1 | 1328 | # coding=utf-8
"""
卡布列克数
http://group.jobbole.com/26887/
有一种数被称为卡布列克数,其形式如:45 * 45 = 2025 并且 20+25=45,这样 45 就是一个
卡布列克数。
它标准定义如下:
若正整数X在N进制下的平方可以分割为二个数字,而这二个数字相加后恰等于X,那么X就是
N进制下的卡布列克数。
分解后的数字必须是正整数才可以,例如:10*10=100 并且 10+0=10,因为0不是正整数,
所以10不是卡布列克数。
现在题目的要求是给定你一个范围[a,b](b大于等于a,a大于等于0),你需要把这个范围内的
卡布列克数全... | gpl-3.0 | -7,367,578,442,279,746,000 | 17.88 | 55 | 0.595339 | false | 1.636049 | false | false | false |
google-research/google-research | simulation_research/signal_processing/spherical/spherical_harmonics.py | 1 | 5602 | # 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 | -9,107,182,008,301,480,000 | 38.183099 | 88 | 0.687275 | false | 3.409314 | false | false | false |
tensorflow/ecosystem | data_service/tf_std_data_server.py | 1 | 2000 | # 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 | 4,136,536,005,482,894,300 | 38.215686 | 130 | 0.688 | false | 4.192872 | false | false | false |
abramhindle/slowdraw | slowdraw.py | 1 | 5288 | #!/usr/bin/env python
''' Slowdraw watches an image file and makes animations out of the changes
'''
import sys
import cv2
import cv
import numpy as np
import logging
import time
import argparse
import watchdog
import os.path
import pickle
import math
from watchdog.observers import Observer
parser = argparse.Argument... | gpl-3.0 | 8,090,950,691,469,998,000 | 28.707865 | 114 | 0.628404 | false | 2.980834 | false | false | false |
rhelmer/socorro-lib | socorro/unittest/external/postgresql/test_backfill.py | 1 | 12534 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from .unittestbase import PostgreSQLTestCase
from nose.plugins.attrib import attr
from nose.tools import eq_, assert_rai... | mpl-2.0 | 5,271,359,420,006,023,000 | 35.017241 | 79 | 0.390618 | false | 4.763968 | true | false | false |
kylewray/nova | python/nova/nova_pomdp.py | 1 | 6240 | """ The MIT License (MIT)
Copyright (c) 2015 Kyle Hollins Wray, University of Massachusetts
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 ... | mit | 2,637,093,861,809,474,000 | 47.372093 | 98 | 0.565705 | false | 3.604853 | false | false | false |
googleads/googleads-python-lib | examples/ad_manager/v202011/team_service/update_teams.py | 1 | 2271 | #!/usr/bin/env python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | -2,277,132,433,655,368,400 | 32.397059 | 77 | 0.712902 | false | 3.942708 | false | false | false |
starius/wt-classes | examples/make-all.py | 1 | 1140 | #!/usr/bin/python
import sys
import re
from optparse import OptionParser
entrypoints = []
anchors = []
parser = OptionParser()
parser.add_option("--cpp", dest="cpp")
parser.add_option("--template", dest="template")
parser.add_option("--wrasterimage", dest="wrasterimage", action="store_true")
(options, args) = parser... | gpl-2.0 | 7,167,563,787,169,136,000 | 31.571429 | 77 | 0.592105 | false | 3.392857 | false | false | false |
SMTorg/smt | smt/applications/mfk.py | 1 | 27540 | # -*- coding: utf-8 -*-
"""
Created on Fri May 04 10:26:49 2018
@author: Mostafa Meliani <melimostafa@gmail.com>
Multi-Fidelity co-Kriging: recursive formulation with autoregressive model of
order 1 (AR1)
Adapted on January 2021 by Andres Lopez-Lopera to the new SMT version
"""
from copy import deepcopy
import numpy... | bsd-3-clause | 8,541,336,273,020,419,000 | 35.769025 | 141 | 0.510022 | false | 3.578017 | false | false | false |
EricRahm/log-spam-hell | logspam/bisect.py | 1 | 10157 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from collections import Counter
from logspam import WARNING_RE
from logspam.cli import BaseCommandLineArgs
from logspam... | mpl-2.0 | 8,093,395,756,673,294,000 | 37.184211 | 88 | 0.57773 | false | 4.145714 | true | false | false |
KarrLab/obj_model | tests/fixtures/migrate/wc_lang_fixture/wc_lang/transform/split_reversible_reactions.py | 1 | 5346 | """ Transform models.
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2018-06-19
:Copyright: 2018, Karr Lab
:License: MIT
"""
from .core import Transform
from wc_lang import Model, Reaction, RateLawDirection
from wc_onto import onto
from wc_utils.util.ontology import are_terms_equivalent
import copy
import re
class S... | mit | -2,379,198,555,471,933,400 | 45.894737 | 129 | 0.491957 | false | 4.74778 | false | false | false |
PaddlePaddle/models | dygraph/mobilenet/imagenet_dataset.py | 1 | 1987 | # Copyright (c) 2020 PaddlePaddle 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 appli... | apache-2.0 | 260,625,212,117,591,070 | 33.859649 | 74 | 0.636135 | false | 4.148225 | false | false | false |
lillisgary/shiny-shame | theme/admin.py | 1 | 1252 | from django.contrib import admin
from .models import HomePage, Slide, IconBlurb, Portfolio, PortfolioItemImage, PortfolioItem, PortfolioItemCategory, TextSlider, DocumentListItem, DocumentList, DocumentListItemCategory
from mezzanine.core.admin import TabularDynamicInlineAdmin
from mezzanine.pages.admin import PageAdmi... | gpl-2.0 | 8,358,480,571,464,116,000 | 34.771429 | 185 | 0.835463 | false | 3.888199 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.