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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Xreki/Xreki.github.io | fluid/inference/inference_transpiler.py | 1 | 1937 | import os
import sys
import argparse
import paddle.fluid as fluid
def Transpile(src_dir, dst_dir, model_filename, params_filename):
place = fluid.CPUPlace()
exe = fluid.Executor(place)
inference_scope = fluid.core.Scope()
with fluid.scope_guard(inference_scope):
print "Loading inference_progr... | gpl-3.0 | -8,947,622,634,226,983,000 | 41.108696 | 102 | 0.690243 | false | 3.761165 | false | false | false |
minireference/noBSLAnotebooks | aspynb/Linear_algebra_chapters_overview.py | 1 | 23478 | def cells():
'''
# Linear algebra overview
'''
'''
'''
'''
Linear algebra is the study of **vectors** and **linear transformations**. This notebook introduces concepts form linear algebra in a birds-eye overview. The goal is not to get into the details, but to give the reader a taste of th... | mit | -7,188,144,948,188,234,000 | 16.864536 | 343 | 0.468561 | false | 3.318349 | false | false | false |
OpenVolunteeringPlatform/django-ovp-projects | ovp_projects/migrations/0014_apply.py | 1 | 1497 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-11-15 23:02
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | agpl-3.0 | 8,839,063,111,466,270,000 | 41.771429 | 141 | 0.606546 | false | 4.067935 | false | false | false |
heromod/migrid | user-projects/EpistasisOnGrid/gridepistasisgui.py | 1 | 20836 | import sys
sys.path.append("GUI/")
import epistasisviewer as viewer
import gridepistasis as epistasisControl
import wx
#import time
import os
sys.path.append("RfilesAndscripts/")
import readdata
from threading import Thread
import Configuration.epistasisconfiguration as config
exec_state = "executing"
pending_state... | gpl-2.0 | 93,554,748,704,978,140 | 35.618629 | 239 | 0.566376 | false | 3.679322 | true | false | false |
gandalf221553/CodeSection | compilare/compilatore.py | 1 | 6485 | def RowChanger(row,textToSearch,textToReplace,fileToSearch):
a=1
import fileinput
tempFile = open( fileToSearch, 'r+' )
for line in fileinput.input( fileToSearch ):
if row in line :
print('done yet')
a=0
if a:
if textToReplace=="0":
textToReplace =... | mit | 6,083,077,644,254,006,000 | 38.066265 | 149 | 0.6095 | false | 3.274747 | false | false | false |
broadinstitute/herc | herc/async.py | 1 | 2127 | from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
from tornado import ioloop
from tornado.concurrent import run_on_executor
from tornado import gen
from functools import wraps
import threading
executors = {
'short': ThreadPoolExecutor(max_workers=8), # For little things to avoid blocking the ... | bsd-3-clause | 4,405,503,052,446,012,000 | 31.723077 | 108 | 0.649741 | false | 3.968284 | false | false | false |
ch1huizong/dj | bookmarks/bookmarks/settings.py | 1 | 4531 | """
Django settings for bookmarks project.
Generated by 'django-admin startproject' using Django 2.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
from djang... | unlicense | -7,262,526,610,636,818,000 | 24.59887 | 106 | 0.696314 | false | 3.248029 | false | false | false |
mitocw/edx-platform | lms/djangoapps/course_api/views.py | 1 | 14554 | """
Course API Views
"""
from django.core.exceptions import ValidationError
from django.core.paginator import InvalidPage
from edx_rest_framework_extensions.paginators import NamespacedPageNumberPagination
from django.http import HttpResponseRedirect
from django.urls import reverse
from rest_framework.generics import... | agpl-3.0 | -6,341,263,580,877,471,000 | 36.413882 | 109 | 0.616669 | false | 4.419678 | false | false | false |
tomwright01/AO_Registration | example.py | 1 | 1605 | import AoRegistration.AoRecording as AoRecording
import timeit
import logging
import argparse
def main():
"""
"""
logging.info('Reading file:%s','data/sample.avi')
vid = AoRecording.AoRecording(filepath='data/sample.avi')
vid.load_video()
logging.info('Starting parallel processing')
tic=tim... | mit | 5,573,137,991,126,652,000 | 29.301887 | 99 | 0.674766 | false | 3.614865 | false | false | false |
rmadapur/networking-brocade | networking_brocade/mlx/ml2/fi_ni/driver_factory.py | 1 | 3345 | # Copyright 2015 Brocade Communications Systems, 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
#
... | apache-2.0 | -6,562,487,558,882,334,000 | 37.448276 | 79 | 0.592526 | false | 4.305019 | false | false | false |
carragom/modoboa | modoboa/admin/models/domain.py | 1 | 9835 | """Models related to domains management."""
import datetime
from django.db import models
from django.db.models.manager import Manager
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible, smart_text
from django.utils.functional import cached_property
from django.utils.transl... | isc | -5,286,976,501,532,225,000 | 32.003356 | 79 | 0.621556 | false | 4.022495 | false | false | false |
nubakery/smith3 | python/relcaspt2/queue_split.py | 1 | 2189 | #!/opt/local/bin/python
import string
import os
import re
def header(n) :
return "//\n\
// BAGEL - Brilliantly Advanced General Electronic Structure Library\n\
// Filename: RelCASPT2" + n + ".cc\n\
// Copyright (C) 2014 Toru Shiozaki\n\
//\n\
// Author: Toru Shiozaki <shiozaki@northwestern.edu>\n\
// Maintainer: ... | gpl-2.0 | 3,854,441,453,575,640,600 | 26.3625 | 102 | 0.636364 | false | 2.820876 | false | false | false |
cheery/essence | interpret.py | 1 | 2438 | # This file is part of Essential Editor Research Project (EERP)
#
# EERP 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.
#
# EERP is di... | gpl-3.0 | 6,000,114,890,642,886,000 | 33.338028 | 70 | 0.634126 | false | 3.932258 | false | false | false |
dsweet04/rekall | rekall-core/rekall/plugins/response/renderers.py | 1 | 3128 | # Rekall Memory Forensics
# Copyright 2016 Google Inc. All Rights Reserved.
#
# 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 ver... | gpl-2.0 | -267,481,225,361,954,530 | 30.59596 | 76 | 0.684783 | false | 3.805353 | false | false | false |
phoebe-project/phoebe2 | tests/nosetests/test_blackbody/test_blackbody.py | 1 | 1553 | """
"""
import phoebe
from phoebe import u
import numpy as np
import matplotlib.pyplot as plt
def test_binary(plot=False):
b = phoebe.Bundle.default_binary()
# Two spherical suns
b.set_value_all('teff', value=5772.)
b.set_value('sma', component='binary', value=100.)
b.set_value('period', compone... | gpl-3.0 | 923,983,890,196,022,900 | 26.732143 | 79 | 0.641339 | false | 2.696181 | false | false | false |
wojtask/CormenPy | test/test_chapter15/test_exercise15_5_1.py | 1 | 2830 | import io
import re
from contextlib import redirect_stdout
from unittest import TestCase
from hamcrest import *
from chapter15.exercise15_5_1 import construct_optimal_bst
from chapter15.textbook15_5 import optimal_bst
from test_chapter15.test_textbook15_5 import get_probabilities_for_optimal_bst
def assert_optimal_... | gpl-3.0 | 5,799,465,066,080,409,000 | 40.014493 | 93 | 0.645936 | false | 2.991543 | true | false | false |
rahlk/CSC579__Computer_Performance_Modeling | simulation/proj1/tasks/task5.py | 1 | 2063 | from __future__ import division
from __future__ import print_function
import os
import sys
import functools
# Update path
root = os.path.join(os.getcwd().split('proj1')[0], 'proj1')
if root not in sys.path:
sys.path.append(root)
import numpy as np
import pandas as pd
import multiprocessing
from pdb import set_tra... | mit | 711,134,336,705,916,900 | 28.898551 | 193 | 0.654387 | false | 2.893408 | false | false | false |
JackDesBwa/IrisMonitor | decoders/test.py | 1 | 1272 | #!/usr/bin/env python
import sys, os
if os.path.dirname(os.path.abspath(__file__)) in sys.path:
sys.path.remove(os.path.dirname(os.path.abspath(__file__)))
if os.path.dirname(os.path.dirname(os.path.abspath(__file__))) not in sys.path:
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
impo... | mit | 8,655,242,273,459,935,000 | 27.909091 | 81 | 0.691824 | false | 2.777293 | false | false | false |
gwct/grampa | lib/mul_recon.py | 1 | 12960 | #!/usr/bin/python
#############################################################################
# The main algorithmic functions for MUL-reconciliation mapping.
# Gregg Thomas
# Fall 2015, Combo algorithm implemented Spring 2016
#############################################################################
import os, i... | gpl-3.0 | 5,744,836,206,608,884,000 | 33.195251 | 122 | 0.626157 | false | 2.960256 | false | false | false |
diofant/diofant | diofant/domains/domain.py | 1 | 8541 | """Implementation of :class:`Domain` class."""
import abc
import inspect
from ..core import Expr
from ..core.compatibility import HAS_GMPY
from ..polys.orderings import lex
from ..polys.polyerrors import CoercionFailed, UnificationFailed
from ..polys.polyutils import _unify_gens
from ..printing.defaults import Defaul... | bsd-3-clause | 1,690,075,486,520,412,000 | 32.104651 | 140 | 0.580026 | false | 4.098369 | false | false | false |
scrapinghub/python-hubstorage | tests/test_jobsmeta.py | 1 | 3937 | """
Test job metadata
System tests for operations on stored job metadata
"""
from .hstestcase import HSTestCase
class JobsMetadataTest(HSTestCase):
def _assertMetadata(self, meta1, meta2):
def _clean(m):
return dict((k, v) for k, v in m.items() if k != 'updated_time')
meta1 = _clean... | bsd-3-clause | -4,820,492,767,777,208,000 | 36.495238 | 76 | 0.630937 | false | 3.774688 | true | false | false |
franapoli/pyleaf | pyleaf/rrc.py | 1 | 5065 | # The MIT License (MIT)
# Copyright (c) 2012-2013 Francesco Napolitano, franapoli@gmail.com
# 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... | mit | 4,220,487,148,200,134,000 | 31.261146 | 83 | 0.576308 | false | 4.138072 | false | false | false |
cjayb/mne-python | mne/preprocessing/ssp.py | 3 | 14022 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
#
# License: BSD (3-clause)
import copy as cp
import numpy as np
from ..epochs import Epochs
from ..proj import compute_proj_evoked, compute_proj_ep... | bsd-3-clause | 1,329,410,272,909,505,500 | 37.726519 | 79 | 0.580569 | false | 3.513534 | false | false | false |
breakwang/pykit | jobq/jobq.py | 1 | 3605 | import logging
import sys
import threading
import time
import types
if sys.version_info[0] == 2:
import Queue
else:
import queue as Queue
logger = logging.getLogger(__name__)
class EmptyRst(object):
pass
class Finish(object):
pass
def run(input_it, workers, keep_order=False, timeout=None, probe=... | mit | 250,652,157,187,175,260 | 19.027778 | 73 | 0.5043 | false | 3.565776 | false | false | false |
robert-b-clarke/nre-darwin-py | nredarwin/cli.py | 1 | 1612 | import argparse
from nredarwin.webservice import DarwinLdbSession
import csv
import sys
from tabulate import tabulate
from functools import partial
def rows_to_display(station_board):
"""
Iterator for tabular output of board
"""
yield (("Platform", "Destination", "Scheduled", "Due"))
for service i... | bsd-3-clause | 8,184,569,043,009,174,000 | 28.851852 | 88 | 0.651985 | false | 3.801887 | false | false | false |
GraphProcessor/CommunityDetectionCodes | Algorithms/2014-Heat-Kernel/src_python/demo_files/yche_numerical_linear_algebra_exp.py | 1 | 2192 | from __future__ import print_function
import numpy as np
def demo_gauss_sedel_method():
ITERATION_LIMIT = 1000
# initialize the matrix
A = np.array([[10., -1., 2., 0.],
[-1., 11., -1., 3.],
[2., -1., 10., -1.],
[0.0, 3., -1., 8.]])
# initialize the... | gpl-2.0 | -273,464,835,275,803,520 | 24.488372 | 74 | 0.447993 | false | 2.907162 | false | false | false |
centrofermi/e3pipe | dst/E3DstWeatherTree.py | 1 | 1873 | #!/usr/bin/env python
# *********************************************************************
# * Copyright (C) 2014 Luca Baldini (luca.baldini@pi.infn.it) *
# * *
# * For the license terms see the file LICENSE, distributed *
# * along ... | gpl-3.0 | -5,012,376,391,257,592,000 | 32.446429 | 73 | 0.577149 | false | 4.286041 | false | false | false |
borgarlie/TDT4501-Specialization-Project | research/calculate_accuracy.py | 1 | 2242 | import numpy as np
from tensorboardX import SummaryWriter
from seq2seq_summarization.globals import *
from classifier.train_classifier import get_predictions, calculate_accuracy, create_single_article_category_list
from research.train import split_category_and_article, category_from_string, evaluate
def test_accurac... | mit | -9,058,002,817,343,573,000 | 39.035714 | 113 | 0.702498 | false | 3.975177 | false | false | false |
icebreaker/dotfiles | gnome/gnome2/gedit/plugins.symlink/classbrowser/parser_ruby.py | 1 | 14401 | # -*- coding: utf-8 -*-
# Copyright (C) 2006 Frederic Back (fredericback@gmail.com)
# Copyright (C) 2007 Kristoffer Lundén (kristoffer.lunden@gmail.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fou... | mit | 4,563,122,297,649,822,700 | 33.615385 | 106 | 0.491319 | false | 4.532578 | false | false | false |
rho2/30DaysOfCode | day18.py | 1 | 1039 | import sys
class Solution:
def __init__(self):
self.stack = list()
self.queue = list()
def pushCharacter(self, char):
self.stack.append(char)
def popCharacter(self):
return(self.stack.pop(-1))
def enqueueCharacter(self, char):
self.queue.append(char)
... | mit | -2,207,952,508,544,627,000 | 22.088889 | 54 | 0.647738 | false | 3.486577 | false | false | false |
sealevelresearch/tide-wrangler | tide_wrangler/scratch/convert_garston_to_csv.py | 1 | 1918 | #!/usr/bin/env python
import pytz
import datetime
import csv
from os import path
from collections import namedtuple
Row = namedtuple('Row', 'when,height_m')
DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
_NAIVE_DATETIME_FORMAT = '%y%m%dT%H:%M:00Z'
_FIELDNAMES = ['datetime', 'observed_sea_level']
def main(filenames):
f... | mit | -227,173,322,786,278,400 | 26.797101 | 70 | 0.616788 | false | 3.312608 | false | false | false |
z-plot/z-plot | examples/barplots/manybars.py | 1 | 1257 | #! /usr/bin/env python
import sys
from zplot import *
bartypes = [('hline', 1, 1),
('vline', 1, 1),
('hvline', 1, 1),
('dline1', 1, 2),
('dline2', 1, 2),
('dline12', 0.5, 2),
('circle', 1, 2),
('square', 1, 1),
('triang... | bsd-3-clause | -2,772,117,638,909,082,600 | 22.716981 | 76 | 0.461416 | false | 2.916473 | false | false | false |
binhqnguyen/lena | test.py | 1 | 75970 | #! /usr/bin/env python26
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
#
# Copyright (c) 2009 University of Washington
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Fre... | gpl-2.0 | -8,879,720,097,523,576,000 | 39.474161 | 218 | 0.576649 | false | 3.955535 | true | false | false |
urandu/gumbo-parser | python/gumbo/gumboc.py | 1 | 12165 | # Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 2,796,645,549,917,822,500 | 27.159722 | 80 | 0.63469 | false | 3.426761 | false | false | false |
T3ddy-Bear/PiChat | requests/models.py | 1 | 33804 | # -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import datetime
import sys
from io import UnsupportedOperation
from ._internal_utils import to_native_string, unicode_is_ascii
from .auth import HTTPBasicAuth
from .compat... | apache-2.0 | 8,118,881,208,333,657,000 | 35.192719 | 119 | 0.582475 | false | 4.491629 | false | false | false |
aldarionsevero/datalogger-ROS-rasp | sensors/botbook_mcp3002.py | 1 | 2047 | # botbook_mcp3002.py - read analog values from mcp3002
# (c) BotBook.com - Karvinen, Karvinen, Valtokari
# Installing spidev:
# sudo apt-get update
# sudo apt-get -y install git python-dev
# git clone https://github.com/doceme/py-spidev.git
# cd py-spidev/
# sudo python setup.py install
import spidev ... | mit | -913,414,466,716,447,900 | 30.492063 | 75 | 0.622374 | false | 3.178571 | false | false | false |
maferelo/saleor | saleor/graphql/webhook/resolvers.py | 1 | 1820 | import graphene
from graphql_jwt.exceptions import PermissionDenied
from ...core.permissions import WebhookPermissions
from ...webhook import models, payloads
from ...webhook.event_types import WebhookEventType
from ..utils import sort_queryset
from .sorters import WebhookSortField
from .types import Webhook, WebhookE... | bsd-3-clause | 3,332,239,013,513,664,000 | 36.142857 | 79 | 0.734066 | false | 3.815514 | false | false | false |
mattmillr/utaka | src/rest/UtakaBucket.py | 1 | 7437 | #Copyright 2009 Humanitarian International Services Group
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or... | apache-2.0 | -5,196,733,002,555,355,000 | 36.756345 | 112 | 0.751513 | false | 3.369733 | false | false | false |
krisb78/django-redactorjs | testproject/settings.py | 1 | 5391 | import os
# Django settings for testproject project.
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2'... | bsd-3-clause | -4,929,814,843,324,972,000 | 31.672727 | 109 | 0.674643 | false | 3.687415 | false | false | false |
auduny/chains | lib/chains/services/sonos/__init__.py | 1 | 7848 | from threading import Timer
import chains.service
from chains.common import log
import time, datetime, re, copy
from Queue import Empty
from soco import SoCo, discover
from soco.events import event_listener
class SonosService(chains.service.Service):
def onInit(self):
# Discover Sonos players
sel... | gpl-2.0 | -5,247,336,795,785,983,000 | 29.418605 | 89 | 0.55237 | false | 4.190069 | false | false | false |
mtougeron/python-openstacksdk | examples/network/delete.py | 1 | 1721 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -5,908,766,536,051,304,000 | 25.075758 | 75 | 0.662987 | false | 3.929224 | false | false | false |
zaubermaerchen/imas_cg_api | api/skill/serializer.py | 1 | 1189 | # coding: utf-8
from rest_framework import serializers
from data.models import Skill, SkillValue
class ListSerializer(serializers.ModelSerializer):
skill_value_list = serializers.SerializerMethodField(read_only=True)
class Meta:
model = Skill
fields = [
'skill_id',
'ta... | mit | -7,853,903,863,662,876,000 | 26.022727 | 72 | 0.619008 | false | 4.05802 | false | false | false |
vup1120/oq-risklib | openquake/commonlib/writers.py | 1 | 9803 | # Copyright (c) 2010-2014, GEM Foundation.
#
# NRML 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.
#
# NRML is distributed in t... | agpl-3.0 | 344,428,272,819,919,700 | 32.803448 | 95 | 0.571254 | false | 3.704837 | false | false | false |
tranlyvu/autonomous-vehicle-projects | Vehicle Detection/src/vehicle_detection.py | 1 | 14396 | import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import cv2
import glob
from skimage.feature import hog
from skimage import color, exposure
import random
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.svm im... | apache-2.0 | -4,546,993,512,947,049,500 | 43.27044 | 128 | 0.566199 | false | 3.54931 | true | false | false |
Poofjunior/dxf2gcode | core/shape.py | 1 | 23737 | # -*- coding: utf-8 -*-
############################################################################
#
# Copyright (C) 2008-2015
# Christian Kohlöffel
# Vinzenz Schulz
# Jean-Paul Schouwstra
#
# This file is part of DXF2GCODE.
#
# DXF2GCODE is free software: you can redistribute it and/or mod... | gpl-3.0 | 24,751,064,062,946,144 | 36.975369 | 127 | 0.56686 | false | 3.694319 | true | false | false |
ryfeus/lambda-packs | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/libsvm/ops/gen_libsvm_ops.py | 1 | 6994 | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: libsvm_ops.cc
"""
import collections as _collections
import six as _six
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
from tensorflow.python.eager import context as _context
from t... | mit | 5,052,128,959,870,387,000 | 36.005291 | 420 | 0.659708 | false | 3.115367 | false | false | false |
demvher/pythondotorg | jobs/views.py | 1 | 8432 | from braces.views import LoginRequiredMixin, GroupRequiredMixin
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.http import Http404
from django.shortcuts import get_object_or_404, redirect
from django.views.generic import ListView, DetailView, ... | apache-2.0 | -7,756,300,799,939,174,000 | 29.330935 | 97 | 0.635674 | false | 3.940187 | false | false | false |
Winnetou/ManuTironis | utils/ngram_getter.py | 1 | 1156 | # this one doesn't crawl the web, it just and only
# takes xml from
import os
import psycopg2
import uni_to_beta
import xml
import xmlrpc
connect_manu = psycopg2.connect("dbname=manu_tironis user=quellen password=quellen")
manu_cursor = connect_manu.cursor()
def get_raw_text():
pass
def translate(raw_text):
... | cc0-1.0 | -7,046,498,592,810,975,000 | 24.130435 | 84 | 0.605536 | false | 3.658228 | false | false | false |
docwalter/py3status | py3status/modules/uptime.py | 1 | 4335 | # -*- coding: utf-8 -*-
"""
Display system uptime.
Configuration parameters:
format: display format for this module
(default 'up {days} days {hours} hours {minutes} minutes')
Format placeholders:
{decades} decades
{years} years
{weeks} weeks
{days} days
{hours} hours
{minu... | bsd-3-clause | -947,488,740,994,104,300 | 32.091603 | 86 | 0.58985 | false | 3.606489 | false | false | false |
miracle2k/onkyo-eiscp | setup.py | 1 | 1149 | #!/usr/bin/env python
# coding: utf8
from setuptools import setup, find_packages
# Get long_description from README
import os
here = os.path.dirname(os.path.abspath(__file__))
f = open(os.path.join(here, 'README.rst'))
long_description = f.read().strip()
f.close()
setup(
name='onkyo-eiscp',
version='1.2.8',
... | mit | 784,736,929,684,786,300 | 30.888889 | 73 | 0.641986 | false | 3.437126 | false | true | false |
abztrakt/labtracker | Machine/migrations/0006_auto__add_field_item_unusable__chg_field_item_mac3__chg_field_item_mac.py | 1 | 12585 | # encoding: 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 'Item.unusable'
db.add_column('Machine_item', 'unusable', self.gf('django.db.models.fields.... | apache-2.0 | 8,021,627,425,522,244,000 | 68.916667 | 182 | 0.548669 | false | 3.649942 | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace_checklist/admin.py | 1 | 1428 | from django.contrib import admin
from import_export import admin as import_export_admin
from modeltranslation import admin as modeltranslation_admin
from . import models
from .import_export_resources import ChecklistResource
class CategoryAdmin(import_export_admin.ImportExportModelAdmin):
fields = ('icon', 'name... | mit | 3,977,542,510,639,444,000 | 30.043478 | 88 | 0.757003 | false | 4.08 | false | false | false |
cylc/cylc | cylc/flow/wallclock.py | 1 | 10726 | # THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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,... | gpl-3.0 | -7,570,600,737,711,770,000 | 40.573643 | 79 | 0.658214 | false | 3.592096 | false | false | false |
openweave/happy | happy/HappyProcessStart.py | 1 | 15877 | #!/usr/bin/env python3
#
# Copyright (c) 2015-2017 Nest Labs, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lice... | apache-2.0 | 3,041,653,095,024,345,000 | 38.009828 | 124 | 0.552749 | false | 3.652404 | false | false | false |
recombinators/worker | models.py | 1 | 9335 | import os
import transaction
from zope.sqlalchemy import ZopeTransactionExtension
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, UnicodeText, Boolean, DateTime
from datetime impo... | mit | 3,469,872,206,858,366,500 | 34.359848 | 83 | 0.532191 | false | 4.470785 | false | false | false |
bnrubin/userv | tests/test_encyclopedia.py | 1 | 2665 | from flask import request, url_for
from userv.encyclopedia.models import Fact
from pprint import pprint
from datetime import datetime, timezone
import arrow
import json
def test_factoids_all_one(session, db,app, client):
now = datetime.now(timezone.utc)
anow = arrow.get(now)
f = Fact(id=1, name='foo', a... | mit | 1,062,741,826,242,034,800 | 27.351064 | 81 | 0.512195 | false | 3.660714 | false | false | false |
RihardsT/forgettables | Languages_Programming/Python/python.py | 1 | 8335 | Simple Server
python3 -m http.server # 8000 # --bind 127.0.0.1
python2 -m SimpleHTTPServer # 8000
Python'ā atstares ir svarīgas.'
#Single line coment
""" Multiline comment.
Apostrofi apzīmē string, tāpat kā pēdiņas. \ zīme ļauj to labot.
There\'s a snake. Ir Python'am saprotami.
"""
Operators: = - * / ** % // #// flo... | unlicense | -7,686,488,076,607,635,000 | 33.894068 | 99 | 0.708682 | false | 2.719617 | false | false | false |
ninegrid/dotfiles-vim | bundle/vim-orgmode/ftplugin/orgmode/plugins/EditCheckbox.py | 1 | 7316 | # -*- coding: utf-8 -*-
import vim
from orgmode._vim import echo, echom, echoe, ORGMODE, apply_count, repeat, insert_at_cursor, indent_orgmode
from orgmode.menu import Submenu, Separator, ActionEntry, add_cmd_mapping_menu
from orgmode.keybinding import Keybinding, Plug, Command
from orgmode.liborgmode.checkboxes impor... | unlicense | -3,455,821,195,089,854,000 | 26.400749 | 107 | 0.6807 | false | 3.077829 | false | false | false |
juergspaak/EF-at-invariant-richness | plot_figS5.py | 1 | 1315 | """
@author: J.W. Spaak
This programm plots Fig. S4
"""
from plot_functions import bars
import community_construction_repl as repl
#compute DeltaEF/EF for the different communities and different cases
EF_data = {key: repl.delta_EF_lin(*repl.para[key]) for key in repl.para.keys()}
# species have different f
EF_data... | mit | -6,361,027,837,631,320,000 | 32.717949 | 79 | 0.644867 | false | 2.803838 | false | false | false |
autosportlabs/RaceCapture_App | autosportlabs/racecapture/views/dashboard/widgets/digitalgauge.py | 1 | 2538 | #
# Race Capture App
#
# Copyright (C) 2014-2017 Autosport Labs
#
# This file is part of the Race Capture App
#
# This 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 ... | gpl-3.0 | 1,654,545,606,196,182,300 | 32.394737 | 102 | 0.657998 | false | 4.009479 | false | false | false |
jehine-MSFT/azure-storage-python | azure/storage/sharedaccesssignature.py | 1 | 35228 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | apache-2.0 | -6,093,724,331,806,510,000 | 51.73503 | 113 | 0.634105 | false | 4.803764 | false | false | false |
bswartz/manila | manila/api/v2/share_networks.py | 1 | 14622 | # Copyright 2014 NetApp
# 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 applic... | apache-2.0 | -7,893,771,970,282,250,000 | 41.382609 | 78 | 0.576323 | false | 4.401565 | false | false | false |
tsvstar/vk_downloader | pytube/api.py | 1 | 16387 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from models import Video
from utils import safe_filename
from utils import MultipleObjectsReturned, YouTubeError, CipherError
try:
from urllib2 import urlopen
from urlparse import urlparse, parse_qs, unquote
except ImportErro... | mit | 2,981,604,777,545,081,300 | 33.71822 | 118 | 0.505279 | false | 3.883175 | false | false | false |
Southpaw-TACTIC/TACTIC | src/pyasm/common/js_wrapper.py | 1 | 5678 | ###########################################################
#
# Copyright (c) 2015, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 | 5,923,317,514,424,031,000 | 18.312925 | 75 | 0.499648 | false | 3.623484 | false | false | false |
gecos-team/gecosws-config-assistant | gecosws_config_assistant/view/LogTerminalDialog.py | 1 | 4670 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# This file is part of Guadalinex
#
# This software 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, ... | gpl-2.0 | -4,645,901,874,535,072,000 | 27.469512 | 74 | 0.615335 | false | 3.802117 | false | false | false |
danbradham/nodify | nodify/view.py | 1 | 3580 | '''
view
====
Defines a view class for maintaining a graphics scene.
'''
import math
from PySide import QtCore, QtGui
class View(QtGui.QGraphicsView):
'''A View supporting smooth panning and zooming. Use Alt+Left Mouse to
pan and Alt+Middle or Right Mouse to zoom. Dragging without Alt drags out
a selecti... | mit | 3,127,646,211,352,622,600 | 29.598291 | 78 | 0.609777 | false | 3.690722 | false | false | false |
gpoisoned/hars-app | server/server.py | 1 | 3487 | from flask import Flask, jsonify
import threading
import zmq
import time
import logging
from Queue import Queue
# Clear the Log file if it exists
with open("server.log", "w"):
pass
logging.basicConfig(filename='server.log',level=logging.DEBUG,\
format='%(levelname)s:%(asctime)s %(message)s', datefmt='%m/%... | apache-2.0 | 796,355,831,453,210,900 | 31.588785 | 94 | 0.629481 | false | 3.806769 | false | false | false |
jiasir/pycs | vulpo/resultset.py | 1 | 6559 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | mit | -787,891,861,120,344,300 | 36.695402 | 79 | 0.606495 | false | 4.366844 | false | false | false |
calisthenics/site | bin/wikipedia-bodyweight-exercise.py | 1 | 4818 | #!/usr/bin/env python
# coding: utf-8
import os
import re
import requests
from datetime import datetime
from bs4 import BeautifulSoup
from logya.core import Logya
from logya.path import slugify, target_file
from logya.writer import encode_content, write
logya = Logya()
logya.init_env()
url = 'https://en.wikipedia.o... | mit | 3,966,870,147,894,004,000 | 31.126667 | 127 | 0.547945 | false | 3.598208 | false | false | false |
gdorion/advent-of-code | 2015/python/Day14/race.py | 1 | 1703 | #!/bin/env python
#
# Adventofcode.com
#
# Author : Guillaume Dorion
# Email : gdorion@gmail.com
#
class Reindeer(object):
def __init__(self, name, speed, flightTime, restTime):
self.name = name
self.speed = speed
self.flightTime = flightTime
self.restTime = restTime
#... | mit | -1,761,703,601,739,938,600 | 23.328571 | 94 | 0.600117 | false | 3.159555 | false | false | false |
sahilshekhawat/ApkDecompiler | javadecompiler/Krakatau/java/ast2.py | 1 | 3633 | from . import ast
from .stringescape import escapeString as escape
class MethodDef(object):
def __init__(self, class_, flags, name, desc, retType, paramDecls, body):
self.flagstr = flags + ' ' if flags else ''
self.retType, self.paramDecls = retType, paramDecls
self.body = body
self... | gpl-2.0 | -7,945,223,551,241,829,000 | 39.831461 | 100 | 0.56262 | false | 3.889722 | false | false | false |
apieum/inxpect | inxpect/expect/property.py | 1 | 1966 | # -*- coding: utf8 -*-
from .chain import AndChain
from .operator import *
from .should import Should, ShouldNot
class DefaultProperty(object):
def __init__(self, getter=None, returns=AndChain):
self.should = Should(getter, returns)
self.should_not = ShouldNot(getter, returns)
def equal_to(se... | lgpl-3.0 | -9,122,398,435,168,640,000 | 31.229508 | 65 | 0.671414 | false | 3.737643 | false | false | false |
Jumpscale/core9 | JumpScale9/clients/tarantool/templates/python/model.py | 1 | 3184 | from js9 import j
import os
import capnp
# import msgpack
import base64
ModelBaseCollection = j.data.capnp.getModelBaseClassCollection()
ModelBase = j.data.capnp.getModelBaseClass()
# from JumpScale9.clients.tarantool.KVSInterface import KVSTarantool
class $NameModel(ModelBase):
'''
'''
def __init__(sel... | apache-2.0 | -5,462,478,332,331,678,000 | 35.181818 | 141 | 0.618719 | false | 3.553571 | false | false | false |
dann/python-classpluggable | setup.py | 1 | 1506 | import os
import sys
from setuptools import setup, find_packages
if sys.version_info[:2] < (2, 6):
raise RuntimeError('Requires Python 2.6 or better')
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.r... | bsd-3-clause | 6,244,364,089,358,640,000 | 27.980769 | 70 | 0.605578 | false | 3.911688 | false | true | false |
Onager/l2tdevtools | l2tdevtools/dependency_writers/dpkg.py | 1 | 4671 | # -*- coding: utf-8 -*-
"""Writer for Debian packaging (dpkg) files."""
from __future__ import unicode_literals
import io
import os
from l2tdevtools.dependency_writers import interface
class DPKGCompatWriter(interface.DependencyFileWriter):
"""Dpkg compat file writer."""
PATH = os.path.join('config', 'dpkg', ... | apache-2.0 | -5,977,090,796,422,307,000 | 30.348993 | 75 | 0.627917 | false | 3.522624 | false | false | false |
redhat-cip/dci-control-server | tests/api/v1/test_jobs_update.py | 1 | 1718 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -6,182,659,063,903,803,000 | 39.904762 | 77 | 0.658324 | false | 3.342412 | false | false | false |
fossfreedom/alternative-toolbar | alttoolbar_sidebar.py | 1 | 22724 | # -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*-
#
# Copyright (C) 2015 - 2020 David Mohammed <fossfreedom@ubuntu.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation... | gpl-3.0 | -7,948,833,192,442,559,000 | 34.673469 | 97 | 0.573271 | false | 4.070213 | false | false | false |
ebt-hpc/cca | cca/scripts/outlining_queries_fortran.py | 1 | 19126 | #!/usr/bin/env python3
'''
A script for outlining Fortran programs
Copyright 2013-2018 RIKEN
Copyright 2018-2019 Chiba Institute of Technology
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 Lice... | apache-2.0 | -5,018,884,159,477,743,000 | 23.583548 | 100 | 0.536547 | false | 3.068999 | false | false | false |
kpbochenek/empireofcode | non_unique.py | 1 | 1121 | # kpbochenek@gmail.com
def non_unique(data):
result = []
diff = 32
for d in data:
if data.count(d) > 1:
result.append(d)
elif type(d) is str and data.count(d) + data.count(chr(ord(d) + diff)) > 1:
result.append(d)
elif type(d) is str and data.count(d) + data.... | apache-2.0 | -4,089,713,566,800,570,000 | 39.035714 | 97 | 0.484389 | false | 2.7543 | false | false | false |
cloud9ers/j25framework | j25/loaders/reloader.py | 1 | 5047 | # Python Module Reloader
#
# Copyright (c) 2009, 2010 Jon Parise <jon@indelible.org>
#
# 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 ri... | lgpl-3.0 | 8,412,264,403,082,464,000 | 33.813793 | 99 | 0.607886 | false | 4.486222 | false | false | false |
sxjscience/tvm | python/tvm/topi/nn/dilate.py | 1 | 2528 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 205,081,130,815,146,940 | 34.111111 | 99 | 0.645174 | false | 3.750742 | false | false | false |
googleapis/python-talent | google/cloud/talent_v4beta1/services/tenant_service/transports/base.py | 1 | 9841 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 7,331,914,839,858,532,000 | 36.418251 | 103 | 0.603292 | false | 4.356352 | false | false | false |
enrimatta/RU_Python_IV | labs/lab_objects.py | 1 | 1675 | #!/usr/bin/env python
# *-* coding:utf-8 *-*
"""
:mod:`lab_objects` -- Objects in Python
=========================================
LAB Objects Learning Objective: Explore objects in Python and how everything in Python
is an object.
a. Fill in the series of functions below that determ... | gpl-2.0 | 3,440,704,479,022,479,000 | 26.016129 | 95 | 0.588657 | false | 3.657205 | false | false | false |
nesaro/driza | pyrqt/carga/operaciones/anova.py | 1 | 3082 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#Copyright (C) 2006-2008 Inmaculada Luengo Merino, Néstor Arocha Rodríguez
#This file is part of pyrqt.
#
#pyrqt 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; eithe... | gpl-2.0 | 3,244,386,289,570,607,000 | 35.642857 | 77 | 0.707602 | false | 2.973913 | false | false | false |
blockstack/blockstack-server | integration_tests/blockstack_integration_tests/scenarios/namespace_preorder_reveal_import_multi_ready.py | 1 | 3316 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Blockstack
~~~~~
copyright: (c) 2014-2015 by Halfmoon Labs, Inc.
copyright: (c) 2016 by Blockstack.org
This file is part of Blockstack
Blockstack is free software: you can redistribute it and/or modify
it under the terms of the GNU General... | gpl-3.0 | -1,843,037,481,361,064,400 | 33.541667 | 144 | 0.676116 | false | 2.870996 | true | false | false |
iLoop2/ResInsight | ThirdParty/Ert/devel/python/python/ert/enkf/plot_data/pca_plot_vector.py | 1 | 2288 | from ert.cwrap import BaseCClass, CWrapper
from ert.enkf import ENKF_LIB
from ert.util import Matrix
class PcaPlotVector(BaseCClass):
def __init__(self, component, principal_component_matrix, observation_principal_component_matrix):
assert isinstance(component, int)
assert isinstance(principal_co... | gpl-3.0 | -3,688,779,641,078,196,700 | 35.903226 | 131 | 0.693182 | false | 3.591837 | false | false | false |
gauravbose/digital-menu | digimenu2/restaurant/migrations/0030_kitchen_usertable.py | 1 | 1126 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('restaurant', '0029_cart'),
]
ope... | bsd-3-clause | 7,702,231,826,981,313,000 | 34.1875 | 174 | 0.563055 | false | 4.139706 | false | false | false |
hammerhorn/working | cjh/letter.py | 1 | 3270 | #coding=utf8
import time
from cjh.music import Pitch, Note
from cjh.misc import speak
"""
translate the Roman alphabet into, e.g.,
radiophonic words, morse code, braille, etc....
"""
class Letter(object):
"""
convert between different forms of Roman-alphabet letters
"""
morse_dict = {
'1':'.---... | gpl-3.0 | 8,146,375,046,475,646,000 | 21.661972 | 75 | 0.306712 | false | 2.955005 | false | false | false |
Royal-Society-of-New-Zealand/NZ-ORCID-Hub | orcid_api_v3/models/work_summary_v30_rc1.py | 1 | 13920 | # coding: utf-8
"""
ORCID Member
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: Latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | mit | 3,248,907,714,498,165,000 | 30.422122 | 728 | 0.599282 | false | 3.651626 | false | false | false |
catapult-project/catapult | telemetry/telemetry/internal/image_processing/_bitmap.py | 3 | 8267 | # Copyright 2013 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.
"""
Bitmap is a basic wrapper for image pixels. It includes some basic processing
tools: crop, find bounding box of a color and compute histogram of color va... | bsd-3-clause | 5,840,911,145,013,504,000 | 32.605691 | 80 | 0.637958 | false | 3.656347 | false | false | false |
mdshw5/strandex | setup.py | 1 | 1338 | from setuptools import setup
install_requires = ['six']
def get_version(string):
""" Parse the version number variable __version__ from a script. """
import re
version_re = r"^__version__ = ['\"]([^'\"]*)['\"]"
version_str = re.search(version_re, string, re.M).group(1)
return version_str
setup(
... | mit | 6,688,157,721,223,414,000 | 37.228571 | 84 | 0.571749 | false | 3.970326 | false | false | false |
project-schumann/vmf-converter | tests/vmf_converter_test.py | 1 | 39224 | import unittest
import json
from music21 import converter
from music21 import duration
from music21.chord import Chord
from music21.meter import TimeSignature
from music21.note import Note, Rest
from music21.key import KeySignature
from music21.tempo import MetronomeMark
from vmf_converter.core import vmf_converter_c... | mit | 8,606,255,815,061,616,000 | 47.605948 | 130 | 0.642158 | false | 4.258387 | true | false | false |
cjgibson/mechkbot | bot.py | 1 | 61053 | # -*- coding: utf-8 -*-
###
# AUTHORS: CHRISTIAN GIBSON,
# PROJECT: /r/MechMarket Bot
# UPDATED: SEPTEMBER 11, 2015
# USAGE: python bot.py [-h / --help] [-is / --interactive-shell]
# EXPECTS: python 3.4.0
# beautifulsoup4 4.4.0
# praw 3.2.1
# regex 2015.06.24
###
import argparse
import bs4... | gpl-2.0 | 7,135,524,112,241,807,000 | 48.879902 | 99 | 0.415147 | false | 5.08436 | true | false | false |
quaquel/EMAworkbench | ema_workbench/examples/cart_flu_example.py | 1 | 1172 | '''
Created on May 26, 2015
@author: jhkwakkel
'''
import matplotlib.pyplot as plt
import ema_workbench.analysis.cart as cart
from ema_workbench import ema_logging, load_results
ema_logging.log_to_stderr(level=ema_logging.INFO)
def classify(data):
# get the output for deceased population
result = data['dec... | bsd-3-clause | -5,965,908,289,611,535,000 | 21.980392 | 61 | 0.726109 | false | 3.167568 | false | false | false |
kdart/pycopia3 | net/pycopia/http/jsonrpc1.py | 1 | 3487 | #!/usr/bin/python3.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
#
# 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 r... | apache-2.0 | -5,706,128,941,765,622,000 | 29.060345 | 110 | 0.641526 | false | 3.878754 | false | false | false |
ty-tal/python | tools/user_audit.py | 1 | 2470 | #!/usr/bin/python2.7 -Wd
'''
file:user_audit.py
use: audits users table and compares current date to last password update
if last update exceeds threshold send a notice to users
author: ty.talmadge@gmail.com
date: 20131002
connector: mysqldb because the SQL only changes per table layout
'''
# define imported librar... | gpl-3.0 | 1,133,495,115,821,487,400 | 35.880597 | 134 | 0.738462 | false | 3.166667 | false | false | false |
sargentfrancesca/coming-up-roses | client_site/models.py | 1 | 1300 | from __future__ import unicode_literals
from django.db import models
# Create your models here.
# copy nano lib/python2.7/site-packages/pinax_theme_bootstrap folder
class Category(models.Model):
category_name = models.CharField(max_length=100)
category_description = models.TextField()
def __str__(self):
return... | mit | -7,982,091,275,539,703,000 | 31.525 | 88 | 0.736154 | false | 3.037383 | false | false | false |
mvcsantos/QGIS | python/plugins/processing/algs/qgis/RasterLayerHistogram.py | 1 | 3219 | # -*- coding: utf-8 -*-
"""
***************************************************************************
RasterLayerHistogram.py
---------------------
Date : January 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
*****************... | gpl-2.0 | -4,066,943,660,711,654,000 | 34.373626 | 75 | 0.558559 | false | 4.379592 | false | false | false |
Kelfast/mamba-framework | mamba/web/page.py | 1 | 10483 | # -*- test-case-name: mamba.test.test_web -*-
# Copyright (c) 2012 - 2013 Oscar Campos <oscar.campos@member.fsf.org>
# See LICENSE for more details
"""
.. module: page
:platform: Unix, Windows
:synopsis: The Page object is the main web application entry point
.. moduleauthor:: Oscar Campos <oscar.campos@membe... | gpl-3.0 | -775,358,922,251,888,300 | 32.707395 | 79 | 0.610417 | false | 4.522433 | true | false | false |
geonition/base_page | base_page/admin.py | 1 | 1467 | """
Admin classes for base_page related models
"""
from django.contrib.gis import admin
from django.core.urlresolvers import reverse_lazy
from base_page.forms import OrganizationSettingForm
from base_page.models import Feedback
from base_page.models import OrganizationSetting
from django.conf import settings
from model... | mit | 6,753,025,144,731,848,000 | 37.605263 | 93 | 0.632584 | false | 4.486239 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.