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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
silly-wacky-3-town-toon/SOURCE-COD | toontown/toon/HealthForceAcknowledge.py | 1 | 1051 | from panda3d.core import *
from panda3d.direct import *
from toontown.toontowngui import TTDialog
from toontown.toonbase import TTLocalizer
class HealthForceAcknowledge:
def __init__(self, doneEvent):
self.doneEvent = doneEvent
self.dialog = None
return
def enter(self, hpLevel):
... | apache-2.0 | 7,702,661,583,729,185,000 | 30.848485 | 104 | 0.629876 | false | 3.713781 | false | false | false |
franga2000/django-machina | machina/apps/forum_search/search_indexes.py | 1 | 1614 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from haystack import indexes
from machina.core.db.models import get_model
Post = get_model('forum_conversation', 'Post')
class PostIndex(indexes.SearchIndex, indexes.Indexable):
"""
Defines the data stored in the Post indexes.
"""
te... | bsd-3-clause | 5,051,276,047,052,647,000 | 27.821429 | 91 | 0.684634 | false | 3.815603 | false | false | false |
joakim-hove/ert | python/tests/gui/ide/wizards/test_tree_structure.py | 1 | 1597 | import sys
if sys.version_info[0] == 2:
from PyQt4.QtCore import Qt
else:
from PyQt5.QtCore import Qt
from ert_gui.ide.wizards import TreeItem, TreeModel
from tests import ErtTest
class TreeStructureTest(ErtTest):
def test_tree_item(self):
root = TreeItem("Root")
self.assertIsNone(root.p... | gpl-3.0 | -7,638,916,199,246,243,000 | 21.180556 | 72 | 0.618034 | false | 3.4869 | true | false | false |
Edraak/edraak-platform | openedx/core/djangoapps/user_api/views.py | 1 | 15954 | """HTTP end-points for the User API. """
import logging
import jwt
from django.contrib.auth.models import User
from django.core.exceptions import NON_FIELD_ERRORS, PermissionDenied, ValidationError
from django.db import transaction
from django.conf import settings
from django.db.utils import DatabaseError
from django... | agpl-3.0 | 6,819,028,792,097,141,000 | 37.167464 | 124 | 0.659897 | false | 4.471413 | false | false | false |
loopCM/chromium | chrome/common/extensions/docs/server2/render_servlet.py | 1 | 3580 | # Copyright 2013 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.
from fnmatch import fnmatch
import logging
import mimetypes
import os
import traceback
from appengine_wrappers import IsDevServer
from branch_utility import... | bsd-3-clause | 3,121,445,424,191,873,500 | 34.098039 | 78 | 0.669832 | false | 4.026997 | false | false | false |
RhubarbSin/arin-reg-rws | regrws/payload/org.py | 1 | 73155 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Tue Aug 6 14:52:51 2013 by generateDS.py version 2.10a.
#
# Copyright (C) 2011,2012,2013 American Registry for Internet Numbers
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provi... | mit | -2,681,568,108,049,449,500 | 40.330508 | 240 | 0.573003 | false | 4.018622 | false | false | false |
tcalmant/ipopo | docs/_static/tutorials/spell_checker/main_pelix_launcher.py | 1 | 2293 | #!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
Starts a Pelix framework and installs the Spell Checker bundles
"""
# Pelix framework module and utility methods
import pelix.framework
from pelix.utilities import use_service
# Standard library
import logging
def main():
"""
Starts a Pelix framework and... | apache-2.0 | 3,331,257,815,181,722,600 | 33.223881 | 79 | 0.692543 | false | 4.022807 | true | false | false |
joshuahoman/vivisect | envi/registers.py | 3 | 13660 | """
Similar to the memory subsystem, this is a unified way to
access information about objects which contain registers
"""
import envi.bits as e_bits
from envi.const import *
class InvalidRegisterName(Exception):
pass
class RegisterContext:
def __init__(self, regdef=(), metas=(), pcindex=None, spindex=None,... | apache-2.0 | 7,769,854,849,527,615,000 | 30.693735 | 88 | 0.587408 | false | 4.017647 | false | false | false |
gvnn3/PCS | scripts/expect.py | 1 | 2665 | #!/usr/bin/env python
# Copyright (c) 2008, Bruce M. Simpson.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# Redistributions of source code must retain the above copyright notice,
# this li... | bsd-3-clause | -7,010,018,739,505,616,000 | 34.533333 | 72 | 0.733208 | false | 3.901903 | false | false | false |
JDevlieghere/dotfiles | scripts/llvm-cmake.py | 1 | 4895 | #!/usr/bin/env python
import argparse
import six
import subprocess
def parallel_link_jobs():
try:
import multiprocessing
cpus = multiprocessing.cpu_count()
return max(cpus / 4, 2)
except:
return 2
parser = argparse.ArgumentParser(
description=
"CMake configuration op... | mit | -3,132,090,633,973,661,700 | 29.216049 | 78 | 0.610623 | false | 3.469171 | false | false | false |
n3wb13/OpenNfrGui-5.0-1 | lib/python/Plugins/Extensions/MediaPortal/additions/fun/lasershowtv.py | 1 | 4930 | # -*- coding: utf-8 -*-
from Plugins.Extensions.MediaPortal.plugin import _
from Plugins.Extensions.MediaPortal.resources.imports import *
from Plugins.Extensions.MediaPortal.additions.fun.fashionguidetv import GermanyTVPlayer, GermanyTVPlayer2, GermanyTVPlaylist
from Plugins.Extensions.MediaPortal.resources.twagenthe... | gpl-2.0 | 3,343,308,298,625,820,000 | 34.460432 | 126 | 0.668425 | false | 2.712163 | false | false | false |
amjames/psi4 | psi4/share/psi4/databases/NCB31.py | 1 | 53530 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 | 2,033,315,937,200,871,200 | 50.570328 | 140 | 0.505679 | false | 2.458324 | false | false | false |
siye1982/kafkey | app/__init__.py | 1 | 1332 | # -*- coding:utf-8 -*-
from flask import Flask
from flask.ext.bootstrap import Bootstrap
from flask.ext.moment import Moment
from flask.ext.sqlalchemy import SQLAlchemy
from config import config
from elasticsearch import Elasticsearch
db = SQLAlchemy()
bootstrap = Bootstrap()
moment = Moment()
es = None
def creat... | bsd-2-clause | -7,986,978,497,700,044,000 | 25.64 | 78 | 0.743243 | false | 3.838617 | true | false | false |
kubernetes-client/python | scripts/constants.py | 1 | 1303 | # Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 | -2,676,456,598,423,885,000 | 30.780488 | 74 | 0.707598 | false | 3.670423 | false | false | false |
redref/tantale | src/tantale/client/source.py | 1 | 2415 | # coding=utf-8
from __future__ import print_function
import time
import logging
import traceback
class BaseSource(object):
def __init__(self, config, checks, res_q):
self.log = logging.getLogger('tantale.client')
self.config = config
self.checks = checks
self.res_q = res_q
... | apache-2.0 | 8,866,604,646,129,723,000 | 27.081395 | 75 | 0.533747 | false | 4.281915 | false | false | false |
rbuffat/pyidf | tests/test_refrigerationairchiller.py | 1 | 8134 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.refrigeration import RefrigerationAirChiller
log = logging.getLogger(__name__)
class TestRefrigerationAirChiller(unittest.TestCase):
def setUp(self):
self.fd, self.... | apache-2.0 | -6,380,076,978,690,454,000 | 54.719178 | 223 | 0.719203 | false | 3.400502 | false | false | false |
Zahajamaan/Fudulbank | exams/migrations/0073_unique_answer_per_session.py | 1 | 1382 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-03-10 15:23
from __future__ import unicode_literals
from django.db import migrations
from django.db import connection
def remove_non_unique(apps, schema_editor):
Answer = apps.get_model('exams', 'Answer')
with connection.cursor() as cursor:
... | agpl-3.0 | 736,385,781,924,827,000 | 38.485714 | 137 | 0.628075 | false | 3.959885 | false | false | false |
SchrodingersGat/InvenTree | InvenTree/company/api.py | 1 | 11746 | """
Provides a JSON API for the Company app
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import filters
from rest_framework import generics
from django.conf.urls import url, include
from django.db.models import Q... | mit | 906,781,146,039,471,500 | 25.336323 | 120 | 0.638004 | false | 4.342329 | false | false | false |
PyORBIT-Collaboration/JPARC_Accelerator | JPARC_Linac/jparc_linac_model/pyorbit_jparc_linac_quad_field_distributions.py | 1 | 3547 | #! /usr/bin/env python
"""
This script will print out the quadrupole field gradient
distribution in accelerator sequences in the JPARC Linac.
The files will include results for the case of hard edge quads
and the distributed quadrupole fields described by Enge's and
PMQ Trace3D functions.
"""
import sys
import math
... | mit | 4,000,134,455,554,649,000 | 33.436893 | 98 | 0.669862 | false | 2.72427 | false | false | false |
numberoverzero/bloop | bloop/engine.py | 1 | 17323 | import logging
from typing import Any, Callable, Union
from .conditions import render
from .exceptions import (
InvalidModel,
InvalidStream,
InvalidTemplate,
MissingObjects,
)
from .models import BaseModel, Index, subclassof, unpack_from_dynamodb
from .search import Search
from .session import SessionW... | mit | 902,141,634,128,397,200 | 41.985112 | 117 | 0.60971 | false | 4.123542 | false | false | false |
redhat-openstack/trove | trove/module/models.py | 1 | 14943 | # Copyright 2016 Tesora, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | 8,401,372,176,008,957,000 | 37.315385 | 78 | 0.609918 | false | 4.236745 | false | false | false |
realityone/flaskbb | flaskbb/auth/forms.py | 1 | 5022 | # -*- coding: utf-8 -*-
"""
flaskbb.auth.forms
~~~~~~~~~~~~~~~~~~
It provides the forms that are needed for the auth views.
:copyright: (c) 2014 by the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
from flask_wtf import Form
from wtforms import (StringField, PasswordField, Boolean... | bsd-3-clause | -130,395,179,056,782,450 | 32.48 | 79 | 0.6364 | false | 4.697848 | false | false | false |
pysmt/pysmt | examples/parallel.py | 1 | 4260 | # This example requires Z3
#
# This example shows how to parallelize solving using pySMT, by using
# the multiprocessing library.
#
# All shortcuts (is_sat, is_unsat, get_model, etc.) can be easily
# used. We sho two techniques: map and apply_async.
#
# Map applies a given function to a list of elements, and returns a
... | apache-2.0 | -5,936,125,348,500,963,000 | 35.101695 | 74 | 0.730751 | false | 3.55 | false | false | false |
mattmcd/PyAnalysis | mda/db.py | 1 | 3159 | from sqlalchemy import create_engine
from sqlalchemy_utils.functions import create_database, database_exists
from docker import Client
from docker.utils import create_host_config
class Database():
def __init__(self, name='testdb'):
db_port = 5432
proxy_port = 5432
self.db_name = 'db' #... | apache-2.0 | 7,626,717,246,503,249,000 | 34.897727 | 81 | 0.566635 | false | 3.664733 | false | false | false |
roberzguerra/rover | scout_group/models.py | 1 | 4978 | # -*- coding:utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.db import models
from mezzanine.core.fields import RichTextField, FileField
from mezzanine.core.managers import SearchableManager
from mezzanine.core.models import Displayable, RichText, Slugged
from mezzanine.pages.models impor... | bsd-3-clause | 1,399,393,812,629,954,300 | 38.728 | 161 | 0.633233 | false | 3.226121 | false | false | false |
shenfei/chocolate-frog | weekly_report/report.py | 1 | 5073 | # coding: utf-8
from __future__ import absolute_import
from datetime import datetime, timedelta
from dateutil.parser import parse as time_parse
from pytz import reference
from trello import TrelloClient
from config import (
TRELLO_CONFIG,
BOARD_ID,
DOING_LISTS,
DONE_LISTS,
DEV_MEMBERS
)
def get... | gpl-2.0 | 5,520,180,862,478,763,000 | 35.698529 | 79 | 0.578241 | false | 3.397549 | true | false | false |
thouska/spotpy | spotpy/examples/spot_setup_rosenbrock.py | 1 | 1672 | '''
Copyright 2015 by Tobias Houska
This file is part of Statistical Parameter Optimization Tool for Python (SPOTPY).
:author: Tobias Houska
This example implements the Rosenbrock function into a SPOTPY class.
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_funct... | mit | -7,185,380,131,368,870,000 | 33.122449 | 88 | 0.636962 | false | 3.619048 | false | false | false |
wangkua1/sportvu | sportvu/model/seq2seq.py | 1 | 11291 | from __future__ import division
import tensorflow as tf
import numpy as np
from utils import *
class Seq2Seq:
"""
"""
def __init__(self, config):
self.config = config
self.d1 = config['d1']
self.d2 = config['d2']
self.conv_layers = config['conv_layers']
self.fc_la... | mit | 5,121,942,530,644,676,000 | 44.712551 | 137 | 0.555132 | false | 3.192253 | true | false | false |
justanotherbrain/HebbLearn | demo.py | 1 | 1724 | import sys
import os.path
import HebbLearn as hl
import numpy as np
import matplotlib.pyplot as plt
try:
import h5py
except:
print('h5py cannot be loaded - may cause error')
pass
fl = hl.NonlinearGHA()
if os.path.isfile('processed_data.npy'):
print('==> Load previously saved (preprocessed) data')
... | mit | 9,174,103,842,749,542,000 | 21.684211 | 102 | 0.637471 | false | 2.972414 | false | false | false |
runnerrunnerrunner/sympy-form-analysis | form_test_accuracy.py | 1 | 19576 | from .singleton_form import *
from .monomial_form import *
from .polynomial_form import *
from .numerical_base_form import *
from .equivalent_form import *
from sympy import *
from sympy.abc import x,y,z
import unittest
'''
NOTE: Sympy doesn't honor expression flag evaluate=False
for the identity property... | bsd-3-clause | 5,927,774,360,366,862,000 | 56.239766 | 101 | 0.659532 | false | 3.041168 | true | false | false |
alephdata/aleph | aleph/views/entities_api.py | 1 | 20038 | import logging
from flask import Blueprint, request
from flask_babel import gettext
from werkzeug.exceptions import NotFound
from followthemoney import model
from followthemoney.compare import compare
from pantomime.types import ZIP
from aleph.core import db, url_for
from aleph.search import EntitiesQuery, MatchQuery,... | mit | 4,822,479,137,976,330,000 | 30.309375 | 88 | 0.59981 | false | 4.193805 | false | false | false |
ProfessorKazarinoff/staticsite | content/code/piston_motion/piston_motion.py | 1 | 2233 | """
Piston Motion Animation using Matplotlib.
Animation designed to run on Raspberry Pi 2
Author: Peter D. Kazarinoff, 2016
Tribilium Engineering Solutions www.tribilium.com
"""
#import necessary packages
import numpy as np
from numpy import pi, sin, cos, sqrt
import matplotlib.pyplot as plt
import matplotlib.animat... | gpl-3.0 | 524,716,943,044,950,850 | 30.914286 | 113 | 0.66592 | false | 2.953704 | false | false | false |
eLvErDe/nicotine-plus | plugins/np_xmplay_windows/__init__.py | 1 | 2936 | #!/usr/bin/env python3
from os.path import exists
from subprocess import PIPE
from subprocess import Popen
from _thread import start_new_thread
from pynicotine.pluginsystem import BasePlugin
from pynicotine.pluginsystem import returncode
def enable(frame):
global PLUGIN
PLUGIN = Plugin(frame)
def disable(... | gpl-3.0 | -1,164,548,799,161,899,300 | 36.641026 | 189 | 0.618188 | false | 3.863158 | false | false | false |
bernard357/shellbot | shellbot/machines/input.py | 1 | 19923 | # -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Li... | apache-2.0 | -8,574,987,953,166,916,000 | 29.460245 | 100 | 0.563576 | false | 4.444668 | false | false | false |
deepmind/dm_control | dm_control/composer/variation/__init__.py | 1 | 5148 | # Copyright 2018 The dm_control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 | 3,873,901,760,888,103,000 | 36.852941 | 80 | 0.694833 | false | 4.258065 | false | false | false |
dthpham/butterflow | butterflow/cli.py | 1 | 21582 | # -*- coding: utf-8 -*-
import os
import sys
import re
import argparse
import datetime
import logging
import numpy.core.multiarray # Bug: https://github.com/opencv/opencv/issues/8139
import cv2
from butterflow.settings import default as settings
from butterflow import ocl, avinfo, motion
from butterflow.render import... | mit | -2,603,517,089,161,638,000 | 36.599303 | 88 | 0.52516 | false | 3.849117 | false | false | false |
ekasitk/sahara | sahara/plugins/mapr/versions/v4_0_2_mrv1/version_handler.py | 1 | 2655 | # Copyright (c) 2015, MapR Technologies
#
# 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... | apache-2.0 | -1,698,142,942,839,798,500 | 35.369863 | 75 | 0.672693 | false | 3.544726 | false | false | false |
PHB-CS123/graphene | graphene/query/planner.py | 1 | 11446 | from graphene.traversal import *
from graphene.query import ProjectStream
from graphene.expressions import MatchNode, MatchRelation
from graphene.errors import *
class PlannerErrors:
"""
A class to store common errors in the query planner
"""
@staticmethod
def property_dne(name):
"""
... | apache-2.0 | -5,309,269,168,515,683,000 | 40.3213 | 99 | 0.564739 | false | 4.432998 | false | false | false |
mconigliaro/conveyor | setup.py | 1 | 1292 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import distribute_setup
distribute_setup.use_setuptools()
from setuptools import setup, find_packages
import conveyor
def read(file):
with open(os.path.abspath(os.path.join(os.path.dirname(__file__), file))) as f:
result = f.read()
f.closed
... | gpl-3.0 | 984,826,044,187,824,500 | 27.086957 | 94 | 0.631579 | false | 4.024922 | false | false | false |
CCI-MOC/GUI-Backend | api/v2/views/identity.py | 1 | 1605 | from rest_framework.decorators import detail_route
from rest_framework.response import Response
from rest_framework import status
from core.models import Identity, Group
from api.v2.serializers.details import IdentitySerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLoo... | apache-2.0 | 5,869,259,639,319,642,000 | 29.865385 | 79 | 0.634268 | false | 4.337838 | false | false | false |
xgvargas/sublime-ascii-art | asciiart.py | 1 | 2010 | # -*- coding: utf-8 -*-
"""
Author: Gustavo Vargas <xgvargas@gmail.com>
Repository and issues: https://github.com/xgvargas/sublime-ascii-art
Font BIG
_____ _____ _____ _____ _____ _______
/\ / ____|/ ____|_ _|_ _| /\ | __ \__ __|
/ \ | (___ | | | | | |______ / ... | apache-2.0 | 7,331,115,791,180,618,000 | 36.222222 | 92 | 0.306468 | false | 2.760989 | false | false | false |
xrg/openerp-server | bin/addons/base/ir/ir_ui_view.py | 1 | 9418 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -1,678,259,862,334,319,400 | 41.809091 | 148 | 0.553408 | false | 3.805253 | false | false | false |
mudyc/libvob-c | py/CppHeaderParser.py | 1 | 29668 | #!/usr/bin/python
#
# Author: Jashua R. Cloutier (contact via sourceforge username:senexcanis)
#
# Copyright (C) 2010, Jashua R. Cloutier
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Re... | gpl-2.0 | -128,041,694,812,850,740 | 37.630208 | 113 | 0.537212 | false | 4.100622 | false | false | false |
StratusLab/client | api/code/src/main/python/stratuslab/ManifestInfo.py | 1 | 11495 | #
# Created as part of the StratusLab project (http://stratuslab.eu),
# co-funded by the European Commission under the Grant Agreement
# INFSO-RI-261552."
#
# Copyright (c) 2011, SixSq Sarl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | apache-2.0 | 4,300,523,299,736,297,500 | 35.26183 | 125 | 0.58756 | false | 3.8 | false | false | false |
aabilio/PyDownTV | setup_windows.py | 1 | 2538 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of PyDownTV.
#
# PyDownTV is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | gpl-3.0 | -357,915,869,657,564,400 | 33.27027 | 80 | 0.565063 | false | 3.612536 | false | false | false |
ULHPC/easybuild-easyblocks | easybuild/easyblocks/i/imod.py | 1 | 4664 | ##
# Copyright 2013-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# Flemish Research Foundation ... | gpl-2.0 | -4,181,900,213,054,453,000 | 49.150538 | 121 | 0.67753 | false | 3.590454 | false | false | false |
blakev/sowing-seasons | summer/ext/search/__init__.py | 1 | 5671 | import re
import os
import json
import datetime
import logging
from uuid import uuid4
from tornado import gen
from whoosh.analysis import StemmingAnalyzer, StopFilter
from whoosh.fields import *
from whoosh.index import create_in, exists_in, open_dir
from whoosh.writing import IndexingError
from summer.utils import D... | mit | 6,663,382,230,994,554,000 | 27.497487 | 87 | 0.611709 | false | 3.829169 | false | false | false |
dhoomakethu/apocalypse | apocalypse/app/chaosapp.py | 1 | 14335 | """
@author: dhoomakethu
"""
from __future__ import absolute_import, unicode_literals
import os
from apocalypse.app import App
from apocalypse.exceptions import ServiceNotRunningError, handle_exception
from apocalypse.exceptions import NoServiceRunningError, NetError
from apocalypse.chaos.events.net import NetworkEmula... | mit | -1,456,712,305,732,887,600 | 36.043928 | 96 | 0.537635 | false | 4.246149 | false | false | false |
justanr/py3traits | src/pytraits/sources/instance.py | 1 | 1959 | #!/usr/bin/python -tt
# -*- coding: utf-8 -*-
'''
Copyright 2014-2015 Teppo Perä
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
Un... | apache-2.0 | -5,499,782,528,720,669,000 | 35.259259 | 95 | 0.624617 | false | 4.532407 | false | false | false |
liqd/a4-meinberlin | tests/exports/test_comment_exports.py | 1 | 1148 | import pytest
from adhocracy4.comments.models import Comment
from adhocracy4.exports import mixins
@pytest.mark.django_db
def test_reply_to_mixin(idea, comment_factory):
mixin = mixins.CommentExportWithRepliesToMixin()
virtual = mixin.get_virtual_fields({})
assert 'replies_to_comment' in virtual
co... | agpl-3.0 | 7,406,265,497,614,211,000 | 30.027027 | 73 | 0.735192 | false | 3.521472 | false | false | false |
py-in-the-sky/challenges | google-code-jam/the_price_is_wrong.py | 1 | 2474 | """
https://code.google.com/codejam/contest/32014/dashboard#s=p1
"""
def memo(f):
"""memoization decorator, taken from Peter Norvig's Design of Computer
Programs course on Udacity.com"""
cache = {}
def _f(*args):
try:
return cache[args]
except KeyError:
result =... | mit | 9,106,370,526,080,109,000 | 27.767442 | 107 | 0.615198 | false | 3.569986 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v7/services/services/click_view_service/transports/base.py | 1 | 3584 | # -*- coding: utf-8 -*-
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 5,323,640,506,577,969,000 | 35.20202 | 78 | 0.655413 | false | 4.256532 | false | false | false |
kyle-elsalhi/opencv-examples | CalibrationByCharucoBoard/CalibrateCamera.py | 1 | 4779 | # System information:
# - Linux Mint 18.1 Cinnamon 64-bit
# - Python 2.7 with OpenCV 3.2.0
import numpy
import cv2
from cv2 import aruco
import pickle
import glob
# ChAruco board variables
CHARUCOBOARD_ROWCOUNT = 7
CHARUCOBOARD_COLCOUNT = 5
ARUCO_DICT = aruco.Dictionary_get(aruco.DICT_5X5_1000)
# Create constants ... | mit | -8,271,666,662,602,044,000 | 36.629921 | 214 | 0.6991 | false | 3.617714 | false | false | false |
diplomacy/research | diplomacy_research/models/value/v004_board_state_conv/tests/test_model.py | 1 | 3333 | # ==============================================================================
# Copyright 2019 - Philip Paquette
#
# NOTICE: 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 rest... | mit | -161,738,698,175,513,470 | 54.55 | 104 | 0.60036 | false | 4.3342 | true | false | false |
brunovam/qca_heat_dissipation | c.py | 1 | 5651 | import graph
import qca
import e
# Converte para um grafo de portas e elementos, seguindo a regra que mudanca de clocks, birfucacoes e celulas que forma portas
# Sao vertices aresta do grafo.
def process_nodes(graphElements, graphCells, nodeCell, nodeElement):
#print("node cell %d node element %d %s" % (nodeCell.... | apache-2.0 | -7,307,448,118,267,220,000 | 49.846847 | 210 | 0.56095 | false | 3.916724 | false | false | false |
dmccloskey/SBaaS_MFA | SBaaS_MFA/stage02_isotopomer_fittedExchangeFluxes_postgresql_models.py | 1 | 8388 | from SBaaS_base.postgresql_orm_base import *
class data_stage02_isotopomer_fittedExchangeFluxes(Base):
__tablename__ = 'data_stage02_isotopomer_fittedExchangeFluxes'
id = Column(Integer, Sequence('data_stage02_isotopomer_fittedExchangeFluxes_id_seq'), primary_key=True)
simulation_id = Column(String(500))
... | mit | -7,673,580,467,086,584,000 | 45.865922 | 115 | 0.655937 | false | 3.509623 | false | false | false |
stephengroat/miasm | miasm2/expression/simplifications_common.py | 1 | 20782 | # ----------------------------- #
# Common simplifications passes #
# ----------------------------- #
from miasm2.expression.modint import mod_size2int, mod_size2uint
from miasm2.expression.expression import *
from miasm2.expression.expression_helper import *
def simp_cst_propagation(e_s, e):
"""This passe incl... | gpl-2.0 | 6,942,738,115,921,419,000 | 32.145136 | 86 | 0.448657 | false | 3.094862 | false | false | false |
ConstantinT/jAEk | crawler/attacker.py | 1 | 11857 | '''
Copyright (C) 2015 Constantin Tschuertz
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
any later version.
This program is distributed in the hope that it wil... | gpl-3.0 | 6,728,574,831,771,547,000 | 51.933036 | 170 | 0.533103 | false | 4.496397 | false | false | false |
xiaoyaozi5566/DynamicCache | configs/dramsim2/dynamic_cache.py | 1 | 9520 | # Copyright (c) 2012 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | bsd-3-clause | 3,920,231,542,677,462,000 | 34 | 100 | 0.685504 | false | 3.650307 | false | false | false |
manz/python-mapnik | test/python_tests/query_test.py | 1 | 1175 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, mapnik
from nose.tools import eq_,assert_almost_equal,raises
from .utilities import execution_path, run_all
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('... | lgpl-2.1 | -8,496,634,222,757,606,000 | 30.756757 | 66 | 0.646809 | false | 2.989822 | false | false | false |
mzahor/sublime-settings | sublimap.py | 1 | 1644 | import sublime, sublime_plugin
import time
import datetime
def log_error(ex, command):
error_msg = 'Error in ' + command + ': ' + str(ex)
print error_msg
sublime.status_message(error_msg)
class SubliMapCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.edit = edit
self.view... | mit | 317,336,032,315,595,200 | 36.386364 | 100 | 0.579075 | false | 3.535484 | false | false | false |
netvl/contrib-python-qubell-client | qubell/api/tools/__init__.py | 1 | 9184 | # Copyright (c) 2013 Qubell Inc., http://qubell.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | apache-2.0 | 7,361,604,610,138,728,000 | 36.03629 | 142 | 0.57622 | false | 4.006981 | false | false | false |
loonycyborg/scons-plusplus | python_modules/Tool/cxx.py | 1 | 3476 | """SCons.Tool.c++
Tool-specific initialization for generic Posix C++ compilers.
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) 2001 - 2019 The SCons Foundation
#
# Permission is hereby gran... | gpl-3.0 | -5,400,457,122,017,414,000 | 33.415842 | 114 | 0.686421 | false | 3.511111 | false | false | false |
MaxTyutyunnikov/lino | lino/projects/crl/settings.py | 1 | 2183 | ## Copyright 2009-2011 Luc Saffre
## This file is part of the Lino project.
## Lino 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 | 2,452,053,570,874,988,500 | 26.632911 | 71 | 0.666972 | false | 3.136494 | false | false | false |
lizouzt/Libo0_0 | pface.py | 1 | 5607 | import cv2
import dlib
import numpy
import sys
# https://pan.baidu.com/s/1dGIcuvZ
PREDICTOR_PATH = "./shape_predictor_68_face_landmarks.dat"
SCALE_FACTOR = 1
FEATHER_AMOUNT = 11
FACE_POINTS = list(range(17, 68))
MOUTH_POINTS = list(range(48, 61))
RIGHT_BROW_POINTS = list(range(17, 22))
LEFT_BROW_POINTS = list(range... | apache-2.0 | 1,489,791,119,567,350,000 | 30.857955 | 104 | 0.618334 | false | 2.897674 | false | false | false |
cloudera/recordservice | tests/query_test/test_recordservice.py | 1 | 4660 | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# This test suite validates query results in recordservice are always updated.
from subprocess import call
from tests.common.impala_test_suite import *
TEST_DB1 = 'tmpDb1'
TEST_DB2 = 'tmpDb2'
TEST_TBL1 = 'tmpTbl1'
TEST_TBL2 = 'tmpTbl2'
T... | apache-2.0 | -2,419,124,350,718,462,500 | 44.252427 | 87 | 0.660086 | false | 3.01423 | true | false | false |
saga-project/bliss | examples/advanced/mandelbrot/run_mandel.py | 1 | 3075 | #!/usr/bin/env python
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
"""
This example script runs the Mandelbrot fractal generator sequentially.
In this example, we run the Mandelbrot generator for a 2048x2048 pixel
Mandelbrot fractal. We split it up in 4x4 tiles which we run sequentially, one
after another o... | mit | -5,757,799,316,961,882,000 | 38.423077 | 113 | 0.628943 | false | 3.526376 | false | false | false |
myth/shiny-octo-shame | app.py | 1 | 4156 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from flask import Flask, render_template, abort, request, jsonify, Response
from flask.ext.sqlalchemy import SQLAlchemy
from xml.etree.ElementTree import Element, SubElement, tostring
import xml.etree.ElementTree as ET
from models import *
app = Flask(__na... | mit | -5,672,083,292,819,603,000 | 22.885057 | 131 | 0.611886 | false | 3.409352 | false | false | false |
Steffen1989/GenPipeMesh | my_math.py | 1 | 6311 | # Some mathematics
import math as m
import numpy as np
import pdb
def geom_prog(N, a_start, a_end, j):
""" Geometric progression a(j) = a_start * r**j
with a(0) = a_start
and a(N) = a_start*r**(N-1) = a_end
N : number of steps
a_start : starting value at j=0
a_end : finale value at... | mit | 7,263,815,922,031,565,000 | 23.46124 | 75 | 0.534147 | false | 2.850497 | false | false | false |
Fe-Nik-S/Examples | python/patterns/behavioral/observer.py | 1 | 2618 | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
#
# ---------------------------------------------------------------------
# Copyright (C) 2017-2018 The --- Project
# See LICENSE for details
# ---------------------------------------------------------------------
from rand... | mit | 4,927,634,214,140,964,000 | 27.78022 | 78 | 0.594729 | false | 4.07154 | false | false | false |
eammx/proyectosWeb | proyectoPython/env/lib/python3.6/site-packages/werkzeug/wrappers/base_response.py | 2 | 27784 | import warnings
from .._compat import integer_types
from .._compat import string_types
from .._compat import text_type
from .._compat import to_bytes
from .._compat import to_native
from ..datastructures import Headers
from ..http import dump_cookie
from ..http import HTTP_STATUS_CODES
from ..http import remove_entity... | mit | -6,149,707,222,566,893,000 | 38.691429 | 86 | 0.615174 | false | 4.656276 | false | false | false |
nightscape/yoga-900-kernel | zfs/cmd/arc_summary/arc_summary.py | 1 | 40757 | #!/usr/bin/python
#
# $Id: arc_summary.pl,v 388:e27800740aa2 2011-07-08 02:53:29Z jhell $
#
# Copyright (c) 2008 Ben Rockwood <benr@cuddletech.com>,
# Copyright (c) 2010 Martin Matuska <mm@FreeBSD.org>,
# Copyright (c) 2010-2011 Jason J. Hellenthal <jhell@DataIX.net>,
# All rights reserved.
#
# Redistribution and use i... | gpl-2.0 | -969,599,389,425,303,000 | 34.502613 | 79 | 0.548544 | false | 3.005235 | false | false | false |
AShedko/kicktravel | blog/models.py | 1 | 1652 | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create your models here.
class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
ti... | mit | -6,760,472,198,643,518,000 | 32.458333 | 69 | 0.703611 | false | 3.52967 | false | false | false |
kuke/models | fluid/PaddleNLP/deep_attention_matching_net/utils/layers.py | 1 | 6257 | import paddle.fluid as fluid
def loss(x, y, clip_value=10.0):
"""Calculate the sigmoid cross entropy with logits for input(x).
Args:
x: Variable with shape with shape [batch, dim]
y: Input label
Returns:
loss: cross entropy
logits: prediction
"""
logits = fluid.l... | apache-2.0 | -2,399,281,670,760,799,000 | 30.285 | 94 | 0.519898 | false | 3.780665 | false | false | false |
kseetharam/genPolaron | amp_reconstruct_gs.py | 1 | 3982 | import numpy as np
import xarray as xr
import pf_dynamic_sph as pfs
from timeit import default_timer as timer
import time
import os
# import matplotlib
# import matplotlib.pyplot as plt
if __name__ == "__main__":
# ---- INITIALIZE GRIDS ----
# (Lx, Ly, Lz) = (60, 60, 60)
# (dx, dy, dz) = (0.25, 0.25, 0.... | mit | -7,612,123,371,348,958,000 | 33.034188 | 175 | 0.594174 | false | 2.670691 | false | false | false |
Bajoo/client-pc | bajoo/index/hint_builder.py | 1 | 11618 |
import logging
from .hints import DeletedHint, DestMoveHint, ModifiedHint, SourceMoveHint
_logger = logging.getLogger(__name__)
class HintBuilder(object):
"""Build and set hint attributes on index node, from external event.
The Builder is a class dedicated to convert external event
(creation/modificati... | gpl-3.0 | -3,830,002,652,309,708,000 | 40.942238 | 79 | 0.580651 | false | 4.266618 | false | false | false |
insanemainframe/python-sphinxsearch | sphinxsearch/tests/utils.py | 1 | 2812 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from itertools import product
def get_api(): # pragma: no cover
import sphinxapi
return sphinxapi
def get_servers():
from sphinxsearch import SearchServer
class MyServer(SearchServer):
listen = 'localhost:6543'
max_ch... | gpl-2.0 | 8,868,360,658,172,803,000 | 24.107143 | 94 | 0.550853 | false | 3.623711 | false | false | false |
cuauv/software | vision/modules/old/2018/torpedoes.py | 1 | 11428 | #!/usr/bin/env python3
import time
import math
import os
import cv2
from collections import namedtuple
from itertools import combinations
import numpy as np
import shm
from vision.modules.base import ModuleBase
from vision.options import IntOption, DoubleOption, BoolOption
from vision import vision_common
options = ... | bsd-3-clause | -5,303,464,463,755,698,000 | 33.421687 | 118 | 0.559065 | false | 3.611884 | false | false | false |
robert-abela/kfsensor-logparser | logfilehandler.py | 1 | 15207 | #The MIT License (MIT)
#
#Copyright (c) 2014 Robert Abela
#
#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, me... | mit | -9,093,888,078,050,801,000 | 38.095116 | 89 | 0.558032 | false | 4.218308 | false | false | false |
silverapp/silver | silver/payment_processors/base.py | 1 | 3868 | # Copyright (c) 2017 Presslabs SRL
#
# 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 writ... | apache-2.0 | -6,624,433,110,950,617,000 | 32.344828 | 100 | 0.624354 | false | 4.529274 | false | false | false |
opendatatrentino/ckan-api-client | ckan_api_client/commands/base.py | 1 | 1925 | import os
import csv
from collections import namedtuple
from cliff.command import Command
from ckan_api_client.high_level import CkanHighlevelClient
class PasswdDialect(csv.Dialect):
delimiter = ':'
doublequote = False # means: use escapechar to escape quotechar
escapechar = '\\'
lineterminator = o... | bsd-2-clause | 2,566,886,452,072,663,000 | 28.615385 | 71 | 0.609351 | false | 3.474729 | false | false | false |
CtrlC-Root/cse5526 | p1sim.py | 1 | 2735 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
import random
import itertools
from datetime import datetime
from collections import deque
from argparse import ArgumentParser
from tabulate import tabulate
from spark import *
# parse arguments
parser = ArgumentParser()
parser.add_argument("--rat... | mit | -3,460,158,900,002,685,400 | 21.791667 | 76 | 0.595612 | false | 3.195093 | false | false | false |
ruleant/weblate | weblate/urls.py | 1 | 18350 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eithe... | gpl-3.0 | -3,772,412,495,446,492,000 | 26.060472 | 74 | 0.548046 | false | 3.599568 | false | false | false |
LMiceOrg/Modelingtools | autotools/modelparser/excelmodelmessageparser.py | 1 | 2951 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Excel ModelMessage表单解析器基类,
ExcelModelMessageParser
Sheet struct: 信息名称 中文名称 输入输出类型 接口描述 是否可变长 变量名称 变量中文名称
变量数据类型 粒度 单位 默认值 最小值 最大值 属性描述 赋值方法
"""
import excelsheetparser
class ExcelModelMessageParser(excelsheetparser.ExcelSheetParser):
def... | mit | -3,257,584,161,303,374,300 | 39.102941 | 178 | 0.502326 | false | 2.911458 | false | false | false |
albfan/gnome-music | gnomemusic/window.py | 1 | 26290 | # Copyright (c) 2013 Eslam Mostafa <cseslam@gmail.com>
# Copyright (c) 2013 Vadim Rutkovsky <vrutkovs@redhat.com>
# Copyright (c) 2013 Sai Suman Prayaga <suman.sai14@gmail.com>
# Copyright (c) 2013 Arnel A. Borja <kyoushuu@yahoo.com>
# Copyright (c) 2013 Shivani Poddar <shivani.poddar92@gmail.com>
# Copyright (c) 2013 ... | gpl-2.0 | 5,979,820,944,114,826,000 | 40.863057 | 121 | 0.607912 | false | 3.888478 | false | false | false |
martinjrobins/hobo | pints/_error_measures.py | 1 | 9981 | #
# Scoring functions
#
# This file is part of PINTS.
# Copyright (c) 2017-2018, University of Oxford.
# For licensing information, see the LICENSE file distributed with the PINTS
# software package.
#
from __future__ import absolute_import, division
from __future__ import print_function, unicode_literals
import pin... | bsd-3-clause | 4,131,475,318,569,346,600 | 30.990385 | 79 | 0.575594 | false | 3.978079 | false | false | false |
pjimenezmateo/chip8 | src/code.py | 1 | 14767 | # import pyglet
# import sys
# from random import randint
#
#
# class Chip8(pyglet.window.Window):
#
# def __init__(self):
#
# # General use registers
# self.vx = 0x00
# self.vy = 0x00
# self.vz = 0x00
# self.v0 = 0x00
#
# # Register used as a flag
# ... | mit | 7,852,563,765,777,740,000 | 29.625268 | 278 | 0.519401 | false | 2.674212 | false | false | false |
sonya/eea | py/wiod/trade.py | 1 | 17251 | #
# Copyright 2012 Sonya Huang
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | 8,201,673,453,018,398,000 | 35.782516 | 80 | 0.567909 | false | 3.650233 | true | false | false |
Lambdanaut/crits | crits/indicators/handlers.py | 1 | 55313 | import csv
import datetime
import json
import logging
import urlparse
from io import BytesIO
from django.conf import settings
from django.core.exceptions import ValidationError as DjangoValidationError
from django.core.urlresolvers import reverse
from django.core.validators import validate_ipv4_address, validate_ipv46... | mit | 891,654,034,078,028,400 | 38.173513 | 122 | 0.567968 | false | 4.316607 | false | false | false |
ewienik/unte | tests/unte-ut-compile_file.py | 1 | 2078 | # UT| python2 {src_file}
from __future__ import print_function
# UT[ ../unte.py * compile_file
def compile_file(dst, src, tags_master, tags_db):
f = open(src)
tag_iter = iter(enumerate_tags(tags_master))
try:
tag = next(tag_iter)
except StopIteration:
tag = None
line_no = 0
in... | mit | -6,855,666,485,691,866,000 | 22.613636 | 73 | 0.501444 | false | 2.684755 | false | false | false |
magsilva/scriptLattes | scriptLattes/producoesBibliograficas/resumoExpandidoEmCongresso.py | 1 | 6347 | #!/usr/bin/python
# encoding: utf-8
# filename: resumoExpandidoEmCongresso.py
#
# scriptLattes V8
# Copyright 2005-2013: Jesús P. Mena-Chalco e Roberto M. Cesar-Jr.
# http://scriptlattes.sourceforge.net/
#
#
# Este programa é um software livre; você pode redistribui-lo e/ou
# modifica-lo dentro dos termos da Lice... | gpl-2.0 | -5,763,997,185,473,617,000 | 29.346154 | 150 | 0.615177 | false | 2.501784 | false | false | false |
Opticalp/instrumentall | testsuite/python/seqGenTest.py | 1 | 6317 | # -*- coding: utf-8 -*-
## @file testsuite/python/seqGenTest.py
## @date may 2017
## @author PhRG - opticalp.fr
##
## Test the sequence generation module
#
# Copyright (c) 2017 Ph. Renaud-Goud / Opticalp
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associ... | mit | 8,367,789,778,759,986,000 | 32.780749 | 91 | 0.664556 | false | 3.833131 | true | false | false |
tensorflow/agents | tf_agents/networks/sequential.py | 1 | 9066 | # coding=utf-8
# Copyright 2020 The TF-Agents 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -5,114,536,384,005,725,000 | 35.264 | 80 | 0.658725 | false | 3.899355 | true | false | false |
poppy-project/poppy-ergo-jr | software/poppy_ergo_jr/primitives/face_tracking.py | 1 | 1476 | from pypot.primitive import LoopPrimitive
class FaceTracking(LoopPrimitive):
def __init__(self, robot, freq, face_detector):
LoopPrimitive.__init__(self, robot, freq)
self.face_detector = face_detector
self.dx, self.dy = 60, 50
self._tracked_face = None
def setup(self):
... | gpl-3.0 | -6,950,711,852,745,142,000 | 31.8 | 79 | 0.578591 | false | 3.440559 | false | false | false |
citrix-openstack-build/python-neutronclient | neutronclient/shell.py | 1 | 27420 | # Copyright 2012 OpenStack LLC.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | -7,434,646,884,015,832,000 | 39.682493 | 79 | 0.630015 | false | 4.028206 | false | false | false |
mkc188/deduplicatus-py | deduplicatus.py | 1 | 12419 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DeDuplicatus: A Deduplication-Enabled Multi-Cloud App
Usage:
deduplicatus.py [options] FILE
Arguments:
FILE config file
Options:
-h --help show this help message and exit
--version show version and exit
"""
import sys
imp... | mit | -6,431,589,267,552,348,000 | 33.212121 | 112 | 0.588212 | false | 4.202707 | false | false | false |
vmiklos/vmexam | python/irssi/sinfo.py | 1 | 2824 | import irssi, cStringIO, operator
"""
a replacement for /server list
- i always typed /server info and got disconnected..
- it prints nicks
- it prints disconnected servers
"""
# From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/267662
def indent(rows, hasHeader=False, headerChar='-', delim=' ', justify=... | mit | 8,628,252,998,466,670,000 | 40.529412 | 91 | 0.704674 | false | 3.322353 | false | false | false |
dichen001/Go4Jobs | JackChen/Google/406. Queue Reconstruction by Height.py | 1 | 1513 | """
Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h. Write an algorithm to reconstruct the queue.
Note:
The number ... | gpl-3.0 | 396,023,541,584,538,940 | 28.666667 | 297 | 0.478519 | false | 3.763682 | false | false | false |
PaddlePaddle/Paddle | python/paddle/fluid/dygraph/__init__.py | 1 | 1800 | # Copyright (c) 2018 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 app... | apache-2.0 | 5,014,978,707,735,278,000 | 23 | 74 | 0.703333 | false | 3.550296 | false | false | false |
xqliu/coursera | An Introduction to Interactive Programming in Python/03. Pong/pong.py | 1 | 5149 | # Implementation of classic arcade game Pong
import simplegui
import random
# initialize globals - pos and vel encode vertical info for paddles
WIDTH = 600
HEIGHT = 400
BALL_RADIUS = 20
PAD_WIDTH = 8
PAD_HEIGHT = 80
HALF_PAD_WIDTH = PAD_WIDTH / 2
HALF_PAD_HEIGHT = PAD_HEIGHT / 2
LEFT = False
RIGHT = True
LINE_... | mit | -8,171,352,610,345,765,000 | 35.006993 | 102 | 0.578365 | false | 2.922247 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.