repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
matiboy/django_safari_notifications
django_safari_notifications/apps.py
1
1111
# -*- coding: utf-8 from django.apps import AppConfig import logging class DjangoSafariNotificationsConfig(AppConfig): name = 'django_safari_notifications' verbose_name = 'Safari Push Notifications' version = 'v1' service_base = 'push' userinfo_key = 'userinfo' logger = logging.getLogger('djan...
mit
-6,515,032,378,796,969,000
38.678571
115
0.673267
false
3.715719
false
false
false
TomSkelly/MatchAnnot
showAnnot.py
1
2299
#!/usr/bin/env python # Read annotation file, print selected stuff in human-readable format. # AUTHOR: Tom Skelly (thomas.skelly@fnlcr.nih.gov) import os import sys import optparse import re # regular expressions import cPickle as pickle from tt_log import logger import Annotations as anno VERSION = '201504...
gpl-3.0
-1,754,153,406,302,757,400
24.263736
94
0.579382
false
3.467572
false
false
false
Midrya/chromium
rietveld.py
1
26054
# coding: utf-8 # Copyright (c) 2012 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. """Defines class Rietveld to easily access a rietveld instance. Security implications: The following hypothesis are made: - Rietveld enf...
bsd-3-clause
759,426,349,750,002,600
34.253045
80
0.620183
false
3.801547
false
false
false
gonicus/gosa
backend/src/gosa/backend/plugins/samba/logonhours.py
1
2755
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import time from gosa.backend.objects.types import AttributeType class SambaLogonHoursAttribute(At...
lgpl-2.1
5,620,265,410,477,604,000
29.611111
103
0.549546
false
3.837047
false
false
false
mice-software/maus
tests/integration/test_simulation/test_beam_maker/binomial_beam_config.py
1
4151
# This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus # # MAUS 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...
gpl-3.0
8,497,676,633,273,780,000
37.082569
80
0.544688
false
3.245504
false
false
false
amagnus/pulsegig
app/models.py
1
1894
from django.db import models from django.contrib.auth.models import User class Guy(models.Model): user = models.OneToOneField(User, primary_key=True) cell = models.CharField(max_length=15) metroarea_name = models.CharField(max_length=30, default=None, null=True) metroareaID = models.IntegerField(defau...
mit
-6,112,383,756,835,243,000
30.566667
77
0.705913
false
3.743083
false
false
false
PyBossa/pybossa
pybossa/auth/token.py
1
1271
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
7,030,215,194,736,983,000
30
77
0.683714
false
3.875
false
false
false
ekumenlabs/terminus
terminus/generators/rndf_id_mapper.py
1
2695
""" Copyright (C) 2017 Open Source Robotics Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
apache-2.0
-5,815,910,434,938,483,000
35.418919
77
0.661224
false
3.550725
false
false
false
wkia/kodi-addon-repo
plugin.audio.openlast/default.py
1
6672
# -*- coding: utf-8 -*- import os import sys import urllib import urlparse import xbmcaddon import xbmcgui import xbmcplugin if sys.version_info < (2, 7): import simplejson as json else: import json from logging import log from util import build_url __addon__ = xbmcaddon.Addon() #__addonid__ = __addon__.get...
gpl-2.0
4,180,069,975,239,429,000
37.566474
127
0.618855
false
3.439175
false
false
false
mozman/ezdxf
tests/test_06_math/test_630b_bezier4p_functions.py
1
4662
# Copyright (c) 2010-2020 Manfred Moitzi # License: MIT License import pytest import random from ezdxf.math import ( cubic_bezier_interpolation, Vec3, Bezier3P, quadratic_to_cubic_bezier, Bezier4P, have_bezier_curves_g1_continuity, bezier_to_bspline, ) def test_vertex_interpolation(): points = [(0, 0), (...
mit
2,218,089,063,526,213,400
35.40625
81
0.65794
false
2.729936
true
false
false
fdouetteau/PyBabe
pybabe/format_csv.py
1
3107
from base import BabeBase, StreamHeader, StreamFooter import csv from charset import UTF8Recoder, UTF8RecoderWithCleanup, PrefixReader, UnicodeCSVWriter import codecs import logging log = logging.getLogger("csv") def linepull(stream, dialect, kwargs): it = iter(stream) fields = kwargs.get('fields', None) ...
bsd-3-clause
-8,952,105,549,496,500,000
30.07
88
0.631799
false
3.703218
false
false
false
filippog/pysnmp
examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py
1
1601
""" SNMPv3 TRAP: auth SHA, privacy: AES128 ++++++++++++++++++++++++++++++++++++++ Send SNMP notification using the following options: * SNMPv3 * with authoritative snmpEngineId = 0x8000000001020304 (USM must be configured at the Receiver accordingly) * with user 'usr-sha-aes128', auth: SHA, priv: AES128 * over IPv...
bsd-3-clause
7,296,825,608,207,418,000
38.04878
183
0.647096
false
3.573661
false
true
false
SU-ECE-17-7/hotspotter
hsviz/draw_func2.py
1
54605
''' Lots of functions for drawing and plotting visiony things ''' # TODO: New naming scheme # viz_<func_name> will clear everything. The current axes and fig: clf, cla. # Will add annotations # interact_<func_name> will clear everything and start user interactions. # show_<func_name> will always clear the current axes...
apache-2.0
-1,678,968,028,501,710,800
31.697605
119
0.588353
false
3.052776
false
false
false
silas/rock
rock/text.py
1
1235
from __future__ import unicode_literals def _(text): return text.strip('\n') USAGE = _(""" Usage: rock [--help] [--env=ENV] [--path=PATH] [--runtime=RUNTIME] command """) HELP = _(""" --help show help message --verbose show script while running --dry-run show script without r...
mit
5,519,456,527,590,050,000
20.293103
74
0.545749
false
4.116667
false
false
false
setsid/yacron
yacron/time.py
1
5052
""" This file is part of yacron. Copyright (C) 2016 Vadim Kuznetsov <vimusov@gmail.com> yacron 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...
gpl-3.0
7,801,523,714,869,108,000
35.345324
116
0.598773
false
4.103981
false
false
false
UCSC-iGEM-2016/taris_controller
taris_controller/taris_sensor.py
1
9944
#!/usr/bin/python from __future__ import print_function import io # used to create file streams import fcntl # used to access I2C parameters like addresses import sys import time # used for sleep delay and timestamps class Taris_Sensor(): ''' This object holds all required interface d...
gpl-3.0
2,327,405,068,719,227,000
38.776
117
0.559433
false
4.107394
false
false
false
lezizi/A-Framework
python/local-source/source.py
1
2324
#!/usr/bin/env python # # Copyright (C) 2012 LeZiZi Studio # # 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 r...
apache-2.0
-1,190,390,218,465,255,400
25.023256
76
0.547762
false
4.070053
false
false
false
lyndsysimon/hgrid-git-example
app.py
1
1874
from flask import Flask, jsonify, render_template, request import json import os import tempfile app = Flask(__name__) from git_subprocess import Repository repo_path = '/tmp/test/' # Set up a git repository for a storage backend repo = Repository(repo_path or tempfile.mkdtemp()) repo.init() # Homepage - just rend...
bsd-2-clause
4,562,782,882,468,337,000
23.337662
70
0.593917
false
3.432234
false
false
false
lliss/tr-55
tr55/model.py
1
14151
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division """ TR-55 Model Implementation A mapping between variable/parameter names found in the TR-55 document and variables used in this program are as follows: * `precip` is referred to as P...
apache-2.0
-1,927,152,914,711,812,900
33.098795
77
0.596636
false
3.429714
false
false
false
luwei0917/awsemmd_script
small_script/computeRg.py
1
2040
from Bio.PDB.PDBParser import PDBParser import argparse parser = argparse.ArgumentParser(description="Compute Rg of pdb") parser.add_argument("pdb", help="pdb file") args = parser.parse_args() def computeRg(pdb_file, chain="A"): # compute Radius of gyration # pdb_file = f"/Users/weilu/Research/server/feb_2019/...
mit
9,124,268,330,187,088,000
35.428571
141
0.59951
false
3.022222
false
false
false
Airbitz/airbitz-ofx
qbo.py
1
7851
##################################################################### # # # File: qbo.py # # Developer: Justin Leto # # # # qbo class provides an interface from main csv iterator method # # to handle qbo formatting, validations, and writing to file. # # ...
mit
1,675,282,766,867,628,800
31.126582
155
0.603235
false
3.155547
false
false
false
berkerpeksag/pythondotorg
pydotorg/settings/base.py
1
5943
import os import dj_database_url ### Basic config BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) DEBUG = TEMPLATE_DEBUG = True SITE_ID = 1 SECRET_KEY = 'its-a-secret-to-everybody' # Until Sentry works on Py3, do errors the old-fashioned way. ADMINS = [] # General project information # T...
apache-2.0
-7,469,629,725,360,730,000
23.557851
79
0.676931
false
3.346284
false
false
false
stevegt/UltimakerUtils
leveling-rings-UM1.py
1
2681
#!/usr/bin/python # Derived from the UM2 version by an anonymous contributor... # # http://umforum.ultimaker.com/index.php?/topic/5951-um2-calibration-utility-leveling-ringsgcode/?p=54694 # # ...who wisely says: "I accept NO liability for any damage done by # using either version or any derivatives. USE AT YOUR OWN...
gpl-2.0
5,621,385,078,935,052,000
30.174419
118
0.564715
false
3.099422
false
false
false
udapi/udapi-python
udapi/block/ud/complywithtext.py
1
11648
r"""Block ComplyWithText for adapting the nodes to comply with the text. Implementation design details: Usually, most of the inconsistencies between tree tokens and the raw text are simple to solve. However, there may be also rare cases when it is not clear how to align the tokens (nodes in the tree) with the raw text...
gpl-3.0
6,423,815,890,427,901,000
42.75188
99
0.559117
false
3.789645
false
false
false
storiesofsolidarity/story-database
stories/admin.py
1
1393
from django.contrib import admin from models import Location, Story from people.models import Author class LocationAdmin(admin.ModelAdmin): list_display = ('zipcode', 'city_fmt', 'county_fmt', 'state_fmt', 'story_count') list_filter = ('state',) search_fields = ('zipcode', 'city', 'county') admin.site.re...
agpl-3.0
-544,278,433,607,546,560
33.825
104
0.648959
false
3.491228
false
false
false
peppelinux/inventario_verdebinario
museo/models.py
1
4183
from django.db import models from photologue.models import ImageModel from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ class Produttore(ImageModel): id_tabella = models.AutoField(primary_key=True) nome = models.CharField(max_length=135, blank=True) nome_...
gpl-3.0
3,234,902,780,985,170,000
44.967033
117
0.671528
false
3.220169
false
false
false
XtheOne/Inverter-Data-Logger
InverterLib.py
1
3301
import socket import struct import os import binascii import sys if sys.version[0] == '2': reload(sys) sys.setdefaultencoding('cp437') def getNetworkIp(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.setsockopt(socket.SOL_SOCKET, so...
gpl-3.0
8,714,258,900,020,281,000
33.385417
115
0.62678
false
3.54565
false
false
false
jiaojianbupt/tools
project_manager/alias.py
1
1746
# -*- coding: utf-8 -*- """ Created by jiaojian at 2018/6/29 16:30 """ import os import sys import termios from tools.utils.basic_printer import print_with_style, ConsoleColor HOME = os.environ['HOME'] def get_input(): fd = sys.stdin.fileno() old_tty_info = termios.tcgetattr(fd) new_tty_info = old_tty_inf...
gpl-3.0
-6,002,306,353,356,231
35.375
119
0.587056
false
3.332061
false
false
false
dapengchen123/code_v1
reid/datasets/market1501.py
1
3563
from __future__ import print_function, absolute_import import os.path as osp from ..utils.data import Dataset from ..utils.osutils import mkdir_if_missing from ..utils.serialization import write_json class Market1501(Dataset): url = 'https://drive.google.com/file/d/0B8-rUzbwVRk0c054eEozWG9COHM/view' md5 = '6...
mit
-2,535,048,846,858,501,600
36.505263
78
0.561605
false
3.782378
false
false
false
glenflet/ZtoRGBpy
ZtoRGBpy/_info.py
1
2082
# -*- coding: utf-8 -*- # ================================================================================= # Copyright 2019 Glen Fletcher <mail@glenfletcher.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...
mit
-2,552,345,746,239,531,500
40.64
120
0.662344
false
3.869888
false
false
false
ElecProg/decmath
decmath/trig.py
1
4598
from decimal import getcontext, Decimal from decmath import _pi, _to_Decimal, sign # Trigonometric functions def acos(x): """Return the arc cosine (measured in radians) of x.""" x = _to_Decimal(x) if x.is_nan(): return Decimal("NaN") elif abs(x) > 1: raise ValueError("Domain error: a...
mit
-8,599,662,519,578,526,000
22.579487
73
0.45933
false
3.102564
false
false
false
martindurant/astrobits
time_series.py
1
12543
"""Take a list of files and known star coordinates, and perform photometry on them all, either with apertures (phot) or by PSF fitting (daophot, which required additional parameters and is apropriate to poor S/N or crowded fields). Makes extensive use of iraf tasks; set all photometry parameters before running: datapar...
mit
-5,665,480,579,238,870,000
42.251724
97
0.63358
false
3.20957
false
false
false
freelawproject/recap-server
settings.py
1
1377
"""Settings are derived by compiling any files ending in .py in the settings directory, in alphabetical order. This results in the following concept: - default settings are in 10-public.py (this should contain most settings) - custom settings are in 05-private.py (an example of this file is here for you) - any o...
gpl-3.0
8,784,527,857,870,266,000
31.023256
80
0.697168
false
3.451128
false
false
false
mxamin/youtube-dl
youtube_dl/extractor/criterion.py
1
1284
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor class CriterionIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?criterion\.com/films/(?P<id>[0-9]+)-.+' _TEST = { 'url': 'http://www.criterion.com/films/184-le-samourai', 'md5': 'b...
unlicense
-7,290,849,255,959,012,000
30.292683
77
0.535464
false
3.439678
false
false
false
qedsoftware/commcare-hq
custom/opm/constants.py
1
1732
from corehq.apps.fixtures.models import FixtureDataItem from corehq.util.quickcache import quickcache DOMAIN = 'opm' PREG_REG_XMLNS = "http://openrosa.org/formdesigner/D127C457-3E15-4F5E-88C3-98CD1722C625" VHND_XMLNS = "http://openrosa.org/formdesigner/ff5de10d75afda15cddb3b00a0b1e21d33a50d59" BIRTH_PREP_XMLNS = "htt...
bsd-3-clause
7,714,274,633,423,886,000
44.578947
96
0.769053
false
2.255208
false
false
false
tonioo/modoboa
modoboa/lib/u2u_decode.py
1
2282
# -*- coding: utf-8 -*- """ Unstructured rfc2047 header to unicode. A stupid (and not accurate) answer to https://bugs.python.org/issue1079. """ from __future__ import unicode_literals import re from email.header import decode_header, make_header from email.utils import parseaddr from django.utils.encoding import...
isc
-962,520,203,660,710,000
26.493976
72
0.660824
false
3.510769
false
false
false
tudarmstadt-lt/topicrawler
lt.lm/src/main/py/mr_ngram_count.py
1
1297
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test: cat data | map | sort | reduce cat data | ./x.py -m | sort | ./x.py -r hadoop jar /opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/hadoop-streaming.jar \ -files x.py \ -mapper 'x.py -m' \ -reducer 'x.py -r' \ -input in \ -output out @author: stevo """ fr...
apache-2.0
-1,830,261,497,265,860,000
22.6
80
0.597533
false
3.117788
false
false
false
Ziqi-Li/bknqgis
bokeh/bokeh/sphinxext/example_handler.py
1
2905
import sys from ..application.handlers.code_runner import CodeRunner from ..application.handlers.handler import Handler from ..io import set_curdoc, curdoc class ExampleHandler(Handler): """ A stripped-down handler similar to CodeHandler but that does some appropriate monkeypatching to """ _output_f...
gpl-2.0
-5,235,527,630,608,026,000
27.203883
87
0.578313
false
3.878505
false
false
false
BurningNetel/ctf-manager
CTFmanager/tests/views/event/test_event.py
1
6138
import json from django.core.urlresolvers import reverse from CTFmanager.tests.views.base import ViewTestCase class EventPageAJAXJoinEventTest(ViewTestCase): """ Tests that a user can join an event A user should be able to join upcoming events. And get a response without the page reloading """ ...
gpl-3.0
-6,477,876,122,721,076,000
38.352564
87
0.654774
false
3.807692
true
false
false
jeffmurphy/cif-router
poc/cif-router.py
1
21349
#!/usr/bin/python # # # cif-router proof of concept # # cif-router [-p pubport] [-r routerport] [-m myname] [-h] # -p default: 5556 # -r default: 5555 # -m default: cif-router # # cif-router is a zmq device with the following sockets: # XPUB # for republishing messages # XSUB # ...
bsd-3-clause
-4,783,758,994,462,898,000
44.230932
161
0.492154
false
4.620996
false
false
false
fdouetteau/PyBabe
pybabe/pivot.py
1
2935
try: from collections import OrderedDict except: ## 2.6 Fallback from ordereddict import OrderedDict from base import StreamHeader, StreamFooter, BabeBase class OrderedDefaultdict(OrderedDict): def __init__(self, *args, **kwargs): newdefault = None newargs = () if args: ...
bsd-3-clause
-1,801,747,529,367,375,600
33.529412
90
0.560136
false
4.186876
false
false
false
rbn42/stiler
config.py
1
1027
WinBorder = 2 LeftPadding = 15 BottomPadding = 15 TopPadding = BottomPadding RightPadding = BottomPadding NavigateAcrossWorkspaces = True # availabe in Unity7 TempFile = "/dev/shm/.stiler_db" LockFile = "/dev/shm/.stiler.lock" # This is the congiguration that works for unity7. If you are using a # different Desktop ...
mit
8,967,949,853,643,365,000
31.09375
76
0.685492
false
3.22956
false
false
false
ojii/sandlib
lib/lib_pypy/_ctypes/primitive.py
1
11496
import _ffi import _rawffi import weakref import sys SIMPLE_TYPE_CHARS = "cbBhHiIlLdfguzZqQPXOv?" from _ctypes.basics import _CData, _CDataMeta, cdata_from_address,\ CArgObject from _ctypes.builtin import ConvMode from _ctypes.array import Array from _ctypes.pointer import _Pointer, as_ffi_pointer #from _ctypes....
bsd-3-clause
4,007,503,311,104,080,000
31.752137
78
0.501044
false
4.08674
false
false
false
mongolab/mongoctl
mongoctl/tests/sharded_test.py
1
2582
# The MIT License # Copyright (c) 2012 ObjectLabs Corporation # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, mo...
mit
1,538,437,245,596,689,700
33.891892
124
0.585593
false
4.635548
true
false
false
jamasi/Xtal-xplore-R
gui/doublespinslider.py
1
3682
# -*- coding: utf-8 -*- """DoubleSpinSlider - a custom widget combining a slider with a spinbox Copyright (C) 2014 Jan M. Simons <marten@xtal.rwth-aachen.de> 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...
agpl-3.0
7,329,879,116,559,789,000
38.591398
77
0.655894
false
3.835417
false
false
false
adw0rd/lettuce-py3
lettuce/__init__.py
1
6767
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
gpl-3.0
-6,675,595,172,369,562,000
30.469767
83
0.604936
false
4.143295
false
false
false
sam-roth/Keypad
keypad/plugins/shell/bourne_model.py
1
4068
import subprocess import shlex from keypad.api import (Plugin, register_plugin, Filetype, Cursor) from keypad.abstract.code import IndentRetainingCodeModel, AbstractCompletionResults from keypad.core.syntaxlib import SyntaxHighlighter, lazy from keypad...
gpl-3.0
-4,100,649,501,340,423,000
26.863014
91
0.555556
false
4.360129
false
false
false
dmvieira/P.O.D.
func.py
1
5799
from mergesort import * def comeca(sequencia,entrada,entrada2,entrada3): div=open(entrada3,'w') t=open(entrada,'r') saida=open(entrada2,'w') x=t.readlines() if (x[-1][-1])<>'\n': comp=x[-1][-1] comp=comp+'\n' x.insert(-1,co...
gpl-3.0
-1,694,803,398,801,581,800
52.196262
904
0.272116
false
2.777299
false
false
false
cdriehuys/chmvh-website
chmvh_website/contact/forms.py
1
2333
import logging from smtplib import SMTPException from captcha.fields import ReCaptchaField from django import forms from django.conf import settings from django.core import mail from django.template import loader logger = logging.getLogger("chmvh_website.{0}".format(__name__)) class ContactForm(forms.Form): c...
mit
3,360,558,135,283,314,700
28.1625
76
0.582512
false
4.078671
false
false
false
gdsfactory/gdsfactory
pp/components/coupler.py
1
2755
import pp from pp.component import Component from pp.components.coupler_straight import coupler_straight from pp.components.coupler_symmetric import coupler_symmetric from pp.cross_section import get_waveguide_settings from pp.snap import assert_on_1nm_grid from pp.types import ComponentFactory @pp.cell_with_validato...
mit
505,920,847,848,893,060
29.955056
84
0.52559
false
3.44806
false
false
false
Murali-group/GraphSpace
applications/uniprot/models.py
1
1246
from __future__ import unicode_literals from sqlalchemy import ForeignKeyConstraint, text from applications.users.models import * from django.conf import settings from graphspace.mixins import * Base = settings.BASE # ================== Table Definitions =================== # class UniprotAlias(IDMixin, TimeStamp...
gpl-2.0
1,488,446,659,459,923,500
27.976744
136
0.695024
false
3.178571
false
false
false
rohithredd94/Computer-Vision-using-OpenCV
Particle-Filter-Tracking/PF_Tracker.py
1
4110
import cv2 import numpy as mp from similarity import * from hist import * class PF_Tracker: def __init__(self, model, search_space, num_particles=100, state_dims=2, control_std=10, sim_std=20, alpha=0.0): self.model = model self.search_space = search_space[::-1] s...
mit
-8,084,760,379,983,337,000
37.92233
132
0.584672
false
3.506826
false
false
false
dc3-plaso/plaso
tests/storage/fake_storage.py
1
6205
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the fake storage.""" import unittest from plaso.containers import errors from plaso.containers import event_sources from plaso.containers import reports from plaso.containers import sessions from plaso.containers import tasks from plaso.lib import definitions fro...
apache-2.0
-6,102,286,598,320,775,000
27.204545
75
0.72361
false
4.026606
true
false
false
ella/django-ratings
django_ratings/aggregation.py
1
1768
""" This file is for aggregation records from Rating,Agg tables to Agg and TotalRate table """ import logging from datetime import datetime, timedelta from django_ratings.models import Rating, Agg, TotalRate logger = logging.getLogger('django_ratings') # aggregate ratings older than 2 years by year DELTA_TIME_YEAR ...
bsd-3-clause
4,587,567,461,580,501,500
28.966102
90
0.675339
false
3.292365
false
false
false
natcoin/natcoin
contrib/bitrpc/bitrpc.py
1
7836
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
mit
1,866,030,577,551,255,300
23.185185
79
0.66169
false
3.052591
false
false
false
javipalanca/ojoalplato
ojoalplato/users/models.py
1
1358
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
mit
3,922,233,845,667,998,000
30.581395
78
0.694404
false
3.720548
false
false
false
dwitvliet/CATMAID
django/applications/catmaid/control/link.py
1
6452
import json from django.http import HttpResponse from django.core.exceptions import ObjectDoesNotExist from catmaid.models import UserRole, Project, Relation, Treenode, Connector, \ TreenodeConnector, ClassInstance from catmaid.control.authentication import requires_user_role, can_edit_or_fail @requires_user...
gpl-3.0
-8,270,022,877,487,769,000
51.032258
257
0.688314
false
3.83591
false
false
false
manankalra/Twitter-Sentiment-Analysis
main/sentiment/tweepy_demo/tweep.py
1
1099
#!/usr/bin/env python """ tweepy(Twitter API) demo """ __author__ = "Manan Kalra" __email__ = "manankalr29@gmail.com" from tweepy import Stream, OAuthHandler from tweepy.streaming import StreamListener import time # Add your own consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" c...
mit
3,081,403,557,936,290,300
23.422222
75
0.605096
false
3.423676
false
false
false
Bladefidz/wfuzz
plugins/iterations.py
1
2703
from externals.moduleman.plugin import moduleman_plugin import itertools class piterator_void: text="void" def count(self): return self.__count def __init__(self, *i): self._dic = i self.__count = max(map(lambda x:x.count(), i)) self.it = self._dic[0] def next(self):...
gpl-2.0
2,271,427,541,823,712,800
24.261682
181
0.564928
false
3.785714
false
false
false
berkmancenter/mediacloud
apps/common/src/python/mediawords/db/locks.py
1
3477
"""Constants and routines for handling advisory postgres locks.""" import mediawords.db from mediawords.util.log import create_logger from mediawords.util.perl import decode_object_from_bytes_if_needed log = create_logger(__name__) """ This package just has constants that can be passed to the first value of the post...
agpl-3.0
1,828,699,678,270,009,600
33.425743
117
0.667242
false
3.261726
false
false
false
QTek/QRadio
tramatego/src/tramatego/transforms/ipv4_to_score.py
1
1161
#!/usr/bin/env python from canari.maltego.utils import debug, progress from canari.framework import configure #, superuser from canari.maltego.entities import IPv4Address, Phrase from common.launchers import get_qradio_data __author__ = 'Zappus' __copyright__ = 'Copyright 2016, TramaTego Project' __credits__ = [] _...
apache-2.0
7,825,119,063,382,835,000
24.822222
115
0.676141
false
3.345821
false
false
false
coinkite/connectrum
connectrum/findall.py
1
4527
#!/usr/bin/env python3 # # import bottom, random, time, asyncio from .svr_info import ServerInfo import logging logger = logging.getLogger('connectrum') class IrcListener(bottom.Client): def __init__(self, irc_nickname=None, irc_password=None, ssl=True): self.my_nick = irc_nickname or 'XC%d' % random.ran...
mit
8,429,156,360,593,355,000
31.106383
103
0.610559
false
3.69551
false
false
false
zstyblik/infernal-twin
sql_insert.py
1
3025
import MySQLdb import db_connect_creds from datetime import datetime username, password = db_connect_creds.read_creds() cxn = MySQLdb.connect('localhost', user=username, passwd=password) date = datetime.now() cxn.query('CREATE DATABASE IF NOT EXISTS InfernalWireless') cxn.commit() cxn.close() cxn = MySQLdb.connec...
gpl-3.0
-3,604,638,107,569,597,000
25.077586
315
0.676694
false
3.238758
false
false
false
ksteinfe/decodes
src/decodes/core/dc_mesh.py
1
6004
from decodes.core import * from . import dc_base, dc_vec, dc_point, dc_has_pts #here we may only import modules that have been loaded before this one. see core/__init__.py for proper order if VERBOSE_FS: print("mesh.py loaded") import copy, collections class Mesh(HasPts): """ a very simple mesh class "...
gpl-3.0
8,685,016,591,844,526,000
30.276042
164
0.460693
false
4.067751
false
false
false
kmiller96/Shipping-Containers-Software
lib/core.py
1
8600
# AUTHOR: Kale Miller # DESCRIPTION: The 'main brain' of the program is held in here. # 50726f6772616d6d696e6720697320627265616b696e67206f66206f6e652062696720696d706f737369626c65207461736b20696e746f20736576 # 6572616c207665727920736d616c6c20706f737369626c65207461736b732e # DEVELOPMENT LOG: # 07/12/16: Initi...
mit
3,282,703,609,942,576,000
39.148325
120
0.570698
false
4.232283
false
false
false
amerlyq/airy
vim/res/ycm_extra_conf.py
1
5213
# SEE: CACHE/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py import os import ycm_core # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. flags = [ '-Wall', '-Wex...
mit
1,835,712,547,090,115,600
36.235714
115
0.689047
false
3.479973
true
false
false
sangwonl/stage34
webapp/api/handlers/stage.py
1
6612
from django.views import View from django.conf import settings from datetime import datetime from api.helpers.mixins import AuthRequiredMixin from api.helpers.http.jsend import JSENDSuccess, JSENDError from api.models.resources import Membership, Stage from libs.utils.model_ext import model_to_dict from worker.tasks...
mit
3,603,858,691,656,666,600
33.082474
105
0.628403
false
3.552929
false
false
false
globaltoken/globaltoken
test/functional/test_framework/authproxy.py
1
7759
# Copyright (c) 2011 Jeff Garzik # # Previous copyright, from python-jsonrpc/jsonrpc/proxy.py: # # Copyright (c) 2007 Jan-Klaas Kollhof # # This file is part of jsonrpc. # # jsonrpc is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # th...
mit
-3,351,838,090,374,952,400
42.105556
155
0.621601
false
4.087987
false
false
false
jtomasek/tuskar-ui-1
tuskar_ui/infrastructure/resource_management/resource_classes/workflows.py
1
12384
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 applicabl...
apache-2.0
-6,819,238,934,805,473,000
37.222222
79
0.566053
false
4.488583
false
false
false
forman/dectree
examples/intertidal_flat_classif/intertidal_flat_classif.py
1
12362
from numba import jit, jitclass, float64 import numpy as np @jit(nopython=True) def _B1_LT_085(x): # B1.LT_085: lt(0.85) if 0.0 == 0.0: return 1.0 if x < 0.85 else 0.0 x1 = 0.85 - 0.0 x2 = 0.85 + 0.0 if x <= x1: return 1.0 if x <= x2: return 1.0 - (x - x1) / (x2 - x1) ...
mit
-7,789,529,066,740,844,000
24.647303
270
0.44928
false
2.405526
false
false
false
isabellemao/Hello-World
python/Junior2015CCCJ4.py
1
1278
#Problem J4: Arrival Time departure_time = input() split_departure = list(departure_time) #The time of departure, split into a list. #Split the list departure_hour = split_departure[0:2] departure_minute = split_departure[3:5] #Change the split list to integers. departure_hour = int("".join(departure_hour)) departur...
apache-2.0
-2,193,184,907,640,587,300
22.666667
88
0.640063
false
3.124694
false
false
false
robosafe/testbench_vRAL_hydro
bert2_simulator/sim_step_monitors/assertion_monitor_manager.py
1
2830
#!/usr/bin/env python """ Assertion Monitor Manager Created by David Western, June 2015. """ from coverage import coverage import imp import rospkg import rospy from std_msgs.msg import UInt64 from std_srvs.srv import Empty import sys class AMM: def __init__(self,AM_list_file,trace_label): # Read list...
gpl-3.0
1,416,007,924,697,365,000
31.906977
109
0.602473
false
3.723684
false
false
false
eayunstack/eayunstack-upgrade
ansible/library/keystone_v2_endpoint.py
1
9178
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Kevin Carter <kevin.carter@rackspace.com> # # Copyright 2014, Rackspace US, 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 # # ...
apache-2.0
-101,433,040,338,243,950
28.322684
78
0.552953
false
4.541316
false
false
false
Kivvix/stage-LPC
compareSrc/searchSDSSdata.py
1
4221
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import os import glob from config import * import data.calexp import data.src ## @def attributs # @brief attributs which we select in SDSS DB and src fits file attributs = 'objid,run,camcol,field,ra,dec,u,g,r,i,z' ## Calexp treatment ## def coordCalexp( fit...
mit
-5,985,041,647,614,164,000
33.040323
875
0.644871
false
2.594345
false
false
false
xaled/wunderous-analytics
wunderous/drive.py
1
5688
import os import sys import httplib2 from oauth2client.file import Storage from apiclient import discovery from oauth2client.client import OAuth2WebServerFlow from wunderous.config import config OAUTH_SCOPE = 'https://www.googleapis.com/auth/drive' SHEETS_OAUTH_SCOPE = 'https://www.googleapis.com/auth/drive https://ww...
mit
7,538,950,005,650,568,000
37.174497
249
0.651371
false
3.93361
true
false
false
Goamaral/SCC
inputWindow.py
1
31922
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'inputWindow.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s...
mit
-5,630,341,833,755,718,000
55.576241
105
0.701934
false
3.376614
false
false
false
toinbis/369old
src/web369/conf/base.py
1
2325
from pkg_resources import resource_filename DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'web369', 'USER': 'root', 'PASSWORD': '', } }...
bsd-3-clause
-2,580,828,059,716,364,300
23.734043
73
0.667097
false
3.31669
false
true
false
smallyear/linuxLearn
salt/salt/client/ssh/state.py
1
6047
# -*- coding: utf-8 -*- ''' Create ssh executor system ''' from __future__ import absolute_import # Import python libs import os import tarfile import tempfile import json import shutil from contextlib import closing # Import salt libs import salt.client.ssh.shell import salt.client.ssh import salt.utils import salt.u...
apache-2.0
7,802,137,446,918,748,000
30.331606
79
0.539937
false
3.952288
false
false
false
rapidpro/chatpro
chatpro/rooms/models.py
1
2494
from __future__ import absolute_import, unicode_literals from chatpro.profiles.tasks import sync_org_contacts from dash.orgs.models import Org from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ class Room(models.Model): """ Corresp...
bsd-3-clause
-7,098,435,995,584,484,000
34.628571
100
0.631917
false
4.048701
false
false
false
hkemmel/tal
affichage.py
1
2209
# -*- coding: utf-8 -*- """ Created on Tue Apr 25 14:34:25 2017 @author: manfred.madelaine """ import time def affStart(): msg1 = "*** Binvenue dans i-Opinion ou Opinion Way ***" msg2 = "Le logiciel d'analyse et de classification des revues cinématographiques !" listMsg = [] listMsg.append("") ...
gpl-3.0
181,424,775,493,336,640
19.342593
87
0.474954
false
3.132668
false
false
false
LuizGsa21/p4-conference-central
models.py
1
7226
#!/usr/bin/env python """models.py Udacity conference server-side Python App Engine data & ProtoRPC models $Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $ created/forked from conferences.py by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import httplib import endpoints from protor...
apache-2.0
4,306,855,950,322,396,700
31.696833
98
0.687517
false
3.887036
false
false
false
PyBossa/pybossa
pybossa/default_settings.py
1
4813
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
167,789,960,090,039,200
28.429448
116
0.689806
false
3.051527
false
false
false
Naoto-Imamachi/MIRAGE
scripts/module/preparation/phastcons_score_list.py
1
3683
#!usr/bin/env python import sys import re import shelve from parameter.common_parameters import common_parameters import utils.setting_utils as utils utils.now_time("phastcons_score_list script starting...") p = utils.Bunch(common_parameters) def main(): utils.now_time("Input_file: " + p.phastcons_sc...
mit
-2,538,876,580,107,515,400
41.329412
203
0.524572
false
3.435634
false
false
false
DerekK88/PICwriter
picwriter/components/stripslotconverter.py
1
9317
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import gdspy import picwriter.toolkit as tk class StripSlotConverter(tk.Component): """Strip-to-Slot Side Converter Cell class. Adiabatically transforms a strip to a slot waveguide mode,...
mit
7,310,835,208,231,276,000
36.268
396
0.545347
false
3.359899
false
false
false
dzamie/weasyl
weasyl/blocktag.py
1
4024
# blocktag.py from error import PostgresError import define as d import profile import searchtag from libweasyl import ratings from weasyl.cache import region # For blocked tags, `rating` refers to the lowest rating for which that tag is # blocked; for example, (X, Y, 10) would block tag Y for all ratings, whereas...
apache-2.0
-8,802,983,478,453,803,000
30.193798
120
0.587227
false
3.850718
false
false
false
EndyKaufman/django-postgres-angularjs-blog
app/manager/migrations/0006_properties.py
1
1170
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-04-24 14:05 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency...
mit
-7,519,078,480,483,792,000
39.344828
150
0.62906
false
4.020619
false
false
false
bert9bert/statsmodels
statsmodels/tsa/statespace/kalman_filter.py
2
86079
""" State Space Representation and Kalman Filter Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from warnings import warn import numpy as np from .representation import OptionWrapper, Representation, FrozenRepresentation from .tools import (validate_v...
bsd-3-clause
3,883,965,358,522,059,000
41.340876
79
0.594628
false
4.440953
false
false
false
rjw57/cubbie
migrations/versions/316bb58e84f_add_user_identities.py
1
1110
"""add user_identities Revision ID: 316bb58e84f Revises: 38c8ec357e0 Create Date: 2015-03-11 01:40:12.157458 """ # revision identifiers, used by Alembic. revision = '316bb58e84f' down_revision = '38c8ec357e0' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic ...
mit
7,870,348,524,913,182,000
30.714286
130
0.684685
false
3.313433
false
false
false
cwgreene/Nanostructure-Simulator
utils/plot_trajectories.py
1
1140
import os import sys import re import pylab def parse_trajectory_line(line): trajectory = [] for x,y in re.findall("\(([0-9.]+), ([0-9.]+)\)",line): trajectory.append((float(x),float(y))) return trajectory def generate_trajectories(file): #get rid fo two first lines file.readline() file.readline() #parse eac...
mit
-5,705,216,141,029,246,000
20.923077
56
0.669298
false
2.900763
false
false
false
jonathansick/androcmd
scripts/phat_baseline_test.py
1
3612
#!/usr/bin/env python # encoding: utf-8 """ Grid computation of dust attenuation for old vs. young stellar populations. 2015-05-12 - Created by Jonathan Sick """ import argparse from androcmd.phatpipeline import PhatCatalog from androcmd.baselineexp import SolarZPipeline, ThreeZPipeline def main(): args = pars...
mit
-6,061,255,170,724,512,000
35.484848
78
0.623477
false
3.544652
false
false
false
lhellebr/spacewalk
backend/server/rhnLib.py
1
8211
# # Copyright (c) 2008--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
8,887,653,560,759,876,000
30.580769
98
0.629765
false
3.543807
false
false
false
m-r-hunt/invaders
enemies.py
1
6646
# Invaders # Copyright (C) 2013 Maximilian Hunt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is ...
gpl-2.0
-4,189,515,760,736,269,300
41.06962
124
0.614354
false
3.941874
false
false
false
2Minutes/davos-dev
davos/core/utils.py
1
7692
import re import sys import os import os.path as osp from fnmatch import fnmatch from pytd.gui.dialogs import promptDialog from pytd.util.logutils import logMsg from pytd.util.sysutils import importModule, toStr, inDevMode, getCaller from pytd.util.fsutils import pathSplitDirs, pathResolve, pathNorm, pathJoin from py...
gpl-3.0
-7,329,362,235,480,504,000
23.341772
94
0.597634
false
3.366302
true
false
false
solarsail/aerosol-tools
clustatlib/clucsv.py
1
3752
import numpy as np import os import os.path class csvbuilder: def __init__(self, cs): self.cs = cs if not os.path.isdir('csv'): os.mkdir('csv') def month_type_csv(self, site = None): label = 'all' if site == None else site values, percentages = self.cs.month...
gpl-3.0
-5,397,643,248,379,671,000
41.647727
203
0.539179
false
3.398551
false
false
false
hawkeyexp/plugin.video.netflix
resources/lib/services/nfsession/session/base.py
1
2055
# -*- coding: utf-8 -*- """ Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix) Copyright (C) 2018 Caphm (original implementation module) Copyright (C) 2019 Stefano Gottardo - @CastagnaIT Initialize the netflix session SPDX-License-Identifier: MIT See LICENSES/MIT.md for more informatio...
mit
8,894,260,233,918,521,000
33.830508
93
0.66618
false
4.021526
false
false
false
playerNaN/NaNPyGameEngine
engine.py
1
5921
import pygame import sys import os from collections import namedtuple import time import resourcemanager ColorList = namedtuple("ColorList", "black white red green blue") colors = ColorList((0,0,0),(0xFF,0xFF,0xFF),(0xFF,0,0),(0,0xFF,0),(0,0,0xFF)) PyListener = namedtuple("PyListener", "condition effect") PyEventList...
unlicense
-5,850,025,484,649,098,000
32.647727
103
0.575578
false
3.657196
false
false
false
muminoff/savollar
savollar/pipelines.py
1
2093
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don"t forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html from scrapy.exceptions import DropItem from scrapy.conf import settings from scrapy import log from elasticsearch import Elastic...
apache-2.0
5,381,455,535,540,653,000
33.883333
85
0.565695
false
4.161034
false
false
false
shanot/imp
modules/rmf/examples/link.py
2
1236
## \example rmf/link.py # This example is like module/rmf/pdb.py except that instead of creating a # new hierarchy from the rmf file, it simply links the existing hierarchy # to the file. This mechanism can be used for loading multiple # conformations for scoring or other analysis without having to set up # restraints ...
gpl-3.0
2,193,594,142,939,475,700
25.869565
74
0.7411
false
3
false
false
false
karesansui/karesansui
bin/restart_network.py
1
4392
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2012 HDE, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, incl...
mit
2,224,646,137,374,195,000
36.538462
116
0.645492
false
3.981868
false
false
false
qnzhou/ThingiverseCrawler
thingiverse_crawler.py
1
9320
#!//usr/bin/env python import argparse import datetime import os import os.path import requests import re import time import urllib import urlparse from subprocess import check_call def utc_mktime(utc_tuple): """Returns number of seconds elapsed since epoch Note that no timezone are taken into consideration. ...
mit
-6,989,201,447,378,768,000
33.64684
158
0.593777
false
3.534319
false
false
false