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
hlngo/volttron-applications
pnnl/AirsideRCxAgent/airside/airside_retuning_rcx.py
1
14509
""" Copyright (c) 2016, Battelle Memorial Institute All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions a...
bsd-3-clause
-5,257,776,193,921,021,000
47.363333
108
0.620787
false
3.821175
false
false
false
Donkyhotay/openrts
client/mapview.py
1
10684
# OpenRTS - Copyright (C) 2006 The OpenRTS Project # # OpenRTS 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. # # OpenRTS is d...
gpl-2.0
5,841,957,012,193,372,000
43.65812
92
0.437664
false
3.796731
false
false
false
theodox/mGui
mGui/events.py
1
8231
""" events.py Defines a simple event handler system similar to that used in C#. Events allow multicast delegates and arbitrary message passing. They use weak references so they don't keep their handlers alive if they are otherwise out of scope. """ import weakref import maya.utils from functools import partial, wrap...
mit
2,489,910,803,598,799,000
27.77972
113
0.586684
false
4.113443
true
false
false
longde123/MultiversePlatform
lib/IPCE/Lib/array.py
1
2037
# Copyright (c) 2006 Seo Sanghyeon # This code is derived from PyPy's implementation of array module. # The main change is the use of .NET array as storage instead of Python list. # 2006-11-11 sanxiyn Bare minimum to run pycrypto's randpool # 2006-11-26 sanxiyn Added fromlist, fromstring, tolist, tostring # ...
mit
-6,253,051,193,272,339,000
26.90411
77
0.574374
false
3.60531
false
false
false
fcollman/MakeAT
make_state_table.py
1
4221
#input, root directory of images import argparse import os import convertmetadata import numpy as np import csv print("\n") if __name__ == '__main__': parser = argparse.ArgumentParser(description="Create a state file describing the images in Stanfoord root folder format") #parser.add_argument('--inputDir', de...
gpl-2.0
486,885,668,362,250,200
30.507463
133
0.698176
false
2.987261
false
false
false
googleapis/googleapis-gen
google/cloud/resourcemanager/v3/resourcemanager-v3-py/google/cloud/resourcemanager_v3/services/projects/client.py
1
69247
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
9,149,651,048,541,486,000
42.468927
167
0.589204
false
4.892673
false
false
false
deepmind/open_spiel
open_spiel/python/examples/benchmark_games.py
1
3608
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
apache-2.0
4,919,348,270,738,867,000
30.103448
76
0.654102
false
3.537255
false
false
false
BoGoEngine/ibus-bogo
ibus_engine/test/test_preedit_backend.py
1
2490
from nose.tools import eq_ from gi.repository import IBus from preedit_backend import PreeditBackend try: from unittest.mock import Mock except: from mock import Mock class TestPreeditBackend(): def setup(self): self.engine = Mock() self.config = { "skip-non-vietnamese": True...
gpl-3.0
8,879,839,081,037,736,000
28.294118
71
0.599598
false
3.915094
false
false
false
bancek/egradebook
src/lib/compressor/filters/css_default.py
1
2329
import os import re import posixpath from compressor.filters import FilterBase, FilterError from compressor.conf import settings from compressor.utils import get_hexdigest, get_mtime URL_PATTERN = re.compile(r'url\(([^\)]+)\)') class CssAbsoluteFilter(FilterBase): def input(self, filename=None, **kwargs): ...
gpl-3.0
7,365,034,313,811,681,000
37.816667
90
0.569772
false
3.744373
false
false
false
psychopy/psychopy
psychopy/core.py
1
5931
#!/usr/bin/env python # -*- coding: utf-8 -*- """Basic functions, including timing, rush (imported), quit """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from __future__ import abs...
gpl-3.0
-3,034,236,536,486,956,000
34.303571
79
0.669364
false
4.206383
false
false
false
EdDev/vdsm
vdsm/storage/sdm/api/reduce_domain.py
1
2273
# # Copyright 2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in th...
gpl-2.0
-1,069,458,458,073,139,800
35.66129
78
0.696436
false
3.918966
false
false
false
schollz/find-lf
node/scan.py
1
7366
#!/usr/bin/python3 # Copyright 2015-2017 Zack Scholl. All rights reserved. # Use of this source code is governed by a AGPL # license that can be found in the LICENSE file. import sys import json import socket import time import subprocess import os import glob import argparse import logging import statistics import a...
agpl-3.0
-5,947,955,362,084,915,000
30.344681
147
0.594352
false
3.846475
false
false
false
brugger/kbr-tools
kbr/git_utils.py
1
1102
import kbr.run_utils as run_utils def commit(msg:str, filename:str=None) -> None: cmd = f"git commit -m'{msg}'" if filename is not None: cmd += f" {filename}" run_utils.launch_cmd(cmd) def push() -> None: cmd = f"git push" run_utils.launch_cmd(cmd) def commit_and_push(msg:str, filen...
mit
-7,409,068,811,317,148,000
20.607843
75
0.525408
false
3.319277
false
false
false
mF2C/COMPSs
compss/runtime/scripts/system/jupyter/status.py
1
2003
#!/usr/bin/python # # Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
-8,213,170,522,706,798,000
26.438356
80
0.696955
false
3.904483
false
false
false
datapythonista/pandas
pandas/tests/series/accessors/test_dt_accessor.py
2
26490
import calendar from datetime import ( date, datetime, time, ) import locale import unicodedata import numpy as np import pytest import pytz from pandas._libs.tslibs.timezones import maybe_get_tz from pandas.core.dtypes.common import ( is_integer_dtype, is_list_like, ) import pandas as pd from p...
bsd-3-clause
1,101,953,534,961,364,100
34.652759
88
0.534051
false
3.55475
true
false
false
LudovicRousseau/pyscard
smartcard/Examples/framework/sample_ConsoleConnectionTracer.py
1
1892
#! /usr/bin/env python3 """ Sample script that monitors card connection events. __author__ = "http://www.gemalto.com" Copyright 2001-2012 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under t...
lgpl-2.1
-7,386,454,605,842,685,000
30.016393
75
0.773256
false
3.402878
false
false
false
rudhir-upretee/Sumo17_With_Netsim
tools/traci/simulation.py
1
8232
# -*- coding: utf-8 -*- """ @file simulation.py @author Michael Behrisch @date 2011-03-15 @version $Id: simulation.py 13811 2013-05-01 20:31:43Z behrisch $ Python implementation of the TraCI interface. SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ Copyright (C) 2008-2013 DLR (http://www....
gpl-3.0
8,549,014,811,430,274,000
37.647887
128
0.64966
false
3.157652
false
false
false
chubbymaggie/simuvex
tests/test_state.py
1
7070
import simuvex import logging import claripy import pickle import nose import ana import gc from simuvex import SimState def test_state(): s = simuvex.SimState(arch='AMD64') s.registers.store('sp', 0x7ffffffffff0000) nose.tools.assert_equals(s.se.any_int(s.registers.load('sp')), 0x7ffffffffff0000) s....
bsd-2-clause
-233,130,901,043,379,700
36.015707
104
0.644272
false
2.687191
true
false
false
Muterra/py_daemoniker
setup.py
1
4110
''' LICENSING ------------------------------------------------- daemoniker: Cross-platform daemonization tools. Copyright (C) 2016 Muterra, Inc. Contributors ------------ Nick Badger badg@muterra.io | badg@nickbadger.com | nickbadger.com This library is free software; you can redistri...
unlicense
-7,300,914,842,793,974,000
32.966942
79
0.654988
false
4.276795
false
false
false
jojonas/synced-music
synced-music/core/client/ui.py
1
1575
from PyQt4 import QtCore, QtGui from ..util import log, metrix, ui class Widget(ui.Widget): def setup(self): frmServerSelection = QtGui.QGroupBox("Server Selection", self) layoutServerSelection = QtGui.QHBoxLayout(frmServerSelection) lblServer = QtGui.QLabel("&Server / Host name:", frmServerSelection) ...
mit
1,702,871,000,761,354,200
37.425
86
0.765079
false
3.401728
false
false
false
wasim21k/pihome
cron/find_mygw/ping.py
1
6740
#!/usr/bin/env python """ A pure python ping implementation using raw socket. Note that ICMP messages can only be sent from processes running as root. Derived from ping.c distributed in Linux's netkit. That code is copyright (c) 1989 by The Regents of the University of California. That cod...
gpl-3.0
7,742,006,739,636,548,000
30.059908
79
0.606825
false
3.659066
false
false
false
pytorch/fairseq
fairseq/modules/lightconv_layer/lightconv_layer.py
1
4799
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import lightconv_cuda import torch import torch.nn.functional as F from fairseq import utils from fairseq.incremental_decoding_utils import wi...
mit
732,018,471,102,574,200
34.029197
86
0.581163
false
3.772799
false
false
false
ryscet/pyseries
pyseries/Pipelines/AnalyzeRest.py
1
1650
# -*- coding: utf-8 -*- """ Created on Tue Jun 7 12:32:36 2016 @author: user """ import sys sys.path.insert(0, '/Users/user/Desktop/repo_for_pyseries/pyseries/') import pyseries.LoadingData as loading import pyseries.Preprocessing as prep import pyseries.Analysis as analysis def plot_rest(): # paths = [ '/Use...
mit
2,526,476,532,144,800,000
40.25
180
0.616364
false
2.763819
false
false
false
Crypt0s/Ramen
fs_libs/ftputil/test/test_error.py
1
1931
# encoding: utf-8 # Copyright (C) 2002-2013, Stefan Schwarzer <sschwarzer@sschwarzer.net> # See the file LICENSE for licensing terms. from __future__ import unicode_literals import ftplib import unittest import ftputil.error class TestFTPErrorArguments(unittest.TestCase): """ The `*Error` constructors shou...
gpl-3.0
-479,500,312,740,034,100
27.820896
72
0.598136
false
3.764133
true
false
false
danielsunzhongyuan/my_leetcode_in_python
dungeon_game_174.py
1
1191
# @question: 174. Dungeon Game # @author: Zhongyuan Sun # @time: O(M*N) # @space: O(M*N) class Solution(object): def calculateMinimumHP(self, dungeon): """ :type dungeon: List[List[int]] :rtype: int """ if not dungeon or not dungeon[0]: return 1 m = len(d...
apache-2.0
198,090,474,649,136,770
33.028571
118
0.466835
false
2.795775
false
false
false
raiarun/HomeGuard
send_image_twilio.py
1
1421
#!/usr/bin/env python # This file sends a sms of the visitor's image to the cell phone number using twilio account. # Download the twilio-python library from http://twilio.com/docs/libraries # Import the necessary modules import twilio from twilio.rest import TwilioRestClient # Sends a picture of the visitor to the...
lgpl-2.1
6,988,059,539,129,559,000
32.833333
109
0.735398
false
3.029851
false
false
false
satterly/alerta5
alerta/app/webhooks/pingdom.py
1
2724
from flask import request, g, jsonify from flask_cors import cross_origin from alerta.app.auth.utils import permission from alerta.app.models.alert import Alert from alerta.app.utils.api import process_alert, add_remote_ip from alerta.app.exceptions import ApiError, RejectException from . import webhooks # { # ...
apache-2.0
-7,855,718,882,595,396,000
27.978723
87
0.599119
false
3.435057
false
false
false
choicoin/chcoin
contrib/pyminer/pyminer.py
1
6434
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
mit
976,361,743,936,739,300
24.531746
84
0.648896
false
2.83062
false
false
false
piotroxp/scibibscan
scib/lib/python3.5/site-packages/astropy/tests/disable_internet.py
1
4789
from __future__ import (absolute_import, division, print_function, unicode_literals) import contextlib import socket from ..extern.six.moves import urllib # save original socket method for restoration # These are global so that re-calling the turn_off_internet function doesn't # overwrite the...
mit
-961,243,208,770,777,300
31.578231
79
0.654416
false
4.14632
false
false
false
MartinsMednis/moderator
src/chemicalFormulas.py
2
3963
# chemicalFormulas.py # # Original code by Paul McGuire # Code obtained from Python forum http://www.daniweb.com/software-development/python/threads/102740 # Code shared in forum in Dec 29th, 2007 # # wrapped and adapted by Martins Mednis # from pyparsing import Word, Optional, OneOrMore, Group, ParseException # defi...
gpl-2.0
3,168,897,596,876,500,500
20.421622
112
0.652031
false
2.390229
false
false
false
reticulatingspline/NFLDraft
__init__.py
1
1215
### # Copyright (c) 2014, spline # All rights reserved. # # ### """ Add a description of the plugin (to be presented to the user inside the wizard) here. This should describe *what* the plugin does. """ import supybot import supybot.world as world # Use this for the version of this plugin. You may wish to put a CV...
mit
-2,377,875,610,206,295,600
25.413043
79
0.736626
false
3.584071
false
false
false
ubccr/tacc_stats
analyze/process_pickles/dump_csv_key.py
1
1364
#!/usr/bin/env python import analyze_conf import sys import datetime, glob, job_stats, os, subprocess, time import numpy import scipy, scipy.stats import argparse import tspl, tspl_utils def main(): parser = argparse.ArgumentParser(description='Dump CSV for a key pair for some jobs') parser.add_argument('-k1', he...
lgpl-2.1
-1,747,529,157,491,239,000
28.021277
87
0.593842
false
3.135632
false
false
false
mbranko/kartonpmv
osnovni/tables.py
1
2815
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.utils.safestring import mark_safe import django_tables2 as tables from django_tables2.columns import LinkColumn, Column, DateTimeColumn, DateColumn from django_tables2.utils import A from osnovni.models import MuzejskiPredmet, IstorijaIzmenaPredmeta from orgsem...
mit
3,422,297,422,722,902,000
40.367647
112
0.684323
false
2.879222
false
false
false
Hellrungj/CSC-412-Networking
rpc-project/venv/lib/python2.7/site-packages/plumbum/cli/image.py
1
3324
from __future__ import print_function, division from plumbum import colors from plumbum.cli.termsize import get_terminal_size from plumbum import cli import sys class Image(object): __slots__ = "size char_ratio".split() def __init__(self, size=None, char_ratio=2.45): self.size = size self.ch...
gpl-3.0
7,852,673,179,130,184,000
31.588235
100
0.569795
false
3.570354
false
false
false
vied12/superdesk
server/apps/desks.py
1
5307
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from superdes...
agpl-3.0
4,036,656,579,677,852,000
35.854167
118
0.611268
false
3.801576
false
false
false
gnarula/eden_deployment
controllers/msg.py
1
78697
# -*- coding: utf-8 -*- """ Messaging Module - Controllers """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def index(): ...
mit
-8,882,294,855,505,415,000
34.934703
250
0.485139
false
4.343821
false
false
false
torkelsson/meta-package-manager
meta_package_manager/managers/apm.py
1
15444
# -*- coding: utf-8 -*- # # Copyright (c) 2016-2018 Kevin Deldycke <kevin@deldycke.com> # and contributors. # All Rights Reserved. # # This program is Free Software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software F...
gpl-2.0
301,067,611,824,283,400
34.422018
79
0.378594
false
4.756391
true
false
false
apixandru/intellij-community
python/helpers/pycharm/behave_runner.py
1
12391
# coding=utf-8 """ Behave BDD runner. See _bdd_utils#get_path_by_env for information how to pass list of features here. Each feature could be file, folder with feature files or folder with "features" subfolder Other args are tag expressionsin format (--tags=.. --tags=..). See https://pythonhosted.org/behave/behave.htm...
apache-2.0
-6,671,257,283,449,678,000
39.493464
123
0.617061
false
4.162244
true
false
false
utfsmlabs/monitores
monitores/__init__.py
1
1788
# Copyright (C) 2012 Universidad Tecnica Federico Santa Maria # # This file is part of Monitores. # # Monitores 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 op...
gpl-3.0
-979,457,102,763,904,500
34.058824
78
0.731544
false
3.533597
true
false
false
sloria/osf.io
addons/gitlab/apps.py
1
4157
import logging import os from addons.base.apps import BaseAddonAppConfig from addons.gitlab.api import GitLabClient, ref_to_params from addons.gitlab.exceptions import NotFoundError, GitLabError from addons.gitlab.utils import get_refs, check_permissions from website.util import rubeus logger = logging.getLogger(__na...
apache-2.0
-4,923,999,982,515,163,000
32.256
150
0.656483
false
3.6274
false
false
false
andikleen/pmu-tools
tl_cpu.py
1
7806
# Copyright (c) 2012-2020, Intel Corporation # Author: Andi Kleen # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will...
gpl-2.0
7,582,565,511,695,651,000
35.138889
109
0.503203
false
3.642557
false
false
false
spdx/tools-python
spdx/parsers/jsonyamlxmlbuilders.py
1
8826
# Copyright (c) Xavier Figueroa # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
apache-2.0
7,373,871,429,981,222,000
31.448529
85
0.606957
false
4.345643
false
false
false
HiSPARC/station-software
user/python/Lib/test/test_unicode.py
2
83899
""" Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import sys import struct import codecs import unittest from test import test_support, string_tests # decorator to skip tests on narrow builds requires_wide_bui...
gpl-3.0
-2,962,959,498,745,615,000
43.841796
122
0.541461
false
3.283333
true
false
false
FTAsr/STS
unsupervisedEval/W2V_Score.py
1
3031
import nltk from nltk.corpus import stopwords from nltk.corpus import wordnet as wn import os, re from nltk.stem.porter import * import gensim from gensim.models import Word2Vec import pandas as pd import numpy as np import xml.etree.ElementTree as xmlTree class MySentences(object): def __init__(self, fname): ...
mit
1,510,916,114,134,853,400
30.915789
131
0.624546
false
3.700855
false
false
false
rvasilev/django-markitup-widget
markitup/widgets.py
1
3052
""" widgets for django-markitup Time-stamp: <2010-01-06 12:31:06 carljm widgets.py> """ from django import forms from django.utils.safestring import mark_safe from django.contrib.admin.widgets import AdminTextareaWidget from markitup import settings from markitup.util import absolute_url, absolute_jquery_url import ...
bsd-3-clause
-5,562,470,755,295,741,000
32.911111
77
0.595675
false
3.878018
false
false
false
EmadMokhtar/Django
django/db/backends/mysql/operations.py
4
12959
import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import timezone from django.utils.duration import duration_microseconds class DatabaseOperations(BaseDatabaseOperations): compiler_module = "django.db.backends.mysql.compiler" ...
mit
-5,540,114,195,233,623,000
41.349673
113
0.583533
false
3.95212
false
false
false
saivig/PGM
CRF-POS_NER/format_checker.py
1
2550
import sys import os,re import pdb # takes 3 arguments: unlabelled file, labelled file and model (ner/pos) #python format_checker_Assignement3.py pos_input.txt pos_output.txt pos // to verify output of pos model #python format_checker_Assignement3.py ner_input.txt ner_output.txt ner // to verify output of ner model w...
apache-2.0
1,631,740,027,767,589,000
42.220339
501
0.603529
false
2.356747
false
false
false
silly-wacky-3-town-toon/SOURCE-COD
toontown/estate/FlowerSellGUI.py
1
2632
from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import * from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from direct.task import Task import FlowerBase import FlowerPicker class FlowerSellGUI(Di...
apache-2.0
-4,606,927,487,188,690,000
49.615385
297
0.69035
false
3.190303
false
false
false
tbicr/map-trends
bubble.py
1
9637
import argparse import itertools import json import collections import datetime import sys import mercantile import shapely.geometry MIN_DATE = '0000-00-00' MAX_DATE = '9999-99-99' MIN_ZOOM = 0 MAX_ZOOM = 19 cache_down = {} cache_up = {} cache_center = {} cache_date = {} cache_in_bound = {} def get_down_tiles(x, ...
mit
-1,629,810,714,974,906,400
36.792157
117
0.580886
false
3.298084
false
false
false
xiaoyongaa/ALL
RPC作业/client/src/connect_rabbitmq.py
1
1398
import sys import re import os import pika path=os.path.abspath(__file__) path=os.path.dirname(os.path.dirname(path)) sys.path.append(path) def start(): msg="欢迎使用RPC程序,现在初始化rbbitMQ链接." print(msg) with open(path+"\conf\conf") as conf: data=conf.read() old=re.findall(r"RbbitMQ_server_ip=\".*\"",...
apache-2.0
9,142,973,171,733,156,000
27.066667
82
0.584786
false
2.565041
false
false
false
mic4ael/indico
indico/modules/events/registration/controllers/compat.py
1
1150
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from flask import current_app, redirect, request from indico.mod...
mit
4,805,531,764,483,622,000
36.096774
110
0.709565
false
3.697749
false
false
false
GarySparrow/mFlaskWeb
config.py
1
2904
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SSL_DISABLE = False SQLALCHEMY_COMMIT_ON_TEARDOWN = True SQLALCHEMY_RECORD_QUERIES = True MAIL_SERVER = 'smtp.qq.com' MAIL_PORT = 25 MAIL_USE_TL...
mit
-6,852,408,792,565,977,000
29.25
74
0.64084
false
3.507246
true
false
false
Kortemme-Lab/covariation
analysis/profile_similarity/profile_similarity.py
1
6125
# The MIT License (MIT) # # Copyright (c) 2015 Noah Ollikainen # # 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, m...
mit
3,561,183,417,832,896,000
26.466368
104
0.552327
false
3.372797
false
false
false
alexisVallet/anime-bgrm
bgrmMethodROC.py
1
2274
import os import os.path import numpy as np import matplotlib.pyplot as plt import json import sys # Displays a plot in ROC space for background removal methods if __name__ == "__main__": if len(sys.argv) < 2: raise ValueError("Please input a folder for at least one method.") methodNames = [] pltNa...
gpl-2.0
3,664,283,704,800,243
37.542373
92
0.562005
false
3.514683
false
false
false
LukeMurphey/splunk-network-tools
src/bin/traceroute_lookup.py
1
1509
""" This is a search command for doing traceroute lookups on results. """ import logging from network_tools_app import traceroute from network_tools_app.custom_lookup import CustomLookup class TracerouteLookup(CustomLookup): """ This class implements the functionality necessary to make a custom search comman...
apache-2.0
5,777,795,752,922,127,000
28.019231
90
0.606362
false
4.045576
false
false
false
PanDAWMS/pilot
Mover.py
1
229997
# Mover.py # Used by runJob and pilot to transfer input and output files from and to the local SE import os import sys import commands import re import urllib from xml.dom import minidom from time import time, sleep from timed_command import timed_command from pUtil import createPoolFileCatalog, tolog, addToSkipped,...
apache-2.0
-7,014,543,195,349,672,000
44.444971
265
0.592725
false
3.917376
false
false
false
speksofdust/BeyondDreams
beyonddreams/game/dates.py
1
2327
# ---------------------------------------------------------------------------- # # # # 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
5,795,774,323,717,418,000
34.8
80
0.481306
false
4.483622
false
false
false
simondolle/hls-autocomplete
hls_autocomplete/hls.py
1
1823
import subprocess import os.path from parse import LsParser, WebHdfsParser class HlsSubprocess(object): def list_status(self, path): return self.hls(path) def hls(self, path): p = self.get_process(path) hls_result = p.communicate()[0] hls_result = hls_result.decode("utf-8") ...
mit
9,196,085,546,997,558,000
33.415094
120
0.617663
false
3.357274
false
false
false
senuido/stash-scanner
AppGUI.py
1
75197
import time try: import functools import logging import multiprocessing import os import pycurl import queue import threading import tkinter.font as tkfont import webbrowser from concurrent.futures import ThreadPoolExecutor from idlelib.WidgetRedirector import WidgetRedirect...
gpl-3.0
-8,865,241,853,879,739,000
40.915831
144
0.558839
false
3.73594
true
false
false
jae-flaskr/jae-flaskr
firys/flaskr/views.py
1
1830
#coding=utf-8 ''' Created on 2014年12月10日 @author: Ancheel ''' from flask import Blueprint, render_template, abort, request, flash, \ redirect, url_for from flask.ext import login from flask.ext.login import current_user from firys import db, login_manager from models import Entries, U...
bsd-3-clause
2,666,192,935,248,853,000
25.434783
71
0.626645
false
3.640719
false
false
false
rasros/CloudTranscoderLTH2
processing/transcode.py
1
1333
#!/usr/bin/env python2 import subprocess import time import string import os import re def do(uuid,callback): dir_path = os.path.dirname(os.path.realpath(__file__)) p = subprocess.Popen([dir_path + '/transcode.sh', uuid]) progress = 1 noprogress = 0 preprog = -1 print("Starting transcoding of ...
apache-2.0
5,631,361,611,880,796,000
30.738095
85
0.530383
false
3.776204
false
false
false
modrzew/igwoctisi-server
Model.py
1
14502
# -*- coding: utf-8 *-* from GameManager import GameManager import Common import Constants import random import math players = [] games = [] class Player: def __init__(self, socket): self.socket = socket self.username = '' self.id = 0 self.state = None self.current_game = None self.pla...
mit
6,640,017,754,516,211,000
33.54902
114
0.654461
false
3.054339
false
false
false
AnsgarSchmidt/sensomatic
ng/server/Tank/ChartThread.py
1
7852
import os import time import pytz import datetime import requests import threading import matplotlib.pyplot as plt import matplotlib.patches as mpatches import matplotlib.dates as mdates SECOND = 1 MINUTE = 60 * SECOND HOUR = 60 * MINUTE DAY = 24 * HOUR WEEK = 7 * DAY MONTH = 31 * DAY YEAR = 365 *...
apache-2.0
7,923,787,551,405,824,000
36.932367
103
0.514901
false
3.702027
false
false
false
prashh/my_proj
src/my_proj/settings/base.py
1
4082
""" Django settings for my_proj project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from django.core.urlresolvers import reverse_lazy from os.path import dirna...
mit
-73,352,823,482,039,040
27.347222
74
0.690348
false
3.670863
false
false
false
glenc/sp.py
src/sp/stsadm.py
1
1452
# Interface for STSADM.EXE # # Allows users to execute STSADM operations by calling the # run method. The run method takes an operation argument # and a list of name-value pairs for the operation arguments # # import references import clr clr.AddReference("System") from System import Environment from Syste...
bsd-3-clause
-2,793,122,204,229,751,300
24.4
101
0.683196
false
3.292517
false
false
false
vingd/vingd-api-python
vingd/response.py
1
2336
try: import httplib except: import http.client as httplib class Codes: """ Standard HTTP response codes used inside Vingd ecosystem. """ # success OK = 200 CREATED = 201 NO_CONTENT = 204 PARTIAL_CONTENT = 206 # error MULTIPLE_CHOICES = 300 MOVED_PERMANENTLY = 301 ...
mit
-4,644,427,235,609,006,000
27.144578
80
0.598031
false
4.048527
false
false
false
Onirik79/aaritmud
src/enums/FLAG.py
1
8017
# -*- coding: utf-8 -*- """ Enumerazione delle flag di entità. """ # (TD) queste convertirle in variabili di descrizione caratteriale -100 / 100 #COURAGEOUS = FlagElement("Coraggioso", "L'entità non si farà abbattere dalle situazioni che incutono timore") #COWARD = FlagElement("Fifone", "L'entit...
gpl-2.0
-3,919,585,721,604,882,400
82.4
310
0.64723
false
3.039125
false
false
false
asgeran/MIMPy
mimpy/room.py
1
3846
import numpy as np import time import sys from multiprocessing import Pool import room_impulse as rimp #-----------------------------------------------------------------------------# # Room Class # #------------------------------------------------------...
gpl-2.0
-5,597,866,602,520,325,000
33.035398
84
0.51066
false
4.678832
false
false
false
bartveurink/bart.scripts
calcudoku_v2.py
1
2053
#!/usr/bin/env python3 import itertools class solution: def __init__(self, n, total, operator, cel_string): self.combinations=[] self.n=n self.total=total self.operator=operator self.cel_string=cel_string def checkduplicate(item, solution): if item in solution.combinations: return True return False d...
gpl-3.0
6,069,252,866,141,784,000
20.385417
54
0.692158
false
2.701316
false
false
false
quimaguirre/diana
diana/toolbox/parse_chembl.py
1
3686
import TsvReader import sql_utilities def main(): file_name = "/home/emre/data/target/chembl/chembl_drugtargets-18_17_33_12.txt" drug_to_target_id = get_molecule_to_target_id(file_name) print drug_to_target_id["CHEMBL502"] file_name = "/home/emre/data/target/chembl/target-18_15_28_11.txt" target_to...
mit
-783,623,154,916,638,100
43.409639
275
0.654097
false
2.720295
false
false
false
adelomana/30sols
extra/coverage/profiler.py
1
7122
### ### This script retrieves the coverage profiles of RNA-seq and Ribo-seq for all ribosomal protein genes. It stores it as text files. ### import sys,numpy,HTSeq import multiprocessing,multiprocessing.pool def analysis(genomicFeature): ''' This function computes the histograms of reads across transcript le...
gpl-3.0
-5,636,287,884,931,631,000
33.572816
132
0.601376
false
3.752371
false
false
false
sguertl/Flying_Pi
RPI/Bluetooth/BT_Socket.py
1
1097
import struct import array import serial from bluetooth import * server_sock = BluetoothSocket(RFCOMM) server_sock.bind(("", PORT_ANY)) server_sock.listen(1) port = server_sock.getsockname()[1] uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ee" advertise_service(server_sock, "DronePi", service_classes = [ uuid, SERIAL_P...
apache-2.0
4,770,927,997,223,984,000
27.868421
123
0.618961
false
3.57329
false
false
false
couchbase/couchbase-cli
pbar.py
1
7448
"""Couchbase CLI progress bar utilities""" import platform import struct import sys import time if platform.system() == "Windows": import ctypes from ctypes import c_long, c_ulong g_handle = ctypes.windll.kernel32.GetStdHandle(c_long(-11)) def get_terminal_width(): """Get windows terminal siz...
apache-2.0
-6,769,197,401,343,323,000
35.15534
97
0.549006
false
3.897436
false
false
false
calebmauer/fishing-contest
Contest-Site/Contest/settings.py
1
2489
""" Django settings for Contest project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
gpl-3.0
7,297,499,988,612,334,000
24.659794
71
0.685416
false
3.400273
false
false
false
tekton/DocuCanvas
issues/migrations/0014_auto__add_issuestatusupdate.py
1
15378
# -*- 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 'IssueStatusUpdate' db.create_table(u'issues_issuestatusupdate', ( (u'id', self.g...
gpl-3.0
4,704,772,852,154,018,000
82.581522
187
0.549226
false
3.542502
false
false
false
pnwairfire/emitcalc
setup.py
1
1264
from setuptools import setup, find_packages from emitcalc import __version__ test_requirements = [] with open('requirements-test.txt') as f: test_requirements = [r for r in f.read().splitlines()] setup( name='emitcalc', version=__version__, license='GPLv3+', author='Joel Dubowy', author_email...
gpl-3.0
5,832,487,791,136,944,000
29.095238
94
0.618671
false
3.773134
false
false
false
todaychi/hue
desktop/libs/hadoop/src/hadoop/fs/upload.py
1
6650
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
7,367,344,721,363,899,000
32.417085
143
0.685714
false
3.846154
false
false
false
klen/makesite
makesite/core.py
1
4821
import logging import sys from argparse import ArgumentParser from datetime import datetime from os import walk, path as op, listdir, access, X_OK, environ, pathsep from subprocess import check_call from sys import stdout from tempfile import mktemp from .settings import CFGNAME, TPLNAME, TPL_DIR, MOD_DIR from makesit...
lgpl-3.0
768,277,881,318,609,400
26.706897
74
0.616884
false
3.7723
false
false
false
texastribune/scuole
scuole/stats/management/commands/loadtaprdataOld.py
1
5514
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import csv import os from django.conf import settings from django.core.management.base import BaseCommand, CommandError from scuole.states.models import State from ...models import SchoolYear from ...schemas.tapr.mapping import MAPPING...
mit
-3,824,042,451,254,577,000
30.872832
78
0.510337
false
4.301092
false
false
false
Jofemago/Computacion-Grafica
plataforma/arrastarysoltar/juego/main.py
1
1953
import pygame import random from configuraciones import * from bloque import * if __name__ =='__main__': pygame.init() pantalla=pygame.display.set_mode([ANCHO, ALTO]) pygame.display.flip() reloj = pygame.time.Clock() fin = False general = pygame.sprite.Group() bloques = pygame.spri...
mit
8,309,881,589,786,046,000
25.753425
118
0.519713
false
3.5
false
false
false
702nADOS/sumo
tools/build/checkSvnProps.py
1
7577
#!/usr/bin/env python """ @file checkSvnProps.py @author Michael Behrisch @date 2010-08-29 @version $Id: checkSvnProps.py 22608 2017-01-17 06:28:54Z behrisch $ Checks svn property settings for all files. SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2010-2017 DLR (http://www.dlr.de/...
gpl-3.0
3,480,982,026,042,954,000
43.309942
153
0.526858
false
3.817128
false
false
false
gavinfish/Awesome-Python
beginning-python/project/markup/markup.py
1
1598
#coding=utf-8 import sys, re from handlers import * from util import * from rules import * class Parser: """语法分析器读取文本文件、应用规则并且控制处理程序""" def __init__(self, handler): self.handler = handler self.rules = [] self.filters = [] def addRule(self, rule): self.rules.append(rule) ...
apache-2.0
1,975,768,095,576,003,300
26.888889
69
0.565073
false
3.266811
false
false
false
ezScrum/ezScrum_1.7.2_export
robotTesting/keywords/lib/DatabaseHandler.py
1
1503
import MySQLdb class DatabaseHandler: def __init__(self): pass def is_delete(self, tableName): reservedTableNameList = ["mantis_user_table", "mantis_tokens_table", "mantis_project_table", "mantis_config_table"] isDeleteFlag = 1 for name in reservedTableNameList: ...
gpl-2.0
1,008,037,615,224,890,000
32.4
167
0.592814
false
4.029491
false
false
false
noirbee/savate
savate/flv_source.py
1
7240
# -*- coding: utf-8 -*- import collections import itertools from savate.sources import StreamSource from savate.flv import FLVHeader, FLVTag, FLVAudioData, FLVVideoData class FLVSource(StreamSource): # Initial burst duration, in milliseconds BURST_DURATION = 5 * 1000 def __init__(self, sock, server, a...
agpl-3.0
3,516,361,195,236,446,000
40.609195
107
0.589641
false
3.926247
false
false
false
jokedurnez/HCP_download
download_HCP_1200.py
1
4896
# download_HCP_1200.py # # Author: Joke Durnez (joke.durnez@gmail.com) ''' This script downloads data from the Human Connectome Project - 1200 subjects release. ''' # Import packages import os import tarfile import shutil SERIES_MAP = { 'MEG_unprocessed':'unprocessed/MEG/', '3T_unprocessed':'unprocessed/3T/', '7T_un...
mit
189,567,125,776,038,820
31.64
132
0.594567
false
3.74026
false
false
false
cwisecarver/osf.io
tests/factories.py
1
29800
# -*- coding: utf-8 -*- """Factories for the OSF models, including an abstract ModularOdmFactory. Example usage: :: >>> from tests.factories import UserFactory >>> user1 = UserFactory() >>> user1.username fred0@example.com >>> user2 = UserFactory() fred1@example.com Factory boy docs: http://f...
apache-2.0
-6,640,877,725,806,382,000
29.912863
115
0.626745
false
4.107512
false
false
false
wettenhj/mytardis
tardis/tardis_portal/auth/utils.py
1
2436
''' Created on 15/03/2011 @author: gerson ''' from django.conf import settings from django.contrib.auth.models import User, Group from ..models.access_control import UserAuthentication def get_or_create_user(auth_method, user_id, email=''): try: # check if the given username in combination with the ...
gpl-3.0
-7,385,093,740,048,658,000
29.835443
69
0.63711
false
4.2
false
false
false
fst034356/crawler
meizitu/crawler_queue.py
1
2443
# coding=utf-8 from datetime import datetime, timedelta from pymongo import MongoClient, errors from config import MONGO_URL class MongoQueue(object): OUTSTANDING = 1 PROCESSING = 2 COMPLETE = 3 def __init__(self, db, collection, timeout=300): self.MongoClient = MongoClient(MONGO_URL, conne...
mit
-9,164,955,320,802,204,000
28.481013
87
0.529841
false
3.476119
false
false
false
supergis/QGIS
python/plugins/processing/modeler/ModelerAlgorithm.py
1
28429
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
gpl-2.0
-6,655,698,435,662,205,000
38.484722
246
0.519786
false
4.749248
false
false
false
knutfrode/opendrift
examples/example_double_gyre_advection_schemes.py
1
1163
#!/usr/bin/env python # Illustrating the difference between Euler and Runge-Kutta propagation # schemes, using an idealised (analytical) eddy current field. # Double gyre current field from # http://shaddenlab.berkeley.edu/uploads/LCS-tutorial/examples.html import numpy as np from datetime import datetime, timedelta...
gpl-2.0
-2,952,341,839,737,798,700
30.432432
73
0.677558
false
2.864532
false
false
false
alberts/check_mk
web/plugins/wato/check_parameters.py
1
335827
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
gpl-2.0
1,549,915,122,462,985,700
37.709625
177
0.435787
false
4.983098
false
false
false
Iceman121/cyclops
src/main.py
1
6649
# -*- coding: utf-8 -*- """ Created on Fri Mar 31 12:27:52 2017 @author: Shashwat Pathak """ #============================================================================== # Chapter 1: Import Modules #============================================================================== #Document Object from bokeh.io import...
mit
-7,974,563,362,567,201,000
32.756345
173
0.486239
false
3.56706
false
false
false
rechner/ieee754converter
main.py
1
10399
#!/usr/bin/env python """ Simple app for converting between float, double, and IEEE754 binary representations. """ __author__ = "Zachary Sturgeon <zws258@email.vccs.edu>" import struct from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.boxlayout import BoxLayout from kivy.uix.checkbox import C...
gpl-2.0
-66,484,367,940,160,260
31.496875
92
0.628907
false
3.30757
false
false
false
bobbynewmark/mailthrottler
core.py
1
8934
#!/usr/local/bin/python # Copyright (c) Andrew Cox 2009-10 # See LICENCE for details """ These are common classes and functions to the whole project """ #Internal Modules #Python BulitIns import logging, ConfigParser, collections, uuid, os from datetime import datetime, timedelta #External Modules from genshi.template...
bsd-3-clause
-1,860,824,828,658,994,400
39.794521
144
0.648981
false
4.031588
true
false
false
facebookexperimental/eden
eden/integration/hg/revert_test.py
1
1419
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. from eden.integration.lib import hgrepo from .lib.hg_extension_test_base import EdenHgTestCase, hg_test @hg_test # pyre-ignore...
gpl-2.0
-6,294,341,069,270,488,000
34.475
73
0.646934
false
3.277136
true
false
false
skosukhin/spack
var/spack/repos/builtin/packages/py-hypothesis/package.py
1
1985
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
1,236,521,981,090,808,800
43.111111
85
0.676574
false
3.846899
false
false
false
MDAnalysis/mdanalysis
testsuite/MDAnalysisTests/analysis/test_base.py
1
11099
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) #...
gpl-2.0
-2,247,686,273,269,920,000
29.946927
79
0.641845
false
3.306177
true
false
false
jhuttner/dx-toolkit
src/python/dxpy/bindings/dxgtable.py
1
18126
# Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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.a...
apache-2.0
3,999,790,338,179,700,000
40.00905
229
0.615359
false
4.143086
false
false
false
yourcoke/scheduled-window-blind
main.py
1
2112
#init import pyb, gc # 1.0 open, 0.0 closed w_status = 1 #0 early, 1 late, 2 night, 3 manual w_mode = 3 w_times = [[(19,0),(8,0)],[(19,0),(10,0)],[(7,0),(14,30)]] #hardware i2c = pyb.I2C(2, pyb.I2C.MASTER) i2c.mem_write(4, 90, 0x5e) touch = i2c.mem_read(1, 90, 0)[0] s_up = pyb.Servo(1) s_down = pyb.Servo(2) lcd = p...
mit
-7,990,716,061,442,267,000
24.756098
107
0.490057
false
2.581907
false
false
false
jacobajit/ion
intranet/apps/ionldap/views.py
1
1898
# -*- coding: utf-8 -*- import logging from django import http from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import LDAPCourse logger = logging.getLogger(__name__) @login_required def main_view(request): """Show the current user's class schedule."""...
gpl-2.0
-4,192,773,229,080,174,000
26.911765
81
0.686512
false
3.508318
false
false
false