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 |
|---|---|---|---|---|---|---|---|---|---|---|
osuripple/pep.py | constants/packetIDs.py | 1 | 2252 | """Contain server and client packet IDs"""
client_changeAction = 0
client_sendPublicMessage = 1
client_logout = 2
client_requestStatusUpdate = 3
server_userID = 5
server_sendMessage = 7
server_userStats = 11
server_userLogout = 12
server_spectatorJoined = 13
server_spectatorLeft = 14
server_spectateFrames = 15
client_s... | agpl-3.0 | -4,469,825,997,374,263,000 | 25.821429 | 42 | 0.810835 | false |
faroit/loudness | python/tests/test_OME.py | 1 | 2084 | import numpy as np
import matplotlib.pyplot as plt
import loudness as ln
def plotResponse(freqPoints, dataPoints,
freqsInterp, responseInterp,
ylim=(-40, 10), title = ""):
if np.any(dataPoints):
plt.semilogx(freqPoints, dataPoints, 'o')
plt.semilogx(freqsInterp, resp... | gpl-3.0 | -6,410,065,352,474,172,000 | 30.104478 | 71 | 0.678503 | false |
Boussadia/SimpleScraper | scraper.py | 1 | 6078 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import logging
import sys
import urllib
import mechanize
import cookielib
import urlparse
class Singleton(object):
_instances = {}
def __new__(class_, *args, **kwargs):
if class_ not in class_._instances:
class_._instances[class_] = super(Singleto... | mit | 2,890,036,489,779,167,000 | 29.385 | 115 | 0.666776 | false |
lifenggg/assaydata | get_NDCG_test.py | 1 | 4798 | import math
import numpy
from os import path
def get_ndcg(test_path, pred_path):
test_rank = []
pred_rank = []
# all the return value
ndcg10 = 0
ndcg5 = 0
ndcgall = 0
if path.isfile(pred_path) == False:
return [0, 0, 0, 0]
with open(test_path) as fp:
for line in f... | gpl-2.0 | -433,785,717,492,918,340 | 26.895349 | 101 | 0.552313 | false |
awemulya/fieldsight-kobocat | onadata/apps/fsforms/models.py | 1 | 37515 | from __future__ import unicode_literals
import datetime
import os
import json
import re
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import GenericRelation
from django.contrib.postgres.fields import ArrayField
from django.core.exceptions import ValidationError
from django.core.ur... | bsd-2-clause | 6,981,882,587,208,460,000 | 41.057175 | 195 | 0.599547 | false |
antworteffekt/EDeN | graphprot/prepare_graphprot_seqs.py | 1 | 10394 | #!/usr/bin/env python
# draft implementation
# * TODO:
# * centering should be optional
# * viewpoint should be optional
# * check for nonunique ids and warn
# * check for bedtools version
# * write bed files for sequence coordinates
# * set rnd init for shuffling to have reproducible results
# * use my ... | mit | -1,839,607,395,871,399,200 | 38.075188 | 143 | 0.646527 | false |
vnaydionov/card-proxy | tests/secvault_tests.py | 1 | 3752 | # -*- coding: utf-8 -*-
import os
import sys
import unittest
import datetime as dt
from utils import generate_random_string, generate_random_number
from secvault_api import SecureVaultApi
import logger
log = logger.get_logger('/tmp/secvault_tests-%s.log' % os.environ['USER'])
SERVER_URI = 'http://localhost:17113/'
... | mit | 6,813,235,318,623,303,000 | 36.148515 | 86 | 0.606077 | false |
rwightman/tensorflow-litterbox | litterbox/models/sdc/model_sdc.py | 1 | 8350 | # Copyright (C) 2016 Ross Wightman. 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
# =================================... | apache-2.0 | 1,256,829,688,703,866,600 | 38.761905 | 107 | 0.582395 | false |
franbull/didthattoday | didthattoday/didthattoday/tests/test_step_views.py | 1 | 2921 | import simplejson
from base import IntegrationTestBase
from didthattoday.models import Step
from didthattoday.models import Habit
class TestStepViews(IntegrationTestBase):
def create_habit(self):
assert(self.session.query(Habit).count() == 0)
habit = {'name': 'woo', 'description': 'hoo'}
r... | apache-2.0 | 310,837,209,777,617,200 | 30.75 | 76 | 0.548442 | false |
wcmitchell/insights-core | insights/combiners/tests/test_virt_who_conf.py | 1 | 4088 | from insights.combiners.virt_who_conf import AllVirtWhoConf
from insights.parsers.virt_who_conf import VirtWhoConf
from insights.parsers.sysconfig import VirtWhoSysconfig
from insights.tests import context_wrap
VWHO_D_CONF_ESX = """
## This is a template for virt-who configuration files. Please see
## virt-who-config(... | apache-2.0 | -6,328,110,378,281,608,000 | 29.281481 | 105 | 0.716732 | false |
mwiencek/picard | picard/ui/cdlookup.py | 1 | 3277 | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
# Copyright (C) 2006 Lukáš Lalinský
#
# 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... | gpl-2.0 | 8,501,564,173,859,651,000 | 48.606061 | 111 | 0.66066 | false |
p2pu/mechanical-mooc | twitter/views.py | 1 | 1825 | from django import http
from django.conf import settings
from django.views.decorators.http import require_http_methods
import json
from twitter import utils
@require_http_methods(['POST'])
def get_data(request):
if 'twitter_handle' not in request.POST.keys():
return http.HttpResponseServerError()
tw... | mit | 2,535,445,939,260,978,000 | 34.096154 | 97 | 0.667397 | false |
OCA/carrier-delivery | base_delivery_carrier_label/models/delivery_carrier.py | 1 | 1276 | # -*- coding: utf-8 -*-
# Copyright 2012 Akretion <http://www.akretion.com>.
# Copyright 2013-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class DeliveryCarrier(models.Model):
_inherit = 'delivery.carrier'
@api.model
def _get_carr... | agpl-3.0 | -6,199,342,651,234,206,000 | 31.717949 | 75 | 0.636364 | false |
arocks/steel-rumors | steelrumors/settings.py | 1 | 5450 | # Django settings for steelrumors project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'da... | mit | 5,335,739,064,392,280,000 | 32.435583 | 127 | 0.688624 | false |
yashodhank/erpnext | erpnext/config/buying.py | 1 | 4418 | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Purchasing"),
"icon": "fa fa-star",
"items": [
{
"type": "doctype",
"name": "Material Request",
"description": _("Request for purchase."),
},
{
"type": "doctype",
"name":... | agpl-3.0 | -5,095,885,631,226,072,000 | 20.55122 | 79 | 0.497963 | false |
heatherleaf/MCFParser.py | test/convert_mcfg_to_py.py | 1 | 1550 |
import re
import json
import fileinput
# F --> AO a [0,0;1,0] (* C --> /T,C T [0,0;1,0] *)
# A --> AL H [0,0;1,0] (* D,-case --> /N,D,-case N [0,0;1,0] *)
# I --> m [0,2;0,0][0,1] (* PastPart,-aux;-case --> +v,PastPart,-aux;-case;-v [0,2;0,0][0,1] *)
# I --> p [0,1;0,0][0,2] (* PastPart,-aux;-ca... | gpl-3.0 | -5,696,885,453,429,928,000 | 28.245283 | 110 | 0.425161 | false |
meredith-digops/awsops | volumecleanup/volumecleanup.py | 1 | 3967 | #!/usr/bin/env python
from __future__ import print_function
import boto3
from botocore.exceptions import ClientError
from datetime import datetime
from datetime import timedelta
from datetime import tzinfo
DEFAULT_RETENTION_DAYS = None
"""If None, no default retention is applied"""
ZERO = timedelta(0)
class UTC(... | mit | -3,186,707,178,158,320,600 | 24.928105 | 89 | 0.575498 | false |
gjbex/parameter-weaver | src/vsc/parameter_weaver/c/types.py | 1 | 6550 | #
# ParameterWeaver: a code generator to handle command line parameters
# and configuration files for C/C++/Fortran/R/Octave
# Copyright (C) 2013 Geert Jan Bex <geertjan.bex@uhasselt.be>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | gpl-3.0 | 6,919,932,660,071,591,000 | 31.914573 | 94 | 0.579389 | false |
johncosta/private-readthedocs.org | readthedocs/core/models.py | 1 | 1611 | from django.db import models
from django.db.models.signals import post_save
from django.db.utils import DatabaseError
from django.dispatch import receiver
from django.contrib.auth.models import User
STANDARD_EMAIL = "anonymous@readthedocs.org"
class UserProfile (models.Model):
"""Additional information about a Us... | mit | -9,134,461,863,259,773,000 | 33.276596 | 102 | 0.656735 | false |
FernanOrtega/DAT210x | Module2/assignment3.py | 1 | 1065 | import pandas as pd
# TODO: Load up the dataset
# Ensuring you set the appropriate header column names
#
df = pd.read_csv('Datasets/servo.data', names=['motor', 'screw', 'pgain', 'vgain', 'class'])
print df.head()
# TODO: Create a slice that contains all entries
# having a vgain equal to 5. Then print the
# length ... | mit | 6,675,119,542,563,966,000 | 21.659574 | 92 | 0.680751 | false |
noplay/aiohttp | tests/test_web_request.py | 1 | 5998 | import asyncio
import unittest
from unittest import mock
from aiohttp.web import Request
from aiohttp.multidict import MultiDict, CIMultiDict
from aiohttp.protocol import HttpVersion
from aiohttp.protocol import RawRequestMessage
class TestWebRequest(unittest.TestCase):
def setUp(self):
self.loop = async... | apache-2.0 | 8,015,690,689,329,280,000 | 33.2 | 76 | 0.593651 | false |
ITNano/WikiSubtitleReader | raw_to_ass.py | 1 | 3753 | # -*- coding: utf-8 -*-
#Python class to parse lyrics on the form
#Singer 1: I am so happy, hear me sing
#And write it to an .ass file. (Advanced SubStation Alpha subtitle file)
#The string before the separator ':' is used to format the text by mapping it to
#a predefined format, the remainder is the actual text to sin... | apache-2.0 | 3,436,370,674,309,785,000 | 35.427184 | 138 | 0.598614 | false |
plotly/python-api | packages/python/plotly/plotly/validators/densitymapbox/__init__.py | 1 | 3954 | import sys
if sys.version_info < (3, 7):
from ._zsrc import ZsrcValidator
from ._zmin import ZminValidator
from ._zmid import ZmidValidator
from ._zmax import ZmaxValidator
from ._zauto import ZautoValidator
from ._z import ZValidator
from ._visible import VisibleValidator
from ._uirevi... | mit | 4,225,770,923,051,942,400 | 39.346939 | 60 | 0.657056 | false |
emkael/jfrteamy-playoff | jfr_playoff/gui/tabs.py | 1 | 18307 | #coding=utf-8
import os
from collections import OrderedDict
import Tkinter as tk
import ttk
import tkFileDialog as tkfd
import tkMessageBox as tkmb
from .frames import TraceableText, NumericSpinbox
from .frames.match import *
from .frames.network import *
from .frames.team import *
from .frames.translations import *... | bsd-2-clause | -9,176,648,892,678,380,000 | 34.324324 | 157 | 0.592251 | false |
sdanielf/dictate | dictation/config.py | 1 | 2826 | # Copyright (C) 2013 S. Daniel Francis <francis@sugarlabs.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Thi... | gpl-3.0 | -8,019,251,777,635,433,000 | 33.048193 | 76 | 0.61005 | false |
ealmansi/incc-tp-final | src/gensim/tut2.py | 1 | 1637 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# https://radimrehurek.com/gensim/tut2.html
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
import os
from gensim import corpora, models, similarities
if (os.path.exists("/tmp/deerwester.dict")):
dictionary = ... | mit | 5,472,797,103,600,224,000 | 33.104167 | 110 | 0.735492 | false |
milapour/palm | palm/test/test_blink_model.py | 1 | 3374 | import nose.tools
from palm.blink_factory import SingleDarkBlinkFactory,\
DoubleDarkBlinkFactory,\
ConnectedDarkBlinkFactory
from palm.blink_model import BlinkModel
from palm.blink_parameter_set import SingleDarkParameterSet,\
... | bsd-2-clause | 1,793,866,859,589,507,000 | 40.654321 | 75 | 0.65412 | false |
tomzw11/Pydrone | route.py | 1 | 2000 | import matplotlib.pyplot as plt
import matplotlib.patches as patches
def route(root):
root_height = root[2]
coordinates = [\
[0.42*root_height+root[0],0.42*root_height+root[1],root_height/2],\
[-0.42*root_height+root[0],0.42*root_height+root[1],root_height/2],\
[-0.42*root_height+root[0],-0.15*root_height+root[1]... | mit | 8,674,524,241,058,925,000 | 26.777778 | 155 | 0.6335 | false |
PierreBdR/point_tracker | point_tracker/tissue_plot/tracking_plot.py | 1 | 45873 | # coding=utf-8
from __future__ import print_function, division, absolute_import
"""
This module contains the bases classes needed for plotting.
"""
__author__ = "Pierre Barbier de Reuille <pierre@barbierdereuille.net>"
from PyQt4.QtGui import (QColor, QDialog, QFontDialog, QFont, QDoubleValidator, QPicture,
... | gpl-2.0 | -4,149,817,835,625,474,600 | 32.581991 | 113 | 0.593159 | false |
Bloomie/murano-agent | muranoagent/common/messaging/mqclient.py | 1 | 3280 | # Copyright (c) 2013 Mirantis 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 writ... | apache-2.0 | -1,117,816,651,737,075,100 | 31.156863 | 72 | 0.594817 | false |
MysterionRise/fantazy-predictor | enriching_data.py | 1 | 10896 | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
import calendar
import os
import pandas as pd
# Правила подсчета очков:
#
# за участие в матче – 2 очка, если сыграно 10 минут и больше; 1 очко, если сыграно меньше 10 минут
#
# за победу – 3 очка (в гостях); 2 очка (дома)
#
# за поражение – минус 3 очка (дома); минуc... | mit | 7,115,765,170,995,633,000 | 34.2 | 131 | 0.562115 | false |
Gixugif/CDRecording | Call_Detail_Record.py | 1 | 2248 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Title: Call_Detail_Record
# Description: Class for one
# CDR
# separately.
# Date: 6/9/16
# Author: Jeffrey Zic
class Call_Detail_Record:
""" Call Detail Records contain metadata for phone calls."""
def __init__(self):
self.bbx_cdr_id = ('', )
self.... | gpl-3.0 | -1,865,762,430,259,183,400 | 33.060606 | 64 | 0.483986 | false |
jmbergmann/yogi | yogi-python/tests/test_subscription.py | 1 | 3085 | #!/usr/bin/env python3
import sys
import os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + '/..')
import yogi
import unittest
from proto import yogi_0000d007_pb2
from test_terminals import AsyncCall
class TestSubscription(unittest.TestC... | gpl-3.0 | 5,551,646,205,919,994,000 | 32.532609 | 93 | 0.630146 | false |
kannon92/psi4 | doc/sphinxman/source/psi4doc/ext/psidomain.py | 1 | 1221 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2016 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | gpl-2.0 | 5,442,838,222,191,783,000 | 33.885714 | 128 | 0.746929 | false |
CaptainDesAstres/Simple-Blender-Render-Manager | usefullFunctions.py | 1 | 1409 | #!/usr/bin/python3.4
# -*-coding:Utf-8 -*
import time
def now(short = True):
'''return current date in short or long form (HH:MM:SS or DD.MM.AAAA-HH:MM:SS)'''
if short == True:
return time.strftime('%H:%M:%S')
else:
return time.strftime('%d.%m.%Y-%H:%M:%S')
def columnLimit(value, limit, begin = True, sep =... | mit | -1,501,886,194,108,361,200 | 15.552941 | 82 | 0.595593 | false |
willdecker/suds | suds/client.py | 1 | 27894 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 b... | mit | 582,025,390,059,082,400 | 31.816471 | 84 | 0.573098 | false |
slub/vk2-georeference | georeference/views/user/georeferencehistory.py | 1 | 3257 | # -*- coding: utf-8 -*-
'''
Copyright (c) 2015 Jacob Mendt
Created on 07.10.15
@author: mendt
'''
import traceback
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPInternalServerError
from sqlalchemy import desc
from georeference import LOGGER
from georeference.settings import OAI_ID_PATTE... | gpl-3.0 | -4,433,242,273,326,549,500 | 38.253012 | 162 | 0.671784 | false |
mtpajula/ijonmap | core/project.py | 1 | 4348 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .elements.point import Point
from .elements.line import Line
from .elements.polygon import Polygon
import os
class Project(object):
def __init__(self, messages):
self.messages = messages
self.points = []
self.lines = ... | gpl-2.0 | 1,836,806,213,838,873,000 | 26.518987 | 86 | 0.49172 | false |
pyfa-org/eos | eos/util/repr.py | 1 | 1866 | # ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publi... | lgpl-3.0 | 6,969,660,614,217,755,000 | 41.409091 | 80 | 0.620579 | false |
Ophrys-Project/Ophrys | ophrys/utils/models.py | 1 | 4817 | from django.conf.urls import patterns, url, include
from django.core.urlresolvers import reverse, NoReverseMatch
from django.db import models
from .views import ListView, CreateView, DetailView, UpdateView, DeleteView
class GetAbsoluteUrlMixin:
"""
Mixin to add the methods get_absolute_url() and get_absolute... | mit | 7,332,932,344,475,288,000 | 42.396396 | 98 | 0.625493 | false |
zekearneodo/ephys-tools | zk/pca_filter.py | 1 | 4586 | __author__ = 'chris'
import logging
import tables
from scipy import signal
import numpy as np
def PCA_filter(self, rec_h5_obj, probe):
"""
Filtering based on
doi:10.1016/S0165-0270(01)00516-7
"""
data = self.run_group.data
D_all_clean = rec_h5_obj.create_carray(self.run_group,... | gpl-2.0 | -8,351,679,364,114,622,000 | 38.60177 | 121 | 0.511557 | false |
mfalesni/python-kwargify | test_kwargify.py | 1 | 5569 | # -*- coding: utf-8 -*-
import pytest
from kwargify import kwargify
class TestFunctionWithNoArgs(object):
@pytest.fixture(scope="class")
def function(self):
@kwargify
def f():
return True
return f
def test_no_args_given(self, function):
function()
@pytest... | lgpl-3.0 | -1,896,215,505,816,903,200 | 23.318777 | 75 | 0.587718 | false |
markbrough/exchangerates | exchangerates/util.py | 1 | 1344 | fred_countries_currencies = {
'Australia': 'AUD',
'Austria': 'ATS',
'Belgium': 'BEF',
'Brazil': 'BRL',
'Canada': 'CAD',
'China': 'CNY',
'Denmark': 'DKK',
'Euro': 'EUR',
'Finland': 'FIM',
'France': 'FRF',
'Germany': 'DEM',
'Greece': 'GRD',
'Hong Kong': 'HKD',
'Irel... | mit | -3,411,846,571,437,409,000 | 18.764706 | 29 | 0.419643 | false |
bmazin/SDR | Projects/ChannelizerSim/legacy/bin_width_1st_stage.py | 1 | 1524 |
import matplotlib.pyplot as plt
import scipy.signal
import numpy as np
import math
import random
from matplotlib.backends.backend_pdf import PdfPages
samples = 51200
L = samples/512
fs = 512e6
dt = 1/fs
time = [i*dt for i in range(samples)]
def pfb_fir(x):
N = len(x)
T = 4
L = 512
bin_width_scale = 2.5
dx = T*... | gpl-2.0 | 6,725,326,808,693,590,000 | 21.411765 | 93 | 0.625328 | false |
doctorzeb8/django-era | era/tests/test_functools.py | 1 | 1525 | from ..utils.functools import unidec, pluck, separate, pick, omit, truthful, avg
from .base import SimpleTestCase, IsOkTestCase
class UnidecTestCase(IsOkTestCase):
def test_default_behaviour(self):
self.assertOk(
unidec(lambda fn, a: fn(a) + 'k') \
(lambda a: a[1:])('oo'))
def... | mit | -7,966,047,185,514,408,000 | 26.232143 | 80 | 0.516721 | false |
xpostudio4/red-de-emprendimiento | app/institutions/views.py | 1 | 4872 | from django.contrib.auth import (login as django_login, authenticate,
logout as django_logout)
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import SetPasswordForm
from django.http import JsonResponse, HttpResponseRedirect
from django.shortcuts... | mit | 6,066,139,324,412,251,000 | 34.304348 | 78 | 0.650246 | false |
noironetworks/group-based-policy | gbpservice/nfp/core/cfg.py | 1 | 1671 | # 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 | 1,557,896,110,659,903,700 | 29.944444 | 78 | 0.645721 | false |
pipicold/BlockyTime | server_new/testing/blocks_controller_tester.py | 1 | 2255 | import datetime
from Initialization import Initialization
from Data_Controllers.blocks_controller import blocks_controller
from DB_Model import database_helper
from DB_Model.database_tester import database_tester
from DB_Model.database_model import Blocks
from DB_Model.database_model import Users
class blocks_control... | gpl-3.0 | 8,987,393,502,863,784,000 | 38.561404 | 80 | 0.630599 | false |
nhoffman/opiates | opiate/utils.py | 1 | 2361 | from collections import Iterable
import os
from os import path
import shutil
import logging
from __init__ import __version__
log = logging.getLogger(__name__)
def flatten(seq):
"""
Poached from http://stackoverflow.com/questions/2158395/flatten-an-irregular-list-of-lists-in-python
Don't flatten strings ... | gpl-3.0 | -4,849,164,687,510,369,000 | 31.342466 | 104 | 0.633206 | false |
Seekatar/pcg | Games/FineControl.py | 1 | 2743 | import base
import datetime
import random
from FixedRandomGame import FixedRandomGame as __base
# use __base, otherwise when searching for games, FixedRandomGame shows up multiple times
class FineControl(__base):
"""
Touch four plates in patterns as fast as you can.
Level 1: tight, clockwise 5 times
... | mit | 47,598,030,569,357,740 | 32.048193 | 155 | 0.574918 | false |
achawkins/Forsteri | doc/conf.py | 1 | 9317 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Forsteri documentation build configuration file, created by
# sphinx-quickstart on Fri Apr 24 16:09:15 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | mit | 6,882,828,192,437,842,000 | 31.350694 | 79 | 0.707739 | false |
DIRACGrid/COMDIRAC | Interfaces/scripts/dgetenv.py | 1 | 1529 | #! /usr/bin/env python
"""
print DCommands session environment variables
"""
import DIRAC
from COMDIRAC.Interfaces import critical
from COMDIRAC.Interfaces import DSession
if __name__ == "__main__":
from COMDIRAC.Interfaces import ConfigCache
from DIRAC.Core.Base import Script
Script.setUsageMessage( '\n'.j... | gpl-3.0 | 3,005,090,108,459,228,000 | 22.890625 | 97 | 0.517332 | false |
nistats/nistats | examples/03_second_level_models/plot_oasis.py | 1 | 6030 | """Voxel-Based Morphometry on Oasis dataset
========================================
This example uses Voxel-Based Morphometry (VBM) to study the relationship
between aging, sex and gray matter density.
The data come from the `OASIS <http://www.oasis-brains.org/>`_ project.
If you use it, you need to agree with the d... | bsd-3-clause | 720,793,520,006,853,800 | 39.743243 | 80 | 0.566335 | false |
RPGOne/Skynet | pytorch-master/torch/nn/modules/upsampling.py | 1 | 3469 | from numbers import Integral
from .module import Module
from .. import functional as F
from .utils import _pair
class _UpsamplingBase(Module):
def __init__(self, size=None, scale_factor=None):
super(_UpsamplingBase, self).__init__()
if size is None and scale_factor is None:
raise Val... | bsd-3-clause | -1,060,963,812,535,801,200 | 29.429825 | 89 | 0.566734 | false |
iliavolyova/evo-clustering | src/stats.py | 1 | 5952 | from __future__ import division
import os
from functools import partial
import log as logger
import core
import gui_graphs
from PyQt4.QtGui import *
defaultParams = {
'Dataset' : 'Iris',
'Number of generations' : 100,
'Population size': 20,
'Max clusters' : 5,
... | mit | 8,746,288,657,055,795,000 | 34.434524 | 132 | 0.541835 | false |
ool2016-seclab/quarantineSystem | api.py | 1 | 3438 | import json
import logging
import ryutest
from webob import Response
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.app.wsgi import ControllerBase, WSGIApplication, route
from ryu.lib import dpid as dpid_lib
simple_switc... | mit | 627,949,269,274,732,800 | 36.380435 | 94 | 0.630308 | false |
anti-social/elasticmagic | tests_integ/conftest.py | 1 | 1312 | import uuid
import pytest
from elasticmagic import Document, Field
from elasticmagic.types import Text
def pytest_addoption(parser):
parser.addoption("--es-url", action="store", default="localhost:9200")
def pytest_generate_tests(metafunc):
# This is called for every test. Only get/set command line argume... | apache-2.0 | 6,375,367,001,294,006,000 | 23.296296 | 74 | 0.605945 | false |
melvinw/pktgen | controller/job_pb2.py | 1 | 9157 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: job.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflectio... | bsd-3-clause | 2,792,861,687,643,069,400 | 38.469828 | 847 | 0.675767 | false |
lerker/cupydle | cupydle/dnn/viejo/Neurons.py | 1 | 3537 | import numpy as np
__author__ = "Nelson Ponzoni"
__copyright__ = "Copyright 2015-2016, Proyecto Final de Carrera"
__credits__ = ["Nelson Ponzoni"]
__license__ = "GPL"
__version__ = "20160101"
__maintainer__ = "Nelson Ponzoni"
__email__ = "npcuadra@gmail.com"
__status__ = "Production"
"""
Neurons class, this is abstra... | apache-2.0 | -3,702,147,777,341,866,000 | 30.026316 | 109 | 0.599943 | false |
byohay/Remarkable | remarkable/AboutRemarkableDialog.py | 1 | 1798 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# Copyright (C) 2016 <Jamie McGowan> <jamiemcgowan.dev@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# ... | mit | -6,943,829,119,684,817,000 | 45.102564 | 80 | 0.758621 | false |
hesseltuinhof/mxnet | python/mxnet/gluon/model_zoo/vision/__init__.py | 1 | 3746 | # coding: utf-8
# pylint: disable=wildcard-import, arguments-differ
r"""Module for pre-defined neural network models.
This module contains definitions for the following model architectures:
- `AlexNet`_
- `DenseNet`_
- `Inception V3`_
- `ResNet V1`_
- `ResNet V2`_
- `SqueezeNet`_
- `VGG`_
You can construct a mod... | apache-2.0 | -176,548,373,229,067,420 | 33.366972 | 82 | 0.60331 | false |
AtomLaw/clamwin-0.1 | py/throb/throbImages.py | 1 | 261647 | #----------------------------------------------------------------------
# This file was generated by L:\Projects\ClamWin\py\throb\ENCODE~1.PY
#
from wxPython.wx import wxImageFromStream, wxBitmapFromImage
import cStringIO
catalog = {}
index = []
class ImageClass: pass
def getscanprogress01Data():
return \
'\x89... | gpl-2.0 | -6,522,507,984,800,969,000 | 72.228939 | 77 | 0.714061 | false |
MPIBGC-TEE/CompartmentalSystems | notebooks/ELM_dask.py | 1 | 1730 | #from dask.distributed import Client
import xarray as xr
import numpy as np
import pandas as pd
import importlib
import ELMlib
importlib.reload(ELMlib)
#client = Client(n_workers=2, threads_per_worker=2, memory_limit='1GB')
#client
#ds = xr.open_dataset('../Data/14C_spinup_holger_fire.2x2_small.nc')
from netCDF4 imp... | mit | 2,440,978,287,868,239,400 | 23.366197 | 113 | 0.636416 | false |
gusgollings/scbdo | scbdo/tod.py | 1 | 16340 |
# SCBdo : DISC Track Racing Management Software
# Copyright (C) 2010 Nathan Fraser
#
# 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 ... | gpl-3.0 | 5,077,695,465,656,237,000 | 32.970894 | 92 | 0.567993 | false |
piotroxp/scibibscan | scib/lib/python3.5/site-packages/astropy/coordinates/baseframe.py | 1 | 45786 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Framework and base classes for coordinate frames/"low-level" coordinate
classes.
"""
from __future__ import (absolute_import, unicode_literals, division,
print_function)
# Standard library
import inspec... | mit | -3,056,814,761,154,917,000 | 36.591133 | 88 | 0.58151 | false |
atilag/qiskit-sdk-py | qiskit/_jobprocessor.py | 1 | 4559 | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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 requ... | apache-2.0 | 5,967,503,450,596,751,000 | 36.368852 | 85 | 0.606054 | false |
morta-code/YAX | setup.py | 1 | 1245 | from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
... | gpl-3.0 | 6,089,661,871,399,462,000 | 35.529412 | 94 | 0.662641 | false |
lutianming/leetcode | reorder_list.py | 1 | 1288 | # Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# @param head, a ListNode
# @return nothing
def reorderList(self, head):
if not head or not head.next:
return head
fast = head
s... | mit | 3,573,646,055,956,980,700 | 21.596491 | 41 | 0.534938 | false |
magyarm/periphondemand-code | src/bin/code/intercon.py | 1 | 5000 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Name: Intercon.py
# Purpose:
# Author: Fabien Marteau <fabien.marteau@armadeus.com>
# Created: 13/05/2008
#-----------------------------------------------------------------------------
# C... | lgpl-2.1 | 8,862,320,480,658,115,000 | 35.764706 | 78 | 0.5792 | false |
zdrjson/DDKit | python/iMacFirstPythonPragrammer/FindSameNameImage.py | 1 | 1755 | import os, sys, re, shutil
if __name__ == '__main__':
used_map = {}
resPath = "./MagnetPF/Res/"
depDir = "Deprecated"
skipDir = ["message"]
for root, dirs, files in os.walk("./"):
for file in files:
if file.endswith(".m"):
filepath = os.path.join(root,... | mit | -5,205,550,570,592,033,000 | 30.927273 | 76 | 0.406268 | false |
owlabs/incubator-airflow | airflow/contrib/operators/snowflake_operator.py | 1 | 3034 | # -*- 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,577,476,445,885,619,000 | 38.402597 | 78 | 0.677983 | false |
thefinn93/orgsms | orgsms/api.py | 1 | 3675 | from flask import Blueprint, abort, jsonify, request, current_app, Response
import datetime
from sqlalchemy import desc
from .provider import providers
from .socketio import socketio
from . import models, exceptions
app = Blueprint('api', __name__)
@app.route('/inbound/<provider>', methods=["POST"])
def inbound(pro... | gpl-3.0 | 5,098,620,182,597,977,000 | 36.5 | 98 | 0.667483 | false |
tableau/TabPy | tests/integration/test_deploy_and_evaluate_model_auth_on.py | 1 | 1233 | from . import integ_test_base
class TestDeployAndEvaluateModelAuthOn(integ_test_base.IntegTestBase):
def _get_config_file_name(self) -> str:
return "./tests/integration/resources/deploy_and_evaluate_model_auth.conf"
def _get_port(self) -> str:
return "9009"
def test_deploy_and_evaluate_m... | mit | 6,206,007,862,178,781,000 | 35.264706 | 82 | 0.595296 | false |
bolkedebruin/airflow | airflow/executors/executor_loader.py | 1 | 3573 | # 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 | -3,511,072,061,836,489,000 | 41.035294 | 109 | 0.683459 | false |
pdelsante/thug | thug/DOM/History.py | 1 | 3513 | #!/usr/bin/env python
#
# History.py
#
# This program 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 that it will be useful,
# but WITHOUT ANY WARRANTY; w... | gpl-2.0 | 2,978,125,687,368,465,400 | 26.661417 | 95 | 0.609735 | false |
DLR-SC/DataFinder | src/datafinder/gui/user/common/widget/property/editors/list_editor.py | 1 | 14838 | #
# $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
... | bsd-3-clause | 1,791,342,349,966,951,400 | 38.540984 | 119 | 0.638765 | false |
chripell/pyasicam | view.py | 1 | 8948 | #!/usr/bin/python3
import datetime
import os
import pyasicam as pc
import sys
import numpy as np
import cairo
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GdkPixbuf, GLib, Gdk, Gio, GObject
def gamma_stretch(im, gamma):
if im.dtype != np.float:
im = im.astype(np.float)
i... | gpl-3.0 | 199,139,717,233,901,900 | 29.026846 | 72 | 0.533862 | false |
livioferrante/my-final-project | .mywaflib/waflib/extras/boost.py | 1 | 13891 | #!/usr/bin/env python
# encoding: utf-8
#
# partially based on boost.py written by Gernot Vormayr
# written by Ruediger Sonderfeld <ruediger@c-plusplus.de>, 2008
# modified by Bjoern Michaelsen, 2008
# modified by Luca Fossati, 2008
# rewritten for waf 1.5.1, Thomas Nagy, 2008
# rewritten for waf 1.6.2, Sylvain Rouquet... | bsd-3-clause | -5,572,335,086,933,527,000 | 32.798054 | 136 | 0.653373 | false |
jaap-karssenberg/zim-desktop-wiki | tests/operations.py | 1 | 4550 |
# Copyright 2017 Jaap Karssenberg <jaap.karssenberg@gmail.com>
import tests
from gi.repository import Gtk
from zim.notebook.operations import *
class MockProgressDialog(object):
def __init__(self, parent, operation):
# self.heading.set_text(operation.msg)
operation.connect('step', self.on_iteration_step)
... | gpl-2.0 | -452,143,776,493,612,100 | 21.303922 | 69 | 0.677582 | false |
Arkapravo/morse-0.6 | src/morse/actuators/destination.py | 1 | 3226 | import logging; logger = logging.getLogger("morse." + __name__)
import morse.core.actuator
from morse.helpers.components import add_data, add_property
class DestinationActuatorClass(morse.core.actuator.MorseActuatorClass):
""" Destination motion controller
This controller will receive a destination point and
... | bsd-3-clause | 6,813,234,703,560,069,000 | 37.86747 | 108 | 0.619653 | false |
cpcloud/ibis | ibis/pandas/execution/tests/test_structs.py | 1 | 2175 | from collections import OrderedDict
import pandas as pd
import pandas.util.testing as tm
import pytest
import ibis
import ibis.expr.datatypes as dt
@pytest.fixture(scope="module")
def value():
return OrderedDict([("fruit", "pear"), ("weight", 0)])
@pytest.fixture(scope="module")
def struct_client(value):
... | apache-2.0 | -4,332,289,009,526,960,600 | 25.204819 | 79 | 0.585287 | false |
radinformatics/whatisit | whatisit/apps/wordfish/storage.py | 1 | 2207 | from django.core.files.storage import FileSystemStorage
from django.core.files.move import file_move_safe
from django.contrib.auth.models import User
from django.apps import apps
from fnmatch import fnmatch
from whatisit.settings import (
MEDIA_ROOT,
MEDIA_URL
)
import errno
import itertools
import os
import... | mit | -5,028,986,313,260,818,000 | 33.484375 | 89 | 0.580879 | false |
blue-yonder/pyscaffold | tests/test_api.py | 1 | 8054 | # -*- coding: utf-8 -*-
from os.path import exists as path_exists
from os.path import getmtime
import pytest
from pyscaffold import templates
from pyscaffold.api import (
Extension,
create_project,
discover_actions,
get_default_options,
helpers,
verify_project_dir,
)
from pyscaffold.exceptions... | mit | -8,887,442,645,753,015,000 | 31.607287 | 88 | 0.659424 | false |
gwpy/vet | gwvet/metric/__init__.py | 1 | 1693 | # coding=utf-8
# Copyright (C) Duncan Macleod (2014)
#
# This file is part of GWVeto.
#
# GWVeto 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... | gpl-3.0 | -5,397,021,348,482,727,000 | 30.351852 | 77 | 0.695806 | false |
chriha/GistTerminal | helpers.py | 1 | 2293 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from contextlib import contextmanager
import os
import re
import sys
import tempfile
# see http://en.wikipedia.org/wiki/ANSI_escape_code for more ANSI escape codes
class textColors( object ):
grey = '37m'
white = '97m'
cyan = '36m'
lightcy... | mit | 7,451,939,604,386,966,000 | 31.757143 | 233 | 0.523768 | false |
lucasa/landell_gst-gengui | sltv/gstmanager/sbinmanager.py | 2 | 1441 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
logger = logging.getLogger('sbinmanager')
class SBinManager(object):
def __init__(self):
self.pipeline_desc = ""
self.check_for_compat = True
def add_sbin(self, element):
if self.check_for_compat and element.type.find("sourc... | gpl-2.0 | 537,184,325,939,206,140 | 35.025 | 120 | 0.539903 | false |
andrewyoung1991/abjad | abjad/tools/abctools/AbjadObject.py | 1 | 3350 | # -*- encoding: utf-8 -*-
import abc
AbstractBase = abc.ABCMeta(
'AbstractBase',
(),
{
'__metaclass__': abc.ABCMeta,
'__module__': __name__,
'__slots__': (),
},
)
class AbjadObject(AbstractBase):
'''Abstract base class from which many custom classes inherit.
'... | gpl-3.0 | 3,573,645,687,400,127,000 | 24.580153 | 76 | 0.541791 | false |
ISN-LYSTCHA17/glowing-invention | personnalize.py | 1 | 2940 | # import drawing lib
import pygame
# pygame constants as events' constants
from pygame.locals import *
# game constants
from constants import *
from buttonwimage import ButtonWImage
import glob
import os
import textentry
from button import Button
import shutil
class Personnalize:
def __init__(self,... | gpl-3.0 | -7,840,768,914,036,989,000 | 32.186047 | 144 | 0.483333 | false |
eteamin/spell_checker_web_api | scwapi/model/__init__.py | 1 | 2402 | # -*- coding: utf-8 -*-
"""The application's model objects"""
from zope.sqlalchemy import ZopeTransactionExtension
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# Global session manager: DBSession() returns the Thread-local
# session object appropriate... | gpl-3.0 | 3,821,758,990,012,186,000 | 37.741935 | 78 | 0.735637 | false |
cysuncn/python | spark/crm/PROC_M_MID_PER_ASSETS.py | 1 | 3335 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_M_MID_PER_ASSETS').setMaster(sys.argv[2])
sc = SparkContext(conf = conf)
sc.s... | gpl-3.0 | -6,297,165,228,514,295,000 | 35.123596 | 170 | 0.621462 | false |
evanthebouncy/nnhmm | uai_sushi/script_test_sort.py | 1 | 1245 | from model import *
from draw import *
from naive_baseline import *
from quicksort import *
# ------------- helpers --------------
def get_id_map(start_sort, truth):
ret = dict(zip(start_sort, truth))
return ret
def pred_acc(preds, qry):
num_cor = 0
... | mit | 8,447,393,334,369,140,000 | 22.490566 | 87 | 0.533333 | false |
cGVuaXM/botcnt | PYodbcutils.py | 1 | 2151 | #https://github.com/mkleehammer/pyodbc/wiki/
import os
import re
import logging
import pyodbc
from openpyxl import Workbook
from openpyxl.styles import Font
class SQLserver:
def __init__(self, params, autocommit=False, searchescape=None, timeout=None):
params_str = r'DRIVER={ODBC Driver 11 for SQL Server};'
para... | mit | 3,703,125,957,708,237,000 | 25.231707 | 146 | 0.67457 | false |
fp7-netide/Tools | debugger/Core/debugger.py | 1 | 7289 | #!/usr/bin/env python
import zmq
import sys
import time
import binascii
import argparse
import csv
#from scapy.utils import wrpcap
sys.path.insert(0,'../../../Engine/libraries/netip/python/')
sys.path.insert(0,'../../../ryu/ryu/')
from netip import *
from ofproto import ofproto_parser
from ofproto import ofproto_comm... | epl-1.0 | 3,506,970,821,033,415,000 | 39.5 | 236 | 0.594732 | false |
edwatt/REU2014 | usrp_info_and_test.py | 1 | 2853 | #!/usr/bin/env python
"""
Retrieve operating parameters of connected USRP and loop through the operating spectrum trasmitting a constant wave signal
"""
from gnuradio import gr
from gnuradio import analog
from gnuradio import uhd
from time import sleep
MAX_RATE = 1000e6
class build_block(gr.top_block):
def __init__... | gpl-3.0 | 8,491,993,155,991,852,000 | 23.177966 | 122 | 0.654399 | false |
paxos1977/QuickFixLogFixup | QuickFixLogViewer.py | 1 | 52083 | import sublime, sublime_plugin
import re
def multiple_replace(dict, text):
pattern = re.compile("^(%s)\=" % "|".join(map(re.escape, dict.keys())))
lines = text.split("\x01")
newLines = []
for line in lines:
new_line = pattern.sub(lambda match: dict[match.string[match.start():match.end()-1]] + "=", line)
new... | bsd-3-clause | 1,577,408,565,323,987,200 | 29.983343 | 99 | 0.624138 | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/databases/access.py | 1 | 15034 | # access.py
# Copyright (C) 2007 Paul Johnston, paj@pajhome.org.uk
# Portions derived from jet2sql.py by Matt Keranen, mksql@yahoo.com
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import random
from sqlalchemy import sql, schema, type... | bsd-3-clause | 4,976,746,506,832,466,000 | 35.052758 | 115 | 0.581016 | false |
a-rank/cassandra-tools | cassandra_tools/ui.py | 1 | 3032 | # Copyright 2016 Allan Rank
#
# 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, s... | apache-2.0 | -2,171,579,964,705,164,800 | 32.318681 | 92 | 0.652045 | false |
Grumpy-Mike/Mikes-Pi-Bakery | CurveBall/curvedBall.py | 1 | 3415 | # Curved Ball - a game for the Pi Glow board
# By Mike Cook - March 2015
import time, random, sys
from smbus import SMBus
import wiringpi2 as io
# command register addresses for the SN3218 IC used in PiGlow
CMD_ENABLE_OUTPUT = 0x00
CMD_ENABLE_LEDS = 0x13
CMD_SET_PWM_VALUES = 0x01
CMD_UPDATE = 0x16
SN3218 = 0x54 # i2c ... | gpl-2.0 | 4,215,678,575,726,886,400 | 30.330275 | 74 | 0.622255 | false |
gamajr/EZNCoder | engine/generator.py | 1 | 3020 | # -*- coding: utf-8 -*-
import string
from infoparser import MInfo
class MEGenerator():
"""Classe que gera linhas de comando para o MEncoder."""
def __init__(self):
self._cut_cmd = string.Template("")
self.info = MInfo()
self._supported_ops = ['sub','wmv2avi','avixvid']
de... | gpl-3.0 | 5,803,673,885,986,638,000 | 38.75 | 114 | 0.568543 | false |
indico/indico | indico/modules/events/sessions/operations.py | 1 | 6547 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from flask import session
from indico.core import signals
from indico.core.db import db
from indico.modul... | mit | 4,079,880,723,672,840,700 | 45.764286 | 119 | 0.691462 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.