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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
h3llrais3r/Auto-Subliminal | tests/server/api/test_api_movies.py | 1 | 4716 | # coding=utf-8
from autosubliminal.core.movie import MovieDetails, MovieSettings
from autosubliminal.core.subtitle import Subtitle, EXTERNAL
from autosubliminal.db import FailedMoviesDb, MovieDetailsDb, MovieSettingsDb
from autosubliminal.server.api.movies import MoviesApi
from tests.server.api.test_api import pickle... | gpl-3.0 | 8,911,283,726,948,796,000 | 61.052632 | 120 | 0.616412 | false | 3.414917 | true | false | false |
Cosiroc/bleau-database | Triangulation/test-triangulation.py | 2 | 5970 | ####################################################################################################
#
# Bleau Database - A database of the bouldering area of Fontainebleau
# Copyright (C) Salvaire Fabrice 2016
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affe... | agpl-3.0 | -3,093,722,702,365,640,000 | 39.337838 | 114 | 0.595477 | false | 3.390119 | false | false | false |
saevarom/django-startappextracontext | startappextracontext/management/commands/startappextra.py | 1 | 2456 | from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
from django.utils.importlib import import_module
from optparse import Option
# http://djangosnippets.org/snippets/1617/
class DictOption(Option):
"""
A parseopt option that let's me define a dicti... | mit | -6,838,444,731,547,849,000 | 37.984127 | 97 | 0.622964 | false | 4.205479 | false | false | false |
lamazavr/gpio | wh1602.py | 1 | 1351 | from gpio import Gpio
from time import sleep
class Wh1602:
def __init__(self):
self.reserve_gpios()
self.rw.set_value(0)
sleep(0.05)
def __del__(self):
pass
def reserve_gpios(self):
self.rs = Gpio(2, "out")
self.rw = Gpio(3, "out")
self.e = Gpio(4, ... | mit | 1,486,276,355,248,256,500 | 21.147541 | 56 | 0.511473 | false | 2.82636 | false | false | false |
wgwoods/fedup2 | fedup2/plymouth.py | 1 | 1182 | from subprocess import call
__all__ = [
'PlymouthOutput','message','progress','set_mode','ping'
]
PLYMOUTH = '/usr/bin/plymouth'
def message(msg):
return call([PLYMOUTH, "display-message", "--text", msg]) == 0
def progress(percent):
return call([PLYMOUTH, "system-update", "--progress", str(percent)]) ==... | gpl-2.0 | -5,460,564,796,527,295,000 | 22.64 | 77 | 0.573604 | false | 3.40634 | false | false | false |
cloud-engineering/xfc-email-notifier | config.py | 1 | 1460 | class launcher(object):
LOOP_INTERVAL = 10.00 # (seconds)
# Controls how often the Launcher checks for terminated sub-processes
# to restart them.
RUN_DELAY = 1.00 # (seconds)
# A delay inserted into the program after a sub-process has been
# started. This prevents ... | mit | 6,143,968,750,684,580,000 | 36.435897 | 79 | 0.615068 | false | 4.45122 | false | false | false |
Hardtack/TypeConverter | typeconverter.py | 1 | 3756 | # -*- encoding: utf-8 -*-
""":mod:`typeconverter`
~~~~~~~~~~~~~~~~~~~~~~~~
Converts object into specified type.
"""
from __future__ import unicode_literals
from functools import wraps
__version__ = '0.1.0'
__license__ = 'MIT License'
__author__ = 'Geonu Choi'
__email__ = '6566gun@gmail.com'
class Handler(object):... | mit | 3,227,461,768,443,383,300 | 24.208054 | 79 | 0.552183 | false | 4.307339 | false | false | false |
ghoshbishakh/filedrop | tests/tcpchat.py | 1 | 1725 | #! /usr/bin/python
import sys,socket
from threading import Thread
PORT=50607
USAGE="\n \t usage: tcpchat.py server|client <ip address of server>"
if len(sys.argv)==1:
print USAGE
else:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
def ClientRecv(sock):
while True:
data = sock.recv(1024)
if not dat... | gpl-2.0 | 1,582,692,535,708,819,500 | 23.657143 | 99 | 0.666667 | false | 2.969019 | false | false | false |
tofler/toflerdb | toflerdb/apiserver/handlers/uploadfactshandler.py | 1 | 1296 | import json
import traceback
# from toflerdb.utils.common import Common
from toflerdb.core import api as gcc_api
from toflerdb.utils import exceptions
from basehandler import BaseHandler
class UploadFactsHandler(BaseHandler):
def post(self):
request_body = self.request.body
if request_body is Non... | agpl-3.0 | -4,751,077,594,835,138,000 | 35 | 76 | 0.618056 | false | 4.140575 | false | false | false |
ecaldwe1/zika | website/apps/home/urls.py | 1 | 2253 | #!/bin/env python3.4
# -*- coding: utf-8 -*-
#
# This file is part of the VecNet Zika modeling interface.
# For copyright and licensing information about this package, see the
# NOTICE.txt and LICENSE.txt files in its top-level directory; they are
# available at https://github.com/vecnet/zika
#
# This Source Code Form ... | mpl-2.0 | -4,590,224,854,248,846,000 | 46.93617 | 117 | 0.694629 | false | 3.204836 | false | false | false |
JoKaWare/WTL-DUI | tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py | 1 | 19423 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Unit tests for grit.format.policy_templates.writers.doc_writer'''
import os
import re
import sys
if __name__ == '__main__':
... | bsd-3-clause | -1,785,424,312,809,519,400 | 33.560498 | 142 | 0.547907 | false | 3.416535 | true | false | false |
ebernhardson/l2r | code/feature_base.py | 1 | 13541 | import numpy as np
import pandas as pd
import os
import functools
import config
from utils import np_utils, table_utils
# Base class for measuring correlation/similarity/distance
# between the search query and page information
class BaseEstimator(object):
def __init__(self, obs_corpus, target_corpus, aggregation... | mit | -4,614,662,668,924,669,000 | 39.786145 | 117 | 0.605494 | false | 3.819746 | true | false | false |
whitepyro/debian_server_setup | sickbeard/providers/torrentleech.py | 1 | 10817 | # Author: Idan Gutman
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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 o... | gpl-3.0 | -3,897,464,253,921,688,000 | 37.222615 | 118 | 0.555699 | false | 4.13178 | false | false | false |
ClaudioNahmad/Servicio-Social | Parametros/CosmoMC/CosmoMC-master/batch2/outputs/FAP_fsigma8.py | 1 | 1561 |
import planckStyle as s
from paramgrid import batchjob
from pylab import *
from getdist.densities import Density2D
roots = ['base_' + s.defdata + '_lensing']
g = s.getSinglePlotter(ratio=1)
pars = g.get_param_array(roots[0], ['FAP057', 'fsigma8z057'])
def RSDdensity(FAPbar, f8bar, covfile):
incov = loadtxt(cov... | gpl-3.0 | -9,192,729,011,655,010,000 | 27.907407 | 131 | 0.660474 | false | 2.326379 | false | false | false |
atlefren/beercalc | app/api.py | 1 | 3653 | from flask import g
from app import app, db
from app.models import Malt, Hop, Yeast, Brew
import flask.ext.restless
from flask.ext.restless import ProcessingException
manager = flask.ext.restless.APIManager(app, flask_sqlalchemy_db=db)
# TODO simplyfy this...
def verify_is_number(dict, value, errors):
if value ... | mit | -1,872,889,281,347,377,700 | 22.416667 | 76 | 0.617301 | false | 3.532882 | false | false | false |
garrykevin-ep/Skillet | coding/views.py | 1 | 5064 | from django.shortcuts import render
from django.http import HttpResponse ,HttpResponseRedirect
from django.urls import reverse
from .models import *
from login.models import UserProfile
from quiz.models import Question
from django.core.files import File
# Create your views here.
def first_question():
list = Q... | bsd-3-clause | 3,437,592,960,928,893,000 | 31.670968 | 228 | 0.731635 | false | 3.084044 | true | false | false |
tsl143/zamboni | mkt/developers/models.py | 1 | 18040 | import json
import posixpath
import string
import uuid
from copy import copy
from datetime import datetime
from django.apps import apps
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
import commonware.log
import jinja2
from tower import ugettext as _
import... | bsd-3-clause | -7,578,592,785,815,707,000 | 33.893617 | 79 | 0.600554 | false | 3.993801 | false | false | false |
zjj/trac_hack | trac/mimeview/pygments.py | 1 | 8368 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# Copyright (C) 2006 Matthew Good <matt@matt-good.net>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac... | bsd-3-clause | 283,857,220,382,943,170 | 32.741935 | 79 | 0.60325 | false | 4.114061 | false | false | false |
Ezhil-Language-Foundation/open-tamil | examples/kural_mathirai.py | 1 | 2245 | #!/usr/bin/env python3
# This Python file uses the following encoding: utf-8
from kural import Thirukkural
from tamil.utf8 import get_letters, get_tamil_words, total_maaththirai
from collections import Counter, OrderedDict
from pprint import pprint
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
fr... | mit | -3,246,167,036,818,263,000 | 31.469697 | 87 | 0.608026 | false | 2.682103 | false | false | false |
benjamindeleener/scad | scripts/msct_smooth.py | 1 | 30043 | #!/usr/bin/env python
#########################################################################################
#
# Module containing fitting functions
#
# ---------------------------------------------------------------------------------------
# Copyright (c) 2014 Polytechnique Montreal <www.neuro.polymtl.ca>
# Author... | mit | 1,639,657,995,958,790,400 | 40.612188 | 377 | 0.509337 | false | 3.688068 | false | false | false |
watchdogpolska/feder | feder/cases/filters.py | 1 | 2954 | import django_filters
from dal import autocomplete
from django import forms
from django.utils.translation import ugettext_lazy as _
from teryt_tree.dal_ext.filters import VoivodeshipFilter, CountyFilter, CommunityFilter
from .models import Case
from feder.main.mixins import DisabledWhenFilterSetMixin
from feder.teryt.... | mit | -3,434,448,243,723,590,000 | 32.191011 | 87 | 0.641842 | false | 4.172316 | false | false | false |
MalloyDelacroix/DownloaderForReddit | DownloaderForReddit/extractors/vidble_extractor.py | 1 | 3356 | """
Downloader for Reddit takes a list of reddit users and subreddits and downloads content posted to reddit either by the
users or on the subreddits.
Copyright (C) 2017, Kyle Hickey
This file is part of the Downloader for Reddit.
Downloader for Reddit is free software: you can redistribute it and/or modify
it und... | gpl-3.0 | -5,193,640,190,564,752,000 | 37.574713 | 121 | 0.632896 | false | 3.943596 | false | false | false |
leapcode/bitmask-dev | src/leap/bitmask/keymanager/wrapper.py | 1 | 5570 | # -*- coding: utf-8 -*-
# wrapper.py
# Copyright (C) 2016 LEAP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Thi... | gpl-3.0 | 3,536,690,499,557,021,000 | 33.171779 | 78 | 0.591921 | false | 4.206949 | false | false | false |
tobi-wan-kenobi/bumblebee-status | bumblebee_status/modules/contrib/deadbeef.py | 1 | 5484 | # pylint: disable=C0111,R0903
"""Displays the current song being played in DeaDBeeF and provides
some media control bindings.
Left click toggles pause, scroll up skips the current song, scroll
down returns to the previous song.
Parameters:
* deadbeef.format: Format string (defaults to '{artist} - {title}')
... | mit | -3,343,251,353,740,123,000 | 36.306122 | 85 | 0.61178 | false | 3.818942 | false | false | false |
danilovazb/sawef | Models/Crawler.py | 1 | 3965 | import threading
import time
import argparse
import requests
import json
import re,sys
from bs4 import BeautifulSoup
class crawler(object):
def request_page(self,url):
regex = re.compile('((https?|ftp)://|www\.)[^\s/$.?#].[^\s]*')
t_or_f = regex.match(url) is None
if t_or_f is True:
pass
else:
try:
... | gpl-3.0 | 6,717,556,753,020,677,000 | 29.976563 | 182 | 0.587894 | false | 2.509494 | false | false | false |
deanishe/alfred-searchio | bin/gen_ddg.py | 1 | 1417 | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2016 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2017-02-05
#
"""Generate Duck Duck Go engine JSON."""
from __future__ import print_function, absolute_import
from collections import namedtuple
im... | mit | -7,735,466,253,962,262,000 | 24.303571 | 74 | 0.59139 | false | 3.141907 | false | false | false |
Tset-Noitamotua/_learnpython | LearnPythonTheHardWay/ex39_hashmap.py | 1 | 1543 | # -*- coding: utf-8 -*-
def new(num_buckets=256):
"""Initializes a Map with the given number of buckets."""
aMap = []
for i in range(0, num_buckets):
aMap.append([])
return aMap
def hash_key(aMap, key):
"""Given a key this will create a number and then convert it to
an index for the aMap's buckets."""
retu... | gpl-2.0 | -1,449,765,843,287,387,400 | 16.133333 | 71 | 0.601557 | false | 2.761649 | false | false | false |
tmc/django-cumulus | cumulus/storage.py | 1 | 3970 | """
Custom storage system for Mosso Cloud Files within Django.
"""
import re
from django.conf import settings
from django.core.files import File
from django.core.files.storage import Storage
from django.core.exceptions import ImproperlyConfigured
try:
import cloudfiles
from cloudfiles.errors import NoSuchObje... | bsd-3-clause | 6,804,919,831,210,843,000 | 33.824561 | 123 | 0.63073 | false | 4.227902 | false | false | false |
asymworks/python-divelog | src/divelog/gui/settings.py | 1 | 3211 | # =============================================================================
#
# Copyright (C) 2011 Asymworks, LLC. All Rights Reserved.
# www.pydivelog.com / info@pydivelog.com
#
# This file is part of the Python Dive Logbook (pyDiveLog)
#
# This file may be used under the terms of the GNU General Public
# Lice... | gpl-2.0 | 3,340,102,028,908,228,000 | 30.490196 | 79 | 0.576145 | false | 3.782097 | false | false | false |
Naeka/django-rest-framework-jsonapi | rest_framework_jsonapi/utils.py | 1 | 1686 | from __future__ import unicode_literals
from django.conf import settings
from django.utils.encoding import force_text
from rest_framework.compat import importlib
from rest_framework.serializers import ListSerializer, ManyRelatedField
from inflection import underscore, dasherize
def get_serializer(serializer):
if... | isc | 3,245,581,626,313,244,700 | 38.209302 | 78 | 0.654804 | false | 4.379221 | false | false | false |
OCA/stock-logistics-warehouse | stock_picking_completion_info/models/stock_picking.py | 1 | 2802 | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import api, models, fields
class PickingType(models.Model):
_inherit = 'stock.picking.type'
display_completion_info = fields.Boolean(
help='Inform operator of a completed operation at processing ... | agpl-3.0 | -6,114,512,560,388,550,000 | 35.868421 | 79 | 0.55853 | false | 4.608553 | false | false | false |
JIghtuse/cppcheck | tools/daca2-addons.py | 1 | 3753 | #!/usr/bin/python
#
# 1. Create a folder daca2-addons in your HOME folder
# 2. Put cppcheck-O2 in daca2-addons. It should be built with all optimisations.
# 3. Optional: Put a file called "suppressions.txt" in the daca2-addons folder.
# 4. Optional: tweak FTPSERVER and FTPPATH in this script below.
# 5. Run the daca2-a... | gpl-3.0 | 5,773,448,597,383,888,000 | 26 | 146 | 0.583533 | false | 3.527256 | false | false | false |
myevan/flask_server | examples/flask_sqlaclhemy_sharding.py | 1 | 6928 | # -*- coding:utf8 -*-
import re
from flask import Flask
from flask_sqlalchemy import SQLAlchemy as BaseSQLAlchemy
from flask_sqlalchemy import _SignallingSession as BaseSignallingSession
from flask_sqlalchemy import orm, partial, get_state
from datetime import datetime
class _BindingKeyPattern(object):
def __in... | mit | -6,155,779,706,041,585,000 | 33.13 | 196 | 0.585116 | false | 3.433602 | false | false | false |
Cadasta/cadasta-platform | cadasta/accounts/migrations/0003_add_change_pw.py | 1 | 1517 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-16 09:51
from __future__ import unicode_literals
import django.contrib.auth.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_activate_users_20161014_0846'),
]... | agpl-3.0 | 2,542,327,888,333,276,000 | 41.138889 | 319 | 0.634146 | false | 4.2493 | false | false | false |
asnt/fablablux-schedule | fablab_schedule/api.py | 1 | 3294 | from __future__ import print_function
import argparse
import json
import random
import requests
from fablab_schedule import config
class ScheduleService:
base_route = "?rest_route=/open-access/v1"
endpoints = {
"status": "/",
"schedule": "/machine-schedule",
}
def __init__(self, b... | gpl-3.0 | -8,429,851,478,355,358,000 | 26.680672 | 79 | 0.562842 | false | 3.959135 | true | false | false |
peterwilletts24/Python-Scripts | EMBRACE/temp_on_p_levs_mean.py | 1 | 2253 | """
Load multiple pp diagnostic files, aggregate by year, day etc, calcualte mean, sum etc and save
"""
import os, sys
import datetime
import iris
import iris.unit as unit
from iris.coord_categorisation import add_categorised_coord
import pdb
diag = '_temp_on_p_levs'
pp_file_path='/nfs/a90/eepdw/Data/EMBRACE/'
ex... | mit | 3,748,510,054,328,490,500 | 31.652174 | 127 | 0.651132 | false | 2.837531 | false | false | false |
newlawrence/poliastro | src/poliastro/threebody/restricted.py | 1 | 3754 | """Circular Restricted 3-Body Problem (CR3BP)
Includes the computation of Lagrange points
"""
import numpy as np
from astropy import units as u
from scipy.optimize import brentq
from poliastro.util import norm
@u.quantity_input(r12=u.km, m1=u.kg, m2=u.kg)
def lagrange_points(r12, m1, m2):
"""Computes th... | mit | 3,683,252,528,897,132,500 | 25.814286 | 93 | 0.591636 | false | 2.939702 | false | false | false |
sofeien/PythonLearn | Baidu_v3.py | 1 | 6660 | #coding='utf-8'
from tkinter import *
from tkinter.ttk import *
import requests
import urllib.parse
import os
import time
import threading
class BaiduSpider:
def __init__(self):
self.getNum = 0
self.failNum = 0
self.decode_dict = [{"_z2C$q": ":", "AzdH3F": "/", "_z&e3B": "."}, {"O": "O", "4... | gpl-2.0 | -7,292,299,521,168,612,000 | 38.573171 | 626 | 0.502773 | false | 2.787801 | false | false | false |
optima-ict/odoo | addons/website_forum/models/forum.py | 1 | 44184 | # -*- coding: utf-8 -*-
from datetime import datetime
import itertools
import logging
import math
import re
import uuid
from werkzeug.exceptions import Forbidden
from openerp import _
from openerp import api, fields, models
from openerp import http
from openerp import modules
from openerp import tools
from openerp im... | agpl-3.0 | -4,066,895,212,376,344,600 | 50.798359 | 308 | 0.619546 | false | 3.672513 | false | false | false |
kevindong/misc. | battleship.py | 1 | 13077 | ###############################################################################
# battleship #
# #
# Originally based off of the battleship game that the Python course on #
... | mit | -5,181,590,986,807,869,000 | 41.457792 | 87 | 0.51992 | false | 3.827041 | false | false | false |
GPNMilano/PyPRPImporter | PyPRPImport/alc_LightClasses.py | 1 | 15589 | #
# $Id: alc_Classes.py 876 2007-12-15 22:15:11Z Paradox $
#
# Copyright (C) 2005-2006 Alcugs pyprp Project Team
# See the file AUTHORS for more info about the team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | gpl-2.0 | 1,765,670,760,960,683,800 | 30.115768 | 111 | 0.616396 | false | 3.318221 | false | false | false |
yancharkin/games_nebula_mylib_scripts | steam/original_war/settings.py | 1 | 8568 | # -*- Mode: Python; coding: utf-8; -*-
import sys, os
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
import gettext
import imp
try:
from ConfigParser import ConfigParser as ConfigParser
except:
from configparser import ConfigParser as ConfigParser
nebula_dir = os.getenv('NEBULA... | gpl-3.0 | 5,173,142,098,500,678,000 | 32.303502 | 87 | 0.584064 | false | 3.587175 | true | false | false |
Tkd-Alex/Telegram-DMI-Bot | module/esami.py | 1 | 4760 | # -*- coding: utf-8 -*-
from sets import Set
import json
import requests
def esami_output(item, sessions):
output = "*Insegnamento:* " + item["insegnamento"]
output += "\n*Docenti:* " + item["docenti"]
for session in sessions:
appeal = [appeal for appeal in item[session] if appeal]
if(a... | gpl-3.0 | 3,100,176,550,183,931,000 | 40.754386 | 133 | 0.503151 | false | 3.937138 | false | false | false |
DannyArends/genenetwork2 | wqflask/maintenance/get_group_samplelists.py | 1 | 1093 | from __future__ import absolute_import, print_function, division
import os
import glob
import gzip
from base import webqtlConfig
def get_samplelist(file_type, geno_file):
if file_type == "geno":
return get_samplelist_from_geno(geno_file)
elif file_type == "plink":
return get_samplelist_from_p... | agpl-3.0 | 5,082,873,480,145,960,000 | 22.76087 | 64 | 0.614822 | false | 3.492013 | false | false | false |
ponyorm/pony | pony/orm/tests/test_hooks.py | 1 | 3970 | from __future__ import absolute_import, print_function, division
import unittest
from pony.orm.core import *
from pony.orm.tests import setup_database, teardown_database, db_params
logged_events = []
db = Database()
class Person(db.Entity):
id = PrimaryKey(int)
name = Required(unicode)
age = Required(... | apache-2.0 | 4,015,479,868,368,041,000 | 26.957746 | 105 | 0.58539 | false | 3.148295 | true | false | false |
Spotipo/spotipo | unifispot/utils/translation.py | 1 | 6321 | from flask import g,current_app
from babel.support import LazyProxy
from flask_babelplus import gettext, lazy_gettext, ngettext
from flask_babelplus import format_datetime as _format_datetime
from flask_babelplus import Domain, get_locale
from spotipo_plugins import get_enabled_plugins
import os
import subprocess
impo... | agpl-3.0 | -8,354,495,254,639,516,000 | 35.327586 | 86 | 0.629647 | false | 4.202793 | false | false | false |
librallu/cohorte-herald | python/run_pas12.py | 1 | 5011 | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Runs an Herald HTTP framework
:author: Thomas Calmant
:copyright: Copyright 2014, isandlaTech
:license: Apache License 2.0
:version: 0.0.3
:status: Alpha
..
Copyright 2014 isandlaTech
Licensed under the Apache License, Version 2.0 (the "License");
... | apache-2.0 | -3,697,845,401,348,223,500 | 30.31875 | 80 | 0.594692 | false | 3.986476 | false | false | false |
brandm/live-py-plugin | test/PySrc/tests/test_code_tracer_matplotlib.py | 1 | 1087 | import re
import pytest
import sys
from canvas import Canvas
from code_tracer import CodeTracer
from test_report_builder import trim_report
@pytest.fixture(name='is_matplotlib_cleared')
def clear_matplotlib():
for should_yield in (True, False):
to_delete = [module_name
for module_na... | mit | -4,368,468,544,927,899,000 | 20.74 | 72 | 0.632935 | false | 3.611296 | false | false | false |
snorecore/lights | tests/test_light_func.py | 1 | 1566 | import pytest
import time
# Not entirely happy with this check
# TODO Change when I understand pytest better
def skip_if_unplugged():
import usb.core
dev = usb.core.find(idVendor=0x0403, idProduct=0x6014)
if dev is None:
pytest.skip("FT232H not plugged in")
def test_lights(num_lights, light_type... | mit | 7,846,304,336,833,207,000 | 22.727273 | 64 | 0.60281 | false | 3.542986 | false | false | false |
stormi/tsunami | src/primaires/salle/commandes/decor/retirer.py | 1 | 2992 | # -*-coding:Utf-8 -*
# Copyright (c) 2012 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
# l... | bsd-3-clause | -2,200,089,850,346,754,300 | 44.707692 | 79 | 0.683608 | false | 3.695274 | false | false | false |
wevote/WeVoteServer | import_export_batches/controllers_ballotpedia.py | 1 | 3545 | # import_export_batches/controllers_ballotpedia.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from .models import create_batch_from_json_wrapper, BATCH_HEADER_MAP_BALLOT_ITEMS_TO_BALLOTPEDIA_BALLOT_ITEMS, \
BATCH_HEADER_MAP_CANDIDATES_TO_BALLOTPEDIA_CANDIDATES, BATCH_HEADER_MAP_CONTEST_OFFICES_T... | mit | 2,723,810,443,694,618,600 | 43.873418 | 115 | 0.65811 | false | 3.126102 | false | false | false |
alephdata/aleph | aleph/migrate/versions/9dcef7592cea_added_fields_to_entitysetitem_to_support_profiles.py | 1 | 2882 | """Added fields to EntitySetItem to support profiles and removed Linkage
Revision ID: 9dcef7592cea
Revises: 3174fef04825
Create Date: 2020-07-21 13:42:06.509804
"""
from itertools import groupby, takewhile
from alembic import op
import sqlalchemy as sa
revision = "9dcef7592cea"
down_revision = "4c9e198c5b31"
def ... | mit | 846,511,055,351,786,100 | 28.111111 | 82 | 0.548924 | false | 3.489104 | false | false | false |
nagaozen/my-os-customizations | home/nagaozen/.gnome2/gedit/plugins/codecompletion/__init__.py | 1 | 2726 | # -*- coding: utf-8 -*-
# gedit CodeCompletion plugin
# Copyright (C) 2011 Fabio Zendhi Nagao
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | gpl-3.0 | 7,508,295,284,640,012,000 | 32.654321 | 87 | 0.651137 | false | 3.877667 | false | false | false |
faustedition/faust-app | faust-utils/data_curation/check_xml_space.py | 1 | 1569 | #!/usr/bin/env python
#
# Search for missing @xml:space
import lxml.etree
import faust
ignored_tags = (
"app", "back", "body", "choice", "div", "docTitle", "fix", "front", "fw", "g",
"group", "lg", "overw", "patch", "sp", "subst", "surface", "text", "titlePage", "titlePart",
"used", "zone")
ignored_empty_elem... | agpl-3.0 | -3,056,886,725,584,611,000 | 32.382979 | 107 | 0.635437 | false | 2.837251 | false | false | false |
lpouillo/execo-g5k-tools | engines/l2c_fft_eval/l2c_fft.py | 1 | 7301 | #!/usr/bin/env python
import os, math, sys
from pprint import pformat
from tempfile import mkstemp
from execo import Process
from execo import logger as ex_log
from execo.log import style
from execo_g5k import get_site_clusters, OarSubmission, oardel, get_cluster_site, \
oarsub, wait_oar_job_start, get_oar_job_no... | gpl-3.0 | -8,972,633,790,968,663,000 | 39.337017 | 167 | 0.544857 | false | 3.925269 | false | false | false |
tsmith328/Homework | Python/CS 1301/HW2/HW2.py | 1 | 1179 | #Tyler Smith and Kamryn Harris
#tsmith328@gatech.edu and kharris48@gatech.edu
#CS 1301 Section A06
#We worked on this assignment alone, using only the semester's course materials.
def mass(kg):
stone = kg * 0.157
return stone
def volume(liter):
pint = liter * 2.11
print('There are %.2f' % pint , 'US p... | mit | 581,807,367,253,504,900 | 37.064516 | 104 | 0.669211 | false | 3.127321 | false | false | false |
DXCanas/kolibri | kolibri/core/auth/management/commands/importusers.py | 1 | 6549 | import csv
import logging
from functools import partial
from itertools import starmap
from django.core.exceptions import ValidationError
from django.core.management.base import BaseCommand
from django.core.management.base import CommandError
from django.db import transaction
from kolibri.core.auth.models import Class... | mit | -7,310,236,231,817,944,000 | 40.188679 | 131 | 0.641472 | false | 4.551077 | false | false | false |
lovasb/pylogstash | setup.py | 1 | 4787 | import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
from setuptools import setup, find_packages
version = '0.1'
# Provided as an attribute, so you can append to these instead
# of replicating them:
standard_exclude = ('*.py', '*.pyc', '*$py.class', '*~', '.*', '*.bak')
standar... | gpl-3.0 | 8,913,605,518,605,522,000 | 35.549618 | 86 | 0.548151 | false | 4.490619 | false | false | false |
ColdrickSotK/storyboard | storyboard/plugin/email/__init__.py | 1 | 3081 | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# 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 | 3,523,190,412,246,369,000 | 38.5 | 78 | 0.610841 | false | 4.458755 | false | false | false |
rhyswhitley/savanna_iav | src/figures/trends/gpp_annual_trend_2alt.py | 1 | 9771 | #!/usr/bin/env python2
import os
import re
import natsort
import string
import netCDF4 as nc
import numpy as np
import pandas as pd
import cPickle as pickle
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib.cm import get_cmap
from matplotlib import style
from scipy import stats
fro... | cc0-1.0 | -6,373,555,353,771,403,000 | 34.021505 | 97 | 0.604851 | false | 2.827257 | false | false | false |
mattclark/osf.io | addons/dataverse/views.py | 1 | 9845 | """Views for the node settings page."""
# -*- coding: utf-8 -*-
import httplib as http
from django.utils import timezone
from django.core.exceptions import ValidationError
from requests.exceptions import SSLError
from flask import request
from framework.auth.decorators import must_be_logged_in
from framework.exceptio... | apache-2.0 | 4,357,396,554,869,335,600 | 29.107034 | 91 | 0.663586 | false | 3.706702 | false | false | false |
France-ioi/taskgrader | examples/taskTurtle/tests/gen/runner.py | 1 | 3332 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import json, sys, traceback
import turtle
from functools import partial
class LoggedTurtle(object):
"""Class emulating Turtle behavior while logging all commands.
It won't actually display anything, it will only execute movement commands
through a TNavigat... | mit | -2,496,013,598,061,500,000 | 30.433962 | 78 | 0.596639 | false | 3.906213 | false | false | false |
krig/parsnip | parsnip/parsers.py | 1 | 9215 | import six
import re
from contextlib import contextmanager
from functools import wraps
from inspect import getdoc
from .errors import NoMatch
from .tokens import END
@contextmanager
def _savestate(tokens):
tmp = tokens._curr
try:
yield
except NoMatch:
tokens._curr = tmp
def parsnip(doc=... | mit | -6,151,438,101,351,395,000 | 23.507979 | 90 | 0.515789 | false | 3.705267 | false | false | false |
gnarula/eden_deployment | modules/s3db/survey.py | 1 | 132631 | # -*- coding: utf-8 -*-
""" Sahana Eden Survey Tool
@copyright: 2011-2014 (c) Sahana Software Foundation
@license: MIT
ADAT - Assessment Data Analysis Tool
For more details see the blueprint at:
http://eden.sahanafoundation.org/wiki/BluePrint/SurveyTool/ADAT
Permission is hereby granted, fr... | mit | -4,218,395,409,947,875,300 | 38.298074 | 195 | 0.4751 | false | 4.836488 | false | false | false |
QuLogic/meson | mesonbuild/modules/rpm.py | 1 | 8481 | # Copyright 2015 The Meson development team
# 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 ... | apache-2.0 | -3,089,279,144,901,001,700 | 45.092391 | 113 | 0.545572 | false | 3.991059 | false | false | false |
HazyResearch/dd-genomics | document_classifier/classification/processed/genomics_dump_to_processed.py | 1 | 1446 | #! /usr/bin/env python
import sys
import re
if __name__ == "__main__":
no_alnum = re.compile(r'[\W_]+')
with open(sys.argv[2], 'w') as out_file:
with open(sys.argv[1]) as f:
for line in f:
comps = line.strip().split('\t')
pmid = comps[0]
journal = comps[1]
mesh_terms_stri... | apache-2.0 | 7,812,585,201,237,845,000 | 34.268293 | 151 | 0.478562 | false | 3.025105 | false | false | false |
widgetOne/league_admin | scheduler/schedule.py | 1 | 29282 | from model import init_value
import random
import copy
from pprint import pprint
import fitness
def list_filter(primary, filter):
both = [team for team in primary if team in filter]
if (len(both) > 0):
return list(both)
else:
return primary
class Schedule(object):
time_string = ['6pm'... | mit | 7,339,886,801,671,712,000 | 47.723794 | 140 | 0.571307 | false | 3.518203 | false | false | false |
pudo/aleph | aleph/tests/test_search_query.py | 1 | 3559 | from unittest import TestCase
from aleph.search.parser import SearchQueryParser
from aleph.search.query import Query
def query(args):
return Query(SearchQueryParser(args, None))
class QueryTestCase(TestCase):
def setUp(self):
# Allow list elements to be in any order
self.addTypeEqualityFunc(... | mit | 531,886,608,683,313,000 | 28.658333 | 73 | 0.437763 | false | 4.1097 | true | false | false |
printedheart/opennars | nars_gui/src/main/python/nef_theano/ensemble.py | 1 | 12468 | from theano.tensor.shared_randomstreams import RandomStreams
from theano import tensor as TT
import theano
import numpy
import neuron
import origin
def make_encoders(neurons, dimensions, srng, encoders=None):
"""Generates a set of encoders
:param int neurons: number of neurons
:param int dimensions: num... | agpl-3.0 | 7,203,607,654,707,447,000 | 64.621053 | 181 | 0.69538 | false | 4.457633 | false | false | false |
lastralab/Statistics | Specialization/Personal/RotationToEuler.py | 1 | 2753 | #!/usr/bin/env python
# Copyright (c) 2016 Satya Mallick <spmallick@learnopencv.com>
# All rights reserved. No warranty, explicit or implicit, provided.
import cv2
import numpy as np
import math
import random
R = np.matrix([[0.6927,-0.7146,0.0978],[0.7165,0.6973,0.0198],[-0.0824,0.0564,0.995]])
# Checks if a matrix ... | mit | 2,462,491,476,373,613,000 | 29.588889 | 86 | 0.505993 | false | 3.110734 | false | false | false |
pmghalvorsen/gramps_branch | gramps/plugins/lib/libgedcom.py | 1 | 291897 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2009-2010 Gary Burton
# Copyright (C) 2010 Nick Hall
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU... | gpl-2.0 | -2,624,625,516,947,080,000 | 36.786019 | 96 | 0.518786 | false | 3.595455 | false | false | false |
eckardm/archivematica | src/MCPServer/lib/linkTaskManagerGetUserChoiceFromMicroserviceGeneratedList.py | 1 | 6172 | #!/usr/bin/env python2
# This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica 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, ... | agpl-3.0 | -6,378,924,127,823,612,000 | 44.382353 | 111 | 0.667693 | false | 4.319104 | true | false | false |
RuggedPOD/ruggedpod-api | ruggedpod_api/services/gpio.py | 1 | 3539 | # RuggedPOD management API
#
# Copyright (C) 2015 Maxime Terras <maxime.terras@numergy.com>
# Copyright (C) 2015 Pierre Padrixe <pierre.padrixe@gmail.com>
# Copyright (C) 2015 Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | gpl-3.0 | -8,523,999,146,722,254,000 | 29.773913 | 72 | 0.694264 | false | 2.932063 | true | false | false |
twestbrookunh/paladin | run.py | 1 | 14540 | #!/usr/bin/python
"""Wrapper script for running PALADIN and returning the results."""
import os
import json
import uuid
import boto3
import shutil
import logging
import argparse
import subprocess
def run_cmds(commands, retry=0, catchExcept=False):
"""Run commands and write out the log, combining STDOUT & STDERR.... | mit | 8,326,087,270,629,893,000 | 36.474227 | 92 | 0.574966 | false | 3.910705 | false | false | false |
Bugaa92/Twitter-Tagcloud | src/redis_tagcloud.py | 1 | 6589 | """
Project Name: Twitter Tagcloud
Author: Alexandru Buliga
Email: bugaaa92@gmail.com
"""
import sys
import re
import logging
import json
import redis
from threading import currentThread, enumerate, Lock, Thread
from collections import Counter, OrderedDict
from datetime import datetime
... | apache-2.0 | -4,796,557,039,112,764,000 | 29.646512 | 82 | 0.574139 | false | 4.636875 | false | false | false |
kristyj/tweetcluster | twit_clustering/EMContainer.py | 1 | 16220 | __author__ = 'Kristy'
#methods for em clustering on a clustercontainer object
import LanguageModel
from collections import deque
from collections import defaultdict
import numpy as np
'''Classes that handle building topic-based language models from documents using Expectation Maximisation.
ThetaParams hold... | gpl-3.0 | 1,185,433,029,836,612,400 | 51.531353 | 166 | 0.616338 | false | 3.969652 | false | false | false |
FAB4D/humanitas | analysis/preproc/merge_series.py | 1 | 6091 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
description = '''
This script merges series of the same product within each region.
Also for plotting.
Author: Ching-Chia
'''
wholesale_daily = True
retail_daily = False
retail_weekly = False
output_by_city = F... | bsd-3-clause | -6,141,976,568,057,818,000 | 31.227513 | 135 | 0.623379 | false | 3.071609 | false | false | false |
bcgov/gwells | app/backend/registries/views.py | 1 | 30811 | """
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
distri... | apache-2.0 | -2,987,966,131,840,463,000 | 34.333716 | 106 | 0.65561 | false | 4.546407 | false | false | false |
intelligenia/modeltranslation | setup.py | 1 | 2484 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 by intelligenia <info@intelligenia.es>
#
# The MIT License (MIT)
#
# Copyright (c) 2016 intelligenia soluciones informáticas
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"... | mit | 5,486,425,722,198,557,000 | 36.059701 | 83 | 0.710028 | false | 4.05719 | false | false | false |
deepfield/ibis | ibis/pandas/execution/tests/conftest.py | 1 | 6784 | from __future__ import absolute_import
import decimal
import pytest
import pandas as pd
import ibis
import ibis.expr.datatypes as dt
import os
@pytest.fixture(scope='module')
def df():
return pd.DataFrame({
'plain_int64': list(range(1, 4)),
'plain_strings': list('abc'),
'plain_float64... | apache-2.0 | 7,093,453,546,597,148,000 | 25.814229 | 77 | 0.568249 | false | 2.883128 | true | false | false |
3dfxsoftware/cbss-addons | account_banking_ccorp/account_banking_ccorp.py | 1 | 2107 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Addons modules by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute... | gpl-2.0 | 3,842,626,837,670,480,000 | 43.829787 | 103 | 0.558614 | false | 4.766968 | false | false | false |
AndresYague/Snuppat | output/figuresAndTables/finalGraphPNe.py | 1 | 8661 | import sys, math, os
import matplotlib.pyplot as plt
def main():
# Check that there's at least one argument
if len(sys.argv) < 2:
print("Usage python {}".format(sys.argv[0]), end = " ")
print("<file1> [<file2> ...]")
return 1
# Automatically detect if decayed
if "decayed" i... | mit | 8,277,514,883,426,380,000 | 29.072917 | 80 | 0.472925 | false | 3.545231 | false | false | false |
tsuna/tcollector | collectors/0/zfsiostats.py | 1 | 9299 | #!/usr/bin/env python
# This file is part of tcollector.
# Copyright (C) 2012 The tcollector Authors.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | gpl-3.0 | 2,507,122,525,126,365,000 | 33.313653 | 86 | 0.559523 | false | 3.748085 | false | false | false |
thenetcircle/dino | dino/web.py | 1 | 3853 | #!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 450,528,208,337,806,850 | 34.675926 | 119 | 0.680249 | false | 3.655598 | true | false | false |
Eksmo/calibre | src/calibre/utils/Zeroconf.py | 1 | 55471 | """ Multicast DNS Service Discovery for Python
Copyright (C) 2003, Paul Scott-Murphy
Copyright (C) 2009, Alexander Solovyov
This module provides a framework for the use of DNS Service Discovery
using IP multicast. It has been tested against the JRendezvous
implementation from <a href="http://stran... | gpl-3.0 | -5,357,106,716,623,870,000 | 33.953371 | 181 | 0.564655 | false | 4.137157 | true | false | false |
sstocker46/pyrobotlab | home/hairygael/InMoov2.full3.byGael.Langevin.1.py | 1 | 117376 | #file : InMoov2.full3.byGael.Langevin.1.py
# this script is provided as a basic guide
# most parts can be run by uncommenting them
# InMoov now can be started in modular pieces
import random
leftPort = "COM20"
rightPort = "COM7"
i01 = Runtime.createAndStart("i01", "InMoov")
#inmoov = Runtime.createAndStart("alice", ... | apache-2.0 | -2,498,001,812,204,119,600 | 33.491919 | 566 | 0.581448 | false | 2.390453 | false | false | false |
PeteAndersen/swarfarm | herders/templatetags/utils.py | 1 | 1598 | from django import template
register = template.Library()
@register.filter
def get_range(value):
if value is not None:
return range(value)
else:
return 0
@register.filter
def absolute(value):
return abs(value)
@register.filter
def subtract(value, arg):
return value - arg
@regist... | apache-2.0 | -3,495,323,434,338,481,700 | 22.15942 | 90 | 0.586984 | false | 3.504386 | false | false | false |
paulmadore/Eric-IDE | 6-6.0.9/eric/E5Gui/E5ComboBox.py | 1 | 1955 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing combobox classes using the eric6 line edits.
"""
from __future__ import unicode_literals
from PyQt5.QtWidgets import QComboBox
class E5ComboBox(QComboBox):
"""
Class implementing a com... | gpl-3.0 | -3,208,561,469,416,457,000 | 27.75 | 71 | 0.617903 | false | 4.315673 | false | false | false |
emd/boutanalysis | profiles.py | 1 | 6970 | '''Create 1D and 2D profiles to be used in BOUT++ simulations'''
import numpy as np
from scipy import interpolate
from boututils import file_import, DataFile
from boutanalysis import grid
def csv_import(path, column, skip_header=1):
'''Import a 1D profile from a CSV file.
Parameters:
path -- string, p... | lgpl-3.0 | -1,307,815,740,842,791,700 | 34.74359 | 111 | 0.621377 | false | 3.70154 | false | false | false |
gmjosack/pygerduty | pygerduty/v2.py | 1 | 20708 | import copy
import re
import six
from six.moves import urllib
from .common import (
Requester,
_lower,
_upper,
_singularize,
_pluralize,
_json_dumper,
)
__author__ = "Gary M. Josack <gary@dropbox.com>"
from .version import __version__, version_info # noqa
TRIGGER_LOG_ENTRY_RE = re.compile(
... | mit | 1,439,807,039,352,841,200 | 30.186747 | 109 | 0.576975 | false | 3.963254 | false | false | false |
ohanar/PolyBoRi | pyroot/polybori/blocks.py | 1 | 14700 | import sys
if __name__ == '__main__':
import pathadjuster
from polybori.PyPolyBoRi import Ring, VariableBlock, Polynomial
from polybori.PyPolyBoRi import VariableFactory, MonomialFactory
from itertools import chain, islice
#class BlockEndException(object):
#pass
#def __init__(self, arg):
# self.arg = arg
#... | gpl-2.0 | -2,597,420,333,108,813,300 | 31.522124 | 138 | 0.569592 | false | 3.527718 | false | false | false |
wang-h/HieraParser | scripts/bootstrap_resampling_reorder_scores.py | 1 | 8809 | #!/usr/bin/python
# Author: Hao WANG
###############################################
# An implementation of paired bootstrap resampling for testing the statistical
# significance of the difference between two systems from (Koehn 2004 @ EMNLP)
# Specified for reordering Scores.
# Usage: ./bootstrap-resampling.py hypoth... | apache-2.0 | 7,772,108,416,269,102,000 | 31.625926 | 128 | 0.644341 | false | 3.354532 | false | false | false |
dellsystem/wikinotes | mdx/mdx_wiki_def_list.py | 1 | 3254 | #!/usr/bin/env Python
"""
Definition List Extension for Python-Markdown
=============================================
Added parsing of Definition Lists to Python-Markdown.
A simple example:
Apple
: Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.
: An american computer com... | gpl-3.0 | 4,532,069,618,653,678,600 | 30.288462 | 75 | 0.560541 | false | 3.997543 | false | false | false |
harterj/moose | python/MooseDocs/extensions/datetime.py | 5 | 2202 | #* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
import os
im... | lgpl-2.1 | 3,319,022,733,818,852,000 | 32.363636 | 109 | 0.673025 | false | 4.292398 | false | false | false |
mshuffett/MetaPyMusic | retry.py | 1 | 1637 | import time
import math
import logging
# Retry decorator with exponential backoff
def retry(tries, delay=3, backoff=2, test_f=lambda x: bool(x)):
'''Retries a function or method until function test_f on its return returns True.
test_f initially returns true when the functions return value is truthy
delay... | gpl-2.0 | -8,846,816,822,790,871,000 | 33.851064 | 85 | 0.597434 | false | 4.353723 | false | false | false |
ikresoft/django-sitetree | sitetree/fields.py | 1 | 1970 | from django import template
from django.forms import ChoiceField
from django.utils.safestring import mark_safe
from .templatetags.sitetree import sitetree_tree
from .utils import get_tree_model, get_tree_item_model
MODEL_TREE_CLASS = get_tree_model()
MODEL_TREE_ITEM_CLASS = get_tree_item_model()
class TreeItemChoi... | bsd-3-clause | -623,359,590,279,110,500 | 39.204082 | 118 | 0.617259 | false | 4.01222 | false | false | false |
chiralhat/mnm-python | cr7mnsim/dimerfuncs.py | 1 | 5390 | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 26 13:54:24 2016
These functions set up the Hamiltonians for various ways of dealing with Cr7Mn
dimers, including the full Spin-1 treatment, the truncated Spin-1/2 treatment,
and the Spin-1/2 rotating frame treatment.
@author: ccollett
"""
import qutip as qt
... | bsd-3-clause | -4,823,955,798,372,183,000 | 30.865854 | 103 | 0.576438 | false | 2.165528 | false | false | false |
CurrencyCloud/currencycloud-python | tests/integration/test_authentication.py | 1 | 2080 | from betamax import Betamax
from currencycloud import Client, Config
class TestAuthentication:
def setup_method(self, method):
# TODO: To run against real server please delete ../fixtures/vcr_cassettes/* and replace
# login_id and api_key with valid credentials before running the tests
lo... | mit | 5,715,076,033,479,736,000 | 40.6 | 111 | 0.692308 | false | 3.830571 | true | false | false |
AlexMog/IRCPokemonBot | irclib.py | 1 | 48783 | # Copyright (C) 1999--2002 Joel Rosdahl
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is ... | mit | -1,705,436,094,571,637,500 | 30.211132 | 105 | 0.564131 | false | 3.946525 | false | false | false |
jaredmanning/learning | lpthw/ex33.py | 1 | 1813 | #i = 0
#numbers = []
#
#while i < 6:
# print "At the top i is %d" % i
# numbers.append(i)
#
# i += 1
# print "Numbers now: ", numbers
# print "At the bottom i is %d" % i
#
#
#print "The numbers: "
#
#for num in numbers:
# print num
#Study Drill Part 1
#print "What's the limit of the list?"
#a = int(r... | mit | -10,674,561,632,627,338 | 17.313131 | 53 | 0.533922 | false | 2.877778 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.