repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
paalge/scikit-image
skimage/draw/tests/test_draw.py
1
30229
from numpy.testing import assert_array_equal, assert_equal, assert_raises, \ assert_almost_equal import numpy as np from skimage._shared.testing import test_parallel from skimage.draw import (set_color, line, line_aa, polygon, polygon_perimeter, circle, circle_perimeter, circle_perimeter_...
bsd-3-clause
-6,287,617,031,671,260,000
33.906467
95
0.38645
false
2.064399
true
false
false
rezoo/chainer
examples/static_graph_optimizations/cifar/train_cifar_custom_loop.py
1
5414
"""CIFAR example with static subgraph optimizations. This is a version of the Chainer CIFAR example that has been modified to support the static subgraph optimizations feature. Note that the code is mostly unchanged except for the addition of the `@static_graph` decorator to the model chain's `__call__()` method. Thi...
mit
-5,925,498,630,314,898,000
38.518248
79
0.612117
false
4.01037
true
false
false
mattjhayes/nmeta
nmeta/baseclass.py
1
3293
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
-772,745,715,622,030,500
39.158537
76
0.624051
false
4.315858
true
false
false
jakobj/nest-simulator
pynest/examples/twoneurons.py
6
2672
# -*- coding: utf-8 -*- # # twoneurons.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ...
gpl-2.0
8,742,777,730,280,329,000
30.809524
79
0.602545
false
4.175
false
false
false
xurble/FeedThing
feedthing/settings_server_example.py
1
1398
import os SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) ALLOWED_HOSTS = ['localhost'] # change this to your servers domain FEEDS_SERVER = 'https://example.com/' # change this to where you are running - it's in the user agent string used when polling sites FEEDS_CLOUDFLARE_WORKER = None # You will nee...
mit
8,047,012,714,879,576,000
40.117647
145
0.610157
false
3.926966
false
false
false
joyxu/kernelci-backend
app/models/tests/test_defconfig_model.py
1
5980
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
agpl-3.0
4,970,841,871,047,545,000
40.527778
77
0.615385
false
3.7375
true
false
false
javidgon/dookio
server/src/server.py
1
4802
import os import redis import requests import json from werkzeug.wrappers import Request, Response from src.utils import (fetch_apps, contact_nodes, was_applied, exist_application, add_app_to_webserver_routing, ...
mit
-7,947,853,317,819,878,000
39.694915
78
0.532486
false
4.568982
false
false
false
DanePubliczneGovPl/ckanext-danepubliczne
ckanext/danepubliczne/schema/article.py
1
4861
import re import ckan.plugins as p import ckan.plugins.toolkit as tk import ckan.logic.auth as auth from ckan.common import _ class Article(p.SingletonPlugin, tk.DefaultDatasetForm): ''' Dataset type handling articles ''' p.implements(p.ITemplateHelpers) # Helpers for templates _PACKAGE_TYPE = ...
agpl-3.0
-2,679,612,956,739,913,700
29.968153
95
0.603168
false
3.891914
false
false
false
anchore/anchore-engine
tests/unit/anchore_engine/services/policy_engine/engine/test_vulnerability_matches.py
1
16014
import pytest import copy import datetime from anchore_engine.db.entities.policy_engine import ( FixedArtifact, Vulnerability, VulnerableArtifact, ImagePackageVulnerability, ImagePackage, Image, DistroTuple, DistroNamespace, DistroMapping, ) from anchore_engine.subsys import logger ...
apache-2.0
-3,932,605,720,874,548,700
29.855491
154
0.675846
false
2.941047
true
false
false
ashwith/workshopfiles
python/code/radioactivity.py
1
3022
# # Copyright (c) 2013 Ashwith Jerome Rego # # 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 ...
gpl-3.0
7,523,910,302,151,611,000
33.735632
87
0.625083
false
3.839898
false
false
false
thomasgibson/firedrake-hybridization
compressible_examples/sk_nonlinear.py
1
7534
from gusto import * import itertools from firedrake import (as_vector, SpatialCoordinate, PeriodicIntervalMesh, ExtrudedMesh, exp, sin, Function, FunctionSpace, VectorFunctionSpace, BrokenElement) from firedrake.petsc import PET...
mit
3,148,641,974,101,727,000
30.132231
79
0.543005
false
3.528806
true
false
false
c3nav/c3nav
src/c3nav/mapdata/render/engines/openscad.py
1
17896
import math from abc import ABC, abstractmethod from collections import UserList from operator import attrgetter from shapely import prepared from shapely.geometry import JOIN_STYLE, MultiPolygon from shapely.ops import unary_union from c3nav.mapdata.render.engines import register_engine from c3nav.mapdata.render.eng...
apache-2.0
5,166,118,962,549,087,000
49.269663
118
0.531515
false
4.470647
false
false
false
auduny/home-assistant
homeassistant/components/rainmachine/sensor.py
4
2585
"""This platform provides support for sensor data from RainMachine.""" import logging from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import ( DATA_CLIENT, DOMAIN as RAINMACHINE_DOMAIN, OPERATION_RESTRICTIONS_UNIVERSAL, SENSOR_UPDATE_TOPIC, ...
apache-2.0
4,025,846,147,999,986,000
29.05814
78
0.635977
false
4.077287
false
false
false
jardiacaj/finem_imperii
organization/views/heir.py
1
1805
from django.contrib import messages from django.shortcuts import get_object_or_404, redirect from django.views.decorators.http import require_POST from character.models import Character from organization.models.capability import Capability from organization.views.proposal import capability_success from organization.vi...
agpl-3.0
-6,983,427,591,600,242,000
33.711538
75
0.695845
false
3.808017
false
false
false
symmetricapi/django-symmetric
symmetric/functions.py
1
12865
import datetime from django.conf import settings from django.db import models from django.utils import timezone def underscore_to_camel_case(string): words = [word.capitalize() for word in string.split('_')] words[0] = words[0].lower() return ''.join(words) def camel_case_to_underscore(string): wor...
mit
7,195,248,395,000,181,000
37.517964
158
0.550175
false
4.285476
false
false
false
reiaaoyama/exabgp
lib/exabgp/dep/cmd2.py
7
63933
"""Variant on standard library's cmd with extra features. To use, simply import cmd2.Cmd instead of cmd.Cmd; use precisely as though you were using the standard library's cmd, while enjoying the extra features. Searchable command history (commands: "hi", "li", "run") Load commands from file, save to file, edit comman...
bsd-3-clause
-3,257,221,394,057,746,400
39.033187
239
0.56262
false
4.104848
true
false
false
petrushev/gettornado
src/gettornado/http.py
1
1442
import zlib from urllib import urlencode from StringIO import StringIO from gzip import GzipFile from PyQt5.QtCore import pyqtSignal, QObject, QUrl, pyqtSlot from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest def decodeData(data, headers): encoding = headers.get('Content-Encoding', None) if ...
gpl-3.0
4,849,590,899,934,975,000
23.033333
66
0.637309
false
3.855615
false
false
false
openstack-dev/grenade
tools/generate-grenade-plugins-list.py
1
1963
#! /usr/bin/env python # Copyright 2016 Hewlett Packard Enterprise Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
apache-2.0
-916,719,589,163,870,100
29.2
89
0.712175
false
3.731939
false
false
false
WillBickerstaff/sundial
lib/gui/about.py
1
2387
''' Created on 1 Sep 2012 @author: will ''' from Tkinter import (Label, Frame, Scrollbar, Entry, N, S, E, W, DISABLED, VERTICAL, Button, LEFT, ACTIVE, FLAT) import tkFont from tkSimpleDialog import Dialog license_text = ''' The MIT License (MIT) ===================== Permission is hereby granted...
mit
-1,381,779,866,263,614,000
40.155172
78
0.644323
false
3.971714
false
false
false
willforde/python-htmlement
examples.py
1
7032
#!/usr/bin/env python """ For more information, see: @see https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element @see https://docs.python.org/3/library/xml.etree.elementtree.html#xpath-support """ from __future__ import print_function, unicode_literals from htmlement import HTMLement...
mit
584,451,453,548,795,500
31.859813
109
0.585893
false
3.455528
false
false
false
kmpf/uap
include/subcommands/monitor_disk_io.py
1
7226
#!/usr/bin/env python # Run this tool in two stages: # # 1. Collect data: ./monitor-disk-io.py [command] # 2. Print statistics: ./monitor-disk-io.py # 3. $$$ # # The first command will run strace and write the output to # _monitor_disk_io/strace-out.txt. The second call (without any arguments) # will parse that file a...
gpl-3.0
-6,964,457,910,135,146,000
29.618644
77
0.457791
false
3.580773
false
false
false
Tsumiki-Chan/Neko-Chan
functions/logger.py
1
3475
import sys import sqlite3 import re import os import aiofiles from time import localtime, strftime import linecache from functions import botfunc import asyncio import global_vars from pprint import pprint def printtf(message): yield from print_to_file(message) async def print_to_file(message): # file = os.pa...
gpl-3.0
8,536,972,281,154,609,000
36.771739
161
0.574964
false
3.51365
false
false
false
cmaughan/synergy
ext/toolchain/ftputil.py
33
1544
# synergy -- mouse and keyboard sharing utility # Copyright (C) 2012 Synergy Si Ltd. # Copyright (C) 2010 Nick Bolton # # This package is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # found in the file LICENSE that should have accompanied this file. # # ...
gpl-2.0
-5,496,776,305,634,481,000
27.592593
73
0.689119
false
3.223382
false
false
false
davidsoncasey/quiver-server
plot_equation.py
1
3888
from __future__ import division import re from math import sqrt import multiprocessing import Queue import sympy import numpy as np import matplotlib.pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas class DiffEquation(object): ''' Class that contains equation informa...
mit
3,456,048,695,903,881,000
35.679245
100
0.513889
false
4.324805
false
false
false
Hans-Cyton/cyton_robot
cyton_servo_controllers/src/cyton_servo_controllers/joint_controller.py
2
8237
# -*- coding: utf-8 -*- # # Software License Agreement (BSD License) # # Copyright (c) 2010-2011, Antons Rebguns. # 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...
bsd-3-clause
-4,817,941,697,096,324,000
45.275281
166
0.70851
false
3.703687
false
false
false
timurbakibayev/trains
trains/urls.py
1
2077
"""trains URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
gpl-3.0
1,833,003,297,626,249,000
52.25641
120
0.658161
false
3.1
false
false
false
why2pac/dp-tornado
dp_tornado/helper/io/file/zip.py
1
1635
# -*- coding: utf-8 -*- import zipfile from dp_tornado.engine.helper import Helper as dpHelper class ZipHelper(dpHelper): def archive(self, destfile, srcfiles, mode='w', compression=zipfile.ZIP_STORED, allowZip64=False): archive = zipfile.ZipFile(file=destfile, mode=mode, compression=compression, allow...
mit
218,176,716,657,059,700
35.333333
113
0.640367
false
3.968447
false
false
false
inhumanitas/hghooks
build/lib/hghooks/__init__.py
2
3527
# Copyright (c) 2010 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of hghooks. # # hghooks is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License,...
lgpl-3.0
8,400,114,941,443,210,000
33.578431
77
0.575276
false
4.239183
false
false
false
raphaelvalentin/QTModel
UI_Widgets/QCursor/__init__.py
1
1437
from PyQt4 import QtCore, QtGui import Ui_Cursor class Ui_QCursorWindow(QtCore.QObject): valueChanged = QtCore.Signal(str, float) def setupUi(self, Form, data=[]): Form.setObjectName( ("Form")) Form.resize(900, 900) #self.centralwidget = QtGui.QWidget(Form) #self.centralwidge...
gpl-2.0
5,900,187,781,599,456,000
35.846154
154
0.654836
false
4.070822
false
false
false
jaumeg3/WebPractDjango
FilmRevolutionApp/migrations/0009_auto_20170521_1048.py
1
1477
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('FilmRevolutionApp', '0008_auto_20170521_1046'), ] operations = [ migrations.AlterField( ...
gpl-3.0
4,179,603,250,492,839,000
29.770833
74
0.544347
false
4.826797
false
false
false
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/paho/mqtt/matcher.py
2
2776
class MQTTMatcher(object): """Intended to manage topic filters including wildcards. Internally, MQTTMatcher use a prefix tree (trie) to store values associated with filters, and has an iter_match() method to iterate efficiently over all filters that match some topic name.""" class Node(obje...
gpl-2.0
3,540,635,674,852,173,300
34.589744
71
0.505403
false
4.769759
false
false
false
whausen/part
src/adhocracy/controllers/milestone.py
1
9009
from datetime import date, datetime, time import logging import formencode from formencode import htmlfill, Invalid, validators from pylons import request, tmpl_context as c from pylons.controllers.util import redirect from pylons.decorators import validate from pylons.i18n import _ from adhocracy import forms, mode...
agpl-3.0
-5,108,843,781,474,056,000
40.136986
79
0.615607
false
3.927201
false
false
false
albertaleksieiev/zpy
Zpy/storage/SuffixTree.py
1
1964
class SuffixTree: """ Suffix tree https://en.wikipedia.org/wiki/Suffix_tree """ def __init__(self, nodes): self.root = {"EOW":False, "next": {} } for node in nodes: self.addNode(node['word'], node['leaf_data']) def addNode(self,word, leaf_data): """ ...
mit
7,206,471,455,957,749,000
33.45614
113
0.440428
false
3.583942
false
false
false
PMBio/mtSet
mtSet/pycore/utils/simPhenoCore.py
1
2315
import sys sys.path.append('./../../..') from optparse import OptionParser import scipy as SP import os import mtSet.pycore.utils.simulator as sim from mtSet.pycore.utils.read_utils import readCovarianceMatrixFile from mtSet.pycore.utils.read_utils import readBimFile from mtSet.pycore.external.limix import plink_read...
apache-2.0
5,678,166,294,457,854,000
41.090909
264
0.713607
false
2.560841
false
false
false
Bolt64/my_code
euler/square_remainders.py
1
1168
#!/usr/bin/env python3 from fractions import gcd from time import sleep """ Use the frickin' binomial expansion. Problem solved. """ def get_cyclic_group(seed, modifier): current=seed+modifier cyclic_group=[1, current] mod=seed**2 counter=2 while True: if counter%2==0: next_el...
mit
-1,983,755,178,335,347,700
22.836735
62
0.596747
false
2.912718
false
false
false
perimosocordiae/sparray
bench/benchmarks/construction.py
1
1438
import numpy as np import scipy.sparse as ss from sparray import FlatSparray class Construction2D(object): def setup(self): num_rows, num_cols = 3000, 4000 self.spm = ss.rand(num_rows, num_cols, density=0.1, format='coo') self.arr = self.spm.A self.data = self.spm.data self.indices = self.spm.r...
mit
-3,325,464,078,937,303,000
27.76
79
0.685675
false
2.910931
false
false
false
xhava/hippyvm
hippy/module/spl/spl.py
2
43355
import os from hippy.builtin import (wrap_method, Optional, ThisUnwrapper, handle_as_exception, StreamContextArg, Nullable) from hippy.objects.instanceobject import W_InstanceObject from hippy.objects.intobject import W_IntObject from hippy.objects.resources.file_resource import W_FileResource from hippy.objects.re...
mit
-7,211,609,275,790,048,000
31.969582
87
0.637597
false
3.407073
false
false
false
maxplanck-ie/Megamapper
mpileup_VCF.py
1
13822
#!/usr/bin/env python """ Creates a mpileup file from a bam file and a reference. usage: %prog [options] -p, --input1=p: bam file -o, --output1=o: Output pileup -R, --ref=R: Reference file type -n, --ownFile=n: User-supplied fasta reference file -d, --dbkey=d: dbkey of user-supplied file -x, --index...
bsd-3-clause
6,976,894,021,865,176,000
50.962406
473
0.638403
false
3.493933
false
false
false
mementum/backtrader
backtrader/stores/vchartfile.py
1
2700
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015-2020 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-3.0
-3,481,570,702,733,509,000
30.034483
79
0.572593
false
4.251969
false
false
false
christophevg/codecanvas
src/codecanvas/instructions.py
1
17240
# instructions.py # abstract instruction set, implemented as Code # author: Christophe VG from util.check import isstring, isidentifier from util.visitor import visits, novisiting from util.types import TypedList, Any from codecanvas.base import Code, WithoutChildren, WithoutChildModification, List # Mixins cla...
bsd-3-clause
-544,667,000,444,343,700
30.633028
101
0.638399
false
3.627946
false
false
false
PatrickSpieker/ThePyStrikesBack
scrapers/journalscrapers.py
2
12546
# imports for class implementation import csv import itertools import logging import re import urllib2 from datetime import date from bs4 import BeautifulSoup from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support.ui import Select from exceptions ...
mit
2,909,259,211,513,953,300
35.15562
117
0.581301
false
3.958978
false
false
false
azogue/enerpi
tests/enerpiweb/test_webserver.py
1
9770
# -*- coding: utf-8 -*- """ ENERPIWEB tests - Routes """ from io import BytesIO import json import jsondiff import os import re from tests.conftest import TestCaseEnerpiWebServer class TestEnerpiWebServerRoutes(TestCaseEnerpiWebServer): # Enerpi test scenario: subpath_test_files = 'test_context_2probes' ...
mit
-7,385,280,991,985,692,000
49.621762
118
0.608393
false
3.538573
true
false
false
venth/aws-adfs
test/test_credential_process_json.py
1
1893
import datetime import json from aws_adfs import login from mock import patch class TestCredentialProcessJson: def setup_method(self, method): self.access_key = 'AKIAIOSFODNN7EXAMPLE' self.secret_key = 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY' self.session_token = 'AQoDYXdzEPT//////////...
mit
-6,768,541,995,889,286,000
45.170732
367
0.684628
false
2.953198
false
false
false
bewest/glucodump
glucodump/stream.py
1
3981
#!/usr/bin/python import sys, os import select, socket import usbcomm import usb _default_host = 'localhost' _default_port = 23200 _READ_ONLY = select.POLLIN | select.POLLPRI class Stream(object): def __init__(self, host=_default_host, port=_default_port): self.host = host self.port = por...
gpl-2.0
4,263,681,791,854,187,000
26.455172
95
0.581261
false
3.458732
false
false
false
dburdick/fhirbase
ql/__init__.py
1
4521
import re import os import sha import subprocess from . import prepr def getin(d, ks): for p in ks: if p not in d: return None d = d[p] return d def resolve(t): acc = dict(idx=dict(), guard=dict(), deps=[]) for k in t: if k not in acc['idx']: resolve_rec...
mit
-389,168,492,244,733,900
30.615385
147
0.588144
false
3.003987
false
false
false
golgoth31/pybroker
drivers/external/inputs.py
1
3092
# -*- coding: utf-8 -*- # pybroker # Copyright (c) 2016 David Sabatie <pybroker@notrenet.com> # # This file is part of Pybroker. # # Foobar 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
-7,790,567,582,930,434,000
34.54023
107
0.581177
false
4.122667
false
false
false
chapmanb/cwltool
cwltool/load_tool.py
1
11202
# pylint: disable=unused-import """Loads a CWL document.""" import logging import os import re import uuid import requests.sessions import schema_salad.schema as schema from avro.schema import Names from ruamel.yaml.comments import CommentedSeq, CommentedMap from schema_salad.ref_resolver import Loader, Fetcher, file...
apache-2.0
5,150,466,595,201,390,000
40.335793
118
0.577218
false
4.181411
false
false
false
neiesc/Problem-solving
Implementation/Sort Algorithms/timsort.py
1
2733
#!/bin/python3 # https://hackernoon.com/timsort-the-fastest-sorting-algorithm-youve-never-heard-of-36b28417f399 # https://pt.wikipedia.org/wiki/Timsort # based off of this code https://gist.github.com/nandajavarma/a3a6b62f34e74ec4c31674934327bbd3 # Brandon Skerritt # https://skerritt.tech def binary_search(the_array, ...
mit
-5,232,938,781,224,659,000
28.397849
96
0.587633
false
3.280912
false
false
false
krzysztof/invenio-pidrelations
invenio_pidrelations/api.py
1
9263
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015, 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your optio...
gpl-2.0
-7,715,778,306,867,326,000
33.823308
79
0.603476
false
4.490063
false
false
false
baiyubin/python_practice
StronglyConnectedComponents.py
2
1530
''' Created on Jun 22, 2013 @author: Yubin Bai All rights reserved. ''' def stronglyConnectedComponents(graph): DFS_WHITE = 0 dfsNum = {} # number of a node dfsLowNum = {} # lowest number met before this node dfsNumCounter = [0] dfsSCC = [] inStack = set() for v in graph: dfsNu...
apache-2.0
4,697,648,897,265,538,000
26.321429
79
0.503268
false
3.029703
false
false
false
jlmadurga/listenclosely
listenclosely/models.py
1
7496
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django_fsm import FSMField, transition from django.utils.encoding import python_2_unicode_compatible from listenclosely import managers from django.utils.timezone import now import datetime class NoAgentF...
bsd-3-clause
-1,435,934,371,155,922,200
37.64433
117
0.562834
false
4.173719
false
false
false
Jacques-Florence/schedSim
src/analysis/temperature.py
1
1287
#!/usr/bin/env python import matplotlib.pyplot as plt import sys filename = "reports/configuration.conftemperatureReport.txt" if (len(sys.argv) > 1): filename = sys.argv[1] with open(filename) as f: print f.readline() time = [] temp = [] for line in f: entry = line.split(":") #if (float(entry[0]) > 90000000)...
bsd-3-clause
5,558,092,028,682,520,000
17.385714
60
0.624709
false
2.34854
false
false
false
yeatmanlab/BrainTools
projects/NLR_MEG/summer_interv_session2.py
1
12224
# -*- coding: utf-8 -*- # Authors: Sung Jun Joo; Jason Yeatman; Kambiz Tavabi <ktavabi@gmail.com> # # # License: BSD (3-clause) import numpy as np import mnefun import os #import glob os.chdir('/home/sjjoo/git/BrainTools/projects/NLR_MEG') from score import score from nlr_organizeMEG_mnefun import nlr_organizeMEG_mne...
bsd-3-clause
-1,400,178,077,217,708,300
41.297578
113
0.600213
false
2.772511
false
false
false
mendax-grip/cfdemUtilities
couette/averageRadialScalar.py
2
2000
# This program averages a variable for each value of r for each files specified by the user # This program must be launched from the main folder of a case from which you can access ./CFD/ and ./voidfraction/ # A FOLDER ./voidfraction/averaged must exist! # Author : Bruno Blais # Last modified : 15-01-2014 #Python i...
lgpl-3.0
788,407,417,079,574,300
21.727273
116
0.6045
false
3.125
false
false
false
gborri/SickRage
sickrage/providers/torrent/elitetorrent.py
1
5577
# coding=utf-8 # Author: CristianBB # # URL: https://sickrage.ca # # This file is part of SickRage. # # SickRage 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 o...
gpl-3.0
3,331,113,339,922,290,700
34.987097
135
0.565896
false
4.018012
false
false
false
victor-o-silva/db_file_storage
demo_and_tests/model_filefields_example/migrations/0001_initial.py
1
2942
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-17 18:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Book',...
mit
4,143,665,049,642,220,500
41.028571
172
0.557784
false
4.437406
false
false
false
brownian/frescobaldi
frescobaldi_app/midiinput/widget.py
2
7812
""" MIDI input controls """ import weakref from PyQt5.QtCore import QSettings, Qt from PyQt5.QtWidgets import (QCheckBox, QComboBox, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QRadioButton, QToolButton, QVBoxLayout, QWidget) import app import midiinput ...
gpl-2.0
5,464,379,933,306,593,000
35.849057
106
0.610215
false
3.945455
false
false
false
chop-dbhi/arrc
learn/wrangle.py
1
1775
__author__ = 'Aaron J. Masino' import numpy as np def extractBy(condition, data, tol = 1e-6): not_condition = condition[:]==False return (data[condition], data[not_condition]) def partion(condition, data, ratios=[.6,.2,.2]): ''' returns two lists (l1,l2). l1 is a list of numpy arrays where each array con...
mit
-3,090,557,369,432,531,500
38.466667
131
0.616338
false
3.018707
false
false
false
teamworkquality/twq-app
api/companies/migrations/0002_auto_20171119_1938.py
1
2047
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-19 19:38 from __future__ import unicode_literals import django.contrib.auth.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('users...
mit
-7,012,980,200,005,701,000
34.293103
187
0.560332
false
4.291405
false
false
false
shanot/imp
modules/em/test/test_origin_spacing.py
2
2797
import os import IMP import IMP.em import IMP.test import IMP.core class Tests(IMP.test.TestCase): """Class to test EM correlation restraint""" def test_origin_spacing_data_is_kept_in_mrc_format1(self): scene = IMP.em.read_map(self.get_input_file_name("in.mrc"), self.mrw) scene.set_origin(-1...
gpl-3.0
-7,092,655,008,620,478,000
37.847222
77
0.614587
false
2.991444
true
false
false
anomitra/articleScraper
PyQt-gpl-5.4.1/examples/animation/moveblocks.py
2
8146
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
-7,652,856,938,194,048,000
33.961373
80
0.677019
false
3.667717
false
false
false
djurodrljaca/salamander-alm
client/unittests/ut_user_management.py
1
8634
""" Salamander ALM Copyright (c) 2016 Djuro Drljaca This Python module 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 Python module ...
gpl-2.0
-5,142,175,285,237,491,000
35.740426
101
0.564281
false
4.457408
true
false
false
163gal/Time-Line
libs_arm/wx/tools/XRCed/plugins/wxlib.py
6
1610
# Name: wxlib.py # Purpose: Component plugins for wx.lib classes # Author: Roman Rolinsky <rolinsky@femagsoft.com> # Created: 05.09.2007 # RCS-ID: $Id$ import xh_wxlib from wx.tools.XRCed import component, params from wx.tools.XRCed.globals import TRACE from wx.lib.ticker_xrc import wxTi...
gpl-3.0
7,605,360,152,080,896,000
40.282051
96
0.649068
false
3.333333
false
false
false
django-oscar/django-oscar-stripe
setup.py
1
1109
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='django-oscar-stripe', version='0.1', url='https://github.com/tangentlabs/django-oscar-stripe', author="David Winterbottom", author_email="david.winterbottom@tangentlabs.co.uk", description="Stripe payment module...
bsd-3-clause
8,019,311,933,894,074,000
37.241379
82
0.611362
false
3.90493
false
false
false
cblop/tropic
instal-linux/instal/firstprinciples/incompleteinstitutions/TestIncompleteGrounding.py
1
2576
from instal.firstprinciples.TestEngine import InstalSingleShotTestRunner, InstalMultiShotTestRunner, InstalTestCase from instal.instalexceptions import InstalRuntimeError class IncompleteGrounding(InstalTestCase): def test_complete_grounding_solve(self): runner = InstalSingleShotTestRunner(input_files=["...
epl-1.0
3,374,918,661,383,116,000
55
120
0.680901
false
4.236842
true
false
false
ArcasProject/WheresMyField
library/serializers.py
1
2848
from library.models import Article, Author, Year, Label, Strategies, KeyWord from rest_framework import serializers class AuthorSerializer(serializers.HyperlinkedModelSerializer): papers_on_this_db = serializers.SerializerMethodField() class Meta: model = Author fields = "__all__" def ge...
mit
-2,835,192,520,253,170,000
33.731707
78
0.621138
false
4.415504
false
false
false
Yoctol/seq2vec
seq2vec/util/data_generator.py
1
1759
class DataGenterator(object): def __init__( self, train_file_path, generate_x, generate_y, predict_file_path=None, batch_size=128 ): self.train_file_path = train_file_path self.predict_file_path = train_file_path if predict_file_path is not None: s...
gpl-3.0
-2,943,728,817,002,458,000
33.490196
75
0.464468
false
4.386534
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/virtual_network_peering.py
1
4050
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-8,661,834,945,974,377,000
50.923077
104
0.66642
false
4.05
false
false
false
shenbai/tradesafe
org/tradesafe/bt/order.py
1
1854
# coding: utf-8 __author__ = 'tack' class Order(object): def __init__(self, code, num,hold_num, cost_price, market_price, commission, date, cmd): ''' Args: code: stock code cost_price: cost price market_price: market price commission: commission ...
mit
8,134,701,983,899,524,000
29.916667
260
0.542611
false
3.579151
false
false
false
jpalpant/jarvis-lab-rnaseq-flow
rnaseqflow/workflow.py
2
22041
""" Created on Dec 12, 2015 @author: justinpalpant Copyright 2015 Justin Palpant This file is part of the Jarvis Lab RNAseq Workflow program. RNAseq Workflow is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, eit...
gpl-3.0
9,199,470,783,824,311,000
30.98984
102
0.586952
false
4.270684
false
false
false
SteveMcGrath/Concord
site/app/views/admin.py
1
2428
from flask import render_template, flash, redirect, session, url_for, abort, g from flask.ext.login import login_user, logout_user, current_user, login_required from app import app, db, login_manager, forms from app.models import User, Ticket from common import display_errors @login_manager.user_loader def load_user(...
gpl-2.0
-7,936,594,103,518,559,000
32.736111
82
0.630972
false
3.729647
false
false
false
NifTK/NiftyNet
niftynet/layer/binary_masking.py
1
3700
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division import numpy as np import scipy.ndimage as ndimg from scipy.ndimage.morphology import binary_fill_holes as fill_holes from niftynet.layer.base_layer import Layer from niftynet.utilities.util_common import look_up_operations from ...
apache-2.0
-959,226,072,506,172,300
39.659341
79
0.567297
false
3.806584
false
false
false
SUNET/eduid-webapp
src/eduid_webapp/orcid/views.py
1
7848
# -*- coding: utf-8 -*- from flask import Blueprint, redirect, request, url_for from oic.oic.message import AuthorizationResponse, Claims, ClaimsRequest from six.moves.urllib_parse import urlencode from eduid_common.api.decorators import MarshalWith, UnmarshalWith, require_user from eduid_common.api.messages import ...
bsd-3-clause
2,024,243,273,847,922,200
40.52381
119
0.674312
false
3.30303
false
false
false
Aninstance/invoicing
invoicing/signals.py
1
8748
from django.dispatch import receiver from django.db.models.signals import post_save, pre_save from invoicing.models import * from haystack.management.commands import update_index from django.utils import timezone import invoicing.views as invoicing from invoicing import schedules from django.forms import ValidationErro...
gpl-3.0
2,832,531,829,811,774,500
52.668712
119
0.631573
false
4.263158
false
false
false
catapult-project/catapult
third_party/gsutil/third_party/oauth2client/tests/http_mock.py
21
4000
# Copyright 2014 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 or ...
bsd-3-clause
5,458,100,558,172,799,000
30.25
79
0.59125
false
4.469274
false
false
false
ebilionis/py-mcmc
demos/demo1.py
2
1495
""" This demo demonstrates how to train a GPy model using the pymcmc module. Author: Ilias Bilionis Date: 3/20/2014 """ import GPy import pymcmc as pm import numpy as np import matplotlib.pyplot as plt # Construct a GPy Model (anything really..., here we are using a regression # example) model = GPy.examp...
lgpl-3.0
6,326,718,548,425,373,000
32.977273
96
0.686288
false
3.559524
false
false
false
cmc333333/regulations-parser
regparser/layer/interpretations.py
1
2541
from collections import defaultdict from regparser.citations import Label from regparser.layer.layer import Layer from regparser.tree import struct from regparser.tree.interpretation import text_to_labels class Interpretations(Layer): """Supplement I (interpretations) provides (sometimes very lengthy) extra ...
cc0-1.0
-3,965,981,242,969,317,400
42.067797
78
0.611964
false
4.481481
false
false
false
cjaymes/pyscap
src/scap/collector/windows/ResolvePathFilenameCollector.py
1
12823
# Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP 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. # # PySCAP is ...
gpl-3.0
3,837,583,239,619,794,000
47.388679
167
0.537862
false
4.361565
false
false
false
demisto/content
Packs/MicrosoftAdvancedThreatAnalytics/Integrations/MicrosoftAdvancedThreatAnalytics/MicrosoftAdvancedThreatAnalytics.py
1
14791
import traceback from typing import Any, Dict, List, Tuple, Union import urllib3 from dateparser import parse from pytz import utc from requests_ntlm import HttpNtlmAuth import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * urllib3.disable_warnings() SEVERITY_TRANSLATIO...
mit
-3,743,627,044,597,745,700
41.502874
118
0.610844
false
4.139659
false
false
false
derak/directory.py
directory.py
1
5070
#!/usr/bin/python """LDAP Directory Management, wrapper for python-ldap (http://www.python-ldap.org). This module provides high level control over an LDAP Directory. Some code was originally built on examples available here: http://www.grotan.com/ldap/python-ldap-samples.html Copyright (c) 2014 Derak Berreyesa Perm...
mit
-1,881,307,883,944,796,000
34.957447
100
0.622485
false
3.846737
false
false
false
stefanseifert/redash
redash/query_runner/google_spreadsheets.py
8
5437
from base64 import b64decode import json import logging from dateutil import parser from redash.query_runner import * from redash.utils import JSONEncoder logger = logging.getLogger(__name__) try: import gspread from oauth2client.client import SignedJwtAssertionCredentials enabled = True except ImportErro...
bsd-2-clause
3,098,874,932,534,900,000
27.170984
165
0.594445
false
4.339186
false
false
false
imayhaveborkedit/discord.py
discord/__init__.py
1
3031
# -*- coding: utf-8 -*- """ Discord API Wrapper ~~~~~~~~~~~~~~~~~~~ A basic wrapper for the Discord API. :copyright: (c) 2015-2019 Rapptz :license: MIT, see LICENSE for more details. """ __title__ = 'discord' __author__ = 'Rapptz' __license__ = 'MIT' __copyright__ = 'Copyright 2015-2019 Rapptz' __version__ = '1.3....
mit
5,965,994,541,591,187,000
29.928571
85
0.758825
false
3.774595
false
false
false
csomerlot/RPiSmartThermostat
src/wallUnit.py
1
7692
#!/usr/bin/python import sys, os, time, urllib, datetime, socket, sched, threading basepath = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0] sys.path.append(basepath + '/libs/Adafruit_Python_CharLCD') import Adafruit_CharLCD as LCD sys.path.append(basepath + '/libs/requests') sys.path.append(basepath +...
mit
6,654,319,928,651,757,000
30.016129
117
0.546802
false
3.441611
false
false
false
apache/incubator-allura
Allura/allura/model/artifact.py
1
32531
# 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 (t...
apache-2.0
2,514,140,458,359,754,000
33.135362
155
0.590514
false
3.968163
true
false
false
mganeva/mantid
Framework/PythonInterface/plugins/algorithms/BASISDiffraction.py
1
25038
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-branches from __fu...
gpl-3.0
-5,616,242,651,998,437,000
45.366667
89
0.536465
false
4.428369
true
false
false
fxia22/ASM_xf
PythonD/site_python/Scientific/IO/PDB.py
2
42526
# This module handles input and output of PDB files. # # Written by Konrad Hinsen <hinsen@cnrs-orleans.fr> # Last revision: 2001-6-13 # """This module provides classes that represent PDB (Protein Data Bank) files and configurations contained in PDB files. It provides access to PDB files on two levels: low-level (line...
gpl-2.0
953,494,229,587,949,400
35.97913
79
0.563185
false
3.792224
false
false
false
epiphany27/NewsBlur
apps/reader/migrations/0006_folders_unique.py
18
13116
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'UserSubscriptionFolders', fields ['user'] db.create_unique('reader_usersubs...
mit
5,856,136,366,699,130,000
77.071429
163
0.56717
false
3.687377
false
false
false
BirkbeckCTP/janeway
src/core/homepage_elements/issue/plugin_settings.py
1
1919
from django.db.utils import OperationalError from django.contrib.contenttypes.models import ContentType PLUGIN_NAME = 'Current Issue' DESCRIPTION = 'This is a homepage element that renders featured current issues.' AUTHOR = 'Martin Paul Eve' def install(): import core.models as core_models import journal.mod...
agpl-3.0
-8,131,779,798,871,920,000
32.086207
85
0.638874
false
4.245575
false
false
false
xuxiao19910803/edx
common/lib/xmodule/xmodule/static_content.py
70
6702
# /usr/bin/env python """ This module has utility functions for gathering up the static content that is defined by XModules and XModuleDescriptors (javascript and css) """ import logging import hashlib import os import errno import sys from collections import defaultdict from docopt import docopt from path import path...
agpl-3.0
2,948,270,375,082,353,000
32.678392
135
0.644434
false
3.984542
false
false
false
chubbymaggie/miasm
miasm2/ir/symbexec_top.py
1
7620
from miasm2.ir.symbexec import SymbolicExecutionEngine, StateEngine from miasm2.expression.simplifications import expr_simp from miasm2.expression.expression import ExprId, ExprInt, ExprSlice,\ ExprMem, ExprCond, ExprCompose, ExprOp from miasm2.core import asmblock TOPSTR = "TOP" def exprid_top(expr): """Ret...
gpl-2.0
-4,532,542,140,521,507,000
33.479638
90
0.543045
false
3.746313
false
false
false
redcurrant/redcurrant
svc-monitor/contrib/rainx-monitor.py
1
1285
#!/usr/bin/python import sys import urllib2 RAINX_STAT_KEYS = [ ("rainx.reqpersec", "total_reqpersec"), ("rainx.reqputpersec", "put_reqpersec"), ("rainx.reqgetpersec", "get_reqpersec"), ("rainx.avreqtime", "total_avreqtime"), ("rainx.avputreqtime", "put_avreqtime"), ("rainx.avgetreqtime", "get_avreqtime"), ] ...
lgpl-3.0
2,449,744,074,121,119,000
24.7
59
0.542412
false
3.165025
false
false
false
gautam1858/tensorflow
tensorflow/contrib/rnn/python/kernel_tests/fused_rnn_cell_test.py
25
7408
# Copyright 2016 The TensorFlow 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 applica...
apache-2.0
7,840,838,567,654,228,000
43.626506
80
0.668467
false
3.878534
true
false
false
unreal666/outwiker
plugins/pagetypecolor/pagetypecolor/preferencepanel.py
3
2537
# -*- coding: UTF-8 -*- import wx from outwiker.core.application import Application from outwiker.core.events import PageDialogPageFactoriesNeededParams from outwiker.gui.preferences.baseprefpanel import BasePrefPanel from pagetypecolor.i18n import get_ from pagetypecolor.colorslist import ColorsList class Prefere...
gpl-3.0
191,321,534,753,112,540
30.126582
96
0.620984
false
3.824261
false
false
false
txt/evil
stats.py
1
1665
from __future__ import print_function, division from cols import * def cliffsDelta(lst1,lst2, dull = [0.147, # small 0.33, # medium 0.474 # large ][0] ): "Returns true if there are more than 'dull' differences" m, n = len(ls...
unlicense
-5,390,725,896,659,030,000
23.850746
65
0.506306
false
3.147448
false
false
false
leilihh/nova
nova/network/nova_ipam_lib.py
15
4277
# Copyright 2011 Nicira Networks, Inc # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-8,251,852,585,102,243,000
38.238532
78
0.609773
false
3.835874
false
false
false
lidavidm/mathics-heroku
mathics/core/definitions.py
1
13170
# -*- coding: utf8 -*- u""" Mathics: a general-purpose computer algebra system Copyright (C) 2011-2013 The Mathics Team 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 ver...
gpl-3.0
6,722,413,932,270,954,000
32.173804
90
0.575323
false
4.349406
false
false
false
endlessm/chromium-browser
third_party/catapult/telemetry/telemetry/__init__.py
1
2624
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A library for cross-platform browser tests.""" import os import sys try: # This enables much better stack upon native code crashes. import faulthandle...
bsd-3-clause
-1,831,805,396,973,461,500
34.945205
75
0.755716
false
3.153846
false
false
false
EDUlib/edx-platform
cms/djangoapps/contentstore/tasks.py
1
28335
""" This file contains celery tasks for contentstore views """ import base64 import json import os import pkg_resources import shutil import tarfile from datetime import datetime from tempfile import NamedTemporaryFile, mkdtemp import olxcleaner from ccx_keys.locator import CCXLocator from celery import shared_task f...
agpl-3.0
-1,813,413,675,217,657,000
38.13674
126
0.658726
false
4.165687
false
false
false
najmacherrad/master_thesis
DATA/DIDA/Modif_fasta.py
1
7499
# TRANSFORM fasta sequence after mutation # /Memoire/DIDAfasta # coding=utf-8 from numpy import * import petl as etl import operator import pandas as pd import re import csv #------------------------------------------------------------------------------- # Download and modify files from DIDA website #----------------...
mit
-8,691,030,830,536,997,000
38.26178
124
0.479531
false
3.35076
false
false
false
CORDEA/my-python-modules
send_gmail/send_gmail.py
1
1140
##!/usr/bin/env python # encoding:utf-8 # # Copyright 2014-2017 Yoshihiro Tanaka # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-7,518,351,877,246,057,000
26.804878
74
0.687719
false
3.433735
false
false
false