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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hankcs/HanLP | hanlp/components/tok_tf.py | 1 | 4998 | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-10-27 14:30
import logging
from typing import Union, Any, List, Tuple, Iterable
import tensorflow as tf
from hanlp.common.keras_component import KerasComponent
from hanlp.components.taggers.ngram_conv.ngram_conv_tagger import NgramTransform, NgramConvTaggerTF
from ... | apache-2.0 | -1,128,936,591,504,763,300 | 44.436364 | 119 | 0.673669 | false | 3.495105 | false | false | false |
bmoretz/Algorithms | Python/ch_05/dynamic_array.py | 1 | 2775 | import ctypes # provides low-level types
class DynamicArray:
"""A dynamic array class akin to a simplified Python list."""
def __init__(self):
"""Create an empty array."""
self._n = 0 # count actual elements
... | gpl-3.0 | 6,301,874,190,802,769,000 | 46.050847 | 82 | 0.462703 | false | 4.632721 | false | false | false |
footynews/fn_backend | setup.py | 1 | 1355 | from setuptools import setup, find_packages
__title__ = 'footynews'
__author__ = 'Usman Ehtesham Gul'
__email__ = 'uehtesham90@gmail.com'
__license__ = 'Apache v2.0'
__version__ = '0.0.1'
__url__ = 'https://github.com/footynews/fn_backend'
with open('requirements.txt') as f:
requires = f.read().splitlines()
with... | apache-2.0 | -8,572,042,697,903,218,000 | 27.829787 | 73 | 0.654613 | false | 3.743094 | false | true | false |
devdri/awake | awake/jumptable.py | 1 | 1903 | # This file is part of Awake - GB decompiler.
# Copyright (C) 2012 Wojciech Marczenko (devdri) <wojtek.marczenko@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... | gpl-3.0 | 6,786,039,837,361,408,000 | 36.313725 | 78 | 0.611666 | false | 4.092473 | false | false | false |
dc740/AutoHotPy | Example9-Macros5 - Record mouse only.py | 1 | 1834 | # -*- coding: utf-8 -*-
"""
@author: Emilio Moretti
Copyright 2013 Emilio Moretti <emilio.morettiATgmailDOTcom>
This program is distributed under the terms of the GNU Lesser General Public License.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public ... | lgpl-3.0 | 5,271,172,640,538,303,000 | 32.962963 | 128 | 0.751908 | false | 3.727642 | false | false | false |
jeremiedecock/snippets | python/tkinter/python3/canvas_items_events_using_ids.py | 1 | 4000 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including witho... | mit | -2,773,649,744,929,924,000 | 44.431818 | 149 | 0.562781 | false | 4.26226 | false | false | false |
QISKit/qiskit-sdk-py | qiskit/util.py | 1 | 2941 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifi... | apache-2.0 | -5,503,388,631,041,248,000 | 29.319588 | 79 | 0.680041 | false | 4.073407 | false | false | false |
annapowellsmith/openpresc | openprescribing/frontend/migrations/0031_auto_20171004_1330.py | 1 | 3614 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-10-04 12:30
from __future__ import unicode_literals
import json
import os
from django.db import migrations, models
def _get_measure_data(measure_id):
fpath = os.path.dirname(__file__)
fname = os.path.join(
fpath,
("../management/comma... | mit | 7,293,513,318,731,579,000 | 29.369748 | 70 | 0.565855 | false | 4.370012 | false | false | false |
sghai/robottelo | robottelo/ui/location.py | 1 | 7856 | # -*- encoding: utf-8 -*-
"""Implements Locations UI"""
from robottelo.constants import FILTER
from robottelo.ui.base import Base
from robottelo.ui.locators import common_locators, locators, tab_locators
from robottelo.ui.navigator import Navigator
class Location(Base):
"""Implements CRUD functions for UI"""
... | gpl-3.0 | 4,551,930,292,425,183,700 | 49.358974 | 79 | 0.543152 | false | 4.379041 | true | false | false |
yoku2010/api-specification-system | apiss/apps/polls/migrations/0001_initial.py | 1 | 2042 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations ... | mit | -6,875,659,805,016,056,000 | 36.127273 | 114 | 0.570029 | false | 4.507726 | false | false | false |
euangoddard/eric | src/eric/settings.py | 1 | 2391 | """
Django settings for eric project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impor... | gpl-2.0 | 3,228,185,771,461,368,300 | 22.92 | 71 | 0.713509 | false | 3.244233 | false | false | false |
aerospike/aerospike-admin | lib/live_cluster/manage_controller.py | 1 | 36239 | import os
from datetime import datetime
from getpass import getpass
from lib.view import terminal
from lib.utils import constants, util
from lib.base_controller import CommandHelp
from distutils.version import LooseVersion
from .client.info import ASProtocolError
from .live_cluster_command_controller import LiveCluste... | apache-2.0 | -4,958,707,333,055,236,000 | 32.648097 | 157 | 0.5698 | false | 4.173558 | false | false | false |
Angakkuit/asiaq-aws | bin/disco_log_metrics.py | 1 | 2347 | #!/usr/bin/env python
"""
Create metrics using CloudWatch Logs
Usage:
disco_log_metrics.py [--debug] [--env ENV] list-metrics --hostclass HOSTCLASS
disco_log_metrics.py [--debug] [--env ENV] list-groups --hostclass HOSTCLASS
disco_log_metrics.py [--debug] [--env ENV] update --hostclass HOSTCLASS
disco_... | bsd-2-clause | 5,314,686,061,528,233,000 | 35.107692 | 107 | 0.647635 | false | 3.661466 | true | false | false |
luofei98/qgis | python/plugins/processing/algs/gdal/slope.py | 1 | 3482 | # -*- coding: utf-8 -*-
"""
***************************************************************************
slope.py
---------------------
Date : October 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
*******************... | gpl-2.0 | 7,798,430,831,502,954,000 | 38.568182 | 79 | 0.561172 | false | 4.464103 | false | false | false |
rwl/PyCIM | CIM14/CPSM/Equipment/Meas/AccumulatorValue.py | 1 | 2391 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | -5,052,669,925,740,678,000 | 38.85 | 83 | 0.705563 | false | 4.323689 | false | false | false |
egbertbouman/tribler-g | Tribler/Main/vwxGUI/tribler_topButton.py | 1 | 24111 | import wx, os, sys
from wx.lib.mixins.listctrl import CheckListCtrlMixin, ColumnSorterMixin, ListCtrlAutoWidthMixin
from wx.lib.scrolledpanel import ScrolledPanel
from traceback import print_exc
from Tribler.Main.vwxGUI.GuiUtility import GUIUtility
from Tribler.Main.Dialogs.GUITaskQueue import GUITaskQueue
... | lgpl-2.1 | 8,939,279,994,702,533,000 | 36.5776 | 153 | 0.533035 | false | 4.102603 | false | false | false |
vlegoff/tsunami | src/primaires/perso/commandes/asseoir/__init__.py | 1 | 4628 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# 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 | -2,453,856,007,648,944,600 | 45.59596 | 87 | 0.637329 | false | 3.699278 | false | false | false |
clifforloff/opmservice | opmapp/views.py | 1 | 93730 | # From python
import datetime
import pytz
from decimal import Decimal, InvalidOperation
import re
# From Django
from django.core.mail import EmailMessage
from django.core.mail import get_connection
from django.utils import timezone
from django import forms
from django.core.urlresolvers import reverse, reverse_lazy
fr... | gpl-2.0 | -7,706,189,923,218,938,000 | 36.477009 | 172 | 0.578865 | false | 3.863561 | false | false | false |
blagasz/python-ann | neurolab/trans.py | 1 | 7818 | # -*- coding: utf-8 -*-
"""
Transfer function with derivatives
:Example:
>>> import numpy as np
>>> f = TanSig()
>>> x = np.linspace(-5,5,100)
>>> y = f(x)
>>> df_on_dy = f.deriv(x, y) # calc derivative
>>> f.out_minmax # list output range [min, max]
[-1, 1]
>>> f.inp_active # li... | gpl-2.0 | 4,244,926,108,495,628,000 | 18.938776 | 62 | 0.446776 | false | 3.327373 | false | false | false |
SuLab/scheduled-bots | scheduled_bots/drugs/unii.py | 1 | 6335 | """
Bot code for creating chemical items in wikidata from UNII
Adapted from: https://github.com/sebotic/cdk_pywrapper/blob/master/cdk_pywrapper/chemlib.py
"""
import os
import re
import subprocess
import time
import zipfile
import pandas as pd
import wikidataintegrator.wdi_core as wdi_core
data_folder = "unii_data"
... | mit | -2,078,402,913,448,461,300 | 29.028436 | 118 | 0.548698 | false | 3.2892 | false | false | false |
JustinTulloss/harmonize.fm | filemq/filemq/actions/transcoder.py | 1 | 2776 | # vim:expandtab:smarttab
import logging, os, fileprocess
import os.path as path
from filemq.configuration import config
from nextaction import na
from baseaction import BaseAction
import guid
from hashlib import sha1
log = logging.getLogger(__name__)
class Transcoder(BaseAction):
"""
This class converts a fil... | mit | -7,729,274,502,344,951,000 | 31.27907 | 97 | 0.511527 | false | 4.187029 | false | false | false |
TheMangalex/pyfeedback | src/feedback/tools.py | 1 | 2632 | # coding=utf-8
from django.template import TemplateSyntaxError, Template
# ------------------------------ Durchschnittsberechnung für das Ranking ------------------------------ #
def get_average(ergebnis, fb_list, attr):
"""Berechnet das gewichtete Mittel über das Attribut attr für die Fragebogenliste fb_list."... | agpl-3.0 | -5,466,028,162,436,552,000 | 30.25 | 105 | 0.592381 | false | 3.343949 | false | false | false |
karthikdevel/fit | parser/topparser.py | 1 | 3085 | import pandas as pd
import numpy as np
import os
import wx
import threading
import time
def processMG(arg1):
if arg1 == None:
return float(0)
elif 'm' in arg1:
return float(arg1[:-1])*1048576
elif 'g' in arg1:
return float(arg1[:-1])*1048576*1024
else:
return float(arg1)... | mit | -5,190,406,966,615,745,000 | 35.294118 | 147 | 0.478768 | false | 3.970399 | false | false | false |
khertan/KhtSimpleText | setup.py | 1 | 2568 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#KhtSimpleText Setup File
import khtsimpletext
import sys
reload(sys).setdefaultencoding("UTF-8")
changelog = '* Implement rename and delete feature in contextual menu * fix package display name'
buildversion = '1'
try:
from sdist_maemo import sdist_maemo as _sdist_maemo... | gpl-3.0 | 3,255,311,717,075,996,000 | 35.15493 | 124 | 0.640686 | false | 3.223618 | false | false | false |
xtao/vilya | vilya/users/models.py | 1 | 1802 | # -*- coding: utf-8 -*-
from datetime import datetime
from flask_security import UserMixin, RoleMixin
from ..core import db
from ..helpers import JsonSerializer
from ..libs.avatar import get_gravatar_url
roles_users = db.Table(
'roles_users',
db.Column('user_id', db.Integer(), db.ForeignKey('users.id')),
... | bsd-3-clause | -5,594,201,401,249,210,000 | 30.068966 | 72 | 0.637625 | false | 3.425856 | false | false | false |
zhao-ji/word | display.py | 1 | 1439 | #!/usr/bin/env python
# coding: utf-8
from argparse import ArgumentParser
import json
from requests import post
URL = "https://chashuibiao.org/word/lookup"
USER = "NightWish"
def translate(word):
data = {}
data['lookup'] = json.dumps({"word": word})
headers = {}
headers["USER"] = USER
try:
... | gpl-2.0 | -595,833,093,439,501,700 | 24.509091 | 80 | 0.56593 | false | 3.301176 | false | false | false |
bit0001/chumme | controller/add_update_form/update_form.py | 1 | 2834 | from sqlite3 import IntegrityError
from controller.util import get_image_from_blob
from database_manager.friend_manager import MinimumFriendParameterException
from database_manager.util import ChumMeDBManager
from .friend_form import FriendForm
class UpdateFriendForm(FriendForm):
def __init__(self, friend, **kwar... | apache-2.0 | 6,586,045,162,310,429,000 | 37.821918 | 77 | 0.559633 | false | 4.435055 | false | false | false |
Runinho/mopidy-partydj | setup.py | 1 | 1281 | from __future__ import unicode_literals
import re
from setuptools import find_packages, setup
def get_version(filename):
with open(filename) as fh:
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
return metadata['version']
setup(
name='A Mopidy Party tool, who all People... | apache-2.0 | 65,118,165,821,193,096 | 28.113636 | 74 | 0.592506 | false | 3.568245 | false | false | false |
openstack/tempest | tempest/api/network/admin/test_metering_extensions.py | 1 | 8448 | # Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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 applicabl... | apache-2.0 | 5,547,538,376,083,447,000 | 46.728814 | 78 | 0.656842 | false | 3.943978 | true | false | false |
scsibug/twitter-fluentd-streamer | publish_stream.py | 1 | 2767 | from datetime import datetime
import time
from twython import TwythonStreamer
from fluent import sender
from fluent import event
import os
# for local fluent
sender.setup('twitter')
class MyStreamer(TwythonStreamer):
def save_tweet(self, tweet, tag):
event_contents = {
'tweet_id': tweet['i... | apache-2.0 | -6,415,881,318,581,809,000 | 39.101449 | 93 | 0.54897 | false | 3.774898 | false | false | false |
f3at/feattool | src/feattool/gui/agentinfo.py | 1 | 2588 | # F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version... | gpl-2.0 | -7,021,195,762,358,583,000 | 34.944444 | 73 | 0.641036 | false | 3.734488 | false | false | false |
dkieffer/timeblob | timeblob/models.py | 1 | 1241 | from __future__ import unicode_literals
from django.db import models
from django.utils import timezone
from django.core import exceptions as core_exceptions
from django.conf import settings
from . import exceptions
# Create your models here.
class TimeEntry(models.Model):
id = models.AutoField(primary_key=True... | agpl-3.0 | -6,862,890,596,383,692,000 | 33.472222 | 67 | 0.727639 | false | 3.818462 | false | false | false |
iteloo/the_island | backend/helpers.py | 1 | 2555 | import pprint
import functools
from collections import defaultdict
import inspect
### dictionary ###
def invert(d, container=list, codomain=None):
s = defaultdict(container)
for k, v in d.items():
s[v].append(k)
# fill in range
if codomain is not None:
for v in codomain:
s... | mit | 4,258,990,315,538,097,700 | 24.55 | 115 | 0.580039 | false | 3.644793 | false | false | false |
seiji56/rmaze-2016 | testes/sharp_average.py | 1 | 4337 | # Simple demo of reading each analog input from the ADS1x15 and printing it to
# the screen.
# Author: Tony DiCola
# License: Public Domain
import time
import os
# Import the ADS1x15 module.
import Adafruit_ADS1x15
milli_time = lambda: int(round(time.time() * 1000))
# Create an ADS1115 ADC (16-bit) instance.
#adc = Ad... | gpl-3.0 | -3,093,747,795,383,116,000 | 36.068376 | 104 | 0.551533 | false | 2.405435 | false | false | false |
MediffRobotics/DeepRobotics | DeepLearnMaterials/tutorials/tensorflowTUT/tf16_classification/full_code.py | 1 | 2252 | # View more python learning tutorial on my Youtube and Youku channel!!!
# Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
# Youku video tutorial: http://i.youku.com/pythontutorial
"""
Please note, this code is only for python 3+. If you are using python 2+, please modify the code acco... | gpl-3.0 | 4,688,053,963,363,473,000 | 37.827586 | 109 | 0.689609 | false | 3.226361 | false | false | false |
AlexStarov/Shop | applications/authModel/admin.py | 1 | 5437 | # -*- coding: utf-8 -*-
from django import forms
from django.contrib import admin
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin as DjangoUserAdmin
from django.contrib.contenttypes.models import ContentType
fr... | apache-2.0 | -1,223,924,773,089,589,000 | 38.115108 | 128 | 0.644473 | false | 3.767845 | false | false | false |
RaitzeR/VAL | Render/Camera.py | 1 | 1189 | # -*- coding: utf-8 -*-
class Camera(object):
###
# This represents the Camera class.
#
# @param int slack - How far the robot has to move for the camera to follow
#
##
def __init__(self,slack):
self.x = 0
self.y = 0
self.slack = 90
###
# Adj... | mit | 3,983,266,700,036,272,000 | 37.354839 | 88 | 0.57275 | false | 3.497059 | false | false | false |
eharney/cinder | cinder/volume/drivers/vmware/exceptions.py | 1 | 2160 | # Copyright (c) 2015 VMware, 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 | -1,504,572,660,545,160,400 | 33.83871 | 78 | 0.726852 | false | 4.17795 | false | false | false |
FlipperPA/wagtail | wagtail/search/tests/test_elasticsearch6_backend.py | 1 | 32904 | # -*- coding: utf-8 -*-
import datetime
import json
from unittest import mock
from django.db.models import Q
from django.test import TestCase
from elasticsearch.serializer import JSONSerializer
from wagtail.search.backends.elasticsearch6 import Elasticsearch6SearchBackend
from wagtail.search.query import MATCH_ALL, ... | bsd-3-clause | -296,140,626,295,586,400 | 38.264916 | 156 | 0.527261 | false | 4.048228 | true | false | false |
akshayka/projection-methods | projection_methods/problems/save_random_cone_program.py | 1 | 1742 | import argparse
import cvxpy
from projection_methods.oracles.nonneg import NonNeg
from projection_methods.oracles.soc import SOC
from projection_methods.oracles.zeros import Zeros
from projection_methods.problems.problem_factory import random_cone_program
from projection_methods.problems.utils import check_path, save_... | gpl-3.0 | -1,892,525,489,425,142,300 | 33.156863 | 76 | 0.640069 | false | 3.208103 | false | false | false |
rmedwards/si4703RaspberryPi | si4703Example.py | 1 | 1434 | #!/usr/bin/env python 2
#example program for testing the si4703 library
from si4703Library import si4703Radio
def main():
# device ID is typically 0x10 - confirm with "sudo i2cdetect 1"
radio = si4703Radio(0x10, 5, 19)
radio.si4703Init()
radio.si4703SetChannel(987)
radio.si4703SetVolume(... | gpl-3.0 | 7,638,046,287,922,389,000 | 29.911111 | 67 | 0.536262 | false | 3.93956 | false | false | false |
kakashi1016/MakeAppointment4TZMH | MyRedisSession/RedisSession.py | 1 | 4608 | # -*- coding:utf-8 -*-
__author__ = 'Qian'
import hmac
import uuid
import hashlib
from MyDBUtils.yq_NoSQL import RedisDB
class SessionData(dict):
def __init__(self, session_id, hmac_key):
self.session_id = session_id
self.hmac_key = hmac_key
class Session(SessionData):
def __init__(self, s... | gpl-2.0 | 2,416,111,012,153,096,700 | 30.318182 | 94 | 0.597 | false | 3.122356 | false | false | false |
keiwando/MusicGenerator | app.py | 1 | 3340 | '''
Music Generator Web Application
Copyright (C) 2016 Keiwan Donyagard
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 any later version.
This program is distrib... | gpl-3.0 | -1,668,469,056,994,993,000 | 34.913978 | 150 | 0.669162 | false | 3.541888 | false | false | false |
borjam/exabgp | src/exabgp/bgp/message/message.py | 2 | 5802 | # encoding: utf-8
"""
message.py
Created by Thomas Mangin on 2010-01-15.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
from struct import pack
class _MessageCode(int):
NOP = 0x00 # . 0 - internal
OPEN = 0x01 # . 1
UPDATE = 0x02 # . ... | bsd-3-clause | 7,560,956,244,960,126,000 | 30.362162 | 99 | 0.507928 | false | 4.051676 | false | false | false |
meierue/RNNLIB | examples/phoneme_transcription/htk_data_reader.py | 1 | 1877 | from scipy import *
def extractHlistData(filename,preFrames=0,postFrames=0,printFilename=1):
if (printFilename):
print ("reading input file "+filename)
f=file(filename)
s = f.readline()
input = []
while (s!=""):
words = s.split()
vect = []
for w in words:
vect.append(float(w))
input.appe... | gpl-3.0 | -5,893,719,569,276,847,000 | 25.617647 | 76 | 0.698988 | false | 3.037217 | false | false | false |
EDUlib/eTracesX | Translation_software/coursera_to_MOOCdb_piping/piping_scripts/queries/openedx/forums.py | 1 | 1066 | from ...utilities import db, moocdb_utils
from common import *
def GetForums(vars):
output_items = []
resource_type_id = moocdb_utils.GetResourceTypeMap(vars)['forum']
# course_doc = vars['resource_list'][0]
# discussion_topics = course_doc['metadata']['discussion_topics']
# src_forums = [{'id... | agpl-3.0 | 511,794,159,638,239,600 | 33.419355 | 109 | 0.572233 | false | 3.701389 | false | false | false |
geoportallux/geoportailv3-gisgr | CONST_alembic/main/versions/1d5d4abfebd1_add_restricted_theme.py | 2 | 2780 | # Copyright (c) 2014-2015, Camptocamp SA
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions an... | mit | 3,061,668,661,970,459,600 | 37.611111 | 83 | 0.731295 | false | 4.124629 | false | false | false |
twtygqyy/pytorch-SRResNet | eval.py | 1 | 3302 | import matlab.engine
import argparse, os
import torch
from torch.autograd import Variable
import numpy as np
import time, math, glob
import scipy.io as sio
import cv2
parser = argparse.ArgumentParser(description="PyTorch SRResNet Eval")
parser.add_argument("--cuda", action="store_true", help="use cuda?")
pa... | mit | -7,854,606,231,536,977,000 | 33.505376 | 105 | 0.635978 | false | 2.765494 | false | false | false |
pragalakis/100-python-projects | threading/bulk-thumbnail-creator.py | 1 | 1508 | '''
Bulk Thumbnail Creator
Picture processing can take a bit of time for some transformations. Especially if the image is large. Create an image program which can take hundreds of images and converts them to a specified size in the background thread while you do other things. For added complexity, have one thread handl... | mit | -5,071,827,172,668,444,000 | 29.16 | 353 | 0.673077 | false | 3.590476 | false | false | false |
pauljohnleonard/pod-world | 03_template.py | 1 | 2278 |
# This code would be a good place to start your evolution coding.
import math,random
from pod import world,gui,pods
# flag to switch GUI on/off
GUI=True
def equip_car(pod):
sensors=[pods.Sensor(angle=0.4,name="Left"),pods.Sensor(angle=-0.4,name="Right")]
pod.addSensors(sensors)
po... | gpl-2.0 | 5,150,158,856,517,587,000 | 19.339286 | 102 | 0.585601 | false | 3.369822 | false | false | false |
davinwang/caffe2 | caffe2/python/layers/layers.py | 1 | 14819 | # Copyright (c) 2016-present, Facebook, 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 | -6,614,130,249,335,534,000 | 36.421717 | 81 | 0.619003 | false | 4.392116 | false | false | false |
portnov/sverchok | nodes/modifier_change/objects_along_edge.py | 1 | 13233 | # ##### 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 version.
#
# This program is distrib... | gpl-3.0 | 616,527,906,138,711,600 | 39.592025 | 126 | 0.610973 | false | 3.763652 | false | false | false |
rehandalal/morgoth | morgoth/addons/models.py | 1 | 5574 | import hashlib
import math
import os
from urllib import request
from django.db import models
from dirtyfields import DirtyFieldsMixin
PLATFORMS = (
'Darwin_x86-gcc3-u-i386-x86_64',
'Darwin_x86_64-gcc3-u-i386-x86_64',
'Linux_x86-gcc3',
'Linux_x86_64-gcc3',
'WINNT_x86-msvc',
'WINNT_x86-msvc-x... | mpl-2.0 | 1,009,451,037,490,578,000 | 29.12973 | 96 | 0.582526 | false | 3.743452 | false | false | false |
jparicka/recloud | api.py | 1 | 3870 | #!flask/bin/python
import os
import sys
import datetime
from flask import Flask, jsonify, abort
from flask import render_template, request, url_for
app = Flask(__name__)
import pymongo
from pymongo import MongoClient
from pymongo import ASCENDING, DESCENDING
client = MongoClient('localhost', 27017)
mongo = client.... | mit | 5,267,674,015,919,751,000 | 21.5 | 90 | 0.648837 | false | 2.914157 | false | false | false |
hexahedria/gated-graph-transformer-network | ggtnn_graph_parse.py | 1 | 12248 | import os
import sys
import re
import collections
import numpy as np
import scipy
import json
import itertools
import pickle
import gc
import gzip
import argparse
def tokenize(sent):
'''Return the tokens of a sentence including punctuation.
>>> tokenize('Bob dropped the apple. Where is the apple?')
['Bob',... | mit | -3,867,483,269,936,509,400 | 39.69103 | 209 | 0.638798 | false | 3.31027 | false | false | false |
AGoodId/begood-sites | begood_sites/management/commands/fix_root_site_id.py | 1 | 1169 | # coding=utf-8
from django.db import connection
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.contrib.sites.models import Site
class Command(BaseCommand):
args = '<id_or_name>'
help = 'Fix any broken article urls due to wrong root site id'
def h... | mit | -3,415,553,965,840,916,000 | 31.472222 | 119 | 0.693755 | false | 3.58589 | false | false | false |
Gr8z/Legend-Cogs | crtools/crtools.py | 1 | 29047 | import discord
from discord.ext import commands
from .utils.dataIO import dataIO, fileIO
import os
from cogs.utils import checks
import re
tags_path = "data/crtools/tags.json"
clans_path = "data/crtools/clans.json"
tags_bs_path = "data/crtools/tags_bs.json"
clubs_path = "data/crtools/clubs.json"
auth_path = "data/cr... | mit | -5,394,982,860,546,810,000 | 35.537107 | 121 | 0.595862 | false | 3.525121 | false | false | false |
starduliang/haha | haha/user/models.py | 1 | 4428 | # -*- coding: utf-8 -*-
"""User models."""
import datetime as dt
from flask_login import UserMixin
from haha.database import Column, Model, SurrogatePK, db, reference_col, relationship
from haha.extensions import bcrypt
from flask import current_app as app
import jwt
class Role(SurrogatePK, Model):
"""A role fo... | bsd-3-clause | -8,856,021,466,688,892,000 | 33.333333 | 130 | 0.602078 | false | 4.043836 | false | false | false |
shigh/py3d3v | py3d3v/landau.py | 1 | 4465 |
import numpy as np
from core import *
from pic3d3v import *
from interp import *
from solvers import *
class Landau3D(object):
def __init__(self,
part_dims = (64, 64, 64),
grid_dims = (64, 64, 64),
cube_dims = (2*np.pi, 2*np.pi, 2*np.pi),
m... | gpl-2.0 | 1,672,073,335,163,201,800 | 28.966443 | 73 | 0.462038 | false | 2.720902 | false | false | false |
summerAI/serapis | serapis/tasks.py | 1 | 3332 | #!/usr/bin/env python2
# coding=utf-8
"""
Task dispatcher
"""
from __future__ import unicode_literals
from __future__ import absolute_import
__author__ = "Manuel Ebert"
__copyright__ = "Copyright 2015, summer.ai"
__date__ = "2015-11-20"
__email__ = "manuel@summer.ai"
import os
import json
from serapis.config import c... | mit | 8,636,148,709,141,609,000 | 30.140187 | 136 | 0.636555 | false | 3.812357 | true | false | false |
zielmicha/hera | hera/vmcontroller_server.py | 1 | 6095 | import uuid
import os
import traceback
import socket
import logging
import threading
import json
import time
import struct
import binascii
import sys
from hera import vmcontroller
from hera import accounting
from hera import settings
from hera import disks
HALT_TIMEOUT = 0.2
TIME_BETWEEN_REGISTRATIONS = 2
def numip(... | agpl-3.0 | 4,457,539,324,505,983,000 | 29.628141 | 90 | 0.546678 | false | 3.835746 | false | false | false |
Darkbladecr/pyresearch | authors.py | 1 | 2299 | from pubmedHelpers import distinctSet
from operator import itemgetter
from collections import OrderedDict
def calc_hIndex(citations):
N = len(citations)
if N == 0:
return 0
i = 0
while i < N and citations[i]['Citations'] >= (i + 1):
i += 1
return i
# authorName = 'Author Names'
# a... | mit | -7,061,642,217,268,430,000 | 37.966102 | 112 | 0.648978 | false | 3.6784 | false | false | false |
glenntanner3/devedeng | setup.py | 1 | 3912 | #!/usr/bin/env python3
import os
from glob import glob
from distutils.core import setup
from distutils import dep_util
def get_data_files():
data_files = [
(os.path.join('share', 'applications'), ['data/devede_ng.desktop']),
(os.path.join('share', 'pixmaps'), ['data/devedeng.svg']),
(os.pa... | gpl-3.0 | -3,704,167,733,857,860,600 | 36.257143 | 126 | 0.592536 | false | 3.389948 | false | false | false |
tombosc/dict_based_learning | dictlearn/lookup.py | 1 | 17124 | """
Methods of constructing word embeddings
Idea: Learn to pick by gating that's learnable (and would ignore unknown words)
Idea: Then start tarining gate late?
"""
from blocks.bricks import Initializable, Linear, MLP, Tanh, Rectifier
from blocks.bricks.base import application, _variable_name
from blocks.bricks.looku... | mit | -1,814,338,283,812,595,000 | 39.966507 | 110 | 0.591334 | false | 3.817209 | false | false | false |
tgcmteam/tgcmlinux | src/tgcm/core/MainWifi.py | 1 | 8186 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Authors : Luis Galdos <luisgaldos@gmail.com>
#
# Copyright (c) 2011, Telefonica Móviles España S.A.U.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software F... | gpl-2.0 | 3,047,374,062,213,928,000 | 38.346154 | 128 | 0.623045 | false | 3.876836 | false | false | false |
coll-gate/collgate | server/organisation/establishment.py | 1 | 13298 | # -*- coding: utf-8; -*-
#
# @file establishment.py
# @brief coll-gate organisation establishment model REST API
# @author Frédéric SCHERMA (INRA UMR1095)
# @date 2017-01-03
# @copyright Copyright (c) 2017 INRA/CIRAD
# @license MIT (see LICENSE file)
# @details
from django.contrib.contenttypes.models import ContentTy... | mit | 5,399,439,768,531,858,000 | 31.429268 | 122 | 0.663583 | false | 3.835016 | true | false | false |
n3k/SchedulerSimulator | Scheduler/Operation.py | 1 | 2449 | __author__ = 'n3k'
from abc import ABCMeta, abstractmethod
class Operation(object):
__metaclass__ = ABCMeta
def __init__(self, units=0):
self.units = units
@abstractmethod
def execute_change_state(self,process):
pass
@abstractmethod
def add_operation(self, operation):
... | mit | 6,480,023,146,889,344,000 | 24 | 72 | 0.612495 | false | 4.115966 | false | false | false |
luigiberrettini/build-deploy-stats | statsSend/urbanCodeDeploy/urbanCodeDeployApplicationProcessRequest.py | 1 | 1826 | #!/usr/bin/env python3
from datetime import datetime, timezone
from reporting.category import Category
from reporting.activity import Activity
#{
# "id": "669bfeea-92e8-47f8-a9e7-03497253bd21",
# "state": "CLOSED",
# "result": "SUCCEEDED",
# "rootTrace": { "startDate": 1494844210865, "endDate": 149484422... | mit | 2,701,777,481,238,537,700 | 48.378378 | 138 | 0.670865 | false | 3.24911 | false | false | false |
sjennewein/MetaDataDistiller | metadata/elsevier.py | 1 | 6444 | import json
import requests
from bs4 import BeautifulSoup
from .payload import Payload, Author, Affiliation
from metadata import nmd
from metadata import bioaging
import re
def map(url):
meta = Payload()
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHT... | mit | 3,727,521,018,671,618,000 | 31.877551 | 145 | 0.520174 | false | 3.731326 | false | false | false |
zentralopensource/zentral | zentral/core/stores/backends/kinesis.py | 1 | 1232 | import json
import logging
import boto3
from zentral.core.stores.backends.base import BaseEventStore
logger = logging.getLogger('zentral.core.stores.backends.kinesis')
class EventStore(BaseEventStore):
def __init__(self, config_d):
super(EventStore, self).__init__(config_d)
self.stream = config_d... | apache-2.0 | -5,057,127,797,752,728,000 | 38.741935 | 84 | 0.585227 | false | 3.85 | true | false | false |
Scan-o-Matic/scanomatic | scanomatic/data_processing/phenotypes.py | 1 | 6943 | from __future__ import absolute_import
from enum import Enum
from itertools import chain
from scanomatic.data_processing.phases.features import (
CurvePhaseMetaPhenotypes, VectorPhenotypes
)
from .growth_phenotypes import Phenotypes
class PhenotypeDataType(Enum):
"""The enum contains two types of phenotype ... | gpl-3.0 | -3,914,262,014,988,394,500 | 34.605128 | 104 | 0.668875 | false | 4.118031 | false | false | false |
LabKey/labkey-api-python | labkey/server_context.py | 1 | 5211 | from labkey.utils import json_dumps
import requests
from requests.exceptions import RequestException
from labkey.exceptions import (
RequestError,
RequestAuthorizationError,
QueryNotFoundError,
ServerContextError,
ServerNotFoundError,
)
API_KEY_TOKEN = "apikey"
CSRF_TOKEN = "X-LABKEY-CSRF"
def ha... | apache-2.0 | -9,173,920,371,055,513,000 | 32.403846 | 100 | 0.552869 | false | 4.54712 | false | false | false |
clinton-hall/nzbToMedia | core/version_check.py | 1 | 20383 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
# Modified by: echel0n
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
import os
import platform
import re
import shutil
import stat
import subprocess
import tarfile
import traceback
from six.moves.urllib.req... | gpl-3.0 | 4,495,967,450,857,365,000 | 37.027985 | 159 | 0.570524 | false | 4.029057 | true | false | false |
lsiemens/lax | lax/timeout.py | 1 | 1595 | import signal
class timeout:
"""
This class may be used as a decorator or as a context.
when used as a decorator the decorated function raises a TimeoutError
exception if the function has not returned after the maximum execution time.
when used as a context the code wrapped inside the co... | bsd-3-clause | -7,485,721,208,621,413,000 | 34.444444 | 136 | 0.611285 | false | 4.492958 | false | false | false |
dNG-git/pas_tasks_loader | src/dNG/loader/tasks_daemon.py | 1 | 6114 | # -*- coding: utf-8 -*-
"""
direct PAS
Python Application Services
----------------------------------------------------------------------------
(C) direct Netware Group - All rights reserved
https://www.direct-netware.de/redirect?pas;tasks_loader
The following license agreement remains valid unless any additions or
c... | gpl-2.0 | 4,353,964,892,505,818,600 | 32.593407 | 143 | 0.637062 | false | 3.879442 | false | false | false |
jinhyunglee/yass | src/yass/augment/noise.py | 1 | 2109 | import numpy as np
from ..geometry import order_channels_by_distance
def noise_cov(path, dtype, batch_size, n_channels, neighbors, geom, temporal_size):
wfile = open(path, 'rb')
dsize = np.dtype(dtype).itemsize
flattenedLength = dsize*batch_size*n_channels
wfile.seek(0)
rec = wfile.read(flatt... | apache-2.0 | -2,514,189,382,627,582,500 | 31.461538 | 83 | 0.588905 | false | 2.827078 | false | false | false |
genodeftest/exaile | plugins/daapserver/__init__.py | 1 | 3288 | import logging
from xl import event, settings
import exaile_parser
from server import DaapServer
import daapserverprefs
logger = logging.getLogger(__file__)
# todo support multiple connections?
class CollectionWrapper:
'''Class to wrap Exaile's collection to make it spydaap compatible'''
class TrackWrapper:... | gpl-2.0 | 1,827,728,514,555,148,500 | 30.314286 | 88 | 0.586679 | false | 3.727891 | false | false | false |
milmd90/TwitterBot | setup.py | 1 | 2117 | #!/usr/bin/env python
#
# Copyright 2007-2016 The Python-Twitter Developers
#
# 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 | -3,604,772,965,230,855,000 | 35.5 | 74 | 0.653755 | false | 4.175542 | false | false | false |
bacher09/gentoo-packages | gpackages/libs/package_info/generic_metadata/news.py | 1 | 4398 | import os
import os.path
import re
import hashlib
from datetime import datetime
from email import message_from_string
from email.utils import getaddresses
from ..generic import ToStrMixin, toint, file_get_content
from ..abstract import AbstractNewsItem, SimpleMaintainer
NEWS_STR_RE = r'^(?P<date>\d{4,4}-\d{2}-\d{2})-(... | gpl-2.0 | -5,832,976,671,323,706,000 | 27.558442 | 72 | 0.550023 | false | 3.661948 | false | false | false |
patcorwin/fossil | pdil/tool/animDagMenu.py | 1 | 6688 | from __future__ import print_function, absolute_import
from functools import partial
from operator import eq
import traceback
from pymel.core import Callback, cmds, currentTime, menuItem, PyNode, selected, setParent
from .. import core
from .fossil import controllerShape
from .fossil import kinematicSwitch
from .fo... | bsd-3-clause | -6,858,241,975,963,805,000 | 35.151351 | 139 | 0.508672 | false | 4.414521 | false | false | false |
belevtsoff/earlPipeline | earlpipeline/backends/calculator.py | 1 | 1698 | # Example backend, which performs simple calculations. It implements
# simple_graph_engine API
from earlpipeline.backends.base_simple_engine import Pipeline, Unit, InPort, OutPort, Parameter
import time
class Number(Unit):
out = OutPort('out')
value = Parameter('value', 'input', float, 5.9, datatype='number')... | gpl-2.0 | -7,798,091,614,288,024,000 | 21.945946 | 95 | 0.602473 | false | 3.127072 | false | false | false |
Ladsgroup/Kian | scripts/kian_worker.py | 1 | 4275 | import argparse
import pywikibot
import sys
import codecs
import os
if __name__ == '__main__' and __package__ is None:
from os import sys, path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
import kian.fitness
from kian import TrainedModel
from kian import Kian
def recent_changes_gen(si... | mit | -4,990,951,206,053,658,000 | 31.633588 | 76 | 0.556725 | false | 3.417266 | false | false | false |
PeterHenell/performance-dashboard | performance-collector2/stoppable_worker.py | 1 | 1548 | from queue import Queue
from threading import Thread
import time
class ClosableQueue(Queue):
SENTINEL = object()
def close(self):
self.put(self.SENTINEL)
def __iter__(self):
while True:
item = self.get()
try:
if item is self.SENTINEL:
... | apache-2.0 | 3,949,899,204,801,272,300 | 20.5 | 55 | 0.529716 | false | 3.959079 | false | false | false |
ueapy/ueapy.github.io | pelicanconf.py | 1 | 3047 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
from pathlib import Path
AUTHOR = u'Python Group'
SITENAME = u'Python Group UEA'
SITEURL = ''
PATH = 'content'
STATIC_PATHS = ['extra', 'extra/robots.txt', 'pdfs', 'figures',
'extra/favicon.ico', 'extra/custom.css'... | mit | -2,593,611,865,611,316,000 | 32.483516 | 94 | 0.645553 | false | 2.978495 | false | false | false |
ajdiaz/mole | mole/action/sort.py | 1 | 1129 | #! /usr/bin/env python
# -*- encoding: utf-8 -*-
# vim:fenc=utf-8:
from mole.event import Event
from mole.action import Action, ActionSyntaxError
sort_asc = lambda x,y:cmp(x,y)
sort_des = lambda x,y:cmp(y,x)
class ActionSort(Action):
"""This action sort values in pipeline.
:param `fields`: a :class:`list` w... | gpl-3.0 | 7,584,817,341,877,169,000 | 23.543478 | 69 | 0.539415 | false | 3.726073 | false | false | false |
ctxis/cvsslib | cvsslib/contrib/django_model.py | 1 | 2880 | import operator
from django.db.models.base import ModelBase
from enumfields import EnumField
from cvsslib.mixin import cvss_mixin_data, utils_mixin
from cvsslib.base_enum import NotDefined
class KeyedEnumField(EnumField):
"""
An enum field that stores the names of the values as strings, rather than the val... | lgpl-3.0 | -5,086,479,510,017,477,000 | 29.315789 | 98 | 0.575347 | false | 4.241532 | false | false | false |
drwyrm/Flexget | flexget/plugins/sites/btn.py | 1 | 4227 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import logging
import re
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.utils import requests, json
from flexget.... | mit | -9,006,982,095,651,858,000 | 45.450549 | 114 | 0.545304 | false | 4.322086 | false | false | false |
kkerwin1/recast | pychromecast/pychromecast/socket_client.py | 1 | 16222 | """
Module to interact with the ChromeCast via protobuf-over-socket.
Big thanks goes out to Fred Clift <fred@clift.org> who build the first
version of this code: https://github.com/minektur/chromecast-python-poc.
Without him this would not have been possible.
"""
import logging
import socket
import ssl
import json
imp... | bsd-2-clause | -5,804,298,984,980,073,000 | 33.151579 | 79 | 0.582542 | false | 4.284733 | false | false | false |
EVEModX/Mods | mods/changefonts/__init__.py | 1 | 2582 | import os
import carbonui.const as uiconst
import carbonui.languageConst as languageConst
#import carbonui.fontconst as fontconst
import blue
DEFAULT_FONTSIZE = 10
DEFAULT_LINESPACE = 12
DEFAULT_LETTERSPACE = 0
DEFAULT_UPPERCASE = False
STYLE_DEFAULT = 'STYLE_DEFAULT'
FONTFAMILY_PER_WINDOWS_LANGUAGEID = {... | mit | 6,818,854,471,689,327,000 | 28.023256 | 85 | 0.568164 | false | 3.769343 | false | false | false |
minireference/noBSLAnotebooks | aspynb/chapter04_problems.py | 1 | 3847 | def cells():
'''
# 4/ Problem solutions
'''
'''
'''
# helper code needed for running in colab
if 'google.colab' in str(get_ipython()):
print('Downloading plot_helpers.py to util/ (only neded for colab')
!mkdir util; wget https://raw.githubusercontent.com/minireference/noBSL... | mit | 5,383,121,271,636,244,000 | 20.372222 | 125 | 0.465038 | false | 2.862351 | false | false | false |
simsong/grr-insider | gui/plugins/semantic.py | 1 | 20540 | #!/usr/bin/env python
"""This file contains specialized renderers for semantic values.
Other files may also contain specialized renderers for semantic types relevant
to their function, but here we include the most basic and common renderers.
"""
import itertools
import urllib
import logging
from grr.gui import rend... | apache-2.0 | -6,638,159,273,975,990,000 | 28.093484 | 80 | 0.656232 | false | 3.708251 | false | false | false |
HarmonyEnterpriseSolutions/harmony-platform | src/harmonyserv/dbi/test/test.py | 1 | 6102 | #-*- coding: cp1251 -*-
URL = 'http://192.168.1.2:8000/dbi/'
import os
import simplejson
import sys
import urllib2
from cookielib import CookieJar
from hashlib import md5
from urllib2 import urlopen, HTTPError, Request, quote
def encodePassword(password):
md = md5()
md.update((password or u'').encode('UTF8'))
ret... | gpl-2.0 | -5,099,995,756,473,489,000 | 25.763158 | 159 | 0.578335 | false | 2.886471 | true | false | false |
Benocs/core | src/daemon/core/sdt.py | 1 | 13204 | #
# CORE
# Copyright (c)2012-2013 the Boeing Company.
# See the LICENSE file included in this distribution.
#
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
#
'''
sdt.py: Scripted Display Tool (SDT3D) helper
'''
from core.constants import *
from core.api import coreapi
from .coreobj import PyCoreNet, PyCore... | bsd-3-clause | 6,205,445,200,969,223,000 | 38.297619 | 80 | 0.53817 | false | 3.888104 | false | false | false |
jasonpr59/lisp | lexer.py | 1 | 2881 | import re
import tokens
_IDENTIFIER_CHARS = '-+_?!*/:<>=a-zA-Z'
_IDENTIFIER_REGEX = '[%s][%s0-9]*' % (_IDENTIFIER_CHARS, _IDENTIFIER_CHARS)
matchers = (
(re.compile(r'\('), tokens.OpenParen),
(re.compile(r'\)'), tokens.CloseParen),
(re.compile(_IDENTIFIER_REGEX), tokens.Identifier),
(re.compile(r'(\+... | gpl-2.0 | -2,826,172,339,629,184,000 | 30.315217 | 75 | 0.587643 | false | 3.660737 | false | false | false |
alphagov/notifications-admin | app/models/service.py | 1 | 23418 | from flask import abort, current_app
from werkzeug.utils import cached_property
from app.models import JSONModel
from app.models.contact_list import ContactLists
from app.models.job import (
ImmediateJobs,
PaginatedJobs,
PaginatedUploads,
ScheduledJobs,
)
from app.models.organisation import Organisatio... | mit | -1,278,936,706,243,757,600 | 30.817935 | 106 | 0.611026 | false | 3.91409 | false | false | false |
CulturePlex/pybossa | pybossa/error/__init__.py | 1 | 2448 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa 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... | agpl-3.0 | 1,711,442,855,567,535,900 | 32.534247 | 77 | 0.60049 | false | 4.508287 | false | false | false |
RCMRD/FloodMapsWorkshop | python/modis-active-fires-r.py | 1 | 6578 | #!/usr/bin/env python
#
# Created on 9/27/2012 Pat Cappelaere - Vightel Corporation
#
# Requirements:
# gdal, numpy pytrmm...
#
# Access and Process MODIS Active Fires
#
# https://firms.modaps.eosdis.nasa.gov/active_fire/text/Central_America_7d.csv
# http://firms.modaps.eosdis.nasa.gov/active_fire/text/Central_America_... | apache-2.0 | -1,647,345,812,547,321,300 | 31.092683 | 176 | 0.674065 | false | 2.632253 | false | false | false |
mkhsueh/python_koans | python3/koans/about_exceptions.py | 1 | 1884 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutExceptions(Koan):
class MySpecialError(RuntimeError):
pass
def test_exceptions_inherit_from_exception(self):
mro = self.MySpecialError.mro()
self.assertEqual('RuntimeError', mro[1].__name__)
se... | mit | -2,863,734,768,375,357,400 | 25.535211 | 62 | 0.568471 | false | 4.381395 | false | false | false |
mzsm/IkaLog | ikalog/utils/matcher.py | 1 | 6122 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# IkaLog
# ======
# Copyright (C) 2015 Takeshi HASEGAWA, Junki MIZUSHIMA
#
# 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:/... | apache-2.0 | 7,287,764,022,303,650,000 | 38.895425 | 187 | 0.576999 | false | 3.400557 | false | false | false |
LCOGT/colourImager | pretty_fits/clean.py | 1 | 6929 | '''
ColourImager - Python pipeline to combine 3 FITS files into a single colour JPEG/PNG
Copyright (C) 2017 Edward Gomez, Las Cumbres Observatory
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; eithe... | gpl-2.0 | -2,542,502,133,727,926,300 | 31.378505 | 111 | 0.650455 | false | 3.326452 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.