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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
intity/gtk-win32 | gvsbuild/groups.py | 1 | 2073 | # Copyright (C) 2016 - Yevgen Muntyan
# Copyright (C) 2016 - Ignacio Casal Quinteiro
# Copyright (C) 2016 - Arnavion
# Copyright (C) 2017 - Daniele Forghieri
#
# 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
# th... | gpl-2.0 | -5,583,057,842,840,286,000 | 28.485294 | 83 | 0.52822 | false | 3.882022 | false | false | false |
celiao/rtsimple | rtsimple/__init__.py | 1 | 1037 | # -*- coding: utf-8 -*-
"""
rtsimple
~~~~~~~~
*rtsimple* is a wrapper, written in Python, for The Rotten Tomatoes (RT) API. By calling the functions available in *rtsimple* you can simplify your code and easily access a vast amount of movie data, including detailed movie information, new release and dvd lists, criti... | gpl-3.0 | 1,645,345,058,963,367,700 | 30.424242 | 490 | 0.705882 | false | 3.142424 | false | false | false |
DigitalGlobe/gbdxtools | gbdxtools/rda/constants.py | 1 | 9505 | '''
Constants for geoio
'''
import numpy as np
##### DigitalGlobe File Suffixes and Search Strings ###########################
# DG meta file endings
# If XML exists, it should contains same info as the rest of the files.
DG_META = ['.XML','.IMD','.RPB','.RAD']
# Various strings that describe the same DigitalGlobe b... | mit | -8,431,301,582,848,404,000 | 33.81685 | 79 | 0.478064 | false | 2.376844 | false | false | false |
opencord/maas | library/maas_cluster_interface.py | 1 | 10714 | #!/usr/bin/python
# Copyright 2017-present Open Networking Foundation
#
# 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 ap... | apache-2.0 | 4,119,520,323,623,192,000 | 32.905063 | 118 | 0.640097 | false | 3.746154 | false | false | false |
kustodian/ansible | test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/module_args.py | 8 | 4786 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Matt Martz <matt@sivel.net>
# Copyright (C) 2016 Rackspace US, 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 ... | gpl-3.0 | 3,449,195,912,365,471,000 | 32.943262 | 119 | 0.674467 | false | 4.104631 | false | false | false |
mbatchkarov/dc_evaluation | eval/pipeline/bov.py | 1 | 11353 | # coding=utf-8
from collections import defaultdict
import logging
import array
import numbers
import networkx as nx
import scipy.sparse as sp
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from eval.pipeline.feature_handlers import get_token_handler
from eval.pipeline.stats import get... | bsd-3-clause | -5,646,690,901,575,641,000 | 46.701681 | 117 | 0.593235 | false | 4.137391 | false | false | false |
open-contracting/use-case-demo | indicatorCalculation/temporaryAPI/contractData.py | 1 | 5640 |
class ContractData(object):
"""A class represents the data in the JSON standard"""
def __init__(self):
self.publisher = None
self.publishingMeta = None
self.releases = []
class Identifier(object):
"""docstring for Identifier"""
def __init__(self, parent=None, name=None,
... | gpl-2.0 | -3,018,074,446,556,017,700 | 32.571429 | 83 | 0.64078 | false | 4.269493 | false | false | false |
apache/tashi | src/tashi/agents/mauipacket.py | 1 | 3312 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 3,829,145,285,499,392,500 | 27.307692 | 87 | 0.661534 | false | 2.941385 | false | false | false |
RealTimeWeb/Blockpy-Server | controllers/helpers.py | 1 | 10155 | # Built-in imports
from datetime import timedelta
import re
import os
from pprint import pprint
from functools import wraps, update_wrapper
import calendar, datetime
import json
try:
from html.parser import HTMLParser
except:
from HTMLParser import HTMLParser
from natsort import natsorted
from urllib.parse impo... | mit | 5,404,334,999,994,891,000 | 37.911877 | 132 | 0.606105 | false | 3.994886 | false | false | false |
juposocial/jupo | src/tests/features/step_definitions/utils.py | 1 | 3840 | """Utility functions that combine steps to locate elements"""
from nose.tools import assert_true as nose_assert_true
from nose.tools import assert_false as nose_assert_false
class AssertContextManager():
def __init__(self, step):
self.step = step
def __enter__(self):
pass
def __exit__(self, type, valu... | agpl-3.0 | 7,610,985,813,136,427,000 | 30.483607 | 94 | 0.669792 | false | 3.377309 | false | false | false |
ctuning/ck-env | soft/dataset.imagenet.val.lmdb/customize.py | 1 | 3500 | #
# Collective Knowledge (individual environment - setup)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net
#
import os
##############################################################################
# ... | bsd-3-clause | 1,441,185,118,085,069,600 | 25.717557 | 121 | 0.514286 | false | 3.684211 | false | false | false |
samsu/networking-fortinet | networking_fortinet/common/resources.py | 1 | 9121 | # Copyright 2015 Fortinet 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... | apache-2.0 | 5,087,558,141,423,262,000 | 28.918644 | 78 | 0.523188 | false | 4.018062 | false | false | false |
eshook/Forest | forest/patterns/IDW.py | 1 | 4213 | '''
Inverse Distance Weighted
Mckenzie Ebert
'''
from ..bobs import *
from ..primitives import *
from ..engines import *
from .Pattern import *
import scipy.spatial as sp
#This primitive is used in reordering the input data as well as creating
#a blank raster to use for further calculations.
class setUpPrim(Primitiv... | bsd-3-clause | 6,879,315,955,444,725,000 | 39.12381 | 165 | 0.653691 | false | 4.163043 | false | false | false |
jackfirth/herbie | herbie/compile/makejson.py | 1 | 1029 | #!/bin/python
import sys
if len(sys.argv) < 2:
print("USAGE: makejson.py [prefix]")
sys.exit()
else:
PREFIX = sys.argv[1]
import csv
def rows(file):
with open(file) as csvfile:
return list(csv.reader(csvfile))
with open(PREFIX + ".names.csv") as namefile:
NAMES = [line[3:-1] for line in... | mit | 8,259,673,757,372,773,000 | 25.384615 | 94 | 0.600583 | false | 2.842541 | false | false | false |
grhawk/inputsGen | src/main.py | 1 | 12171 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#
# Project: inputsGen
# FileName: main
# Creation: Jun 12, 2015
#
"""
Main file
"""
import sys
import os
HEREDIR = os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0])))
sys.path.append(os.path.join(HEREDIR, 'ports/port-for'))
import argparse
import stat
i... | gpl-2.0 | -4,807,318,742,746,191,000 | 34.797059 | 110 | 0.51557 | false | 3.980052 | false | false | false |
sfromm/snmpryte | lib/netspryte/snmp/host/interface.py | 2 | 5438 | # Written by Stephen Fromm <stephenf nero net>
# Copyright (C) 2016-2017 University of Oregon
#
# 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 opt... | gpl-3.0 | 253,298,926,893,125,120 | 38.693431 | 129 | 0.543214 | false | 2.859096 | false | false | false |
hikoseuro/VECTOR-ROTON-data-collector | main.py | 1 | 4143 | #!/usr/bin/python3
import requests
import json
import sys
def status_mcast():
ip_roton = (sys.argv[1]) #ip адрес ротона
mcast = (sys.argv[2]) #ip мультикаста
s = requests.Session()
r = s.post('http://'+ip_roton+'/auth/login', data = {'username':'admin', 'password':'admin'}) #авторизация
r... | mit | -226,657,015,613,104,900 | 53.644068 | 161 | 0.618641 | false | 2.068683 | false | false | false |
batxes/4Cin | Six_mouse_models/Six_mouse_models_final_output_0.2_-0.1_11000/Six_mouse_models32.py | 2 | 18209 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 | -5,783,410,942,173,006,000 | 45.333333 | 71 | 0.699489 | false | 2.670725 | false | false | false |
edenferreira/estudo_caso | pqdict.py | 1 | 23133 | """Copyright (c) 2012 Nezar Abdennur
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, publish, distribute, ... | mit | -3,619,598,349,425,376,000 | 29.680371 | 81 | 0.571305 | false | 4.187726 | false | false | false |
anderspitman/scikit-bio | skbio/sequence/tests/test_distance.py | 4 | 7208 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | bsd-3-clause | -9,067,239,546,161,546,000 | 29.803419 | 78 | 0.577969 | false | 3.584286 | true | false | false |
mandeepdhami/neutron | neutron/db/securitygroups_db.py | 1 | 33188 | # Copyright 2012 VMware, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 | -1,820,443,981,232,883,500 | 44.031208 | 79 | 0.57798 | false | 4.373748 | false | false | false |
diyan/falcon_seed | tests/assertions.py | 1 | 1291 | from __future__ import unicode_literals
import json
from difflib import unified_diff
def _reorder(obj):
if isinstance(obj, dict):
for k, v in obj.items():
obj[k] = _reorder(v)
if isinstance(obj, tuple):
obj = tuple(_reorder(list(obj)))
if isinstance(obj, list):
obj = so... | mit | -5,866,156,779,479,166,000 | 30.512195 | 110 | 0.635167 | false | 3.616246 | false | false | false |
sigma-random/ARMSCGen | examples/appendwrite_example.py | 3 | 1103 | #!python
from TesterModule import *
import sys
HOST = 'pi'
PORT = 31337
def Run(data, fname):
"""appendwrite shellcode example
Args:
data(str): user information
fname(str): file name to write
"""
# ARMSCGen Thumb Class
scgen = thumbSCGen()
# generates chmod with optio... | gpl-2.0 | 3,237,234,487,221,075,500 | 22.978261 | 135 | 0.633726 | false | 2.730198 | false | false | false |
Phil9l/cosmos | code/artificial_intelligence/src/factorization_machines/matrix_factorization.py | 3 | 2871 | import numpy as np
def matrix_factorization(data, K, steps=5000, beta=0.0002, lamda=0.02):
W = np.random.rand(data.shape[0], K)
H = np.random.rand(data.shape[1], K)
# W = np.random.normal(scale=1./K, size = (data.shape[0], K))
# H = np.random.normal(scale=1./K, size = (data.shape[1], K))
H = H.T... | gpl-3.0 | 9,083,079,532,073,771,000 | 28.90625 | 88 | 0.424939 | false | 2.771236 | false | false | false |
hodgesmr/django-ohio-voter-file | ohiovoter/migrations/0001_initial.py | 1 | 6110 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-11 06:39
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | bsd-3-clause | -1,137,145,478,251,071,500 | 56.641509 | 277 | 0.577414 | false | 3.879365 | false | false | false |
brianhouse/48to16 | data_compilation/compile_garmin.py | 1 | 3963 | #!/usr/bin/env python3
import json, datetime, time, sys, os, calendar, shutil, compile_gpx
from housepy import config, log, drawing, science, util, osc, crashdb
from xml.etree import ElementTree
MEDIA_LENGTH = 2090.43 # hack per video to get everything to match correctly
log.info("Starting...")
if len(sys.argv)... | gpl-3.0 | -6,394,679,999,550,066,000 | 31.752066 | 117 | 0.641686 | false | 2.950856 | false | false | false |
seananderson/aenea-grammars | _chrome.py | 1 | 2680 | # Commands for interatcting with Google Chrome
import aenea
import aenea.configuration
from aenea.lax import Key, Text, Dictation
import dragonfly
from aenea import *
chrome_mapping = {
'(preev|left) tab': Key("cs-tab"),
'(next|right) tab': Key("c-tab"),
'new (window|tab)': Key("w-t"),
'reopen (window... | lgpl-3.0 | -9,051,005,722,041,488,000 | 27.210526 | 108 | 0.576119 | false | 3.055872 | false | false | false |
quattor/aquilon | lib/aquilon/worker/commands/add_cluster_systemlist.py | 1 | 1202 | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2016,2017 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | apache-2.0 | 4,315,193,174,864,089,000 | 40.448276 | 74 | 0.762895 | false | 3.852564 | false | false | false |
aplicatii-romanesti/allinclusive-kodi-pi | .kodi/addons/plugin.video.salts/salts_lib/utils.py | 1 | 39870 | """
SALTS XBMC Addon
Copyright (C) 2015 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | apache-2.0 | -7,360,316,938,908,984,000 | 43.006623 | 178 | 0.606647 | false | 3.377669 | false | false | false |
unreal666/outwiker | buildtools/builders/windows.py | 2 | 6779 | # -*- coding: UTF-8 -*-
import os
import shutil
from string import Template
from fabric.api import local, lcd
from .base import BuilderBase
from .binarybuilders import PyInstallerBuilderWindows
from buildtools.defines import (WINDOWS_BUILD_DIR,
PLUGINS_LIST,
... | gpl-3.0 | 7,452,380,786,794,102,000 | 33.943299 | 114 | 0.553326 | false | 3.909458 | false | false | false |
ucrbioinfo/EAST | EAST2.py | 1 | 12079 | import numpy as np
from timeit import time
from numba import guvectorize,float64,int64
import os
from scipy import sparse
from detect_peaks import detect_peaks
import importlib
pnd = importlib.find_loader('pandas')
PANDAS_INSTALLED = pnd is not None
if PANDAS_INSTALLED:
import pandas as pd
RESOLUTION =... | gpl-3.0 | 1,318,189,307,451,297,300 | 41.606498 | 208 | 0.515606 | false | 3.058749 | false | false | false |
zingale/pyro2 | compressible/problems/ramp.py | 2 | 2975 | from __future__ import print_function
import sys
import numpy as np
import math
import mesh.patch as patch
from util import msg
def init_data(my_data, rp):
""" initialize the double Mach reflection problem """
msg.bold("initializing the double Mach reflection problem...")
# make sure that we are pass... | bsd-3-clause | -9,106,378,871,392,326,000 | 32.806818 | 88 | 0.527395 | false | 2.731864 | false | false | false |
felipenaselva/repo.felipe | plugin.video.salts/scrapers/filmovizjia_scraper.py | 1 | 8434 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | gpl-2.0 | 5,491,419,397,359,347,000 | 45.861111 | 173 | 0.541736 | false | 3.790562 | false | false | false |
sebastien-forestier/NIPS2016 | notebook/test_joy2ergo.py | 2 | 1128 | # RUN WITH "sudo /home/poppy/miniconda/bin/python test_joy2ergo.py"
import os, sys
import pygame
import pygame.display
import time
from poppy.creatures import PoppyErgoJr
# INIT JOYSTICK
os.environ["SDL_VIDEODRIVER"] = "dummy"
pygame.display.init()
screen = pygame.display.set_mode... | gpl-3.0 | 8,458,395,946,660,808,000 | 22.020408 | 103 | 0.601064 | false | 2.764706 | false | false | false |
chrislyon/django_ds1 | tbaseadm/cr2/views.py | 1 | 1137 | from django.shortcuts import render, redirect, get_object_or_404
# Create your views here.
from cr2.models import Book, Author, AuthorForm
def cr2_list(request, template_name='cr2/cr2_list.html'):
cr2s = Author.objects.all()
data = {}
data['object_list'] = cr2s
return render(request, template_name, da... | gpl-2.0 | -4,873,824,634,223,930,000 | 34.53125 | 73 | 0.665787 | false | 3.19382 | false | false | false |
dchad/malware-detection | vs/process_av_reports.py | 1 | 4320 | # Convert ClamAV and Windows Defender reports to csv files.
#
# Input : Windows defender log files and ClamAV log files.
#
# Output: sorted-av-report.csv
# row format = [file_name, malware_type]
#
# Author: Derek Chadwick
# Date : 30/07/2016
import os
import sys
from csv import writer
import pandas as pd
impo... | gpl-3.0 | -2,624,086,722,797,421,600 | 32.230769 | 116 | 0.579861 | false | 3.636364 | false | false | false |
yukoga/flaskr-sample-001 | flaskr.py | 1 | 2227 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sqlite3
from flask import Flask, request, session, g, redirect, url_for, \
abort, render_template, flash
from contextlib import closing
# configuration
DATABASE = "/tmp/flaskr.db"
DEBUG = True
SECRET_KEY = "development key"
USERNAME= "admin"
PASSWORD = "default... | mit | 3,746,576,203,526,491,000 | 26.907895 | 112 | 0.666195 | false | 3.012784 | false | false | false |
Hwesta/advent-of-code | aoc2016/day6.py | 1 | 2962 | #!/usr/bin/env python
"""
--- Day 6: Signals and Noise ---
Something is jamming your communications with Santa. Fortunately, your signal is only partially jammed, and protocol in situations like this is to switch to a simple repetition code to get the message through.
In this model, the same message is sent repeatedl... | mit | 3,615,143,858,785,618,000 | 34.261905 | 347 | 0.709318 | false | 3.887139 | false | false | false |
lutris/lutris | lutris/gui/config/services_box.py | 1 | 2198 | from gettext import gettext as _
from gi.repository import Gtk
from lutris import settings
from lutris.gui.config.base_config_box import BaseConfigBox
from lutris.gui.widgets.utils import ICON_SIZE, get_icon
from lutris.services import SERVICES
class ServicesBox(BaseConfigBox):
def __init__(self):
super... | gpl-3.0 | -2,596,532,386,074,752,500 | 35.032787 | 77 | 0.604186 | false | 3.657238 | false | false | false |
evernote/pootle | pootle/apps/pootle_app/management/commands/changed_languages.py | 1 | 2694 | # -*- coding: utf-8 -*-
#
# Copyright 2014 Evernote Corporation
#
# This file is part of Pootle.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your ... | gpl-2.0 | -5,854,294,320,095,394,000 | 33.101266 | 80 | 0.643653 | false | 4.387622 | false | false | false |
Cerberus98/lightshowpi | tools/convert_old_preshow_to_new.py | 2 | 2830 | # This tool will allow you to convert your old preshow config to the
# new preshow_configuration.
# usage
# python convert_old_preshow_to_new.py
import collections
import json
import os
import sys
print "This will generate a new config file with the old style preshow removed"
print "It will not change any of your exi... | bsd-2-clause | -6,816,653,646,715,325,000 | 31.159091 | 82 | 0.719788 | false | 3.614304 | true | false | false |
avoceteditors/dion | dion/tex/lex.py | 1 | 3730 | ##############################################################################
# Copyright (c) 2020, Kenneth P. J. Dyer <kenneth@avoceteditors.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... | bsd-3-clause | 7,025,825,380,324,465,000 | 35.930693 | 80 | 0.6 | false | 4.357477 | false | false | false |
utilForever/CubbyFlow | Tests/PythonTests/test_collider_set.py | 1 | 1407 | import pyCubbyFlow
def create_collider2():
sphere = pyCubbyFlow.Sphere2()
collider = pyCubbyFlow.RigidBodyCollider2(surface=sphere)
return collider
def create_collider3():
sphere = pyCubbyFlow.Sphere3()
collider = pyCubbyFlow.RigidBodyCollider3(surface=sphere)
return collider
def test_coll... | mit | 4,053,960,141,093,869,000 | 28.93617 | 61 | 0.734186 | false | 3.052061 | false | false | false |
lingdb/CoBL-public | ielex/lexicon/migrations/0086_add_LateVedic_to_current.py | 1 | 1374 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
from django.db import migrations
from django.db.models import Max
def forwards_func(apps, schema_editor):
'''
Fixing LateVedic for #41.
See https://github.com/lingdb/CoBL/issues/41
'''
# Models to work with:
Langua... | bsd-2-clause | -8,493,596,899,827,970,000 | 32.512195 | 75 | 0.635371 | false | 3.982609 | false | false | false |
onatto/oxdata | gpu/shaders.py | 1 | 3767 | import os
import yaml
import re
import ox
def uniform_gui(uniform, gui_def):
drag_gui_fns = {
'float': 'ImGui::DragFloat',
'vec2': 'ImGui::DragFloat2',
'vec3': 'ImGui::DragFloat3',
'vec4': 'ImGui::DragFloat4',
'mat4': 'DragMatrix4',
}
slider_gui_fns = {
... | unlicense | 7,257,599,657,524,038,000 | 36.29703 | 131 | 0.602336 | false | 3.165546 | false | false | false |
andersjel/boxes | src/symmath/expr.py | 1 | 2790 | """
symmath.expr
------------
.. doctest::
:hide:
>>> from symmath import *
.. autoexception:: SymmathError
:show-inheritance:
.. autoclass:: Expr
:members:
:undoc-members:
.. autofunction:: sym
"""
import symmath.numerictype
import symmath.format
class SymmathError(ValueError):
pass
class Expr(sym... | mit | -3,964,475,327,916,107,000 | 18.928571 | 79 | 0.583871 | false | 3.590734 | false | false | false |
pyrocko/pyrocko | src/apps/automap.py | 1 | 8451 | #!/usr/bin/env python
# http://pyrocko.org - GPLv3
#
# The Pyrocko Developers, 21st Century
# ---|P------/S----------~Lg----------
import sys
import logging
import numpy as num
from pyrocko import util, model, orthodrome as od, gmtpy
from pyrocko import moment_tensor as pmt
from pyrocko.plot import automap
from optpa... | gpl-3.0 | 7,711,584,937,641,812,000 | 27.17 | 79 | 0.537806 | false | 3.616175 | false | false | false |
autotest/arc | arc/shared/rpc.py | 1 | 1096 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-2.0 | 2,615,328,063,074,159,000 | 28.621622 | 77 | 0.70438 | false | 3.558442 | false | false | false |
ateoto/django-mentha | mentha/tests/test_models.py | 1 | 1741 | from django.test import TestCase
from django.contrib.auth.models import User
from datetime import date
from decimal import Decimal
from mentha.models import Account, Transaction, Payee
class TransactionTestCase(TestCase):
def setUp(self):
self.test_user = User.objects.create_user('Fakey Fakerson', 'fake@test.com... | mit | 3,177,310,476,245,789,000 | 50.205882 | 140 | 0.757611 | false | 2.955857 | true | false | false |
google/tink | python/tink/signature/_signature_wrapper.py | 1 | 5421 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 8,604,632,570,422,601,000 | 34.900662 | 80 | 0.714813 | false | 4.027489 | false | false | false |
ThiefMaster/indico | indico/modules/events/registration/util.py | 2 | 30294 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import csv
import itertools
from operator import attrgetter
from flask import current_app, json, session
... | mit | 8,318,176,013,793,965,000 | 47.626003 | 118 | 0.651185 | false | 4.228053 | false | false | false |
ceache/treadmill | lib/python/treadmill/cli/admin/checkout/servers.py | 2 | 5026 | """Checkout Zookeeper ensemble.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import click
from treadmill import context
from treadmill import checkout
from treadmill import zknamespace as z
def _metadata():
... | apache-2.0 | 2,771,915,973,152,389,600 | 27.39548 | 76 | 0.39992 | false | 5.279412 | false | false | false |
terranum-ch/GraphLink | graphlink/core/gk_node.py | 1 | 2285 | #!/usr/bin/python
import os
import pickle
GK_SHAPE_TYPE = [
"box",
"ellipse",
"diamond",
"folder",
"image"
]
class GKNode(object):
def __init__(self, name=None, image=None, shape=GK_SHAPE_TYPE[0]):
"""contain module definition"""
self.m_name = name
self.m_description... | apache-2.0 | -2,310,941,505,185,956,400 | 26.53012 | 70 | 0.528665 | false | 3.808333 | false | false | false |
cookietron/CBVGR | Profiler.py | 1 | 5936 | import csv
# vectortransform takes the log filename and returns a dictionary of the input keys with values for:
# raw count, raw duration, avg count per minute and avg duration per minute
def vectortransform(filename):
gametime = False
gamename = ''
starttime = 0
endtime = 0
totaltime = 0
resul... | mit | -4,711,804,807,652,002,000 | 37.545455 | 120 | 0.538578 | false | 3.93634 | false | false | false |
adamlincoln/pokersim | tests/test_deck.py | 1 | 1046 | import copy
from pokersim.Deck import Deck
def test_deck_one():
deck = Deck()
assert len(deck.cards) == 52
def test_deck_shuffle():
deck = Deck()
cards = copy.deepcopy(deck.cards)
assert cards == deck.cards
deck.shuffle()
assert cards != deck.cards
def test_deck_deal_one():
deck = D... | gpl-3.0 | -4,022,832,252,865,081,000 | 21.73913 | 58 | 0.599426 | false | 3.228395 | true | false | false |
ROCmSoftwarePlatform/rocBLAS | library/src/merge_archives.py | 7 | 4533 | #!/usr/bin/env python
#===----------------------------------------------------------------------===##
#
# The LLVM Compiler Infrastructure
#
# This file is dual licensed under the MIT and the University of Illinois Open
# Source Licenses. See LICENSE.TXT for details.
#
#===--------------------------... | mit | 2,731,512,298,299,879,400 | 32.330882 | 79 | 0.586587 | false | 3.685366 | false | false | false |
Hezi-Resheff/trajectory-aa-move-ecol | metraj/compute/pointwise.py | 1 | 2358 | """
Pointwise computations
"""
import numpy as np
def position_det(trajectory, varx="VARX", vary="VARY", covxy="COVXY"):
return trajectory.get_attr(varx)**.5 * trajectory.get_attr(vary)**.5 - trajectory.get_attr(covxy)
def position_max_var(trajectory, varx="VARX", vary="VARY"):
vx = trajectory.get_attr(va... | mit | 835,371,608,030,766,700 | 28.848101 | 103 | 0.625106 | false | 3.293296 | false | false | false |
chrisspen/homebot | src/test/balance/examples/cloth.py | 2 | 5739 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# C++ version Copyright (c) 2006-2007 Erin Catto http://www.box2d.org
# Python version Copyright (c) 2010 kne / sirkne at gmail dot com
#
# Implemented using the pybox2d SWIG interface for Box2D (pybox2d.googlecode.com)
#
# This software is provided 'as-is', without any e... | mit | -7,544,092,956,851,948,000 | 37.516779 | 81 | 0.591741 | false | 3.476075 | false | false | false |
jmestrovic/finrep | web/gfi/migrations/0006_auto_20180228_1258.py | 1 | 6911 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2018-02-28 11:58
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('gfi', '0005_securities_security_type'),
]
... | gpl-2.0 | 2,518,212,712,555,230,000 | 44.073333 | 114 | 0.56099 | false | 4.287221 | false | false | false |
emmdim/guifiAnalyzer | db/old/queryInfraDB.py | 1 | 2115 | from pymongo import MongoClient
"""
This module implements the main queries of the
embeded-document based infrastructure DB
"""
# Exception
class DocumentNotFound(Exception):
def __init__(self, collection, documentId):
self.collection = collection
self.documentId = documentId
def __str__(self):
msg = "No doc... | gpl-3.0 | -2,693,644,443,481,627,600 | 24.178571 | 90 | 0.706856 | false | 3.069666 | false | false | false |
otadmor/Open-Knesset | laws/tags/build_important_keyword_html.py | 1 | 8719 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import numpy
import numpy as np
import re
from functools import partial
from sklearn.externals import joblib
import cPickle as pickle
from collections import defaultdict
lb = pickle.load(open("classifier_data/label_binarizer.pkl", "rb"))
keywords, data = pickle.load(open('histo... | bsd-3-clause | 9,145,541,070,463,397,000 | 44.889474 | 192 | 0.596169 | false | 3.13746 | false | false | false |
natasha/natasha | natasha/grammars/date.py | 1 | 1718 |
from yargy import (
rule,
and_, or_
)
from yargy.interpretation import fact
from yargy.predicates import (
eq, gte, lte, length_eq,
dictionary, normalized,
)
Date = fact(
'Date',
['year', 'month', 'day']
)
class Date(Date):
@property
def obj(self):
from natasha import obj
... | mit | 4,548,516,221,527,272,000 | 13.566372 | 56 | 0.5 | false | 2.729685 | false | false | false |
ondrejSkowronek/django-is-core | is_core/main.py | 3 | 15384 | from __future__ import unicode_literals
import sys
from django.conf.urls import patterns as django_patterns
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext_lazy as _
from django.utils.datastructures import SortedDict
from django... | lgpl-3.0 | 8,196,055,735,090,066,000 | 33.262806 | 119 | 0.618565 | false | 3.76045 | false | false | false |
ericmjl/bokeh | bokeh/protocol/messages/ack.py | 1 | 2192 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 1,816,999,553,635,362,000 | 32.723077 | 78 | 0.270073 | false | 8.058824 | false | false | false |
sandvine/sandvine-nfv-descriptors | attic/rift/cc_vnfd/scripts/cc_initial_configuration.py | 1 | 2772 | #!/usr/bin/env python
import argparse
import logging
import os
import subprocess
import sys
import time
from pysvapi.elementdriver.sshdriver import sshdriver
import yaml
import re
def get_vnfr(yaml_cfg,name):
for index, vnfr in yaml_cfg['vnfr'].items():
if name in vnfr['name']:
return vnfr
... | apache-2.0 | -111,797,477,274,206,770 | 28.489362 | 125 | 0.61075 | false | 3.553846 | false | false | false |
dfm/ketu | ketu/k2/photometry.py | 1 | 5161 | # -*- coding: utf-8 -*-
from __future__ import print_function, division
__all__ = ["run"]
import os
import numpy as np
from scipy.ndimage.measurements import label
try:
from astropy.io import fits
from astropy.wcs import WCS
except ImportError:
fits = None
from ..cdpp import compute_cdpp
def run(fn, ... | mit | 2,955,142,583,400,454,000 | 32.083333 | 79 | 0.524511 | false | 3.209577 | false | false | false |
thatch/makerspace-auth | software/authbox/api.py | 2 | 7074 | # Copyright 2017-2018 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 by applicable law... | apache-2.0 | -9,123,795,502,323,515,000 | 32.211268 | 90 | 0.604184 | false | 3.882547 | true | false | false |
acrsilva/animated-zZz-machine | estudio_sueno_app/v1/estudio_sueno.py | 2 | 11255 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
sys.path.insert(0, '../lib')
import matplotlib.pyplot as plt
from PyQt4.uic import loadUiType
from pyqtgraph.Qt import QtCore, QtGui
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from PyQt4.QtCore import *
fro... | lgpl-3.0 | 5,265,500,167,069,548,000 | 39.446043 | 198 | 0.628869 | false | 3.13029 | false | false | false |
EmreAtes/spack | lib/spack/spack/cmd/repo.py | 1 | 6361 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 2,386,810,178,472,994,300 | 34.338889 | 78 | 0.636221 | false | 3.871576 | true | false | false |
vrjuggler/maestro | maestro/daemon/plugins/services/SettingsService.py | 2 | 9528 | # Maestro is Copyright (C) 2006-2008 by Infiscape Corporation
#
# Original Author: Aron Bierbaum
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your ... | gpl-2.0 | -7,393,623,199,281,521,000 | 36.07393 | 90 | 0.597607 | false | 3.815779 | false | false | false |
ruuk/service.xbmc.tts | service.py | 1 | 20315 | import sys, re, xbmc, xbmcgui, time, Queue
import json
from lib import util, addoninfo
T = util.T
__version__ = util.xbmcaddon.Addon().getAddonInfo('version')
util.LOG(__version__)
util.LOG('Platform: {0}'.format(sys.platform))
from lib import backends
from lib import windows
from lib.windows import playerstatus, not... | gpl-2.0 | 7,055,414,593,620,678,000 | 36.34375 | 180 | 0.593601 | false | 4.019588 | false | false | false |
kooksee/firmSpyder | mycrawler/mycrawler/dbUtil.py | 1 | 1279 | # encoding=utf-8
import pymongo
import settings
import commands
class DbUtil(object):
def conn(self):
self.client = pymongo.MongoClient(settings.MONGO_URI)
self.db = self.client[settings.MONGO_DATABASE]
return self
def collection(self, colName=None):
if not colName:
... | gpl-2.0 | -8,471,718,507,162,334,000 | 27.613636 | 171 | 0.608419 | false | 3.449315 | false | false | false |
matthieucan/quebec-monitoring | scripts/dns.py | 1 | 2087 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
DNS = {
# Cogeco Cable (Trois-rivieres)
'cogeco.ca': ['205.151.69.200','205.151.68.200'],
# Videotron.CA
'videotron.ca': ['205.151.222.250', '205.151.222.251'],
# Colbanet
'colba.net': ['69.28.239.8', '69.28.239.9'],
}
template_host... | agpl-3.0 | 3,111,017,794,614,174,700 | 27.202703 | 77 | 0.431241 | false | 3.893657 | false | false | false |
nextgis/ngw_external_api_python | tests/client.py | 1 | 4082 | # -*- coding: utf-8 -*-
"""
Simple ngw client
Usage:
from ngw_api.tests import client
reload(client)
client.connect()
client.enable_logging()
ngw_root_group = client.get_resource(0)
"""
import os
import sys
import json
from ngw_api.core.ngw_connection_settings import NGWConnectionSettings
from ngw_api.core.ngw_con... | gpl-2.0 | -1,122,308,493,687,955,800 | 24.835443 | 101 | 0.679569 | false | 3.332245 | false | false | false |
saullocastro/pyNastran | pyNastran/op2/tables/oes_stressStrain/real/oes_gap.py | 1 | 8744 | from __future__ import (nested_scopes, generators, division, absolute_import,
print_function, unicode_literals)
from itertools import count
import numpy as np
from numpy import zeros, searchsorted, ravel
from pyNastran.op2.tables.oes_stressStrain.real.oes_objects import StressObject, OES_Object... | lgpl-3.0 | -6,164,604,055,623,525,000 | 42.287129 | 160 | 0.552951 | false | 3.251766 | false | false | false |
mirzasany/mirza | plugin.video.jagobd/default.py | 2 | 7847 | import xbmc, xbmcgui, xbmcplugin
import urllib2,urllib,cgi, re
import urlparse
import HTMLParser
import xbmcaddon
from dirCreator import parseList;
from TurlLib import getURL;
import traceback
REMOTE_DBG=False;
if REMOTE_DBG:
# Make pydev debugger works for auto reload.
# Note pydevd module nee... | gpl-2.0 | -2,094,810,680,722,070,800 | 27.723485 | 167 | 0.587741 | false | 3.312368 | false | false | false |
franckinux/my-own-little-business | molb/views/batch.py | 1 | 5652 | from aiohttp.web import HTTPFound
from aiohttp.web import HTTPMethodNotAllowed
from aiohttp_babel.middlewares import _
import aiohttp_jinja2
from asyncpg.exceptions import IntegrityConstraintViolationError
from datetime import datetime
from datetime import time
from wtforms import BooleanField
from wtforms import DateF... | agpl-3.0 | 1,354,908,150,168,755,700 | 38.041667 | 91 | 0.582177 | false | 4.004274 | false | false | false |
CCI-Tools/sandbox | notebooks/Marco/time_series_h5py.py | 1 | 4216 | import h5py
import os
import numpy
from datetime import datetime
DIR = "/hdd/home/marcoz/EOData/ccitbx/sst_many"
# FILE_GLOB = "*-ESACCI-L3C_AEROSOL-AER_PRODUCTS-AATSR-ENVISAT-ADV_MOTNHLY-v2.30.nc"
# file_paths = "%s/%s" % (DIR, FILE_GLOB)
#
# file_path = "" # TODO
var_name = 'analysed_sst'
longitude = 0
latitude = 0
... | gpl-3.0 | 5,774,052,924,728,988,000 | 32.19685 | 93 | 0.57519 | false | 2.901583 | false | false | false |
cloudera/hue | desktop/libs/indexer/src/indexer/api3.py | 2 | 25066 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 5,490,776,219,501,456,000 | 32.376831 | 135 | 0.627982 | false | 3.678603 | false | false | false |
rspavel/spack | var/spack/repos/builtin/packages/audit-userspace/package.py | 5 | 1047 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class AuditUserspace(AutotoolsPackage):
"""Linux audit userspace"""
homepage = "https://git... | lgpl-2.1 | 3,770,891,196,189,766,700 | 40.88 | 95 | 0.7383 | false | 2.643939 | false | false | false |
A-Beck/AINegotiaor | mra8kf.py | 1 | 1464 | from negotiator_base import BaseNegotiator
from random import random, shuffle
class Negotiator(BaseNegotiator):
def __init__(self):
super().__init__()
self.opponent_utility = 0
def make_offer(self, offer):
if self.offer == [] or self.offer is None:
self.offer = self.prefe... | mit | -6,007,388,517,757,243,000 | 30.847826 | 111 | 0.570355 | false | 4.010959 | false | false | false |
kool79/intellij-community | python/helpers/pydev/pydevd_attach_to_process/winappdbg/win32/dbghelp.py | 88 | 46488 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Mario Vilas
# 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... | apache-2.0 | 1,463,504,645,138,748,000 | 35.54717 | 118 | 0.623516 | false | 3.612121 | false | false | false |
bygreencn/DIGITS | digits/download_data/cifar10.py | 8 | 4048 | # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
import cPickle
import os
import tarfile
import PIL.Image
from downloader import DataDownloader
class Cifar10Downloader(DataDownloader):
"""
See details about the CIFAR10 dataset here:
http://www.cs.toronto.edu/~kriz/cifar.html
"""
... | bsd-3-clause | -7,906,837,108,074,837,000 | 37.923077 | 113 | 0.557806 | false | 3.840607 | false | false | false |
nizox/circuits | circuits/io/file.py | 3 | 5967 | """File I/O
This module implements a wrapper for basic File I/O.
"""
try:
from os import O_NONBLOCK
except ImportError:
# If it fails, that's fine. the fcntl import
# will fail anyway.
pass
from collections import deque
from os import read as fd_read
from os import write as fd_write
from sys import g... | mit | -2,646,820,916,909,269,000 | 27.550239 | 77 | 0.548852 | false | 4.056424 | false | false | false |
malinoff/amqproto | examples/tutorial/4_routing/asyncio/receive_logs_direct.py | 1 | 1504 | #!/usr/bin/env python3
import sys
import asyncio
from async_generator import aclosing
from amqproto.adapters.asyncio_adapter import AsyncioConnection, run
async def main():
try:
async with AsyncioConnection(host='localhost') as connection:
async with connection.get_channel() as channel:
... | apache-2.0 | -907,980,896,986,109,700 | 35.682927 | 90 | 0.539229 | false | 4.516517 | false | false | false |
pentie/mini-smart-pdns | pdns-pipe.py | 1 | 2548 | #!/usr/bin/python3 -u
import sys
from os.path import realpath,dirname,join,exists
py_pdns = join(dirname(realpath(__file__)), "pdns-remotebackend-python/src")
if exists(py_pdns):
sys.path.insert(0, py_pdns)
import pdns.remotebackend, pdns.remotebackend.unix
from smart_pdns import StaticDomain,DynamicDomain,ISPSma... | mit | -2,994,055,183,629,293,000 | 41.2 | 118 | 0.616904 | false | 2.713826 | false | false | false |
HRODEV/Frequency | Frequency/Helpers/popup.py | 1 | 3613 | import pygame
class Popup:
def __init__(self, screen,
content='',
width=1000,
height=640,
x=0,
y=0,
backgroundColor=(0, 0, 0),
textColor=(255, 255, 255),
fontSize=24,
... | mit | -5,723,525,522,665,464,000 | 33.390476 | 118 | 0.565494 | false | 4.184241 | false | false | false |
clburlison/vendored | code/vendir/hash_helper.py | 1 | 1058 | """
Functions for hashing a file.
This has been completely lifted from Munki3.munkilib.munkihash
"""
import hashlib
import os
def gethash(filename, hash_function):
"""
Calculate the hashvalue of the given file with the given hash_function.
Args:
filename: The file name to calculate the hash value... | mit | -589,762,721,457,377,400 | 23.045455 | 76 | 0.649338 | false | 3.805755 | false | false | false |
RoboAndie/django-countable-field | countable_field/widgets.py | 1 | 2736 | from django import VERSION
from django.forms import widgets
from django.utils.safestring import mark_safe
class CountableWidget(widgets.Textarea):
class Media:
js = ('countable_field/js/scripts.js',)
css = {
'all':
('countable_field/css/styles.css',)
}
def ... | mit | -6,224,276,844,594,130,000 | 41.75 | 104 | 0.5625 | false | 3.948052 | false | false | false |
wiki-ai/revscoring | tests/scoring/statistics/classification/tests/test_rates.py | 2 | 2623 | import json
from revscoring.scoring.statistics.classification.counts import Counts
from revscoring.scoring.statistics.classification.rates import Rates
COUNTS = Counts(
[True, False],
[({'prediction': True}, True)] * 10 +
[({'prediction': True}, False)] * 20 +
[({'prediction': False}, False)] * 30 +
... | mit | -4,885,118,230,373,170,000 | 38.742424 | 72 | 0.58902 | false | 3.658298 | false | false | false |
bowen0701/algorithms_data_structures | lc0063_unique_paths_ii.py | 1 | 1954 | """Leetcode 63. Unique Paths II.
Medium
URL: https://leetcode.com/problems/unique-paths-ii/
A robot is located at the top-left corner of a m x n grid
(marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time.
The robot is trying to reach the bottom-right corner of the... | bsd-2-clause | 5,681,330,167,500,189,000 | 24.051282 | 74 | 0.534289 | false | 3.146538 | false | false | false |
ademariag/kapitan | tests/test_remote_inventory.py | 1 | 8309 | import os
import sys
import unittest
import tempfile
from shutil import rmtree, copytree
from distutils.dir_util import copy_tree
from kapitan.cached import reset_cache
from kapitan.cli import main
import yaml
from kapitan.resources import yaml_load
import json
from kapitan.dependency_manager.base import (
fetch_gi... | apache-2.0 | 4,792,637,988,920,530,000 | 35.442982 | 155 | 0.569383 | false | 3.773388 | true | false | false |
ngovindaraj/Udacity_Projects | Data_Wrangling/sample.py | 1 | 1086 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import xml.etree.cElementTree as ET # Use cElementTree or lxml if too slow
OSM_FILE = "san-francisco.osm"
SAMPLE_FILE = "san-francisco_sample.osm"
k = 150 # Parameter: take every k-th top level element
def get_element(osm_file, tags=('node', 'way', 'relation')):
... | mit | -7,821,767,032,447,718,000 | 30.028571 | 123 | 0.635359 | false | 3.321101 | false | false | false |
jphnoel/udata | udata/commands/__init__.py | 1 | 5102 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import os
import sys
from os.path import join, dirname, splitext, basename
from glob import iglob
from flask_script import Manager
from flask_script.commands import Clean, ShowUrls, Server
from udata.app import create_app, standalone
# ... | agpl-3.0 | 2,364,811,835,421,255,000 | 27.032967 | 79 | 0.623089 | false | 3.765314 | false | false | false |
RyanDJLee/pyta | nodes/Arguments.py | 2 | 1319 | """
Arguments astroid node
The arguments for a function.
Attributes:
- args (List[arg])
- A list of non-keyword argument names. If None, args is an empty list.
- defaults (List[Node])
- A list of default values for arguments that can be passed
positionally. If None, defau... | gpl-3.0 | -4,447,303,254,135,631,000 | 35.638889 | 80 | 0.560273 | false | 3.517333 | false | false | false |
bundgus/python-playground | socketserver-playground/socketserver-test.py | 1 | 1201 | from time import sleep
import socket
import sys
i = 0
def getMessage():
global i
if i == 255:
i = 0
i += 1
print('returning byte: ' + str(i))
return bytes([i])
HOST = '' # Symbolic name meaning all available interfaces
PORT = 9999 # Arbitrary non-privileged port
s = socket.socket(soc... | mit | 5,907,041,865,194,966,000 | 21.240741 | 99 | 0.642798 | false | 3.461095 | false | false | false |
super7ramp/vertaal | rpc/models.py | 2 | 1226 | # -*- coding: utf-8 -*-
"""Copyright (c) 2012 Sergio Gabriel Teves
All rights reserved.
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... | gpl-3.0 | 2,468,637,781,788,730,400 | 33.085714 | 69 | 0.696574 | false | 3.879747 | false | false | false |
webmedic/booker | src/plugins/guess_google/__init__.py | 1 | 1522 | import os, sys, urllib.request, urllib.error, urllib.parse
import datetime
import gdata.books.service
from metadata import BookMetadata
from pluginmgr import Guesser
google_books = gdata.books.service.BookService()
class GoogleGuesser(Guesser):
name = "Google Books"
def can_guess(self, book):
return ... | mit | -2,708,561,382,283,082,000 | 39.052632 | 91 | 0.536137 | false | 4.047872 | false | false | false |
selenized/scipy-thermo-eos | clausius/tests/test_mix.py | 2 | 3094 | # -*- coding: utf-8 -*-
"""
Unit tests for the Mixture class
"""
import collections
import numpy as np
from clausius import Mixture, MixError
from numpy.testing import (TestCase, assert_raises, assert_, assert_equal,
run_module_suite)
from _ts_data import hydrocarbon_testmix, malformed_test... | unlicense | 1,586,172,244,991,074,800 | 33 | 88 | 0.535553 | false | 3.644287 | true | false | false |
clubcapra/Ibex | src/seagoatvision_ros/scripts/CapraVision/client/gtk/filters/implementation/WinMTI880.py | 1 | 6077 | #! /usr/bin/env python
# Copyright (C) 2012 Club Capra - capra.etsmtl.ca
#
# This file is part of CapraVision.
#
# CapraVision 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 versio... | gpl-3.0 | -1,074,703,425,347,096,700 | 38.986842 | 74 | 0.652625 | false | 3.299131 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.