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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
summerisgone/gitrecipe | setup.py | 1 | 1115 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name="gitrecipe",
version='0.0.2',
description='Simple buildout recipe for downloading git repositories. It uses system git command and its syntax',
author='Ivan Gromov',
author_email='summer.is.gone@gmail.com',
url='htt... | bsd-3-clause | -8,936,679,593,237,095,000 | 37.448276 | 117 | 0.642152 | false | 3.926056 | false | false | false |
jnez71/demos | geometry/bezier_surface.py | 1 | 5934 | #!/usr/bin/env python3
"""
Efficient implementation of a Bezier surface and its differential geometry.
"""
from __future__ import division
import numpy as np
################################################## CORE
class Bezier(object):
"""
Bezier manifold of dimension 2 embedded in Euclidean space of dimensi... | mit | -1,133,954,785,867,220,100 | 37.283871 | 94 | 0.568419 | false | 3.092236 | false | false | false |
appleseedhq/cortex | test/IECoreScene/MeshNormalsOpTest.py | 1 | 4405 | ##########################################################################
#
# Copyright (c) 2008-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redis... | bsd-3-clause | -3,052,171,660,580,019,000 | 38.330357 | 116 | 0.69353 | false | 3.563916 | true | false | false |
lihuanshuai/libmc | tests/shabby/reconnect_delay.py | 1 | 1557 | # coding: utf-8
import os
import time
import libmc
import slow_memcached_server
import subprocess
def memcached_server_ctl(cmd, port):
ctl_path = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(
os.path.abspath(__file__)
))),
'misc', 'memcached_server'
)
... | bsd-3-clause | -3,118,505,879,109,745,000 | 24.95 | 70 | 0.62492 | false | 3.046967 | false | false | false |
eirannejad/pyRevit | extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/ptools.stack/Links.pulldown/Create Workset For Linked Element.pushbutton/script.py | 1 | 1095 | from pyrevit import revit, DB, UI
from pyrevit import script
from pyrevit import forms
logger = script.get_logger()
selection = revit.get_selection()
linkedModelName = ''
if len(selection) > 0:
for el in selection:
if isinstance(el, DB.RevitLinkInstance):
linkedModelName = el.Name.split(':... | gpl-3.0 | -6,848,140,956,992,978,000 | 35.5 | 79 | 0.624658 | false | 3.967391 | false | false | false |
9p0le/simiki | simiki/log.py | 1 | 2342 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import logging
from logging import getLogger, Formatter, StreamHandler
from simiki import utils
from simiki.compat import is_linux, is_osx
class ANSIFormatter(Formatter):
"""Use ANSI escape sequences to colore... | mit | 7,475,655,482,972,480,000 | 25.91954 | 76 | 0.584116 | false | 3.916388 | false | false | false |
akegan/plasmoids | relReconVars.py | 1 | 9293 | ###############################################
###
### This file is generated by wpp.
###
### Input file : /scr_verus/wernerg/vrun/relRecon/relReconRepo/relReconPre.py
### Output file : relRecon.in
### Translation: 2014 Dec 04, 14:26:11
###
### disthistMac version $Id: disthistMac.py 104 2014-04-29 03:36:27Z wernerg ... | mit | 7,488,255,541,433,285,000 | 27.160606 | 137 | 0.689551 | false | 2.087376 | false | false | false |
esteluk/reinhardt | memberinfo/mailman.py | 2 | 4938 | # Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
# Much of this is based on /usr/lib/mailman/bin/paths.py and Fixes the path of the project in order to use mailman
# BEGIN MAILMAN PATH INCLUSION ---------------------------
import os
import sys
from warnings import filterwarnings
# some scripts expect... | agpl-3.0 | -8,628,226,163,998,219,000 | 38.190476 | 127 | 0.662009 | false | 3.966265 | false | false | false |
liaozhida/liaozhida.github.io | _posts/pythonbak/preCaptcha.py | 1 | 2197 | # -*- coding: utf-8 -*-
import requests
import json
from bs4 import BeautifulSoup
import time
class CaptchaHelper:
def __init__(self):
self.headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari... | apache-2.0 | -7,904,162,348,769,327,000 | 25.654321 | 150 | 0.553497 | false | 3.416139 | false | false | false |
SystemsBioinformatics/cbmpy | setupegg.py | 1 | 1159 | """
CBMPy: Constraint Based Modelling in Python (http://pysces.sourceforge.net/cbm)
============
Copyright (C) 2010-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as pub... | gpl-3.0 | 2,300,610,091,657,087,700 | 35.21875 | 93 | 0.762726 | false | 3.512121 | false | false | false |
Jelby-John/HatalogicoWeatherStation | main.py | 1 | 5387 | #!/usr/bin/python
from Adafruit_PWM_Servo_Driver import PWM
from Adafruit_ADS1x15 import ADS1x15
import time, os, sys
import Adafruit_DHT
# HOW MANY CYCLES TO BE PERFORMED BEFORE SHOWING THE HIGH AND LOW SEQUENCE
# SET TO 0 FOR OFF
intervalHighLow = 60
# HOW LONG TO REST BETWEEN CYCLES - ZERO IS FINE
intervalSleep = ... | mit | -341,734,205,532,914,300 | 24.77512 | 100 | 0.699462 | false | 2.53984 | false | false | false |
AntonovAlexander/activecore | designs/rtl/sigma/sw/benchmarks/mul_sw/hw_test_mul_sw.py | 1 | 1185 | # -*- coding:utf-8 -*-
from __future__ import division
import sys
sys.path.append('../../../../../rtl/udm/sw')
import time
import udm
from udm import *
sys.path.append('..')
import sigma
from sigma import *
def test_mul_sw(sigma, a, b):
sigma.tile.udm.wr32(0x6000, a)
sigma.tile.udm.wr32(0x6004, b)
corr... | apache-2.0 | -607,769,951,120,433,200 | 24.212766 | 86 | 0.55865 | false | 2.977387 | true | false | false |
gtt116/rabbitclient | rabbit.py | 1 | 3469 | #!/usr/bin/env python
"""
A Kombu based RabbitMQ server client
"""
import sys
import argparse
import json
import pprint
try:
from kombu.messaging import Producer
from kombu import Exchange, Queue, Connection
except ImportError:
print 'Please install kombu before running this script.'
print 'You can run ... | apache-2.0 | -6,895,754,863,888,696,000 | 31.726415 | 78 | 0.593255 | false | 3.973654 | false | false | false |
aymeric-spiga/remap | py/archive/reduced.py | 1 | 2347 | #! /usr/bin/env python
import netCDF4 as nc
import sys
import math
import numpy as np
def from_reduced(N,M):
#"N elements from south to north and N elements around equator "
if gaussian:
hmax = 2*math.pi/N
hmin = hmax/2
nlon = N
cells_lon = []
cells_lat = []
for i in range(M/2):
lat1 = 180.0... | gpl-2.0 | 2,083,614,771,329,507,000 | 26.290698 | 89 | 0.612697 | false | 2.604883 | false | false | false |
hip-odoo/odoo | addons/hr_attendance/models/hr_employee.py | 15 | 7281 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from random import choice
from string import digits
from odoo import models, fields, api, exceptions, _, SUPERUSER_ID
class HrEmployee(models.Model):
_inherit = "hr.employee"
_description = "Employee"
def... | agpl-3.0 | 2,383,363,399,660,738,600 | 48.530612 | 210 | 0.631232 | false | 4.036031 | false | false | false |
cloud-ark/cloudark | client/fmcmds/call_server.py | 1 | 14059 | import gzip
import json
import os
import requests
import tarfile
import urllib2
resources_endpoint = "http://localhost:5002/resources"
resource_stacks_endpoint = "http://localhost:5002/resource_stacks"
environments_endpoint = "http://localhost:5002/environments"
apps_endpoint = "http://localhost:5002/apps"
containers_... | apache-2.0 | 1,964,869,006,662,134,500 | 37.203804 | 124 | 0.580838 | false | 4.056261 | false | false | false |
ibmjstart/bluemix-python-eve-sample | macreduce/run.py | 1 | 3837 | #!/usr/bin/env python
"""Instantiates the Python Eve REST API Server.
Instantiates the Python Eve REST API Server for both local
and cloud (IBM Bluemix) execution. Provides a default catch-all
routing to provide API consumers with intentional responses
for all routes. Provides a redis cloud caching instance for
sess... | apache-2.0 | 7,938,279,015,738,166,000 | 32.955752 | 79 | 0.66823 | false | 3.67177 | false | false | false |
sbarton272/AcousticBarcodes-Explorations | barcodes/dxfwrite/examples/mtext.py | 1 | 3720 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: examples for dxfwrite usage, see also tests for examples
# Created: 09.02.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
import sys
import os
try:
import dxfwrite
except ImportError:
# if dxfwrite is not 'installed' append pare... | mit | -6,541,401,395,220,813,000 | 39.879121 | 83 | 0.600538 | false | 2.627119 | false | false | false |
DutBright/scientificResearch | adminStaff/views.py | 1 | 8772 | # coding: UTF-8
'''
Created on 2014-06-07
Desc: adminStaff' view, includes home(manage), review report view
'''
import time
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.views.decorators import csrf
from backend.decorators import *
from const import *
from ba... | agpl-3.0 | -821,464,746,761,467,800 | 30.52518 | 185 | 0.684961 | false | 3.495812 | false | false | false |
rudhir-upretee/Sumo17_With_Netsim | tools/traci/constants.py | 1 | 16975 | """
@file constants.py
This script contains TraCI constant definitions from <SUMO_HOME>/src/traci-server/TraCIConstants.h
generated by "rebuildConstants.py" on 2012-12-03 12:37:11.425000.
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2009-2013 DLR (http://www.dlr.de/) and contr... | gpl-3.0 | -4,040,832,587,357,143,600 | 24.916031 | 98 | 0.729131 | false | 2.953715 | false | false | false |
vensder/itmo_python | nasledovanye3.py | 1 | 1220 | import random
class Transport:
def __init__(self, name, speed = 0, wheel_count = 0, mass = 0, color = (0,0,0)):
self.name = name
self.speed = speed
self.wheel_count = wheel_count
self.mass = mass
self.color = color
self.pos = 0
def drive(self, time):
self.pos += self.speed * time
#return self.po... | gpl-3.0 | -2,407,283,530,971,650,000 | 16.941176 | 83 | 0.594262 | false | 2.652174 | false | false | false |
meisamhe/GPLshared | Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/scoping.py | 1 | 1058 | # @include
x, y, z = 'global-x', 'global-y', 'global-z'
def basic_scoping():
print(x) # global-x
y = 'local-y'
global z
z = 'local-z'
basic_scoping()
print(x, y, z) # global-x global-y local-z
def inner_outer_scoping():
def inner1():
print(x) # outer-x
def inner2():
x = 'i... | gpl-3.0 | -7,386,681,169,818,829,000 | 18.592593 | 74 | 0.52741 | false | 2.798942 | false | false | false |
the-duck/launcher-next | src/duck/launcher/XlibStuff.py | 1 | 1626 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#########
#########
#Copyright (C) 2014-2015 Mark Spurgeon <theduck.dev@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either v... | gpl-2.0 | 6,072,618,563,806,798,000 | 35.954545 | 138 | 0.636531 | false | 3.737931 | false | false | false |
alefnula/perart | src/perart/forms.py | 1 | 1510 | __author__ = 'Viktor Kerkez <alefnula@gmail.com>'
__contact__ = 'alefnula@gmail.com'
__date__ = '20 April 2010'
__copyright__ = 'Copyright (c) 2010 Viktor Kerkez'
import logging
from django import forms
from django.conf import settings
from google.appengine.api import mail
# perart imports
from perart impor... | gpl-3.0 | -3,145,847,521,591,563,000 | 22.984127 | 94 | 0.602649 | false | 3.756219 | false | false | false |
OCA/purchase-workflow | purchase_landed_cost/wizard/import_invoice_line.py | 1 | 1945 | # Copyright 2014-2016 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3
from odoo import api, fields, models
class ImportInvoiceLine(models.TransientModel):
_name = "import.invoice.line.wizard"
_description = "Import supplier invoice line"
supplier = fields.Many2one(
... | agpl-3.0 | -5,586,129,776,587,690,000 | 44.232558 | 77 | 0.614396 | false | 3.821218 | false | false | false |
adsabs/adsabs-pyingest | pyingest/parsers/hstprop.py | 1 | 5181 | #!/usr/bin/env python
from past.utils import old_div
import sys
import math
import requests
class URLError(Exception):
pass
class RequestError(Exception):
pass
class DataError(Exception):
pass
class HSTParser(object):
# HSTParser will return a list of articles taken from a HST API
# (https:... | mit | 8,031,092,040,686,377,000 | 40.448 | 145 | 0.550087 | false | 3.997685 | false | false | false |
radical-cybertools/radical.ensemblemd | src/radical/entk/execman/mock/resource_manager.py | 1 | 3425 | __copyright__ = 'Copyright 2017-2018, http://radical.rutgers.edu'
__author__ = 'Vivek Balasubramanian <vivek.balasubramaniana@rutgers.edu>'
__license__ = 'MIT'
# pylint: disable=unused-argument
from ..base.resource_manager import Base_ResourceManager
import radical.utils as ru
# ------------------------------... | mit | -5,283,086,850,979,547,000 | 29.309735 | 80 | 0.38219 | false | 5.765993 | false | false | false |
pratheekms/nlp-class | unit_test_5/feature_functions.py | 1 | 8956 | '''
feature_functions.py
Implements the feature generation mechanism
Author: Anantharaman Narayana Iyer
Date: 21 Nov 2014
'''
from nltk import sent_tokenize, word_tokenize
import nltk
import json
import numpy
import pickle
import datetime
from MyMaxEnt import MyMaxEnt
phones = ["phone", "phones", "smar... | mit | -8,602,308,351,966,660,000 | 26.252366 | 142 | 0.423515 | false | 3.76936 | false | false | false |
PW-Sat2/PWSat2OBC | integration_tests/emulator/rtc.py | 1 | 1580 | from datetime import timedelta, datetime
import wx
from wx import xrc
from devices import RTCDevice
from .base import ModuleBase, bind
class RTCModule(ModuleBase):
GridPos = (1, 0)
def __init__(self, system):
self._system = system
self._rtc = system.rtc # type: RTCDevice
self.title =... | agpl-3.0 | 8,938,563,817,151,320,000 | 27.214286 | 77 | 0.593671 | false | 3.291667 | false | false | false |
lxml/lxml | versioninfo.py | 1 | 2210 | import io
import os
import re
import sys
__LXML_VERSION = None
def version():
global __LXML_VERSION
if __LXML_VERSION is None:
with open(os.path.join(get_base_dir(), 'src', 'lxml', '__init__.py')) as f:
__LXML_VERSION = re.search(r'__version__\s*=\s*"([^"]+)"', f.read(250)).group(1)
... | bsd-3-clause | -7,693,295,235,261,800,000 | 26.283951 | 92 | 0.567873 | false | 3.480315 | false | false | false |
exic/spade2 | spade/pubsub.py | 1 | 9884 | from Behaviour import MessageTemplate, OneShotBehaviour
from xmpp.protocol import *
from xmpp.simplexml import Node
import uuid
def gen_id():
return str(uuid.uuid4())
#def PubSubMessageTemplate():
# msgs = []
# for ns in (NS_PUBSUB, NS_PUBSUB_OWNER):
# msg = Iq()
# msg.addChild(name='pubsub',... | lgpl-2.1 | 4,256,735,416,115,895,300 | 31.620462 | 101 | 0.542493 | false | 4.108063 | true | false | false |
xiaocong/remote-task-http-server | devices.py | 1 | 4107 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from bottle import Bottle, request, static_file, abort
import re
import time
import os
import subprocess
from io import BytesIO
try:
import PIL.Image as Image
except:
from PIL import Image
from jobs import lock
import adb
app = Bottle()
@app.get("/")
def device... | mit | 7,346,349,997,841,327,000 | 39.663366 | 197 | 0.528366 | false | 3.369155 | false | false | false |
bors-ltd/django-gitstorage | gitstorage/models.py | 1 | 6291 | # Copyright Bors LTD
# This file is part of django-gitstorage.
#
# Django-gitstorage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | gpl-3.0 | 749,146,428,825,357,800 | 34.948571 | 112 | 0.650135 | false | 4.098371 | false | false | false |
MarkusHackspacher/unknown-horizons | horizons/util/python/weakmethod.py | 1 | 2225 | # ###################################################
# Copyright (C) 2008-2017 The Unknown Horizons Team
# team@unknown-horizons.org
# This file is part of Unknown Horizons.
#
# Unknown Horizons is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | 867,174,227,849,065,700 | 32.208955 | 90 | 0.671461 | false | 3.836207 | false | false | false |
CSSIP-AIR/UMETRICS | collapse_persons/person_attribute.py | 1 | 3929 | ################################################################################
# Copyright (c) 2013, AMERICAN INSTITUTES FOR RESEARCH
# All rights reserved.
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
# 1. Redistribut... | bsd-2-clause | -7,868,506,971,949,554,000 | 54.338028 | 757 | 0.686689 | false | 4.722356 | false | false | false |
pcmoritz/Strada.jl | deps/src/caffe/python/apollocaffe/layers/caffe_layers.py | 1 | 7272 | """
List of layer classes for building protobuf layer parameters from python
"""
from .layer_headers import Layer, LossLayer, DataLayer
from .layer_helpers import assign_proto, Filler
from apollocaffe.proto import caffe_pb2
class CapSequence(Layer):
def __init__(self, name, sequence_lengths, **kwargs):
su... | bsd-2-clause | -2,210,375,708,227,604,200 | 39.853933 | 111 | 0.630226 | false | 3.476099 | false | false | false |
mbiciunas/nix | test/config/test_config_tags.py | 1 | 3679 | # Nix
# Copyright (c) 2017 Mark Biciunas.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | -418,231,377,767,631,170 | 34.375 | 109 | 0.638761 | false | 3.390783 | true | false | false |
ethancaballero/neural-engineers-first-attempt | adaptive_attention.py | 1 | 9391 | import tensorflow as tf
from tensorflow.python.ops import rnn, rnn_cell, seq2seq
from utils import get_seq_length, _add_gradient_noise, _position_encoding, _xavier_weight_init, _last_relevant, batch_norm
#from https://github.com/DeNeutoy/act-rte-inference/blob/master/AdaptiveIAAModel.py
class Adaptive_Episodes_Con... | mit | 8,711,310,250,242,839,000 | 39.658009 | 179 | 0.621127 | false | 3.376843 | true | false | false |
TAlonglong/trollduction-test | trollduction/tests/test_xml_read.py | 1 | 4230 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Martin Raspaud
# Author(s):
# Martin Raspaud <martin.raspaud@smhi.se>
# 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, eit... | gpl-3.0 | 3,548,981,223,696,637,000 | 34.546218 | 106 | 0.623404 | false | 3.317647 | true | false | false |
mbusb/multibootusb | scripts/config.py | 1 | 2054 | #!/usr/bin/env python3
# Name: config.py
# Purpose: Module to share important variables between various modules. Mainly included so as not to call many
# functions again and again
# Authors: Sundar
# Licence: This file is a part of multibootusb package. You can redistribute it or modify
# under the ter... | gpl-2.0 | -479,208,830,022,669,200 | 26.756757 | 111 | 0.689387 | false | 2.938484 | false | false | false |
kirmani/lockman | MC/pio.py | 1 | 3202 | import RPi.GPIO as GPIO
import requests
import time
import threading
import os
import base64
import string
import random
import datetime
"GPIO.setmode(BOARD)"
def closeLock():
p = GPIO.PWM(12,50) #sets pin 12 to PWM and sends 50 signals per second
p.start(7.5) #starts by sending a pulse at 7.5% to c... | mit | 1,823,985,232,699,865,300 | 30.087379 | 115 | 0.625859 | false | 2.932234 | false | false | false |
beeftornado/sentry | src/sentry/shared_integrations/client.py | 1 | 10459 | from __future__ import absolute_import
import logging
import requests
import sentry_sdk
import six
from collections import OrderedDict
from django.core.cache import cache
from bs4 import BeautifulSoup
from django.utils.functional import cached_property
from requests.exceptions import ConnectionError, Timeout, HTTPEr... | bsd-3-clause | 5,743,440,093,390,676,000 | 32.522436 | 100 | 0.574816 | false | 4.140538 | false | false | false |
ChromiumWebApps/chromium | tools/telemetry/telemetry/core/backends/chrome/extension_dict_backend.py | 1 | 2602 | # 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 json
import re
from telemetry.core import extension_page
from telemetry.core.backends.chrome import inspector_backend
class ExtensionNotFoundExcept... | bsd-3-clause | -441,002,597,549,063,600 | 33.693333 | 76 | 0.701768 | false | 4.258592 | false | false | false |
mishbahr/django-users2 | users/views.py | 1 | 6157 | from django.contrib import messages
from django.contrib.auth import get_user_model, login
from django.urls import reverse
from django.shortcuts import redirect, resolve_url
from django.template.response import TemplateResponse
from django.utils.translation import ugettext as _
from django.views.decorators.cache import ... | bsd-3-clause | -3,139,041,058,954,845,000 | 35.431953 | 97 | 0.637486 | false | 4.404149 | false | false | false |
JustinTulloss/harmonize.fm | masterapp/masterapp/model/user.py | 1 | 22317 | # Justin Tulloss
#
# Putting user in its own file since it's huge
import logging
from pylons import cache, request, session, c
from pylons.templating import render
from decorator import decorator
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Table, sql
from sqlalchemy.sql impo... | mit | 8,144,348,351,670,925,000 | 32.916413 | 99 | 0.577049 | false | 3.847759 | false | false | false |
ARM-software/trappy | tests/test_utils.py | 1 | 2217 | # Copyright 2015-2017 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | -5,604,032,030,369,191,000 | 35.344262 | 83 | 0.666216 | false | 3.664463 | true | false | false |
RazerM/pg_grant | tests/conftest.py | 1 | 2475 | from pathlib import Path
import pytest
import testing.postgresql
from sqlalchemy import create_engine, text
from sqlalchemy.engine.url import make_url
from testcontainers.postgres import PostgresContainer as _PostgresContainer
tests_dir = Path(__file__).parents[0].resolve()
test_schema_file = Path(tests_dir, 'data', ... | mit | 4,059,386,316,065,879,600 | 28.117647 | 86 | 0.657778 | false | 4.057377 | true | false | false |
raymondnoonan/Mpropulator | MPropulator/write_tab.py | 1 | 1656 | from MPropulator import helpers
import string
def write_tab(sheet, table_data, xls_startcell, skiprows, skipcols):
"""Writes the data for a particular table to the corresponding
Excel spreadsheet.
sheet: openpyxl worksheet to which you're writing
table_data: pandas data frame containing data to write... | mit | 5,847,719,726,850,679,000 | 37.511628 | 77 | 0.624396 | false | 3.842227 | false | false | false |
johnny555/2d3g | viz.py | 1 | 5005 | __author__ = 'Admin'
def group_bands(depth, coal_labels, holeID):
coal_label_list = ['RU', 'R', 'R1', 'R2', 'RO', 'RL', 'MU', 'MM', 'MML', 'LN', 'TR', 'TRL', 'PS', 'PSL', 'P2', 'P2U',
'P2LA', 'P2LB', 'BA', 'G1', 'G2', 'G34', 'G3', 'G4', 'G56', 'G5', 'G6', 'G7', 'G8', 'G9', 'G10',
... | bsd-2-clause | 1,808,144,811,737,757,200 | 24.804124 | 121 | 0.507493 | false | 2.613577 | false | false | false |
letsmeet-click/letsmeet.click | letsmeet/events/migrations/0001_initial.py | 1 | 2446 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-28 00:55
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_extensions.db.fields
class Migration(migrations.Migration... | mit | -1,845,259,420,887,350,000 | 45.150943 | 145 | 0.616926 | false | 4.246528 | false | false | false |
teonlamont/mne-python | mne/datasets/brainstorm/bst_auditory.py | 4 | 1920 | # Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>
#
# License: BSD (3-clause)
from functools import partial
from ...utils import verbose
from ..utils import (has_dataset, _data_path, _get_version, _version_doc,
_data_path_doc)
has_brainstorm_data = partial(has_dataset, name='brainstorm')
... | bsd-3-clause | -4,784,413,848,918,143,000 | 33.285714 | 78 | 0.639063 | false | 3.50365 | false | false | false |
dtudares/hello-world | yardstick/tests/unit/benchmark/scenarios/networking/test_netperf_node.py | 1 | 3858 | #!/usr/bin/env python
##############################################################################
# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompan... | apache-2.0 | -2,371,470,591,946,177,000 | 29.377953 | 78 | 0.554951 | false | 3.720347 | true | false | false |
uogbuji/Library.Link | pylib/resource.py | 1 | 2994 | '''
'''
import re
import http
import asyncio
from itertools import *
from versa.driver import memory
from versa import I, VERSA_BASEIRI, ORIGIN, RELATIONSHIP, TARGET, ATTRIBUTES
from versa.reader import rdfalite
from versa.reader.rdfalite import RDF_NS, SCHEMAORG_NS
from versa import util as versautil
#from bibfram... | apache-2.0 | 7,825,348,551,972,483,000 | 31.193548 | 80 | 0.641283 | false | 3.386878 | false | false | false |
al8/raspberrypi-photosensor | photosensor.py | 1 | 2036 | #!/usr/bin/env python
from __future__ import print_function
# Example for RC timing reading for Raspberry Pi
# Must be used with GPIO 0.3.1a or later - earlier verions
# are not fast enough!
import argparse
import time
import sys
import atexit
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
g_RCpin = None
def R... | mit | -7,217,418,351,592,861,000 | 31.83871 | 164 | 0.641454 | false | 3.480342 | false | false | false |
oseledets/pybtex | pybtex/style/labels/alpha.py | 1 | 6453 | # -*- coding: utf-8 -*-
# Copyright (c) 2010, 2011, 2012 Andrey Golovizin
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to... | mit | 3,171,189,926,441,258,500 | 36.511628 | 79 | 0.566491 | false | 4.195059 | false | false | false |
alisheykhi/SocialPDA | Degree_Anonimity.py | 1 | 2374 | from graph_util import ReadGraph
from micro_pda import MicroPDA
from particle_pda1 import ParticlePDA
from swarm_pda import SwarmPDA
from Measurments import measurmnets
import time
import datetime
import pymysql
import json
# avg , std , best for 30 times run,
# file name = datasetName_Beta_k_Delta_l
# levels = low, ... | apache-2.0 | -1,964,974,860,067,055,400 | 33.926471 | 152 | 0.680286 | false | 3.103268 | false | false | false |
DoubleGremlin181/Scripting | Wikipedia.py | 1 | 1131 | #A script to check if any two wikipedia pages have any common wiki links
#TODO: Check on multiple levels, i.e. check if any of the linked wikis on the pages have a common wiki link
import requests
import wikipedia
from bs4 import BeautifulSoup
def get_list(page):
links_page=["/wiki/"+page.split("/")[4]]
dat... | gpl-3.0 | -1,919,865,110,978,478,600 | 25.302326 | 107 | 0.641026 | false | 3.396396 | false | false | false |
f-prettyland/angr | angr/exploration_techniques/tracer.py | 1 | 16414 | import os
import logging
import claripy
from . import ExplorationTechnique, Cacher
from .. import BP_BEFORE
from ..calling_conventions import SYSCALL_CC
from ..errors import AngrTracerError, SimMemoryError, SimEngineError
from ..storage.file import SimFile
l = logging.getLogger("angr.exploration_techniques.tracer")... | bsd-2-clause | 2,718,564,388,932,743,000 | 42.42328 | 133 | 0.569148 | false | 4.130347 | false | false | false |
antoine-de/navitia | source/jormungandr/jormungandr/interfaces/v1/Coord.py | 1 | 3363 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 | 307,073,991,383,605,900 | 37.655172 | 99 | 0.627119 | false | 3.915017 | false | false | false |
stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/special/riemann-zeta/benchmark/python/scipy/benchmark.py | 1 | 2194 | #!/usr/bin/env python
#
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | 1,624,637,104,917,445,400 | 21.618557 | 74 | 0.628532 | false | 3.662771 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/lib-tk/tkColorChooser.py | 1 | 1064 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: tkColorChooser.py
from tkCommonDialog import Dialog
class Chooser(Dialog):
"""Ask for a color"""
command = 'tk_chooseColor'
def _fixopt... | unlicense | 8,246,888,322,872,728,000 | 26.307692 | 70 | 0.56485 | false | 3.57047 | false | false | false |
hilljb/pyclojure | pyclojure/clojure.py | 1 | 2708 | #!/usr/bin/python2
""" A Python module wrapping nrepl to interact with a Leiningen Clojure REPL.
Some notes:
- All return values are unicode objects inside a dictionary.
- You need to explicitly kill the repl before exiting.
Example:
>>> import clojure
>>> repl = clojure.NREPL()
nREPL server started on port 57041 on... | epl-1.0 | -8,702,635,536,927,137,000 | 26.08 | 92 | 0.553176 | false | 3.563158 | false | false | false |
aewallin/opencamlib | examples/python/waterline/waterline_2_tux_adapt.py | 1 | 3113 | import ocl
import camvtk
import time
import vtk
import datetime
import math
def drawLoops(myscreen, loops, loopcolor):
nloop = 0
for lop in loops:
n = 0
N = len(lop)
first_point=ocl.Point(-1,-1,5)
previous=ocl.Point(-1,-1,5)
for p in lop:
if n==0: # don't dra... | lgpl-2.1 | -864,676,445,629,931,900 | 30.444444 | 138 | 0.592033 | false | 2.858586 | false | false | false |
hackfestca/cnb | cnb/modAvailable/CNBMMChuckKukDo.py | 1 | 1398 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
CNB Matrix Module - chuckkukdo
'''
from cnb.cnbMatrixModule import CNBMatrixModule
class CNBMMChuckKukDo(CNBMatrixModule):
"""
"""
name = 'chuckkukdo'
usage = 'chuckkukdo'
desc = 'Print the Chuck Kuk Do (http://en.wikipedia.org/wiki/Chun_Kuk_Do)'
... | gpl-3.0 | 5,698,115,309,628,994,000 | 33.097561 | 133 | 0.679542 | false | 3.312796 | false | false | false |
krishnab-datakind/mining-data-acquisition | data_gather/PackageConstants.py | 1 | 4082 |
#!/usr/bin/python
"""
Package constants
"""
## MIT License
##
## Copyright (c) 2017, krishna bhogaonker
## Permission is hereby granted, free of charge, to any person obtaining a ## copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including wit... | mit | -3,745,854,114,414,277,600 | 48.780488 | 463 | 0.430671 | false | 4.622877 | false | false | false |
popazerty/dvbapp-gui2 | skin.py | 1 | 33432 | from Tools.Profile import profile
profile("LOAD:ElementTree")
import xml.etree.cElementTree
import os
profile("LOAD:enigma_skin")
from enigma import eSize, ePoint, eRect, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, addFont, gRGB, eWindowStyleSkinned, getDesktop
from Components.config import ConfigSubsection,... | gpl-2.0 | 5,488,487,470,184,430,000 | 32.465465 | 231 | 0.679559 | false | 3.049252 | true | false | false |
filannim/ManTIME | mantime/settings.py | 1 | 1226 | #!/usr/bin/env python
#
# Copyright 2014 Michele Filannino
#
# gnTEAM, School of Computer Science, University of Manchester.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU General Public License.
#
# author: Michele Filannino
# email: fila... | bsd-2-clause | 6,687,968,761,473,981,000 | 37.3125 | 78 | 0.730016 | false | 2.898345 | false | false | false |
seomoz/roger-mesos-tools | bin/roger.py | 1 | 2779 | #!/usr/bin/python
from __future__ import print_function
import os
import sys
import subprocess
import re
import importlib
from cli.utils import Utils
def print_help_opt(opt, desc):
print(" {} {}".format(opt.ljust(13), desc))
def roger_help(root, commands):
print("usage: roger [-h] [-v] command [arg...]\n... | apache-2.0 | -4,948,606,142,957,857,000 | 30.224719 | 79 | 0.592659 | false | 3.745283 | false | false | false |
jegger/kivy | kivy/tests/test_uix_textinput.py | 1 | 2204 | '''
uix.textinput tests
========================
'''
import unittest
from kivy.tests.common import GraphicUnitTest
from kivy.uix.textinput import TextInput
class TextInputTest(unittest.TestCase):
def test_focusable_when_disabled(self):
ti = TextInput()
ti.disabled = True
ti.focused = Tr... | mit | -2,391,985,931,788,283,000 | 25.878049 | 79 | 0.582123 | false | 3.839721 | true | false | false |
AllanYangZhou/oppia | core/domain/collection_jobs_one_off.py | 1 | 3306 | # coding: utf-8
#
# Copyright 2017 The Oppia 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 requi... | apache-2.0 | 595,232,431,969,137,900 | 37 | 79 | 0.662432 | false | 4.437584 | false | false | false |
0verchenko/Utils | googleapis_mock.py | 1 | 5420 | import random
import json
import datetime
import ssl
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
def change_host_file_configuration(for_disabling=False, path_to_hosts_file='C:\\Windows\\System32\\drivers\\etc\\hosts'):
def check_if_hosts_file_hacked(path='C:\\Windows\\System32\\drivers\\etc\\hos... | apache-2.0 | -5,844,384,114,319,613,000 | 43.065041 | 128 | 0.537823 | false | 3.99705 | false | false | false |
softelnet/sponge | sponge-kb/sponge-kb-designer/src/main/resources/sponge/designer/storage.py | 1 | 1331 | """
Sponge Knowledge Base
WARNING: THIS IS A WORK IN PROGRESS!
"""
from org.openksavi.sponge.core.action import BaseActionMeta, BaseActionBuilder
from java.util.concurrent.atomic import AtomicInteger
from java.util.concurrent import CopyOnWriteArrayList
import re
def onInit():
global STORAGE
STORAGE = creat... | apache-2.0 | 5,470,633,246,581,718,000 | 29.953488 | 125 | 0.700225 | false | 3.926254 | false | false | false |
AerisCloud/AerisCloud | aeriscloud/s3.py | 1 | 2331 | import math
import requests
import time
import xml.etree.ElementTree as ET
# from .config import config
class S3:
def __init__(self, bucket, endpoint_url=None):
"""
The S3 class provides methods to manage files from a bucket.
:param bucket: The bucket to use
:type bucket: String
... | mit | 3,940,088,200,830,511,600 | 27.084337 | 70 | 0.517375 | false | 4.340782 | false | false | false |
GNOME/gedit-latex | latex/latex/completion.py | 1 | 12450 | # -*- coding: utf-8 -*-
# This file is part of the Gedit LaTeX Plugin
#
# Copyright (C) 2010 Michael Zeising
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence, o... | gpl-3.0 | 2,227,404,283,291,466,000 | 30.518987 | 130 | 0.592048 | false | 4.583947 | false | false | false |
Psycojoker/dierentheater | scraper/utils.py | 1 | 4715 | # -*- coding:Utf-8 -*-
# Dieren Theater - lachambre.be to json sausage machine
# Copyright (C) 2012 Laurent Peuch <cortex@worlddomination.be>
#
# This program 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 ... | agpl-3.0 | 1,099,140,688,297,136,500 | 29.419355 | 92 | 0.577943 | false | 3.429091 | false | false | false |
pablocscode/TFG-CAEBAT | representacion2.0.py | 1 | 3399 | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 10 10:14:31 2017
@author: Pablo
Objetivos:
-Representar de forma dinámica los resultados del archivo profiles.out para cualquier tiempo
Guía:
-Este script debe encontrarse en la misma carpeta que los archivos profiles.out y halfcells.out
"""
import numpy as ... | gpl-3.0 | -8,595,424,597,173,040 | 28.781818 | 95 | 0.661843 | false | 2.37281 | false | false | false |
EmreAtes/spack | lib/spack/spack/build_systems/autotools.py | 1 | 19376 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -7,559,344,240,667,162,000 | 40.848812 | 111 | 0.566887 | false | 4.562279 | true | false | false |
TYPO3-Documentation/sphinxcontrib.t3tablerows | setup.py | 1 | 2480 | from __future__ import absolute_import
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_description = f.re... | bsd-2-clause | 3,198,431,805,503,910,000 | 33.929577 | 98 | 0.674597 | false | 4.182125 | false | false | false |
ohrstrom/obp-media-preflight-api | app/preflight/models.py | 1 | 3533 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
import logging
import os
import uuid
import hashlib
from datetime import timedelta
from django.db import models
from django.db.models.signals import post_save, pre_save, post_delete
from djang... | gpl-3.0 | 2,993,727,627,394,881,000 | 26.387597 | 85 | 0.658081 | false | 3.770544 | false | false | false |
chris-ch/myledger-online-bookkeeping | _old/server/src/oas/models.py | 1 | 16991 | """
Django model for OAS.
CREATE DATABASE IF NOT EXISTS `accounting`
CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `accounting`;
-- at this point run manage.py syncdb
DROP TABLE IF EXISTS `oas_template_journal_entry`;
DROP TABLE IF EXISTS `oas_template_journal_entry_group`;
DROP TABLE IF EXISTS `oas_template_name... | mit | 1,577,952,250,280,129,500 | 38.331019 | 117 | 0.682244 | false | 3.291554 | false | false | false |
sadikovi/queue | test/__init__.py | 1 | 2186 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright 2016 sadikovi
#
# 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 requir... | apache-2.0 | 6,212,667,995,313,246,000 | 28.146667 | 86 | 0.666057 | false | 3.711375 | true | false | false |
mignev/startappsync | gitconfig/core.py | 1 | 3702 | import os
import sys
from re import search
from gitconfig.config import (
ConfigDict,
ConfigFile,
)
if sys.version_info < (2, 7):
from ordereddict import OrderedDict
from collections import MutableMapping
else:
from collections import (
OrderedDict,
MutableMapping,
)
c... | mit | -6,701,524,496,558,599,000 | 28.616 | 82 | 0.567261 | false | 4.211604 | true | false | false |
tuxxi/OpenBurn | openburn/application/propellant_db.py | 1 | 2142 | from typing import Dict
import jsonpickle
from qtpy.QtCore import QObject, Signal
from openburn.core.propellant import OpenBurnPropellant
class PropellantDatabase(QObject):
database_ready = Signal()
propellant_added = Signal(str)
propellant_edited = Signal(str)
propellant_removed = Signal(str)
... | gpl-3.0 | 4,604,087,554,832,698,400 | 32.46875 | 80 | 0.637722 | false | 3.416268 | false | false | false |
agancsos/python | LinkedInSort_in_Python.py | 1 | 2716 | #!/bin/python
class linkedinSort:
project_name=\"\";
project_month=\"\";
project_year=0;
def month_to_int(self):
month=self.project_month;
if month == \"January\":
return 1;
if month == \"February\":
return 2;
if month == \"March\":
return 3;
if month == \"April\":
return 4;... | mit | 8,169,540,432,007,339,000 | 28.188889 | 129 | 0.662003 | false | 3.147161 | false | false | false |
jocelynj/weboob | weboob/applications/qhavesex/qhavesex.py | 1 | 1273 | # -*- coding: utf-8 -*-
# Copyright(C) 2010 Romain Bignon
#
# 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, version 3 of the License.
#
# This program is distributed in the hope that it will b... | gpl-3.0 | 7,059,353,888,160,273,000 | 34.361111 | 76 | 0.732129 | false | 3.78869 | false | false | false |
mwrlabs/veripy | contrib/rfc3633/rr/basic_message_exchange.py | 1 | 3313 | from contrib.rfc3315.constants import *
from contrib.rfc3633.dhcpv6_pd import DHCPv6PDHelper
from scapy.all import *
from veripy.assertions import *
from veripy.models import IPAddress
class BasicMessageExchangeTestCase(DHCPv6PDHelper):
"""
DHCPv6-PD Basic Message Exchange
Verify that a device can proper... | gpl-3.0 | -1,700,819,788,144,245,000 | 58.178571 | 170 | 0.699064 | false | 3.204062 | false | false | false |
sidorov-si/ngser | filter_gbk_by_cds.py | 1 | 3272 | #!/usr/bin/env python
"""
Filter GBK file by CDS: retain only those records which have correct CDS.
Correct CDS must:
1) contain a 'product' field;
2) have length that is a multiple of 3;
3) have start and stop codons.
Usage:
filter_gbk_by_cds.py -i <input_GBK_file> -o <output_GBK_file>
Options:
-h --help ... | gpl-2.0 | -5,694,534,526,533,918,000 | 34.565217 | 97 | 0.587408 | false | 3.722412 | false | false | false |
rolisz/walter_experiments | motion/control.py | 1 | 1293 | from ssc32 import *
from time import sleep
from smooth import getPositions
# Run with sudo
ssc = SSC32('/dev/ttyUSB0', 115200)
ssc[0].degrees = 20
ssc[0].max = 2500
ssc[0].min = 500
ssc[0].deg_max = +90.0
ssc[0].deg_min = -90.0
#TODO: fix library so it doesn't take 100ms for the first instruction
# And which overrides... | mit | 2,671,244,723,943,717,400 | 22.089286 | 76 | 0.63109 | false | 2.798701 | false | false | false |
pghant/big-theta | scraper/EquationScraper/pipelines.py | 1 | 3154 | # -*- coding: utf-8 -*-
from py2neo import authenticate, Graph, Node, Relationship
from scrapy import signals, exceptions
from scrapy.exporters import JsonLinesItemExporter, PprintItemExporter
from .latex import utils as latexutils
class EquationscraperPipeline(object):
def __init__(self):
self.jsl_expo... | mit | -8,319,851,079,591,015,000 | 35.674419 | 100 | 0.55929 | false | 4.177483 | false | false | false |
mmilutinovic1313/zipline-with-algorithms | tests/test_sources.py | 1 | 7302 | #
# Copyright 2013 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 | 1,614,067,241,080,615,000 | 40.022472 | 75 | 0.574363 | false | 3.996716 | true | false | false |
renzon/gaecookie | setup.py | 1 | 4928 | import codecs
import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
from setuptools import setup, find_packages
def read(fname):
return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read()
# Provided as an attribute, so you can append to these instead
# of r... | mit | 6,134,216,573,355,813,000 | 33.950355 | 86 | 0.551136 | false | 4.281494 | false | false | false |
peret/visualize-bovw | tests/test_caltech_manager.py | 1 | 8382 | import unittest
from datamanagers.CaltechManager import CaltechManager
from datamanagers import InvalidDatasetException, NoSuchCategoryException
import os
import numpy as np
from sklearn.decomposition import PCA
from test_datamanager import BASE_PATH
class TestCaltechManager(unittest.TestCase):
def setUp(self):
... | gpl-2.0 | 71,504,931,090,516,424 | 56.417808 | 117 | 0.620496 | false | 2.724967 | true | false | false |
Mendelone/forex_trading | Algorithm.Python/CustomDataBitcoinAlgorithm.py | 1 | 5264 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Li... | apache-2.0 | -5,720,431,468,602,672,000 | 40.769841 | 174 | 0.605663 | false | 3.877671 | false | false | false |
jiejieling/RdsMonitor | src/api/controller/BaseController.py | 1 | 3536 | from dataprovider.dataprovider import RedisLiveDataProvider
import tornado.ioloop
import tornado.web
import dateutil.parser
class BaseController(tornado.web.RequestHandler):
def initialize(self):
self.stats_provider = RedisLiveDataProvider().get_provider()
def datetime_to_list(self, datetime):
"""Converts a d... | mit | 2,281,642,187,381,527,300 | 29.222222 | 72 | 0.670532 | false | 3.361217 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201808/inventory_service/update_ad_units.py | 1 | 2752 | #!/usr/bin/env python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 7,114,115,951,235,613,000 | 32.560976 | 78 | 0.665334 | false | 3.73913 | false | false | false |
iagcl/data_pipeline | tests/applier/data_greenplum_cdc_applier.py | 1 | 3253 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 3,493,367,925,225,126,000 | 40.177215 | 135 | 0.664617 | false | 3.139961 | false | false | false |
google-research/google-research | bigg/bigg/torch_ops/tensor_ops.py | 1 | 3956 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | 5,617,877,974,705,925,000 | 28.969697 | 74 | 0.571284 | false | 3.253289 | false | false | false |
PurpleMyst/porcupine | porcupine/plugins/statusbar.py | 1 | 1725 | from tkinter import ttk
from porcupine import get_tab_manager, utils
# i have experimented with a logging handler that displays logging
# messages in the label, but it's not as good idea as it sounds like,
# not all INFO messages are something that users should see all the time
# this widget is kind of weird
class ... | mit | -7,980,209,914,607,490,000 | 29.263158 | 79 | 0.628406 | false | 3.66242 | false | false | false |
rgeorgi/intent | intent/utils/dicts.py | 1 | 20697 | """
Created on Aug 26, 2013
@author: rgeorgi
"""
import sys, re, unittest
from collections import defaultdict, Callable, OrderedDict
class CountDict(object):
def __init__(self):
self._dict = defaultdict(int)
def add(self, key, value=1):
self[key] += value
def __str__(self):
retu... | mit | 124,940,156,392,500,220 | 28.152113 | 114 | 0.454172 | false | 4.051086 | false | false | false |
shoyer/numpy | numpy/core/function_base.py | 2 | 16480 | from __future__ import division, absolute_import, print_function
import functools
import warnings
import operator
from . import numeric as _nx
from .numeric import (result_type, NaN, shares_memory, MAY_SHARE_BOUNDS,
TooHardError, asanyarray, ndim)
from numpy.core.multiarray import add_docstring
... | bsd-3-clause | 124,672,043,304,796,380 | 34.44086 | 88 | 0.600303 | false | 3.581052 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.