repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
was4444/chromium.src | build/gn_helpers.py | 1 | 11052 | # Copyright 2014 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.
"""Helper functions useful when writing scripts that integrate with GN.
The main functions are ToGNString and FromGNString which convert between
serialized ... | bsd-3-clause | -561,771,865,274,325,760 | 30.487179 | 79 | 0.649294 | false | 3.971254 | false | false | false |
sshipsey/RegexCrosswordSolver | main.py | 1 | 3034 | from selenium import webdriver
from bs4 import BeautifulSoup
from bs4.element import Tag
import itertools
import re
# Python solver for RegexCrossword
# https://regexcrossword.com
class Solver:
# Default constructor
def __init__(puzzleURL):
self.puzzleURL = puzzleURL
# Valid character set... | mit | 718,701,046,096,461,000 | 42.985507 | 133 | 0.632498 | false | 3.736453 | false | false | false |
jwill89/clifford-discord-bot | source/helpers.py | 1 | 2338 | import discord
import pymysql.cursors
# Define MySQL DB and Cursor Object
db = pymysql.connect(host="localhost",
user="user_here",
passwd="password_here",
db="db_here",
charset='utf8',
cursorclass=pymysql.cursors.... | gpl-3.0 | -7,288,593,341,135,534,000 | 27.512195 | 78 | 0.517536 | false | 3.870861 | false | false | false |
justanr/Flask-Transfer | flask_transfer/transfer.py | 1 | 8916 | from werkzeug._compat import string_types
from .exc import UploadError
__all__ = ['Transfer']
def _use_filehandle_to_save(dest):
def saver(filehandle, metadata):
"Uses the save method on the filehandle to save to the destination"
buffer_size = metadata.get('buffer_size', 16384)
filehandle... | mit | -4,674,312,300,566,129,000 | 38.451327 | 85 | 0.637057 | false | 4.778135 | false | false | false |
gingemonster/PCA9685-Python-Microbit | servo.py | 1 | 2408 | # Copyright (c) 2016 Adafruit Industries
# Author: Brian Norman
#
# Heavily based on https://github.com/adafruit/micropython-adafruit-pca9685/blob/master/pca9685.py
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to... | mit | -7,411,204,118,244,079,000 | 40.517241 | 98 | 0.685631 | false | 3.5727 | false | false | false |
cspang1/4534-08 | src/supervisory/UI/UI_Graph.py | 1 | 6039 | from Tkinter import *
from PIL import ImageTk
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import sys
import time
import serial
import matplotlib.pyplot as plt
__author__ = 'tjd08a'
port = None
for arg in sys.argv:
port = arg
ser = serial.Serial(port, baudrate=57600, timeout=10)
data_points = 0... | gpl-3.0 | 613,148,437,824,163,100 | 24.918455 | 105 | 0.613015 | false | 3.202015 | false | false | false |
billyrayvalentine/python-phoplay | PhoPlay.py | 1 | 8385 | # PhoPlay.py
# Copyright (c) <2012, 2015>, <Ben Sampson> All rights reserved.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright not... | bsd-2-clause | 9,072,603,930,843,309,000 | 36.600897 | 82 | 0.654502 | false | 4.019655 | false | false | false |
liqd/a4-meinberlin | meinberlin/apps/bplan/migrations/0001_initial.py | 1 | 1791 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.utils.timezone
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
('a4modules', '0001_initial'),
('meinberlin_extprojects', '0001_initial'),
]
... | agpl-3.0 | 192,627,302,613,554,000 | 38.8 | 205 | 0.574539 | false | 4.400491 | false | false | false |
DiUS/build-lights | light-controller/lib/list_utils.py | 2 | 1889 | """list utils"""
from copy import deepcopy
def flatten_list(nested_list):
"""
Flatten an arbitrarily nested list, without recursion (to avoid stack
overflows). Returns a new list, the original list is unchanged.
>> list(flatten_list([1, 2, 3, [4], [], [[[[[[[[[5]]]]]]]]]]))
[1, 2, 3, 4, 5]
>> ... | gpl-3.0 | 5,701,254,201,305,432,000 | 32.140351 | 105 | 0.551615 | false | 3.472426 | false | false | false |
weld-project/weld | weld-python/tests/weld/core/test_lazy.py | 2 | 1840 | """
Tests for constructing and evaluating lazy operations.
"""
from weld.encoders.primitives import PrimitiveWeldEncoder, PrimitiveWeldDecoder
from weld.types import *
from weld.lazy import *
def test_simple():
a = 1
b = 2
a = PhysicalValue(1, I32(), PrimitiveWeldEncoder())
b = PhysicalValue(2, I32(),... | bsd-3-clause | -7,318,138,700,890,435,000 | 26.878788 | 79 | 0.561413 | false | 3.388582 | false | false | false |
ikonst/cerbero | cerbero/packages/packagesstore.py | 20 | 7487 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | lgpl-2.1 | -8,124,624,710,069,820,000 | 34.150235 | 79 | 0.596634 | false | 4.150222 | true | false | false |
RedHatInsights/insights-core | insights/parsers/ovs_ofctl_dump_flows.py | 1 | 3120 | """
OVSofctlDumpFlows - command ``/usr/bin/ovs-ofctl dump-flows <bridge-name>``
===========================================================================
This module provides class ``OVSofctlDumpFlows`` to parse the
output of command ``/usr/bin/ovs-ofctl dump-flows <bridge-name>``.
"""
from insights import Command... | apache-2.0 | 7,053,909,922,270,860,000 | 40.052632 | 350 | 0.567308 | false | 2.910448 | false | false | false |
stvoutsin/pyrothorn | testing/todo/test02-database-selection-and-metadata.py | 1 | 2355 | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
import unittest, time, re
class DatabaseSelectionAndMetadata_02(unittest.TestCase):
... | gpl-3.0 | -6,058,242,364,578,287,000 | 41.818182 | 123 | 0.643312 | false | 3.708661 | false | false | false |
nikhil96sher/coding_companion | coding_companion/settings.py | 2 | 2484 | """
Django settings for coding_companion project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR... | mit | -3,271,547,777,055,133,700 | 24.608247 | 71 | 0.686393 | false | 3.407407 | false | false | false |
aseigneurin/ansible-modules-core | files/unarchive.py | 3 | 10575 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2013, Dylan Martin <dmartin@seattlecentral.edu>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-3.0 | 7,637,273,088,878,634,000 | 34.726351 | 149 | 0.620615 | false | 3.767367 | false | false | false |
devs1991/test_edx_docmode | meliae-0.4.0/remove_expensive_references.py | 3 | 1669 | #!/usr/bin/env python
# Copyright (C) 2009 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# W... | agpl-3.0 | -4,357,884,738,023,839,000 | 27.288136 | 81 | 0.661474 | false | 3.725446 | false | false | false |
Tojaj/DeltaRepo | deltarepo/plugins.py | 1 | 40076 | import os
import os.path
import shutil
import hashlib
import filecmp
import createrepo_c as cr
from .plugins_common import GlobalBundle, Metadata
from .common import LoggingInterface, DEFAULT_CHECKSUM_NAME
from .errors import DeltaRepoPluginError
# List of available plugins
PLUGINS = []
# Mapping - which metadata fro... | gpl-2.0 | 7,583,070,492,424,707,000 | 35.700549 | 94 | 0.551677 | false | 4.005197 | false | false | false |
pschanely/ScenicOverlook | demo_expr.py | 1 | 2467 | import numbers
from scenicoverlook import viewablelist
#
# This is a trivial expression evaluator.
#
# Input should consist of single digit integers and two infix operators:
# addition (+) and multiplication (*).
#
# Incremental mapreduce allows us to efficiently update the result of very
# large arithmetic expression... | bsd-3-clause | -618,645,579,151,690,000 | 32.337838 | 78 | 0.607215 | false | 3.649408 | false | false | false |
lcpt/xc | python_modules/postprocess/xcVtk/node_property_diagram.py | 1 | 2069 | # -*- coding: utf-8 -*-
''' Diagram to display a property defined at nodes over linear elements. '''
import geom
import vtk
from postprocess.xcVtk import colored_diagram as cd
class NodePropertyDiagram(cd.ColoredDiagram):
'''Diagram to display a property defined at nodes over linear elements.'''
def __init__(... | gpl-3.0 | -8,775,777,628,139,278,000 | 31.84127 | 76 | 0.692122 | false | 3.425497 | false | false | false |
rom1sqr/miasm | example/ida/depgraph.py | 1 | 7245 | import os
import tempfile
from miasm2.core.bin_stream_ida import bin_stream_ida
from miasm2.core.asmbloc import *
from miasm2.expression import expression as m2_expr
from miasm2.expression.simplifications import expr_simp
from miasm2.analysis.depgraph import DependencyGraph
from utils import guess_machine
class d... | gpl-2.0 | 9,005,809,009,413,564,000 | 29.1875 | 108 | 0.592271 | false | 3.459885 | false | false | false |
nicktimko/pots-sim | potsim/coeffs/coeff_gen.py | 1 | 2552 | from __future__ import absolute_import, division, print_function
# rework as biquads with zeros/poles
import itertools
import json
import numpy as np
import scipy.signal as sig
FS = 44100
filtergroups = {
'pots': {
'signal': [
{'func': sig.butter, 'N': 2, 'fn': 200, 'btype': 'high'},
... | mit | 5,843,845,755,789,976,000 | 27.043956 | 79 | 0.528605 | false | 3.023697 | false | false | false |
Erotemic/hotspotter | _scripts/main.py | 2 | 5485 | #!/usr/bin/env python
# For py2exe
import PIL.TiffImagePlugin
import PIL.Image
import PIL.PngImagePlugin
import PIL.JpegImagePlugin
import PIL.GifImagePlugin
import PIL.PpmImagePlugin
import argparse
import inspect
import os, sys
from os.path import join, dirname
def emergency_msgbox(title, msg):
'Make a non mod... | apache-2.0 | 1,703,690,558,799,703,600 | 34.616883 | 104 | 0.628624 | false | 3.703579 | false | false | false |
tobiaspfaff/grim_mouse | script/convert_to_bin.py | 1 | 1501 | #!/usr/bin/python
import glob,struct,sys,os
srcpath = '.'
patchpath = '/tmp/grim_pnc'
class Dataset:
pass
def writestring(fp,str):
fp.write(struct.pack('i',len(str)))
for c in str:
fp.write(struct.pack('c',c))
dset = []
sname = []
for file in glob.glob(srcpath+'/hs/*.set.hot'):
set = os.path.basename(file).re... | gpl-2.0 | -8,594,241,022,508,930,000 | 23.606557 | 57 | 0.613591 | false | 2.393939 | false | false | false |
deniszgonjanin/ckanext-showcase | ckanext/showcase/commands/migrate.py | 1 | 4685 | from ckan import model
from ckan.lib.cli import CkanCommand
from ckan.lib.munge import munge_title_to_name, substitute_ascii_equivalents
from ckan.logic import get_action
import logging
log = logging.getLogger(__name__)
class MigrationCommand(CkanCommand):
'''
CKAN 'Related Items' to 'Showcase' migration co... | agpl-3.0 | 1,121,030,017,419,665,000 | 37.401639 | 116 | 0.530416 | false | 4.432356 | false | false | false |
plumdog/flask_table | examples/sortable.py | 1 | 1872 | from flask_table import Table, Col, LinkCol
from flask import Flask, Markup, request, url_for
"""
A example for creating a Table that is sortable by its header
"""
app = Flask(__name__)
class SortableTable(Table):
id = Col('ID')
name = Col('Name')
description = Col('Description')
link = LinkCol(
... | bsd-3-clause | 8,637,781,885,176,551,000 | 25.742857 | 73 | 0.561432 | false | 3.512195 | false | false | false |
hmendozap/auto-sklearn | autosklearn/metrics/classification_metrics.py | 1 | 18745 | # -*- encoding: utf-8 -*-
# CLASSIFICATION METRICS (work on solutions in {0, 1} and predictions in [0, 1])
# These can be computed for regression scores only after running
# normalize_array
from __future__ import print_function
import numpy as np
import scipy as sp
import scipy.stats
from autosklearn.constants import... | bsd-3-clause | -8,219,344,776,006,900,000 | 41.409502 | 93 | 0.578234 | false | 4.059996 | false | false | false |
mitkin/modis-mpf | modismpf/plot_one_year_ic_on_one_page.py | 1 | 7879 | from scipy import *
import sys,pipes,struct,os,glob
from pylab import *
from mpl_toolkits.basemap import Basemap
from polar_projection import *
import Nio
from sattools import *
from gmttools import *
#run plot_one_year_ic_on_one_page.py
def JulDay2Date(year,n):
import datetime
d = datetime.date(year, 1, 1) ... | gpl-3.0 | 5,143,458,746,702,780,000 | 29.777344 | 165 | 0.644498 | false | 2.346337 | false | false | false |
KanoComputing/kano-profile | quests/hack-the-internet/quest.py | 1 | 2980 |
# Kano World Quest configuration
#
# Copyright (C) 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2
#
from kano_profile.quests import Quest, XP, Badge, quest_media, Step, \
api_version
from kano_profile.apps import load_app_state_variable
class HackerBadge(Badge):
def _... | gpl-2.0 | 5,934,210,800,155,437,000 | 29.721649 | 80 | 0.624497 | false | 3.344557 | true | false | false |
ilkermanap/esos-manager | src/tools/create.py | 1 | 2533 | import os, sys
from extract import EsosImage, Cpio
from tftp import *
import argparse
prs = argparse.ArgumentParser(description="Test app")
prs.add_argument("--file")
prs.add_argument("--skip_unzip", action="store_true")
args = prs.parse_args()
if args.skip_unzip :
unzip = False
else:
unzip = True
if arg... | bsd-3-clause | 3,915,736,182,397,545,500 | 26.532609 | 110 | 0.669562 | false | 2.747289 | false | true | false |
naftulikay/mutagen-tools | src/mutagentools/cli/flac2id3/__init__.py | 1 | 1216 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
from mutagen.flac import FLAC
from mutagen.mp3 import MP3
from mutagentools.flac import convert_flac_to_id3
def main(args=sys.argv[1:]):
parser = argparse.ArgumentParser(description="Copies FLAC Vorbis tags to an ID3 compliant file.")
... | mit | 2,103,459,854,664,341,500 | 28.658537 | 108 | 0.669408 | false | 3.183246 | false | false | false |
pombredanne/metamorphosys-desktop | metamorphosys/META/src/TestBenchExecutor/__init__.py | 1 | 7731 | __author__ = 'adam'
import sys
import os
import errno
import json
import datetime
import contextlib
class NoStepsException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
repr(self.value)
class TestBenchExecutor:
_path_manifest = ''
... | mit | -7,881,416,007,493,275,000 | 30.897872 | 121 | 0.511577 | false | 4.494767 | false | false | false |
callowayproject/django-supertagging | supertagging/admin.py | 1 | 7228 | import django
from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext, ugettext_lazy
from django.utils.encoding import force_unicode, smart_str
from django.http import HttpResponseRedirect
from supertagging.models import SuperTag, SuperT... | apache-2.0 | 6,800,506,729,680,324,000 | 37.657754 | 181 | 0.637244 | false | 3.780335 | false | false | false |
acerlawson/my-shadowsocks-manage | ssexe.py | 1 | 3352 | #!/usr/bin/env python
__author__='acerlawson'
__email__='acerlawson@gmail.com'
import sslib
import os
import time
from datetime import datetime,timedelta
import commands
import json
import ssmail
def TurnOn(usrd):
#send TurnOnMsg mail to the usrd
ssmail.SendMail(usrd,ssmail.TurnOnMsg(usrd))
def TurnOff(usrd):
#... | mit | -9,205,442,488,216,532,000 | 20.081761 | 76 | 0.684666 | false | 2.658208 | false | false | false |
fastbot3d/Octoprint | src/octoprint/server/api/printer_profiles.py | 1 | 5679 | # coding=utf-8
from __future__ import absolute_import
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import copy
from flask imp... | agpl-3.0 | 375,621,144,489,976,600 | 32.005814 | 106 | 0.730491 | false | 3.448967 | false | false | false |
rewardz/django_model_helpers | tests/test_upload_to.py | 1 | 1307 | from nose import tools
from datetime import date
import model_helpers
from django.conf import settings
# Specify a filename template that make use of all capabilities of upload_to template
settings.UPLOAD_TO_OPTIONS = {"file_name_template": "{model_name}/%Y/{filename}-{instance.pk}.{extension}"}
class FakeModel(obje... | mit | -5,504,009,602,349,021,000 | 39.84375 | 108 | 0.708493 | false | 3.457672 | false | false | false |
CompassionCH/compassion-switzerland | partner_communication_switzerland/tests/test_sms_provider.py | 3 | 1574 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2018 Compassion CH (http://www.compassion.ch)
# @author: Quentin Gigon <gigon.quentin@gmail.com>
#
# The licence is in the file __manifest__.py
#
############################################... | agpl-3.0 | -743,805,850,614,470,700 | 33.977778 | 78 | 0.527954 | false | 3.668998 | false | false | false |
PyThingy/roguelike | rogue.py | 1 | 5539 | #!/usr/bin/env python3
# encoding: utf-8
import logging
import curses
import actions
from tiles import TileFactory
from colors import Colors
import random
class Map:
def __init__(self, filename):
with open(filename) as f:
self.tiles = []
for y, r in enumerate(f):
r... | cc0-1.0 | 7,739,688,510,622,900,000 | 27.260204 | 103 | 0.53367 | false | 3.742568 | false | false | false |
Outernet-Project/librarian-analytics | librarian_analytics/helpers.py | 1 | 2559 | import time
import uuid
from dateutil import parser
from psycopg2 import Binary
from bitpack.utils import hex_to_bytes
from bottle_utils.lazy import caching_lazy
from .data import generate_device_id
ANALYTICS_TABLE = 'stats'
# DATABASE OPERATIONS
def prep(data):
"""
Prepare row data for writing to datab... | gpl-3.0 | -626,678,742,057,872,600 | 21.848214 | 77 | 0.625244 | false | 3.398406 | false | false | false |
takaakiaoki/PyFoam | PyFoam/Applications/CommonTemplateBehaviour.py | 1 | 1982 | # ICE Revision: $Id$
"""
Common class with options that describe the behaviour of the template parser
"""
from optparse import OptionGroup
from os import path
class CommonTemplateBehaviour(object):
def addOptions(self):
behaviour=OptionGroup(self.parser,
"Behaviour",
... | gpl-2.0 | 2,490,838,197,714,071,000 | 43.044444 | 168 | 0.552977 | false | 5.056122 | false | false | false |
ArcaniteSolutions/truffe2 | truffe2/accounting_core/migrations/0016_auto__add_field_tva_account__add_field_tva_code.py | 2 | 17226 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'TVA.account'
db.add_column(u'accounting_core_tva', 'accou... | bsd-2-clause | 2,166,949,685,606,445,600 | 76.599099 | 195 | 0.556775 | false | 3.632644 | false | false | false |
dirkjot/pingpongcam | opencv/shrink or grow a contour.py | 1 | 2238 |
# coding: utf-8
# In[1]:
import cv2
import urllib.request
import matplotlib.pyplot as plt
import numpy as np
get_ipython().magic(u'matplotlib inline')
# In[2]:
# from PyImageSearch
def url_to_image(url):
# download the image, convert it to a NumPy array, and then read
# it into OpenCV format
resp = urllib.requ... | gpl-3.0 | 3,666,491,407,991,398,000 | 27.329114 | 148 | 0.699732 | false | 2.898964 | false | false | false |
flyinactor91/Raspi-Hardware | Motors/StepperLib.py | 1 | 1088 | ##--Adafruit tutorials -- http://learn.adafruit.com/adafruits-raspberry-pi-lesson-10-stepper-motors
##--Library that controls a stepper motor
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
delay = 5 #milliseconds
#Setup Stepper Motor
coil_A_1_pin = 4
coil_A_2_pin = 17
coil_B_1_pin = 23
coil_B_2_pin = 24... | mit | -1,012,725,041,734,509,600 | 21.666667 | 99 | 0.674632 | false | 2.120858 | false | false | false |
MarkusHackspacher/unknown-horizons | horizons/scenario/actions.py | 1 | 7372 | # ###################################################
# 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 | 6,919,472,801,770,282,000 | 37.395833 | 105 | 0.733722 | false | 3.568248 | false | false | false |
elyezer/nailgun | docs/create_organization_plain.py | 6 | 1054 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create an organization, print out its attributes and delete it.
Use Requests and standard library modules to accomplish this task.
"""
from pprint import pprint
import json
import requests
def main():
"""Create an organization, print out its attributes and delete... | gpl-3.0 | 2,080,037,588,063,533,000 | 24.707317 | 74 | 0.590133 | false | 3.846715 | false | false | false |
userzimmermann/wbc | lib/wbc/news/models.py | 2 | 1371 | # -*- coding: utf-8 -*-
import random
import string
from django.db import models
from wbc.core.models import Model
from wbc.process.models import Entity
class Validation(Model):
email = models.EmailField(unique=True)
entities = models.CharField(max_length=256, blank=True, null=True)
code = models.SlugFie... | gpl-3.0 | 3,408,577,686,015,715,000 | 26.42 | 75 | 0.657185 | false | 3.617414 | false | false | false |
digifant/eMonitor | emonitor/modules/cars/__init__.py | 1 | 2610 | import re
from emonitor.utils import Module
from emonitor.widget.monitorwidget import MonitorWidget
from emonitor.extensions import babel
from emonitor.modules.cars.car import Car
from emonitor.modules.cars.content_admin import getAdminContent
from emonitor.modules.cars.content_frontend import getFrontendData
from emon... | bsd-3-clause | 4,956,518,720,832,680,000 | 30.829268 | 113 | 0.629119 | false | 4.046512 | false | false | false |
esvire/CVP | modelo/crearUsuarioModel.py | 1 | 6021 | __author__ = 'paladin'
from PyQt4.QtSql import *
from PyQt4.QtGui import *
from vista.vtnCrearUsuario import *
def crearConexion():
return True
class crearUsuario(QtGui.QDialog):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_vtnCrearUsuario()
self.... | gpl-2.0 | 6,811,022,116,459,078,000 | 39.918367 | 239 | 0.542477 | false | 3.826336 | false | false | false |
stackforge/tacker | tacker/vnfm/utils.py | 2 | 1378 | # Copyright 2018, 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 re... | apache-2.0 | 7,417,568,753,120,251,000 | 39.529412 | 78 | 0.665457 | false | 3.948424 | false | false | false |
roadmapper/ansible | lib/ansible/modules/network/fortios/fortios_firewall_ttl_policy.py | 7 | 13400 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | gpl-3.0 | 619,473,926,862,175,000 | 32.004926 | 156 | 0.56097 | false | 4.454787 | false | false | false |
iuscommunity/dmirr | src/dmirr.hub/dmirr/hub/apps/accounts/views.py | 1 | 3939 |
from django.shortcuts import redirect, render, get_object_or_404
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from dmirr.hub.apps.accounts.forms import GroupForm, AddUserToGroupForm
from dmirr.hub import db
from dmirr.hub.utils import ok, session_is_owner, Http... | gpl-2.0 | 4,877,927,122,270,388,000 | 30.269841 | 76 | 0.614877 | false | 3.46743 | false | false | false |
mitschabaude/nanopores | scripts/howorka/plot_forcefield.py | 1 | 3417 | import dolfin
import nanopores
import colormaps as cm
import matplotlib
import matplotlib.ticker
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import numpy as np
def porestreamlines(polygon=None, rx=10., ry=10., Nx=100, Ny=100,
maxvalue=None, **fields):
"streamlines plot ... | mit | -5,309,307,809,938,410,000 | 32.5 | 84 | 0.5777 | false | 3.10919 | false | false | false |
robmcmullen/peppy | peppy/major_modes/xml.py | 1 | 1545 | # peppy Copyright (c) 2006-2009 Rob McMullen
# Licenced under the GPLv2; see http://peppy.flipturn.org for more info
"""XML programming language editing support.
Major mode for editing XML files.
Supporting actions and minor modes should go here only if they are uniquely
applicable to this major mode and can't be use... | gpl-2.0 | 8,628,950,493,641,394,000 | 29.9 | 97 | 0.718447 | false | 3.576389 | false | false | false |
gaolichuang/neutron-fwaas | neutron_fwaas/services/firewall/plugins/cisco/cisco_fwaas_plugin.py | 1 | 16218 | # Copyright 2015 Cisco Systems, 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 | 8,866,664,209,434,849,000 | 42.132979 | 79 | 0.600691 | false | 3.918338 | false | false | false |
gameduell/dask | dask/dataframe/tests/test_indexing.py | 2 | 11525 | import pandas as pd
import pandas.util.testing as tm
import numpy as np
import pytest
import dask
import dask.dataframe as dd
from dask.dataframe.indexing import _coerce_loc_index
from dask.dataframe.utils import assert_eq, make_meta
dsk = {('x', 0): pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]},
... | bsd-3-clause | 2,452,100,389,099,675,600 | 34.681115 | 81 | 0.532581 | false | 2.685228 | true | false | false |
Taffer/courses | algs-1/week5/dijkstra.py | 1 | 3556 | #!/usr/bin/env python
''' Depth-first search in Python.
'''
import heapq
import sys
class WeightedGraph(object):
''' Weighted graph.
'''
def __init__(self, source):
''' Create a weighted graph from the source path.
'''
self.vertices = [] # == edges.keys()
self.edges = {}... | cc0-1.0 | -5,935,155,101,291,136,000 | 29.655172 | 76 | 0.503375 | false | 4.294686 | false | false | false |
douban/libmc | tests/test_router.py | 2 | 5364 | # coding: utf-8
import os
import unittest
import libmc
from libmc import Client
RES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'resources')
class HashRouterCase(unittest.TestCase):
"""
Assume all memecached are accessible and won't establish any connections
"""
def test_md5_rou... | bsd-3-clause | 4,609,720,023,702,756,000 | 33.831169 | 79 | 0.509135 | false | 3.136842 | true | false | false |
gaborgulyas/kmap | kmap.py | 1 | 8923 | ##
# Copyright (c) 2016, Gabor Gyorgy Gulyas
# Email: gulyas@pet-portal.eu
# Web: gulyas.info
##
from collections import Counter
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import math
from scipy.stats import gaussian_kde
from selectpoints import selectpoints # https://github.com/gaborgulyas/S... | gpl-3.0 | -2,901,580,943,617,984,500 | 35.272358 | 467 | 0.639583 | false | 2.830003 | false | false | false |
crawfordsm/pyspectrograph | PySpectrograph/WavelengthSolution/ImageSolution.py | 1 | 4466 | """ImageSolution is a task describing the functional form for fitting an
spectrograph model to an 2-D spectroscopic data. The model will output
the best fit spectrograph to the observed data
In the Spectrograph model, the three things that we can alter are the
x position, the y position, and focus.
HISTORY
20100614 ... | bsd-3-clause | -3,072,105,795,319,975,400 | 33.353846 | 117 | 0.582848 | false | 3.3106 | false | false | false |
ExMachinaPL/MyOhMy | source/spiders/skeleton.py | 1 | 3763 | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from scrapy import log
from scrapy.utils.project import get_project_settings
from MyOhMy.items import MyOhMyItem
from bs4 import BeautifulSoup
import sys
import re
i... | mit | -4,722,682,764,189,207,000 | 39.031915 | 146 | 0.499336 | false | 4.176471 | false | false | false |
curryudon08/aoj | Volume2/0200.py | 2 | 1461 | """
Traveling Alone: One-way Ticket of Youth
"""
Inf = 1<<20
def init(n, m):
lc = [[0] * m for _ in xrange(m)]
lt = [[0] * m for _ in xrange(m)]
for _ in xrange(n):
a, b, c, t = map(int, raw_input().split())
lc[a - 1][b - 1] = c
lc[b - 1][a - 1] = c
lt[a - 1][b - 1] = t
... | unlicense | 8,595,767,912,996,044,000 | 25.527273 | 52 | 0.394106 | false | 3.071579 | false | false | false |
ammzen/SolveLeetCode | 66PlusOne.py | 1 | 1229 | # Given a non-negative number represented as an array of digits, plus one to the number.
# The digits are stored such that the most significant digit is at the head of the list.
# Input: [9,8,7,6,5,4,3,2,1,0] Expected: [9,8,7,6,5,4,3,2,1,1]
class Solution:
# @param digits, a list of integer digits
# ... | mit | -3,927,320,451,200,116,700 | 28.775 | 88 | 0.519935 | false | 3.541787 | false | false | false |
jingyonghou/TIMIT_STD | DownSampling_STD/downsampling_std.py | 1 | 4928 | import sys
import numpy as np
from Keyword import Keyword
from Utterance import Utterance
import Distance
from DTW import subsequenceDTW
import log
def get_fix_vector(feature, window_size):
compare_matrix = []
feature_len = feature.shape[0]
feature_dim = feature.shape[1]
for i in range(window_size,... | mit | -8,162,390,469,901,502,000 | 41.119658 | 166 | 0.660917 | false | 3.436541 | false | false | false |
doinab/SN-influence-maximization | SNHeuristics.py | 1 | 6886 | # -*- coding: utf-8 -*-
import networkx as nx
import heapq as hq
import SNSim
import time
import json
# [Kempe et al.] "The high-degree heuristic chooses nodes v in order of decreasing degrees.
# Considering high-degree nodes as influential has long been a standard approach
# for social and other networks [3, 83], ... | gpl-3.0 | 1,977,724,968,605,382,400 | 30.87963 | 113 | 0.577984 | false | 3.049601 | false | false | false |
robogen/CMS-Mining | cms_reindex.py | 2 | 4564 | #!/usr/bin/env python
import os, sys, time, pprint
from datetime import datetime
from elasticsearch import Elasticsearch, RequestsHttpConnection, exceptions as es_exceptions, helpers
from elasticsearch.client import IndicesClient
es = Elasticsearch([{'host':'10.71.102.210', 'port':9200}], timeout=600)
#ce = Elastics... | mit | 4,280,379,115,153,476,600 | 40.490909 | 101 | 0.393734 | false | 5.082405 | false | false | false |
richrr/coremicro | src/core/process_data.py | 1 | 2807 | # Copyright 2016, 2017 Richard Rodrigues, Nyle Rodgers, Mark Williams,
# Virginia Tech
#
# This file is part of Coremic.
#
# Coremic 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 Lice... | gpl-3.0 | 7,510,757,568,273,928,000 | 40.895522 | 78 | 0.615248 | false | 3.486957 | false | false | false |
rtrwalker/geotecha | geotecha/consolidation/dengetal2013and2014.py | 1 | 23023 | # geotecha - A software suite for geotechncial engineering
# Copyright (C) 2018 Rohan T. Walker (rtrwalker@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 version 3 of the L... | gpl-3.0 | -4,751,524,079,826,839,000 | 32.758065 | 105 | 0.47218 | false | 2.910987 | false | false | false |
treetrunk/Tuxemon | tuxemon/core/components/event/actions/stop_cinema_mode.py | 2 | 1445 | # -*- coding: utf-8 -*-
#
# Tuxemon
# Copyright (c) 2014-2017 William Edwards <shadowapex@gmail.com>,
# Benjamin Bean <superman2k5@gmail.com>
#
# This file is part of Tuxemon
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | gpl-3.0 | -7,344,495,860,654,797,000 | 33.404762 | 91 | 0.709343 | false | 3.753247 | false | false | false |
speijnik/gitws | gitws/client.py | 1 | 5725 | # Copyright (C) 2012 Stephan Peijnik
#
# 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 distributed i... | gpl-3.0 | -711,066,568,224,737,200 | 35.935484 | 91 | 0.597904 | false | 4.092209 | false | false | false |
Parallel-in-Time/pySDC | pySDC/tutorial/step_8/HookClass_error_output.py | 1 | 2407 | from pySDC.core.Hooks import hooks
from pySDC.implementations.controller_classes.controller_nonMPI import controller_nonMPI
class error_output(hooks):
"""
Hook class to add output of error
"""
def __init__(self):
super(error_output, self).__init__()
self.uex = None
def pre_step(s... | bsd-2-clause | 5,413,236,053,460,683,000 | 37.206349 | 117 | 0.623182 | false | 3.720247 | false | false | false |
timifasubaa/incubator-superset | superset/import_util.py | 2 | 2581 | # -*- coding: utf-8 -*-
# pylint: disable=C,R,W
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from sqlalchemy.orm.session import make_transient
def import_datasource(
session,
i_data... | apache-2.0 | -2,297,856,303,296,025,300 | 30.47561 | 75 | 0.647811 | false | 3.892911 | false | false | false |
anneline/Bika-LIMS | bika/lims/jsonapi/create.py | 1 | 17889 | from AccessControl import getSecurityManager
from AccessControl import Unauthorized
from bika.lims.idserver import renameAfterCreation
from bika.lims.jsonapi import set_fields_from_request
from bika.lims.jsonapi import resolve_request_lookup
from bika.lims.permissions import AccessJSONAPI
from bika.lims.utils import tm... | agpl-3.0 | 5,987,143,861,073,656,000 | 38.577434 | 120 | 0.589077 | false | 4.197325 | true | false | false |
nmc-probe/emulab-nome | protogeni/test/binduser.py | 1 | 3780 | #! /usr/bin/env python
#
# Copyright (c) 2008-2013 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
# GENI Public License
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without rest... | agpl-3.0 | 7,329,436,325,692,624,000 | 26.591241 | 74 | 0.652646 | false | 3.49353 | false | false | false |
nayarsystems/nxsugar-py | nxsugarpy/helpers.py | 1 | 2578 | # -*- coding: utf-8 -*-
##############################################################################
#
# nxsugarpy, a Python library for building nexus services with python
# Copyright (C) 2016 by the nxsugarpy team
#
# This program is free software: you can redistribute it and/or modify
# it under the te... | lgpl-3.0 | -1,868,206,753,646,287,400 | 32.051282 | 78 | 0.542281 | false | 3.813609 | false | false | false |
bmccary/csvu | setup.py | 1 | 1262 |
from setuptools import setup
setup(
name='csvu',
version='0.9',
description='CSV Utilities for the Command Line',
url='http://github.com/bmccary/csvu',
author='Brady McCary',
author_email='brady.mccary@gmail.com',
license='MIT',
packages=['csvu'],
... | mit | -2,935,469,134,632,860,700 | 30.55 | 57 | 0.395404 | false | 4.057878 | false | false | false |
chengduoZH/Paddle | python/paddle/fluid/tests/unittests/test_imperative_recurrent_usage.py | 2 | 3664 | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | 2,652,665,225,960,094,700 | 37.978723 | 74 | 0.614629 | false | 3.773429 | true | false | false |
dashee/dashee | client/ps3/src/ps3.py | 1 | 2313 | #!/usr/bin/python
#
# This program is designed to read from a playstation remote control
# and send its values back to Pi
import datetime
import io
import socket
import sys
import time
# Print usage on commandline invalid arguments
if (len(sys.argv) < 4):
print "Program requires three arguments"
print sys.arg... | gpl-3.0 | -8,239,238,840,562,801,000 | 26.211765 | 122 | 0.645482 | false | 3.602804 | false | false | false |
sanyaade-mobiledev/cloudeebus | cloudeebus/cloudeebus.py | 1 | 12764 | #!/usr/bin/env python
# Cloudeebus
#
# Copyright 2012 Intel 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 License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | -6,641,266,247,741,848,000 | 30.91 | 111 | 0.575368 | false | 4.270325 | false | false | false |
notapresent/rbm2m | rbm2m/action/user_settings.py | 1 | 3005 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import setting_manager
DEFAULT_SETTINGS = {
'formula_yml':
{
'title': 'Формула рассчета цены в YML',
'value': '((x + x/5.0 + 2) * 1.07) * 60 if x<1000 else ((x + x/2.0 + 2) * 1.07) * 60',
'data_type... | apache-2.0 | -5,527,123,696,655,154,000 | 26.148515 | 99 | 0.514953 | false | 2.778116 | false | false | false |
sassoftware/rmake3 | rmake/build/repos.py | 1 | 7873 | #
# Copyright (c) SAS Institute 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 w... | apache-2.0 | -5,713,271,435,554,206,000 | 32.645299 | 79 | 0.65134 | false | 3.79971 | true | false | false |
travitch/whole-program-llvm | wllvm/logconfig.py | 2 | 1791 | """
This module is intended to be imported by command line tools so they can
configure the root logger so that other loggers used in other modules can
inherit the configuration.
"""
import logging
import os
import sys
# iam: 6/30/2017 decided to move to a gllvm style where we can set the level and the output fil... | mit | 8,573,919,439,159,429,000 | 30.982143 | 122 | 0.6756 | false | 3.876623 | true | false | false |
SOM-st/RPySOM | src/som/interpreter/bc/interpreter.py | 1 | 14165 | from som.interpreter.bc.bytecodes import bytecode_length, Bytecodes
from som.interpreter.control_flow import ReturnException
from som.vmobjects.block_bc import BcBlock
from rlib import jit
class Interpreter(object):
_immutable_fields_ = ["_universe", "_add_symbol"]
def __init__(self, universe):
sel... | mit | 8,883,853,420,548,277,000 | 40.539589 | 91 | 0.598517 | false | 4.124927 | false | false | false |
honzajavorek/redis-collections | redis_collections/dicts.py | 1 | 26755 | r"""
dicts
~~~~~
The `dicts` module contains standard collections based on Python dictionaries.
Included collections are :class:`Dict`, :class:`Counter`, and
:class:`DefaultDict`.
Each collection stores its items in a Redis
`hash <http://redis.io/commands#hash>`_ structure.
.. note::
If you need to store mutable ... | isc | -1,510,861,074,760,126,000 | 33.746753 | 82 | 0.578882 | false | 4.337711 | false | false | false |
riadnassiffe/Simulator | src/tools/ecos/cvxpy/examples/extensions/sudoku_admm.py | 1 | 1826 | from cvxpy import *
from mixed_integer import *
import cvxopt
n = 9
# 9x9 sudoku grid
numbers = Variable(n,n)
# TODO: 9*[Boolean(9,9)] doesn't work....
solution = cvxopt.matrix([
[0, 5, 2, 3, 7, 1, 8, 6, 4],
[6, 3, 7, 8, 0, 4, 5, 2, 1],
[1, 4, 8, 5, 2 ,6, 3, 0, 7],
[4, 7, 1, 2, 3, 0, 6, 5, 8],
[3... | mit | 5,729,949,149,467,001,000 | 27.092308 | 70 | 0.470427 | false | 2.314322 | false | false | false |
wmfs/chimp | src/load/Stager.py | 1 | 15542 | '''
Created on 18 Jan 2012
@author: Ryan Pickett
'''
import cs
import imp
import datetime
import csv
class Stager:
def __init__(self, queue, supportConnection, supportCursor, dataConnection, dataCursor, taskId, specification, paths, commitThreshold, appLogger):
self.appLogger = appLogger
self.com... | gpl-3.0 | 6,060,313,463,230,502,000 | 43.919075 | 309 | 0.519303 | false | 5.273838 | false | false | false |
OPENDAP/olfs | resources/metacat/clustering_from_dan/simple_clustering.py | 1 | 17031 | def simple_form(simple_str):
#
lexico_str = ''
while simple_str:
simple_char = simple_str[0]
simple_str = simple_str[1:]
#
if simple_char.isalnum():
if simple_char.isalpha(): lexico_str = lexico_str + '1'
else: lexico_str = lexico_str + '0'
else: lexico_str = lexico_str + '2'
return lexico_str
#
de... | lgpl-2.1 | 8,821,977,201,884,329,000 | 25.323029 | 295 | 0.604838 | false | 2.530609 | false | false | false |
mtils/ems | examples/qt4/bootstrap/scaffolding.py | 1 | 1915 |
from PyQt4.QtCore import QString
from PyQt4.QtGui import QPixmap
from ems.app import Bootstrapper
from ems.qt4.gui.mapper.base import MapperDefaults
from ems.qt4.gui.mapper.strategies.string_strategy import StringStrategy
from ems.qt4.gui.mapper.strategies.bool_strategy import BoolStrategy
from ems.qt4.gui.mapper.st... | mit | -9,182,861,688,765,674,000 | 46.9 | 92 | 0.772324 | false | 3.814741 | false | false | false |
PaddlePaddle/models | PaddleCV/tracking/pytracking/tracker/siamfc/eval_siamfc_otb.py | 1 | 5546 | import os
import numpy as np
from PIL import Image
import os.path as osp
import sys
CURRENT_DIR = osp.dirname(__file__)
sys.path.append(osp.join(CURRENT_DIR, '..', '..', '..'))
from pytracking.pysot_toolkit.utils import success_overlap, success_error
import json
from pytracking.tracker.siamfc.siamfc import SiamFC
f... | apache-2.0 | 4,052,664,666,333,647,400 | 31.623529 | 80 | 0.550667 | false | 3.505689 | false | false | false |
ValRose/Rose_Bone | PythonLibraries/Startup_Script.py | 1 | 5947 | '''
Created on 12/31/2015
@author: Shannon Litwin
'''
import Lib_LCD as LCD
import Lib_Main as BBB
import Lib_Encoders as ENC
import Adafruit_BBIO.GPIO as GPIO
import Adafruit_BBIO.PWM as PWM
from bbbthread import BBBThread
import signal
import time
import sys
from os import walk
#Keeps track of whether a selecte... | mit | -6,521,520,748,210,084,000 | 20.014134 | 120 | 0.72339 | false | 2.926673 | false | false | false |
sergiocorato/odoomrp-wip | stock_quant_packages_moving_wizard/wizard/quants_move_wizard.py | 8 | 1834 | # -*- coding: utf-8 -*-
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
class StockQuantsMoveWizard(models.TransientModel):
_name = 'stock.quants.move'
pack_move_items = fields.One2many(
comodel_name='stock.quants.move_items', inverse_name='mo... | agpl-3.0 | 7,895,874,662,634,833,000 | 31.175439 | 79 | 0.612868 | false | 3.533719 | false | false | false |
irdan/libfte | fte/conf.py | 1 | 1026 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
def getValue(key):
return conf[key]
def setValue(key, value):
conf[key] = value
def we_are_frozen():
# All of the modules are built-in to the interpreter, e.g., by py2exe
return hasattr(sys, "frozen")
def module_path():
if... | apache-2.0 | -8,862,140,202,013,470,000 | 18.730769 | 79 | 0.611111 | false | 3.008798 | false | false | false |
abloomston/sympy | sympy/vector/vector.py | 42 | 13170 | from sympy.core.assumptions import StdFactKB
from sympy.core import S, Pow
from sympy.core.expr import AtomicExpr
from sympy.core.compatibility import range
from sympy import diff as df, sqrt, ImmutableMatrix as Matrix
from sympy.vector.coordsysrect import CoordSysCartesian
from sympy.vector.basisdependent import Basis... | bsd-3-clause | -8,330,124,424,953,326,000 | 29 | 76 | 0.543964 | false | 3.983666 | false | false | false |
brianspeir/Vanilla | vendor/bootstrap-vz/common/tasks/apt.py | 1 | 4948 | from base import Task
from common import phases
from common.tools import log_check_call
import locale
import os
class AddManifestSources(Task):
description = 'Adding sources from the manifest'
phase = phases.preparation
@classmethod
def run(cls, info):
for name, lines in info.manifest.packages['sources'].iteri... | bsd-3-clause | 9,190,584,984,567,972,000 | 31.12987 | 103 | 0.651576 | false | 3.350034 | false | false | false |
tensorflow/tfx | tfx/types/standard_component_specs.py | 1 | 15126 | # Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 1,898,499,033,553,460,700 | 33.221719 | 80 | 0.702367 | false | 3.667798 | true | false | false |
andrewyoung1991/supriya | supriya/tools/synthdeftools/SynthDef.py | 1 | 29053 | # -*- encoding: utf-8 -*-
from __future__ import print_function
import collections
import copy
import hashlib
import os
import shutil
import tempfile
from supriya.tools.servertools.ServerObjectProxy import ServerObjectProxy
class SynthDef(ServerObjectProxy):
r'''A synth definition.
::
>>> from supri... | mit | -3,815,178,347,595,160,600 | 34.259709 | 78 | 0.549341 | false | 4.086217 | false | false | false |
wangyou/XX-Net | code/default/python27/1.0/lib/linux/gevent/__init__.py | 7 | 1568 | # Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details.
"""
gevent is a coroutine-based Python networking library that uses greenlet
to provide a high-level synchronous API on top of libevent event loop.
See http://www.gevent.org/ for the documentation.
"""
version_info = (0, 13, 6)
__version__ = '0.13.6'
_... | bsd-2-clause | 3,476,504,405,579,473,400 | 25.133333 | 89 | 0.626276 | false | 3.446154 | false | false | false |
geekinthesticks/TMobileSMS | tmobilesms.py | 1 | 4456 | #!/usr/bin/python
## Copyright (C) 2009 Ian Barton.
##
## 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, or (at your option)
## any later version.
##
## This prog... | gpl-3.0 | -520,254,696,438,230,140 | 32.253731 | 117 | 0.594704 | false | 3.905346 | false | false | false |
chriskiehl/GooeyExamples | examples/subparser_demo.py | 1 | 4652 | """
Example program to demonstrate Gooey's presentation of subparsers
"""
import argparse
from gooey import Gooey, GooeyParser
from message import display_message
running = True
@Gooey(optional_cols=2, program_name="Subparser Layout Demo")
def main():
settings_msg = 'Subparser example demonstating bundled conf... | mit | 907,544,802,054,189,400 | 47.968421 | 114 | 0.524721 | false | 4.766393 | false | false | false |
thesgc/cbh_core_ws | cbh_core_ws/authorization.py | 1 | 10562 | from tastypie.authorization import Authorization
from tastypie.exceptions import Unauthorized
import logging
logger = logging.getLogger(__name__)
logger_debug = logging.getLogger(__name__)
from cbh_core_model.models import Project, get_all_project_ids_for_user_perms, get_all_project_ids_for_user, RESTRICTED, get_projec... | mit | 1,382,345,447,970,826,800 | 35.42069 | 188 | 0.618159 | false | 4.240064 | false | false | false |
nanograv/enterprise | tests/test_gp_signals.py | 1 | 27431 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_gp_signals
----------------------------------
Tests for GP signal modules.
"""
import unittest
import numpy as np
import scipy.linalg as sl
from enterprise.pulsar import Pulsar
from enterprise.signals import gp_signals, parameter, selections, signal_base, uti... | mit | -907,584,747,722,677,800 | 38.187143 | 115 | 0.572126 | false | 3.082481 | true | false | false |
log2timeline/dfvfs | dfvfs/vfs/tsk_partition_file_entry.py | 2 | 5904 | # -*- coding: utf-8 -*-
"""The SleuthKit (TSK) partition file entry implementation."""
from dfvfs.lib import definitions
from dfvfs.lib import errors
from dfvfs.lib import tsk_partition
from dfvfs.path import tsk_partition_path_spec
from dfvfs.vfs import file_entry
class TSKPartitionDirectory(file_entry.Directory):
... | apache-2.0 | 4,217,597,032,379,280,000 | 31.8 | 80 | 0.673103 | false | 3.765306 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.