repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
bingopodcast/bingos | bingo_emulator/fun_spot_63/game.py | 1 | 47949 | #!/usr/bin/python
import logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
import procgame.game, sys, os
import procgame.config
import random
import procgame.sound
sys.path.insert(0,os.path.pardir)
import bingo_emulator.common.units as units
import bingo_em... | gpl-3.0 | 1,453,764,986,287,668,500 | 46.380435 | 222 | 0.550981 | false |
mrakgr/futhark | examples/life/quadlife_alt.py | 1 | 55476 | import sys
import numpy as np
import ctypes as ct
import pyopencl as cl
import pyopencl.array
import time
import argparse
FUT_BLOCK_DIM = "16"
cl_group_size = np.int32(512)
synchronous = False
fut_opencl_src = """typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long int64_t;
typede... | bsd-3-clause | 4,486,038,976,242,857,500 | 29.420159 | 150 | 0.537404 | false |
bschollnick/downloader | downloader3.py | 1 | 7816 | """
Downloader, mass file downloader.
"""
import common
import logging, logging.handlers
import os
import os.path
import plistlib
import stat
import sys
import time
from optparse import OptionParser
from yapsy.PluginManager import PluginManager
SCRIPT_FILENAME = os.path.abspath(sys.argv[0])
SCRIPT_DIRECTORY = os.se... | mpl-2.0 | 2,206,838,923,007,199,500 | 30.643725 | 77 | 0.546827 | false |
alfred82santa/tarrabmeCheckerGtk | src/tarrabme_checker_gtk/dialogs.py | 1 | 3341 | from gi.repository import Gtk, Gio
from .actuators import NeoPixelsActuator
__author__ = 'alfred'
class PreferencesDialog(Gtk.Dialog):
def __init__(self, settings):
Gtk.Dialog.__init__(self, "Preferences", None,
Gtk.DialogFlags.USE_HEADER_BAR | Gtk.DialogFlags.MODAL,
... | gpl-2.0 | 3,221,447,033,717,781,500 | 46.056338 | 102 | 0.677641 | false |
khosrow/metpx | sundew/unittests/unittest_senderAm.py | 1 | 1082 | # -*- coding: iso-8859-1 -*-
#############################################################################################
# Name: unittest_senderAm.py
# Author: Jun Hu
# Date: 2012-04-30
# Description: test cases for senderAm class
######################################################################################... | gpl-2.0 | 7,791,971,487,421,272,000 | 30.823529 | 93 | 0.575786 | false |
praekelt/django-ultracache | ultracache/tests/utils.py | 1 | 1072 | from collections import OrderedDict
class DummyProxy(dict):
def make_key(self, path, headers=None):
key = path
if headers is not None:
key += str(frozenset(sorted(headers.items())))
return key
def cache(self, request, value):
headers = {k[5:].replace("_", "-").low... | bsd-3-clause | 4,270,799,919,882,227,000 | 29.628571 | 75 | 0.602612 | false |
ContextLab/hypertools | hypertools/tools/format_data.py | 1 | 7323 | import warnings
import numpy as np
import six
from .._externals.ppca import PPCA
from .._shared.helpers import get_type
def format_data(x, vectorizer='CountVectorizer',
semantic='LatentDirichletAllocation', corpus='wiki', ppca=True, text_align='hyper'):
"""
Formats data into a list of numpy ... | mit | -6,226,596,756,234,407,000 | 38.583784 | 139 | 0.604534 | false |
RetroMelon/PatchWords | patchwords_project/patchwords/queries.py | 1 | 3242 | # The queries.py file contains a bunch of relatively complex database
# queries that probably shouldn't take place inside the views.
from patchwords.models import Category, Story, Paragraph, User, Favourite
#gets a list of
def getTopStories(start=0, end=5, category=None):
#getting the stories and zipping them with... | mit | 3,769,124,615,543,503,400 | 30.784314 | 92 | 0.692474 | false |
Collisionc/sickbeard_mp4_automator | delugePostProcess.py | 1 | 5295 | #!/usr/bin/env python
import os
import sys
from autoprocess import autoProcessTV, autoProcessMovie, autoProcessTVSR, sonarr, radarr
from readSettings import ReadSettings
from mkvtomp4 import MkvtoMp4
from deluge_client import DelugeRPCClient
import logging
from logging.config import fileConfig
logpath = '/var/log/sic... | mit | 6,938,189,214,140,944,000 | 34.066225 | 163 | 0.671388 | false |
jay-lau/magnum | magnum/tests/unit/common/test_clients.py | 1 | 15343 | # 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 t... | apache-2.0 | 3,733,136,881,680,137,000 | 42.962751 | 79 | 0.612527 | false |
FreeOpcUa/python-opcua | opcua/common/events.py | 1 | 8172 | import copy
from opcua import ua
import opcua
from opcua.ua.uaerrors import UaError
from opcua.common import ua_utils
class Event(object):
"""
OPC UA Event object.
This is class in inherited by the common event objects such as BaseEvent,
other auto standard events and custom events
Events are use... | lgpl-3.0 | -8,488,097,905,301,647,000 | 34.376623 | 150 | 0.618453 | false |
birdland/dlkit-doc | dlkit/services/grading.py | 1 | 224535 | # -*- coding: utf-8 -*-
"""Grading Open Service Interface Definitions
grading version 3.0.0
The Grading OSID defines a service to apply grades or ratings.
Grade Systems
The grade system sessions provide the means to retrievs and manage
``GradeSystem`` definitions. A ``GradeSystem`` is a fixed set of
``Grades`` . ``G... | mit | 3,892,039,066,676,046,000 | 38.593546 | 193 | 0.644349 | false |
eckardm/archivematica | src/MCPClient/lib/clientScripts/archivematicaCreateMETSMetadataCSV.py | 1 | 4618 | #!/usr/bin/env python2
#
# This file is part of Archivematica.
#
# Copyright 2010-2012 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica 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,... | agpl-3.0 | 1,642,396,789,617,826,600 | 37.165289 | 128 | 0.683629 | false |
cyphactor/lifecyclemanager | extra/plugins/userlog/userlog/userlog.py | 1 | 7748 | import posixpath
from trac.core import *
from trac.config import *
from trac.config import BoolOption
from trac.web.chrome import ITemplateProvider, \
add_stylesheet
from trac.web.main import IRequestHandler
from trac.wiki import wiki_to_html, wiki_to_oneliner
from trac.mimeview import Mimeview, is_binary
from trac... | gpl-3.0 | -8,103,132,112,731,082,000 | 43.786127 | 88 | 0.495225 | false |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/lo_fi_cache.py | 6 | 1090 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState
from telemetry.page import page as page_module
from telemetry import story
cla... | gpl-3.0 | 3,508,047,452,543,410,700 | 31.058824 | 79 | 0.721101 | false |
pcm17/tensorflow | tensorflow/contrib/distributions/python/ops/poisson.py | 1 | 5426 | # 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 | 8,151,053,767,586,295,000 | 33.56051 | 80 | 0.679506 | false |
harlequin/sickbeard | sickbeard/tv.py | 1 | 60124 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... | gpl-3.0 | 129,994,857,721,770,370 | 39.379215 | 283 | 0.566795 | false |
hufsm/tu_gen2_libsigrokdecode | decoders/usb_power_delivery/pd.py | 1 | 20599 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2015 Google, Inc
## Copyright (C) 2018 davidanger <davidanger@163.com>
## Copyright (C) 2018 Peter Hazenberg <sigrok@haas-en-berg.nl>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Ge... | gpl-3.0 | -1,047,846,842,259,668,100 | 31.286834 | 96 | 0.468032 | false |
chromium/chromium | tools/grit/grit/format/rc.py | 7 | 18109 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Support for formatting an RC file for compilation.
'''
from __future__ import print_function
import os
import re
from functools import partial
impo... | bsd-3-clause | 2,850,999,913,179,659,000 | 36.727083 | 81 | 0.628859 | false |
rainier-m/python-soccer | EPL-teamNews.py | 1 | 5001 | # -*- coding: utf-8 -*-
'''
Created on Jan 30, 2015
Modified on Jan 30, 2015
@author: rainier.madruga@gmail.com
A simple Python Program to scrape the ESPN FC website for content.
'''
'''
Version Number of Script
'''
version = '0.01.a'
# Import Libraries needed for Scraping the various web pages
from bs4 import Beautif... | gpl-2.0 | -1,380,015,014,240,211,200 | 34.721429 | 639 | 0.660868 | false |
plq/spyne | spyne/protocol/_inbase.py | 1 | 24684 |
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This libra... | lgpl-2.1 | 6,236,613,823,759,580,000 | 33.37883 | 84 | 0.581672 | false |
JerryYanWan/BigDL | spark/dl/src/test/resources/tf/models/vgg19.py | 1 | 1391 | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | 155,971,322,021,515,800 | 34.666667 | 97 | 0.686556 | false |
swarmer/autoscaler | autoscaler/server/scaling/algorithms/spline.py | 1 | 1065 | import math
import scipy.interpolate
from autoscaler.server.request_history import RequestHistory
from autoscaler.server.scaling.utils import parse_interval
class SplineScalingAlgorithm:
def __init__(self, algorithm_config):
self.interval_seconds = parse_interval(
algorithm_config['interval'... | mit | 2,385,278,985,483,348,000 | 32.28125 | 79 | 0.656338 | false |
SunyataZero/buddhist-well-being-prototype-4 | bwb/practice_details.py | 1 | 3624 | import sched
import threading
import time
from PyQt5 import QtCore
from PyQt5 import QtWidgets
import bwb.model
ID_NOT_SET = -1
BUTTON_WIDTH_IT = 28
class PracticeCompositeWidget(QtWidgets.QWidget):
time_of_day_state_changed_signal = QtCore.pyqtSignal()
def __init__(self):
super().__init__()
... | gpl-3.0 | 638,437,109,849,312,600 | 37.147368 | 132 | 0.651214 | false |
uw-it-aca/canvas-sis-provisioner | sis_provisioner/builders/__init__.py | 1 | 4786 | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from sis_provisioner.models.course import Course
from sis_provisioner.models.user import User
from sis_provisioner.csv.data import Collector
from sis_provisioner.csv.format import UserCSV, EnrollmentCSV
from sis_provisioner.dao.user... | apache-2.0 | 5,952,493,172,330,509,000 | 36.390625 | 79 | 0.614919 | false |
steveb/heat | heat/tests/openstack/heat/test_remote_stack.py | 1 | 27511 | #
# 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
# ... | apache-2.0 | -2,916,390,377,502,339,000 | 38.871014 | 79 | 0.601178 | false |
pytorch/fairseq | fairseq/model_parallel/models/pipeline_parallel_transformer/model.py | 1 | 33560 | # 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 logging
import torch
import torch.nn as nn
import torch.nn.functional as F
from fairseq import utils
from fairseq.model_parallel.model... | mit | -946,977,085,584,911,400 | 42.754889 | 151 | 0.57947 | false |
6112/project-euler | problems/051.py | 1 | 2678 | #encoding=utf-8
## SOLVED 2014/04/18
## 121313
# By replacing the 1st digit of the 2-digit number *3, it turns out that six of
# the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime.
# By replacing the 3rd and 4th digits of 56**3 with the same digit, this
# 5-digit number is the first example having se... | mit | -6,838,346,259,325,526,000 | 42.901639 | 79 | 0.641897 | false |
etkirsch/legends-of-erukar | erukar/content/skills/brutality/Cleave.py | 1 | 4561 | from erukar.system.engine import Attack, Damage, DamageScalar
from erukar.ext.math import Navigator
class Cleave(Attack):
Name = 'Cleave'
ShowInLists = True
Description = 'Cleave with {} at {}'
CurrentLevel = 'Swing wildly, inflicting {:0.1f}% damage per tile '\
'in three spaces at once. Cleav... | agpl-3.0 | -1,209,525,495,349,219,600 | 34.913386 | 74 | 0.585398 | false |
RNAcentral/rnacentral-import-pipeline | tests/databases/ensembl/genomes/plants_test.py | 1 | 26982 | # -*- coding: utf-8 -*-
"""
Copyright [2009-2018] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by... | apache-2.0 | -8,262,563,082,367,672,000 | 40.767802 | 211 | 0.595879 | false |
sedden/django-basic-apps | basic/tools/shortcuts.py | 1 | 1190 | import os.path
import hashlib
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.http import HttpResponseRedirect
def get_image_path(instance, filename):
"""
Converts an image filename to a hash.
"""
name = hashlib.md5("%s" % instance.id).he... | bsd-3-clause | -5,613,188,190,341,763,000 | 28.775 | 114 | 0.67395 | false |
geo2tag-logistics/Geo2Logistics | logistics/Geo2TagService.py | 1 | 6073 | import json
import requests
from logistics.models import Fleet
SERVER_URL = "http://demo.geo2tag.org/instance/"
BASE_SERVICE_NAME = "testservice"
SERVICE_NAME = BASE_SERVICE_NAME
channel_dict = {}
points_dict = {}
def getSerivceUrl():
return SERVER_URL + "service/" + SERVICE_NAME
def one_time_startup():
... | apache-2.0 | -5,767,976,916,874,057,000 | 35.194969 | 159 | 0.596003 | false |
jimjing/smores_choose_behavior | src/smores_choose_behavior/visualizer.py | 1 | 1422 | #!/usr/bin/env python
import threading
import rospy
from visualization_msgs.msg import Marker, MarkerArray
class Visualizer(object):
def __init__(self):
self._current_pub_path = []
self.run = False
self.t = None
self.t = threading.Thread(target=self._startPathPub)
self.t.... | gpl-3.0 | -7,178,490,557,951,756,000 | 27.44 | 83 | 0.496484 | false |
ComputerNetworks-UFRGS/OpERA | python/device/radioDevice.py | 1 | 9121 | """
Copyright 2013 OpERA
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, softwar... | apache-2.0 | -5,384,129,354,236,725,000 | 25.591837 | 97 | 0.558162 | false |
tramin/frobo | frobo_nav/nodes/nav_calibrate_linear.py | 1 | 5813 | #!/usr/bin/env python
""" nav_square.py - Version 1.1 2013-12-20
A basic demo of the using odometry data to move the robot
along a square trajectory.
Created for the Pi Robot Project: http://www.pirobot.org
Copyright (c) 2012 Patrick Goebel. All rights reserved.
This program is free software; y... | mit | 3,346,981,609,078,906,400 | 39.089655 | 116 | 0.607088 | false |
morgangiraud/openai-rl | main.py | 1 | 6781 | import gym, os, time, json, random, sys
import tensorflow as tf
import numpy as np
from agents import make_agent, get_agent_class
from hpsearch.hyperband import Hyperband, run_params
from hpsearch import fullsearch
from hpsearch import randomsearch
dir = os.path.dirname(os.path.realpath(__file__))
flags = tf.app.fla... | mit | 6,664,872,669,113,156,000 | 49.992481 | 233 | 0.679546 | false |
rjl09c/ysp2017 | katiehessian.py | 1 | 7324 | import yt
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import pylab
from yt.analysis_modules.halo_finding.api import HaloFinder
from pylab import*
from numpy import ma
from numpy import linalg as LA
#derives vel with respect to x
def derivx(vel,xcoords):
distance = xcoords[1][0] - xcoords[0][0]... | gpl-3.0 | -7,559,592,820,612,261,000 | 24.255172 | 106 | 0.58834 | false |
tehpug/Ares | leagues/models.py | 1 | 5319 | # -*- coding: utf-8 -*-
from celery.result import AsyncResult
from django.core.exceptions import ValidationError
from django.db import models, connection
from django.utils import timezone
def validate_even(value):
"""
Validate a number to be even
"""
if value % 2 != 0:
raise ValidationError('%... | gpl-3.0 | 6,876,304,096,557,620,000 | 34.225166 | 79 | 0.602369 | false |
Bajoo/client-pc | tests/unit_tests/filesync/task_consumer_test.py | 1 | 6616 | # -*- coding:utf-8 -*-
import threading
import pytest
from bajoo.filesync import task_consumer
from bajoo.promise import Promise
class TestTaskConsumer(object):
def _make_external_promise(self):
"""Helper used to make stub Promise.
Returns:
Promise, resolve, reject: the promise and... | gpl-3.0 | 6,029,750,878,475,561,000 | 29.348624 | 78 | 0.546705 | false |
visio2img/visio2img | setup.py | 1 | 1585 | import sys
from setuptools import setup
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Operating System :: Microsoft :: Windows'... | apache-2.0 | -7,219,872,094,020,648,000 | 31.346939 | 67 | 0.635962 | false |
azide0x37/tableFramer | tableFramer.py | 1 | 1267 | import requests
import json
from bs4 import BeautifulSoup
from collections import OrderedDict
class tableFramer:
def __init__(self, url):
self.url = url
self.response = requests.get(url, headers = {'User-Agent': 'Mozilla/5.0'})
def __call__(self):
souped = BeautifulSoup(self.response... | mit | 2,197,101,322,134,218,800 | 29.166667 | 88 | 0.535912 | false |
philipkershaw/ndg_security_server | ndg/security/server/wsgi/utils.py | 2 | 7507 | """NDG Security WSGI utilities
MashMyData Project
"""
__author__ = "P J Kershaw"
__date__ = "21/08/11"
__copyright__ = "(C) 2011 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__contact__ = "Philip.Kershaw@stfc.ac.uk"
__revision__ = "$Id$"
import logging
log = ... | bsd-3-clause | 3,673,313,203,661,367,000 | 37.497436 | 83 | 0.520714 | false |
zjkl19/AbaqusPython | SimpleSupportBeam/SimpleSupportBeam01.py | 1 | 7518 | # -*- coding: mbcs -*-
#auto generated by GUI operation.
#the template of the original example:ExpAbq00.py
#link:http://www.020fea.com/a/5/152/11521.html
#explanation:
#structure:simple supported beam
#load:ConcentratedForce in the midSpan
#post:none
#comment by lindinan in 20170829
#
from part import *
from mat... | mit | -4,320,695,320,007,110,000 | 51.573427 | 80 | 0.672918 | false |
selmanj/repel | datasets/recipe/synthetic/synth.py | 1 | 3044 | #!/usr/bin/python
#
# Generates synthetic recipe domains.
# RUNS ON PYTHON 3.x, not 2.7
# GENERAL DIRECTIONS
# 1. Plate items down
# * Cup, bowl, cakemix
# 2. Pour cakemix into bowl
# 3. Mix bowl
# 4. Place oil bottle
# 5. pour oil bottle into mixing bowl
# 6. MIX
# 7. Place 1-2 more bowls, pour and mix
#
# So we ma... | mit | -6,441,630,987,821,203,000 | 27.448598 | 95 | 0.68134 | false |
nugget/home-assistant | homeassistant/components/google_assistant/trait.py | 1 | 32913 | """Implement the Google Smart Home traits."""
import logging
from homeassistant.components import (
cover,
group,
fan,
input_boolean,
media_player,
light,
lock,
scene,
script,
switch,
vacuum,
)
from homeassistant.components.climate import const as climate
from homeassistant.... | apache-2.0 | -2,187,925,773,775,859,700 | 33.463874 | 79 | 0.57412 | false |
leviroth/praw | tests/integration/models/test_redditors.py | 1 | 1453 | """Test praw.models.redditors."""
import mock
from praw.models import Redditor, Subreddit
from .. import IntegrationTest
class TestRedditors(IntegrationTest):
def test_new(self):
with self.recorder.use_cassette("TestRedditors.test_new"):
profiles = list(self.reddit.redditors.new(limit=300))
... | bsd-2-clause | -4,265,739,451,176,297,000 | 39.361111 | 74 | 0.653131 | false |
RCOS-Grading-Server/HWserver | migration/tests/test_main.py | 2 | 1369 | from argparse import Namespace
import unittest
from migrator import main
class TestMain(unittest.TestCase):
def test_noop(self):
"""Test that noop function can take variable amount of parameters."""
test = []
for i in range(5):
main.noop(*test)
test.append(i)
... | bsd-3-clause | -4,302,171,282,327,793,000 | 26.938776 | 77 | 0.551497 | false |
cltrudeau/django-awl | awl/tests/test_utils.py | 1 | 3111 | # awl.tests.test_utils.py
import sys
from io import StringIO
from django.test import TestCase
from awl.tests.models import Link
from awl.utils import (URLTree, refetch, refetch_for_update, render_page,
render_page_to_string, get_field_names, get_obj_attr)
from awl.waelsteng import FakeRequest
# =================... | mit | 4,314,477,777,599,757,000 | 30.11 | 80 | 0.58695 | false |
gaganjyot/EXIFGeoLocation | main.py | 1 | 1898 | from PIL import Image
from PIL.ExifTags import GPSTAGS, TAGS
def _get_if_exist(data, key):
if key in data:
return data[key]
return None
def _convert_to_degrees(value):
"""Helper function to convert the GPS coordinates stored in the EXIF to degress in float format"""
d0 = value[0][0]
d1 =... | gpl-3.0 | -757,813,787,278,791,300 | 27.772727 | 102 | 0.535827 | false |
bheinzerling/bpemb | bpemb/available_vocab_sizes.py | 1 | 19854 | vocab_sizes = (
{
"ab": {
1000,
3000,
5000
},
"ace": {
1000,
3000,
5000
},
"ady": {
1000,
3000,
5000
},
"af": {
100000,
10000,
1000,
200000,
25000,
3000,
50000,
5000
},
"ak": {
1000,
3000,
5000
},
"als": {
100000,
... | mit | 6,636,670,103,671,172,000 | 8.666018 | 15 | 0.379722 | false |
kennethreitz/pipenv | tests/integration/test_project.py | 1 | 8289 | # -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function
import io
import os
import tarfile
import pytest
from pipenv.patched import pipfile
from pipenv.project import Project
from pipenv.utils import temp_environ
from pipenv.vendor.vistir.path import is_in_path, normalize_path
from pipenv.vendor... | mit | 8,963,331,359,839,735,000 | 32.695122 | 123 | 0.59392 | false |
its-dirg/pefim-proxy | tests/test_ServerConfiguration.py | 1 | 2161 | import unittest
from argparse import Namespace
from pefimproxy.server import WsgiApplication
class ServerConfigurationTestCase(unittest.TestCase):
def setup_class(self):
pass
def test_server_config_files_ok(self):
valid, message = WsgiApplication.validate_server_config(
Namespace(... | gpl-3.0 | 2,929,277,978,590,305,000 | 35.033333 | 89 | 0.621472 | false |
ababino/networkb | networkb/algorithms/utils.py | 1 | 3266 | # -*- coding: utf-8 -*-
"""
Created on Wed May 15 20:11:59 2013
@author: andres
"""
import numpy
import networkx
from scipy import spatial
from scipy import stats
def find_peaks(th,gc):
peaks=[]
for i in range(1,len(th)-1):
if gc[1][i-1]<gc[1][i] and gc[1][i]>gc[1][i+1]:
peaks.append((th[i],gc[1][i]))
... | mit | 3,844,366,845,292,625,000 | 28.963303 | 105 | 0.609002 | false |
pytest-dev/pytest-bdd | pytest_bdd/utils.py | 1 | 1191 | """Various utility functions."""
from inspect import getframeinfo
from inspect import signature as _signature
from sys import _getframe
CONFIG_STACK = []
def get_args(func):
"""Get a list of argument names for a function.
:param func: The function to inspect.
:return: A list of argument names.
:rt... | mit | -1,642,162,315,754,404,600 | 27.357143 | 109 | 0.706129 | false |
Xelaadryth/Xelabot | quest/quests/monster.py | 1 | 4536 | from random import getrandbits, randint
from ..quest import Quest
from ..quest_segment import QuestSegment
import settings
from utils.command_set import CommandSet
GOLD_SAFE_REWARD = 75
GOLD_VARIANCE_SAFE = 21
EXP_SAFE_REWARD = 2
GOLD_RISKY_PENALTY = 200
GOLD_RISKY_REWARD = 300
GOLD_RISKY_REWARD_BIG = 400
GOLD_VARIA... | mit | 256,312,372,235,626,660 | 40.614679 | 119 | 0.612434 | false |
epage/The-One-Ring | src/tp/_generated/Channel_Interface_DTMF.py | 1 | 2340 | # -*- coding: utf-8 -*-
# Generated from the Telepathy spec
"""Copyright (C) 2005, 2006 Collabora Limited
Copyright (C) 2005, 2006 Nokia Corporation
Copyright (C) 2006 INdT
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published ... | lgpl-2.1 | -6,948,686,769,589,709,000 | 38.677966 | 113 | 0.714103 | false |
smallyear/linuxLearn | salt/salt/returners/mongo_future_return.py | 1 | 7113 | # -*- coding: utf-8 -*-
'''
Return data to a mongodb server
Required python modules: pymongo
This returner will send data from the minions to a MongoDB server. To
configure the settings for your MongoDB server, add the following lines
to the minion config files:
.. code-block:: yaml
mongo.db: <database name>
... | apache-2.0 | -3,668,263,459,001,041,000 | 24.959854 | 109 | 0.604246 | false |
SU-ECE-17-7/ibeis | ibeis/viz/viz_name.py | 1 | 15641 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import plottool.draw_func2 as df2
import numpy as np
from ibeis.other import ibsfuncs
from plottool import plot_helpers as ph
import plottool as pt
import utool as ut
from ibeis.viz import viz_chip
(print, print_,... | apache-2.0 | 8,261,119,530,049,679,000 | 40.378307 | 339 | 0.548239 | false |
Pinyto/cloud | api_prototype/sandbox.py | 1 | 3475 | # coding=utf-8
"""
Pinyto cloud - A secure cloud database for your personal data
Copyright (C) 2105 Johannes Merkert <jonny@pinyto.de>
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... | gpl-3.0 | -6,002,983,267,726,479,000 | 38.488636 | 106 | 0.710216 | false |
jem-gh/STplayer | STplayer.py | 1 | 2502 | #!/usr/bin/python
# STplayer (aka STconverter 2) is under the MIT License
# Copyright (c) 2012 Jean-Etienne Morlighem <jem.nvnt@gmail.com>
# https://github.com/jem-gh/STplayer
###############################################################################
# STplayer (aka STconverter 2) allows you to execute Python sc... | mit | 9,001,916,947,905,313,000 | 38.09375 | 82 | 0.681855 | false |
SUSE/kiwi | kiwi/bootloader/install/__init__.py | 1 | 2173 | # Copyright (c) 2015 SUSE Linux GmbH. All rights reserved.
#
# This file is part of kiwi.
#
# kiwi 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 la... | gpl-3.0 | -4,317,752,855,747,303,000 | 31.432836 | 76 | 0.651173 | false |
onshape-public/onshape-clients | python/onshape_client/oas/models/bt_configured_values_column_info1025.py | 1 | 10546 | # coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | mit | -8,931,959,705,869,452,000 | 37.489051 | 138 | 0.611132 | false |
sigmunau/nav | python/nav/ipdevpoll/pool.py | 1 | 10770 | #
# Copyright (C) 2017 UNINETT AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope... | gpl-2.0 | -5,302,875,455,866,709,000 | 33.630225 | 80 | 0.589694 | false |
mazvv/travelcrm | travelcrm/forms/foodcats.py | 1 | 2079 | # -*-coding: utf-8 -*-
import colander
from . import(
ResourceSchema,
BaseForm,
BaseSearchForm,
BaseAssignForm,
)
from ..resources.foodcats import FoodcatsResource
from ..models.foodcat import Foodcat
from ..models.task import Task
from ..models.note import Note
from ..lib.qb.foodcats import Foodcats... | gpl-3.0 | -5,314,125,230,378,631,000 | 25.653846 | 64 | 0.601732 | false |
Havate/havate-openstack | proto-build/gui/horizon/Horizon_GUI/settings.py | 1 | 7641 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 | 2,743,992,611,349,540,400 | 31.653846 | 97 | 0.693888 | false |
follownjmoney/campaign-server | campaignserver/campaignserver/settings_prod.py | 1 | 2523 | """
Django settings for campaignserver 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, ... | apache-2.0 | 5,052,721,809,511,146,000 | 25.010309 | 74 | 0.722553 | false |
xesscorp/skidl | skidl/skidl.py | 1 | 7609 | # -*- coding: utf-8 -*-
# MIT license
#
# Copyright (C) 2016 by XESS Corp.
#
# 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... | mit | 5,613,484,846,963,720,000 | 32.372807 | 120 | 0.681036 | false |
iniverno/RnR-LLC | simics-3.0-install/simics-3.0.31/amd64-linux/lib/x86_components.py | 1 | 69880 | # MODULE: x86-components
# CLASS: x86-system
# CLASS: x86-apic-system
# CLASS: x86-separate-mem-io-system
# CLASS: x86-apic-bus-system
# CLASS: x86-e7520-system
# CLASS: i386-cpu
# CLASS: i486sx-cpu
# CLASS: i486dx2-cpu
# CLASS: pentium-cpu
# CLASS: pentium-mmx-cpu
# CLASS: pentium-pro-cpu
# CLASS: pentium-ii-cpu
# CLA... | gpl-2.0 | -5,586,652,861,325,700,000 | 38.931429 | 101 | 0.557026 | false |
bscottm/SublimeHaskell | internals/proc_helper.py | 1 | 9148 | # -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
# ProcHelper: Process execution helper class.
# -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
import errno
import subprocess
import os
import os.path
import SublimeHaskell.sublime_haskell_common as Common
i... | mit | 4,924,986,076,657,667,000 | 41.351852 | 117 | 0.591277 | false |
Pytlicek/VOBS | app/controllers/supplier/profile.py | 1 | 1457 | # -*- coding: utf-8 -*-
from flask import render_template, session, redirect, url_for
from app import app
from app.models.Forms import PublicProfile
from app.models.Checks import login_required
from app.models.SQL_DB import User, Item_Profile
@app.route('/supplier/settings/public_profile', methods=['GET', 'POST'])
@... | mit | 9,213,925,581,094,542,000 | 46 | 117 | 0.720659 | false |
sanjaymandadi/mozu-python-sdk | test/functional_test/security_test/userauthenticator_test.py | 2 | 1389 | import unittest
from mozurestsdk import mozuclient;
from mozurestsdk.security.userauthenticator import UserAuthenticator;
from mozurestsdk import util;
class UserAuthenticator_Test(unittest.TestCase):
def setUp(self):
self.config = util.readConfigFile("c:\projects\mozuconfig.txt");
mozuclient.configure(config="c... | apache-2.0 | -2,910,828,063,572,994,600 | 36.540541 | 79 | 0.74586 | false |
tundish/turberfield-utils | turberfield/utils/db.py | 1 | 7983 | #!/usr/bin/env python3
# encoding: UTF-8
# This file is part of turberfield.
#
# Turberfield 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 ve... | gpl-3.0 | 8,149,039,837,599,711,000 | 29.469466 | 85 | 0.525742 | false |
fnl/pymonad | pymonad/Either.py | 1 | 3330 | # --------------------------------------------------------
# (c) Copyright 2014 by Jason DeLaat.
# Licensed under BSD 3-clause licence.
# --------------------------------------------------------
from pymonad.Monad import *
class Either(Monad):
"""
Represents a calculation that may either fail or succeed.
An altern... | bsd-3-clause | 8,568,344,353,019,406,000 | 28.732143 | 100 | 0.664264 | false |
h-qub/wordeater-web | we-web/tests/unit/rest/users_test.py | 1 | 7620 | # coding=utf-8
from rest_test import *
import api.resources.users.users
__author__ = 'Glebov Boris'
class UserListTest(RestBaseTest):
"""
Test all case for GET: /api/v1/users/
"""
def test_users_list_success(self):
client_app = self.get_app_client()
r = client_app.get('/api/v1/users... | mit | 3,243,931,358,639,282,700 | 26.509025 | 120 | 0.555249 | false |
TraceContext/tracecontext-spec | test/tracecontext/tracestate.py | 1 | 2749 | from collections import OrderedDict
import re
class Tracestate(object):
_KEY_WITHOUT_VENDOR_FORMAT = r'[a-z][_0-9a-z\-\*\/]{0,255}'
_KEY_WITH_VENDOR_FORMAT = r'[0-9a-z][_0-9a-z\-\*\/]{0,240}@[a-z][_0-9a-z\-\*\/]{0,13}'
_KEY_FORMAT = _KEY_WITHOUT_VENDOR_FORMAT + '|' + _KEY_WITH_VENDOR_FORMAT
_VALUE_FORMAT = r'[\x20... | apache-2.0 | 5,575,316,123,618,295,000 | 32.52439 | 87 | 0.650782 | false |
nick41496/Beatnik | beatnik/api_manager/api_manager.py | 1 | 3520 | import logging
import os
import spotipy
import sys
from beatnik.api_manager.clients import AppleMusicApi, SoundcloudApi
from beatnik.api_manager.link_converter import LinkConverter
from beatnik.api_manager.link_parser import LinkParser
from beatnik.api_manager.search_handler import SearchHandler
from gmusicapi import ... | gpl-3.0 | 1,703,179,569,399,725,300 | 34.2 | 95 | 0.598295 | false |
acshi/osf.io | framework/mongo/utils.py | 1 | 5732 | # -*- coding: utf-8 -*-
import functools
import httplib as http
from django.core.paginator import Paginator
from django.db.models import QuerySet
import markupsafe
import pymongo
from modularodm.query import QueryBase
from modularodm.exceptions import NoResultsFound, MultipleResultsFound
from framework.exceptions im... | apache-2.0 | -1,111,238,550,963,007,200 | 33.323353 | 114 | 0.643057 | false |
simphony/simphony-openfoam | foam_controlwrapper/tests/test_run_time.py | 1 | 4123 | import unittest
import os
import shutil
import tempfile
from foam_controlwrapper.blockmesh_utils import create_quad_mesh
from simphony.api import CUDS, Simulation
from simphony.core.cuba import CUBA
from simphony.cuds.meta import api
from simphony.engine import EngineInterface
class WrapperRunTestCase(unittest.Test... | gpl-2.0 | -8,620,174,854,293,740,000 | 35.8125 | 77 | 0.564152 | false |
project-owner/Peppy | player/client/vlcclient.py | 1 | 10907 | # Copyright 2016-2021 Peppy Player peppy.player@gmail.com
#
# This file is part of Peppy Player.
#
# Peppy Player 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 you... | gpl-3.0 | -9,174,182,375,290,047,000 | 31.85241 | 106 | 0.539103 | false |
googleapis/googleapis-gen | google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/errors/types/user_data_error.py | 1 | 1227 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -305,280,532,206,740,100 | 30.461538 | 74 | 0.693562 | false |
jasonleaster/LeetCode | Largest_Number/ln.py | 1 | 1325 | class number() :
key = 0
bit_list = []
cnt = 0
def num_init(array) :
if array is None :
return;
num_array = []
for i in range(0, len(array)) :
cls_num = number()
tmp = array[i]
cnt = 1
while tmp > 10 :
bit_list = bit_list + [tmp % 10]
... | gpl-2.0 | -8,309,436,790,888,531,000 | 19.075758 | 56 | 0.392453 | false |
Connexions/draft-transforms | drafttransform/cli.py | 1 | 3331 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
"""The command-line interface for transforming cnxml files directly in workspace."""
... | agpl-3.0 | 7,051,750,747,463,857,000 | 36.426966 | 100 | 0.567998 | false |
mjenrungrot/competitive_programming | UVa Online Judge/12394.py | 1 | 1476 | # =============================================================================
# Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/
# FileName: 12394.py
# Description: UVa Online Judge - 12394
# =============================================================================
while True:... | mit | -6,404,102,092,147,442,000 | 27.941176 | 79 | 0.436314 | false |
hellysmile/django-iron-sessions | tests/tests.py | 1 | 1986 | # tests stolen from https://github.com/martinrusev/django-redis-sessions
from django.utils.importlib import import_module
from django.conf import settings
import time
from nose.tools import eq_
session_engine = import_module(settings.SESSION_ENGINE).SessionStore()
def test_modify_and_keys():
eq_(session_engine.... | apache-2.0 | 1,653,861,135,497,624,000 | 29.553846 | 75 | 0.678751 | false |
asicontech/software-for-equipment | bfgminer/usbtest.py | 2 | 3439 | #!/usr/bin/env python
# Copyright 2012-2013 Xiangfu
# Copyright 2012-2013 Andrew Smith
# Copyright 2013 Luke Dashjr
#
# 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 Lice... | apache-2.0 | 6,122,057,605,471,330,000 | 37.640449 | 267 | 0.742658 | false |
skoolkid/pyskool | pyskool/lesson.py | 1 | 21776 | # -*- coding: utf-8 -*-
# Copyright 2008, 2010, 2014, 2015 Richard Dymond (rjdymond@gmail.com)
#
# This file is part of Pyskool.
#
# Pyskool 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 ... | gpl-3.0 | 4,834,191,393,522,992,000 | 41.03861 | 135 | 0.618204 | false |
RoboPython/Pykemon | game.py | 1 | 12823 | # Copyright (c) 2010 Brian Gordon
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distri... | gpl-2.0 | 1,011,627,586,971,395,000 | 56.765766 | 188 | 0.613507 | false |
pwwang/bioprocs | bioprocs/scripts/imtherapy/pNetMHC.py | 1 | 5476 | from pathlib import Path
from diot import Diot
from bioprocs.utils import shell2 as shell, logger
from bioprocs.utils.parallel import Parallel, distributeList
{%from os import path%}
{%from pyppl.utils import always_list%}
infile = {{i.infile | quote}}
afile = {{i.afile | ?path.isfile | =readlines | !always_lis... | mit | -5,011,356,954,891,710,000 | 37.56338 | 107 | 0.60756 | false |
minogame/bilinear_tensorflow | src/model.py | 1 | 14668 | import tensorflow as tf
import tensorflow.contrib.layers as cl
from gridconv_v3 import gridconv2d
from deformconv import deformconv2d
from utils import log_weights
# # # # # # # # # CIFAR # # # # # # # # #
# The network is built based on 'NCHW'.
def normal_cnn_cifar(name, reuse=False):
@log_weights
d... | gpl-3.0 | -2,439,001,560,730,617,300 | 45.469256 | 108 | 0.619239 | false |
jandebleser/django-wiki | src/wiki/conf/settings.py | 1 | 10199 | from __future__ import absolute_import, unicode_literals
import bleach
from django.conf import settings as django_settings
from django.core.files.storage import default_storage
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
#: Should urls be case sensitive?
... | gpl-3.0 | 8,362,595,489,785,991,000 | 31.275316 | 92 | 0.702226 | false |
EricsonWillians/PyGameWidgets | examples/long_text_label.py | 1 | 1651 | import sys
sys.path.append("..")
import pygame
import core
import widgets
# Text label example.
WINDOW_WIDTH = 1024
WINDOW_HEIGHT = 728
pygame.init()
pygame.font.init
screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
clock = pygame.time.Clock()
FPS = 60
running = True
if __name__ == "__main__":
p... | gpl-3.0 | -231,955,241,589,300,640 | 29.018182 | 112 | 0.625681 | false |
hchauvet/beampy | beampy/statics/default_theme.py | 1 | 4858 | # -*- coding: utf-8 -*-
# Default theme of Beampy
# Main keys of the dict should be the name of the beampy modules or class
# Each modules default options need to be defined here!
THEME = {}
THEME['document'] = {
'format': 'html5', #could be svg // pdf // html5
'width': 800,
'height': 600,
'optimize'... | gpl-3.0 | -2,950,168,247,424,549,000 | 21.490741 | 176 | 0.527995 | false |
bolkedebruin/airflow | airflow/providers/google/cloud/operators/local_to_gcs.py | 1 | 3617 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | -7,390,544,169,797,167,000 | 36.28866 | 104 | 0.646945 | false |
robertz23/code-samples | python scripts and tools/list_intersection.py | 1 | 1200 | """
List intersection: Finds intersections between various lists
"""
def check_intersection(first_list, second_list):
#We use set builtin function to find the intersection between lists
return set(first_list).intersection(second_list)
def create_lists(line):
#receive a line from the file containing asc... | mit | 7,565,693,730,159,266,000 | 32.333333 | 86 | 0.645 | false |
emanuil-tolev/yugi-sync | yugisync.py | 1 | 1574 | """
Usage: python yugisync.py pull|push
Backs up everything needed to restore your current game options,
deck and card list to a git repository. If the repository is uploaded
to a service like GitHub.com, this will also upload the changes there.
Example: python yugisync.py push on your own laptop and then python... | mit | 7,542,078,908,345,114,000 | 27.735849 | 70 | 0.69568 | false |
hjoliver/cylc | cylc/flow/xtriggers/echo.py | 1 | 1143 | # THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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 Licen... | gpl-3.0 | -1,211,451,900,558,556,000 | 37.1 | 79 | 0.72091 | false |
joseguerrero/sembrando | src/presentacion/librerias/popups.py | 1 | 13668 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
from .texto import texto
from .textoci import texto2
from .imgfondo import fondo
TEXT_COLOR2 = (0,0,0)
COLOR_RED = (213, 0, 0)
BAR_COLOR = (151, 0, 172)
TEXT_COLOR = (255, 255, 255)
class Button(pygame.sprite.Sprite):
def __init__(self, identificador, par... | gpl-3.0 | -4,537,053,745,970,449,400 | 47.508897 | 166 | 0.548823 | false |
SDAquaponics/Software | Arduino/PythonDriver/NotifyAQPServer.py | 1 | 2261 | #! /usr/bin/python
# Import dependencies
import serial, sys, sendmail, decimal
import socket
HOST = "raspberrypi"
PORT = 1981
DEBUG = False;
# Serial port settings
AT_PORT = "/dev/ttyATH0"
AT_BAUD = 115200
# Serial packet structure
MAGIC_1 = 0xA9
MAGIC_2 = 0xBD
MSG_TYPE_REQUEST = 0x00
MSFG_TYPE_RESPONSE = 0x01
MS... | gpl-2.0 | 8,152,229,391,004,637,000 | 20.130841 | 82 | 0.655462 | false |
pave/pylint_flask_ext | flask_ext_clean.py | 1 | 5123 | """
Plugin for pylint that tells it about flask's extension classes.
"""
from pylint.utils import PyLintASTWalker
from logilab.astng import MANAGER
from logilab.astng import node_classes
def copy_node_info(src, dest):
"""Copy information from src to dest
Every node in the AST has to have line number information.... | mit | 5,791,808,267,114,807,000 | 36.669118 | 75 | 0.608823 | false |
VRaviTheja/SDN-policy | flowgenerator/random_ports.py | 1 | 1532 | import random
import socket
import struct
from random import randint
def port_generator():
lim=1000
port_src_start = []
port_src_end = []
port_dst_start = []
port_dst_end = []
for i in range (0,lim):
m = random.randint(1, 200)
n = random.randint(1, 200)
i... | apache-2.0 | 9,052,464,247,601,924,000 | 28.64 | 71 | 0.498695 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.