repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
studyzy/gae_image | src/admin.py | 1 | 3992 | #coding:utf-8
import wsgiref.handlers
import os
from functools import wraps
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.api import users
import methods,logging
from django.utils import simplejson
adminFlag=True
class AdminControl(webapp.RequestHandler... | bsd-3-clause | -5,816,428,715,498,890,000 | 33.422414 | 94 | 0.584669 | false | 3.909892 | false | false | false |
issess/qock | QockText.py | 1 | 1843 | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2016 SeungHoon Han (issess)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitati... | mit | -7,156,082,914,378,429,000 | 31.333333 | 105 | 0.692892 | false | 3.839583 | false | false | false |
napalm-automation/napalm-yang | napalm_yang/models/openconfig/network_instances/network_instance/table_connections/__init__.py | 1 | 15766 | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | apache-2.0 | 1,950,822,293,125,753,600 | 39.950649 | 640 | 0.602943 | false | 4.557965 | true | false | false |
vlegoff/tsunami | src/primaires/objet/types/pierre_feu.py | 1 | 2720 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 NOEL-BARON Léo
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
#... | bsd-3-clause | 6,307,657,612,921,306,000 | 41.968254 | 79 | 0.698929 | false | 3.663058 | false | false | false |
klmitch/nova | nova/virt/hardware.py | 1 | 101347 | # Copyright 2014 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -370,589,048,876,975,900 | 39.832796 | 103 | 0.630892 | false | 4.148635 | false | false | false |
tesujimath/filebutler | filebutler/SizeFilesetCache.py | 1 | 2604 | # Copyright 2017-2018 Simon Guest
#
# This file is part of filebutler.
#
# Filebutler is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#... | gpl-3.0 | 295,822,341,173,897,150 | 41.688525 | 131 | 0.658986 | false | 3.795918 | false | false | false |
colour-science/colour-hdri | colour_hdri/models/datasets/dng.py | 1 | 3544 | # -*- coding: utf-8 -*-
"""
Adobe DNG SDK Dataset
=====================
Defines various datasets objects for *Adobe DNG SDK*:
- :attr:`colour_hdri.models.datasets.dng.CCS_ILLUMINANT_ADOBEDNG`
- :attr:`colour_hdri.models.datasets.dng.\
CCT_ILLUMINANTS_ADOBEDNG`
- :attr:`colour_hdri.models.datasets.dng.\
LIGHT_SO... | bsd-3-clause | 1,098,627,560,100,892,500 | 29.033898 | 78 | 0.652652 | false | 2.603968 | false | false | false |
sebotic/WikidataIntegrator | wikidataintegrator/wdi_core.py | 1 | 157222 | import copy
import datetime
import json
import logging
import os
import re
import time
import warnings
from collections import defaultdict
from typing import List
import pandas as pd
import requests
from pyshex import ShExEvaluator
from rdflib import Graph
from shexer.shaper import Shaper
from wikidataintegrator.wdi_... | agpl-3.0 | 9,089,649,207,682,482,000 | 43.652655 | 164 | 0.59112 | false | 4.040139 | false | false | false |
cdeil/rootpy | rootpy/math/stats/qqplot.py | 1 | 6043 | """
Taken from exmaple by Zhiyi Liu, zhiyil@fnal.gov
here: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=6865
and converted into Python
"""
import ROOT
from math import sqrt
from array import array
from rootpy.plotting import Graph, Hist, Canvas
def qqplot(h1, h2, quantiles=None):
"""
Return a Graph of a QQ... | gpl-3.0 | 6,932,912,027,546,146,000 | 27.63981 | 93 | 0.577528 | false | 2.756843 | false | false | false |
rochester-rcl/islandora-import-scripts | ur/stso_video_template.py | 1 | 7450 | import os
import sys
from fileinfo import FileInfo
import logging
import datetime
import mods
import xml.etree.ElementTree as ET
# logging data
dateTimeInfo = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
logger1 = logging.getLogger('1')
logger1.addHandler(logging.FileHandler("logs/single_file_asset_to_mods_" + d... | mit | -6,676,548,816,766,761,000 | 33.49537 | 430 | 0.632349 | false | 3.797146 | false | false | false |
buildingenergy/buildingenergy-platform | seed/urls/projects.py | 1 | 1847 | """
:copyright: (c) 2014 Building Energy Inc
:license: see LICENSE for more details.
"""
#!/usr/bin/env python
# encoding: utf-8
"""
urls/projects.py
Copyright (c) 2013 Building Energy. All rights reserved.
"""
from django.conf.urls import patterns, url
urlpatterns = patterns(
'seed.views.projects',
url(
... | apache-2.0 | -2,570,720,404,384,349,000 | 32.581818 | 71 | 0.617759 | false | 3.471805 | false | false | false |
lehinevych/irss2014-movie | comparematrix.py | 1 | 14504 | import cPickle
import os, sys , numpy, glob
import difflib
from prettytable import PrettyTable
modellsi = "movietext"
folderlsi= "text/"
def readFiles(foldername):
try:
fileNames = cPickle.load(open(folderName+folderlsi + modellsi + '.filenames', 'rb'))
similarityTextMatrix = numpy.load(folderName + folder... | mit | -6,657,318,801,072,553,000 | 38.2 | 153 | 0.714424 | false | 3.323556 | false | false | false |
electrolinux/weblate | weblate/trans/formats.py | 1 | 33195 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.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, eithe... | gpl-3.0 | -4,625,843,280,521,999,000 | 28.635714 | 79 | 0.569264 | false | 4.320187 | false | false | false |
ojarva/home-info-display | sensor_consumers/oven.py | 1 | 2811 | # coding=utf-8
from setproctitle import setproctitle
from utils import SensorConsumerBase
import datetime
import os
import sys
import json
class Oven(SensorConsumerBase):
def __init__(self, redis_host, redis_port):
SensorConsumerBase.__init__(self, redis_host=redis_host, redis_port=redis_port)
s... | bsd-3-clause | -4,033,988,477,336,672,000 | 38.013889 | 149 | 0.61125 | false | 4.030129 | false | false | false |
ejfrme/learning-python | 01_commodore_vierundvierzig/c64.py | 1 | 1869 | #!/usr/bin/env python
"""
Learning Python
excersize 01: C64
this learning script is inspired by:
- Welle Erdball - 23 (https://www.youtube.com/watch?v=hekczvmO2OM)
- Commodore 64 (http://www.oldcomputers.net/c64.html)
"""
# -- Part 1 --
#
# - import build in libraries
# - clear screen
# - Get user input
# - compar... | mit | -7,190,132,214,016,045,000 | 18.673684 | 77 | 0.708935 | false | 2.929467 | false | false | false |
anyonedev/anyonedev-monitor-agent | test/metrics/DMIDecodeTest.py | 1 | 17748 |
import unittest
from monitor.metrics.DMIDecode import bios,system, chassis,cache, portConnector,\
systemSlot, onBoardDevice, oemString, systemConfigurationOptions,\
physicalMemoryArray, memoryDevice, memoryError32Bit,\
memoryArrayMappedAddress, memoryDeviceMappedAddress, voltageProbe,\
coolingDevice, ... | gpl-2.0 | -7,949,356,746,930,560,000 | 54.621711 | 141 | 0.637036 | false | 3.905752 | true | false | false |
tyndare/osmose-backend | plugins/TagRemove_Incompatibles.py | 1 | 4400 | #-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Etienne Chové <chove@crans.org> 2009 ##
## Copyrights Frédéric Rodrigo 2011 ... | gpl-3.0 | -473,819,840,473,525,000 | 51.345238 | 138 | 0.475552 | false | 3.915405 | false | false | false |
studiobytestorm/YDM | pafy/pafy/backend_youtube_dl.py | 1 | 4444 | import sys
import time
import logging
if sys.version_info[:2] >= (3, 0):
# pylint: disable=E0611,F0401,I0011
uni = str
else:
uni = unicode
import youtube_dl
from . import g
from .backend_shared import BasePafy, BaseStream, remux
dbg = logging.debug
early_py_version = sys.version_info[:2] < (2, 7)
cl... | gpl-2.0 | 2,848,527,550,388,165,600 | 33.992126 | 89 | 0.582583 | false | 3.618893 | false | false | false |
escapewindow/signingscript | src/signingscript/vendored/mozbuild/mozbuild/test/test_expression.py | 3 | 2645 | from __future__ import absolute_import, print_function
import unittest
import mozunit
from mozbuild.preprocessor import Expression, Context
class TestContext(unittest.TestCase):
"""
Unit tests for the Context class
"""
def setUp(self):
self.c = Context()
self.c['FAIL'] = 'PASS'
... | mpl-2.0 | 3,076,700,372,447,677,000 | 30.117647 | 90 | 0.606427 | false | 3.989442 | true | false | false |
dm03514/func-y-task-engine | funcytaskengine/engine.py | 1 | 2928 | """
Drives a TestMachine to completion.
Engine needs to be completely generic and agnostic from any
specific request types, response types, protocols, etc,
adding a new initiator or
"""
import gevent
import logging
from gevent import Timeout
from gevent.queue import Queue
from funcytaskengine import settings
from f... | gpl-3.0 | 2,719,383,374,463,292,400 | 28.877551 | 86 | 0.510587 | false | 4.912752 | false | false | false |
laisee/pymasapi | pymasapi/settings.py | 1 | 2338 | ''' Module settings '''
class Settings(object):
BASE_URL = 'eservices.mas.gov.sg/api/action/datastore/search.json?resource_id=%s'
PROTOCOL = "https"
INTEREST_RATES_DOMESTIC_WEEKLY = '9a51d255-fec1-4aca-9818-b7a47490243c'
INTEREST_RATES_DOMESTIC_MONTHLY = 'b5adb5c2-4604-49f3-b924-b69691252380'
IN... | mit | 4,491,439,653,168,494,600 | 45.76 | 85 | 0.756202 | false | 1.871898 | false | false | false |
pmikus/sys-info-suite | sysinfosuite/SysInfoOutputSuite.py | 1 | 8143 | """Module is calling outputs in iteration by dynamically loading modules"""
import datetime as DT
import logging
import os
import pkgutil
import sys
from sysinfosuite.SysInfoProcessCall import SysInfoProcessCall
__author__ = "Peter Mikus"
__license__ = "GPLv3"
__version__ = "2.1.0"
__maintainer__ = "Pet... | gpl-3.0 | -7,987,356,712,906,934,000 | 44.798851 | 78 | 0.434729 | false | 5.054624 | false | false | false |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/services/job/tests/test_runner.py | 1 | 23096 | # Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for job-running facilities."""
import logging
import re
import sys
from textwrap import dedent
from time import sleep
from lazr.jobrunner.jobrunner import (
LeaseHel... | agpl-3.0 | -4,130,563,661,033,733,600 | 32.667638 | 78 | 0.624567 | false | 3.943316 | true | false | false |
tarrow/cmhypy | cmhypy/cmhypy.py | 1 | 3481 | import hypothesisapi
from pycproject.readctree import CProject
import argparse
from SPARQLWrapper import SPARQLWrapper, JSON
def payload_builder(url, annotation_content, annotation_pre=None, annotation_exact=None, annotation_suffix=None):
if len(annotation_pre)>32:
annotation_pre=annotation_pre[-32:]
... | mit | 141,928,518,027,835,900 | 39.011494 | 113 | 0.587475 | false | 3.880713 | false | false | false |
gitdealdo/serva | apps/recetario/views/tipo_receta.py | 1 | 2897 | from django.core.urlresolvers import reverse # reverse_lazy
from django.utils.translation import ugettext as _ # , ungettext
from django.utils.text import capfirst # , get_text_list
from django.contrib import messages
from django.views import generic
from django.http import HttpResponseRedirect, JsonResponse # , Ht... | gpl-2.0 | 6,543,504,549,978,518,000 | 37.586667 | 97 | 0.636144 | false | 3.55092 | false | false | false |
iocoop/beancount | experiments/portfolio/portfolio.py | 1 | 6759 | #!/usr/bin/env python3
"""A dashboard for portfolio composition and changes.
"""
import argparse
import functools
import logging
from beancount.core.number import D
from beancount import loader
from beancount.ops import prices
from beancount.ops import holdings
from beancount.reports import holdings_reports
from beanc... | gpl-2.0 | 6,115,840,805,908,079,000 | 36.97191 | 145 | 0.653055 | false | 4.040048 | false | false | false |
michaelhkw/incubator-impala | tests/verifiers/metric_verifier.py | 1 | 2733 | # 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 | -2,194,313,423,923,621,600 | 45.322034 | 85 | 0.691182 | false | 3.693243 | false | false | false |
mmolero/pcloudpy | pcloudpy/core/base.py | 1 | 5094 | """Base Class for all Custom Objects, highly based on sklearn Base Class"""
#Author: Miguel Molero <miguel.molero@gmail.com>
import inspect
import six
import numpy as np
def _pprint(params, offset=0, printer=repr):
"""Pretty print the dictionary 'params'
Parameters
----------
params: dict
The ... | bsd-3-clause | 4,090,969,406,887,238,000 | 32.513158 | 95 | 0.522576 | false | 4.421875 | false | false | false |
pythononwheels/pow_clean | start/generate_scaffold.py | 1 | 1838 | #
# generate scaffold
# generates the plain HTML view scaffolding for crud actions.
#
# index, show, list, edit, create, delete
#
import argparse
import tornado.template as template
import os.path
import timeit
import testapp.powlib as lib
import testapp.config as cfg
def camel_case(name):
"""
converts t... | mit | -5,281,447,995,678,551,000 | 27.292308 | 96 | 0.591948 | false | 3.705645 | false | false | false |
mikotohe2/deskbot | modules/commands/settings.py | 1 | 2022 | from .. import irc, var, ini
from ..tools import is_identified
# Only the admin can use these commands.
def ident (f):
def check (user, channel, word):
if user == irc.admin and is_identified(user):
f(user, channel, word)
else:
irc.msg(channel, "{}: You don't have admin right... | bsd-3-clause | 5,181,736,051,236,503,000 | 35.763636 | 85 | 0.607814 | false | 3.696527 | false | false | false |
srickardti/openthread | tests/scripts/thread-cert/pktverify/layer_fields.py | 1 | 23809 | #!/usr/bin/env python3
#
# Copyright (c) 2019, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | bsd-3-clause | -5,897,663,478,170,565,000 | 33.555878 | 116 | 0.621866 | false | 2.943744 | false | false | false |
pearu/f2py | fparser/scripts/f2003.py | 1 | 1216 | from __future__ import absolute_import
from __future__ import print_function
#!/usr/bin/env python
import os
import sys
### START UPDATE SYS.PATH ###
### END UPDATE SYS.PATH ###
try:
from iocbio.optparse_gui import OptionParser
except ImportError:
from optparse import OptionParser
from fparser.script_options im... | bsd-3-clause | -8,522,035,432,378,927,000 | 29.4 | 79 | 0.644737 | false | 3.948052 | false | false | false |
MaterialsDiscovery/PyChemia | pychemia/code/abinit/abifiles.py | 1 | 7640 | import os as os
import subprocess as _subprocess
from .utils import netcdf2dict, psp_name
# from .input import AbinitInput
class AbiFiles:
"""
Read an 'abinit.files' file and extract the
names of input, output filenames and put them
into dictionary called 'files'.
"""
basedir = "."
filen... | mit | 3,053,469,742,815,801,000 | 33.107143 | 87 | 0.487565 | false | 3.862487 | false | false | false |
kevin-zhaoshuai/zun | zun/tests/tempest/api/models/container_model.py | 1 | 1411 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 | 6,508,623,540,023,171,000 | 33.414634 | 78 | 0.761162 | false | 4.288754 | false | false | false |
theislab/scvelo | scvelo/tools/rank_velocity_genes.py | 1 | 14325 | from .. import settings
from .. import logging as logg
from .utils import strings_to_categoricals, vcorrcoef
from .velocity_pseudotime import velocity_pseudotime
from scipy.sparse import issparse
import numpy as np
def get_mean_var(X, ignore_zeros=False, perc=None):
data = X.data if issparse(X) else X
mask_n... | bsd-3-clause | -8,733,125,958,532,536,000 | 35.730769 | 115 | 0.61438 | false | 3.277282 | false | false | false |
puffyboa/weatheranim | main.py | 1 | 11638 | import requests,json,random
import turtle
appid = 'a98689d8418b0ca737434c67064bb29d'
def coordinates():
send_url = 'http://freegeoip.net/json'
r = requests.get(send_url)
j = json.loads(r.text)
lat = j['latitude']
lon = j['longitude']
return [lat,lon]
def weather_geoloc(coordinates):
glo... | mit | 3,923,055,226,529,409,500 | 33.02924 | 131 | 0.477058 | false | 3.364556 | false | false | false |
vlow/slingring | slingring-tools/universe/workflow/upgrade.py | 1 | 5480 | # (c) 2017, Florian Engel <florian.engel@turbocache3000.de>
#
# This file is part of Slingring
#
# Slingring 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 optio... | gpl-3.0 | 2,032,987,433,055,614,200 | 42.492063 | 120 | 0.690876 | false | 3.848315 | true | false | false |
SUSE/azurectl | azurectl/commands/storage_disk.py | 1 | 6227 | # Copyright (c) 2015 SUSE Linux GmbH. 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 la... | apache-2.0 | -4,272,696,543,710,105,000 | 31.097938 | 78 | 0.603822 | false | 4.416312 | false | false | false |
redhat-openstack/python-openstackclient | openstackclient/compute/v2/agent.py | 1 | 5124 | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 6,080,940,511,879,220,000 | 28.28 | 77 | 0.529469 | false | 4.409639 | false | false | false |
emoronayuso/beeton | asterisk-bee/asteriskbee/api_cdr/views.py | 1 | 8517 | # -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
#Para uso de la funcion HttpResponseRedirect (redireccionar paginas)
from django.http import HttpResponseRedirect
#para conexion con bases de datos externas
import sqlite3 as dbapi
from django.conf import settings
from django.contrib.auth.form... | gpl-3.0 | 8,777,880,359,496,516,000 | 35.706897 | 444 | 0.676726 | false | 2.878972 | false | false | false |
Splawik/pytigon | pytigon/prj/schportal/settings_app.py | 1 | 5169 | # -*- coding: utf-8 -*-
import os
import sys
from urllib.parse import urlparse
PRJ_TITLE = "Pytigon portal"
PRJ_NAME = "schportal"
THEMES = ['tablet_modern', 'tablet_modern', 'smartfon_standard']
_lp = os.path.dirname(os.path.abspath(__file__))
if 'PYTIGON_ROOT_PATH' in os.environ:
_rp = os.environ['PYTIGON_ROOT... | lgpl-3.0 | 7,429,404,317,776,831,000 | 30.138554 | 103 | 0.628168 | false | 3.089659 | false | false | false |
mtambos/springleaf | spellchecker.py | 1 | 1311 | # Author: Peter Norvig
# taken from: http://norvig.com/spell-correct.html
import re, collections
def words(text):
return re.findall('[a-z]+', text.lower())
def train(features):
model = collections.defaultdict(lambda: 1)
for f in features:
model[f] += 1
return model
try:
with open('big.tx... | mit | 6,612,890,312,740,022,000 | 28.133333 | 85 | 0.627765 | false | 2.979545 | false | false | false |
adel-boutros/qpid-dispatch | tests/system_tests_qdmanage.py | 1 | 21505 | #
# 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... | apache-2.0 | 8,650,141,971,837,913,000 | 41.584158 | 123 | 0.59256 | false | 3.847737 | true | false | false |
trigunshin/s_connect | app.py | 1 | 3391 | from flask import Flask, render_template, jsonify, request
from flask.ext.uploads import UploadSet, configure_uploads
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security, SQLAlchemyUserDatastore, \
UserMixin, RoleMixin, login_required, current_user
from werkzeug import secure_filena... | mit | -4,819,922,644,055,660,000 | 27.495798 | 98 | 0.661752 | false | 3.456677 | true | false | false |
lab11/M-ulator | platforms/m3/programming/mbus_snoop_snsv6.py | 1 | 2277 | #!/usr/bin/python
import os
import sys
import logging
from m3_common import m3_common
#m3_common.configure_root_logger()
#logger = logging.getLogger(__name__)
from m3_logging import get_logger
logger = get_logger(__name__)
class mbus_message_generator(m3_common):
TITLE = "MBus Message Generator"
def __ini... | gpl-3.0 | -2,542,601,022,364,884,500 | 29.36 | 105 | 0.614844 | false | 2.968709 | false | false | false |
bxlab/bx-python | scripts/mMK_bitset.py | 1 | 5255 | #!/usr/bin/env python
from optparse import OptionParser
from rpy import r
import bx.align.maf
import bx.bitset
from bx.bitset_builders import binned_bitsets_from_file
def main():
parser = OptionParser(usage="usage: %prog [options] maf_file snp_file neutral_file window_size step_size")
parser.add_option("-o... | mit | 5,497,128,589,120,988,000 | 34.748299 | 153 | 0.610847 | false | 3.006293 | false | false | false |
victortxa/fatiando | fatiando/datasets/tests/test_surfer.py | 1 | 1151 | from __future__ import division, absolute_import
import os
import numpy as np
import numpy.testing as npt
from .. import load_surfer
MODULE_DIR = os.path.dirname(__file__)
TEST_DATA_DIR = os.path.join(MODULE_DIR, 'data')
def test_load_surfer():
"Check if load_surfer reads test data correctly"
fname = os.pat... | bsd-3-clause | -7,247,286,261,094,319,000 | 29.289474 | 74 | 0.569939 | false | 3.179558 | false | false | false |
danielplohmann/apiscout | apiscout/PeTools.py | 1 | 4554 | import logging
import struct
from .utility import get_word
if len(logging._handlerList) == 0:
logging.basicConfig(level=logging.INFO, format="%(asctime)-15s %(message)s")
LOG = logging.getLogger(__name__)
class PeTools(object):
BITNESS_MAP = {0x14c: 32, 0x8664: 64}
@staticmethod
def mapBinary(binar... | bsd-2-clause | 1,778,329,723,546,157,300 | 47.967742 | 232 | 0.580369 | false | 3.798165 | false | false | false |
ConnorMcMahon/geoinference | python/src/geolocate/sample_dataset/networkAnalysis.py | 1 | 3080 | import networkx as nx
ground_truth_file = "user_groundtruth_locfield.tsv"
bimention_file = "bi_mention_network.elist"
output_file = "graph_summary.txt"
filtered_ground_truth_file = "filtered_user_groundtruth_locfield.tsv"
def main():
goldStats = {}
goldStats["m"] = set()
goldStats["f"] = set()
goldSta... | bsd-3-clause | -3,084,696,393,118,761,500 | 33.606742 | 99 | 0.518182 | false | 3.034483 | false | false | false |
jargonautical/mcpi | mcpipy/danielbates_setblockdemo.py | 1 | 13503 | #!/usr/bin/env python
#
from math import sin, cos, radians
from . import danielbates_minecraft_basic as mc
#import pygame.image # comment this out if not using images - it's slow to import. If you uncomment, uncomment the image reference below.
import random
import server
# TODO: use numpy matrices/vectors instead of... | cc0-1.0 | 4,734,283,626,542,052,000 | 29.76082 | 138 | 0.61379 | false | 2.954705 | false | false | false |
Nextfood/grow-unit-control | ros-workspace/src/atmega328p_service_discovery/scripts/node.py | 1 | 2410 | #!/usr/bin/python
import sys
import json
import serial
import fcntl
import serial.tools.list_ports
import time
from threading import Thread, Lock
import rospy
from atmega328p_service_discovery.srv import *
class SearchServices:
foundDevices = {}
def get_serial_port(self, service):
if not service in ... | mit | 3,479,000,321,289,033,000 | 28.753086 | 111 | 0.597095 | false | 4.070946 | false | false | false |
hpd/MitsubaForMaya | plug-ins/mitsuba/materials/roughconductor.py | 1 | 6905 | import sys
import maya.OpenMaya as OpenMaya
import maya.OpenMayaMPx as OpenMayaMPx
import maya.cmds as cmds
kPluginNodeName = "MitsubaRoughConductorShader"
kPluginNodeClassify = "/shader/surface"
kPluginNodeId = OpenMaya.MTypeId(0x87008)
class roughconductor(OpenMayaMPx.MPxNode):
def __init__(self):
OpenM... | mit | 6,073,559,565,114,751,000 | 33.873737 | 105 | 0.649674 | false | 3.187904 | false | false | false |
vakaras/nmadb-entrance | src/nmadb_entrance/forms.py | 1 | 2488 | from django import forms
from django.utils.translation import ugettext as _
from nmadb_entrance import models
from nmadb_registration.conditions import check_condition
class BaseInfoForm(forms.ModelForm):
""" Form for entering basic info.
"""
def clean(self):
""" Forbids registration.
""... | lgpl-3.0 | 6,917,457,933,411,587,000 | 23.88 | 72 | 0.511254 | false | 4.590406 | false | false | false |
MattPerron/esper | esper/query/management/commands/embed_faces_facenet.py | 1 | 4332 | from django.core.management.base import BaseCommand
from query.base_models import ModelDelegator
import json
import tensorflow as tf
import facenet
import cv2
import os
import json
# TODO(wcrichto): merge this with the other embed faces script
# TODO(pari): for dummy, can just add same labels rather than rerunning scr... | apache-2.0 | -4,654,064,255,383,715,000 | 43.204082 | 120 | 0.566482 | false | 3.766957 | false | false | false |
wojcech/agilentpyvisa | tests/test_B1500.py | 1 | 1981 | import pytest
from agilentpyvisa.B1500 import *
import agilentpyvisa
import visa
import ipdb
import types
#import logging
#logging.basicConfig(level=logging.INFO)
class DummyTester():
def __init__(self, *args,**kwargs):
pass
def query(*args, **kwargs):
print(*[x for x in args if isinstance(x... | agpl-3.0 | -7,093,920,832,829,579,000 | 23.158537 | 62 | 0.535083 | false | 3.038344 | true | false | false |
kiibohd/kll | kll/emitters/emitters.py | 1 | 3143 | #!/usr/bin/env python3
'''
KLL Emitters Container Classes
'''
# Copyright (C) 2016-2018 by Jacob Alexander
#
# This file 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
# (... | gpl-3.0 | 3,603,172,136,649,448,400 | 28.650943 | 85 | 0.646198 | false | 3.861179 | false | false | false |
krishauser/GlobalRedundancyResolution | grr/utils/cgraph.py | 1 | 3639 | import networkx as nx
from cache import CachedDB
class CGraph:
"""A networkx.Graph-like interface where the data associated with graph nodes and edges are
stored in a persistent database. The graph is assumed undirected.
All node/edge data must be pickle-able.
One small difference between networkx and this is t... | gpl-3.0 | -5,170,674,593,471,604,000 | 26.360902 | 100 | 0.642759 | false | 2.623648 | false | false | false |
dimven/SpringNodes | py/SelectLinkedElementsInOrder.py | 1 | 1667 | # Copyright(c) 2017, Dimitar Venkov
# @5devene, dimitar.ven@gmail.com
# www.badmonkeys.net
#inspired by Troy Gates https://forums.autodesk.com/t5/revit-api/revit-api-selected-element-set-order/td-p/5597203
import clr
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
clr.AddReference("RevitAPI")
from Au... | mit | 2,410,582,065,313,767,000 | 27.271186 | 150 | 0.768446 | false | 2.940035 | false | false | false |
tgquintela/pySpatialTools | pySpatialTools/tests/test_spatial_discretizer.py | 1 | 12655 |
"""
test spatial discretization
---------------------------
test for spatial discretizors.
"""
## Imports
import numpy as np
from itertools import product
#import matplotlib.pyplot as plt
from pySpatialTools.Discretization import *
from pySpatialTools.utils.artificial_data import *
from pySpatialTools.Discretization... | mit | 359,821,340,793,904,200 | 36.220588 | 79 | 0.590202 | false | 3.165333 | true | false | false |
twdkeule/pyping | src/pyping/core.py | 1 | 9061 | #!/usr/bin/env python3
# coding: utf-8
# Copyright (C) 2017 Thomas De Keulenaer
#
# 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 lat... | lgpl-3.0 | -6,752,373,591,072,378,000 | 32.559259 | 115 | 0.658757 | false | 2.861971 | false | false | false |
mstrandgren/homology_ocr | data.py | 1 | 1843 | import math
import numpy as np
from scipy.misc import imread, imresize
from scipy import spatial
import skimage.morphology as mp
def get_ellipse(N = 16, skew = 0.7):
X = skew * np.cos(np.arange(N) * 2.0 * math.pi / N)
Y = np.sin(np.arange(N) * 2.0 * math.pi / N)
vertices = np.array([X,Y]).T
edges = np.array([np.... | mit | -6,047,482,056,471,791,000 | 30.775862 | 93 | 0.634835 | false | 2.269704 | false | false | false |
osmidy/Dischord | project/Flame.py | 1 | 1607 | import sys
sys.path.append('..')
from common.core import *
from common.gfxutil import *
from common.audio import *
from common.mixer import *
from common.note import *
from common.wavegen import *
from common.wavesrc import *
from common.writer import *
from kivy.core.window import Window
from kivy.clock i... | apache-2.0 | 944,287,914,579,796,000 | 25.741379 | 73 | 0.610454 | false | 3.694253 | false | false | false |
theJollySin/mazelib | mazelib/generate/DungeonRooms.py | 1 | 12542 | from random import choice, randrange, shuffle
import numpy as np
# If the code is not Cython-compiled, we need to add some imports.
from cython import compiled
if not compiled:
from mazelib.generate.MazeGenAlgo import MazeGenAlgo
RANDOM = 1
SERPENTINE = 2
class DungeonRooms(MazeGenAlgo):
"""
This is a va... | gpl-3.0 | -2,019,595,736,883,608,800 | 35.568513 | 117 | 0.543135 | false | 3.826113 | false | false | false |
grnet/mupy | muparse/management/commands/utils.py | 1 | 1205 | from django.conf import settings
from muparse.models import MuninNodes
import requests
from django.core.exceptions import ImproperlyConfigured
def get_all_nodes():
MNODES = []
for node in settings.MUNIN_NODES:
if isinstance(node, tuple):
MNODES.append(node)
else:
raise ... | gpl-3.0 | -3,996,239,866,617,712,600 | 25.777778 | 71 | 0.562656 | false | 3.696319 | false | false | false |
SanPen/GridCal | src/GridCal/Engine/Simulations/SigmaAnalysis/sigma_analysis_driver.py | 1 | 14542 | # This file is part of GridCal.
#
# GridCal 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.
#
# GridCal is distributed in the hope that... | gpl-3.0 | -1,462,936,040,939,407,000 | 36.668394 | 128 | 0.518501 | false | 3.941448 | false | false | false |
reformedforum/reformedacademy | reformedacademy/migrations/0001_initial.py | 1 | 11546 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
import django.core.validators
import bible.djangoforms
class Migration(migrations.Migration):
dependencies = [
... | gpl-3.0 | -3,372,974,172,357,498,000 | 47.108333 | 289 | 0.544777 | false | 4.468266 | false | false | false |
armirusco/djangae | djangae/db/backends/appengine/query.py | 1 | 43168 | import django
import json
import logging
import re
import datetime
from itertools import chain, imap
from django.core.exceptions import FieldError
from django.db.models.fields import FieldDoesNotExist
from django.db.models.sql.datastructures import EmptyResultSet
from django.db.models.sql.where import EmptyWhere
from ... | bsd-3-clause | -568,839,706,792,800,500 | 35.184409 | 140 | 0.57582 | false | 4.204948 | false | false | false |
Azure/azure-sdk-for-python | sdk/datashare/azure-mgmt-datashare/setup.py | 1 | 3034 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | mit | -3,154,986,218,547,181,600 | 32.711111 | 91 | 0.593935 | false | 3.811558 | false | false | false |
bwjsfjz1969/mininet-SDN-POX-Firewall | pox_firewall.py | 1 | 2514 | '''
Udacity:
- Software Defined Networking (SDN) course
-- Assignment 7 Programming Assignment
Professor: Nick Feamster
'''
from pox.core import core
import pox.openflow.libopenflow_01 as of
from pox.lib.revent import *
from pox.lib.util import dpidToStr
from pox.lib.addresses import EthAddr
from collections import n... | mit | -8,046,134,313,041,502,000 | 30.425 | 90 | 0.668656 | false | 3.571023 | false | false | false |
TresysTechnology/setools | setoolsgui/rbacrulemodel.py | 1 | 1983 | # Copyright 2016, Tresys Technology, LLC
#
# This file is part of SETools.
#
# SETools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 2.1 of
# the License, or (at your option) any later ... | lgpl-2.1 | -3,339,847,274,920,970,000 | 33.189655 | 79 | 0.575391 | false | 4.558621 | false | false | false |
drakeloud/louderdev | louderdev/messenger/views.py | 1 | 4143 | import json
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import redirect, render
from louderdev.decorators import ajax_required
from louderdev.messenger.models import Message
@... | mit | 7,056,844,647,127,508,000 | 30.869231 | 77 | 0.627565 | false | 4.114201 | false | false | false |
nikkomidoy/yfc-social-site | config/urls.py | 1 | 1232 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
urlpatterns = [
url(r'^$', TemplateView.as_view(templ... | bsd-3-clause | -2,188,823,700,842,318,000 | 35.235294 | 91 | 0.681006 | false | 3.688623 | false | true | false |
BigFatNoob-NCSU/x9115george2 | hw/code/3/birthday.py | 1 | 1325 | from __future__ import division, print_function
import random
__author__ = 'panzer'
def has_duplicates(lst):
"""
Computes if a list has duplicate elements
:param lst: List to check in
:return: True if it contains duplicate, else false
"""
if lst is None or not len(lst):
return False
... | mit | 5,384,491,995,104,988,000 | 24 | 99 | 0.6 | false | 3.711485 | false | false | false |
mir123/Kenwood-morse-beacon | heli_beacon.py | 1 | 3543 | #!/usr/bin/env python
#
# Kenwood Morse Beacon - turns a Kenwood TS-480 into a heli beacon
#
# Copyright (C) 2016 by Mir Rodriguez <mir.rodriguez@greenpeace.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 Fr... | gpl-3.0 | 8,764,012,691,488,525,000 | 28.040984 | 88 | 0.664691 | false | 2.942691 | false | false | false |
kovidgoyal/kitty | kittens/diff/patch.py | 1 | 9529 | #!/usr/bin/env python3
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
import concurrent.futures
import os
import shlex
import shutil
import subprocess
from typing import Dict, Iterator, List, Optional, Sequence, Tuple, Union
from . import global_data
from .collect im... | gpl-3.0 | -6,502,356,128,821,298,000 | 36.077821 | 139 | 0.59618 | false | 3.580985 | false | false | false |
eigenn/flaskengine | flaskengine/views/edit.py | 1 | 1911 | from .base import BaseModelView, request
from wtforms.ext.appengine.ndb import model_form
class ModelEdit(BaseModelView):
methods = ['GET', 'POST']
template = 'flaskengine/edit.html'
form = None
endpoint = '/<key>/edit/'
@classmethod
def default_form(cls):
'''
if self.form not... | mit | 8,527,922,577,967,425,000 | 26.695652 | 71 | 0.529566 | false | 4.237251 | false | false | false |
iij/TracPortalPlugin | tracportal/dashboard/web_api.py | 1 | 2092 | # -*- coding: utf-8 -*-
#
# Web API module of Dashboard.
#
# (C) 2013 Internet Initiative Japan Inc.
# All rights reserved.
#
# Created on 2013/05/28
# @author: yosinobu@iij.ad.jp
try:
import json
except ImportError:
import simplejson as json
from trac.core import Component, implements, ExtensionPoint
from tr... | mit | 1,190,653,059,646,841,600 | 34.457627 | 84 | 0.594646 | false | 4.030829 | false | false | false |
vascotenner/holoviews | holoviews/core/data/interface.py | 1 | 7377 | import param
import numpy as np
from ..element import Element, NdElement
from .. import util
class Interface(param.Parameterized):
interfaces = {}
datatype = None
@classmethod
def register(cls, interface):
cls.interfaces[interface.datatype] = interface
@classmethod
def cast(cls, ... | bsd-3-clause | -3,355,192,399,492,479,500 | 34.128571 | 90 | 0.579639 | false | 4.443976 | false | false | false |
yyh1102/ChinaIPO-Statistic | spider/main.py | 1 | 4057 | from urllib import request
from urllib.error import URLError
from lxml import etree
import re
import pymysql
def get_page(url):
req=request.Request(url)
req.add_header('User-Agent', 'Mozilla/6.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/8.0 Mobile/10A5376e Safari... | mit | -220,769,600,234,844,860 | 28.061538 | 171 | 0.577178 | false | 2.748908 | false | false | false |
deepmind/acme | acme/agents/tf/mcts/types.py | 1 | 1394 | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | apache-2.0 | -7,411,846,593,407,156,000 | 33.85 | 74 | 0.761836 | false | 3.777778 | false | false | false |
mpillar/codeeval | 1-moderate/black-or-white/main.py | 1 | 1196 | import sys
def find_smallest_sub_matrix_size_with_equal_number_of_ones(grid):
for length in range(1, len(grid)):
previous_one_count = -1
success = True
for i in range(0, len(grid) + 1 - length):
for j in range(0, len(grid) + 1 - length):
one_count = 0
... | unlicense | -3,689,960,218,482,768,400 | 31.324324 | 76 | 0.502508 | false | 3.559524 | true | false | false |
bob3000/thumbor_aws | tc_aws/aws/storage.py | 1 | 9522 | # coding: utf-8
# Copyright (c) 2015, thumbor-community
# Use of this source code is governed by the MIT license that can be
# found in the LICENSE file.
import calendar
from json import loads, dumps
from os.path import join, splitext
from datetime import datetime, timedelta
from dateutil.tz import tzutc
from torna... | mit | -2,387,383,217,623,614,000 | 32.528169 | 119 | 0.601134 | false | 4.196562 | true | false | false |
abbacode/ciscorouteparser | route_parse_nxos.py | 1 | 5396 | import re
import csv
import ipaddress
__version__ = 1.0
# Each route will have the following values
class Route_Template(object):
def __init__(self):
self.route = {}
self.protocol = []
self.metric = []
self.next_hop = []
self.age = []
self.interface = []
def __r... | mit | 2,666,570,661,984,967,000 | 38.101449 | 122 | 0.488881 | false | 4.545914 | false | false | false |
amit0701/rally | rally/consts.py | 1 | 5300 | # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 1,920,079,741,389,335,000 | 28.775281 | 79 | 0.652075 | false | 3.393086 | true | false | false |
immanuelw/paperdata | paper/data/move.py | 1 | 3788 | '''
paper.data.move
purpose | move files
author | Immanuel Washington
Functions
---------
exist_check | checks to see if files to be moved all exist in database
set_move_table | updates database with moved file status
move_files | parses list of files then moves them
'''
from __future__ import print_function
import ... | gpl-2.0 | -7,380,959,331,325,817,000 | 32.22807 | 137 | 0.619852 | false | 3.791792 | false | false | false |
CORDEA/analysis_of_1000genomes-data | programs/machine_learning/extract_ilm.py | 1 | 1307 | #!/bin/env python
# encoding:utf-8
#
#
#
__Author__ = "CORDEA"
__date__ = "2014-09-01"
from collections import Counter
infile = open("23andme_minmax.50.csv", "r")
idList = [r.split(",")[0].rstrip("\r\n") for r in infile.readlines()]
infile.close()
infile = open("23andme_extract_data.csv", "r")
lines = infile.rea... | apache-2.0 | 2,989,499,783,273,272,000 | 24.627451 | 82 | 0.512624 | false | 2.81681 | false | false | false |
20tab/pybulletphysics | tests/test_vector3.py | 1 | 1157 | import unittest
from bulletphysics import *
class Vector3Test(unittest.TestCase):
def setUp(self):
self.vector = Vector3(1.0, 2.0, 3.0)
def test_xyz(self):
v = Vector3(0.0, 0.1, 0.2)
self.assertEqual(0.0, round(v.getX(), 2))
self.assertEqual(0.1, round(v.getY(), 2))
se... | mit | 6,508,564,323,284,047,000 | 31.138889 | 64 | 0.589455 | false | 2.989664 | true | false | false |
NordicSemiconductor/pyOCD | util/flash_nrf51822.py | 1 | 5587 | #!/usr/bin/env python
import argparse
from intelhex import IntelHex
from time import sleep, time
from struct import unpack
import sys
import subprocess
from pyOCD.interface import INTERFACE, usb_backend
from pyOCD.board import MbedBoard
import logging
VID = 0x0D28
PID = 0x0204
NVMC_READY = 0x4001E400
NVMC_CON... | apache-2.0 | 8,826,536,595,115,831,000 | 30.038889 | 124 | 0.577233 | false | 3.599871 | true | false | false |
stvstnfrd/edx-platform | lms/djangoapps/support/views/enrollments.py | 1 | 8523 | """
Support tool for changing course enrollments.
"""
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.db import transaction
from django.db.models import Q
from django.http import HttpResponseBadRequest
from django.urls import reverse
from django.utils.decorat... | agpl-3.0 | 4,188,111,597,143,007,000 | 42.045455 | 111 | 0.649302 | false | 4.785514 | false | false | false |
ngi644/ngi.notify.datadog | src/ngi/notify/datadog/controlpanel.py | 1 | 2973 | # encoding: utf-8
"""
Created on 07/18/14
@author: Takashi NAGAI
"""
from zope import schema
from zope.interface import Interface
from plone.app.registry.browser import controlpanel
from ngi.notify.datadog import _
class IDatadog(Interface):
""" Datadog settings """
instance_name = schema.TextLine(
... | gpl-2.0 | 7,828,563,756,052,679,000 | 30.967742 | 101 | 0.62294 | false | 3.71625 | false | false | false |
GoogleCloudPlatform/python-docs-samples | storage/cloud-client/storage_set_metadata.py | 1 | 1284 | #!/usr/bin/env python
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | -3,255,400,993,645,374,500 | 30.317073 | 80 | 0.702492 | false | 3.627119 | false | false | false |
GuillaumeMilan/yt-reader | read_video.py | 1 | 7193 | import vlc
import time
import pafy
import urllib.parse
from threading import Thread
from quality_lib import get_audio_url, get_video_url
class VideoPlayer(Thread):
""" This class will create a thread in which the sound and the video will
be played
"""
def __init__(self, video = None, quality = '',... | gpl-3.0 | 2,541,590,320,432,561,000 | 31.844749 | 124 | 0.520645 | false | 4.196616 | false | false | false |
OCA/bank-statement-import | account_bank_statement_import_online_ponto/tests/test_account_bank_statement_import_online_ponto.py | 1 | 5621 | # Copyright 2020 Florent de Labarre
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import datetime
from unittest import mock
from odoo import fields
from odoo.tests import common
_module_ns = 'odoo.addons.account_bank_statement_import_online_ponto'
_provider_class = (
_module_ns
... | agpl-3.0 | -7,401,472,075,904,969,000 | 42.914063 | 80 | 0.514677 | false | 3.844733 | false | false | false |
shahbaz17/zamboni | mkt/developers/views_payments.py | 1 | 20204 | import functools
import json
import urllib
from django import http
from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, redirect, render
from django.views.decorators.http import require_POST
import commonware
... | bsd-3-clause | 6,505,644,445,387,397,000 | 36.414815 | 79 | 0.603544 | false | 4.047276 | true | false | false |
AwesomeTTS/awesometts-anki-addon | awesometts/service/fptai.py | 1 | 4220 | # -*- coding: utf-8 -*-
# AwesomeTTS text-to-speech add-on for Anki
# Copyright (C) 2010-Present Anki AwesomeTTS Development Team
#
# 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 versi... | gpl-3.0 | 7,142,642,911,379,588,000 | 29.786765 | 118 | 0.582517 | false | 3.497911 | false | false | false |
ntbrewer/Pyspectr | build/lib/Pyspectr/peak_fitter.py | 1 | 6265 | #!/usr/bin/env python3
"""K. Miernik 2012
k.a.miernik@gmail.com
Distributed under GNU General Public Licence v3
Gaussian peak fitting class
"""
import math
import numpy
import os
import sys
import time
from lmfit import minimize, Parameters, report_errors
from Pyspectr.exceptions import GeneralError as General... | gpl-3.0 | -4,227,092,687,420,309,000 | 33.423077 | 85 | 0.531844 | false | 3.4442 | false | false | false |
openego/dingo | ding0/core/structure/regions.py | 1 | 13385 | """This file is part of DING0, the DIstribution Network GeneratOr.
DING0 is a tool to generate synthetic medium and low voltage power
distribution grids based on open data.
It is developed in the project open_eGo: https://openegoproject.wordpress.com
DING0 lives at github: https://github.com/openego/ding0/
The docume... | agpl-3.0 | 1,164,557,982,872,893,000 | 33.676166 | 118 | 0.604258 | false | 3.646145 | false | false | false |
poppogbr/genropy | packages/rss/webpages/rss2reader.py | 1 | 3945 | #!/usr/bin/env pythonw
# -*- coding: UTF-8 -*-
#
# untitled
#
# Created by Giovanni Porcari on 2007-03-24.
# Copyright (c) 2007 Softwell. All rights reserved.
#
""" RSS READER """
from gnr.core.gnrbag import Bag
class GnrCustomWebPage(object):
maintable = 'rss.feed'
css_requires = 'rssreader'
py_requir... | lgpl-2.1 | 7,623,119,942,861,548,000 | 44.883721 | 119 | 0.578454 | false | 3.649399 | false | false | false |
iScienceLuvr/PPP-CAS | ppp_cas/mathematicaTree.py | 1 | 6347 | class BinaryOperator:
def __init__(self, left, right):
self.left = left
self.right = right
def __str__(self):
return '%s(%s, %s)' % (self.__class__.__name__, self.left, self.right)
def toCalchas(self, op):
return '(%s%s%s)' % (self.left.toCalchas(), op, self.right.toCalchas... | mit | 3,810,032,212,404,529,000 | 36.116959 | 175 | 0.46715 | false | 3.352879 | false | false | false |
pacoqueen/bbinn | formularios/consulta_productividad.py | 1 | 32558 | #!/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 | 3,453,075,110,896,103,000 | 50.408228 | 255 | 0.517051 | false | 3.441737 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.