repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stampedeboss/lights | lights/controller/addController.py | 1 | 1523 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
'''
import wx
import logging
from lights import Session, Model, Controller, Connector
from lights.GUI.lights import addController as AC
__pgmname__ = 'addController'
__author__ = "AJ Reynolds"
__email__ = "stampedeboss@gmail.com"
__maintainer__ = __author__
__copyrig... | cc0-1.0 | -323,147,943,673,663,940 | 21.731343 | 61 | 0.636901 | false | 3.070565 | false | false | false |
aidankmcl/AdventureTimeClassifier | Ooo.py | 1 | 3872 | import os
import math
import numpy as np
from collections import Counter
def index_character(text, character):
"This is for getting all indices rather than just the first encounter"
return [i for i, letter in enumerate(text) if letter == character]
def count_lines(fname):
counter = 0
with o... | mit | 875,082,674,837,486,000 | 29.488189 | 115 | 0.596591 | false | 3.915066 | false | false | false |
ZachAnders/CraftingCalc | CalcSchema.py | 1 | 3669 | #!/usr/bin/python
from sqlalchemy import Column, Integer, String, ForeignKey, Text
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base
from DbSession import DbSession, extract_field
import math
Base = declarative_base()
class Wright(Base):
__tablename__ = "Wright"
Id = C... | bsd-2-clause | -4,886,572,302,026,455,000 | 31.469027 | 71 | 0.681385 | false | 2.822308 | false | false | false |
Xaltotun/conan | conans/util/files.py | 1 | 6210 | import os
import shutil
from errno import ENOENT, EEXIST
import hashlib
import sys
from os.path import abspath, realpath, join as joinpath
import platform
import re
import six
from conans.util.log import logger
import tarfile
def decode_text(text):
decoders = ["utf-8", "Windows-1252"]
for decoder in decoders:... | mit | 2,042,703,500,103,293,200 | 25.883117 | 87 | 0.604992 | false | 3.838072 | false | false | false |
openstack/magnum | magnum/db/sqlalchemy/alembic/versions/7da8489d6a68_separated_ca_cert_for_etcd_and_front_.py | 2 | 1365 | # Copyright 2020 Catalyst IT LTD. 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 applicable l... | apache-2.0 | 8,580,072,043,995,934,000 | 31.5 | 75 | 0.704762 | false | 3.362069 | false | false | false |
manhhomienbienthuy/pythondotorg | work_groups/migrations/0001_initial.py | 3 | 5100 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import markupfield.fields
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODE... | apache-2.0 | -7,234,927,828,191,832,000 | 88.473684 | 244 | 0.642941 | false | 4.340426 | false | false | false |
viapek/tweet_analysis_project | objserv.py | 1 | 4021 | import config
import oauth2 as oauth
import urllib2 as urllib
import json
import traceback
import threading
from pymongo import MongoClient
from time import gmtime, strftime
import time
import subjserver
class jTweetCollector(object):
def __init__(self):
print "Got a class: {0}".format(self)
def reconn... | mit | -8,697,073,926,676,208,000 | 29.014925 | 103 | 0.623228 | false | 3.922927 | true | false | false |
Scille/parsec-cloud | parsec/core/types/manifest.py | 1 | 31740 | # Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS
import attr
import functools
from typing import Optional, Tuple, TypeVar, Type, Union, NoReturn, FrozenSet, Pattern, Dict
from pendulum import DateTime, now as pendulum_now
from parsec.types import UUID4, FrozenDict
from parsec.crypto imp... | agpl-3.0 | 4,004,070,309,036,466,700 | 34.033113 | 101 | 0.629931 | false | 4.200079 | false | false | false |
desihub/desispec | py/desispec/qa/utils.py | 1 | 2398 | """ Module for QA support
"""
from __future__ import print_function, absolute_import, division
import numpy as np
def get_skyres(cframes, sub_sky=False, flatten=True):
"""
Args:
cframes: str or list
Single cframe or a list of them
sub_sky: bool, optional
Subtract the sky? ... | bsd-3-clause | -1,876,656,369,762,072,800 | 31.405405 | 76 | 0.598832 | false | 3.460317 | false | false | false |
xlqian/navitia | source/tyr/migrations/env.py | 3 | 3771 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 | -8,414,992,088,723,886,000 | 30.957627 | 108 | 0.723681 | false | 3.844037 | true | false | false |
TsarN/pysistem | pysistem/contests/model.py | 1 | 6767 | # -*- coding: utf-8 -*-
"""Contest models"""
from datetime import datetime
from flask import g
from pysistem import db
from pysistem.submissions.const import STATUS_DONE
class ContestProblemAssociation(db.Model):
"""Helper class to associate contests and problems between each other
In normal circumstances,... | mit | -729,673,967,304,641,500 | 37.448864 | 97 | 0.571006 | false | 4.018409 | true | false | false |
adam-sownie/LiquidISK | ProjectFiles/apiManagement.py | 1 | 1303 | import sys
apiFile = 'keys.api'
def ListKeys():
i = 0
with open(apiFile) as apiKeys:
for key in apiKeys:
i += 1
print(i)
print key
return True
def FormatKey(key):
key = key.strip('\n')
apiKey = key.split(",")
return apiKey
def ImportISK():
i = 0
with open(apiFile) as apiKeys... | mit | -5,577,658,837,267,488,000 | 17.097222 | 53 | 0.623945 | false | 3.298734 | false | false | false |
william-richard/moto | moto/packages/boto/ec2/blockdevicemapping.py | 2 | 2806 | # Copyright (c) 2009-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 wit... | apache-2.0 | -6,866,095,668,892,366,000 | 32.807229 | 77 | 0.672844 | false | 4.163205 | false | false | false |
pyQode/pyqode.core | examples/widgets/splittable_tab_widget.py | 2 | 1219 | import os
import sys
from pyqode.qt import QtWidgets
from pyqode.core.widgets import GenericCodeEdit, InteractiveConsole
from pyqode.core.backend import server
from pyqode.core.widgets import SplittableTabWidget
class MyInteractiveConsole(InteractiveConsole):
def __init__(self, parent=None):
super(MyInter... | mit | -4,563,723,833,302,442,500 | 28.731707 | 67 | 0.680066 | false | 3.59587 | false | false | false |
mysz/subst | test/test_parse_args_get_backup_file_ext.py | 2 | 1286 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import re
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import pytest
from .test_manager import *
import subst
class MockArgParse(object):
def __init__(self):
... | mit | -6,073,618,081,669,617,000 | 17.371429 | 57 | 0.629082 | false | 3.375328 | true | false | false |
shantanu69/pygame-physics | PyParticleSystem/PyParticles/environment.py | 1 | 2630 | import random
import math
from PyParticles import pyparticles
from PyParticles import utils
class Environment(object):
def __init__(self, dim):
self.width = dim[0]
self.height = dim[1]
self.particles = []
self.color = (55, 56, 45)
self.mass_of_air = 0.2
self.ELASTICITY = 0.95
return
def add_particle... | mit | 4,141,510,645,736,960,500 | 28.561798 | 105 | 0.657414 | false | 2.691914 | false | false | false |
vighneshbirodkar/lazyboost | examples/plot_adaboost.py | 1 | 2618 | from lazyboost import AdaBoost, AdaBoostCV
from sklearn import datasets
from matplotlib import pyplot as plt
import numpy as np
from sklearn.model_selection import GridSearchCV
import os
import csv
from skimage import io
import random
datatype = 'digits'
if datatype == 'breastcancer':
data = datasets.load_breast_... | bsd-3-clause | 7,209,691,038,947,788,000 | 24.173077 | 70 | 0.616119 | false | 2.818084 | false | false | false |
inconvergent/fn | fn/fn.py | 1 | 2641 | from glob import glob
from os import getpid
from .files import deduplicate_files
from .files import get_file_name_tokenizer
from .files import rel_abs_path
from .files import remove_extension
from .git import _init_git_sha_cmd
from .utils import get_time
from .utils import getsha
from .utils import overlay
from .utils... | mit | -4,947,208,190,486,533,000 | 25.94898 | 77 | 0.61454 | false | 3.232558 | false | false | false |
aio-libs/aiohttp_security | tests/test_dict_autz.py | 1 | 11608 | import enum
import pytest
from aiohttp import web
from aiohttp_security import setup as _setup
from aiohttp_security import (AbstractAuthorizationPolicy, authorized_userid,
forget, has_permission, is_anonymous,
login_required, permits, remember,
... | apache-2.0 | -969,932,582,108,582,100 | 32.356322 | 77 | 0.632064 | false | 4.205797 | true | false | false |
sniperyen/whenwillyoucallme | xadmin/plugins/xversion.py | 3 | 24175 | from crispy_forms.utils import TEMPLATE_PACK
from django.contrib.contenttypes.fields import GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.db import models
from django.db.models.query import QuerySet
from django.forms.models imp... | apache-2.0 | -5,262,699,743,608,521,000 | 38.566285 | 179 | 0.612534 | false | 3.950809 | false | false | false |
by46/tunicorn | tunicorn/app.py | 1 | 2978 | import logging
import os
import sys
from argparse import ArgumentParser
from tunicorn.arbiter import Arbiter
from tunicorn.config import Config
from tunicorn.workers import choose_worker
from .util import daemonize
from .util import import_app
from .util import parse_address
DEFAULT_CONFIG = {
'NAME'... | mit | -3,491,548,767,981,647,000 | 26.634615 | 93 | 0.587979 | false | 3.808184 | true | false | false |
JustinLardinois/pcrpdev | pcrp/models.py | 1 | 3422 | # -*- coding: utf-8 -*-
# Copyright 2014–2015 Justin Lardinois
#
# 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 applicab... | apache-2.0 | -8,186,923,267,261,614,000 | 31.264151 | 79 | 0.725439 | false | 3.547718 | false | false | false |
mmottahedi/neuralnilm_prototype | scripts/disag_545b.py | 2 | 8626 | from __future__ import print_function, division
#import matplotlib
import logging
from sys import stdout
# matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
import matplotlib.pyplot as plt
from neuralnilm import (Net, RealApplianceSource)
from neuralnilm.source import (standardise, discretize... | mit | -7,901,665,671,395,647,000 | 28.951389 | 139 | 0.635173 | false | 3.355115 | false | false | false |
gperciva/artifastring | research/impulses/prepare-impulse-graphs.py | 1 | 1428 | #!/usr/bin/env python
import sys
import os.path
import scipy.io.wavfile
import scipy.fftpack
import scipy.signal
import numpy
import pylab
try:
orig_filename = sys.argv[1]
except:
print "Need wave filename to analyze"
exit(1)
def get_samples_ts_fft(wav_filename):
sample_rate, data_unnormalized = sc... | gpl-3.0 | 3,996,156,483,317,256,000 | 22.032258 | 78 | 0.653361 | false | 2.794521 | false | false | false |
kralf/morsel | python/lib/morsel/core/event_manager.py | 1 | 2068 | from event_handler import EventHandler
from panda3d.direct.showbase.DirectObject import DirectObject
#-------------------------------------------------------------------------------
class EventManager(DirectObject):
def __init__(self, **kargs):
DirectObject.__init__(self)
self.handlers = {}
#--------... | gpl-2.0 | -5,307,098,633,387,412,000 | 32.354839 | 80 | 0.510638 | false | 4.947368 | false | false | false |
sidbhatt11/gnunify-site | GNUnify/models/db_wizard.py | 1 | 4164 | ### we prepend t_ to tablenames and f_ to fieldnames for disambiguity
########################################
db.define_table('t_room',
Field('f_name', type='integer', notnull=True, unique=True,
label=T('Room No')),
Field('f_is_a_lab', type='boolean',
label=T('Is A Lab ?')),
Field('f_... | gpl-2.0 | 7,412,577,748,917,333,000 | 42.831579 | 134 | 0.585014 | false | 3.154545 | false | false | false |
IntelLabsEurope/infrastructure-repository | monitoring_service/epa_database/openstack/glance_db.py | 1 | 3226 | # Copyright 2015 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | -6,532,929,653,025,180,000 | 38.341463 | 95 | 0.543397 | false | 3.997522 | false | false | false |
lagopus/lagopus | test/integration_test/tools/lib/ofp/ofp_meter_stats_reply.py | 1 | 1556 | import os
import sys
import copy
import logging
from checker import *
from .ofp import register_ofp_creators
from .ofp import OfpBase
from .ofp_meter_stats import SCE_METER_STATS
from .ofp_meter_stats import OfpMeterStatsCreator
# YAML:
# meter_stats_reply:
# flags: 0
# body:
# - meter_stats:
# meter_i... | apache-2.0 | 1,630,404,541,859,456,300 | 26.785714 | 79 | 0.564267 | false | 3.473214 | false | false | false |
PyQwt/PyQwt5 | qt4examples/SpectrogramDemo.py | 1 | 4903 | #!/usr/bin/env python
# The Python version of Qwt-5.0.0/examples/spectrogram
import sys
from PyQt4 import Qt
import PyQt4.Qwt5 as Qwt
class SpectrogramData(Qwt.QwtRasterData):
def __init__(self):
Qwt.QwtRasterData.__init__(self, Qt.QRectF(-1.5, -1.5, 3.0, 3.0))
# __init__()
def copy(self):
... | gpl-2.0 | 4,068,505,737,613,079,600 | 25.646739 | 79 | 0.602488 | false | 3.223537 | false | false | false |
gramps-project/addons-source | GenealogyTree/gt_ancestor.py | 1 | 6685 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2017-2018 Nick Hall
#
# 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) a... | gpl-2.0 | -7,804,838,739,857,481,000 | 37.41954 | 79 | 0.516081 | false | 4.392247 | false | false | false |
gfavre/beyondthehost | beyondthehost/domains/tasks.py | 1 | 1357 | """
Celery tasks
"""
from celery import task
from celery.utils.log import get_task_logger
from webfaction.utils import WebFactionClient
logger = get_task_logger(__name__)
@task()
def create_domain(domain_name):
"""
Creates a domain using WebFaction API
"""
from .models import Domain
try:
... | mit | 5,359,001,558,970,559,000 | 22.396552 | 96 | 0.649963 | false | 3.888252 | false | false | false |
ebigelow/LOTlib | LOTlib/Examples/NAND/Run.py | 1 | 1031 | """
Run inference on each target concept and save the output
"""
import pickle
from LOTlib import break_ctrlc
from LOTlib.FiniteBestSet import FiniteBestSet
from LOTlib.Inference.Samplers.MetropolisHastings import MHSampler
from Model import *
from TargetConcepts import TargetConcepts
NDATA = 20 # How many data poin... | gpl-3.0 | 8,649,331,753,510,670,000 | 27.638889 | 75 | 0.699321 | false | 3.380328 | false | false | false |
aasensio/pyiacsun | pyiacsun/sparse/proxes/prox_l2General.py | 1 | 1802 | from __future__ import print_function
import numpy as np
from . import prox_l1
from . import prox_l0
def prox_l2General(x, A, At, lambdaPar, y = None, mu=1.0, verbose=False, threshold='soft', rtol=1e-5, maxIteration=500):
"""
Proximal projection on the condition |W^* T|_2
It solves the problem by returning
sol... | mit | -3,657,965,179,154,691,600 | 25.910448 | 120 | 0.581576 | false | 2.63836 | false | false | false |
elevien/crn-mc | crn_mc/simulation/montecarlo.py | 3 | 4515 | from ..mesh import *
from ..model import *
from .paths import *
from .timer import *
import sys
import numpy as np
from scipy.integrate import ode
import copy
import json
def identity(arg):
return arg
def montecarlo(model,initial_data,T,delta,ode_method='lsoda',sample_rate =0.,estimator='crude',
path_typ... | mit | 6,226,648,647,368,773,000 | 40.805556 | 103 | 0.640975 | false | 3.179577 | false | false | false |
unreal666/outwiker | src/outwiker/core/htmlimprover.py | 2 | 4324 | # -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
import re
from io import StringIO
class HtmlImprover(object, metaclass=ABCMeta):
"""
Class make HTML code more readable and append line breaks.
"""
def __init__(self):
specialTags = [u'pre', u'script']
flags = re.I | re... | gpl-3.0 | 8,334,712,714,784,408,000 | 31.02963 | 101 | 0.523127 | false | 3.783027 | false | false | false |
Lujeni/ansible | lib/ansible/module_utils/facts/timeout.py | 62 | 2452 | # This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distributed in the hope that ... | gpl-3.0 | -2,340,068,931,639,621,600 | 35.058824 | 89 | 0.693312 | false | 4.482633 | false | false | false |
luotao1/Paddle | python/paddle/fluid/tests/unittests/test_tensor_register_hook.py | 1 | 17536 | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | -1,155,819,005,234,369,800 | 33.793651 | 92 | 0.515625 | false | 3.889973 | true | false | false |
ecreall/lagendacommun | lac/views/organization_management/edit_organizations.py | 1 | 1609 | # Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from pyramid.view import view_config
from dace.processinstance.core import DEFAULTMAPPING_ACTIONS_VIEWS
from pontus.form import FormView
from pontus.schema import sel... | agpl-3.0 | -1,534,215,964,664,558,300 | 31.836735 | 71 | 0.598508 | false | 4.325269 | false | false | false |
lavalamp-/ws-backend-community | rest/views/orders.py | 1 | 3661 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import django_filters
from rest_framework.decorators import api_view
from django.shortcuts import get_object_or_404
from rest_framework.exceptions import PermissionDenied, NotFound
from rest_framework.response import Response
from .base import WsListAPIVi... | gpl-3.0 | -3,805,459,389,931,641,300 | 29.508333 | 113 | 0.701721 | false | 4.081382 | false | false | false |
acockburn/appdaemon | conf/example_apps/switch_reset.py | 2 | 2584 | import hassapi as hass
import shelve
import globals
#
# App to reset input_boolean, input_select, input_number, device_tracker to previous values after HA restart
#
# Args:
#
# delay - amount of time after restart to set the switches
#
#
# Release Notes
#
# Version 1.0:
# Initial Version
class SwitchReset(hass.Has... | mit | -8,129,302,269,193,450,000 | 38.151515 | 119 | 0.595588 | false | 3.850969 | false | false | false |
jfsantos/ift6266h14 | notebooks/audiodisplay.py | 1 | 3329 | # This file was written by Brian E. Granger
# (https://github.com/ellisonbg/talk-sicm2-2013) and is licensed under
# the MIT License.
import os
import struct
from io import BytesIO
import base64
import sys
from IPython.utils.py3compat import string_types
from IPython.core.display import DisplayObject
class Audio(Dis... | mit | -6,658,240,353,214,536,000 | 31.009615 | 103 | 0.567137 | false | 4.049878 | false | false | false |
nwjs/chromium.src | build/config/ios/codesign.py | 2 | 18162 | # Copyright 2016 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.
import argparse
import codecs
import datetime
import fnmatch
import glob
import os
import plistlib
import shutil
import subprocess
import sys
import tempfile... | bsd-3-clause | -3,546,915,775,453,125,000 | 32.947664 | 128 | 0.691058 | false | 4.1165 | false | false | false |
dilawar/moose-full | moose-examples/snippets/funcRateHarmonicOsc.py | 2 | 3873 | #########################################################################
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2013 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU Lesser General Public License version 2... | gpl-2.0 | 6,976,957,347,766,049,000 | 32.387931 | 79 | 0.591531 | false | 3.232888 | false | false | false |
benfinke/ns_python | nssrc/com/citrix/netscaler/nitro/resource/config/gslb/gslbservice.py | 3 | 38311 | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | apache-2.0 | 8,686,365,851,707,277,000 | 31.716482 | 456 | 0.706951 | false | 3.409059 | false | false | false |
luwei14/ShapeAnalyzer | shapeanalyzer/utilities.py | 1 | 6340 | import math
from shapes import *
from vectmat import *
class GeometryUtility():
def ccw(self, p1, p2, p3):
return (p2.x - p1.x)*(p3.y - p1.y) - (p2.y - p1.y)*(p3.x - p1.x)
def area2(self, p1, p2, p3):
return math.fabs(self.ccw(p1, p2, p3))
def graham_scan(self,points):
num = len(p... | mit | -2,019,124,681,686,326,300 | 31.849741 | 121 | 0.430757 | false | 3.35983 | false | false | false |
matkuki/ExCo | gui/contextmenu.py | 1 | 16338 |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2013-2021 Matic Kukovec.
Released under the GNU GPL3 license.
For more information check the 'LICENSE.txt' file.
For complete license information of the dependencies, check the 'additional_licenses' directory.
"""
import os
import sip
import os.path
import collections
impo... | gpl-3.0 | -132,187,719,768,863,710 | 35.550336 | 110 | 0.536173 | false | 4.233739 | false | false | false |
OLAPLINE/TM1py | TM1py/Utils/Utils.py | 1 | 24149 | import collections
import json
import re
import sys
import warnings
import pandas as pd
if sys.version[0] == '2':
import httplib as http_client
else:
import http.client as http_client
REGEX_OBJECT_NAMES = re.compile(r"(?<!\()(?<!eq )'(?!\)|\Z)")
def get_all_servers_from_adminhost(adminhost='localhost'):
... | mit | -2,099,010,401,771,521,800 | 37.331746 | 132 | 0.620026 | false | 3.807189 | false | false | false |
maccergit/python-talk | prob028/prob28-1.py | 1 | 1830 | # coding: utf-8
'''
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
It can be verified that the sum of the numbers on the diagonals is 101.
What is the sum of the numbers on t... | mit | 3,477,735,462,341,742,000 | 26.742424 | 150 | 0.589071 | false | 3.155172 | false | false | false |
bremond/siconos | docs/gendoctools/generate_api.py | 2 | 3846 | """Main driver to generate rst api/files for sphinx
in order to generate Siconos documentation.
Siconos is a program dedicated to modeling, simulation and control
of non smooth dynamical systems.
Copyright 2020 INRIA.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file excep... | apache-2.0 | 1,018,848,619,539,532,300 | 35.980769 | 79 | 0.662767 | false | 3.842158 | false | false | false |
zhenzhai/edx-platform | lms/djangoapps/course_api/blocks/transformers/student_view.py | 35 | 3332 | """
Student View Transformer
"""
from openedx.core.lib.block_structure.transformer import BlockStructureTransformer
class StudentViewTransformer(BlockStructureTransformer):
"""
Only show information that is appropriate for a learner
"""
VERSION = 1
STUDENT_VIEW_DATA = 'student_view_data'
STUDE... | agpl-3.0 | -4,164,497,722,546,354,000 | 42.842105 | 111 | 0.618547 | false | 4.521031 | false | false | false |
skonto/spark | python/pyspark/tests/test_worker.py | 5 | 7057 | # -*- encoding: 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 | 996,588,395,488,727,600 | 32.57619 | 88 | 0.612537 | false | 3.928134 | true | false | false |
ciudadanointeligente/popit-django | popit/models.py | 2 | 5452 | import slumber
from django.db import models
from django.core.exceptions import ValidationError
from .fields import ApiInstanceURLField, PopItURLField
class ApiInstance(models.Model):
"""A specific PopIt API instance"""
url = ApiInstanceURLField(
unique = True,
help_text = "The full URL to ... | agpl-3.0 | 3,127,488,526,446,964,700 | 30.883041 | 111 | 0.618672 | false | 4.086957 | false | false | false |
josemfc/directorio-iep | directorio/migrations/0033_usuario_pertenece_organizacion.py | 1 | 1283 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-10-25 10:27
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependen... | apache-2.0 | -7,269,767,954,204,384,000 | 31.897436 | 122 | 0.610288 | false | 3.996885 | false | false | false |
dedayoa/django-country-dialcode | setup.py | 2 | 2018 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import country_dialcode
import os
import re
def read(*parts):
return open(os.path.join(os.path.dirname(__file__), *parts)).read()
def parse_requirements(file_name):
requirements = []
for line in open(file_name, 'r... | mit | -2,492,625,513,591,482,000 | 29.575758 | 77 | 0.600099 | false | 3.71639 | false | false | false |
MachineLearningStudyGroup/Smart_Review_Summarization | external/amazon_scraper/reviews.py | 1 | 6411 | from __future__ import absolute_import
import re
try:
import urlparse
except:
import urllib.parse as urlparse
import warnings
from bs4 import BeautifulSoup
from external.amazon_scraper import (
get,
review_url,
reviews_url,
extract_review_id,
extract_reviews_asin,
extract_reviewer_id,
... | mit | 6,502,677,071,796,274,000 | 27.118421 | 140 | 0.551708 | false | 3.852764 | false | false | false |
topa51/eis | api/migrations/0003_auto_20160331_1313.py | 1 | 1088 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('api', '0002_ship_unixtimestamp'),
]
operations = [
migrations.CreateModel(
name='Ja... | mit | -3,741,290,810,066,854,000 | 33 | 114 | 0.576287 | false | 4.459016 | false | false | false |
pacoqueen/bbinn | formularios/listado_rollos.py | 1 | 30501 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, #
# Diego Muñoz Escalante. #
# (pacoqueen@users.sourceforge.ne... | gpl-2.0 | -603,852,230,121,804,700 | 46.41433 | 187 | 0.495828 | false | 3.559818 | false | false | false |
stfc/apel | test/test_mysql.py | 1 | 11584 | import datetime
import os
import subprocess
import unittest
import apel.db.apeldb
import apel.db.records
if os.name == 'nt':
os.environ['PATH'] += ';C:/Program Files/MySQL/MySQL Server 5.1/bin/'
class MysqlTest(unittest.TestCase):
# These test cases require a local MySQL db server with no password on root
... | apache-2.0 | 4,321,022,863,429,679,600 | 35.427673 | 93 | 0.620511 | false | 3.840849 | true | false | false |
davidsminor/gaffer | python/GafferUITest/PathListingWidgetTest.py | 1 | 5918 | ##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided t... | bsd-3-clause | -2,535,960,980,869,998,000 | 29.822917 | 96 | 0.644981 | false | 3.309843 | true | false | false |
HarryRybacki/SensorDataResearchReproduction | helpers.py | 1 | 12781 | import math
import numpy
import random
"""Helper classes."""
"""Begin data input functions"""
def read_ibrl_data(data_file):
"""Reads IBRL data from file and returns dict mapping
temp./humidity sensor data to the node that collected them
:param data_file: string representing path to ibrl dataset
:ret... | apache-2.0 | -1,864,152,441,473,416,200 | 38.329231 | 137 | 0.673343 | false | 3.920552 | false | false | false |
izrik/wodehouse | functions/exception.py | 1 | 2785 | from functions.types import get_type
from wtypes.callstack import WStackFrame
from wtypes.control import WRaisedException
from wtypes.exception import WException
from wtypes.object import WObject
from wtypes.string import WString
def exception(message=None):
if message is None:
message = 'Exception'
r... | gpl-2.0 | -5,455,347,623,125,460,000 | 32.154762 | 74 | 0.593178 | false | 4.245427 | false | false | false |
EliHar/Pattern_recognition | web_server/app.py | 1 | 1069 | import subprocess
import flask
from subprocess import check_output
from flask import Flask, render_template, Response, request
import re
app = Flask(__name__)
def get_data():
try:
p = check_output(["~/openface/demos/classifier_mod.py infer '/root/openface/generated-embeddings/classifier_RadialSvm.pkl' '/root/ope... | mit | 6,948,225,090,562,764,000 | 30.441176 | 168 | 0.656688 | false | 3.21988 | false | false | false |
openhomity/homity-hub | Hub/v1/Garage/Garage_RestDuino_Driver.py | 1 | 3217 | """Garage RESTDuino driver class."""
import json, urllib2
from Hub.v1.Common.helpers import bool_or_string
from Hub.v1.Garage.Garage_Driver import GarageDriver
def _parse_driver_info(garage):
"""Grab address field out of driver_info."""
garage_driver_info = garage.driver_info
driver_info = {}
driver_i... | apache-2.0 | -1,197,098,046,942,255,600 | 29.638095 | 69 | 0.576624 | false | 3.57842 | false | false | false |
ajbouh/tfi | setup.py | 1 | 3531 | import codecs
import os
import re
from setuptools import setup, find_packages
# Make any resulting zip files reproducible.
os.environ["SOURCE_DATE_EPOCH"] = '315532800'
###################################################################
NAME = "tfi"
PACKAGES = find_packages(where="src")
META_PATH = os.path.join("sr... | mit | -8,510,625,612,357,471,000 | 24.042553 | 91 | 0.535259 | false | 3.559476 | false | false | false |
moshthepitt/answers | questions/admin.py | 1 | 2544 | from django.contrib import admin
from polymorphic.admin import PolymorphicParentModelAdmin # , PolymorphicChildModelAdmin
from sorl.thumbnail.admin import AdminImageMixin
from questions.models import Quiz, Question, MultipleChoiceQuestion, MultipleChoiceOption
from questions.models import RatingQuestion, TextQuestio... | mit | -8,273,669,039,607,672,000 | 29.285714 | 89 | 0.764937 | false | 3.950311 | false | false | false |
andrewcbennett/iris | lib/iris/tests/unit/fileformats/netcdf/test__load_cube.py | 9 | 9450 | # (C) British Crown Copyright 2014 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 3 of the License, or
# (at your option) any l... | gpl-3.0 | 4,564,527,563,984,315,000 | 40.447368 | 78 | 0.592593 | false | 3.726341 | true | false | false |
LPM-HMS/COSMOS2 | cosmos/models/Task.py | 2 | 16376 | import codecs
import datetime
import os
import pprint
import re
import subprocess as sp
import networkx as nx
from flask import url_for
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.ext.declarative.base import _declarative_constructor
from sqlalchemy.orm import reconstructor, relationship, syn... | gpl-3.0 | -3,378,705,395,303,833,600 | 31.752 | 114 | 0.57511 | false | 3.731996 | false | false | false |
sbranson/online_crowdsourcing | experiments/stress_test_local_webserver_bbox.py | 1 | 1199 | import threading
import sys
import os
import time
sys.path.append(os.path.join(os.path.dirname(__file__),"../"))
from crowdsourcing.annotation_types.bbox import *
from crowdsourcing.interfaces.local_webserver import *
DATASET_DIR = "data/bbox/pedestrians"
ASSIGNMENT_DATA = os.path.join(DATASET_DIR, "pedestrians.json")... | mit | -5,021,339,049,852,141,000 | 36.46875 | 200 | 0.76814 | false | 2.8753 | false | false | false |
pyocd/pyOCD | pyocd/target/builtin/target_HC32F160.py | 2 | 8694 | # pyOCD debugger
# Copyright (c) 2021 Huada Semiconductor Corporation
# SPDX-License-Identifier: Apache-2.0
#
# 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/licen... | apache-2.0 | 5,788,659,810,214,431,000 | 47.842697 | 99 | 0.722107 | false | 2.208841 | false | false | false |
terbolous/SickRage | lib/tornado/tcpclient.py | 16 | 8542 | #!/usr/bin/env python
#
# Copyright 2014 Facebook
#
# 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 a... | gpl-3.0 | -4,182,146,336,937,224,000 | 37.477477 | 79 | 0.603723 | false | 4.277416 | false | false | false |
rickydjohn/trackbook | TrackBook/TrackBook/sharesettings.py | 1 | 5551 | #!/usr/bin/python
from login import connector
def checkuser(usernames):
confuser = []
conn, curs = connector()
for i in usernames.split(","):
user = i.encode('ascii', 'ignore').rstrip().lstrip()
quer = "select username from users where username='"+str(user)+"'"
curs.execute(quer)
if curs.rowcount > 0:
c... | agpl-3.0 | 3,037,951,993,144,729,000 | 31.846154 | 237 | 0.673032 | false | 2.933932 | false | false | false |
mmagnus/rna-pdb-tools | rna_tools/tools/pymol_preview_generator/pymol_preview_generator.py | 2 | 1977 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ScenePNG: wrote 2052x1350 pixel image to file "out.png".
(base) [mx] structures-sessions$ pymol -c /Users/magnus/work/cwc15/structures-sessions/cwc15_conserv.pse -d 'ray; png out.png; quit'
"""
import sys
import argparse
import tempfile
import os
import subprocess
im... | gpl-3.0 | 1,588,905,126,882,236,400 | 34.303571 | 176 | 0.566515 | false | 3.486772 | false | false | false |
crmccreary/openerp_server | openerp/addons/base/ir/ir_cron.py | 2 | 14737 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 6,009,863,993,642,042,000 | 46.083067 | 146 | 0.58879 | false | 4.266647 | false | false | false |
OutOfOrder/sshproxy | lib/spexpect/spexpect.py | 1 | 6793 | #!/usr/bin/env python
# -*- coding: ISO-8859-15 -*-
#
# Copyright (C) 2005-2007 David Guerizec <david@guerizec.net>
#
# Last modified: 2006 Jun 15, 14:09:29 by david
#
# 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... | gpl-2.0 | 7,573,802,061,771,035,000 | 35.918478 | 94 | 0.562196 | false | 4.1446 | false | false | false |
xrg/openerp-server | bin/sql_db.py | 1 | 24101 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: yo... | agpl-3.0 | 3,810,811,366,337,858,000 | 36.540498 | 120 | 0.549853 | false | 3.823128 | false | false | false |
jeromecc/doctoctocbot | src/tagging/migrations/0001_initial.py | 1 | 2600 | # Generated by Django 2.2.4 on 2019-10-25 21:17
import community.models
from django.db import migrations, models
import django.db.models.deletion
import moderation.models
import versions.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('moderation', '0036_auto_20191010... | mpl-2.0 | 7,916,258,144,075,809,000 | 47.148148 | 201 | 0.612308 | false | 4.333333 | false | false | false |
sagarsane/abetterportfolio | app/utilities/githubarchive.py | 1 | 49953 | '''
Created on Oct 1, 2012
@author: Sagar
'''
import httplib2
import json
from apiclient.discovery import build
from oauth2client.appengine import AppAssertionCredentials
from mainhandler import Handler
from ..utilities.github_archive_bigquery_handler import execute_bigquery_githubarchive, execute_bigquery_toprepos,... | apache-2.0 | 5,349,463,445,679,683,000 | 43.601786 | 179 | 0.416812 | false | 3.069686 | false | false | false |
comprna/SUPPA | suppa.py | 1 | 3907 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 06 17:51:05 2014
@author: Gael P Alamancos
@email: gael.perez[at]upf.edu
"""
import fileMerger as joinFiles
import psiPerGene as psiPerIsoform
import psiCalculator as psiPerEvent
import eventGenerator as generateEvents
import eventClusterer as clusterAnalysis... | mit | -1,554,183,011,243,142,100 | 36.303922 | 119 | 0.694139 | false | 3.978615 | false | false | false |
PlayFab/UnicornBattle | UnicornBattle/Assets/Firebase/Editor/generate_xml_from_google_services_json.py | 1 | 13342 | #!/usr/bin/python
# Copyright 2016 Google Inc. All Rights Reserved.
"""Stand-alone implementation of the Gradle Firebase plugin.
Converts the services json file to xml:
https://googleplex-android.googlesource.com/platform/tools/base/+/studio-master-dev/build-system/google-services/src/main/groovy/com/google/gms/goog... | apache-2.0 | -1,610,580,211,118,948,000 | 32.862944 | 158 | 0.601109 | false | 3.829506 | false | false | false |
iAmMrinal0/HTPC-Manager | modules/sickbeard.py | 2 | 6746 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cherrypy
import htpc
from urllib import quote
from urllib2 import urlopen
from json import loads
import logging
from cherrypy.lib.auth2 import require
class Sickbeard:
def __init__(self):
self.logger = logging.getLogger('modules.sickbeard')
htp... | mit | -5,965,945,977,484,133,000 | 35.663043 | 145 | 0.592055 | false | 3.731195 | false | false | false |
rhyolight/nupic.son | tests/survey_utils.py | 1 | 4840 | # Copyright 2010 the Melange 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 wr... | apache-2.0 | -6,690,425,820,606,749,000 | 40.724138 | 78 | 0.66157 | false | 3.553598 | true | false | false |
cricketclubucd/davisdragons | platform-tools/systrace/catapult/telemetry/third_party/websocket-client/examples/echoapp_client.py | 9 | 1076 | import websocket
try:
import thread
except ImportError: # TODO use Threading instead of _thread in python3
import _thread as thread
import time
import sys
def on_message(ws, message):
print(message)
def on_error(ws, error):
print(error)
def on_close(ws):
print("### closed ###")
def on_open(... | mit | -8,538,955,415,570,532,000 | 21.416667 | 71 | 0.52974 | false | 3.736111 | false | false | false |
bggardner/simplisafe-rf | simplisafe/messages.py | 1 | 92371 | #!/usr/bin/python3
from simplisafe import *
import struct
class SerialNumberFormat:
ASCII_4B5C = "4-byte-encoded 5-alphanumeric-character serial number" # Algorithm can process ASCII chars 0-9A-Za-n; TODO: see if keypad will display a-n
HEX_5B6C = "5-byte-encoded 6-hexadecimal-character serial number"
@cl... | unlicense | 3,142,369,986,011,425,000 | 37.471887 | 273 | 0.661225 | false | 3.597282 | false | false | false |
e0ne/cinder | cinder/db/sqlalchemy/models.py | 1 | 18834 | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (... | apache-2.0 | -1,848,188,202,348,188,200 | 33.494505 | 78 | 0.621323 | false | 4.06343 | false | false | false |
ashaarunkumar/spark-tk | regression-tests/exampletests/graph_doc_test.py | 2 | 2635 | # vim: set encoding=utf-8
# Copyright (c) 2016 Intel Corporation
#
# 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 require... | apache-2.0 | 1,460,718,914,184,392,400 | 32.207792 | 77 | 0.604615 | false | 3.541551 | true | false | false |
Southpaw-TACTIC/TACTIC | src/tactic/ui/startup/content_creator_wdg.py | 1 | 13311 | ###########################################################
#
# Copyright (c) 2010, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 | 8,470,767,113,510,934,000 | 29.047404 | 151 | 0.545038 | false | 3.44666 | true | false | false |
jbazik/cmsplugin-video-youtube | example/demo/settings.py | 1 | 2666 | # Django settings for example project.
import os
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME':... | lgpl-3.0 | 6,824,086,556,238,383,000 | 25.137255 | 78 | 0.702551 | false | 3.3325 | false | false | false |
FredrikAugust/fan-control-rpi | fancontrol.py | 1 | 5639 | '''This is a script to automatically control the fans of my Raspberry Pi mini-PC build.
If you find this useful somehow, feel free to use the code.
Created by Fredrik August Madsen-Malmo 2015
'''
import re
from sys import exit
from time import sleep, strftime
import os
from time import strftime
try:
import RPi.GP... | mit | 6,655,296,769,124,253,000 | 30.327778 | 131 | 0.547969 | false | 4.208209 | false | false | false |
widdowquinn/pyani | pyani/dependencies.py | 1 | 3505 | # -*- coding: utf-8 -*-
# (c) University of Strathclyde 2020
# Author: Leighton Pritchard
#
# Contact:
# leighton.pritchard@strath.ac.uk
#
# Leighton Pritchard,
# Strathclyde Institute for Pharmacy and Biomedical Sciences,
# Cathedral Street,
# Glasgow,
# G1 1XQ
# Scotland,
# UK
#
# The MIT License
#
# Copyright (c) 20... | mit | 9,131,796,929,381,842,000 | 28.957265 | 84 | 0.692439 | false | 3.748663 | false | false | false |
mcr/ietfdb | ietf/idtracker/models.py | 1 | 49227 | # Copyright The IETF Trust 2007, All Rights Reserved
import os.path
import datetime
import re
import math
from django.conf import settings
from django.db import models
from ietf.utils import FKAsOneToOne
from ietf.utils.broken_foreign_key import BrokenForeignKey
from ietf.utils.cached_lookup_field import CachedLookup... | bsd-3-clause | -1,534,458,749,172,537,900 | 40.159699 | 163 | 0.664066 | false | 3.315396 | false | false | false |
dougalsutherland/pummeler | pummeler/sort.py | 1 | 11255 | from __future__ import division, print_function
from collections import Counter, defaultdict
import heapq
import os
from pathlib import Path
import zipfile
import numpy as np
import pandas as pd
from tqdm import tqdm
from .data import geocode_data
from .reader import read_chunks, VERSIONS, version_info_with_housing
... | mit | 8,901,550,608,614,222,000 | 34.617089 | 102 | 0.514882 | false | 3.816548 | false | false | false |
airbnb/superset | superset/jinja_context.py | 1 | 11637 | # 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 | -1,422,625,255,079,004,700 | 34.263636 | 88 | 0.640199 | false | 4.141281 | true | false | false |
bsubercaseaux/dcc | Modelación y Computación Gráfica/graficaAutos/arboles.py | 1 | 2104 | from imports import *
from textures import *
class Arbol:
def __init__(self,posx,posy,rad):
self.posx = posx
self.posy = posy
self.rad = rad
self.escalax = 60
self.escalay = 60
self.renderlist = []
self.texture = generarTex("Arbol.png", True)
self.dib... | mit | 7,219,569,135,286,718,000 | 26.337662 | 120 | 0.552757 | false | 2.984397 | false | false | false |
jhawkesworth/ansible | test/units/modules/network/radware/test_vdirect_commit.py | 15 | 8599 | # -*- coding: utf-8 -*-
#
# Copyright 2017 Radware LTD.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | gpl-3.0 | -8,252,030,856,591,346,000 | 41.995 | 112 | 0.609489 | false | 4.164165 | true | false | false |
edmoody/mp32youtube | mp32youtube/pastehtml.py | 1 | 1133 | #!/usr/bin/env python
''' pastehtml.py
A Python client for the pastehtml.com API
github.com/rafjaa/Python-PasteHTML-API
'''
import urllib
from sys import argv
class PasteHTML:
URL = 'http://pastehtml.com/upload/create?input_type={0}&result={1}'
INPUT_VALUES = ('txt', 'html', 'mrk')
RESULT_... | mit | -8,837,748,047,248,833,000 | 24.772727 | 73 | 0.599294 | false | 3.402402 | false | false | false |
Nic30/hwtLib | hwtLib/logic/lfsr.py | 1 | 1809 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from hwt.code import Xor, Concat
from hwt.hdl.constants import Time
from hwt.hdl.types.bits import Bits
from hwt.interfaces.std import Signal
from hwt.interfaces.utils import addClkRstn
from hwt.simulator.simTestCase import SimTestCase
from hwt.synthesizer.param import P... | mit | 6,078,751,420,803,649,000 | 26 | 71 | 0.595909 | false | 3.30713 | false | false | false |
jantman/graphite-web | webapp/graphite/render/evaluator.py | 8 | 1283 | import datetime
import time
from django.conf import settings
from graphite.render.grammar import grammar
from graphite.render.datalib import fetchData, TimeSeries
def evaluateTarget(requestContext, target):
tokens = grammar.parseString(target)
result = evaluateTokens(requestContext, tokens)
if type(result) is ... | apache-2.0 | 78,910,285,229,593,070 | 26.297872 | 76 | 0.758379 | false | 4.009375 | false | false | false |
kwadrat/ml | save_http_page.py | 1 | 1244 | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
import urllib2
declared_browser = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0'
def replace_user_agent(opener):
debug_substitution = 0
the_tag = 'User-Agent'
upper_tag = the_tag.upper()
header_count = len(opener.addheaders)
... | mit | 6,427,220,536,780,413,000 | 30.897436 | 93 | 0.617363 | false | 3.173469 | false | false | false |
manaris/jythonMusic | 17. sonifyImage.py | 1 | 3448 | # sonifyImage.py
#
# Demonstrates how to create a soundscape from an image.
# It also demonstrates how to use functions.
# It loads a jpg image and scans it from left to right.
# Pixels are mapped to notes using these rules:
#
# + left-to-right column position is mapped to time,
# + luminosity (pixel brightness) i... | gpl-3.0 | 363,243,810,894,854,100 | 30.642202 | 72 | 0.672564 | false | 3.543679 | false | false | false |
biotty/rmg | graphics/py/edseq.py | 1 | 3127 | #!/usr/bin/env python3
#
# (c) Christian Sommerfeldt OEien
# All rights reserved
import itertools
import sys, os
def extrapatt(patt):
if "%" in patt: return patt
else: return patt + "%d.jpeg"
class FileSeq:
def __init__(self, patt):
self.patt = extrapatt(patt)
self.count = sel... | bsd-2-clause | 429,053,175,637,540,030 | 29.656863 | 69 | 0.527662 | false | 3.032978 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.