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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LPgenerator/django-db-mailer | dbmail/backends/mail.py | 1 | 11834 | # -*- encoding: utf-8 -*-
import traceback
import pprint
import uuid
import time
import sys
from django.db.models.fields.related import ManyToManyField, ForeignKey
from django.core.mail import EmailMessage, EmailMultiAlternatives
try:
from django.core.urlresolvers import reverse, NoReverseMatch
except ImportErro... | gpl-2.0 | 8,582,603,927,581,929,000 | 34.537538 | 78 | 0.577404 | false | 4.133426 | false | false | false |
Arcanemagus/SickRage | sickbeard/providers/pretome.py | 1 | 7003 | # coding=utf-8
# Author: Nick Sologoub
#
# URL: https://sick-rage.github.io
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 | 3,621,022,508,012,013,600 | 39.017143 | 149 | 0.532914 | false | 4.577124 | false | false | false |
sol-ansano-kim/minimap | minimap/ui.py | 1 | 8970 | from PySide import QtGui
from PySide import QtCore
from maya import OpenMayaUI
import shiboken
from . import mayaFunction as func
from . import model
import os
import re
RE_NUMBER = re.compile("^[0-9.]+$")
UI_TITLE = "MINIMAP"
UI_OBJECT_NAME = "minimap_maya_camera_navigator"
class DrawWidget(QtGui.QLabel):
backg... | gpl-2.0 | -8,338,255,359,178,029,000 | 32.099631 | 78 | 0.572352 | false | 3.392587 | false | false | false |
pavpanchekha/oranj | oranj/core/cli.py | 1 | 5900 | from objects.orobject import OrObject
from collections import namedtuple
from libbuiltin import typeof
from objects.number import Number
import objects.constants as constants
import sys
overrides = {
"stdin": "", # oranj script -
"count": "q", # in `who`
"digits": "n", # csplit
"exit": "x",
"extrac... | gpl-3.0 | -8,221,908,617,069,433,000 | 30.382979 | 90 | 0.505932 | false | 3.879027 | false | false | false |
OpenSPA/dvbapp | lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 1 | 40178 | import os
import time
from enigma import iPlayableService, eTimer, eServiceCenter, iServiceInformation, ePicLoad, eServiceReference
from ServiceReference import ServiceReference
from Screens.Screen import Screen
from Screens.HelpMenu import HelpableScreen
from Screens.MessageBox import MessageBox
from Screens.InputBox ... | gpl-2.0 | -7,173,184,004,439,990,000 | 32.453789 | 273 | 0.707203 | false | 3.194816 | false | false | false |
bright-sparks/wpull | wpull/proxy/client.py | 1 | 5588 | '''Proxy support for HTTP requests.'''
import base64
import io
import logging
from trollius import From, Return
import trollius
from wpull.connection import ConnectionPool
from wpull.errors import NetworkError
from wpull.http.request import RawRequest
from wpull.http.stream import Stream
import wpull.string
_logger ... | gpl-3.0 | 1,173,998,090,200,418,600 | 34.367089 | 84 | 0.603615 | false | 4.410418 | false | false | false |
tristanbrown/whaler | whaler/analysis.py | 1 | 15090 | """
"""
import os
import numpy as np
import pandas as pd
from .dataprep import IO
from .dataprep import extract_floats as extr
from .dataprep import dict_values as dvals
class Analysis():
"""
"""
def __init__(self):
self.loc = os.getcwd()
self.structs = next(os.walk('.'))[1]
self.... | mit | -1,162,687,698,635,704,000 | 33.065463 | 127 | 0.500398 | false | 4.071775 | false | false | false |
twotwo/tools-python | log_to_graphs/daily_log_plot.py | 1 | 6050 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
daily_log_plot.py
parse day log to 3 figs: 1. requests count; 2. requests throughput; 3. responses time
Copyright (c) 2016年 li3huo.com All rights reserved.
"""
import argparse,logging
from subprocess import Popen, PIPE
import numpy as np
import matplotlib.pyplot as p... | mit | -1,676,849,737,288,395,800 | 31.027174 | 125 | 0.601663 | false | 2.715207 | false | false | false |
lem9/weblate | weblate/trans/tests/test_checks.py | 1 | 6105 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eith... | gpl-3.0 | -5,348,374,958,073,392,000 | 28.621359 | 72 | 0.562766 | false | 3.835324 | true | false | false |
davy39/eric | DebugClients/Python3/eric6dbgstub.py | 1 | 2458 | # -*- coding: utf-8 -*-
# Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a debugger stub for remote debugging.
"""
import os
import sys
import distutils.sysconfig
from eric6config import getConfig
debugger = None
__scriptname = None
modDir = distutils.sysconfig.get... | gpl-3.0 | 7,533,310,348,466,007,000 | 26.311111 | 78 | 0.663954 | false | 4.428829 | false | false | false |
bnjones/Mathics | mathics/builtin/system.py | 1 | 2219 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
System functions
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from mathics.core.expression import Expression, String, strip_context
from mathics.builtin.base import Builtin, Predefined
from mathics import version_string
class V... | gpl-3.0 | -5,421,035,499,512,175,000 | 20.543689 | 101 | 0.585399 | false | 3.780239 | false | false | false |
TE-ToshiakiTanaka/atve | project/fleet/utility.py | 1 | 1286 | import os
import sys
import logging
from atve import log
WORK_DIR = os.path.normpath(os.path.dirname(__file__))
LIB_DIR = os.path.normpath(os.path.join(WORK_DIR, "lib"))
SCRIPT_DIR = os.path.normpath(os.path.join(WORK_DIR, "script"))
TMP_DIR = os.path.normpath(os.path.join(WORK_DIR, "tmp"))
LOG_DIR = os.path.normpath... | mit | 5,832,410,568,297,995,000 | 30.365854 | 76 | 0.63297 | false | 2.718816 | false | false | false |
rcbuild-info/scrape | rcbi/rcbi/spiders/Hoverthings.py | 1 | 2084 | import scrapy
from scrapy import log
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from rcbi.items import Part
import urllib
import urlparse
MANUFACTURERS = ["Gemfan"]
CORRECT = {"HQ Prop": "HQProp"}
MANUFACTURERS.extend(CORRECT.keys())
QUANTITY = {}
STOCK_STATE_MAP = {"... | apache-2.0 | 8,699,467,472,133,358,000 | 29.647059 | 77 | 0.621881 | false | 3.586919 | false | false | false |
shivanipoddariiith/gnome-weather-tests-final | tests/steps/steps.py | 1 | 4737 | # -*- coding: UTF-8 -*-
from behave import step
from dogtail.tree import root
from behave_common_steps import *
from random import sample
from behave_common_steps import limit_execution_time_to
CITIES = [
{ 'partial': 'Brno',
'full': 'Brno, Czech Republic'},
{ 'partial': 'Minsk',
'full': 'M... | gpl-2.0 | -798,814,159,004,918,800 | 32.595745 | 96 | 0.687355 | false | 3.357193 | false | false | false |
sb1992/NETL-Automatic-Topic-Labelling- | training/extract.py | 1 | 1255 | """
Author: Shraey Bhatia
Date: October 2016
File: extract.py
This file uses WikiExtractor tool to generate documents from wikipedia xml dump.
WikExtractor tool can be found at https://github.com/attardi/wikiextractor.
If you use a diffferent path than to one mentioned in readme update it ... | apache-2.0 | 3,511,821,827,934,689,000 | 32.918919 | 137 | 0.739442 | false | 3.438356 | false | false | false |
kdurril/internaljobmarket | internaljobmarket/models.py | 1 | 4988 | from sqlalchemy import Column, Integer, String
from internaljobmarket.database import Base
class StudentModel(Base):
__tablename__ = 'student'
student_id = Column(String(50), primary_key=True)
studentUid = Column(String(120))
nameLast = Column(String(120))
nameFirst = Column(String(120))
email... | gpl-2.0 | 6,918,131,131,799,236,000 | 34.382979 | 63 | 0.626303 | false | 3.912157 | false | false | false |
rizar/attention-lvcsr | libs/blocks/blocks/bricks/attention.py | 1 | 30408 | """Attention mechanisms.
This module defines the interface of attention mechanisms and a few
concrete implementations. For a gentle introduction and usage examples see
the tutorial TODO.
An attention mechanism decides to what part of the input to pay attention.
It is typically used as a component of a recurrent netwo... | mit | -4,698,357,808,242,801,000 | 38.388601 | 78 | 0.650848 | false | 4.390413 | false | false | false |
UFTS-Device/NanoCoin | contrib/devtools/fix-copyright-headers.py | 1 | 1353 | #!/usr/bin/env python
'''
Run this script to update all the copyright headers of files
that were changed this year.
For example:
// Copyright (c) 2009-2012 The NanoCoin Core developers
it will change it to
// Copyright (c) 2009-2015 The NanoCoin Core developers
'''
import os
import time
import re
year = time.gmtim... | mit | -4,160,406,511,019,043,000 | 28.413043 | 85 | 0.617147 | false | 2.928571 | false | false | false |
esc/castra | castra/core.py | 1 | 12203 | from collections import Iterator
import os
from os.path import exists, isdir
try:
import cPickle as pickle
except ImportError:
import pickle
import shutil
import tempfile
from functools import partial
import blosc
import bloscpack
import numpy as np
import pandas as pd
from pandas import msgpack
def e... | bsd-3-clause | -5,507,845,283,135,704,000 | 31.541333 | 80 | 0.557158 | false | 3.923794 | false | false | false |
simpeg/discretize | examples/plot_cahn_hilliard.py | 1 | 4099 | """
Operators: Cahn Hilliard
========================
This example is based on the example in the FiPy_ library.
Please see their documentation for more information about the
Cahn-Hilliard equation.
The "Cahn-Hilliard" equation separates a field \\\\( \\\\phi \\\\)
into 0 and 1 with smooth transitions.
.. math::
... | mit | -7,125,815,124,115,153,000 | 34.336207 | 141 | 0.567212 | false | 2.66862 | false | false | false |
joakim-hove/ert | python/python/ert_gui/shell/export.py | 1 | 2789 | from __future__ import print_function
from ecl.util.util import IntVector
from res.enkf.enums import ErtImplType
from res.enkf.data import EnkfNode
from ert_gui.shell import assertConfigLoaded, ErtShellCollection
from ert_gui.shell.libshell import autoCompleteList, splitArguments
class Export(ErtShellCollection):
... | gpl-3.0 | -3,140,374,453,435,462,000 | 40.014706 | 109 | 0.574399 | false | 4.095448 | true | false | false |
sapcc/monasca-agent | monasca_setup/service/linux.py | 1 | 5985 | # (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
""" Systemd based service
"""
import glob
import logging
import os
import pwd
import subprocess
import service
log = logging.getLogger(__name__)
class LinuxInit(service.Service):
"""Parent class for all Linux based init systems.
"""
... | bsd-3-clause | -2,910,082,518,258,402,300 | 33.005682 | 111 | 0.590977 | false | 3.90411 | true | false | false |
adamziel/python_translate | python_translate/extractors/python.py | 1 | 6128 | # -*- coding: utf-8 -*-
"""
This file is a part of python_translate package
(c) Adam Zieliński <adam@symfony2.guru>
For the full copyright and license information, please view the LICENSE and LICENSE_SYMFONY_TRANSLATION
files that were distributed with this source code.
"""
import ast
import codegen
from python_trans... | mit | 6,097,684,120,699,615,000 | 31.590426 | 103 | 0.567488 | false | 4.193703 | false | false | false |
point86/Videocompress | worker.py | 1 | 8523 | from PyQt5.QtCore import *
import time
import sys
import subprocess
import re
import shutil
import pathlib
VIDEO_EXTENSIONS = [".mp4",".avi",".mkv",".3gp", ".mov"] #most used video extensions
INFO = 0 #loglevel
ERROR = 1 #loglevel
#string format: Duration: 00:02:00.92, start: 0.000000, bitrate: 10156 kb/s
durationRe... | mit | -8,190,610,483,280,207,000 | 44.57754 | 234 | 0.587 | false | 3.631444 | false | false | false |
binyuanchen/arena-dev-cdh-hadoop | deploy/restutil.py | 1 | 3554 | #!/usr/bin/env python
import json
import base64
import urllib
import urllib2
class RestUtil(object):
def __init__(self, username=None, password=None):
if not username:
raise RuntimeError("missing rest api username")
self.username = username
if not password:
raise R... | apache-2.0 | -4,008,567,834,921,852,000 | 36.808511 | 109 | 0.554305 | false | 3.97095 | false | false | false |
ujiro99/auto_logger | logger/remote.py | 1 | 7680 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
import shutil
import time
import pexpect
from . import watch, log
class RemoteLogger:
PROMPT = "[#$%>]"
TIMEOUT_EXPECT = 20
TIMEOUT_LOGGING = 30
TIMEOUT_MOVE = 30
def __init__(self, params):
"""
constructor
... | mit | 5,026,616,677,315,661,000 | 29.59761 | 92 | 0.521094 | false | 3.695861 | false | false | false |
SportySpice/Collections | src/videosource/youtube/Channel.py | 1 | 13138 | from src.videosource.VideoSource import VideoSource, SourceType
import Playlist
import service
from Thumb import Thumb
import settings as s
from src.paths.root import CHANNEL_CACHE_DIR
from src.file import File
from datetime import datetime
from Pages import Pages, ItemType, TimeUnit
from src.tools import DataDictionar... | gpl-2.0 | 3,947,631,276,630,320,600 | 30.355609 | 220 | 0.610062 | false | 4.640763 | false | false | false |
fahhem/openhtf | openhtf/util/__init__.py | 1 | 6047 | # Copyright 2014 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... | apache-2.0 | -1,061,353,911,702,329,900 | 30.494792 | 93 | 0.696378 | false | 4.009947 | false | false | false |
sjpet/epysteme | epysteme/pandas.py | 1 | 1167 | # -*- coding: utf-8 -*-
"""Functions that extend and leverage pandas data frames.
Author: Stefan Peterson
"""
import re
import pandas as pd
col_name_regex = re.compile(r"(.*?)([-_\.]?)([0-9]*)$")
def is_successor(this, that):
try:
this_index = int(this[2])
that_index = int(that[2])
except ... | mit | -3,200,114,144,116,869,000 | 23.3125 | 78 | 0.542416 | false | 3.382609 | false | false | false |
habitam/habitam-core | habitam/entities/billable.py | 1 | 9250 | # -*- coding: utf-8 -*-
'''
This file is part of Habitam.
Habitam is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
Habitam is distr... | agpl-3.0 | 3,038,924,432,090,427,000 | 38.810345 | 144 | 0.581529 | false | 3.910246 | false | false | false |
pepsipepsi/nodebox_opengl_python3 | nodebox/graphics/physics.py | 1 | 77201 | #=== PHYSICS =========================================================================================
# 2D physics functions.
# Authors: Tom De Smedt, Giorgio Olivero (Vector class)
# License: BSD (see LICENSE.txt for details).
# Copyright (c) 2008 City In A Bottle (cityinabottle.org)
# http://cityinabottle.org/nodebo... | bsd-3-clause | 5,461,694,732,288,640,000 | 38.069332 | 136 | 0.554371 | false | 3.536788 | false | false | false |
google/sling | sling/nlp/parser/trainer/lexicon.py | 1 | 3676 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | 2,777,742,630,145,954,300 | 29.633333 | 75 | 0.646083 | false | 3.350957 | false | false | false |
kaiweifan/horizon | openstack_dashboard/dashboards/admin/metering/views.py | 1 | 8054 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... | apache-2.0 | -3,676,180,423,407,761,400 | 39.472362 | 78 | 0.502607 | false | 4.95936 | false | false | false |
slobberchops/rop | opc/drivers/opc.py | 1 | 3777 | """Simple high-performance Open Pixel Control client."""
#
# Copyright (c) 2013 Micah Elizabeth Scott
#
# 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 ... | gpl-3.0 | -5,717,644,401,036,324,000 | 35.317308 | 79 | 0.642044 | false | 4.26298 | false | false | false |
stvstnfrd/edx-platform | openedx/core/djangoapps/credit/tests/test_tasks.py | 1 | 8475 | """
Tests for credit course tasks.
"""
from datetime import datetime
import mock
import six
from edx_proctoring.api import create_exam
from openedx.core.djangoapps.credit.api import get_credit_requirements
from openedx.core.djangoapps.credit.exceptions import InvalidCreditRequirements
from openedx.core.djangoapps.c... | agpl-3.0 | -2,392,428,938,518,736,000 | 36.171053 | 120 | 0.650029 | false | 4.24812 | true | false | false |
m0nk/Pinna | pinna/ui.py | 1 | 2546 | import gtk
import gtk.glade
import os
import pynotify
if os.path.dirname(__file__):
root_path=os.path.dirname(__file__)+"/"
else:
root_path=""
def init_notifier():
pynotify.init('pinna song notification')
notifier=pynotify.Notification('testtickles')
notifier.set_urgency(pynotify.URGENCY_LOW)
notifier.set... | gpl-3.0 | -3,246,051,747,510,442,000 | 28.264368 | 124 | 0.672427 | false | 3.162733 | false | false | false |
rosenvladimirov/addons | product_print_category/models/product_print_category.py | 1 | 2437 | # coding: utf-8
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api, fields, models
class ProductPrintCategory(models.Model):
_name = 'product.pri... | agpl-3.0 | -7,535,654,423,478,292,000 | 33.814286 | 76 | 0.62659 | false | 3.61037 | false | false | false |
sunlightlabs/foia-data | data/foia.gov/scrape-foia-data-officialx-double-output.py | 1 | 4647 | from urllib2 import urlopen
import lxml.html
import requests
import json
import csv
# dataReports = ["DataRequest","DataExemption","DataAppeal","DataProcessTime","DataFeewaiver","DataPerson","DataBacklog","DataConsultant","RequestDisposition","RequestDenial","RequestPending","Exemption3Statutes","appealDisposition","... | gpl-3.0 | 2,669,185,570,743,464,000 | 47.385417 | 732 | 0.672336 | false | 3.018194 | false | false | false |
edgimar/borg | src/borg/version.py | 1 | 1632 | import re
def parse_version(version):
"""
simplistic parser for setuptools_scm versions
supports final versions and alpha ('a'), beta ('b') and rc versions. It just discards commits since last tag
and git revision hash.
Output is a version tuple containing integers. It ends with one or two eleme... | bsd-3-clause | -5,804,413,520,198,349,000 | 32.265306 | 112 | 0.605521 | false | 3.687783 | false | false | false |
wavicles/fossasia-pslab-apps | PSL_Apps/templates/widgets/ui_voltWidget.py | 1 | 5765 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'PSL_Apps/templates/widgets/voltWidget.ui'
#
# Created: Mon Jul 11 21:45:34 2016
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.... | gpl-3.0 | -6,214,400,697,271,422,000 | 50.017699 | 119 | 0.713617 | false | 3.88739 | false | false | false |
Smartupz/django-rosetta-old | rosetta/poutil.py | 1 | 3811 | import re
import os
import django
from django.conf import settings
from rosetta.conf import settings as rosetta_settings
from django.core.cache import cache
from django.utils.importlib import import_module
import itertools
def find_pos(lang, project_apps=True, django_apps=False, third_party_apps=False):
"""
sc... | mit | 8,625,855,195,036,189,000 | 33.963303 | 106 | 0.587772 | false | 3.75468 | false | false | false |
hemmerling/nosql-mongodb2013 | src/m101j/final/final-4/validate_sourcecode.py | 1 | 10656 | import pymongo
import urllib2
import urllib
import cookielib
import random
import re
import string
import sys
import getopt
# init the global cookie jar
cj = cookielib.CookieJar()
# declare the variables to connect to db
connection = None
db = None
webhost = "localhost:8082"
mongostr = "mongodb://local... | apache-2.0 | 4,197,648,597,348,295,000 | 28.886957 | 118 | 0.57789 | false | 4.067176 | false | false | false |
SEL-Columbia/commcare-hq | corehq/apps/api/resources/v0_4.py | 1 | 17039 | from collections import defaultdict
from django.core.urlresolvers import reverse
from django.http import HttpResponseForbidden, HttpResponse, HttpResponseBadRequest
from tastypie import fields
from tastypie.bundle import Bundle
from tastypie.authentication import Authentication
from tastypie.exceptions import BadReque... | bsd-3-clause | -4,855,601,299,716,612,000 | 39.763158 | 179 | 0.663654 | false | 4.002584 | false | false | false |
miraculixx/tastypie-async | tpasync/tests.py | 1 | 5935 | import time
from django import http
from tpasync.resources import BaseAsyncResource
from tastypie import fields
from tastypie.test import ResourceTestCaseMixin
from . import tasks
from django.test.testcases import TestCase
class EmptyTestResource(BaseAsyncResource):
class Meta:
resource_name = 'empty'
c... | mit | -2,464,982,984,483,011,000 | 36.09375 | 76 | 0.608088 | false | 3.946144 | true | false | false |
anselmobd/fo2 | src/lotes/views/parametros/regras_lote_min_tamanho.py | 1 | 7818 | from operator import itemgetter
from pprint import pprint
from django.db import IntegrityError
from django.shortcuts import render, redirect
from django.urls import reverse
from django.views import View
from geral.functions import has_permission
import systextil.models
import lotes.forms as forms
import lotes.model... | mit | 225,207,211,094,632,960 | 33.504425 | 77 | 0.468966 | false | 3.792802 | false | false | false |
oroca/raspberrypi_projects | rccar/rcserver_lb1630.py | 1 | 3493 | import socket
import sys
import RPi.GPIO as gpio
import time
HOST = '192.168.0.9' # RC카 라즈베리파이 IP값으로 변경필요
PORT = 10000
TIME_OUT = 100
#Motor 1 GPIO Pin
IC1A = 22
IC2A = 27
#Motor 2 GPIO Pin
IC3A = 4
IC4A = 17
gpio.cleanup()
gpio.setmode(gpio.BCM)
#Motor Pin Setup
gpio.setup(IC1A, gpio.OUT)
gpio.setup(IC2A, gpio.O... | mit | -3,131,656,717,313,517,000 | 24.858209 | 75 | 0.543434 | false | 3.370623 | false | false | false |
GreenJoey/My-Simple-Programs | functional/EromeDownloader/__main__.py | 1 | 1514 | from lxml.html import fromstring as etree_fromstring
import requests
from argparse import ArgumentParser
from pathlib import Path
from os import chdir
from sys import exit
import pprint
import subprocess
parser = ArgumentParser()
parser.add_argument("url", type=str, help="Url of the Erome Playlist")
parser.add_argumen... | gpl-2.0 | -6,119,119,812,970,750,000 | 31.212766 | 90 | 0.667768 | false | 3.50463 | false | false | false |
yishayv/lyacorr | ism_spectra/extract_galaxy_metadata.py | 1 | 3934 | """
Get galaxy metadata from a CasJobs fits table.
Add an SFD extinction field, and optional custom fields from HealPix maps.
"""
import cProfile
from collections import namedtuple
import astropy.table as table
import astropy.units as u
import healpy as hp
import numpy as np
from astropy.coordinates import SkyCoord
f... | mit | -7,801,464,748,114,146,000 | 36.826923 | 111 | 0.648958 | false | 3.342396 | false | false | false |
snim2/nxt-turtle | tests/play_scale.py | 1 | 2017 | """
Play scales on the Lego NXT.
Copyright (C) Sarah Mount, 2008.
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 | 6,849,550,351,123,141,000 | 32.065574 | 78 | 0.702529 | false | 2.90634 | false | false | false |
Victordeleon/os-data-importers | eu-structural-funds/common/processors/reshape_data.py | 1 | 1662 | """This processor reshapes the data to match the fiscal schema."""
from datapackage_pipelines.wrapper import ingest
from datapackage_pipelines.wrapper import spew
from common.utilities import get_fiscal_field_names
import logging
def process_row(row, fiscal_fields):
"""Add and remove appropriate columns.
"""
... | mit | 3,459,077,310,441,693,000 | 31.588235 | 66 | 0.615523 | false | 4.073529 | false | false | false |
mburakergenc/Malware-Detection-using-Machine-Learning | cuckoo/modules/auxiliary/sniffer.py | 1 | 5764 | # Copyright (C) 2010-2013 Claudio Guarnieri.
# Copyright (C) 2014-2016 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import os
import getpass
import logging
import subprocess
from lib.cuckoo.common.abstracts import Auxilia... | mit | 5,280,735,725,692,390,000 | 33.933333 | 85 | 0.523074 | false | 4.102491 | false | false | false |
sumedh123/debatify | venv/lib/python2.7/site-packages/socketio/namespace.py | 1 | 4422 | class Namespace(object):
"""Base class for class-based namespaces.
A class-based namespace is a class that contains all the event handlers
for a Socket.IO namespace. The event handlers are methods of the class
with the prefix ``on_``, such as ``on_connect``, ``on_disconnect``,
``on_message``, ``on_... | mit | -3,340,919,251,761,928,700 | 41.932039 | 79 | 0.615106 | false | 4.654737 | false | false | false |
googleapis/python-aiplatform | google/cloud/aiplatform_v1beta1/types/artifact.py | 1 | 4560 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -2,119,502,530,256,270,300 | 39.714286 | 86 | 0.650877 | false | 4.42289 | false | false | false |
jtoppins/beaker | IntegrationTests/src/bkr/inttest/server/tools/__init__.py | 1 | 1364 |
# 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.
import os
import sys
import pkg_resources
import subprocess
class Com... | gpl-2.0 | 6,330,281,277,080,774,000 | 39.117647 | 86 | 0.678886 | false | 4.035503 | false | false | false |
peterkmurphy/glyphviewer | glyphviewer/blocks.py | 1 | 13058 | #!/usr/bin/python
#-*- coding: UTF-8 -*-
# File: blocks.py
# Solely for identifying Unicode blocks for unicode characters.
# Based on code from:
# http://stackoverflow.com/questions/243831/unicode-block-of-a-character-in-python
# But updated for 2013.
# Copyright (C) 2013-2020 Peter Murphy <peterkmurphy@gmail.com>
#
# ... | gpl-3.0 | 5,632,453,972,763,632,000 | 29.082949 | 82 | 0.748162 | false | 2.486857 | false | false | false |
rombie/contrail-controller | src/container/kube-manager/kube_manager/kube/kube_monitor.py | 1 | 12402 | #
# Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
#
from cStringIO import StringIO
import json
import socket
import time
import requests
from cfgm_common.utils import cgitb_hook
class KubeMonitor(object):
def __init__(self, args=None, logger=None, q=None, db=None,
resource_nam... | apache-2.0 | -8,774,820,231,122,944,000 | 37.635514 | 80 | 0.529915 | false | 4.324268 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v8/errors/types/recommendation_error.py | 1 | 1672 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 7,326,649,095,652,851,000 | 30.54717 | 74 | 0.675239 | false | 3.826087 | false | false | false |
stuart-knock/tvb-framework | tvb/core/traits/core.py | 1 | 8770 | # -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Framework Package. This package holds all Data Management, and
# Web-UI helpful to run brain-simulations. To use it, you also need do download
# TheVirtualBrain-Scientific Package (for simulators). See content of the
# documentation-folder for more details. See also http:/... | gpl-2.0 | 5,534,416,123,025,169,000 | 44.91623 | 114 | 0.604903 | false | 3.962946 | false | false | false |
kaji-project/rekishi | rekishi/api/query_builder.py | 1 | 2428 |
class InfluxQueryHelper(object):
def __init__(self):
self.where_clause = ''
self.limit_clause = ''
self.query = ''
def build_query(self, base_query, **kwargs):
where_clause_dict = {}
if 'start' in kwargs:
start = kwargs['start']
if isinstance(... | gpl-3.0 | -7,164,196,831,225,149,000 | 31.810811 | 83 | 0.458402 | false | 4.289753 | false | false | false |
tarunchhabra26/PythonPlayground | BirthdayParadox/birthday_paradox.py | 1 | 2292 | #!/bin/python
"""
1. Write a function called has_duplicates that takes a list and returns True if there is any
element that appears more than once. It should not modify the original list.
2. If there are 23 students in your class, what are the chances that two of you have the same
birthday? You can estimate this prob... | mit | -7,760,202,132,229,844,000 | 28.012658 | 107 | 0.679756 | false | 3.938144 | false | false | false |
iRGBit/indexhelper | indexer.py | 1 | 3827 | #!/usr/bin/python
# -*- coding: utf-8 -*-
################################################################################
# iRGBit's indexhelper for reading texts and helping with creating an index #
# http://www.github.com/iRGBit #
# hypertext ät birgitbachler dot ... | gpl-2.0 | -286,084,710,352,663,170 | 30.883333 | 115 | 0.601673 | false | 3.700193 | false | false | false |
UncleRus/MultiConf | src/config.py | 1 | 2044 | # -*- coding: utf-8 -*-
from PySide.QtCore import *
from PySide.QtGui import *
import controls
import ui
class ConfigWidget (ui.Scrollable):
_factories = {
'bool': controls.BoolControl,
'float': controls.FloatControl,
'enum': controls.EnumControl,
'uint8': controls.... | gpl-3.0 | -9,144,970,093,496,315,000 | 28.058824 | 90 | 0.559198 | false | 4.120968 | false | false | false |
zacharyvoase/django-retracer | src/djretr/middleware.py | 1 | 2936 | # -*- coding: utf-8 -*-
import random
import string
import urllib
import urlparse
from django import http
from django.conf import settings
from django.core.urlresolvers import reverse
def make_nonce(length=10, chars=(string.letters + string.digits)):
"""Generate a random nonce (number used once)."""
re... | unlicense | 3,089,663,601,704,950,000 | 31.263736 | 78 | 0.612738 | false | 4.218391 | false | false | false |
TakLee96/python-olxextract | olx-extract.py | 1 | 3272 | import sys, os, shutil
import os.path as path
import lxml.etree as et
# print helpful message
if len(sys.argv) != 4:
print "[info] usage: python olxextract.py [unzipped course folder] [new course partial folder] [chapter/sequential/vertical]"
sys.exit(0)
# grab the directory of course and update
course = sy... | mit | -5,068,809,144,545,807,000 | 29.867925 | 129 | 0.650061 | false | 3.651786 | false | false | false |
ewenqua/pqctp | SyncDayBar.py | 1 | 1490 | #-*- coding=utf-8 -*-
from FinalLogger import logger
from Constant import inst_strategy, suffix_list
import urllib
import json
import sqlite3
conn = sqlite3.connect('futures.db3', check_same_thread = False)
for i in inst_strategy.keys() :
daybar_table = i + suffix_list[0]
cmd = "DROP TABLE IF EXISTS " + daybar... | mit | 8,276,603,549,224,353,000 | 47.064516 | 191 | 0.630872 | false | 3.163482 | false | false | false |
DBuildService/atomic-reactor | atomic_reactor/build.py | 1 | 13343 | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
Classes which implement tasks which builder has to be capable of doing.
Logic above these classes has to set the workflow itself.
"""
import re
... | bsd-3-clause | 7,096,012,980,449,241,000 | 36.69209 | 100 | 0.578056 | false | 4.322319 | false | false | false |
mansam/liveconnect | liveconnect/skydrive.py | 1 | 4134 | import liveconnect
import liveconnect.exceptions
import requests
import urllib
def connect_skydrive():
client_id = liveconnect.config.get('liveconnect', 'client_id')
client_secret = liveconnect.config.get('liveconnect', 'client_secret')
return SkyDrive(client_id, client_secret)
class SkyDrive(liveconnect.... | mit | 5,896,308,902,472,626,000 | 38 | 120 | 0.593856 | false | 4.001936 | false | false | false |
mupif/mupif | mupif/examples/Example02-distrib/application2.py | 1 | 3601 | import sys
import Pyro4
import logging
sys.path.extend(['..', '../../..'])
from mupif import *
import mupif.Physics.PhysicalQuantities as PQ
log = logging.getLogger()
@Pyro4.expose
class application2(Model.Model):
"""
Simple application that computes an arithmetical average of mapped property
"""
def... | lgpl-3.0 | -1,283,888,354,917,432,800 | 36.905263 | 110 | 0.544016 | false | 3.872043 | false | false | false |
QCaudron/genepy | genepy/genepy.py | 1 | 9289 | import os
from subprocess import call
from shutil import copyfileobj
from Bio import SeqIO
from Bio.Alphabet import generic_dna
from Bio.Seq import Seq
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colors
try :
import seaborn
sns = True
except :
sns = False
try :
from sklearn.neighb... | mit | -5,876,318,508,511,528,000 | 14.744068 | 124 | 0.611907 | false | 2.686235 | false | false | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/__init__.py | 1 | 20059 | # encoding: utf-8
# module PyQt4.QtGui
# from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
# functions
def qAlpha(p_int): # real signature unknown; restored from __doc__
""" qAlpha(int) -> int """
ret... | gpl-2.0 | 7,385,498,820,512,413,000 | 40.444215 | 195 | 0.832394 | false | 3.561612 | false | false | false |
weka511/fractals | rn/ca.py | 1 | 1555 | # Copyright (C) 2019 Greenweaves Software Limited
# This 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 software is distribut... | gpl-3.0 | -711,681,062,969,949,700 | 30.12 | 72 | 0.633441 | false | 3.344086 | false | false | false |
satra/NiPypeold | nipype/version.py | 1 | 1032 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
version = '0.3.1'
release = True
# Return the svn version as a string, raise a ValueError otherwise
# This code was copied from numpy trunk, revision 6873, and modified slightly
def svn_version():
# P... | bsd-3-clause | -6,007,205,910,471,568,000 | 27.666667 | 77 | 0.578488 | false | 3.78022 | false | false | false |
litex-hub/litespi | litespi/ids.py | 1 | 2011 | #
# This file is part of LiteSPI
#
# Copyright (c) 2020 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: BSD-2-Clause
import enum
class CFIManufacturerIDs(enum.Enum):
"""Manufacturer IDs from the CFI standard.
Common Flash Interface (CFI) is a standard introduced by the Joint Electron
Device Engin... | bsd-2-clause | 9,123,095,271,623,639,000 | 30.421875 | 79 | 0.662854 | false | 3.033183 | false | false | false |
akrherz/iem | cgi-bin/request/raob.py | 1 | 3216 | """
Download interface for data from RAOB network
"""
from io import StringIO
import datetime
import pytz
from paste.request import parse_formvars
from pyiem.util import get_dbconn
from pyiem.network import Table as NetworkTable
def m(val):
"""Helper"""
if val is None:
return "M"
return val
def... | mit | -8,461,958,948,684,487,000 | 27.714286 | 76 | 0.504353 | false | 3.530187 | false | false | false |
QuantiModo/QuantiModo-SDK-Python | swagger_client/models/user_variables.py | 1 | 8861 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
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 applica... | gpl-2.0 | -910,932,272,836,915,700 | 26.180982 | 110 | 0.569687 | false | 4.446061 | false | false | false |
saatvikshah1994/SmartMM | KeywordExtraction/unsupervised/keywordextraction_rake.py | 1 | 10166 | from __future__ import absolute_import
from __future__ import print_function
import re
import operator
import six
from six.moves import range
from utilities import load_data,cross_validate
from sklearn.pipeline import Pipeline
from keyword_metrics import keyword_prf
from nltk.stem import PorterStemmer
import gensim
c... | mit | 2,615,882,647,518,628,000 | 41.008264 | 151 | 0.595908 | false | 3.892037 | false | false | false |
trustcircleglobal/tcg-gae | tcg_gae/utils.py | 1 | 1098 | import arrow
import datetime
import uuid as original_uuid
import random
# string utils
def uuid():
return str(original_uuid.uuid4()).replace('-', '')
def random_code(size):
return ''.join(
str(random.randrange(0, 9))
for i in xrange(size))
# date time utils
def now():
return datetime.d... | isc | -3,920,932,696,313,604,600 | 21.875 | 68 | 0.666667 | false | 3.378462 | false | false | false |
amaurywalbert/twitter | JSON_to_BIN/n3/n3_egos_favorites_JSON_to_BIN_500.py | 1 | 5961 | # -*- coding: latin1 -*-
################################################################################################
# Script para coletar amigos a partir de um conjunto de alters do twitter
#
#
import tweepy, datetime, sys, time, json, os, os.path, shutil, time, struct, random
reload(sys)
sys.setdefaultencoding... | gpl-3.0 | 3,029,549,472,148,146,000 | 53.935185 | 176 | 0.373904 | false | 4.51446 | false | false | false |
facebookresearch/ParlAI | parlai/chat_service/tasks/chatbot/worlds.py | 1 | 4333 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# py parlai/chat_service/tasks/overworld_demo/run.py --debug --verbose
from parlai.core.worlds import World
from parla... | mit | 1,519,304,251,816,974,600 | 29.300699 | 96 | 0.527348 | false | 4.134542 | false | false | false |
Enerccio/SimplePython | src/math.py | 1 | 1234 | """
SimplePython - embeddable python interpret in java
Copyright (c) Peter Vanusanik, All rights reserved.
math module
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of... | lgpl-3.0 | -8,908,702,434,100,743,000 | 24.729167 | 66 | 0.670989 | false | 3.929936 | false | false | false |
marcusmueller/pybombs | pybombs/package_manager.py | 1 | 9047 | #!/usr/bin/env python2
#
# Copyright 2015 Free Software Foundation, Inc.
#
# This file is part of PyBOMBS
#
# PyBOMBS 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, or (at your option)
# any... | gpl-3.0 | 4,854,882,884,099,081,000 | 39.030973 | 116 | 0.585498 | false | 4.341171 | false | false | false |
texastribune/salesforce-stripe | reconcile-email.py | 1 | 1616 | import os
from config import STRIPE_KEYS
from time import sleep
import stripe
from salesforce_bulk import SalesforceBulk
from simple_salesforce import Salesforce
stripe.api_key = STRIPE_KEYS["secret_key"]
# get Stripe emails
customers = stripe.Customer.list(limit=100)
stripe_emails = set(
(x["email"].lower() for... | mit | 635,312,233,939,258,100 | 27.857143 | 78 | 0.704827 | false | 2.998145 | false | false | false |
akaszynski/vtkInterface | examples/02-plot/labels.py | 1 | 2507 | """
Label Points
~~~~~~~~~~~~
Use string arrays in a point set to label points
"""
# sphinx_gallery_thumbnail_number = 3
from pyvista import examples
import pyvista as pv
import numpy as np
# Labels are not currently supported by the VTKjs conversion script
pv.rcParams["use_panel"] = False
##########################... | mit | 5,852,070,679,874,245,000 | 27.168539 | 82 | 0.524531 | false | 3.833333 | false | false | false |
chop-dbhi/django-forkit | setup.py | 1 | 3444 | from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.command.install import INSTALL_SCHEMES
import os
import sys
BASE_PACKAGE = 'forkit'
class osx_install_data(install_data):
# On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
... | bsd-3-clause | -1,044,305,317,180,701,700 | 34.142857 | 104 | 0.660569 | false | 3.67556 | false | false | false |
mbokulic/bmt_parser | bmt_parser/parse_mets.py | 1 | 8134 | '''
Functions for parsing the toplevel mets file that contains metadata on an
issue.
Use the main() function.
TO DO
- I've seen that <typeOfResource>still image</> can be <genre>Music</genre>
I don't know if this distinction is important and should I record genre
'''
import bs4
import logging
import os
import re... | mit | -3,810,432,262,548,088,300 | 31.798387 | 79 | 0.591345 | false | 3.85315 | false | false | false |
a4fr/book_search_engine | search_engine.py | 1 | 5030 | import json
import urllib.request
from operator import itemgetter #uses in sorting data
from progress.bar import Bar
"""
find best book that you need and return them
@author Ali Najafi (mail.ali.najafi@gmail.com)
@source http://it-ebooks-api.info/
"""
from oneconf.utils import save_json_file_update
... | gpl-2.0 | -5,941,776,434,686,377,000 | 32.765101 | 106 | 0.514712 | false | 3.875193 | false | false | false |
ProjetPP/PPP-QuestionParsing-PLYFrench | ppp_french_parser/parser.py | 1 | 10869 | import os
import itertools
import threading
import subprocess
from ply import lex, yacc
from nltk.corpus import wordnet
from collections import namedtuple, deque
from ppp_datamodel import Resource, Triple, Missing
from .config import Config
class ParserException(Exception):
pass
FORMS_ETRE = frozenset(filter(bo... | mit | -5,150,446,832,958,763,000 | 27.671958 | 85 | 0.540413 | false | 3.062447 | false | false | false |
keenondrums/sovrin-node | sovrin_client/test/agent/test_anoncreds_claim_request.py | 1 | 2042 | from sovrin_client.test import waits
from stp_core.loop.eventually import eventually
from anoncreds.protocol.types import SchemaKey, ID
from sovrin_client.test.agent.messages import get_claim_request_libsovrin_msg
def test_claim_request_from_libsovrin_works(
aliceAgent,
aliceAcceptedFaber,
ali... | apache-2.0 | -1,131,301,748,622,422,400 | 35.464286 | 85 | 0.712537 | false | 3.414716 | false | false | false |
safnuk/todone | todone/parser/tests/test_format.py | 1 | 3634 | from datetime import date
from dateutil.relativedelta import relativedelta
from unittest import TestCase
from todone.parser.format import (
ApplyFunctionFormat,
DateFormat,
PassthroughFormat,
)
class TestPassthroughFormat(TestCase):
def test_values_are_left_untouched(self):
formatter = Passth... | apache-2.0 | -5,121,249,632,408,522,000 | 30.877193 | 76 | 0.584755 | false | 4.129545 | true | false | false |
AidanHolmes/gpstracker | trackergpio.py | 1 | 3793 | # Copyright 2017 Aidan Holmes
# 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, softwa... | apache-2.0 | -7,886,770,358,443,798,000 | 31.418803 | 115 | 0.613762 | false | 3.906282 | false | false | false |
szupie/emoji-to-english | localisationExtractor.py | 1 | 1505 | # Localisation files can be found at:
# https://github.com/unicode-org/cldr/tree/master/common/annotations
import argparse
import xml.etree.ElementTree as ET
import os, json
def getFile(path):
dir = os.path.dirname(__file__)
return os.path.join(dir, path)
parser = argparse.ArgumentParser()
parser.add_argument("sr... | unlicense | -2,759,959,282,878,903,300 | 26.381818 | 82 | 0.72691 | false | 3.428246 | false | false | false |
kdmurray91/khmer | tests/test_hashbits.py | 1 | 19976 | #
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) Michigan State University, 2009-2015. It is licensed under
# the three-clause BSD license; see LICENSE.
# Contact: khmer-project@idyll.org
#
# pylint: disable=missing-docstring,protected-access
import khmer
from khmer import ReadP... | bsd-3-clause | 1,501,069,062,629,945,900 | 25.146597 | 79 | 0.621596 | false | 2.901801 | true | false | false |
isaacyeaton/global-dyn-non-equil-gliding | Code/script_epsilon.py | 1 | 2676 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 21 20:34:20 2016
%reset -f
%pylab
%clear
%load_ext autoreload
%autoreload 2
@author: isaac
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import plots
reload(plots)
from plots import bmap, rcj, tl, tickout, four_plot
# %% Get some colors... | mit | 2,785,185,356,967,121,400 | 25.49505 | 132 | 0.646487 | false | 2.477778 | false | false | false |
Lana-B/Pheno4T | madanalysis/selection/condition_connector.py | 1 | 1788 | ################################################################################
#
# Copyright (C) 2012-2013 Eric Conte, Benjamin Fuks
# The MadAnalysis development team, email: <ma5team@iphc.cnrs.fr>
#
# This file is part of MadAnalysis 5.
# Official website: <https://launchpad.net/madanalysis5>
#
# MadAnal... | gpl-3.0 | 7,740,569,640,907,614,000 | 35.489796 | 80 | 0.630872 | false | 4.091533 | false | false | false |
osperlabs/logbeam | logbeam/__init__.py | 1 | 6060 | import logging
from threading import Event
import boto3
from botocore.exceptions import ClientError
from cwlogs.push import EventBatchPublisher, EventBatch, LogEvent
from cwlogs.threads import BaseThread
from six.moves import queue as Queue
logger = logging.getLogger(__name__)
class BatchedCloudWatchSink(BaseThre... | mit | -1,902,479,632,143,394,600 | 32.480663 | 79 | 0.591584 | false | 4.243697 | false | false | false |
disqus/nydus | nydus/db/base.py | 1 | 5387 | """
nydus.db.base
~~~~~~~~~~~~~
:copyright: (c) 2011-2012 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
__all__ = ('LazyConnectionHandler', 'BaseCluster')
import collections
from nydus.db.map import DistributedContextManager
from nydus.db.routers import BaseRouter, routing_params
from nydus... | apache-2.0 | -8,090,204,037,582,475,000 | 31.648485 | 108 | 0.609616 | false | 4.326908 | false | false | false |
lefnire/tensorforce | tensorforce/core/networks/complex_network.py | 1 | 7315 | # Copyright 2017 reinforce.io. 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 applicabl... | apache-2.0 | 8,334,893,506,367,331,000 | 33 | 117 | 0.563226 | false | 4.346405 | false | false | false |
digibyte/digibyte | contrib/seeds/generate-seeds.py | 1 | 4385 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | mit | 3,191,925,870,720,644,600 | 30.546763 | 99 | 0.575371 | false | 3.156947 | false | false | false |
sondree/Master-thesis | Python MOEA/batch.py | 1 | 1096 |
import traceback
from main import main
from utility import load_config
def batch_vardev():
conf = load_config("VarDevConf")
try:
main(conf)
except:
print traceback.format_exc()
def batch_countdev():
c = 1
for num_steps in xrange(3+c,7):
conf = load_conf... | gpl-3.0 | 3,182,776,818,449,855,500 | 20.076923 | 63 | 0.488139 | false | 3.740614 | false | false | false |
rphillips/bitbake | lib/bb/server/none.py | 1 | 5721 | #
# BitBake 'dummy' Passthrough Server
#
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2008 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundatio... | gpl-2.0 | 1,023,466,820,555,777,000 | 30.262295 | 78 | 0.619822 | false | 4.311228 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.