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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Starbow/StarbowWebSite | starbowmodweb/user/models.py | 1 | 3175 | from django.db import models
from django.db.models.signals import post_save
from django.conf import settings
from django.utils import timezone
from django.core import validators
from django.core.mail import send_mail
from django.contrib.auth.models import AbstractBaseUser, UserManager, PermissionsMixin
from django.ut... | mit | -6,631,454,537,142,033,000 | 32.421053 | 148 | 0.660787 | false | 4.024081 | false | false | false |
wwitzel3/awx | awx/main/utils/filters.py | 1 | 11006 | import re
from functools import reduce
from pyparsing import (
infixNotation,
opAssoc,
Optional,
Literal,
CharsNotIn,
ParseException,
)
from logging import Filter, _levelNames
import six
from django.apps import apps
from django.db import models
from django.conf import settings
from awx.main.u... | apache-2.0 | 5,323,298,445,070,222,000 | 31.755952 | 117 | 0.528893 | false | 4.096018 | false | false | false |
lowRISC/edalize | tests/test_vunit/run.py | 1 | 1480 | # Auto generated by Edalize
def load_module_from_file(name, python_file):
import importlib.util
spec = importlib.util.spec_from_file_location(name, python_file)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
def load_runner_hooks(python_file =... | bsd-2-clause | 3,431,572,838,409,874,000 | 35 | 105 | 0.712838 | false | 3.148936 | false | false | false |
pombredanne/PeachPy | peachpy/literal.py | 6 | 15735 | import six
from peachpy.c.types import Type, \
int8_t, int16_t, int32_t, int64_t, \
uint8_t, uint16_t, uint32_t, uint64_t, \
float_, double_
from peachpy.parse import parse_assigned_variable_name
class Constant:
_supported_sizes = [1, 2, 4, 8, 16, 32, 64]
_supported_types = [uint8_t, uint16_t, uin... | bsd-2-clause | -2,774,984,178,690,938,000 | 38.734848 | 116 | 0.579981 | false | 3.851897 | false | false | false |
thinkle/gourmet | gourmet/importers/webextras.py | 1 | 3008 | import socket, gourmet.threadManager, urllib.request, urllib.parse, urllib.error
from gettext import gettext as _
DEFAULT_SOCKET_TIMEOUT=45.0
URLOPEN_SOCKET_TIMEOUT=15.0
socket.setdefaulttimeout(DEFAULT_SOCKET_TIMEOUT)
class URLReader (gourmet.threadManager.SuspendableThread):
def __init__ (self, url):
s... | gpl-2.0 | 7,861,758,868,572,846,000 | 33.574713 | 84 | 0.59109 | false | 3.926893 | false | false | false |
bendk/thesquirrel | mediabuilder/views.py | 1 | 1803 | # thesquirrel.org
#
# Copyright (C) 2015 Flying Squirrel Community Space
#
# thesquirrel.org is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any la... | agpl-3.0 | 894,466,664,627,895,800 | 35.795918 | 78 | 0.711592 | false | 3.852564 | false | false | false |
birgander2/PyRAT | qgis/PyRATBridge/mainPlugin.py | 1 | 12576 | """
PyRATBridge
===========
This Plugin imports the functionality of PyRAT into QGIS
:author: Felix Weinmann <felix.weinmann@dlr.de>
"""
from qgis.core import QgsTask, QgsTaskManager, Qgis, QgsProject
from qgis.PyQt.QtWidgets import QAction, QFileDialog, QInputDialog, QDockWidget
from qgis.PyQt.QtCore i... | mpl-2.0 | 4,246,527,938,640,214,000 | 34.137931 | 79 | 0.540156 | false | 4.254398 | false | false | false |
midair/Zulip-Voting-Bot | test_voting_bot.py | 1 | 7490 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import nose
from voting_bot import VotingBot
class VotingBotTest(unittest.TestCase):
def setUp(self):
self.vb = VotingBot
def tearDown(self):
del self.vb
def test_parse_public_message(... | mit | -255,182,878,202,769,100 | 41.316384 | 77 | 0.569693 | false | 3.531353 | true | false | false |
JensTimmerman/radical.pilot | docs/architecture/api_draft/unit_manager.py | 1 | 3311 |
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------------------------------------------------------
#
... | mit | 5,006,095,443,593,076,000 | 28.5625 | 90 | 0.40592 | false | 5.117465 | false | false | false |
droptables/Gambit | nba-harvester.py | 1 | 2484 | import json,os, urllib2, uncurl, requests, pymongo, time
from clint.textui import colored
def get_season_results(team):
seasons = ['2012','2013','2014', '2015']
for year in seasons:
seasonsquery="https://erikberg.com/nba/results/"+team+".json?season="+year
print colored.yellow("[*] Getting "+seasonsquery)
r =... | gpl-2.0 | -5,111,145,687,165,386,000 | 31.25974 | 607 | 0.660628 | false | 2.80678 | false | false | false |
MikeWinter/bio-data-repository | bdr/forms/widgets.py | 1 | 8068 | """
This module defines customised widgets for use with forms in this application.
"""
from django.forms.widgets import CheckboxInput, MultiWidget, NumberInput, Select, TextInput
__all__ = []
__author__ = "Michael Winter (mail@michael-winter.me.uk)"
__license__ = """
Biological Dataset Repository: data archival a... | gpl-2.0 | -3,217,710,930,025,375,000 | 34.857778 | 101 | 0.633862 | false | 4.502232 | false | false | false |
joefutrelle/pocean-core | pocean/dsg/timeseries/cr.py | 1 | 1569 | #!python
# coding=utf-8
from pocean.cf import CFDataset
from pocean import logger
class ContiguousRaggedTimeseries(CFDataset):
@classmethod
def is_mine(cls, dsg):
try:
rvars = dsg.filter_by_attrs(cf_role='timeseries_id')
assert len(rvars) == 1
assert dsg.featureTy... | mit | 7,903,866,478,454,717,000 | 31.6875 | 94 | 0.594646 | false | 4.043814 | false | false | false |
tktrungna/leetcode | Python/binary-tree-level-order-traversal-ii.py | 1 | 1989 | """
QUESTION:
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ \
9 20
/ \
15 7
return its bottom-up level order traversal as:
[
[15,7],
[9,20],
... | mit | -411,411,907,483,932,700 | 22.963855 | 145 | 0.464555 | false | 3.65625 | false | false | false |
Herkemer/pynab | pynab/imdb.py | 1 | 5667 | import unicodedata
import difflib
import datetime
import regex
import requests
import pytz
from pynab.db import db_session, Release, Movie, MetaBlack, Category, DataLog, windowed_query
from pynab import log
import config
PROCESS_CHUNK_SIZE = 500
OMDB_SEARCH_URL = 'http://www.omdbapi.com/?s='
OMDB_DETAIL_URL = 'ht... | gpl-2.0 | -2,663,193,650,727,870,500 | 33.754601 | 167 | 0.509974 | false | 4.084355 | false | false | false |
chandler14362/panda3d | tests/gobj/test_geom.py | 10 | 2483 | from panda3d import core
empty_format = core.GeomVertexFormat.get_empty()
def test_geom_decompose_in_place():
vertex_data = core.GeomVertexData("", empty_format, core.GeomEnums.UH_static)
prim = core.GeomTristrips(core.GeomEnums.UH_static)
prim.add_vertex(0)
prim.add_vertex(1)
prim.add_vertex(2)
... | bsd-3-clause | -4,603,771,188,745,517,600 | 28.559524 | 87 | 0.660491 | false | 2.907494 | false | false | false |
karllessard/tensorflow | tensorflow/python/eager/wrap_function.py | 6 | 26433 | # Copyright 2018 The TensorFlow 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 applica... | apache-2.0 | 6,419,640,718,305,964,000 | 39.417431 | 107 | 0.689555 | false | 3.950531 | false | false | false |
autopkg/orchard-recipes | SharedProcessors/AFSAuth.py | 4 | 2219 | #! /usr/bin/env python
#
# Copyright 2016 University of Oxford
#
# Author
# Name: Gary Ballantine
# Email: gary.ballantine at it.ox.ac.uk
# GitHub: AltMeta
# Distributed under terms of the MIT license.
"""
Authorises AFS via shelling out and using a kerberos keytab
and performing aklog
"""
import os, subprocess
from ... | gpl-3.0 | 1,215,392,677,082,226,000 | 27.088608 | 98 | 0.569626 | false | 3.767402 | false | false | false |
ffsdmad/test | auto_gen_module/flask2/forms.py | 1 | 2058 |
# форма для domens
class DomensForm(Form):
id = fields.TextField(u'id' , default=u'None', validators=[validators.required()])
cdate = fields.TextField(u'cdate' , default=u'None', validators=[validators.required()])
udate = fields.TextField(u'udate' , default=u'None', validators=[validators.required()]... | gpl-2.0 | -3,196,176,525,192,246,300 | 62.8125 | 110 | 0.704212 | false | 3.601411 | false | false | false |
batxes/4c2vhic | Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/mtx1_models/Six_zebra_models48514.py | 4 | 13934 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 | 4,177,656,246,144,539,000 | 45.758389 | 75 | 0.700014 | false | 2.625094 | false | false | false |
kambysese/mne-python | mne/datasets/brainstorm/bst_resting.py | 12 | 1477 | # Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>
#
# License: BSD (3-clause)
from functools import partial
from ...utils import verbose
from ..utils import (has_dataset, _data_path, _get_version, _version_doc,
_data_path_doc_accept)
has_brainstorm_data = partial(has_dataset, name='brainst... | bsd-3-clause | -2,993,587,314,765,377,000 | 30.425532 | 77 | 0.645227 | false | 3.282222 | false | false | false |
facundoq/toys | cic-fly/src/cic/ImageReader.py | 1 | 3783 | '''
Created on 14/05/2013
@author: facuq
'''
from numpy import *
from scipy import ndimage
import os;
from Utils import is_hidden
from matplotlib.image import imread
from PIL import TiffImagePlugin
def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None,
origin=None, dpi=100):
"""
Sav... | agpl-3.0 | -4,321,829,481,087,383,600 | 33.4 | 129 | 0.618821 | false | 3.708824 | false | false | false |
cts2/rf2db | rf2db/db/RF2TransitiveChildren.py | 1 | 3835 | # -*- coding: utf-8 -*-
# Copyright (c) 2014, Mayo Clinic
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | -9,186,857,485,229,114,000 | 45.216867 | 87 | 0.653716 | false | 4.20966 | false | false | false |
J216/gimp_be | gimp_be/image/exif.py | 1 | 2335 | import os
import json
from time import sleep
from subprocess import Popen, PIPE
from datetime import datetime
from sys import platform
if "win" in platform:
exiftool_location="exiftool.exe"
elif "linux" in platform:
exiftool_location="exiftool"
else:
exiftool_location="exiftool.exe"
def getEXIFTags(file_... | mit | 7,110,081,704,028,435,000 | 30.133333 | 100 | 0.610278 | false | 3.284107 | false | false | false |
akbertram/appengine-mapreduce | python/test/mapreduce/operation/counters_test.py | 4 | 1244 | #!/usr/bin/env python
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -271,654,941,731,302,980 | 23.392157 | 74 | 0.70418 | false | 3.92429 | true | false | false |
briansan/rams | RAMS/comm/JoystickClientInterface.py | 1 | 1996 | """Client Interface for Pygame.
Pygame used to parse keyboard and mouse commands as well as display
images in a window
"""
from PygameClientInterface import PygameClientInterface
class JoystickClientInterface(PygameClientInterface):
"""
__init__ function -> setup XMLRPC as well as pygame
"""
def ... | bsd-3-clause | 1,351,942,430,450,730,000 | 26.722222 | 70 | 0.60521 | false | 4.098563 | false | false | false |
drocco007/vox_commands | archive/java_python.py | 1 | 1953 | from dragonfly import (Grammar, AppContext, MappingRule, Dictation,
Key, Text, FocusWindow, IntegerRef, Function)
#---------------------------------------------------------------------------
# Create this module's grammar and the context under which it'll be active.
context = AppContext(execut... | mit | 5,275,517,119,165,565,000 | 35.849057 | 89 | 0.570405 | false | 4.120253 | false | false | false |
Telefonica/toolium-examples | web/pageobjects/tables.py | 1 | 1474 | # -*- coding: utf-8 -*-
u"""
Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U.
This file is part of Toolium.
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/lic... | apache-2.0 | 6,622,172,321,602,832,000 | 32.454545 | 80 | 0.684103 | false | 3.330317 | false | false | false |
paul-voyles/femsim-hrmc | potentials/reformat_potential.py | 1 | 1506 | import sys, os, re
def reformat(f):
of = 'reformatted/'+f
with open(f, 'r') as input, open(of, 'w') as output:
line = input.readline() # Comment 1
output.write(line)
line = input.readline() # Comment 2
output.write(line)
line = input.readline() # Comment 3
output... | mit | -8,091,060,057,435,095,000 | 28.529412 | 81 | 0.498008 | false | 3.628916 | false | false | false |
seppovic/check_mk-plugins | notify-via-isms/web/plugins/wato/notify-via-isms_notifications.py | 1 | 2644 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
register_notification_parameters("isms.pl",
Dictionary(
optional_keys = ["splitmax", "timeout", "debug"],
elements = [
( "ismsserver",
TextAscii(
title = _("isms-Server"),
help... | gpl-2.0 | -1,686,057,100,508,082,200 | 32.897436 | 107 | 0.417549 | false | 5.194499 | false | false | false |
skuda/client-python | kubernetes/client/models/v1_tcp_socket_action.py | 1 | 3244 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | 573,503,810,028,661,440 | 26.965517 | 133 | 0.536067 | false | 4.336898 | false | false | false |
huguesv/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/menuinst/__init__.py | 4 | 2394 | # Copyright (c) 2008-2011 by Enthought, Inc.
# Copyright (c) 2013-2015 Continuum Analytics, Inc.
# All rights reserved.
from __future__ import absolute_import
import logging
import sys
import json
from os.path import abspath, basename, exists, join
from ._version import get_versions
__version__ = get_versions()['vers... | apache-2.0 | -2,998,005,029,663,971,300 | 30.5 | 97 | 0.576859 | false | 3.950495 | false | false | false |
schwehr/gdal-autotest2 | python/gcore/asyncreader_test.py | 1 | 3937 | #!/usr/bin/env python
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 | 2,296,637,170,337,337,900 | 35.453704 | 81 | 0.723139 | false | 3.621895 | true | false | false |
ActiveState/code | recipes/Python/578817_lrutimestamp__cache_entry_aging/recipe-578817.py | 1 | 3016 | #!/usr/bin/python3
""" Test script for lru_timestamp function.
usage: lru.py [-h] [-r REFRESH] [-s SLEEP]
optional arguments:
-h, --help show this help message and exit
-r REFRESH, --refresh REFRESH
refresh interval (default 60 min)
-s SLEEP, --sleep SLEEP
... | mit | 5,343,727,916,261,897,000 | 28 | 77 | 0.627984 | false | 3.891613 | false | false | false |
jondelmil/aiovectortiler | aiovectortiler/config_handler.py | 1 | 3044 | import yaml
import logging
logger = logging.getLogger(__name__)
class Configs:
server = None
recipes = {}
DB = None
plugins = None
@classmethod
def init_server_configs(cls, server_configs):
with open(server_configs) as s_c:
cls.server = yaml.load(s_c.read())
@classme... | mit | 1,751,416,291,269,608,000 | 27.716981 | 119 | 0.605125 | false | 3.744157 | true | false | false |
simpletrain/pybingwallpaper | src/winsetter.py | 1 | 3113 | #!/usr/bin/env python3
import log
import sys
import subprocess
from importlib import import_module
from setter import *
from os.path import dirname, splitext
if sys.platform == 'win32':
winreg = import_module('winreg')
Image = import_module('PIL.Image')
win32gui = import_module('win32.win32gui')
def ... | mit | 5,449,361,964,481,104,000 | 36.963415 | 102 | 0.551879 | false | 3.852723 | false | false | false |
will-Do/avocado-vt | selftests/unit/test_utils_misc.py | 1 | 7838 | #!/usr/bin/python
import os
import tempfile
import unittest
import sys
from avocado.utils import process
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if os.path.isdir(os.path.join(basedir, 'virttest')):
sys.path.append(basedir)
from... | gpl-2.0 | 6,594,863,467,533,439,000 | 33.528634 | 78 | 0.567237 | false | 3.28362 | true | false | false |
CWSL/access-om | test/exp_test_helper.py | 1 | 13583 |
from __future__ import print_function
import subprocess as sp
import sys
import stat
import shutil
import re
import os
import sys
import glob
import time
import yaml
from util import wait_for_qsub, get_git_hash
class ExpTestHelper(object):
def __init__(self, exp_name, bin_path=None):
self.exp_name = e... | apache-2.0 | -427,938,558,936,310,200 | 32.455665 | 93 | 0.54421 | false | 3.427454 | true | false | false |
zzrcxb/Pugoo | DataManagement/gobase.py | 1 | 1028 | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import *
TableBase = declarative_base()
class GoBase(TableBase):
__tablename__ = 'training'
filehash = Column(String(44), primary_key=True)
fileformat = Column(String(10), default=None)
filesource = Column(String(64), default=None... | gpl-3.0 | -4,680,477,335,273,773,000 | 38.538462 | 94 | 0.631323 | false | 3.438127 | false | false | false |
nguyenngochuy91/Ancestral-Blocks-Reconstruction | get_result.py | 1 | 3339 | #!/usr/bin/python
from homolog4 import Homolog
import os
import argparse
def parser_code():
parser = argparse.ArgumentParser()
parser.add_argument("--input","-i", default="./optimized_gene_block/",help="optimized gene block ")
parser.add_argument("--gene_name", "-g", defaul... | gpl-3.0 | -7,847,072,557,768,804,000 | 33.791667 | 115 | 0.583708 | false | 3.697674 | false | false | false |
astrobin/astrobin | astrobin_apps_images/migrations/0013_add_regular_large_fields.py | 1 | 1337 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-04-18 20:57
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('astrobin_apps_images', '0012_rename_regular_crop_anonymized_to_story_crop'),
]
ope... | agpl-3.0 | -6,564,447,764,618,918,000 | 32.425 | 86 | 0.598355 | false | 4.051515 | false | false | false |
lowinger42/ergotime | client/util.py | 1 | 2814 | #!/usr/bin/env python3
"""
Database utilities
Copyright (C) 2020 Anders Lowinger, anders@abundo.se
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 optio... | mit | 5,375,349,524,726,260,000 | 30.617978 | 70 | 0.634328 | false | 3.722222 | false | false | false |
EuropeanSocialInnovationDatabase/ESID-main | TextMining/Classifiers/Trainers/RuleBasedInnovativeness.py | 1 | 21912 | from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.naive_bayes import MultinomialNB
from sklearn import metrics
from sklearn.pipeline import Pipeline
import numpy as np
import pandas as pd
... | gpl-3.0 | -1,968,229,541,548,031,700 | 37.240838 | 178 | 0.54404 | false | 3.525664 | true | false | false |
spaceone/pyjs | pygtkweb/demos/012-label.py | 6 | 3787 | #!/usr/bin/env python
# example label.py
import pygtk
pygtk.require('2.0')
import gtk
class Labels:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("destroy", lambda w: gtk.main_quit())
self.window.set_title("Label")
vbox = gtk.VBox(False, 5)... | apache-2.0 | 7,959,622,732,269,321,000 | 38.863158 | 82 | 0.496963 | false | 4.033014 | false | false | false |
IvanaXu/Test_Class_GOF | tPatterns/J2EEDesign_Patterns/test_Business_Delegate_Pattern.py | 1 | 1787 | # -*-coding:utf-8-*-
# @auth ivan
# @time 2016-10-26 19:01:45
# @goal test for Business Delegate Pattern
class BusinessService:
def __init__(self):
return
def doProcessing(self):
return
class EJBService(BusinessService):
def __init__(self):
BusinessService.__init__(self)
... | gpl-3.0 | -2,944,724,611,565,286,400 | 20.792683 | 86 | 0.646894 | false | 4.070615 | false | false | false |
mtasic85/routingtable | contact_list.py | 1 | 2632 | __all__ = ['ContactList']
import random
from contact import Contact
from print_colors import PrintColors
class ContactList(object):
def __init__(self):
self.items = []
self.items_id_map = {}
self.items_raddr_map = {}
def __len__(self):
return len(self.items)
def __iter__... | mit | 3,009,064,387,989,034,000 | 25.585859 | 87 | 0.526216 | false | 3.675978 | false | false | false |
Clear-ICT/odoo-addons | account_petty_cash/wizard/issue_voucher.py | 1 | 3536 | # -*- coding: utf-8 -*-
#
#
# Copyright (c) 2016 Sucros Clear Information Technologies PLC.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either ... | agpl-3.0 | -2,242,741,917,543,163,600 | 34.36 | 77 | 0.598133 | false | 3.877193 | false | false | false |
autosportlabs/kivy | kivy/base.py | 9 | 16223 | # pylint: disable=W0611
'''
Kivy Base
=========
This module contains core Kivy functionality and is not intended for end users.
Feel free to look though it, but calling any of these methods directly may well
result in unpredictable behavior.
Event loop management
---------------------
'''
__all__ = (
'EventLoop... | mit | 6,906,481,851,962,687,000 | 30.439922 | 79 | 0.580102 | false | 4.375135 | true | false | false |
Learningtribes/edx-platform | lms/djangoapps/lt_analytics/models.py | 1 | 26722 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import defaultdict
import logging
from course_blocks.api import get_course_blocks
from course_widget.grades import get_progress
from courseware import grades
from courseware.courses import get_course_by_id
from courseware.views.views imp... | agpl-3.0 | 6,291,872,158,171,765,000 | 41.08189 | 120 | 0.594791 | false | 4.149379 | false | false | false |
EinsteinCarrey/Shoppinglist | classes/user.py | 1 | 2895 | import global_functions
from classes.shopping_list import ShoppingList
class User(object):
def __init__(self, username, password, firstname, lastname):
"""
Attributes:
username (str): A unique name to identify user.
password (str): A secret phrase to authentic... | mit | -8,741,231,990,077,959,000 | 31.166667 | 72 | 0.572366 | false | 4.602544 | false | false | false |
operepo/ope | libs/gluon/packages/dal/pydal/adapters/sapdb.py | 11 | 3967 | # -*- coding: utf-8 -*-
import re
from .._globals import IDENTITY
from .base import BaseAdapter
class SAPDBAdapter(BaseAdapter):
drivers = ('sapdb',)
support_distributed_transaction = False
types = {
'boolean': 'CHAR(1)',
'string': 'VARCHAR(%(length)s)',
'text': 'LONG',
'... | mit | -6,862,974,411,384,298,000 | 39.896907 | 197 | 0.546005 | false | 3.452567 | false | false | false |
alexander-rakhlin/CNN-for-Sentence-Classification-in-Keras | data_helpers.py | 1 | 4232 | import numpy as np
import re
import itertools
from collections import Counter
"""
Original taken from https://github.com/dennybritz/cnn-text-classification-tf
"""
def clean_str(string):
"""
Tokenization/string cleaning for all datasets except for SST.
Original taken from https://github.com/yoonkim/CNN_se... | mit | -5,858,940,968,319,273,000 | 34.864407 | 91 | 0.639178 | false | 3.550336 | false | false | false |
TianpeiLuke/GParML | gd.py | 2 | 4805 |
import numpy as np
from numpy.linalg.linalg import LinAlgError
import sys
import traceback
import gd_local_MapReduce as local_MapReduce
def print_out(len_maxiters, display, fnow, current_grad, beta, iteration):
if display:
print '\r',
print '{0:>0{mi}g} {1:> 12e} {2:> 12e} {3:> 12e}'.format(it... | bsd-3-clause | -4,125,403,642,333,400,600 | 36.834646 | 221 | 0.597294 | false | 3.398161 | false | false | false |
avislab/sensorstest | MPU-6050/pyplay_accel.py | 1 | 2633 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import random, pygame, sys, thread, time
from pygame.locals import *
from mpu6050 import *
y_offset = 0
rotation = 0
def mpu6050_read():
global y_offset
global rotation
mpu = MPU6050()
mpu.initialize()
# Set calibration data
mpu.gyro_offs = {'x': -178, 'y': 259, 'z':... | gpl-2.0 | 422,374,709,986,391,360 | 22.096491 | 74 | 0.621724 | false | 2.858849 | false | false | false |
lokik/sfepy | examples/homogenization/nonlinear_homogenization.py | 1 | 8053 | # -*- coding: utf-8 -*-
import numpy as nm
from sfepy.homogenization.utils import define_box_regions
import sfepy.homogenization.coefs_base as cb
import sfepy.discrete.fem.periodic as per
from sfepy.base.base import Struct
from sfepy.terms.terms_hyperelastic_ul import\
HyperElasticULFamilyData, NeoHookeanULTerm, Bu... | bsd-3-clause | -5,512,007,324,990,879,000 | 32.836134 | 79 | 0.539178 | false | 3.090177 | false | false | false |
mikehulluk/morphforge | src/morphforgecontrib/simulation/synapse_templates/exponential_form/exp2synnmda/neuron.py | 1 | 8557 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | bsd-2-clause | -4,668,474,014,525,667,000 | 42.658163 | 169 | 0.707374 | false | 3.450403 | false | false | false |
SequencingDOTcom/oAuth2-demo | python-django/oauth2demo/oauth/core/oauthclient.py | 4 | 4128 | import urllib
import sched
import time
from threading import Thread
from token import Token
from ..utils.http import do_basic_secure_post
from ..exceptions.exceptions import BasicAuthenticationFailedException
class DefaultSequencingOAuth2Client(object):
# Attribute for value of redirect url
ATTR_REDIRECT_UR... | mit | 4,327,431,929,401,514,500 | 33.4 | 96 | 0.641957 | false | 4.066995 | false | false | false |
nijel/weblate | weblate/checks/tests/test_models.py | 1 | 5050 | #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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 Lice... | gpl-3.0 | 7,613,588,041,203,271,000 | 35.309353 | 84 | 0.623935 | false | 3.900309 | true | false | false |
sloria/sepal | sepal/datasets/tasks.py | 1 | 8545 | import os
from django.conf import settings
import yaafelib as yf
import wave
import contextlib
from celery import task
from sepal.datasets.models import *
from sepal.datasets.utils import filter_by_key, find_dict_by_item
@task()
def handle_uploaded_file(f):
'''Saves an uploaded data source to MEDIA_ROOT/data_so... | bsd-3-clause | 8,606,148,952,394,087,000 | 36.977778 | 118 | 0.542071 | false | 4.150073 | false | false | false |
Blackfin/rclone | make_manual.py | 2 | 2008 | #!/usr/bin/python
"""
Make single page versions of the documentation for release and
conversion into man pages etc.
"""
import os
import re
from datetime import datetime
docpath = "docs/content"
outfile = "MANUAL.md"
# Order to add docs segments to make outfile
docs = [
"about.md",
"install.md",
"docs.md... | mit | 329,188,811,106,438,460 | 23.487805 | 84 | 0.581175 | false | 3.162205 | false | false | false |
goodcrypto/goodcrypto-libs | reinhardt/utils.py | 1 | 3336 | '''
Utility classes and functions.
Copyright 2009-2016 GoodCrypto
Last modified: 2016-05-18
This file is open source, licensed under GPLv3 <http://www.gnu.org/licenses/>.
'''
from __future__ import unicode_literals
import os
from datetime import datetime
from traceback import format_exc
from django.... | gpl-3.0 | 7,627,728,768,087,755,000 | 27.033613 | 111 | 0.623501 | false | 4.063337 | false | false | false |
activityworkshop/Murmeli | murmeli/postservice.py | 1 | 14009 | '''Post service, dealing with outgoing post'''
import threading
import time
import socks
from murmeli.system import System, Component
from murmeli.signals import Timer
from murmeli.message import StatusNotifyMessage, Message, RelayMessage
from murmeli import dbutils
from murmeli import imageutils
from murmeli import g... | gpl-2.0 | 6,563,628,373,632,077,000 | 45.696667 | 99 | 0.579984 | false | 4.254176 | false | false | false |
rspavel/spack | var/spack/repos/builtin/packages/flink/package.py | 5 | 1283 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Flink(Package):
"""
Apache Flink is an open source stream processing framework with
... | lgpl-2.1 | 5,248,184,728,426,844,000 | 40.387097 | 96 | 0.734217 | false | 2.607724 | false | false | false |
SiLab-Bonn/fe65_p2 | fe65p2/scans/timewalk_scan.py | 1 | 17087 | from fe65p2.scan_base import ScanBase
import fe65p2.plotting as plotting
import fe65p2.analysis as analysis
import time
import numpy as np
import bitarray
import tables as tb
from bokeh.charts import output_file, save, show
from bokeh.models.layouts import Column, Row
import yaml
from basil.dut import Dut
import loggi... | gpl-2.0 | -1,280,557,465,826,803,200 | 44.687166 | 141 | 0.52022 | false | 3.353022 | false | false | false |
goerz/clusterjob | docs/source/conf.py | 1 | 11667 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# clusterjob documentation build configuration file, created by
# sphinx-quickstart on Sun Dec 27 17:35:53 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... | mit | -8,506,664,327,711,867,000 | 32.144886 | 80 | 0.715351 | false | 3.65393 | true | false | false |
vholland/schemaorg | scripts/inputconvert.py | 1 | 3381 | #!/usr/bin/env python2.7
import unittest
import os
from os import path, getenv
from os.path import expanduser
import logging # https://docs.python.org/2/library/logging.html#logging-levels
import glob
import argparse
import sys
import csv
sys.path.append( os.getcwd() )
sys.path.insert( 1, 'lib' ) #Pickup libs, rdflib ... | apache-2.0 | 1,162,541,376,466,549,000 | 31.2 | 118 | 0.695948 | false | 3.244722 | false | false | false |
crs4/omero.biobank | bl/vl/app/importer/study.py | 1 | 5639 | # BEGIN_COPYRIGHT
# END_COPYRIGHT
"""
Import study
============
A study represents a general context. It is characterized by the
following fields::
label description
ASTUDY A textual description of ASTUDY, no tabs please.
The description column is optional. The study sub-operation will read
in a tsv files with... | gpl-2.0 | -3,478,938,050,830,232,600 | 32.170588 | 84 | 0.636992 | false | 3.56673 | false | false | false |
GrahamDumpleton/autowrapt | src/__startup__/sitecustomize.py | 1 | 5685 | '''Provides a custom 'sitecustomize' module which will be used when the
'autowrapt' wrapper script is used when launching a Python program. This
custom 'sitecustomize' module will find any existing 'sitecustomize'
module which may have been overridden and ensures that that is imported
as well. Once that is done then th... | bsd-2-clause | 6,302,914,326,998,667,000 | 37.938356 | 74 | 0.707828 | false | 3.883197 | false | false | false |
tknapen/reward_np_analysis | preprocessing.py | 1 | 7273 | # from nipype import config
# config.enable_debug_mode()
# Importing necessary packages
import os
import os.path as op
import glob
import json
import nipype
from nipype import config, logging
import matplotlib.pyplot as plt
import nipype.interfaces.fsl as fsl
import nipype.pipeline.engine as pe
import nipype.interfaces... | mit | -1,604,775,566,669,153,300 | 47.486667 | 170 | 0.688299 | false | 3.540896 | true | false | false |
treyhunner/databundles | databundles/geo/util.py | 1 | 6216 | '''
Created on Feb 15, 2013
@author: eric
'''
from collections import namedtuple
import random
from osgeo import gdal, ogr
BoundingBox = namedtuple('BoundingBox', ['min_x', 'min_y','max_x', 'max_y'])
def extents(database, table_name, where=None, lat_col='_db_lat', lon_col='_db_lon'):
'''Return the bounding ... | bsd-3-clause | 8,801,215,917,953,914,000 | 29.772277 | 107 | 0.542471 | false | 3.302869 | false | false | false |
dikshyam/icsisumm | icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/classifier/knn.py | 9 | 1784 | # Natural Language Toolkit - K nearest neighbour classifier
#
# Author: Sumukh Ghodke <sumukh dot ghodke at gmail dot com>
#
# URL: <http://nltk.sf.net>
# This software is distributed under GPL, for license information see LICENSE.TXT
from nltk_contrib.classifier import instances as ins, Classifier, distancemetric as ... | gpl-3.0 | -4,724,643,084,960,081,000 | 30.875 | 87 | 0.63509 | false | 4.139211 | false | false | false |
trawick/edurepo | src/edurepo/repo/remove.py | 1 | 1232 | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", 'edurepo.settings')
import sys
sys.path.append('.')
import django
from repo.models import Course, LearningObjective
def delete_learning_objective(lo, delete, noisy=True):
if noisy:
print 'Deleting objective %s...' % lo
if delete:
lo.... | apache-2.0 | -8,927,304,199,601,935,000 | 23.156863 | 77 | 0.633117 | false | 3.530086 | false | false | false |
AKSW/QuitStore | quit/provenance.py | 1 | 3220 | #!/usr/bin/env python3
import functools as ft
from rdflib import BNode
from quit.namespace import FOAF, PROV, QUIT
class Blame(object):
"""
Reusable Blame object for web client
"""
def __init__(self, quit):
self.quit = quit
def _generate_values(self, quads):
result = list()
... | gpl-3.0 | -7,105,127,579,763,082,000 | 31.857143 | 97 | 0.473602 | false | 3.815166 | false | false | false |
wheldom01/privacyidea | privacyidea/lib/event.py | 2 | 8819 | # -*- coding: utf-8 -*-
#
# 2016-05-04 Cornelius Kölbel <cornelius.koelbel@netknights.it>
# Initial writup
#
# License: AGPLv3
# (c) 2016. Cornelius Kölbel
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# License as publi... | agpl-3.0 | 752,872,875,086,803,500 | 35.433884 | 80 | 0.606215 | false | 4.305176 | true | false | false |
Julian/Great | great/views/music.py | 1 | 4539 | from datetime import datetime
from uuid import UUID
import json
from minion.renderers import JSON
from minion.request import Response
from minion.traversal import LeafResource, TreeResource
from sqlalchemy import String, select
from sqlalchemy.sql.expression import cast
import attr
from great.models import music
from... | mit | 6,941,405,291,674,199,000 | 29.463087 | 79 | 0.546376 | false | 4.100271 | false | false | false |
Passtechsoft/TPEAlpGen | blender/release/scripts/addons/rigify/rigs/basic/copy.py | 6 | 4587 | #====================== BEGIN GPL LICENSE BLOCK ======================
#
# 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 vers... | gpl-3.0 | 8,010,847,085,069,767,000 | 32 | 128 | 0.618051 | false | 3.611811 | false | false | false |
paihu/moebox | settings.py | 1 | 3166 | """
Django settings for moebox project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
from .conf... | mit | -6,121,905,040,672,723,000 | 24.95082 | 91 | 0.685407 | false | 3.471491 | false | false | false |
XertroV/nodeup-xk-io | nodeup-server/wallet.py | 1 | 1417 | from binascii import hexlify
import logging
from pycoin.tx import Tx
from models import unprocessed_txs, txs, all_addresses, addr_to_uid, Account, known_txs, exchange_rate, nodes_recently_updated
from constants import COIN
from digitalocean_custom import calc_node_minutes
def hash_to_hex(h):
return hexlify(h[::-... | mit | 4,699,442,673,061,066,000 | 34.425 | 126 | 0.645025 | false | 3.381862 | false | false | false |
saullocastro/pyNastran | pyNastran/bdf/mesh_utils/bdf_merge.py | 1 | 5578 | from __future__ import print_function
import os
import numpy as np
from six import string_types, iteritems
from pyNastran.bdf.mesh_utils.bdf_renumber import bdf_renumber
from pyNastran.bdf.bdf import BDF
def bdf_merge(bdf_filenames, bdf_filename_out=None, renumber=True, encoding=None,
size=8, is_double=... | lgpl-3.0 | -7,953,364,121,187,741,000 | 37.468966 | 93 | 0.558085 | false | 3.505971 | false | false | false |
lucastheis/isa | code/tools/logsumexp.py | 1 | 1347 | """
A numerically stable implementation of the logarithm of sums of exponentials.
"""
__license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>'
__author__ = 'Lucas Theis <lucas@theis.io>'
__docformat__ = 'epytext'
from numpy import log, sum, exp, zeros, max, asarray, vectorize, inf, nan, squeez... | mit | 2,026,095,489,688,845,800 | 22.631579 | 91 | 0.673348 | false | 2.80625 | false | false | false |
jobs2phones/j2p | jobs2phones/user_manage.py | 1 | 3780 | import load
import send
import imaplib
import email
import yaml
import re
from bs4 import BeautifulSoup
with open('../config.yaml') as f:
cf = yaml.safe_load(f)
def parse_text_message_from_email(msg):
'''
Gets the actual text sent to the
email address by parsing it out of the email body
'''
... | mit | -1,107,737,909,954,239,700 | 37.181818 | 91 | 0.567196 | false | 3.825911 | false | false | false |
akesandgren/easybuild-easyblocks | easybuild/easyblocks/b/boost.py | 1 | 16449 | ##
# Copyright 2009-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | -4,422,243,499,139,912,700 | 47.096491 | 140 | 0.600888 | false | 3.706399 | true | false | false |
derwolfe/teiler | teiler/peerdiscovery.py | 1 | 7702 | """
peerdiscovery
The process is simple.
1) Start up the client and broadcast a UDP datagram on a defined interval.
2) Listen for other datagrams
3) When another datagram is heard, pull it into the list of the peers.
But, if the peer is already in the list, do nothing.
4) On disconnect, the client sends an exit me... | mit | 3,262,398,523,487,847,400 | 32.633188 | 79 | 0.604778 | false | 4.201855 | false | false | false |
zenefits/sentry | src/sentry/status_checks/base.py | 6 | 1898 | from __future__ import absolute_import
import six
from functools import total_ordering
from sentry.utils.compat import implements_to_string
@implements_to_string
@total_ordering
class Problem(object):
# Used for issues that may render the system inoperable or have effects on
# data integrity (e.g. issues ... | bsd-3-clause | 6,380,959,031,924,183,000 | 29.612903 | 90 | 0.679663 | false | 4.021186 | false | false | false |
denfromufa/comtypes | comtypes/tools/typedesc_base.py | 6 | 5414 | # typedesc.py - classes representing C type descriptions
try:
set
except NameError:
from sets import Set as set
class Argument(object):
"a Parameter in the argument list of a callable (Function, Method, ...)"
def __init__(self, atype, name):
self.atype = atype
self.name = name
class _H... | mit | -2,682,827,743,539,516,000 | 25.409756 | 76 | 0.575175 | false | 3.906205 | false | false | false |
DenysGurin/solnce | dgcrm/views.py | 1 | 51890 | import random
import re
import json
import operator
from itertools import chain
from datetime import datetime, timedelta, date, time
import calendar
from django.urls import reverse
from django.shortcuts import render, redirect, get_object_or_404, render_to_response
from django.http import HttpResponse, HttpResponseRed... | mit | -1,042,679,687,851,345,500 | 36.53227 | 145 | 0.583507 | false | 3.493015 | false | false | false |
merenlab/anvio | anvio/mcgclassifier.py | 2 | 35383 | # -*- coding: utf-8
# pylint: disable=line-too-long
"""
Classes to classify genes based on coverages across metagenomes.
anvi-mcg-classifier is the default client using this module
"""
import os
import anvio
import numpy as np
import pandas as pd
import matplotlib
# TODO: according to the warning, this call ... | gpl-3.0 | -6,849,942,037,077,747,000 | 51.575037 | 264 | 0.655795 | false | 3.819821 | false | false | false |
Venturi/cms | env/lib/python2.7/site-packages/cms/wizards/views.py | 2 | 5841 | # -*- coding: utf-8 -*-
import os
from django.forms import Form
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from django.core.urlresolvers import NoReverseMatch
from django.db import transaction
from django.template.response import SimpleTemplateResponse
from django.utils.... | gpl-2.0 | 7,294,099,598,501,229,000 | 32.1875 | 80 | 0.612395 | false | 3.878486 | false | false | false |
rtevans/tacc_stats_old | analyze/process_pickles/tspl.py | 1 | 3978 | import cPickle as pickle
import numpy
import glob, os, stat, time, datetime
import re
class TSPLException(Exception):
def __init__(self,arg):
self.value=arg
print self.value
class TSPLBase:
def __init__(self,file,k1,k2):
self.f=open(file)
self.j=pickle.load(self.f)
self.f.close()
try:
... | lgpl-2.1 | 5,560,491,141,564,937,000 | 27.618705 | 80 | 0.599799 | false | 2.895197 | false | false | false |
wgsyd/wgtf | src/core/testing/plg_python27_unit_test/resources/Scripts/python27_test/__init__.py | 2 | 7087 | # Send print to logger
import scriptoutputwriter
# Access C++ module from Python
import reflectiontest
'''
Type testing
https://docs.python.org/2/library/types.html
Types not tested yet:
types.CodeType
types.MethodType
types.UnboundMethodType
types.BuiltinFunctionType
types.BuiltinMethodType
types.ModuleType
types.Fi... | bsd-3-clause | 4,597,229,874,851,165,000 | 24.220641 | 74 | 0.698462 | false | 3.101532 | true | false | false |
dutchbot/FoscamBackupper | foscambackup/config.py | 1 | 1124 | """ Holds configuration class """
from foscambackup.util import helper
from foscambackup.constant import Constant
import foscambackup.util.file_helper as file_helper
class Config:
""" Hold the config options for use in program """
host = ""
port = 0
username = ""
password = ""
model = ""
cu... | gpl-3.0 | -8,347,966,591,396,616,000 | 32.058824 | 90 | 0.630783 | false | 3.836177 | false | false | false |
ac001/moe | project/app/moe/paste/handlers.py | 1 | 3999 | # -*- coding: utf-8 -*-
"""
moe.paste.handlers
~~~~~~~~~~~~~~~~~~
Handlers for a really simple pastebin.
:copyright: 2010 by tipfy.org.
:license: BSD, see LICENSE.txt for more details.
"""
from tipfy import NotFound, request, Response, url_for, redirect_to
from tipfy.ext.i18n import _
from moe.ba... | bsd-3-clause | -6,296,441,456,934,692,000 | 29.295455 | 80 | 0.572143 | false | 3.834132 | false | false | false |
Hashi4/vmdgadgets | sample/sine_curve/circle.py | 1 | 1684 | import sys
sys.path.append('../../vmdgadgets')
import vmdutil
from vmdutil import vmddef
def replace_controlpoints(cp_all, cp, index):
for i in range(4):
cp_all[i][index] =cp[i]
return cp_all
sine1 = vmdutil.SINE1_CONTROLPOINTS # sin, [1x, 1y, 2x, 2y]
sine2 = vmdutil.SINE2_CONTROLPOINTS # 1 - c... | apache-2.0 | -1,859,937,820,300,628,200 | 32.019608 | 72 | 0.687648 | false | 2.51719 | false | false | false |
kivhift/pu | src/pu/msp430/titxt.py | 1 | 3622 | #
# Copyright (c) 2013 Joshua Hughes <kivhift@gmail.com>
#
import array
import cStringIO
import re
from pu.utils import is_an_integer
class Section(object):
def __init__(self, addr, buffer):
self.start_addr = addr
self.buffer = buffer
self.end_addr = addr + len(buffer) - 1
def __add__... | mit | 7,021,850,990,924,910,000 | 28.933884 | 74 | 0.46963 | false | 3.882101 | false | false | false |
TurkuNLP/Finnish-dep-parser | morpho-sd2ud/210-remove-feats.py | 1 | 3243 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import codecs
from morphoconllu import read_conllu
from tools import warn
usage = '%s IN OUT' % os.path.basename(__file__)
VERB_TAGS = set(['VERB', 'AUX'])
def remove_Adv_CASE(word):
# Remove case feature from adverbs. Omorfi is only expected t... | gpl-2.0 | 3,964,848,423,123,441,000 | 27.447368 | 77 | 0.635831 | false | 3.163902 | false | false | false |
llarsson/image-renamer | image-renamer.py | 1 | 5349 | #!/usr/bin/env python
import tempfile
import datetime
import logging
import os
import ftputil # external dependency, must be installed via pip or similar
# CONFIGURATION START
# Set this to the hostname of the FTP server
FTP_ADDRESS = "some.host.name.here.com"
FTP_USERNAME = "anonymous" # change these to a user... | apache-2.0 | -8,128,057,505,430,299,000 | 33.509677 | 82 | 0.640494 | false | 3.87328 | false | false | false |
googlefonts/cu2qu | tools/ufo_benchmark.py | 2 | 1191 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -6,132,140,593,097,859,000 | 27.357143 | 74 | 0.701931 | false | 3.544643 | false | false | false |
mYstar/PEA4JSP | multistartnsga2.py | 1 | 4432 | """ Implementation of the Master-Slave NSGA-II Genetic Algorithm using JSPEval
to evaluate the individuals. The fitness function is evaluated in parallel by
the Slave processors.
"""
import random
import time
import numpy as np
from mpi4py import MPI
from deap import creator, base, tools, algorithms
from deap110 import... | apache-2.0 | -4,041,595,893,003,669,000 | 28.157895 | 78 | 0.661327 | false | 3.446345 | false | false | false |
duncanwp/python_for_climate_scientists | course_content/optimisation_example/subset_by_region/subset_aerosolCCI_by_region_slowest.py | 2 | 2028 | import cis
import numpy as np
files = ["../../resources/WorkshopData2016/AerosolCCI/20080411002335-ESACCI-L2P_AEROSOL-AER_PRODUCTS-AATSR-ENVISAT-ORAC_31962-fv03.04.nc",
"../../resources/WorkshopData2016/AerosolCCI/20080411020411-ESACCI-L2P_AEROSOL-AER_PRODUCTS-AATSR-ENVISAT-ORAC_31963-fv03.04.nc",
".... | gpl-3.0 | -8,998,306,818,519,919,000 | 49.7 | 138 | 0.697239 | false | 2.63035 | false | false | false |
cokelaer/msdas | src/msdas/multimidas.py | 1 | 2875 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 3 16:40:58 2014
@author: cokelaer
"""
from .midas import XMIDAS
class MultiMIDAS(object):
"""Data structure to store multiple instances of MIDAS files
You can read a MIDAS file that contains several cell lines:
and acces to the midas files usig their cell... | gpl-3.0 | 2,209,642,933,023,126,000 | 28.336735 | 88 | 0.604174 | false | 3.787879 | false | false | false |
MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_mmtf.py | 1 | 2899 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | gpl-2.0 | 533,040,876,382,829,630 | 31.211111 | 79 | 0.619524 | false | 3.117204 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.