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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
foxmask/django-th | django_th/tests/test_publishing_limit.py | 1 | 1300 | # coding: utf-8
from django.test import TestCase
from django.conf import settings
from django_th.publishing_limit import PublishingLimit
class PublishingLimitTestCase(TestCase):
def test_settings(self):
self.assertTrue('publishing_limit' in settings.DJANGO_TH)
def test_get_data(self):
cach... | bsd-3-clause | -8,438,425,074,195,135,000 | 29.952381 | 80 | 0.615385 | false | 3.430079 | true | false | false |
cowhi/HFO | experiments/agents/adhocvisit_backup.py | 1 | 1171 | # -*- coding: utf-8 -*-
"""
Created on Fri Sep 9 16:36:47 2016
@author: Felipe Leno
Loads everything from adhoc.py, this class only defines parameters for the visit-based
ad hoc advising
"""
from adhoc import AdHoc
import math
class AdHocVisit(AdHoc):
#Enum for importance metrics
VISIT_IMPORTANCE, Q_IMPOR... | mit | 6,629,827,150,139,662,000 | 36.806452 | 206 | 0.641332 | false | 3.37464 | false | false | false |
walterbender/fractionbounce | aplay.py | 1 | 2286 | # Copyright (C) 2009, Aleksey Lim
# Copyright (C) 2018, James Cameron <quozl@laptop.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; either version 2 of the License, or
# (at your option) ... | gpl-3.0 | 2,392,143,500,170,973,700 | 30.75 | 82 | 0.644357 | false | 3.669342 | false | false | false |
longjie/ps4eye | script/camera_info_publisher.py | 1 | 3113 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import yaml
import roslib
roslib.load_manifest("ps4eye");
from sensor_msgs.msg import CameraInfo
import rospy
import rospkg
class CameraInfoPublisher:
# Callback of the ROS subscriber.
def leftCallback(self, data):
left_cam_info_org = data
... | apache-2.0 | -1,765,290,943,594,029,800 | 35.416667 | 115 | 0.640405 | false | 3.143885 | false | false | false |
PhilHudson/XWingDice | DiceRoller.py | 1 | 3888 | import random
from collections import Counter
# >>> dict((x,l.count(x)) for x in set(l))
class OctaDie(object):
"""An eight-sided die (octahedron) instantiated for either attack or defence.
In attack, the faces of the die are, with their associated probability:
Hit (3 of 8, 37.5% probability)... | gpl-3.0 | 2,130,385,826,533,544,400 | 34.669725 | 84 | 0.591307 | false | 3.573529 | false | false | false |
gpotter2/scapy | scapy/compat.py | 1 | 9597 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Gabriel Potter <gabriel@potter.fr>
# This program is published under a GPLv2 license
"""
Python 2 and 3 link classes.
"""
from __future__ import absolute_import
import base64
import binascii
import collections... | gpl-2.0 | 7,207,311,381,274,182,000 | 24.660428 | 75 | 0.571012 | false | 3.679831 | false | false | false |
choeminjun/SE-points-severce-platfrom | __main__.py | 1 | 9892 | import time
import datetime
import csv
import os
import json
import sys
import logging
import send2trash
logging.basicConfig(filename='program_Log.txt', level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s')
MASTER_PASSWORD = 'minjun5627'
MASTERUSERNAME = 'minjun'
MASTERUSERPASSWORD = '2005'
#os.c... | apache-2.0 | 1,022,653,048,925,842,600 | 37.315175 | 122 | 0.510766 | false | 4.307087 | false | false | false |
svalqui/sysad | examples/ldap-rep-comp-disa.py | 1 | 2248 | # Copyright 2020 by Sergio Valqui. All rights reserved.
#
# Report Computers in an AD branch that are not disabled
#
# Run this in the command line while on the palazo directory so python can find serv
# export PYTHONPATH=`pwd`
from serv.ldaps import ldap_connect, find_computers_disabled, ldap_disconnect
# from pathli... | mit | 8,384,420,325,427,028,000 | 30.661972 | 96 | 0.588968 | false | 3.896014 | true | false | false |
brint/fastfood | fastfood/templating.py | 1 | 2315 | # Copyright 2015 Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | -2,063,054,368,301,933,300 | 31.605634 | 74 | 0.601728 | false | 4.026087 | false | false | false |
EUDAT-B2SHARE/b2share | b2share/modules/records/ext.py | 1 | 2716 | # -*- coding: utf-8 -*-
#
# This file is part of EUDAT B2Share.
# Copyright (C) 2016 University of Tuebingen, CERN.
# Copyright (C) 2015 University of Tuebingen.
#
# B2Share 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... | gpl-2.0 | 5,970,646,417,336,346,000 | 35.213333 | 80 | 0.705817 | false | 4.115152 | false | false | false |
romain-dartigues/cf-python-client | setup.py | 1 | 2416 | import os
import shutil
import subprocess
import sys
from setuptools import setup, find_packages, Command
src_dir = 'src/python'
package_directory = 'cloudfoundry_client'
package_name = 'cloudfoundry-client'
loggregator_dir = 'loggregator'
sys.path.insert(0, os.path.realpath(src_dir))
version_file = '%s/%s/__init__.... | apache-2.0 | 6,585,751,665,811,986,000 | 31.213333 | 106 | 0.611755 | false | 3.816746 | false | false | false |
nuagenetworks/vspk-python | vspk/v6/nuethernetsegmentgroup.py | 1 | 7771 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | bsd-3-clause | -7,263,087,607,523,101,000 | 28.439394 | 153 | 0.601982 | false | 4.667267 | false | false | false |
ucla/PushHubCore | pushhub/models/listener.py | 1 | 2600 | """
Copyright (c) 2013, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list o... | bsd-3-clause | 8,600,699,612,325,148,000 | 34.135135 | 79 | 0.746154 | false | 4.521739 | false | false | false |
bluedynamics/activities.runtime | src/activities/runtime/runtime.py | 1 | 10151 | # -*- coding: utf-8 -*-
#
# Copyright 2009: Johannes Raggam, BlueDynamics Alliance
# http://bluedynamics.com
# GNU Lesser General Public License Version 2 or later
__author__ = """Johannes Raggam <johannes@raggam.co.at>"""
__docformat__ = 'plaintext'
from zope.interface import implements
from zope.com... | lgpl-3.0 | -6,893,728,240,807,559,000 | 38.964567 | 82 | 0.604768 | false | 4.6099 | false | false | false |
eirmag/weboob | weboob/applications/comparoob/comparoob.py | 1 | 5114 | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Romain Bignon
#
# This file is part of weboob.
#
# weboob 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 opti... | agpl-3.0 | 3,408,489,574,096,930,000 | 33.322148 | 112 | 0.574697 | false | 3.771386 | false | false | false |
johnmee/plugin.video.catchuptv.au.ten | resources/lib/networktenaddon/showlist.py | 1 | 5314 | #
# Network Ten CatchUp TV Video Addon
#
# Copyright (c) 2013 Adam Malcontenti-Wilson
#
# 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 limit... | mit | -7,655,345,065,162,287,000 | 37.230216 | 161 | 0.629469 | false | 3.842372 | false | false | false |
plewis/phycas | src/python/probdist/_SquareMatrix.py | 1 | 6596 | from _ProbDistExt import *
class SquareMatrix(SquareMatrixBase):
#---+----|----+----|----+----|----+----|----+----|----+----|----+----|
"""
Encapsulates a square matrix of floating point values (underlying C++
implementation stores these as doubles).
"""
def __init__(self, dimension, v... | mit | -2,730,760,165,720,875,500 | 33.715789 | 78 | 0.431928 | false | 4.311111 | false | false | false |
bachvtuan/Backup-to-dropbox | restore.py | 1 | 1879 | # Include the Dropbox SDK
import dropbox, sys, os, json, operator
from dropbox import rest
from datetime import datetime
def end_wrong_syntax():
print "wrong argv python restore.py config_file_path backup_file_name dest_folder"
sys.exit()
try:
if __name__ != '__main__':
print "not allow"
sys.exit()
... | mit | 1,344,065,037,891,964,400 | 23.723684 | 129 | 0.679617 | false | 3.337478 | true | false | false |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/PyQt4/examples/webkit/simpleselector/ui_window.py | 2 | 2807 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\Lib\site-packages\PyQt4\examples\webkit\simpleselector\window.ui'
#
# Created: Wed Jan 18 20:24:02 2017
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
tr... | gpl-3.0 | 2,831,186,600,653,961,700 | 43.555556 | 121 | 0.717848 | false | 4.062229 | false | false | false |
vthorsteinsson/tensor2tensor | tensor2tensor/bin/t2t_bleu.py | 1 | 7314 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | apache-2.0 | 3,376,770,000,079,592,400 | 41.034483 | 80 | 0.655865 | false | 3.651523 | false | false | false |
nil0x42/phpsploit | src/api/plugin.py | 1 | 1513 | """Provide access to attributes of currently running plugin"""
__all__ = ["plugin"]
import re
from core import plugins
class Plugin:
"""Get access to currently running plugin attributes.
Usage:
>>> from api import plugin
Attributes:
* name (type: str)
# Plugin name.
>>> plugin.... | gpl-3.0 | 7,849,397,474,975,934,000 | 24.644068 | 75 | 0.573695 | false | 4.25 | false | false | false |
zaxliu/deepnap | experiments/kdd-exps/experiment_DynaQNN_130_Feb15_2001.py | 1 | 5180 | # System built-in modules
import time
from datetime import datetime
import sys
import os
from multiprocessing import Pool
# Project dependency modules
import pandas as pd
pd.set_option('mode.chained_assignment', None) # block warnings due to DataFrame value assignment
import lasagne
# Project modules
sys.path.append('... | bsd-3-clause | 6,453,434,949,261,437,000 | 33.304636 | 103 | 0.653089 | false | 2.915025 | false | false | false |
jacknlliu/ros-docker-images | 3d_model/scripts/install_brd.py | 1 | 1572 | import bpy
import os
import addon_utils
from subprocess import call
from urllib.request import urlretrieve
from zipfile import ZipFile
from tempfile import TemporaryDirectory
from shutil import copytree,rmtree
from os.path import join
python_exec = bpy.app.binary_path_python
path_to_addons = bpy.utils.user_resourc... | mit | -5,145,348,280,357,354,000 | 23.952381 | 83 | 0.683206 | false | 3.275 | false | false | false |
spino327/sdr_testbed | DistributedTestbed/transmitter/TxUsrp.py | 1 | 4423 | '''
Copyright (c) 2011, Universidad Industrial de Santander, Colombia
University of Delaware
All rights reserved.
@author: Sergio Pino
@author: Henry Arguello
Website: http://www.eecis.udel.edu/
emails : sergiop@udel.edu - henarfu@udel.edu
Date : Apr, 2011
'''
from gnuradio import gr
from gnuradio.gr import firdes... | apache-2.0 | -164,745,593,080,653,150 | 34.677419 | 123 | 0.558671 | false | 3.507534 | false | false | false |
ufjfeng/leetcode-jf-soln | python/402_remove_k_digits.py | 1 | 1551 | """
Given a non-negative integer num represented as a string, remove k digits from
the number so that the new number is the smallest possible.
Note:
The length of num is less than 10002 and will be ≥ k.
The given num does not contain any leading zero.
Example 1:
Input: num = "1432219", k = 3
Output: ... | mit | 3,027,180,323,243,118,600 | 27.163636 | 80 | 0.572628 | false | 3.331183 | false | false | false |
PeterSchichtel/hepstore | hepstore/core/statistic/parser.py | 1 | 3086 | #!/usr/bin/env python
import os
import argparse
class StatisticParser(argparse.ArgumentParser):
def __init__( self,
description = "perform statistical analysis" ):
argparse.ArgumentParser.__init__( self, description )
# put arguments here
self.add_argument("-f", "--fit... | gpl-3.0 | -2,844,642,597,303,474,700 | 36.634146 | 115 | 0.377187 | false | 5.134775 | false | false | false |
rwl/PyCIM | CIM14/CDPSM/GIS_Connectivity/IEC61968/WiresExt/PhaseImpedanceData.py | 1 | 3366 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | 1,970,894,435,229,611,300 | 43.289474 | 121 | 0.689542 | false | 3.860092 | false | false | false |
cindy820219/milsss | UI/new_for_sim_dual.py | 1 | 34162 | ### import parsing
from xml.dom.minidom import parse
import xml.dom.minidom
### import ElementTree
from xml.etree.ElementTree import ElementTree, Element, parse
def simple_dual(DOMTree, collection, level):
### ????
a = 0
# new_for_parse.py
### to count the number of three dual notes
chord_pre =... | agpl-3.0 | -3,115,448,628,422,695,000 | 36.623348 | 123 | 0.369446 | false | 4.445283 | false | false | false |
drewcsillag/skunkweb | util/make_distr.py | 1 | 4166 | #! /usr/bin/env python
#
# Copyright (C) 2001 Andrew T. Csillag <drew_csillag@geocities.com>
#
# You may distribute under the terms of either the GNU General
# Public License or the SkunkWeb License, as specified in the
# README file.
#
#
# This is a script which facilitates creation of versioned... | gpl-2.0 | 2,828,195,229,895,905,000 | 26.228758 | 138 | 0.598896 | false | 2.857339 | false | false | false |
eviljeff/olympia | src/olympia/applications/views.py | 1 | 5242 | from django.core.cache import cache
from django.db.transaction import non_atomic_requests
from django.utils.translation import ugettext
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.status import HTTP_201_CREAT... | bsd-3-clause | -6,394,211,211,390,946,000 | 39.635659 | 79 | 0.662724 | false | 4.1406 | false | false | false |
maoy/zknova | nova/virt/vmwareapi/volumeops.py | 1 | 8336 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 | -1,843,336,539,798,740,500 | 44.551913 | 78 | 0.576536 | false | 4.180542 | true | false | false |
rlugojr/rekall | rekall-core/rekall/plugins/windows/cache.py | 1 | 14971 | # Rekall Memory Forensics
# Copyright 2014 Google Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later ver... | gpl-2.0 | 8,356,214,992,809,683,000 | 35.603912 | 80 | 0.554272 | false | 4.177176 | false | false | false |
saullocastro/pyNastran | pyNastran/bdf/dev_vectorized/cards/elements/solid/ctetra10.py | 1 | 9950 | from six.moves import zip
from numpy import zeros, arange, dot, cross, searchsorted, array
#from numpy.linalg import norm
from pyNastran.bdf.field_writer_8 import print_card_8
from pyNastran.bdf.bdf_interface.assign_type import integer, integer_or_blank
from pyNastran.bdf.dev_vectorized.cards.elements.solid.solid_elem... | lgpl-3.0 | -1,049,081,684,335,408,600 | 35.988848 | 104 | 0.530754 | false | 3.137811 | false | false | false |
LumPenPacK/NetworkExtractionFromImages | win_build/nefi2_win_amd64_msvc_2015/bin/nefi2/view/main_controller.py | 1 | 72114 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This is nefi's main view. Currently we deployed all controls of the
GUI in the MainView.ui. Static changes to the GUI should always been
done by the Qt designer since this reduces the amount of code dramatically.
To draw the complete UI the controllers are invoked and ... | bsd-2-clause | 5,772,202,558,477,753,000 | 36.558854 | 140 | 0.621677 | false | 3.976235 | false | false | false |
tpeek/django-imager | imagersite/imagersite/settings.py | 1 | 5616 | """
Django settings for imagersite project.
Generated by 'django-admin startproject' using Django 1.8.3.
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 p... | mit | -573,961,341,429,756,700 | 27.507614 | 107 | 0.683405 | false | 3.523212 | false | false | false |
SherifRadwan/Scheduling-Simulator | CPUSchedulingSimulator.py | 1 | 10905 | #!/usr/bin/env python
from scheduler.job import *
from scheduler.fcfs import *
from scheduler.sjf import *
from scheduler.srjf import *
from scheduler.priority import *
from scheduler.preemptive_priority import *
from scheduler.round_robin import *
from PyQt4 import QtCore, QtGui
from random import randint
import cop... | gpl-2.0 | 7,541,484,197,705,449,000 | 31.552239 | 128 | 0.733517 | false | 2.935397 | false | false | false |
saurabh6790/trufil_app | test/doctype/sample_allocation/sample_allocation.py | 1 | 5297 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.model.doc import addchild, Document
from webnotes import msgprint, _
from webnotes.model.bean i... | agpl-3.0 | -2,092,437,030,698,776,600 | 40.390625 | 198 | 0.687937 | false | 3.047756 | true | false | false |
stormi/tsunami | src/primaires/joueur/commandes/chgroupe/__init__.py | 1 | 2994 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# 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
# l... | bsd-3-clause | 7,193,316,183,022,921,000 | 43.477612 | 79 | 0.715436 | false | 3.564593 | false | false | false |
namuan/bin-utils | download_html_to_file.py | 1 | 1102 | from argparse import ArgumentParser
from pathlib import Path
import requests
# arguments
# -d paypal_general_errors.html -p https://developer.paypal.com/docs/classic/api/errors/general/
def download_html(url):
print("Downloading webpage from {0}".format(url))
page = requests.get(url)
return page.text
... | gpl-3.0 | 3,552,462,800,278,940,700 | 24.045455 | 96 | 0.662432 | false | 3.636964 | false | false | false |
BBN-Q/Auspex | src/auspex/instruments/tektronix.py | 1 | 8584 | # Copyright 2016 Raytheon BBN 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
__all__ = ['DPO72004C','DPO2024','DPO2014','RSA33... | apache-2.0 | 4,864,984,427,118,562,000 | 42.353535 | 162 | 0.646668 | false | 3.309175 | false | false | false |
juggernate/pymel | pymel/core/uitypes.py | 1 | 42892 | import sys
import re
import pymel.util as _util
import pymel.internal.pmcmds as cmds
import pymel.internal.factories as _factories
import pymel.internal.startup as _startup
import pymel.internal as _internal
import pymel.versions as _versions
import maya.mel as _mm
_logger = _internal.getLogger(__name__)
def _resolveU... | bsd-3-clause | -8,284,236,821,677,527,000 | 33.36859 | 155 | 0.584468 | false | 4.234574 | false | false | false |
jcfr/girder | plugins/gravatar/server/__init__.py | 1 | 3656 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... | apache-2.0 | -9,183,986,138,841,433,000 | 33.490566 | 80 | 0.663567 | false | 3.939655 | false | false | false |
Abdoctor/behave | behave/formatter/plain.py | 1 | 4689 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from behave.formatter.base import Formatter
from behave.model_describe import ModelPrinter
from behave.textutil import make_indentation
# -----------------------------------------------------------------------------
# CLASS: PlainFormatter
# ------------... | bsd-2-clause | -8,901,676,309,910,815,000 | 32.255319 | 80 | 0.565152 | false | 4.063258 | false | false | false |
TesseractCat/TesseractBot | utilities.py | 1 | 9081 | import discord
from discord.ext import commands
import pickle
import asyncio
from urllib.request import urlopen
from bot import nonAsyncRun, printToDiscord, checkOp, safeEval, getShelfSlot, doUrlopen, getToken
import atexit
import random
import markovify
import wolframalpha
import threading
import xmltodict
... | mit | 4,706,039,357,852,995,000 | 41.869565 | 362 | 0.565907 | false | 3.730896 | false | false | false |
mr555ru/orbotor | orbotor/game_constants.py | 1 | 1246 | # Orbotor - arcade with orbit mechanics
# Copyright (C) 2014 mr555ru
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | 1,457,648,420,157,971,700 | 29.390244 | 74 | 0.715088 | false | 3.244792 | true | false | false |
hengshuangliu/Practice-of-JSRG | RobotNet.py | 1 | 22125 | #! usr/bin/env python
"""
Created on Wed May 11 16:56:23 2016
Builds the RobotNet.
@author: shuang
"""
from __future__ import absolute_import
from __future__ import print_function
import tensorflow as tf
import time
#import numpy as np
import os.path
import Robot_data
import Nets
#-----------------------------------... | apache-2.0 | 8,659,570,485,466,039,000 | 44.431211 | 135 | 0.569266 | false | 3.449486 | true | false | false |
eirannejad/pyRevit | pyrevitlib/pyrevit/interop/adc.py | 1 | 5494 | """Wrapping Autodesk Desktop Connector API"""
#pylint: disable=bare-except,broad-except
import os.path as op
from pyrevit import PyRevitException
from pyrevit.framework import clr, Process
from pyrevit.coreutils import logger
mlogger = logger.get_logger(__name__)
ADC_NAME = "Autodesk Desktop Connector"
ADC_SHORTNAM... | gpl-3.0 | 5,065,847,212,209,732,000 | 27.174359 | 81 | 0.644703 | false | 3.155658 | false | false | false |
vitalyisaev2/autojsoncxx | autojsoncxx.py | 1 | 19692 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2014 Siyuan Ren (netheril96@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 restr... | mit | 2,564,326,828,184,291,300 | 36.869231 | 216 | 0.595826 | false | 3.932894 | false | false | false |
facebook/redex | tools/bytecode_debugger/inject-debug.py | 1 | 1222 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import os
from pyredex.utils import with_temp_cleanup
from tools.bytecode_debugger.inject_debug_lib import run_debug_injector... | mit | -4,664,302,263,808,888,000 | 32.944444 | 85 | 0.670213 | false | 3.771605 | false | false | false |
crankycyclops/epubtools | drivers/input/driver.py | 1 | 2618 | # -*- coding: utf-8 -*-
import os
from abc import ABCMeta, abstractmethod
from exception import InputException
from ..domnode import EbookNode
# Input driver base class
class Driver:
__metaclass__ = ABCMeta
##########################################################################
# Constructor
def __init__(s... | gpl-3.0 | 658,955,758,611,459,200 | 29.44186 | 78 | 0.60275 | false | 4.058915 | false | false | false |
yandex/mastermind | src/cocaine-app/jobs/tasks/task.py | 1 | 2211 | import uuid
class Task(object):
STATUS_QUEUED = 'queued'
STATUS_EXECUTING = 'executing'
STATUS_FAILED = 'failed'
STATUS_SKIPPED = 'skipped'
STATUS_COMPLETED = 'completed'
def __init__(self, job):
self.status = self.STATUS_QUEUED
self.id = uuid.uuid4().hex
self.type = ... | gpl-2.0 | 5,557,278,604,231,714,000 | 25.963415 | 79 | 0.526006 | false | 3.941176 | false | false | false |
nmercier/linux-cross-gcc | linux/lib/python2.7/dist-packages/ccm/Widgets.py | 1 | 58989 | # -*- coding: UTF-8 -*-
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope tha... | bsd-3-clause | 2,181,059,991,415,421,700 | 32.727273 | 207 | 0.537778 | false | 3.738687 | false | false | false |
jsilhan/dnf | tests/test_cli.py | 1 | 10295 | # Copyright (C) 2012-2016 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will ... | gpl-2.0 | 6,798,114,908,982,375,000 | 43.184549 | 96 | 0.636814 | false | 3.49932 | true | false | false |
huangkuan/hack | lib/langdetect/detector.py | 1 | 8605 | import random
import re
import six
from six.moves import zip, xrange
from .lang_detect_exception import ErrorCode, LangDetectException
from .language import Language
from .utils.ngram import NGram
from .utils.unicode_block import unicode_block
class Detector(object):
'''
Detector class is to detect language... | apache-2.0 | -1,899,257,612,203,328,000 | 33.697581 | 115 | 0.555491 | false | 3.860476 | false | false | false |
HewlettPackard/python-proliant-sdk | examples/Rest/ex50_get_csr.py | 1 | 2123 | # Copyright 2016 Hewlett Packard Enterprise Development, LP.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 713,086,320,064,606,000 | 36.6 | 78 | 0.6439 | false | 3.852995 | false | false | false |
beefoo/babel-lab | scripts/praat/pitch_to_svg.py | 1 | 1861 | # -*- coding: utf-8 -*-
# Description: generates an svg file based on Praat pitch data
# Example usage:
# python pitch_to_svg.py data/open_audio_weekend.Pitch output/open_audio_weekend_pitch.svg 1200 240 80 240 0.1 0.1 6
from pprint import pprint
from praat import fileToPitchData
import svgwrite
import sys
import t... | gpl-3.0 | -4,782,063,187,473,325,000 | 34.113208 | 153 | 0.686728 | false | 2.876352 | false | false | false |
jangsutsr/tower-cli | lib/tower_cli/resources/organization.py | 1 | 3417 | # Copyright 2015, Ansible, Inc.
# Luke Sneeringer <lsneeringer@ansible.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 requi... | apache-2.0 | -8,779,574,059,538,204,000 | 43.960526 | 76 | 0.690957 | false | 4.265918 | false | false | false |
COSMOGRAIL/PyCS | pycs/play/fit/bspl.py | 1 | 13642 | # """
# B splines
#
#
# somewhere we should reuse coeffs here... so that a next fit looks if is has the same number of knots, and if yes, uses the previous fit as starting value.
#
# """
#
# import sys
#
# from pycs.gen import *
#
# import numpy as np
# import math
# import matplotlib.pyplot as plt
# import scipy... | gpl-3.0 | -1,284,258,648,724,685,600 | 30.725581 | 156 | 0.62073 | false | 2.373347 | true | false | false |
bally12345/enigma2 | lib/python/Screens/Standby.py | 1 | 7770 | from Screen import Screen
from Components.ActionMap import ActionMap
from Components.config import config
from Components.AVSwitch import AVSwitch
from Components.SystemInfo import SystemInfo
from GlobalActions import globalActionMap
from enigma import eDVBVolumecontrol
from os import path
import Screens.InfoBar
inSta... | gpl-2.0 | 2,002,061,532,838,308,000 | 33.843049 | 154 | 0.716474 | false | 3.163681 | true | false | false |
cpieloth/BackBacker | setup.py | 1 | 2142 | #!/usr/bin/env python3
"""
A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import setup_commands
__author__ = 'Christof Pieloth'
install_re... | gpl-3.0 | -569,968,029,977,721,900 | 27.56 | 111 | 0.65733 | false | 3.901639 | false | false | false |
udoklein/blinkenlight | Experiments/Removing_Flicker/glowing_bounce/glowing_bounce.py | 1 | 3310 | #!/usr/bin/python
#
# www.blinkenlight.net
#
# Copyright 2011 Udo Klein
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | gpl-3.0 | -5,319,239,773,648,759,000 | 28.035088 | 92 | 0.642598 | false | 3.213592 | false | false | false |
jwlin/web-crawler-tutorial | ch9/bot_house.py | 1 | 1795 | from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.by import By
if __name__ == '__main__':
url = 'http://www.bot.com.tw/house/default.aspx'
try:
d... | mit | -2,260,111,691,379,267,300 | 33.659574 | 86 | 0.631676 | false | 2.929856 | false | false | false |
im85288/script.tvguide.fullscreen | ReloadAddonFolders.py | 1 | 3020 | import os
import re
import xbmc
import xbmcgui
import xbmcaddon
import xbmcvfs
from rpc import RPC
ADDON = xbmcaddon.Addon(id='script.tvguide.fullscreen')
file_name = 'special://profile/addon_data/script.tvguide.fullscreen/folders.list'
f = xbmcvfs.File(file_name)
items = f.read().splitlines()
f.close()
unique = set(... | gpl-2.0 | -7,479,762,841,913,802,000 | 31.12766 | 103 | 0.621523 | false | 3.307777 | false | false | false |
brunosantos/Bsan-kodi-repo | plugin.video.kodi/menuLateral.py | 1 | 2906 | import re
from utils import openfile
from gravador import iniciagravador
from servidores import request_servidores
class menulateral(xbmcgui.WindowXMLDialog):
def __init__( self, *args, **kwargs ):
xbmcgui.WindowXML.__init__(self)
self.finalurl = kwargs[ "finalurl" ]
self.sigla... | gpl-2.0 | -8,815,631,443,938,725,000 | 30.247312 | 85 | 0.575705 | false | 3.740026 | false | false | false |
stvstnfrd/edx-platform | common/lib/xmodule/xmodule/library_content_module.py | 1 | 29619 | # -*- coding: utf-8 -*-
"""
LibraryContent: The XBlock used to include blocks from a library in a course.
"""
import json
import logging
import random
from copy import copy
from gettext import ngettext
import six
import bleach
from lazy import lazy
from lxml import etree
from opaque_keys.edx.locator import LibraryLo... | agpl-3.0 | -1,642,454,611,555,085,800 | 39.679945 | 125 | 0.60932 | false | 4.442028 | false | false | false |
ResolveWang/algrithm_qa | 分类代表题目/深搜、广搜和回溯/地牢逃脱.py | 1 | 2952 | """
链接:https://www.nowcoder.com/questionTerminal/0385945b7d834a99bc0010e67f892e38
来源:牛客网
给定一个 n 行 m 列的地牢,其中 '.' 表示可以通行的位置,'X' 表示不可通行的障碍,牛牛从 (x0 , y0 ) 位置出发,遍历这个地牢,和一般的游戏所不同的是,他每一步只能按照一些指定的步长遍历地牢,要求每一步都不可以超过地牢的边界,也不能到达障碍上。地牢的出口可能在任意某个可以通行的位置上。牛牛想知道最坏情况下,他需要多少步才可以离开这个地牢。
输入描述:
每个输入包含 1 个测试用例。每个测试用例的第一行包含两个整数 n 和 m(1 <= ... | mit | 1,234,208,552,566,871,300 | 27.287671 | 281 | 0.5625 | false | 1.689034 | false | false | false |
boudewijnrempt/kura | kuralib/lng_strm.py | 1 | 7895 | from dbobj.dbobj import dbRecord, dbTable
from dbobj.dbexceptions import dbRecordNotFoundException
from dbobj.dbtypes import *
from string import lstrip, rstrip
import re
True = 1
False = 0
try:
import kuraapp
from lng_elmt import lng_element, lng_elements
from lng_sttg import lng_stream_tag
import docbook
e... | bsd-2-clause | -1,322,527,140,797,956,400 | 29.019011 | 143 | 0.561748 | false | 3.490274 | false | false | false |
pixyj/feel | django-server/feel/codequiz/migrations/0005_auto_20151223_1339.py | 1 | 1605 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-23 13:39
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
... | mit | 8,521,793,478,062,373,000 | 41.236842 | 153 | 0.616199 | false | 3.924205 | false | false | false |
tperrier/mwachx | utils/models.py | 1 | 2826 | # Python Imports
# Django Imports
from django.db import models
from django.core.exceptions import ObjectDoesNotExist
from django.utils import timezone
# Create your models here.
class TimeStampedModel(models.Model):
"""
An abstract base class for storing created/modified metadata with a model
"""
# T... | apache-2.0 | -5,306,527,070,767,118,000 | 30.4 | 90 | 0.651097 | false | 4.095652 | false | false | false |
ddu7/PyLC | 023Merge k Sorted Lists.py | 1 | 1824 | # -*- coding: utf-8 -*-
# Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
def __repr__(self):
if self:
return "... | mit | -7,032,749,693,135,191,000 | 30.574468 | 100 | 0.608491 | false | 2.311526 | false | false | false |
Mariusz1970/enigma2 | lib/python/Tools/Profile.py | 1 | 1710 | # the implementation here is a bit crappy.
import time
from Directories import resolveFilename, SCOPE_CONFIG
from boxbranding import getBoxType
boxtype = getBoxType()
PERCENTAGE_START = 50
PERCENTAGE_END = 100
profile_start = time.time()
profile_data = {}
total_time = 1
profile_file = None
try:
f = open(resolveF... | gpl-2.0 | 2,877,156,768,245,591,000 | 23.084507 | 82 | 0.627485 | false | 2.701422 | false | false | false |
weka511/bioinformatics | DDEG.py | 1 | 1236 | # Copyright (C) 2017 Greenweaves Software Pty Ltd
# This 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.
# This software is distribut... | gpl-3.0 | 1,793,962,163,063,936,000 | 28.452381 | 82 | 0.642395 | false | 3.340541 | false | false | false |
nginx/unit | test/unit/applications/lang/go.py | 1 | 2247 | import os
import subprocess
from unit.applications.proto import TestApplicationProto
from unit.option import option
class TestApplicationGo(TestApplicationProto):
def prepare_env(self, script, name, static=False):
if not os.path.exists(option.temp_dir + '/go'):
os.mkdir(option.temp_dir + '/go... | apache-2.0 | -5,466,656,760,982,017,000 | 27.443038 | 72 | 0.449933 | false | 4.304598 | true | false | false |
rueckstiess/dopamine | scripts/fa_test2.py | 1 | 1408 | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from random import shuffle
from dopamine.fapprox import *
X_data, Y_data = np.meshgrid(np.arange(-1, 1, 0.3), np.arange(-1, 1, 0.3))
Z_data = np.sin(5*X_data) * np.cos(Y_data) + np.random.normal(0, 0.2, X_data.shape)
plt.ion()... | gpl-3.0 | 4,167,445,729,330,403,300 | 30.311111 | 112 | 0.612926 | false | 2.612245 | false | false | false |
jokebill/imagewall | loadwall.py | 1 | 2391 | #!/usr/bin/env python
import os,sys
import cut_image
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-c","--center",
metavar="X,Y",
type=str,
default="0,0",
help="Center offset in percentage")
parser.add_option("-r","--ratio",
metavar="X:Y",
t... | mit | 4,022,014,293,897,294,000 | 25.274725 | 63 | 0.59724 | false | 3.420601 | false | false | false |
sourcepole/kadas-albireo | python/__init__.py | 1 | 3151 | # -*- coding: utf-8 -*-
"""
***************************************************************************
__init__.py
---------------------
Date : January 2007
Copyright : (C) 2007 by Martin Dobias
Email : wonder dot sk at gmail dot com
**********************... | gpl-2.0 | -3,245,017,442,672,318,500 | 34.806818 | 90 | 0.555062 | false | 4.212567 | false | false | false |
APPIAN-PET/APPIAN | src/mnc2nii.py | 1 | 1555 | import os
import re
import nibabel as nib
import numpy as np
from glob import glob
from sys import argv
dirname=argv[1]
print(dirname)
### COLLECT ALL MNCs
all_fls = []
for dirs, things, fls in os.walk(dirname):
if len(fls) > 0:
for fl in fls:
all_fls.append(os.path.join(dirs,fl))
all_mncs = ... | mit | 4,713,257,596,897,754,000 | 24.916667 | 90 | 0.587781 | false | 2.62226 | false | false | false |
softak/webfaction_demo | apps/cart/migrations/0008_auto__add_field_socialtag_paid.py | 1 | 9611 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'SocialTag.paid'
db.add_column('cart_socialtag', 'paid', self.gf('django.db.models.fields.D... | bsd-3-clause | -8,394,348,503,170,072,000 | 72.366412 | 182 | 0.551035 | false | 3.713679 | false | false | false |
openstack/python-heatclient | heatclient/common/deployment_utils.py | 1 | 5226 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | -2,019,147,268,681,793,300 | 33.609272 | 78 | 0.58917 | false | 3.894188 | true | false | false |
51reboot/actual_09_homework | 10/jinderui/cmdb/user/views.py | 1 | 6941 | #encoding: utf-8
import sys,os
reload(sys)
sys.setdefaultencoding( "utf-8" )
from flask import Flask
from flask import request
from flask import redirect
from flask import render_template
from flask import session
from flask import flash
from functools import wraps
import json
from user import app
import logan
from as... | mit | -8,779,404,798,102,596,000 | 26.207965 | 106 | 0.693771 | false | 2.325643 | false | false | false |
ismaelgaudioso/pihome | Views/baseView.py | 1 | 1139 | from Events.draw import *
from Events.quitcleanup import *
from Libraries.Buttons import *
from config import *
import pygame
class BaseView:
"""..."""
def __init__(self, evManager):
self.evManager = evManager
self.evManager.RegisterListener(self)
size = (Config.DEFAULT_WIDTH, Conf... | mit | -468,260,044,115,288,700 | 25.511628 | 64 | 0.640913 | false | 3.968641 | false | false | false |
ros2/ci | ros2_batch_job/windows_batch/__init__.py | 1 | 4135 | # Copyright 2015 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 | -4,589,281,492,062,788,000 | 39.940594 | 123 | 0.58283 | false | 3.685383 | false | false | false |
tensorflow/model-analysis | tensorflow_model_analysis/evaluators/analysis_table_evaluator_test.py | 1 | 3340 | # Lint as: python3
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | apache-2.0 | -1,047,125,563,961,782,500 | 30.214953 | 78 | 0.626048 | false | 4.093137 | true | false | false |
SEC-i/ecoControl | server/forecasting/optimizing/auto_optimization.py | 1 | 6269 | """
This module contains the algorithm for optimizing the costs of energy systems.
"""
from datetime import datetime
from scipy.optimize import fmin_l_bfgs_b
import calendar
import cProfile
import copy
from collections import namedtuple
import numpy as np
from numpy import array
from server.devices.base import BaseEn... | mit | -52,483,128,942,778,310 | 37.22561 | 129 | 0.684001 | false | 3.790206 | true | false | false |
googleads/google-ads-python | google/ads/googleads/v6/enums/types/dsa_page_feed_criterion_field.py | 1 | 1199 | # -*- 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 o... | apache-2.0 | -4,596,275,378,087,262,700 | 28.243902 | 74 | 0.698082 | false | 3.880259 | false | false | false |
CDNoyes/EDL-Py | EntryGuidance/HeadingAlignment.py | 1 | 3276 | """ Heading Alignment Controllers """
from numpy import sin, cos, arcsin, arccos, sqrt, pi, radians
import numpy as np
from scipy.optimize import minimize_scalar
from scipy.integrate import trapz
from MPC import constant
from functools import partial
def desiredHeading(lon_current, lat_current, lon_target,... | gpl-3.0 | 498,352,842,672,781,600 | 33.608696 | 142 | 0.639194 | false | 3.237154 | false | false | false |
arantius/readability-api | main.py | 1 | 3537 | #!/usr/bin/env python
"""App Engine request handler for Readability API project.
--------------------------------------------------------------------------------
Readability API - Clean up pages and feeds to be readable.
Copyright (C) 2010 Anthony Lieuallen
This program is free software: you can redistribute it and... | gpl-3.0 | -1,945,832,401,685,141,800 | 27.991803 | 81 | 0.675997 | false | 3.627692 | false | false | false |
jnnk/pyethereum | pyethereum/blocks.py | 1 | 32057 | import time
import rlp
import trie
import db
import utils
import processblock
import transactions
import logging
import copy
import sys
from repoze.lru import lru_cache
# logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger()
INITIAL_DIFFICULTY = 2 ** 17
GENESIS_PREVHASH = '\00' * 32
GENESIS_COINBASE =... | mit | 5,795,150,003,162,164,000 | 36.892435 | 142 | 0.574102 | false | 3.671209 | false | false | false |
cnobile2012/dcolumn | example_site/settings/base.py | 1 | 7181 | # -*- coding: utf-8 -*-
"""
Django settings for example_site project.
For more information on this file, see
https://docs.djangoproject.com/en/<version>/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/<version>/ref/settings/
"""
import os
from dcolumn.dcolumns.m... | mit | 5,756,740,906,928,569,000 | 30.915556 | 79 | 0.599499 | false | 3.775499 | false | false | false |
mganeva/mantid | Framework/PythonInterface/plugins/algorithms/USANSSimulation.py | 1 | 6752 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=no-init,invalid-name
from __... | gpl-3.0 | 395,813,981,326,832,300 | 40.937888 | 123 | 0.556132 | false | 3.574378 | false | false | false |
bytedance/fedlearner | example/tree_model/make_data.py | 1 | 5382 | # pylint: disable=unsubscriptable-object
import os
import argparse
import numpy as np
import tensorflow as tf
from sklearn.datasets import load_iris
def quantize_data(header, dtypes, X):
for i, (h, dtype) in enumerate(zip(header, dtypes)):
if h[0] != 'f' or dtype != np.int32:
continue
... | apache-2.0 | 6,132,635,942,032,100,000 | 35.612245 | 77 | 0.554255 | false | 3.265777 | true | false | false |
JakubPetriska/poker-cfr | verification/dbr_correctness_test.py | 1 | 6481 | import os
import unittest
from unittest import TestSuite
import random
import math
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as plticker
import acpc_python_client as acpc
from response.data_biased_response import DataBiasedResponse
from evaluation.exploitability import Exploitabilit... | mit | -8,551,517,427,911,411,000 | 40.544872 | 119 | 0.584015 | false | 3.55318 | true | false | false |
istvanzk/RasPiConnectServer | ExecuteFiles/ExecuteFileDirectory.py | 1 | 3226 | #!/usr/local/bin/python3
# Filename: ExecuteFileDirectory.py
# Version 1.0 04/09/13 JS MiloCreek
# Version 3.0 04.04.2016 IzK (Python3.4+)
import Config
import glob
import os
import xml.etree.ElementTree as ET
import BuildResponse
import time
def Execute_File_Directory(root):
# find the interface object type
... | gpl-3.0 | -8,829,375,677,220,969,000 | 18.202381 | 66 | 0.717297 | false | 3.431915 | true | false | false |
futureneer/simple_ur | simple_ur_driver/src/simple_ur_driver/ur_simulation.py | 1 | 8862 | #!/usr/bin/env python
# ROS IMPORTS
import roslib; roslib.load_manifest('simple_ur_driver')
import rospy
import tf; import tf_conversions as tf_c
import PyKDL
# URDF
from urdf_parser_py.urdf import URDF
from pykdl_utils.kdl_kinematics import KDLKinematics
# MSGS and SERVICES
from simple_ur_msgs.srv import *
from sensor... | bsd-2-clause | 5,631,890,719,074,194,000 | 41.004739 | 122 | 0.583164 | false | 3.631967 | true | false | false |
michaelneuder/image_quality_analysis | bin/data_analysis/prediction_target_plotter.py | 1 | 1940 | #!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (13,10)
plt.rcParams['font.size'] = 18
import csv
import scipy.stats as stats
def main():
prediction_plot = []
target_plot = []
with open('../nets/wip/post_training.csv', mode='r') as csv_file:
... | mit | 8,428,636,198,298,739,000 | 32.448276 | 111 | 0.623196 | false | 3.362218 | false | false | false |
andymeneely/attack-surface-metrics | attacksurfacemeter/loaders/cflow_line_parser.py | 1 | 1154 | __author__ = 'kevin'
import re
from attacksurfacemeter.loaders.base_line_parser import BaseLineParser
class CflowLineParser(BaseLineParser):
""""""
_instance = None
@staticmethod
def get_instance(cflow_line=None):
if CflowLineParser._instance is None:
CflowLineParser._instance =... | mit | 7,283,357,729,071,608,000 | 25.837209 | 71 | 0.60312 | false | 3.529052 | false | false | false |
debrouwere/facebook-insights | facebookinsights/utils/api.py | 1 | 2320 | # encoding: utf-8
import copy
import facepy
from . import url
def getdata(obj, key, default=None):
if key in obj:
return obj[key]['data']
else:
return default
class GraphAPI(facepy.GraphAPI):
def __init__(self, *vargs, **kwargs):
self.base = []
super(GraphAPI, self).__in... | isc | -8,699,935,582,617,644,000 | 31.676056 | 99 | 0.58319 | false | 4.241316 | false | false | false |
ryanleland/Genetix.py | genetix/chromosome.py | 1 | 1632 | # -*- coding: utf-8 -*-
import random
from genetix.gene import Gene
class Chromosome(object):
"""The base Chromosome class, which is a container for genes, and handles
mutation via the offspring method.
"""
def __init__(self, names=[], genes=[]):
self.names = names
self.genes = gene... | mit | 8,750,449,154,566,175,000 | 23.727273 | 96 | 0.568015 | false | 3.734554 | false | false | false |
mtbc/openmicroscopy | components/tools/OmeroWeb/omeroweb/webclient/webclient_gateway.py | 1 | 87374 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# webclient_gateway
#
# Copyright (c) 2008-2014 University of Dundee.
#
# 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... | gpl-2.0 | -5,932,833,563,807,024,000 | 36.435304 | 165 | 0.563394 | false | 4.28199 | false | false | false |
MichaelClerx/libcellml | tests/resources/generator/algebraic_eqn_computed_var_on_rhs/model.py | 1 | 1041 | # The content of this file was generated using the Python profile of libCellML 0.2.0.
from enum import Enum
from math import *
__version__ = "0.1.0"
LIBCELLML_VERSION = "0.2.0"
STATE_COUNT = 0
VARIABLE_COUNT = 2
class VariableType(Enum):
CONSTANT = 1
COMPUTED_CONSTANT = 2
ALGEBRAIC = 3
VOI_INFO = {"... | apache-2.0 | -6,894,229,068,872,666,000 | 19.019231 | 117 | 0.670509 | false | 3.135542 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.