repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
j2ali/FlightScraper | Scraper.py | 1 | 1950 | from bs4 import BeautifulSoup
import helper
from datetime import datetime
import click
import time
import calendar
#Example values
#START_DATE = datetime(2014, 05, 15)
#END_DATE = datetime(2015, 05, 15)
#DAY_DELTA = 7
#TIMEOUT_SECONDS = 30
#Example Command
#python Scraper.py 2014/05/25 2015/05/15 4 0 YYZ POS
@click.... | bsd-3-clause | -3,644,755,502,807,923,000 | 31.516667 | 97 | 0.625128 | false | 3.597786 | false | false | false |
sagarjauhari/BCIpy | process_series_files.py | 1 | 3765 | # /usr/bin/env python
# Copyright 2013, 2014 Justis Grant Peters and Sagar Jauhari
# This file is part of BCIpy.
#
# BCIpy 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
... | gpl-3.0 | 3,405,553,341,204,929,000 | 40.833333 | 108 | 0.655511 | false | 3.388839 | false | false | false |
IngoBongo/rpg_texual_Rumbo_a | Rumbo_A_V0.0.1/rumbo.py | 1 | 1682 | # -*- coding: utf-8 -*-
# sintaxis for Python 2.7
from random import randint
import jugador
from jugador import Jugador
from criaturas import Enemigo
comand = jugador.Comandos
def main():
jug = Jugador()
jug.nombre = raw_input("¿Cual es tu nombre viager@? : ")
print "escribe: 'ayuda' para ver una list... | gpl-3.0 | 850,313,411,132,253,200 | 28.491228 | 120 | 0.650803 | false | 3.389113 | false | false | false |
johnmgregoire/NanoCalorimetry | accalinitcode_Sn1.py | 1 | 2899 | import numpy, h5py, pylab
from PnSC_h5io import *
from matplotlib.ticker import FuncFormatter
def myexpformat(x, pos):
for ndigs in range(5):
lab=(('%.'+'%d' %ndigs+'e') %x).replace('e+0','e').replace('e+','e').replace('e0','').replace('e-0','e-')
if eval(lab)==x:
return lab
return... | bsd-3-clause | -1,861,564,002,955,912,200 | 34.353659 | 259 | 0.673681 | false | 2.540754 | false | false | false |
nicko7i/vcnc | api-python/velstor/vclc/__main__.py | 1 | 3489 | #!python3.5
# For command aliases prior to 3.2 - https://bugs.python.org/issue25299
#
# https://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/
from __future__ import print_function
import sys
import re
import json
import requests
import errno
from velstor.restapi import Session
from functools im... | apache-2.0 | -6,190,060,355,032,620,000 | 33.205882 | 78 | 0.524792 | false | 4.302096 | false | false | false |
FernanOrtega/DAT210x | Module6/assignment1.py | 1 | 5367 | import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import time
#
# INFO: Your Parameters.
# You can adjust them after completing the lab
C = 1
kernel = 'linear'
gamma = 'auto'
iterations = 5000 # TODO: Change to 200000 once you get to Question#2
#
# INFO: You can set... | mit | -277,696,860,954,413,630 | 26.106061 | 119 | 0.646916 | false | 3.035633 | true | false | false |
juliancantillo/royal-films | royalfilms/cinemas/migrations/0003_auto_20160305_0344.py | 1 | 1291 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-03-05 03:44
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('cinemas', '0002_auto_20160303_0631'),
]
... | mit | 6,041,118,326,002,203,000 | 32.102564 | 114 | 0.565453 | false | 4.164516 | false | false | false |
christophercrouzet/hienoi | demos/orbit.py | 1 | 3478 | #!/usr/bin/env python
"""Particles orbiting around the origin.
Features:
- user attributes: particles are initialized within a radius from the
origin and are, at each simulation step, updated to orbit around the origin.
- NumPy: operations are done directly on the particle data for increased
performances.
"""
i... | mit | -1,000,051,599,808,256,300 | 28.726496 | 78 | 0.625359 | false | 3.567179 | false | false | false |
Ratfink/asciiplayback | src/asciiplaybackgtk.py | 1 | 2940 | #!/usr/bin/env python
import os.path
import sys
from gi.repository import Gtk, Gio, Gdk, GObject
from asciiplayback import *
from asciimation import *
from gtkasciiplayer import *
class ASCIIPlaybackGtk(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="ASCIIPlayback")
self.set_def... | mit | -1,430,004,682,715,594,200 | 30.956522 | 82 | 0.608163 | false | 3.611794 | false | false | false |
iworm/taobao-image-splitter | taobao-image-splitter.py | 1 | 7554 | #!/usr/bin/python3
# coding=utf-8
"""
The MIT License (MIT)
Copyright (c) 2015 iworm roger@iworm.net
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 with... | mit | -2,058,913,852,656,968,000 | 29.344398 | 89 | 0.595181 | false | 3.642237 | false | false | false |
nemesiscodex/JukyOS-sugar | extensions/cpsection/power/view.py | 1 | 4563 | # Copyright (C) 2008, OLPC
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope... | gpl-2.0 | 4,088,517,647,482,016,300 | 36.401639 | 78 | 0.636862 | false | 3.834454 | false | false | false |
ESOedX/edx-platform | lms/djangoapps/discussion/django_comment_client/base/tests.py | 1 | 90626 | # pylint: skip-file
# -*- coding: utf-8 -*-
"""Tests for django comment client views."""
from __future__ import absolute_import
import json
import logging
from contextlib import contextmanager
import ddt
import mock
import six
from django.contrib.auth.models import User
from django.core.management import call_command... | agpl-3.0 | 6,711,102,984,654,132,000 | 38.870216 | 148 | 0.599713 | false | 3.932523 | true | false | false |
agdsn/pycroft | pycroft/model/address.py | 1 | 3378 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from typing import List
from sqlalchemy import Column, String, UniqueConstraint
from p... | apache-2.0 | -3,732,029,067,401,948,700 | 41.759494 | 106 | 0.68206 | false | 3.923345 | false | false | false |
Kruehlio/MUSEspec | utils/starlight.py | 1 | 15375 | # -*- coding: utf-8 -*-
""" Spectrum class for running starlight on spectra. Particularly for
MUSE cubes
"""
import matplotlib
matplotlib.use('Agg')
import os
import numpy as np
import scipy as sp
import shutil
import time
import platform
import matplotlib.pyplot as plt
import logging
from ..MUSEio.museio impor... | mit | 2,258,833,824,051,038,000 | 36.317961 | 101 | 0.499382 | false | 3.252591 | true | false | false |
asm-products/sim | sim/settings.py | 1 | 3046 | """
Django settings for sim project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import... | bsd-2-clause | 1,686,597,243,547,752,400 | 25.034188 | 73 | 0.69107 | false | 3.216473 | false | false | false |
vaal-/il2_stats | src/stats/online.py | 1 | 2169 | from copy import deepcopy
import logging
from mission_report import parse_mission_log_line
from mission_report.constants import COUNTRIES_COALITION_DEFAULT, COALITION_ALIAS
from stats.models import PlayerOnline, Profile
logger = logging.getLogger('online')
_countries = deepcopy(COUNTRIES_COALITION_DEFAU... | mit | -3,861,800,965,770,720,000 | 38.45283 | 97 | 0.506996 | false | 4.561702 | false | false | false |
Samsung/ADBI | idk/cachereader/debuginfo.py | 1 | 7463 | import sqlite3
import os.path
from .cfa import CallFrameAddress
from .files import Files
from .framepointers import Framepointers
from .function import Functions
from .insnset import InsnSet
from .lines import Lines
from .location import Locations
from .types import Types
from .variables import Variables
from .symbols... | apache-2.0 | -4,911,396,537,872,181,000 | 32.022124 | 147 | 0.554201 | false | 4.114112 | false | false | false |
knowledgecommonsdc/kcdc3 | kcdc3/apps/pinata/migrations/0008_auto__add_field_page_template__chg_field_page_status.py | 1 | 5497 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Page.template'
db.add_column('pinata_page', 'template',
self.gf('djang... | mit | 2,237,524,497,699,989,200 | 62.930233 | 136 | 0.541022 | false | 3.609324 | false | false | false |
ni/nifpga-python | nifpga/status.py | 1 | 14615 | """
An set of status exception classes to be used when an NiFpga
function returns either a warning or error status.
Use check_status() to raise an appropriate exception if necessary.
Error and Warning exception class names are auto-generated from the
strings in 'codeToString' in this file.
For example, handle a fatal... | mit | 8,977,066,302,177,029,000 | 36.474359 | 94 | 0.584536 | false | 4.137882 | false | false | false |
chienlieu2017/it_management | odoo/addons/l10n_multilang/models/account.py | 1 | 1875 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
#in this file, we mostly add the tag translate=True on existing fields that we now want to be translated
class AccountAccountTag(models.Model):
_inherit = 'account.account.tag'
... | gpl-3.0 | 3,139,817,623,212,854,300 | 26.173913 | 327 | 0.7344 | false | 3.914405 | false | false | false |
google-research/google-research | goemotions/inspect_output_layer_weights.py | 1 | 2106 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -7,049,970,231,258,936,000 | 31.4 | 74 | 0.740266 | false | 3.871324 | false | false | false |
djhshih/genomic | utils/genompy/genompy/randomize.py | 1 | 1657 | #!/usr/bin/env python3
import random
from . import cn
from . import gp
def overlap_genes_in_regions(regions, geneDb, geneSets, overlaps, genes=None):
'''Track overlap of genes in regions with genes in each gene set, in place'''
# genes and overlaps will be modified in place
# store all genes from all regions
if... | gpl-3.0 | -5,363,245,007,392,990,000 | 25.301587 | 78 | 0.715751 | false | 3.16826 | false | false | false |
arshbot/Slack-Analytics | scripts/help.py | 1 | 1231 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# help script that details the list of commands
def help(response):
text = "PantherBot works by prefacing commands with \"!\"\n"
text += "Commands:\n"
text += "```!help\n"
text += "!coin\n"
text += "!helloworld\n"
text += "!version\n"
text += "... | mpl-2.0 | 8,409,772,346,828,189,000 | 40.033333 | 176 | 0.594639 | false | 3.054591 | false | false | false |
Ameriks/velo.lv | velo/team/views.py | 1 | 20504 | from django.contrib import messages
from django.http import Http404, HttpResponseRedirect
from django.utils import timezone
from django.views.generic import ListView, DetailView
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from difflib import get_close_matches
fr... | gpl-3.0 | -7,865,938,040,519,920,000 | 43.573913 | 185 | 0.615587 | false | 4.191333 | false | false | false |
scikit-optimize/scikit-optimize | skopt/tests/test_parallel_cl.py | 1 | 5399 | """This script contains set of functions that test parallel optimization with
skopt, where constant liar parallelization strategy is used.
"""
from numpy.testing import assert_equal
from numpy.testing import assert_raises
from skopt.space import Real
from skopt import Optimizer
from skopt.benchmarks import branin
im... | bsd-3-clause | -7,413,750,497,891,699,000 | 31.920732 | 79 | 0.665308 | false | 3.687842 | true | false | false |
cmallwitz/Sunflower | application/plugins/file_list/trash_list.py | 1 | 1931 | from gi.repository import Gtk
from file_list import FileList
from gio_provider import TrashProvider
from operation import DeleteOperation
class TrashList(FileList):
"""Trash file list plugin
Generic operations related to trash management are provided with this
class. By extending FileList standard features such ... | gpl-3.0 | -785,780,227,369,612,700 | 26.985507 | 84 | 0.68928 | false | 3.423759 | false | false | false |
avelino/bottle-auth | bottle_auth/core/auth.py | 1 | 54118 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 a... | mit | -3,886,845,082,925,986,300 | 39.751506 | 109 | 0.595717 | false | 4.298149 | false | false | false |
renebentes/JoomlaPack | lib/extensions/plugin.py | 1 | 2214 | # coding: utf-8
import sublime
import os
import re
st_version = int(sublime.version())
if st_version > 3000:
from JoomlaPack.lib import *
from JoomlaPack.lib.extensions.base import Base
from JoomlaPack.lib.inflector import *
else:
from lib import *
from lib.extensions.base import Base
from lib.... | mit | -5,881,219,763,017,948,000 | 33.061538 | 79 | 0.484192 | false | 4.555556 | false | false | false |
HenriquePaulo/projeto | backend/test/editar_produto_tests/editar_produto_new_tests.py | 1 | 1576 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from base import GAETestCase
from datetime import datetime, date
from decimal import Decimal
from editar_produto_app.editar_produto_model import Editar_produto
from routes.editar_produtos.new import index, save
from tekton.gae.middleware.r... | mit | 3,332,256,648,107,032,600 | 45.352941 | 152 | 0.719543 | false | 3.589977 | true | false | false |
freeman-lab/dask | dask/array/random.py | 1 | 11940 | from __future__ import absolute_import, division, print_function
import numpy as np
from itertools import product
from .core import normalize_chunks, Array, names
def doc_wraps(func):
""" Copy docstring from one function to another """
def _(func2):
func2.__doc__ = func.__doc__.replace('>>>', '>>').re... | bsd-3-clause | 7,957,553,145,970,565,000 | 37.146965 | 79 | 0.63258 | false | 3.597469 | false | false | false |
nlgcoin/guldencoin-official | test/functional/mempool_spend_coinbase.py | 2 | 2317 | #!/usr/bin/env python3
# Copyright (c) 2014-2018 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 spending coinbase transactions.
The coinbase transaction in block N can appear in block
N+100... ... | mit | -8,024,148,556,039,803,000 | 40.375 | 124 | 0.694001 | false | 3.484211 | true | false | false |
Tomasuh/Tomasuh.github.io | files/cyclic/dbcommands.py | 1 | 1472 | import sqlite3
import os.path
import datetime
class the_db:
def __init__(self):
exists = os.path.exists('./cyclic.db')
self.conn = sqlite3.connect('cyclic.db')
self.c = self.conn.cursor()
if exists:
return
# If it's a new instance of the db we need to generate the layout
sql = '''CREATE TABLE posts... | mit | -3,592,289,148,472,909,300 | 18.626667 | 95 | 0.605978 | false | 2.869396 | false | false | false |
cloudmesh/book | cloud-clusters/bin/todo.py | 1 | 1641 | #!/usr/bin/env python
from __future__ import print_function
import sys
import os
import fnmatch
import glob
from pprint import pprint
def recursive_glob(rootdir='.', pattern='*.md'):
"""Search recursively for files matching a specified pattern.
Adapted from http://stackoverflow.com/questions/2186525/use-a-glob-to-... | apache-2.0 | -738,105,093,781,443,800 | 24.246154 | 138 | 0.582572 | false | 3.567391 | false | false | false |
raiden-network/raiden | tools/pip-compile-wrapper.py | 1 | 13013 | #!/usr/bin/env python
"""
Helper utility to compile / upgrade requirements files from templates.
This only manages dependencies between requirements sources.
The actual compiling is delegated to ``pip-compile`` from the ``pip-tools` package.
NOTE: This utility *must only* use stdlib imports in order to be runnable ev... | mit | 8,479,760,281,170,723,000 | 35.656338 | 99 | 0.621763 | false | 3.996622 | false | false | false |
Netflix-Skunkworks/swag-client | swag_client/cli.py | 1 | 11229 | import logging
import os
import time
import simplejson as json
import boto3
import click
import click_log
from tabulate import tabulate
from swag_client.backend import SWAGManager
from swag_client.__about__ import __version__
from swag_client.migrations import run_migration
from swag_client.util import parse_swag_con... | apache-2.0 | -4,546,113,567,798,324,700 | 29.680328 | 139 | 0.596669 | false | 3.612934 | false | false | false |
Atothendrew/SpartanTokenService | SpartanTokenService.py | 1 | 3313 | #!/usr/bin/python
import re
import json
import random
import urllib
import requests
from requests import Request, Session
from requests.cookies import RequestsCookieJar
MS_LOGIN = "https://logSpartanTokenService.pyin.live.com/login.srf?id=2"
WAYPOINT_GATEWAY = "https://www.halowaypoint.com/oauth/signin?returnUrl=htt... | mit | 1,194,989,679,917,223,700 | 53.327869 | 294 | 0.735587 | false | 2.9713 | false | false | false |
sacharya/nova | nova/tests/api/openstack/compute/plugins/v3/test_user_data.py | 1 | 9909 | # Copyright 2012 OpenStack Foundation
# Copyright 2013 IBM Corp.
# 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/LIC... | apache-2.0 | -7,509,084,529,474,616,000 | 36.392453 | 78 | 0.58795 | false | 3.827346 | true | false | false |
mvanveen/catcher | catcher.py | 1 | 1373 | import traceback
TRACE_STACK = []
class Trace(object):
def __init__(self, exception, stack=None):
if not isinstance(exception, Exception):
raise ValueError("Expected an Exception object as first argument")
if not stack:
stack = traceback.extract_stack()
# pop off current frame and initia... | mit | -2,296,891,424,965,171,500 | 21.508197 | 71 | 0.576839 | false | 3.956772 | false | false | false |
horacioMartinez/dakara-client | tools/protocol_generator/generator/gendefs_js.py | 1 | 7898 |
class Packet:
def __init__(self, name, args):
self.name = name
self.args = args
def get_header_fmt(self):
return """
function {name} (buffer) {{
this.id = {base_name}ID.{name} /* {packet_id} */;
if (buffer){{
buffer.ReadByte(); /* PacketID */
{ctor_fields_... | mit | -5,359,951,213,729,725,000 | 24.726384 | 144 | 0.530767 | false | 3.221044 | false | false | false |
Jeff-Tian/mybnb | Python27/Lib/test/test_hmac.py | 2 | 17810 | # coding: utf-8
import hmac
import hashlib
import unittest
import warnings
from test import test_support
class TestVectorsTestCase(unittest.TestCase):
def test_md5_vectors(self):
# Test the HMAC module against test vectors from the RFC.
def md5test(key, data, digest):
h... | apache-2.0 | 178,129,449,049,034,270 | 39.607477 | 79 | 0.537287 | false | 3.455851 | true | false | false |
DummyDivision/Tsune | cardimporter/importer.py | 1 | 2077 | from django.db import transaction
from guardian.shortcuts import assign_perm
from sourcereader import AnkiCardSourceReader
from ankiconverter import ankiTupeToTsuneDict
from cardbox.card_model import Card, Deck
class AnkiImporter():
@transaction.commit_on_success
def importCollection(self,pathToApkg,user):
... | mit | -4,638,345,130,590,870,000 | 36.763636 | 94 | 0.676938 | false | 3.467446 | false | false | false |
philanthropy-u/edx-platform | openedx/features/job_board/migrations/0001_initial.py | 1 | 2109 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2020-03-31 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
import django_countries.fields
import model_utils.fields
class Migration(migrations.Migration):
initial = True
dependencies... | agpl-3.0 | -7,991,687,555,766,982,000 | 48.046512 | 159 | 0.599336 | false | 3.964286 | false | false | false |
simonmonk/prog_pi_ed2 | 07_05_kitchen_sink.py | 1 | 1654 | #07_05_kitchen_sink.py
from tkinter import *
class App:
def __init__(self, master):
frame = Frame(master)
frame.pack()
Label(frame, text='Label').grid(row=0, column=0)
Entry(frame, text='Entry').grid(row=0, column=1)
Button(frame, text='Button').grid(row=0, column=2)
... | mit | 872,859,228,343,858,000 | 34.956522 | 101 | 0.577993 | false | 3.341414 | false | false | false |
matheuskiser/pdx_code_guild | django/pointme/points/views.py | 1 | 4113 | from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from django.http import HttpResponse
from django.db.models import Q
import json
from points.models import Place
from points.forms import PlaceForm
from ... | mit | -8,677,430,849,673,660,000 | 31.912 | 112 | 0.605398 | false | 3.970077 | false | false | false |
amonmoce/corba_examples | omniORBpy-4.2.1/build/python/COS/CosNotifyComm_idl.py | 1 | 37450 | # Python stubs generated by omniidl from /usr/local/share/idl/omniORB/COS/CosNotifyComm.idl
# DO NOT EDIT THIS FILE!
import omniORB, _omnipy
from omniORB import CORBA, PortableServer
_0_CORBA = CORBA
_omnipy.checkVersion(4,2, __file__, 1)
try:
property
except NameError:
def property(*args):
return N... | mit | -5,131,353,625,835,709,000 | 48.933333 | 326 | 0.786195 | false | 3.305384 | false | false | false |
cipri-tom/Swiss-on-Amazon | spark/brand_search.py | 1 | 1692 | #! /bin/python
from pyspark import SparkContext, SparkConf
import json
from pprint import pprint
import pickle
import re
#config path
brands_path = "../data/wiki_brands.txt"
brands_path2 = "../data/all_swiss_brands.pickle"
metadata_path = "hdfs:///datasets/amazon-reviews/metadata.json"
# load the list of brands
bra... | gpl-3.0 | -4,317,103,139,602,162,700 | 22.191781 | 70 | 0.670804 | false | 2.968421 | false | false | false |
tskisner/pytoast | src/python/tests/dist.py | 1 | 5208 | # Copyright (c) 2015-2018 by the parties listed in the AUTHORS file.
# All rights reserved. Use of this source code is governed by
# a BSD-style license that can be found in the LICENSE file.
from ..mpi import MPI
from .mpi import MPITestCase
from ..dist import *
import numpy as np
import sys
import os
from ._hel... | bsd-2-clause | 3,222,813,290,255,280,000 | 27.773481 | 88 | 0.49424 | false | 3.516543 | true | false | false |
MrSnede/BalancingWheelRobot | mainWindow.py | 1 | 19684 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/mainWindow.ui'
#
# Created: Sat Nov 29 18:47:56 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except ... | gpl-2.0 | 4,252,222,543,709,044,000 | 61.888179 | 139 | 0.723024 | false | 3.723094 | false | false | false |
Krissbro/LondonGaymers | serverquotes/serverquotes.py | 1 | 7819 | import discord
from discord.ext import commands
from cogs.utils.dataIO import dataIO
from .utils import checks
from .utils.chat_formatting import escape_mass_mentions, pagify
import os
from random import choice as randchoice
try:
from tabulate import tabulate
except Exception as e:
raise RuntimeError("You mus... | gpl-3.0 | 7,994,293,379,458,089,000 | 35.490654 | 101 | 0.577667 | false | 3.774287 | false | false | false |
stormi/tsunami | src/secondaires/crafting/rang.py | 1 | 5518 | # -*-coding:Utf-8 -*
# Copyright (c) 2015 LE GOFF Vincent
# 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
# lis... | bsd-3-clause | -3,393,670,967,765,601,300 | 33.71519 | 79 | 0.643209 | false | 3.630046 | false | false | false |
hastexo/edx-platform | openedx/core/djangoapps/content/course_overviews/models.py | 1 | 35401 | """
Declaration of CourseOverview model
"""
import json
import logging
from urlparse import urlparse, urlunparse
from django.conf import settings
from django.db import models, transaction
from django.db.models.fields import BooleanField, DateTimeField, DecimalField, TextField, FloatField, IntegerField
from django.db.u... | agpl-3.0 | 2,396,641,003,756,264,000 | 40.211874 | 114 | 0.651225 | false | 4.524668 | true | false | false |
Oire/TWBlue | src/twitter/twitter.py | 1 | 3261 | # -*- coding: utf-8 -*-
import BaseHTTPServer
import webbrowser
from urlparse import urlparse, parse_qs
from twython import Twython, TwythonError
import config
import application
import output
import sound
import time
logged = False
verifier = None
class handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET... | gpl-2.0 | 5,429,948,604,041,343,000 | 36.930233 | 145 | 0.687213 | false | 3.552288 | true | false | false |
PokeAPI/pokeapi | pokemon_v2/migrations/0009_pokemontypepast.py | 1 | 1924 | # Generated by Django 2.1.11 on 2021-02-06 22:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("pokemon_v2", "0008_auto_20201123_2045"),
]
operations = [
migrations.CreateModel(
name="Pokemo... | bsd-3-clause | 8,417,753,935,987,722,000 | 30.032258 | 68 | 0.366424 | false | 5.692308 | false | false | false |
oferb/OpenTrains | webserver/opentrain/algorithm/utils.py | 1 | 1361 | import os
import gtfs.models
import analysis.models
import numpy as np
from scipy import spatial
import shelve
try:
import matplotlib.pyplot as plt
except ImportError:
pass
import simplekml
import config
import itertools
import datetime
def enum(**enums):
return type('Enum', (), enums)
def get_XY_pos(rela... | bsd-3-clause | 4,164,793,536,097,898,500 | 29.266667 | 120 | 0.703894 | false | 3.394015 | false | false | false |
robotpy/pyfrc | pyfrc/physics/motor_cfgs.py | 1 | 3366 | from collections import namedtuple
MotorModelConfig = namedtuple(
"MotorModelConfig",
[
"name",
"nominalVoltage",
"freeSpeed",
"freeCurrent",
"stallTorque",
"stallCurrent",
],
)
MotorModelConfig.__doc__ = """
Configuration parameters useful for simulating... | mit | 3,968,190,741,376,040,400 | 23.042857 | 81 | 0.643494 | false | 2.842905 | true | false | false |
MERegistro/meregistro | meregistro/apps/titulos/models/NormativaNacional.py | 1 | 1738 | # -*- coding: utf-8 -*-
from django.db import models
from apps.titulos.models.EstadoNormativaNacional import EstadoNormativaNacional
import datetime
class NormativaNacional(models.Model):
numero = models.CharField(max_length=50, unique=True)
descripcion = models.CharField(max_length=255)
observaciones = models.Char... | bsd-3-clause | 6,765,823,261,245,573,000 | 33 | 112 | 0.767589 | false | 2.627273 | false | false | false |
mahajrod/MACE | scripts/old/FS_distribution.py | 1 | 1645 | #!/usr/bin/env python
__author__ = 'Sergei F. Kliver'
import os, sys
import argparse
import numpy as np
from MACE.General.File import split_filename, make_list_of_path_to_files
from MACE.Parsers.VCF import CollectionVCF
def vcf_filter(filename):
return True if filename[-4:] == ".vcf" else False
def is_homozyg... | apache-2.0 | 6,022,405,341,987,015,000 | 32.571429 | 113 | 0.657143 | false | 3.485169 | false | false | false |
PeachyPrinter/peachyinstaller | windows/src/application.py | 1 | 3502 | import json
class Application(object):
def __init__(self,
id,
name,
available_version=None,
download_location=None,
relitive_install_path=None,
executable_path=None,
installed_path=None,
... | apache-2.0 | -4,559,871,324,107,743,000 | 37.911111 | 160 | 0.566248 | false | 4.512887 | true | false | false |
andrucuna/python | interactivepython-coursera/interactivepython/week0/Variables.py | 1 | 1333 | __author__ = 'andrucuna'
# variables - placeholders for important values
# used to avoid recomputing values and to
# give values names that help reader understand code
# valid variable names - consists of letters, numbers, underscore (_)
# starts with letter or underscore
# case sensitive (capitalization matters)
#... | gpl-2.0 | -2,776,057,309,682,962,400 | 16.773333 | 69 | 0.705926 | false | 2.83617 | false | false | false |
vivek8943/soft-boiled | src/algorithms/slp.py | 1 | 13262 | import numpy as np
import itertools
from collections import namedtuple, defaultdict
import math
from math import floor, ceil, radians, sin, cos, asin, sqrt, pi
import pandas as pd
from src.utils.geo import bb_center, GeoCoord, haversine
LocEstimate = namedtuple('LocEstimate', ['geo_coord', 'dispersion', 'dispersion_st... | apache-2.0 | 4,146,304,402,109,052,000 | 43.804054 | 133 | 0.653748 | false | 3.80436 | false | false | false |
thammegowda/incubator-joshua | scripts/support/query_http.py | 3 | 2476 | #!/bin/env python
#
# 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... | apache-2.0 | -7,411,478,688,813,369,000 | 37.6875 | 114 | 0.712439 | false | 3.862715 | false | false | false |
wanderer2/pymc3 | pymc3/examples/arma_example.py | 1 | 2135 | from pymc3 import Normal, sample, Model, plots, Potential, variational, HalfCauchy
from theano import scan, shared
import numpy as np
"""
ARMA example
It is interesting to note just how much more compact this is that the original STAN example
The original implementation is in the STAN documentation by Gelman et al an... | apache-2.0 | 4,759,934,765,427,243,000 | 23.261364 | 96 | 0.578923 | false | 3.05 | false | false | false |
mheap/ansible | lib/ansible/plugins/connection/winrm.py | 1 | 30176 | # (c) 2014, Chris Church <chris@ninemoreminutes.com>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
author: Ansible Core Te... | gpl-3.0 | 3,836,380,334,355,508,000 | 42.733333 | 156 | 0.57728 | false | 4.070687 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201808/user_service/get_all_users.py | 1 | 1759 | #!/usr/bin/env python
#
# Copyright 2016 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 requir... | apache-2.0 | 8,587,936,234,622,361,000 | 34.897959 | 78 | 0.693576 | false | 4.178147 | false | false | false |
dailab/roomba-python | demo.py | 1 | 3196 | import create
import time
import io
import os
import sys
import argparse
# define silence
r = 30
# map note names in the lilypad notation to irobot commands
c4 = 60
cis4 = des4 = 61
d4 = 62
dis4 = ees4 = 63
e4 = 64
f4 = 65
fis4 = ges4 = 66
g4 = 67
gis4 = aes4 = 68
a4 = 69
ais4 = bes4 = 70
b4 = 71
c5 = 72
cis5 = des5 ... | artistic-2.0 | 8,155,639,683,856,493,000 | 23.030075 | 95 | 0.556008 | false | 3.108949 | false | false | false |
sedruk/Red-DiscordBot | cogs/russianroulette.py | 1 | 14234 | # Roulette.py was created by Redjumpman for Redbot
# This will create a rrgame.JSON file and a data folder
import os
import random
import asyncio
from time import gmtime, strftime
from discord.ext import commands
from .utils.dataIO import dataIO
from .utils import checks
from __main__ import send_cmd_help
... | gpl-3.0 | -5,136,934,830,560,906,000 | 47.252595 | 100 | 0.523535 | false | 4.076174 | false | false | false |
dirk-thomas/vcstool | vcstool/commands/import_.py | 1 | 8799 | import argparse
import os
from shutil import which
import sys
import urllib.request as request
from vcstool import __version__ as vcstool_version
from vcstool.clients import vcstool_clients
from vcstool.clients.vcs_base import run_command
from vcstool.executor import ansi
from vcstool.executor import execute_jobs
from... | apache-2.0 | 6,492,176,253,853,990,000 | 32.712644 | 79 | 0.575406 | false | 4.240482 | false | false | false |
danielballan/docs | source/_cookbook/csv_writer.py | 1 | 3011 | # -*- coding: utf-8 -*-
"""
========================================
A Minimal CSV writer for data collection
========================================
Problem
-------
Write (a subset of) the data to a CSV file during data collection.
Approach
--------
Write a callback function that integrates Python's built-in csv ... | bsd-2-clause | 6,292,943,657,254,038,000 | 24.091667 | 79 | 0.524078 | false | 4.05249 | false | false | false |
ajaniv/django-core-models | django_core_models/locations/tests/test_validation.py | 1 | 5553 | """
.. module:: django_core_models.location.tests.test_validation
:synopsis: location application validation unit test module.
*location* application validation unit test module.
"""
from __future__ import print_function
from django.core.exceptions import ValidationError
from django_core_utils.tests.test_utils i... | mit | -865,493,100,001,814,000 | 36.02 | 77 | 0.660004 | false | 4.015184 | true | false | false |
nitely/Spirit | spirit/core/utils/decorators.py | 1 | 1458 | # -*- coding: utf-8 -*-
from functools import wraps
from django.core.exceptions import PermissionDenied
from django.contrib.auth.views import redirect_to_login
from django.shortcuts import redirect
from spirit.core.conf import settings
def moderator_required(view_func):
@wraps(view_func)
def wrapper(reques... | mit | 2,144,196,783,148,449,000 | 25.509091 | 88 | 0.631001 | false | 4.05 | false | false | false |
roryyorke/python-control | control/margins.py | 1 | 13996 | """margins.py
Functions for computing stability margins and related functions.
Routines in this module:
margins.stability_margins
margins.phase_crossover_frequencies
margins.margin
"""
# Python 3 compatibility (needs to go here)
from __future__ import print_function
"""Copyright (c) 2011 by California Institute of... | bsd-3-clause | 1,176,016,653,817,876,700 | 37.032609 | 80 | 0.61539 | false | 3.556798 | true | false | false |
wrenoud/blueberry-bush | RepositoryState.py | 1 | 1808 | import os
from FileState import FileStateLocal
class Remote(object):
def __init__(self): pass
def create(self): pass
def update(self): pass
def modified(self): pass
def delete(self): pass
class RepositoryState(object):
"""Manages the sync information, this includes the local root, ingnor... | gpl-2.0 | -8,155,816,514,990,178,000 | 30.719298 | 101 | 0.601217 | false | 3.637827 | false | false | false |
texnokrates/electroballz | electroballz/single_coeff.py | 1 | 1461 | from scipy import *
from scipy.special import sph_jn, sph_yn
# The following is an entirely computationally inefficient draft, intended for basic orientation.
def jl(l,z):
"""Wrapper for sph_jn (discards the unnecessary data)"""
return sph_jn(n, z)[0][l]
def yl(l,z):
"""Wrapper for sph_yn (discards the u... | gpl-3.0 | -3,926,437,970,418,607,000 | 30.76087 | 97 | 0.577002 | false | 1.987755 | false | false | false |
firebitsbr/termineter | framework/modules/dump_tables.py | 1 | 3439 | # framework/modules/dump_tables.py
#
# Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net>
#
# 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 Li... | gpl-3.0 | 2,490,079,865,939,088,000 | 45.472973 | 259 | 0.719104 | false | 3.361681 | false | false | false |
skeezix/compo4all | spaghetti-server/singlescore_handler.py | 1 | 12920 |
# update_hi - receive binary and i) parse it, ii) update json tally as needed, iii) store .hi file for later
# get_hi -- fetch a bin for the emu
# get_json_tally - dump highscore table as json (for fancy frontend to display, say)
# get_html_tally - dump highscore in vaguely readable html table (for web browser quickie... | gpl-2.0 | 5,346,319,761,198,488,000 | 33.453333 | 223 | 0.516254 | false | 3.379545 | false | false | false |
wpjesus/codematch | ietf/submit/models.py | 1 | 3263 | import re
import datetime
from django.db import models
from ietf.doc.models import Document
from ietf.person.models import Person
from ietf.group.models import Group
from ietf.name.models import DraftSubmissionStateName
from ietf.utils.accesstoken import generate_random_key, generate_access_token
def parse_email_li... | bsd-3-clause | 8,802,075,955,322,732,000 | 35.662921 | 153 | 0.680968 | false | 3.519957 | false | false | false |
esben/setuptools_scm | setuptools_scm/version.py | 1 | 4137 | from __future__ import print_function
import datetime
import re
from .utils import trace
from pkg_resources import iter_entry_points
from distutils import log
try:
from pkg_resources import parse_version, SetuptoolsVersion
except ImportError as e:
parse_version = SetuptoolsVersion = None
def _warn_if_setup... | mit | 6,615,941,135,986,023,000 | 29.19708 | 77 | 0.639594 | false | 3.723672 | false | false | false |
firtek/flap.py | flap.py | 1 | 4358 | #!/usr/bin/env python3
from copy import copy
import pyglet
from pyglet import gl
import settings
from sprites import Bird, Background, Floor, Pipe
from utils import get_sprite, check_collision
def main(callback=None):
#global score set to -1 because on first pipe score is increased
global score
score = ... | bsd-2-clause | 8,000,193,271,814,344,000 | 24.786982 | 124 | 0.539468 | false | 3.969035 | false | false | false |
mauriceling/dose | dose/copads/statisticsdistribution.py | 1 | 134396 | """
Classes for Various Statistical Distributions.
References:
- Regress+ A compendium of common probability distributions (version 2.3)
by Michael P. McLaughlin (mpmcl@mitre.org)
http://www.causascientia.org/math_stat/Dists/Compendium.pdf
- Hand-book on statistical distributions for experimenta... | gpl-3.0 | 288,445,279,155,761,150 | 35.911425 | 83 | 0.581699 | false | 4.145849 | false | false | false |
janusnic/21v-pyqt | unit_02/con3.py | 1 | 1328 | ##!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Code PyQt4
In this example, we create a simple
window in PyQt4.
"""
from PyQt4 import QtCore, QtGui
class MyWindow(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.button1 = QtGui.QPushButton(u"Кнопка 1. Нажм... | mit | -807,823,098,126,535,000 | 31.315789 | 105 | 0.629177 | false | 2.893868 | false | false | false |
appsembler/configuration | playbooks/roles/backups/files/backup.py | 1 | 17068 | #!/usr/bin/python
import argparse
import datetime
import logging
import math
import os
import requests
import shutil
import socket
import subprocess
import sys
import time
import raven
def make_file_prefix(base_name):
hostname = socket.gethostname()
return '{0}_{1}'.format(hostname, base_name)
def make_fi... | agpl-3.0 | 4,505,051,146,387,217,400 | 34.558333 | 111 | 0.629189 | false | 3.967457 | false | false | false |
jtacoma/geometriki | geometriki/tests/functional/test_pages.py | 1 | 2036 | # This file is part of geometriki.
#
# geometriki 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 option) any later version.
#
# geometriki is distributed ... | agpl-3.0 | 943,609,453,979,199,700 | 34.103448 | 82 | 0.667485 | false | 3.510345 | true | false | false |
maliceio/malice-pdf | pdfparser/pdf_parser.py | 1 | 58940 | """
Modified by CSE to fit ASSEMBLYLINE service
"""
__description__ = 'pdf-parser, use it to parse a PDF document'
__author__ = 'Didier Stevens'
__version__ = '0.6.8'
__date__ = '2017/10/29'
__minimum_python_version__ = (2, 5, 1)
__maximum_python_version__ = (3, 6, 3)
"""
Source code put in public domain by Didier Ste... | mit | 7,926,709,286,726,347,000 | 36.976804 | 164 | 0.507397 | false | 4.140499 | false | false | false |
EmanueleCannizzaro/scons | test/MSVS/vs-9.0Exp-exec.py | 1 | 3292 | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... | mit | 5,027,620,518,771,086,000 | 29.201835 | 101 | 0.699271 | false | 3.432742 | true | false | false |
gstarnberger/paasta | paasta_tools/contrib/delete_old_marathon_deployments.py | 1 | 3106 | #!/usr/bin/env python
# Copyright 2015-2016 Yelp 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 ... | apache-2.0 | 3,240,582,496,428,836,000 | 32.76087 | 117 | 0.667418 | false | 3.834568 | true | false | false |
dorneanu/appvulnms | src/core/parser/AppVulnXMLParser.py | 1 | 14417 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: victor
# @Date: 2014-02-09
# @Last Modified by: victor
# @Last Modified time: 2014-06-06
# @Copyright:
#
# This file is part of the AppVulnMS project.
#
#
# Copyright (c) 2014 Victor Dorneanu <info AAET dornea DOT nu>
#
# Permission is hereby granted... | mit | -7,039,225,817,628,492,000 | 39.383754 | 119 | 0.553791 | false | 4.616394 | false | false | false |
tricoder42/python-ariadne | docs/conf.py | 1 | 8846 | # coding: utf-8
from __future__ import unicode_literals
import os
import sys
import sphinx_rtd_theme
import ariadne
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath t... | mit | 815,831,060,555,983,000 | 31.028986 | 79 | 0.704864 | false | 3.654403 | false | false | false |
GennadiyZakharov/locotrack | src/ltgui/preprocessorwidget.py | 1 | 5007 | '''
Created on 29 jan. 2015
@author: Gena
'''
from PyQt4 import QtCore, QtGui
class PreprocessorWidget(QtGui.QWidget):
'''
classdocs
'''
def __init__(self, preprocessor, parent=None):
'''
Constructor
'''
super(PreprocessorWidget, self).__init__(parent)
self.p... | lgpl-3.0 | -634,777,850,189,652,000 | 40.38843 | 100 | 0.688236 | false | 4.1725 | false | false | false |
kollad/turbo-ninja | utils/mathutils.py | 1 | 5600 | from bisect import insort_left
from collections import MutableMapping, OrderedDict
import random
import struct
import hashlib
from threading import Lock
import os
from engine.utils.timeutils import milliseconds
_inc_lock = Lock()
_inc = 0
_pid = int(os.getpid()) % 0xffff
def random_id(length=18):
"""Generate i... | mit | -161,171,418,633,999,780 | 24.339367 | 119 | 0.5425 | false | 3.977273 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/virtual_network_gateway_connection.py | 1 | 7595 | # 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 | 4,056,119,647,110,844,400 | 48.967105 | 117 | 0.663858 | false | 4.024907 | false | false | false |
epuzanov/ZenPacks.community.CIMMon | ZenPacks/community/CIMMon/interfaces.py | 1 | 9776 | ################################################################################
#
# This program is part of the CIMMon Zenpack for Zenoss.
# Copyright (C) 2012 Egor Puzanov.
#
# This program can be used under the GNU General Public License version 2
# You can find full information here: http://www.zenoss.com/oss
#
###... | gpl-2.0 | -7,139,634,888,139,762,000 | 51.55914 | 80 | 0.54511 | false | 4.641975 | false | false | false |
shaz13/oppia | core/controllers/cron.py | 1 | 7669 | # Copyright 2014 The Oppia 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 applicable ... | apache-2.0 | -490,610,909,016,384,450 | 40.231183 | 79 | 0.615726 | false | 4.0215 | false | false | false |
luzheqi1987/nova-annotation | nova/network/linux_net.py | 1 | 71216 | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file... | apache-2.0 | -7,665,344,293,116,199,000 | 37.979748 | 79 | 0.538292 | false | 3.971448 | false | false | false |
ProgVal/Supybot-website | plugins/models.py | 1 | 2683 | from django.contrib.auth.models import User
from django.db import models
from django import forms
import datetime
class Plugin(models.Model):
author = models.ForeignKey(User, help_text='The user who wrote the plugin.')
name = models.SlugField(max_length=255, help_text='The name of the plugin.',
u... | bsd-3-clause | -7,488,097,766,186,343,000 | 34.302632 | 89 | 0.660082 | false | 3.922515 | false | false | false |
imcgreer/simqso | simqso/sqrun.py | 1 | 27784 | #!/usr/bin/env python
import os
import numpy as np
from functools import partial
from astropy.io import fits
from astropy.table import Table,hstack
from astropy import cosmology
from . import sqbase
from . import sqgrids as grids
from . import hiforest
from . import dustextinction
from . import sqphoto
from . import ... | bsd-3-clause | -7,249,735,259,691,682,000 | 38.634807 | 79 | 0.610711 | false | 3.651945 | false | false | false |
lrei/canonical_urls | urlhelpers.py | 1 | 1775 | """
"""
import re
import logging
import rfc3987
import urlparse
def url_encode_non_ascii(b):
return re.sub('[\x80-\xFF]', lambda c: '%%%02x' % ord(c.group(0)), b)
def ensure_url(iri):
'''If IRI, convert to URL
If fragments (#), remove
http://stackoverflow.com/posts/4391299/revisions
'''
# i... | mit | 2,921,001,869,390,411,000 | 21.75641 | 78 | 0.579155 | false | 3.705637 | false | false | false |
thruflo/pyramid_redis | src/pyramid_redis/hooks.py | 1 | 4492 | # -*- coding: utf-8 -*-
"""Provides a ``RedisFactory`` to get a configured redis client from a
settings dictionary, e.g.::
>>> factory = RedisFactory()
>>> client = factory({'redis.url': 'redis://localhost:6379'})
And ``GetRedisClient`` which wraps the factory so it can be used as a
Pyramid request... | unlicense | 5,676,939,344,290,679,000 | 34.370079 | 79 | 0.61821 | false | 4.460775 | true | false | false |
YufeiZhang/Principles-of-Programming-Python-3 | Preparing/words.py | 1 | 1255 | # words.py
def main():
try:
#txt = open("test_1.txt")
#txt = open("test_2.txt")
#txt = open("test_3.txt")
txt = open("test_4.txt")
#target = input("Enter characters (spaces will be ignored): ")
#target = "cluuud IN DeD 23*"
target = "NSCRT - oooe+*"
except OSError:
print("OSError: Cannot find th... | gpl-3.0 | -474,582,302,238,988,500 | 18.936508 | 99 | 0.588048 | false | 2.687366 | false | false | false |
NERC-CEH/jules-jasmin | majic/joj/tests/functional/test_model_run_pre_create.py | 1 | 3962 | # Majic
# Copyright (C) 2014 CEH
#
# 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 progra... | gpl-2.0 | -5,171,435,831,803,058,000 | 44.022727 | 126 | 0.693337 | false | 3.556553 | true | false | false |
google/mirandum | alerts/streamjar/models.py | 1 | 1874 | # Copyright 2016 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 applica... | apache-2.0 | -5,070,340,945,048,618,000 | 37.244898 | 95 | 0.670224 | false | 4.012848 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.