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
TransportLayer/mc-id2name
id2name.py
1
45678
############################################################################### # Minecraft ID to Friendly Name # # Copyright (C) 2016 TransportLayer # # # ...
gpl-3.0
3,909,941,655,184,969,700
18.160235
101
0.520557
false
freedombox/debian-bts-to-github-sync
setup.py
1
1071
#!/usr/bin/env python from setuptools import setup __version__ = '0.0.1' CLASSIFIERS = map(str.strip, """Environment :: Console License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+) Natural Language :: English Operating System :: POSIX :: Linux Programming Language :: Python Programming ...
agpl-3.0
-5,006,650,484,620,465,000
25.121951
82
0.660131
false
guglielmo/mosic2-db-delibere
project/delibere/wsgi.py
1
1588
""" WSGI config for DB delle Delibere CIPE project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI...
bsd-3-clause
5,049,234,892,190,381,000
41.918919
79
0.790932
false
IZSVenezie/VetEpiGIS-Tool
plugin/xitem_dialog.py
1
1545
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'xitem_dialog_base.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog....
gpl-2.0
-5,246,522,193,695,220,000
39.657895
108
0.698382
false
ToruNiina/ecell4
setup.py
1
4466
import os import re import sys import glob import platform import sysconfig import subprocess from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from setuptools.command.test import test from distutils.version import LooseVersion class CMakeExtension(Extension): def __init_...
gpl-3.0
-863,269,065,925,193,500
35.909091
121
0.595387
false
digitalfox/yokadi
yokadi/tests/tests.py
1
1350
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Yokadi unit tests @author: Aurélien Gâteau <aurelien.gateau@free.fr> @author: Sébastien Renard <Sebastien.Renard@digitalfox.org> @license: GPL v3 or later """ import unittest import os import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir, o...
gpl-3.0
-6,590,374,414,460,583,000
25.94
81
0.791388
false
sillygod/my-travel-in-learning-python
ufile_transfer/updater.py
1
4349
import re import io import shutil import os import typing import MySQLdb from source_map import SourceMap class FileUpdater: """read origin fie and update it inplace. we give it the content and target we want to replace """ def __init__(self, filename, source_map:SourceMap=None, gcs_host=None, commi...
gpl-2.0
-897,047,292,775,120,300
31.706767
104
0.581973
false
hfiguiere/abiword
tools/build_osx_release.py
2
12008
#!/usr/bin/env python # Copyright (C) 2011 Fabiano Fidencio # # 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 ...
gpl-2.0
9,047,993,009,526,091,000
31.193029
122
0.541889
false
Valchris/IEEEXtreme_WorkingAsIntended
2012/AA_Alex.py
1
1107
__author__ = 'alexander' import sys initial_bunnies = long(sys.stdin.readline()) bunnies = dict() bunnies['adults'] = initial_bunnies bunnies['babies'] = long(0) bunnies['juveniles'] = long(0) bunnies['juveniles2'] = long(0) for i in range(0,365,15): if i % 2 == 0: bunnies['babies'] = long(bunnies['babi...
mit
-221,296,799,781,316,100
33.625
101
0.633243
false
lesina/Hack70
env/bin/painter.py
1
2129
#!/home/oleg/Web/Hack70/env/bin/python3 # # The Python Imaging Library # $Id$ # # this demo script illustrates pasting into an already displayed # photoimage. note that the current version of Tk updates the whole # image every time we paste, so to get decent performance, we split # the image into a set of tiles. # tr...
gpl-3.0
-5,233,558,321,454,570,000
24.963415
80
0.573978
false
vabs22/zulip
zerver/tests/test_settings.py
1
10444
from __future__ import absolute_import from __future__ import print_function import ujson from django.http import HttpResponse from mock import patch from typing import Any, Dict from zerver.lib.initial_password import initial_password from zerver.lib.sessions import get_session_dict_user from zerver.lib.test_classe...
apache-2.0
5,690,486,425,606,591,000
41.803279
108
0.603696
false
RRSCDS/douban-mining
src/Python/api-oauth/oauthx.py
1
2742
# -*- coding: utf8 -*- import urllib, urllib2 import json # key and secret通过创建豆瓣app获得(无审核) # http://developers.douban.com/apikey/ APIKEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' SECRET = 'xxxxxxxxxxxxxxxx' CALLBACK_URL = 'http://www.douban.com' GETTOKEN_URL = 'https://www.douban.com/service/auth2/token' def getToken(cod...
mit
1,631,758,914,176,409,900
29.193182
101
0.615587
false
klmitch/appathy
tests/unit/test_actions.py
1
26457
# Copyright (C) 2012 by Kevin L. Mitchell <klmitch@mit.edu> # # 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 3 of the # License, or (at your option) any later version. # # This p...
gpl-3.0
3,172,380,119,785,183,700
40.274571
79
0.584571
false
CLVsol/clvsol_odoo_addons
clv_lab_test_history/wizard/lab_test_result_mass_edit.py
1
1108
# -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging from odoo import api, fields, models _logger = logging.getLogger(__name__) class LabTestResultMassEdit(models.TransientModel): _inherit = 'clv.lab...
agpl-3.0
8,628,638,866,095,895,000
26.7
74
0.597473
false
christoph2/k-os
kosek/ImplementationDefinition/AttributeDefinitions.py
1
15627
#!/usr/bin/python # -*- coding: utf-8 -*- __version__ = '0.9.2rc-1' __copyright__ = """ k_os (Konnex Operating-System based on the OSEK/VDX-Standard). (C) 2007-2013 by Christoph Schueler <github.com/Christoph2, cpu12.gems@googlemail.com> All Rights Reserved This p...
gpl-2.0
-8,186,240,278,514,551,000
34.355204
148
0.617585
false
thesealion/writelightly
writelightly/main.py
1
5266
import curses import datetime import sys from writelightly.calendar import Calendar from writelightly.conf import Config from writelightly.edit import edit_date, get_edits, clean_tmp, show_edits from writelightly.metadata import Metadata from writelightly.screen import ScreenManager, TextArea from writelightly.tags im...
mit
-884,814,466,088,044,500
32.75641
79
0.583175
false
allofhercats/whiskey
proto/literal_print.py
1
1544
def get_n_digits(value, base): n = 0 if value == 0: return 1 else: while value > 0: value //= base n += 1 return n def literal_int_to_string(value, base, width = 0, pad = '0', prefix = True): rtn = "" if base == 2 and prefix: rtn = "0b" elif base == 8 and prefix: rtn = "0" elif base == 16 and pr...
mit
2,214,180,999,662,640,600
17.60241
76
0.577073
false
ngageoint/scale
scale/scale/settings.py
1
14209
""" Django settings for scale_test project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ import os import scale import sys import dj_database_url def get_env...
apache-2.0
-3,697,003,481,016,563,700
29.622845
103
0.661553
false
TeamADEA/Hunger_Games
HG_Code/Model.py
1
7064
import numpy as np import copy import time from Kat import Kat from Visualize import Visualizer from SimManager import sim_manager from hg_settings import * from Hunger_Grid import hunger_grid import sys import os STEP_SIZE = 10 # 0 = only last frame, # 1 = every frame, # N = every N ...
mit
4,120,856,940,087,549,000
37.601093
127
0.587061
false
chapware/aircrack
scripts/airdrop-ng/install.py
1
3800
#!/usr/bin/env python __version__ = "1.13.2010.21:00" __author__ = "Bryan Chapman <bryanwchapman@gmail.com>" ''' This is the installer file for airdrop-ng. It first checks for different dependancies, such as make, svn, etc. ''' import os, sys from shutil import rmtree if os.geteuid() != 0: print "Installer must b...
gpl-2.0
3,112,824,450,673,922,600
30.147541
230
0.649211
false
ppries/tensorflow
tensorflow/contrib/framework/python/ops/variables.py
1
25287
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-135,211,928,952,083,820
35.701016
90
0.693835
false
Daniel-Brosnan-Blazquez/DIT-100
debugging/trajectory_planning_profiles/trapezoidal-profile.py
1
7690
import numpy import time from matplotlib import pyplot def main (params): angle = params['p0'] vel = params['v0'] sign = params['sign'] # Plan the trajectory if it is not planned T = 0 Ta = 0 Td = 0 ...
gpl-3.0
-1,022,844,989,781,801,000
23.258675
76
0.447854
false
Oreder/PythonSelfStudy
Exe_18.py
1
8002
# Creating class # # +++ Syntax +++ # class ClassName: # 'Optional class documentation string' # class_suite # class Employee: 'common base class for all employees' empCount = 0 def __init__(self, name, salary): self.name = name self.salary = salary Employee.empCount += 1 ...
mit
4,672,089,774,815,598,000
32.241667
94
0.543369
false
ess-dmsc/do-ess-data-simulator
DonkiPlayer/DonkiOrchestraLib.py
1
7360
import zmq import traceback import socket import time class CommunicationClass: def __init__(self, name='director'): self.context = zmq.Context() self.poller = zmq.Poller() self.pub_sock = None self.sub_socks = {} self.pub_tag = name # self.create_pub_socket(...
bsd-2-clause
-3,240,108,281,225,997,000
37.134715
85
0.38125
false
ragupta-git/ImcSdk
imcsdk/mometa/storage/StorageFlexFlashVirtualDrive.py
1
7941
"""This module contains the general information for StorageFlexFlashVirtualDrive ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class StorageFlexFlashVirtualDriveConsts: ADMIN_ACTION_DISABLE_VD = "disable-vd" ADMIN_ACT...
apache-2.0
-984,964,799,914,068,200
65.175
258
0.625866
false
ErnieAllen/qpid-dispatch
tests/system_tests_protocol_settings.py
1
16207
# # 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 # "License"); you may not...
apache-2.0
-6,041,756,895,692,285,000
39.31592
127
0.604554
false
acressity/acressity
narratives/forms.py
1
2019
from datetime import date from django import forms from narratives.models import Narrative from django.forms.extras.widgets import SelectDateWidget from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.http import HttpResponse from django.core.exceptions import Permissio...
gpl-3.0
-5,569,418,809,155,219,000
34.421053
250
0.65577
false
rigetticomputing/grove
grove/tomography/state_tomography.py
1
11664
############################################################################## # Copyright 2017-2018 Rigetti Computing # # 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...
apache-2.0
-8,882,595,617,667,638,000
43.015094
100
0.650034
false
ecohealthalliance/eidr-connect
.scripts/utils.py
1
1603
import re import requests import os import functools import json try: from functools import lru_cache except ImportError: from backports.functools_lru_cache import lru_cache GRITS_URL = os.environ.get("GRITS_URL", "https://grits.eha.io") def clean(s): return re.sub(r"\s+", " ", s).strip() def clean_di...
apache-2.0
-169,896,742,788,247,500
24.870968
79
0.601996
false
kevin-intel/scikit-learn
sklearn/datasets/_openml.py
2
34451
import gzip import json import os import shutil import hashlib from os.path import join from warnings import warn from contextlib import closing from functools import wraps from typing import Callable, Optional, Dict, Tuple, List, Any, Union import itertools from collections.abc import Generator from collections import...
bsd-3-clause
66,852,054,886,861,020
35.845989
79
0.604017
false
yoazmenda/Hearthstone_deck_builder
run_games.py
1
1724
import json from hearthbreaker.agents.basic_agents import RandomAgent from hearthbreaker.cards.heroes import hero_for_class from hearthbreaker.constants import CHARACTER_CLASS from hearthbreaker.engine import Game, Deck, card_lookup from hearthbreaker.cards import * import timeit def load_deck(filename): cards = ...
mit
-2,154,089,804,845,221,400
27.733333
98
0.563805
false
so3500/volttron-kafka
CloudAgent/cloudagent/agent.py
1
19234
import datetime import logging import os import sys import datetime import json from dateutil.parser import parse import multiprocessing import ast import random # cloud from pymongo import MongoClient # kafka from kafka import KafkaConsumer, KafkaProducer from kafka.errors import KafkaError from volttron.platform.v...
mit
2,953,979,375,699,708,400
38.014199
124
0.547728
false
donlorenzo/AdvancedConfigParser
src/AdvancedConfigParser.py
1
17728
# -*- coding: utf-8 -*- # Copyright (c) 2010, 2014 Lorenz Quack # This code is released under the MIT License: # 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 ...
mit
-2,125,530,160,059,667,500
38.838202
104
0.542137
false
rmanoni/mi-instrument
mi/instrument/kut/ek60/ooicore/driver.py
1
39253
""" @package mi.instrument.kut.ek60.ooicore.driver @file /mi/instrument/kut/ek60/ooicore/driver.py @author Richard Han @brief Driver for the ooicore Release notes: This Driver supports the Kongsberg UnderWater Technology's EK60 Instrument. """ __author__ = 'Richard Han & Craig Risien' __license__ = 'Apache 2.0' impo...
bsd-2-clause
1,710,098,018,871,872,300
42.567148
132
0.572542
false
EmbodiedCognition/pagoda
pagoda/physics.py
1
47156
'''This module contains convenience wrappers for ODE objects.''' from __future__ import division import collections import numpy as np import ode BodyState = collections.namedtuple( 'BodyState', 'name position quaternion linear_velocity angular_velocity') class Registrar(type): '''A metaclass that builds ...
mit
-2,953,832,453,207,946,000
32.349364
86
0.58192
false
IQSS/geoconnect
gc_apps/gis_shapefiles/views_02_visualize.py
1
4711
from __future__ import print_function import logging from django.http import HttpResponse from django.views.generic import View from django.template.loader import render_to_string from django.conf import settings from gc_apps.gis_shapefiles.models import ShapefileInfo from gc_apps.worldmap_layers.models import World...
apache-2.0
1,538,729,477,637,049,300
37.300813
116
0.612397
false
nickmilon/milonpy
milonpy/utils/basic2.py
1
14147
#!/usr/bin/env python # -*- coding: UTF-8 -*- ####################################################### ''' module: utilities.basic2 Created:Aug 21, 2012 author: nickmilon Description: Description: Simple utilities (2) and Vars - Very Limited IMPORTS HERE ! ''' ###############################...
apache-2.0
-7,230,937,652,603,792,000
37.752747
168
0.57072
false
AnthonyCheetham/naco_ispy
data_handling_scripts/queue_cal_analysis.py
1
1931
# -*- coding: utf-8 -*- """ Created on Fri Nov 11 10:41:32 2016 Program to run through the calibrations folders and queue all data for analysis It isn't yet smart enough to check which ones are done already @author: cheetham """ import naco_ispy,subprocess,os,argparse,glob parser = argparse.ArgumentParser(descript...
gpl-3.0
-3,123,554,130,894,556,000
32.310345
127
0.684102
false
Maronato/SpottedBot
custom_auth/facebook_methods.py
1
4677
import facebook from django.conf import settings from django.shortcuts import reverse from urllib.parse import urlencode, quote, unquote from django.contrib.auth import login from django.contrib import messages app_id = settings.SOCIAL_FACEBOOK_KEY app_secret = settings.SOCIAL_FACEBOOK_SECRET def get_graph(): "...
agpl-3.0
7,889,079,061,397,053,000
30.38255
122
0.663388
false
LegoStormtroopr/canard
SQBLWidgets/sqblUI/statementText.py
1
1584
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/statementText.ui' # # Created: Sat Jul 25 12:17:11 2015 # 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.fromUtf8 excep...
gpl-3.0
-4,289,232,995,782,310,000
39.615385
250
0.696338
false
escapewindow/signingscript
src/signingscript/vendored/mozbuild/mozbuild/action/generate_symbols_file.py
3
3333
# 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/. from __future__ import absolute_import, print_function, unicode_literals import argparse import buildconfig import os f...
mpl-2.0
6,821,171,240,241,072,000
35.228261
78
0.60426
false
samueldeng/crosslan
headquarter/iptman.py
1
2445
import iptc import logging logging.basicConfig(format='[%(levelname)s]\t%(asctime)s\t%(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.DEBUG) log = logging.getLogger("iptman") class IptMan(): def __init__(self): pass @staticmethod def insert_rule(port): try: ...
gpl-2.0
5,179,356,324,944,784,000
27.44186
103
0.503476
false
google-research/falken
service/generated_flatbuffers/tflite/LessEqualOptions.py
1
2218
# Copyright 2021 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 agreed to in writing, ...
apache-2.0
3,640,308,164,800,651,300
29.805556
114
0.708747
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/PySide/examples/itemviews/addressbook/addresswidget.py
1
10279
#!/usr/bin/python """************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** ** You may use ...
epl-1.0
-137,049,467,144,635,650
40.447581
86
0.628369
false
googleapis/python-grafeas
grafeas/grafeas_v1/services/grafeas/transports/grpc_asyncio.py
1
26599
# -*- 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
-3,522,779,740,541,284,000
41.626603
89
0.617956
false
terranum-ch/GraphLink
graphlink/ui/gkui_node_manager.py
1
2716
#!/urs/bin/python import os import wx from ..core.gk_node import GKNode from .gkui_node_dlg import GKUINodeEditDialog class GKUINodeManager(object): def __init__(self, parentframe, listctrl): self.m_listctrl = listctrl assert (self.m_listctrl is not None), "listctrl is None!" self.m_paren...
apache-2.0
-1,177,501,102,955,131,400
31.710843
77
0.559116
false
gratefulfrog/lib
python/chempy/cex.py
1
17584
#A* ------------------------------------------------------------------- #B* This file contains source code for the PyMOL computer program #C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific. #D* ------------------------------------------------------------------- #E* It is unlawful to modify or remove ...
gpl-2.0
-1,504,338,603,752,551,400
38.162584
133
0.469177
false
chrplr/AIP2015
resources/python-scripts/dualscope.py
1
28502
#!/usr/bin/env python """ Oscilloscope + spectrum analyser in Python. ------------------------------------------------------------ Copyright (C) 2008, Roger Fearick, University of Cape Town This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as pu...
gpl-2.0
2,410,628,168,513,785,300
32.026651
83
0.586941
false
alexgorban/models
official/modeling/tf_utils.py
1
5438
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
7,756,442,032,010,609,000
30.074286
80
0.690143
false
PyFilesystem/pyfilesystem
fs/rpcfs.py
1
11326
""" fs.rpcfs ======== This module provides the class 'RPCFS' to access a remote FS object over XML-RPC. You probably want to use this in conjunction with the 'RPCFSServer' class from the :mod:`~fs.expose.xmlrpc` module. """ import xmlrpclib import socket import base64 from fs.base import * from fs.errors import * ...
bsd-3-clause
6,380,686,112,742,397,000
30.373961
123
0.555183
false
orlenko/bccf
src/pybb/permissions.py
1
6478
# -*- coding: utf-8 -*- """ Extensible permission system for pybbm """ from django.utils.importlib import import_module from django.db.models import Q from pybb import defaults def _resolve_class(name): """ resolves a class function given as string, returning the function """ if not name: return False mo...
unlicense
-5,898,669,304,835,996,000
38.506098
108
0.629824
false
ktok07b6/polyphony
polyphony/compiler/libs.py
1
3330
single_port_ram = """module SinglePortRam # ( parameter DATA_WIDTH = 8, parameter ADDR_WIDTH = 4, parameter RAM_DEPTH = 1 << ADDR_WIDTH ) ( input clk, input rst, input [ADDR_WIDTH-1:0] ram_addr, input [DATA_WIDTH-1:0] ram_d, input ram_we, output [DATA_WIDTH-1:0] ram_q ); reg [DATA_WIDTH-1:0] mem [0...
mit
682,272,391,786,811,300
20.907895
70
0.571471
false
tonioo/modoboa
modoboa/core/forms.py
1
4606
# -*- coding: utf-8 -*- """Core forms.""" from __future__ import unicode_literals from django import forms from django.contrib.auth import ( forms as auth_forms, get_user_model, password_validation ) from django.db.models import Q from django.utils.translation import ugettext as _, ugettext_lazy from modoboa.co...
isc
-1,737,334,883,102,439,700
34.160305
78
0.621146
false
praekelt/txtalert
txtalert/apps/bookings/views.py
1
7598
from django.http import HttpResponse, Http404, HttpResponseRedirect from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse fro...
gpl-3.0
-763,102,905,537,551,700
36.995
93
0.622664
false
Flamacue/pretix
src/tests/plugins/test_ticketoutputpdf.py
2
1826
from datetime import timedelta from decimal import Decimal from io import BytesIO import pytest from django.utils.timezone import now from PyPDF2 import PdfFileReader from pretix.base.models import ( Event, Item, ItemVariation, Order, OrderPosition, Organizer, ) from pretix.plugins.ticketoutputpdf.ticketoutput im...
apache-2.0
6,230,654,048,277,624,000
33.45283
87
0.693866
false
abusesa/abusehelper
abusehelper/core/rules/classifier.py
1
1033
class Classifier(object): def __init__(self): self._rules = dict() def inc(self, rule, class_id): classes = self._rules.get(rule, None) if classes is None: classes = dict() self._rules[rule] = classes classes[class_id] = classes.get(class_id, 0) + 1 ...
mit
496,745,086,639,479,040
25.487179
56
0.516941
false
geobricks/pgeo
pgeo/metadata/metadata.py
1
2602
import os import json from pgeo.utils.json import dict_merge_and_convert_dates from pgeo.metadata.db_metadata import DBMetadata from pgeo.metadata.search import MongoSearch from pgeo.utils import log from pgeo.config.metadata.core import template as core_template from pgeo.config.metadata.raster import template as rast...
gpl-2.0
-6,503,222,040,618,752,000
40.31746
164
0.673328
false
eavatar/ava
src/eavatar.ava/tests/unit/test_util.py
1
2173
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import unittest import re from ava.util import resource_path, time_uuid from ava.util import webutils class UtilTest(unittest.TestCase): def test_resource_path(self): rv = resource_path("path1") print(rv) ...
bsd-3-clause
4,244,399,914,679,452,700
41.627451
118
0.664059
false
habalux/pglog2grok
pglog2grok.py
1
4033
#!/usr/bin/env python # # Small script for generating a logstash grok filter and patterns for postgresql # using a non-default log_line_prefix setting. # # Output of this script has NOT been tested in any production environment as of yet. # # Copyright (c) 2014, Teemu Haapoja <teemu.haapoja@gmail.com> # All rights rese...
bsd-2-clause
-7,059,104,021,549,284,000
38.539216
117
0.706422
false
TeMPO-Consulting/mediadrop
mediacore/controllers/login.py
1
4471
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2013 MediaCore Inc., Felix Schwarz and other contributors. # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See L...
gpl-3.0
-8,258,448,679,975,395,000
39.645455
99
0.641244
false
cryptica/slapnet
benchmarks/scalable/PhilosophersCM84/make_net.py
1
2045
#!/usr/bin/python3 import sys print(""" petri net "The drinking philosophers for n=2" { places { p1h p1e p2h p2e req1p1 req1p2 req2p1 req2p2 fork1p1 fork1p2 fork2p1 fork2p2 fork1clean fork1dirty fork2clean fork2dirty } transitions { ...
gpl-3.0
-4,088,092,992,242,717,000
33.083333
112
0.605868
false
uwosh/uwosh.intranet.policy
uwosh/intranet/policy/importexport.py
1
5459
from Products.CMFCore.utils import getToolByName from Products.LDAPMultiPlugins import manage_addLDAPMultiPlugin def install(context): if not context.readDataFile('uwosh.intranet.policy.txt'): return setupLDAPPlugin(context) def setupLDAPPlugin(context): ldap_plugin_id = 'ldap_authentication' ...
gpl-2.0
-1,045,420,193,652,714,100
32.913043
113
0.52702
false
realopenit/bubble
bubble/commands/cmd_examples.py
1
1437
# -*- coding: utf-8 -*- # Part of bubble. See LICENSE file for full copyright and licensing details. import click from ..cli import pass_bubble from ..util.examples import all_examples_functions @click.command('examples', short_help='Show example for doing some task in bubble(experimental)') @click.op...
gpl-3.0
-2,532,512,840,913,987,000
33.214286
85
0.557411
false
yw374cornell/e-mission-server
emission/core/wrapper/stop.py
1
1696
import logging import emission.core.wrapper.wrapperbase as ecwb class Stop(ecwb.WrapperBase): props = {"trip_id": ecwb.WrapperBase.Access.WORM, # trip_id of the parent trip "enter_ts": ecwb.WrapperBase.Access.WORM, # the timestamp of entry (in secs) "enter_local_dt": ecwb.WrapperBase.Acc...
bsd-3-clause
-4,098,555,770,510,610,400
64.230769
104
0.653892
false
RNAcentral/rnacentral-import-pipeline
tests/cli/pdb_test.py
1
1261
# -*- coding: utf-8 -*- """ Copyright [2009-2018] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by...
apache-2.0
7,726,899,241,946,992,000
29.756098
72
0.694687
false
ekapujiw2002/kweb
kwebhelper.py
1
34980
#!/usr/bin/env python # -*- coding: utf-8 -*- # helper file for kweb Minimal Kiosk Browser # Copyright 2013-2014 by Guenter Kreidl # free software without any warranty # you can do with it what you like # version 1.4 import os,urllib,sys,subprocess,threading,time import Tkinter as tk # GLOBAL OPTIONS # use external ...
gpl-3.0
2,244,612,217,892,959,500
41.185766
235
0.53966
false
bwohlberg/sporco
sporco/dictlrn/cbpdndl.py
1
18601
# -*- coding: utf-8 -*- # Copyright (C) 2015-2020 by Brendt Wohlberg <brendt@ieee.org> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """Dictionary learning based ...
bsd-3-clause
8,305,897,426,569,706,000
34.498092
77
0.626257
false
kism/RViProgramLauncher
viinputdaemon.py
1
18123
# Input Daemon for the Visually Impared # For use with a device that outputs serial import uinput #interface between python and the uinput kernel module import time #for time.sleep() import serial #the keyboard this program interfaces with uses serial import os import sys # Easier debugging :^) class termcolour: ...
mit
-6,499,945,008,790,168,000
27.81399
90
0.674668
false
JNeiger/robocup-software
soccer/gameplay/plays/no_opponents/offensive_pivot_kick.py
1
1448
import play import behavior import robocup import skills.line_kick import tactics.defense import main import constants import enum import role_assignment class OffensivePivotKick(play.Play): def __init__(self): super().__init__(continuous=False) self.add_transition(behavior.Behavior.State.start, ...
apache-2.0
-2,246,814,608,390,388,200
31.177778
120
0.627072
false
FederatedAI/FATE
examples/benchmark_quality/hetero_nn/fate-hetero_nn.py
1
6666
# # 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,090,263,162,999,835,600
46.276596
117
0.671467
false
SoftwareKing/zstack-woodpecker
zstackwoodpecker/zstackwoodpecker/operations/config_operations.py
1
1270
''' All zstack config operations @author: Youyk ''' import apibinding.api_actions as api_actions import apibinding.inventory as inventory import account_operations import os def get_global_config_value(category, name, session_uuid = None, \ default_value = None): value = None action...
apache-2.0
3,635,980,917,824,433,000
28.238095
81
0.692126
false
wevote/WebAppPublic
position/urls.py
1
3102
# position/urls.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.conf.urls import url from . import views, views_admin urlpatterns = [ # admin_views.py url(r'^$', views_admin.position_list_view, name='position_list',), url(r'^delete/$', views_admin.position_delete_process_view,...
bsd-3-clause
-570,835,136,176,265,540
58.653846
117
0.683752
false
wadobo/GECO
src/gecod/gecod/xmlrpc_frontend.py
1
3242
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Provides a xmlrpc frontend to gecod backend ''' import backend import secure_xmlrpc as sxmlrpc HOST = 'localhost' PORT = 4343 DATABASE = 'sqlite:///database.sqlite' KEYFILE='certs/key.pem' CERTFILE='certs/cert.pem' def parseconfig(configfile): global HOST, PORT, DAT...
gpl-3.0
-6,722,768,706,466,853,000
22.664234
60
0.572795
false
prior/webinars
webinars_web/webinars/views/events.py
1
10543
from operator import attrgetter from django.http import HttpResponse,HttpResponseRedirect,HttpResponseNotFound,HttpResponseForbidden from django.shortcuts import render_to_response from django.views.decorators.http import require_GET, require_POST from webinars_web.webinars.forms.event import EventForm from marketplace...
apache-2.0
-1,903,053,518,049,108,200
44.640693
265
0.656455
false
edmundgentle/schoolscript
SchoolScript/bin/Debug/pythonlib/Lib/distutils/command/bdist_dumb.py
1
4801
"""distutils.command.bdist_dumb Implements the Distutils 'bdist_dumb' command (create a "dumb" built distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" __revision__ = "$Id$" import os from distutils.core import Command from distutils.util import get_platform from distu...
gpl-2.0
-1,751,620,946,305,370,000
38.008333
76
0.519267
false
Fabien-B/Web_ASA_Sourdoire
www/parcelle.py
1
4236
import mysql.connector import datetime class Parcelle(object): database = 'IENAC14_asa' user = 'root' password = 'root' host = '127.0.0.1' def __init__(self,id_parc,compteur=None,nom=None,lat=None,lon=None,altitude=None): if id_parc>0: self.load(id_parc) else: ...
lgpl-3.0
-4,204,626,003,705,896,400
41.37
216
0.628895
false
saknis/upelis
logs4.py
1
5178
#!/usr/bin/env python import base64 import cgi import datetime import logging import os import time #from datetime import datetime, date, time import urllib import wsgiref.handlers import string from google.appengine.api import users from google.appengine.api.logservice import logservice from google....
lgpl-2.1
5,720,461,625,587,779,000
33
131
0.60506
false
agiliq/django-secure-login
secure_login/tests.py
1
9858
from django.test import TestCase from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.core import mail from django.test.utils import override_settings from django.conf import settings from django import forms from django.contrib.auth.backends import ModelBackend from .mo...
bsd-3-clause
-4,263,597,417,731,176,400
38.2749
205
0.649828
false
clearpathrobotics/axis_camera
nodes/axis.py
1
8123
#!/usr/bin/env python # # Axis camera image driver. Based on: # https://code.ros.org/svn/wg-ros-pkg/branches/trunk_cturtle/sandbox/axis_camera # /axis.py # import threading import urllib2 import rospy from sensor_msgs.msg import CompressedImage, CameraInfo import camera_info_manager class StreamThread(threading.Thr...
bsd-3-clause
9,019,188,777,415,011,000
36.43318
95
0.562723
false
jacebrowning/gridcommand
setup.py
1
1810
#!/usr/bin/env python """Setup script for the package.""" import os import sys import setuptools PACKAGE_NAME = 'gridcommand' MINIMUM_PYTHON_VERSION = 3, 5 def check_python_version(): """Exit when the Python version is too low.""" if sys.version_info < MINIMUM_PYTHON_VERSION: sys.exit("Python {}....
lgpl-3.0
-8,046,625,268,878,089,000
25.617647
78
0.628729
false
ledbutter/ProjectEulerPython
Problem39.py
1
1375
# If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. # {20,48,52}, {24,45,51}, {30,40,50} # For which value of p 1000, is the number of solutions maximised? # p = 120 # sols = 0 # for a in range(1, p//2): # for b in range...
mit
9,017,787,300,578,095,000
22.157895
133
0.576727
false
google/personfinder
app/indexing.py
1
10056
# Copyright 2010 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 wr...
apache-2.0
7,982,706,846,564,120,000
38.590551
81
0.625597
false
miguelalba89/hfdp-python
combining/observer.py
1
7761
""" Ducks problem with quackologists (observers) Author: m1ge7 Date: 2014/03/24 """ from abc import ABCMeta, abstractmethod ############################################################################### # ############################################################################### class QuackObservable: _...
gpl-3.0
939,939,761,361,892,700
21.365994
79
0.541039
false
bolkedebruin/airflow
tests/providers/google/cloud/operators/test_compute_system_helper.py
1
5190
#!/usr/bin/env python # -*- 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 Licen...
apache-2.0
6,849,869,695,158,749,000
40.854839
98
0.603276
false
xuru/pyvisdk
pyvisdk/do/virtual_serial_port_file_backing_option.py
1
1088
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VirtualSerialPortFileBackingOption(vim, *args, **kwargs): '''The data object type con...
mit
-870,878,209,018,097,300
31.029412
124
0.611213
false
pattisdr/osf.io
api/meetings/views.py
1
9146
from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import NotFound from django.db.models import Q, Count, Subquery, OuterRef, Case, When, Value, CharField, F, IntegerField from django.db.models.functions import Length, Substr, Coalesce from django.contrib.contenttypes.mo...
apache-2.0
-3,653,973,906,636,123,000
36.63786
104
0.663459
false
vijayendrabvs/ssl-neutron
neutron/plugins/ml2/driver_api.py
1
21254
# Copyright (c) 2013 OpenStack Foundation # 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 ...
apache-2.0
-3,205,980,288,567,005,000
34.781145
78
0.682177
false
duonys/deep-learning-chainer
dlchainer/SdA.py
1
5225
#-*- coding: utf-8 -*- from abc import ABCMeta, abstractmethod import copy import numpy as np from sklearn.base import BaseEstimator, ClassifierMixin, RegressorMixin from sklearn.externals.six import with_metaclass from chainer import Variable, FunctionSet, optimizers, cuda import chainer.functions as F from .dA impor...
mit
-6,527,209,594,631,249,000
32.280255
110
0.587368
false
SecPi/SecPi
worker/temperature_sensor.py
1
2642
from tools.sensor import Sensor import glob import logging import os import threading import time class TemperatureSensor(Sensor): #DS18B20 digital temperature sensor def __init__(self, id, params, worker): super(TemperatureSensor, self).__init__(id, params, worker) #self.active = False try: self.min = int...
gpl-3.0
729,324,569,803,099,900
30.452381
130
0.696064
false
openstates/openstates
openstates/ct/events.py
1
1993
import datetime import json from pupa.scrape import Scraper, Event import pytz from .utils import open_csv class CTEventScraper(Scraper): _tz = pytz.timezone("US/Eastern") def __init__(self, *args, **kwargs): super(CTEventScraper, self).__init__(*args, **kwargs) def scrape(self): for...
gpl-3.0
-1,077,329,166,467,352,700
31.145161
88
0.537883
false
martinjrobins/hobo
pints/tests/test_opt_cmaes.py
1
5620
#!/usr/bin/env python3 # # Tests the basic methods of the CMAES optimiser. # # This file is part of PINTS. # Copyright (c) 2017-2018, University of Oxford. # For licensing information, see the LICENSE file distributed with the PINTS # software package. # import unittest import numpy as np import pints import pints....
bsd-3-clause
-920,075,941,382,228,200
32.855422
78
0.602847
false
huvermann/CiscoPhoneDirectory
Cisco79xxPhoneDirectory/PhonebookProvider/PhoneBookProviderBase.py
1
5669
# -*- coding: utf-8 -*- from flask import request from configuration import config, ConfFields from Cisco79xxPhoneDirectory import app from flask.views import View class PhoneBookProviderBase(View): """Phonebook provider base class.""" Routing = {} NameFieldKey = "name" NumberFieldKey = "number" Pa...
mit
-3,116,200,379,703,463,000
34.43125
100
0.562004
false
openthread/silk
silk/tests/openthread/ot_test_child_table.py
1
6689
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
7,680,028,345,725,509,000
33.658031
119
0.622066
false
frink182/stevostat
pir.py
1
1322
#!/usr/bin/env python from time import sleep from time import strftime import RPi.GPIO as GPIO import os import paho.mqtt.publish as publish import paho.mqtt.client as mqtt from datetime import datetime PIR=26 SCREEN_TIMEOUT=300 SCREEN='/sys/class/backlight/rpi_backlight/bl_power' ON=0 OFF=1 TOPIC="presence/PIR" GPI...
gpl-2.0
-4,928,873,503,737,569,000
23.036364
79
0.712557
false
rane-hs/fabric-py3
tests/Python26SocketServer.py
1
22074
"""Generic socket server classes. This module tries to capture the various aspects of defining a server: For socket-based servers: - address family: - AF_INET{,6}: IP (Internet Protocol) sockets (default) - AF_UNIX: Unix domain sockets - others, e.g. AF_DECNET are conceivable (see <socket.h> ...
bsd-2-clause
8,849,255,045,800,621,000
30.670014
94
0.642339
false
StefGou/Kijiji-Repost-Headless
kijiji_repost_headless/kijiji_cmd.py
1
4487
import argparse import os import sys from time import sleep import kijiji_api if sys.version_info < (3, 0): raise Exception("This program requires Python 3.0 or greater") def main(): ##Start here #Takes: config(user/pass) #One of: #post adPostingFile #show #delete adId #show #repost adPo...
mit
-5,459,380,662,855,144,000
32.485075
118
0.682416
false
Ophiuchus1312/enigma2-master
Navigation.py
1
7217
from enigma import eServiceCenter, eServiceReference, eTimer, pNavigation, getBestPlayableServiceReference, iPlayableService from Components.ParentalControl import parentalControl from Components.config import config from Tools.BoundFunction import boundFunction from Tools.StbHardware import setFPWakeuptime, getFPWakeu...
gpl-2.0
6,904,893,535,751,126,000
34.033981
159
0.749758
false
john5223/bottle-auth
auth/controllers/user_controller.py
1
2915
import logging logger = logging.getLogger(__name__) from bottle import route, get, post, delete from bottle import request, response def error(code, message): response.status = code message['status'] = code return message get_user_table = lambda db: db.get_table('users', primary_id='userid', primary_t...
gpl-2.0
-8,540,600,454,075,682,000
34.120482
107
0.616467
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdeui/KPixmapCache.py
1
2878
# encoding: utf-8 # module PyKDE4.kdeui # from /usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyKDE4.kdecore as __PyKDE4_kdecore import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtGui as __PyQt4_QtGui import PyQt4.QtSvg as __PyQt4_QtSvg cl...
gpl-2.0
-1,374,738,902,669,333,000
26.941748
101
0.646977
false
EclipseXuLu/DataHouse
DataHouse/crawler/university_spider.py
1
3941
import requests from bs4 import BeautifulSoup from lxml import etree import pandas as pd from io import StringIO, BytesIO university_list = [] class University(): def __init__(self, name='', is_985=False, is_211=False, has_institute=False, location='', orgnization='', education_level='', educat...
mit
-7,579,131,018,589,852,000
40.423913
119
0.558908
false