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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wadobo/congressus | congressus/tickets/templatetags/tickets.py | 1 | 1531 | import re
from django import template
from django.utils.translation import ugettext as _
from django.utils.html import mark_safe
register = template.Library()
@register.simple_tag
def ticket_seat_class(session, layout, seat, row, col):
row = str(row)
col = str(col)
if seat == 'R':
return 'seat... | agpl-3.0 | 2,939,241,391,327,671,000 | 21.514706 | 93 | 0.614631 | false | 3.150206 | false | false | false |
michaelkirk/QGIS | python/plugins/processing/algs/lidar/lastools/lasnoise.py | 1 | 3645 | # -*- coding: utf-8 -*-
"""
***************************************************************************
lasnoise.py
---------------------
Date : September 2013
Copyright : (C) 2013 by Martin Isenburg
Email : martin near rapidlasso point com
****************... | gpl-2.0 | -8,790,487,615,896,949,000 | 42.915663 | 82 | 0.590672 | false | 4.298349 | false | false | false |
pirate/bookmark-archiver | archivebox/extractors/readability.py | 1 | 4294 | __package__ = 'archivebox.extractors'
from pathlib import Path
from tempfile import NamedTemporaryFile
from typing import Optional
import json
from ..index.schema import Link, ArchiveResult, ArchiveError
from ..system import run, atomic_write
from ..util import (
enforce_types,
download_url,
is_static_fi... | mit | 4,898,612,251,076,805,000 | 30.807407 | 110 | 0.622729 | false | 3.935839 | false | false | false |
tysonholub/twilio-python | twilio/rest/taskrouter/v1/workspace/workspace_statistics.py | 1 | 10107 | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.l... | mit | -1,229,389,616,420,329,200 | 34.588028 | 132 | 0.646977 | false | 4.575373 | false | false | false |
awsdocs/aws-doc-sdk-examples | python/example_code/rekognition/rekognition_collections.py | 1 | 13421 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Purpose
Shows how to use the AWS SDK for Python (Boto3) with Amazon Rekognition to
create a collection that contains faces indexed from a series of images. The
collection is then searched for faces that matc... | apache-2.0 | 4,713,168,682,652,689,000 | 38.12828 | 102 | 0.617167 | false | 4.346179 | false | false | false |
atarax82/lotto-project | project/monitor.py | 1 | 2948 | import os
import sys
#import time
import signal
import threading
import atexit
import queue
_interval = 1.0
_times = {}
_files = []
_running = False
_queue = queue.Queue()
_lock = threading.Lock()
def _restart(path):
_queue.put(True)
prefix = 'monitor (pid=%d):' % os.getpid()
print('%s Change detected to... | gpl-3.0 | -7,386,364,848,896,357,000 | 25.097345 | 76 | 0.585142 | false | 4.140449 | false | false | false |
ESSolutions/ESSArch_Core | ESSArch_Core/agents/documents.py | 1 | 1455 | from elasticsearch_dsl import Date, InnerDoc, Keyword, Nested, Text
from ESSArch_Core.agents.models import Agent
from ESSArch_Core.search.documents import DocumentBase
from ESSArch_Core.tags.documents import autocomplete_analyzer
class AgentNameDocument(InnerDoc):
main = Text()
part = Text()
description ... | gpl-3.0 | 3,981,038,037,303,409,700 | 23.661017 | 81 | 0.57457 | false | 3.869681 | false | false | false |
MasterGowen/moonrain | moonrain/projects/views.py | 1 | 3432 | import json
from django.shortcuts import render, redirect
from django.views.generic.edit import UpdateView, DeleteView
from .models import Project
from ..videos.models import Video, VideosSequence
from ..videos.views import new_sequence, get_sequence
from django.contrib.auth.decorators import login_required
from django... | gpl-2.0 | 8,194,564,417,942,022,000 | 32.656863 | 119 | 0.648893 | false | 4.180268 | false | false | false |
tbetcke/PyBEM2D | examples/circscatt.py | 1 | 1272 | import pybem2d.core.bases as pcb
import pybem2d.core.segments as pcs
import pybem2d.core.quadrules as pcq
import pybem2d.core.kernels as pck
import pybem2d.core.mesh as pcm
import pybem2d.core.assembly as pca
import pybem2d.core.evaluation as pce
import pybem2d.core.visualization as pcv
import numpy as np
k=10
nelem... | mit | 7,395,326,172,782,290,000 | 22.127273 | 100 | 0.750786 | false | 2.359926 | false | true | false |
mjafin/bcbio-nextgen | bcbio/variation/bedutils.py | 1 | 7691 | """Utilities for manipulating BED files.
"""
import os
import shutil
import sys
import subprocess
import toolz as tz
from bcbio import utils
from bcbio.bam import ref
from bcbio.distributed.transaction import file_transaction
from bcbio.pipeline import config_utils
from bcbio.pipeline import datadict as dd
from bcbio... | mit | -970,185,428,665,828,700 | 41.727778 | 115 | 0.606683 | false | 3.415187 | true | false | false |
JeroenZegers/Nabu-MSSS | nabu/neuralnetworks/loss_computers/ms_loss.py | 1 | 2597 | """@file ms_loss.py
contains the MsLoss.
Temporary naming of file and class"""
import loss_computer
import tensorflow as tf
class MsLoss(loss_computer.LossComputer):
"""A loss computer that calculates the loss"""
def __call__(self, targets, logits, seq_length):
# target is actually only required for it's shape... | mit | 8,943,644,888,906,579,000 | 32.727273 | 115 | 0.672699 | false | 2.901676 | false | false | false |
ikosenn/cray-cray | fummy.py | 1 | 2626 | """
Author: ikosenn
This is a program to eliminate stale git branches.
It checks last commits and based on the staleness threshold
eliminates all stale branches
Another CL function is provided to eliminate all available branches.
You can also remove all branches that have already been merged ... | mit | -3,121,794,362,118,456,300 | 25 | 76 | 0.639756 | false | 3.978788 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py | 1 | 19086 | # 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,601,957,632,301,776,000 | 46.125926 | 152 | 0.648643 | false | 4.537803 | true | false | false |
molly/women-social-reformers-on-wikipedia | gather.py | 1 | 2451 | # Copyright (c) 2015–2016 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | mit | 6,424,813,447,681,501,000 | 36.692308 | 116 | 0.665578 | false | 3.905901 | false | false | false |
plin1112/pysimm | pysimm/cassandra.py | 1 | 67253 | # ******************************************************************************
# pysimm.cassandra module
# ******************************************************************************
#
# ******************************************************************************
# License
# *************************************... | mit | -1,943,103,293,411,142,400 | 45.063699 | 123 | 0.549686 | false | 3.921 | false | false | false |
chop-dbhi/varify-data-warehouse | vdw/samples/migrations/0008_force_migrate_default_cohort_and_project.py | 1 | 23232 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from vdw.samples.models import DEFAULT_COHORT_NAME, DEFAULT_PROJECT_NAME
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
Project ... | bsd-2-clause | -32,546,773,490,712,990 | 78.835052 | 192 | 0.544594 | false | 3.663198 | false | false | false |
kingtaurus/cs224d | assignment1/q3_word2vec_sol.py | 1 | 7778 | import numpy as np
import random
from q1_softmax_sol import softmax_sol as softmax
from q2_gradcheck import gradcheck_naive
from q2_sigmoid_sol import sigmoid_sol as sigmoid
from q2_sigmoid_sol import sigmoid_grad_sol as sigmoid_grad
def normalizeRows_sol(x):
""" Row normalization function """
# Implement a... | mit | 4,524,440,371,980,069,400 | 43.193182 | 120 | 0.576369 | false | 4.250273 | false | false | false |
taxpon/sverchok | ui/sv_icons.py | 1 | 1302 | import bpy
import os
import glob
import bpy.utils.previews
# custom icons dictionary
_icon_collection = {}
def custom_icon(name):
load_custom_icons() # load in case they custom icons not already loaded
custom_icons = _icon_collection["main"]
default = lambda: None # for no icon with given name will r... | gpl-3.0 | 1,090,800,781,951,556,500 | 23.111111 | 76 | 0.667435 | false | 3.481283 | false | false | false |
romeotestuser/glimsol_report | report/billing_statement.py | 1 | 2348 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | gpl-2.0 | 385,092,275,381,778,500 | 32.557143 | 165 | 0.57879 | false | 4.185383 | false | false | false |
nash-x/hws | neutron/plugins/l2_proxy/agent/clients.py | 1 | 9765 | # Copyright 2014, Huawei, 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 by... | apache-2.0 | 659,710,628,943,577,700 | 30.704545 | 79 | 0.603277 | false | 4.198194 | false | false | false |
sibskull/synaptiks | synaptiks/monitors/mouses.py | 1 | 8959 | # -*- coding: utf-8 -*-
# Copyright (c) 2011, Sebastian Wiesner <lunaryorn@googlemail.com>
# 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... | bsd-2-clause | -3,596,675,670,361,718,300 | 35.717213 | 79 | 0.650854 | false | 4.227938 | false | false | false |
snoopycrimecop/openmicroscopy | components/tools/OmeroPy/test/integration/gatewaytest/test_get_objects.py | 1 | 45419 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
gateway tests - Testing the gateway.getObject() and deleteObjects() methods
Copyright 2013-2015 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
pytest fixtures used as defined in conftest.py:
- gatewa... | gpl-2.0 | -8,658,934,620,634,377,000 | 39.918018 | 79 | 0.615381 | false | 4.025793 | true | false | false |
WA4OSH/Learn_Python | oldLady.py | 1 | 2383 | #-------------------------------------------------------------------------------
# Name: oldLady.py
# Purpose: Demo of program control, loops, branches, etc.
#
# Author: Konrad Roeder, adapted from the nusery rhyme
# There was an Old Lady song from the
# Secret History of Nurse... | cc0-1.0 | 2,651,610,528,392,757,000 | 33.536232 | 80 | 0.579522 | false | 3.621581 | false | false | false |
linsalrob/EdwardsLab | patric/parse_gto.py | 1 | 2770 | """
Parse a GTO object
"""
import os
import sys
import argparse
from roblib import bcolors
import json
def list_keys(gto, verbose=False):
"""
List the primary keys in the patric file
:param gto: the json gto
:param verbose: more output
:return:
"""
print("{}".format("\n".join(gto.keys())... | mit | -2,918,537,910,248,930,000 | 27.556701 | 107 | 0.558123 | false | 3.349456 | false | false | false |
BenKettlewell/Livestreamer-Command-Line-Generator | livestreamerCLG.py | 1 | 2267 | ''' Parses crunchyroll URLs and provides a string command line argument to
download them.
Utilizing youtube-dl to split sub and video files but livestreamer functionality
can be added with minimal effort
-h, --help Output this help document
-u, --url Provide a single url
-f, --file Provide location of... | gpl-2.0 | -2,636,595,250,218,402,000 | 31.385714 | 89 | 0.613586 | false | 3.704248 | false | false | false |
root-mirror/root | tutorials/roofit/rf604_constraints.py | 11 | 2705 | ## \file
## \ingroup tutorial_roofit
## \notebook -nodraw
## Likelihood and minimization: fitting with constraints
##
## \macro_code
##
## \date February 2018
## \authors Clemens Lange, Wouter Verkerke (C++ version)
from __future__ import print_function
import ROOT
# Create model and dataset
# ----------------------... | lgpl-2.1 | 5,271,455,174,840,602,000 | 28.402174 | 96 | 0.621072 | false | 3.174883 | false | false | false |
valdur55/py3status | py3status/modules/keyboard_locks.py | 1 | 2349 | r"""
Display NumLock, CapsLock, and ScrLock keys.
Configuration parameters:
cache_timeout: refresh interval for this module (default 1)
format: display format for this module
*(default '[\?if=num_lock&color=good NUM|\?color=bad NUM] '
'[\?if=caps_lock&color=good CAPS|\?color=bad CAPS] '
... | bsd-3-clause | -3,356,702,791,891,390,500 | 26.635294 | 88 | 0.57301 | false | 3.182927 | false | false | false |
MaxIV-KitsControls/netspot | netspot/ts_lib.py | 1 | 5698 | #!/usr/bin/python -tt
"""Junos Interface Troubleshooting library."""
import re
import warnings
import helpers
from napalm import get_network_driver
from jnpr.junos.exception import ConnectRefusedError, ConnectAuthError
# JUNOS MAC table RE
RE_VLAN = r'\s+([\w\d-]+)\s+'
RE_MAC = r'\s?([*\w\d:]+)\s+'
RE_TYPE = r'\s?(... | mit | -7,438,312,396,324,293,000 | 26.931373 | 107 | 0.586697 | false | 3.493562 | false | false | false |
ndaniels/Ammolite | scripts/figure-generators/smsdIsoCompare.py | 1 | 1534 | import matplotlib.pyplot as plt
from pylab import polyfit, poly1d, show, savefig
import sys
def isNumber( s):
try:
float(s)
return True
except ValueError:
return False
def makeGraph(X,Y, xName, yName, name="NoName"):
fig = plt.figure()
ax = fig.add_subplot(111)
superName = "Comparison of {} and {}".format(... | gpl-2.0 | 7,310,710,760,138,721,000 | 22.96875 | 95 | 0.634289 | false | 2.635739 | false | false | false |
Frencil/box-python-sdk | test/unit/object/test_events.py | 1 | 8316 | # coding: utf-8
from __future__ import unicode_literals
from itertools import chain
import json
from mock import Mock
import pytest
from requests.exceptions import Timeout
from six.moves import map # pylint:disable=redefined-builtin
from six.moves.urllib.parse import urlencode, urlunsplit # pylint:disable=import-... | apache-2.0 | -5,183,375,154,726,981,000 | 29.686347 | 138 | 0.684343 | false | 3.584483 | true | false | false |
alexisVallet/anime-bgrm | objectSegmentation.py | 1 | 3095 | import disjointSetForest as dsj
import cv2
import numpy as np
def toRowMajor(cols, i, j):
return i * cols + j
def fromRowMajor(cols, idx):
return (idx / cols, idx % cols)
class ObjectsSegmentation:
""" Disjoint set forest, with the additional semantic element of an image to segment
into backgroun... | gpl-2.0 | -6,634,703,475,703,437,000 | 35.845238 | 88 | 0.555412 | false | 3.84472 | false | false | false |
crypto101/arthur | arthur/test/test_util.py | 1 | 4581 | from arthur.util import MultiDeferred
from twisted.internet import defer
from twisted.trial import unittest
class MultiDeferredTests(unittest.SynchronousTestCase):
"""
Tests for L{defer.MultiDeferred}, except now in Arthur.
See tm.tl/6365.
"""
def setUp(self):
self.multiDeferred = MultiDe... | isc | -7,686,488,387,015,034,000 | 31.956835 | 84 | 0.629993 | false | 4.379541 | true | false | false |
OffenesJena/JenLoRa | LoPy/LoAirRohr01/lib/DHT22RinusW.py | 1 | 2355 | from machine import enable_irq, disable_irq
import time
# this onewire protocol code tested with Pycom LoPy device and AM2302/DHT22 sensor
def getval(pin):
ms = [1]*700 # needs long sample size to grab all the bits from the DHT
time.sleep(1)
pin(0)
time.sleep_us(10000)
pin(1)
irqf = dis... | apache-2.0 | 6,041,025,592,553,690,000 | 33.632353 | 248 | 0.546072 | false | 3.026992 | false | false | false |
Ilias95/lib389 | lib389/tests/dseldif_test.py | 1 | 4107 | # --- BEGIN COPYRIGHT BLOCK ---
# Copyright (C) 2017 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
#
import logging
import pytest
from lib389._constants import *
from lib389.dseldif import DSEldif
from lib389.topologies ... | gpl-3.0 | 5,447,008,069,091,832,000 | 30.592308 | 75 | 0.661066 | false | 3.186191 | true | false | false |
darbaga/simple_compiler | virtual_machine.py | 1 | 2139 | class VirtualMachine:
def __init__(self, ram_size=512, executing=True):
self.data = {i: None for i in range(ram_size)}
self.stack = []
self.executing = executing
self.pc = 0
self.devices_start = 256
def push(self, value):
"""Push something onto the stack."""
... | bsd-3-clause | 2,304,611,489,600,544,300 | 34.65 | 103 | 0.610566 | false | 4.113462 | false | false | false |
gladgod/zhiliao | zhiliao/twitter/defaults.py | 1 | 2296 | """
Default settings for the ``mezzanine.twitter`` app. Each of these can be
overridden in your project's settings module, just like regular
Django settings. The ``editable`` argument for each controls whether
the setting is editable via Django's admin.
Thought should be given to how a setting is actually used before
... | bsd-3-clause | 6,396,643,095,361,620,000 | 29.613333 | 78 | 0.708624 | false | 3.965458 | false | false | false |
nmmmnu/MessageQueue | protocols/memcachedhandler.py | 1 | 4321 | #
# Memcached protocol implementation
# Nikolay Mihaylov nmmm@nmmm.nu
#
# For Memcached telnet protocol see:
# http://blog.elijaa.org/?post/2010/05/21/Memcached-telnet-command-summary
import asynchat
import time
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
class Memca... | gpl-3.0 | 3,332,516,228,514,705,400 | 15.123134 | 74 | 0.585744 | false | 2.837163 | false | false | false |
pandysong/dxf2kicad_mod | dxf2kicad_mod.py | 1 | 4880 | # refer to http://pythonhosted.org/dxfgrabber/#
# Note that there must not a line or shape overlapped
import sys
import math
import functools
from itertools import groupby
import dxfgrabber
import kicad_mod_format as kf
def _arc_point(center, radius, angle_degree):
'''
point defined by arc cen... | gpl-3.0 | 8,028,408,619,376,183,000 | 31.197279 | 79 | 0.518648 | false | 3.92283 | false | false | false |
cidles/poio-api | src/poioapi/io/graf.py | 1 | 18028 | # -*- coding: utf-8 -*-
#
# Poio Tools for Linguists
#
# Copyright (C) 2009-2013 Poio Project
# Author: António Lopes <alopes@cidles.eu>
# URL: <http://media.cidles.eu/poio/>
# For license information, see LICENSE.TXT
""" This document contain the responsible
methods to write and parse the GrAF files.
The p... | apache-2.0 | -3,918,818,425,620,900,400 | 28.818803 | 80 | 0.568758 | false | 4.361723 | false | false | false |
brain-research/mirage-rl-qprop | sandbox/rocky/tf/q_functions/continuous_mlp_q_function.py | 1 | 6100 | from sandbox.rocky.tf.q_functions.base import QFunction
import numpy as np
from rllab.core.serializable import Serializable
from sandbox.rocky.tf.core.layers_powered import LayersPowered
from sandbox.rocky.tf.core.layers import batch_norm
from sandbox.rocky.tf.policies.base import StochasticPolicy
from sandbox.rocky.t... | mit | -6,248,511,351,676,138,000 | 40.216216 | 107 | 0.562787 | false | 3.605201 | false | false | false |
blockstack/blockstack-server | integration_tests/blockstack_integration_tests/scenarios/name_import_expire_pre_reg_expire_pay2ns_multi.py | 1 | 8928 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Blockstack
~~~~~
copyright: (c) 2014-2015 by Halfmoon Labs, Inc.
copyright: (c) 2016 by Blockstack.org
This file is part of Blockstack
Blockstack is free software: you can redistribute it and/or modify
it under the terms of the GNU General... | gpl-3.0 | -6,916,285,018,192,869,000 | 35.292683 | 230 | 0.660506 | false | 3.173836 | true | false | false |
diefenbach/django-cba | cba/layouts.py | 1 | 1576 | from . base import Component
class Grid(Component):
"""A CSS grid layout.
A grid consists arbitrary rows and 16 columns per row. see http://semantic-ui.com/collections/grid.html
for more.
"""
template = "cba/layouts/grid.html"
class Column(Component):
"""A column of a grid.
width
... | bsd-3-clause | 7,044,278,349,596,012,000 | 28.185185 | 107 | 0.607234 | false | 3.734597 | false | false | false |
lekston/ardupilot | Tools/autotest/autotest.py | 1 | 18930 | #!/usr/bin/env python
"""
APM automatic test suite
Andrew Tridgell, October 2011
"""
from __future__ import print_function
import atexit
import fnmatch
import glob
import optparse
import os
import shutil
import signal
import sys
import time
import traceback
from apmrover2 import *
from arducopter import *
from quadp... | gpl-3.0 | -2,348,797,625,056,130,600 | 31.414384 | 148 | 0.609245 | false | 3.532375 | true | false | false |
walchko/pygecko | retired/find_geckocore.py | 1 | 1087 | # #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
# ##############################################
# # The MIT License (MIT)
# # Copyright (c) 2018 Kevin Walchko
# # see LICENSE for full details
# ##############################################
# # import time
# import argparse
# import os
# from pygecko.transport.beac... | mit | -3,143,877,320,339,952,600 | 31.939394 | 107 | 0.516099 | false | 3.439873 | false | false | false |
yoshrote/valid_model | valid_model/descriptors.py | 1 | 7772 | from datetime import datetime, timedelta
import six
from .base import Generic, Object
from .exc import ValidationError
from .utils import is_descriptor
class SimpleType(Generic):
"""This descriptor will not attempt to coerce the value on __set__."""
_type_klass = None
_type_label = None
def __set_... | mit | 7,817,542,412,266,166,000 | 28.439394 | 89 | 0.573726 | false | 4.492486 | false | false | false |
walterbender/story | collabwrapper.py | 1 | 33058 | # Copyright (C) 2015 Walter Bender
# Copyright (C) 2015 Sam Parkinson
#
# 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.
... | gpl-3.0 | 3,951,370,830,328,633,000 | 36.438279 | 79 | 0.616038 | false | 4.068176 | false | false | false |
amsimoes/bat-country | batcountry/batcountry.py | 1 | 6348 | # import the necessary packages
from __future__ import print_function
from google.protobuf import text_format
from cStringIO import StringIO
from PIL import Image
import scipy.ndimage as nd
import numpy as np
import caffe
import os
class BatCountry:
def __init__(self, base_path, deploy_path, model_path,
patch_model... | mit | -3,119,327,493,951,980,500 | 28.525581 | 78 | 0.675961 | false | 2.93617 | false | false | false |
KonradBreitsprecher/espresso | doc/tutorials/09-swimmer_reactions/EXERCISES/reaction.py | 1 | 9461 | ################################################################################
# #
# Copyright (C) 2010,2011,2012,2013,2014,2015,2016 The ESPResSo project #
# ... | gpl-3.0 | -1,595,223,305,182,569,700 | 31.071186 | 115 | 0.530599 | false | 3.808776 | false | false | false |
heilaaks/snippy | tests/test_api_search_snippet.py | 1 | 58285 | # -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# snippy - software development and maintenance notes manager.
# Copyright 2017-2020 Heikki J. Laaksonen <laaksonen.heikki.j@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | agpl-3.0 | -5,150,466,451,538,383,000 | 38.30209 | 135 | 0.556455 | false | 4.027154 | true | false | false |
DawidvanGraan/HomeAutomation | Raspberry/api.py | 1 | 3437 | #!/bin/sh
from flask import Flask, jsonify
import smbus
import time
import RPi.GPIO as io
import requests
# Plex Call
plexUrl = 'http://192.168.1.100/jsonrpc?request={"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "album", "duration", "showtitle"], "playerid": 1 }, "id": "VideoGetIt... | mit | -7,297,475,318,174,467,000 | 22.380952 | 206 | 0.603142 | false | 2.925106 | false | false | false |
hirofumi0810/asr_preprocessing | swbd/main.py | 1 | 15071 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Make dataset for the End-to-End model (Switchboard corpus).
Note that feature extraction depends on transcripts.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from os.path import join, isfile
impor... | mit | -8,193,133,252,302,720,000 | 43.196481 | 96 | 0.544224 | false | 3.602055 | false | false | false |
ar0551/Wasp | devFiles/data/waspCatalogFix.py | 1 | 54170 | # Wasp: Discrete Design with Grasshopper plug-in (GPL) initiated by Andrea Rossi
#
# This file is part of Wasp.
#
# Copyright (c) 2017, Andrea Rossi <a.rossi.andrea@gmail.com>
# Wasp 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 | 6,861,793,551,399,903,000 | 33.263757 | 210 | 0.642644 | false | 3.278659 | false | false | false |
NCPlayz/CassBotPy | cassandra/bot.py | 1 | 4014 | import datetime
import json
import discord
import os
from discord.ext import commands
from discord.ext.commands.converter import *
class CassandraContext(commands.Context):
def is_float(self, argument):
"""Checks if the argument is a float."""
try:
return float(string) # T... | mit | -1,071,383,508,198,149,500 | 32.016949 | 115 | 0.550573 | false | 4.510112 | false | false | false |
Franky333/crazyflie-clients-python | src/cfclient/ui/tabs/LogTab.py | 1 | 3242 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | gpl-2.0 | 3,133,045,078,609,853,000 | 33.860215 | 79 | 0.614436 | false | 3.512459 | false | false | false |
spinningbytes/deep-mlsa | code/architectures/default_cnn.py | 1 | 2153 | import logging
from keras.layers import Dense, ZeroPadding1D, Embedding, Convolution1D, MaxPooling1D, Flatten, Input
from keras.models import Model
from utils.data_utils import load_embedding_matrix
def create_default_model(config_data):
nb_filter = 200
filter_length = 6
hidden_dims = nb_filter
embe... | apache-2.0 | 6,691,548,136,573,418,000 | 33.190476 | 116 | 0.668834 | false | 3.649153 | false | false | false |
openstack/networking-plumgrid | networking_plumgrid/neutron/tests/unit/extensions/test_providernet.py | 1 | 2158 | # Copyright 2015 PLUMgrid, 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 by ... | apache-2.0 | -443,667,551,993,928,500 | 36.859649 | 78 | 0.659407 | false | 4.026119 | true | false | false |
rndusr/stig | stig/client/filters/base.py | 1 | 22315 | # 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 hope that it will be useful
# but... | gpl-3.0 | 6,356,354,278,953,972,000 | 37.407917 | 106 | 0.540444 | false | 4.271631 | false | false | false |
sajeeshcs/nested_quota_final | nova/tests/unit/virt/libvirt/test_vif.py | 1 | 48234 | # Copyright 2012 Nicira, 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 agr... | apache-2.0 | 7,805,289,528,933,048,000 | 46.103516 | 79 | 0.475432 | false | 4.137061 | true | false | false |
jeremy24/494-graph-algos | python/hw2/timeit.py | 1 | 1308 |
from __future__ import print_function
import time
import os
from graph import Graph
from graph import make
from graph import GraphException
from graph import Matrix
def run(name):
graph = make( name )
ret = [0,0]
start = time.time()
graph.dfs(0)
ret[1] = (time.time()-star... | mit | 3,221,412,540,978,325,000 | 17.818182 | 84 | 0.482416 | false | 3.261845 | false | false | false |
gnarula/eden_deployment | modules/s3db/asset.py | 1 | 56243 | # -*- coding: utf-8 -*-
""" Sahana Eden Assets Model
@copyright: 2009-2014 (c) Sahana Software Foundation
@license: MIT
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 withou... | mit | 1,738,867,762,911,502,600 | 41.161169 | 178 | 0.406131 | false | 5.070134 | false | false | false |
samw3/PyTweeps | pytweeps.py | 1 | 20531 | # PyTweeps: Simple Python program to help manage your twitter followers.
# https://github.com/samw3/PyTweeps
import pkg_resources
import tweepy
import webbrowser
import shelve
import pprint
import sys
import traceback
import time
import collections
from datetime import datetime
from datetime import timedelta
from conf... | gpl-2.0 | 3,758,599,949,243,339,000 | 35.859964 | 132 | 0.509814 | false | 3.972717 | false | false | false |
3dfxsoftware/cbss-addons | invoice_report_per_journal/report/invoice_report_demo.py | 1 | 2131 | # -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
#
# Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
# All Rights Reserved.
# info Vauxoo (info@vauxoo.com)
####################################... | gpl-2.0 | 633,159,658,367,753,600 | 39.980769 | 80 | 0.604411 | false | 4.322515 | false | false | false |
dataplumber/edge | src/main/python/libraries/edge/dateutility.py | 2 | 1665 | from datetime import date, datetime, timedelta
import dateutil.parser
import calendar
"""
Utility class for date and time conversion.
"""
class DateUtility(object):
RFC_822_GMT_FORMAT = "%a, %d %b %Y %H:%M:%S GMT"
@staticmethod
def convertTimeLongToIso(time):
isoTime = ''
try:
... | apache-2.0 | -214,491,296,849,177,860 | 28.210526 | 103 | 0.606006 | false | 4.5 | false | false | false |
MikeFair/www.gittip.com | gittip/csrf.py | 1 | 6543 | """Cross Site Request Forgery middleware, borrowed from Django.
See also:
https://github.com/django/django/blob/master/django/middleware/csrf.py
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/
https://github.com/zetaweb/www.gittip.com/issues/88
"""
import rfc822
import re
import time
import urlpa... | cc0-1.0 | -2,196,269,443,329,078,800 | 36.388571 | 81 | 0.643741 | false | 3.810716 | false | false | false |
ksang/error-extractor | lib/markdown.py | 1 | 2193 | '''
MarkDown format generator
'''
class MarkDown:
'convert raw text to markdown syntax'
def __init__(self):
self.escape_table = {"\\": "\\\\", "`": "\`",
"*": "\*", "_": "\_",
"{": "\{", "}": "\}",
"[": ... | mit | 8,219,994,262,008,899,000 | 29.472222 | 74 | 0.401277 | false | 4.153409 | false | false | false |
levilucio/SyVOLT | ECore_Copier_MM/transformation-Large/HeoperationlefteAnnotationsSolveRefEOperationEAnnotationEOperationEAnnotation.py | 1 | 5078 |
from core.himesis import Himesis
class HeoperationlefteAnnotationsSolveRefEOperationEAnnotationEOperationEAnnotation(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HeoperationlefteAnnotationsSolveRefEOperationEAnnotationEOperationEAnnotation.
"""
... | mit | 2,488,468,065,536,911,000 | 48.300971 | 298 | 0.522844 | false | 3.026222 | false | false | false |
Travelport-Czech/apila | tasks/Lambda.py | 1 | 8808 | import zipfile
import tempfile
import shutil
import os
import os.path
import hashlib
import base64
import json
import logging
import subprocess
import re
import botocore
import tasks.name_constructor as name_constructor
import tasks.bototools as bototools
from tasks.Task import Task
class Lambda(Task):
"""Create a ... | mit | 2,048,214,956,815,787,300 | 41.346154 | 271 | 0.655654 | false | 3.377301 | false | false | false |
gcallah/Indra | indraV1/models/markov_attempts/two_pop_markov_model.py | 1 | 1534 | """
You can clone this file and its companion two_pop_m_run.py
to easily get started on a new two pop markov model.
It also is a handy tool to have around for testing
new features added to the base system. The agents
don't move. They have 50% chance of changing color
from red to blue, or from blue to red.
"""
import i... | gpl-3.0 | 7,503,514,805,912,917,000 | 26.890909 | 73 | 0.602999 | false | 3.617925 | false | false | false |
infojasyrc/client_dataws | client_dataws/lib/util/file_verificator.py | 1 | 2208 | '''
Created on Feb 02, 2013
@author: Jose Sal y Rosas
@contact: arturo.jasyrc@gmail.com
'''
import zlib
import hashlib
class Verificator(object):
def __init__(self):
pass
def set_parameters(self, path='', algorithm='crc32', blocksize=8192):
self.path = path
self.algorithm = algorit... | mit | 8,283,340,951,751,417,000 | 23.544444 | 112 | 0.567029 | false | 3.992767 | false | false | false |
itdxer/django-project-template | {{cookiecutter.project_name}}/apps/users/migrations/0001_initial.py | 1 | 2579 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | mit | 6,700,627,795,742,435,000 | 68.702703 | 289 | 0.651028 | false | 4.312709 | false | false | false |
andrewchenshx/vnpy | vnpy/app/algo_trading/algos/dma_algo.py | 1 | 2651 | from vnpy.trader.constant import Offset, Direction, OrderType
from vnpy.trader.object import TradeData, OrderData, TickData
from vnpy.trader.engine import BaseEngine
from vnpy.app.algo_trading import AlgoTemplate
class DmaAlgo(AlgoTemplate):
""""""
display_name = "DMA 直接委托"
default_setting = {
... | mit | 3,550,596,912,636,014,000 | 25.69697 | 67 | 0.501703 | false | 4.035115 | false | false | false |
smartczm/python-learn | Old-day01-10/s13-day5/get/day5/Atm/src/crontab.py | 1 | 2023 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import json
import time
from config import settings
from src.backend import logger
def main():
card_list = os.listdir(settings.USER_DIR_FOLDER)
for card in card_list:
basic_info = json.load(open(os.path.join(settings.USER_DIR_FOLDER, card, 'basic... | gpl-2.0 | -718,927,813,982,822,900 | 34.134615 | 135 | 0.536946 | false | 2.980424 | false | false | false |
IsmoilovMuhriddin/allgo | rasp/diagnosis.py | 1 | 3928 | import signal
import time
import wiringpi as wp
from rasp.allgo_utils import PCA9685
from rasp.allgo_utils import ultrasonic as uls
LOW = 0
HIGH = 1
OUTPUT = wp.OUTPUT
INPUT = wp.INPUT
CAR_DIR_FW = 0
CAR_DIR_BK = 1
CAR_DIR_LF = 2
CAR_DIR_RF = 3
CAR_DIR_ST = 4
DIR_DISTANCE_ALERT = 20
preMillis = 0
... | mit | -4,003,689,042,530,230,300 | 20.944134 | 196 | 0.647912 | false | 2.550649 | false | false | false |
ppppn/twitter-bot | ReplyAndFav.py | 1 | 6678 | #!/usr/bin/python
# coding: UTF-8
from tweepy.error import TweepError
import random
import re
from const import *
from words import *
from replies import replies
import datetime
import logging
from API import GetAPI
logging.basicConfig(level=LOGLEVEL)
api = None
# 説明
# 関数リスト
# FUNCTION_NAME(args) > Returns(SUCCES... | mit | -1,916,938,151,522,885,000 | 32.989418 | 89 | 0.622821 | false | 3.33541 | false | false | false |
futureshocked/RaspberryPi-FullStack | Complete_Python2_app/lab_app.py | 1 | 6719 | from flask import Flask, request, render_template
import time
import datetime
import arrow
app = Flask(__name__)
app.debug = True # Make this False if you are no longer debugging
@app.route("/")
def hello():
return "Hello World!"
@app.route("/lab_temp")
def lab_temp():
import sys
import Adafruit_DHT
humidity,... | mit | 111,837,944,110,198,480 | 37.843931 | 159 | 0.651883 | false | 2.865245 | false | false | false |
michaelhkw/incubator-impala | tests/comparison/query_profile.py | 1 | 30490 | # 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 | 5,076,192,376,453,511,000 | 37.546144 | 90 | 0.638373 | false | 3.812203 | false | false | false |
karlch/vimiv | vimiv/thumbnail_manager.py | 1 | 10586 | # vim: ft=python fileencoding=utf-8 sw=4 et sts=4
"""Provides classes to store and load thumbnails from a shared cache.
The ThumbnailStore transparently creates and loads thumbnails according to the
freedesktop.org thumbnail management standard.
The ThumbnailManager provides a asynchronous mechanism to load thumbnails... | mit | 974,612,254,628,089,200 | 35.885017 | 80 | 0.601833 | false | 4.171001 | false | false | false |
OpenKMIP/PyKMIP | kmip/pie/objects.py | 1 | 68704 | # Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | apache-2.0 | 5,590,796,173,671,300,000 | 34.45098 | 79 | 0.593939 | false | 4.302605 | false | false | false |
rackerlabs/marconi | marconi/queues/transport/wsgi/v1_0/homedoc.py | 1 | 4656 | # Copyright (c) 2013 Rackspace, 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 w... | apache-2.0 | 9,216,185,514,893,187,000 | 31.788732 | 79 | 0.391323 | false | 4.656 | false | false | false |
dex4er/django-pyc | django_pyc/management/commands/clearpyc.py | 1 | 2097 | import argparse
import os
import re
import sys
from django.core.management import base
class Command(base.BaseCommand):
help = \
"""
Clears .pyc files from the project.
"""
pattern = r'^.+\.pyc$'
def add_arguments(self, parser):
parser.add_argument(
'--noinpu... | lgpl-3.0 | 5,796,214,227,565,749,000 | 36.446429 | 98 | 0.48784 | false | 4.558696 | false | false | false |
daite/textparser | analyze_japanese.py | 1 | 5424 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# The MIT License (MIT)
# Copyright (c) 2015 daite
# 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 limi... | mit | -3,033,339,715,961,497,000 | 29.133333 | 80 | 0.665007 | false | 3.147998 | false | false | false |
znick/anytask | anytask/tasks/models.py | 1 | 16245 | # coding: utf-8
import copy
import sys
import json
from datetime import timedelta
from django.utils import timezone
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Q, Max
from django.utils.translation import ugettext_lazy as _
from... | mit | 2,597,945,272,377,163,300 | 39.148615 | 119 | 0.650166 | false | 3.371906 | false | false | false |
elishowk/django-poser | poser/utils/page.py | 1 | 2014 | # -*- coding: utf-8 -*-
from django.conf import settings
import re
APPEND_TO_SLUG = "-copy"
COPY_SLUG_REGEX = re.compile(r'^.*-copy(?:-(\d)*)?$')
def is_valid_page_slug(page, slug, site, path=None):
"""Validates given slug depending on settings.
"""
# Exclude the page with the publisher_state == page.PUBL... | agpl-3.0 | 1,039,450,840,049,646,100 | 31.483871 | 95 | 0.618669 | false | 3.628829 | false | false | false |
donkawechico/arguman.org | web/premises/views.py | 1 | 23259 | # -*- coding:utf-8 -*-
import json
from datetime import timedelta
from markdown2 import markdown
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.utils import timezone
from django.db.models import Max, Sum
from django.utils.timezone import now
from django.http import HttpRe... | mit | -2,597,903,517,027,247,000 | 32.458993 | 79 | 0.603122 | false | 3.853828 | false | false | false |
jnosal/seth | seth/tests/test_authentication.py | 1 | 2947 | from seth import auth
from seth.tests import IntegrationTestBase
from seth.classy.rest import generics
class DefaultAuthenticatedResource(generics.GenericApiView):
authentication_policy = None
def get(self, **kwargs):
return {}
class BaseAuthenticatedTestCase(IntegrationTestBase):
def extend_a... | mit | 4,533,596,743,129,733,600 | 33.682353 | 95 | 0.673906 | false | 3.79768 | true | false | false |
foursquare/pants | tests/python/pants_test/java/test_nailgun_integration.py | 1 | 1196 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from pants_test.pants_run_integration_test import PantsRunIntegrationTest
class TestNai... | apache-2.0 | 4,745,170,059,667,853,000 | 43.296296 | 99 | 0.72408 | false | 3.761006 | true | false | false |
rustyhowell/raytracer_py | hitable.py | 1 | 2340 | from collections import namedtuple
from vector3 import Vec3, dot
from math import sqrt
from ray import Ray
HitRecord = namedtuple("HitRecord", ['t', 'p', 'normal', 'material'])
class Hitable:
def hit(self, ray_, t_min, t_max):
"""
Determine if the ray will hit the object
:param ray_:
... | mit | 6,299,270,001,141,219,000 | 29 | 71 | 0.478205 | false | 4.034483 | false | false | false |
PaddlePaddle/models | PaddleRec/dssm/infer.py | 1 | 1407 | import paddle.fluid as fluid
import numpy as np
import sys
import args
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger("fluid")
logger.setLevel(logging.INFO)
def infer(args):
place = fluid.CUDAPlace(0) if args.use_gpu else fluid.CPUPlace()
exe ... | apache-2.0 | -6,892,686,518,800,901,000 | 31.465116 | 105 | 0.55914 | false | 3.266979 | false | false | false |
andres-liiver/IAPB13_suvendatud | Kodutoo_16/Kodutoo_16_Andres.py | 1 | 2985 | '''
Kodutoo 16
14.11.2014
Andres Liiver
'''
import time
from matplotlib import pyplot as plt
from Tund16gen import *
def timeFunc(func, *args):
start = time.clock()
func(*args)
return time.clock() - start
def linear_search(lst, num):
for item in lst:
if item == num:
return True
... | mit | -7,427,043,884,688,275,000 | 23.883333 | 90 | 0.529313 | false | 3.213132 | false | false | false |
shouya/thinking-dumps | automata/homework/project2/CYK.py | 1 | 4714 | '''
CYK algorithm for Context Free Language
Author: Chenguang Zhu
CS154, Stanford University
'''
import sys,traceback
import os
import string
maxProductionNum = 100 #max number of productions
VarNum = 4
production = [[0] * 3 for i in range(maxProductionNum+1)]
'''Prouductions in Chomsky Normal Form (C... | mit | 6,106,430,936,488,291,000 | 27.098765 | 157 | 0.530972 | false | 3.317382 | false | false | false |
nexusriot/cinder | cinder/volume/drivers/remotefs.py | 1 | 57137 | # Copyright (c) 2012 NetApp, Inc.
# Copyright (c) 2014 Red Hat, 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... | apache-2.0 | -5,967,509,913,570,102,000 | 38.459254 | 109 | 0.548926 | false | 4.404301 | true | false | false |
Connexions/openstax-cms | news/models.py | 1 | 15456 | from bs4 import BeautifulSoup
from django.db import models
from django import forms
from wagtail.core.models import Page, Orderable
from wagtail.core.fields import RichTextField, StreamField
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel, InlinePanel
from wagtail.images.edit_handlers import Imag... | agpl-3.0 | -7,732,224,415,095,894,000 | 29.788845 | 119 | 0.614777 | false | 3.938838 | false | false | false |
gonicus/gosa | common/src/gosa/common/components/mqtt_proxy.py | 1 | 3896 | # This file is part of the GOsa framework.
#
# http://gosa-project.org
#
# Copyright:
# (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de
#
# See the LICENSE file in the project's top-level directory for details.
import uuid
from tornado import gen
from gosa.common import Environment
from gosa.common.components... | lgpl-2.1 | 8,577,437,640,126,136,000 | 31.198347 | 120 | 0.61037 | false | 4.198276 | false | false | false |
Sightline-Networks/email_bar | email_bar.py | 1 | 1124 | #!/bin/python3
from argparse import ArgumentParser
from configparser import ConfigParser
from os.path import expanduser
from mailbox import MaildirMessage, Maildir
config = ConfigParser()
config_mailboxes = {}
config.read(expanduser('~/.config/email_bar.cfg'))
parser = ArgumentParser()
parser.add_argument('--on... | gpl-2.0 | -6,381,215,655,860,284,000 | 22.416667 | 87 | 0.689502 | false | 3.721854 | true | false | false |
louisLouL/pair_trading | capstone_env/lib/python3.6/site-packages/kafka/protocol/admin.py | 1 | 7824 | from __future__ import absolute_import
from .api import Request, Response
from .types import Array, Boolean, Bytes, Int16, Int32, Schema, String
class ApiVersionResponse_v0(Response):
API_KEY = 18
API_VERSION = 0
SCHEMA = Schema(
('error_code', Int16),
('api_versions', Array(
... | mit | -3,200,656,330,581,579,300 | 25.255034 | 79 | 0.576176 | false | 3.564465 | true | false | false |
kylef/bluepaste | bluepaste/models.py | 1 | 2381 | import datetime
import json
from hashlib import sha1
import requests
import peewee
from rivr_peewee import Database
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments.lexers import JsonLexer
from bluepaste.lexer import BlueprintLexer
from bluepaste.config import BLUEPRINT_PARSER... | mit | 5,149,579,032,192,973,000 | 27.686747 | 110 | 0.660227 | false | 3.663077 | false | false | false |
jacquerie/inspire-dojson | inspire_dojson/hep/rules/bd0xx.py | 1 | 12752 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | gpl-3.0 | -6,248,574,016,785,603,000 | 28.587007 | 107 | 0.559912 | false | 3.674928 | false | false | false |
scopenco/netblock-tools | netnull.py | 1 | 3572 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Author: Andrey Skopenko <andrey@scopenco.net>
'''A tool create ip route rules that blackhole networks by country code
(ex: RU CN etc.) For the correct execution of script need to download geip
database and country codes.'''
import csv
import sys
import optparse
import os... | bsd-3-clause | 179,938,823,875,172,540 | 34.019608 | 79 | 0.493001 | false | 3.951327 | false | false | false |
ju1ius/clisnips | clisnips/tui/widgets/progress/process.py | 1 | 2218 | import multiprocessing
import os
import signal
from clisnips.tui.logging import logger
from .message_queue import MessageQueue
class Process(multiprocessing.Process):
def __init__(self, message_queue: MessageQueue, target, args=(), kwargs=None):
super().__init__(target=target, args=args, kwargs=kwargs o... | gpl-3.0 | 8,363,412,266,626,529,000 | 32.606061 | 82 | 0.584761 | false | 4.099815 | false | false | false |
sanyaade-mobiledev/renderer-service-upnp | test/rendererconsole.py | 1 | 5827 | # -*- coding: utf-8 -*-
# renderer-console
#
# Copyright (C) 2012 Intel Corporation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU Lesser General Public License,
# version 2.1, as published by the Free Software Foundation.
#... | lgpl-2.1 | -1,308,506,136,399,219,500 | 28.420513 | 79 | 0.62402 | false | 3.300921 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.