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
evilhero/mylar
mylar/mb.py
1
27511
# This file is part of Mylar. # # Mylar 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. # # Mylar is distributed in the hope that...
gpl-3.0
-6,026,704,201,314,912,000
47.434859
343
0.475955
false
4.714824
true
false
false
glenn-edgar/local_controller_3
irrigation_control_py3/ref/irrigation_ctrl_startup.py
3
64996
import datetime import time import string import urllib2 import math import redis import json import eto import py_cf import os import base64 import load_files import watch_dog class SprinklerQueueElementControl( ): def __init__(self,redis,io_control,alarm_queue,counter_devices): self.redis = ...
mit
4,540,945,076,651,094,500
42.301799
205
0.571051
false
3.385385
false
false
false
HeadCow/ARPS
report_crawler/crawler.py
1
1533
# -*- coding:utf-8 -*- from __future__ import print_function import os import time import shutil import traceback from report_crawler.spiders.__Global_function import get_localtime from report_crawler.spiders.__Global_variable import REPORT_SAVEDIR now_time = get_localtime(time.strftime("%Y-%m-%d", time.localtime()))...
mit
-6,852,349,848,664,271,000
25.894737
131
0.626223
false
2.647668
false
false
false
simpleton/eclipse2buck
build_secondary_dex_list.py
1
1471
#!/usr/bin/python import sys import os from eclipse2buck import decorator def check_force_flag(lines): for line in lines: tag = "plugin.build.force=" if line.startswith(tag): line = line.strip('\r\n') if (line[len(tag):] == "true"): return True ...
mit
-734,623,793,647,208,100
27.843137
75
0.548606
false
3.860892
false
false
false
jamesmfriedman/django-primer
primer/comments/templatetags/primer_comment_tags.py
1
4584
from django import template from django.template.loader import render_to_string from primer.utils import get_request from primer.comments.forms import CommentForm, StatusForm, TimelineForm, get_comment_form from primer.comments.utils import get_content_types_hash, get_content_types_list register = template.Library() ...
apache-2.0
-1,496,575,086,178,685,700
34.534884
201
0.665794
false
3.9213
false
false
false
ndexbio/ndex-enrich
similarity_map_utils.py
1
9365
from __future__ import division from ndex.networkn import NdexGraph import data_model as dm import operator from math import sqrt # TODO: only one edge between each pair of nodes. Take the best one. def create_similarity_map_from_enrichment_files(map_name, directory, e_set_name, min_subsumption, max_edges=3, ext_lin...
bsd-2-clause
3,672,040,321,551,617,000
51.027778
249
0.577256
false
3.687008
false
false
false
sserrot/champion_relationships
venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py
18
5058
import sys from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import List, Optional, Sequence # Shim to wrap setup.py invocation with setuptools # # We set sys.argv[0] to the path to the underlying setup.py file so # setuptools / distutils don't take the path to the setu...
mit
8,358,058,395,605,124,000
26.944751
77
0.602807
false
3.431479
true
false
false
rienafairefr/nYNABapi
pynYNAB/schema/Client.py
2
6165
import logging from functools import wraps from sqlalchemy import Column, String, ForeignKey, Integer from sqlalchemy.orm import relationship from sqlalchemy.orm import sessionmaker from pynYNAB.exceptions import BudgetNotFound, WrongPushException from pynYNAB.schema import Base, Catalog, Budget, Knowledge, Payee, Tr...
mit
5,320,574,904,237,841,000
34.028409
114
0.618329
false
4.029412
false
false
false
plumgrid/plumgrid-nova
nova/api/openstack/compute/contrib/console_output.py
11
3611
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # Copyright 2011 Grid Dynamics # Copyright 2011 Eldar Nugaev, Kirill Shileev, Ilya Alekseyev # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You...
apache-2.0
-2,712,143,437,848,363,500
37.827957
79
0.625312
false
4.463535
false
false
false
lipis/hurry-app
main/user.py
2
3752
# -*- coding: utf-8 -*- from flask.ext import wtf from google.appengine.ext import ndb import flask import auth import model import util from main import app ############################################################################### # User List #################################################################...
mit
3,342,176,222,695,976,000
29.016
79
0.53678
false
3.782258
false
false
false
mlperf/training_results_v0.7
Google/benchmarks/dlrm/implementations/dlrm-research-TF-tpu-v4-128/dlrm_estimator_main.py
2
8873
# Lint as: python3 # Copyright 2020 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 ...
apache-2.0
3,318,788,356,499,981,000
37.746725
122
0.691649
false
3.553464
true
false
false
simphony/tornado-webapi
tornadowebapi/traitlets.py
1
3181
"""Our traits must be able to deal with Absent values, for two reasons. First, the fact that we don't specify an optional value does not imply that the resulting resource will have a default. Second, when we do modification (PATCH) operations, we only specify the values we want to change. In practice, this means that...
bsd-3-clause
8,428,902,971,515,318,000
24.047244
78
0.624646
false
4.026582
false
false
false
frjaraur/python-deployer
deployer/options.py
2
1234
""" Runtime options. """ class Option(object): """ Shell option. """ def __init__(self, values, current_value): self.values = values self._value = current_value self._callbacks = [] def on_change(self, callback): self._callbacks.append(callback) def get(self)...
bsd-2-clause
-8,426,590,869,415,820,000
22.730769
99
0.556726
false
4.045902
false
false
false
hltdi/guampa
scripts/store_wikipedia_dump.py
1
2284
#!/usr/bin/env python3 """ Script to trangle over a directory full of wikipedia dumps as produced by WikiExtractor.py and add them to the database. """ import glob import os import constants import model import sqlalchemy from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base f...
gpl-3.0
-7,532,252,105,993,562,000
28.282051
79
0.616025
false
4.035336
false
false
false
chenyangh/Project4
flappy.py
1
16621
from itertools import cycle import random import sys from Tilecoder import numTilings, tilecode, numTiles, tiles import pygame from pygame.locals import * from pylab import * import random FPS = 30 SCREENWIDTH = 280 SCREENHEIGHT = 512 # amount by which base can maximum shift to left PIPEGAPSIZE = 100 # gap between ...
mit
5,914,738,368,312,624,000
31.720472
102
0.595091
false
3.280892
false
false
false
TRUFA-rnaseq/trufa-web
client_example.py
1
3731
#------------------------------------------------------------------------------- # simple client to test REST API of Job Launcher import httplib import json from cStringIO import StringIO #------------------------------------------------------------------------------- authority = "localhost:8181" #-------------------...
bsd-3-clause
3,249,914,653,846,899,000
27.922481
80
0.522916
false
4.704918
false
false
false
bing-jian/diffusion-mri
Python/src/spherical_harmonics.py
2
3821
""" Spherical Harmonics http://www.sjbrown.co.uk/?article=sharmonics """ import numpy import math factorial = lambda n:reduce(lambda a,b:a*(b+1),range(n),1) def evaluate_SH(angles, degree, dl=1): theta = angles[0] phi = angles[1] if (dl==2): coeff_length = (degree+1)*(degree+2)/2 B = num...
mit
311,085,629,541,360,450
29.086614
100
0.53363
false
2.923489
false
false
false
malon/EsperaDesEspera
scraping/SergasCsvDBFiles.py
1
13948
# This file is part of EsperaDesespera. # # Copyright (C) 2011 by Alberto Ariza, Juan Elosua & Marta Alonso # # 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...
agpl-3.0
-3,548,245,310,299,805,000
32.023697
105
0.655784
false
2.481923
false
false
false
some-un/RLcourse5
valueIterationAgents.py
1
5879
# valueIterationAgents.py # ----------------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to ht...
gpl-3.0
1,036,748,393,675,748,600
39.544828
116
0.590066
false
4.532768
false
false
false
19kestier/taiga-back
taiga/projects/attachments/management/commands/migrate_attachments.py
3
4292
import re from django.apps import apps from django.core.management.base import BaseCommand, CommandError from django.core.files import File from django.conf import settings from django.db import transaction from taiga.base.utils.iterators import iter_queryset url = """ https://api-taiga.kaleidos.net/attachments/446/...
agpl-3.0
-5,115,454,346,275,698,000
32.015385
105
0.608341
false
4.018727
false
false
false
rich-digi/wp-xml-transformer
split6.py
1
1961
# -------------------------------------------------------------------------------- # Split Wordpress XML (using Element Tree) # -------------------------------------------------------------------------------- import sys, os, re, codecs sys.path.append('/usr/local/lib/python2.7/site-packages/') from lxml import etree ...
mit
-6,030,310,166,997,537,000
31.683333
96
0.630801
false
2.948872
false
false
false
MattNolanLab/Ramsden_MEC
ABAFunctions/ABA_imageprocessing.py
1
12388
''' Code for processing images Copyright (c) 2014, Helen Ramsden All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of c...
bsd-3-clause
6,886,222,921,574,187,000
40.019868
175
0.723765
false
3.13303
false
false
false
sshleifer/object_detection_kitti
syntaxnet/dragnn/python/lexicon.py
14
2806
# Copyright 2017 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 a...
apache-2.0
-2,600,197,595,570,163,000
37.438356
80
0.678902
false
3.881051
false
false
false
sinnorfin/raconteur
player.py
1
10793
import store import tile import math import controls import level import pyglet.sprite from pyglet.window import mouse from pyglet.window import key class Player(tile.Gameobject): def __init__(self, coor, img,name = 'Player', inv=None): super(Player, self).__init__(img) self.coor =...
gpl-3.0
4,820,696,689,690,783,000
37.003521
79
0.470953
false
3.730729
false
false
false
REGOVAR/Regovar
regovar/api_rest/handlers/event_handler.py
1
3675
#!env/python3 # coding: utf-8 try: import ipdb except ImportError: pass import os import json import aiohttp import aiohttp_jinja2 import datetime import time from aiohttp import web from urllib.parse import parse_qsl from config import * from core.framework.common import * from core.model import * from...
agpl-3.0
4,176,222,296,036,044,300
25.630435
108
0.587755
false
4.238754
false
false
false
mborho/baas
setup.py
1
1563
from setuptools import setup, find_packages import sys, os version = '0.2.2' setup(name='baas', version=version, description="'Buddy as a Service' is a xmpp / wavelet robot using Yahoo YQL API, Google API and other services to do searches (web, news, reviews, wikipedia, wiktionary, imdb) and some other st...
gpl-3.0
-9,197,217,250,324,064,000
37.121951
251
0.621881
false
3.812195
false
false
false
candsvincent/edgesense
python/edgesense/content/metrics.py
3
6391
import networkx as nx import community as co from edgesense.network.utils import extract_dpsg from datetime import datetime def extract_content_metrics(nodes_map, posts_map, comments_map, ts, timestep, timestep_window): ts_metrics = { 'ts': ts, 'full:users_count':0., # Number of Posts total ...
mit
-6,375,036,795,782,342,000
52.258333
139
0.595056
false
3.365456
false
false
false
lukovnikov/teafacto
teafacto/blocks/seq/memnn.py
1
15185
from teafacto.core.base import Block, Var, Val, param, tensorops as T from IPython import embed # TODO: INPUT MASK !!!!!!!! and attention etc # TODO: what about memory mask? # TODO: MEMORY POSITION EMBEDDINGS/ENCODINGS # SYMBOLIC OUTPUT MEMORY ENABLED SEQ2SEQ # - can place attention over all of temporary created out...
mit
-7,271,688,369,530,812,000
41.654494
135
0.591307
false
3.411593
false
false
false
grollins/foldkin
foldkin/test/test_fit_markov_collection_to_kf.py
1
2733
import nose.tools from foldkin.scipy_optimizer import ScipyOptimizer from foldkin.coop.coop_collection import CoopCollectionFactory from foldkin.coop.coop_model_parameter_set import CoopModelParameterSet from foldkin.fold_rate_judge import CoopCollectionJudge from foldkin.fold_rate_predictor import FoldRateCollectionPr...
bsd-2-clause
8,924,907,142,528,452,000
48.690909
75
0.603
false
4.386838
false
false
false
collab-project/django-encode
encode/widgets.py
1
1520
# Copyright Collab 2014-2016 # See LICENSE for details. """ Widgets. """ from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.safestring import mark_safe class MediaDisplayWidget(forms.SelectMultiple): """ Widget for displaying media in admin forms...
mit
-7,202,141,266,752,442,000
28.230769
75
0.511842
false
4.76489
false
false
false
tomevans/gps
gps/spgp_routines.py
1
29754
import sys, os, pdb, time import numpy as np import scipy.linalg import matplotlib import matplotlib.pyplot as plt PERTURB = 1e-4#1e-3 def random_draw( gp_obj, xmesh=None, emesh=None, conditioned=True, perturb=PERTURB, ndraws=5, \ plot_draws=True, mesh_dim=0, lw=3 ): """ SUMMARY Draws on...
gpl-2.0
-926,298,388,998,945,400
37.44186
100
0.57236
false
3.030865
false
false
false
Purg/SMQTK
python/smqtk/representation/data_element/url_element.py
1
2346
import mimetypes import requests from smqtk.representation import DataElement __author__ = "paul.tunison@kitware.com" MIMETYPES = mimetypes.MimeTypes() class DataUrlElement (DataElement): """ Representation of data loadable via a web URL address. """ @classmethod def is_usable(cls): ...
bsd-3-clause
-8,930,708,487,979,302,000
26.6
80
0.563086
false
4.360595
false
false
false
jwinzer/openslides-proxyvoting
openslides_proxyvoting/models.py
1
2500
from django.db import models from openslides.motions.models import Category, Motion, MotionPoll from openslides.users.models import User from openslides.utils.models import RESTModelMixin from .access_permissions import ( AbsenteeVoteAccessPermissions, VotingShareAccessPermissions, VotingProxyAccessPermis...
mit
2,078,180,441,357,619,500
32.783784
93
0.6896
false
3.742515
false
false
false
numericube/twistranet
twistranet/twistapp/views/account_views.py
1
34266
import hashlib import urllib import time from django.template import Context, RequestContext, loader from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound, HttpResponseServerError from django.forms import widgets from django.template.loader import get_template from django.core.exceptions imp...
agpl-3.0
4,508,740,274,224,574,500
39.551479
166
0.559563
false
4.420279
false
false
false
sot/mica
scripts/update_agasc_supplement.py
1
3262
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Update the agasc_supplement.h5. This file is a supplement to the stable AGASC to inform star selection and star catalog checking. Currently this script only has the capability to add a bad star to the bad star table. It might end up including funct...
bsd-3-clause
-6,786,102,280,383,239,000
33.336842
90
0.622624
false
3.685876
false
false
false
ENCODE-DCC/encoded
src/encoded/types/experiment.py
1
16913
from pyramid.traversal import find_root from snovault import ( calculated_property, collection, load_schema, ) from snovault.util import Path from .base import ( ALLOW_SUBMITTER_ADD, Item, paths_filtered_by_status, SharedItem ) from .dataset import Dataset from .shared_calculated_properties ...
mit
8,760,214,666,596,681,000
35.529158
161
0.5183
false
4.128143
false
false
false
tensorflow/probability
tensorflow_probability/python/internal/backend/numpy/sets_lib.py
1
1528
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-6,061,709,947,104,250,000
30.833333
80
0.673429
false
4.340909
false
false
false
salsh/ROA-Analysis
scripts/plot_BGP_Impact.py
1
11904
# # This file is part of ROA-Analysis # # Author: Samir Al-Sheikh (Freie Universitaet, Berlin) # s.al-sheikh@fu-berlin.de # # MIT License # # Copyright (c) 2017 The ROA-Analysis authors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated...
mit
-3,012,274,211,403,680,000
48.190083
108
0.65079
false
3.083139
false
false
false
uhp/uhp
uhpweb/controller/admin.py
1
39163
# -*- coding: UTF-8 -*- import os import json import logging import time import copy import tornado from sqlalchemy.orm import query,aliased from sqlalchemy import and_,or_,desc,asc from sqlalchemy import func from sqlalchemy.orm.exc import NoResultFound import async import static_config import database import config...
gpl-2.0
4,349,474,049,535,728,000
36.879482
152
0.530068
false
3.773665
true
false
false
pierotofy/WebODM
plugins/cloudimport/platform_helper.py
1
1995
import importlib from os import path, listdir from app.plugins import logger from .platform_extension import PlatformExtension platforms = None def get_all_platforms(): # Cache platforms search global platforms if platforms == None: platforms = read_platform_from_files() return platforms de...
mpl-2.0
957,944,366,230,847,200
36.641509
130
0.677193
false
4.365427
false
false
false
Brazelton-Lab/bio_utils
bio_utils/tests/test_entry_verifier.py
1
2721
#! /usr/bin/env python3 """Test bio_utils' entry_verifier Copyright: test_entry_verifier.py test bio_utils' entry_verifier Copyright (C) 2015 William Brazelton, Alex Hyer This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
gpl-3.0
-6,426,005,740,206,852,000
33.884615
75
0.651599
false
3.189918
true
false
false
DittmarLab/HGTector
hgtector/search.py
1
80853
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # Copyright (c) 2013--, Qiyun Zhu and Katharina Dittmar. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # --------------------...
bsd-3-clause
3,409,914,012,500,449,300
34.902753
80
0.490718
false
4.306189
false
false
false
NDManh/numbbo
code-experiments/tools/cocoutils.py
2
6790
## -*- mode: python -*- ## Lots of utility functions to abstract away platform differences. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import sys import os from shutil import copyfile, copytree, rmtree from subp...
bsd-3-clause
6,164,873,409,866,953,000
32.95
84
0.609426
false
3.989424
false
false
false
x2Ident/x2Ident_test
mitmproxy/mitmproxy/console/grideditor/col_bytes.py
2
3158
from __future__ import absolute_import, print_function, division import os import urwid from mitmproxy.console import signals from mitmproxy.console.grideditor import base from netlib import strutils def read_file(filename, callback, escaped): # type: (str, Callable[...,None], bool) -> Optional[str] ...
gpl-3.0
-3,493,163,022,185,555,000
28.660194
66
0.526282
false
4.111979
false
false
false
PowerShellEmpire/Empire
lib/modules/powershell/collection/ninjacopy.py
10
4109
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-NinjaCopy', 'Author': ['@JosephBialek'], 'Description': ('Copies a file from an NTFS partitioned volume by reading the ' 'r...
bsd-3-clause
4,989,571,720,808,305,000
37.046296
151
0.506449
false
4.394652
false
false
false
openedbox/bigdata-all-in-one
tools/hbase.py
1
3710
import os from helper import SshClient, ScpClient, HadoopConfigGen class HBase: def __init__(self): pass @staticmethod def install(options): hbase = HadoopConfigGen() hbase.add_property('hbase.rootdir', 'hdfs://%s/hbase' % options.hadoop_cluster_name) hbase.add_property('...
mit
-8,632,675,921,342,916,000
41.159091
119
0.594609
false
3.626588
false
false
false
tukeJonny/NTPAmpMitigator
infra/NTPAmp/httpget.py
1
4905
#-*- coding: utf-8 -*- import sys import time import argparse import logging from decimal import Decimal import requests try: from requests.exceptions import ConnectTimeout MyTimeoutException=ConnectTimeout except: from requests.exceptions import Timeout MyTimeoutException=Timeout import matplotlib mat...
mit
4,381,088,293,051,387,400
32.37415
112
0.58736
false
3.844044
true
false
false
yarbroughw/JMDE
JMDE/treeclassifier.py
1
6463
from __future__ import print_function import json import warnings import pickle import itertools from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import MultinomialNB from sklearn.pipeline import Pipeline import scipy.optim...
mit
-445,018,581,275,244,600
30.681373
79
0.578369
false
4.343414
true
false
false
Pluto-tv/chromium-crosswalk
tools/perf/page_sets/tough_compositor_cases.py
35
3128
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class ToughCompositorPage(page_modul...
bsd-3-clause
-621,170,004,393,088,100
39.102564
80
0.703645
false
3.261731
false
false
false
bradallred/gemrb
gemrb/GUIScripts/pst/MessageWindow.py
1
4025
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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) ...
gpl-2.0
-7,083,244,787,348,088,000
34.9375
134
0.766708
false
3.067835
false
false
false
tomviner/pytest
src/_pytest/mark/structures.py
1
13120
import inspect import warnings from collections import namedtuple from collections.abc import MutableMapping from operator import attrgetter from typing import Set import attr from ..compat import ascii_escaped from ..compat import getfslineno from ..compat import NOTSET from _pytest.outcomes import fail from _pytest...
mit
7,383,742,529,174,535,000
31.964824
97
0.588338
false
4.348691
true
false
false
duncanwp/cis_esp
web/datasets/load_MODIS.py
1
1887
import django django.setup() def gring_to_obj(gring): from datasets.utils import lat_lon_points_to_polygon line = lat_lon_points_to_polygon(gring[:4], gring[4:]) return line def _read_modis_geoData(dirpath, test_set): import pandas as pd import glob from os.path import join from datetim...
lgpl-3.0
-7,313,040,373,078,914,000
29.435484
94
0.650238
false
3.46875
true
false
false
Bergurth/aes_cmdl.py
daes_cmdl.py
1
2117
import os, random, struct, sys from Crypto.Cipher import AES from optparse import OptionParser import getpass import hashlib parser = OptionParser() parser.add_option("-p") (options, args) = parser.parse_args() if(len(sys.argv) < 2): print "usage: python daes_cmdl.py input_file_name <output_file_name> -p <pa...
gpl-3.0
5,057,111,491,352,913,000
24.506024
87
0.616438
false
3.36566
false
false
false
gbook/nidb
src/gdcm/Examples/Python/ReadAndDumpDICOMDIR.py
1
8113
################################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distrib...
gpl-3.0
-3,555,645,555,328,756,000
42.385027
113
0.459016
false
4.570704
false
false
false
jianlirong/incubator-hawq
contrib/hawq-hadoop/hawq-mapreduce-tool/generate_mr_report.py
12
2279
#!/usr/bin/env python # 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 # "Li...
apache-2.0
-7,884,257,589,737,035,000
33.530303
88
0.642387
false
4.05516
true
false
false
fidelram/deepTools
deeptools/deepBlue.py
1
10950
#!/usr/bin/env python try: # python 2 import xmlrpclib except: # python 3 import xmlrpc.client as xmlrpclib import time import tempfile import os.path import sys import pyBigWig from deeptools.utilities import mungeChromosome from deeptoolsintervals import GTF import datetime def isDeepBlue(fname): ...
gpl-3.0
-8,865,133,240,584,388,000
37.286713
292
0.603288
false
4.000731
false
false
false
Apstra/aeon-venos
tests/test_opx.py
1
2524
import mock import pytest from pylib.aeon.opx import device from pylib.aeon.cumulus import connector g_facts = { 'hw_version': None, 'hw_part_number': None, 'hostname': 'opx221_vm', 'serial_number': '525400A5EC36', 'fqdn': 'opx221_vm', 'os_version': '2.2.1', 'virtual': True, 'hw_model'...
apache-2.0
7,499,508,265,810,249,000
29.409639
114
0.614105
false
3.063107
true
false
false
Far0/Battleports
Code/score.py
1
4923
import pygame import psycopg2 import collections from buttons import Buttons from quit import process_events from itertools import chain blue = (30, 15, 170) #RGB numbers for various needed colours yellow = (255, 255, 0) white = (255, 255, 255) def data_shredder(a): #removes the tuple and the list res = '' ...
mit
1,107,863,158,769,956,100
31.183007
120
0.644526
false
3.652077
false
false
false
Lynx187/script.module.urlresolver
lib/urlresolver/plugins/hugefiles.py
3
2840
''' Hugefiles urlresolver plugin Copyright (C) 2013 Vinnydude This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is ...
gpl-2.0
8,769,949,715,246,539,000
34.5
92
0.630986
false
3.801874
false
false
false
Conan-Kudo/librepo
examples/python/yum_repo_simple_download.py
4
1122
#!/usr/bin/python """ Example: Simple download whole repository This example uses more "pythonic" way of usage. Instead of use setopt() method it uses class properties. Use case: We have a metalink url of a repository and we want do download complete repository metadata. """ import librepo # Metalink URL METALINK_...
lgpl-2.1
4,813,575,545,057,048,000
26.365854
86
0.678253
false
3.50625
false
false
false
minh5/foster_care_proj
foster_care_proj/notebooks/processing.py
1
6803
import pandas as pd class Component: def __init__(self, name, calculate): self.name = name accepted_calculations = ['total', 'average', 'dummy', 'sum'] if calculate in accepted_calculations: self.calculate = calculate else: raise Exception('calculate met...
mit
-5,855,531,884,169,251,000
36.59116
106
0.628546
false
3.485143
false
false
false
frreiss/tensorflow-fred
tensorflow/python/layers/utils_test.py
15
4880
# Copyright 2015 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
6,092,373,260,875,308,000
40.008403
80
0.690574
false
3.439042
true
false
false
vitalti/sapl
sapl/relatorios/templates/pdf_protocolo_gerar.py
1
6253
# parameters=sessao,imagem,data,lst_protocolos,dic_cabecalho,lst_rodape,dic_filtro """relatorio_protocolo.py External method para gerar o arquivo rml do resultado de uma pesquisa de protocolos Autor: Luciano De Fazio Empresa: OpenLegis Consultoria versão: 1.0 """ import time from trml2pdf import parseStri...
gpl-3.0
7,242,856,074,353,114,000
40.092105
136
0.576849
false
2.674946
false
false
false
yanchen036/tensorflow
tensorflow/python/kernel_tests/distributions/student_t_test.py
3
20207
# 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,335,599,630,733,818,000
37.934489
80
0.603801
false
3.094013
true
false
false
AnhellO/DAS_Sistemas
Ago-Dic-2019/Luis Llanes/segundo_parcial/DataBase.py
1
5673
import sqlite3 from artista import artist from disquillos import album def Crear_Tabla_Artistas(): try: conexion = sqlite3.connect('musicBrainz.db') cursor = conexion.cursor() print('Conectado') query = """CREATE TABLE IF NOT EXISTS artistas( id TEXT, ...
mit
-2,657,901,512,989,142,500
25.027523
179
0.532346
false
3.749504
false
false
false
arizvisa/syringe
template/video/h264.py
1
2279
from ptypes import * v = 0 # FIXME: this file format is busted class seq_parameter_set_rbsp(pbinary.struct): class __pic_order_type_1(pbinary.struct): _fields_ = [ (1, 'delta_pic_order_always_zero_flag'), (v, 'offset_for_non_ref_pic'), (v, 'offset_for_top_to_botto...
bsd-2-clause
-6,038,716,225,828,748,000
36.360656
157
0.540588
false
3.10068
false
false
false
EmokitAlife/EmokitVisualizer
sample/tests.py
1
2520
""" ps_QPainter_drawRect101.py explore the PySide GUI toolkit to draw rectangles in different colors there are a number of ways colors can be specified fill colors are set with the brush perimeter colors are set with the pen QColor can be given a transparency value (PySide is the official LGPL-licensed version of PyQT)...
mit
-5,538,054,166,984,605,000
37.784615
69
0.660714
false
3.461538
false
false
false
nathanielvarona/airflow
airflow/providers/jenkins/operators/jenkins_job_trigger.py
1
11064
# # 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...
apache-2.0
1,856,690,641,726,038,500
44.159184
110
0.639642
false
4.427371
false
false
false
smilusingjavascript/blink
Tools/GardeningServer/alerts.py
2
5805
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import calendar import datetime import json import logging import webapp2 import zlib from google.appengine.api import memcache from google.appengine.api im...
bsd-3-clause
-8,315,493,951,139,623,000
31.982955
81
0.621016
false
3.943614
false
false
false
WorldViews/Spirals
scripts/genImagesP2.py
1
2863
from math import log, pow import os, traceback import Image, ImageDraw def lg(x): return log(x)/log(2.0) def truncDown(n): return int(pow(2,int(lg(n)))) def verifyDir(path): if not os.path.exists(path): print "Creating", path os.mkdir(path) def add_corners(im, rad): circle = Image.new(...
mit
-3,266,906,963,975,171,000
30.119565
87
0.571079
false
3.174058
false
false
false
rtapadar/pscan
pscan/__main__.py
1
1758
# Copyright 2016 Rudrajit Tapadar # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
-3,271,357,822,958,191,000
33.470588
76
0.591581
false
3.846827
false
false
false
remico/vision_0
goods2excel.py
1
5421
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Parse a goods database table and create an ms excel's workbook from it """ __author__ = 'remico' from xml.etree.ElementTree import ElementTree from abc import ABC, abstractmethod from bs4 import BeautifulSoup, Tag import xlsxwriter import sys, os, glob class IBui...
gpl-3.0
-302,040,297,643,390,460
31.618182
79
0.566146
false
3.661224
false
false
false
revarbat/epubber
epubber/views/main.py
1
2968
from __future__ import absolute_import import re, os, sys from clay import app import clay.config from flask import make_response, request, redirect, render_template, url_for from epubber.fimfic_epubgen import FimFictionEPubGenerator site_epub_classes = [ FimFictionEPubGenerator ] accesslog = clay.config.get...
bsd-2-clause
5,776,971,009,247,673,000
25.981818
95
0.495283
false
4.043597
false
false
false
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/grpc/tools/buildgen/plugins/expand_version.py
36
4112
# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
gpl-3.0
6,242,880,577,715,036,000
33.847458
99
0.667072
false
3.769019
false
false
false
mozilla/socorro
webapp-django/crashstats/crashstats/tests/test_models.py
1
17410
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import random from urllib.parse import urlparse, parse_qs import mock import pytest from django.core.cache import cach...
mpl-2.0
-5,132,085,217,994,681,000
31.787194
93
0.522516
false
3.95143
true
false
false
SwissTPH/openhds-sim
submission.py
1
13836
#!/usr/bin/env python """Test form submission""" __email__ = "nicolas.maire@unibas.ch" __status__ = "Alpha" from lxml import etree import urllib2 import uuid import logging DEVICE_ID = "8d:77:12:5b:c1:3c" def submit_data(data, url): """Submit an instance to ODKAggregate""" r = urllib2.Request(url, data=da...
gpl-2.0
2,658,511,324,205,245,000
59.419214
120
0.527681
false
4.09228
false
false
false
anqilu/dispel4py
dispel4py/test/workflow_graph_test.py
2
2075
# Copyright (c) The University of Edinburgh 2015 # # 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 agre...
apache-2.0
7,368,770,741,785,826,000
29.072464
74
0.698795
false
3.685613
true
false
false
dhruvesh13/Audio-Genre-Classification
plot-spectogram.py
1
1043
import sys import os import scipy.io.wavfile import scipy.signal import matplotlib.pyplot as plt # from matplotlib.pyplot import specgram os.chdir(sys.argv[1]) # Directory provided as a command line argument will be opened to visualize the files inside wavfiles = [] for wavfile in os.listdir(sys.argv[1]): if wavf...
mit
1,518,071,443,818,557,000
24.463415
92
0.725791
false
3.113433
false
false
false
warmlogic/happening
searchForGeo_twitter.py
1
1624
''' search for geographic tweets ''' import pandas as pd import numpy as np import cPickle # # import MySQLdb as mdb # import pymysql as mdb import time import twitter_tools # from authent import dbauth as authsql import pdb # load beer names with >500 ratings # sql=''' # SELECT beers.beername, beers.id # F...
gpl-3.0
-7,280,097,865,136,772,000
24.375
93
0.693966
false
2.743243
false
false
false
tdautc19841202/wechatpy
wechatpy/client/api/customservice.py
7
7735
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import hashlib import time import datetime from six.moves.urllib.parse import quote from optionaldict import optionaldict from wechatpy.utils import to_binary from wechatpy.client.api.base import BaseWeChatAPI class WeChatCustomService(...
mit
6,661,586,624,816,034,000
28.106838
79
0.559536
false
2.79483
false
false
false
Answeror/lit
pywingui/lib/scintilla.py
1
4493
from pywingui.windows import * from pywingui.wtl import * from ctypes import c_char try: LoadLibrary("SciLexer.DLL") #except Exception, e: except:# for compatibility with Python 3 version MessageBox(0, "The Scintilla DLL could not be loaded.", "Error loading Scintilla", MB_OK | MB_ICONERROR) #~ raise e from .scint...
mit
-2,416,158,969,552,404,000
27.801282
105
0.719341
false
2.859962
false
false
false
jbrodin/glowswitch-test
glowswitch-test.py
1
3010
#Author: Jbrodin #A simple program used to make a color-changing orb #Requires the Panda3D game engine to run import direct.directbase.DirectStart from panda3d.core import AmbientLight,DirectionalLight from panda3d.core import NodePath,TextNode from panda3d.core import Camera,Vec3,Vec4 from direct.gui.OnscreenText im...
mit
-4,604,273,806,460,519,400
45.307692
173
0.6701
false
3.296824
false
false
false
svp-dev/slcore
slc/tools/slc/mt/mtsparc/asmproc/opc/mtsparc.py
1
38860
# This file was generated by decode.py. Do not edit! # For each instruction the information available is:' # re_parser, input_regs, output_regs, double_regs, long_latency, delayed, extra_phy_inputs, extra_phy_outputs' import re class insn_metadata(object): def __init__(self, info): self.inputs, self.outputs...
gpl-3.0
-8,466,637,602,393,314,000
25.185984
183
0.426608
false
2.525509
false
false
false
Pinafore/qb
qanta/wikipedia/cached_wikipedia.py
2
7744
from typing import Dict import os import json import csv import pickle import re from collections import namedtuple import nltk from unidecode import unidecode from qanta import qlogging from qanta.datasets.quiz_bowl import QantaDatabase from qanta.util.constants import ( COUNTRY_LIST_PATH, WIKI_DUMP_REDIRECT_...
mit
3,321,599,547,326,466,600
33.726457
118
0.615444
false
3.917046
false
false
false
chrisjsewell/ipymd
ipymd/plotting/animation_examples/3d_contour.py
1
1105
# -*- coding: utf-8 -*- """ Created on Sun Jul 17 21:56:26 2016 @author: cjs14 http://scicomp.stackexchange.com/questions/7030/plotting-a-2d-animated-data-surface-on-matplotlib """ from mpl_toolkits.mplot3d import axes3d import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from...
gpl-3.0
6,210,049,458,574,649,000
24.72093
97
0.663348
false
2.612293
false
false
false
jamesliu96/renren
bin/renren.py
1
3619
#-*- coding:UTF-8 -*- #! /usr/bin/python from sgmllib import SGMLParser import sys,urllib,urllib2,cookielib import datetime import time import getpass class spider(SGMLParser): def __init__(self,email,password): SGMLParser.__init__(self) self.h3=False self.h3_is_ready=False self.div=False self.h3_an...
mit
-524,980,596,590,272,100
23.5
100
0.660822
false
2.506484
false
false
false
GEANT/met
met/metadataparser/templatetags/metadataparsertags.py
2
13270
################################################################# # MET v2 Metadate Explorer Tool # # This Software is Open Source. See License: https://github.com/TERENA/met/blob/master/LICENSE.md # Copyright (c) 2012, TERENA All rights reserved. # # This Software is based on MET v1 developed for TERENA by Yaco Sistem...
bsd-2-clause
6,972,299,513,368,247,000
31.604423
168
0.616202
false
3.781704
false
false
false
pybee/briefcase
src/briefcase/linux.py
1
1657
import os import subprocess import sys from .app import app class linux(app): description = "Create a Linux installer to wrap this project" def finalize_options(self): # Copy over all the options from the base 'app' command finalized = self.get_finalized_command('app') for attr in ('...
bsd-3-clause
-7,958,137,519,832,249,000
26.163934
109
0.602897
false
4.173804
false
false
false
luotao1/Paddle
python/paddle/fluid/contrib/slim/tests/quant_int8_image_classification_comparison.py
1
12626
# copyright (c) 2019 paddlepaddle authors. all rights reserved. # # licensed under the apache license, version 2.0 (the "license"); # you may not use this file except in compliance with the license. # you may obtain a copy of the license at # # http://www.apache.org/licenses/license-2.0 # # unless required by app...
apache-2.0
-8,799,431,174,079,440,000
39.08254
114
0.535878
false
3.773461
true
false
false
p0123n/mygate
mygate.py
1
2806
#! /usr/bin/env python #-*- coding:utf-8 -*- __author__ = 'p0123n' import MySQLdb from MySQLdb import cursors def keepSingleConn(cls): instances = dict() def getInstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getInstance @keepSingleCo...
apache-2.0
5,312,227,526,525,010,000
26.509804
74
0.543122
false
3.854396
false
false
false
DonaldMcRonald/SketchRecognitionWithTensorFlow
src/main/python/recognition/custom/recognizer.py
1
5154
import math import tensorflow as tf from recognition import sketch_utils as utils import custom_recogntion_utilities as training_helpers from generated_proto import sketch_pb2 as Sketch from recognition.generation import feature_generation as features X = 0 Y = 1 ID = 2 class Recognizer: num_points ...
mit
-6,903,016,166,910,179,000
40.595041
113
0.5974
false
4.190244
false
false
false
dpazel/music_rep
search/melodicsearch/melodic_search_analysis.py
1
6914
from structure.LineGrammar.core.line_grammar_executor import LineGrammarExecutor from enum import Enum from tonalmodel.interval import Interval class MelodicSearchAnalysis(object): def __init__(self, pattern_line, pattern_hct): self.__pattern_line = pattern_line self.__pattern_hct = pattern_hct...
mit
3,146,836,538,345,960,000
29.866071
118
0.613827
false
3.893018
false
false
false
Lukasa/cryptography
tests/hazmat/primitives/test_block.py
1
5776
# 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
-7,514,326,614,195,163,000
29.083333
71
0.605263
false
3.994467
true
false
false
crossroadchurch/paul
openlp/core/ui/servicenoteform.py
1
3146
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
gpl-2.0
-3,048,598,671,742,118,400
43.942857
87
0.529561
false
4.781155
false
false
false
CoderDuan/mantaflow
tools/tests/test_0030_gridop.py
2
2839
# # Basic test, grid operators # import sys print ("Running python "+sys.version) from manta import * from helperInclude import * # solver params gs = vec3(10, 20, 30) s = Solver(name='main', gridSize = gs, dim=3) # prepare grids rlg1 = s.create(RealGrid) rlg2 = s.create(RealGrid) rlg3 = s.create(RealGrid) ...
gpl-3.0
-1,891,309,112,479,031,000
28.268041
93
0.644593
false
2.0092
true
true
false
stucchio/Django-Media-Generator
mediagenerator/filters/media_url.py
10
1369
from django.utils.encoding import smart_str from django.utils.simplejson import dumps from hashlib import sha1 from mediagenerator.generators.bundles.base import Filter from mediagenerator.utils import get_media_url_mapping _CODE = """ _$MEDIA_URLS = %s; media_urls = function(key) { var urls = _$MEDIA_URLS[key]; ...
bsd-3-clause
-4,843,638,403,972,205,000
28.12766
132
0.638422
false
3.574413
false
false
false
bparzella/secsgem
secsgem/secs/functions/s06f06.py
1
1595
##################################################################### # s06f06.py # # (c) Copyright 2021, Benjamin Parzella. All rights reserved. # # This library 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 Fou...
lgpl-2.1
-2,935,853,949,612,352,500
26.5
82
0.618182
false
3.797619
false
false
false
nolram/NewsReader-Django
NewsReaderDjango/settings.py
1
4456
""" Django settings for NewsReaderDjango project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR...
mit
-6,919,374,225,255,333,000
26.343558
87
0.654399
false
3.271659
false
false
false
dmpayton/sphinx-granite
setup.py
1
1263
from granite import __version__ try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages setup( name='sphinx-granite', version=__version__, license='MIT', url='https://github.com/dmpayton/sphinx-granite/', description='A theme fo...
mit
-3,708,856,599,919,096,300
27.704545
66
0.599367
false
4.168317
false
false
false
jimsrc/seatos
sheaths/src/forbush/tt2_o7o6.py
2
3169
import os from rebineo_o7o6 import * import matplotlib.patches as patches import matplotlib.transforms as transforms import console_colors as ccl def makefig(medVAR, avrVAR, stdVAR, nVAR, tnorm, dTday, SUBTITLE, YLIMS, YLAB, fname_fig): fig = figure(1, figsize=(13, 6)) ax = fig.add_subplot(111) ax.plot...
mit
4,850,216,339,005,660,000
33.075269
106
0.623856
false
2.366692
false
false
false