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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
facebookresearch/ParlAI | parlai/tasks/qacnn/build.py | 1 | 2282 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Download and build the data if it does not exist.
import parlai.core.build_data as build_data
import os
from parlai.co... | mit | 4,000,458,607,286,963,000 | 30.694444 | 88 | 0.606047 | false | 3.182706 | false | false | false |
globality-corp/microcosm | microcosm/caching.py | 1 | 2214 | """
Component caches.
The object graph caches components to avoid repeated factory calls.
Alternate cache implementations can be used to speed up performance
(or to force re-creation).
"""
from collections import defaultdict
from typing import (
Any,
Dict,
MutableMapping,
Optional,
)
class Cache(Mu... | apache-2.0 | 6,102,927,357,514,617,000 | 22.553191 | 74 | 0.659892 | false | 4.146067 | false | false | false |
m-tmatma/svnmailer | src/lib/svnmailer/settings/configfile.py | 1 | 19384 | # -*- coding: utf-8 -*-
# pylint: disable-msg=W0142,W0201
# pylint-version = 0.7.0
#
# Copyright 2004-2005 André Malo or his licensors, as applicable
#
# 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 Lice... | apache-2.0 | -1,280,867,265,875,339,000 | 31.196013 | 80 | 0.561036 | false | 4.818996 | true | false | false |
botswana-harvard/edc-consent | edc_consent/model_wrappers/consent_model_wrapper_mixin.py | 1 | 2085 | from django.apps import apps as django_apps
from django.core.exceptions import ObjectDoesNotExist
from edc_base.utils import get_uuid
from ..site_consents import site_consents
class ConsentModelWrapperMixin:
consent_model_wrapper_cls = None
@property
def consent_object(self):
"""Returns a conse... | gpl-2.0 | 4,207,711,489,947,004,400 | 32.629032 | 77 | 0.646043 | false | 4.145129 | false | false | false |
sigmavirus24/rpc-openstack | scripts/migrate-yaml.py | 5 | 4910 | #!/usr/bin/env python
# Copyright 2016, Rackspace US, 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 ... | apache-2.0 | -7,286,603,742,286,328,000 | 35.641791 | 79 | 0.612627 | false | 4.258456 | false | false | false |
ngannguyen/immunoseq | src/faCollapse.py | 1 | 11180 | #!/usr/bin/env python
#nknguyen at soe ucsc edu
#Aug 11 2011
#Input: fasta file with the header formatted as:
#>sample;id|v1[,v2,...]|j1[,j2,...]
#Example: >SBC2;Cluster5|TRBV6-3,TRBV6-2|TRBJ2-3;size=365304
#
#Output:
#Mode 1:
#collapse identical sequences regardless of V, J genes, and update the count
#Output header... | mit | -7,190,227,974,986,196,000 | 38.64539 | 296 | 0.560107 | false | 3.351319 | false | false | false |
oxagast/hashnet | stratum/stratum/socksclient.py | 2 | 3660 | # Copyright (c) 2011-2012, Linus Nordberg
# Taken from https://github.com/ln5/twisted-socks/
import socket
import struct
from zope.interface import implements
from twisted.internet import defer
from twisted.internet.interfaces import IStreamClientEndpoint
from twisted.internet.protocol import Protocol, ClientFactory
f... | gpl-2.0 | -378,256,497,683,352,900 | 33.537736 | 78 | 0.624863 | false | 4.326241 | false | false | false |
FedoraScientific/salome-paravis | test/VisuPrs/SWIG_scripts/A6.py | 1 | 1651 | # Copyright (C) 2010-2014 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library ... | lgpl-2.1 | 8,502,181,433,393,482,000 | 31.372549 | 81 | 0.760145 | false | 3.342105 | false | false | false |
niklasf/picochess | utilities.py | 1 | 17927 | # Copyright (C) 2013-2014 Jean-Francois Romang (jromang@posteo.de)
# Shivkumar Shivaji ()
#
# 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 Licens... | gpl-3.0 | -5,303,449,814,740,244,000 | 34.854 | 131 | 0.63145 | false | 3.362784 | false | false | false |
ohaz/pystbin | views.py | 1 | 2245 | import random
import string
from app import app, lexers, auth_key, basepath
from flask import render_template, abort, redirect, url_for, request
from pygments import highlight
from pygments.lexers import *
from pygments.formatters import HtmlFormatter
import json
import os
from forms.upload import TextUploadForm
__a... | apache-2.0 | 575,038,763,473,721,000 | 37.050847 | 115 | 0.557238 | false | 3.723051 | false | false | false |
sauloaldocker/sqlitevcf | query.py | 1 | 2836 | #!/usr/bin/python
import requests
import json
import os
from pprint import pprint as pp
#https://flask-restless.readthedocs.org/en/latest/searchformat.html
#SQLITE_PORT=tcp://172.17.0.57:5000
#SQLITE_PORT_5000_TCP=tcp://172.17.0.57:5000
#SQLITE_PORT_5000_TCP_ADDR=172.17.0.57
#SQLITE_PORT_5000_TCP_PORT=5000
#SQLITE... | mit | 3,060,439,286,862,488,000 | 29.826087 | 171 | 0.659379 | false | 2.810704 | false | false | false |
ev-agelos/Python-bookmarks | bookmarks/api/subscriptions.py | 1 | 2094 | from flask import g
from flask.views import MethodView
from flask_login import login_required
from flask_smorest import Blueprint, abort
from bookmarks import db, csrf
from bookmarks.users.models import User
from .schemas import SubscriptionsSchema, SubscriptionsGETSchema, SubscriptionsPOSTSchema
subscriptions_api =... | mit | 7,021,387,477,752,302,000 | 34.491525 | 104 | 0.668099 | false | 4.089844 | false | false | false |
amenonsen/ansible | test/units/modules/network/fortios/test_fortios_application_list.py | 21 | 12113 | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 | 8,224,006,996,510,553,000 | 38.200647 | 142 | 0.607612 | false | 3.901127 | true | false | false |
simleo/pydoop | test/hdfs/test_core.py | 2 | 1326 | # BEGIN_COPYRIGHT
#
# Copyright 2009-2021 CRS4.
#
# 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 agree... | apache-2.0 | -3,836,395,712,919,962,600 | 25 | 77 | 0.63273 | false | 3.693593 | true | false | false |
dhondta/tinyscript | tests/test_helpers_path.py | 1 | 3480 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""Pathlib extension tests.
"""
from tempfile import gettempdir
from unittest import TestCase
from tinyscript.helpers.path import *
from utils import *
class TestHelpersPath(TestCase):
@classmethod
def setUpClass(cls):
global FILE, PATH, SPATH, TEST, TP... | agpl-3.0 | 4,845,431,443,899,050,000 | 39.465116 | 79 | 0.625 | false | 3.625 | true | false | false |
ManocLabs/manoc-agent-dhcpd | manoc_agents/dhcp/parser.py | 1 | 3171 | import re
import time
class DHCPReservation(object):
def __init__(self, name, hostname, ipaddr, hwaddr):
self.name = name
self.hwaddr = hwaddr
self.ipaddr = ipaddr
self.hostname = hostname or ''
def __str__(self):
return "%s at %s(%s)" % (self.hwaddr, self.i... | artistic-2.0 | -5,095,933,359,066,485,000 | 27.827273 | 88 | 0.463576 | false | 3.216024 | false | false | false |
fossfreedom/coverart-browser | coverart_window.py | 1 | 9621 | # -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*-
#
# Copyright (C) 2014 - fossfreedom
# GTK3 port https://github.com/exaile-dev/exaile/blob/master/xlgui/cover.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... | gpl-3.0 | 4,042,138,049,719,027,000 | 40.830435 | 102 | 0.594637 | false | 3.930147 | false | false | false |
apple/llvm-project | lldb/packages/Python/lldbsuite/test/lldbplatform.py | 5 | 1606 | """ This module represents an abstraction of an lldb target / host platform. """
from __future__ import absolute_import
# System modules
import itertools
# Third-party modules
import six
# LLDB modules
import lldb
windows, linux, macosx, darwin, ios, tvos, watchos, bridgeos, darwin_all, \
darwin_embedded, darw... | apache-2.0 | -3,862,879,611,099,412,000 | 29.301887 | 80 | 0.645081 | false | 3.592841 | false | false | false |
philuu12/PYTHON_4_NTWK_ENGRS | wk4_hw/ex4_pexpect.py | 1 | 1190 | #!/usr/bin/env python
"""
Assignment 4:
Use Pexpect to change the logging buffer size (logging buffered <size>) on pynet-rtr2. Verify this change by examining the output of 'show run'.
"""
import pexpect
import re
from getpass import getpass
def main():
ip_addr = '50.76.53.27'
username = 'pyclass'
port = 8... | apache-2.0 | 7,551,633,371,639,440,000 | 25.444444 | 144 | 0.664706 | false | 3.684211 | false | false | false |
xiangke/pycopia | mibs/pycopia/mibs/BLDG_HVAC_MIB.py | 1 | 9490 | # python
# This file is generated by a program (mib2py). Any edits will be lost.
from pycopia.aid import Enum
import pycopia.SMI.Basetypes
Range = pycopia.SMI.Basetypes.Range
Ranges = pycopia.SMI.Basetypes.Ranges
from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N... | lgpl-2.1 | 54,181,090,511,712,080 | 34.811321 | 492 | 0.761222 | false | 2.698322 | true | false | false |
vaginessa/deep-dream-maker | DeepDreamMaker.py | 1 | 3920 | #!/usr/bin/env python
import sys
#import DeepDreamThread
import DeepDreamThread
from PyQt4 import QtGui, QtCore, uic
class Window(QtGui.QMainWindow):
inputImage = "" # input image path
outputLoc = "" # output image path
ddArgs = {
"preview-mode": True # chkPreviewMode
}
def __init__(self):
super(Window, s... | mit | 6,204,087,989,428,352,000 | 30.111111 | 119 | 0.732143 | false | 3.151125 | false | false | false |
daq-tools/kotori | kotori/daq/decoder/airrohr.py | 1 | 1885 | # -*- coding: utf-8 -*-
# (c) 2020-2021 Andreas Motl <andreas@getkotori.org>
import json
from collections import OrderedDict
class AirrohrDecoder:
"""
Decode JSON payloads in Airrohr format.
Documentation
=============
- https://getkotori.org/docs/handbook/decoders/airrohr.html
- https://comm... | agpl-3.0 | 946,794,173,941,822,600 | 23.166667 | 94 | 0.426525 | false | 3.976793 | false | false | false |
tchen0965/structural_descriptors_repo | substructure_specie.py | 1 | 5118 | #!/usr/bin/env python
"""
This module provides classes to define species components of a substructure
"""
from __future__ import division
__author__ = "Stephen_Dacek"
__credits__ = 'Lusann Wren Yang'
__copyright__ = "Copyright 2014, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Stephen Dacek"
__email_... | mit | -7,338,032,891,123,333,000 | 29.652695 | 135 | 0.604924 | false | 4.010972 | false | false | false |
superDross/GeneaPy | GeneaPy/get_seq.py | 1 | 4817 | import argparse
import re
import sys
import textwrap
import time
import bs4
import requests
import GeneaPy.modules.custom_exceptions as ex
from GeneaPy.modules.common import correct_hg_version
if not sys.platform == "cygwin":
import pysam
# TODO: logging
def get_seq(
location,
hg_version="hg19",
g... | gpl-3.0 | 2,433,655,263,537,011,000 | 28.018072 | 88 | 0.620303 | false | 3.742813 | false | false | false |
justyns/home-assistant | homeassistant/components/device_tracker/owntracks.py | 2 | 6526 | """
Support the OwnTracks platform.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.owntracks/
"""
import json
import logging
import threading
from collections import defaultdict
import homeassistant.components.mqtt as mqtt
from homeassist... | mit | -8,291,491,988,324,720,000 | 33.167539 | 79 | 0.538155 | false | 4.081301 | false | false | false |
BrunoCaimar/ArcREST | samples/append_fc_to_service.py | 2 | 2405 | """
This sample shows how to append a featureclass
to a feature service using ArcRest and ArcRestHelper
version 3.0.1
Python 2
"""
import arcrest, json
from arcresthelper import featureservicetools
from arcresthelper import common
def trace():
"""
trace finds the line, the filename
and e... | apache-2.0 | 2,435,481,213,275,002,000 | 31.958904 | 108 | 0.620374 | false | 3.910569 | false | false | false |
rayman42003/INF123-VVPilot | Serialize.py | 1 | 1568 | '''
Created on May 7, 2014
@author: john
'''
from Ship import Ship
from Bullet import Bullet
import pygame
def serializeObject(obj):
ans = {}
for a in dir(obj):
if not a.startswith('__') and not callable(getattr(obj, a)):
ans[a] = getattr(obj, a)
return ans
def serializeShip(ship):
... | mit | -9,021,653,601,998,105,000 | 29.173077 | 101 | 0.639031 | false | 3.484444 | false | false | false |
Hackathonners/vania | vania/fair_distributor.py | 1 | 5879 | """
This module allows fair distribution of any number of **objects** through a group of **targets**.
By means of a linear programming solver, the module takes into consideration the **weights**/self._weights of the **targets** relative to the **objects**.
and distributes them in the **fairest way possible**.
"""
from ... | mit | 8,698,744,651,155,401,000 | 38.993197 | 157 | 0.571186 | false | 4.518832 | false | false | false |
Fizzadar/SourceServerStats | sourcestats/views/api/maps.py | 1 | 1616 | # Source Server Stats
# File: sourcestats/views/api/maps.py
# Desc: map API views
from flask import jsonify, request
from elasticquery import Filter, Aggregate
from sourcestats.app import app
from sourcestats.util import get_source_apps
from sourcestats.util.elastic import (
get_es_history, get_es_terms,
get_... | mit | -4,149,694,595,828,636,700 | 24.650794 | 70 | 0.650371 | false | 3.536105 | false | false | false |
ace02000/pyload | module/plugins/internal/SimpleHoster.py | 1 | 20792 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import os
import re
import time
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.Hoster import Hoster, create_getInfo, parse_fileInfo
from module.plugins.internal.Plu... | gpl-3.0 | -6,130,063,347,924,812,000 | 37.010969 | 162 | 0.53511 | false | 4.025557 | false | false | false |
chrisnorman7/pyrts | extract-types.py | 1 | 1572 | import os
import os.path
from shutil import rmtree
from yaml import dump
from server.db import (
load, UnitType, FeatureType, BuildingType, dump_object, AttackType, setup
)
from server.options import options
load()
setup()
if os.path.isdir('types'):
rmtree('types')
print('Deleted types directory.')
for... | mpl-2.0 | 3,526,810,110,047,406,600 | 31.75 | 77 | 0.560433 | false | 3.572727 | false | false | false |
Gitweijie/first_project | networking_cisco/tests/unit/cisco/l3/test_asr1k_routertype_driver.py | 1 | 55339 | # Copyright 2015 Cisco Systems, 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 requir... | apache-2.0 | -8,344,775,738,803,985,000 | 49.5379 | 79 | 0.548998 | false | 3.443622 | true | false | false |
mohamedhagag/community-addons | project_hr_stakeholder/project_hr_stakeholder.py | 2 | 5188 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
# <contact@eficent.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | agpl-3.0 | 228,566,512,521,536,670 | 32.908497 | 79 | 0.542598 | false | 4.359664 | false | false | false |
vwoloszyn/pylinguistics | build/lib/pylinguistics/pylinguistics.py | 1 | 1599 | def text(text):
self.number_diff_words = 0 #to be calculated
#should frequency and top words be included?
self.text = text
self.word_count = self.word_count(text)
self.sentence_count = self.sentence_count(text)
self.avg_word_per_sentence = self.avg_word_per_sentence()
self.syllable_count = s... | gpl-2.0 | 3,155,217,023,526,348,000 | 23.227273 | 69 | 0.611007 | false | 3.129159 | false | false | false |
mikrosimage/rez | src/rezplugins/release_hook/command.py | 1 | 6863 | """
Executes pre- and post-release shell commands
"""
from rez.release_hook import ReleaseHook
from rez.exceptions import ReleaseHookCancellingError
from rez.config import config
from rez.system import system
from rez.utils.logging_ import print_debug
from rez.utils.scope import scoped_formatter
from rez.utils.formatti... | lgpl-3.0 | -1,215,019,243,998,917,600 | 35.505319 | 80 | 0.538249 | false | 4.542025 | false | false | false |
meadowfrey/OctoPrint-Dashboard | octoprint_dashboard/services/octoprintService.py | 1 | 5973 | import requests
from octoclient import OctoClient
from octoprint_dashboard.model import Printer
class OctoprintService:
"""
This class is meant to be whole static to simulate singleton
It is collection of functions for communication with OctoPrint via REST API
"""
@staticmethod
def auth(api... | mit | -1,679,295,793,063,056,600 | 32.9375 | 112 | 0.616608 | false | 4.556064 | false | false | false |
otoyo/satisfactory-mobile | satisfactory/settings/production.py | 1 | 2616 | """
Django settings for satisfactory project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ..... | mit | 2,451,916,591,516,850,700 | 20.983193 | 71 | 0.671254 | false | 3.455746 | false | false | false |
Avantol13/mgen | dev/scripts/_project_cfg_importer.py | 2 | 1937 | """
Project Configuration Importer
Handles the importing the project configuration from a separate location
and validates the version against the specified expected version.
NOTE: If you update this file or any others in scripts and require a
NEW variable in project_cfg, then you need to UPDATE THE EXPECTED_CFG... | gpl-3.0 | -3,837,592,634,183,988,700 | 37.74 | 127 | 0.536396 | false | 4.782716 | false | false | false |
rolanddenis/DGtal | wrap/tests/topology/test_DigitalTopology.py | 2 | 1906 | import pytest
import dgtal
import copy
@pytest.mark.parametrize("Type", [
("DT4_8"), ("DT8_4"), ("DT6_18"), ("DT18_6"), ("DT6_26"), ("DT26_6")])
def test_DigitalTopology(Type):
submodule = getattr(dgtal, "topology")
Topo = getattr(submodule, Type)
FAdj = Topo.TForegroundAdjacency
BAdj = Topo.TBackg... | lgpl-3.0 | 6,777,826,099,686,052,000 | 36.372549 | 107 | 0.624869 | false | 3.737255 | false | false | false |
kinnou02/navitia | source/jormungandr/tests/disruptions_tests.py | 1 | 40304 | # 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 | 9,068,643,277,041,564,000 | 45.167239 | 119 | 0.622742 | false | 3.501955 | true | false | false |
mapbox/make-surface | makesurface/scripts/triangulate_raster.py | 3 | 4495 | import rasterio, mercantile, json, click, sys
import tools
import numpy as np
coordOrd = {
False: [
[0, 2, 3, 0],
[0, 2, 1, 0]
],
True: [
[3, 1, 2, 3],
[3, 1, 0, 3]
]
}
class facetParent:
def __init__(self):
... | mit | -69,025,641,960,166,730 | 28.966667 | 110 | 0.4198 | false | 3.678396 | false | false | false |
boto/botoflow | botoflow/context/context_base.py | 2 | 1141 | # Copyright 2013 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompa... | apache-2.0 | 7,749,107,771,422,902,000 | 29.026316 | 75 | 0.700263 | false | 4.089606 | false | false | false |
lmazuel/azure-sdk-for-python | azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/occlusion.py | 2 | 1464 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 7,725,708,355,387,160,000 | 37.526316 | 87 | 0.616803 | false | 4.055402 | false | false | false |
msincenselee/vnpy | vnpy/app/script_trader/ui/widget.py | 3 | 2737 | from pathlib import Path
from vnpy.event import EventEngine, Event
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import QtWidgets, QtCore
from ..engine import APP_NAME, EVENT_SCRIPT_LOG
class ScriptManager(QtWidgets.QWidget):
""""""
signal_log = QtCore.pyqtSignal(Event)
def __init__(self... | mit | 262,172,890,516,599,550 | 25.480392 | 75 | 0.599408 | false | 3.756606 | false | false | false |
mauriciodev/mywing | miniature.py | 1 | 21158 | from PyQt4 import QtGui, QtSvg
#from PyQt4.QtCore import *
from PyQt4 import QtCore
import math, os, copy
from pilot import pilot
from Qt.pilotCard import pilotCard
from copy import deepcopy
from Qt.tokenFactory import Token
import sys
from actionFactory import ActionFactory
if getattr(sys, 'frozen', False):
#... | gpl-2.0 | -6,749,061,765,646,572,000 | 38.038745 | 138 | 0.621987 | false | 3.705429 | false | false | false |
stuarteberg/lazyflow | lazyflow/operators/ioOperators/opStreamingUfmfReader.py | 1 | 3631 | ###############################################################################
# lazyflow: data flow based lazy parallel computation framework
#
# Copyright (C) 2011-2014, the ilastik developers
# <team@ilastik.org>
#
# This program is free software; you can redistribute it and/o... | lgpl-3.0 | 852,401,809,386,938,800 | 34.252427 | 118 | 0.615533 | false | 3.908504 | false | false | false |
mmromero/dwybss | dwybss/bss/utils.py | 1 | 1864 | '''
Created on 26 Sep 2017
@author: Miguel Molina Romero, Techical University of Munich
@contact: miguel.molina@tum.de
@license: LPGL
'''
import numpy as np
def t2_from_slope(a,tes):
(lte, ste) = generate_indexes(len(tes))
# filter out nan or infs
alte = a[lte]
aste = a[ste]
idxnan = np.sque... | lgpl-3.0 | -7,895,310,429,543,205,000 | 24.493151 | 83 | 0.546774 | false | 2.839695 | false | false | false |
xuhao1/Unreal-ROS-Plugin | tools/websocketserver.py | 1 | 1616 | __author__ = 'hao'
import tornado.ioloop
import tornado.web
import tornado.websocket
clients = []
from time import sleep
class IndexHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
def get(request):
request.render("index.html")
class WebSocketChatHandler(tornado.websocket.WebSocketHandler):
de... | mit | -3,455,626,436,515,612,700 | 26.40678 | 87 | 0.681931 | false | 3.647856 | false | false | false |
bowen0701/algorithms_data_structures | lc0152_maximum_product_subarray.py | 1 | 2795 | """Leetcode 152. Maximum Product Subarray
Medium
URL: https://leetcode.com/problems/maximum-product-subarray/
Given an integer array nums, find the contiguous subarray within an array
(containing at least one number) which has the largest product.
Example 1:
Input: [2,3,-2,4]
Output: 6
Explanation: [2,3] has the lar... | bsd-2-clause | 2,506,430,172,706,367,500 | 26.95 | 73 | 0.525939 | false | 3.489388 | false | false | false |
atyndall/tarl | processing/analysis/run_flow.py | 1 | 2392 | # Note: You need to use Jython to run this script
# Run on a Mac using;
# export CLASSPATH=$CLASSPATH:/Applications/Weka.app/Contents/Java/weka.jar
# ~/jython2.5.3/jython run-flow.py
from __future__ import with_statement
import weka.gui.beans.FlowRunner as FlowRunner
import weka.core.Environment as Environment
import ... | gpl-3.0 | -1,762,889,567,669,426,700 | 29.653846 | 158 | 0.6159 | false | 2.756632 | false | false | false |
akhilram/htmlparser | htmlparser/htmlparser.py | 1 | 2516 | from bs4 import BeautifulSoup
import html2text
from bs4 import Tag
# get unformatted text content from all the html tags in the html string that satisfy the tag_filter condition
def get_content_from_tags(html_string, tag_filter):
soup = BeautifulSoup(html_string, 'html.parser')
tag_content = []
for tag in... | mit | -8,036,994,251,568,378,000 | 35.463768 | 110 | 0.695548 | false | 3.806354 | false | false | false |
HaManhDong/pgscm | migrations/versions/56502d362ab5_trackable_user_info.py | 2 | 1843 | """trackable user info
Revision ID: 56502d362ab5
Revises: 456a945560f6
Create Date: 2017-07-05 15:05:42.204968
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy import func
# revision identifiers, used by Alembic.
revision = '56502d362ab5'
down_revision = '456a945560f6'
def upgrade():
# ### co... | apache-2.0 | 3,387,186,490,796,842,500 | 37.395833 | 77 | 0.560499 | false | 3.776639 | false | false | false |
pzbadams/udacity | entertainment_center.py | 1 | 4618 | import fresh_tomatoes
import media
#instances of class Movies
clue = media.Movies("Clue",
"1985",
"PG",
"Six guests are invited to a strange house and must cooperate with the staff to solve a murder mystery.",
"http://upload.wikimedia.org/... | gpl-2.0 | -1,028,014,796,646,602,600 | 74.704918 | 298 | 0.60589 | false | 3.268224 | false | false | false |
Joshuaalbert/RadioAstronomyThings | src/rathings/tests/test_rathings.py | 1 | 2711 | from rathings.phase_unwrap import phase_unwrapp1d
from rathings.tec_solver import l1data_l2model_solve, l1_lpsolver, l1_lpsolver_parallel, robust_l2, robust_l2_parallel
import numpy as np
def test_phase_unwrapp1d():
peak = 30
N = 100
assert peak/(N-1) < np.pi, "choose a valid test case"
phase_true = np... | apache-2.0 | 4,737,687,086,696,042,000 | 44.949153 | 176 | 0.632608 | false | 2.604227 | false | false | false |
stvoutsin/pyrothorn | pyrothorn/pyroquery/vo/ssa.py | 1 | 8672 | # Copyright (C) 2008-2010 Association of Universities for Research in Astronomy (AURA)
# 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
# noti... | gpl-3.0 | 7,810,444,802,989,272,000 | 36.37931 | 86 | 0.686001 | false | 4.098299 | false | false | false |
rhyolight/nupic.research | projects/sdr_paper/plot_noise_results.py | 4 | 7270 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | gpl-3.0 | -9,007,787,948,333,614,000 | 26.437736 | 80 | 0.575791 | false | 3.128227 | false | false | false |
mpg-age-bioinformatics/AGEpy | AGEpy/gtf.py | 1 | 9505 | import pandas as pd
import numpy as np
from collections import OrderedDict
import pybedtools
import csv
def readGTF(infile):
"""
Reads a GTF file and labels the respective columns in agreement with GTF file standards:
'seqname','source','feature','start','end','score','strand','frame','attribute'.
:pa... | mit | -4,804,430,198,436,927,000 | 34.334572 | 209 | 0.604208 | false | 3.33743 | false | false | false |
afloren/nipype | nipype/interfaces/base.py | 1 | 66857 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains interfaces for using existing functionality in other packages
Exaples FSL, matlab/SPM , afni
Requires Packages to be installed
"""
from ConfigParser import NoOptionError
from copy i... | bsd-3-clause | 8,821,377,520,413,040,000 | 35.08041 | 87 | 0.536189 | false | 4.521642 | false | false | false |
oVirt/ovirt-host-deploy | src/plugins/ovirt-host-mgmt/core/offlinepackager.py | 2 | 1945 | #
# ovirt-host-deploy -- ovirt host deployer
# Copyright (C) 2012-2015 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your opt... | lgpl-2.1 | 3,878,422,084,328,899,000 | 26.785714 | 78 | 0.699743 | false | 3.937247 | false | false | false |
zhs007/movieSpider | moviespider/moviespider/spiders/dytt8list2_spider.py | 1 | 1238 | # -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from moviespider.items import Cili006Item
from moviespider.moviedb import MovieDB
import scrapy
class Dytt8List2Spider(Spider):
moviedb = MovieDB()
name = "dytt8list2"
allowed_domains = ["ygdy8.net"]
def s... | mit | 86,514,589,868,046,640 | 27.159091 | 81 | 0.567044 | false | 3.207254 | false | false | false |
MrTheodor/AdResSLab | adresslab/tools_sim.py | 1 | 18296 | """
Copyright (C) 2017
Jakub Krajniak (jkrajniak at gmail.com)
This file is part of AdResSLab.
AdResSLab 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) a... | gpl-3.0 | 6,089,749,683,625,439,000 | 40.489796 | 135 | 0.61221 | false | 3.706645 | false | false | false |
frodrigo/osmose-backend | analysers/analyser_osmosis_addr_interpolation.py | 4 | 7607 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Frédéric Rodrigo 2019 ##
## ... | gpl-3.0 | 8,003,264,785,414,622,000 | 32.650442 | 169 | 0.59119 | false | 3.570423 | false | false | false |
joannadiong/biosig | biosig/statcalc.py | 1 | 4820 | import numpy as np
from scipy import stats
from scipy.stats import t
stats.chisqprob = lambda chisq, df: stats.chi2.sf(chisq, df)
from math import sqrt
def independent(base, test, Nbase, Ntest, zscore=1.96, verbose=False):
"""
Perform independent t-test on 2 arrays, return mean difference and 95% CI.
Arra... | gpl-3.0 | 5,962,420,230,681,679,000 | 34.970149 | 98 | 0.63361 | false | 3.401553 | true | false | false |
hasadna/open-shot | qa/models.py | 1 | 5336 | from django.db import models, transaction
from django.dispatch import receiver
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from django.core.validators import MaxLengthValidator
from taggit.models import TaggedItemBase
from d... | bsd-3-clause | -176,919,385,535,074,530 | 34.573333 | 111 | 0.656109 | false | 4.024133 | false | false | false |
lukius/mts | common/ciphers/block/aes.py | 1 | 1350 | from Crypto.Cipher import AES as AESModule
from common.ciphers.block import BlockCipher
from common.ciphers.block.modes import RandomAccessCTR
from common.tools.blockstring import BlockString
from common.tools.xor import ByteXOR
class AES(BlockCipher):
def _init_cipher(self, key):
return AESModule.n... | mit | -4,348,310,231,684,034,600 | 31.95122 | 59 | 0.64963 | false | 4.166667 | false | false | false |
ceos-seo/Data_Cube_v2 | agdc-v2/datacube/utils.py | 1 | 13408 | # coding=utf-8
"""
Utility functions used in storage modules
"""
from __future__ import absolute_import, division, print_function
import gzip
import json
import logging
import pathlib
from datetime import datetime, date
from dateutil.tz import tzutc
from math import ceil
import dateutil.parser
import jsonschema
impor... | apache-2.0 | 674,855,137,824,050,000 | 28.084599 | 115 | 0.587261 | false | 3.573561 | false | false | false |
visionegg/visionegg | demo/gratings_multi.py | 1 | 2539 | #!/usr/bin/env python
"""Sinusoidal gratings calculated in realtime."""
############################
# Import various modules #
############################
import VisionEgg
VisionEgg.start_default_logging(); VisionEgg.watch_exceptions()
from VisionEgg.Core import *
from VisionEgg.FlowControl import Presentation
f... | lgpl-2.1 | 3,038,146,594,047,141,000 | 32.853333 | 86 | 0.432848 | false | 4.135179 | false | false | false |
whitepyro/debian_server_setup | tests/pp_tests.py | 2 | 3864 | # coding=UTF-8
# Author: Dennis Lutter <lad1337@gmail.com>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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 vers... | gpl-3.0 | 112,575,406,291,892,130 | 33.5 | 88 | 0.607143 | false | 4.004145 | true | false | false |
mpi-sws-rse/antevents-python | micropython/antevents.py | 1 | 7662 |
# antevents for micropython
from ucollections import namedtuple
import utime
class FatalError(Exception):
pass
class ExcInDispatch(FatalError):
# Dispatching an event should not raise an error, other than a fatal error.
pass
_Subscription = namedtuple('_Subscription', ['on_next', 'on_completed', 'on_e... | apache-2.0 | 1,298,562,281,772,137,500 | 33.358744 | 85 | 0.537719 | false | 4.073365 | false | false | false |
sea1815/pyshop | views.py | 1 | 9827 | #!/usr/bin/env python
#coding=utf-8
import sys,os,time
import defines,utils
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
#ok
def setChinese():
session["lang"]="cn"
return redirect(request.referrer)
#ok
def setEnglish():
session["lang"]="en"
return redirect(request... | gpl-2.0 | 9,142,045,288,474,789,000 | 27.484058 | 111 | 0.705505 | false | 3.05661 | false | false | false |
googleapis/googleapis-gen | google/pubsub/v1/pubsub-v1-py/google/pubsub_v1/services/subscriber/transports/base.py | 1 | 19922 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -8,418,116,458,757,313,000 | 36.946667 | 161 | 0.547033 | false | 4.604114 | false | false | false |
kdahlhaus/dynrow | UI/MessageBox.py | 1 | 2009 |
import pygame
import Colors
import Fonts
class MessageBox:
def __init__(self, screenHandle, width, height):
self.screen = screenHandle
self.width = width
self.height = height
def renderText(self, text):
renderedText = Fonts.font48.render(text, True, Colors.BLACK)
posX... | gpl-3.0 | -6,645,322,775,937,165,000 | 40 | 109 | 0.644599 | false | 3.204147 | false | false | false |
jlevy44/Joshua-Levy-Synteny-Analysis | hybridumAnalysisScripts/stats/stackedBarBreakdownCNS.py | 1 | 4573 | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from multiprocessing import Pool
from collections import defaultdict
"""
ABRD_CNSElements_Intergenic.bed
TotalSequenceAmount=2514493bps
NumberOfElements=67480
SpeciesDistribution=BdTRi:65378,BdtwD:66021,BdTRgD:52560,ABRS:64893,BhybzeroS:63930,Bdis... | mit | -783,184,620,844,462,500 | 39.122807 | 296 | 0.623005 | false | 3.125769 | false | false | false |
yoriyuki/nksnd | setup.py | 1 | 3757 | """nksnd: Kana-kanji conversion engine
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(h... | mit | 5,119,180,813,121,190,000 | 34.11215 | 94 | 0.662231 | false | 3.942288 | false | false | false |
artemp/MapQuest-Render-Stack | storage/node/storage_node_pylons/expiry_info/server.py | 1 | 7274 | """ Simple expiry information server built on Twisted. """
#
# expiry information is kept on a metatile basis, per-style
# without regard for the format or position within a
# metatile. this is kept in a mmapped file which is
# periodically flushed in case of node failure.
#
import logging
import struct
import dat... | lgpl-2.1 | -8,448,303,995,937,338,000 | 30.903509 | 99 | 0.578224 | false | 3.898178 | true | false | false |
jac2130/BayesGame | foundations-of-python-network-programming/python3/04/forward_reverse.py | 1 | 1783 | #!/usr/bin/env python
# Foundations of Python Network Programming - Chapter 4 - forward_reverse.py
# Checking whether a host name works both forwards and backwards.
import socket, sys
if len(sys.argv) != 2:
print('usage: forward_reverse.py <hostname>', file=sys.stderr)
sys.exit(2)
hostname = sys.argv[1]
try... | mit | -836,085,793,173,024,100 | 31.418182 | 77 | 0.68424 | false | 3.442085 | false | false | false |
ProjexSoftware/projexui | projexui/widgets/xviewwidget/xviewprofiledialog.py | 2 | 3673 | """ [desc] """
# define authorship information
__authors__ = ['Eric Hulser']
__author__ = ','.join(__authors__)
__credits__ = []
__copyright__ = 'Copyright (c) 2011, Projex Software, LLC'
__license__ = 'LGPL'
__maintainer__ = 'Projex Software, LLC'
__email__ ... | lgpl-3.0 | -7,745,885,028,688,252,000 | 30.219298 | 80 | 0.521372 | false | 4.545792 | false | false | false |
AWegnerGitHub/Stack-Exchange-Scripts | cross_pollination_users/cross_pollinate.py | 1 | 4200 | from __future__ import print_function
import logging
import json
import os.path
import operator
import user_settings
from prettytable import PrettyTable
import os, sys, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.inser... | mit | -267,770,967,769,319,360 | 34.59322 | 152 | 0.597857 | false | 3.223331 | false | false | false |
tylarsen13/file-renamer | rename.py | 1 | 1410 | #!/usr/bin/env python
from os import rename, listdir
import string
userInput = raw_input("Enter Command: ")
extensions = ['jpg', 'JPG', 'png', 'PNG']
list1 = []
fnames = listdir('.')
for fname in fnames:
if fname[-3:] in extensions and fname[0] in string.digits:
list1.append(fname[:-4])
for item in lis... | mit | -5,620,632,339,289,643,000 | 26.666667 | 96 | 0.562411 | false | 3.357143 | false | false | false |
CrowdTruth/CrowdTruth-core | crowdtruth/configuration.py | 1 | 1989 | """
Module used to configure the processing of the input files.
"""
class DefaultConfig():
""" Defines default configuration for cases when users do not provide a custom one.
Creates a class that lets us define how the input file will be processed:
inputColumns: List of input columns from the .csv fil... | apache-2.0 | 6,975,126,244,859,661,000 | 41.319149 | 101 | 0.639015 | false | 4.702128 | false | false | false |
TanksForWaiting/tanks-for-waiting | test_endpoints.py | 1 | 2737 | import requests
get, post, put, delete = requests.get, requests.post, requests.put, requests.delete
firebase_url = "https://tanks-for-waiting.firebaseio.com"
local_url = "http://localhost:8000/api/"
heroku_url = "cryptic-citadel-5628.herokuapp.com/api/"
def test_post_player():
player = post(local_url + 'players/')... | apache-2.0 | 9,038,772,222,845,836,000 | 46.189655 | 113 | 0.636098 | false | 3.212441 | false | false | false |
ianb/sheets | sheets/jsonify.py | 1 | 5322 | import sys
import ast
import astor
import time
import types
import builtins
import inspect
from functools import singledispatch
builtins_set = set()
for _name in dir(builtins):
try:
builtins_set.add(getattr(builtins, _name))
except TypeError:
pass
def jsonify_plain(o, show_repr=False):
if ... | mit | 1,320,004,700,619,620,000 | 26.863874 | 128 | 0.587561 | false | 3.50824 | false | false | false |
danthedeckie/DictLiteStore | tests.py | 1 | 10302 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
'''
Tests for DictLiteStore.
------------------------
'''
import sys
reload(sys)
sys.setdefaultencoding('utf-8') # pylint: disable=no-member
import os
import os.path
from dictlitestore import DictLiteStore, NoJSON, json_or_raw
import unittest
# pylint: disable=missing-docstr... | gpl-3.0 | -7,644,333,895,236,515,000 | 24.493797 | 77 | 0.502628 | false | 3.524528 | true | false | false |
jve2kor/machine-learning-nanodegree | projects/finding_donors/visuals.py | 1 | 5534 | ###########################################
# Suppress matplotlib user warnings
# Necessary for newer version of matplotlib
import warnings
warnings.filterwarnings("ignore", category = UserWarning, module = "matplotlib")
#
# Display inline matplotlib plots with IPython
from IPython import get_ipython
get_ipytho... | gpl-3.0 | 7,874,245,311,236,958,000 | 36.699301 | 114 | 0.580954 | false | 3.372334 | false | false | false |
sekimura/pyscard | smartcard/reader/Reader.py | 2 | 1947 | """Smart card Reader abstract class.
__author__ = "gemalto http://www.gemalto.com"
Copyright 2001-2010 gemalto
Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com
This file is part of pyscard.
pyscard is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General ... | lgpl-2.1 | 990,857,416,565,297,900 | 29.421875 | 75 | 0.673344 | false | 4.142553 | false | false | false |
opengeogroep/inasafe | safe_qgis/utilities/proxy.py | 3 | 2139 | # -*- coding: utf-8 -*-
"""
Useful network functions
begin : 2011-03-01
copyright : (C) 2011 by Luiz Motta
author : Luiz P. Motta
email : motta _dot_ luiz _at_ gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published ... | gpl-3.0 | 5,219,066,164,120,086,000 | 35.254237 | 78 | 0.676952 | false | 3.643952 | false | false | false |
singhdev/streamparse | streamparse/ext/util.py | 1 | 3500 | from __future__ import absolute_import, print_function, unicode_literals
import json
import os
import re
import sys
from glob import glob
from fabric.colors import red
from ..decorators import memoized
def die(msg, error_code=1):
print("{}: {}".format(red("error"), msg))
sys.exit(error_code)
@memoized
de... | apache-2.0 | -4,049,022,831,275,023,000 | 34.714286 | 94 | 0.630857 | false | 3.89755 | true | false | false |
jeremiah-c-leary/vhdl-style-guide | vsg/tests/function/test_rule_010.py | 1 | 1161 |
import os
import unittest
from vsg.rules import function
from vsg import vhdlFile
from vsg.tests import utils
sTestDir = os.path.dirname(__file__)
lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_010_test_input.vhd'))
lExpected = []
lExpected.append('')
utils.read_file(os.path.join(sTestDir,... | gpl-3.0 | -3,937,906,525,298,860,000 | 24.8 | 106 | 0.677003 | false | 3.252101 | true | false | false |
datadaveshin/bioinformatics | parse_select_keep_all.py | 1 | 1936 | """
Dave Shin
Thu Dec 12 02:20:54 PST 2013
Description: Used to select alignments coming out of deltablast-parse.py \n
Modified from:
Usage: python parse-select.py <deltablast-parse output root>
Then hit return to save an alignment and associated gi code,
or any other key followed by return to reject an alignm... | bsd-2-clause | 1,246,728,435,129,790,200 | 32.964912 | 104 | 0.560434 | false | 3.84127 | false | false | false |
duyet-website/api.duyet.net | lib/faker/providers/ssn/sv_SE/__init__.py | 4 | 1578 | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as SsnProvider
from faker.generator import random
import datetime
class Provider(SsnProvider):
@classmethod
def ssn(cls):
"""
Returns a 10 digit Swedish SSN, "Personnummer".
It consists of 10 digits in th... | mit | 5,986,296,666,814,625,000 | 32.574468 | 73 | 0.583016 | false | 3.678322 | false | false | false |
ASMlover/study | zeroMQ/python/pub-sub/sub.py | 1 | 1776 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 ASMlover. 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
# ... | bsd-2-clause | 4,594,127,544,501,953,500 | 35.244898 | 70 | 0.733108 | false | 4.073394 | false | false | false |
alan4186/Hardware-CNN | Software/window_selector.py | 1 | 1892 | import network_params
save_path = "../Hardware/v/window_selector.v"
file_content = """`include "../network_params.h"\
module window_selector(
input clock,
input reset,
input [`BUFFER_OUT_VECTOR_BITWIDTH:0] buffer_vector,
input [`X_COORD_BITWIDTH:0] x,
input [`Y_COORD_BITWIDTH:0] y,
output reg[`CAMERA_PIXE... | mit | -551,996,960,996,292,700 | 24.567568 | 102 | 0.652748 | false | 2.635097 | false | false | false |
showell/zulip | zerver/middleware.py | 1 | 24076 | import cProfile
import logging
import time
import traceback
from typing import Any, AnyStr, Callable, Dict, Iterable, List, MutableMapping, Optional, Union
from django.conf import settings
from django.conf.urls.i18n import is_language_prefix_patterns_used
from django.core.handlers.wsgi import WSGIRequest
from django.d... | apache-2.0 | 5,456,274,963,689,904,000 | 46.207843 | 154 | 0.655383 | false | 4.040953 | false | false | false |
hbiyik/tribler | src/tribler-gui/tribler_gui/widgets/loadingpage.py | 1 | 1486 | from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer
from PyQt5.QtWidgets import QGraphicsScene, QWidget
from tribler_gui.utilities import get_image_path
class LoadingPage(QWidget):
"""
This page is presented when Tribler is starting.
"""
def __init__(self):
QWidget.__init__(self)
... | lgpl-3.0 | 6,509,451,806,866,603,000 | 35.243902 | 107 | 0.681696 | false | 3.733668 | false | false | false |
petebachant/ACSpy | setup.py | 1 | 1092 | #!/usr/bin/env python
# coding=utf-8
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from acspy import __version__
setup(
name='ACSpy',
version=__version__,
author='Pete Bachant',
author_email='petebachant@gmail.com',
packages=['acspy'],
scripts=[... | mit | -101,067,525,118,595,230 | 31.117647 | 67 | 0.618132 | false | 4.152091 | false | false | false |
holloway/docvert | core/docvert_pipeline.py | 1 | 3744 | # -*- coding: utf-8 -*-
import os
import lxml.etree
import docvert_exception
docvert_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def get_pipeline_definition(pipeline_type, pipeline_id, auto_pipeline_id):
pipeline = get_pipeline_xml(pipeline_type, pipeline_id, auto_pipeline_id)
pipeline[... | gpl-3.0 | 3,056,976,216,380,834,300 | 49.594595 | 161 | 0.650107 | false | 3.736527 | false | false | false |
flav-io/flavio | flavio/physics/scattering/test_ee_ww.py | 1 | 2158 | import unittest
from flavio import sm_prediction, np_prediction
import wilson
import numpy as np
Es = np.array([161.3, 172.1, 182.7, 188.6, 191.6, 195.5, 199.5, 201.6, 204.9, 206.6])
class TestEEWW(unittest.TestCase):
def test_ee_ww_SM(self):
for E in Es:
self.assertEqual(sm_prediction('R(e... | mit | 5,493,374,680,018,144,000 | 43.040816 | 92 | 0.465246 | false | 3.113997 | true | false | false |
Azulinho/ansible | lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py | 32 | 16000 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2017, Netservers Ltd. <support@netservers.co.uk>
# (c) 2017, René Moser <mail@renemoser.net>
#
# 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... | gpl-3.0 | 696,855,406,122,352,800 | 30.492126 | 116 | 0.619202 | false | 3.969727 | false | false | false |
Grumbel/dirtool | tests/test_expr.py | 1 | 1845 | # dirtool.py - diff tool for directories
# Copyright (C) 2018 Ingo Ruhnke <grumbel@gmail.com>
#
# 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 opt... | gpl-3.0 | -6,033,646,743,107,950,000 | 28.285714 | 95 | 0.547967 | false | 3.908898 | false | false | false |
OpsidianAI/opsidian-lambda-functions | check-https-validation-date/check-https-validation-date.py | 1 | 1417 | import json
import socket
import ssl
from datetime import datetime, timedelta
from urlparse import urlparse
def ssl_expiry_datetime(hostname):
near = False
ssl_date_fmt = r'%b %d %H:%M:%S %Y %Z'
context = ssl.create_default_context()
conn = context.wrap_socket(
socket.socket(socket.AF_INET),
... | mit | -8,832,558,455,285,322,000 | 26.25 | 79 | 0.618913 | false | 3.778667 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.