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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dmsovetov/dreemchest | Source/CLI/command_line/env.py | 1 | 5399 | #################################################################################
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Dmitry Sovetov
#
# https://github.com/dmsovetov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "... | mit | -1,461,173,353,538,070,500 | 33.394904 | 119 | 0.667346 | false | 4.087055 | true | false | false |
wordpress-mobile/WordPress-iOS | Scripts/localize.py | 1 | 5499 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http:... | gpl-2.0 | 3,877,940,906,966,676,000 | 33.791139 | 318 | 0.599418 | false | 3.611695 | false | false | false |
cts-admin/cts | cts/members/management/commands/send_renewal_emails.py | 1 | 1296 | import datetime
from django.conf import settings
from django.core.management.base import BaseCommand
from django.template.loader import render_to_string
from ...models import CorporateMember
from home.tasks import mail_task
class Command(BaseCommand):
def handle(self, *args, **options):
thirty_days_fro... | gpl-3.0 | 1,292,665,148,696,779,800 | 40.806452 | 105 | 0.56713 | false | 4.5 | false | false | false |
kmike/django-admin-user-stats | admin_user_stats/base_modules.py | 1 | 2779 | # -*- coding: utf-8 -*-
from datetime import timedelta
from django.db.models import Count
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.timezone import now
except ImportError:
from datetime import datetime
now = datetime.now
from qsstats import QuerySetStats
from admin_tool... | mit | 5,017,720,829,543,766,000 | 32.481928 | 160 | 0.617488 | false | 3.854369 | false | false | false |
eirannejad/pyRevit | pyrevitlib/rpw/__revit.py | 1 | 5945 | """
The main rpw namespace and rpw.revit provide you with most of the imports will
need.
>>> from rpw import revit, db, ui
>>> db.Element(SomeElement)
>>> ui.Selection()
>>> revit.doc
>>> revit.uidoc.ActiveView
Revit Namespaces are also available:
>>> from rpw import DB, UI
>>> DB.ElementId(00000)
>>> UI.TaskDialog... | gpl-3.0 | 7,026,033,917,477,913,000 | 28.142157 | 90 | 0.601346 | false | 4.035981 | false | false | false |
LAST-EBD/Consultas | RandomlyMovePolygons.py | 1 | 5556 | import fiona, shapely, logging, sys, os, random
from shapely import affinity, speedups
from shapely.geometry import mapping, shape, Polygon
speedups.enable()
logging.basicConfig(stream=sys.stderr, level=logging.INFO)
class randomly_move():
'''Con esta clase se pretende el mover aleatoriamente una serie de ... | mit | 1,503,735,368,378,538,500 | 37.324138 | 125 | 0.474622 | false | 3.932059 | false | false | false |
wadester/wh_test_py | gdbm_test.py | 1 | 1061 | #!/usr/bin/env python
# Module: gdbm_test.py
# Purpose: gdbm test
# Date: N/A
# Notes:
# 1) Reference:
# https://docs.python.org/2/library/gdbm.html
#
import gdbm
import random as r
mydb="testdb.gdbm"
rcnt=10
print "creating test db",mydb, "with ", rcnt, "records"
db=gdbm.open(mydb, 'c')
for x in range(0,... | gpl-2.0 | 1,135,733,845,140,344,400 | 15.578125 | 55 | 0.618285 | false | 2.581509 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/py_compile.py | 1 | 6128 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: py_compile.py
"""Routine to "compile" a .py file to a .pyc (or .pyo) file.
This module has intimate knowledge of the format of .pyc files.
"""
impor... | unlicense | 8,292,061,942,146,150,000 | 33.627119 | 84 | 0.598074 | false | 4.036891 | false | false | false |
loveisbug/liveshow-sh | roll.py | 1 | 1679 | # -*- coding: utf-8 -*-
import urllib
from urllib.request import urlopen
import html.parser as h
from bs4 import BeautifulSoup
import sys
import time
import io
import re
reg =re.compile(r'\d+')
list = ['0', '10', '20']
for s in list:
url = ('https://site.douban.com/maosh/widget/events/1441569/?start='+s)
url... | mit | -884,590,390,812,692,500 | 41.947368 | 124 | 0.599632 | false | 3.229703 | false | false | false |
nkalodimas/invenio | modules/websearch/lib/search_engine_utils.py | 1 | 7053 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; eithe... | gpl-2.0 | 3,573,369,764,786,767,400 | 37.752747 | 90 | 0.510563 | false | 3.798061 | false | false | false |
comptech/atrex | Software/myPeakTableWidget.py | 1 | 3328 |
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.uic import *
from myPeaks import *
from myDetector import *
from peakEditDlg import *
class myPeakTableWidget (QTableWidget) :
numPeaks = 0
#headList = QString("Num;H;K;L;len(XYZ)^-1;2-theta;Gonio[5];nu").split(";... | lgpl-3.0 | -1,797,646,228,205,733,000 | 31.627451 | 80 | 0.574219 | false | 3.395918 | false | false | false |
Chilledheart/windycode | python/vimsupport.py | 1 | 6475 | #!/usr/bin/env python
import vim
import os
# Given an object, returns a str object that's utf-8 encoded.
def ToUtf8IfNeeded(value):
if isinstance(value, unicode):
return value.encode('utf8')
if isinstance(value, str):
return value
return str(value)
def PresentYesOrNoDialog(message):
return int(vim.eva... | bsd-3-clause | -5,430,061,958,010,127,000 | 28.83871 | 109 | 0.658069 | false | 3.353185 | false | false | false |
SKIRT/PTS | modeling/config/expand.py | 1 | 3493 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
# ... | agpl-3.0 | 8,462,161,034,693,216,000 | 44.947368 | 183 | 0.579324 | false | 4.488432 | false | false | false |
unidesigner/microcircuit | microcircuit/dataset/testconnectome001.py | 1 | 1589 | """ Retrieve C.elegans connectivity from Web and parse appropriately
"""
# see data/
# http://mit.edu/lrv/www/elegans/
from scipy.io import matlab
import os.path as op
import networkx as nx
import microcircuit.constants as const
from microcircuit.connectome import Connectome
mat = matlab.loadmat(op.join(op.dirname(o... | bsd-3-clause | -2,411,533,777,501,062,000 | 29.576923 | 100 | 0.696665 | false | 2.817376 | false | false | false |
rtrouton/Recipes-for-AutoPkg | Shared_Processors/SubDirectoryList.py | 1 | 3324 | #!/usr/bin/python
#
# Copyright 2013 Jesse Peterson
#
# 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... | bsd-3-clause | -6,133,843,226,604,085,000 | 32.24 | 76 | 0.610409 | false | 3.887719 | false | false | false |
ayiis/python | better_tcp_sniffer.py | 1 | 7186 | # -*- coding:utf-8 -*-
import socket
import struct
import pcap
import traceback
from aytool.common.print_table import PrettyTable
"""
┌──────────────────────────────────┬──────────────────────────────────┬──────────┐
│ Destination Mac │ Source Mac │Ether ... | mit | -6,738,308,824,205,303,000 | 42.756522 | 218 | 0.382949 | false | 2.314627 | false | false | false |
mariusbaumann/pyload | module/plugins/hoster/FastixRu.py | 1 | 1986 | # -*- coding: utf-8 -*-
import re
from random import randrange
from urllib import unquote
from module.common.json_layer import json_loads
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class FastixRu(MultiHoster):
__name__ = "FastixRu"
__type__ = "hoster"
__version__ ... | gpl-3.0 | 5,678,757,568,383,446,000 | 28.205882 | 118 | 0.58711 | false | 3.610909 | false | false | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/vta/apps/tsim_example/python/tsim.py | 1 | 1886 | # 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
# "License"); you may not u... | apache-2.0 | -4,434,247,329,592,706,000 | 31.517241 | 86 | 0.677094 | false | 3.441606 | false | false | false |
nerdvegas/rez | src/rez/data/tests/release/build.py | 1 | 1566 | from __future__ import print_function
import shutil
import os.path
import os
import sys
def build(source_path, build_path, install_path, targets):
def _copy(src, dest):
print("copying %s to %s..." % (src, dest))
if os.path.exists(dest):
shutil.rmtree(dest)
shutil.copytree(src... | lgpl-3.0 | -7,258,360,811,447,583,000 | 28.54717 | 79 | 0.667944 | false | 3.591743 | false | false | false |
zbqf109/goodo | openerp/service/report.py | 1 | 5140 | # -*- coding: utf-8 -*-
import base64
import logging
import sys
import threading
import openerp
import openerp.report
from openerp import tools
from openerp.exceptions import UserError
import security
_logger = logging.getLogger(__name__)
# TODO: set a maximum report number per user to avoid DOS attacks
#
# Report... | gpl-3.0 | 5,155,048,508,241,609,000 | 34.205479 | 167 | 0.603307 | false | 3.93267 | false | false | false |
energyPATHWAYS/energyPATHWAYS | model_building_tools/create_map_keys_from_drivers/map_key_from_driver.py | 1 | 2834 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 07 19:20:05 2016
@author: ryandrewjones
"""
import sys
import signal
import click
import os
import cPickle as pickle
import energyPATHWAYS.config as cfg
import energyPATHWAYS.util as util
from energyPATHWAYS.pathways_model import PathwaysModel
import energyPATHWAYS.shape... | mit | 2,169,229,182,338,889,700 | 25.240741 | 137 | 0.690543 | false | 3.044039 | false | false | false |
nitely/ochDownloader | plugins/filefactory_com/anonym_download.py | 1 | 1919 | #python libs
import logging
logger = logging.getLogger(__name__)
#Libs
from addons.captcha.recaptcha import PluginRecaptcha
#CONNECTION_RETRY = 3
BASE_URL = "http://www.filefactory.com"
WAITING = 60
class PluginDownload(PluginRecaptcha):
def parse(self):
link = self.link
page = self.get_page(lin... | lgpl-3.0 | -5,499,612,315,312,826,000 | 32.684211 | 74 | 0.549766 | false | 3.314335 | false | false | false |
yaniv14/OpenCommunity | src/acl/default_roles.py | 1 | 3262 | from django.utils.translation import ugettext_lazy as _
class DefaultRoles(object):
VIEWER = 'viewer'
OBSERVER = 'observer'
PARTICIPANT = 'participant'
PROPOSER = 'proposer'
CONTRIBUTOR = 'contributor'
EDITOR = 'editor'
OPERATOR = 'operator'
DECIDER = 'decider'
MANAGER = 'manager'
... | bsd-3-clause | -7,700,405,619,576,067,000 | 24.484375 | 74 | 0.568363 | false | 3.690045 | false | false | false |
jensck/fluidity | fluidity/managers.py | 1 | 38146 | #-*- coding:utf-8 -*-
#
# Copyright (C) 2012 - Jens Knutson <jens.knutson at gmail dot com>
# This software is licensed under the GNU General Public License
# version 3 or later (see the file COPYING).
#pylint: disable-msg=W0201
"""Collection of "manager" classes, which handle various aspects of Fluidity."""
from __fut... | gpl-3.0 | -1,707,985,159,558,534,700 | 40.826754 | 111 | 0.554055 | false | 3.741638 | false | false | false |
macosforge/ccs-calendarserver | calendarserver/tools/resources.py | 1 | 4349 | #!/usr/bin/env python
##
# Copyright (c) 2006-2017 Apple 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 r... | apache-2.0 | -4,358,202,407,898,562,000 | 27.801325 | 111 | 0.626811 | false | 4.516096 | true | false | false |
KatolaZ/mammult | structure/activity/node_degree_vectors.py | 1 | 2498 | # This file is part of MAMMULT: Metrics And Models for Multilayer Networks
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later ver... | gpl-3.0 | 6,631,259,597,424,604,000 | 29.463415 | 74 | 0.542834 | false | 3.641399 | false | false | false |
petewarden/tensorflow | tensorflow/python/keras/engine/data_adapter.py | 1 | 57975 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -7,670,201,060,302,608,000 | 33.778044 | 115 | 0.658404 | false | 3.911943 | false | false | false |
yhalk/vw_challenge_ECR | src/ev3/Sensors/sensors.py | 1 | 1535 | import paho.mqtt.client as mqtt
import config
import ev3dev.ev3 as ev3
import IR.IR_control as remoteControl
import ev3control.master as master
from ev3control.messages import *
import time
from MotionCtrl.actuators_simple import actuators
from Sensors.odometry_ev3 import Odometry
#Set IR sensor to remote control mode... | apache-2.0 | 4,616,542,250,256,086,000 | 35.547619 | 112 | 0.661889 | false | 3.488636 | false | false | false |
JMoravec/unkRadnet | fitToCurve/pyeq2/Examples/Complex/ListAllStandardEquations_2D.py | 1 | 1067 | # Version info: $Id: ListAllStandardEquations_2D.py 1 2012-01-07 22:20:43Z zunzun.com@gmail.com $
import os, sys, inspect
if os.path.join(sys.path[0][:sys.path[0].rfind(os.sep)], '../..') not in sys.path:
sys.path.append(os.path.join(sys.path[0][:sys.path[0].rfind(os.sep)], '../..'))
import pyeq2, pyeq2.Extend... | bsd-3-clause | 7,471,303,952,131,567,000 | 43.5 | 125 | 0.564199 | false | 3.797153 | false | false | false |
backmari/moose | python/peacock/Input/ParamsByType.py | 1 | 5164 | from PyQt5.QtWidgets import QWidget, QComboBox, QStackedWidget
from PyQt5.QtCore import pyqtSignal
from peacock.base.MooseWidget import MooseWidget
from peacock.utils import WidgetUtils
from ParamsByGroup import ParamsByGroup
class ParamsByType(QWidget, MooseWidget):
"""
Has a QComboBox for the different allow... | lgpl-2.1 | -7,038,259,173,053,225,000 | 32.532468 | 106 | 0.599923 | false | 3.891485 | false | false | false |
eharney/cinder | cinder/volume/targets/tgt.py | 1 | 13042 | # 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 | 3,726,398,437,732,719,000 | 40.403175 | 78 | 0.523463 | false | 4.252364 | false | false | false |
noogel/xyzStudyPython | python/qqwry/qq_ip_query.py | 1 | 9212 | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
import os
import sys, _socket, mmap
from struct import unpack, pack
DataFileName = "qq_ip_database.Dat"
def _ip2ulong(ip):
'''ip(0.0.0.0) -> unsigned long'''
return unpack('>L', _socket.inet_aton(ip))[0]
def _ulong2ip(ip):
'''unsigned long -... | apache-2.0 | 2,556,463,129,593,330,700 | 29.101449 | 100 | 0.463653 | false | 3.053718 | false | false | false |
felixb/v2gcalendar | v2gcalendar/calendar_service.py | 1 | 3566 | __author__ = 'flx'
from apiclient.discovery import build
import httplib2
from oauth2client import tools
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.file import Storage
from oauth2client.tools import run_flow
# For this example, the client id and client secret are command-line arguments.
c... | apache-2.0 | -2,096,562,204,030,105,600 | 35.387755 | 79 | 0.579641 | false | 4.479899 | false | false | false |
google/uncertainty-baselines | uncertainty_baselines/models/wide_resnet_condconv_test.py | 1 | 2177 | # coding=utf-8
# Copyright 2021 The Uncertainty Baselines 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 ap... | apache-2.0 | 8,842,494,253,316,627,000 | 31.984848 | 77 | 0.678916 | false | 3.586491 | true | false | false |
salmoni/Salstat | tabler.py | 1 | 7586 | """
tabler.py
Creates tables in HTML for Salstat
Submit a list of [heading: value] pairs in the desired order
p-values are automatically formatted as %1.6f (all other floats as %5.3f?)
The first two routines are generic and for single answer results.
Following are a handful of tabler functions for particular tests
(... | gpl-2.0 | 5,365,793,006,503,404,000 | 36.004878 | 134 | 0.521355 | false | 2.985439 | false | false | false |
velastin/UAndes | convert_to_records.py | 1 | 7327 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lice... | gpl-3.0 | -1,976,234,764,730,661,400 | 29.529167 | 80 | 0.684318 | false | 3.702375 | false | false | false |
gwaller/mongo-connector | mongo_connector/oplog_manager.py | 1 | 30523 | # Copyright 2013-2014 MongoDB, 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 writin... | apache-2.0 | 1,205,969,537,052,731,600 | 39.97047 | 80 | 0.496445 | false | 4.877437 | false | false | false |
googlecolab/colabtools | google/colab/output/_js.py | 1 | 3073 | # Copyright 2017 Google 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 writing, ... | apache-2.0 | 8,002,486,483,341,580,000 | 31.691489 | 78 | 0.731207 | false | 4.006519 | false | false | false |
amasiero/approach_control | approach_control_people/nodes/approach_control_people/faces/GenderDiscover.py | 1 | 2283 | #!/usr/bin/env python
import cv2.cv
import imutils
import time
import smach
import smach_ros
import rospy
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
from approach_control_people.faces.Map import Map
from approach_control_people.faces.ULBP import ULBP... | gpl-2.0 | -3,593,615,707,399,300,000 | 24.098901 | 119 | 0.700394 | false | 2.624138 | false | false | false |
jithinbp/BTK_simulations | current_fermi.py | 1 | 2141 | import math
import pygrace
import pygame,os,time,sys
WIDTH=400
HEIGHT=100
size = [WIDTH,HEIGHT]
flags=pygame.SRCALPHA|pygame.HWSURFACE|pygame.HWACCEL
os.environ['SDL_VIDEO_WINDOW_POS'] = '700,100'
screen = pygame.display.set_mode(size,flags)
pygame.display.set_caption("Transmission and reflection")
def xmgrace():
g... | gpl-3.0 | 8,471,243,037,193,875,000 | 14.977612 | 58 | 0.609061 | false | 2.021719 | false | false | false |
anguoyang/SMQTK | OLD_ROOT/WebUI/QueryRecommend/query_recommend.py | 1 | 7183 | """
LICENCE
-------
Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to
KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
"""
import os
import numpy as np
import json
thispath = os.path.dirname(os.path.abs... | bsd-3-clause | 2,104,360,600,271,689,500 | 42.067485 | 114 | 0.622442 | false | 3.278412 | false | false | false |
rossrader/destalinator | tests/test_destalinator.py | 1 | 25539 | from datetime import date, datetime, timedelta
import mock
import os
import unittest
import destalinator
import slacker
import slackbot
sample_slack_messages = [
{
"type": "message",
"channel": "C2147483705",
"user": "U2147483697",
"text": "Human human human.",
"ts": "1355... | apache-2.0 | 9,137,686,970,157,095,000 | 48.113462 | 130 | 0.673519 | false | 3.462915 | true | false | false |
UpOut/UpOutDF | test.py | 1 | 2268 | from upoutdf.parse import get_class
#test = "every month on last sunday,monday starting _October_15_2012_8:00PM ending _April_1_2014 at 8:00PM lasting 120 minutes in America/Los_Angeles"
#test = "every month day 4 starting _October_1_2013 ending _April_1_2014 at 8:00PM lasting 2 hours in America/Los_Angeles"
#test =... | mit | 8,324,564,143,246,006,000 | 29.253333 | 298 | 0.701499 | false | 2.842105 | false | false | false |
maljac/odoo-addons | report_extended_purchase/__openerp__.py | 1 | 1599 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | agpl-3.0 | 4,613,577,968,119,786,000 | 30.98 | 78 | 0.554096 | false | 4.037879 | false | false | false |
Tinkerforge/brickv | src/brickv/plugin_system/plugins/co2_v2/co2_v2.py | 1 | 3550 | # -*- coding: utf-8 -*-
"""
CO2 2.0 Plugin
Copyright (C) 2019 Olaf Lüke <olaf@tinkerforge.com>
co2_v2.py: CO2 2.0 Plugin Implementation
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... | gpl-2.0 | 1,356,080,298,779,096,300 | 37.543478 | 108 | 0.666949 | false | 3.697602 | false | false | false |
dataloop/slactorbot | setup.py | 1 | 1466 | """
Slactorbot - A Python Slack Bot with hot patch!
"""
import os
import re
from setuptools import find_packages, setup
def fread(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def get_version():
VERSIONFILE = "slactorbot/_version.py"
verstrline = fread(VERSIONFILE).strip()
... | mit | -8,639,457,963,312,591,000 | 27.192308 | 84 | 0.61869 | false | 3.490476 | false | false | false |
rackerlabs/quark | quark/plugin_modules/floating_ips.py | 1 | 24567 | # Copyright 2013 Rackspace Hosting 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 re... | apache-2.0 | -7,158,888,643,166,104,000 | 39.076672 | 79 | 0.631294 | false | 3.856672 | false | false | false |
open-iscsi/targetd | targetd/backends/zfs.py | 1 | 16228 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | -1,474,268,533,459,330,600 | 29.107607 | 113 | 0.561868 | false | 3.557992 | false | false | false |
merose/diff_drive | src/diff_drive/odometry.py | 1 | 2663 | from __future__ import division
from math import pi, sin, cos
from diff_drive.encoder import Encoder
from diff_drive.pose import Pose
class Odometry:
"""Keeps track of the current position and velocity of a
robot using differential drive.
"""
def __init__(self):
self.leftEncoder = Encoder()
... | bsd-3-clause | 5,621,864,774,542,927,000 | 32.708861 | 106 | 0.618475 | false | 3.569705 | false | false | false |
PublicaMundi/pycsw | pycsw/log.py | 1 | 3506 | # -*- coding: iso-8859-15 -*-
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2011 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files... | mit | -4,502,147,059,277,054,000 | 34.06 | 68 | 0.630918 | false | 4.339109 | true | false | false |
pudquick/pyLoginItems | pyLoginItems.py | 1 | 8789 | # /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Headers/LSSharedFileList.h
# Fun things:
# kLSSharedFileListFavoriteItems
# kLSSharedFileListFavoriteVolumes
# kLSSharedFileListRecentApplicationItems
# kLSSharedFileListRecentDocumentItems
# kLSSharedFileList... | mit | -3,015,296,332,508,749,000 | 53.590062 | 230 | 0.661281 | false | 3.752775 | false | false | false |
jalr/privacyidea | privacyidea/lib/tokens/passwordtoken.py | 1 | 4231 | # -*- coding: utf-8 -*-
#
# privacyIDEA is a fork of LinOTP
# 2014-12-05 Cornelius Kölbel <cornelius@privacyidea.org>
# Migration to flask
#
# May 08, 2014 Cornelius Kölbel
# License: AGPLv3
# contact: http://www.privacyidea.org
#
# Copyright (C) 2010 - 2014 LSE Leading Security Experts GmbH
# Lice... | agpl-3.0 | -5,484,447,843,256,674,000 | 26.640523 | 77 | 0.568456 | false | 3.912118 | false | false | false |
AlekhyaMallina-Vedams/openstack-manuals | doc/common/source/conf.py | 1 | 4284 | # 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
# distributed under the... | apache-2.0 | 622,890,007,791,508,100 | 34.114754 | 92 | 0.721522 | false | 3.764499 | false | false | false |
skosukhin/spack | var/spack/repos/builtin/packages/vizglow/package.py | 1 | 4498 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -3,512,128,012,529,714,700 | 39.522523 | 106 | 0.642952 | false | 3.73278 | false | false | false |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/core/strings.py | 1 | 105891 | import codecs
from functools import wraps
import re
import textwrap
from typing import Dict, List
import warnings
import numpy as np
import pandas._libs.lib as lib
import pandas._libs.ops as libops
from pandas.util._decorators import Appender, deprecate_kwarg
from pandas.core.dtypes.common import (
ensure_object... | apache-2.0 | -8,466,611,931,052,144,000 | 29.541679 | 88 | 0.565437 | false | 3.99698 | false | false | false |
ron-rivest/2017-bayes-audit | from-2012-bayes-audit/bayes.py | 1 | 21492 | # bayes.py
# Code for working with Bayes Post-Election Audits
# Ronald L. Rivest and Emily Shen
# 5/31/12
"""
----------------------------------------------------------------------
This code available under "MIT License" (open source).
Copyright (C) 2012 Ronald L. Rivest and Emily Shen.
Permission is hereby granted, f... | mit | -1,709,334,529,340,910,800 | 42.330645 | 127 | 0.553136 | false | 3.784469 | false | false | false |
zhaoxuan/baidu_restkin | restkin/api.py | 1 | 4948 | # Copyright 2012 Rackspace Hosting, 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 ... | apache-2.0 | -2,226,201,732,277,251,300 | 30.316456 | 79 | 0.580841 | false | 4.258176 | false | false | false |
qpython-android/QPypi-numpy | numpy/lib/tests/test_io.py | 1 | 31157 | import numpy as np
import numpy.ma as ma
from numpy.ma.testutils import *
import StringIO
import gzip
import os
from tempfile import mkstemp, NamedTemporaryFile
import sys, time
from datetime import datetime
MAJVER, MINVER = sys.version_info[:2]
def strptime(s, fmt=None):
"""This function is available in the d... | bsd-3-clause | 7,035,468,945,602,116,000 | 35.440936 | 86 | 0.505472 | false | 3.270733 | true | false | false |
SmartElect/SmartElect | staff/admin.py | 1 | 1127 | from django.contrib.auth.models import User, Group, Permission
from django.contrib.auth.admin import UserAdmin, GroupAdmin
from libya_elections.admin_site import admin_site
class LibyaUserAdmin(UserAdmin):
list_display = ('username', 'email', 'first_name', 'last_name', 'is_active', 'is_staff',
... | apache-2.0 | -4,079,308,572,742,323,700 | 30.305556 | 92 | 0.62378 | false | 3.794613 | false | false | false |
CLLKazan/iCQA | qa-engine/forum_modules/oauthauth/consumer.py | 1 | 3718 | import urllib
import urllib2
import httplib
import time
from forum.authentication.base import AuthenticationConsumer, InvalidAuthentication
from django.utils.translation import ugettext as _
from lib import oauth
class OAuthAbstractAuthConsumer(AuthenticationConsumer):
def __init__(self, consumer_key, consumer_... | gpl-3.0 | -633,388,579,268,110,200 | 41.735632 | 126 | 0.686391 | false | 3.963753 | false | false | false |
mferenca/HMS-ecommerce | ecommerce/invoice/migrations/0001_initial.py | 1 | 2891 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django_extensions.db.fields
import django.utils.timezone
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('basket', '0... | agpl-3.0 | 945,000,647,318,833,700 | 53.54717 | 176 | 0.603597 | false | 4.118234 | false | false | false |
bayazee/flacon | flacon/utils/extended_logging.py | 1 | 6366 | import sys
from flask import _request_ctx_stack
def wrap_app_logger(app):
"""
This function given Application and add logger for that.
:param app: Application Object
:type app: Object
"""
app.debug_log_format = app.config['LOG_FORMAT']
app._logger = None
app._logger = LoggerWrapper(ap... | bsd-3-clause | -2,105,913,396,540,555,800 | 29.170616 | 104 | 0.570531 | false | 4.139142 | false | false | false |
GermanRuizMarcos/Classical-Composer-Classification | code_7_1/classification.py | 1 | 18072 | '''
AUDIO CLASSICAL COMPOSER IDENTIFICATION BASED ON:
A SPECTRAL BANDWISE FEATURE-BASED SYSTEM
'''
import essentia
from essentia.standard import *
import glob
import numpy as np
import arff
from essentia.standard import *
from scipy import stats
# Dataset creation with specific attributes (spectral features) and a s... | gpl-3.0 | 1,453,385,441,385,459,500 | 22.379043 | 155 | 0.597001 | false | 2.252524 | false | false | false |
tennc/webshell | php/create_webshell_with_py.py | 1 | 2291 | import random
#author: pureqh
#github: https://github.com/pureqh/webshell
#use:GET:http://url?pass=pureqh POST:zero
shell = '''<?php
class {0}{1}
public ${2} = null;
public ${3} = null;
function __construct(){1}
if(md5($_GET["pass"])=="df24bfd1325f82ba5fd3d3be2450096e"){1}
... | gpl-3.0 | -521,559,099,805,396,200 | 27.283951 | 102 | 0.454387 | false | 2.568386 | false | false | false |
Mapotempo/mapotempo-qgis-plugin | SwaggerMapo/apis/plannings_api.py | 1 | 44443 | #!/usr/bin/env python
# coding: utf-8
"""
PlanningsApi.py
Copyright 2015 SmartBear Software
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... | gpl-2.0 | -6,249,175,168,843,568,000 | 31.322182 | 132 | 0.558558 | false | 4.233473 | false | false | false |
vponomaryov/manila | manila/tests/api/middleware/test_faults.py | 1 | 4107 | # Copyright 2010 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 b... | apache-2.0 | -6,209,282,040,056,393,000 | 36 | 79 | 0.60263 | false | 4.22966 | true | false | false |
ProgDan/maratona | URI/uri2690.py | 1 | 1630 | class Main:
def __init__(self):
self.n = int(input())
self.s = ""
def change(self):
self.con = 0
for i in range(0, len(self.s)):
if self.con == 12:
break
elif self.s[i] in ['a', 'k', 'u', 'G', 'Q']:
print(0, end='')
... | gpl-3.0 | 6,681,451,894,900,894,000 | 30.960784 | 61 | 0.320245 | false | 3.306288 | false | false | false |
DailyActie/Surrogate-Model | 01-codes/scipy-master/scipy/fftpack/tests/test_real_transforms.py | 1 | 14903 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from os.path import join, dirname
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_equal, TestCase
from scipy.fftpack.realtransforms import dct, idct, dst, idst
# Matlab reference data
MDATA = np.load... | mit | -2,302,924,072,416,488,400 | 27.3327 | 86 | 0.551902 | false | 3.291299 | true | false | false |
jespino/urwintranet | urwintranet/ui/widgets/mixins.py | 1 | 3127 | # -*- coding: utf-8 -*-
"""
urwintranet.ui.widgets.mixins
~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import urwid
class IgnoreKeyPressMixin(object):
def keypress(self, size, key):
return key
class KeyPressMixin(object):
signals = ["click"]
def keypress(self, size, key):
"""
Send 'click' ... | apache-2.0 | 4,975,754,046,936,183,000 | 24.016 | 71 | 0.523825 | false | 3.505605 | false | false | false |
bachiraoun/fullrmc | Constraints/StructureFactorConstraints.py | 1 | 64342 | """
StructureFactorConstraints contains classes for all constraints related experimental static structure factor functions.
.. inheritance-diagram:: fullrmc.Constraints.StructureFactorConstraints
:parts: 1
"""
# standard libraries imports
from __future__ import print_function
import itertools, re
# external libra... | agpl-3.0 | 7,406,735,951,820,464,000 | 49.032659 | 178 | 0.575891 | false | 4.479081 | false | false | false |
pedroluislopez/candidaturas | candidaturas/settings.py | 1 | 2424 | """
Django settings for candidaturas project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ..... | gpl-3.0 | -6,178,601,633,671,091,000 | 23.484848 | 71 | 0.720297 | false | 3.271255 | false | false | false |
madhawav/SiddhiCEPPythonAPI | SiddhiCEP3/core/event/ComplexEvent.py | 1 | 3787 | from enum import Enum
from SiddhiCEP3 import SiddhiLoader
from SiddhiCEP3.DataTypes.DataWrapper import unwrapData, wrapData
class ComplexEvent(object):
class Type(Enum):
CURRENT = SiddhiLoader._loadType("org.wso2.siddhi.pythonapi.proxy.core.event.complex_event.TypeProxy")().CURRENT(),
EXPIRED = S... | apache-2.0 | -1,473,881,451,016,611,300 | 41.550562 | 139 | 0.675469 | false | 3.779441 | false | false | false |
DisposaBoy/GoSublime | gsev.py | 1 | 2415 | from .gosubl import gs
from . import gstest
import sublime
import sublime_plugin
import webbrowser
DOMAIN = 'GsEV'
class EV(sublime_plugin.EventListener):
def on_pre_save(self, view):
view.run_command('gs_fmt')
sublime.set_timeout(lambda: do_set_gohtml_syntax(view), 0)
def on_post_save(self, view):
sublime.s... | mit | -5,356,420,796,553,315,000 | 25.538462 | 68 | 0.657971 | false | 2.616468 | false | false | false |
DQE-Polytech-University/HI | src/console2.py | 1 | 2564 | from tkinter import *
import numpy as np
import math
import Classes as hi
def Insert():
name = text1.get()
Text1.insert(END, name)
text.delete(0,END)
def Key_issue():
bases = text1.get()
long_message = text2.get()
bb84 = hi.Various_measurement(int(bases),int(long_message),0)
bb84.be... | mit | -945,591,217,603,901,400 | 22.522936 | 82 | 0.688768 | false | 2.579477 | false | false | false |
ashtonteng/squad_exp | AttentionLayer.py | 1 | 3451 | import tensorflow as tf
from tensorflow.contrib import rnn
import numpy as np
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"]="2"
class AttentionLayer():
"""Implements Context-to-Query Attention. Pays attention to different parts of the query when
reading the passage. Returns, for each word in the passage, a... | mit | -5,947,735,938,825,889,000 | 55.57377 | 168 | 0.637496 | false | 3.2898 | false | false | false |
asdf123101/HDPG1D | hdpg1d/adaptation.py | 1 | 8070 | import numpy as np
from numpy import concatenate as cat
from scipy.sparse import csr_matrix
import scipy.sparse.linalg as spla
from copy import copy
import matplotlib.pyplot as plt
import warnings
from .preprocess import shape, discretization, boundaryCondition
plt.rc('text', usetex=True)
plt.rc('font', family='serif'... | mit | 3,414,982,141,776,126,000 | 38.950495 | 101 | 0.547212 | false | 3.444302 | false | false | false |
IntSPstudio/vslst-python | sta/980004006.py | 1 | 1674 | #|==============================================================|#
# Made by IntSPstudio
# Project Visual Street
# ID: 980004006
# Twitter: @IntSPstudio
#|==============================================================|#
#SYSTEM
import os
import sys
#import time
import turtle
import math
#ALG
#Ympyrän kehän koko
def c... | mit | -8,946,986,960,882,005,000 | 23.231884 | 79 | 0.72711 | false | 2.957522 | false | false | false |
progdupeupl/pdp_website | pdp/article/models.py | 1 | 7425 | # coding: utf-8
#
# This file is part of Progdupeupl.
#
# Progdupeupl is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Progdu... | agpl-3.0 | -5,753,180,119,510,398,000 | 26.072993 | 77 | 0.600566 | false | 4.111973 | false | false | false |
mdsitton/pyogl | pglgen/xmlparse.py | 1 | 3930 | from xml.parsers import expat
class TagStack(object):
def __init__(self):
self.tags = []
self.args = []
self.data = []
self.dataAdded = []
self.stackSize = 0
self.frameHasData = False
def push(self, tag, args):
self.tags.append(tag)
self.args.ap... | bsd-2-clause | 870,257,657,208,985,100 | 25.554054 | 74 | 0.577354 | false | 3.845401 | false | false | false |
Applied-GeoSolutions/gips | gips/data/sarannual/sarannual.py | 1 | 6502 | #!/usr/bin/env python
################################################################################
# GIPS: Geospatial Image Processing System
#
# AUTHOR: Matthew Hanson
# EMAIL: matt.a.hanson@gmail.com
#
# Copyright (C) 2014-2018 Applied Geosolutions
#
# This program is free software; you can redist... | gpl-3.0 | 4,833,266,800,454,739,000 | 35.943182 | 104 | 0.527222 | false | 3.743235 | false | false | false |
apdjustino/DRCOG_Urbansim | src/opus_gui/results_manager/run/indicator_framework/visualizer/visualizers/matplotlib_lorenzcurve.py | 1 | 10890 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
import os, re, sys, time, traceback
from copy import copy
from opus_gui.results_manager.run.indicator_framework.visualizer.visualizers.abstract_visualizat... | agpl-3.0 | -796,952,061,882,075,500 | 40.724138 | 120 | 0.562075 | false | 3.271253 | true | false | false |
dani-i/bachelor-project | file_experts/data_set/cifar10_data_set_preparations.py | 1 | 3240 | from file_experts.data_set.data_set_validator import DataSetValidator
from file_experts.data_set import data_set_creator
from time import sleep
import constants.create_data_set_constants as const
import file_experts.file_expert as fe
import urllib.request
import threading
import tarfile
class Cifar10DataSetPrepara... | apache-2.0 | 8,903,633,220,386,401,000 | 27.928571 | 77 | 0.52963 | false | 4.444444 | false | false | false |
freemed/orthanc | Resources/Samples/Python/ChangesLoop.py | 1 | 2310 | #!/usr/bin/python
# Orthanc - A Lightweight, RESTful DICOM Store
# Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
# Belgium
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, ... | gpl-3.0 | 8,063,557,085,211,736,000 | 25.860465 | 78 | 0.669697 | false | 3.786885 | false | false | false |
MalloyDelacroix/DownloaderForReddit | DownloaderForReddit/gui/database_views/filter_input_widget.py | 1 | 5786 | from PyQt5.QtWidgets import QWidget, QLineEdit, QSpinBox, QComboBox, QDateTimeEdit, QSizePolicy
from PyQt5.QtCore import Qt, pyqtSignal
from sqlalchemy import Integer, String, DateTime, Enum, Boolean
from DownloaderForReddit.guiresources.database_views.filter_input_widget_auto import Ui_FilterInputWidget
from Download... | gpl-3.0 | 4,671,662,413,270,167,000 | 36.571429 | 119 | 0.612167 | false | 3.973901 | false | false | false |
XYM1988/Algorithm | Chp8/8.1-General-Tree.py | 1 | 2720 | # Tree is an organizational relationship that is richer than the simple "before"
# and "after" relationships between objects in sequences.
# We define a tree T as a set of nodes storing elements such that the nodes have
# a parent-child relationship that satisfies the following properties:
# 1. If T is nonempty, it ha... | mit | -5,231,915,822,319,370,000 | 37.857143 | 86 | 0.649632 | false | 4.394184 | false | false | false |
anthill-platform/anthill-social | anthill/social/model/social/facebook.py | 1 | 2400 |
import datetime
from anthill.common import to_int
from anthill.common.social import APIError
from anthill.common.social.apis import FacebookAPI
from .. social import SocialAPI, SocialAuthenticationRequired
from .. token import NoSuchToken
class FacebookSocialAPI(SocialAPI, FacebookAPI):
def __init__(self, appl... | mit | 5,517,608,928,784,957,000 | 29.379747 | 93 | 0.614167 | false | 4.232804 | false | false | false |
NDKoehler/DataScienceBowl2017_7th_place | dsb3_networks/classification/resnet2D_0.7res_80/config_2Dfinal.py | 1 | 3207 | from collections import defaultdict
from datetime import datetime
import json
import tensorflow as tf
import os, sys
import pandas as pd
#config dic
H = defaultdict(lambda: None)
#All possible config options:
H['optimizer'] = 'MomentumOptimizer'#'RMSPropOptimizer'
H['learning_rate'] = 0.001
H['momentum'] = 0.9 #0.9... | mit | 1,141,336,467,683,056,600 | 35.033708 | 138 | 0.683505 | false | 2.613692 | false | true | false |
duducosmos/pgs4a | private/lib/android/apk.py | 1 | 3947 | import os
import struct
import zipfile
import cStringIO
class SubFile(object):
def __init__(self, f, name, base, length):
self.f = f
self.base = base
self.offset = 0
self.length = length
self.name = name
self.f.seek(self.base)
def read(self, length=None):
... | lgpl-2.1 | 7,976,596,062,115,813,000 | 21.683908 | 87 | 0.478085 | false | 4.464932 | false | false | false |
enthought/depsolver | depsolver/pool.py | 1 | 8318 | import collections
from .bundled.traitlets \
import \
HasTraits, Dict, Instance, List, Long, Unicode
from .errors \
import \
DepSolverError, MissingPackageInfoInPool
from .package \
import \
PackageInfo
from .repository \
import \
Repository
from .requirement \
impor... | bsd-3-clause | -270,076,686,273,748,060 | 33.658333 | 117 | 0.583914 | false | 4.797001 | false | false | false |
pmoleri/memorize-accesible | speak/espeak_cmd.py | 1 | 2079 | # 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 that it will be useful,
# bu... | gpl-2.0 | -3,199,728,626,601,833,000 | 31.484375 | 79 | 0.634921 | false | 3.719141 | false | false | false |
gfrances/model-based-social-simulations | experiments/all-agents-simple.py | 1 | 1661 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
# from experiments.src.exp import AggregateExperiment, MDPAgentConfiguration, SingleExperiment
from src.sequential_taskgen import SequentialTaskgen
from src.experiment import AggregateExperiment, MDPAgentConfiguration, SingleExperiment, LazyAgentConfigurat... | gpl-2.0 | -2,915,125,925,642,806,000 | 38.547619 | 114 | 0.718844 | false | 4.071078 | true | false | false |
keithfancher/Blobulous | blobulous/enemy.py | 1 | 3919 | # Copyright 2011, 2012 Keith Fancher
#
# This file is part of Blobulous.
#
# Blobulous 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 | 157,451,090,156,659,620 | 35.287037 | 79 | 0.628987 | false | 3.725285 | false | false | false |
Beit-Hatfutsot/dbs-back | scripts/migrate.py | 1 | 16413 | # -*- coding: utf-8 -*-
import re
import os
import sys
import logging
from argparse import ArgumentParser
from decimal import Decimal
import datetime
import calendar
import time
from functools import partial
from pymongo import MongoClient
from pymongo.errors import BulkWriteError
from bson.code import Code
from gedc... | agpl-3.0 | -3,581,223,935,101,060,000 | 38.26555 | 230 | 0.570767 | false | 3.824983 | false | false | false |
ppries/tensorflow | tensorflow/python/kernel_tests/large_concat_op_test.py | 1 | 1511 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,734,721,287,931,328,500 | 37.74359 | 80 | 0.667108 | false | 3.89433 | true | false | false |
mick-d/nipype | nipype/interfaces/bids_utils.py | 3 | 5108 | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
""" Set of interfaces that allow interaction with BIDS data. Currently
available interfaces are:
BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids.
Change di... | bsd-3-clause | -78,829,929,764,361,940 | 33.748299 | 79 | 0.584573 | false | 4.149472 | false | false | false |
bool-/btcbot | jsonrpc/authproxy.py | 1 | 3903 |
"""
Copyright 2011 Jeff Garzik
AuthServiceProxy has the following improvements over python-jsonrpc's
ServiceProxy class:
- HTTP connections persist for the life of the AuthServiceProxy object
(if server supports HTTP/1.1)
- sends protocol 'version', per JSON-RPC 1.1
- sends proper, incrementing 'id'
... | gpl-3.0 | 3,396,568,396,845,373,400 | 33.539823 | 94 | 0.607994 | false | 4.279605 | false | false | false |
account-login/dnsagent | dnsagent/resolver/dual.py | 1 | 1713 | from typing import Mapping, Union, Sequence
from twisted.names.error import ResolverError
from twisted.python.failure import Failure
from dnsagent.resolver.cn import CnResolver
from dnsagent.resolver.parallel import PoliciedParallelResolver, BaseParalledResolverPolicy
__all__ = ('DualResolver',)
class PolicyError... | mit | -6,318,335,503,835,662,000 | 23.126761 | 91 | 0.582604 | false | 3.69181 | false | false | false |
jzinner/utils | samples/python_samples/filewalk.py | 1 | 1158 | #/usr/bin/python
# import os for the os.walk() function
# os.walk returns a list of tuples: 3-tuple (dirpath, dirnames, filenames)
import os
import sys
def ParseArgs():
Error1 = """ # USAGE #
# filesystemWalk.py [directory]
# filesystemWalk.py /Users/mcohoon/Devel/PythonPractice """
if len(sys.arg... | mit | -6,329,629,763,930,400,000 | 28.692308 | 75 | 0.659758 | false | 3.487952 | false | false | false |
sciencefreak500/Open_Intelligence | Python/Eyesight/camshift_test.py | 1 | 1347 | import numpy as np
import cv2
cap = cv2.VideoCapture(0)
# take first frame of the video
ret,frame = cap.read()
# setup initial location of window
r,h,c,w = 250,90,400,125 # simply hardcoded the values
track_window = (c,r,w,h)
# set up the ROI for tracking
roi = frame[r:r+h, c:c+w]
hsv_roi = cv2.cvtColor(roi, cv2.... | gpl-2.0 | -696,926,444,738,673,900 | 26.489796 | 80 | 0.620638 | false | 2.699399 | false | false | false |
reingart/suscripciones | controllers/checkout.py | 1 | 1037 | # coding: utf8
# try something like
def index():
form = SQLFORM.factory(
Field("descripcion", "string", default="Barrilete multicolor"),
Field("cantidad", "integer", default=1),
Field("precio", "float", default=1.00),
)
if form.accepts(request.vars, session):
p... | agpl-3.0 | -8,104,248,428,180,297,000 | 27.027027 | 71 | 0.47541 | false | 4.035019 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.