repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pmeier82/django-spikeval | djspikeval/forms/datafile.py | 1 | 2926 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.apps import apps
from .util import form_with_captcha
__all__ = ["DatafileForm"]
__author__ = "pmeier82"
Asset = apps.get_registered_model("base", "asset")
Datafile = apps.get_registered_model("djspikeval", "datafile"... | bsd-3-clause | -8,451,139,807,943,812,000 | 32.25 | 73 | 0.546822 | false | 3.88579 | false | false | false |
abourget/formalchemy-abourget | formalchemy/tests/test_multiple_keys.py | 1 | 3071 | # -*- coding: utf-8 -*-
from formalchemy.tests import *
def test_renderer_names():
"""
Check that the input name take care of multiple primary keys::
>>> fs = FieldSet(primary1)
>>> print fs.field.render()
<input id="PrimaryKeys-1_22-field" maxlength="10" name="PrimaryKeys-1_22-field" ... | mit | 7,984,146,956,180,403,000 | 29.405941 | 118 | 0.547704 | false | 3.558517 | false | false | false |
smartstudy/project_cron | main.py | 1 | 2804 | import json
import os
from AppKit import NSApplication, NSStatusBar, NSMenu, NSMenuItem, NSVariableStatusItemLength, NSImage
from PyObjCTools import AppHelper
from project_cron.models import Schedule
from threading import Timer
from project_cron.utils import logutil
class App(NSApplication):
def finishLaunching(... | mit | -2,770,964,706,049,844,700 | 34.05 | 109 | 0.622325 | false | 4.034532 | false | false | false |
nttks/edx-platform | biz/djangoapps/ga_achievement/tests/test_views.py | 1 | 201745 | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from collections import OrderedDict
from datetime import datetime
from ddt import ddt
import json
from mock import patch
impor... | agpl-3.0 | -2,311,038,217,161,401,000 | 48.562657 | 119 | 0.591504 | false | 3.868033 | true | false | false |
purushothamc/myibitsolutions | arrays/fill_range_in_spiral.py | 1 | 1051 | def generateMatrix(A):
n = A
rows, cols = n, n
top, bottom = 0, n - 1
left, right = 0, n - 1
direction = 0
result = [[0 for j in xrange(n)] for i in xrange(n)]
count = 1
while top <= bottom and left <= right:
if direction is 0:
for i in xrange(left, right + 1):
... | gpl-3.0 | 9,140,552,636,594,468,000 | 29.057143 | 56 | 0.432921 | false | 4.289796 | false | false | false |
prologic/kdb | kdb/plugins/rss.py | 1 | 7377 | from itertools import chain
from time import mktime, time
from pickle import dumps, loads
from traceback import format_exc
from circuits.protocols.irc import PRIVMSG
from circuits import handler, task, Event, Timer, Component
from feedparser import parse as parse_feed
from funcy import first, second
from html2text... | mit | -5,629,226,765,630,201,000 | 24.884211 | 77 | 0.459672 | false | 4.208214 | false | false | false |
briancurtin/python-openstacksdk | openstack/tests/functional/network/v2/test_auto_allocated_topology.py | 1 | 2426 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | 3,718,609,966,521,981,400 | 38.770492 | 77 | 0.6892 | false | 3.826498 | true | false | false |
gustavofonseca/packtools | packtools/domain.py | 1 | 20489 | # coding:utf-8
"""The domain-specific adapters.
An adapter is an object that provides domain-specific apis for another object,
called adaptee.
Examples are: XMLValidator and XMLPacker objects, which provide SciELO PS
validation behaviour and packaging functionality, respectively.
"""
from __future__ import unicode_li... | bsd-2-clause | -8,368,828,022,911,303,000 | 33.9046 | 136 | 0.61145 | false | 3.959992 | false | false | false |
datamade/yournextmp-popit | candidates/tests/test_revert.py | 1 | 8163 | import json
from mock import patch
from string import Template
from django.db.models import F
from django_webtest import WebTest
from popolo.models import Identifier
from candidates.models import MembershipExtra, PersonExtra
from .auth import TestUserMixin
from . import factories
example_timestamp = '2014-09-29T10... | agpl-3.0 | 2,455,165,964,185,914,400 | 35.28 | 96 | 0.515252 | false | 3.933976 | true | false | false |
hoondongkim/syntaxnet-kr | SJtoUD_POS.py | 1 | 10446 | import re
import codecs
import os
"""
[1] Main Function
"""
def main():
directory = os.getcwd() + '/InputDataType1'
filename = 'BTHO0437.txt'
filename = os.path.join(directory, filename)
f = open(filename, 'r', encoding='utf-16')
is_inside = False
line_counter = 0
OUT_FILENAME = "OutputDat... | apache-2.0 | -8,477,834,371,595,856,000 | 35.221402 | 152 | 0.45487 | false | 3.191157 | false | false | false |
h3rucutu/weevely-old | core/vector.py | 1 | 1305 | import types
class VectorList(list):
def get_vectors_by_interpreters(self, shells):
vect=[]
for v in self:
if v.interpreter in shells:
vect.append(v)
return vect
def get_vector_by_name(self, name):
for v in self:
if ... | gpl-3.0 | 1,101,729,514,562,507,800 | 25.632653 | 76 | 0.524904 | false | 4.052795 | false | false | false |
ianastewart/cwltc-admin | members/application_processor.py | 1 | 3702 | # Handle application process
from datetime import datetime
from members.models import Person, Membership, Subscription, TextBlock, AdultApplication
from members.services import (
subscription_create,
subscription_activate,
subscription_create_invoiceitems,
invoice_create,
)
from cardless.services impo... | mit | 7,603,111,895,722,632,000 | 36.77551 | 92 | 0.606699 | false | 4.260069 | false | false | false |
hknyldz/pisitools | pisilinux/pisilinux/db/filesldb.py | 1 | 2686 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2014, Marcin Bojara
#
# 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.
#
# Plea... | gpl-3.0 | -1,854,080,393,484,700,000 | 33.883117 | 105 | 0.616902 | false | 3.395702 | false | false | false |
eliasrg/SURF2017 | code/separate/coding/PAM.py | 1 | 2567 | # Copyright (c) 2017 Elias Riedel Gårding
# Licensed under the MIT License
from utilities import to_column_vector, int_to_bits, bits_to_int
import numpy as np
class Constellation:
"""A mapping m: ℤ2^n → ℝ^K."""
@classmethod
def uniform(cls, n):
"Equidistant points (K = 1)."
# {-(2^n - 1... | mit | -9,088,709,460,113,332,000 | 31.405063 | 73 | 0.532813 | false | 3.502052 | false | false | false |
matrixjoeq/timus_solutions | 1327/slu.py | 1 | 2005 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
1327. Fuses
Time limit: 1.0 second
Memory limit: 64 MB
[Description]
Sasha Privalov, a young programmer working in the SRITS (Scientific Research
Institute for Thaumaturgy and Spellcraft), finds his job rather enjoyable.
Indeed, he is the only programmer of such a wonderf... | mit | 8,483,938,644,643,850,000 | 35.981481 | 80 | 0.728092 | false | 3.268412 | false | false | false |
elimence/edx-platform | lms/djangoapps/courseware/features/smart-accordion.py | 1 | 5762 | #pylint: disable=C0111
#pylint: disable=W0621
from lettuce import world, step
from re import sub
from nose.tools import assert_equals
from xmodule.modulestore.django import modulestore
from common import *
from logging import getLogger
logger = getLogger(__name__)
def check_for_errors():
e = world.browser.find_... | agpl-3.0 | -6,453,196,963,020,202,000 | 35.468354 | 131 | 0.599098 | false | 3.836218 | false | false | false |
WalkingMachine/sara_commun | wm_robocup2016/src/inspection.py | 1 | 8680 | #!/usr/bin/env python
import rospy
import smach
from smach_ros import SimpleActionState
import wm_supervisor.srv
from move_base_msgs.msg import MoveBaseAction
from geometry_msgs.msg import PoseStamped, PoseWithCovarianceStamped
import threading
from std_msgs.msg import Float64, String, Bool
class InitRobot(smach.Sta... | apache-2.0 | -6,698,372,797,924,644,000 | 36.094017 | 120 | 0.575922 | false | 3.759203 | false | false | false |
ZeusWPI/Haldis | app/models/order.py | 1 | 3454 | "Script for everything Order related in the database"
import typing
from datetime import datetime
from utils import first
from hlds.definitions import location_definitions
from .database import db
from .user import User
class Order(db.Model):
"Class used for configuring the Order model in the database"
id = ... | mit | -4,438,506,992,852,992,500 | 32.862745 | 82 | 0.583092 | false | 3.816575 | false | false | false |
justinvforvendetta/electrum-pkb | lib/network.py | 1 | 18396 | import time
import Queue
import os
import sys
import random
import traceback
import socks
import socket
import json
import util
from bitcoin import *
import interface
from blockchain import Blockchain
DEFAULT_PORTS = {'t':'50001', 's':'50002', 'h':'8081', 'g':'8082'}
DEFAULT_SERVERS = {
'electrum-pkb.net': DEFA... | gpl-3.0 | 8,183,106,280,867,124,000 | 33.193309 | 138 | 0.570613 | false | 4.126514 | true | false | false |
dstrohl/advanced_config_manager | AdvConfigMgr/utils/flag_manager.py | 1 | 2469 | __author__ = 'dstrohl'
from AdvConfigMgr.utils.base_utils import list_in_list
# ===============================================================================
# Flag Manager
# ===============================================================================
class FlagList(object):
def __init__(self):
se... | gpl-2.0 | -7,637,230,000,685,972,000 | 23.445545 | 81 | 0.45808 | false | 4.156566 | false | false | false |
mapillary/OpenSfM | opensfm/test/test_rig.py | 1 | 4622 | """Test the rig module."""
import numpy as np
from opensfm import pygeometry, rig, types
def test_create_instances_with_patterns() -> None:
# A first rig model defined as left/right/top/bottom
# A complete instance
instance1 = [
"12345_left.jpg",
"12345_bottom.jpg",
"12345_top.jpg... | bsd-2-clause | -3,292,371,213,176,436,700 | 28.069182 | 80 | 0.540242 | false | 3.310888 | false | false | false |
jnoortheen/nigandu | src/managebkm.py | 2 | 1697 | __author__ = 'noor'
from PySide.QtGui import (QDialog, QLabel, QIcon, QWidget, QVBoxLayout, QPushButton, QListWidget, QFont)
from PySide.QtCore import QRect
class managebkm(QDialog):
def __init__(self, parent=None):
super(managebkm, self).__init__(parent)
appicom = QIcon(":/icons/njnlogo.png")
self.setW... | gpl-2.0 | 2,093,781,256,533,425,200 | 35.711111 | 104 | 0.747201 | false | 3.327451 | false | false | false |
sebastiansIT/RPI-Display-Backlight-Controller-for-Kodi | sources/screensaver.rpi-backlight-disabler/screensaver.py | 1 | 2345 | # Copyright 2016 Sebastian Spautz <sebastian@human-injection.de>
#
# This file is part of "RPI Display Backlight Control for Kodi".
#
# "RPI Display Backlight Control for Kodi" is free software: you can
# redistribute it and/or modify it under the terms of the GNU General
# Public License as publishe... | gpl-3.0 | -6,250,596,263,587,048,000 | 33.5 | 103 | 0.660128 | false | 3.72814 | false | false | false |
arcean/qtcontacts-tracker | tests/teststats.py | 1 | 10828 | #!/usr/bin/python
# This file is part of QtContacts tracker storage plugin
#
# Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
#
# Contact: Nokia Corporation (info@qt.nokia.com)
#
# GNU Lesser General Public License Usage
# This file may be used under the terms of the GNU Lesser General Public Licen... | lgpl-2.1 | 5,286,435,379,430,205,000 | 32.627329 | 92 | 0.579608 | false | 4.050879 | true | false | false |
spywhere/Javatar | commands/creates/create_class.py | 1 | 13833 | import sublime
import sublime_plugin
import os.path
from ...core import (
JavaClass,
JavaClassPath,
JavaUtils,
RE,
SnippetsManager,
StateProperty
)
from ...utils import (
ActionHistory,
StatusManager
)
EXTENDS_IMPLEMENTS_RE = "([:<])"
MAIN_TEMPLATE = "public static void main(String[] a... | mit | 719,629,061,234,050,600 | 32.01432 | 80 | 0.51247 | false | 4.416667 | false | false | false |
meejah/pyobfsproxy | obfsproxy/common/log.py | 1 | 1094 | # obfsproxy logging code
import logging
import sys
# XXX Add Formatter!!!
our_logger = logging.getLogger('our_logger')
default_handler = logging.StreamHandler(sys.stdout)
our_logger.addHandler(default_handler)
our_logger.propagate = False
def set_log_file(filename):
"""Set up our logger so that it starts loggin... | bsd-3-clause | 8,584,981,672,234,394,000 | 27.051282 | 84 | 0.738574 | false | 3.798611 | false | false | false |
buzz/volctl | volctl/osd.py | 1 | 7911 | """
OSD volume overlay
A transparent OSD volume indicator for the bottom-right corner.
Various code snippets taken from https://github.com/kozec/sc-controller
"""
import math
import cairo
from gi.repository import Gdk, Gtk, GdkX11, GLib
import volctl.xwrappers as X
class VolumeOverlay(Gtk.Window):
"""Window t... | gpl-2.0 | 1,739,896,336,297,428,500 | 32.100418 | 82 | 0.562761 | false | 3.491174 | false | false | false |
classcat/cc-prism-nsm | main/webapp/ccp_conf.py | 1 | 1509 | #############################################################
# ClassCat(R) Prism for HIDS
# Copyright (C) 2015 ClassCat Co.,Ltd. All rights reseerved.
##############################################################
# === Notice ===
# all python scripts were written by masao (@classcat.com)
#
# === History ===
# 02-a... | agpl-3.0 | 7,328,809,626,072,071,000 | 22.578125 | 78 | 0.526839 | false | 3.190275 | false | false | false |
shoopio/shoop | shuup/core/pricing/_price_display_options.py | 2 | 1631 | # This file is part of Shuup.
#
# Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
class PriceDisplayOptions(object):
"""
Price display options.
Parameters on... | agpl-3.0 | 3,897,043,345,657,898,500 | 27.614035 | 77 | 0.618639 | false | 4.314815 | false | false | false |
mohjaba/Health-Activity-Monitoring | 1_code/interactive_map/Demo1/twitter_stream.py | 1 | 1207 | import tweepy
import json
from pymongo import Connection
from bson import json_util
from tweepy.utils import import_simplejson
json = import_simplejson()
mongocon = Connection()
db = mongocon.twiter_data
col = db.tweets_stream
consumer_key = 'AYh6x5HIt5ubprSXeEGVqmLnT'
consumer_secret = 'wx4wC2ttf3hS34iGPMeL6VAifwIZ... | gpl-2.0 | -1,814,583,310,914,595,000 | 25.822222 | 71 | 0.720795 | false | 2.781106 | false | false | false |
EmrysChe/My_Python_practice | codes/extra/backup_script.py | 1 | 1043 | #!/usr/bin/python3
###################################
# for Linux #
###################################
import os
import time
source_dir = ['/root/data']
target_dir = '/root/backup'
today_log_dir = target_dir + os.sep + time.strftime('%y%m%d')
success_count = 0
fail_count = 0
if not os.path.exi... | gpl-2.0 | -5,788,582,095,096,189,000 | 31.59375 | 108 | 0.520614 | false | 3.300633 | false | false | false |
theaeolianmachine/hokiefinder | hokiefinder/geolocator/google_geocoding.py | 1 | 1103 | import json
import requests
GEOCODING_URL = 'http://maps.googleapis.com/maps/api/geocode/json'
ZERO_RESULTS = 'ZERO_RESULTS'
OVER_QUERY_LIMIT = 'OVER_QUERY_LIMIT'
REQUEST_DENIED = 'REQUEST_DENIED'
INVALID_REQUEST = 'INVALID_REQUEST'
ERRORS = (ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED, INVALID_REQUEST)
def get_l... | mit | 1,528,149,819,978,163,500 | 32.424242 | 74 | 0.596555 | false | 3.939286 | false | false | false |
naturali/tensorflow | tensorflow/python/framework/tensor_shape.py | 1 | 26539 | # Copyright 2015 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 | -1,721,125,840,426,754,000 | 29.859302 | 95 | 0.637778 | false | 4.04743 | false | false | false |
Salmista-94/Ninja_3.0_PyQt5 | ninja_ide/gui/tools_dock/plugin_preferences.py | 1 | 2404 | # -*- coding: utf-8 -*-
#
# This file is part of NINJA-IDE (http://ninja-ide.org).
#
# NINJA-IDE 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
# any later version.
#
# NIN... | gpl-3.0 | -8,308,359,762,363,824,000 | 35.424242 | 77 | 0.650582 | false | 4.224956 | false | false | false |
yarikoptic/NiPy-OLD | nipy/neurospin/viz/activation_maps.py | 1 | 25526 | #!/usr/bin/env python
"""
Functions to do automatic visualization of activation-like maps.
For 2D-only visualization, only matplotlib is required.
For 3D visualization, Mayavi, version 3.0 or greater, is required.
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# License: BSD
# Standard libr... | bsd-3-clause | -1,009,499,948,434,668,400 | 39.13522 | 80 | 0.53091 | false | 3.709096 | false | false | false |
svebk/DeepSentiBank_memex | workflows/transform-ht-images-table-to-transition/transform-ht-images-table-to-transition.py | 1 | 5269 | import json
from datetime import datetime
import happybase
from pyspark import SparkContext, SparkConf
TTransportException = happybase._thriftpy.transport.TTransportException
def get_create_table(table_name, conn, families={'info': dict()}):
try:
# what exception would be raised if table does not exist, a... | bsd-2-clause | -8,967,046,424,435,025,000 | 36.906475 | 111 | 0.609224 | false | 3.232515 | false | false | false |
fzimmermann89/pyload | module/plugins/crypter/SexuriaCom.py | 1 | 5089 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.Crypter import Crypter, create_getInfo
class SexuriaCom(Crypter):
__name__ = "SexuriaCom"
__type__ = "crypter"
__version__ = "0.11"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_... | gpl-3.0 | 2,629,648,724,651,690,000 | 44.4375 | 141 | 0.538613 | false | 3.490398 | false | false | false |
ptdtan/Ragout | ragout_api.py | 1 | 10365 |
"""
Ragout API interface for ancestral genome reconstruction
"""
import os
import sys
import shutil
import logging
import argparse
from collections import namedtuple
from copy import deepcopy
ragout_root = os.path.dirname(os.path.realpath(__file__))
lib_absolute = os.path.join(ragout_root, "lib")
sys.path.insert(0, l... | gpl-3.0 | 776,794,839,997,108,000 | 41.306122 | 145 | 0.612349 | false | 3.806463 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v8/errors/types/resource_count_limit_exceeded_error.py | 1 | 1486 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -3,917,095,316,855,932,000 | 29.958333 | 74 | 0.682369 | false | 3.994624 | false | false | false |
LivingOn/xbmc-plugin.image.nachtschicht-bhv | addon.py | 1 | 2657 | # -*- coding=utf8 -*-
#******************************************************************************
# addon.py
#------------------------------------------------------------------------------
#
# Copyright (c) 2013 LivingOn <LivingOn@xmail.net>
#
# This program is free software; you can redistribute it and/or modify
#... | gpl-2.0 | -6,851,067,713,381,325,000 | 35.916667 | 90 | 0.590892 | false | 3.913108 | false | false | false |
geodynamics/pylith | pylith/friction/obsolete/RateStateAgeing.py | 1 | 3306 | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... | mit | 235,920,559,458,479,170 | 27.5 | 85 | 0.562311 | false | 4.101737 | true | false | false |
apporc/nova | nova/compute/rpcapi.py | 1 | 45182 | # Copyright 2013 Red Hat, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | apache-2.0 | 8,557,778,177,542,389,000 | 45.340513 | 79 | 0.595547 | false | 4.137546 | false | false | false |
SkierPGP/Skier | db.py | 1 | 3077 | import datetime
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy.dialects.postgresql import ARRAY
from app import app
db = SQLAlchemy(app)
class Key(db.Model):
"""
The model for a PGP key.
"""
id = db.Column(db.Integer, primary_key=True)
uid = db.relationship("UID", backref="key")
... | agpl-3.0 | 7,163,609,061,429,038,000 | 27.5 | 123 | 0.626584 | false | 3.322894 | false | false | false |
ndokter/dsmr_parser | dsmr_parser/clients/filereader.py | 1 | 6256 | import logging
import fileinput
import tailer
from dsmr_parser.clients.telegram_buffer import TelegramBuffer
from dsmr_parser.exceptions import ParseError, InvalidChecksumError
from dsmr_parser.objects import Telegram
from dsmr_parser.parsers import TelegramParser
logger = logging.getLogger(__name__)
class FileRead... | mit | -5,151,617,203,341,825,000 | 35.584795 | 103 | 0.596867 | false | 4.421201 | false | false | false |
anshitag/Job-Cred-Meter | Python Files/datacollection.py | 1 | 3030 | import requests
import json
access_token='EAAMcWZCJ7Ui4BALHXjXKkizZANG5AhQZAL9buUS5KR6fX8YurTosJLmxTfP4WoZBiP8DFe8eqbJ2NplRPGLsve2xYIwwsbERTnX5pvsiRIvJ0So1TZAHmOHlUPVnzZCBjPdZBhkm8CBnYTV0eNjAwQiBVkroQGnaqgZD'
outfile=open("list.csv","w")
def text_cleaning(text):
text = text.encode('ascii', 'ignore').... | mit | -368,879,785,351,056,060 | 32.827586 | 180 | 0.542574 | false | 3.447099 | false | false | false |
taxigps/xbmc-addons-chinese | plugin.video.youku/default.py | 1 | 28143 | # -*- coding: utf-8 -*-
import xbmc, xbmcgui, xbmcplugin, xbmcaddon, urllib2, urllib, re, string, sys, os, gzip, StringIO, math, urlparse
import base64, time, cookielib
import simplejson
# Plugin constants
__addon__ = xbmcaddon.Addon()
__addonname__ = __addon__.getAddonInfo('name')
__profile__ = xbmc.translate... | gpl-2.0 | -6,283,709,938,491,380,000 | 38.605452 | 326 | 0.545481 | false | 2.985293 | false | false | false |
Teino1978-Corp/Teino1978-Corp-light_.gitignore | light_data_migrations_0008_fi_comparativo.py | 1 | 1169 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('master', '0019_periodo_tipoperiodo'),
('data', '0007_auto_20150216_0921'),
]
operations = [
migrations.CreateModel(
... | mit | -5,811,489,867,645,398,000 | 33.382353 | 114 | 0.521814 | false | 4.297794 | false | false | false |
googleapis/python-talent | setup.py | 1 | 2740 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -6,588,985,584,347,073,000 | 29.10989 | 75 | 0.684307 | false | 3.753425 | false | false | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/tests/python/unittest/test_codegen_device.py | 1 | 4204 | # 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 | 1,658,198,143,993,721,900 | 38.28972 | 74 | 0.622265 | false | 3.160902 | false | false | false |
mic4ael/indico | bin/utils/create_module.py | 1 | 6792 | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
import os
import re
import textwrap
from collections import defau... | mit | -6,267,578,865,600,355,000 | 38.034483 | 120 | 0.604976 | false | 3.655544 | false | false | false |
SCUEvals/scuevals-api | db/alembic/env.py | 1 | 2188 | from __future__ import with_statement
import os
import sys
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
sys.path.append(os.getcwd())
from scuevals_api.models import db # noqa
# this is the Alembic Config object, which provides
# access to the valu... | agpl-3.0 | -7,893,498,225,739,737,000 | 27.051282 | 94 | 0.70841 | false | 3.978182 | true | false | false |
michaelmurdock/mmlib | db_utils.py | 1 | 1578 | # db_utils.py
def execute_query_for_single_value(cursor, query):
'''
query is a string containing a well-formed query that is executed
against the specified cursor.
RETURNS: the following tripe: (results_flag, err_msg, value)
'''
try:
# Execute the query
cursor.exe... | bsd-2-clause | 2,520,249,092,786,609,700 | 26.178571 | 99 | 0.583016 | false | 4.02551 | false | false | false |
DavidAwad/Quantum-Simulator | quantum.py | 1 | 5150 | #!/usr/bin/env python
# encoding: utf-8
from cmath import exp, pi, sqrt
from random import random
import itertools
def vectorflip(bitstring):
"""
returns flipped bits in a given string
"""
if not bitstring: raise TypeError("vectorflip passed None")
return ''.join('1' if x == '0' else '0' for x... | gpl-3.0 | 1,803,433,893,474,609,000 | 37.714286 | 90 | 0.58458 | false | 3.994569 | false | false | false |
gpodder/mygpo | mygpo/administration/views.py | 1 | 13775 | import re
import socket
from itertools import count, chain
from collections import Counter
from datetime import datetime
import redis
import django
from django.db.models import Avg
from django.shortcuts import render
from django.contrib import messages
from django.urls import reverse
from django.core.cache import cac... | agpl-3.0 | -3,548,724,407,814,230,000 | 28.816017 | 87 | 0.607477 | false | 4.057437 | false | false | false |
rjawor/concordia-server | tests/addAlignedLemmatizedTM.py | 1 | 3161 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
import json
import urllib2
import sys
import host
import time
BUFFER_SIZE = 500
address = 'http://'+host.concordia_host
if len(host.concordia_port) > 0:
address += ':'+host.concordia_port
def file_len(fname):
with open(fname) as f:
for i, l ... | lgpl-3.0 | 7,864,143,049,183,775,000 | 27.736364 | 189 | 0.669092 | false | 3.32387 | false | false | false |
satyrius/cmsplugin-articles | cmsplugin_articles/south_migrations/0001_initial.py | 1 | 3016 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ArticlesPlugin'
db.create_table(u'cmsplugin_articles_arti... | mit | -4,347,444,621,616,893,000 | 55.924528 | 157 | 0.589191 | false | 3.774718 | false | false | false |
alejolp/argentum-py-server | argentumserver/util.py | 1 | 2663 | # -*- coding: utf-8 -*-
"""
AONX Server - Pequeño servidor de Argentum Online.
Copyright (C) 2011 Alejandro Santos <alejolp@alejolp.com.ar>
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 Fo... | gpl-3.0 | -5,969,421,147,287,314,000 | 25.356436 | 91 | 0.574756 | false | 3.661623 | true | false | false |
magooos/KITT | interface.py | 1 | 2476 | __author__ = 'laurentmeyer'
# Set the command type to auto
import sys, telnetlib, time
MOCK_SERVER = "192.168.2.217"
MOCK_SERVER_PORT = 35000
def beginCommunication(telnetaddr = MOCK_SERVER, telnetport = MOCK_SERVER_PORT):
telnet = telnetlib.Telnet(telnetaddr, port=telnetport)
return telnet
def startInfiniteL... | apache-2.0 | 6,595,756,557,333,647,000 | 29.207317 | 95 | 0.656704 | false | 3.262187 | false | false | false |
SociedadMartinez/ToolShare | registration/views.py | 1 | 31482 | """
@authors Tina Howard, Grant Gadomski, Nick Mattis, Laura Silva, Nils Sohn
"""
from django.shortcuts import render, get_object_or_404, redirect
from django.utils.datastructures import MultiValueDictKeyError
from django.http import Http404, HttpResponseRedirect, HttpResponse #TODO Take off HttpResponse after fig... | gpl-3.0 | -6,212,815,428,847,660,000 | 42.909344 | 245 | 0.61794 | false | 3.921525 | false | false | false |
elimence/edx-platform | common/lib/xmodule/xmodule/contentstore/mongo.py | 1 | 4555 | from bson.son import SON
from pymongo import Connection
import gridfs
from gridfs.errors import NoFile
from xmodule.modulestore.mongo import location_to_query, Location
from xmodule.contentstore.content import XASSET_LOCATION_TAG
import logging
from .content import StaticContent, ContentStore
from xmodule.exceptions... | agpl-3.0 | 2,441,600,805,920,882,700 | 41.175926 | 125 | 0.626125 | false | 3.664521 | false | false | false |
tyb0807/angr | angr/procedures/libc/fseek.py | 1 | 1124 | import angr
from . import io_file_data_for_arch
from ...errors import SimSolverError
######################################
# fseek
######################################
class fseek(angr.SimProcedure):
#pylint:disable=arguments-differ
def run(self, file_ptr, offset, whence):
# TODO: Support symboli... | bsd-2-clause | -4,569,895,961,317,021,700 | 34.125 | 115 | 0.580961 | false | 3.490683 | false | false | false |
musicbrainz/picard | picard/webservice/api_helpers.py | 1 | 11716 | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2017 Sambhav Kothari
# Copyright (C) 2018 Laurent Monin
# Copyright (C) 2018-2019 Philipp Wolfer
#
# 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 | 2,615,057,318,125,829,600 | 38.986348 | 116 | 0.59662 | false | 3.954101 | false | false | false |
sundhaug92/binwalk | src/binwalk/modules/entropy.py | 1 | 11569 | # Calculates and optionally plots the entropy of input files.
import os
import math
import zlib
import binwalk.core.common
from binwalk.core.compat import *
from binwalk.core.module import Module, Option, Kwarg
class Entropy(Module):
XLABEL = 'Offset'
YLABEL = 'Entropy'
XUNITS = 'B'
YUNITS = 'E'
... | mit | 1,616,502,433,162,220,500 | 34.271341 | 115 | 0.532112 | false | 4.392179 | false | false | false |
flypy/flypy | flypy/runtime/obj/stringobject.py | 1 | 2309 | # -*- coding: utf-8 -*-
"""
String implementation.
"""
from __future__ import print_function, division, absolute_import
import flypy
from flypy import sjit, jit, typeof
from .bufferobject import Buffer, newbuffer, copyto
from .pointerobject import Pointer
@sjit
class String(object):
layout = [('buf', 'Buffer[ch... | bsd-2-clause | 564,705,248,364,372,860 | 24.384615 | 73 | 0.459939 | false | 3.742301 | false | false | false |
mohclips/k5-ansible-modules | k5_inter_project_link.py | 1 | 9324 | #!/usr/bin/python
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'version': '1.0'}
DOCUMENTATION = '''
---
module: k5_inter_project_link
short_description: Create inter-project link on K5 in particular AZ
version_added: "1.0"
description:
- K5 call ... | gpl-3.0 | 5,519,801,665,012,305,000 | 30.5 | 134 | 0.604569 | false | 3.350341 | false | false | false |
mdzhang/goodreads-api-client-python | goodreads_api_client/resources/review.py | 1 | 1247 | # -*- coding: utf-8 -*-
"""Module containing review resource class."""
from goodreads_api_client.exceptions import OauthEndpointNotImplemented
from goodreads_api_client.resources.base import Resource
class Review(Resource):
resource_name = 'review'
def create(self):
raise OauthEndpointNotImplemented... | mit | -8,722,092,569,328,240,000 | 30.175 | 71 | 0.635926 | false | 4.009646 | false | false | false |
piensa/geonode | geonode/people/models.py | 1 | 7186 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... | gpl-3.0 | -6,361,352,256,820,345,000 | 36.233161 | 120 | 0.662399 | false | 4.050733 | false | false | false |
yeleman/snisi | snisi_reprohealth/migrations/0003_auto_20141022_1400.py | 1 | 1402 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('snisi_reprohealth', '0002_auto_20141008_1709'),
]
operations = [
migrations.RenameField(
model_name='aggpfactivi... | mit | -234,128,467,318,790,200 | 30.863636 | 58 | 0.587019 | false | 4.005714 | false | false | false |
jburel/openmicroscopy | components/tools/OmeroPy/src/omero/plugins/prefs.py | 1 | 21186 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
prefs plugin
Plugin read by omero.cli.Cli during initialization. The method(s)
defined here will be added to the Cli class for later use.
The pref plugin makes use of prefs.class from the common component.
Copyright 2007-2013 Glencoe Software, Inc. All... | gpl-2.0 | -7,798,762,105,862,879,000 | 33.960396 | 78 | 0.544841 | false | 3.994344 | true | false | false |
aakashrana1995/svnit-tnp | tnp/consent/migrations/0003_consentdeadline_userconsent_userdatafields.py | 1 | 1971 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-07 08:16
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | mit | 4,100,357,406,943,850,000 | 41.847826 | 147 | 0.595637 | false | 4.167019 | false | false | false |
OmeGak/indico-plugins | vc_vidyo/indico_vc_vidyo/zodbimport.py | 1 | 8102 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 | 6,832,290,952,876,015,000 | 40.762887 | 116 | 0.608615 | false | 3.633184 | false | false | false |
phraust1612/cifar100challenge | cnn_renet/init_param.py | 1 | 1166 | import numpy as np
import caffe
import os
def extract_caffe_model(model, weights, output_path):
"""extract caffe model's parameters to numpy array, and write them to files
Args:
model: path of '.prototxt'
weights: path of '.caffemodel'
output_path: output path of numpy params
Returns:
None
"""... | mit | 4,951,470,029,215,791,000 | 23.291667 | 77 | 0.614923 | false | 2.915 | false | false | false |
pignacio/python-nvd3 | examples/MultiBarChart.py | 1 | 1100 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Examples for Python-nvd3 is a Python wrapper for NVD3 graph library.
NVD3 is an attempt to build re-usable charts and chart components
for d3.js without taking away the power that d3.js gives you.
Project location : https://github.com/areski/python-nvd3
"""
from nvd3.mul... | mit | 5,690,117,570,469,445,000 | 29.555556 | 70 | 0.677273 | false | 2.887139 | false | false | false |
bigswitch/nova | nova/tests/unit/objects/test_instance_pci_requests.py | 1 | 7650 | # 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 | 5,847,374,360,693,659,000 | 44.535714 | 79 | 0.584314 | false | 4.024198 | true | false | false |
skosukhin/spack | var/spack/repos/builtin/packages/atompaw/package.py | 1 | 2376 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 127,523,794,832,472,270 | 36.714286 | 78 | 0.638468 | false | 3.572932 | false | false | false |
vivisect/synapse | synapse/lib/crypto/ecc.py | 1 | 6535 | import hashlib
import logging
import cryptography.hazmat.primitives.hashes as c_hashes
import cryptography.hazmat.primitives.kdf.hkdf as c_hkdf
import cryptography.hazmat.primitives.asymmetric.ec as c_ec
import cryptography.hazmat.primitives.serialization as c_ser
import cryptography.hazmat.primitives.asymmetric.utils... | apache-2.0 | 910,276,138,974,004,000 | 28.570136 | 81 | 0.57215 | false | 4.099749 | false | false | false |
djsegal/ahab_legacy_ | pequod/readInput.py | 1 | 4463 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 4 17:53:55 2013
@author: dan
"""
from parseLine import parseLine
from findAndChar import findAndChar
from addScalarInput import addScalarInput
from addVectorInput import addVectorInput
def readInput( fileName ):
redInput =... | apache-2.0 | -4,641,275,776,112,193,000 | 29.575342 | 78 | 0.315259 | false | 5.670902 | false | false | false |
Virako/Rocamgo-ng | rocamgo/detection/perspective.py | 1 | 2062 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Rocamgo is recogniter of the go games by processing digital images with opencv.
# Copyright (C) 2012 Víctor Ramirez de la Corte <virako.9 at gmail dot com>
# Copyright (C) 2012 David Medina Velasco <cuidadoconeltecho at gmail dot com>
#
# This program is free software: you ... | gpl-3.0 | -8,436,673,398,612,741,000 | 35.803571 | 83 | 0.716642 | false | 3.505102 | false | false | false |
drabastomek/practicalDataAnalysisCookbook | Codes/Chapter07/ts_detrendAndRemoveSeasonality.py | 1 | 2625 | import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
# change the font size
matplotlib.rc('xtick', labelsize=9)
matplotlib.rc('ytick', labelsize=9)
matplotlib.rc('font', size=14)
# time series tools
import statsmodels.api as sm
def period_mean(data, freq):
'''
Method t... | gpl-2.0 | 3,813,772,106,951,367,000 | 28.166667 | 61 | 0.684952 | false | 2.757353 | false | false | false |
yarikoptic/NiPy-OLD | nipy/neurospin/datasets/volumes/tests/test_volume_field.py | 1 | 1076 | """
Testing data image interface.
"""
import numpy as np
# Local imports
from ..volume_field import VolumeField
from ...transforms.transform import Transform, CompositionError
################################################################################
# Tests
def test_interface():
img = VolumeField()
im... | bsd-3-clause | 3,817,453,609,082,468,400 | 30.647059 | 80 | 0.587361 | false | 4.578723 | true | false | false |
bithinalangot/ecidadania-dev | src/apps/ecidadania/accounts/admin.py | 1 | 2246 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 Licen... | gpl-3.0 | -7,367,780,527,825,596,000 | 39.836364 | 128 | 0.703918 | false | 3.892548 | false | false | false |
ouh-churchill/quod | quodsite/website/templatetags/quodsite_tags.py | 1 | 2483 | #!/usr/bin/python
# coding: utf-8
from __future__ import absolute_import, unicode_literals
from django import template
register = template.Library()
@register.simple_tag
def get_model_fields(object_to_query):
return dict(
(field.name, field.value_to_string(object_to_query)) for field in object_to_query._... | mit | 8,645,338,048,120,876,000 | 37.2 | 102 | 0.708417 | false | 3.76783 | false | false | false |
ken-muturi/pombola | pombola/kenya/urls.py | 1 | 4552 | from django.conf.urls import patterns, url
from django.views.generic.base import TemplateView
from pombola.kenya.views import KEPersonDetail, KEPersonDetailAppearances
from pombola.experiments.views import ExperimentShare, ExperimentSurvey
from .views import (CountyPerformanceView, CountyPerformanceSenateSubmission,
... | agpl-3.0 | 6,573,117,379,751,098,000 | 38.582609 | 111 | 0.610281 | false | 3.561815 | false | false | false |
drankye/kerb-token | krb5/src/tests/t_skew.py | 1 | 2477 | #!/usr/bin/python
from k5test import *
# Create a realm with the KDC one hour in the past.
realm = K5Realm(start_kdc=False)
realm.start_kdc(['-T', '-3600'])
# kinit (no preauth) should work, and should set a clock skew allowing
# kvno to work, with or without FAST.
realm.kinit(realm.user_princ, password('user'))
real... | apache-2.0 | 3,318,160,882,515,889,000 | 41.706897 | 79 | 0.70973 | false | 3.09625 | false | false | false |
martinhoefling/fretutils | lib/FRETUtils/Ensemble.py | 1 | 2936 | '''
Created on 24.06.2010
@author: mhoefli
'''
import random
import re
def readProbabilities(pbfile):
"""Reads in probabilities from a specific probability file, 1st colum is the regexp to match, 2nd the name and 3rd the probability in the ensemble"""
with open(pbfile) as pfh:
probabilities = []
... | bsd-3-clause | 5,670,931,972,478,937,000 | 30.913043 | 153 | 0.620913 | false | 3.919893 | false | false | false |
jzmnd/fet-py-scripts | agilent4155_matlab_output_param.py | 1 | 3478 | #! /usr/bin/env python
"""
agilent4155_matlab_output_param.py
Prarmeter extractor for matlab generated .xlsx idvd files
Created by Jeremy Smith on 2015-10-29
University of California, Berkeley
j-smith@eecs.berkeley.edu
"""
import os
import sys
import xlrd
import numpy as np
import myfunctions as mf
from scipy import ... | mit | 7,935,849,942,573,224,000 | 29.508772 | 106 | 0.616734 | false | 2.736428 | false | false | false |
fcelda/cds-monitor | monitor.py | 1 | 2054 | #!/usr/bin/env python3
import logging
import sched
import time
import cdsmon.source
import cdsmon.fetch
import cdsmon.update
class Monitor:
def __init__(self, source, fetch, update):
self._source = source
self._fetch = fetch
self._update = update
self._next = 0
def exec(self)... | gpl-3.0 | -3,210,956,226,077,122,600 | 27.929577 | 93 | 0.615385 | false | 3.334416 | false | false | false |
irvingprog/python-pilas-experimental | pilasengine/actores/bomba.py | 1 | 1122 | # -*- encoding: utf-8 -*-
# pilas engine: un motor para hacer videojuegos
#
# Copyright 2010-2014 - Hugo Ruscitti
# License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
#
# Website - http://www.pilas-engine.com.ar
from pilasengine.actores.animacion import Animacion
class Bomba(Animacion):
"""Representa un... | lgpl-3.0 | -1,777,256,028,047,224,600 | 30.055556 | 71 | 0.644902 | false | 2.753695 | false | false | false |
Som-Energia/switching | switching/input/messages/B1.py | 1 | 3359 | # -*- coding: utf-8 -*-
from message import Message, except_f1
import C1, C2
class B1(Message):
"""Classe que implementa B1."""
@property
def sollicitud(self):
"""Retorna l'objecte Sollicitud"""
return C1.Sollicitud(self.obj.BajaEnergia.DatosSolicitud)
@property
def client(se... | gpl-3.0 | 3,862,654,646,224,733,000 | 26.768595 | 90 | 0.584102 | false | 3.445128 | false | false | false |
huertatipografica/huertatipografica-fl-scripts | AT_Effects/AT-patternMaker.py | 1 | 3589 | #FLM: AT PatternMaker
###########################
#INSTRUCTIONS
# Create glyphs with patterns to apply to the font. Be sure the glyphs have the same
# sufix, point and consecutive 3 digit numbers starting from 001.
# Example: sufix.001, sufix.002, sufix.003, etc.
# Execute the script and enter the sufix for the gly... | apache-2.0 | 2,225,459,793,113,449,700 | 28.908333 | 136 | 0.687099 | false | 2.975954 | false | false | false |
tedlaz/pyted | pymiles/pymiles.old/u_txt_num.py | 1 | 4761 | # -*- coding: utf-8 -*-
import decimal
from collections import OrderedDict
def isNum(value): # Einai to value arithmos, i den einai ?
""" use: Returns False if value is not a number , True otherwise
input parameters :
1.value : the value to check against.
output: True or ... | gpl-3.0 | 5,173,988,845,309,119,000 | 23.166667 | 76 | 0.531083 | false | 3.266574 | false | false | false |
connorbrinton/lcat | lcat/loading/annotations.py | 1 | 5671 | #!/usr/bin/env python
"""
BMI 260: Final Project
Load chest CT scan annotations from radiologist xml files.
"""
from collections import namedtuple
import os
import re
import xml.etree.ElementTree as ET
import numpy as np
import skimage
import skimage.measure
import skimage.segmentation
import lcat
# Nodule datatype... | gpl-3.0 | -7,819,591,577,144,248,000 | 28.082051 | 99 | 0.654911 | false | 3.68486 | false | false | false |
google-research/graph-attribution | tests/test_training.py | 1 | 3709 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -2,763,162,494,523,120,600 | 42.127907 | 94 | 0.672418 | false | 3.476101 | true | false | false |
jbpoline/nidm-results_fsl | nidmfsl/fsl_exporter/fsl_exporter.py | 1 | 44126 | """
Export neuroimaging results created with feat in FSL following NIDM-Results
specification.
@author: Camille Maumet <c.m.j.maumet@warwick.ac.uk>
@copyright: University of Warwick 2013-2014
"""
import re
import os
import sys
import glob
import json
import numpy as np
import subprocess
import warnings
# If "nidmres... | mit | 2,310,649,534,921,080,300 | 39.971216 | 83 | 0.498051 | false | 3.97639 | false | false | false |
Antrek/NDNProject | docs/redmine_issue.py | 1 | 2560 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# Based on http://doughellmann.com/2010/05/09/defining-custom-roles-in-sphinx.html
"""Integration of Sphinx with Redmine.
"""
from docutils import nodes, utils
from docutils.parsers.rst.roles import set_classes
def redmine_role(name, ... | gpl-3.0 | -1,619,331,055,285,040,400 | 35.585714 | 94 | 0.647266 | false | 3.843844 | false | false | false |
p-morais/rl | rl/algos/dagger.py | 1 | 2489 | """CURRENTLY OUTDATED. WILL UPDATE IN FUTURE"""
"""
import torch
from torch import Tensor
from torch.autograd import Variable as Var
from torch.utils.data import DataLoader
from rl.utils import ProgBar, RealtimePlot
from rl.envs import controller
class DAgger():
def __init__(self, env, learner, expert):
... | mit | 2,729,575,054,047,871,500 | 34.070423 | 81 | 0.532744 | false | 3.377205 | false | false | false |
uwcirg/true_nth_usa_portal | portal/migrations/versions/7ad0da0d1b72_.py | 1 | 1909 | """empty message
Revision ID: 7ad0da0d1b72
Revises: af193c376724
Create Date: 2017-07-06 17:42:35.513647
"""
# revision identifiers, used by Alembic.
revision = '7ad0da0d1b72'
down_revision = 'af193c376724'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic ... | bsd-3-clause | 2,077,013,238,323,017,500 | 30.295082 | 77 | 0.55736 | false | 3.968815 | false | false | false |
googleapis/python-channel | google/cloud/channel_v1/services/cloud_channel_service/transports/base.py | 1 | 22245 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -669,878,659,928,609,400 | 33.488372 | 103 | 0.616768 | false | 4.274596 | false | false | false |
djfan/wifind | pipeline/v1.0/etl.py | 1 | 4488 | import csv
import configparser
import logging
from builtins import range
from carto.auth import APIKeyAuthClient
from carto.sql import SQLClient
from carto.sql import BatchSQLClient
logger = logging.getLogger('carto-etl')
config = configparser.RawConfigParser()
config.read("etl.conf")
CARTO_BASE_URL = config.get('... | mit | -6,131,026,039,456,346,000 | 38.368421 | 201 | 0.548797 | false | 3.774601 | true | false | false |
evilhero/mylar | mylar/importer.py | 1 | 80815 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of Mylar.
#
# Mylar 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 vers... | gpl-3.0 | -6,903,761,207,587,351,000 | 48.885802 | 298 | 0.531708 | false | 4.073131 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.