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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tjcsl/ion | intranet/apps/events/forms.py | 1 | 1889 | from django import forms
from django.utils import timezone
from ..groups.models import Group
from .models import Event
class EventForm(forms.ModelForm):
def __init__(self, *args, all_groups=False, **kwargs):
super().__init__(*args, **kwargs)
if not all_groups:
self.fields["groups"].qu... | gpl-2.0 | 1,669,203,879,041,194,200 | 34.641509 | 143 | 0.574907 | false | 4.352535 | false | false | false |
fedspendingtransparency/data-act-broker | dataactbroker/userRoutes.py | 1 | 4114 | from flask import request
from dataactbroker.handlers.accountHandler import AccountHandler
from dataactbroker.permissions import permissions_check
from dataactbroker.routeUtils import RouteUtils
def add_user_routes(app,system_email,bcrypt):
""" Create routes related to file submission for flask app
"""
... | cc0-1.0 | 26,972,574,176,193,828 | 49.170732 | 147 | 0.709285 | false | 4.22816 | false | false | false |
rbalda/neural_ocr | env/lib/python2.7/site-packages/pybrain/optimization/memetic/memetic.py | 1 | 2537 | __author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain.optimization.optimizer import BlackBoxOptimizer, TopologyOptimizer
from pybrain.optimization.hillclimber import HillClimber
from pybrain.structure.evolvables.maskedparameters import MaskedParameters
class MemeticSearch(HillClimber, TopologyOptimizer):
""" Inte... | mit | -2,982,297,332,251,377,000 | 40.606557 | 120 | 0.569176 | false | 4.587703 | false | false | false |
xeor/hohu | api/data/src/settings.py | 1 | 4232 | import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = os.environ.get('SECRET_KEY', 'zo3^4x8eqz8*ye9r$hrh*w)13)l@w7ymod_#%%&7+6+j*8l&$#')
DEBUG = bool(os.environ.get('DEBUG', False))
if DEBUG:
print('WARNING: The DEBUG is set to True.')
DEV = bool(os.environ.get('DEV', Fal... | mit | -3,050,842,136,101,800,400 | 25.78481 | 95 | 0.632325 | false | 3.586441 | false | false | false |
berth64/modded_modded_1257ad | source/process_sounds.py | 1 | 1810 | import sys
sys.dont_write_bytecode = True
from header_common import *
from module_info import *
from module_sounds import *
# Lav's export_dir tweak
export_dir = '%s/' % export_dir.replace('\\', '/').rstrip('/')
def write_python_header(sounds):
file = open("./ID_sounds.py","w")
for i_sound in xrange(... | agpl-3.0 | -8,116,568,112,333,687,000 | 29.206897 | 67 | 0.596133 | false | 2.938312 | false | false | false |
rosenvladimirov/addons | partner_credit_control/__openerp__.py | 1 | 1867 | # -*- coding: utf-8 -*-
##############################################################################
#
# Partner Credit Control module for Odoo
# Copyright (C) 2017 Rosen Vladimirov (vladimirov.rosen@gmail.com)
# @author Rosen Vladimirov <vladimirov.rosen@gmail.com>
#
# This program is free software: you ... | agpl-3.0 | -7,689,910,014,790,602,000 | 35.607843 | 86 | 0.612748 | false | 3.787018 | false | false | false |
SectorAlpha/AlphaVEN | alphaven.py | 1 | 13528 | import os
import argparse as ap
import maker
import warnings
import datetime as dt
import subprocess as sp
#Consts
FADEIN_STRINGS = ["in", "In", "fadein", "Fadein", "fi"]
FADEOUT_STRINGS = ["out", "Out", "fadeout", "Fadeout", "fo"]
class Ven():
def __init__(self):
"""Create new AlphaVEN instance."""
... | gpl-3.0 | -7,385,270,786,826,338,000 | 38.328488 | 96 | 0.491499 | false | 4.426702 | false | false | false |
hrishioa/Aviato | flask/Lib/site-packages/osgeo/scripts/gdalimport.py | 3 | 2966 | #!/usr/bin/env python
#******************************************************************************
# $Id$
#
# Name: gdalimport
# Project: GDAL Python Interface
# Purpose: Import a GDAL supported file to Tiled GeoTIFF, and build overviews
# Author: Frank Warmerdam, warmerdam@pobox.com
#
#**************... | gpl-2.0 | -288,890,926,724,166,500 | 32.325843 | 79 | 0.620364 | false | 3.861979 | false | false | false |
wakiyamap/electrum-mona | electrum_mona/scripts/bip70.py | 1 | 1061 | #!/usr/bin/env python3
# create a BIP70 payment request signed with a certificate
# FIXME: the code here is outdated, and no longer working
import tlslite
from electrum_mona.transaction import Transaction
from electrum_mona import paymentrequest
from electrum_mona import paymentrequest_pb2 as pb2
from electrum_mona.b... | mit | -6,627,236,905,453,368,000 | 27.675676 | 77 | 0.755891 | false | 2.971989 | false | true | false |
buffalotheory/critter_list | pyplayer/test/008_play_and_queue.py | 1 | 1274 | #!/usr/bin/env python3
# Bryant Hansen
# USAGE:
# sys.argv[0] media_file
# where media_file full path/filename to mplayer-compatible file on the local
# system
#
# initial conditions: pyplayerd is running
import os
import sys
from time import sleep
import traceback
import pyplayer_config as config
import pyplay... | gpl-2.0 | 3,219,515,862,726,316,500 | 25 | 150 | 0.613815 | false | 3.59887 | false | false | false |
msrb/freeipa | ipaplatform/base/paths.py | 1 | 16762 | # Authors:
# Tomas Babej <tbabej@redhat.com>
#
# Copyright (C) 2014 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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 vers... | gpl-3.0 | -5,471,396,839,473,048,000 | 46.08427 | 110 | 0.671042 | false | 2.463913 | true | false | false |
vellonce/PizzaFria | podcasting/utils/fields.py | 1 | 3044 | """
Django Extensions model fields
"""
from __future__ import unicode_literals
import uuid
from django.db.models import CharField
class UUIDVersionError(Exception):
pass
class UUIDField(CharField):
"""UUIDField
By default uses UUID version 1 (generate from host ID, sequence
number and current tim... | gpl-2.0 | 3,639,509,219,665,002,500 | 33.988506 | 87 | 0.606439 | false | 4.042497 | false | false | false |
hyperkitty/hyperkitty | hyperkitty/views/accounts.py | 1 | 12051 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2015 by the Free Software Foundation, Inc.
#
# This file is part of HyperKitty.
#
# HyperKitty 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 t... | gpl-3.0 | -7,425,740,729,090,428,000 | 35.853211 | 85 | 0.630985 | false | 3.837898 | false | false | false |
danstowell/markovrenewal | experiments/chiffchaffch_excerpted.py | 1 | 3883 | #!/bin/env python
"""This file contains some utility functions taken from Dan's larger file 'chiffchaffch.py'.
Excerpted here are the functions invoked by the main MMRP experiment scripts."""
import os.path
import matplotlib.pyplot as plt
# User parameters:
filteramp = True
filtermingap = True
doplots = True
basepa... | gpl-2.0 | 1,707,280,764,705,154,600 | 39.447917 | 132 | 0.671388 | false | 3.091561 | false | false | false |
xiaoshi657/myfile | spider/tencent/tencent/spiders/tencentPosition.py | 1 | 1425 | # -*- coding: utf-8 -*-
import scrapy
from tencent.items import TencentItem
class TencentpositionSpider(scrapy.Spider):
name = "tencent"
allowed_domains = ["tencent.com"]
url = "http://hr.tencent.com/position.php?&start="
offset = 0
start_urls = [url + str(offset)]
def parse(self, response):... | apache-2.0 | -3,275,327,250,168,577,000 | 31.897436 | 80 | 0.544817 | false | 2.876682 | false | false | false |
shucommon/little-routine | python/AI/opencv/gui/tracebar.py | 1 | 1274 | '''
For cv.getTrackbarPos() function,
first argument is the trackbar name,
second one is the window name to which it is attached,
third argument is the default value,
fourth one is the maximum value
fifth one is the callback function which is executed everytime trackbar value changes.
The callback function always has a... | gpl-3.0 | -7,508,665,367,235,700,000 | 29.333333 | 86 | 0.689168 | false | 3.266667 | false | false | false |
leiferikb/bitpop | src/tools/telemetry/telemetry/core/backends/chrome/inspector_backend.py | 1 | 10535 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import sys
from telemetry import decorators
from telemetry.core import bitmap
from telemetry.core import exceptions
from telemetry.... | gpl-3.0 | -4,911,296,670,180,827,000 | 32.444444 | 80 | 0.686853 | false | 4.102414 | false | false | false |
RicardoJohann/frappe | frappe/twofactor.py | 1 | 13724 | # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
import pyotp, os
from frappe.utils.background_jobs import enqueue
from jinja2 import Template
from pyqrcode import create as qrcreate
from six ... | mit | 7,357,835,376,024,494,000 | 33.054591 | 159 | 0.698047 | false | 2.885618 | false | false | false |
danmichaelo/SDBot | sdbot/webinterface.py | 1 | 3127 | from flask import Flask
from flask import render_template
from time import time
from datetime import datetime, timedelta
import calendar
import locale
import numpy as np
import os
import sqlite3
import locale
for loc in ['no_NO', 'nb_NO.utf8']:
try:
locale.setlocale(locale.LC_ALL, loc)
except locale.... | unlicense | -6,798,628,287,456,228,000 | 31.237113 | 140 | 0.548769 | false | 3.436264 | false | false | false |
mozilla/FlightDeck | apps/base/helpers.py | 1 | 5351 | import os
import urllib
import urlparse
import json
from django.conf import settings
from django.template import (Library, loader, TemplateSyntaxError, Node,
Variable, VariableDoesNotExist)
from django.template.defaultfilters import escapejs
from django.utils.encoding import smart_str
from... | bsd-3-clause | 4,042,840,007,349,534,700 | 31.430303 | 82 | 0.627546 | false | 3.900146 | false | false | false |
ThomasDoylend/Zen | sys/boot/bootstrap/autoloader.py | 1 | 1298 | #Zen
#
#AutoLoader
import imp
class AutoLoader:
#Takes care of intelligently loading any app/service.
name = 'Auto-loader'
def __init__(self,kernel):
self.kernel = kernel
self.fs = self.kernel.get_service('fs')
self.load_hash = 0
def load(self,path):
... | mit | -3,007,266,417,041,747,500 | 29.209302 | 81 | 0.540062 | false | 3.993846 | false | false | false |
SchadkoAO/FDTD_Solver | world_surface/helpers/generate_surface.py | 2 | 1056 | import numpy as np
def generate_surface(y_size, delta_x, grain_size):
wing_size = 12 * grain_size
noise = np.random.random(y_size + wing_size) * 2 * delta_x - delta_x
noise = noise / np.max(noise) * delta_x
gauss = np.fromfunction(lambda i: np.exp(
(i - 3 * grain_size) / (2 * grain_size ^ 2)),... | mit | -6,537,101,377,705,883,000 | 33.064516 | 83 | 0.544508 | false | 2.728682 | false | false | false |
thequbit/yellr-server | yellr-serv/yellrserv/ep_client_notification.py | 1 | 1077 | from pyramid.view import view_config
import client_utils
import utils
'''
@view_config(route_name='get_notifications.json')
def get_notifications(request):
result = {'success': False}
status_code = 200
try:
#if True:
success, error_text, language_code, lat, lng, \
client = client... | agpl-3.0 | -3,728,312,044,257,253,000 | 22.413043 | 58 | 0.578459 | false | 4.048872 | false | false | false |
cosurgi/trunk | examples/qm/2d-hydrogeneigen+positron-small-TEN-2.py | 1 | 9929 | #!/usr/bin/python
# -*- coding: utf-8 -*-
dimensions = 2
SMALLER = 1
size1d = 560/SMALLER
GRIDSIZE = [224/SMALLER,180/SMALLER] # GRIDSIZE = [320,256]
halfSize = [size1d,size1d*(1.0*GRIDSIZE[1]/GRIDSIZE[0]),0.1]# must be three components, because yade is inherently 3D and uses Vector3r. Remaining component... | gpl-2.0 | 8,754,685,277,358,878,000 | 53.483516 | 236 | 0.606898 | false | 3.124134 | false | false | false |
JohnyEngine/CNC | heekscnc/ocl_funcs.py | 1 | 8389 | import ocl
import math
from nc.nc import *
import tempfile
def STLSurfFromFile(filepath):
s = ocl.STLSurf()
ocl.STLReader(filepath, s)
return s
def cut_path(path, dcf, z1, mat_allowance, mm, units, rapid_to, incremental_rapid_to):
dcf.setPath(path)
dcf.setSampling(0.1) # FIXME: this should be adju... | apache-2.0 | 1,130,080,577,587,595,900 | 38.200935 | 288 | 0.569198 | false | 2.963264 | false | false | false |
ebrelsford/django-phillydata | phillydata/parcels/migrations/0001_initial.py | 1 | 1431 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Parcel',
fields=[
... | bsd-3-clause | -2,359,019,668,350,720,500 | 50.107143 | 224 | 0.640112 | false | 4.053824 | false | false | false |
locuslab/icnn | RL/src/bundle_entropy.py | 1 | 3796 | import numpy as np
def logistic(x):
return 1. / (1. + np.exp(-x))
def logexp1p(x):
""" Numerically stable log(1+exp(x))"""
y = np.zeros_like(x)
I = x>1
y[I] = np.log1p(np.exp(-x[I]))+x[I]
y[~I] = np.log1p(np.exp(x[~I]))
return y
def proj_newton_logistic(A,b,lam0=None, line_search=True):
... | apache-2.0 | 2,989,840,518,906,655,000 | 26.911765 | 84 | 0.41491 | false | 2.711429 | false | false | false |
ArcherSys/ArcherSys | Lib/lib2to3/fixes/fix_raise.py | 1 | 8918 | <<<<<<< HEAD
<<<<<<< HEAD
"""Fixer for 'raise E, V, T'
raise -> raise
raise E -> raise E
raise E, V -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)
raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T -> warns about st... | mit | -638,410,223,580,926,300 | 31.311594 | 80 | 0.541041 | false | 3.732943 | false | false | false |
paurosello/frappe | frappe/core/doctype/page/page.py | 1 | 4671 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import os
from frappe.model.document import Document
from frappe.build import html_to_js_template
from frappe.model.utils import render_include
from frappe import co... | mit | -5,529,530,856,666,826,000 | 29.135484 | 84 | 0.657247 | false | 3.095427 | false | false | false |
ThomasHangstoerfer/pyHomeCtrl | gcalendar.py | 1 | 3832 |
from __future__ import print_function
import httplib2
import os
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
import datetime
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
ex... | apache-2.0 | 5,739,775,279,411,638,000 | 35.150943 | 190 | 0.662578 | false | 3.962771 | false | false | false |
ZeeD26/python101 | docs/exercises/is_palindrome_string.py | 1 | 1679 | r"""
A palindrome_ is a word, phrase, number or sequence of characters which reads
the same backward as forward. Examples for words are *radar*, *level*, and
*racecar*. Write a function that checks whether a :class:`strings <str>` is a
palindrome or not.
.. autofunction:: is_palindrome_string
Start by downloading the... | bsd-3-clause | -4,171,778,432,318,806,000 | 25.650794 | 79 | 0.626563 | false | 3.756152 | true | false | false |
uyjco0/ted-scimu | base.py | 1 | 7063 | # -*- encoding: utf-8 -*-
#
# 'base.py'
#
# Copyright (C) 2013 Jorge Couchet <jorge.couchet at gmail.com>
#
# This file is part of 'ted-scimu'
#
# 'ted-scimu' 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,... | gpl-3.0 | -8,542,019,304,850,642,000 | 36.521277 | 209 | 0.626311 | false | 3.954036 | false | false | false |
chenjiandongx/pyecharts | pyecharts/charts/basic_charts/funnel.py | 1 | 1865 | from ... import options as opts
from ... import types
from ...charts.chart import Chart
from ...globals import ChartType
class Funnel(Chart):
"""
<<< Funnel >>>
Funnel diagram is suitable for one-way analysis of single process
with standardized business process, long cycle and multiple lin... | mit | 7,241,232,577,728,788,000 | 31.303571 | 70 | 0.52815 | false | 4.089912 | false | false | false |
ahopkins/amhopkins.com | publish.py | 1 | 2485 | from medium import Client
import os
import glob
from bs4 import BeautifulSoup
from pathlib import Path
PATH = os.path.dirname(os.path.abspath(__file__))
MEDIUM = os.path.join(PATH, 'medium-published')
with open(os.path.join(PATH, 'KEYS', 'medium'), 'r') as file:
application_id, application_secret, access_token =... | mit | 552,634,826,619,762,300 | 26.611111 | 100 | 0.58672 | false | 3.736842 | false | false | false |
FedoraScientific/salome-paravis | test/VisuPrs/3D_viewer/B1.py | 1 | 1520 | # Copyright (C) 2010-2014 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library ... | lgpl-2.1 | 4,260,798,725,414,599,700 | 27.148148 | 81 | 0.733553 | false | 3.12115 | false | false | false |
JaeGyu/PythonEx_1 | dictEx1.py | 1 | 1310 | a = {'jan':1,'feb':2}
print(a)
print(type(a))
b = dict(jan=1,feb=2)
print(b)
print("abc".title())
month_names = [("a",1),("b",2)]
c = {name.title():num for name, num in month_names}
print(c)
d = {name:num for name,num in month_names if num % 2 == 0}
print(d)
months = dict(month_names)
print(months)
print(months.it... | mit | -2,067,533,604,493,950,700 | 16.275362 | 58 | 0.618289 | false | 1.960526 | false | false | false |
ryfx/modrana | modules/mod_projection.py | 1 | 17094 | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Projection code (lat/long to screen conversions)
#----------------------------------------------------------------------------
# Copyright 2007-2008, Oliver White
#
# This program is free software: you can redistribu... | gpl-3.0 | 6,599,801,769,442,898,000 | 36.735099 | 128 | 0.576694 | false | 3.54133 | false | false | false |
stackforge/osprofiler | releasenotes/source/conf.py | 1 | 8992 | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | apache-2.0 | 5,053,364,346,222,410,000 | 31.462094 | 79 | 0.704293 | false | 3.846022 | false | false | false |
Brahimbaz/venom-xbmc-addons-beta | plugin.video.vstream/resources/hosters/videott.py | 1 | 3207 | from resources.lib.handler.requestHandler import cRequestHandler
#from t0mm0.common.net import Net
from resources.lib.parser import cParser
from resources.lib.config import cConfig
from resources.hosters.hoster import iHoster
import urllib, urllib2,re
import xbmcgui
try: import json
except: import simplejson as jso... | gpl-2.0 | 777,405,009,120,400,800 | 26.177966 | 130 | 0.510446 | false | 4.101023 | false | false | false |
ggljzr/pytRobot | pytrobot/flaskapp.py | 1 | 1871 | from flask import Flask, render_template, redirect, url_for, flash, abort, send_file
import json
from datetime import datetime
import subprocess
from picamera.exc import PiCameraMMALError
from .robotdriver import DirError
from .utils import sys_info
from .camera import capture_img
app = Flask(__name__)
a... | mit | 3,341,696,799,198,722,000 | 23.657534 | 84 | 0.668626 | false | 3.07225 | false | false | false |
edx/edx-analytics-pipeline | edx/analytics/tasks/enterprise/enterprise_user.py | 1 | 7793 | """Gather data related to enterprise users"""
import logging
import luigi
import luigi.task
from edx.analytics.tasks.common.mysql_load import MysqlInsertTask
from edx.analytics.tasks.enterprise.enterprise_database_imports import (
ImportBenefitTask, ImportConditionalOfferTask, ImportDataSharingConsentTask,
I... | agpl-3.0 | -5,238,539,878,268,993,000 | 34.747706 | 112 | 0.649942 | false | 4.397856 | false | false | false |
naoyat/latin | Verb.py | 1 | 1574 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
PARTICIPLE = 1024
IMPERATIVE = 512
INDICATIVE = 256
PASSIVE = 16
ING = 8
FUTURE = 4
PAST = 2
PERFECT = 1
INDICATIVE_ACTIVE_PRESENT = INDICATIVE #| PRESENT
INDICATIVE_ACTIVE_IMPERFECT = INDICATIVE ... | mit | 3,606,079,984,408,599,000 | 41.833333 | 75 | 0.623217 | false | 3.059524 | false | true | false |
openstack/designate | designate/conf/api.py | 1 | 4809 | # Copyright 2012 Managed I.T.
#
# Author: Kiall Mac Innes <kiall@managedit.ie>
#
# 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 r... | apache-2.0 | 491,817,049,776,111,360 | 42.324324 | 79 | 0.609274 | false | 4.044575 | false | false | false |
xyos/horarios | fabfile.py | 1 | 1045 | from fabric.api import run, lcd, local
from fabric.colors import green, red
import os
file_path = os.getcwd()
def activate(command):
if os.name == "nt":
local("%s/Scripts/activate.bat && " + command, file_path)
elif os.name == "posix":
local("/bin/bash -c 'source " + file_path + "/bin/activat... | mit | -3,426,333,867,810,408,000 | 26.5 | 88 | 0.640191 | false | 3.641115 | false | false | false |
crukci-bioinformatics/galaxy | crukci-tools/tools/cri/unused/myTools/bed_complement.py | 1 | 2833 | #!/usr/bin/python
import getopt, sys
import encode
from encode import *
def regions_complement(regions):
comp_regions = encode.regions()
for region_name in regions.keys():
# store an alias for the region with name region_name - just readability
data = regions[region_name]
comp_regions... | mit | 7,322,969,428,473,056,000 | 27.616162 | 89 | 0.595482 | false | 3.684005 | false | false | false |
james-powis/puppetboard | puppetboard/utils.py | 1 | 3121 | from __future__ import absolute_import
from __future__ import unicode_literals
import json
import logging
from math import ceil
from requests.exceptions import HTTPError, ConnectionError
from pypuppetdb.errors import EmptyResponseError
from flask import abort
# Python 3 compatibility
try:
xrange
except NameErr... | apache-2.0 | 924,701,120,338,025,100 | 23.968 | 76 | 0.579622 | false | 4.058518 | false | false | false |
amitjamadagni/sympy | sympy/matrices/expressions/tests/test_matrix_exprs.py | 2 | 5025 | from __future__ import with_statement
from sympy.core import S, symbols, Add, Mul
from sympy.functions import transpose, sin, cos, sqrt
from sympy.simplify import simplify
from sympy.matrices import (Identity, ImmutableMatrix, Inverse, MatAdd, MatMul,
MatPow, Matrix, MatrixExpr, MatrixSymbol, ShapeError, ZeroM... | bsd-3-clause | -7,855,414,790,303,279,000 | 24.769231 | 79 | 0.579502 | false | 2.894585 | true | false | false |
PALab/stalta | plotevents.py | 1 | 3156 | '''plot event info'''
import base
import datetime
import numpy as np
import matplotlib
if not base.Globs["iswin"]:
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
from logger import *
def eventplot(tin, y, sta, lta, ratio, trigs,
dt, t0, tsta, tlta, trig, detrig, desense,
... | mit | 8,170,216,897,380,982,000 | 31.574468 | 78 | 0.540241 | false | 2.911439 | false | false | false |
ray-project/ray | python/ray/tests/test_healthcheck.py | 1 | 1656 | # coding: utf-8
import logging
import pytest
import signal
import subprocess
import sys
import time
import ray
logger = logging.getLogger(__name__)
def test_healthcheck():
res = subprocess.run(["ray", "health-check"])
assert res.returncode != 0
ray.init()
res = subprocess.run(["ray", "health-check"... | apache-2.0 | 3,782,194,128,236,310,500 | 26.147541 | 72 | 0.634662 | false | 3.6 | false | false | false |
p2pu/learning-circles | backup/utils.py | 1 | 2707 | from django.conf import settings
from dcu.active_memory import upload_rotate
import datetime
import os.path
import subprocess
import logging
logger = logging.getLogger(__name__)
class BackupFailed(Exception):
pass
def backup_media():
'''
make a backup of media files
'''
timestamp = datetime.d... | mit | 6,255,254,812,936,844,000 | 32.012195 | 102 | 0.65423 | false | 3.633557 | false | false | false |
mbakke/ganeti | lib/qlang.py | 1 | 9513 | #
#
# Copyright (C) 2010, 2011 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distri... | gpl-2.0 | 5,798,625,394,325,158,000 | 27.14497 | 80 | 0.646799 | false | 3.533804 | false | false | false |
gumob/django-stripe | stripe/signals.py | 1 | 5752 | """
Provides the following signals:
- stripe_webhook_charge_succeeded
- stripe_webhook_charge_failed
- stripe_webhook_charge_refunded
- stripe_webhook_charge_disputed
- stripe_webhook_customer_created
- stripe_webhook_customer_updated
- stripe_webhook_customer_deleted
- stripe_webhook_customer_subscription_created
- s... | mit | 5,131,202,563,527,160,000 | 53.780952 | 105 | 0.807024 | false | 3.48184 | false | false | false |
HarmonyEnterpriseSolutions/harmony-platform | src/gnue/common/external/plex/DFA.py | 1 | 5424 | #=======================================================================
#
# Python Lexical Analyser
#
# Converting NFA to DFA
#
#=======================================================================
from src.gnue.common.external.plex.Machines import LOWEST_PRIORITY
from src.gnue.common.external.plex.Transitions... | gpl-2.0 | 4,180,384,056,127,945,700 | 33.993548 | 82 | 0.69469 | false | 3.186839 | false | false | false |
LLNL/spack | var/spack/repos/builtin/packages/quicksilver/package.py | 2 | 1948 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Quicksilver(MakefilePackage):
"""Quicksilver is a proxy application that represents some e... | lgpl-2.1 | 1,920,603,991,302,244,400 | 29.920635 | 78 | 0.61807 | false | 3.717557 | false | false | false |
liuxue1990/python-ll1-parser-generator | rm_recur.py | 1 | 3552 | from ll1_symbols import *
class RmRecurEngine(object):
"""docstring for RmRecurEngine"""
def __init__(self, prodc_list, non_term_set):
self.prodc_list = prodc_list
self.non_term_list = list(non_term_set)
# self.non_term_prodc_map = {non_term: [] for non_term in self.non_term_list}
# self.update_non_term_map... | gpl-3.0 | 4,279,328,949,209,288,700 | 37.193548 | 135 | 0.682151 | false | 2.629164 | false | false | false |
ACECentre/SpeechBubblev1 | speechbubble/speechbubble/campaign/admin.py | 1 | 8218 | import csv
from django import forms
from django.shortcuts import render_to_response
from django import template
from django.utils.functional import update_wrapper
from django.contrib import admin
from django.http import HttpResponseRedirect
from django.contrib.admin.util import unquote
from django.core.exceptions impor... | bsd-3-clause | 6,368,169,875,508,079,000 | 37.764151 | 233 | 0.57155 | false | 4.394652 | false | false | false |
marquesarthur/python-bugzilla-report-api | data.py | 1 | 8067 | import json
import requests
import datetime
import time
import sys
import re
import plotly.plotly as py
import plotly.graph_objs as graph
from time import mktime
from datetime import date
from pprint import pprint
from bug_backlog import Backlog
from bug_components import Component
from bug_developers import Assignee
... | mit | -8,067,715,161,354,324,000 | 32.6125 | 157 | 0.670138 | false | 3.564737 | false | false | false |
oysstu/pyopencl-in-action | ch11/bsort.py | 1 | 12349 | """
Listing 11.3: A general bitonic sort
"""
from io import open
import numpy as np
import pyopencl as cl
import utility
SORT_ASCENDING = True
NUM_FLOATS = 2**20
kernel_src = '''
/* Sort elements within a vector */
#define VECTOR_SORT(input, dir) \
comp = input < shuffle(input, m... | mit | -3,874,290,139,137,970,700 | 34.282857 | 103 | 0.61673 | false | 2.833639 | false | false | false |
Crach1015/plugin.video.crachtvlistpro | _ytplist.py | 1 | 4160 | import urllib
import urllib2,json
import xbmcvfs
import requests,time
import os,xbmc,xbmcaddon,xbmcgui,re
addon = xbmcaddon.Addon('plugin.video.crachtvlistpro')
profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
cacheDir = os.path.join(profile, 'cachedir')
clean_cache=os.path.join(cacheDir,'cle... | gpl-2.0 | 9,016,366,593,899,264,000 | 39.794118 | 116 | 0.602885 | false | 3.333333 | false | false | false |
bennihepp/FastForestLib | python/training_context.py | 1 | 2082 | from __future__ import division
from abc import ABCMeta, abstractmethod
class TrainingContext:
__metaclass__ = ABCMeta
# TODO: abstract away the computation of statistics
@abstractmethod
def compute_statistics(self, sample_indices): pass
@abstractmethod
def sample_split_points(self, sample_... | mit | -5,126,495,431,040,047,000 | 26.038961 | 111 | 0.704611 | false | 4.516269 | false | false | false |
simone-campagna/py-structparser | examples/versioning/model/model_r3.py | 1 | 3830 | #
# Copyright 2013 Simone Campagna
#
# 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 wri... | apache-2.0 | -7,360,717,938,758,021,000 | 32.596491 | 106 | 0.597389 | false | 4.260289 | false | false | false |
HyperWind/kouhaibot | bot/ch.py | 1 | 61897 | ################################################################
# File: ch.py
# Title: Chatango Library
# Original Author: Lumirayz/Lumz <lumirayz@gmail.com>
# Current Maintainers and Contributors:
# Nullspeaker <import codecs;codecs.encode('aunzzbaq129@tznvy.pbz','rot_13')>
# asl97 <asl97@outlook.com>
# pystub
# ... | gpl-2.0 | -2,147,355,108,584,225,000 | 24.736798 | 877 | 0.573857 | false | 3.527498 | false | false | false |
axonchisel/ax_metrics | tests/test_metricdef.py | 1 | 5494 | """
Ax_Metrics - Test foundation metricdef package (not including MDefL parsing)
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------... | mit | 9,194,318,851,884,847,000 | 28.068783 | 78 | 0.556607 | false | 3.609724 | true | false | false |
michaeltcoelho/shortener | core/forms.py | 1 | 3523 | #-*- coding: utf-8 -*-
from django import forms
from models import Link
from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext as _
class UserCreationForm(forms.Form):
"""
UserForm - Form to create a new user
"""
error_messages = {
'password_m... | mit | 8,901,538,247,505,740,000 | 31.564815 | 103 | 0.60694 | false | 4 | false | false | false |
ReactiveX/RxPY | rx/subject/subject.py | 1 | 3108 | import threading
from typing import Any, List, Optional
from rx.disposable import Disposable
from rx.core import Observable, Observer, typing
from rx.internal import DisposedException
from .innersubscription import InnerSubscription
class Subject(Observable, Observer, typing.Subject):
"""Represents an object th... | mit | -1,769,932,384,335,428,600 | 28.320755 | 75 | 0.583655 | false | 4.352941 | false | false | false |
status-im/status-react | test/appium/tests/atomic/test_translations.py | 1 | 1576 | from itertools import chain
import json
import os
import pytest
from tests import marks
from tests.base_test_case import NoDeviceTestCase
class TestTranslations(NoDeviceTestCase):
@marks.testrail_id(6223)
@marks.skip
# skipped: no need to launch it on daily basis
def test_find_unused_translations(se... | mpl-2.0 | -1,622,359,827,410,377,500 | 37.439024 | 111 | 0.546954 | false | 4.082902 | true | false | false |
jrosdahl/maildirproc | mailprocessing/cmd/imap.py | 1 | 11993 | # -*- coding: utf-8; mode: python -*-
# Copyright (C) 2017 Johannes Grassler <johannes@btw23.de>
#
# 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... | gpl-2.0 | 8,406,665,683,349,692,000 | 32.406685 | 97 | 0.587343 | false | 4.212504 | false | false | false |
chandler14362/panda3d | direct/src/showbase/Messenger.py | 4 | 25487 | """This defines the Messenger class, which is responsible for most of the
event handling that happens on the Python side."""
__all__ = ['Messenger']
from .PythonUtil import *
from direct.directnotify import DirectNotifyGlobal
import types
from direct.stdpy.threading import Lock
class Messenger:
notify = Direc... | bsd-3-clause | -8,014,669,034,595,796,000 | 37.616667 | 113 | 0.527131 | false | 4.605529 | false | false | false |
wasade/american-gut-web | amgut/handlers/retrieve_kitid.py | 1 | 1273 | from amgut.lib.mail import send_email
from amgut.handlers.base_handlers import BaseHandler
from amgut.util import AG_DATA_ACCESS
from amgut import text_locale
class KitIDHandler(BaseHandler):
def get(self):
self.render('retrieve_kitid.html', message='', output='form',
loginerror='')
... | bsd-3-clause | 5,057,061,046,810,976,000 | 36.441176 | 78 | 0.523959 | false | 4.160131 | false | false | false |
morta-code/IntelliStock | intellistock/ui/ui_mainwindow.py | 1 | 22141 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_mainwindow.ui'
#
# Created: Tue Jan 13 13:18:41 2015
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except ... | gpl-2.0 | 1,322,740,813,483,164,700 | 63.54386 | 137 | 0.716771 | false | 3.716787 | false | false | false |
selective-inference/selective-inference | selectinf/algorithms/softmax.py | 3 | 3761 | r"""
This module implements the softmax approximation for
a multivariate Gaussian truncated by affine constraints. The approximation
is an approximation of the normalizing constant in the
likelihood.
"""
from copy import copy
import numpy as np
from regreg.api import smooth_atom
class softmax_objective(smooth_at... | bsd-3-clause | -1,101,396,097,543,086,500 | 26.057554 | 99 | 0.51263 | false | 3.746016 | false | false | false |
Juniper/contrail-ceilometer-plugin | ceilometer_plugin_contrail/network/statistics/floatingip.py | 1 | 1370 | #
# Copyright (c) 2015 Juniper Networks, 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 a... | apache-2.0 | 7,923,312,974,521,002,000 | 28.782609 | 75 | 0.748905 | false | 3.763736 | false | false | false |
brain-research/hyperbolictext | word_context/tools.py | 1 | 7048 | #!/usr/bin/python
#
# 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 a... | apache-2.0 | -3,918,148,317,013,106,000 | 34.417085 | 80 | 0.723751 | false | 3.83669 | false | false | false |
koalalorenzo/jointbtc | payments/migrations/0001_initial.py | 1 | 2772 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Address',
fields=[
('id', models.AutoField(verb... | mit | 9,220,694,968,455,333,000 | 48.5 | 114 | 0.573232 | false | 4.522023 | false | false | false |
ftoulemon/Dilebhome | backend/lib/DbConnector.py | 1 | 4460 | # coding: utf-8
import logging
import MySQLdb
from warnings import filterwarnings
class DbConnector(object):
"""
Connect with mysql DB
"""
RECORDS_M_TABLE = 'records_minute'
RECORDS_H_TABLE = 'records_hour'
RECORDS_D_TABLE = 'records_day'
RECORDS_O_TABLE = 'records_month'
RECORDS_Y_TAB... | mit | 4,629,801,154,520,819,000 | 30.188811 | 88 | 0.461659 | false | 3.967972 | false | false | false |
torgeirl/eliza | bot/messenger.py | 1 | 8426 | # -*- coding: utf-8 -*-
import logging
import random
import re
logger = logging.getLogger(__name__)
reflections = {
"am": "are",
"was": "were",
"i": "you",
"i'd": "you would",
"i've": "you have",
"i'll": "you will",
"my": "your",
"are": "am",
"you've": "I have",
"you'll": "I w... | mit | -7,330,581,222,430,813,000 | 29.751825 | 96 | 0.533705 | false | 3.346307 | false | false | false |
Jordan-Zhu/RoboVision | unsorted/LabelLineCurveFeature_py.py | 1 | 4289 | import cv2
import numpy as np
from legacyCode.utility import get_ordering, normalize_depth, get_direction_py
def swap_indices(arr):
res = []
for i, e in enumerate(arr):
res.append([arr[i][1] - 1, arr[i][0] - 1])
return np.array(res)
def roipoly(src, poly):
mask = np.zeros_like... | gpl-3.0 | 7,095,326,162,191,051,000 | 33.155738 | 105 | 0.529028 | false | 2.939685 | false | false | false |
Azure/azure-sdk-for-python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py | 1 | 11568 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 8,175,283,916,153,705,000 | 46.216327 | 179 | 0.635979 | false | 4.423709 | true | false | false |
protwis/protwis | tools/management/commands/assign_structure_states.py | 1 | 19467 | from django.core.management.base import BaseCommand
from django.contrib.postgres.aggregates import ArrayAgg
from django.db.models import Max, Min
from contactnetwork.distances import Distance, Distances
from contactnetwork.models import distance_scaling_factor
from protein.models import ProteinFamily, ProteinState
fro... | apache-2.0 | 5,794,347,739,398,808,000 | 54.292614 | 194 | 0.53409 | false | 4.258862 | false | false | false |
Chudsaviet/transmission-telegram | persistence.py | 1 | 1264 | import os.path
import logging
class Persistence:
def __init__(self, persistence_file):
self.authorized_chats = list()
self.persistence_file = persistence_file
if persistence_file and os.path.isfile(persistence_file):
logging.info('Loading authorized chats from %s' % persisten... | mit | 2,966,427,301,941,186,600 | 32.263158 | 79 | 0.539557 | false | 3.987382 | false | false | false |
our-city-app/oca-backend | src/solutions/common/bizz/coupons.py | 1 | 6971 | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 appl... | apache-2.0 | -7,986,205,065,681,956,000 | 44.562092 | 115 | 0.732033 | false | 3.520707 | false | false | false |
zamattiac/SHARE | providers/ca/lwbin/normalizer.py | 1 | 2994 | from share.normalize import *
class AgentIdentifier(Parser):
uri = IRI(ctx)
class WorkIdentifier(Parser):
uri = IRI(ctx)
class Tag(Parser):
name = ctx.name
class ThroughTags(Parser):
tag = Delegate(Tag, ctx)
class Maintainer(Parser):
schema = tools.GuessAgentType(ctx.maintainer)
name =... | apache-2.0 | -6,124,292,343,919,785,000 | 26.722222 | 156 | 0.651303 | false | 3.65122 | false | false | false |
caglar10ur/func | func/minion/modules/nm/vservermanager.py | 1 | 3354 | # This software may be freely redistributed under the terms of the GNU
# general public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import os
import sys
import v... | gpl-2.0 | -6,439,553,845,432,355,000 | 31.25 | 122 | 0.591831 | false | 3.755879 | false | false | false |
GunnerJnr/_CodeInstitute | Stream-2/Back-End-Development/4.Version-Control/5.Connecting-To-The-Issue-Tracker/adventure-challenge-solution/adventure.py | 1 | 2102 | # import our data file
from data import locations
# define a dictionary with our directions in. Each direction is a set of coordinates which,
# when added to a position, will move it in that direction. So for instance, if we're currently at (1, 1),
# moving east will result in (1+1, 1) = (2, 1). Moving west will resul... | mit | 6,930,727,267,035,443,000 | 44.695652 | 118 | 0.674596 | false | 3.988615 | false | false | false |
ngageoint/scale | scale/scheduler/recon/manager.py | 1 | 3421 | """Defines the class that manages reconciling tasks"""
from __future__ import unicode_literals
import datetime
import logging
import threading
from django.utils.timezone import now
COUNT_WARNING_THRESHOLD = 1000 # If the total list count hits this threshold, log a warning
FULL_RECON_THRESHOLD = datetime.timedelta(m... | apache-2.0 | -3,470,654,502,291,101,700 | 30.675926 | 92 | 0.587548 | false | 4.192402 | false | false | false |
2013Commons/HUE-SHARK | apps/impala/src/impala/tests.py | 1 | 3457 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 4,033,016,555,627,360,000 | 34.27551 | 123 | 0.707839 | false | 3.509645 | true | false | false |
hothHowler/pyzillow | pyzillow/pyzillowerrors.py | 1 | 3494 | class ZillowError(Exception):
"""
Error messages copied from Zillow\'s API documentation
http://www.zillow.com/howto/api/GetDeepSearchResults.htm
"""
code = dict([
(0, 'Request successfully processed'),
(1, 'Service error-there was a server-side error ' +
'while processin... | mit | 8,142,956,227,056,032,000 | 41.096386 | 79 | 0.577275 | false | 4.276622 | false | false | false |
thauser/pnc-cli | pnc_cli/swagger_client/models/license.py | 1 | 5572 | # 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... | apache-2.0 | 4,485,018,228,793,821,700 | 23.331878 | 77 | 0.540201 | false | 4.296068 | false | false | false |
shravya-ks/ECN-ns3 | src/wimax/bindings/modulegen__gcc_LP64.py | 1 | 787952 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | 349,915,262,579,946,400 | 62.642032 | 748 | 0.604763 | false | 3.81719 | false | false | false |
mvpossum/deep-learning | tp4/red_con_dict.py | 1 | 3554 | from __future__ import print_function
from keras.models import Sequential
from keras.layers import Dense, Activation, Dropout
from keras.layers import LSTM
from keras.optimizers import RMSprop
from keras.utils.data_utils import get_file
import numpy as np
import random
import sys
import h5py
from utils import *
import ... | mit | 146,808,267,485,039,330 | 30.451327 | 67 | 0.649409 | false | 3.346516 | false | false | false |
sightmachine/LightGBM | python-package/lightgbm/plotting.py | 1 | 11700 | # coding: utf-8
# pylint: disable = C0103
"""Plotting Library."""
from __future__ import absolute_import
import warnings
from copy import deepcopy
from io import BytesIO
import numpy as np
from .basic import Booster
from .sklearn import LGBMModel
def check_not_tuple_of_2_elements(obj, obj_name='obj'):
"""check... | mit | 124,729,947,960,476,670 | 31.865169 | 93 | 0.60735 | false | 3.808594 | false | false | false |
olivierverdier/sfepy | sfepy/fem/quadratures.py | 1 | 8809 | """
`quadrature_tables` are organized as follows::
quadrature_tables = {
'<geometry1>' : {
order1 : QuadraturePoints(args1),
order2 : QuadraturePoints(args2),
...
},
'<geometry2>' : {
order1 : QuadraturePoints(args1),
order2 : Quad... | bsd-3-clause | 6,951,535,837,725,817,000 | 41.350962 | 115 | 0.457373 | false | 2.501136 | false | false | false |
jebreimo/Yson | external/Yconvert/tools/codepages/codegen.py | 1 | 13620 | # -*- coding: utf-8 -*-
# ****************************************************************************
# Copyright © 2013 Jan Erik Breimo. All rights reserved.
# Created by Jan Erik Breimo on 2013-10-22.
#
# This file is distributed under the Simplified BSD License.
# License text is included with the source distributi... | bsd-2-clause | -5,322,707,830,966,782,000 | 31.196217 | 94 | 0.508848 | false | 3.858074 | false | false | false |
mdxe/pySX127x | receive_message.py | 1 | 3331 | #!/usr/bin/env python2.7
""" A simple continuous receiver class. """
# Copyright 2015 Mayer Analytics Ltd.
#
# This file is part of pySX127x.
#
# pySX127x 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,... | agpl-3.0 | -7,020,014,993,076,642,000 | 29.281818 | 118 | 0.68508 | false | 3.10149 | false | false | false |
timothyb0912/pylogit | src/pylogit/asym_logit.py | 1 | 50536 | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 28 20:16:35 2016
@name: MultiNomial Asymmetric Logit--version 3
@author: Timothy Brathwaite
@summary: Contains functions necessary for estimating multinomial asymmetric
logit models (with the help of the "base_multinomial_cm.py" file)
@notes: Dif... | bsd-3-clause | -4,480,891,505,624,783,400 | 44.983621 | 79 | 0.627968 | false | 4.529533 | false | false | false |
arraystream/simpleplotly | weplot/figure.py | 1 | 4619 | import itertools
import plotly
import plotly.graph_objs as go
from plotly import tools
from .layout import ElementBuilder
from .plot import AtomBuilder
from .subplot import SubPlotSpec, PlotCanvas
class FigureHolder(object):
def __init__(self, figure):
self.figure = figure
def plot(self, mode='offl... | mit | 7,442,328,481,942,678,000 | 33.214815 | 123 | 0.616151 | false | 3.767537 | false | false | false |
yuanzh/transfer_pos | proj_vec/paste.py | 1 | 1598 | import re
import time
import io
import sys
import argparse
from collections import defaultdict
# parse/validate arguments
argParser = argparse.ArgumentParser()
argParser.add_argument("-d", "--delimiter", type=str, default='\t', help="delimiter defaults to \t")
argParser.add_argument("-1", "--firstFilename", type=str)
... | mit | 2,046,168,865,012,859,600 | 36.162791 | 108 | 0.696496 | false | 3.392781 | false | false | false |
xp7551/robot | archive/motor_test.py | 1 | 2215 | import RPi.GPIO as GPIO
import time
import curses
#added motor enable to pi
#pin 16 ->enable
#pin 18 ->enable
class NiksRobot:
def __init__(self):
#setup
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.OUT)
GPIO.setup(11,GPIO.OUT)
GPIO.setup(13,GPIO.OUT)
GPIO.setup(15,GPIO.OUT)
#GPIO.setup(16,GPIO.OUT)
#... | apache-2.0 | -8,500,020,246,738,107,000 | 23.88764 | 55 | 0.540858 | false | 3.18705 | false | false | false |
zstackorg/zstack-utility | zstacklib/zstacklib/utils/daemon.py | 1 | 6017 | #!/usr/bin/env python
import sys, os, time, atexit
import traceback
import locale
from signal import SIGTERM,SIGKILL
from zstacklib.utils import linux
from zstacklib.utils import log
logger = log.get_logger(__name__)
class Daemon(object):
"""
A generic daemon class.
Usage: subclass the Daemon class... | apache-2.0 | 5,803,624,991,366,035,000 | 28.935323 | 110 | 0.51288 | false | 4.032842 | false | false | false |
googleapis/googleapis-gen | google/cloud/scheduler/v1beta1/scheduler-v1beta1-py/noxfile.py | 1 | 3587 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -8,710,536,702,921,232,000 | 26.174242 | 96 | 0.618344 | false | 3.601406 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.