repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fastflo/emma | emmalib/providers/mysql/MySqlDb.py | 1 | 3382 | """
MySQL Database class handler
"""
# -*- coding: utf-8 -*-
# emma
#
# Copyright (C) 2006 Florian Schmidt (flo@fastflo.de)
# 2014 Nickolay Karnaukhov (mr.electronick@gmail.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | gpl-2.0 | -5,966,158,723,126,046,000 | 33.161616 | 78 | 0.582496 | false | 3.974148 | false | false | false |
pinkevich/django-project-template | run.py | 5 | 1385 | #!/usr/bin/env python
import sys
from concurrent.futures import ThreadPoolExecutor
from tornado import web, wsgi
from tornado.concurrent import run_on_executor
from tornado.web import url
from tornado.ioloop import IOLoop
from tornado.options import options, define
from wsgi import application as django_app
from djan... | mit | -4,005,865,876,475,525,000 | 25.132075 | 95 | 0.692419 | false | 3.693333 | false | false | false |
R-daneel-olivaw/mutation-tolerance-voting | MutationFunc/threading/result_collator.py | 1 | 3138 | '''
Created on Apr 12, 2015
@author: Akshat
'''
import pandas as pd
import matplotlib.pyplot as plt
class ResultCollator(object):
'''
classdocs
'''
distance_df = None
def __init__(self, worker_list, output_directory):
'''
Constructor
'''
sel... | lgpl-3.0 | -1,915,230,509,223,410,400 | 34.068966 | 145 | 0.505099 | false | 3.586286 | false | false | false |
SanPen/GridCal | src/GridCal/Engine/Devices/hvdc_line.py | 1 | 21079 | # This file is part of GridCal.
#
# GridCal 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.
#
# GridCal is distributed in the hope that... | gpl-3.0 | 995,874,103,954,726,500 | 38.687382 | 145 | 0.479643 | false | 3.935387 | false | false | false |
chromano/annotate | project/annotate/views.py | 1 | 3444 | from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils import simplejson
from django.views.decorators.csrf import csrf_exempt
from mongoengine import Val... | gpl-2.0 | -8,404,407,104,202,369,000 | 33.787879 | 131 | 0.625145 | false | 4.042254 | false | false | false |
termoshtt/DataProcessor | lib/dataprocessor/pipes/scan.py | 3 | 3212 | # coding=utf-8
"""Scan directories as nodes."""
import os
from glob import glob
from ..nodes import get, validate_link
from ..utility import abspath, boolenize
def directory(node_list, root, whitelist, followlinks=False):
"""Scan nodes from all directories under the directory 'root'.
If one directory has pr... | gpl-3.0 | 5,065,812,686,030,005,000 | 32.458333 | 78 | 0.53269 | false | 4.294118 | false | false | false |
piyanatk/sim | scripts/fg1p/apply_filters2.py | 1 | 4136 | """Apply a set of rolling filter to a data cubes
This copy read complex filter dataset.
"""
import argparse
import os
from glob import glob
from multiprocessing import Pool, Array, current_process
import numpy as np
import xarray as xr
from opstats.foreground import apply_filter
def do_mask(i):
process = curre... | mit | 7,481,226,182,816,106,000 | 34.350427 | 78 | 0.626692 | false | 3.438071 | false | false | false |
WosunOO/nca_xianshu | nca47/objects/dns/dns_gpool.py | 1 | 2255 | from nca47.db import api as db_api
from nca47.db.sqlalchemy.models import GPoolInfo as GPoolModel
from nca47.objects import base
from nca47.objects import fields as object_fields
class DnsGPool(base.Nca47Object):
VERSION = '1.0'
fields = {
'tenant_id': object_fields.StringField(),
'n... | apache-2.0 | 5,704,167,474,772,620,000 | 33.234375 | 65 | 0.605322 | false | 3.648867 | false | false | false |
walterbender/Pippy | data/en/tutorials/Tutorial_14_menu.py | 2 | 6081 | import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class PyApp(Gtk.Window):
def __init__(self):
super(PyApp, self).__init__()
self.set_title('Menu')
self.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
self.set_size_request(250, 150)
accel_group = Gtk... | gpl-3.0 | 3,349,581,230,072,835,600 | 37.980769 | 108 | 0.634106 | false | 3.382091 | false | false | false |
jrd/pylibsalt | libsalt/salt.py | 1 | 6111 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: set et ai sta sts=2 sw=2 ts=2 tw=0:
"""
SaLT functions:
- getSaLTVersion
- isSaLTVersionAtLeast
- isSaLTLiveEnv
- isSaLTLiveCloneEnv
- getSaLTLiveMountPoint
- getSaLTRootDir
- getSaLTIdentFile
- getSaLTBaseDir
- listSaLTModules
- installSaLTModule... | gpl-2.0 | -2,646,736,446,125,352,000 | 28.631068 | 220 | 0.657929 | false | 3.394883 | false | false | false |
arnoldlu/lisa | libs/utils/trace.py | 2 | 31965 | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2015, ARM Limited and contributors.
#
# 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 | -993,559,102,080,336,500 | 35.953757 | 86 | 0.568653 | false | 4.147528 | false | false | false |
shakib609/AskFmClone | apps/askfm/views.py | 1 | 3935 | from django.contrib import messages
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from ..question.m... | mit | -7,572,416,600,820,695,000 | 34.772727 | 79 | 0.627192 | false | 3.974747 | false | false | false |
rvykydal/anaconda | pyanaconda/modules/common/structures/comps.py | 3 | 4409 | #
# DBus structure for comps definitions.
#
# Copyright (C) 2021 Red Hat, 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 ... | gpl-2.0 | -6,337,888,965,697,843,000 | 24.485549 | 71 | 0.611703 | false | 4.378352 | false | false | false |
khosrow/metpx | sundew/lib/aftn/StateAFTN.py | 1 | 1295 | """
#############################################################################################
# Name: StateAFTN.py
#
# Author: Daniel Lemay
#
# Date: 2006-06-06
#
# Description: Keep the AFTN state in this object
#
#############################################################################################
"""
im... | gpl-2.0 | 6,357,349,060,125,316,000 | 22.981481 | 93 | 0.518147 | false | 3.742775 | false | false | false |
SidSachdev/pycrunchbase | src/pycrunchbase/resource/person.py | 2 | 1469 | import six
from .node import Node
from .utils import parse_date
@six.python_2_unicode_compatible
class Person(Node):
"""Represents a Person on CrunchBase"""
KNOWN_RELATIONSHIPS = [
"primary_affiliation",
"primary_location",
"primary_image",
"websites",
"degrees",
... | mit | -1,112,548,700,295,432,700 | 22.693548 | 70 | 0.514636 | false | 3.728426 | false | false | false |
openearth/delft3d-gt-server | delft3dworker/migrations/0090_auto_20180530_0832.py | 1 | 1719 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-05-30 08:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("delft3dworker", "0089_template_shortname"),
]
operations = [
migrations.Ad... | gpl-3.0 | -4,754,983,757,135,423,000 | 29.696429 | 80 | 0.492728 | false | 4.761773 | false | false | false |
JKrehl/Electrons | Electrons/Scattering/Operators/AbstractArray.py | 1 | 3918 | #!/usr/bin/env python
"""
Copyright (c) 2015 Jonas Krehl <Jonas.Krehl@triebenberg.de>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVID... | isc | -3,605,840,153,688,494,000 | 26.591549 | 76 | 0.695763 | false | 3.273183 | false | false | false |
jepegit/cellpy | cellpy/utils/batch_tools/engines.py | 1 | 5883 | """Engines are functions that are used by the Do-ers.
Keyword Args: experiments, farms, barn
Returns: farms, barn
"""
import time
import logging
import pandas as pd
from cellpy import dbreader
from cellpy.parameters.internal_settings import get_headers_journal
from cellpy.utils.batch_tools import batch_helpe... | mit | 8,426,626,545,050,913,000 | 31.324176 | 88 | 0.646269 | false | 3.550392 | false | false | false |
apfeltee/clearsilver | python/examples/base/wordwrap.py | 13 | 1060 | """
WordWrapping
"""
import os, sys, string, time, getopt
import re
def WordWrap(text, cols=70, detect_paragraphs = 0, is_header = 0):
text = string.replace(text,"\r\n", "\n") # remove CRLF
def nlrepl(matchobj):
if matchobj.group(1) != ' ' and matchobj.group(2) != ' ':
repl_with = ' '
else:
... | bsd-2-clause | -6,697,434,188,681,011,000 | 20.2 | 66 | 0.515094 | false | 2.789474 | false | false | false |
itaton/sempreDecoder | decode.py | 1 | 2000 | import struct
f = open("/tmp/rtl.dat", "rb")
#i = 0 #for debugging only
p = 0 #pause counter
wasHigh = 0 #set when signal was high
r = "" #the sent bit string
threshold = 1500 #needs to be set between high and low, depends on gain of sdr-stick
#samplemax = 0 #for debugging only
resultArray = [] #Stores the 12 packages ... | unlicense | -8,428,295,885,252,208,000 | 29.769231 | 108 | 0.519 | false | 3.703704 | false | false | false |
nkmk/python-snippets | notebook/pandas_cumsum_cumprod.py | 1 | 2097 | import pandas as pd
print(pd.__version__)
# 1.0.5
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]}, index=['X', 'Y', 'Z'])
print(df)
# A B
# X 1 4
# Y 2 5
# Z 3 6
print(df.cumsum())
# A B
# X 1 4
# Y 3 9
# Z 6 15
print(df.cumsum(axis=1))
# A B
# X 1 5
# Y 2 7
# Z 3 9
print(df.cum... | mit | 3,543,883,457,061,147,600 | 12.796053 | 90 | 0.451598 | false | 1.868984 | false | false | false |
rsj217/tornado--scaffold | tornapro/ghost/app/helper.py | 1 | 1216 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'ghost'
import urlparse
import tornado.web
from tornado.httputil import HTTPServerRequest
from .auth.models import User
class BaseAuthHandler(tornado.web.RequestHandler):
def get_current_user(self):
cookie = self.get_secure_cookie('user')
... | mit | 9,117,913,689,934,622,000 | 28.682927 | 105 | 0.675987 | false | 3.872611 | false | false | false |
timcera/mettoolbox | mettoolbox/meteolib.py | 1 | 16363 | # -*- coding: utf-8 -*-
"""
Library of functions for meteorology.
Meteorological function names
=============================
- cp_calc: Calculate specific heat
- Delta_calc: Calculate slope of vapour pressure curve
- es_calc: Calculate saturation vapour pressures
- ea_calc: Calculate actual ... | bsd-3-clause | -2,949,205,045,050,586,000 | 26.774194 | 128 | 0.582921 | false | 3.28494 | true | false | false |
kurtraschke/camelot | camelot/view/controls/actionsbox.py | 1 | 2012 | # ============================================================================
#
# Copyright (C) 2007-2010 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | gpl-2.0 | -3,004,606,427,372,451,300 | 35.581818 | 79 | 0.647117 | false | 4.174274 | false | false | false |
fakedrake/WikipediaBase-skinz | wikipediabase/context.py | 1 | 2173 | """
"""
from functions import FunctionSkin
from skin import Skin
class Context(object):
"""
Context is a namespace that manages the stack of skins.
"""
_skin = None
@classmethod
def skins(cls):
s = cls._skin
while s:
s = s.parent_skin
yield s
@c... | bsd-3-clause | -1,320,062,703,275,934,500 | 25.5 | 103 | 0.567418 | false | 4.219417 | false | false | false |
un33k/problems | sorts/heap.py | 1 | 3559 | """
Properties
O(1) extra space
O(n lg(n)) time
Not stable: (original ordering is lost during the heap creation, which comes first)
Not really adaptive: (doesn't takes advantage of existing order in its input)
"""
"""
Heap sort is simple to implement, performs an O(n lg(n)) in-place sort,
but is not st... | bsd-2-clause | 966,786,006,663,843,300 | 28.413223 | 87 | 0.654678 | false | 3.280184 | false | false | false |
gabrielaraujof/setupam | tests/unit/setupam/builder_test/speaker_test.py | 2 | 2092 | #!/usr/bin/env python3
# Copyright (C) 2014 Gabriel F. Araujo
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This... | gpl-2.0 | -6,941,251,854,314,008,000 | 35.701754 | 103 | 0.691205 | false | 3.917603 | true | false | false |
amarjeetkapoor1/Sim | Sim_site/drawing_freecad/views.py | 1 | 2930 | from django.shortcuts import render
from django.http import HttpResponse
import os, threading, csv, tempfile
from collections import OrderedDict
#from django.core.servers.basehttp import FileWrapper
#from wsgiref.util import FileWrapper
# Create your views here.
def index(request):
return render(request, 'drawin... | mit | -7,015,941,902,497,477,000 | 37.051948 | 167 | 0.582594 | false | 3.270089 | false | false | false |
Callek/build-relengapi | relengapi/blueprints/tokenauth/tables.py | 1 | 1677 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import sqlalchemy as sa
from relengapi.blueprints.tokenauth import types
from relengapi.lib import db
from relengapi.li... | mpl-2.0 | -7,511,472,294,940,432,000 | 38.928571 | 86 | 0.648181 | false | 3.983373 | false | false | false |
tungvx/deploy | Django-0.90/django/bin/django-admin.py | 1 | 5157 | #!/usr/bin/env python
from django.core import management
from optparse import OptionParser
import os, sys
ACTION_MAPPING = {
'adminindex': management.get_admin_index,
'createsuperuser': management.createsuperuser,
'createcachetable' : management.createcachetable,
# 'dbcheck': management.database_check,... | apache-2.0 | -1,688,051,519,669,631,200 | 35.835714 | 166 | 0.618577 | false | 3.921673 | false | false | false |
simpeg/simpeg | examples/02-mesh/plot_cahn_hilliard.py | 1 | 4043 | """
Mesh: Operators: Cahn Hilliard
==============================
This example is based on the example in the FiPy_ library.
Please see their documentation for more information about the
Cahn-Hilliard equation.
The "Cahn-Hilliard" equation separates a field \\\\( \\\\phi \\\\)
into 0 and 1 with smooth transitions.
.... | mit | 5,154,517,925,884,960,000 | 35.098214 | 141 | 0.566658 | false | 2.665129 | false | false | false |
sivel/ansible | test/units/cli/test_doc.py | 13 | 4110 | # Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
from ansible.cli.doc import DocCLI, RoleMixin
TTY_IFY_DATA = {
# No substitutions
'no-op': 'no-op',
'no-op Z(test)': 'no-op Z(test)',
# Simple cases of all substitutio... | gpl-3.0 | -2,892,214,703,240,117,000 | 35.371681 | 134 | 0.631144 | false | 3.537005 | true | false | false |
oujezdsky/various_stuff | python/network/LAN.py | 1 | 2224 | import mechanize
import cookielib
from bs4 import BeautifulSoup
from socket import *
def getInfo(ipaddr, userAgent, proxz, hostname):
WEBFORM_NAME = 'search'
browser = mechanize.Browser()
browser.set_handle_robots(False)
browser.set_handle_equiv(True)
browser.set_handle_referer(True)
browser.s... | gpl-2.0 | -5,039,745,570,820,303,000 | 36.694915 | 104 | 0.621853 | false | 3.299703 | false | false | false |
chromium/chromium | third_party/protobuf/python/docs/generate_docs.py | 11 | 5938 | #!/usr/bin/env python
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are... | bsd-3-clause | -6,195,281,612,706,544,000 | 29.927083 | 84 | 0.711856 | false | 3.784576 | true | false | false |
andtorg/blacklist | blacklist.py | 1 | 2848 | #!/usr/bin/python
import shutil
import os, errno
import sys
SITES_TO_IGNORE = {
'facebook': {'search_string': 'facebook', 'site_address':'www.facebook.com'}
,'twitter': {'search_string': 'twitter', 'site_address':'twitter.com'}
,'g+': {'search_string': 'plus', 'site_address':'plus.google.com'}
,'gmail': {'sear... | mit | 877,540,214,930,852,200 | 28.061224 | 100 | 0.692767 | false | 2.712381 | false | false | false |
peterhinch/micropython-async | v3/as_drivers/as_GPS/astests_pyb.py | 1 | 6747 | # astests_pyb.py
# Tests for AS_GPS module. Emulates a GPS unit using a UART loopback.
# Run on a Pyboard with X1 and X2 linked
# Tests for AS_GPS module (asynchronous GPS device driver)
# Based on tests for MicropyGPS by Michael Calvin McCoy
# https://github.com/inmcm/micropyGPS
# Copyright (c) 2018-2020 Peter Hinch... | mit | -2,437,674,435,312,698,000 | 43.682119 | 110 | 0.605602 | false | 2.759509 | true | false | false |
selurvedu/rfdocs | rfdocs/serializers.py | 3 | 5404 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from rest_framework import serializers
from rest_framework.reverse import reverse
from rfdocs.models import (RFLibrary, RFKeyword,
RFLibraryVersion, RFTag)
class DynamicFieldsModelSerializer(serializers.ModelSerializer):
"""
A ModelSer... | mit | -520,364,985,479,683,200 | 35.026667 | 102 | 0.623612 | false | 4.215289 | false | false | false |
edineicolli/daruma-exemplo-python | scripts/fiscal/ui_fiscal_icnfabrir.py | 1 | 5516 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_fiscal_icnfabrir.ui'
#
# Created: Mon Nov 24 22:25:54 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
from pydaruma.pydaruma import iCNFA... | gpl-2.0 | -833,727,759,164,012,000 | 55.244898 | 164 | 0.727322 | false | 3.251917 | false | false | false |
Larhard/Maildir-Notifier | mail_notify.py | 1 | 1199 | #!/bin/env python3
import argparse
import imp
import logging
import sys
import os
import watcher
import config
def main(argv):
parser = argparse.ArgumentParser('mail_notify')
parser.add_argument('maildir')
parser.add_argument('--config', '-c', help="configuration file")
parser.add_argument('--verbos... | mit | 2,440,021,261,854,703,600 | 28.243902 | 96 | 0.661384 | false | 3.579104 | true | false | false |
arenadata/ambari | ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/service_check.py | 2 | 3598 | """
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 use this ... | apache-2.0 | 46,482,568,557,292,920 | 39.426966 | 134 | 0.647582 | false | 3.88973 | false | false | false |
dudanogueira/microerp | microerp/almoxarifado/migrations/0004_auto_20141006_1957.py | 1 | 6177 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('rh', '0001_initial'),
('estoque', '0005_auto_20141001_0953'),
('comercial', '0007_auto_20141006_1852'),
... | lgpl-3.0 | 3,194,224,929,188,960,000 | 45.795455 | 127 | 0.58216 | false | 4.021484 | false | false | false |
anryko/ansible | lib/ansible/module_utils/network/panos/panos.py | 38 | 16706 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 | -3,546,844,968,293,405,700 | 38.966507 | 92 | 0.556507 | false | 4.325738 | false | false | false |
Arlefreak/arte7 | cms/migrations/0016_auto_20170417_0326.py | 1 | 1713 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-17 03:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('cms', '0015_operasprimas_video'),
]
operations = [
... | gpl-3.0 | 1,586,576,616,075,533,800 | 33.26 | 116 | 0.590776 | false | 4.1477 | false | false | false |
PircK/six | racunalnik.py | 1 | 2002 | import threading # za vzporedno izvajanje
import logging
from alfabeta import *
######################################################################
## Igralec računalnik
class Racunalnik():
def __init__(self, gui, algoritem):
self.gui = gui
self.algoritem = algoritem # Algoritem, ki izračuna ... | mit | 821,320,608,498,856,200 | 34.375 | 83 | 0.585563 | false | 2.80198 | false | false | false |
bitmovin/bitmovin-python | bitmovin/resources/models/filters/unsharp_filter.py | 1 | 2355 | from bitmovin.utils import Serializable
from . import AbstractFilter
class UnsharpFilter(AbstractFilter, Serializable):
def __init__(self,
name=None,
luma_matrix_horizontal_size=None,
luma_matrix_vertical_size=None,
luma_effect_strength=None,
... | unlicense | 6,443,985,348,660,007,000 | 41.818182 | 94 | 0.651805 | false | 3.873355 | false | false | false |
softwaresaved/softwareindex | softwareindex/handlers/slideshare_handler.py | 1 | 1478 | # This is a software index handler that gives a score based on the
# number of mentions in SlideShare. It uses the SlideShare API:
# http://www.slideshare.net/developers/documentation
#
# Inputs:
# - Identifier (String)
#
# Outputs:
# - score (Number)
# - description (String)
#
# Notes: this handler treats the softwa... | bsd-3-clause | -3,192,798,027,253,753,000 | 30.446809 | 87 | 0.658322 | false | 3.780051 | false | false | false |
grollins/sardine | examples/ethane/compute_modes.py | 1 | 3878 | """
Computes normal modes for ethane.
"""
from os import mkdir
from os.path import exists, join
from sardine.universe import UniverseFactory
from sardine.energy import BondEnergyFactory, AngleEnergyFactory, VDWEnergyFactory
from sardine.energy import EnergyFunctionFactory, GradientFunctionFactory
from sardine.nma impo... | bsd-2-clause | 7,910,962,338,234,839,000 | 38.181818 | 90 | 0.647499 | false | 3.434898 | false | false | false |
Trilarion/imperialism-remake | source/imperialism_remake/client/graphics/mappers/workforce_to_action_cursor_mapper.py | 1 | 2516 | # Imperialism remake
# Copyright (C) 2020 amtyurin
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is... | gpl-3.0 | 5,734,503,904,103,267,000 | 45.592593 | 116 | 0.674086 | false | 4.012759 | false | false | false |
ceache/treadmill | lib/python/treadmill/api/app_group.py | 2 | 2320 | """Implementation of AppGroup API.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import fnmatch
from treadmill import context
from treadmill import schema
class API:
"""Treadmill AppGroup REST api."""
... | apache-2.0 | 3,978,231,618,686,663,700 | 30.780822 | 65 | 0.530172 | false | 3.979417 | false | false | false |
EeOneDown/spbu4u | app/new_functions.py | 1 | 22888 | import hashlib
import json
import logging
import re
from datetime import datetime, timedelta, date
import requests
from telebot.apihelper import ApiException
from telebot.types import Message
from app.constants import (
emoji, subject_short_types, week_day_number, months,
reg_before_30, reg_only_30, reg_only_... | apache-2.0 | -8,741,936,217,095,794,000 | 27.638994 | 79 | 0.589468 | false | 3.440314 | false | false | false |
ahwillia/tensortools | tensortools/ensemble.py | 1 | 6151 | from tensortools import optimize
from tensortools.diagnostics import kruskal_align
from tqdm import trange
from collections.abc import Iterable
import numpy as np
class Ensemble(object):
"""
Represents an ensemble of fitted tensor decompositions.
"""
def __init__(self, nonneg=False, fit_method=None, ... | mit | 7,220,950,852,834,618,000 | 36.278788 | 81 | 0.558934 | false | 4.396712 | false | false | false |
kingctan/Misago | misago/forums/migrations/0002_default_forums.py | 8 | 1785 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.utils.translation import ugettext as _
from misago.core.utils import slugify
def create_default_forums_tree(apps, schema_editor):
Forum = apps.get_model('misago_forums', 'Forum')
Forum.objec... | gpl-2.0 | -3,845,954,754,693,966,000 | 21.037037 | 57 | 0.555182 | false | 3.606061 | false | false | false |
subdownloader/subdownloader | subdownloader/webutil.py | 3 | 3398 | # -*- coding: utf-8 -*-
# Copyright (c) 2019 SubDownloader Developers - See COPYING - GPLv3
import logging
import socket
from ssl import SSLError
from urllib.error import HTTPError, URLError
from urllib.request import urlopen, urlretrieve
log = logging.getLogger('subdownloader.http')
DEFAULT_TIMEOUT = 300
# FIXME... | gpl-3.0 | 7,107,083,423,462,436,000 | 33.323232 | 111 | 0.64744 | false | 4.258145 | false | false | false |
ankitsejwal/Lyndor | run.py | 1 | 6128 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
''' Lyndor runs from here - contains the main functions '''
import sys, time, os
import module.message as message
import module.save as save
import module.cookies as cookies
import module.read as read
import install
import module.move as move
import module.draw as draw
im... | mit | 5,770,026,001,771,497,000 | 42.390071 | 138 | 0.623079 | false | 3.983073 | false | false | false |
gkadillak/rockstor-core | src/rockstor/storageadmin/models/update_subscription.py | 4 | 1351 | """
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... | gpl-3.0 | -2,032,936,560,911,440,100 | 35.513514 | 68 | 0.740192 | false | 3.938776 | false | false | false |
paris-ci/CloudBot | plugins/vdm.py | 1 | 1646 | import urllib.request
from cloudbot import hook
class vdm:
def __init__(self):
try:
self.page = urllib.request.urlopen("http://feeds.feedburner.com/viedemerde").read().decode('utf-8')
except IOError:
self.page = ''
def new_story(self):
"""The fastest and the r... | gpl-3.0 | -7,389,962,136,722,546,000 | 31.27451 | 112 | 0.503645 | false | 3.285429 | false | false | false |
molobrakos/home-assistant | homeassistant/components/sisyphus/__init__.py | 6 | 2276 | """Support for controlling Sisyphus Kinetic Art Tables."""
import asyncio
import logging
import voluptuous as vol
from homeassistant.const import (
CONF_HOST,
CONF_NAME,
EVENT_HOMEASSISTANT_STOP
)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_... | apache-2.0 | 3,408,656,939,845,342,700 | 28.558442 | 72 | 0.644112 | false | 3.700813 | true | false | false |
svisser/bdgt | bdgt/application.py | 1 | 6945 | import argparse
import logging
import os
from decimal import Decimal
import colorama
from bdgt import get_data_dir, get_version
from bdgt.commands.factory import CommandFactory
from bdgt.storage.database import open_database
_log = logging.getLogger(__name__)
def process_cmd(args):
try:
command = Comm... | gpl-3.0 | -340,558,074,410,671,550 | 29.866667 | 77 | 0.599568 | false | 3.760152 | false | false | false |
inkenbrandt/ArcPy | prism/PRISM (2).py | 2 | 4456 | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 01 13:52:49 2014
@author: paulinkenbrandt
http://gis.stackexchange.com/questions/108113/loop-with-arcpy-listfiles
"""
import arcpy
import os
from arcpy import env
from arcpy.sa import *
import arcpy_metadata as md
import datetime
#r'C:\GIS\PRISM\S\MAY_OCT_14'
env.works... | gpl-2.0 | -830,894,340,026,066,000 | 42.262136 | 157 | 0.659336 | false | 3.347859 | false | false | false |
mcdeaton13/dynamic | Python/dynamic/income.py | 2 | 8945 | '''
------------------------------------------------------------------------
Last updated 7/17/2015
Functions for created the matrix of ability levels, e. This can
only be used for looking at the 25, 50, 70, 80, 90, 99, and 100th
percentiles, as it uses fitted polynomials to those percentiles.
For a more ... | mit | 6,937,819,019,961,098,000 | 40.221198 | 138 | 0.5545 | false | 3.341427 | false | false | false |
ctralie/S3DGLPy | LaplacianMesh.py | 1 | 10246 | from PolyMesh import *
from Primitives3D import *
from OpenGL.GL import *
import sys
import re
import math
import time
import numpy as np
from scipy import sparse
import scipy.io as sio
from scipy.sparse.linalg import lsqr, cg, eigsh
import matplotlib.pyplot as plt
import os
this_path = os.path.dirname(os.path.abspath... | apache-2.0 | 6,239,854,272,775,887,000 | 37.374532 | 109 | 0.635565 | false | 2.948489 | false | false | false |
wooga/airflow | airflow/kubernetes/volume_mount.py | 1 | 2328 | # 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 | 6,549,943,243,606,669,000 | 30.890411 | 92 | 0.670962 | false | 3.736758 | false | false | false |
cfarquhar/rpc-openstack | hacking/setup.py | 9 | 1326 | # 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 u... | apache-2.0 | -5,472,203,642,330,690,000 | 34.837838 | 76 | 0.671946 | false | 3.83237 | false | false | false |
jffifa/python-mysql-eventprocessor | mysqlevp/handler/base.py | 1 | 3795 | from __future__ import absolute_import, unicode_literals
from ..event.row_wrapper import InsertEventRow, UpdateEventRow, DeleteEventRow
class IEventHandler(object):
def on_insert_raw(self, ev_id, ev):
ev_timestamp = ev.packet.timestamp
schema = ev.schema
table = ev.table
affected_... | mit | -8,347,637,732,043,205,000 | 38.53125 | 126 | 0.557312 | false | 4.327252 | false | false | false |
akabos/NearPy | nearpy/experiments/recallprecisionexperiment.py | 3 | 8530 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Ole Krause-Sparmann
# 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,... | mit | -2,381,465,748,599,920,000 | 40.009615 | 79 | 0.61993 | false | 4.5228 | false | false | false |
Eksmo/calibre | src/calibre/ebooks/markdown/extensions/rss.py | 5 | 3753 | import calibre.ebooks.markdown.markdown as markdown
from calibre.ebooks.markdown.markdown import etree
DEFAULT_URL = "http://www.freewisdom.org/projects/python-markdown/"
DEFAULT_CREATOR = "Yuri Takhteyev"
DEFAULT_TITLE = "Markdown in Python"
GENERATOR = "http://www.freewisdom.org/projects/python-markdown/markdown2rss... | gpl-3.0 | 1,401,059,289,872,084,500 | 31.921053 | 77 | 0.494271 | false | 4.018201 | true | false | false |
cgwalters/pykickstart | pykickstart/commands/firewall.py | 8 | 9004 | #
# Chris Lumens <clumens@redhat.com>
#
# Copyright 2005, 2006, 2007 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# ... | gpl-2.0 | -2,215,309,625,346,987,800 | 37.314894 | 143 | 0.564416 | false | 4.16659 | false | false | false |
sascha-m-b/diffuse | install.py | 1 | 9113 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2010 Derrick Moser <derrick_moser@yahoo.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; either version 2 of the licence... | gpl-2.0 | 8,869,225,218,684,423,000 | 31.546429 | 210 | 0.581587 | false | 3.492909 | false | false | false |
janeczku/calibre-web | cps/render_template.py | 2 | 7747 | # -*- coding: utf-8 -*-
# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
# Copyright (C) 2018-2020 OzzieIsaacs
#
# 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 Found... | gpl-3.0 | -2,720,415,120,231,646,700 | 62.5 | 120 | 0.602039 | false | 3.697852 | true | false | false |
wilsonfreitas/scraps | examples/igpm.py | 1 | 2163 |
# /html/body/div[1]/div[3]/table/tbody/tr/td/div/center/table/tbody/tr[1]
import scraps
import textparser
import itertools
class NumberParser(textparser.TextParser):
def parse_int(self, text, match):
r'^\d+$'
return eval(text)
def parse_number_ptBR_with_percent(self, text, match):
... | mit | 3,307,421,219,416,186,400 | 27.853333 | 116 | 0.588072 | false | 2.816406 | false | false | false |
facebookresearch/fastText | python/doc/examples/FastTextEmbeddingBag.py | 1 | 2816 | #!/usr/bin/env python
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# NOTE: This requires PyTorch! We do not provide installation scripts to install PyTorch.
# It is up t... | mit | 9,063,231,506,715,134,000 | 33.765432 | 90 | 0.637429 | false | 3.657143 | false | false | false |
bcarroll/authmgr | authmgr/authmgr/user_directory/views.py | 1 | 4151 | import datetime as dt
import logging
from flask import Blueprint, flash, redirect, render_template, request, url_for
from flask import Markup
from flask_login import fresh_login_required, login_user, logout_user, current_user
from authmgr.extensions import login_manager
from authmgr.utils import flash_errors
from aut... | bsd-3-clause | -3,099,100,461,342,910,000 | 36.736364 | 142 | 0.63575 | false | 4.197169 | false | false | false |
DFO-Ocean-Navigator/Ocean-Data-Map-Project | plotting/colormap.py | 1 | 11585 | import os
import re
from io import BytesIO
import cmocean
import matplotlib.colors as mcolors
import matplotlib.pyplot as plt
import numpy as np
from flask_babel import gettext
import plotting
def make_colormap(seq):
"""
Return a LinearSegmentedColormap: http://stackoverflow.com/a/16836182
Args:
... | gpl-3.0 | 4,106,671,356,486,534,700 | 34.320122 | 97 | 0.603107 | false | 2.914465 | false | false | false |
GGiecold/PySCUBA | src/PySCUBA/__main__.py | 1 | 12824 | #!/usr/bin/env python
# PySCUBA/src/PySCUBA/__main__.py
# Author: Gregory Giecold for the GC Yuan Lab
# Affiliation: Harvard University
# Contact: g.giecold@gmail.com; ggiecold@jimmy.harvard.edu
from os import getcwd, path, remove
import Queue
import sys
try:
import igraph
except ImportError, e:
pass
im... | mit | 6,625,462,015,521,234,000 | 33.106383 | 87 | 0.59724 | false | 3.880182 | false | false | false |
splunk/eventgen | splunk_eventgen/lib/plugins/output/s2s.py | 1 | 6794 | import socket
import struct
from splunk_eventgen.lib.outputplugin import OutputPlugin
class S2S:
"""
Encode and send events to Splunk over the S2S V2 wire protocol.
It should be noted V2 is a much older protocol and is no longer utilized by any Splunk Forwarder.
It should still work, but its a very ... | apache-2.0 | -7,765,024,850,134,000,000 | 31.352381 | 110 | 0.553429 | false | 4.003536 | false | false | false |
p-l-/ivre | ivre/tools/scan2db.py | 1 | 5209 | #! /usr/bin/env python
# This file is part of IVRE.
# Copyright 2011 - 2020 Pierre LALET <pierre@droids-corp.org>
#
# IVRE 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 | -717,743,129,055,448,400 | 32.178344 | 86 | 0.609906 | false | 3.916541 | true | false | false |
jamslevy/gsoc | app/soc/views/helper/surveys.py | 1 | 7932 | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | -5,420,985,475,977,241,000 | 33.042918 | 118 | 0.674483 | false | 3.564944 | false | false | false |
boundlessgeo/qgis-webappbuilder-plugin | webappbuilder/exp2js.py | 1 | 6595 | #===============================================================================
# This code belong to the gis2js library, by Nathan Woodrow
# https://github.com/NathanW2/qgs2js
#===============================================================================
from qgis.core import QgsExpression
import re, json
import o... | gpl-3.0 | -4,926,319,765,662,353,000 | 28.573991 | 90 | 0.538741 | false | 3.517333 | false | false | false |
rsjohnco/rez | src/rezplugins/release_hook/command.py | 1 | 4175 | """
Executes pre- and post-release shell commands
"""
from rez.release_hook import ReleaseHook
from rez.exceptions import ReleaseHookCancellingError
from rez.config import config
from rez.utils.logging_ import print_debug
from rez.vendor.schema.schema import Schema, Or, Optional, Use, And
from rez.vendor.sh.sh import C... | gpl-3.0 | 1,861,106,307,081,865,500 | 34.991379 | 79 | 0.544192 | false | 4.339917 | false | false | false |
BiznetGIO/horizon | openstack_dashboard/test/integration_tests/pages/pageobject.py | 5 | 3284 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | -6,881,513,618,528,521,000 | 33.93617 | 78 | 0.636114 | false | 4 | false | false | false |
blacktear23/py-servicebus | servicebus/pika/frame.py | 1 | 7777 | """Frame objects that do the frame demarshaling and marshaling."""
import logging
import struct
from servicebus.pika import amqp_object
from servicebus.pika import exceptions
from servicebus.pika import spec
from servicebus.pika.compat import byte
LOGGER = logging.getLogger(__name__)
class Frame(amqp_object.AMQPOb... | bsd-3-clause | 8,093,776,396,423,722,000 | 28.34717 | 78 | 0.631092 | false | 4.17221 | false | false | false |
Alexoner/learning-web | python/django/djangoByExample/forum/models.py | 1 | 1904 | from django.db import models
from django.contrib.auth.models import User
from django.contrib import admin
from string import join
# from djangoByExample.settings import MEDIA_ROOT
# Create your models here.
class Forum(models.Model):
title = models.CharField(max_length=60)
def __unicode__(self):
ret... | gpl-2.0 | 2,537,485,843,754,796,500 | 28.292308 | 73 | 0.590336 | false | 3.733333 | false | false | false |
IvanJJill/base_prj | base_prj/settings.py | 1 | 2259 | """
Django settings for base_prj project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | gpl-2.0 | -2,850,854,167,003,178,000 | 24.965517 | 113 | 0.723772 | false | 3.199717 | false | false | false |
iefan/kfjz | jzuser/models.py | 1 | 3381 | #coding:utf8
from django.db import models
from django.contrib.auth.models import (
BaseUserManager, AbstractBaseUser, PermissionsMixin
)
class MyUserManager(BaseUserManager):
def create_user(self, unitsn, unitname, unitgroup, operatorname,password=None):
"""
Creates and saves a User with the g... | gpl-2.0 | 6,165,705,546,778,076,000 | 30.447619 | 95 | 0.603151 | false | 3.78555 | false | false | false |
TaskEvolution/Task-Coach-Evolution | taskcoach/taskcoachlib/gui/dialog/attributesync.py | 1 | 4608 | '''
Task Coach - Your friendly task manager
Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org>
Task Coach 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 Licens... | gpl-3.0 | -6,211,550,586,646,155,000 | 38.421053 | 96 | 0.614149 | false | 4.539901 | false | false | false |
chop-dbhi/varify | varify/genes/resources.py | 1 | 3892 | from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.conf.urls import patterns, url
from django.http import Http404
from django.views.decorators.cache import never_cache
from django.core.urlresolvers import reverse
from preserialize.serialize import serialize
from serrano.resources.base ... | bsd-2-clause | 8,788,163,061,064,462,000 | 32.551724 | 76 | 0.555755 | false | 4.149254 | false | false | false |
sql-machine-learning/sqlflow | python/runtime/xgboost/tracker.py | 1 | 17518 | # Copyright 2020 The SQLFlow Authors. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 5,236,278,495,456,271,000 | 31.321033 | 79 | 0.527572 | false | 3.741563 | false | false | false |
ppke-nlpg/purepos-python3 | purepos/model/suffixguesser.py | 1 | 3098 | #!/usr/bin/env python3
# -*- coding: utf-8, vim: expandtab:ts=4 -*-
###############################################################################
# Copyright (c) 2015 Móréh, Tamás
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Lesser Public License v... | lgpl-3.0 | -6,601,740,663,050,906,000 | 37.17284 | 96 | 0.584088 | false | 3.676576 | false | false | false |
rajul/tvb-framework | tvb/core/entities/transient/filtering.py | 1 | 5667 | # -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Framework Package. This package holds all Data Management, and
# Web-UI helpful to run brain-simulations. To use it, you also need do download
# TheVirtualBrain-Scientific Package (for simulators). See content of the
# documentation-folder for more details. See also http:/... | gpl-2.0 | 6,258,488,630,743,793,000 | 43.273438 | 114 | 0.613552 | false | 4.232263 | false | false | false |
JanCaha/Line-of-Sight-Analyst | src/los/prepare_global_los.py | 1 | 6212 | # coding=utf-8
import math
import arcpy
import functions_validation as fv
import functions_visibility as visibility
from los import functions_arcmap
class PrepareGlobalLoS(object):
def __init__(self):
"""Define the tool (tool name is the name of the class)."""
self.label = "Create Global Lines of... | gpl-3.0 | 6,361,416,436,611,535,000 | 39.337662 | 123 | 0.611558 | false | 4.488439 | false | false | false |
arizvisa/syringe | template/archive/lha.py | 1 | 5683 | import ptypes
from ptypes import *
# integral types
class u8(pint.uint8_t): pass
class u16(pint.uint16_t): pass
class u32(pint.uint32_t): pass
class u64(pint.uint64_t): pass
class s8(pint.sint8_t): pass
class s16(pint.sint16_t): pass
class s32(pint.sint32_t): pass
class s64(pint.sint64_t): pass
# lzh-specific integr... | bsd-2-clause | 6,015,793,706,967,043,000 | 29.390374 | 95 | 0.521204 | false | 3.887141 | false | false | false |
kawamon/hue | desktop/core/ext-py/djangorestframework-3.9.4/rest_framework/management/commands/generateschema.py | 3 | 1501 | from django.core.management.base import BaseCommand
from rest_framework.compat import coreapi
from rest_framework.renderers import (
CoreJSONRenderer, JSONOpenAPIRenderer, OpenAPIRenderer
)
from rest_framework.schemas.generators import SchemaGenerator
class Command(BaseCommand):
help = "Generates configured ... | apache-2.0 | 6,174,646,717,633,221,000 | 35.609756 | 132 | 0.658228 | false | 4.204482 | false | false | false |
TheLazyHase/dragon_dice_simulator | business/effect/targeted.py | 1 | 9121 | # -*- coding: utf-8 *-*
# Copyright (c) 2013 Tisserant Pierre
#
# This file is part of Dragon dice simulator.
#
# Dragon dice simulator is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ve... | gpl-3.0 | 7,814,475,981,055,872,000 | 30.236301 | 159 | 0.656836 | false | 3.988194 | false | false | false |
chleh/pvd-tool | src/pvd_tool.py | 1 | 48176 | #!/usr/bin/python
#
# Copyright (C) 2015 Christoph Lehmann
#
# This file is part of pvd-tool.
#
# pvd-tool 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)... | gpl-3.0 | -5,082,921,904,808,613,000 | 32.855235 | 185 | 0.525905 | false | 3.718432 | false | false | false |
ibest/grcScripts2 | inst/scripts/python/extract_unmapped_reads.py | 1 | 6308 | #!/usr/bin/env python
'''
Extract reads which aren't mapped from a SAM or SAM.gz file.
Behavior for PE:
-Write out PE only if both do not map (if either of the pair maps, neither is retained)
Behavior for SE:
-Write out SE if they don't map
Iterate over a SAM or SAM.gz file. take everything where the 3rd and
4th ... | apache-2.0 | 5,556,250,830,687,737,000 | 35.462428 | 149 | 0.565155 | false | 3.360682 | false | false | false |
BigFatNoob-NCSU/x9115george2 | hw/code/6/algorithms/max_walk_sat.py | 1 | 3166 | from __future__ import print_function, division
__author__ = 'george'
import sys
import numpy as np
from utils.lib import *
from algorithm import *
def default():
return O(
gens = 10,
max_changes = 100,
change_prob = 0.5,
steps = 10,
threshold = 170,
better = lt,
verbo... | mit | -108,275,731,922,424,450 | 26.77193 | 72 | 0.585597 | false | 3.67712 | false | false | false |
pcampese/codewars | validBraces4.py | 1 | 1142 | # https://www.codewars.com/kata/valid-braces/train/python
def validBraces(braces):
# Print the arguments
print('braces = -->{}<--'.format(braces))
# Create dictionary to map closing brace to opening brace
closing_brace_of = {
'{' : '}',
'[' : ']',
'(' : ')',
}
# Create lists to contain the closing braces... | gpl-3.0 | 8,522,807,550,574,706,000 | 25.581395 | 138 | 0.649737 | false | 3.253561 | false | false | false |
peterfpeterson/mantid | scripts/MultiPlotting/edit_windows/remove_plot_window.py | 3 | 2195 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... | gpl-3.0 | -484,304,044,883,406,850 | 33.84127 | 97 | 0.666515 | false | 3.732993 | false | false | false |
thecodinghub/news-for-good | my_app/urls.py | 1 | 1654 | """my_app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | bsd-3-clause | 8,568,705,831,719,593,000 | 36.590909 | 79 | 0.675937 | false | 3.564655 | false | false | false |
mrosenstihl/PulsePrograms | CPMG/CPMG_exp.py | 1 | 2811 |
def fid_experiment(run):
e=Experiment()
e.set_description("run",run)
pulse90 = 2.1e-6 # s
pulse180 = 4.2e-6 # s
td = 1.3*5 # repetition time
phase = 155 #receiver phase
tau =300e-6 # s CPMG interpuls... | bsd-2-clause | -5,560,417,546,478,381,000 | 33.716049 | 114 | 0.449306 | false | 3.535849 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.