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
Notxor/Neuronal
neuronal/neuromotor.py
1
3081
# -*- coding: utf-8 -*- # Neuronal - Framework for Neural Networks and Artificial Intelligence # # Copyright (C) 2012 dddddd <dddddd@pyphiverses.org> # Copyright (C) 2012 Notxor <gnotxor@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General P...
agpl-3.0
-3,130,294,366,610,631,700
40.486486
80
0.669381
false
dlenski/stravacli
stravacli/QueryGrabber.py
1
1046
from http.server import HTTPServer, BaseHTTPRequestHandler import socket from urllib.parse import parse_qs class handler(BaseHTTPRequestHandler): def do_GET(self): self.server.received = parse_qs(self.path.split('?',1)[1]) self.send_response(200) self.end_headers() self.wfile.write(...
gpl-3.0
-4,080,119,067,574,555,600
33.866667
75
0.554493
false
hanlind/nova
nova/tests/functional/db/test_aggregate.py
1
28761
# 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
-7,799,909,132,526,883,000
44.150706
79
0.575015
false
failys/CAIRIS
cairis/tools/PseudoClasses.py
1
16629
# 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...
apache-2.0
-6,147,163,597,620,550,000
29.234545
112
0.682783
false
ZoranPavlovic/kombu
kombu/utils/objects.py
1
1945
"""Object Utilities.""" class cached_property: """Cached property descriptor. Caches the return value of the get method on first call. Examples: .. code-block:: python @cached_property def connection(self): return Connection() @connection.set...
bsd-3-clause
-138,779,550,533,933,420
29.390625
70
0.515681
false
Fuzen-py/BladeAndSoulAPI
BladeAndSoul/bns.py
1
21211
import asyncio import json import aiohttp from bs4 import BeautifulSoup from .errors import (CharacterNotFound, FailedToParse, InvalidData, ServiceUnavialable) try: import lxml parser = 'lxml' except ImportError: parser = 'html.parser' # types of weapons in game VALID_WEAPONS = ['d...
mit
8,555,198,700,855,818,000
42.542094
173
0.564395
false
Llamatech/sis-fibo
model/vos/cuenta.py
1
2245
#-*- coding:iso-8859-1 -*- """ Clase que modela la información de una cuenta en el sistema """ # NUMERO.SALDO.TIPO_CUENTA,CERRADA,CLIENTE,OFICINA class Cuenta(object): def __init__(self, numero, saldo, tipo_cuenta, cerrada, cliente, oficina): self.numero = numero self.saldo = saldo ...
gpl-2.0
7,610,641,571,238,857,000
33.619048
136
0.536988
false
99cloud/keystone_register
openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py
1
12028
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
-5,296,865,002,722,064,000
47.305221
79
0.427835
false
tvalacarta/tvalacarta
python/main-classic/lib/youtube_dl/extractor/vimeo.py
1
46584
# coding: utf-8 from __future__ import unicode_literals import base64 import functools import json import re import itertools from .common import InfoExtractor from ..compat import ( compat_kwargs, compat_HTTPError, compat_str, compat_urlparse, ) from ..utils import ( clean_html, determine_ext...
gpl-3.0
-5,558,823,295,967,461,000
40.264184
138
0.508637
false
IanDoarn/zbsmsa
tests/loans.py
1
15622
""" loans.py Final working version of the mutation automation Mutates items from special excel file from inventory type CI - Centralized Inventory to type ZDI - Zimmer Distributor Inventory Written by: Ian Doarn Maintained by: Ian Doarn """ from zbsmsa.site import Site from zbsmsa.inventory.stock import Stock, Produ...
apache-2.0
6,084,375,937,478,261,000
44.150289
117
0.475355
false
LAIRLAB/qr_trees
src/python/run_ilqr_diffdrive.py
1
2328
#!/usr/bin/env python # # Arun Venkatraman (arunvenk@cs.cmu.edu) # December 2016 # # If we are not running from the build directory, then add lib to path from # build assuming we are running from the python folder import os full_path = os.path.realpath(__file__) if full_path.count("src/python") > 0: import sys ...
bsd-3-clause
9,018,473,560,120,826,000
28.468354
94
0.614691
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gtk/gdk/__init__/DisplayManager.py
1
1186
# encoding: utf-8 # module gtk.gdk # from /usr/lib/python2.7/dist-packages/gtk-2.0/pynotify/_pynotify.so # by generator 1.135 # no doc # imports from exceptions import Warning import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject import pango as __pango import pangocairo as __p...
gpl-2.0
-982,081,804,465,363,600
23.204082
76
0.661889
false
mcvidomi/poim2motif
run_svm_real.py
1
1483
''' Created on 08.06.2015 @author: marinavidovic ''' import os import pdb import utils_svm import pickle import numpy as np import copy import genQ import makePOIM import view import matplotlib matplotlib.use('Agg') if __name__ == '__main__': read_data = 1 datapath = "/home/mvidovic/POIM...
mit
-5,112,159,067,973,785,000
25.017544
93
0.665543
false
SevereOverfl0w/MCDirectory
migrations/versions/10723b632a87_.py
1
1036
"""empty message Revision ID: 10723b632a87 Revises: 3d7ce850941c Create Date: 2013-11-12 22:18:26.482191 """ # revision identifiers, used by Alembic. revision = '10723b632a87' down_revision = '3d7ce850941c' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
mit
5,601,540,713,512,676,000
27.777778
63
0.664093
false
klmitch/python-keystoneclient
keystoneclient/tests/unit/v3/test_users.py
2
11616
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-8,940,769,469,299,318,000
36.592233
79
0.577135
false
oculusstorystudio/kraken
Python/kraken/ui/GraphView/pyflowgraph/node.py
1
13604
# # Copyright 2015-2017 Eric Thivierge # import math import json from kraken.ui.Qt import QtWidgets, QtGui, QtCore from port import InputPort, OutputPort, IOPort class NodeTitle(QtWidgets.QGraphicsWidget): __color = QtGui.QColor(25, 25, 25) __font = QtGui.QFont('Roboto', 14) __font.setLetterSpacing(QtG...
bsd-3-clause
-1,098,339,499,066,316,300
31.625899
115
0.600485
false
odahoda/noisicaa
noisidev/runvmtests.py
1
17693
#!/usr/bin/env python3 # @begin:license # # Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de> # # 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 # (...
gpl-2.0
3,167,093,425,330,332,000
33.624266
135
0.542983
false
sebmolinari/los-kpos
app/mod_auth/controllers.py
1
4029
#Flask imports from flask import Blueprint, render_template, flash, redirect, url_for, abort from flask.ext.login import LoginManager, login_required, logout_user, login_user #App imports from app import app from app.mod_auth.forms import LoginForm, UserForm, EmailForm, PasswordForm from app.mod_auth.models import Use...
gpl-3.0
-7,708,140,034,764,960,000
28.844444
81
0.63316
false
SRI-CSL/ETB
demos/allsatlive/yices_parse.py
1
2665
#Defines grammar for reading yices files; used in the include <file> api for yices. from pyparsing import * #Grammar for s-expressions which is used to parse Yices expressions token = Word(alphanums + "-./_:*+=!<>") LPAR = "(" RPAR = ")" #Yices comments are ignored; parentheses are retained since Yices expressions a...
gpl-3.0
-756,669,965,276,283,000
26.193878
155
0.670544
false
Gabotero/GNURadioNext
gr-blocks/python/qa_tagged_stream_mux.py
1
3562
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
8,027,701,689,082,090,000
31.09009
87
0.576081
false
phev8/dataset_tools
experiment_handler/time_synchronisation.py
1
1444
import os import pandas as pd def read_synchronisation_file(experiment_root): filepath = os.path.join(experiment_root, "labels", "synchronisation.csv") return pd.read_csv(filepath) def convert_timestamps(experiment_root, timestamps, from_reference, to_reference): """ Convert numeric timestamps (seco...
mit
1,236,938,527,149,042,200
33.404762
171
0.702216
false
xfaxca/pygaero
example/tmax_peakfind_example.py
1
4986
# tmax_peakfind_example.py """ Demonstration of some of the primary functions in pygaero, including Tmax finding and elemental analysis. """ # Module import from pygaero import pio from pygaero import therm from pygaero import gen_chem import os import matplotlib.pyplot as plt def example1(): # -----------------...
gpl-3.0
1,347,200,790,599,786,200
53.791209
117
0.606899
false
AIFDR/inasafe-django
django_project/realtime/helpers/base_indicator.py
2
2769
# coding=utf-8 from builtins import range from builtins import object from datetime import datetime, timedelta from math import isnan from django.utils.translation import ugettext as _ import numpy import pytz from realtime.models.earthquake import Earthquake __author__ = 'Rizky Maulana Nugraha "lucernae" <lana.pcfre@...
bsd-2-clause
-3,732,841,021,557,332,000
26.415842
75
0.660166
false
morinted/plover
plover/gui_qt/dictionary_editor.py
1
13523
from operator import attrgetter, itemgetter from collections import namedtuple from itertools import chain from PyQt5.QtCore import ( QAbstractTableModel, QModelIndex, Qt, ) from PyQt5.QtWidgets import ( QComboBox, QDialog, QStyledItemDelegate, ) from plover.translation import escape_translat...
gpl-2.0
-4,029,928,462,594,560,500
34.124675
89
0.569844
false
RyanJenkins/ISS
ISS/templatetags/pagination.py
1
3715
import urlparse import urllib from django import template register = template.Library() def unfuck_percent_encoded_utf8(fucked_unicode_str): # OK So... *dramatic pause* # (((Some))) browsers insist on transforming unicode characters outside of # the ASCII range to their UTF-8 encoding, and then url encod...
gpl-3.0
8,622,333,044,276,108,000
38.946237
106
0.679139
false
Azure/azure-sdk-for-python
sdk/servermanager/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters.py
1
2295
# 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 ...
mit
2,877,594,313,000,630,300
45.836735
114
0.659695
false
ermo/privateer_wcu
modules/missions/cargo_mission.py
1
8981
from go_somewhere_significant import * from go_to_adjacent_systems import * import Briefing import Director import VS import debug import faction_ships import launch import quest import unit import universe import vsrandom class cargo_mission (Director.Mission): def initbriefing(self): VS.IOmessage (0,"ca...
gpl-2.0
812,984,243,763,449,700
48.894444
169
0.620755
false
AASHE/hub
hub/apps/metadata/migrations/0001_initial.py
1
2996
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('iss', '__first__'), ] operations = [ migrations.CreateModel( name='AcademicDiscipline', fields=[ ...
mit
-6,569,062,075,885,106,000
34.247059
114
0.480975
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/manager_link_status.py
1
1226
# -*- 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
-1,836,098,244,861,664,500
27.511628
74
0.672104
false
LividInstruments/LiveRemoteScripts
Launchpad_M4L/LaunchpadM4L.py
1
4621
# http://lividinstruments.com from __future__ import with_statement import Live import math """ _Framework files """ from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller from _Framework.ButtonMatrixElement import ButtonMatrixElement # Class representing a 2-dimensional set...
mit
2,758,905,294,441,095,000
59.815789
235
0.752651
false
CelineBoudier/rapid-router
game/messages.py
1
72360
# -*- coding: utf-8 -*- # Code for Life # # Copyright (C) 2016, Ocado Innovation Limited # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your o...
agpl-3.0
2,536,014,707,948,054,500
37.623599
565
0.648973
false
StellarCN/py-stellar-base
stellar_sdk/signer_key.py
1
3956
from . import xdr as stellar_xdr from .__version__ import __issues__ from .exceptions import ValueError from .strkey import StrKey __all__ = ["SignerKey"] class SignerKey: """The :class:`SignerKey` object, which represents an account signer key on Stellar's network. :param signer_key: The XDR signer object ...
apache-2.0
-7,404,016,642,933,082,000
38.959596
139
0.638524
false
songeater/SONGSHTR
soundfunc.py
1
4391
import numpy as np from scipy.fftpack import dct, idct import sys ''' ---------- FUNCTIONS ---------- ''' def get_config(): config = {} config['sound_file'] = "harvestmoon-mono-hp500.wav" config['save_file'] = config['sound_file'] + "_modelsave_" config['blocksize']=13000 config['comp...
agpl-3.0
5,898,696,401,641,609,000
33.128
110
0.578228
false
mvcsantos/QGIS
python/plugins/processing/algs/qgis/RandomPointsAlongLines.py
1
5227
# -*- coding: utf-8 -*- """ *************************************************************************** RandomPointsAlongLines.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com ****...
gpl-2.0
-8,700,106,233,471,537,000
37.718519
135
0.545246
false
saneyuki/servo
python/servo/bootstrap_commands.py
1
22544
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
885,229,770,263,548,800
44.821138
118
0.522489
false
cabanm/project-euler
Problem 23/problem23.py
1
1277
# Find the sum of all the positive integers which # cannot be written as the sum of two abundant numbers. # # Facts: # All integers greater than 28123 can be # written as the sum of two abundant numbers. # Abundant number = sum of proper divisors of n exceed n. # # Find all abundant numbers up to and including ...
gpl-2.0
7,158,230,133,010,168,000
29.146341
82
0.645262
false
mapbox/atom-shell
script/create-dist.py
1
7365
#!/usr/bin/env python import argparse import os import re import shutil import subprocess import sys import tarfile from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, NODE_VERSION, \ TARGET_PLATFORM, DIST_ARCH from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \ ...
mit
4,588,913,929,787,219,500
27.326923
78
0.621453
false
requests/requests-ntlm
tests/functional/test_functional.py
1
2038
import requests import requests_ntlm """ This test is meant to run with Appveyor but until the integration is solved it can only be run locally. The script setup_iis.ps1 can set up an IIS server with the 4 scenarios tested below if you wish to run a sanity check """ username = '.\\User' password = 'Password01' http_w...
isc
1,541,724,218,388,008,000
32.966667
89
0.676644
false
afh/cmakedash
cmakedash.py
1
1690
#!/usr/bin/env python # # cmakedash - a dash docset generator for CMake import os import re import subprocess from bs4 import BeautifulSoup, NavigableString, Tag from docsetgenerator import DocsetGenerator class CMakeDocsetGenerator (DocsetGenerator): def __init__(self): DocsetGenerator.__init__(self) self....
mit
-1,009,468,933,443,884,300
27.644068
77
0.621302
false
hjanime/VisTrails
vistrails/db/versions/v0_9_3/domain/workflow.py
1
7277
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
-6,573,125,723,641,042,000
41.063584
79
0.578123
false
semanticize/semanticizest
semanticizest/parse_wikidump/__init__.py
1
11223
"""Parsing utilities for Wikipedia database dumps.""" from __future__ import print_function from os.path import basename from bz2 import BZ2File from collections import Counter, namedtuple import gzip from HTMLParser import HTMLParser from itertools import chain import logging import re import xml.etree.ElementTree a...
apache-2.0
3,747,019,002,081,521,700
32.008824
79
0.557605
false
KelSolaar/sIBL_GUI
sibl_gui/components/core/inspector/models.py
1
2265
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **models.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines the :class:`sibl_gui.components.core.inspector.inspector.Inspector` Component Interface class Models. **Others:** """ from __future__ import unicode_literals import foundat...
gpl-3.0
2,661,083,915,787,938,300
27.670886
100
0.587638
false
KirillMysnik/ArcJail
srcds/addons/source-python/plugins/arcjail/modules/games/base_classes/prepare_time.py
1
6961
# This file is part of ArcJail. # # ArcJail 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. # # ArcJail is distributed in the hope that...
gpl-3.0
-4,094,657,254,956,467,700
33.805
79
0.616003
false
sekikn/ambari
ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py
2
5353
# -*- coding: utf-8 -*- __doc__ = """ Add WebSocket support to the built-in WSGI server provided by the :py:mod:`wsgiref`. This is clearly not meant to be a production server so please consider this only for testing purpose. Mostly, this module overrides bits and pieces of the built-in classes so that it supports the ...
apache-2.0
4,859,754,912,478,700,000
33.095541
89
0.653092
false
fishroot/nemoa
nemoa/dataset/commons/labels/__init__.py
1
2018
# -*- coding: utf-8 -*- __author__ = 'Patrick Michl' __email__ = 'frootlab@gmail.com' __license__ = 'GPLv3' import nemoa import numpy import importlib def convert(list, input, output = None, filter = False): generic_types = ['number', 'string', 'float'] if isinstance(list, (numpy.ndarray)): list = ...
gpl-3.0
-1,435,464,430,566,239,200
31.031746
69
0.600099
false
marado/youtube-dl
youtube_dl/extractor/npo.py
1
12656
from __future__ import unicode_literals from .subtitles import SubtitlesInfoExtractor from .common import InfoExtractor from ..utils import ( fix_xml_ampersands, parse_duration, qualities, strip_jsonp, unified_strdate, url_basename, ) class NPOBaseIE(SubtitlesInfoExtractor): def _get_toke...
unlicense
-5,777,262,629,636,759,000
33.579235
111
0.477323
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/resources/types/mobile_device_constant.py
1
2416
# -*- 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
-6,480,759,131,112,648,000
27.423529
90
0.627897
false
lalanza808/rharvest
rharvest.py
1
2791
#!/usr/bin/env python """ Image scraper utilizing Reddit Python API, PRAW. Requires PRAW library installed, or pip installed to get it. Choose a subreddit, it identifies pictures in that sub and downloads to specified directory. """ __author__ = 'lance - github.com/lalanza808' #######################################...
mit
-5,845,447,432,851,582,000
33.036585
167
0.668936
false
6/GeoDJ
geodj/settings.py
1
5663
import os # Override these on production env os.environ.setdefault("APP_ENV", "development") os.environ.setdefault("SECRET_KEY", "^uhrm48x9y=1f&+$bg=oc(#23mp0*g5k%8+si9tdz7&4_xk&lf") if os.environ["APP_ENV"] == "development": try: # Add secret ENV varibales for development (e.g. API keys) to secrets.py ...
mit
8,175,222,836,632,787,000
31.545977
89
0.693449
false
userzimmermann/python-moretools
moretools/_types.py
1
2808
# python-moretools # # many more basic tools for python 2/3 # extending itertools, functools and operator # # Copyright (C) 2011-2016 Stefan Zimmermann <zimmermann.code@gmail.com> # # python-moretools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License a...
gpl-3.0
2,180,999,676,987,541,200
20.112782
77
0.742877
false
petry/kanboard
apps/core/migrations/0001_initial.py
1
1775
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Board' db.create_table(u'core_board', ( (u'id...
apache-2.0
3,847,779,870,579,923,000
35.244898
102
0.56169
false
Ricyteach/parmatter
src/parmatter/parmatter.py
1
6022
import string import parse as _parse # avoid potential name conflicts with parse methods # NOTE: All the Formatter docstrings mostly copied from the string docs page (Formatter does # not have its own docstrings... <sad_face>). class Formatter(): '''Re-implementation of `string.Formatter` (using the composition p...
bsd-2-clause
5,580,975,050,867,865,000
67.170455
119
0.6999
false
izapolsk/integration_tests
cfme/roles.py
1
28996
from cfme.utils.log import logger def _remove_page(roles, group, pages): if group in roles: for page in pages: if page in roles[group]: roles[group].remove(page) else: logger.info("Page %s attempted to be removed from role %s, " ...
gpl-2.0
-6,055,738,492,595,354,000
31.32553
100
0.453373
false
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/Examples/Catalyst/PythonDolfinExample/simulation-catalyst-step6.py
1
8271
"""This demo program solves the incompressible Navier-Stokes equations on an L-shaped domain using Chorin's splitting method.""" # Copyright (C) 2010-2011 Anders Logg # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Publi...
gpl-3.0
-5,108,514,945,316,003,000
29.977528
355
0.685407
false
progdupeupl/pdp_website
pdp/forum/migrations/0001_initial.py
1
5896
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import datetime class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ m...
agpl-3.0
5,790,191,699,543,362,000
48.855932
150
0.556009
false
racmariano/skidom
backend/resorts/models/conditions.py
1
2431
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .resort import Resort from django.db import models from django.contrib.postgres.fields import ArrayField from dynamic_scraper.models import Scraper, SchedulerRuntime from scrapy_djangoitem import DjangoItem import datetime # Past and...
mit
-8,431,988,466,548,880,000
42.2
122
0.673797
false
kubernetes-client/python
kubernetes/client/models/v1alpha1_pod_preset_spec.py
1
7114
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
2,289,788,507,147,505,700
29.663793
142
0.598538
false
justinmeister/spaceinvaders-spyral
game/level.py
1
1501
import os import spyral from .sprites import sprite from . import collision WIDTH = 1200 HEIGHT = 900 WHITE = (255, 255, 255) SIZE = (WIDTH, HEIGHT) GREEN = (60, 179, 113) RED = (255, 0, 0) BLACKBLUE = (19, 15, 48) BG_COLOR = BLACKBLUE ENEMYGAP = 30 XMARGIN = 175 YMARGIN = 100 MOVEX = 15 MOVEY = 20 ENEMYSIDE = 50 BA...
mit
-697,301,725,593,934,000
25.803571
75
0.632245
false
nakamura-akifumi/kassis_orange
app_search/helpers/paginate_helper.py
1
1579
import math class Paginate: def __init__(self, pagetab_count = 5, per_page = 10): pass self.pagetab_count = pagetab_count self.per_page = per_page def paginate(self, result_count, current_page): paginate_list = [] pagetab_count = self.pagetab_count per_page = se...
mit
1,459,151,800,332,375,000
32.595745
75
0.513616
false
willemt/docopt2ragel
setup.py
1
1202
from setuptools import setup, find_packages import codecs from os import path here = path.abspath(path.dirname(__file__)) def long_description(): with codecs.open('README.rst', encoding='utf8') as f: return f.read() setup( name='docopt2ragel', version='0.1.3', description='Convert your doco...
bsd-3-clause
-9,220,080,780,478,510,000
26.318182
66
0.608153
false
mm1ke/portage
pym/_emerge/actions.py
1
108119
# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import division, print_function, unicode_literals import errno import logging import operator import platform import pwd import random import re import signal import socket import stat import sub...
gpl-2.0
-8,773,382,806,802,808,000
31.743489
93
0.670465
false
KamLii/Databaes
Databaes/urls.py
1
1369
"""Databaes URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
mit
7,490,611,764,296,033,000
40.484848
79
0.705625
false
santhoshtr/mlmorph
tests/mlmorph-test.py
1
2470
import json import unittest import sys import os import re from mlmorph import Generator, Analyser CURR_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) class Struct: def __init__(self, entries): self.__dict__.update(**entries) class AnalyserGeneratorTests(unittest.TestCase): gene...
gpl-3.0
-3,491,526,984,626,035,000
33.305556
79
0.487045
false
Chilledheart/vbox
src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py
1
18147
# -*- coding: utf-8 -*- # $Id$ """ Test Manager WUI - TestBox. """ __copyright__ = \ """ Copyright (C) 2012-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify it under the te...
gpl-2.0
2,805,759,869,928,952,300
53.824773
123
0.578333
false
Makki1/old-svn
avr/sketchbook/GiraRM_Debug/freebus/freebus_ets/software/freebus-ets/src/GUI/FB_ProgramFrame.py
1
10920
#!/usr/bin/ #-*- coding: iso-8859-1 -*- #=============================================================================== # __________ ________________ __ _______ # / ____/ __ \/ ____/ ____/ __ )/ / / / ___/ # / /_ / /_/ / __/ / __/ / __ / / / /\__ \ # / __/ / _, _/ /___/ /___/ /_/ / /_/ /___/ /...
gpl-3.0
865,511,498,934,486,400
39.83908
111
0.554487
false
rapidpro/chatpro
chatpro/profiles/models.py
1
4753
from __future__ import absolute_import, unicode_literals from chatpro.rooms.models import Room from dash.orgs.models import Org from dash.utils import intersection from dash.utils.sync import ChangeType from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugette...
bsd-3-clause
4,602,666,662,489,233,000
36.132813
118
0.622554
false
AlandSailingRobots/sailingrobot
update_config.py
1
1807
#!/usr/bin/python3 # Updates the configuration in the json to the database # Can run without argument for using standard file # Or specify the file by passing it as a argument import json import sqlite3 import sys if len(sys.argv) > 1: if str(sys.argv[1]) == 'ASPire': filename = 'config_ASPire.json' ...
gpl-2.0
8,881,442,081,132,022,000
28.145161
143
0.556724
false
xu6148152/Binea_Python_Project
PythonCookbook/text_str/strs_and_text.py
1
7706
# !python3 import re def test_re_split(): line = 'asdf fjdk; dfjkaf, fdjksf, jdksf, foo' print(re.split(r'[;,\s]\s*', line)) fields = re.split(r'(;|,|\s)\s*', line) print(fields) values = fields[::2] print(values) delimiter = fields[1::2] + [''] print(delimiter) print(re.split(...
mit
9,049,429,624,892,995,000
22.530675
94
0.580574
false
microsoft/EconML
econml/drlearner.py
1
1068
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import econml.dr as dr from .utilities import deprecated @deprecated("The econml.drlearner.DRLearner class has been moved to econml.dr.DRLearner; " "an upcoming release will remove support for the old name") cla...
mit
8,100,481,333,035,169,000
35.827586
114
0.7603
false
andrewderekjackson/python_lcd_menu
lcd_menu/menu.py
1
4202
import os class MenuItem(object): '''A single menu item which can contain child menu items''' def __init__(self, title, items=None, refresh_callback=None, refresh_callback_args = None): self._title = title self._items = items self._refresh_callback = refresh_callback self._refr...
mit
5,973,343,013,663,982,000
24.011905
95
0.565445
false
jozz68x/PyBrowser
src/browser.py
1
7502
#!usr/bin/python __author__="Jose Diaz - email: jozz.18x@gmail.com" __date__ ="$04/03/2015 05:55:19 AM$" from homepage import Homepage from tkinter import * from tkinter import ttk from PIL import Image, ImageTk from urllib.request import urlopen # Interaccion con la web from urllib.error import HTTPError,U...
gpl-3.0
2,472,997,562,993,499,000
45.194969
110
0.578912
false
daniel-kurushin/iisu
biu/khc.py
1
6304
import sys from struct import pack, unpack from time import sleep class KHC(object): NAME = 'KHC' cmd_inc_engine = b'\xae\xae\x01\x00\x01\x08\x00' # увеличить обороты и подтвердить результат cmd_dec_engine = b'\xae\xae\x01\x00\x02\x08\x00' # уменьшить обороты и подтвердить результат cmd_stop_engine = b'\x...
gpl-3.0
1,060,215,723,341,621,400
28.781095
96
0.589208
false
markgw/jazzparser
src/jazzparser/utils/latex.py
1
1979
"""Latex output utility functions to help with producing valid Latex files. Utility functions for handling processing and output of Latex. """ """ ============================== License ======================================== Copyright (C) 2008, 2010-12 University of Edinburgh, Mark Granroth-Wilding This file is...
gpl-3.0
-1,280,402,752,457,710,600
34.339286
80
0.622537
false
landier/imdb-crawler
crawler/libs/sqlalchemy/orm/deprecated_interfaces.py
1
21785
# orm/deprecated_interfaces.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from sqlalchemy import event, util from .interfaces import EXT_CONTINUE ...
gpl-3.0
4,175,316,921,779,378,000
35.923729
84
0.629653
false
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/netdisco/discoverables/__init__.py
1
5004
"""Provides helpful stuff for discoverables.""" # pylint: disable=abstract-method import ipaddress from urllib.parse import urlparse from ..const import ( ATTR_NAME, ATTR_MODEL_NAME, ATTR_HOST, ATTR_PORT, ATTR_SSDP_DESCRIPTION, ATTR_SERIAL, ATTR_MODEL_NUMBER, ATTR_HOSTNAME, ATTR_MAC_ADDRESS, ATTR_PROPERTIE...
gpl-2.0
-675,812,168,902,687,900
30.275
76
0.609712
false
jsidabras/GA-PMR
HFSS-loadbest.py
1
1771
# ---------------------------------------------- # Script Written by Jason W. Sidabras (jason.sidabras@cec.mpg.de) # requires jsidabras/hycohanz as of 20-04-2017 # Loads a file with a list of 1s and 0s and implements it to HFSS as Silv/Vac # used to load the best results per generation or final # ----------------...
mit
856,297,286,986,434,200
27.032787
91
0.629588
false
eeriks/velo.lv
velo/payment/forms.py
1
19328
from django import forms from django.contrib import messages from django.utils import timezone from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from crispy_forms.layout import Layout, Div, HTML, Field from crispy_forms.he...
gpl-3.0
-5,545,904,322,587,059,000
41.946667
593
0.506623
false
saffsd/assignmentprint
assignmentprint.py
1
15044
""" Utility funtions and classes for preparing project marking bundles for student assignments. Marco Lui <saffsd@gmail.com>, November 2012 """ import os, sys, csv, re import tokenize, textwrap, token import trace, threading import imp import contextlib from cStringIO import StringIO from pprint import pformat impor...
gpl-3.0
-6,263,825,766,030,460,000
30.276507
101
0.590335
false
artificialnull/IshanBoot
aliasbot.py
1
9126
#!/usr/bin/python3 import requests import json import os import time import random as rand import subprocess #telegram bot stuff url = "https://api.telegram.org/bot%s/%s" token = open("token.txt").read().replace('\n', '') print(url % (token, "getUpdates")) path = os.path.dirname(__file__) #globals locked = [] aliase...
gpl-3.0
-6,381,240,377,747,982,000
28.432258
112
0.49463
false
persepolisdm/translation-API
pdm_api/views/default.py
1
1257
from pyramid.response import Response from pyramid.view import view_config from pyramid.httpexceptions import HTTPForbidden from pyramid import request from sqlalchemy.exc import DBAPIError from ..models.mymodel import MyModel, request_log, access_log, banlist from ..settings import get_settings import datetime @view...
gpl-3.0
-3,306,338,348,368,249,300
33.916667
74
0.739857
false
AbhilashReddyM/GeometricMultigrid
mgd3d.py
1
4921
""" 2017 (c) A. R. Malipeddi 3D geometric multigrid code for poissons equation in a cube. - Finite difference method - 7pt operator - trilinear interpolation - Two-color Gauss Seidel smoothing """ import numpy as np def GSrelax(nx,ny,nz,u,f,iters=1,flag=1): ''' Red-Black Gauss Seidel smoothing flag : 1 ...
mit
-4,327,896,811,227,233,300
28.291667
154
0.470839
false
aalien/mib
mib.py
1
7386
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # mib: Modular irc bot # Copyright Antti Laine <antti.a.laine@tut.fi> # # 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 ...
mit
7,265,648,255,817,794,000
37.670157
79
0.558218
false
daigotanaka/kawaraban
wsgi.py
1
1445
""" WSGI config for the website 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_APPLICATIO...
mit
-662,257,155,404,534,100
42.787879
79
0.792388
false
team-vigir/vigir_behaviors
vigir_flexbe_states/src/vigir_flexbe_states/read_dynamic_parameter_state.py
1
2586
#!/usr/bin/env python from flexbe_core import EventState, Logger import rospy from dynamic_reconfigure.client import Client """ Created on 11/03/2014 @author: Philipp Schillinger """ class ReadDynamicParameterState(EventState): """ Reads a given trajectory controller parameter. """ LEFT_ARM_WRX = ['left_arm_t...
bsd-3-clause
9,053,889,298,215,037,000
30.536585
143
0.664346
false
will-iam/Variant
script/process/ergodicity_scaling.py
1
4083
#!/usr/bin/python3 # -*- coding:utf-8 -*- import __future__ import parser import sys import matplotlib.pyplot as plt #plt.style.use('ggplot') import numpy as np import operator from collections import * caseSize = (8192, 8192) if parser.args.res: maxAvailableNode = parser.args.res else: maxAvailableNode = 8 ...
mit
3,501,576,982,939,167,000
30.898438
137
0.62552
false
rfleschenberg/django-shop
example/myshop/migrations/polymorphic/0003_add_polymorphic.py
1
9751
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import cms.models.fields import djangocms_text_ckeditor.fields class Migration(migrations.Migration): dependencies = [ ('cms', '0013_urlconfrevision'), ('cont...
bsd-3-clause
-1,009,144,222,055,504,600
44.565421
169
0.573172
false
elastic/elasticsearch-py
test_elasticsearch/test_types/async_types.py
1
3095
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
apache-2.0
6,571,657,479,850,991,000
27.394495
83
0.625202
false
gemagomez/keepnote
keepnote/gui/main_window.py
1
52638
""" KeepNote Graphical User Interface for KeepNote Application """ # # KeepNote # Copyright (c) 2008-2009 Matt Rasmussen # Author: Matt Rasmussen <rasmus@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...
gpl-2.0
-3,410,582,267,432,658,000
30.576485
87
0.520195
false
heytcass/homeassistant-config
deps/cherrypy/_cpreqbody.py
1
37427
"""Request body processing for CherryPy. .. versionadded:: 3.2 Application authors have complete control over the parsing of HTTP request entities. In short, :attr:`cherrypy.request.body<cherrypy._cprequest.Request.body>` is now always set to an instance of :class:`RequestBody<cherrypy._cpreqbody.RequestBody>`, and *...
mit
8,550,716,814,100,659,000
35.765226
84
0.58538
false
lykops/lykops
lykops/urls.py
1
5817
"""lykops URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
apache-2.0
4,648,493,441,235,367,000
63.595506
132
0.744651
false
dk379/asn-tryst
src/load_asns.py
1
3927
import argparse import logging from multiprocessing import Pool import MySQLdb import netaddr import requests import sys from read_config import asntryst_read_config # # Project specific settings # CONFIG = asntryst_read_config() DB_HOST = CONFIG["database"]["hostname"] DB_NAME = CONFIG["database"]["database"] DB_U...
bsd-3-clause
-587,182,562,095,277,700
24.335484
88
0.614719
false
google/tmppy
_py2tmp/ir0_optimization/_expression_simplification.py
1
17752
# Copyright 2017 Google 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 or...
apache-2.0
-2,463,025,841,349,026,000
44.634961
171
0.534193
false
melmothx/jsonbot
jsb/plugs/wave/gadget.py
1
4625
# jsb.plugs.wave/gadget.py # # ## jsb imports from jsb.lib.commands import cmnds from jsb.lib.examples import examples from jsb.lib.persist import PlugPersist gadgeturls = PlugPersist('gadgeturls') gadgeturls.data['gadget'] = 'https://jsonbot.appspot.com/gadget.xml' gadgeturls.data['poll'] = 'https://jsonbot.appspo...
mit
9,067,515,519,668,668,000
28.647436
111
0.644108
false
mellowizz/ocny_tax_info
qgis_show_ocny_tax_info.py
1
1143
from qgis.core import * from qgis.gui import * import mechanize import cookielib @qgsfunction(args='auto', group='Custom') def show_tax_info(pin, feature, parent): br = mechanize.Browser() # Cookie Jar cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) br.set_handle_equiv(True) br.set_handle...
gpl-3.0
-1,176,792,807,719,864,800
26.214286
79
0.64392
false
AlexWoo/pyed
pysys/pycmdserver.py
1
1693
from pyevent.event import event from pyevent.tcpserver import tcpserver from pyevent.tcpconnection import tcpconnection class cmdserver(tcpserver): def __init__(self, pesys): self.evs = pesys.evs self.tms = pesys.tms self.log = pesys.log self.proc = pesys.proc self.proc.set...
bsd-2-clause
-195,326,906,366,246,620
32.196078
94
0.594802
false
ecreall/dace
dace/processinstance/tests/test_signal.py
1
7346
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import transaction from pyramid.threadlocal import get_current_registry from dace.interfaces import IProcessDefinition import dace.processinstance.tests.example.process...
agpl-3.0
-2,470,153,901,930,591,000
37.062176
87
0.545467
false
NCI-Cloud/cloud-tools
check-defunct-instances.py
1
1214
#!/usr/bin/env python # # Take a list of instance UUIDs and check their status. If the last activity # recorded for them is more than six months ago mark them as defunct. from util import get_nova_client, get_keystone_client from util import get_instance, is_instance_to_be_expired from util import output_report from u...
gpl-3.0
3,662,251,379,629,455,400
27.904762
77
0.584843
false
Azure/azure-sdk-for-python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/operations/_usages_operations.py
1
5335
# 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
263,078,380,412,774,980
44.211864
146
0.635614
false
maeltac/hazanet
sense.py
1
1881
import pdb """ Each sensor that uses this will follow these rules: calling sensor.startup() function will initialize and calibrate the sensor. It will return 'Green' on success, 'Red' on failure calling sensor.read() will return a float for that tick calling sensor.reset() will attempt to reset the sensor, returning 0...
apache-2.0
-8,357,207,316,017,917,000
16.416667
127
0.5832
false
cubledesarrollo/cubledotes
cuble/suit/config.py
1
2073
from django.contrib.admin import ModelAdmin from django.conf import settings from . import VERSION def default_config(): return { 'VERSION': VERSION, # configurable 'ADMIN_NAME': 'Django Suit', 'HEADER_DATE_FORMAT': 'l, jS F Y', 'HEADER_TIME_FORMAT': 'H:i', # form...
mit
6,604,521,707,563,215,000
26.64
94
0.585142
false