repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
twz915/django
tests/cache/tests.py
1
91820
# Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. import copy import io import os import pickle import re import shutil import tempfile import threading import time import unittest import warnings from unittest import mock from django.conf import settings from django.core...
bsd-3-clause
-728,866,813,146,584,600
38.935596
115
0.629157
false
hxa7241/minilight-python
spatialindex.py
1
5023
# MiniLight Python : minimal global illumination renderer # # Harrison Ainsworth / HXA7241 and Juraj Sukop : 2007-2008, 2013. # http://www.hxa.name/minilight from triangle import Triangle, TOLERANCE from vector3f import Vector3f, MAX MAX_LEVELS = 44 MAX_ITEMS = 8 class SpatialIndex(object): def __init__(s...
cc0-1.0
350,039,534,897,055,550
43.848214
80
0.430221
false
g3-3k/libreant
presets/test/test_preset_paths.py
1
2747
''' Collection of tests to verify preset paths loading ''' from nose.tools import raises, eq_ from tempfile import NamedTemporaryFile, mkdtemp from shutil import rmtree from presets.presetManager import PresetException import json import os from presets.presetManager import PresetManager minimalBody = { "id": "id_te...
agpl-3.0
-2,373,727,523,293,859,000
26.19802
79
0.647252
false
Spredzy/dci-ansible
modules/dci_new_job.py
1
3559
#!/usr/bin/python # 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 # dist...
apache-2.0
327,745,215,869,741,700
27.934959
96
0.671537
false
ddico/odoo
addons/account/tests/test_account_incoming_supplier_invoice.py
1
6351
import json from odoo.addons.account.tests.common import AccountTestCommon from odoo.tests import tagged @tagged('post_install', '-at_install') class TestAccountIncomingSupplierInvoice(AccountTestCommon): def setUp(self): super(TestAccountIncomingSupplierInvoice, self).setUp() self.env['ir.conf...
agpl-3.0
-281,522,539,151,532,930
49.404762
143
0.620532
false
gsamokovarov/frames.py
test.py
1
2402
import inspect import os from contextlib import contextmanager import pytest import frames @contextmanager def non_native_frames(): previous_native = frames.NATIVE try: frames.NATIVE = False yield finally: frames.NATIVE = previous_native def test_is_new_style_class(): asser...
mit
-1,222,256,939,182,493,400
23.262626
77
0.663614
false
ianctse/pvlib-python
pvlib/test/test_modelchain.py
1
8186
import numpy as np import pandas as pd from numpy import nan from pvlib import modelchain, pvsystem from pvlib.modelchain import ModelChain from pvlib.pvsystem import PVSystem from pvlib.tracking import SingleAxisTracker from pvlib.location import Location from pandas.util.testing import assert_series_equal, assert_f...
bsd-3-clause
-4,040,883,401,186,751,000
35.873874
84
0.602248
false
Xevib/manuel
manuel/cli.py
1
1137
from __future__ import absolute_import import click from manuel.manuel import Manuel @click.group() def manuel(): pass @manuel.command() @click.argument('config_file') @click.option('--index/--no-index', default=False) @click.option('--recreate/--no-recreate', default=True) @click.option('--debug/--no-debug', d...
gpl-3.0
7,237,030,194,737,363,000
25.44186
74
0.657872
false
Monithon/Monithon-2.0
reports/models.py
1
2079
from django.contrib.gis.db import models from monitor.models import MonitoringTeam from projects.models import Monitorable from customforms.models import Form as CustomForm, FormFieldOption from customforms.models import FormField import json class Report(models.Model): author = models.ForeignKey(MonitoringTeam, re...
gpl-2.0
8,316,690,550,272,615,000
29.588235
170
0.729197
false
Stanford-Legal-Tech-Design/legaltech-rapidpro
temba/orgs/migrations/0001_initial.py
2
12340
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('locations', '0001_initial'), migrations.swappable_dependency(settin...
agpl-3.0
4,294,546,665,417,596,000
79.12987
347
0.62812
false
jlubcke/csvpp
csvpp/csvpp.py
1
1221
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import csv from io import StringIO from itertools import count import sys try: # Python 2 from itertools import izip_longest except ImportError: # Python 3 from itertools import zip_longest as izip_longest def csvpp(csv_input): max_widths = [] ma...
mit
8,531,353,089,939,039,000
26.133333
82
0.595414
false
viswimmer1/PythonGenerator
data/python_files/29978636/wpp_newusers.py
1
44626
import codecs import datetime import functools import httplib2 import itertools import logging from lxml import html import mwclient from pprint import pprint import time import unittest import urllib import urlparse import MySQLdb import MySQLdb.cursors from wpp_settings import WPPRY_USER, WPPRY_PW, WPPRY_DB, WPPRY_...
gpl-2.0
7,259,967,740,059,816,000
50.650463
497
0.594989
false
Azure/WALinuxAgent
tests/utils/test_archive.py
1
9301
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License. import os import shutil import tempfile import zipfile from datetime import datetime, timedelta import azurelinuxagent.common.logger as logger from azurelinuxagent.common.utils import fileutil from azurelinuxagent.common.u...
apache-2.0
4,373,552,164,211,673,600
36.353414
124
0.625202
false
sradanov/flyingpigeon
flyingpigeon/processes/wps_analogs.py
1
8822
from datetime import datetime, date import types import tempfile import tarfile import ocgis from ocgis import RequestDataset import datetime as dt import os from flyingpigeon import analogs from pywps.Process import WPSProcess import logging class AnalogsProcess(WPSProcess): def __init__(self): # defini...
apache-2.0
6,331,289,109,474,151,000
30.283688
161
0.584788
false
openweave/openweave-wdlc
backend/lib/nwv/proto_pool.py
1
11246
# # Copyright (c) 2019-2020 Google LLC. All Rights Reserved. # Copyright (c) 2016-2018 Nest Labs Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
apache-2.0
3,955,473,444,588,170,000
29.559783
79
0.66388
false
Devyani-Divs/pagure
pagure/ui/admin.py
1
1932
# -*- coding: utf-8 -*- """ (c) 2014 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> """ from functools import wraps import flask import pagure.forms from pagure import (APP, SESSION, LOG, cla_required, authenticated, generate_gitolite_acls, generate_authorized_k...
gpl-2.0
4,236,048,646,403,969,000
25.833333
73
0.643892
false
OpenBankProject/Hello-OBP-DirectLogin-Python
props/socgen.py
1
1133
# -*- coding: utf-8 -*- """ Settings for the hello scripts. You most likely need to edit a few of them, e.g. API_HOST and the OAuth credentials. """ OUR_BANK = '00100' USERNAME = '1000203893' PASSWORD = '1000203893' CONSUMER_KEY = 'bvldezvlnqj4mtva4jfktke4xliep0bt1xm44yxi' CONSUMER_SECRET...
apache-2.0
937,335,391,788,211,300
28.051282
77
0.704325
false
Feandil/webapp-config
WebappConfig/filetype.py
1
6545
#!/usr/bin/python -O # # /usr/sbin/webapp-config # Python script for managing the deployment of web-based # applications # # Originally written for the Gentoo Linux distribution # # Copyright (c) 1999-2007 Authors # Released under v2 of the GNU GPL # # Author(s) Stuart Herbert # ...
gpl-2.0
-9,051,594,575,872,660
32.911917
160
0.529717
false
saadasad/droid
Media.py
1
2157
def menu(): from ftplib import FTP import os import time from pygame import mixer import sched ftp = FTP() choice = '' while(choice!='0'): print('1. Music') print('2. Take a Picture') print('3. Text To Speech') print('0. To Exit') choice = input('Enter Choice : ') if(choice == '1'): print('All...
gpl-3.0
-5,024,645,450,757,786,000
24.093023
112
0.608716
false
m-tmatma/svnmailer
src/lib/svnmailer/notifier/stdout.py
1
3635
# -*- coding: utf-8 -*- # pylint: disable-msg=W0201 # pylint-version = 0.7.0 # # Copyright 2004-2005 André Malo or his licensors, as applicable # # 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
-8,386,982,354,865,713,000
27.833333
74
0.600055
false
subhrm/google-code-jam-solutions
solutions/2018/1B/A/a.py
1
1033
# Problem a def solve(n, l, ip): assert n < 30, "n should be less than 300" s = sum(ip) rem = n - s pc = [round_pc(v / n) for v in ip] res = sum(pc) if rem == 0: return res extra = [round_pc(i / n) for i in range(rem + 1)] for v, p in zip(ip, pc): if rem == 0: ...
mit
-8,473,355,274,586,894,000
17.781818
57
0.411423
false
InterfaceMasters/ONL
components/all/vendor-config/imt/src/python/imt/__init__.py
3
1335
#!/usr/bin/python ############################################################ # <bsn.cl fy=2013 v=onl> # # Copyright 2013, 2014 Big Switch Networks, Inc. # Copyright 2015 Interface Masters Technologies, Inc. # # Licensed under the Eclipse Public License, Version 1.0 (the # "License"); you may not use thi...
epl-1.0
-5,314,679,741,563,240,000
33.230769
67
0.624719
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_asyncio/test_unix_events.py
1
67821
"""Tests for unix_events.py.""" import collections import contextlib import errno import io import os import pathlib import signal import socket import stat import sys import tempfile import threading import unittest from unittest import mock from test import support if sys.platform == 'win32': raise unittest.Ski...
apache-2.0
9,141,642,213,272,004,000
33.496948
80
0.597175
false
Conceiva/MezzmoKodiPlugin
common.py
1
2918
import xbmc import xbmcaddon import inspect import os import sys import socket import re class printDebug: def __init__(self, main, sub=None): self.main=main if sub: self.sub="."+sub else: self.sub='' self.level=settings.get_debug() ...
gpl-2.0
3,386,496,745,631,883,000
29.717391
102
0.562714
false
rgmining/fraudar
fraudar/export/run_greedy.py
1
2152
# FRAUDAR: Bounding Graph Fraud in the Face of Camouflage # Authors: Bryan Hooi, Hyun Ah Song, Alex Beutel, Neil Shah, Kijung Shin, Christos Faloutsos # # This software is licensed under Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
gpl-3.0
2,092,366,812,794,951,000
41.196078
97
0.688197
false
markroxor/gensim
gensim/test/test_doc2vec.py
1
23647
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ from __future__ import with_statement import log...
lgpl-2.1
6,170,643,538,156,738,000
41.806159
119
0.630031
false
neilLasrado/erpnext
erpnext/selling/doctype/customer/customer.py
1
22478
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import json from frappe.model.naming import set_name_by_naming_series from frappe import _, msgprint import frappe.defaults from frappe.ut...
gpl-3.0
6,591,446,202,118,932,000
36.778151
161
0.696459
false
barseghyanartur/jellyfish
jellyfish/porter.py
1
6796
from .compat import _range _s2_options = { 'a': ((['a', 't', 'i', 'o', 'n', 'a', 'l'], ['a', 't', 'e']), (['t', 'i', 'o', 'n', 'a', 'l'], ['t', 'i', 'o', 'n'])), 'c': ((['e', 'n', 'c', 'i'], ['e', 'n', 'c', 'e']), (['a', 'n', 'c', 'i'], ['a', 'n', 'c', 'e']),), 'e': ((['i', 'z', 'e', 'r...
bsd-3-clause
3,301,493,035,930,167,000
30.174312
78
0.332254
false
babble/babble
include/jython/Lib/test/test_tempfile.py
1
21877
# From Python 2.5.1 # tempfile.py unit tests. import tempfile import os import sys import re import errno import warnings import unittest from test import test_support warnings.filterwarnings("ignore", category=RuntimeWarning, message="mktemp", module=__name__) if has...
apache-2.0
6,687,430,237,205,110,000
30.297568
83
0.560772
false
letouriste001/SmartForest_2.0
python3.4Smartforest/lib/python3.4/site-packages/django/contrib/gis/utils/wkt.py
1
1923
""" Utilities for manipulating Geometry WKT. """ from django.utils import six def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated t...
mit
-6,554,581,251,827,143,000
31.59322
88
0.593344
false
isard-vdi/isard
webapp/webapp/webapp/lib/isardScheduler.py
1
5947
# Copyright 2017 the Isard-vdi project authors: # Josep Maria Viñolas Auquer # Alberto Larraz Dalmases # License: AGPLv3 #!/usr/bin/env python # coding=utf-8 from decimal import Decimal import random, queue from threading import Thread import time, pytz from webapp import app import rethinkdb as r from flask...
agpl-3.0
-7,317,353,115,043,151,000
43.373134
155
0.602254
false
cts2/ihtsdoauth
auth/ihtsdoauth.py
1
4415
# -*- coding: utf-8 -*- # Copyright (c) 2013, Mayo Clinic # 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 # ...
mit
-7,081,699,148,709,966,000
41.451923
114
0.713024
false
syscoin/syscoin2
test/functional/feature_dersig.py
1
5813
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test BIP66 (DER SIG). Test that the DERSIG soft-fork activates at (regtest) height 1251. """ from tes...
mit
4,134,287,112,754,569,000
39.65035
189
0.640289
false
bspaans/bookmark-tools
btools/matching/FileMatcher.py
1
6660
import os import subprocess import pipes import btools.pybookmark as pybookmark import btools.common as common from ConfParser import ConfParser class FileMatcher: def __init__(self, bookmark_file = "", rules_file = ""): if rules_file == "": rules_file = common.get_conf_location() c ...
gpl-3.0
1,900,317,324,360,998,400
37.947368
120
0.508709
false
quru/qis
src/imageserver/user_auth.py
1
7528
# # Quru Image Server # # Document: user_auth.py # Date started: 10 Aug 2011 # By: Matt Fozard # Purpose: Image server user authentication module # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under...
agpl-3.0
4,242,058,731,102,122,500
39.256684
97
0.592455
false
helixyte/TheLMA
thelma/tests/functional/test_rack.py
1
1605
""" Created on Dec 09, 2014. """ from pyramid.httpexceptions import HTTPOk from everest.mime import XmlMime from everest.resources.utils import get_root_collection from thelma.interfaces import ITubeRack from thelma.tests.functional.conftest import TestFunctionalBase class TestRackFunctional(TestFunctionalBase): ...
mit
2,200,449,005,700,579,800
35.477273
73
0.583178
false
tuomas2/automate
src/automate/extensions/arduino/arduino_actuators.py
1
6343
# -*- coding: utf-8 -*- # (c) 2015 Tuomas Airaksinen # # This file is part of automate-arduino. # # automate-arduino 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 yo...
gpl-3.0
-8,866,919,606,858,639,000
32.389474
120
0.621157
false
rlindner81/pyload
module/plugins/hoster/QuickshareCz.py
1
3533
# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster class QuickshareCz(SimpleHoster): __name__ = "QuickshareCz" __type__ = "hoster" __version__ = "0.61" __status__ = "testing" __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+' _...
gpl-3.0
3,966,324,045,635,866,600
36.978495
103
0.519253
false
abec/getabe.com
DjangoSite/apps/flashcards/api.py
1
1367
import logging from rest_framework.generics import GenericAPIView, ListCreateAPIView from rest_framework.response import Response from .models import FlashCard from .serializers import FlashCardSerializer LOG = logging.getLogger(__name__) class ListAddFlashCards(ListCreateAPIView): model = FlashCard serialize...
mit
-1,976,269,114,206,792,000
24.314815
89
0.694952
false
kdwink/intellij-community
python/helpers/rest_formatter.py
1
11961
import re import sys from docutils import nodes from docutils.core import publish_string from docutils.frontend import OptionParser from docutils.nodes import Text, field_body, field_name, rubric from docutils.parsers.rst import directives from docutils.parsers.rst.directives.admonitions import BaseAdmonition from doc...
apache-2.0
-8,413,027,227,543,101,000
37.092357
103
0.553549
false
fmfn/UnbalancedDataset
imblearn/ensemble/_weight_boosting.py
2
11479
from copy import deepcopy import numpy as np from sklearn.base import clone from sklearn.ensemble import AdaBoostClassifier from sklearn.ensemble._base import _set_random_states from sklearn.utils import _safe_indexing from ..under_sampling.base import BaseUnderSampler from ..under_sampling import RandomUnderSampler...
mit
-2,642,542,450,865,235,500
35.211356
87
0.61974
false
apdjustino/DRCOG_Urbansim
urbandeveloper/elasticity_model_2SLS.py
1
6896
__author__ = 'JMartinez' import numpy as np, pandas as pd, os from synthicity.utils import misc import pysal as py class elasticity_model(object): def __init__(self, dset): self.zones = dset.zones self.buildings_far = pd.merge(dset.buildings, dset.fars, left_on='far_id', right_index=True) ...
agpl-3.0
-512,548,573,087,698,000
39.327485
196
0.574101
false
Huc91/TPB_Generator
tpb_ta_scrape.py
1
1577
""" The MIT License (MIT) Copyright (c) 2016 Luca Ucciero 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, ...
mit
-4,126,343,385,891,779,000
41.621622
460
0.772353
false
Konubinix/weboob
weboob/tools/date.py
1
13543
# -*- coding: utf-8 -*- # Copyright(C) 2010-2013 Romain Bignon # # This file is part of weboob. # # weboob 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...
agpl-3.0
-3,805,756,433,733,235,000
35.682927
121
0.579492
false
DempDemp/nautilus
modules/ircpaint.py
1
1208
import urllib2 from core import base from core.auth import Auth class IRCPaint(base.baseClass): @classmethod def get_drawing(cls, sid): return urllib2.urlopen('http://ircpaint.randomlab.info/rawirc.php?q={}'.format(sid)).read() def on_privmsg(self, address, target, text): if target == self...
agpl-3.0
-3,537,154,529,005,495,300
40.655172
99
0.543874
false
e-matteson/pipit-keyboard
extras/audio/make_audio_files.py
1
2652
#!/bin/python2 from __future__ import division import subprocess from time import sleep import os # for generating sound files import numpy as np import matplotlib.pyplot as plt import scipy.io.wavfile import scipy.signal as sig import scipy.stats as stats master_volume = 1 sounds = { 'A':{'filename':'tick1.wa...
gpl-3.0
-1,471,420,738,281,666,600
24.747573
79
0.524133
false
vetu11/piloco
cosas/objetos.py
1
4751
# coding=utf-8 import json, time, threading, random, logging from .funciones import nuevosMensajes class Partida: partidasEnCurso = [] def finder(self, host): posicionPartida = 0 for e in self.partidasEnCurso: if e["host"] == host: return posicionPartida ...
gpl-3.0
-6,997,027,026,198,008,000
41.833333
178
0.585376
false
JohnReid/pybool
python/pybool/examples/neurogenesis.py
1
6857
# # Copyright John Reid 2013 # """ Example to illustrate application of pybool. Based on regulatory network in paper on robustness under functional constraint by Nakajima et al. """ import numpy as N, logging from pybool.constraints import gene_off, gene_on from pybool import network, constraints class MetaData(c...
mit
6,701,220,347,562,216,000
30.893023
89
0.495114
false
chaicko/AlgorithmicToolbox
test/test_divide_and_conquer.py
1
8325
import divide_and_conquer.binary_search as binary_search import divide_and_conquer.inversions as inversions import divide_and_conquer.majority_element as majority_element import divide_and_conquer.points_and_segments as points_and_segments import divide_and_conquer.sorting as sorting import pytest @pytest.mark.timeou...
gpl-3.0
3,773,924,983,450,112,500
37.013699
79
0.563844
false
w4/belle
dave/modules/weather.py
2
5156
# -*- coding: utf-8 -*- """Get the weather from an address using forecast.io.""" from __future__ import division import dave.modules import requests import dave.config import pickle from urllib.parse import quote_plus import arrow from dave.models import Location import socket @dave.module.help("Syntax: weather [loca...
gpl-3.0
7,640,074,539,842,935,000
34.531034
134
0.605202
false
CZAlmon/MangaMine
MangaMineBot_Folder/MangaBotDownloader.py
1
57509
#Ver. 0.0.7 #Author: Zach Almon import urllib.request import re import os import platform import sys import string import html import time platformType = platform.system() def Batoto(link_to_manga_site): success = False currentDirectory = os.getcwd() if platformType == 'Windows': MASTERdirecto...
gpl-2.0
-3,809,125,284,167,767,600
37.161248
180
0.519571
false
xiaohan2012/lst
dump_vis_timeline_data.py
1
4095
from check_k_best_trees import k_best_trees from meta_graph_stat import MetaGraphStat, build_default_summary_kws_from_path from datetime import datetime from collections import Counter def format_time(dt): if dt.year < 1900: return str(dt) else: return datetime.strftime(dt, '%Y-%m-%d %H:%M:%S'...
mit
7,151,833,468,239,633,000
31.76
91
0.540171
false
PythonCHB/NumpyExtras
cython_src/accumulator.py
1
4171
#!/usr/bin/env python """ accumulator class Designed to be used as an expandable numpy array, to accumulate values, rather than a python list. Note that slices return copies, rather than views, unlike regular numpy arrays. This is so that the buffer can be re-allocated without messing up any views. """ import numpy...
bsd-2-clause
-2,160,490,299,367,850,200
30.134328
101
0.57708
false
WladimirSidorenko/DiscourseSegmenter
dsegmenter/common.py
1
4516
#!/usr/bin/env python2.7 # -*- mode: python; coding: utf-8; -*- ################################################################## # Documentation """Module defining methods common to many modules. Attributes: _ispunct (method): check if word consists only of punctuation characters prune_punc (method): remove tok...
mit
-8,265,603,846,203,108,000
27.225
79
0.54938
false
indico/indico
indico/modules/events/models/persons.py
1
17383
# This file is part of Indico. # Copyright (C) 2002 - 2021 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 operator import attrgetter from sqlalchemy.event import listens_for from sqlalchemy.ext.declarative ...
mit
4,495,600,574,450,844,000
32.819066
119
0.59075
false
avedaee/DIRAC
DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py
1
16844
######################################################################## # $HeadURL $ # File: ReplicateAndRegister.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2013/03/13 18:49:12 ######################################################################## """ :mod: ReplicateAndRegister =========================...
gpl-3.0
2,112,673,429,752,382,700
37.721839
120
0.601342
false
art-solopov/mdwiki
wiki/migrations/0006_comment.py
1
1317
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-07-07 16:48 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_dependen...
mit
-4,005,054,725,413,615,600
37.735294
130
0.600607
false
project-hypr/hypr2
hypr/request.py
1
1190
# Copyright 2014-2016 Morgan Delahaye-Prat. All Rights Reserved. # # Licensed under the Simplified BSD License (the "License"); # you may not use this file except in compliance with the License. """Request and related classes.""" import json import asyncio from aiohttp.web_reqrep import Request as BaseRequest clas...
bsd-2-clause
3,068,015,700,568,774,000
26.674419
70
0.628571
false
zetaops/ulakbus
ulakbus/services/personel/hitap/hizmet_unvan_getir.py
1
1181
# -*- coding: utf-8 -*- # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. """HITAP Ünvan Sorgula Hitap üzerinden personelin ünvan bilgilerinin sorgulamasını yapar. """ from ulakbus.services.personel.hitap.hitap_sorgula impo...
gpl-3.0
-4,385,216,088,121,599,000
28.275
83
0.602904
false
bjsmith/motivation-simulation
ActionModel.py
1
1161
from UnitModel import * __author__ = 'benjaminsmith' """Inherits from UnitModel""" class ActionModel(UnitModel): """Set initial ActionModel.""" def __init__(self,action_name,tendency,value,pos_expectancy,neg_expectancy,pos_val,neg_val,threshold,chaos,persistence): super(ActionModel,self).__init__(actio...
gpl-3.0
4,138,077,398,803,983,400
31.25
124
0.592593
false
anidata/rasp
rasp/tor_engine.py
1
6869
import getpass import os from contextlib import contextmanager from datetime import datetime, timedelta from stem import Signal from stem.connection import connect from rasp.base import DefaultEngine from rasp.errors import ControllerError class TorController(object): """ Attributes: address (str): I...
bsd-3-clause
1,342,708,282,729,641,200
30.509174
83
0.569515
false
feigaochn/leetcode
p745_prefix_and_suffix_search.py
2
1582
class WordFilter: def __init__(self, words): """ :type words: List[str] """ from collections import defaultdict self.prefix = defaultdict(list) self.suffix = defaultdict(list) for wi, word in enumerate(words): for i in range(len(word) + 1): ...
mit
7,729,836,571,861,658,000
28.849057
73
0.510746
false
etkirsch/legends-of-erukar
erukar/system/engine/commands/TargetedCommand.py
1
1711
from erukar.system.engine import Interaction from .Command import Command from .CommandResult import CommandResult class TargetedCommand(Command): def process_args(self): if not self.args: raise Exception('Cannot process args -- Command\'s args are undefined') if 'interaction' in self...
agpl-3.0
1,313,688,473,429,810,700
34.645833
84
0.631794
false
ashione/bamslips
task/fund_realtime_net_unit.py
1
1294
from apscheduler.schedulers.blocking import BlockingScheduler from bamslips.fund.fund_realtime_info import paralle_get_fund_realtime_info_according_fund_code from bamslips.conf.fund_code_list import code_list sched = BlockingScheduler() #@sched.scheduled_job('cron',id='fund_realtime_fun_info_job',hour='0-4,9-16,21-2...
gpl-3.0
-2,660,560,532,948,389,400
43.62069
98
0.732612
false
arunkgupta/gramps
gramps/webapp/grampsdb/view/note.py
1
5867
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Douglas S. Blank <doug.blank@gmail.com> # # 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 L...
gpl-2.0
-2,688,828,028,025,838,000
38.375839
110
0.593489
false
google/llvm-propeller
lldb/test/API/commands/expression/persistent_variables/TestPersistentVariables.py
2
1993
""" Test that lldb persistent variables works correctly. """ import lldb from lldbsuite.test.lldbtest import * class PersistentVariablesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def test_persistent_variables(self): """Test that lldb persistent variables works correctly.""" ...
apache-2.0
6,779,001,352,502,953,000
45.348837
114
0.625188
false
EDUlib/eTracesX
Translation_software/edx_to_MOOCdb_piping/import.openedx.apipe/scripts/lookupOpenEdxHash.py
1
1241
#!/usr/bin/env python import os import sys # Command line tool to look up the human readable strings that # correspond to edX platform generated hash strings for problems and # videos. The given strings may be just the 32 bit hex numbers, or the # long strings in tracking logs that contain that hex number somewhere ...
agpl-3.0
3,710,170,186,341,521,000
32.540541
129
0.686543
false
pongem/python-bot-project
kms/api-client/snippets_test.py
1
5588
#!/usr/bin/env python # Copyright 2017 Google, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-5,260,259,028,643,627,000
35.763158
79
0.685039
false
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/ninenow.py
1
2762
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, float_or_none, smuggle_url, ) class NineNowIE(InfoExtractor): IE_NAME = '9now.com.au' _VALID_URL = r'https?://(?:www\.)?9now\.com\.au/(?:[...
gpl-3.0
-6,856,496,807,797,869,000
30.033708
110
0.645909
false
adamjermyn/AstroMicroPhysics
sourceClass.py
1
14504
from scipy.interpolate import RegularGridInterpolator, RectBivariateSpline, interp1d from scipy.ndimage.filters import gaussian_filter, minimum_filter import numpy as np class source: """ An object which wraps equation of state tables and functions. """ def __init__(self, inNames, outNames, contains, smoothMask,...
gpl-2.0
-8,063,195,906,572,634,000
46.090909
117
0.726076
false
treebuilder/s3-mining
s3.py
1
1359
#!/usr/bin/env python import requests import sys url = 'https://s3.amazonaws.com/' name = sys.argv[1].strip() common = ['test','dev','bucket','s3','aws','prd','prod','pub','public','production','development','testing','archive','backup','web','devops','sec','secure','hidden','secret','staging','download'] connectors ...
apache-2.0
-3,350,466,829,300,532,700
23.709091
196
0.601177
false
mnunberg/couchbase-python-client
txcouchbase/tests/test_txconn.py
1
2526
# Copyright 2013, Couchbase, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-1,567,406,470,324,940,300
34.577465
79
0.669042
false
winklerand/pandas
pandas/tests/test_resample.py
1
135497
# pylint: disable=E1101 from warnings import catch_warnings from datetime import datetime, timedelta from functools import partial from textwrap import dedent import pytz import pytest import dateutil import numpy as np import pandas as pd import pandas.tseries.offsets as offsets import pandas.util.testing as tm imp...
bsd-3-clause
3,736,065,475,906,588,000
38.549621
79
0.519111
false
phoenixsbk/kvmmgr
packaging/setup/ovirt_engine_setup/engine/constants.py
1
18900
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2014-2015 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 # # Unl...
apache-2.0
999,539,411,816,678,100
25.033058
76
0.64127
false
lgarren/spack
var/spack/repos/builtin/packages/r-yaqcaffy/package.py
1
1795
############################################################################## # 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
7,484,312,950,210,609,000
43.875
94
0.675209
false
miguelinux/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/UiSection.py
1
2838
## @file # process UI section generation # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license...
gpl-2.0
-5,052,365,324,939,483,000
35.384615
107
0.67019
false
sjohannes/exaile
xlgui/panel/playlists.py
1
38162
# Copyright (C) 2008-2010 Adam Olsen # # 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, or (at your option) # any later version. # # This program is distributed in the hope that...
gpl-2.0
-3,871,848,738,192,207,000
37.315261
87
0.5506
false
jespino/GalaxduS
libs/screens/newgame.py
1
2534
from galaxdustk.buttons import Button, CircularSelectButton, SelectButton from galaxdustk.label import Label from galaxdustk.screen import BaseScreen import handlers from gettext import gettext as _ class NewGameScreen(BaseScreen): background_path = 'data/images/backgrounds/menu.png' def __init__(self, cont...
gpl-3.0
-5,865,235,871,812,638,000
37.984615
105
0.59708
false
melphi/algobox
python/algobox/src/algobox/client/generated/datacollector/models/__init__.py
1
1283
# coding: utf-8 """ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in com...
apache-2.0
7,177,484,109,795,247,000
36.735294
105
0.779423
false
wuhengzhi/crosswalk
tools/patcher.py
1
2403
# Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights # reserved. # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. from optparse import OptionParser import os import sys from patch_util ...
bsd-3-clause
-3,378,618,923,191,803,000
29.0375
72
0.659592
false
Stibbons/python-project-bootstrap
src/ppb/cli/main.py
1
1483
from __future__ import absolute_import from __future__ import division from __future__ import print_function from ppb.cli import sub_cmd from ppb.cli import version import argparse import sys class Main(object): ''' This command line tool ... ''' def main(self): # Global command-line arg...
bsd-3-clause
-4,540,101,688,897,022,500
31.955556
95
0.607552
false
trappn/crosshair
include/patterns.py
1
5162
import cv2 import numpy as np # number of available patterns: maxpat = 10 # defining functions for all possible patterns follow, # activated by patternswitch function # pattern1: Bruker style crosshair with circles and ticks def pattern1( arr, width, height, x, y, rad, col ): cv2.line(arr,(0,y),(width,y),col,1)...
mit
-501,800,507,368,933,400
32.089744
61
0.531964
false
npinto/pytest
testing/test_helpconfig.py
1
2191
import py, pytest,os from _pytest.helpconfig import collectattr def test_version(testdir, pytestconfig): result = testdir.runpytest("--version") assert result.ret == 0 #p = py.path.local(py.__file__).dirpath() result.stderr.fnmatch_lines([ '*py.test*%s*imported from*' % (pytest.__version__, ) ...
mit
-6,169,271,513,890,304,000
27.089744
61
0.61068
false
xguse/ete
test/test_phylotree.py
1
14583
import unittest from ete_dev import * from datasets import * class Test_phylo_module(unittest.TestCase): # ALL TESTS USE THIS EXAMPLE TREE # # /-Dme_001 # /--------| # | \-Dme_002 # | # | /-Cfa_001 ...
gpl-3.0
-2,135,817,720,444,222,700
44.571875
566
0.512857
false
kasbah/slim_looper
src/gui/carla_widgets/ui_inputdialog_value.py
1
2493
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'resources/ui/inputdialog_value.ui' # # Created: Thu Jan 2 17:50:40 2014 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString....
gpl-3.0
4,569,548,553,873,517,000
46.942308
124
0.720417
false
srio/oasys-comsyl
orangecontrib/comsyl/widgets/applications/comsyl_propagate_beamline.py
1
10084
import os, sys from PyQt5 import QtGui, QtWidgets from PyQt5.QtGui import QPalette, QColor, QFont from PyQt5.QtWidgets import QApplication, QFileDialog from PyQt5.QtGui import QIntValidator, QDoubleValidator from orangewidget import gui from orangewidget.settings import Setting from oasys.widgets import gui as oasys...
mit
-3,722,189,360,845,674,000
40.673554
170
0.653907
false
liosha2007/temporary-groupdocs-python-sdk
examples/api-samples/inc_samples/sample07.py
1
2600
####<i>This sample will show how to use <b>MoveFile</b> method from Storage Api to copy/move a file in GroupDocs Storage </i> #Import of classes from libraries import base64 import os from pyramid.renderers import render_to_response from groupdocs.ApiClient import ApiClient from groupdocs.StorageApi import StorageAp...
apache-2.0
-7,305,167,231,494,652,000
42.333333
142
0.647308
false
paulscherrerinstitute/pcaspy
example/pysh.py
1
2155
#!/usr/bin/env python import time import sys import threading import subprocess import shlex from pcaspy import Driver, SimpleServer prefix = 'MTEST:' pvdb = { 'COMMAND' : { 'type' : 'char', 'count': 128, 'asyn' : True }, 'OUTPUT' : { 'type' : 'char', 'count': 500...
bsd-3-clause
-8,568,657,899,286,551,000
24.352941
85
0.500696
false
nataddrho/DigiCue-USB
Python3/src/venv/Lib/site-packages/serial/urlhandler/protocol_alt.py
2
2033
#! python # # This module implements a special URL handler that allows selecting an # alternate implementation provided by some backends. # # This file is part of pySerial. https://github.com/pyserial/pyserial # (C) 2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause # # URL format: al...
mit
-5,356,293,284,131,419,000
34.666667
92
0.618298
false
spmjc/plugin.video.freplay
resources/lib/channels/pluzz2.py
1
6003
# -*- coding: utf-8 -*- import json import resources.lib.utils as utils from resources.lib import globalvar title = ['La 1ère', 'France 2', 'France 3', 'France 4', 'France 5', 'France Ô'] img = ['la_1ere', 'france2', 'france3', 'france4', 'france5', 'franceo'] readyForUse = True channelCatalog = 'http://pluzz.webserv...
gpl-2.0
2,164,653,935,708,546,000
35.284848
87
0.48288
false
thusoy/grunt-pylint
postinstall.py
1
1377
#!/usr/bin/env python import os import subprocess import sys # Versions here must match what is bundled with the package (see package.json) packages = [ 'astroid-2.2.5.tar.gz', 'isort-4.3.17.tar.gz', 'lazy-object-proxy-1.3.1.tar.gz', 'mccabe-0.6.1.tar.gz', 'pylint-2.3.1.tar.gz', 'six-1.12.0.ta...
mit
5,357,597,070,311,199,000
22.741379
91
0.580973
false
os-cloud-storage/openstack-workload-disaster-recovery
dragon/engine/service.py
1
12170
# vim: tabstop=4 shiftwidth=4 softtabstop=4 '''------------------------------------------------------------------------- Copyright IBM Corp. 2015, 2015 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 c...
apache-2.0
5,487,951,247,764,430,000
38.00641
79
0.602219
false
openstack/senlin
senlin/common/policy.py
1
2008
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
apache-2.0
6,620,784,234,042,887,000
33.62069
112
0.690737
false
TomMinor/MayaPerforce
Perforce/DepotClientTreeView.py
1
16413
import sys import os from PySide import QtCore, QtGui from P4 import P4, P4Exception # http://stackoverflow.com/questions/32229314/pyqt-how-can-i-set-row-heights-of-qtreeview class TreeItem(object): def __init__(self, data, parent=None): self.parentItem = parent self.data = data self.ch...
mit
848,327,769,677,595,500
29.793621
988
0.556876
false
remodoy/reauth-python
reauth/reauth.py
1
2556
import json import ssl import time import urllib.request from datetime import timedelta import logging import Crypto.PublicKey.RSA import python_jwt as jwt _accepted_sign_algs = ["PS512"] _pubkey_cache_living_time = 60*10 # 10min _pubkey_cache_exp_time = 0 _pubkey_cache = "" _iat_skew = timedelta(minutes=5) logger...
mit
-6,493,516,370,609,133,000
33.08
118
0.670579
false
dpwrussell/openmicroscopy
components/tools/OmeroPy/src/omero/plugins/chgrp.py
1
4086
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011-2015 Glencoe Software, Inc. All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # """ chgrp plugin Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for...
gpl-2.0
1,640,687,123,089,833,700
31.951613
75
0.612335
false
particleKIT/hostlist
hostlist/hostlist.py
1
9496
#!/usr/bin/env python3 import logging import types from collections import defaultdict import os import sys import ipaddress import itertools import glob import yaml from typing import Dict, Tuple try: from yaml import CSafeLoader as SafeLoader # type: ignore except ImportError: from yaml import SafeLoader # t...
gpl-3.0
2,637,087,126,045,603,000
35.106464
90
0.545493
false
FederatedAI/FATE
python/fate_client/pipeline/component/hetero_fast_secureboost.py
1
1367
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-4,138,726,635,919,116,000
35.945946
75
0.731529
false
zaenalarifin/openshot_jmd
openshot/windows/TransitionProperties.py
1
6330
# OpenShot Video Editor is a program that creates, modifies, and edits video files. # Copyright (C) 2009 Jonathan Thomas # # This file is part of OpenShot Video Editor (http://launchpad.net/openshot/). # # OpenShot Video Editor is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-3.0
-4,757,252,386,056,559,000
29
166
0.705213
false
jstasiak/python-zeroconf
tests/test_updates.py
1
2301
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit tests for zeroconf._services. """ import logging import socket from threading import Event import pytest import zeroconf as r from zeroconf import const from zeroconf import Zeroconf from zeroconf._services.browser import ServiceBrowser from zeroconf._services...
lgpl-2.1
4,083,235,635,604,720,000
24.01087
102
0.662321
false