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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
childsish/lhc-python | lhc/binf/sequence/tools/view.py | 1 | 1311 | import argparse
from textwrap import TextWrapper
from typing import Iterable, Iterator
from lhc.io import open_file
from lhc.io.fasta.iterator import iter_fasta, FastaEntry
def view(sequences: Iterable[FastaEntry]) -> Iterator[FastaEntry]:
for sequence in sequences:
yield FastaEntry(sequence.key, sequenc... | gpl-2.0 | 6,720,135,429,607,178,000 | 30.214286 | 97 | 0.667429 | false | 3.948795 | false | false | false |
ScreamingUdder/mantid | Framework/PythonInterface/test/python/mantid/kernel/ConfigPropertyObserverTest.py | 1 | 1625 | import unittest
import sys
from mantid.kernel import ConfigService, ConfigPropertyObserver
if sys.version_info.major == 2:
import mock
else:
from unittest import mock
class ConfigObserverTest(unittest.TestCase):
def setUp(self):
self.config = ConfigService.Instance()
self._search_director... | gpl-3.0 | -8,097,669,992,963,872,000 | 38.634146 | 94 | 0.705231 | false | 4.113924 | true | false | false |
ruchee/vimrc | vimfiles/bundle/vim-python/submodules/astroid/astroid/arguments.py | 1 | 12669 | # Copyright (c) 2015-2016, 2018-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2015-2016 Ceridwen <ceridwenv@gmail.com>
# Copyright (c) 2018 Bryce Guinta <bryce.paul.guinta@gmail.com>
# Copyright (c) 2018 Nick Drozd <nicholasdrozd@gmail.com>
# Copyright (c) 2018 Anthony Sottile <asottile@umich.edu>
# Copyrig... | mit | -8,454,015,631,666,800,000 | 41.23 | 98 | 0.563896 | false | 4.680089 | false | false | false |
lmaurits/phyltr | src/phyltr/commands/stat.py | 1 | 2074 | from phyltr.commands.base import PhyltrCommand
from phyltr.plumbing.sinks import NullSink
from phyltr.utils.topouniq import are_same_topology
class Stat(PhyltrCommand):
"""
Print basic properties of a tree stream, such as the number of trees and taxa.
"""
sink = NullSink
def __init__(self, **kw):... | gpl-3.0 | -7,865,451,034,940,362,000 | 36.709091 | 82 | 0.593539 | false | 3.422442 | false | false | false |
anjesh/pdf-processor | tests/AbbyyPdfTextExtractorNetworkTest.py | 1 | 1552 | #!/usr/local/bin/python
import unittest
import sys
import os.path
import glob
import ConfigParser
from pdftools.PdfSeparate import *
from abbyy.AbbyyPdfTextExtractor import *
from urllib2 import HTTPError
class AbbyyPdfTextExtractorNetworkTest(unittest.TestCase):
def setUp(self):
self.outdir = "tests/out/... | mit | 732,123,192,711,488,400 | 34.272727 | 129 | 0.659794 | false | 3.543379 | true | false | false |
oasis-open/cti-python-stix2 | stix2/equivalence/pattern/compare/observation.py | 1 | 4026 | """
Comparison utilities for STIX pattern observation expressions.
"""
from stix2.equivalence.pattern.compare import generic_cmp, iter_lex_cmp
from stix2.equivalence.pattern.compare.comparison import (
comparison_expression_cmp, generic_constant_cmp,
)
from stix2.patterns import (
AndObservationExpression, Foll... | bsd-3-clause | -242,542,296,575,925,300 | 30.952381 | 80 | 0.676105 | false | 3.823362 | false | false | false |
carthagecollege/django-djsani | djsani/wsgi_default.py | 1 | 1133 | """
WSGI config for djproj project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os, sys
# python
sys.path.append('/usr/lib/python2.7/')
sys.path.append('/usr/lib/python2.7... | bsd-3-clause | 4,434,000,773,288,951,300 | 33.333333 | 141 | 0.733451 | false | 2.958225 | false | false | false |
fastflo/emma | emmalib/providers/sqlite/SQLiteDb.py | 1 | 1989 | # -*- coding: utf-8 -*-
# emma
#
# Copyright (C) 2006 Florian Schmidt (flo@fastflo.de)
# 2014 Nickolay Karnaukhov (mr.electronick@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 F... | gpl-2.0 | 523,820,491,419,384,800 | 36.528302 | 95 | 0.644042 | false | 3.825 | false | false | false |
misakwa/thriftpy | thriftpy/transport/socket.py | 1 | 5179 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import errno
import os
import socket
import sys
from . import TTransportBase, TTransportException
class TSocketBase(TTransportBase):
def _resolveAddr(self):
if self._unix_socket is not None:
return [(socket.AF_UNIX, socket.SOCK_... | mit | 2,614,252,231,078,470,700 | 31.987261 | 79 | 0.533501 | false | 4.31224 | false | false | false |
PaddlePaddle/Paddle | python/paddle/text/datasets/imdb.py | 1 | 4903 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | -5,576,723,212,398,419,000 | 33.286713 | 93 | 0.581277 | false | 3.836463 | false | false | false |
googleapis/sphinx-docfx-yaml | docfx_yaml/utils.py | 1 | 1729 | # Copyright 2021 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 agreed to in writing, ... | apache-2.0 | 9,017,048,866,687,380,000 | 29.875 | 88 | 0.710237 | false | 3.947489 | false | false | false |
seeschloss/grammalecte | pythonpath/grammalecte/fr/cregex.py | 1 | 5484 | # -*- encoding: UTF-8 -*-
# Grammalecte - Compiled regular expressions
import re
#### Lemme
Lemma = re.compile("^>(\w[\w-]+)")
#### Analyses
Gender = re.compile(":[mfe]")
Number = re.compile(":[spi]")
#### Nom et adjectif
NA = re.compile(":[NA]")
## nombre
NAs = re.compile(":[NA].*:s")
NAp = re.compile(":[NA].*:p"... | gpl-3.0 | -850,004,207,733,125,000 | 23.145374 | 85 | 0.572158 | false | 2.498177 | false | false | false |
AJHMvR/django-spotnet | spotnet/downloadserver/watchfolder.py | 1 | 2431 | from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy, ugettext
import os
from ..downloading import DownloadServer, FsError
class WatchfolderDownloadServer(DownloadServer):
def __init__(self, dirpath, **kwargs):
if not os.path.isdir(dirpath):
... | gpl-3.0 | 7,906,408,022,219,077,000 | 35.833333 | 79 | 0.497738 | false | 4.436131 | false | false | false |
dmnfarrell/peat | pKa/MD_elec.py | 1 | 7882 | #!/usr/bin/env python
#
# pKa - various programs and scripts for pKa value analysis, calculation and redesign
# Copyright (C) 2010 Jens Erik Nielsen
#
# 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 Foundat... | mit | 2,291,590,608,648,311,300 | 29.432432 | 98 | 0.49188 | false | 3.898121 | false | false | false |
jmnybl/SD-2nd-layer-prediction | train.py | 1 | 3088 | import argparse
import os
import codecs
import sys
import StringIO
import second_layer
from tree import read_conll
import tree
from features import convert_toNumbers
import json
import time
def train(args):
"""
main() to launch everything
"""
if not args.no_ccprop:
if not os.path.exists(os.pa... | gpl-2.0 | 985,428,177,355,106,300 | 39.103896 | 183 | 0.650259 | false | 3.404631 | false | false | false |
JarbasAI/jarbas-core | mycroft/jarbas-skills/skill_near_earth_object_tracker/__init__.py | 1 | 6165 | from adapt.intent import IntentBuilder
from mycroft.skills.core import MycroftSkill
from mycroft.util.log import getLogger
import unirest
import os
import time
import webbrowser
__author__ = 'jarbas'
LOGGER = getLogger(__name__)
class NEOSkill(MycroftSkill):
def __init__(self):
super(NEOSkill, self)._... | gpl-3.0 | -6,935,500,169,262,557,000 | 35.696429 | 107 | 0.526358 | false | 3.449916 | false | false | false |
andrewalexander/cloud-custodian | c7n/resources/elasticsearch.py | 1 | 1845 | # Copyright 2016 Capital One Services, 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 agreed to in... | apache-2.0 | -3,997,595,062,102,250,500 | 33.166667 | 74 | 0.697561 | false | 4.118304 | false | false | false |
IvanaXu/Test_Class_GOF | tPatterns/Behavioral_Patterns/test_Command_Pattern.py | 1 | 1456 | # -*-coding:utf-8-*-
# @auth ivan
# @time 2016-10-20 20:53:16
# @goal test for Command Pattern
class Order:
def __init__(self):
return
def execute(self):
return
class Stock:
def __init__(self):
self.name = 'ABC'
self.quantity = 10
def buy(self):
print("Stock... | gpl-3.0 | -3,171,332,023,686,319,600 | 18.413333 | 95 | 0.574176 | false | 3.542579 | false | false | false |
dandanvidi/catalytic-rates | scripts/get_data_cache_pFVA_results.py | 1 | 3859 | from rcat import RCAT
import pandas as pd
import numpy as np
from cobra.core import Metabolite, Reaction
from cobra.io.sbml import create_cobra_model_from_sbml_file
from cobra.manipulation.modify import convert_to_irreversible
from copy import deepcopy
from cobra.flux_analysis.variability import flux_variability_analys... | mit | 4,472,997,404,974,120,400 | 36.843137 | 108 | 0.576833 | false | 3.207814 | false | false | false |
AurelienNioche/MonkeyProject | graphics/pause.py | 1 | 1968 | from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from graphics.generic import Colors
class Pause(QWidget):
def __init__(self):
super().__init__()
self.background_color = "white"
self.create_background()
def create_background(self):
pal = Q... | gpl-3.0 | 5,052,131,524,243,271,000 | 21.375 | 81 | 0.5 | false | 4.049383 | false | false | false |
stianrh/askbot-nordic | askbot/mail/__init__.py | 1 | 16973 | """functions that send email in askbot
these automatically catch email-related exceptions
"""
from django.conf import settings as django_settings
DEBUG_EMAIL = getattr(django_settings, 'ASKBOT_DEBUG_INCOMING_EMAIL', False)
import logging
import os
import re
import smtplib
import sys
from askbot import exceptions
from ... | gpl-3.0 | 6,603,444,764,741,411,000 | 34.883721 | 89 | 0.580628 | false | 4.10869 | false | false | false |
google/eclipse2017 | src/solar_eclipse_analysis/extract_image_dimensions.py | 1 | 2062 | """Read images"""
import os
import logging
import argparse
import pickle
from exif import _extract_exif_metadata, _extract_image_metadata
from PIL import Image
from rawkit.raw import Raw
from multiprocessing import Pool
from functools import partial
import libraw
TMPDIR=os.getenv("TMPDIR")
def get_arguments():
p... | apache-2.0 | 3,300,903,939,787,287 | 28.457143 | 92 | 0.611542 | false | 3.890566 | false | false | false |
maniteja123/numdifftools | numdifftools/multicomplex.py | 1 | 10058 | """
Created on 22. apr. 2015
@author: pab
References
----------
A METHODOLOGY FOR ROBUST OPTIMIZATION OF
LOW-THRUST TRAJECTORIES IN MULTI-BODY
ENVIRONMENTS
Gregory Lantoine (2010)
Phd thesis, Georgia Institute of Technology
USING MULTICOMPLEX VARIABLES FOR AUTOMATIC
COMPUTATION OF HIGH-ORDER DERIVATIVES
Gregory Lant... | bsd-3-clause | 2,633,827,981,872,848,000 | 26.110512 | 87 | 0.544939 | false | 2.88774 | false | false | false |
Nekrofage/MinecraftPython | mcpi/minecraftturtle.py | 1 | 17154 | #Minecraft Graphics Turtle
#Martin O'Hanlon
#www.stuffaboutcode.com
import minecraft
import block
import time
import math
#MinecraftDrawing class. Useful functions for drawing objects.
class MinecraftDrawing:
def __init__(self, mc):
self.mc = mc
# draw point
def drawPoint3d(self, x, y, z, blockT... | mit | 3,385,390,198,852,387,000 | 34.589212 | 194 | 0.542847 | false | 3.480925 | false | false | false |
gutooliveira/progScript | tekton/backend/appengine/routes/amigos/rest.py | 1 | 1065 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from gaebusiness.business import CommandExecutionException
from tekton.gae.middleware.json_middleware import JsonResponse
from amigo_app import facade
def index():
cmd = facade.list_amigos_cmd()
amigo_list = cmd()
short_form=... | mit | -157,783,163,359,563,070 | 27.783784 | 69 | 0.710798 | false | 3.016997 | false | false | false |
RazerM/yourls-python | shovel/docs.py | 1 | 1442 | # coding: utf-8
from __future__ import absolute_import, division, print_function
import os
from shutil import rmtree
from plumbum import FG
from plumbum.cmd import pandoc, sphinx_build
from shovel import task
from watchdog.observers import Observer
from watchdog.tricks import ShellCommandTrick
from watchdog.watchmedo... | mit | 1,826,620,503,886,873,600 | 28.428571 | 87 | 0.656727 | false | 3.449761 | false | false | false |
motikadosh/project | meshNet/visualize.py | 1 | 24338 | from __future__ import print_function
from __future__ import division
import os
import time
import numpy as np
import numpy.ma as ma
from scipy.misc import imsave
from mpl_toolkits.axes_grid1 import make_axes_locatable
import matplotlib
# Force matplotlib to not use any Xwindows backend.
# See- https://stackoverflow... | mit | 5,972,630,252,666,030,000 | 33.968391 | 118 | 0.595776 | false | 3.171901 | false | false | false |
Splawik/pytigon | pytigon/static_src/pytigon_js/component.py | 1 | 6483 | # from pytigon_js.tools import load_css, load_many_js
def set_state(component, state):
spec = ("!", "?", "*", "0", "+", "-", "%")
if component.options.hasOwnProperty("state_actions"):
state_actions = component.options["state_actions"]
else:
state_actions = []
for key in Object.keys(sta... | lgpl-3.0 | 3,156,407,132,820,454,400 | 35.835227 | 87 | 0.420022 | false | 5.137084 | false | false | false |
skibblenybbles/django-commando | commando/contrib/south/management/datamigration.py | 1 | 1330 | from commando import management
BaseDataMigrationCommand = management.get_command_class(
"datamigration", exclude_packages=("commando",))
if BaseDataMigrationCommand is not None:
base = BaseDataMigrationCommand()
class DataMigrationCommandOptions(management.CommandOptions):
"""
... | mit | -6,139,418,895,942,126,000 | 29.930233 | 88 | 0.621053 | false | 5.037879 | false | false | false |
peterhgombos/tdt4136 | exercise3/sa.py | 1 | 1931 | # here be imports
import math # for math.exp
import random # for random.randoj
# the main abstract search node class
class SearchNode:
# super init method, takes a state and stores it,
# to be called by subclass' init method
def __init__(self, state):
self.state = state # the state of the node
... | bsd-3-clause | 3,661,242,892,329,662,500 | 34.109091 | 92 | 0.580528 | false | 3.636535 | false | false | false |
PackeTsar/checkmyip | checkmyip.py | 1 | 11330 | #!/usr/bin/python
##### CheckMyIP Server #####
##### Written by John W Kerns #####
##### http://blog.packetsar.com #####
##### https://github.com/packetsar/checkmyip #####
##### Inform version here #####
version = "v1.3.0"
##### Import python2 native modules #####... | gpl-3.0 | 3,367,088,984,333,559,300 | 36.892977 | 87 | 0.691968 | false | 2.866178 | false | false | false |
cr0hn/ktcal2 | ktcal2/lib/ssh_brute.py | 1 | 6101 | # -*- coding: utf-8 -*-
"""
ktcal2: This file contains function for SSH brute forcer.
"""
import asyncio
import asyncssh
import itertools
from .data import FoundCredential
__license__ = '''Copyright (c) cr0hn - cr0hn<-at->cr0hn.com (@ggdaniel) All rights reserved.
Redistribution and use in source and binary forms... | bsd-3-clause | -6,533,807,394,892,013,000 | 35.975758 | 107 | 0.561875 | false | 5.210077 | false | false | false |
klahnakoski/SpotManager | vendor/mo_logs/convert.py | 1 | 2502 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Contact: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import, divis... | mpl-2.0 | -4,565,640,456,867,415,600 | 27.758621 | 110 | 0.58753 | false | 3.203585 | false | false | false |
itensionanders/distcc | include_server/statistics.py | 1 | 5220 | #! /usr/bin/env python3
#
# Copyright 2007 Google 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 2
# of the License, or (at your option) any later version.
#
# This progra... | gpl-2.0 | 3,612,777,638,136,934,000 | 41.786885 | 77 | 0.652299 | false | 3.609959 | false | false | false |
snower/TorMySQL | tormysql/client.py | 1 | 3956 | # -*- coding: utf-8 -*-
# 14-8-8
# create by: snower
'''
MySQL asynchronous client.
'''
from . import platform
from .util import async_call_method
from .connections import Connection
from .cursor import Cursor
from .util import py3
class Client(object):
def __init__(self, *args, **kwargs):
self._args = ... | mit | 6,857,926,019,505,459,000 | 29.430769 | 111 | 0.624874 | false | 4.061602 | false | false | false |
xkong/xlinkwot | xlink/models.py | 1 | 3602 | # coding: utf-8
#
# xiaoyu <xiaokong1937@gmail.com>
#
# 2014/10/14
#
"""
Models for xlink.
"""
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from model_utils import TimeStampedModel
SENSOR_CHOICES = (
('switch', _('Switch')),
... | bsd-3-clause | 2,646,337,800,656,851,500 | 29.268908 | 79 | 0.591616 | false | 3.949561 | false | false | false |
drnextgis/QGIS | python/plugins/processing/modeler/ModelerGraphicItem.py | 1 | 17163 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ModelerGraphicItem.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
********************... | gpl-2.0 | 4,428,795,267,376,200,700 | 42.015038 | 108 | 0.560275 | false | 3.964657 | false | false | false |
vfulco/Flask-WeRoBot | flask_werobot.py | 1 | 3504 | #coding=utf-8
"""
Flask-WeRoBot
---------------
Adds WeRoBot support to Flask.
:copyright: (c) 2013 by whtsky.
:license: BSD, see LICENSE for more details.
Links
`````
* `documentation <https://flask-werobot.readthedocs.org/>`_
"""
__version__ = '0.1.2'
from werobot.robot import BaseRoBot
from flask import Flask
... | bsd-3-clause | 9,168,002,998,156,984,000 | 29.194175 | 81 | 0.562058 | false | 3.001931 | false | false | false |
franckinux/my-own-little-business | molb/views/auth/profile.py | 1 | 5890 | from aiohttp.web import HTTPFound
from aiohttp.web import HTTPMethodNotAllowed
from aiohttp_babel.middlewares import _
import aiohttp_jinja2
from aiohttp_security import authorized_userid
from aiohttp_security import forget
from asyncpg.exceptions import UniqueViolationError
from passlib.hash import sha256_crypt
from w... | agpl-3.0 | 2,568,852,236,197,720,000 | 37.592105 | 91 | 0.578759 | false | 4.067961 | false | false | false |
a-nai/django-wiki | wiki/models/__init__.py | 1 | 3580 | from __future__ import absolute_import
from __future__ import unicode_literals
# -*- coding: utf-8 -*-
from django import VERSION
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
import warnings
from six import string_types
# TODO: Don't use wildcards
from .a... | gpl-3.0 | -6,644,550,487,168,386,000 | 35.907216 | 113 | 0.705307 | false | 4.063564 | true | false | false |
sschuberth/dosocs2 | dosocs2/scanresult.py | 1 | 3069 | # Copyright (C) 2015 University of Nebraska at Omaha
# Copyright (C) 2015 Thomas T. Gurney
#
# This file is part of dosocs2.
#
# dosocs2 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the ... | gpl-2.0 | 7,592,582,733,630,382,000 | 33.483146 | 108 | 0.64288 | false | 3.653571 | false | false | false |
sgordon007/jcvi_062915 | formats/fasta.py | 1 | 69572 | """
Wrapper for biopython Fasta, add option to parse sequence headers
"""
import re
import sys
import os
import os.path as op
import shutil
import logging
import string
from itertools import groupby, izip_longest
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.SeqUtils.Chec... | bsd-2-clause | 2,400,704,709,899,030,000 | 30.366997 | 92 | 0.56964 | false | 3.592296 | false | false | false |
aipescience/django-daiquiri | daiquiri/query/migrations/0004_table_name.py | 1 | 1149 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-11-01 13:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('daiquiri_query', '0003_query_language_and_actual_query'),
]
operations = [
mig... | apache-2.0 | -8,114,461,899,424,736,000 | 31.828571 | 172 | 0.571802 | false | 4.060071 | false | false | false |
leiferikb/bitpop | build/scripts/slave/chromium_commands.py | 1 | 23897 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A subclass of commands.SVN that allows more flexible error recovery.
This code is only used on the slave but it is living in common/ because it is
di... | gpl-3.0 | -104,956,444,141,040,200 | 35.483969 | 80 | 0.653346 | false | 3.74092 | false | false | false |
wcthompson/theia | modules/lights/rpi_ws281x/python/examples/lit.py | 1 | 3691 | # Based on NeoPixel library and strandtest example by Tony DiCola (tony@tonydicola.com)
# To be used with a 12x1 NeoPixel LED stripe.
# Place the LEDs in a circle an watch the time go by ...
# red = hours
# blue = minutes 1-5
# green = seconds
# (To run the program permanently and with autostart use systemd.)
import t... | mit | -1,638,711,738,548,016,000 | 35.186275 | 87 | 0.607965 | false | 3.328224 | false | false | false |
zack3241/incubator-airflow | tests/contrib/sensors/test_hdfs_sensors.py | 1 | 8852 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | -5,978,718,483,553,526,000 | 34.693548 | 82 | 0.499435 | false | 4.615224 | true | false | false |
kernsuite-debian/lofar | CEP/GSM/bremen/src/unifiedConnection.py | 1 | 5949 | #!/usr/bin/env python3
import time
import monetdb.sql as monetdb
import psycopg2
import logging
from src.gsmlogger import get_gsm_logger
from src.utils import raise_with_message
try:
from monetdb.exceptions import OperationalError
except ImportError:
# Older version
from monetdb.monetdb_exceptions import Op... | gpl-3.0 | 1,199,391,448,778,934,800 | 29.19797 | 77 | 0.524122 | false | 4.282937 | false | false | false |
Septima/qgis-qlrbrowser | src/QlrBrowser/mysettings/qgissettingmanager/setting_dialog.py | 1 | 3791 | # -----------------------------------------------------------
#
# QGIS setting manager is a python module to easily manage read/write
# settings and set/get corresponding widgets.
#
# Copyright : (C) 2013 Denis Rouzaud
# Email : denis.rouzaud@gmail.com
#
# -----------------------------------------------------... | gpl-2.0 | -4,152,729,007,021,710,300 | 34.101852 | 106 | 0.582432 | false | 4.674476 | false | false | false |
maxamillion/anitya | anitya/api.py | 1 | 13400 | # -*- coding: utf-8 -*-
import flask
import anitya
import anitya.lib.plugins
import anitya.lib.model
from anitya.app import APP, SESSION
from anitya.doc_utils import load_doc
@APP.template_filter('InsertDiv')
def insert_div(content):
""" Template filter inserting an opening <div> and closing </div>
after t... | gpl-2.0 | 2,827,843,532,739,190,300 | 23.452555 | 80 | 0.548209 | false | 3.812233 | false | false | false |
Yorimor/zurok_bot | yorimor/bot_stats.py | 1 | 1516 | import json
import os
stats_json_file = os.getcwd() + "/stats/command_stats.json"
def get_stats_file():
try:
with open(stats_json_file, "r", encoding="utf-8", errors="replace") as f:
json_file = json.load(f)
except FileNotFoundError:
json_file = {"global": {}, "servers": {}, "user... | mit | 4,984,897,427,109,594,000 | 27.074074 | 81 | 0.594327 | false | 3.288503 | false | false | false |
DTUWindEnergy/Python4WindEnergy | lesson 6/results/cpav/MyUI/MyWidgetUI.py | 1 | 2191 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MyUI\MyWidgetUI.ui'
#
# Created: Tue Apr 01 09:40:20 2014
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except... | apache-2.0 | -9,146,089,206,193,657,000 | 40.339623 | 116 | 0.713829 | false | 4.149621 | false | false | false |
hycis/Pynet | scripts/nii/mgc2spec_thru_decoder.py | 1 | 5476 | import glob
import cPickle
import os
import argparse
import numpy as np
import pynet.datasets.preprocessor as procs
def generate_specs(ext, spec_dir, specnames, datafiles, dtype, feature_size,
output_dir, preprocessor, output_dtype, model):
assert dtype in ['f4', 'f8']
print 'opening model... | apache-2.0 | 3,726,965,375,396,391,400 | 37.56338 | 133 | 0.599708 | false | 3.595535 | false | false | false |
artoonie/transcroobie | hitrequest/models.py | 1 | 1379 | from __future__ import unicode_literals
from django.db import models
from django.contrib.postgres.fields import ArrayField
from django.contrib.postgres.fields import JSONField
class AudioSnippet(models.Model):
audio = models.FileField(upload_to='audioparts/%Y-%m-%d')
# Predictions: each item in the list is a... | gpl-3.0 | -8,674,387,297,139,720,000 | 34.358974 | 81 | 0.701233 | false | 4.116418 | false | false | false |
WoLpH/Trolly | trolly/label.py | 1 | 1268 | from . import trelloobject
class Label(trelloobject.TrelloObject):
'''
Class representing a Trello Label
'''
def __init__(self, trello_client, label_id, name=''):
super(Label, self).__init__(trello_client)
self.id = label_id
self.name = name
self.base_uri = '/labels... | mit | 3,001,780,312,544,061,400 | 25.416667 | 75 | 0.559148 | false | 3.987421 | false | false | false |
scheunemann/KASPAR | kasparGUI/Web/api/modules/interaction.py | 1 | 4362 | from flask import Blueprint, jsonify, abort, request
from kasparGUI.Web.api.database import db_session
from kasparGUI.Web.api.interactionManager import InteractionManager
import kasparGUI.Model as Model
__interactionLog = Blueprint('interaction.log', __name__)
blueprints = [
__interactionLog,
... | mit | 9,048,157,935,545,950,000 | 38.297297 | 158 | 0.619441 | false | 4.053903 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/available_providers_list_country.py | 1 | 1381 | # 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 | 4,282,631,485,875,707,000 | 36.324324 | 77 | 0.604634 | false | 4.426282 | false | false | false |
gciteam6/xgboost | src/features/dataset.py | 1 | 3745 | # Built-in modules
from glob import glob
import re
# Third-party modules
import numpy as np
import pandas as pd
# Hand-made modules
from .base import DataFrameHandlerBase, BloscpackMixin
REGEX_FLAG_NAME_PREFIX = "f_"
class DatasetHandler(DataFrameHandlerBase, BloscpackMixin):
def __init__(self, columns_y):
... | mit | 8,701,407,029,034,433,000 | 32.141593 | 83 | 0.580507 | false | 3.628876 | false | false | false |
trungdtbk/faucet | tests/integration/mininet_multidp_tests.py | 1 | 90086 | #!/usr/bin/env python3
"""Mininet multi-switch integration tests for Faucet"""
import json
import os
import networkx
from mininet.log import error
from clib.mininet_test_base import IPV4_ETH, IPV6_ETH
from clib.mininet_test_base_topo import FaucetTopoTestBase
class FaucetMultiDPTest(FaucetTopoTestBase):
"""Co... | apache-2.0 | 6,794,186,926,606,968,000 | 38.015158 | 103 | 0.535022 | false | 3.584942 | true | false | false |
snorp/hyde | hydeengine/siteinfo.py | 1 | 18444 | import sys
import re
import time as sleeper
import operator
from datetime import date, datetime, time
from threading import Thread, Event
from hydeengine import url
from hydeengine.file_system import File, Folder
class SiteResource(object):
def __init__(self, a_file, node):
super(SiteResource, self).__in... | mit | -2,269,040,068,060,413,000 | 29.639535 | 94 | 0.529278 | false | 4.363378 | false | false | false |
vivyly/terralope | interest/models.py | 1 | 1383 | from django.db import models
class InterestStatus(models.Model):
status = models.CharField() #choices=visited, upcoming, skip, other
reason = models.TextField()
priority = models.IntegerField() #ramge: 1 to 5
class InterestType(models.Model):
itype = models.CharField() #choices=restaurant, cafe, s... | bsd-3-clause | -2,270,946,406,100,435,200 | 36.378378 | 104 | 0.671728 | false | 3.917847 | false | false | false |
Nikita1710/ANUFifty50-Online-Mentoring-Platform | project/fifty_fifty/pair/models.py | 1 | 5408 | from django.db import models
from webcore.models import Profile
from django.core.exceptions import ValidationError
# Create your models here.
class Pair(models.Model):
"""
This class defines a mentor-mentee pair
It contains mentor name matched with mentee name
"""
name = models.CharField(max_len... | apache-2.0 | -3,124,029,483,599,776,000 | 45.62069 | 175 | 0.690089 | false | 3.289538 | false | false | false |
mgax/airship | tests/instance_test.py | 1 | 3213 | from datetime import datetime
import json
from mock import Mock, patch, call
from common import AirshipTestCase
class ProgramsRecorder(object):
def __init__(self):
self.programs = []
def __call__(self, bucket_id, programs):
self.programs.extend([{'name': name, 'command': p['command']}
... | bsd-2-clause | 1,123,626,564,624,386,200 | 34.7 | 77 | 0.620293 | false | 3.693103 | true | false | false |
VT-CHCI/migrated-6DOF-techniques | homer_kinect.py | 1 | 11693 | import viz
import os
import fnmatch
import random
import math
import vizmat
import vetools
import kinect
import time
#Voice Includes
from win32com.client import constants
import win32com.client
import pythoncom
VOICE_ACTIONS = { "pickup" : 0
,"drop" : 1
,"move" : 2
,"turn right" : 3
... | gpl-2.0 | 3,363,622,253,121,453,600 | 29.774457 | 196 | 0.719832 | false | 2.856829 | false | false | false |
sserrot/champion_relationships | venv/Lib/site-packages/networkx/readwrite/tests/test_gpickle.py | 1 | 2098 | #!/usr/bin/env python
import os
import tempfile
import networkx as nx
from networkx.testing.utils import *
class TestGpickle(object):
@classmethod
def setup_class(cls):
G = nx.Graph(name="test")
e = [('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', 'e'), ('e', 'f'), ('a', 'f')]
G.add_edges_f... | mit | 8,515,580,088,358,273,000 | 31.78125 | 84 | 0.472831 | false | 3.164404 | false | false | false |
TuSimple/simpledet | core/detection_metric.py | 1 | 6411 | import mxnet as mx
import numpy as np
class EvalMetricWithSummary(mx.metric.EvalMetric):
def __init__(self, name, output_names=None, label_names=None, summary=None, **kwargs):
super().__init__(name, output_names=output_names, label_names=label_names, **kwargs)
self.summary = summary
self.g... | apache-2.0 | -4,316,445,551,903,096,300 | 34.622222 | 95 | 0.576821 | false | 3.456065 | false | false | false |
hankcs/HanLP | hanlp/utils/file_read_backwards/buffer_work_space.py | 1 | 6248 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""BufferWorkSpace module."""
import os
new_lines = ["\r\n", "\n", "\r"]
new_lines_bytes = [n.encode("ascii") for n in new_lines] # we only support encodings that's backward compat with ascii
class BufferWorkSpace:
"""It is a helper module for FileReadBackwards."... | apache-2.0 | 6,088,511,471,272,099,000 | 29.930693 | 119 | 0.616517 | false | 3.779794 | false | false | false |
valpo-sats/scheduling-bazaar | python-files/OriginalFiles/plot_access_time.py | 1 | 1380 | import ephem
import matplotlib.pyplot as plt
def plot_access_time(start, gs, tle):
"""Plots Access Time in seconds/day.
Arguments:
start -- string formatted 'yyyy/mm/dd HH:MM:SS'
gs -- 4 element list containing desired [name,lat,lon,alt]
tle -- 3 element list containing desired tle [line0,line1,... | agpl-3.0 | -5,564,691,874,353,863,000 | 27.163265 | 106 | 0.592754 | false | 3.216783 | false | false | false |
hellrich/JeSemE | pipeline/transform_models/representations/explicit.py | 1 | 2705 | import heapq
from scipy.sparse import dok_matrix, csr_matrix
import numpy as np
from representations.matrix_serializer import load_vocabulary, load_matrix
class Explicit:
"""
Base class for explicit representations. Assumes that the serialized input is e^PMI.
"""
def __init__(self,... | mit | 176,913,104,907,567,780 | 30.202381 | 88 | 0.543068 | false | 3.685286 | false | false | false |
phaethon/scapy | kamene/fields.py | 1 | 29092 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Fields: basic data structures that make up parts of packets.
"""
import struct,copy,socket
from .config import conf
... | gpl-2.0 | -4,917,469,473,235,873,000 | 29.817797 | 121 | 0.525987 | false | 3.327081 | false | false | false |
benrudolph/commcare-hq | corehq/pillows/domain.py | 1 | 2180 | import copy
from corehq.apps.accounting.models import Subscription
from corehq.apps.domain.models import Domain
from corehq.pillows.base import HQPillow
from corehq.pillows.mappings.domain_mapping import DOMAIN_MAPPING, DOMAIN_INDEX
from dimagi.utils.decorators.memoized import memoized
from django.conf import settings
... | bsd-3-clause | -1,702,521,204,793,609,500 | 33.603175 | 82 | 0.557339 | false | 4.299803 | false | false | false |
adriank/ACR | ACR/utils/interpreter.py | 1 | 24629 | #!/usr/bin/env python
# code from http://effbot.org/zone/simple-top-down-parsing.htm
# licence of original code was public domain
# relicenced to AGPL v3 by Asyncode Ltd. and:
# - specialized to work with ACR,
# - added interpreter,
# - optimized
# !!!NOT THREAD SAFE!!!
#TODO thread safety!
import sys
import re
from ... | agpl-3.0 | -1,584,788,798,473,539,800 | 25.284952 | 123 | 0.604125 | false | 2.847283 | false | false | false |
hsanjuan/dccpi | dccpi/dcc_encoder.py | 1 | 3030 | """
Copyright (C) 2016 Hector Sanjuan
This file is part of "dccpi".
"dccpi" is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later... | gpl-3.0 | -1,576,064,629,392,750,600 | 33.827586 | 77 | 0.656766 | false | 3.899614 | false | false | false |
Khroki/MCEdit-Unified | pymclevel/infiniteworld.py | 1 | 83854 | '''
Created on Jul 22, 2011
@author: Rio
'''
import collections
from datetime import datetime
import itertools
from logging import getLogger
from math import floor
import os
import random
import shutil
import struct
import time
import traceback
import weakref
import zlib
import sys
from box import BoundingBox
from e... | isc | 1,637,628,105,352,019,500 | 33.968307 | 153 | 0.568238 | false | 3.936438 | false | false | false |
novapost/workalendar | workalendar/africa/south_africa.py | 1 | 5741 | from datetime import timedelta, date
from ..core import WesternCalendar, SUN, MON, FRI
from ..exceptions import CalendarError
from ..registry_tools import iso_register
@iso_register('ZA')
class SouthAfrica(WesternCalendar):
"South Africa"
include_good_friday = True
include_christmas = True
def holid... | mit | -3,313,031,156,292,787,700 | 35.106918 | 79 | 0.536492 | false | 3.557001 | false | false | false |
aws/aws-iot-device-sdk-arduino-yun | AWS-IoT-Python-Runtime/lib/command/commandShadowUnregisterDeltaCallback.py | 1 | 3284 | '''
/*
* Copyright 2010-2016 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 "... | apache-2.0 | 8,615,658,127,585,319,000 | 48.757576 | 153 | 0.706456 | false | 4.419919 | false | false | false |
uricamic/clandmark | python_interface/examples/webcam_input.py | 1 | 2184 | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 05 16:26:55 2017
@author: uricar.michal
"""
import sys
# sys.path.append("D:/GitHub/clandmark/install/share/clandmark/python/")
sys.path.append("D:/GitHub/clandmark/build_win10/install/share/clandmark/python")
from py_flandmark import PyFlandmark
from py_featurePool imp... | gpl-3.0 | -109,012,591,267,559,540 | 28.133333 | 90 | 0.668498 | false | 2.829016 | false | false | false |
zimeon/iiif | tests/test_generators_check.py | 1 | 1028 | """Test code for iiif.generators.check."""
import unittest
from iiif.generators.check import PixelGen
class TestAll(unittest.TestCase):
"""Tests."""
def test01_size(self):
"""Test size."""
gen = PixelGen()
self.assertEqual(len(gen.size), 2)
self.assertEqual(int(gen.size[0]), ... | gpl-3.0 | 1,568,612,114,040,428,000 | 30.151515 | 62 | 0.566148 | false | 3.192547 | true | false | false |
estaban/pyload | module/plugins/hoster/RyushareCom.py | 1 | 2928 | # -*- coding: utf-8 -*-
# Test links (random.bin):
# http://ryushare.com/cl0jy8ric2js/random.bin
import re
from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
from module.plugins.internal.CaptchaService import SolveMedia
class RyushareCom(XFileSharingPro):
__name__ = "RyushareCom"... | gpl-3.0 | -402,923,207,536,529,150 | 34.707317 | 115 | 0.565232 | false | 3.327273 | false | false | false |
jensengroup/prohxms | fit_scripts/plot_binom.py | 1 | 1814 | import numpy
from scipy.special import binom, gamma
from matplotlib import pyplot
import sys
def factorial(x):
try:
return gamma(x + 1)
except OverflowError:
print "Overflow, x =",x
exit(0)
def B(x, y):
return factorial(x - 1) * factorial(y - 1) / factorial(x + y - 1)
n = ... | bsd-2-clause | -7,749,743,198,352,513,000 | 24.194444 | 132 | 0.59151 | false | 2.57305 | false | false | false |
gkc1000/pyscf | pyscf/dmrgscf/chemps2.py | 1 | 7134 | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | apache-2.0 | -5,384,420,666,182,643,000 | 31.724771 | 84 | 0.552425 | false | 3.022881 | false | false | false |
checkr/fdep | fdep/commands/install.py | 1 | 3710 | """Install dependencies for the project.
.. code:: bash
fdep install [<files...>]
"""
from __future__ import print_function
import os
import sys
import time
from threading import Thread
from fdep.backends import StorageBackend
from fdep.commands import ConfigRequiredMixin, SubcommandRunner
from fdep.interfaces.p... | mit | 3,853,921,461,467,970,600 | 32.125 | 97 | 0.55903 | false | 4.067982 | false | false | false |
ezavarygin/voffset | functions/up_parse.py | 1 | 5142 | #!/usr/bin/env python
import numpy as np
from barak.convolve import convolve_constant_dv
from astropy.io import fits
class Up_parse:
"""
The class is to parse a UVES_popler output file.
It provides wavelength, flux, sigma_error, mask (valid pixels) arrays.
"""
def __init__(self, path_to_fits... | mit | -7,309,214,557,721,606,000 | 36.532847 | 130 | 0.551731 | false | 3.521918 | false | false | false |
mauromorales/vim-pad | pythonx/pad/list.py | 1 | 9079 | # coding=utf-8
from sys import version_info
import vim
import re
from os import remove, mkdir
from shutil import move
from os.path import exists, getmtime, join, isfile, basename
from .pad import PadInfo
from .timestamps import natural_timestamp
from .collator import NotesCollator
from .vim_interface import *
from .u... | mit | -2,199,504,057,831,976,400 | 38.447826 | 127 | 0.465006 | false | 3.924308 | false | false | false |
alejandro-mc/BDM-DDD | value_noisecomplaints/constnoise_vs_resunits_CartoDB.py | 1 | 2702 | import pyspark
import operator
import sys
#311 call 2010 to present csv
#0 Unique Key,Created Date,Closed Date,Agency,Agency Name,
#5 Complaint Type,Descriptor,Location Type,Incident Zip,Incident Address,
#10 Street Name,Cross Street 1,Cross Street 2,Intersection Street 1,
#14 Intersection Street 2,Address Type,Cit... | mit | -9,114,007,511,462,917,000 | 32.775 | 88 | 0.65285 | false | 3.428934 | false | false | false |
damjankuznar/pylof | lof.py | 1 | 8726 | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
lof
~~~~~~~~~~~~
This module implements the Local Outlier Factor algorithm.
:copyright: (c) 2013 by Damjan Kužnar.
:license: GNU GPL v2, see LICENSE for more details.
"""
from __future__ import division
import warnings
def distance_euclidean(instance1, instance2):
""... | gpl-2.0 | 78,586,740,808,771,040 | 50.023392 | 153 | 0.658567 | false | 3.801743 | false | false | false |
iwm911/plaso | plaso/output/l2t_csv.py | 1 | 4971 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2012 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the L... | apache-2.0 | -8,886,323,838,709,941,000 | 34.255319 | 80 | 0.648562 | false | 3.729182 | false | false | false |
TheAlgorithms/Python | divide_and_conquer/max_difference_pair.py | 1 | 1288 | def max_difference(a: list[int]) -> tuple[int, int]:
"""
We are given an array A[1..n] of integers, n >= 1. We want to
find a pair of indices (i, j) such that
1 <= i <= j <= n and A[j] - A[i] is as large as possible.
Explanation:
https://www.geeksforgeeks.org/maximum-difference-between-two-elem... | mit | 3,591,755,431,774,145,500 | 28.272727 | 84 | 0.540373 | false | 3.311054 | false | false | false |
chanlhock/IMU | imu.py | 1 | 7408 | ##################################################################################################################
# Platform for study of IMU features and functionality (using Samsung S3 internal phone IMU)
# Demo program (imu.py)
#
# Copyright (c) 2014 Bernard Chan
# chanlhock@gmail.com
#
# Date Author N... | gpl-2.0 | 65,653,024,744,031,210 | 36.393939 | 133 | 0.550918 | false | 3.638329 | false | false | false |
4979/courses | data-mining/cluster-analysis/assignment/clustering-data/python/k_means.py | 1 | 1636 | from utils import *
def computeSSE(data, centers, clusterID):
sse = 0
nData = len(data)
for i in range(nData):
c = clusterID[i]
sse += squaredDistance(data[i], centers[c])
return sse
def updateClusterID(data, centers):
nData = len(data)
clusterID = [0] * nD... | apache-2.0 | -2,623,922,692,638,324,700 | 23.058824 | 95 | 0.583741 | false | 3.867612 | false | false | false |
agreco/understanding-json-schema | source/sphinxext/jsonschemaext.py | 1 | 5137 | import json
from docutils import nodes
from docutils import statemachine
from sphinx.util.compat import Directive
from sphinx.util.nodes import set_source_info
import jsonschema
class AttrDict(dict):
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict... | bsd-3-clause | 899,671,128,345,433,600 | 29.040936 | 77 | 0.543508 | false | 4.357082 | false | false | false |
yayoiukai/signalserver | fileuploads/urls.py | 1 | 1665 | from django.conf.urls import url, include
from . import views
app_name = 'fileuploads'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^(?P<filename_id>[0-9]+)/$', views.detail, name='detail'),
url(r'^(?P<filename_id>[0-9]+)/results/$', views.results, name='results'),
url(r'^about/$', vie... | mit | 4,689,833,463,780,428,000 | 46.571429 | 78 | 0.601802 | false | 3.117978 | false | true | false |
balloon-stat/komadori.vim | bin/periodic.py | 1 | 1897 | #! /usr/bin/python
# -*- encoding: utf-8 -*-
import time
import threading
import subprocess
class Periodic:
def __init__(self, arg):
self.interval = int(arg['interval']) / 1000
self.temp_dir = arg['temp_dir']
self.arg = arg
self.is_running = True
self.is_finish = False
... | mit | -701,395,974,281,160,200 | 29.111111 | 101 | 0.529784 | false | 3.676357 | false | false | false |
skybon/obozrenie | obozrenie/global_strings.py | 1 | 5347 | #!/usr/bin/env python3
# This source file is part of Obozrenie
# Copyright 2015 Artem Vorotnikov
# For more information, see https://github.com/obozrenie/obozrenie
# Obozrenie is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by th... | gpl-3.0 | 7,381,501,888,848,904,000 | 64.195122 | 174 | 0.503554 | false | 3.846043 | false | false | false |
andersinno/kuvaselaamo | hkm/models/campaigns.py | 1 | 6676 | # -*- coding: utf-8 -*-
from decimal import Decimal
from django.db import models
from django.utils.translation import ugettext_lazy as _
from parler.managers import TranslatableQuerySet
from parler.models import TranslatableModel, TranslatedFields
import datetime
import random
CAMPAIGN_CODE_KEYSPACE = "acdefghkmnpq... | mit | 1,468,477,457,438,374,400 | 28.48 | 107 | 0.61535 | false | 3.42739 | false | false | false |
tomkralidis/geonode | geonode/base/populate_test_data.py | 1 | 13166 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | -2,283,285,614,868,138,200 | 41.198718 | 120 | 0.531369 | false | 4.037412 | false | false | false |
tb0hdan/aria2py | src/aria2py.py | 1 | 3371 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from random import seed as rs, choice as rc
import requests
from string import ascii_lowercase as sl, digits as sg
import time
import thread
try:
import subprocess
except ImportError:
import subprocess32
class Aria2Response(object):
'''
'''
... | bsd-3-clause | 8,602,863,853,262,264,000 | 28.570175 | 90 | 0.554435 | false | 3.737251 | false | false | false |
daicang/Leetcode-solutions | 327-count-of-range-sum.py | 1 | 1440 | # 327-count-of-range-sum.py
class Solution(object):
def countRangeSum(self, nums, lower, upper):
"""
:type nums: List[int]
:type lower: int
:type upper: int
:rtype: int
"""
# Start: inclusive
# End: exclusive
def iter(start, end):
... | mit | -4,701,958,517,367,572,000 | 32.488372 | 68 | 0.421528 | false | 3.512195 | false | false | false |
kd0aij/matrixpilot_old | Tools/MAVLink/MAVProxy/modules/test.py | 1 | 1455 | #!/usr/bin/env python
'''test flight for DCM noise'''
import time, math
mpstate = None
def name():
'''return module name'''
return "test"
def description():
'''return module description'''
return "test flight"
def enum(**enums):
return type('Enum', (), enums)
TestState = en... | gpl-3.0 | 9,086,622,942,246,767,000 | 28.3125 | 66 | 0.61512 | false | 3.779221 | true | false | false |
dfroger/quickstart | monetdb/run_test.py | 1 | 1702 | import os
import subprocess
import shutil
import pymonetdb
import pymonetdb.control
HERE = os.path.dirname(os.path.realpath(__file__))
farm = os.path.join(HERE, 'dbfarm')
db = 'demo'
port = 56789
user = 'monetdb'
password = 'monetdb'
passphrase = 'monetdb'
table = 'names'
hostname = 'localhost'
def mdb_daemon(*args... | gpl-3.0 | 3,461,758,564,888,420,400 | 25.184615 | 78 | 0.69389 | false | 3.157699 | false | false | false |
samsu/api_client | api_client/fgd_client.py | 1 | 8945 | # Copyright 2017 Fortinet, Inc.
#
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 | -3,735,949,904,844,201,000 | 42.42233 | 88 | 0.586473 | false | 3.930141 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.