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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nrb/destiny-info-bot | destiny_bot.py | 1 | 1985 | from helga.plugins import command
from functions import bounty_lookup, crucible_lookup, daily_lookup
from functions import heroic_lookup, nightfall_lookup, xur_lookup
from scraper import VENDOR_NAMES
guard_help = "Returns a guardian's destinytracker.com page"
@command('guardian', aliases=('g',), help=guard_help)
def ... | gpl-3.0 | -6,398,303,908,050,704,000 | 39.510204 | 91 | 0.721411 | false | 3.191318 | false | false | false |
jacobmorzinski/imappy | imapclient/imapclient.py | 1 | 37900 | # Copyright (c) 2013, Menno Smits
# Released subject to the New BSD License
# Please see http://en.wikipedia.org/wiki/BSD_licenses
from __future__ import unicode_literals
import imaplib
import select
import socket
import sys
import warnings
from datetime import datetime
from operator import itemgetter
from . import ... | mit | -6,250,206,633,605,626,000 | 35.689255 | 105 | 0.587124 | false | 4.237951 | false | false | false |
jkokorian/odm-live | lvclient_gui.py | 1 | 20530 | # -*- coding: utf-8 -*-
"""
Demonstrates use of PlotWidget class. This is little more than a
GraphicsView with a PlotItem placed in its center.
"""
import PyQt4.QtCore as q
import PyQt4.QtGui as qt
import numpy as np
import pyqtgraph as pg
import pyqtgraph.dockarea as dock
import zmq
import msgpack as msg
import m... | gpl-3.0 | -4,618,092,449,503,864,000 | 34.644097 | 164 | 0.62416 | false | 4.123318 | false | false | false |
dejlek/pulsar | pulsar/apps/ds/server.py | 1 | 91019 | '''
Pulsar-ds is a python implementation of the popular redis_
data store. It uses pulsar asynchronous framework to create a
single-threaded worker responding to TCP-requests in the same way
as redis does.
To run a stand alone server create a script with the following code::
from pulsar.apps.data import PulsarDS... | bsd-3-clause | -1,041,437,584,300,712,300 | 33.607985 | 79 | 0.516508 | false | 3.999077 | false | false | false |
mahmoud/womp | womp/inputs/dom.py | 1 | 12826 | import string
import re
from base import Input
from pyquery import PyQuery
from collections import Counter
from stats import dist_stats
# from boltons
_punct_ws_str = string.punctuation + string.whitespace
_punct_ws_str = _punct_ws_str.replace('-', '')
_punct_re = re.compile('[' + _punct_ws_str + ']+')
def split_pu... | gpl-3.0 | 4,053,949,369,219,222,000 | 44.644128 | 110 | 0.544129 | false | 3.484379 | false | false | false |
delaere/aaptos | AgilentInstrument.py | 1 | 4867 | from SerialConnection import SerialConnection
from time import sleep
class AgilentInstrument(SerialConnection):
"""Generic SCPI interface to Agilent power supply instruments. The SCPI commands below are handled.
MEASure
:CURRent[:DC]?
[:VOLTage][:DC]?
[SOURce]
:CURRent[:LEVel][:IMMedi... | gpl-2.0 | -5,884,972,135,711,897,000 | 39.89916 | 104 | 0.712759 | false | 3.793453 | false | false | false |
Ishayahu/MJCC-tasks | sqlite_models/bd_connector.py | 1 | 7285 | # -*- coding:utf-8 -*-
# coding=<utf8>
import sqlite3
from user_settings.settings import sqlite_file
class BDConnector():
"""
Класс для подключения к БД sqlite, Если получает аргумент 'd', то работает в режиме отладки
при записи, то есть, ничего в файл не записывается, а выводится в stdout
"""
de... | mit | 64,825,850,143,789,730 | 41.9625 | 190 | 0.545177 | false | 3.090378 | false | false | false |
ScottSteiner/uguubot | plugins/masshighlight.py | 1 | 2270 | import re
from util import hook, database, user
import seen, channel
#@hook.event('353')
#def onnames(input, conn=None, bot=None):
# global userlist
# inp = re.sub('[~&@+%,\.]', '', ' '.join(input))
# chan,users = re.match(r'.*#(\S+)(.*)', inp.lower()).group(1, 2)
# try: userlist[chan]
# except: userlis... | gpl-3.0 | -3,321,098,081,161,434,600 | 35.612903 | 108 | 0.603524 | false | 3.014608 | false | false | false |
nausheenfatma/embeddings | gsoc2017-nausheen/complex/efe/tools.py | 1 | 2665 | import sys,os
import logging
import numpy as np
import colorsys
#Current path
cur_path = os.path.dirname(os.path.realpath( os.path.basename(__file__)))
#Logging
logger = logging.getLogger("SRL Bench")
logger.setLevel(logging.DEBUG)
logger.propagate = False
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
for... | apache-2.0 | -130,709,119,168,226,720 | 32.734177 | 153 | 0.716323 | false | 3.20698 | false | false | false |
unomena/pyxeropos | xero/api.py | 1 | 2396 | from __future__ import unicode_literals
from .filesmanager import FilesManager
from .payrollmanager import PayrollManager
from .manager import Manager
class Xero(object):
"""An ORM-like interface to the Xero API"""
OBJECT_LIST = (
"Attachments",
"Accounts",
"BankTransactions",
... | bsd-3-clause | 3,653,574,481,515,838,000 | 27.52381 | 83 | 0.579299 | false | 4.174216 | false | false | false |
felipenaselva/repo.felipe | plugin.video.salts/scrapers/noobroom_scraper.py | 1 | 7296 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | gpl-2.0 | 7,056,307,790,897,366,000 | 45.471338 | 174 | 0.584978 | false | 3.578225 | false | false | false |
ekwoodrich/nirha | nirhalib/venv/lib/python2.7/site-packages/limitlessled/pipeline.py | 1 | 5785 | """ LimitlessLED pipeline. """
import logging
import threading
import time
from limitlessled import Color
_LOGGER = logging.getLogger(__name__)
class PipelineQueue(threading.Thread):
""" Pipeline queue. """
def __init__(self, queue, event):
""" Initialize pipeline queue.
:param queue: Rea... | apache-2.0 | 4,345,164,485,155,944,000 | 28.217172 | 79 | 0.538807 | false | 4.26308 | false | false | false |
alexforencich/hdg2000 | fpga/lib/axis/rtl/axis_mux.py | 1 | 9599 | #!/usr/bin/env python
"""axis_mux
Generates an AXI Stream mux with the specified number of ports
Usage: axis_mux [OPTION]...
-?, --help display this help and exit
-p, --ports specify number of ports
-n, --name specify module name
-o, --output specify output file name
"""
import io
import sys
imp... | mit | -5,119,503,800,687,363,000 | 30.064725 | 174 | 0.586936 | false | 3.402694 | false | false | false |
NeCTAR-RC/novanet2neutron | novanet2neutron/common.py | 1 | 4247 | #!/usr/bin/env python
import os
from neutronclient.v2_0 import client as neutron_client
from novaclient import client as nova_client
def load_config(conf, filename):
conf.read(filename)
def get_nova_client(url=None, username=None, password=None, tenant=None):
url = os.environ.get('OS_AUTH_URL', url)
u... | apache-2.0 | 4,956,875,131,249,592,000 | 33.25 | 81 | 0.580645 | false | 3.829576 | false | false | false |
rowinggolfer/openmolar2 | src/lib_openmolar/admin/qt4/dialogs/plain_text_dialog.py | 1 | 2276 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
## ##
## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ##
## ... | gpl-3.0 | 2,981,332,044,063,847,400 | 51.930233 | 79 | 0.476274 | false | 5.080357 | false | false | false |
clintpgeorge/gaur | analyze_reuters_places.py | 1 | 2407 | '''
Created on Apr 8, 2016
@author: clintpg
'''
import codecs
from os.path import join
from collections import defaultdict
data_dir = "D:\\data\\clda-data"
ds_name = "reuters-21578"
# loc_country_file_path = join(data_dir, "%s.countries" % ds_name)
md_file_path = join(data_dir, "%s.csv" % ds_name)
europe = "alba... | gpl-3.0 | 8,478,689,430,567,526,000 | 30.684211 | 254 | 0.604902 | false | 2.986352 | false | false | false |
robert-giaquinto/air_pollution | build_dataset/Preprocessing.py | 1 | 8930 | import numpy as np
import pandas as pd
import math
from scipy.stats import rankdata
from data_utilities import *
def extract_region(region, filename='all_texas.csv'):
"""
My study focuses primarly on the texas region, this is a help function that imports
:param region:
:param filename:
:return:
"""
if region =... | gpl-2.0 | 434,220,567,009,979,460 | 35.300813 | 127 | 0.668421 | false | 2.735907 | false | false | false |
paboldin/rally | tests/unit/plugins/openstack/context/vm/test_utils.py | 1 | 3645 | # Copyright 2015: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 4,172,314,966,088,304,600 | 33.386792 | 78 | 0.573663 | false | 3.894231 | true | false | false |
Zulban/battleship-ai | tests/test_utilities.py | 1 | 2202 | import unittest
from utilities import *
from constants import *
class TestUtilities(unittest.TestCase):
def test_script_safe(self):
path="tests/bot_unsafe1.py"
self.assertFalse(is_script_safe(path))
path="tests/bot_unsafe2.py"
self.assertFalse(is_script_safe(path))
... | gpl-2.0 | -1,158,256,933,109,508,600 | 29.597222 | 60 | 0.556767 | false | 3.150215 | true | false | false |
rpoleski/MulensModel | source/MulensModel/satelliteskycoord.py | 1 | 2862 | import numpy as np
from scipy.interpolate import interp1d
import warnings
from astropy.coordinates import SkyCoord
from astropy import __version__ as astropy_version
from MulensModel.horizons import Horizons
class SatelliteSkyCoord(object):
"""
An object that gives the *Astropy.SkyCoord* of satellite for a g... | mit | 3,828,505,640,912,647,000 | 33.481928 | 77 | 0.59993 | false | 3.609079 | false | false | false |
tulsawebdevs/django-multi-gtfs | multigtfs/models/service.py | 1 | 3081 | #
# Copyright 2012-2014 John Whitlock
#
# 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 writ... | apache-2.0 | -2,643,314,762,048,445,000 | 31.776596 | 74 | 0.640377 | false | 3.780368 | false | false | false |
SamyPesse/glass.py | glass/user.py | 1 | 2832 | # Python imports
import requests
# Local imports
import exceptions
from timeline import Timeline
from contacts import Contacts
class User(object):
"""
Represent an user for an application
Access Google Glass timeline using : user.timeline
Each user is defined by unique token : user.token
"""
... | apache-2.0 | -7,773,934,544,676,443,000 | 28.195876 | 78 | 0.572387 | false | 4.425 | false | false | false |
openqt/algorithms | leetcode/python/lc282-expression-add-operators.py | 1 | 1422 | # coding=utf-8
import unittest
"""282. Expression Add Operators
https://leetcode.com/problems/expression-add-operators/description/
Given a string that contains only digits `0-9` and a target value, return all
possibilities to add **binary** operators (not unary) `+`, `-`, or `*` between
the digits so they evaluate t... | gpl-3.0 | 4,239,882,285,619,586,000 | 18.486111 | 78 | 0.549226 | false | 3.22449 | false | false | false |
pablogonzalezalba/a-language-of-ice-and-fire | lexer_rules.py | 1 | 1138 | # -*- coding: utf-8 -*-
tokens = [
'LPAREN',
'RPAREN',
'LBRACE',
'RBRACE',
'EQUAL',
'DOUBLE_EQUAL',
'NUMBER',
'COMMA',
'VAR_DEFINITION',
'IF',
'ELSE',
'END',
'ID',
'PRINT'
]
t_LPAREN = r"\("
t_RPAREN = r"\)"
t_LBRACE = r"\{"
t_RBRACE = r"\}"
t_EQUAL = r"\="
t_DOU... | mit | -7,852,160,737,639,178,000 | 15.985075 | 124 | 0.557118 | false | 2.563063 | false | false | false |
quantopian/zipline | zipline/__init__.py | 1 | 3528 | #
# Copyright 2015 Quantopian, 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 wr... | apache-2.0 | -6,224,884,814,442,924,000 | 26.5625 | 78 | 0.691327 | false | 3.818182 | false | false | false |
Vavius/moai-ide | editor/layout/debugdock_ui.py | 1 | 17245 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'debugdock.ui'
#
# Created: Tue Apr 15 11:26:57 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.1
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_debugdock(object):
def setupUi(... | mit | 2,810,186,438,603,601,000 | 73.012876 | 148 | 0.754248 | false | 3.898056 | false | false | false |
Dantistnfs/telegram-genetic-bot | handlers/sequence_ocr/ocr.py | 1 | 1917 | try:
import Image
except ImportError:
from PIL import Image, ImageDraw, ImageFont
from . import pytesseract
import requests
from io import BytesIO, StringIO
import time
import mahotas
import numpy as np
import logging
logger = logging.getLogger(__name__)
def downscale_image(im, max_dim=2048):
"""Shrink im unt... | mit | 6,277,357,389,962,457,000 | 33.25 | 127 | 0.706312 | false | 2.995313 | false | false | false |
clchiou/garage | py/g1/operations/databases/servers/g1/operations/databases/servers/databases.py | 1 | 9130 | """Low-level database operations."""
__all__ = [
# Key-value operations.
'count',
'delete',
'get',
'get_revision',
'increment_revision',
'scan',
'scan_keys',
'set_',
# Leases.
'lease_count',
'lease_expire',
'lease_get',
'lease_scan',
'lease_scan_expirations',... | mit | 4,929,940,139,382,192,000 | 27.984127 | 79 | 0.619387 | false | 3.59166 | false | false | false |
kd7iwp/cube-bookstore | cube/books/forms.py | 1 | 2386 | # Copyright (C) 2010 Trinity Western University
from datetime import date
from cube.books.models import MetaBook, Course, Book, DEPARTMENT_CHOICES
from django import forms
from django.core.exceptions import ValidationError
from decimal import Decimal
class CourseNumberField(forms.IntegerField):
# TODO this does... | gpl-3.0 | -2,888,288,631,412,363,300 | 32.138889 | 78 | 0.643755 | false | 3.892333 | false | false | false |
sdlarsen1/CMPUT291 | prj2code/parser.py | 1 | 1186 | #
# File contains functions to read table and collect FDs
#
# strips input data of commas
def stripper(input):
for i in range(len(input)):
hold = []
for j in range(len(input[i])):
hold.append(input[i][j].replace(",", ""))
input[i] = hold
return input
# make dictionary as... | gpl-3.0 | -8,449,684,330,042,146,000 | 20.981481 | 55 | 0.558179 | false | 3.660494 | false | false | false |
projecthamster/experiments | symmetry.py | 1 | 4021 | #!/usr/bin/env python
# - coding: utf-8 -
# Copyright (C) 2014 Toms Baugis <toms.baugis@gmail.com>
"""Exploring symmetry. Feel free to add more handles!"""
import math
from gi.repository import Gtk as gtk
from lib import graphics
class SymmetricalRepeater(graphics.Sprite):
def __init__(self, sides, master_poly=N... | mit | 7,709,994,229,760,616,000 | 29.694656 | 108 | 0.604079 | false | 3.51486 | false | false | false |
koriaf/django-abudget | src/abudget/money/migrations/0008_auto_20151130_0658.py | 1 | 4574 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('money', '0007_auto_20150816_0629'),
]
... | mit | 3,630,100,677,420,742,000 | 38.094017 | 202 | 0.586576 | false | 4.381226 | false | false | false |
archhurd/archweb | mirrors/admin.py | 1 | 2814 | import re
from urlparse import urlparse, urlunsplit
from django import forms
from django.contrib import admin
from .models import Mirror, MirrorProtocol, MirrorUrl, MirrorRsync
class MirrorUrlForm(forms.ModelForm):
class Meta:
model = MirrorUrl
def clean_url(self):
# is this a valid-looking U... | gpl-2.0 | 437,510,660,585,097,700 | 33.740741 | 123 | 0.65032 | false | 3.557522 | false | false | false |
AmandaMoen/AmandaMoen | students/JoshuaFrailey/ack.py | 1 | 3359 | <<<<<<< HEAD
def ack(m, n):
"""
Return the Ackermann-Peter function.
Arguments:
m: A nonnegative integer between 0 and 3 inclusive.
n: A nonnegative integer between 0 and 4 inclusive.
Return value: A nonnegative integer
"""
if (not isinstance(m, int)) or (not isinstance(n, int)):
... | gpl-2.0 | -8,807,334,124,496,806,000 | 22.65493 | 75 | 0.434355 | false | 3.042572 | false | false | false |
philipgian/pre-commit | pre_commit/languages/node.py | 1 | 1959 | from __future__ import unicode_literals
import contextlib
import os
import sys
from pre_commit.envcontext import envcontext
from pre_commit.envcontext import Var
from pre_commit.languages import helpers
from pre_commit.util import clean_path_on_failure
from pre_commit.xargs import xargs
ENVIRONMENT_DIR = 'node_env'... | mit | -4,624,544,992,913,661,000 | 28.681818 | 75 | 0.631955 | false | 3.621072 | false | false | false |
satterly/alerta5 | alerta/app/database/backends/elasticsearch/base.py | 1 | 1257 | from elasticsearch import Elasticsearch
from flask import current_app
class Backend:
def connect(self, config):
client = Elasticsearch([{'host': 'localhost', 'port': 9200}])
self.create_indexes(client)
return client
@staticmethod
def create_indexes(es):
es.indices.create... | apache-2.0 | -6,518,442,493,074,721,000 | 30.425 | 135 | 0.634845 | false | 3.903727 | false | false | false |
JOHNKYON/DSTC | DSTC2/traindev/scripts/baseline.py | 1 | 12035 | import argparse
import copy
import dataset_walker
import json
import time
from collections import defaultdict
def labels(user_act, mact):
# get context for "this" in inform(=dontcare)
# get context for affirm and negate
this_slot = None
confirm_slots = {"explicit": [], "implicit": []}
for act in ... | mit | 7,051,202,924,820,328,000 | 34.712166 | 109 | 0.532862 | false | 3.827926 | false | false | false |
regisb/prodigal | prodigal/jinjaenv.py | 1 | 6455 | import sys
import inspect
import os.path
import babel.support
import gettext
import jinja2
import filters# TODO get rid of this circular dependency
class TemplateLoader(jinja2.loaders.BaseLoader):
def __init__(self, src_path):
self.src_path = os.path.abspath(src_path)
self.aliases = {}
def ad... | bsd-3-clause | -8,467,966,008,111,036,000 | 33.518717 | 80 | 0.626026 | false | 3.919247 | false | false | false |
BleekerLab/Solanum_sRNAs | scripts/presence_in_accs.py | 1 | 2149 | import pandas as pd
import os, sys
import glob
# dataframe of input file
df = pd.read_csv('/Users/michelle/surfdrive/Shared/trichome_team/06.results_from_xp/sRNA-Seq/20170117_srnadesc/shortstack/concat_miRNA.txt', sep="\t")
# An extra column named "Present in accessions" with the value "unique" is created next to Acc... | mit | 3,658,638,714,765,813,000 | 34.816667 | 157 | 0.688227 | false | 2.972337 | false | false | false |
kvaghas/linkedin-data-retrieval | linkedin-data.py | 1 | 7933 | import argparse, os, time
import urlparse, random
from selenium import webdriver
from bs4 import BeautifulSoup
import io
"""
Given a page soure get links of user profiles
Input: HTML page source
Output: Links of people profile
"""
def getPeopleLinks(page):
links = []
# Find all hyper links
for link... | gpl-2.0 | 928,837,361,233,724,400 | 29.74 | 130 | 0.674776 | false | 3.280811 | false | false | false |
appsembler/edx-platform | lms/envs/devstack_docker.py | 1 | 2876 | """ Overrides for Docker-based devstack. """
from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import
# Docker does not support the syslog socket at /dev/log. Rely on the console.
LOGGING['handlers']['local'] = LOGGING['handlers']['tracking'] = {
'class': 'logging.NullHandler',
}
LOGGIN... | agpl-3.0 | 3,759,323,526,571,567,000 | 30.955556 | 84 | 0.664812 | false | 2.816846 | false | false | false |
ryancoleman/tdt2014-part2 | scripts/unionfind2.py | 1 | 5547 | #!/usr/bin/env python
#new unionfind code, still using dictionaries but not as weird as other version
#also rewritten from scratch using orig paper + clrs as a guide
class unionFind(object):
'''allows union, find, tolists, uses path compression and join by rank,
from CLRS algorithms textbook and previous c imple... | gpl-2.0 | 1,843,460,609,444,078,300 | 33.453416 | 79 | 0.631513 | false | 3.783765 | false | false | false |
windskyer/k_cinder | paxes_cinder/k2aclient/openstack/common/gettextutils.py | 1 | 17560 | #
#
# All Rights Reserved.
# Copyright 2011 OpenStack Foundation.
# 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... | apache-2.0 | -3,249,237,278,516,535,000 | 38.022222 | 79 | 0.635991 | false | 4.508344 | false | false | false |
anudeepsamaiya/freezing-computing-machine | app/restaurant/views.py | 1 | 2559 | import requests
from rest_framework import renderers, status
from rest_framework.authentication import SessionAuthentication, BasicAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.views import APIView
from rest_framework.response import Response
from restaurant.models import R... | gpl-2.0 | -4,775,626,633,857,399,000 | 40.274194 | 112 | 0.712778 | false | 4.049051 | false | false | false |
PaloAltoNetworks-BD/ansible-pan | library/panos_ike_gateway.py | 1 | 10905 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
__metaclass__ = type
# Copyright 2017 Palo Alto Networks, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ... | isc | 6,248,040,454,051,126,000 | 34.637255 | 119 | 0.615864 | false | 3.850636 | false | false | false |
KeyWeeUsr/plyer | plyer/platforms/linux/wifi.py | 1 | 6120 | '''
Note::
This facade depends on:
- nmcli (Network Manager command line tool)
It is found in most of the popular distros. Support for other
managers is not provided yet.
- python-wifi module
`https://wifi.readthedocs.io/en/latest/`
`https://g... | mit | -7,362,944,867,532,462,000 | 26.567568 | 79 | 0.515686 | false | 4.294737 | false | false | false |
cheddarfinancial/quarry-platform | chassis/models/account.py | 1 | 8680 | # Standard Library
import boto
import re
import datetime
import json
import time
import uuid
# Third Party
import pymysql
import mixingboard
from ..database import Base
from ..aws import getIAMConn, getEC2Conn, getMasterCredentials, getS3Conn
from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.orm... | bsd-3-clause | -7,089,331,830,148,300,000 | 35.016598 | 151 | 0.545392 | false | 4.069386 | false | false | false |
cuauv/software | vision/modules/deprecated/Bins.py | 1 | 14648 | from collections import namedtuple
from math import sin, cos, radians
import os
import time
import cv2
import numpy as np
from caffew import caffe_classifier
import shm
from vision.modules import ModuleBase, gui_options
capture_source = 'downward'
vision_options = [gui_options.BooleanOption('debugging', False), gui... | bsd-3-clause | -5,750,889,893,469,988,000 | 49.164384 | 133 | 0.516931 | false | 3.485959 | false | false | false |
glover52/Google-Code-Jam | util/primes.py | 1 | 1218 | import math
class Primes:
"""
Sieve of Eratosthenes is a simple algorithm for finding all prime
numbers up to any given limit with O(n log log n).
https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
"""
def __init__(self, n=2):
self.__frontier = [False, False]
sel... | mit | 7,976,045,085,156,489,000 | 26.681818 | 73 | 0.490969 | false | 3.355372 | false | false | false |
whyDK37/py_bootstrap | test.py | 1 | 1395 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#将/dd 文件夹下的所有东西复制到/tmp
import json
import os,shutil,platform,sys
from collections import defaultdict
print (U"我是中文,但是我是一个好中文,不是你们现象的那样。")
print (r'^time/plus/\d{1,2}/$');
maven_repo_root = "D:\\mrp"
maven_onedrive_repo = "D:\\tmp1"
# shutil.copytree(maven_repo_root, maven_... | apache-2.0 | -5,289,313,330,817,135,000 | 28.311111 | 88 | 0.677028 | false | 2.53167 | false | false | false |
compmech/meshless | meshless/espim/tests/test_calc_linear_static.py | 1 | 2191 | import os
import inspect
import numpy as np
from scipy.sparse import coo_matrix
from composites.laminate import read_stack
from structsolve import solve
from meshless.espim.read_mesh import read_mesh
from meshless.espim.plate2d_calc_k0 import calc_k0
from meshless.espim.plate2d_add_k0s import add_k0s
THISDIR = os.pa... | bsd-2-clause | 8,120,589,930,016,763,000 | 34.918033 | 88 | 0.565495 | false | 2.989086 | false | false | false |
marcosalcazar/django-currencies | currencies/migrations/0007_historicalcurrency.py | 1 | 2353 | # Generated by Django 3.0.4 on 2020-03-19 16:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields
import simple_history.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings... | bsd-3-clause | -2,283,729,967,580,868,600 | 55.02381 | 187 | 0.61921 | false | 4.171986 | false | false | false |
open-synergy/opnsynid-partner-contact | partner_sale_risk_policy/models/res_partner.py | 1 | 2336 | # -*- coding: utf-8 -*-
# Copyright 2016 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api
from openerp.tools.translate import _
from openerp.exceptions import Warning as UserError
class ResPartner(models.Model):
_inherit = "res.partner"... | agpl-3.0 | 2,879,429,524,866,215,000 | 34.393939 | 77 | 0.59161 | false | 3.93266 | false | false | false |
troych/PlexKodiConnect | resources/lib/itemtypes.py | 1 | 76978 | # -*- coding: utf-8 -*-
###############################################################################
import logging
from urllib import urlencode
from ntpath import dirname
from datetime import datetime
import xbmcgui
import artwork
from utils import tryEncode, tryDecode, settings, window, kodiSQL, \
CatchExc... | gpl-2.0 | 647,485,978,200,099,800 | 38.015712 | 106 | 0.498467 | false | 4.194758 | false | false | false |
evilkost/cdic | src/cdic_project/cdic/async/task.py | 1 | 2439 | # coding: utf-8
import json
import time
# class PeriodicTask(object):
# """
# :param name: task name
# :param fn: callable function
# :param period: minimal delay between two consecutive function invocation [seconds]
# :param cool_down: delay to start next invocation after previous one finished [s... | gpl-3.0 | -4,435,954,260,556,968,400 | 33.842857 | 99 | 0.617466 | false | 3.9024 | false | false | false |
zealousduck/AUPhotoUpload | test/Tester.py | 1 | 2502 | '''
Created on Feb 12, 2016
@author: patrickstewart
'''
import os
import datetime
import SampleTest
import ReaderTest
def generateFileName(testName=None):
i = str(datetime.datetime.now())
# Convert '2016-02-08 11:16:04.123456 format to nicer filename
fileName = testName + '-' + i[0:10] + '-' + i[11:13... | gpl-3.0 | 5,237,960,152,239,786,000 | 30.2875 | 99 | 0.622702 | false | 3.499301 | true | false | false |
power12317/weblate | weblate/trans/search.py | 1 | 4213 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eithe... | gpl-3.0 | -7,752,986,727,973,570,000 | 27.835616 | 78 | 0.614727 | false | 4.063707 | false | false | false |
kaarl/pyload | module/plugins/accounts/UploadedTo.py | 1 | 2422 | # -*- coding: utf-8 -*-
import re
import time
from module.plugins.internal.Account import Account
class UploadedTo(Account):
__name__ = "UploadedTo"
__type__ = "account"
__version__ = "0.44"
__status__ = "testing"
__description__ = """Uploaded.to account plugin"""
__license__ = "... | gpl-3.0 | 3,262,551,562,013,974,000 | 30.051282 | 101 | 0.474814 | false | 3.749226 | false | false | false |
vejmelkam/emotiv-reader | albow/tab_panel.py | 1 | 4063 | ################################################################
#
# Albow - Tab Panel
#
################################################################
from pygame import Rect
from widget import Widget
from theme import ThemeProperty, FontProperty
from utils import brighten
class TabPanel(Widget):
# pages ... | gpl-3.0 | -2,876,491,408,353,927,000 | 25.907285 | 75 | 0.616047 | false | 2.664262 | false | false | false |
ideadevice/alembic | alembic/ddl/mssql.py | 1 | 6675 | from sqlalchemy.ext.compiler import compiles
from .. import util
from .impl import DefaultImpl
from .base import alter_table, AddColumn, ColumnName, \
format_table_name, format_column_name, ColumnNullable, alter_column,\
format_server_default,ColumnDefault, format_type, ColumnType
class MSSQLImpl(DefaultImpl)... | mit | 2,601,466,823,068,328,000 | 37.583815 | 101 | 0.547566 | false | 4.153703 | false | false | false |
opennode/nodeconductor-saltstack | src/nodeconductor_saltstack/exchange/migrations/0004_init_quotas.py | 1 | 1859 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from uuid import uuid4
from django.contrib.contenttypes.models import ContentType
from django.db import models, migrations
GLOBAL_MAILBOX_SIZE_QUOTA = 'global_mailbox_size'
USER_COUNT_QUOTA = 'user_count'
def convert_mailbox_size_to_mb(apps, schema_e... | mit | -4,724,120,406,738,632,000 | 34.75 | 119 | 0.661108 | false | 3.540952 | false | false | false |
kyhau/reko | reko/polly.py | 1 | 2689 | from boto3 import Session
from botocore.exceptions import BotoCoreError, ClientError
from contextlib import closing
DEFAULTS = {
"region_name": "ap-southeast-2", # Sydney
"voice_id": "Nicole",
"input_text_type": "text",
"output_format": "mp3",
"output_filename": "polly_speech.mp3"
}
def status_cod... | mit | 6,766,248,734,880,203,000 | 37.414286 | 92 | 0.57791 | false | 4.660312 | false | false | false |
papedaniel/oioioi | oioioi/portals/utils.py | 1 | 1139 | from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.http import Http404
from oioioi.base.permissions import make_request_condition
from oioioi.problems.models import Problem
def join_paths(path1, path2):
if not path1:
return path2... | gpl-3.0 | -3,700,900,082,614,892,000 | 26.119048 | 71 | 0.66813 | false | 4.010563 | false | false | false |
bjangles/darkrp-simulator | main.py | 1 | 15310 | #!/usr/bin/env python3
import os
import random
import string
class VerbSystem:
def __init__(self):
self.Verbs = {}
def AddVerb(self, **kwargs):
VerbEntry = {}
for k in kwargs:
VerbEntry[k] = kwargs[k]
self.Verbs[kwargs["verb"]] = VerbEntry
def Execute(self, ... | gpl-3.0 | -2,910,634,315,715,413,000 | 34.744731 | 268 | 0.465142 | false | 3.66875 | false | false | false |
CiscoSystems/tito | src/tito/builder/main.py | 1 | 40614 | # Copyright (c) 2008-2011 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy... | gpl-2.0 | 1,027,791,702,479,122,000 | 37.753817 | 126 | 0.582779 | false | 3.901441 | true | false | false |
samvarankashyap/linch-pin | linchpin/ansible_runner.py | 1 | 10923 | # The ansible_runner file contains all of the functions used to call ansible
# playbooks. The runner can call playbooks via the Ansible API or the CLI,
# and supports the three most recent versions of Ansible (just as the Ansible
# team itself does)
from __future__ import absolute_import
import os
import sys
import j... | gpl-3.0 | -1,957,471,921,548,272,400 | 33.786624 | 80 | 0.561659 | false | 4.65601 | false | false | false |
tisOO/django-markup | src/django_markup/markup.py | 1 | 3531 | import six
from django.conf import settings
from django_markup.defaults import DEFAULT_MARKUP_FILTER, DEFAULT_MARKUP_CHOICES
class MarkupFormatter(object):
def __init__(self, load_defaults=True):
self.filter_list = {}
if load_defaults:
filter_list = getattr(settings, 'MARKUP_FILTER',... | bsd-3-clause | 690,923,432,395,852,000 | 33.617647 | 100 | 0.619371 | false | 4.154118 | false | false | false |
jadunham1/abiosgaming.py | tests/test_client.py | 1 | 2135 | from vcr_unittest import VCRTestCase
from abiosgaming.client import AbiosClient
from urllib3.exceptions import MaxRetryError
from requests.exceptions import HTTPError, RetryError
import logging
try:
from unittest import mock
except ImportError:
import mock
logging.basicConfig(level=logging.DEBUG)
class Abios... | bsd-3-clause | -1,763,784,786,598,456,600 | 30.397059 | 71 | 0.686651 | false | 3.792185 | true | false | false |
jaycruz805/DataAnalysis | plotInterp.py | 1 | 4781 | """
plotInterp.py
Autor: Juan Cruz
4-2-14
This program creates Langrange and Hermite
Interpolating Polynomials as well as piecewise
linear and cubic spline interpolating functions.
This Program shall also produce graphs, each of which
shows the graph of f(x) and one interpolant.
"""
#importring interpolation.py so w... | apache-2.0 | 4,280,226,258,106,352,600 | 26.164773 | 107 | 0.62602 | false | 2.779651 | false | false | false |
pombredanne/pytype | pytype/pytd/parse/builtins_test.py | 1 | 1149 | """Tests for pytype.pytd.parse.builtins."""
from pytype.pytd import pytd
from pytype.pytd.parse import builtins
from pytype.pytd.parse import visitors
import unittest
class UtilsTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.builtins = builtins.GetBuiltinsPyTD()
def testGetBuiltinsPyTD(se... | apache-2.0 | -4,136,586,855,146,681,300 | 29.236842 | 80 | 0.72846 | false | 3.670927 | true | false | false |
seet61/one | v2/logging/__init__.py | 1 | 70340 | # Copyright 2001-2014 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this perm... | bsd-2-clause | -7,876,264,137,841,463,000 | 34.20175 | 89 | 0.567714 | false | 4.610041 | false | false | false |
flautines/pyMaker | pyhandru/game.py | 1 | 15389 | __author__ = 'andriu'
import pygame, random, sys
from pygame.locals import *
COLLISION_VISIBLE = False
DEFAULT_FPS = 60
class GameObject(pygame.sprite.Sprite):
# Constructor.
def __init__(self, img_path, pos_xy=(0, 0)):
"""
Inicializa un objeto de juego, carga la imagen especificada
... | gpl-3.0 | -692,428,428,724,156,200 | 30.335378 | 83 | 0.5885 | false | 3.377866 | false | false | false |
UMD-SEAM/bugbox | framework/Targets/apachetarget.py | 1 | 2923 |
# Copyright 2013 University of Maryland. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE.TXT file.
import os
from framework.Targets import Target
from framework.Targets import TargetPluginNotFound
class ApacheTarget(Target):
name = None
... | bsd-3-clause | 6,315,714,289,830,800,000 | 30.771739 | 107 | 0.563804 | false | 3.776486 | false | false | false |
nelsonag/openmc | openmc/filter.py | 1 | 65717 | from abc import ABCMeta
from collections import OrderedDict
from collections.abc import Iterable
import hashlib
from itertools import product
from numbers import Real, Integral
from xml.etree import ElementTree as ET
import numpy as np
import pandas as pd
import openmc
import openmc.checkvalue as cv
from .cell import... | mit | -1,638,988,189,380,927,700 | 32.073478 | 81 | 0.57988 | false | 4.285705 | false | false | false |
danionescu0/robot-camera-platform | alexa/lambda_function.py | 1 | 5332 | import logging
import requests
from ask_sdk_core.skill_builder import SkillBuilder
from ask_sdk_core.dispatch_components import (
AbstractRequestHandler, AbstractExceptionHandler,
AbstractRequestInterceptor, AbstractResponseInterceptor)
from ask_sdk_core.utils import is_request_type, is_intent_name
from ask_sd... | gpl-3.0 | -312,985,445,124,418,560 | 38.503704 | 104 | 0.740998 | false | 3.897661 | false | false | false |
crazcalm/Password_generator | pass_gen2.py | 1 | 1911 | """Notes:
User choose:
1. length of password
2. option to use special characters in password
"""
import random, string
def password_length(pass_len = 0):
limit = 1000
print "Please enter the desired length for your password."
print "The length must be an integer greater than 5."
pass_len = raw_input("Enter ... | mit | 6,086,623,938,266,387,000 | 20.233333 | 64 | 0.690738 | false | 3.190317 | false | false | false |
tubaman/ft_worth_project_scraper | project_scraper.py | 1 | 4572 | #!/usr/bin/env python
import sys, logging, csv, re, time
from urllib2 import urlopen, Request
from BeautifulSoup import BeautifulSoup
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
SITE_URL = 'http://projects.fortworthgov.org'
MAX_PIDS = 2000
INTER_PROJECT_POLL_DELAY = 1 # secs
MAX_NUM_PHASES = 1... | bsd-3-clause | 5,043,971,340,998,278,000 | 29.278146 | 83 | 0.577209 | false | 3.508826 | false | false | false |
twastvedt/FRAMEWORK | tools/python/lap_joint.py | 1 | 1339 | # FRAMEWORK
# Barry Beagen, David Moses, Trygve Wastvedt, Robert White
# Python script written by Trygve Wastvedt
# 7/31/2015
import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs
# Import related files
from post import *
from pocket import *
from joint import *
from structure import *
from toolpath ... | mit | -8,214,918,743,062,076,000 | 23.814815 | 100 | 0.76475 | false | 3.3475 | false | false | false |
patrick91/pycon | backend/blog/migrations/0001_initial.py | 1 | 1679 | # Generated by Django 2.2.3 on 2019-07-18 18:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappab... | mit | 6,797,084,710,820,368,000 | 44.378378 | 147 | 0.630137 | false | 4.20802 | false | false | false |
NeCTAR-RC/ceilometer | ceilometer/compute/notifications/__init__.py | 1 | 1362 | # -*- encoding: utf-8 -*-
#
# Copyright © 2013 Intel
#
# Author: Shuangtai Tian <shuangtai.tian@intel.com>
#
# 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/licen... | apache-2.0 | 8,959,674,084,489,006,000 | 29.244444 | 75 | 0.6723 | false | 4.174847 | false | false | false |
CDTiernan/Block-Bot | BotRun.py | 1 | 2557 | # -*- coding: utf-8 -*-
# Python3.4*
from sys import stdin, stdout, argv
from Bot import Planner
from Bot.Game.Game import Game
from Bot.Parser import Parser
class Bot:
def __init__(self, strategy, params):
self.game = Game()
self._parser = Parser(self.game)
self._planner =... | mit | 2,617,958,833,024,758,300 | 27.390805 | 104 | 0.53422 | false | 3.652857 | false | false | false |
cjlee112/socraticqs2 | mysite/analytics/models.py | 1 | 1362 | import os
from django.contrib.auth.models import User
from django.db import models
from django.utils.deconstruct import deconstructible
from ct.models import Course
@deconstructible
class UploadTo(object):
"""
Deconstructable class as function to serialize in migrations,
compatibility for python 2
... | apache-2.0 | 6,370,791,013,423,997,000 | 33.05 | 102 | 0.717327 | false | 4.017699 | false | false | false |
tensorflow/models | research/seq_flow_lite/layers/conv_layers.py | 1 | 4124 | # Copyright 2020 The TensorFlow 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 applicab... | apache-2.0 | -4,864,902,287,021,530,000 | 33.949153 | 80 | 0.667071 | false | 3.861423 | false | false | false |
better-dem/portal | legislators/apps.py | 1 | 1132 | from __future__ import unicode_literals
from django.apps import AppConfig
from django.utils.module_loading import module_has_submodule
from importlib import import_module
class LegislatorsConfig(AppConfig):
name = 'legislators'
are_projects_editable = False
custom_feed_item_template = None
external_l... | agpl-3.0 | 6,495,480,338,682,612,000 | 36.733333 | 136 | 0.666078 | false | 3.675325 | false | false | false |
dj-stripe/dj-stripe | tests/test_payment_intent.py | 1 | 6468 | """
dj-stripe PaymentIntent Model Tests.
"""
from copy import deepcopy
from unittest.mock import patch
import pytest
import stripe
from django.test import TestCase
from djstripe.enums import PaymentIntentStatus
from djstripe.models import Account, Customer, PaymentIntent
from tests import (
FAKE_ACCOUNT,
FAKE... | mit | 7,147,825,401,841,710,000 | 36.172414 | 120 | 0.623995 | false | 3.934307 | true | false | false |
Chagall/dutch-eng-dictionary | Object Oriented Implementation (current)/Model.py | 1 | 3152 | import sqlite3
class Model():
# Constructor
def __init__(self):
self.setHomeScreenOp(-1)
self.setViewPointer(None)
# Setters
def setViewPointer(self,pointer):
self.viewPointer = pointer
def setHomeScreenOp(self,option):
self.homeScreenOp = option
if(self.getHomeScreenOp() != -1):
if(self.getHomeS... | mit | -6,099,621,026,562,139,000 | 36.082353 | 103 | 0.728109 | false | 3.338983 | false | false | false |
tcoenraad/rolit | rolit/helpers.py | 1 | 2379 | import time
import socket
from termcolor import colored
from rolit.protocol import Protocol
class Helpers(object):
@staticmethod
def log(message):
message = "[%s] %s" % (time.strftime("%H:%M:%S"), message)
print(message)
@staticmethod
def notice(message):
print(colored(messag... | mit | -3,508,142,515,354,947,000 | 24.580645 | 71 | 0.563682 | false | 4.011804 | false | false | false |
JohnReid/bioinf-utilities | python/corebio/seq_io/nbrf_io.py | 1 | 5866 |
# Copyright (c) 2006, The Regents of the University of California, through
# Lawrence Berkeley National Laboratory (subject to receipt of any required
# approvals from the U.S. Dept. of Energy). All rights reserved.
# This software is distributed under the new BSD Open Source License.
# <http://www.opensource.... | mit | -6,907,559,843,488,041,000 | 33.710059 | 79 | 0.631265 | false | 3.612069 | false | false | false |
jenfly/monsoon-onset | scripts/analyze-composites.py | 1 | 19777 | import sys
sys.path.append('/home/jwalker/dynamics/python/atmos-tools')
sys.path.append('/home/jwalker/dynamics/python/atmos-read')
import xray
import numpy as np
from datetime import datetime
import matplotlib.pyplot as plt
from matplotlib import animation
import matplotlib as mpl
import collections
import pandas as ... | mit | 699,003,416,730,470,100 | 34.506284 | 85 | 0.539162 | false | 2.869143 | false | false | false |
IRI-Research/django-taggit | setup.py | 1 | 1352 | from setuptools import setup, find_packages
import taggit
with open('README.rst') as f:
readme = f.read()
setup(
name='django-taggit',
version='.'.join(str(i) for i in taggit.VERSION[:3]) + (("+" + taggit.VERSION[3]) if len(taggit.VERSION) > 3 else ""),
description='django-taggit is a reusable Djang... | bsd-3-clause | 7,760,630,800,411,376,000 | 31.97561 | 122 | 0.598373 | false | 3.930233 | false | false | false |
SALib/SALib | src/SALib/sample/ff.py | 1 | 3554 | """The sampling implementation of fractional factorial method
This implementation is based on the formulation put forward in
[`Saltelli et al. 2008 <http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470059974.html>`_]
"""
from scipy.linalg import hadamard
import numpy as np
from . import common_args
from ..util im... | mit | 1,926,791,333,098,974,700 | 25.522388 | 98 | 0.6435 | false | 3.922737 | false | false | false |
digitalvectorz/syn | Syn/PackageRegistry.py | 1 | 4458 | """
Useful pickle-type stuff
@license: GPL-3+
@author: Paul Tagliamonte <paultag@gmail.com>
@date: August 6th, 2011, 01:50 -0000
Uses a JsonBfile to store package info
"""
import Syn.Log as l
import Syn.JsonBfile as flatfile
import Syn.Policy.PackageRegistry as R
import Syn.Policy.Universal as U
fro... | gpl-3.0 | -6,155,798,058,003,282,000 | 24.474286 | 90 | 0.667788 | false | 3.085121 | false | false | false |
saskartt/P4UL | pyNetCDF/spectraFromNetCdf.py | 1 | 4750 | #!/usr/bin/env python
import sys
import numpy as np
import argparse
import matplotlib.pyplot as plt
from plotTools import addToPlot
from spectraTools import spectraAnalysis
from netcdfTools import read3dDataFromNetCDF
from analysisTools import sensibleIds, groundOffset
from utilities import filesFromList
'''
Descripti... | mit | -4,915,875,889,400,020,000 | 36.401575 | 96 | 0.600421 | false | 3.100522 | false | false | false |
ayushgarg1804/Eventico | src/util/database.py | 1 | 14330 | # -*- coding: utf-8 -*-
# @Author: Aman Priyadarshi
# @Date: 2017-03-21 10:05:17
# @Last Modified by: amaneureka
# @Last Modified time: 2017-04-10 10:29:07
import os
import re
import glob
import json
import random
import string
import time
import sqlite3 as sql
import progressbar
from hashlib import md5
from datet... | mit | -5,105,335,163,118,297,000 | 31.423077 | 141 | 0.639916 | false | 2.97118 | false | false | false |
nof20/BitcoinModel | PerfAnalysis/PnL.py | 1 | 2270 | """Calculate P/L.
Relies on Python 3 float division.
"""
import math
import numpy as np
import pandas as pd
class PnL(object):
COMMISSION = 25 # basis points: see e.g. https://gemini.com/fee-schedule/
def calc_pnl(self, x, y, price_col="Open"):
"""Calculate P/L. x is dataframe of price, with pric... | gpl-3.0 | 4,248,277,745,135,924,000 | 35.031746 | 89 | 0.485022 | false | 3.886986 | false | false | false |
badele/mksensors | setup.py | 1 | 1794 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from mksensors import __version__
PYPI_RST_FILTERS = (
# Replace code-bloc... | gpl-3.0 | 3,535,671,393,568,599,000 | 21.987179 | 65 | 0.597881 | false | 3.600402 | false | false | false |
voidJeff/Cryptography | cryptography.py | 1 | 2286 | """
cryptography.py
Author: Jeff
Credit: None
Assignment:
Write and submit a program that encrypts and decrypts user data.
See the detailed requirements at https://github.com/HHS-IntroProgramming/Cryptography/blob/master/README.md
"""
action_ = "goahead"
while action_ != "q":
associations = "abcdefghijklmnopqrst... | mit | 4,186,830,875,170,282,500 | 27.936709 | 108 | 0.498688 | false | 3.711039 | false | false | false |
Zlira/wikipageviews | squid_reports/combine_stats.py | 1 | 1698 | from datetime import date
from os import path
import pandas as pd
import ggplot as gp
data_path = path.join(
path.dirname(path.realpath(__file__)), 'data'
)
def date_from_quarter(quarter):
year, q = quarter.split()
month = int(q[1]) * 3
return pd.Timestamp(date(year=int(year), month=month, day=1))
... | gpl-3.0 | 2,933,987,377,041,356,300 | 24.727273 | 73 | 0.610718 | false | 3.185741 | false | false | false |
RedhawkSDR/framework-codegen | redhawk/codegen/jinja/project/component/mapping.py | 1 | 1862 | #
# This file is protected by Copyright. Please refer to the COPYRIGHT file
# distributed with this source distribution.
#
# This file is part of REDHAWK core.
#
# REDHAWK core 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
... | lgpl-3.0 | -3,249,907,782,153,726,000 | 39.478261 | 117 | 0.74275 | false | 4.137778 | false | false | false |
alphagov/notify-api | config.py | 1 | 1159 |
class Config(object):
DEBUG = False
NOTIFY_HTTP_PROTO = 'http'
AUTH_REQUIRED = True
API_TOKEN = '$2a$10$JGHuLQA..8GKdKlHoKxa6exqRy0/awKAj7E9TCbVXteADL/Xg5i8C'
SMS_ENABLED = True
EMAIL_ENABLED = True
SQLALCHEMY_COMMIT_ON_TEARDOWN = False
SQLALCHEMY_RECORD_QUERIES = True
SQLALCHEMY_DA... | mit | -4,046,935,067,199,397,000 | 21.72549 | 78 | 0.66868 | false | 2.727059 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.