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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
j-wags/POVME | binana/peel.py | 1 | 214481 | # PEEL is released under the GNU General Public License (see http://www.gnu.org/licenses/gpl.html).
# This code is currently being developed by Jeff Wagner (j5wagner [at] ucsd [dot] edu)
# If you have any questions, comments, or suggestions, please don't hesitate to contact Jeff.
# This code is very heavily based on Ja... | gpl-3.0 | -3,404,233,153,227,253,000 | 50.882196 | 350 | 0.568507 | false | 3.60994 | false | false | false |
0k/oem | src/oem/xml_id_mgr.py | 1 | 2176 | # -*- coding: utf-8 -*-
from common import normalize_xml_name, get_natural_sort_key
XMLID_MAXSIZE = 128
class XmlIdManager(object):
"""Manages creation and lookup of xml_id in OOOP database or XML files"""
def __init__(self, ooop_instance, file_xml_ids):
self.ooop = ooop_instance
self._xml... | bsd-2-clause | -9,048,645,145,517,007,000 | 33 | 77 | 0.551471 | false | 3.487179 | false | false | false |
Multiscale-Genomics/mg-dm-api | dmp/rest.py | 1 | 7383 | """
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.... | apache-2.0 | 3,249,320,961,620,974,000 | 28.414343 | 91 | 0.525261 | false | 4.77555 | true | false | false |
ksharindam/quartz-browser | quartz_browser/youtube_dialog.py | 1 | 2494 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created: Tue May 2 23:29:11 2017
# 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 Attri... | gpl-3.0 | -8,885,865,685,155,151,000 | 41.271186 | 102 | 0.692061 | false | 3.825153 | false | false | false |
geggo/pyface | pyface/workbench/action/reset_all_perspectives_action.py | 3 | 1160 | """ An action that resets *all* perspectives. """
# Enthought library imports.
from pyface.api import YES
# Local imports.
from .workbench_action import WorkbenchAction
# The message used when confirming the action.
MESSAGE = 'Do you want to reset ALL perspectives to their defaults?'
class ResetAllPerspectivesAc... | bsd-3-clause | 338,409,103,676,160,960 | 28 | 79 | 0.506034 | false | 4.813278 | false | false | false |
spookysys/turbopump | pump/lobanoff/volute_misc.py | 1 | 2440 | """Miscellaneous volute relations"""
from scipy.special import expit
import numpy as np
from matplotlib import pyplot as plt
from utils import memoized
from units import ureg
def _points_volute_width():
"""Data given"""
return [0, 1000, 1000, 3000, 3000, 4000], [2.0, 2.0, 1.75, 1.75, 1.6, 1.6]
def _points_c... | gpl-3.0 | 669,187,171,542,165,000 | 25.521739 | 108 | 0.590984 | false | 2.711111 | false | false | false |
kasioumis/invenio | invenio/modules/cloudconnector/user_settings.py | 1 | 1768 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013 CERN.
#
# Invenio 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... | gpl-2.0 | 3,822,131,752,027,923,500 | 29.482759 | 74 | 0.716063 | false | 4.055046 | false | false | false |
iABC2XYZ/abc | DM_Twiss/TwissTrain8.py | 1 | 1995 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 20 13:37:16 2017
Author: Peiyong Jiang : jiangpeiyong@impcas.ac.cn
Function:
拉神使得变换。
"""
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
plt.close('all')
emitX=12
alphaX=-10.
betaX=1300.
gammaX=(1.+alphaX**2... | gpl-3.0 | -767,153,660,717,645,800 | 15.237705 | 78 | 0.63049 | false | 2.316959 | false | false | false |
cans/ssh-harness | setup.py | 1 | 2728 | # -*- coding: utf-8-unix; -*-
#
# Copyright © 2013-2014, Nicolas CANIART <nicolas@caniart.net>
#
# This file is part of ssh-harness.
#
# ssh-harness is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundatio... | gpl-2.0 | -3,150,567,487,346,278,400 | 32.256098 | 79 | 0.589292 | false | 3.963663 | true | false | false |
pizzathief/scipy | scipy/interpolate/tests/test_fitpack.py | 2 | 15767 | import itertools
import os
import numpy as np
from numpy.testing import (assert_equal, assert_allclose, assert_,
assert_almost_equal, assert_array_almost_equal)
from pytest import raises as assert_raises
import pytest
from scipy._lib._testutils import check_free_memory
from numpy import arr... | bsd-3-clause | -4,362,275,463,364,845,000 | 31.985356 | 129 | 0.482463 | false | 2.813024 | true | false | false |
weso/CWR-DataApi | data_cwr/accessor.py | 1 | 2612 | # -*- coding: utf-8 -*-
import os
import csv
import yaml
"""
Facades for accessing the configuration data.
"""
__author__ = 'Bernardo Martínez Garrido'
__license__ = 'MIT'
__status__ = 'Development'
class _FileReader(object):
"""
Offers methods to read the data files.
"""
# Singleton control obje... | mit | -7,750,207,634,000,393,000 | 25.917526 | 78 | 0.574876 | false | 3.974125 | false | false | false |
carpe-diem/resumen-credicoop | credicoop/resume.py | 1 | 1276 | # -*- coding: utf-8 -*-
class Resumen(object):
#fecha = ''
saldo_anterior = ''
saldo = ''
fecha_saldo = ''
items = []
def __repr__(self):
return u"Resumen al {fecha}".format(fecha=self.fecha_saldo)
def __str__(self):
return u"Resumen()"
def to_dict(self):
res... | gpl-3.0 | 7,078,705,251,824,344,000 | 21.785714 | 72 | 0.541536 | false | 3.305699 | false | false | false |
minogame/bilinear_tensorflow | src/imagenet_resnet_utils.py | 1 | 10072 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: imagenet_resnet_utils.py
import numpy as np
import cv2
import multiprocessing
import tensorflow as tf
from tensorflow.contrib.layers import variance_scaling_initializer
import tensorpack as tp
from tensorpack import imgaug, dataset
from tensorpack.dataflow import... | gpl-3.0 | -3,245,378,525,132,936,700 | 37.30038 | 98 | 0.582705 | false | 3.314248 | false | false | false |
GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/django_extensions/management/commands/dumpscript.py | 1 | 29492 | # -*- coding: UTF-8 -*-
"""
Title: Dumpscript management command
Project: Hardytools (queryset-refactor version)
Author: Will Hardy (http://willhardy.com.au)
Date: June 2008
Usage: python manage.py dumpscript appname > scripts/scriptname.py
$Revision: 217 $
Description:
Generates a Py... | agpl-3.0 | -1,666,246,738,604,236,500 | 36.473952 | 152 | 0.60552 | false | 4.153218 | false | false | false |
abhishekdepro/Mantle | regular_backend_weather_forecast.py | 1 | 1283 | #-------------------------------------------------------------------------------
# Name: regular backend
# Purpose:
#
# Author: D1617 64
#
# Created: 11-08-2013
# Copyright: (c) D1617 64 2013
# Licence: <your licence>
#-------------------------------------------------------------------------------... | apache-2.0 | -6,588,040,848,307,529,000 | 30.292683 | 94 | 0.5947 | false | 3.644886 | false | false | false |
Daniel-Brosnan-Blazquez/DIT-100 | lib/common.py | 1 | 3238 | # -*- coding: utf-8 -*-
# Common code
def check_keys (keys, dictionary):
''' Check if keys received are in the dictionary '''
for key in keys:
if not key in dictionary.keys():
return False
return True
def print_data (params):
prints = []
pos = "\tPosition:\n"
pos ... | gpl-3.0 | -152,394,521,452,321,380 | 29.54717 | 73 | 0.419086 | false | 3.187008 | false | false | false |
ForestClaw/forestclaw | applications/geoclaw/bowl_radial/setplot.py | 1 | 12066 |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
try:
from setplotfg import setplotfg
except:
print("Did not find setplotfg.py")
setplotfg = None
#----------... | bsd-2-clause | 870,048,099,547,413,200 | 33.573066 | 77 | 0.622493 | false | 3.143825 | false | false | false |
Anaconda-Server/nbbrowserpdf | nbbrowserpdf/export.py | 1 | 1032 | from argparse import ArgumentParser
import os
import sys
from .exporters import BrowserPDFExporter
APP_ROOT = os.path.join(os.path.dirname(__file__))
def export(ipynb=None, outfile=None):
exp = BrowserPDFExporter(
template_file="browserpdf",
template_path=[os.path.join(APP_ROOT, "templates")]
... | bsd-3-clause | -2,929,233,683,497,740,000 | 24.170732 | 78 | 0.620155 | false | 3.698925 | false | false | false |
elterminad0r/cipher_tools | src/run_freq.py | 1 | 1571 | #!/usr/bin/env python3
"""
Detecting frequently repeating runs in a source file. Useful as some pairings
or triplets of letters are well known to occur frequently in English.
"""
################################################################################
from input_handling import read_file
from collections im... | gpl-3.0 | 1,637,597,165,784,497,400 | 34.704545 | 80 | 0.55888 | false | 4.007653 | false | false | false |
EddenBeer/CiscoPortConnectionsDiscovery | CiscoPortConnectionDiscovery.py | 1 | 17655 | __author__ = 'Ed den Beer'
'''
Created on 19 november 2014
Version 0.0
@author: Ed den Beer - Rockwell Automation
'''
#import sys
import datetime
from gi.repository import Gtk
class Main():
def __init__(self):
self.builder = Gtk.Builder()
self.builder.add_from_file('glade/CiscoPortConnectionsDi... | gpl-3.0 | -976,311,754,252,957,300 | 34.031746 | 132 | 0.536449 | false | 4.225706 | false | false | false |
macosforge/ccs-calendarserver | contrib/performance/stats.py | 1 | 13408 | ##
# Copyright (c) 2010-2017 Apple 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 applicab... | apache-2.0 | -1,617,166,891,329,380,600 | 29.752294 | 110 | 0.583085 | false | 4.048309 | false | false | false |
edoddridge/aronnax | test/read_output_test.py | 1 | 2808 | '''Unit tests for Aronnax'''
from contextlib import contextmanager
import os.path as p
import re
import numpy as np
from scipy.io import FortranFile
import aronnax as aro
from aronnax.utils import working_directory
import pytest
import glob
self_path = p.dirname(p.abspath(__file__))
def test_open_mfdataarray_u_l... | mit | -7,684,885,520,855,732,000 | 29.204301 | 77 | 0.626781 | false | 3.276546 | true | false | false |
7andahalf/Hotel-Reservation-System | admin_application/main.py | 1 | 2444 | #!/usr/bin/python
# Loading window opens
# Exits if connection to server fails
import loading
load = loading.loading()
if load.status['loading'] == 'fail':
exit()
goto = 'login'
# Loop so that one window can refer several other windows
while goto != None:
nextGoto = None
# Login window
if goto == 'login':
impor... | mit | -4,703,936,127,784,992,000 | 23.94898 | 57 | 0.664075 | false | 2.809195 | false | false | false |
common-workflow-language/cwltool | cwltool/main.py | 1 | 50216 | #!/usr/bin/env python3
# PYTHON_ARGCOMPLETE_OK
"""Entry point for cwltool."""
import argparse
import functools
import io
import logging
import os
import signal
import subprocess # nosec
import sys
import time
import urllib
import warnings
from codecs import StreamWriter, getwriter
from collections.abc import MutableM... | apache-2.0 | 2,259,084,882,433,761,300 | 34.639461 | 88 | 0.559921 | false | 4.211338 | false | false | false |
kvar/ansible | lib/ansible/modules/cloud/misc/proxmox_kvm.py | 1 | 44993 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Abdoul Bah (@helldorado) <bahabdoul at gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'me... | gpl-3.0 | 5,718,351,162,515,695,000 | 39.032947 | 159 | 0.58983 | false | 3.632302 | false | false | false |
JK-River/RobotAIEngine | query_analysis/nlu/media/picture_book.py | 1 | 1537 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2016,小忆机器人
All rights reserved.
摘 要:绘本语义
创 建 者:余菲
创建日期:17/2/10
"""
from nlu.rule import Rule
from nlu.media.common import *
from utils.utils import attach_perperty
class PictureBook(object):
"""
绘本语义
"""
# 标识是mode领域
serv... | apache-2.0 | -7,610,687,708,307,980,000 | 29.522727 | 114 | 0.557707 | false | 2.0919 | false | false | false |
prathamtandon/g4gproblems | Data Structures/splay_tree.py | 1 | 3685 | import unittest
"""
A splay tree is a type of balanced binary search tree. Structurally, it is
identical to an ordinary binary search tree; the only difference is in the
algorithms for finding, inserting, and deleting entries.
All splay tree operations run in O(log n) time _on_average_, where n is the
number of entri... | mit | 1,188,617,401,493,952,500 | 33.764151 | 98 | 0.615468 | false | 3.767894 | false | false | false |
t3dev/odoo | addons/calendar/tests/test_calendar.py | 1 | 16926 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
from datetime import datetime, timedelta, time
from odoo import fields
from odoo.tests.common import TransactionCase
import pytz
class TestCalendar(TransactionCase):
def setUp(self):
super... | gpl-3.0 | 5,495,660,990,082,922 | 42.849741 | 166 | 0.572433 | false | 3.600511 | true | false | false |
minghuascode/pyj | library/pyjamas/Canvas/GWTCanvasImplIE6.py | 1 | 28545 | """
* Copyright 2008 Google Inc.
* Copyright 2011 Bob Hampton
*
* 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 l... | apache-2.0 | -2,307,420,995,699,310,600 | 31.290724 | 103 | 0.557436 | false | 3.690368 | false | false | false |
Khan/reviewboard | reviewboard/admin/urls.py | 1 | 3345 | #
# reviewboard/admin/urls.py -- URLs for the admin app
#
# Copyright (c) 2008-2009 Christian Hammond
# Copyright (c) 2009 David Trowbridge
#
# 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... | mit | -8,847,252,402,443,460,000 | 37.895349 | 73 | 0.673842 | false | 3.840413 | false | false | false |
iem-projects/WILMAmix | WILMA/net/client.py | 1 | 2145 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright © 2013, IOhannes m zmölnig, IEM
# This file is part of WILMix
#
# 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 th... | gpl-2.0 | 922,083,996,991,326,200 | 36.596491 | 98 | 0.643024 | false | 4.081905 | false | false | false |
davidbouman/sugg-script | main.py | 1 | 3610 | import os
import requests
from bs4 import BeautifulSoup
import json
import time
import date_converter
if not os.path.isfile('data/cookie.txt'):
cookie = raw_input("Please enter your cookie here: ")
f = open('data/cookie.txt', 'w')
f.write(cookie)
f.close()
else:
f = open('data/co... | gpl-3.0 | 7,490,996,170,144,524,000 | 27.349593 | 128 | 0.571468 | false | 3.650152 | false | false | false |
VISTAS-IVES/pyvistas | source/vistas/ui/controls/gl_select.py | 1 | 3333 | import os
import wx
from PIL import Image
from vistas.core.graphics.overlay import BasicOverlayButton
from vistas.core.paths import get_resources_directory
from vistas.ui.events import CameraSelectModeEvent
class GLSelectionControls(wx.EvtHandler):
""" Event handler for initiating selection interaction """
... | bsd-3-clause | -3,507,807,325,701,545,000 | 36.449438 | 115 | 0.651365 | false | 3.674752 | false | false | false |
mgaborit/pyven | source/pyven/steps/build.py | 1 | 2074 | import time
import pyven.constants
from pyven.steps.step import Step
from pyven.checkers.checker import Checker
from pyven.logging.logger import Logger
from pyven.reporting.content.step import StepListing
class Build(Step):
def __init__(self, verbose, warning_as_error=False, nb_threads=1):
super(Build, s... | mit | -6,838,417,556,528,004,000 | 34.169492 | 124 | 0.572806 | false | 4.011605 | false | false | false |
liw/daos | src/client/pydaos/raw/daos_cref.py | 1 | 11410 | #!/usr/bin/python
"""
(C) Copyright 2018-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
# pylint: disable=too-few-public-methods
# pylint: disable=pylint-missing-docstring
import ctypes
# DAOS api C structures
class RankList(ctypes.Structure):
""" For those DAOS calls that take a ra... | apache-2.0 | 1,845,707,932,371,937,300 | 32.958333 | 76 | 0.592375 | false | 3.48823 | false | false | false |
ramonrdm/agendador | agenda/migrations/0007_auto_20180322_1904.py | 1 | 1125 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2018-03-22 19:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('agenda', '0006_auto_20180320_1607'),
]
operations = [
migrations.AlterField... | gpl-2.0 | 6,233,349,255,070,418,000 | 36.5 | 162 | 0.572444 | false | 3.160112 | false | false | false |
gkazup/robot-project | Mark-03/Raspberry-Pi-code/01_gamepy_remote_video.py | 1 | 5238 | #!/usr/bin/python3
import smbus
import time
import sys
import signal
import pygame
import cv2
import numpy
from picamera.array import PiRGBArray
from picamera import PiCamera
# for RPI version 2, we use bus No. 1
bus = smbus.SMBus(1)
# This is the target address we setup in the Arduino Program
address = 0x08
# sen... | gpl-3.0 | 445,689,047,228,389,250 | 23.824645 | 70 | 0.56071 | false | 3.660377 | false | false | false |
ayepezv/GAD_ERP | addons/account/wizard/account_invoice_state.py | 2 | 1673 | # -*- coding: utf-8 -*-
from odoo import models, api, _
from odoo.exceptions import UserError
class AccountInvoiceConfirm(models.TransientModel):
"""
This wizard will confirm the all the selected draft invoices
"""
_name = "account.invoice.confirm"
_description = "Confirm the selected invoices"
... | gpl-3.0 | 2,927,452,918,909,123,000 | 37.022727 | 129 | 0.644949 | false | 4.161692 | false | false | false |
apanda/modeling | tests/aclcontentscale.py | 1 | 1851 | import z3
from examples import AclContentCacheScaleTest, NAclContentCacheScaleTest
import time
import random
import sys
import argparse
def ResetZ3 ():
z3._main_ctx = None
z3.main_ctx()
z3.set_param('smt.random_seed', 42)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description = 'Non-... | bsd-3-clause | 7,856,678,087,400,832,000 | 35.294118 | 83 | 0.606159 | false | 3.479323 | false | false | false |
littlezz/pixiv_download | old_version/Lib/decorators.py | 1 | 3078 | __author__ = 'zz'
from functools import wraps
from requests import Timeout
import socket
from datetime import datetime
import logging
timeouts = (Timeout, socket.timeout)
def prefix_print(value):
def decorator(cls):
orig_method = cls.__getattribute__
def new_method(self, name):
if ... | mit | 2,531,217,472,596,261,400 | 24.03252 | 86 | 0.520468 | false | 4.316971 | false | false | false |
benrudolph/commcare-hq | corehq/apps/sms/backend/http_api.py | 1 | 5146 | import re
from urllib import urlencode
from urllib2 import urlopen
import sys
from corehq.apps.sms.mixin import SMSBackend, BackendProcessingException
from corehq.apps.sms.forms import BackendForm
from corehq.apps.reminders.forms import RecordListField
from django.forms.fields import *
from django.core.exceptions impor... | bsd-3-clause | -8,643,598,436,046,962,000 | 34.489655 | 148 | 0.610571 | false | 4.130016 | false | false | false |
Christoph/tag-connect | vector_spaces/download_dataset.py | 1 | 2077 | #! /usr/bin/env python
# retrieve_vis04_data.py
import formatter
import htmllib
import os
import re
import string
import urllib
def _attrs2dict(attrs):
"""Take an (attribute, value) list and make a dict"""
dict = {}
for (a,v) in attrs:
dict[a] = v
return dict
class FileList(htmllib.HTMLParse... | mit | -3,077,566,617,734,860,300 | 30.484848 | 107 | 0.520462 | false | 3.624782 | false | false | false |
andrejb/leap_mail | src/leap/mail/imap/account.py | 1 | 15302 | # -*- coding: utf-8 -*-
# account.py
# Copyright (C) 2013-2015 LEAP
#
# 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.
#
... | gpl-3.0 | 7,282,234,026,065,287,000 | 29.788732 | 81 | 0.596523 | false | 4.270723 | false | false | false |
dgary50/eovsa | test_svn/mirtest.py | 1 | 1276 | import os
def valid_miriad_dset0(filelist0):
'''Returns True or False for valid or invalid Miriad datasets,
checks for existnce of the directory, and then for flags, header,
vartable, and visdata. Also returns names of valid datasets'''
if len(filelist0) == 0:
print 'valid_miriad_dset0: No fil... | gpl-2.0 | 6,268,521,411,633,226,000 | 31.717949 | 234 | 0.616771 | false | 3.666667 | false | false | false |
synthicity/activitysim | activitysim/abm/models/initialize.py | 1 | 4637 | # ActivitySim
# See full license in LICENSE.txt.
from __future__ import (absolute_import, division, print_function, )
from future.standard_library import install_aliases
install_aliases() # noqa: E402
import logging
import pandas as pd
from activitysim.core import tracing
from activitysim.core import config
from a... | agpl-3.0 | -4,792,307,807,095,041,000 | 30.120805 | 93 | 0.681691 | false | 3.733494 | false | false | false |
skazi0/yaia | migrations/versions/76cfb65376ff_added_copy_of_customer_fields_to_invoice.py | 1 | 1433 | """added copy of customer fields to invoice
Revision ID: 76cfb65376ff
Revises: 4b75ad4ab96f
Create Date: 2016-04-25 13:40:50.053245
"""
# revision identifiers, used by Alembic.
revision = '76cfb65376ff'
down_revision = '4b75ad4ab96f'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands a... | mit | -3,289,994,471,237,511,700 | 38.805556 | 105 | 0.704815 | false | 3.4038 | false | false | false |
jimpick/jaikuengine | front/views.py | 1 | 3318 | # Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -4,662,491,869,359,131,000 | 32.515152 | 75 | 0.730862 | false | 3.5948 | false | false | false |
oliver-sanders/cylc | cylc/flow/scripts/cylc_view.py | 1 | 6464 | #!/usr/bin/env python3
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors.
#
# 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... | gpl-3.0 | 7,894,175,194,201,550,000 | 33.021053 | 76 | 0.635365 | false | 3.782329 | false | false | false |
j0r1/simpactcyan | buildscripts/build-debian.py | 1 | 4175 | #!/usr/bin/env python
from __future__ import print_function
from common import *
def getArchitecture():
out = S(subprocess.check_output(["uname", "-a"]))
if "x86_64" in out:
return "amd64"
return "i386"
def getLibraryPackage(libName):
out = S(subprocess.check_output(["dpkg-query", "-S", libNa... | gpl-3.0 | -7,961,438,349,894,811,000 | 34.084034 | 109 | 0.625868 | false | 3.391552 | false | false | false |
lsocrate/principles-of-computing | Week 0/homework/app.py | 1 | 1089 | def appendsums(lst):
"""
Repeatedly append the sum of the current last three elements of lst to lst.
"""
for x in range(25):
lst.append(sum(lst[-3:]))
return lst
class BankAccount:
fee = 5
def __init__(self, initial_balance):
"""Creates an account with the given balance."""... | gpl-2.0 | 9,140,663,741,269,773,000 | 28.432432 | 82 | 0.596878 | false | 4.204633 | false | false | false |
kif/dahu | dahu/server.py | 1 | 11116 | #!/usr/bin/env python3
# coding: utf-8
from __future__ import with_statement, print_function, absolute_import, division
"""
Data Analysis RPC server over Tango:
Tango device server
"""
__author__ = "Jérôme Kieffer"
__contact__ = "Jerome.Kieffer@ESRF.eu"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radia... | gpl-2.0 | -5,627,446,443,263,133,000 | 31.30814 | 142 | 0.591956 | false | 3.75473 | false | false | false |
catroll/clipboard | GreatQ/node.py | 1 | 7784 | # -*- coding: utf-8 -*-
"""
A class for storing a tree graph. Primarily used for filter constructs in the
ORM.
"""
import copy
class Node(object):
"""
A single internal node in the tree graph. A Node should be viewed as a
connection (the root) with the children being either leaf nodes or other
Node ... | mit | -388,639,866,693,450,300 | 30.338776 | 118 | 0.574238 | false | 4.043181 | false | false | false |
quintusdias/glymur | docs/source/conf.py | 1 | 8632 | # -*- coding: utf-8 -*-
#
# glymur documentation build configuration file, created by
# sphinx-quickstart on Sun May 26 11:29:54 2013.
#
# This file is execfile()d with the current directory set to its containing
# dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | mit | 7,943,624,514,393,303,000 | 30.852399 | 79 | 0.680955 | false | 3.794286 | true | false | false |
Csega/PythonCAD3 | Generic/Kernel/GeoComposedEntity/chamfer.py | 1 | 6638 | #
# Copyright (c) 2002, 2003, 2004, 2005, 2006 Art Haas
#
# Copyright (c) 2010 Matteo Boscolo
#
# This file is part of PythonCAD.
#
# PythonCAD 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 ... | gpl-2.0 | 1,213,078,819,393,792,800 | 34.688172 | 140 | 0.54414 | false | 4.169598 | false | false | false |
uber-common/deck.gl | bindings/pydeck/tests/bindings/pydeck_examples/geojson_layer_with_gmaps.py | 1 | 1414 | from pydeck import Deck, Layer, ViewState
features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-... | mit | 7,791,593,369,416,937,000 | 27.857143 | 84 | 0.451202 | false | 4.04 | false | false | false |
kasra-hosseini/obspyDMT | obspyDMT/utils/data_handler.py | 1 | 35896 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------
# Filename: data_handler.py
# Purpose: handling data (waveform/response) in obspyDMT
# Author: Kasra Hosseini
# Email: kasra.hosseinizad@earth.ox.ac.uk
# License: GNU Lesser General... | gpl-3.0 | 2,398,987,873,577,282,600 | 39.698413 | 95 | 0.454396 | false | 3.997327 | false | false | false |
TeamAADGT/CMPUT404-project-socialdistribution | social/settings.py | 1 | 5520 | """
Django settings for project project on Heroku. For more info, see:
https://github.com/heroku/heroku-django-template
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
... | apache-2.0 | -5,841,583,900,006,022,000 | 29.32967 | 91 | 0.692391 | false | 3.399015 | false | false | false |
Lind-Project/native_client | src/trusted/validator_arm/dgen_actuals.py | 1 | 14943 | #!/usr/bin/python2
#
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
"""
Responsible for generating actual decoders based on parsed table
representations.
Note: We define a notion of "actual" a... | bsd-3-clause | 7,909,161,590,925,164,000 | 32.655405 | 79 | 0.711303 | false | 3.55701 | false | false | false |
egabancho/invenio | invenio/modules/jsonalchemy/jsonext/producers/json_for_marc.py | 1 | 5780 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2013, 2014 CERN.
##
## Invenio 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 opt... | gpl-2.0 | 5,979,123,855,263,494,000 | 33.610778 | 79 | 0.504671 | false | 4.69537 | false | false | false |
peternemec/peterPYTHON | ex39.py | 1 | 1529 | # create a mapping of state to abbreviation
states = {
'Oregon': 'OR',
'Florida': 'FL',
'California': 'CA',
'New York': 'NY',
'Michigan': 'MI'
}
# create a basic set of states and some cities in them
cities = {
'CA': 'San Francisco',
'MI': 'Detroit',
'FL': 'Jacksonville'
}
# add some m... | apache-2.0 | -2,722,690,030,634,618,000 | 23.66129 | 60 | 0.640942 | false | 2.94605 | false | false | false |
donspaulding/adspygoogle | examples/adspygoogle/adwords/v201302/advanced_operations/add_ad_group_bid_modifier.py | 1 | 2456 | #!/usr/bin/python
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -2,593,052,247,740,357,000 | 30.487179 | 78 | 0.660831 | false | 3.643917 | false | false | false |
tempbottle/ghmm | ghmmwrapper/mixture.py | 1 | 8803 | ################################################################################
#
# This file is part of the General Hidden Markov Model Library,
# GHMM version __VERSION__, see http://ghmm.org
#
# file: mixture.py
# authors: Alexander Schliep
#
# Copyright (C) 1998-2004 Alexander Schl... | gpl-3.0 | 7,114,466,766,443,268,000 | 32.857692 | 87 | 0.584801 | false | 3.601882 | false | false | false |
NLHEALTHCARE/PYELT | pyelt/helpers/validations.py | 1 | 18718 | import inspect
from typing import List
from pyelt.datalayers.database import Columns, Table, DbFunction, Column
from pyelt.datalayers.dv import * #HubEntity, Sat, HybridSat, Link, LinkReference, DynamicLinkReference, OrderedMembersMetaClass, HybridLink, DvValueset
from pyelt.datalayers.sor import SorTable, SorQuery
fr... | gpl-3.0 | 3,672,658,344,312,602,600 | 60.572368 | 298 | 0.588044 | false | 3.630334 | false | false | false |
willf/sitting-in-your-seat-plane-simulation | simulation.py | 1 | 2130 | import collections
import random
"""
There’s an airplane with 100 seats, and there are 100 ticketed passengers each
with an assigned seat. They line up to board in some random order. However, the
first person to board is the worst person alive, and just sits in a random
seat, without even looking at his boarding pass... | mit | 2,333,810,650,172,881,000 | 28.943662 | 79 | 0.637347 | false | 3.260736 | false | false | false |
rtibbles/kolibri | kolibri/content/api.py | 1 | 13048 | import os
from collections import OrderedDict
from functools import reduce
from random import sample
from django.core.cache import cache
from django.db.models import Q, Sum
from django.db.models.aggregates import Count
from kolibri.content import models, serializers
from kolibri.content.content_db_router import get_ac... | mit | 6,763,311,617,119,995,000 | 39.02454 | 140 | 0.663397 | false | 4.167359 | false | false | false |
scott-maddox/visfitter | src/visfitter/main_window.py | 1 | 7747 | #
# Copyright (c) 2014, Scott J Maddox
#
# This file is part of VisFitter.
#
# VisFitter is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option... | agpl-3.0 | -6,940,573,952,051,793,000 | 36.245192 | 80 | 0.615722 | false | 4.018154 | false | false | false |
marmarek/qubes-core-admin | qubes/vm/__init__.py | 1 | 17365 | #
# The Qubes OS Project, https://www.qubes-os.org/
#
# Copyright (C) 2010-2015 Joanna Rutkowska <joanna@invisiblethingslab.com>
# Copyright (C) 2011-2015 Marek Marczykowski-Górecki
# <marmarek@invisiblethingslab.com>
# Copyright (C) 2014-2015 Wojtek Porczyk <woju@invisiblethingslab.com>... | lgpl-2.1 | -9,026,045,724,757,282,000 | 33.452381 | 80 | 0.578496 | false | 4.173035 | true | false | false |
MarvinTeichmann/KittiBox | inputs/kitti_input.py | 1 | 9863 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import json
import logging
import os
import sys
import random
from random import shuffle
import numpy as np
import scipy as scp
import scipy.misc
from scipy.misc import imread, imresize
imp... | mit | 676,265,214,257,593,900 | 31.876667 | 77 | 0.556017 | false | 3.391678 | false | false | false |
Sotera/newman | app/ingester.py | 1 | 6712 | from __future__ import with_statement
from app import app
from flask import request, jsonify
from werkzeug.exceptions import BadRequest
import threading
import subprocess
import os
import sys
import traceback
import datetime
import uuid
import time
from newman_es.es_search import initialize_email_addr_cache
from ut... | apache-2.0 | 6,908,026,187,509,608,000 | 39.191617 | 221 | 0.617253 | false | 3.447355 | false | false | false |
ChinaMassClouds/copenstack-server | openstack/src/horizon-2014.2/openstack_dashboard/dashboards/project/volumes/snapshots/tables.py | 1 | 5375 | # Copyright 2012 Nebula, 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 agree... | gpl-2.0 | 5,659,794,773,155,284,000 | 33.677419 | 105 | 0.648558 | false | 4.209084 | false | false | false |
thinkst/canarytools-python | canarytools/models/devices.py | 1 | 9456 | from .base import CanaryToolsBase
from .databundles import DataBundles
from dateutil.parser import parse
class Devices(object):
def __init__(self, console):
"""Initialize the device
:param console: The Console from which API calls are made
"""
self.console = console
def all(... | bsd-3-clause | -4,412,561,061,620,179,000 | 34.41573 | 119 | 0.557847 | false | 4.418692 | false | false | false |
airanmehr/bio | Scripts/KyrgysHAPH/Analysis/HLI/Util.py | 1 | 20786 | import matplotlib as mpl
from Scripts.KyrgysHAPH.Util import loadI
from Scripts.KyrgysHAPH.Util import methods, POPS
mpl.use('TkAgg')
import numpy as np;
np.set_printoptions(linewidth=200, precision=5, suppress=True)
import pandas as pd;
pd.options.display.max_rows = 20;
pd.options.display.expand_frame_repr = False... | mit | -2,860,601,906,456,791,600 | 43.797414 | 219 | 0.522852 | false | 2.891362 | false | false | false |
bjornaa/ladim | examples/nested/make_release.py | 1 | 1127 | # Make an particles.in file
import numpy as np
from nested_gridforce import Grid
# End points of line in grid coordinates (orginal grid)
x0, x1 = 148, 148
y0, y1 = 51, 65
# Number of particles along the line
Npart = 1000
# Fixed particle depth
Z = 5
# Define the grids
g = Grid(dict(grid_args=[]))
# Original grid
... | mit | 4,419,780,403,760,197,600 | 25.209302 | 74 | 0.596273 | false | 2.22288 | false | false | false |
tudarmstadt-lt/taxi | graph_pruning/methods/zhenv5/remove_cycle_edges_by_hierarchy_greedy.py | 1 | 3843 | import networkx as nx
from .s_c_c import filter_big_scc
from .s_c_c import get_big_sccs
import os.path
import sys
sys.setrecursionlimit(5500000)
def get_agony(edge, players):
u, v = edge
return max(players[u] - players[v], 0)
def get_agonies(edges, players):
edges_agony_dict = {}
for edge in edges:... | apache-2.0 | 8,208,072,420,356,037,000 | 35.6 | 148 | 0.628155 | false | 2.889474 | false | false | false |
pauljxtan/snippy | snippy/data/sqlite.py | 1 | 2214 | """
Sqlite data access.
"""
import datetime
import logging
import sqlite3
from snippy.utils.loggingtools import get_logger
# TODO: probably better to use built-in conversions
PYTHON_TO_SQLITE_TYPE = {
datetime.datetime: 'DATETIME',
str: 'TEXT',
}
SQLITE_TO_PYTHON_TYPE = {value: key for key, ... | mit | 4,239,371,111,723,613,700 | 23.448276 | 75 | 0.574074 | false | 3.99639 | false | false | false |
mrpau/kolibri | kolibri/deployment/default/wsgi.py | 1 | 1139 | """
WSGI config for kolibri project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
import time
from django.core.wsgi import get_wsgi_application
from django.db.utils impo... | mit | 420,028,738,199,582,460 | 26.119048 | 97 | 0.674276 | false | 4.067857 | false | false | false |
Chilledheart/vim-clangd | python/clangd_support/win32_utils.py | 1 | 8960 | # exported win32 api
from ctypes import WINFUNCTYPE, GetLastError, windll, pythonapi, cast, c_buffer
from ctypes import create_string_buffer, c_ushort, c_ubyte, c_char, c_short,\
c_int, c_uint, c_ulong, c_long, c_void_p, byref, c_char_p,\
Structure, Union, py_object, POINTER, poin... | bsd-3-clause | 1,783,170,212,118,727,000 | 23.281843 | 79 | 0.6125 | false | 3.159379 | false | false | false |
willybh11/python | advProg/cardGames/palace.py | 1 | 2346 | import cardBasics
import random
class Palace:
debug = True
playerHand = {}
player_6 = {}
AIHand = {}
AI_6 = {}
deckExceptions = { 'Jack' : 11 ,
'Queen': 12 ,
'King' : 13 ,
'Ace' : 14 }
deckFunc = cardBasics.Deck(False)
discard = []
win = 0
def __init__(self):
self.deckFunc.sh... | gpl-3.0 | -8,636,167,237,036,319,000 | 18.889831 | 70 | 0.63896 | false | 2.727907 | false | false | false |
pearpai/TensorFlow-action | deep_learning_with_tensorFlow/Chapter07/p176.py | 1 | 1084 | # coding=utf-8
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
from PIL import Image
path = "../datasets/demo_picture/cat.jpg"
img = Image.open(path)
# 获取长宽
print img.size
image_raw_data = tf.gfile.FastGFile("../datasets/demo_picture/cat.jpg", 'r').read()
img_data = tf.image.decode_jpeg(im... | apache-2.0 | -8,574,211,907,013,543,000 | 28.764706 | 83 | 0.672925 | false | 2.517413 | false | true | false |
modulexcite/nbgrader | nbgrader/tests/apps/base.py | 1 | 1450 | import os
import shutil
import pytest
from IPython.nbformat import write as write_nb
from IPython.nbformat.v4 import new_notebook
@pytest.mark.usefixtures("temp_cwd")
class BaseTestApp(object):
def _empty_notebook(self, path):
nb = new_notebook()
full_dest = os.path.join(os.getcwd(), path)
... | bsd-3-clause | 6,675,523,139,187,604,000 | 31.954545 | 63 | 0.602759 | false | 3.325688 | false | false | false |
sourcepole/qgis | qgis/python/plugins/osm/OsmPlugin.py | 2 | 13996 | """@package OsmPlugin
This is the main module of the OSM Plugin.
It shows/hides all tool buttons, widgets and dialogs.
After closing dialogs it does all actions related with their return codes.
/***************************************************************************
* ... | gpl-2.0 | -1,568,366,466,887,690,800 | 36.827027 | 125 | 0.65633 | false | 4.185407 | false | false | false |
neerja28/Tempest | tempest/api/object_storage/test_object_services.py | 1 | 47813 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -2,415,679,449,943,062,500 | 42.865138 | 79 | 0.580261 | false | 3.905653 | true | false | false |
okfde/handelsregister-backup | scrape.py | 1 | 13274 | import sys
import os
import signal
import argparse
import sqlite3
import random
import time
import re
from datetime import datetime
from math import floor
from lxml import html as etree
from multidict import MultiDict
import requests
import config
def get_tor_session():
session = requests.Session()
# Tor us... | mit | 4,747,877,571,418,839,000 | 31.856436 | 161 | 0.579931 | false | 3.679047 | true | false | false |
fkie-cad/FACT_core | src/test/acceptance/run_scripts/test_run_scripts.py | 1 | 1692 | import gc
import os
import init_database
import pytest
import update_statistic
import update_variety_data
from common_helper_process import execute_shell_command_get_return_code
from helperFunctions.fileSystem import get_src_dir
@pytest.mark.parametrize('script, expected_str', [
('start_fact.py', 'FACT Starter'... | gpl-3.0 | 1,095,038,295,605,271,300 | 35.782609 | 128 | 0.699764 | false | 3.446029 | true | false | false |
horken7/openhack | pinguin/data_collection/google_geocoding_api.py | 1 | 1127 | import requests, json
class HandlerGoogleGeocodingAPI:
def __index__(self):
self.key = 'AIzaSyA1zbCwaXIYc7Yw7nk0kvsSvBDx-71vTCg'
self.url = 'https://maps.googleapis.com/maps/api/geocode/json?address=%s+%s+%s'
def get_coordinates(self, address, zipcode, city):
url = 'https://maps.google... | mit | 6,849,372,380,624,489,000 | 44.12 | 87 | 0.63709 | false | 3.544025 | false | false | false |
apache/avro | lang/py/avro/timezones.py | 2 | 1686 | #!/usr/bin/env python3
##
# 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
... | apache-2.0 | -4,618,955,937,809,083,000 | 32.72 | 86 | 0.728944 | false | 3.911833 | false | false | false |
tdsmith/migrationscripts | sting/stat_plots.py | 1 | 2825 | # encoding=utf-8
from __future__ import division
import argparse
import os
from textwrap import dedent
import pandas as pd
import matplotlib.pyplot as plt
from sting import read_mtrackj_mdf, center, displacement_plot
def open_mdf(mdf_file):
data = read_mtrackj_mdf(mdf_file)
return center(data)
def main()... | bsd-3-clause | -6,283,057,586,275,637,000 | 26.930693 | 77 | 0.488834 | false | 3.817321 | false | false | false |
tencentyun/python-sdk | python3/sample.py | 1 | 2038 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
import tencentyun
appid = "111"
secret_id = "secret_id"
secret_key = "secret_key"
sample_image_path = "test_image.jpg"
sample_video_path = "test_video.mp4"
image = tencentyun.Image(appid,secret_id,secret_key)
# upload an image from local file
#obj = image... | mit | 2,839,665,632,799,142,000 | 27.305556 | 86 | 0.677625 | false | 3.224684 | false | true | false |
dlebauer/plantcv | scripts/dev/vis_tv_z2500_L2-brachy.py | 1 | 5258 | #!/usr/bin/python
import sys, traceback
import cv2
import numpy as np
import argparse
import string
import plantcv as pcv
### Parse command-line arguments
def options():
parser = argparse.ArgumentParser(description="Imaging processing with opencv")
parser.add_argument("-i", "--image", help="Input image file.", req... | gpl-2.0 | 7,356,987,612,048,054,000 | 42.825 | 167 | 0.701407 | false | 3.076653 | false | false | false |
robwarm/gpaw-symm | gpaw/wavefunctions/base.py | 1 | 15737 | import numpy as np
from gpaw.utilities.blas import gemm
from gpaw.utilities import pack, unpack2
from gpaw.utilities.timing import nulltimer
class EmptyWaveFunctions:
def __nonzero__(self):
return False
def set_eigensolver(self, eigensolver):
pass
def set_orthonormalized(self, flag)... | gpl-3.0 | 357,003,432,977,134,200 | 36.558473 | 81 | 0.517379 | false | 3.379214 | false | false | false |
larsvdvoorden/steca_pvoutput | Application/steca.py | 1 | 2490 | #!/usr/bin/python
# -*- coding: utf-8 -*-
_author_ = "Lars van der Voorden"
_version_ = "1.0"
_date_ = "03/02/2015" #dd/mm/yyyy
import urllib2 #urllib2 for downloading measurement table
from HTMLParser import HTMLParser ... | apache-2.0 | 1,193,085,220,238,113,500 | 30.518987 | 100 | 0.580723 | false | 3.694362 | false | false | false |
CalSol/Impulse | Tracker/oauth.py | 1 | 23274 | """
The MIT License
Copyright (c) 2007 Leah Culver
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 use, copy, modify, merge, publis... | apache-2.0 | -7,724,197,905,276,199,000 | 34.210287 | 86 | 0.613173 | false | 4.349467 | false | false | false |
c0z3n/OpenWing | src/OpenWing/serial/serialcli.py | 1 | 10310 | #! python
# Python Serial Port Extension for Win32, Linux, BSD, Jython and .NET/Mono
# serial driver for .NET/Mono (IronPython), .NET >= 2
# see __init__.py
#
# (C) 2008 Chris Liechti <cliechti@gmx.net>
# this is distributed under a free software license, see license.txt
import clr
import System
import Syste... | gpl-3.0 | 4,594,091,157,961,135,600 | 35.765568 | 114 | 0.595635 | false | 4.010113 | false | false | false |
apdavison/elephant | elephant/sta.py | 1 | 13357 | # -*- coding: utf-8 -*-
'''
Functions to calculate spike-triggered average and spike-field coherence of
analog signals.
:copyright: Copyright 2015-2016 by the Elephant team, see `doc/authors.rst`.
:license: Modified BSD, see LICENSE.txt for details.
'''
from __future__ import division, print_function, unicode_literal... | bsd-3-clause | 713,554,624,996,867,800 | 41.268987 | 92 | 0.643932 | false | 3.954115 | false | false | false |
gronki/slezanbear | sketches/optim2.py | 1 | 3080 | #!/usr/bin/env python
# coding: utf-8
#-------------------------------------------------------------------------------
from numpy.random import uniform, normal
import matplotlib.pyplot as plt
import matplotlib.cm as cm
#-------------------------------------------------------------------------------
nx = 20
noise = ... | mit | 6,961,583,808,803,601,000 | 30.428571 | 92 | 0.359091 | false | 3.034483 | false | false | false |
rivergillis/crawler | link.py | 1 | 9558 | """
This is the file to be used for the link type object for crawler.py
As well as Link String methods used to help the Link object
Author: Jameson Gillis
"""
from tld import get_tld
import re
# this can stay outside of the Link class
def remove_anchor(link_string):
"""
This removes the anchor point from a UR... | mit | -9,158,664,556,540,285,000 | 37.385542 | 111 | 0.597196 | false | 3.84164 | false | false | false |
scopely-devops/skew | skew/resources/__init__.py | 1 | 4564 | # Copyright (c) 2014 Scopely, Inc.
# Copyright (c) 2015 Mitch Garnaat
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanyin... | apache-2.0 | 8,883,381,273,209,655,000 | 39.75 | 85 | 0.681858 | false | 3.200561 | false | false | false |
Landver/netmon | apps/customers/models.py | 1 | 1213 | from django.db import models
from apps.core.models import TimeStampedModel
from .dropdown_options import COMPANY_TYPES
from .tasks import create_site_folder_and_subfolders
# Create your models here.
class Company(TimeStampedModel):
name = models.CharField(max_length=32, unique=True)
company_type = models.Cha... | mit | 3,306,618,606,802,330,600 | 31.783784 | 107 | 0.671888 | false | 3.599407 | false | false | false |
nod/maroon | maroon.py | 1 | 15218 | '''
maroon models - simplified object-relational mapper for Python and MongoDB
by Jeremy Kelley <jeremy@33ad.org> and Jeff McGee <JeffAMcGee@gmail.com>
'''
import calendar
from datetime import datetime as _dt
from collections import defaultdict
from copy import copy
import re
import pprint
SLUG_REGEX = re.compile('[... | bsd-2-clause | 5,302,374,691,427,316,000 | 30.903564 | 82 | 0.566369 | false | 3.888094 | false | false | false |
Toxad/TWDM-PON-Sim | run_plot_partially_done.py | 1 | 1378 | import sim
import matplotlib.pyplot as plt
sim.DEBUG = True
# seed
sim.random.seed(13)
# default values
sim.tg_default_size = lambda x: 250
sim.DBA_IPACT_default_bandwidth = 5000
max_onus = 3
# seed
sim.random.seed(13)
# for f in range(1,max_onus):
# # override suffix writer
# sim.packet_w = sim.Writer("#... | mit | -8,787,367,397,419,306,000 | 19.893939 | 90 | 0.582729 | false | 2.789474 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.