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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
edx/course-discovery | course_discovery/apps/course_metadata/migrations/0068_auto_20171108_1614.py | 1 | 1536 | # Generated by Django 1.11.3 on 2017-11-08 16:14
import django.db.models.deletion
import django_extensions.db.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0007_auto_20171004_1133'),
('course_metadata', '0067_auto_20171108_1432... | agpl-3.0 | 411,203,014,936,770,100 | 44.176471 | 149 | 0.63151 | false | 4.020942 | false | false | false |
AfricaChess/lichesshub | grandprix/migrations/0002_auto_20171110_0640.py | 1 | 1439 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-10 06:40
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('grandprix', '0001_initial'),
]
operations = [
... | mit | 9,022,895,200,339,313,000 | 33.261905 | 123 | 0.565671 | false | 4.232353 | false | false | false |
satyrius/cmsplugin-articles | cmsplugin_articles/migrations/0001_initial.py | 1 | 1615 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '0003_auto_20140926_2347'),
]
operations = [
migrations.CreateModel(
name='ArticlesPlugin',
fi... | mit | -328,105,361,709,691,460 | 39.375 | 159 | 0.567802 | false | 4.400545 | false | false | false |
minlexx/pyevemon | esi_client/models/get_characters_character_id_killmails_recent_200_ok.py | 1 | 4307 | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.4.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class GetCharactersCharacterIdKillmailsRecent200Ok(object):
... | gpl-3.0 | -4,276,356,936,466,362,400 | 28.29932 | 101 | 0.572788 | false | 4.226693 | false | false | false |
ychaim/explorer | addresses/views.py | 1 | 33766 | from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.contrib.auth import login
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext_lazy as _
from django.utils.timezone i... | apache-2.0 | 4,320,673,146,313,630,000 | 41.313283 | 185 | 0.572825 | false | 4.469358 | false | false | false |
CalebBell/ht | ht/conv_free_immersed.py | 1 | 58245 | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@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... | mit | 6,765,372,046,632,319,000 | 33.813509 | 107 | 0.621733 | false | 3.161374 | false | false | false |
thijsmie/imp_flask | imp_flask/extensions.py | 1 | 1038 | """Flask and other extensions instantiated here.
To avoid circular imports with views and create_app(), extensions are instantiated here. They will be initialized
(calling init_app()) in application.py.
"""
from logging import getLogger
from flask_mail import Mail
from flask_sqlalchemy import SQLAlchemy
fr... | mit | 1,401,830,091,470,726,700 | 30.4375 | 120 | 0.728324 | false | 3.844444 | false | false | false |
leonid-shevtsov/ClickableUrls_SublimeText | clickable_urls.py | 1 | 5787 | import sublime
import sublime_plugin
import webbrowser
import threading
class UrlHighlighter(sublime_plugin.EventListener):
# Thanks Jeff Atwood http://www.codinghorror.com/blog/2008/10/the-problem-with-urls.html
# ^ that up here is a URL that should be matched
URL_REGEX = "\\bhttps?://[-A-Za-z0-9+&@#/%?=... | mit | -7,902,812,575,243,236,000 | 38.636986 | 128 | 0.632625 | false | 3.671954 | false | false | false |
iniweb/deployCD | app/views.py | 1 | 4840 | from flask import render_template, flash, url_for, request, redirect, session
from flask_login import login_user, logout_user, current_user, login_required
from app import app, db, gitlab, login_manager
from forms import ProjectForm
from models import User, Project, ROLE_USER, ROLE_ADMIN
import copy
import ansible.ru... | mit | 3,487,567,261,366,403,000 | 26.816092 | 120 | 0.66157 | false | 3.556209 | false | false | false |
394954369/horizon | openstack_dashboard/dashboards/project/images/images/forms.py | 1 | 11525 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 | 7,588,015,271,839,535,000 | 43.157088 | 78 | 0.531453 | false | 4.754538 | false | false | false |
alexpeattie/wethepeopletoolkit | wethepeopletoolkit/clusterer.py | 1 | 2828 | import pandas
import numpy as np
import click
from bitstring import BitArray
from base58 import b58encode_int, b58decode_int
class Clusterer:
def __init__(self):
pass
def cluster(self, n, state_processor, pca = False, model_type = 'kmeans', z_score_exclude = 0.0, seed = None, quiet = False):
from sklearn.... | mit | -3,378,057,671,160,845,000 | 41.223881 | 323 | 0.642857 | false | 3.114537 | false | false | false |
bkidwell/wshare | wshare.py | 1 | 4231 | # See https://github.com/bkidwell/wshare
import argparse
import subprocess
import re
import sys
from wshare_config import config
def getConnDict():
txt = subprocess.getoutput('net use')
if re.search(r'There are no entries in the list\.', txt):
return dict()
match = re.search(r'--------.*\n([\w\W]*... | mit | 739,811,618,023,276,800 | 30.81203 | 111 | 0.509572 | false | 3.794619 | false | false | false |
wasim21k/pihome | cron/port_scanner.py | 1 | 1392 | #!/usr/bin/env python
#TheZero
#This code is under Public Domain
#ref: https://gist.github.com/TheZ3ro/7255052
from threading import Thread
import socket
import os, re, time, sys, subprocess
class bc:
HEADER = '\033[0;36;40m'
ENDC = '\033[0m'
SUB = '\033[3;30;45m'
WARN = '\033[0;31;40m'
GREEN = '\033[0;32;40m'
o... | gpl-3.0 | -1,480,537,210,011,121,200 | 21.819672 | 63 | 0.623563 | false | 2.433566 | false | false | false |
datawire/quark | quarkc/backend.py | 1 | 34267 | # Copyright 2015 datawire. 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 agr... | apache-2.0 | 6,072,187,217,217,607,000 | 34.181725 | 118 | 0.538857 | false | 3.809137 | false | false | false |
heromod/migrid | mig/simulation/user.py | 1 | 2151 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# user - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the ... | gpl-2.0 | -7,407,505,360,815,817,000 | 24.607143 | 81 | 0.621571 | false | 3.753927 | false | false | false |
googleapis/python-pubsublite | google/cloud/pubsublite_v1/services/subscriber_service/transports/grpc_asyncio.py | 1 | 11672 | # -*- 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 | -8,276,490,674,875,871,000 | 43.549618 | 87 | 0.620459 | false | 4.729335 | false | false | false |
pbvarga1/qimage2ndarray | qimage2ndarray/__init__.py | 1 | 14973 | import sys as _sys
import numpy as _np
from .dynqt import QtGui as _qt
from .dynqt import qt as _qt_driver
if _qt_driver.name() == 'PythonQt':
from .qimageview import QImage2ndarray as _temp
_qimageview = _temp.qimageview
else:
from .qimageview_python import qimageview as _qimageview
__version__ = "1.5"
... | bsd-3-clause | 2,436,135,751,722,920,000 | 36.153846 | 165 | 0.645896 | false | 3.620164 | false | false | false |
Backflipz/plugin.video.excubed | addon.py | 1 | 81609 | from whoosh.index import create_in
# from xbmcswift2 import Plugin
from kodiswift import Plugin
import os
import sys
import re
import json
import xbmc
import xbmcaddon
import xbmcplugin
import xbmcgui
import threading
import glob
import shlex
from BeautifulSoup import BeautifulSoup as BS
from whoosh.filedb.filestore im... | gpl-2.0 | 2,370,805,098,750,441,500 | 39.784108 | 141 | 0.451372 | false | 4.065003 | false | false | false |
alkurbatov/squirrel | src/convert.py | 1 | 1073 | # This file is a part of Squirrel project
#
# Copyright (C) 2014, Alexander Kurbatov <sir.alkurbatov@yandex.ru>
#
# Squirrel is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
... | gpl-3.0 | 9,016,646,689,706,981,000 | 28.805556 | 70 | 0.657036 | false | 3.241692 | false | false | false |
dyermd/legos | scripts/QC/merger.py | 1 | 14082 | #! /usr/bin/env python
# Goal: Merge and run coverage analysis on the two Samples generated.
# Output: A mered bam file, and coverage analysis on the merged bam file.
from optparse import OptionParser
import os
import os.path
import sys
import re
import datetime
import json
from QC_Run import QC_Run
from tools impo... | gpl-2.0 | 7,565,517,798,160,435,000 | 48.066202 | 186 | 0.684704 | false | 3.105182 | false | false | false |
taoistly/dec | dec.py | 1 | 11798 | import shutil
import os
import time
import suffixtree
def scan_kmer(read):
global K
offset, seq1, seq2 = read.split("\t")
ret = []
for base in seq1:
if base not in "ACGTN": return ret
for base in seq2:
if base not in "ACGTN": return ret
for idx in range(len(seq1) - K + 1):
... | mit | -735,112,777,300,059,300 | 41.746377 | 136 | 0.515765 | false | 3.221737 | false | false | false |
guaq/paikkis | model.py | 1 | 3427 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
0 paikannimi
1 nimen kielikoodi
2 kielen nimi
3 paikkatyypin koodi
4 paikkatyypin selite
5 kkj/pkj pohjoinen
6 kkj/pkj itä
7 kkj/ykj pohjoinen
8 kkj/ykj itä
9 etrs/tm35fin pohjoinen
10 etrs/tm35fin itä
11 kuntakoodi
12 ku... | mit | -5,161,143,840,188,040,000 | 32.821782 | 338 | 0.605679 | false | 2.743775 | false | false | false |
yusihao51/Minecraft | views.py | 1 | 24491 | # -*- coding: utf-8 -*-
# Imports, sorted alphabetically.
# Python packages
import os
import socket
import subprocess
import sys
import datetime
from math import sin, pi
# Third-party packages
import pyglet
from pyglet.text import Label
from pyglet.gl import *
# Modules from this project
import globals as G
from gu... | mit | 5,070,663,446,137,972,000 | 37.507862 | 350 | 0.613695 | false | 3.388351 | false | false | false |
danieljabailey/inkscape_experiments | share/extensions/fractalize.py | 1 | 3762 | #!/usr/bin/env python
'''
Copyright (C) 2005 Carsten Goetze c.goetze@tu-bs.de
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
... | gpl-2.0 | 2,135,665,781,079,177,200 | 37.783505 | 99 | 0.542265 | false | 3.743284 | false | false | false |
Octonius/boxv2 | boxv2/session.py | 1 | 18801 | from .request import BoxRestRequest
from .upload import MultipartUploadWrapper
from .exceptions import BoxError, BoxHttpResponseError
class BoxSession(object):
"""Manage files and folder from Box.
When you instanciate this class you have to provide at least the Refresh Token (found with :class:`BoxAuthentica... | mit | -432,496,499,673,475,100 | 35.225434 | 294 | 0.55013 | false | 4.678029 | false | false | false |
GrognardsFromHell/TemplePlus | tpdatasrc/co8infra/scr/Spell307 - Meteor Swarm.py | 1 | 3572 | from toee import *
from utilities import *
def OnBeginSpellCast( spell ):
print "Meteor Swarm OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
game.particles( "sp-evocation-conjure", spell.caster )
def OnSpellEffect( spell )... | mit | -3,126,905,346,155,246,600 | 40.068966 | 177 | 0.69037 | false | 2.571634 | false | false | false |
eriknyk/devcon | devcon/lib/orderColumn.py | 1 | 1133 | from tg import expose, flash, require, url, request, redirect, validate, response
from sqlalchemy import asc, desc
from tw.forms.datagrid import Column
import genshi
class SortableColumn(Column):
def __init__(self, title, name):
super(SortableColumn, self).__init__(name)
self._title_ = title
d... | lgpl-2.1 | -7,254,929,501,285,495,000 | 34.40625 | 113 | 0.595763 | false | 3.880137 | false | false | false |
computationalBiology/NPLB | NPLB/savefiles.py | 1 | 14566 |
##################### NPLB #####################
# No Promoter Left Behind (NPLB) is a tool to
# find the different promoter architectures within a set of promoter
# sequences. More information can be found in the README file.
# Copyright (C) 2015 Sneha Mitra and Leelavati Narlikar
# NPLB is free so... | gpl-3.0 | -7,730,404,251,325,200,000 | 48.883562 | 365 | 0.532885 | false | 2.97144 | false | false | false |
RedhawkSDR/integration-gnuhawk | components/deinterleave_bb_4o/tests/test_deinterleave_bb_4o.py | 1 | 4079 | #!/usr/bin/env python
#
# This file is protected by Copyright. Please refer to the COPYRIGHT file
# distributed with this source distribution.
#
# This file is part of GNUHAWK.
#
# GNUHAWK is free software: you can redistribute it and/or modify is under the
# terms of the GNU General Public License as published by ... | gpl-3.0 | 8,618,088,849,222,091,000 | 46.988235 | 133 | 0.593038 | false | 4.414502 | true | false | false |
mortonjt/American-Gut | scripts/mod2_pcoa.py | 1 | 14487 | #!/usr/bin/env python
import os
import click
from matplotlib import use
use('Agg') # noqa
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from skbio import read, DistanceMatrix
from skbio.stats import isubsample
from skbio.stats.ordination import OrdinationResults
from col... | bsd-3-clause | -6,790,581,772,316,809,000 | 40.03966 | 79 | 0.58908 | false | 3.449286 | false | false | false |
Skydes/Monitoring | src/capture.py | 1 | 4332 | #!/usr/bin/env python
'''
Copyright (c) 2016, Paul-Edouard Sarlin
All rights reserved.
Project: Autonomous Monitoring System
File: capture.py
Date: 2016-08-08
Author: Paul-Edouard Sarlin
Website: https://github.com/skydes/monitoring
'''
from multiprocessing imp... | bsd-3-clause | 8,370,857,560,826,415,000 | 31.088889 | 150 | 0.511311 | false | 4.415902 | false | false | false |
mpercich/Calendarize | ios/dateparser/lib/python2.7/site-packages/convertdate/julianday.py | 1 | 1740 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of convertdate.
# http://github.com/fitnr/convertdate
# Licensed under the GPL-v3.0 license:
# http://opensource.org/licenses/MIT
# Copyright (c) 2016, fitnr <fitnr@fakeisthenewreal>
from datetime import datetime
from . import gregorian
from . import ... | mit | -8,246,665,454,322,578,000 | 23.166667 | 92 | 0.624713 | false | 2.885572 | false | false | false |
zacharyvoase/zrpc | tests/server_test.py | 1 | 4208 | from __future__ import with_statement
from contextlib import contextmanager
from Queue import Queue
import threading
from bson import BSON
from nose.tools import assert_equal
import zmq
from zrpc.concurrency import Callback
from zrpc.server import Server
from zrpc.registry import Registry
REGISTRY = Registry()
c... | unlicense | -380,070,639,397,219,400 | 29.492754 | 94 | 0.568679 | false | 4.113392 | false | false | false |
KarlTDebiec/Ramaplot | PDistDataset.py | 1 | 20943 | # -*- coding: utf-8 -*-
# ramaplot.PDistDataset.py
#
# Copyright (C) 2015 Karl T Debiec
# All rights reserved.
#
# This software may be modified and distributed under the terms of the
# BSD license. See the LICENSE file for details.
"""
Manages probability distribution datasets.
"""
##########################... | bsd-3-clause | 1,198,580,034,747,305,000 | 43.743041 | 80 | 0.494664 | false | 4.005943 | false | false | false |
mattcieslak/DSI2 | dsi2/ui/volume_slicer.py | 1 | 10860 | #!/usr/bin/env python
import numpy as np
import nibabel as nib
# Traits stuff
from traits.api import ( HasTraits, Instance, Array,
Bool, Dict, on_trait_change, Range, Color, Any, Int,
DelegatesTo, CInt, Property, File )
from traitsui.api import View, Item, VGroup, \
HGroup, Group, RangeEditor, ColorEdito... | gpl-3.0 | -7,945,498,863,849,230,000 | 33.699681 | 89 | 0.550829 | false | 3.770833 | false | false | false |
achak1987/greenroute | src/google.py | 1 | 8516 | '''
@author: Antorweep Chakravorty
'''
import googlemaps
import rapidjson as json
import pickle
import pprint
from datetime import datetime
from vertex import vertex
from edge import edge
class GoogleMapsAPI(object):
def __init__(self, username, password, app_id, app_token):
self.username = username
... | mit | -5,904,404,823,734,875,000 | 39.746411 | 136 | 0.486731 | false | 4.489193 | false | false | false |
liszd/whyliam.workflows.youdao | urllib3/packages/rfc3986/_mixin.py | 1 | 13255 | """Module containing the implementation of the URIMixin class."""
import warnings
from . import exceptions as exc
from . import misc
from . import normalizers
from . import validators
class URIMixin(object):
"""Mixin with all shared methods for URIs and IRIs."""
__hash__ = tuple.__hash__
def authority_... | mit | 3,825,426,568,369,881,600 | 34.727763 | 78 | 0.572312 | false | 4.592862 | false | false | false |
tarak/django-change-email | change_email/models.py | 1 | 7639 | from datetime import timedelta
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from django.core.mail import EmailMultiAlternatives
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.db import models
from django.template.loade... | bsd-3-clause | 3,157,295,114,515,443,000 | 35.37619 | 87 | 0.645765 | false | 4.301239 | false | false | false |
qgis/QGIS-Django | qgis-app/styles/migrations/0008_auto_20201215_2124.py | 1 | 2000 | # Generated by Django 2.2.13 on 2020-12-15 21:24
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('styles', '0007_auto_20201109_0112'),
]
operations = [
migrations.AlterFie... | gpl-2.0 | -8,970,080,980,762,410,000 | 43.444444 | 190 | 0.6405 | false | 4.310345 | false | false | false |
alexhayes/django-geopostcodes | django_geopostcodes/helpers.py | 1 | 1155 | # -*- coding: utf-8 -*-
"""
django_geopostcodes.helpers
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Helper functions for django-geopostcodes.
"""
from __future__ import absolute_import, print_function, unicode_literals
import csv
from django.contrib.gis.geos import Point
from django.db.transaction import atomic
from .m... | mit | 4,832,721,024,787,421,000 | 25.25 | 72 | 0.547186 | false | 4.529412 | false | false | false |
rtfd/readthedocs.org | readthedocs/embed/views.py | 1 | 13361 | """Views for the embed app."""
import functools
import json
import logging
import re
from urllib.parse import urlparse
from django.shortcuts import get_object_or_404
from django.template.defaultfilters import slugify
from django.utils.functional import cached_property
from docutils.nodes import make_id
from pyquery i... | mit | -5,494,567,154,929,641,000 | 30.733967 | 145 | 0.565569 | false | 4.096903 | false | false | false |
clickbeetle/portage-cb | pym/portage/dbapi/bintree.py | 1 | 44915 | # Copyright 1998-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = ["bindbapi", "binarytree"]
import portage
portage.proxy.lazyimport.lazyimport(globals(),
'portage.checksum:hashfunc_map,perform_multiple_checksums,' + \
'verify_all,_apply_hash_filter,_hash_filter',... | gpl-2.0 | -7,462,835,677,793,273,000 | 30.585795 | 91 | 0.652544 | false | 2.932363 | false | false | false |
hhj0325/pystock | com/hhj/sogou/countByTime.py | 1 | 1082 | """
选取发布时间为2018年的文章,并对其进行月份统计
"""
import numpy as np
import pandas as pd
from pyecharts import Bar
df = pd.read_csv('sg_articles.csv', header=None, names=["title", "article", "name", "date"])
list1 = []
list2 = []
for j in df['date']:
# 获取文章发布年份及月份
time_1 = j.split('-')[0]
time_2 = j.split('-')[1]
lis... | apache-2.0 | 4,181,870,580,663,964,700 | 27.333333 | 92 | 0.641328 | false | 2.162037 | false | false | false |
szarvas/anc-field | examples/ie224-impulse.py | 1 | 5152 | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal, stats
import sys
sys.path.append('..')
from anc_field_py.ancfield import *
from anc_field_py.ancutil import *
def add_microphones(ancObject):
# error_mic
ancObject.AddMic([4,1... | gpl-3.0 | -1,775,381,104,183,834,000 | 28.44 | 75 | 0.646545 | false | 2.813763 | false | false | false |
minersoft/httpd_logs | apache_log.py | 1 | 13255 | #
# Copyright Michael Groys, 2014
#
from ncsa_log import NCSALogFormat, NCSALogRecord, FieldNotDefinedException
from m.utilities import mergeDictionaries
import re
class ApacheLogFormat(NCSALogFormat):
idpattern = r"\>?[a-zA-Z]|\{[-\w]+\}[ieoC]"
# continue field numbering after NCSA basic fields
START_... | bsd-3-clause | -8,697,373,372,509,737,000 | 38.335312 | 229 | 0.608751 | false | 3.312094 | true | false | false |
globalpolicy/pyWall | main.py | 1 | 6745 | # Author : globalpolicy
# Date : March 2-4, 2017
# Script : pyWall
# Description : Change windows wallpaper
# Python : 3.5
# Blog : c0dew0rth.blogspot.com
import requests
from bs4 import BeautifulSoup
import random
import shutil # for copying raw image data(a file-like object) to an actual image file
i... | mit | -8,944,200,180,740,626,000 | 37.215116 | 124 | 0.630689 | false | 3.979351 | false | false | false |
teamfx/openjfx-8u-dev-rt | modules/web/src/main/native/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py | 1 | 4331 | #!/usr/bin/env python
#
# Copyright (c) 2014, 2016 Apple Inc. All rights reserved.
# Copyright (c) 2014 University of Washington. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributio... | gpl-2.0 | -8,505,268,923,321,353,000 | 42.747475 | 177 | 0.704918 | false | 4.283877 | false | false | false |
digitalocean/netbox | netbox/secrets/models.py | 1 | 14739 | import os
from Crypto.Cipher import AES
from Crypto.PublicKey import RSA
from Crypto.Util import strxor
from django.conf import settings
from django.contrib.auth.hashers import make_password, check_password
from django.contrib.auth.models import Group, User
from django.contrib.contenttypes.fields import GenericForeign... | apache-2.0 | -4,090,337,497,129,936,000 | 33.68 | 120 | 0.619581 | false | 4.29458 | false | false | false |
5nizza/party-elli | synthesis/model_k_searcher.py | 1 | 1140 | import logging
from helpers.logging_helper import log_entrance
from interfaces.LTS import LTS
from interfaces.solver_interface import SolverInterface
from synthesis.coreach_encoder import CoreachEncoder
from synthesis.smt_format import make_check_sat
@log_entrance()
def search(min_size:int, max_size:int,
... | mit | 5,410,120,537,181,015,000 | 30.666667 | 79 | 0.635965 | false | 3.619048 | false | false | false |
qdonnellan/django_emailoto | emailoto/config.py | 1 | 1065 | from django.conf import settings
class EmailOtoConfig(object):
def __init__(self):
"""Read from settings.py and apply defaults (or raise exceptions.)"""
self.redis_host = settings.EMAILOTO.get('redis_host', 'localhost')
self.redis_port = settings.EMAILOTO.get('redis_port', 6379)
... | mit | -8,496,874,060,864,339,000 | 29.428571 | 77 | 0.630986 | false | 3.75 | true | false | false |
ragupta-git/ImcSdk | imcsdk/mometa/equipment/EquipmentSystemIOController.py | 1 | 2755 | """This module contains the general information for EquipmentSystemIOController ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class EquipmentSystemIOControllerConsts:
ADMIN_POWER_CMC_REBOOT = "cmc-reboot"
ADMIN_POWER_... | apache-2.0 | -862,146,203,412,341,400 | 43.435484 | 309 | 0.625408 | false | 3.532051 | false | false | false |
aerosara/thesis | notebooks_archive_10112014/pycse Examples.py | 1 | 2176 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=3>
# Example from pycse 1
# <codecell>
# copied from http://kitchingroup.cheme.cmu.edu/blog/tag/events/
from pycse import odelay
import matplotlib.pyplot as plt
import numpy as np
def ode(Y,x):
y1, y2 = Y
dy1dx = y2
dy2dx = -y1
... | mit | 5,269,726,309,331,049,000 | 18.781818 | 102 | 0.628676 | false | 2.498278 | false | false | false |
mtsgrd/PynamoDB2 | pynamodb/connection/table.py | 1 | 7391 | """
PynamoDB Connection classes
~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from .base import Connection
class TableConnection(object):
"""
A higher level abstraction over botocore
"""
def __init__(self, table_name, region=None, host=None):
self._hash_keyname = None
self._range_keyname = None
... | mit | 4,248,419,250,073,645,600 | 34.533654 | 112 | 0.557705 | false | 4.722684 | false | false | false |
BeegorMif/HTPC-Manager | autoProcessTV/mediaToSickbeard.py | 1 | 6654 | #!/usr/bin/env python2
import sys
import os
import time
import ConfigParser
import logging
sickbeardPath = os.path.split(os.path.split(sys.argv[0])[0])[0]
sys.path.append(os.path.join( sickbeardPath, 'lib'))
sys.path.append(sickbeardPath)
configFilename = os.path.join(sickbeardPath, "config.ini")
import requests
con... | gpl-3.0 | 1,972,086,942,503,040,300 | 31.617647 | 134 | 0.628194 | false | 3.522499 | true | false | false |
victorpoughon/master-thesis | python/outlier_analysis.py | 1 | 1365 | #!/usr/bin/env python3
import os
import os.path
import sys
import numpy as np
import matplotlib.pyplot as plt
from features_common import match_angle, base_plot
def outlier_frequency_plot(path, angles, threshold):
f, ax = base_plot()
ax.plot(100 * np.cumsum(np.abs(angles) > threshold) / angles.size)
ax.s... | mit | 2,286,111,514,915,068,000 | 34 | 98 | 0.605861 | false | 3.527132 | false | false | false |
dcf21/4most-4gp-scripts | src/scripts/synthesize_samples/synthesize_galah_with_microturbulence.py | 1 | 4084 | #!../../../../virtualenv/bin/python3
# -*- coding: utf-8 -*-
# NB: The shebang line above assumes you've installed a python virtual environment alongside your working copy of the
# <4most-4gp-scripts> git repository. It also only works if you invoke this python script from the directory where it
# is located. If these... | mit | 1,813,588,961,459,979,500 | 37.168224 | 119 | 0.643732 | false | 3.143957 | false | false | false |
SamHames/scikit-image | skimage/viewer/canvastools/base.py | 1 | 5472 | import numpy as np
try:
from matplotlib import lines
except ImportError:
pass
__all__ = ['CanvasToolBase', 'ToolHandles']
def _pass(*args):
pass
class CanvasToolBase(object):
"""Base canvas tool for matplotlib axes.
Parameters
----------
ax : :class:`matplotlib.axes.Axes`
Matpl... | bsd-3-clause | -8,322,848,763,189,975,000 | 30.448276 | 78 | 0.606725 | false | 3.965217 | false | false | false |
mmedenjak/hazelcast-client-protocol | py/__init__.py | 1 | 10457 | import keyword
import re
def py_types_encode_decode(t):
if t not in _py_types:
raise NotImplementedError("Missing type Mapping")
_pattern1 = re.compile("(.)([A-Z][a-z]+)")
_pattern2 = re.compile("([a-z0-9])([A-Z])")
def py_param_name(type_name):
type_name = _pattern1.sub(r"\1_\2", type_name)
t... | apache-2.0 | 2,040,683,131,968,967,400 | 44.864035 | 116 | 0.724969 | false | 3.843072 | true | false | false |
pirius/draught-board-puzzle-aka-checkerboard-puzzle-solver | python/source/checkerboardpuzzle_utils.py | 1 | 1570 | from numpy import array, rot90, fliplr, array_equal
from checkerboardpuzzle_stone import Rotation
def generate_rotated_nparrays(nparray):
"""generate rotated and mirrored versions of given nparray."""
r1 = rot90(nparray)
r2 = rot90(r1)
r3 = rot90(r2)
f1 = fliplr(nparray)
f2 = fliplr(r1)
f3 ... | lgpl-3.0 | 5,289,287,308,255,993,000 | 28.641509 | 81 | 0.593631 | false | 2.864964 | false | false | false |
seeba8/str8tssolver | field.py | 1 | 6062 | from square import Square
from street import Street
class Field:
def __init__(self, test=None):
self.streets = set()
if test != None:
blacks = test["blacks"]
values = test["values"]
self.squares = [Square(i, blacks[i] == "1", "123456789" if values[i] == "0" ... | gpl-3.0 | -2,845,258,074,390,722,000 | 31.945652 | 112 | 0.466678 | false | 3.868539 | false | false | false |
hashtag1138/pass_wallet | menutrousseau.py | 1 | 2983 | from error_handler import MyError, ErrorScreen0
from menu import Menu
import os, time
class Trousseau0(Menu):
def __init__(self, parent):
super().__init__(parent)
self.entrees = None
self.selected = 0
def loadPasswordList(self):
try:
# --- Open ---
conf_file = open('config.txt', 'r')
line = conf... | gpl-3.0 | -3,663,898,111,024,548,400 | 22.864 | 74 | 0.610795 | false | 3.117032 | false | false | false |
terranodo/geonode | geonode/base/models.py | 1 | 34374 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | 8,784,097,328,487,510,000 | 39.583235 | 120 | 0.616367 | false | 4.100931 | false | false | false |
orkestra-studios/nebuu-service | stats.py | 1 | 2397 | from datetime import date, datetime
from services import *
from collections import defaultdict
import sys
CATEGORIES = ["populerkultur", "yazmevsimi", "kismevsimi", "yesilcam", "emojiler", "gol", "turkdizileri", "evlilik", "para", "kultursanat", "sesinicikar", "ikililer", "okul", "taklit", "osmanli", "markalar", "parti... | gpl-3.0 | 4,208,475,431,737,372,000 | 33.242857 | 569 | 0.54902 | false | 2.91961 | false | false | false |
danmilon/fragofonias | app.py | 1 | 1092 | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.json import JSONEncoder
from datetime import date, datetime
import os
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://%s:%s@localhost/csa?charset=utf8' % (
os.environ['CSA_DB_USERNAME'], os.environ['CSA_DB... | mit | 2,123,392,683,379,252,500 | 28.513514 | 94 | 0.624542 | false | 3.580328 | false | false | false |
sambarluc/xmitgcm | setup.py | 1 | 1468 | #!/usr/bin/env python
import os
import re
import sys
import warnings
from setuptools import setup, find_packages
VERSION = '0.2.1'
DISTNAME = 'xmitgcm'
LICENSE = 'Apache'
AUTHOR = 'Ryan Abernathey'
AUTHOR_EMAIL = 'rpa@ldeo.columbia.edu'
URL = 'https://github.com/xgcm/xmitgcm'
CLASSIFIERS = [
'Development Status ... | mit | 8,516,770,780,736,620,000 | 27.784314 | 57 | 0.658719 | false | 3.50358 | false | false | false |
EuroPython/epcon | p3/management/commands/create_bulk_coupons.py | 1 | 2939 |
""" Create a batch of single use discount coupons from a CSV file.
Parameters: <conference> <csv-file>
Creates coupons based on the CSV file contents:
code - coupon code
max_usage - max. number of uses
items_per_usage - max number of items per use
value - value of the coupon in percent
de... | bsd-2-clause | 2,320,317,015,816,716,000 | 30.945652 | 79 | 0.539639 | false | 4.309384 | false | false | false |
mxOBS/deb-pkg_trusty_chromium-browser | third_party/chromite/lib/paygen/fixup_path.py | 1 | 1342 | # Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Helper for other scripts that need a PYTHONPATH entry for crostools.
Generally used by import statements of the form:
from chromite.lib.paygen i... | bsd-3-clause | 203,790,605,844,258,900 | 28.173913 | 77 | 0.717586 | false | 3.092166 | false | false | false |
levilucio/SyVOLT | GM2AUTOSAR_MM/Properties/from_eclipse/HP1_ConnectedLHS.py | 1 | 19004 | from core.himesis import Himesis, HimesisPreConditionPatternLHS
import uuid
class HP1_ConnectedLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HP1_ConnectedLHS.
"""
# Flag this ins... | mit | 5,550,988,573,478,345,000 | 51.788889 | 125 | 0.470375 | false | 5.183852 | false | false | false |
navcoindev/navcoin-core | qa/rpc-tests/txn_clone.py | 1 | 7549 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test proper accounting with an equivalent malleability clone
#
from test_framework.test_framework im... | mit | -8,845,441,044,191,796,000 | 46.477987 | 111 | 0.592794 | false | 3.693249 | true | false | false |
croxis/SpaceDrive | spacedrive/renderpipeline/rplibs/yaml/yaml_py3/composer.py | 1 | 5020 |
__all__ = ['Composer', 'ComposerError']
from .error import MarkedYAMLError
from .events import *
from .nodes import *
class ComposerError(MarkedYAMLError):
pass
class Composer:
def __init__(self):
self.anchors = {}
def check_node(self):
# Drop the STREAM-START event.
... | mit | 6,579,740,711,259,711,000 | 34.115108 | 89 | 0.564343 | false | 4.200837 | false | false | false |
benopotamus/steam-game-mover | main.py | 1 | 4905 | #!/usr/bin/env python
'''Allows easy moving (with symlinking) of folders to and from the SteamApps folder.
Intended for users with an SSD that cannot hold all their Steam games. Allows them to easily move games not currently being played to a slower drive easily. And then move them back at a later date. The symlinkin... | gpl-2.0 | -7,643,176,816,354,137,000 | 37.320313 | 287 | 0.733741 | false | 3.437281 | false | false | false |
FOSSRIT/lemonade-stand | LemonadeStand.py | 1 | 1785 | #!/usr/bin/env python
from fortuneengine.GameEngine import GameEngine
from LemonadeMain import LemonadeMain
from LemonadeGui import LemonadeGui
from optparse import OptionParser
from pygame import font
parser = OptionParser()
parser.add_option("", "--width", dest="width", help="window width",
metav... | gpl-3.0 | 6,978,417,313,381,393,000 | 39.568182 | 79 | 0.648179 | false | 3.506876 | false | true | false |
heroku/python-salesforce-client | salesforce/soap/base.py | 1 | 5676 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import logging
import urlparse
logger = logging.getLogger(__name__)
try:
import suds.client
if suds.__version__ < '0.6':
raise ImportError
except ImportError:
logger.error("The metadata API requires suds-jurko >= 0.6... | mit | 1,096,312,723,674,942,000 | 34.037037 | 80 | 0.570825 | false | 4.667763 | false | false | false |
elbeardmorez/quodlibet | quodlibet/quodlibet/ext/events/visualisations.py | 1 | 3329 | # -*- coding: utf-8 -*-
# Copyright 2017 Nick Boultbee
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
import os
impo... | gpl-2.0 | -5,147,228,131,064,625,000 | 31.320388 | 76 | 0.625713 | false | 3.765837 | false | false | false |
daicang/Leetcode-solutions | 004-median-of-two-sorted-arrays.py | 1 | 1417 | #!/usr/bin/python
class Solution(object):
def findMedianSortedArrays(self, nums1, nums2):
size = len(nums1) + len(nums2)
if size % 2 == 0:
return (self.getk(nums1[:], nums2[:], size/2)+
self.getk(nums1[:], nums2[:], size/2-1))/2.0
else:
return sel... | mit | -7,180,720,171,993,316,000 | 27.918367 | 64 | 0.440367 | false | 2.604779 | false | false | false |
bnaul/scikit-learn | sklearn/neighbors/_classification.py | 2 | 23284 | """Nearest Neighbor Classification"""
# Authors: Jake Vanderplas <vanderplas@astro.washington.edu>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Sparseness support by Lars Buitinck
# Multi-output support by Arnaud Joly <a.joly@ul... | bsd-3-clause | 5,520,555,482,386,144,000 | 36.798701 | 79 | 0.577478 | false | 4.180251 | false | false | false |
BayanGroup/sentry | src/sentry/web/frontend/remove_project.py | 1 | 1378 | from __future__ import absolute_import
from django import forms
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from sentry.api import client
from sentry.models import OrganizationMemb... | bsd-3-clause | 7,260,892,795,162,825,000 | 30.318182 | 107 | 0.674891 | false | 4.518033 | false | false | false |
eickenberg/scikit-learn | sklearn/cluster/bicluster/spectral.py | 1 | 19540 | """Implements spectral biclustering algorithms.
Authors : Kemal Eren
License: BSD 3 clause
"""
from abc import ABCMeta, abstractmethod
import numpy as np
from scipy.sparse import dia_matrix
from scipy.sparse import issparse
from sklearn.base import BaseEstimator, BiclusterMixin
from sklearn.externals import six
fr... | bsd-3-clause | 3,698,149,455,247,156,700 | 38.554656 | 79 | 0.56607 | false | 4.068291 | false | false | false |
TangentMicroServices/BuildService | api/views.py | 1 | 2442 | from django.contrib.auth.models import User
from api.models import Build, Metric, Smell
from rest_framework import routers, serializers, viewsets, decorators, response
from api.permissions import IsSelfOrSuperUser
from api.serializers import BuildSerializer, MetricSerializer, SmellSerializer
from rest_framework.permiss... | mit | 4,265,018,532,309,362,000 | 22.266667 | 79 | 0.63145 | false | 3.93871 | false | false | false |
inconvergent/differential-line | main_line_ani.py | 1 | 2648 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from numpy import pi
# from numpy import cos
# from numpy import sin
from numpy.random import random
from numpy import zeros
# from numpy import linspace
from numpy import floor
from modules.growth import spawn_curl
NMAX = 10**6
SIZE = 512
ONE = 1./SIZE
PROCS = 2
INIT_... | mit | 5,529,219,206,050,234,000 | 17.262069 | 60 | 0.628021 | false | 2.713115 | false | false | false |
pastgift/seed-website-py | app/index/hooks.py | 1 | 1472 | # -*- coding: utf-8 -*-
from flask import render_template, request, jsonify, flash, g
from flask.ext.login import current_user
from . import index_blueprint
from .. import db
from .. import babel
from ..models import User
from datetime import datetime
@index_blueprint.before_app_request
def before_request():
if... | mit | 1,368,370,693,941,926,000 | 23.147541 | 78 | 0.608696 | false | 3.431235 | false | false | false |
dean0x7d/pybinding | pybinding/support/collections.py | 1 | 3143 | import numpy as np
from matplotlib.collections import Collection
from matplotlib.artist import allow_rasterization
# noinspection PyAbstractClass
class CircleCollection(Collection):
"""Custom circle collection
The default matplotlib `CircleCollection` creates circles based on their
area in screen units. ... | bsd-2-clause | 452,870,017,756,134,800 | 36.416667 | 87 | 0.634108 | false | 3.575654 | false | false | false |
KenleyArai/ComicbookTime | app/models.py | 1 | 4953 | from app import db
from flask.ext.security import RoleMixin
from datetime import datetime
# Defining the table for the many-many relationship of User and Comic
bought_comics = db.Table('bought',
db.Column('user_id', db.Integer, db.ForeignKey('user.id')),
db.Column('com... | mit | -8,246,468,935,077,410,000 | 35.153285 | 126 | 0.566727 | false | 3.752273 | false | false | false |
HackerDom/qoala | qoala/settings/common.py | 1 | 4599 | # -*- coding: utf-8 -*-
"""
Django settings for qoala project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.... | gpl-3.0 | -744,898,877,219,937,500 | 25.130682 | 102 | 0.724288 | false | 3.247881 | false | false | false |
rmsare/sfmtools | sfmtools.py | 1 | 2864 | """ Utility functions for PhotoScan processing """
import os, sys
import PhotoScan
def align_and_clean_photos(chunk):
ncameras = len(chunk.cameras)
for frame in chunk.frames:
frame.matchPhotos()
chunk.alignCameras()
for camera in chunk.cameras:
if camera.transform is None:
... | mit | -1,115,124,108,005,124,100 | 33.506024 | 90 | 0.633729 | false | 3.602516 | false | false | false |
MalkIPP/ipp_work | ipp_work/reforms/ir_marg_rate.py | 1 | 2157 | # -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute it and/or modify... | agpl-3.0 | 397,067,888,802,936,060 | 32.153846 | 80 | 0.713225 | false | 3.415214 | false | false | false |
opnsense/core | src/opnsense/service/configd.py | 1 | 6724 | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2014-2019 Ad Schellevis <ad@opnsense.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of so... | bsd-2-clause | 5,773,901,483,905,628,000 | 37.867052 | 111 | 0.625074 | false | 4.369071 | true | false | false |
qvazzler/Flexget | tests/test_utils.py | 1 | 1326 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from datetime import datetime
from flexget.utils import json
class TestJson(object):
def test_json_encode_dt(self):
date_str = '2016-03-11T17:12:17Z'
dt ... | mit | 7,716,064,691,289,933,000 | 35.833333 | 74 | 0.602564 | false | 3.069444 | false | false | false |
infant-cognition-tampere/drop-eyetribe-plugin | drop_eyetribe/EyetrackerEyeTribe.py | 1 | 20648 | """TheEyeTribe plugin for drop."""
from drop.Sensor import Sensor
from threading import Thread
from Queue import Queue
import socket
from select import select
import json
import nudged
import glib
import os
import re
from datetime import datetime
import time
import csv
# Regular expression to match timestamp format ... | mit | 9,056,282,555,783,877,000 | 33.18543 | 79 | 0.531916 | false | 3.670103 | false | false | false |
MissRoven/python | demo/app/mangeruser.py | 1 | 1063 | from . import app
import json
from flask import request,render_template,redirect,make_response,session
@app.route('/upuser')
def adduser():
return render_template('up.html',username=session['username'])
@app.route('/changeuser',methods=['POST'])
def changeuser():
change = request.form.get('change')
usern... | gpl-2.0 | -9,161,075,792,723,971,000 | 36.964286 | 155 | 0.621825 | false | 3.640411 | false | false | false |
crawfordsm/indlulamithi | setup.py | 1 | 3745 | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import glob
import os
import sys
import ah_bootstrap
from setuptools import setup
#A dirty hack to get around some early import/configurations ambiguities
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin_... | bsd-3-clause | 1,335,141,643,837,184,800 | 31.284483 | 79 | 0.722296 | false | 3.667973 | false | false | false |
nfqsolutions/pylm-registry | pylm/registry/clients/logs.py | 1 | 1616 | import json
from urllib import parse
from tornado.httpclient import HTTPClient
class LogClient(object):
"""
Client to send and retrieve logs
"""
def __init__(self, uri, cluster):
self.uri = uri
self.cluster = cluster
def send(self, text):
"""
Send a log line to th... | agpl-3.0 | 1,886,138,002,118,353,000 | 22.779412 | 59 | 0.525371 | false | 4.367568 | false | false | false |
BeyondTheClouds/enoslib | enoslib/docker.py | 1 | 5041 | """Manage remote docker containers as first class citizens.
A possible workflow would be to start your containers using the method of
your choice and build the list of available dockers using the
:py:func:`enoslib.docker.get_dockers` function.
A ``DockerHost`` is a specialization of a ``Host`` and thus can be fed int... | gpl-3.0 | -5,821,203,870,560,577,000 | 36.073529 | 84 | 0.652252 | false | 4.026358 | false | false | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/scripts/scramble/scripts/DRMAA_python-macosx.py | 1 | 1552 | import os, sys, shutil
if "SGE_ROOT" not in os.environ:
print "main(): Please set SGE_ROOT to the path of your SGE installation"
print "main(): before scrambling DRMAA_python"
sys.exit(1)
# change back to the build dir
if os.path.dirname( sys.argv[0] ) != "":
os.chdir( os.path.dirname( sys.argv[0] ) )... | gpl-3.0 | -6,921,328,556,642,751,000 | 30.673469 | 97 | 0.619201 | false | 2.561056 | false | false | false |
demarlik01/szcal | app.py | 1 | 1040 | from flask import Flask
from flask import request
from flask import jsonify
from flask import Response
from flask_cors import CORS
from database import session
from models import Address
from urllib import parse
from utils import replace_if_short_address
app = Flask(__name__)
CORS(app)
@app.route('/cj/secluded_place... | mit | -1,199,521,550,846,967,300 | 27.888889 | 90 | 0.638462 | false | 4 | false | false | false |
annahs/atmos_research | LEO_2D_histos_from_db.py | 1 | 3992 | import sys
import os
import datetime
import pickle
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as colors
from pprint import pprint
import sqlite3
import calendar
from datetime import datetime
#id INTEGER PRIMARY KEY AUTOINCREMENT,
#sp2b_file TEXT,
#file_index... | mit | -1,434,911,381,491,213,300 | 22.904192 | 155 | 0.693136 | false | 2.420861 | false | false | false |
moble/scri | scri/__init__.py | 1 | 7034 | # Copyright (c) 2020, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/scri/blob/master/LICENSE>
"""Module for operating on gravitational waveforms in various forms
Classes
-------
WaveformBase : Base class
This is probably not needed directly; it is just used for inheritance by other object... | mit | -5,533,757,833,371,105,000 | 35.071795 | 119 | 0.707279 | false | 3.270107 | false | false | false |
quarkslab/irma | frontend/extras/migration/versions/eb7141efd75a_version_1_3_0.py | 1 | 6216 | """version 1.3.0
Revision ID: eb7141efd75a
Revises: 430a70c8aa21
Create Date: 2016-01-06 13:38:46.918409
"""
# revision identifiers, used by Alembic.
revision = 'eb7141efd75a'
down_revision = '430a70c8aa21'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from irma.common.utils.... | apache-2.0 | -4,304,994,386,734,047,000 | 36.221557 | 79 | 0.519466 | false | 4.060091 | false | false | false |
barneygale/cedar | cedar/spiral.py | 1 | 1117 | square = 16 * 25
class Spiral:
@classmethod
def spiral(cls, radius, start=(0,0)):
clip1 = (2*radius - 1)//square
clip2 = max(0, radius - square//2)
offset1 = (clip1 % 2) * square//2
for p in cls.spiral_inner(pow(clip1+1, 2)):
yield tuple(
v + ... | mit | 1,341,538,299,758,088,200 | 30.055556 | 90 | 0.385855 | false | 3.865052 | false | false | false |
schleichdi2/OPENNFR-6.1-CORE | opennfr-openembedded-core/scripts/lib/wic/utils/runner.py | 1 | 1774 | #!/usr/bin/env python -tt
#
# Copyright (c) 2011 Intel, Inc.
#
# 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; version 2 of the License
#
# This program is distributed in the hope that it will b... | gpl-2.0 | 1,398,075,700,761,582,800 | 33.115385 | 76 | 0.651635 | false | 3.942222 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.