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
moden-py/SWAPY
swapy-ob.py
1
1727
# GUI object/properties browser. # Copyright (C) 2011 Matiychuk D. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at your option) any la...
lgpl-2.1
-9,084,540,459,404,032,000
25.412698
79
0.665316
false
3.651163
false
false
false
blindtex/blindtex
blindtex/iotools/iotools.py
1
5776
#-*-:coding:utf-8-*- import os import copy import json import string import subprocess #from blindtex import mainBlindtex import sys from sys import argv #HU1 #Method to open a file and return its content as a string. def openFile(fileName): '''This function takes a file a return its content as a string. ...
gpl-3.0
-1,899,846,381,258,995,200
39.65493
158
0.639182
false
4.025802
false
false
false
fanchao01/pythontools
Queue.py
1
4492
#!/bin/env python #-*- encoding: utf-8 -*- __author__ = "fanchao01" __version__ = "0.0.1" '''multi-thread queue likes Queue.queue''' import threading as _threading import time as _time class Full(Exception): """Exception Full raised by Queue.put/put_nowait""" class Empty(Exception): """Exception Empty ra...
gpl-2.0
4,892,882,358,093,603,000
27.43038
134
0.511131
false
4.050496
false
false
false
FilWisher/distributed-project
icarus/icarus/results/visualize.py
1
3641
"""Functions for visualizing results on graphs of topologies""" from __future__ import division import os import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx __all__ = [ 'draw_stack_deployment', 'draw_network_load', ] # Colormap for node stacks ...
mit
-1,813,796,021,012,025,600
31.508929
102
0.608075
false
3.983589
false
false
false
jessada/pyCMM
setup.py
1
4017
import sys import glob import pkgutil import os import fnmatch from setuptools import setup from pycmm.settings import DNASEQ_SLURM_MONITOR_PIPELINE_BIN from pycmm.settings import DUMMY_TABLE_ANNOVAR_BIN from pycmm.settings import MUTREP_SLURM_MONITOR_PIPELINE_BIN from pycmm.settings import MUTREP_FAMILY_REPORT_BIN fro...
gpl-2.0
-6,294,524,803,636,695,000
35.853211
139
0.591735
false
3.188095
false
false
false
bowen0701/algorithms_data_structures
lc0240_search_a_2d_matrix_ii.py
1
1900
"""Leetcode 240. Search a 2D Matrix II URL: https://leetcode.com/problems/search-a-2d-matrix-ii/ Medium Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: - Integers in each row are sorted in ascending from left to right. - Integers in each column ar...
bsd-2-clause
-1,983,297,366,930,088,000
24.675676
75
0.543158
false
3.442029
false
false
false
angadpc/Alexa-Project-
twilio/rest/chat/v1/service/__init__.py
1
49759
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base....
mit
-8,875,363,262,685,539,000
46.29943
115
0.655721
false
4.004748
false
false
false
berndca/xmodels
xmodels/constraints.py
1
12866
from __future__ import unicode_literals from collections import namedtuple import logging from six import string_types from .fields import RegexField, ValidationException, NCName, Name logger = logging.getLogger(__name__) KeyRef = namedtuple('KeyRef', 'key_name key_value ref_path') class KeyStore(object): ""...
bsd-3-clause
3,555,487,826,444,224,000
33.218085
79
0.596844
false
3.840597
false
false
false
agripo/website
core/models/shop.py
1
12773
from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db import models, IntegrityError from django.db.models import Q, Sum from django.utils import timezone from django.db.models.signals import pre_save, post_save from django.contrib...
gpl-2.0
-3,663,379,892,135,324,000
33.448649
116
0.642162
false
3.853083
false
false
false
zhuyue1314/simuvex
simuvex/s_slicer.py
1
3706
import pyvex from .s_errors import SimSlicerError class SimSlicer(object): """ A super lightweight single-IRSB slicing class. """ def __init__(self, statements, target_tmps=None, target_regs=None, inslice_callback=None, inslice_callback_infodict=None): self._statements = statements se...
bsd-2-clause
7,626,896,577,661,538,000
26.864662
126
0.588505
false
3.566891
false
false
false
ConflictGK/Codecatch-RSSE
properties.py
1
1114
import os class Properties: def __init__(self, query, example_query_index = -1, thepath = None): self.query = query main_dir = os.getcwd() self.SCRAPY_EXEC = "C:/WinPython36/python-3.6.3.amd64/Scripts/scrapy.exe" self.PARENT_DIR = main_dir + os.path.sep if example_query_index >= 0: self.DATA_DIR...
mit
5,942,278,755,511,353,000
46.434783
151
0.654399
false
2.63357
false
false
false
npinto/pytest
_pytest/skipping.py
1
9336
""" support for skip/xfail functions and markers. """ import py, pytest import sys def pytest_addoption(parser): group = parser.getgroup("general") group.addoption('--runxfail', action="store_true", dest="runxfail", default=False, help="run tests even if they are marked xfail") def pyte...
mit
-6,791,166,302,753,156,000
33.450185
80
0.564053
false
3.991449
true
false
false
clembou/PCWG
pcwg/gui/grid_box.py
1
7539
import Tkinter as tk import tkFont as tkFont import ttk as ttk from ..exceptions.handling import ExceptionHandler class GridBox(object): def __init__(self, master, headers, row, column): self.master = master self.headers = headers self.items_dict = {} self.tree = None ...
mit
2,690,398,291,229,796,400
27.026022
89
0.569041
false
3.752613
false
false
false
digitalocean/netbox
netbox/extras/admin.py
1
6231
from django import forms from django.contrib import admin from utilities.forms import LaxURLField from .models import CustomField, CustomLink, ExportTemplate, JobResult, Webhook def order_content_types(field): """ Order the list of available ContentTypes by application """ queryset = field.queryset.o...
apache-2.0
-5,184,452,310,745,300,000
26.091304
118
0.540363
false
3.973852
false
false
false
QISKit/qiskit-sdk-py
qiskit/extensions/standard/s.py
1
2513
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
apache-2.0
-7,865,258,483,430,124,000
24.383838
77
0.564266
false
3.485437
false
false
false
quantumlib/Cirq
cirq-core/cirq/sim/simulator_base.py
1
12429
# Copyright 2021 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
7,946,348,196,334,659,000
39.223301
100
0.620323
false
4.364115
false
false
false
lelandbatey/defuse_division
defusedivision/game.py
1
9622
import logging import random import curses import queue from .minesweeper.minefield import MineField from .minesweeper.contents import Contents class Conveyor(object): """ Abstract class Conveyor describes the basic contract for communicating about games of Minesweeper. """ def get_state(self): ...
gpl-3.0
-569,778,188,004,578,700
30.34202
102
0.585014
false
3.985915
false
false
false
beni55/rinohtype
rinohlib/templates/article.py
1
1907
from rinoh.document import DocumentSection from rinoh.paragraph import Paragraph from rinoh.structure import GroupedFlowables from .base import (ContentsPart, DocumentBase, DocumentOptions, TableOfContentsSection) class ArticleFrontMatter(GroupedFlowables): def __init__(self): self.to...
agpl-3.0
-5,709,940,673,110,627,000
28.338462
78
0.588359
false
4.551313
false
false
false
junion-org/junion
junion/twitter/util.py
1
6239
#!/usr/bin/env python # coding: utf-8 """ Twitter関連のユーティリティモジュール """ import re import time import calendar import HTMLParser # html special charsをアンエスケープするためのパーサ parser = HTMLParser.HTMLParser() def get_text_and_entities(tw): """ ツイートを渡すと,エンティティ除外文書とエンティティリストを返す """ if 'entities' in tw: return...
mit
7,831,926,185,606,672,000
25.989305
116
0.602536
false
2.131334
false
false
false
deepmind/lamb
lamb/dyneval.py
1
4538
# Copyright 2018 DeepMind Technologies Limited. 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 a...
apache-2.0
-5,901,291,351,476,678,000
34.732283
78
0.647422
false
3.674494
false
false
false
SUSE-Cloud/glance
glance/tests/integration/legacy_functional/test_v1_api.py
1
62578
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-2,538,296,298,288,473,000
41.339648
79
0.566205
false
3.977752
true
false
false
Vagab0nd/SiCKRAGE
lib3/twilio/rest/events/v1/subscription/subscribed_event.py
1
14449
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
gpl-3.0
4,776,578,688,993,812,000
35.579747
107
0.639006
false
4.533731
false
false
false
mosaic-cloud/mosaic-components-httpg
applications/mosaic-httpg/sources/mosaic_httpg_tester.py
1
20676
import json import os import pprint import random import string import struct import sys import time import pika _verbose = True _broker_host = "127.0.0.1" _broker_port = 21688 _broker_user = "guest" _broker_password = "guest" _broker_virtual_host = "/" _handlers_exchange_identifier = "mosaic-http-requests" _handle...
apache-2.0
-3,355,641,044,008,359,000
34.895833
126
0.653415
false
3.116672
false
false
false
pferreir/indico-backup
indico/MaKaC/plugins/Collaboration/ravem.py
1
3751
# -*- coding: utf-8 -*- ## ## $id$ ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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 Foundati...
gpl-3.0
205,378,133,880,764,830
39.333333
118
0.672354
false
3.948421
false
false
false
helixyte/TheLMA
thelma/repositories/rdb/schema/tables/samplemolecule.py
1
1342
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Sample molecule table. """ from sqlalchemy import CheckConstraint from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import Float ...
mit
-2,361,379,783,342,005,000
35.27027
80
0.646796
false
4.549153
false
false
false
bdang2012/taiga-back-casting
taiga/timeline/apps.py
1
1772
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
-1,320,559,556,682,931,500
48.166667
110
0.697175
false
3.995485
false
false
false
andrewthetechie/slack_rtmbot_core_plugins
status/status.py
1
1633
#! env/bin/python from datetime import timedelta import psutil import re import yaml outputs = [] # load default configs config = yaml.load(file('conf/rtmbot.conf', 'r')) def status_main(): """ Does the work of checking the server's status Returns the message to output :return: message """ ...
lgpl-3.0
-2,207,216,231,104,388,900
25.33871
97
0.6485
false
3.645089
false
false
false
openprocurement/openprocurement.tender.esco
openprocurement/tender/esco/tests/bid.py
1
8048
# -*- coding: utf-8 -*- import unittest from esculator import npv, escp from openprocurement.api.utils import get_now from openprocurement.tender.esco.tests.base import ( test_bids, test_features_tender_data, BaseESCOContentWebTest, NBU_DISCOUNT_RATE ) from openprocurement.tender.belowthreshold.tests.base impo...
apache-2.0
-7,882,602,119,402,993
41.136126
126
0.742917
false
3.232129
true
false
false
disulfiram/AntFarm
Game.py
1
3954
import pygame import sys from Menu.MenuItem import * white = (255, 255, 255) black = (0, 0, 0) grey = (195, 195, 195) pink = (242, 217, 229) green = (210, 255, 191) # TODO: More robust menu system. Different menus with different menu items. Maybe have button action here. main_menu = [MenuItem("New Game", True), Menu...
gpl-3.0
-1,382,443,975,517,226,800
33.382609
219
0.634294
false
3.505319
false
false
false
KimTaehee/eucalyptus
admin-tools/eucalyptus_admin/commands/bootstrap/__init__.py
1
2345
# Copyright 2015 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
gpl-3.0
-4,270,303,309,189,916,700
39.431034
74
0.764606
false
4.10683
false
false
false
weiyuanke/mykeystone
keystone/openstack/common/cfg.py
1
52287
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, 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 # #...
apache-2.0
1,294,673,558,742,574,300
32.517308
79
0.597969
false
4.321597
true
false
false
malmiron/incubator-airflow
airflow/operators/bash_operator.py
1
5597
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
6,163,552,212,366,461,000
36.313333
79
0.595676
false
4.365835
false
false
false
sjpet/epysteme
epysteme/sets/sql.py
1
19387
# -*- coding: utf-8 -*- import os import sqlite3 import weakref from collections import OrderedDict from functools import reduce from ..helpers import (repeat_to_match, key_depth, expand_key, extend_functions, tuple_, ...
mit
4,250,631,575,813,475,000
32.834206
79
0.497911
false
4.84675
false
false
false
blackpan2/HealthNet
src/healthnet/patient/forms.py
1
5185
""" Application: HealthNet File: /patient/forms.py Authors: - Nathan Stevens - Philip Bedward - Daniel Herzig - George Herde - Samuel Launt Description: - This file contains all view controller information """ from base.models import ExtendedStay from dja...
mit
-8,182,136,124,556,290,000
32.668831
113
0.580714
false
4.144684
false
false
false
toirl/ringo
ringo/lib/helpers/appinfo.py
1
4117
"""Modul to get information about the application""" import os import pkg_resources from pyramid.threadlocal import get_current_registry from ringo.lib.sitetree import build_breadcrumbs, site_tree_branches def get_ringo_version(): return pkg_resources.get_distribution('ringo').version def get_app_inheritance_pa...
gpl-2.0
7,238,456,900,135,183,000
29.954887
72
0.686422
false
4.020508
false
false
false
disqus/django-old
django/contrib/formtools/wizard/views.py
1
26572
import re from django import forms from django.shortcuts import redirect from django.core.urlresolvers import reverse from django.forms import formsets, ValidationError from django.views.generic import TemplateView from django.utils.datastructures import SortedDict from django.utils.decorators import classonlymethod ...
bsd-3-clause
-6,143,436,178,708,382,000
37.734694
90
0.607594
false
4.231884
false
false
false
Tommekster/kotelnik
pokus.py
1
5511
#!/usr/bin/python3 #import time # time.sleep(5.5) import http.client from socket import error as socket_error import time logCtrlFile = '/tmp/kotelnik.log' logTempFile = '/tmp/kotelnikTemps.log' class connectionError(RuntimeError): def __init__(self, arg): self.args = arg class sensorError(RuntimeError): def __i...
gpl-3.0
2,927,955,303,797,610,500
29.269231
156
0.685424
false
2.444099
false
false
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/PySide/examples/declarative/extending/chapter3-bindings/bindings.py
1
3388
#!/usr/bin/python # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # Contact: PySide Team (pyside@openbossa.org) # # This file is part of the examples of PySide: Python for Qt. # # You may use this file under the terms of the BSD license as follows: # # "Redistribution and use...
epl-1.0
-8,127,580,666,819,666,000
35.826087
72
0.702184
false
4
false
false
false
dreadrel/UWF_2014_spring_COP3990C-2507
notebooks/scripts/book_code/code/registry-deco.py
1
1048
# Registering decorated objects to an API from __future__ import print_function # 2.X registry = {} def register(obj): # Both class and func decorator registry[obj.__name__] = obj # Add to registry return obj # Return obj itself, not a wrapper @...
apache-2.0
154,931,190,101,978,340
28.111111
78
0.533397
false
3.867159
false
false
false
sbenthall/chantbot
parse.py
1
1431
import ConfigParser import re import math config= ConfigParser.ConfigParser() config.read('config.cfg') def hash_word(match): return '#' + match.group() def hash_line(line,kw_re): for kr in kw_re: line = re.sub(kr, hash_word, line) return line def prepare_chants(source,num_bursts,keywords): ...
mit
-8,786,346,433,938,706,000
20.358209
70
0.55276
false
3.3125
true
false
false
acapet/GHER-POSTPROC
Examples/Conservation.py
1
2831
import numpy as np import numpy.ma as ma from netCDF4 import Dataset #from mpl_toolkits.basemap import Basemap #from multiprocessing import Pool #import gsw ...
gpl-3.0
3,543,788,336,527,825,000
33.950617
212
0.530908
false
3.390419
false
false
false
kaffeebrauer/Lean
Algorithm.Framework/Execution/StandardDeviationExecutionModel.py
1
7152
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
apache-2.0
-3,448,392,155,997,403,000
46.673333
120
0.68993
false
4.508197
false
false
false
ShakedY/ai-project
py2.5/bin/smtpd.py
1
18102
#!/home/shaked/Desktop/prob-plan-recognition/seq-sat-lama/py2.5/bin/python """An RFC 2821 smtp proxy. Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]] Options: --nosetuid -n This program generally tries to setuid `nobody', unless this flag is set. The setuid call wi...
gpl-3.0
-7,248,076,950,587,915,000
31.382826
78
0.553861
false
4.021773
false
false
false
Grognak/Grognaks-Mod-Manager
lib/killable_threading.py
1
4056
import threading class KillableThread(threading.Thread): """A base class for threads that die on command. Subclasses' run() loops test if self.keep_alive is False. Instead of sleeping, they should call nap(). And any subclass method, meant to be called by other threads, that interrupts a nap() s...
gpl-3.0
-4,480,165,473,395,033,000
32.520661
90
0.571006
false
4.337968
false
false
false
flipjack/misrutas
project/app/views.py
1
22105
# -*- encoding: utf-8 -*- from django.shortcuts import render, redirect from django.contrib.auth import logout from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.contrib import messages from django.views.decorators.csrf import csrf_exempt import json from...
mit
-6,006,489,336,733,788,000
37.272097
256
0.700765
false
3.132785
false
false
false
flavour/ifrc_qa
modules/s3/s3translate.py
1
66270
# -*- coding: utf-8 -*- """ Translation API @copyright: 2012-2016 (c) Sahana Software Foundation @license: MIT 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 res...
mit
234,777,986,828,744,220
37.195965
117
0.432322
false
5.1396
false
false
false
hariseldon99/archives
dtwa_ising_longrange/dtwa_ising_longrange/dtwa_ising_longrange.py
1
45340
#!/usr/bin/env python #Author: Analabha Roy from __future__ import division, print_function from mpi4py import MPI from reductions import Intracomm from redirect_stdout import stdout_redirected import sys import copy import random import numpy as np from scipy.signal import fftconvolve from scipy.sparse import * fro...
gpl-2.0
-5,499,009,293,101,981,000
43.714004
86
0.537847
false
2.984073
false
false
false
ph147/dcf77
reader.py
1
3135
#!/usr/bin/python import sys import struct EPSILON = 0.02 SAMPLE_RATE = 44100 ZERO_BIT_IN_SECS = 0.1 ONE_BIT_IN_SECS = 0.2 NEW_MINUTE_BEEP_THRESHOLD = 1.7 def read_word(inf): return struct.unpack('<l', inf.read(struct.calcsize('=l')))[0] def read_words(inf): word = read_word(inf) while True: ...
mit
750,148,069,711,881,200
22.75
74
0.56555
false
3.582857
false
false
false
alfa-addon/addon
plugin.video.alfa/servers/crunchyroll.py
1
3429
# -*- coding: utf-8 -*- from builtins import range import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int if PY3: #from future import standard_library #standard_library.install_aliases() import urllib.parse as urllib ...
gpl-3.0
2,660,880,265,300,349,000
33.697917
153
0.585352
false
3.236072
false
false
false
pklimai/py-junos-eznc
tests/unit/test_factcache.py
2
10508
import unittest2 as unittest from nose.plugins.attrib import attr from mock import patch, MagicMock, call from jnpr.junos.exception import FactLoopError from jnpr.junos import Device from ncclient.manager import Manager, make_device_handler from ncclient.transport import SSHSession __author__ = "Stacy Smith" __credi...
apache-2.0
7,211,522,377,934,764,000
41.54251
78
0.576418
false
4.01682
true
false
false
haphaeu/yoshimi
EulerProject/121.py
1
2562
from fractions import Fraction from fractions import gcd def nextPermLexic(perm): # ########################################################################### #The following algorithm generates the next permutation lexicographically #after a given permutation. It changes the given permutation in-place. #1- Find the l...
lgpl-3.0
-6,066,579,934,885,888,000
30.243902
77
0.541374
false
3.259542
false
false
false
ArteliaTelemac/PostTelemac
PostTelemac/meshlayertools/toshape/posttelemac_util_extractpts_caduc.py
1
20503
##[01_Telemac]=group # ************************************************************************* """ Versions : 0.0 premier script 0.2 : un seul script pour modeleur ou non """ # ************************************************************************* ##Type_de_traitement=selection En arriere plan;Modeler;Modeler ...
gpl-3.0
-5,462,225,697,454,298,000
42.809829
118
0.485441
false
3.91802
true
false
false
NinjaMSP/crossbar
crossbar/twisted/processutil.py
1
4681
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
agpl-3.0
1,370,651,899,697,463,800
37.68595
104
0.620594
false
4.416038
false
false
false
MatthewWilkes/mw4068-packaging
src/melange/src/soc/views/helper/params.py
1
16606
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
apache-2.0
4,683,945,472,841,034,000
33.239175
80
0.665422
false
3.350686
false
false
false
HIPS/optofit
cosyne/make_figure_1.py
1
17433
import os import copy import cPickle import itertools import numpy as np seed = np.random.randint(2**16) # seed = 2958 seed = 58187 #seed = 60017 print "Seed: ", seed import matplotlib.pyplot as plt from matplotlib.patches import Path, PathPatch from hips.inference.particle_mcmc import * from optofit.cneuron.compar...
gpl-2.0
7,677,128,331,014,776,000
29.265625
169
0.5224
false
2.57694
false
false
false
Metonimie/benchmark-scoreboard
src/models/__init__.py
1
1802
""" Author: Denis Nutiu <denis.nutiu@gmail.com> This file is part of scoreboard-benchmark. scoreboard-benchmark 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...
lgpl-3.0
8,096,559,075,137,097,000
33.653846
117
0.668147
false
3.850427
false
false
false
hsavolai/vmlab
src/kiwi/log.py
1
5433
# # Kiwi: a Framework and Enhanced Widgets for Python # # Copyright (C) 2005-2006 Async Open Source # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, ...
gpl-3.0
-9,216,188,398,400,686,000
27.746032
181
0.674581
false
3.812632
false
false
false
DedMemez/ODS-August-2017
safezone/GZPlayground.py
1
3107
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.safezone.GZPlayground from direct.fsm import State from toontown.safezone import GolfKart from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog import Playground import sys class GZPlayground(Play...
apache-2.0
5,831,154,515,158,108,000
37.858974
141
0.629868
false
3.663915
false
false
false
mic4ael/indico
indico/modules/events/timetable/blueprint.py
1
6046
# 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 indico.modules.events.timetable.controllers.display import (...
mit
2,053,347,587,523,897,600
73.641975
120
0.606351
false
4.014608
false
false
false
savant-nz/carbon
Scripts/SCons/Compilers/Clang.sconscript.py
1
2022
# # This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not # distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Creates and returns a build environment that uses Clang. This is done by altering the GCC build environment. import...
mpl-2.0
6,866,951,723,079,990,000
39.44
115
0.64095
false
3.37
false
false
false
jberci/resolwe
resolwe/elastic/signals.py
1
1451
""".. Ignore pydocstyle D400. ======================= Elastic Signal Handlers ======================= """ from django.db.models.signals import post_delete, post_save from django.dispatch import receiver from guardian.models import GroupObjectPermission, UserObjectPermission from .builder import index_builder def ...
apache-2.0
3,300,003,933,398,636,000
29.87234
76
0.73122
false
4.331343
false
false
false
CptSpaceToaster/memegen
memegen/services/template.py
1
1885
import logging from ._base import Service from ..domain import Template log = logging.getLogger(__name__) class TemplateService(Service): def __init__(self, template_store, **kwargs): super().__init__(**kwargs) self.template_store = template_store def all(self): """Get all templat...
mit
-175,650,737,700,038,140
30.416667
80
0.537931
false
4.934555
false
false
false
0--key/lib
portfolio/2013_OrSys/dispatcher.py
1
6451
from flask import Flask, render_template, session, redirect, url_for, request from flask import logging, g from settings import users from functions import fetch_pending_orders_data, fetch_products_data,\ fetch_suppliers_data, get_user_id, suppDataCheck, suppDataInsert, \ suppDataUpdate, setActiveTab, appendP...
apache-2.0
8,784,297,107,164,680,000
35.862857
79
0.647341
false
3.490801
false
false
false
javiercantero/streamlink
src/streamlink/plugins/kingkong.py
1
2561
import re from streamlink.plugin import Plugin from streamlink.plugin.api import http, validate from streamlink.stream import HTTPStream, HLSStream API_URL = "https://g-api.langlive.com/webapi/v1/room/info?room_id={0}" VOD_API_URL = ( "https://g-api.langlive.com/webapi/v1/replayer/detail?live_id={0}") STATUS_ONLI...
bsd-2-clause
8,535,942,782,514,645,000
25.132653
71
0.5205
false
3.556944
false
false
false
MRtrix3/mrtrix3
lib/mrtrix3/fsl.py
1
6782
# Copyright (c) 2008-2021 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Covered Software is provided under this License on an "as is" #...
mpl-2.0
6,801,620,265,861,604,000
42.754839
247
0.692716
false
3.534132
false
false
false
ESS-LLP/erpnext-healthcare
erpnext/regional/italy/utils.py
1
13784
from __future__ import unicode_literals import frappe, json, os from frappe.utils import flt, cstr from erpnext.controllers.taxes_and_totals import get_itemised_tax from frappe import _ from frappe.utils.file_manager import save_file, remove_file from frappe.desk.form.load import get_attachments from erpnext.regional....
gpl-3.0
-7,304,240,070,135,029,000
38.495702
139
0.714089
false
3.127751
false
false
false
GoogleChrome/chromium-dashboard
pages/intentpreview_test.py
1
6198
# Copyright 2020 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 agreed to in writing, s...
apache-2.0
5,732,362,012,227,741,000
36.569697
79
0.68264
false
3.702509
true
false
false
kmadathil/sanskrit_parser
sanskrit_parser/base/maheshvara_sutra.py
1
8576
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Intro ====== Get varnas in a pratyahara: .. code:: python >>> from sanskrit_parser.base.maheshvara_sutra import MaheshvaraSutras >>> MS = MaheshvaraSutras() >>> jaS = SanskritImmutableString('jaS', encoding=SLP1) >>> print(MS.getPratyahara(jaS)) j...
mit
-1,527,397,545,974,053,400
33.369748
116
0.566259
false
3.144944
false
false
false
to266/hyperspy
hyperspy/_components/expression.py
1
4851
from functools import wraps from hyperspy.component import Component _CLASS_DOC = \ """%s component (created with Expression). .. math:: f(x) = %s """ def _fill_function_args(fn): @wraps(fn) def fn_wrapped(self, x): return fn(x, *[p.value for p in self.parameters]) return fn_wrapped ...
gpl-3.0
4,370,389,324,684,439,000
33.404255
78
0.545867
false
4.651007
false
false
false
rwl/PyCIM
PyCIM/PrettyPrintXML.py
1
1717
# Copyright (C) 2010-2011 Richard Lincoln # # 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, modify, merge, publish...
mit
6,270,850,627,351,509,000
40.902439
78
0.699476
false
4.107656
false
false
false
Enteee/pdml2flow
pdml2flow/flow.py
1
3496
# vim: set fenc=utf8 ts=4 sw=4 et : import json import dict2xml from .autovivification import AutoVivification from .conf import Conf from .utils import call_plugin from .logging import * class Flow(): # The overall frame time newest_overall_frame_time = 0 @staticmethod def get_flow_id(frame): ...
apache-2.0
-4,154,306,614,671,607,300
24.705882
98
0.507151
false
4.103286
false
false
false
jyejare/robottelo
robottelo/cli/base.py
1
16328
"""Generic base class for cli hammer commands.""" import logging import re from wait_for import wait_for from robottelo import ssh from robottelo.cli import hammer from robottelo.config import settings class CLIError(Exception): """Indicates that a CLI command could not be run.""" class CLIBaseError(Exception...
gpl-3.0
-8,573,411,306,033,115,000
33.447257
99
0.563694
false
4.712266
false
false
false
sanjuro/RCJK
vendor/django/core/cache/backends/db.py
2
4332
"Database cache backend." from django.core.cache.backends.base import BaseCache from django.db import connection, transaction, DatabaseError import base64, time from datetime import datetime try: import cPickle as pickle except ImportError: import pickle class CacheClass(BaseCache): def __init__(self, tab...
apache-2.0
-6,734,824,525,095,844,000
43.204082
140
0.584949
false
3.992627
false
false
false
guori12321/todo
todo/generator.py
1
1176
# coding=utf8 """ Generator from todo to todo format string. from todo.generator import generator generator.generate(todo) # return str """ from models import Task from models import Todo class TodoGenerator(object): """ Generator from python list to string. """ g_newline = "\n" def g_id(...
mit
8,895,891,163,284,157,000
20.381818
65
0.527211
false
3.68652
false
false
false
Gnewt/bhs_sales
shirts/models.py
1
1486
from django.db import models from json_field import JSONField SMALL = 'S' MEDIUM = 'M' LARGE = 'L' XLARGE = 'XL' ITEM_SIZE_CHOICES = ( (SMALL, 'Small (S)'), (MEDIUM, 'Medium (M)'), (LARGE, 'Large (L)'), (XLARGE, 'Extra Large (XL)'), ) class StoreItem(models.Model): name = models.C...
mit
-7,521,620,094,661,558,000
29.326531
94
0.597577
false
3.488263
false
false
false
elgambitero/FreeCAD_sf_master
src/Mod/Arch/importIFC.py
1
62430
#*************************************************************************** #* * #* Copyright (c) 2014 * #* Yorik van Havre <yorik@uncreated.net> * #* ...
lgpl-2.1
3,035,360,781,126,952,400
45.694091
181
0.530194
false
4.079059
false
false
false
greenlin/universal-portfolios
universal/result.py
1
10866
import numpy as np import pandas as pd import matplotlib.pyplot as plt import pickle from universal import tools class PickleMixin(object): def save(self, filename): """ Save object as a pickle """ with open(filename, 'wb') as f: pickle.dump(self, f, -1) @classmethod def load...
mit
-8,270,731,566,286,813,000
28.769863
102
0.544543
false
3.615973
false
false
false
jsharkey13/isaac-selenium-testing
isaactest/tests/symbolic_q_text_entry_correct.py
1
2725
import time from ..utils.log import log, INFO, ERROR, PASS from ..utils.isaac import answer_symbolic_q_text_entry, open_accordion_section, submit_login_form, assert_logged_in from ..utils.i_selenium import assert_tab, image_div from ..utils.i_selenium import wait_for_xpath_element from ..tests import TestWithDependency...
mit
8,669,670,329,497,179,000
48.545455
160
0.686972
false
3.614058
true
false
false
EricssonResearch/calvin-base
calvin/actor/actor.py
1
36802
# -*- coding: utf-8 -*- # Copyright (c) 2015-2016 Ericsson AB # # 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 applic...
apache-2.0
8,187,153,479,713,603,000
39.308872
130
0.606081
false
4.185375
false
false
false
hiuwo/acq4
acq4/pyqtgraph/opengl/items/GLGridItem.py
1
1650
from OpenGL.GL import * from .. GLGraphicsItem import GLGraphicsItem from ... import QtGui __all__ = ['GLGridItem'] class GLGridItem(GLGraphicsItem): """ **Bases:** :class:`GLGraphicsItem <pyqtgraph.opengl.GLGraphicsItem>` Displays a wire-grame grid. """ def __init__(self, size=None, co...
mit
-7,482,402,917,673,212,000
27.448276
101
0.526061
false
3.4375
false
false
false
davy39/eric
Debugger/VariablesFilterDialog.py
1
3253
# -*- coding: utf-8 -*- # Copyright (c) 2002 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the variables filter dialog. """ from __future__ import unicode_literals from PyQt5.QtWidgets import QDialog, QDialogButtonBox from Debugger.Config import ConfigVarTypeDispStrings import Prefer...
gpl-3.0
3,282,031,345,774,328,300
32.193878
77
0.618813
false
4.331558
false
false
false
s-tar/just-a-chat
kernel/server.py
1
3625
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'mr.S' import bottle from gevent import monkey import datetime from kernel.widget import get as loadWidget from kernel.helpers import is_ajax from bottle import default_app, Bottle, route, static_file, ServerAdapter, Jinja2Template, request, error, redirect, j...
mit
8,543,817,912,420,767,000
27.551181
144
0.608828
false
3.482229
false
false
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_connection_monitors_operations.py
1
45799
# 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
-1,777,509,022,329,166,800
52.069525
242
0.658551
false
4.347318
true
false
false
keepkey/python-keepkey
keepkeylib/client.py
1
50402
# This file is part of the TREZOR project. # # Copyright (C) 2012-2016 Marek Palatinus <slush@satoshilabs.com> # Copyright (C) 2012-2016 Pavol Rusnak <stick@satoshilabs.com> # Copyright (C) 2016 Jochen Hoenicke <hoenicke@gmail.com> # # This library is free software: you can redistribute it and/or modify # it under...
lgpl-3.0
-2,209,451,958,689,590,800
36.169617
168
0.574699
false
4.058786
false
false
false
Kalle0x12/Test2
csr_test.py
1
2910
from __future__ import print_function import lis_wrapper import numpy as np import scipy.sparse # Define a symmetric 8 x 8 dense upper triangular matrix first. # This matrix is part of the examples which come with Intel's MKL library # and is used here for historical reasons. # A: # 7.0, 1.0, 2.0...
gpl-3.0
-5,039,573,383,625,121,000
26.714286
101
0.604467
false
2.712022
false
false
false
alobbs/autome
chief/chief-client.py
1
1722
#!/usr/bin/env python3 import conf import argparse import time import requests import tabulate CLEAR = "\x1b[2J\x1b[1;1H" def get(path): url = "http://localhost:{}".format(conf.CHIEF_API_PORT) r = requests.get(url + path) return r.json() def table(info, *a, **ka): if 'tablefmt' not in ka: ...
mit
8,255,673,079,585,231,000
24.323529
73
0.546458
false
3.324324
false
false
false
liberiun/cynin-intranet
src/ubify.spaces/ubify/spaces/browser/mindmap.py
1
5085
############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. # #cyn.in v2 an open source appliance is distributed ...
gpl-3.0
-5,295,264,525,636,877,000
40.341463
116
0.661357
false
4.003937
false
false
false
volalex/endlessctf
scoreboard/models.py
1
2683
# encoding: UTF-8 import os from django.contrib.auth.models import User from django.db import models from django.db.models.signals import pre_delete, pre_save from django.dispatch import receiver class Category(models.Model): title = models.CharField(max_length=50) position = models.IntegerField(name='positio...
gpl-2.0
6,566,926,016,593,865,000
26.947368
94
0.654991
false
3.667127
false
false
false
jetuk/pywr
examples/two_reservoir_moea.py
1
8924
""" This example shows the trade-off (pareto frontier) of deficit against cost by altering a reservoir control curve. Two types of control curve are possible. The first is a monthly control curve containing one value for each month. The second is a harmonic control curve with cosine terms around a mean. Both Parameter...
gpl-3.0
277,628,569,962,579,800
37.465517
127
0.651277
false
3.44423
false
false
false
ver228/tierpsy-tracker
tierpsy/gui/BatchProcessing_ui.py
1
13026
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'BatchProcessing.ui' # # Created by: PyQt5 UI code generator 5.12.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_BatchProcessing(object): def setupUi(self, BatchProcessin...
mit
-3,348,856,700,559,731,000
63.167488
109
0.720482
false
3.805434
false
false
false
wli/django-allauth
allauth/socialaccount/providers/paypal/provider.py
1
1138
from allauth.socialaccount import providers from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class PaypalAccount(ProviderAccount): def get_avatar_url(self): return self.account.extra_data.get('picture') def to_...
mit
2,561,766,692,793,844,700
32.470588
96
0.654657
false
3.924138
false
false
false
danirus/django-comments-xtd
django_comments_xtd/admin.py
1
1729
from __future__ import unicode_literals from django.contrib import admin from django_comments import get_model from django_comments.admin import CommentsAdmin from django_comments.models import CommentFlag from django_comments_xtd.models import XtdComment, BlackListedDomain class XtdCommentsAdmin(CommentsAdmin): ...
bsd-2-clause
6,129,600,062,988,580,000
34.285714
78
0.585309
false
3.655391
false
false
false
marcharper/python-ternary
examples/scatter_colorbar.py
1
4211
"""An example of the colorbar display on the scatter plot.""" import ternary import matplotlib.pyplot as plt def _en_to_enth(energy, concs, A, B, C): """Converts an energy to an enthalpy. Converts energy to enthalpy using the following formula: Enthalpy = energy - (energy contribution from A) - (energy c...
mit
334,574,868,188,572,740
24.521212
112
0.560912
false
3.462993
false
false
false
ITCase/ps_gallery
pyramid_sacrud_gallery/tests/test_models.py
1
3733
# -*- coding: utf-8 -*- # # Copyright © 2014 Petr Zelenin (po.zelenin@gmail.com) # # Distributed under terms of the MIT license. import hashlib import os import unittest import transaction from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from zope.sqlalchemy import ZopeTr...
mit
-1,741,868,866,605,887,200
33.238532
78
0.643891
false
3.724551
true
false
false
siavashk/pycpd
testing/affine_test.py
1
1194
import pytest import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from pycpd import AffineRegistration def test_2D(): B = np.array([[1.0, 0.5], [0, 1.0]]) t = np.array([0.5, 1.0]) Y = np.loadtxt('data/fish_target.txt') X = np.dot(Y, B) + np.tile(t, (np.shape(Y)...
mit
1,301,905,175,649,250,300
30.421053
72
0.577889
false
2.417004
false
false
false
tomprince/gemrb
gemrb/GUIScripts/Spellbook.py
1
16543
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2011 The GemRB Project # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) ...
gpl-2.0
-1,405,279,672,849,003,800
34.423983
112
0.708457
false
2.921243
false
false
false
hkernbach/arangodb
3rdParty/V8/v5.7.492.77/src/js/macros.py
1
9259
# Copyright 2006-2009 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of co...
apache-2.0
-6,143,239,776,302,362,000
45.762626
161
0.696836
false
3.143973
false
false
false
enthought/traitsbackendqt
enthought/traits/ui/qt4/image_enum_editor.py
1
12386
#------------------------------------------------------------------------------ # # Copyright (c) 2009, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions d...
gpl-2.0
-7,069,525,519,631,933,000
37.110769
80
0.516793
false
4.980298
false
false
false
realitix/vulkan
setup.py
1
1143
from setuptools import setup with open("README.md") as file: long_description = file.read() setup( name='vulkan', version='1.1.99.1', description='Ultimate Python binding for Vulkan API', author='realitix', author_email='realitix@gmail.com', packages=['vulkan'], long_descripiton=long...
apache-2.0
-5,513,329,181,179,121,000
31.657143
71
0.634296
false
3.81
false
false
false
VerosK/django-dashing
dashing/widgets.py
1
2802
# -*- coding: utf-8 -*- import json from django.http import HttpResponse from django.views.generic.detail import View class JSONResponseMixin(object): """ A mixin that can be used to render a JSON response. """ def render_to_json_response(self, context, **response_kwargs): """ Returns ...
bsd-3-clause
4,210,653,318,595,151,000
22.745763
81
0.568879
false
3.875519
false
false
false