repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
Caoimhinmg/PmagPy
programs/stats.py
3
1632
#!/usr/bin/env python from __future__ import print_function from builtins import input from builtins import str import sys import pmagpy.pmag as pmag def main(): """ NAME stats.py DEFINITION calculates Gauss statistics for input data SYNTAX stats [command line options][< fil...
bsd-3-clause
6,586,178,628,970,125,000
23
50
0.546569
false
3.47234
false
false
false
aisthesis/opttrack
opttrack/lib/trackpuller.py
1
1131
""" .. Copyright (c) 2016 Marshall Farrier license http://opensource.org/licenses/MIT Get options to be tracked """ import datetime as dt from bson.codec_options import CodecOptions from . import config from . import constants from .dbtools import getcoll from .dbwrapper import job class TrackPuller(object): ...
mit
4,892,867,869,991,266,000
27.275
83
0.658709
false
3.590476
false
false
false
Jumpscale/jumpscale_core8
apps/agentcontroller/jumpscripts/jumpscale/healthcheck_workerstatus.py
1
1139
from JumpScale import j descr = """ Monitor CPU and mem of worker """ organization = "jumpscale" author = "khamisr@codescalers.com" license = "bsd" version = "1.0" category = "monitor.healthcheck" async = True roles = [] period = 600 log = True def action(): rediscl = j.clients.redis.getByInstance('system') ...
apache-2.0
514,604,526,563,341,760
28.205128
104
0.606673
false
3.451515
false
false
false
miguelriemoliveira/RustBot
rustbot_translation/rosbag_correct_imu_frame.py
1
3758
#!/usr/bin/env python # -*- coding: utf-8 -*- '''rosbag_odom_unslasher This script reads the content of a rosbag file (.bag) and creates a new rosbag file removing the trailing slashes in frame_id and child_frame_id contained in odometry topics. (Useful because new tf2 **doesn't accept** frame_ids ...
gpl-3.0
4,967,122,658,884,612,000
29.306452
85
0.51703
false
3.687929
false
false
false
LSmit202/Mal-Py
malpy/cycleanalyzer.py
1
4970
# coding=utf-8 """Mal Runtime environment with code cycle analyzing. """ import uuid import malpy.actionrunner class CycleAnalyzer(malpy.actionrunner.ActionRunner): """ This is a runtime memory profiler and analyzer. It uses Zobrist hashing to detect possibly cyclic code. Due to the small word size and...
bsd-3-clause
1,715,534,201,328,545,800
37.230769
77
0.480483
false
3.891934
false
false
false
duke605/RunePy
commands/troll_invasion.py
1
1253
from util.arguments import Arguments from discord.ext import commands from util import choices from shlex import split class TrollInvasion: def __init__(self, bot): self.bot = bot @commands.command(aliases=['troll', 'trollinvasion'], description='Shows the amount of exp gained ...
mit
-8,583,302,028,138,376,000
36.969697
119
0.545092
false
3.879257
false
false
false
cogeorg/BlackRhino
networkx/classes/multidigraph.py
1
38989
"""Base class for MultiDiGraph.""" # Copyright (C) 2004-2016 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from copy import deepcopy import networkx as nx from networkx.classes.graph import Graph # for doc...
gpl-3.0
8,031,924,225,306,386,000
35.438318
88
0.550591
false
4.064318
false
false
false
702nADOS/sumo
tools/sumolib/sensors/inductive_loop.py
1
2028
""" @file poi.py @author Daniel Krajzewicz @author Michael Behrisch @author Jakob Erdmann @date 2010-02-18 @version $Id: inductive_loop.py 22608 2017-01-17 06:28:54Z behrisch $ Library for reading and storing Inductive Loop detector representations and measurements. SUMO, Simulation of Urban MObility; see ...
gpl-3.0
9,206,188,787,259,079,000
29.727273
172
0.635108
false
3.391304
false
false
false
BT-astauder/account-financial-reporting
account_financial_report/wizard/general_ledger_wizard.py
1
6609
# Author: Damien Crier # Author: Julien Coux # Author: Jordi Ballester # Copyright 2016 Camptocamp SA # Copyright 2017 Akretion - Alexis de Lattre # Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, model...
agpl-3.0
-3,176,805,792,361,208,000
37.876471
78
0.60115
false
3.858144
false
false
false
danianr/NINJa
jobqueue.py
1
9587
from Tkinter import * import os import posix from joblist import JobList import cups import re from collections import deque import time import sys class Job(object): def __init__(self, conn=None, jobId=None, maxsize=2147483647): print >> sys.stderr, time.time(), 'Entry into Job(jobId=%s)' % (jobId,) ...
mit
4,192,363,589,211,776,000
36.303502
145
0.593303
false
3.917859
false
false
false
hishivshah/WorldPop
code/births_and_pregnancies.py
1
28462
import arcpy import xlrd import tempfile import os import csv import logging import fnmatch import xlsxwriter import math import itertools import xml.etree.ElementTree as ET def dhsAsfrJoin(urbanAsfrFc, ruralAsfrFc, iso2, dhsRegionsFc, urbanAreasShp, iso3, outGDB): global asfrPresent try: # Extract ...
mit
-6,048,192,273,400,615,000
47.079392
177
0.596761
false
3.735661
false
false
false
drpjk/malodos
src/database/Resources.py
3
1951
''' Created on 25/05/2010. Copyright 2010, David GUEZ @author: david guez (guezdav@gmail.com) This file is a part of the source code of the MALODOS project. You can use and distribute it freely, but have to conform to the license attached to this project (LICENSE.txt file) ==============================================...
gpl-3.0
-7,822,285,388,180,840,000
33.839286
87
0.661199
false
3.744722
false
false
false
alfa-jor/addon
plugin.video.alfa/servers/vshare.py
2
1816
# -*- coding: utf-8 -*- import re from core import httptools from core import scrapertools from platformcode import logger from lib import jsunpack def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) response = httptools.downloadpage(page_url) if response.code != 200 or "No longer...
gpl-3.0
-7,212,852,101,138,315,000
37.638298
123
0.580947
false
3.512573
false
false
false
DanielPorter/FBNR
scripts/scr.py
1
1546
import json import itertools class Post: def __init__(self, data, parent=""): self.json = data self.id = data["id"] self.name = data["from"]["name"] self.message = data.get("message", "") self.date = data["created_time"] self.link = data.get("link", "") self.parent = parent self.children = data.get("commen...
mit
-15,980,573,605,449,854
31.893617
124
0.635188
false
2.868275
false
false
false
jeffreysanti/fountainTools
outGeneral.py
1
15187
#!/bin/python import fparser import math import re import textwrap import sys import os import copy # *** TODO: Split handle multi-line formatting character codes CHAR_BOLD = u"\u2BD2" CHAR_BOLDITAL = u"\u2BD3" CHAR_BOLDITALUNDER = u"\u2BD4" CHAR_ITAL = u"\u2BD5" CHAR_ITALUNDER = u"\u2BD6" CHAR_BOLDUNDER = u"\u2BD7"...
gpl-2.0
-998,773,952,176,750,700
33.75286
149
0.518206
false
3.775043
false
false
false
idpaterson/parsedatetime
parsedatetime/pdt_locales/de_DE.py
7
3130
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .base import * # noqa # don't use an unicode string localeID = 'de_DE' dateSep = ['.'] timeSep = [':'] meridian = [] usesMeridian = False uses24 = True decimal_mark = ',' Weekdays = [ 'montag', 'dienstag', 'mittwoch', 'donnerstag', 'freitag...
apache-2.0
6,806,171,514,005,700,000
25.483051
70
0.52128
false
2.494014
false
false
false
LighthouseHPC/lighthouse
src/LAPACK341/computational_errorBounds/compare_errorBound.py
1
2721
import urllib, shutil, csv import os #parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) #lighthousedir = os.path.dirname(os.path.dirname(parentdir)) #os.sys.path.insert(0,parentdir) print "------------ Make sure 'error Bound' routines are complete in the old version ------------" ###-----------...
mit
-582,019,813,599,256,200
35.77027
109
0.668137
false
3.189918
false
false
false
conanxin/Arduino-Meets-Blender-OSC
blender_code/arduino_to_blender.py
1
2662
# Arduino meets Blender # via OSC Bridge # Testing in Blender 2.49b # # Jan. 13, 2010 # Chris B Stones (c) 2010 # http://www.welcometochrisworld.com # This file is part of the Arduino Meets Blender Software Package. # # This program is free software; you can redistribute it and/or modify # it under the terms of the...
lgpl-3.0
-3,062,432,842,697,541,600
29.609195
90
0.732156
false
3.502632
false
false
false
dmlittle/lob-python
examples/create_postcards_from_csv/create_postcards_from_csv.py
1
1882
import sys, os sys.path.insert(0, os.path.abspath(__file__+'../../../..')) import lob import csv import sys lob.api_key = 'test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc' try: sys.argv[1] except IndexError: print "Please provide an input CSV file as an argument." sys.exit() with open(os.path.dirname(os.path.a...
mit
3,785,672,204,229,199,400
35.901961
103
0.42136
false
4.118162
false
false
false
NYUDataBootcamp/Materials
Code/Python/py_fundamentals1.py
1
4363
""" Python Fundamentals 1 @author: Balint Szoke @date: 2/4/2017 """ """--------------------------------------------------- Python is a calculator. Try these commands one line at a time in the console ---------------------------------------------------""" 2*3 2 * 3 # white space a...
mit
-5,829,902,303,876,820,000
19.815
60
0.48132
false
3.343295
false
false
false
ssadedin/seqr
seqr/migrations/0024_varianttag_metadata.py
1
8116
# Generated by Django 3.1.6 on 2021-04-20 15:30 from collections import defaultdict from django.contrib.postgres.aggregates import StringAgg from django.db import migrations, models from django.db.models.functions import Concat from django.utils import timezone import logging from seqr.utils.logging_utils import log_mo...
agpl-3.0
-148,264,356,127,601,250
42.87027
129
0.676072
false
3.414388
false
false
false
mganeva/mantid
scripts/Muon/GUI/Common/home_instrument_widget/home_instrument_widget_presenter.py
1
9844
# 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 + from __future__ import (absolute_import, divi...
gpl-3.0
-6,143,628,359,277,601,000
45.654028
120
0.566436
false
3.834827
false
false
false
kushalbhola/MyStuff
venv/Lib/site-packages/pip/_internal/build_env.py
6
2681
"""Build Environment used for isolation during sdist building """ import os from distutils.sysconfig import get_python_lib from sysconfig import get_paths from pip._internal.utils.temp_dir import TempDirectory class BuildEnvironment(object): """Creates and manages an isolated environment to install build deps ...
apache-2.0
-4,372,502,190,501,273,600
28.141304
72
0.593062
false
3.863112
false
false
false
adamscott/genial
genial/controllers/propertiescontroller.py
1
7412
""" """ from PyQt5.QtCore import QObject, QModelIndex, pyqtSlot from genial.views.propertiesview import PropertiesView class PropertiesController(QObject): view = None # type: PropertiesView def start(self): from genial.services import properties_service if self.view is None: s...
gpl-3.0
-6,672,864,965,877,891,000
35.156098
113
0.589045
false
4.306798
false
false
false
litex-hub/litex-boards
litex_boards/targets/qmtech_ep4ce15.py
1
8551
#!/usr/bin/env python3 # # This file is part of LiteX-Boards. # # Copyright (c) 2020 Basel Sayeh <Basel.Sayeh@hotmail.com> # SPDX-License-Identifier: BSD-2-Clause import os import argparse from migen import * from migen.genlib.resetsync import AsyncResetSynchronizer from litex.build.io import DDROutput from litex_...
bsd-2-clause
-8,400,058,474,576,676,000
46.505556
154
0.557011
false
3.530553
false
false
false
qilicun/python
python3/src/discalc/diff2Dmesh_inputviz.py
1
2697
from diff2Dmesh import diff2Dmesh from scitools.std import * def input_handling(): """Return data read from the command line.""" import getopt try: options, args = getopt.getopt( sys.argv[1:], '', ['f=', 'xmin=', 'xmax=', 'ymin=', 'ymax=', 'nx=', 'ny=', 'exact-d...
gpl-3.0
-2,451,052,582,157,226,000
30.729412
64
0.509826
false
3.471042
false
false
false
rriggio/joule
joule/virtualmeter.py
1
7248
#!/usr/bin/env python # # Copyright (c) 2012, Roberto Riggio # 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, th...
bsd-3-clause
-7,497,796,674,381,492,000
29.711864
79
0.559327
false
3.869728
false
false
false
ImpGuard/instaparse
instaparse.py
1
99762
#!/usr/bin/env python import re from sys import exit from collections import OrderedDict from os.path import dirname, basename, join, splitext from optparse import OptionParser class InstaParseFile: """ Simple custom file class used by code generation components. """ indentString = " " commentString =...
mit
-7,129,210,262,073,849,000
40.326429
212
0.590315
false
4.185877
false
false
false
tonnrueter/pymca_devel
PyMca/Object3D/cx_setup.py
1
5483
# A cx_freeze setup script to create Object3D executables # # Use either "python cx_setup.py build" or "python cx_setup.py install" # # It expects a properly configured compiler. # # Under windows you may need to set MINGW = True (untested) if you are # not using VS2003 (python 2.5) or VS2008 (python 2.6) # # If everyt...
gpl-2.0
-1,394,312,806,504,974,600
32.03012
84
0.615357
false
3.64077
false
false
false
shashwatsehgal/ToLop
ebaysdk/soa/finditem.py
2
4258
# -*- coding: utf-8 -*- ''' © 2012-2013 eBay Software Foundation Authored by: Tim Keefer Licensed under CDDL 1.0 ''' import os from ebaysdk.soa import Connection as BaseConnection from ebaysdk.utils import dict2xml, getNodeText class Connection(BaseConnection): """ Not to be confused with Finding service ...
apache-2.0
7,942,660,096,612,891,000
32.519685
103
0.548273
false
3.750661
true
false
false
knowledgecommonsdc/kcdc3
kcdc3/apps/classes/migrations/0001_initial.py
1
1618
# -*- coding: 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 model 'Event' db.create_table('classes_event', ( ('id', self.gf('django.db.models.field...
mit
-3,100,810,506,952,470,000
39.475
108
0.577874
false
3.834123
false
false
false
zsiki/ulyxes
pyapps/coomaker.py
1
5816
#!/usr/bin/env python """ .. module:: coomaker.py .. moduleauthor:: Zoltan Siki Sample application of Ulyxes PyAPI to create input coo file for robot/robotplus Output file uses GeoEasy coo :param argv[1]: output file with observations :param argv[2] (sensor): 1100/1800/1200/5500, default 1200 :param argv...
gpl-2.0
-9,167,147,868,356,321,000
30.608696
89
0.553989
false
3.509958
false
false
false
cmptrgeekken/evething
thing/views/transactions.py
3
11780
# ------------------------------------------------------------------------------ # Copyright (c) 2010-2013, EVEthing team # 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...
bsd-2-clause
3,442,672,849,474,192,400
33.344023
134
0.541002
false
3.989164
false
false
false
gaeun/open-event-orga-server
app/views/super_admin/events.py
1
2297
from flask import Blueprint from flask import render_template from app.helpers.data_getter import DataGetter from app.helpers.ticketing import TicketingManager from app.views.super_admin import EVENTS, check_accessible, list_navbar sadmin_events = Blueprint('sadmin_events', __name__, url_prefix='/admin/events') @sa...
gpl-3.0
-2,735,071,072,164,194,000
46.854167
110
0.631258
false
3.6752
false
false
false
ragupta-git/ImcSdk
imcsdk/mometa/storage/StorageControllerHealth.py
1
3585
"""This module contains the general information for StorageControllerHealth ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class StorageControllerHealthConsts: pass class StorageControllerHealth(ManagedObject): """Th...
apache-2.0
1,908,080,591,305,567,000
46.171053
219
0.593584
false
3.676923
false
false
false
cfe316/atomic
examples/rate_equations.py
1
3543
# This example constructs three plots related to # the time-evolution of a species ionising and radiating in a plasma. # These plots assume coronal-like conditions, where # time can be exchanged for density, i.e. only the product # n_e * tau is important. # The first plot shows how under conditions of constant ...
mit
-8,908,123,248,714,135,000
35.153061
92
0.70477
false
2.882832
false
false
false
turbokongen/home-assistant
tests/components/abode/test_alarm_control_panel.py
3
5165
"""Tests for the Abode alarm control panel device.""" from unittest.mock import PropertyMock, patch import abodepy.helpers.constants as CONST from homeassistant.components.abode import ATTR_DEVICE_ID from homeassistant.components.alarm_control_panel import DOMAIN as ALARM_DOMAIN from homeassistant.const import ( ...
apache-2.0
1,599,931,714,746,160,400
35.631206
88
0.64182
false
3.673542
true
false
false
yopzolo/GardenPi
DHT_X/dht11.py
1
2875
# Copyright 2012-2013 Eric Ptak - trouch.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
gpl-3.0
-524,996,124,869,534,600
27.186275
95
0.633739
false
3.753264
false
false
false
open-ods/open-ods
openods/request_utils.py
1
1400
import uuid from flask import g # Utility method to get source_ip from a request - first checks headers for forwarded IP, then uses remote_addr if not def get_source_ip(my_request): try: # First check for an X-Forwarded-For header provided by a proxy / router e.g. on Heroku source_ip = my_request....
gpl-3.0
6,515,536,366,187,648,000
34
118
0.672857
false
3.743316
false
false
false
Mobicents/restcomm-webrtc-sdk
test/tools/server.py
4
4876
#! /usr/bin/env python # # This is a 'unified' server used in our testing for serving: # - RCML (REST) for Restcomm at /rcml. The logic for RCML is to return a Dial command towards Restcomm Client userX, where X is a increasing counter reaching up to client count and wrapping around so that continuous tests can be ran ...
agpl-3.0
-708,012,142,459,918,800
41.4
238
0.713905
false
3.433803
false
false
false
antonbabenko/terrapin
jinja2_terraform/terraform.py
1
4027
from jinja2 import nodes from jinja2.ext import Extension from pprint import pprint import json, os, re class TerraformExtension(Extension): tags = set(['get_argument', 'get_attributes']) def __init__(self, environment): super(TerraformExtension, self).__init__(environment) # Returns argument (f...
mit
8,370,901,201,350,175,000
32.280992
120
0.539608
false
3.983185
false
false
false
iraklikhitarishvili/django_phonenumbers
django_phonenumbers/helper.py
1
3039
import json from phonenumbers.phonenumberutil import NumberParseException, PhoneNumberType import phonenumbers class PhoneNumber: def __init__(self, country_code=None, region_code=None, phone_number=None): """ :type country_code: str :type region_code: str :type phone_number: str ...
bsd-2-clause
-3,931,077,410,315,577,000
36.9875
106
0.610398
false
3.876276
false
false
false
tuskar/tuskar
tuskar/api/controllers/v1/data_center.py
1
2052
from oslo.config import cfg import pecan from pecan.core import render from pecan import rest import wsme from wsme import api from wsme import types as wtypes import wsmeext.pecan as wsme_pecan from tuskar.compute.nova import NovaClient from tuskar.common import exception from tuskar.openstack.common import log cla...
apache-2.0
7,740,647,772,296,942,000
31.078125
76
0.588694
false
3.976744
false
false
false
aikramer2/spaCy
spacy/lang/ar/lex_attrs.py
2
1287
# coding: utf8 from __future__ import unicode_literals from ...attrs import LIKE_NUM _num_words = set(""" صفر واحد إثنان اثنان ثلاثة ثلاثه أربعة أربعه خمسة خمسه ستة سته سبعة سبعه ثمانية ثمانيه تسعة تسعه ﻋﺸﺮﺓ ﻋﺸﺮه عشرون عشرين ثلاثون ثلاثين اربعون اربعين أربعون أربعين خمسون خمسين ستون ستين سبعون سبعين ثمانون ثمانين تسعو...
mit
-5,375,745,259,441,140,000
9.326316
49
0.651376
false
1.754919
false
false
false
flaviovdf/prme
cross_val.py
1
2055
#-*- coding: utf8 from __future__ import division, print_function from prme import dataio from prme import learn import argparse import numpy as np import pandas as pd import os import time def main(): parser = argparse.ArgumentParser() parser.add_argument('trace_fpath', help='The trace to learn topics ...
bsd-3-clause
-7,128,675,811,640,889,000
30.136364
79
0.539659
false
3.650089
false
false
false
ryepdx/shipping_api_ups
sale.py
1
5133
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # # This program is f...
agpl-3.0
3,019,763,655,184,070,700
46.953271
144
0.550965
false
3.795118
false
false
false
FinalsClub/djKarma
notes/testStorage.py
1
5575
import os import errno import urlparse import itertools from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files import locks, File from django.core.files.move import file_move_safe from django.utils.encoding impo...
gpl-3.0
-4,242,711,096,556,767,000
36.668919
110
0.590673
false
4.321705
false
false
false
norikra/norikra-client-python
norikraclient/overhttp.py
1
1640
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import msgpack import requests REQUEST = 0 # [0, msgid, method, param] RESPONSE = 1 # [1, msgid, error, result] NOTIFY = 2 # [2, method, param] NO_METHOD_ERROR = 0x01 ARGUMENT_ERROR = 0x02 HEADER = {"Co...
mit
-7,840,799,284,672,270,000
24.625
71
0.583537
false
3.668904
false
false
false
iulian787/spack
var/spack/repos/builtin/packages/funhpc/package.py
5
1246
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Funhpc(CMakePackage): """FunHPC: Functional HPC Programming""" homepage = "https://g...
lgpl-2.1
-6,546,261,480,682,331,000
30.948718
95
0.660514
false
3.186701
false
false
false
google-code-export/google-app-engine-django
appengine_django/__init__.py
17
23021
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
5,856,999,678,005,734,000
36.070853
81
0.719864
false
4.187159
false
false
false
Sixshaman/networkx
networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality_subset.py
3
7364
#!/usr/bin/env python from nose.tools import * from nose import SkipTest import networkx as nx from nose.plugins.attrib import attr from networkx import edge_current_flow_betweenness_centrality \ as edge_current_flow from networkx import edge_current_flow_betweenness_centrality_subset \ as edge_current_flow_s...
bsd-3-clause
-8,135,722,823,612,396,000
39.685083
89
0.491173
false
3.879874
true
false
false
InspectorIncognito/visualization
AndroidRequests/migrations/0920_transformation_set_expire_time_and_timezone_20170829_1445.py
1
2024
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from datetime import timedelta from django.utils import timezone from pytz import timezone as tz def set_expire_time_and_add_timezone(apps, schema_editor): local = tz("America/Santiago") bus_events = apps.get_mo...
gpl-3.0
-3,282,499,314,915,510,000
36.481481
109
0.687253
false
3.65343
false
false
false
ndaniel/fqtools
remove_str.py
1
13891
#!/usr/bin/env python # -*- coding: utf-8 -*- """ It removes the reads which contain short tandem repeats (STR), as shown here: Gymrek M. et al., "lobSTR: A short tandem repeat profiler for personal genomes", Genome Res. 2012 22: 1154-1162, doi:10.1101/gr.135780.111 Author: Daniel Nicorici, Daniel.Nicorici@...
gpl-3.0
-1,956,939,157,608,461,300
29.14574
204
0.492117
false
3.81202
false
false
false
TheGurke/Progenitus
progenitus/settings.py
1
3395
# Written by TheGurke 2011 """Provides access to the user changed program parameters""" import sys import os from gettext import gettext as _ import logging import ConfigParser import config # # The _settings list defines all settings. These are loaded from/saved to a file # by the module and are accessible as a gl...
gpl-3.0
41,481,289,649,699,850
32.284314
80
0.672754
false
3.193791
true
false
false
nQuantums/gantest
pix2pix/model.py
1
7751
import chainer import chainer.functions as F import chainer.links as L import dnn # 参考元 https://github.com/pfnet-research/chainer-pix2pix # U-net https://arxiv.org/pdf/1611.07004v1.pdf # convolution-batchnormalization-(dropout)-relu class CBR(chainer.Chain): def __init__(self, ch0, ch1, bn=True, sample='down', activ...
mit
4,349,913,707,629,080,000
34.318841
99
0.648201
false
2.246773
false
false
false
setsuna-/pasteque
webtools/settings.py
1
3318
import os import django ### Useful constants DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__)) SITE_ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) ### Customize/configure Pasteque DISPLAY_NAME = 'Pasteque' ENABLED_RENDERERS = ('pygments', 'form', 'raw') # Ensure show-***.html exi...
mit
-625,908,796,174,785,900
28.891892
127
0.611212
false
3.496312
false
false
false
adambreznicky/javascript
Bicycle/Python/post_processing_v1.py
1
4299
__file__ = 'post_processing_v1' __date__ = '8/14/2015' __author__ = 'ABREZNIC' import arcpy, datetime, os now = datetime.datetime.now() curMonth = now.strftime("%m") curDay = now.strftime("%d") curYear = now.strftime("%Y") today = curYear + "_" + curMonth + "_" + curDay output = "C:\\TxDOT\\Scripts\\javascript\\Bicyc...
mit
7,544,894,649,764,413,000
38.449541
158
0.67318
false
2.871743
false
false
false
renatosamperio/context_task_queue
Provider/Service.py
1
14325
#!/usr/bin/env python import logging import zmq import threading import multiprocessing import sys import time import random import ctypes import json import psutil from zmq.devices import ProcessDevice from Utils.Utilities import * from Utils import Utilities REQUEST_TIMEOUT = 100 class TaskedService(object): ...
gpl-3.0
4,037,157,722,334,379,000
37.404826
122
0.557417
false
4.402274
false
false
false
numba/llvmlite
llvmlite/binding/ffi.py
1
10687
import ctypes import os import threading from llvmlite.binding.common import _decode_string, _is_shutting_down from llvmlite.utils import get_library_name def _make_opaque_ref(name): newcls = type(name, (ctypes.Structure,), {}) return ctypes.POINTER(newcls) LLVMContextRef = _make_opaque_ref("LLVMContext") ...
bsd-2-clause
3,451,725,601,466,513,000
27.883784
114
0.618134
false
3.7211
false
false
false
Lotame/api-examples
py/get_audience_behaviors.py
1
1602
''' Filename: get_audience_behaviors.py Author: Brett Coker Python Version: 3.6.2 Given a user-inputted audience ID, prints out a list of behaviors used to create that audience. ''' import better_lotameapi def find_behaviors(definition, behaviors): """ Adds all behavior IDs from an audien...
mit
-4,029,460,215,659,221,500
29.807692
79
0.661673
false
3.751756
false
false
false
lizardsystem/lizard-damage
lizard_damage/management/commands/clean_up.py
1
1100
# -*- coding: utf-8 -*- # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. from __future__ import ( print_function, absolute_import, division, ) from django.core.management.base import BaseCommand from lizard_damage.models import DamageScenario from lizard_task.models import SecuredPeriodicTask im...
gpl-3.0
8,923,007,855,508,759,000
27.205128
79
0.645455
false
3.914591
false
false
false
hosamshahin/xblock-utils-old
xblockutils/resources.py
1
2369
import os import sys import pkg_resources from django.template import Context, Template class ResourceLoader(object): """Loads resources relative to the module named by the module_name parameter.""" def __init__(self, module_name): self.module_name = module_name def load_unicode(self, resource_pa...
agpl-3.0
4,712,521,787,626,106,000
38.483333
97
0.612917
false
4.512381
false
false
false
formalmethods/intrepyd
intrepyd/iec611312py/datatype.py
1
2009
""" Copyright (C) 2018 Roberto Bruttomesso <roberto.bruttomesso@gmail.com> This file is distributed under the terms of the 3-clause BSD License. A copy of the license can be found in the root directory or at https://opensource.org/licenses/BSD-3-Clause. Author: Roberto Bruttomesso <roberto.bruttomesso@gmail.com> Da...
bsd-3-clause
-4,906,452,303,526,070,000
18.133333
70
0.600796
false
3.581105
false
false
false
zigitax/toby
toby.py
3
1582
#! /usr/bin/env python import os import magic import argparse from termcolor import colored from subprocess import Popen, PIPE parser = argparse.ArgumentParser(description='Toby', epilog='Yes, a queer mongrel, with a most amazing power of scent') parser.add_argument('-i', dest='case', action='store_true', default=Fal...
bsd-2-clause
-3,419,564,047,212,348,400
32.659574
119
0.671302
false
3.344609
false
false
false
markstory/lint-review
lintreview/tools/remarklint.py
1
2852
import os import re import lintreview.docker as docker from lintreview.tools import Tool, extract_version # matches: ' 1:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint' # matches: ' 18:71-19:1 error Missing new line after list item list-item-spacing remark-lint', warning_patt...
mit
8,224,470,795,872,419,000
33.361446
99
0.58345
false
3.901505
false
false
false
Azure/azure-sdk-for-python
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_postgre_sql_management_client_enums.py
1
3946
# 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 may ...
mit
7,658,230,276,035,704,000
29.589147
94
0.651546
false
3.981837
false
false
false
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models8984.py
2
17582
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
-319,022,468,935,179,000
46.136729
75
0.699863
false
2.616758
false
false
false
aelaguiz/pyvotune
pyvotune/genome.py
1
7297
# -*- coding: utf-8 -*- """ pyvotune.genome -------------------------- This module defines the Genome class which represents one genetic identity and can be translated (assembled) into an individual """ from pyvotune.log import logger from pyvotune.assembly_state import AssemblyState from pyvotune.p...
mit
-2,547,869,940,535,663,000
32.0181
94
0.541318
false
3.9147
false
false
false
googlefonts/gftools
bin/gftools-check-font-version.py
1
3259
#!/usr/bin/env python3 # Copyright 2017 The Fontbakery Authors # Copyright 2017 The Google Font Tools 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/lice...
apache-2.0
-7,221,565,789,292,313,000
32.597938
81
0.667383
false
3.686652
false
false
false
jumpserver/jumpserver
apps/assets/signals_handler/common.py
1
7980
# -*- coding: utf-8 -*- # from django.db.models.signals import ( post_save, m2m_changed, pre_delete, post_delete, pre_save ) from django.dispatch import receiver from common.exceptions import M2MReverseNotAllowed from common.const.signals import POST_ADD, POST_REMOVE, PRE_REMOVE from common.utils import get_logger...
gpl-2.0
8,257,658,432,536,174,000
31.089686
104
0.670347
false
2.744918
false
false
false
tovmeod/anaf
anaf/sales/serializers.py
1
1374
from rest_framework import serializers from anaf.sales.models import SaleStatus, Product, SaleSource, Lead, Opportunity, SaleOrder, Subscription, \ OrderedProduct from anaf.serializers import common_exclude class SaleStatusSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = SaleSt...
bsd-3-clause
-8,675,777,678,873,703,000
24.924528
108
0.739447
false
4.787456
false
false
false
franklingu/leetcode-solutions
questions/unique-paths/Solution.py
1
1217
""" A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below). How many possible unique paths are there? ![...
mit
1,201,154,954,422,843,100
27.302326
171
0.599014
false
3.487106
false
false
false
mykonosbiennale/mykonosbiennale.github.io
material/migrations/0001_initial.py
2
1740
# -*- coding: utf-8 -*- from __future__ import unicode_literals import tagulous.models.fields import tagulous.models.models from django.db import models, migrations class Migration(migrations.Migration): # dependencies = [ # ('photologue', '0011_auto_20170327_0213'), # ] operations = [ ...
apache-2.0
3,802,548,976,402,582,000
39.465116
175
0.574713
false
4.213075
false
false
false
windrobin/mapbender-starter
documentation/conf.py
1
8569
# -*- coding: utf-8 -*- # # Mapbender3 documentation build configuration file, created by # sphinx-quickstart on Sun Jul 8 00:08:58 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
mit
-1,278,524,554,482,438,700
31.458333
80
0.708951
false
3.685591
true
false
false
ksugio/MPGrid
python/viewer.py
1
47565
import MPGrid import MPGLGrid import sys import math import numpy as np import cv2 from PyQt5 import QtCore, QtGui, QtWidgets, QtOpenGL from OpenGL import GL from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure """ GLWidget Class """ class ...
mit
-2,045,716,905,723,739,100
33.078909
132
0.639399
false
3.268174
false
false
false
CRImier/WCS
ui/checkbox.py
2
14474
from time import sleep from copy import copy import logging def to_be_foreground(func): #A safety check wrapper so that certain checks don't get called if menu is not the one active def wrapper(self, *args, **kwargs): if self.in_foreground: return func(self, *args, **kwargs) else: ...
apache-2.0
8,432,760,543,074,343,000
54.455939
295
0.652342
false
4.404747
false
false
false
RNAcentral/rnacentral-import-pipeline
tests/databases/ensembl/utils.py
1
2029
""" Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
apache-2.0
9,089,091,055,178,404,000
31.725806
83
0.663381
false
4.115619
false
false
false
pyjs/pyjs
pgen/lib2to3/compiler/parse_tables.py
12
30321
# generated by pgen/main.py import token SkulptOpMap = { "(": token.LPAR, ")": token.RPAR, "[": token.LSQB, "]": token.RSQB, ":": token.COLON, ",": token.COMMA, ";": token.SEMI, "+": token.PLUS, "-": token.MINUS, "*": token.STAR, "/": token.SLASH, "|": token.VBAR, "&": token.AMPER, "<": token.LESS, ">": token.GREATER, ...
apache-2.0
5,961,878,072,683,487,000
19.308774
78
0.308862
false
2.316525
false
false
false
gtrdp/twitter-clustering
old/testing_file.py
1
1686
# import csv # # my_dict = {"test": [1,2,3,4], "testing": [1,2,3,4]} # # # with open('mycsvfile.csv', 'wb') as f: # Just use 'w' mode in 3.x # # w = csv.DictWriter(f, my_dict.keys()) # # w.writeheader() # # w.writerow(my_dict) # # d = {"key1": [1,2,3], "key2": [4,5,6], "key3": [7,8,9]} # with open("mycsvfi...
mit
-1,756,010,410,834,731,000
24.938462
78
0.653618
false
2.494083
false
false
false
nitely/http-lazy-headers
http_lazy_headers/fields/authorization.py
1
3103
# -*- coding: utf-8 -*- import base64 from ..shared.generic import formatters from ..shared.generic import cleaners from ..shared.utils import checkers from ..shared.utils import constraints from ..shared.utils import parsers from ..shared import bases from ..shared import parameters from ..shared.utils import assert...
mit
-909,011,669,631,084,900
24.644628
71
0.529165
false
4.687311
false
false
false
pallavagarwal07/PathPicker
src/stateFiles.py
6
1460
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # from __future__ import ...
bsd-3-clause
5,849,013,383,512,458,000
24.172414
77
0.691781
false
3.578431
false
false
false
jvy1106/webpyutils
webpyutils/api.py
1
6592
'''utilities to make web.py restful api server''' import sys import logging import logging.handlers import web import time import os import json from web.webapi import HTTPError from functools import partial, wraps #json encode that supports datetime objects json_dumps = partial(json.dumps, default=lambda x: {'__isoda...
gpl-2.0
2,839,148,087,272,335,400
36.885057
128
0.600273
false
3.983082
false
false
false
nolanliou/tensorflow
tensorflow/contrib/bayesflow/python/ops/mcmc_diagnostics_impl.py
2
9116
# Copyright 2018 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,542,505,405,448,584,000
38.982456
80
0.671676
false
3.661044
false
false
false
yaniv14/OpenCommunity
src/ocd/custom_whoosh_backend.py
2
5600
from __future__ import unicode_literals from django.apps import apps from haystack.backends.whoosh_backend import WhooshEngine from haystack.backends.whoosh_backend import WhooshSearchBackend from haystack.fields import BooleanField from haystack.constants import ID, DJANGO_CT, DJANGO_ID from haystack.models import Se...
bsd-3-clause
980,769,038,664,400,800
40.798507
119
0.556786
false
4.55655
false
false
false
Han0nly/crypto
solutions/prob2.py
2
1300
#!/usr/bin/env python # Written against python 3.3.1 # Matasano Problem 2 # Write a function that takes two equal-length buffers and produces # their XOR sum. # For example: # hex_xor(1c0111001f010100061a024b53535009181c, 686974207468652062756c6c277320657965) = # 746865206b696420646f6e277420706c6179 from pro...
mit
1,661,865,016,067,436,300
26.304348
88
0.626154
false
2.863436
false
false
false
waltervh/BornAgain-tutorial
old/bornagain-python/fitting/advanced-tutorial/step6_sample_builder.py
2
4683
""" Two parameter fit of spheres in a hex lattice. Sample builder approach is used to demonstrate how to introduce custom fit parameters. """ import math import random import ctypes import bornagain as ba from matplotlib import pyplot as plt from bornagain import deg, angstrom, nm class MySampleBuilder(ba.IMultiLaye...
gpl-3.0
1,145,338,321,854,687,700
33.947761
98
0.686526
false
3.764469
false
false
false
elisamussumeci/InfoDenguePredict
infodenguepredict/models/qqplot.py
1
3319
import numpy as np import pandas as pd import scipy.stats as ss from matplotlib import pyplot as P from infodenguepredict.data.infodengue import get_alerta_table from infodenguepredict.models.deeplearning.lstm import single_prediction from infodenguepredict.predict_settings import * def create_px(row): res = ss...
gpl-3.0
-8,880,153,243,621,971,000
32.877551
120
0.585417
false
3.234893
false
false
false
ivannz/study_notes
year_14_15/spring_2015/structural_classification/project/FillGaps.py
1
4033
# -*- coding: UTF-8 -*- __author__ = 'Tanya' import numpy as np import heapq def distance (x1,x2): return sum(np.square(x1-x2)) def fill_by_mean(classes,data,mask): sz = data.shape n = sz[0] # observ m = sz[1] # attr for cl in classes: dt_cl = data[cl,:] msk_cl = ...
mit
6,151,333,305,896,593,000
33.485437
81
0.553215
false
2.557733
false
false
false
xzturn/tensorflow
xzturn/textcnn/eval.py
1
4130
#! /usr/bin/env python from __future__ import print_function import csv import numpy as np import os import sys import tensorflow as tf import time from data_helpers import CorpusProcessor from tensorflow.contrib import learn # Parameters # ================================================== FLAGS = tf.app.flags.F...
apache-2.0
8,848,700,532,492,913,000
35.548673
106
0.632446
false
3.707361
true
false
false
zasdfgbnm/tensorflow
tensorflow/contrib/learn/python/learn/experiment.py
5
38499
# 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
-8,534,967,689,067,176,000
40.219486
80
0.66355
false
4.269128
true
false
false
Ukrainian-History/autoBWF
setup.py
1
1372
from setuptools import setup, find_packages with open('README.md') as readme_file: readme = readme_file.read() with open('HISTORY.md') as history_file: history = history_file.read() requirements = ['appdirs', 'PyQt5', ] setup_requirements = [ ] test_requirements = [ ] setup( author="Michael Andrec/Ukr...
gpl-3.0
-1,682,781,034,858,509,300
30.181818
75
0.650146
false
3.322034
false
false
false
bobbymckinney/hall_measurement
program_roomtemp/checkIV.py
3
15744
#! /usr/bin/python # -*- coding: utf-8 -*- import os import matplotlib from matplotlib.figure import Figure from matplotlib.pyplot import gcf, setp import matplotlib.animation as animation # For plotting import pylab import numpy as np import matplotlib.pyplot as plt import visa # pyvisa, essential for communicating w...
gpl-3.0
-6,700,590,048,295,980,000
35.02746
132
0.419271
false
4.264355
false
false
false
jakevdp/JSAnimation
make_lorenz_animation.py
2
2517
""" Lorenz animation Adapted from http://jakevdp.github.io/blog/2013/02/16/animating-the-lorentz-system-in-3d/ """ import numpy as np from scipy import integrate from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.colors import cnames from matplotlib import animation from JS...
bsd-2-clause
8,323,704,906,044,656,000
26.966667
89
0.634883
false
2.989311
false
false
false
raiden-network/raiden
raiden/tests/benchmark/conftest.py
1
2231
import contextlib import shlex import subprocess import time import pytest from raiden.tests.integration.fixtures.blockchain import * # noqa: F401,F403 from raiden.tests.integration.fixtures.raiden_network import * # noqa: F401,F403 from raiden.tests.integration.fixtures.smartcontracts import * # noqa: F401,F403 f...
mit
7,974,123,227,101,411,000
27.974026
98
0.651277
false
3.54127
true
false
false
Ecogenomics/GtdbTk
gtdbtk/biolib_lite/logger.py
1
10575
############################################################################### # # # 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 # ...
gpl-3.0
-626,843,219,027,682,700
41.131474
102
0.534752
false
4.240176
false
false
false
netheosgithub/pcs_api
python/pcs_api/providers/rapidshare.py
1
26007
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Netheos (http://www.netheos.net) # # 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 req...
apache-2.0
921,988,323,132,756,200
46.199637
120
0.595032
false
4.106585
false
false
false
keelerm84/powerline
powerline/segments/vim.py
1
12215
# vim:fileencoding=utf-8:noet from __future__ import unicode_literals, absolute_import, division import os try: import vim except ImportError: vim = {} # NOQA from powerline.bindings.vim import (vim_get_func, getbufvar, vim_getbufoption, buffer_name, vim_getwinvar) from powerline.theme import requires_se...
mit
-7,414,416,708,974,133,000
28.061905
111
0.689005
false
3.07999
false
false
false
BradyHammond/Topic_Modeler
topic_modeler.py
1
62959
"""==================================================""" """                  TOPIC MODELER                   """ """==================================================""" """ AUTHOR: Brady Hammond                            """ """ CREATED: 12/17/16                                """ """ EDITED BY: Brady Hammond       ...
gpl-3.0
-7,808,246,101,317,936,000
47.849145
120
0.585801
false
4.006122
false
false
false
KristoferHellman/gimli
python/generate_pygimli_code.py
1
21757
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil import sys import string from environment_for_pygimli_build import settings from optparse import OptionParser optionParser = OptionParser("usage: %prog [options]") optionParser.add_option("", "--extra-includes", dest="extraIncludes") optionParser....
gpl-3.0
-2,866,551,374,919,993,000
35.505034
135
0.535782
false
4.062932
false
false
false
TrashNetwork/trashnetwork-web
trashnetwork/view/v1/mobile/public.py
1
1211
from rest_framework import status from rest_framework.decorators import api_view from rest_framework.request import Request from django.utils.translation import ugettext as _ from trashnetwork import models from trashnetwork.view import result_code from trashnetwork.util import view_utils from trashnetwork.view.check_...
gpl-3.0
-2,088,623,010,488,213,000
40.758621
109
0.718415
false
3.469914
false
false
false