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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nearai/program_synthesis | program_synthesis/naps/examples/seq2seq/pointer_seq_encoder.py | 1 | 1895 | import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from torch.autograd import Variable
class SeqEncoder(nn.Module):
def __init__(self, args):
super(SeqEncoder, self).__init__()
self.num_units = args.num_units
self.num_encoder_layers... | apache-2.0 | 2,590,437,045,472,163,000 | 45.219512 | 112 | 0.65277 | false | 3.722986 | false | false | false |
chrisatthestudy/jot | src/test.py | 1 | 8053 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Python CLI Test Unit
"""
# Standard library imports
import datetime
import os
# Third party imports
# Application specific imports
import jot
if (__name__ == "__main__"):
# Basic unit tests for API()
import unittest
class APITestCase(unittest.TestC... | mit | 3,204,859,210,727,376,000 | 44.755682 | 105 | 0.56302 | false | 3.949485 | true | false | false |
vesellov/bitdust.devel | transport/tcp/tcp_connection.py | 1 | 16191 | #!/usr/bin/env python
# tcp_connection.py
#
# Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io
#
# This file (tcp_connection.py) is part of BitDust Software.
#
# BitDust 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 F... | agpl-3.0 | -3,884,063,711,890,305,000 | 33.819355 | 160 | 0.556173 | false | 4.110434 | false | false | false |
andresgz/ekratia | ekratia/core/email.py | 1 | 2332 | from ekratia.conversations.models import Thread
from ekratia.referendums.models import Referendum
from django_email import EmailTemplate
import logging
logger = logging.getLogger('ekratia')
def notify_comment_node(request, node, object_type):
"""
Method to create new comment for the current Thread
"""
... | bsd-3-clause | -1,448,053,471,273,552,600 | 31.388889 | 67 | 0.542453 | false | 4.4 | false | false | false |
tomashaber/raiden | raiden/network/protocol.py | 1 | 24753 | # -*- coding: utf-8 -*-
import logging
import random
from collections import (
namedtuple,
defaultdict,
)
from itertools import repeat
import cachetools
import gevent
from gevent.event import (
_AbstractLinkable,
AsyncResult,
Event,
)
from ethereum import slogging
from raiden.exceptions import (
... | mit | 2,086,037,826,785,422,800 | 30.572704 | 93 | 0.584899 | false | 4.445582 | false | false | false |
sbradley7777/glocktop_analyze | glocktop_analyze/plugins/snapshots.py | 1 | 5213 | #!/usr/bin/python
"""
@author : Shane Bradley
@contact : sbradley@redhat.com
@copyright : GPLv3
* This plugin outputs the number of snapshots taken for a filesystem, the start
time, and end time or last snapshot taken.
* This plugin outputs the filesystem name, time when snapshot taken when dlm
activity is g... | gpl-3.0 | -5,534,080,927,086,368,000 | 51.656566 | 158 | 0.532707 | false | 4.297609 | false | false | false |
MisanthropicBit/bibpy | bibpy/entry/base.py | 1 | 1986 | # -*- coding: utf-8 -*-
"""Base class for all types of entries."""
class BaseEntry:
"""Base class for all types of entries."""
def format(self, **options):
raise NotImplementedError()
def format_auxiliary_entry(self, entry_type, contents, indent=' ',
singleline... | mit | 4,408,465,947,743,820,300 | 24.139241 | 78 | 0.572508 | false | 4.774038 | false | false | false |
tscloud/hamsalad | callservice_class.py | 1 | 6917 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
# Copyright (C) 2014 Tom Cloud
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) ... | agpl-3.0 | -3,144,253,205,164,794,000 | 36.797814 | 111 | 0.556021 | false | 4.088061 | false | false | false |
hchim/stockanalyzer | simulator/TradeSimulator.py | 1 | 4978 | import pandas as pd
import numpy as np
from utils.webdata import get_close_of_symbols
class TradeSimulator(object):
def __init__(self, start_val=1000000, leverage=2.0, allow_short=True):
"""
Parameters
----------
start_val: float
start value of the portfolio
l... | mit | -7,645,321,113,309,966,000 | 33.811189 | 126 | 0.537364 | false | 4.232993 | false | false | false |
WillBrennan/DigitClassifier | DeepConv.py | 1 | 8479 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Will Brennan'
# Built-in Module
import os
import time
import logging
import warnings
import cPickle as pickle
from datetime import datetime
# Standard Modules
import numpy
import sklearn
import theano
import theano.tensor as T
# Custom Modules
import Scripts... | bsd-2-clause | 1,989,639,045,380,812,300 | 47.176136 | 174 | 0.608916 | false | 3.532917 | true | false | false |
Floobits/floobits-neovim-old | plugin/floo/editor.py | 1 | 2900 | import sys
from collections import defaultdict
import time
import vim
try:
from .common import shared as G
from .common import msg
except (ImportError, ValueError):
import common.shared as G
from common import msg
timeouts = defaultdict(list)
top_timeout_id = 0
cancelled_timeouts = set()
calling_tim... | apache-2.0 | -7,985,132,652,886,116,000 | 21.65625 | 137 | 0.623103 | false | 3.575832 | false | false | false |
saghul/aiohttp | aiohttp/websocket.py | 1 | 8733 | """WebSocket protocol versions 13 and 8."""
__all__ = ['WebSocketParser', 'WebSocketWriter', 'do_handshake',
'Message', 'WebSocketError',
'MSG_TEXT', 'MSG_BINARY', 'MSG_CLOSE', 'MSG_PING', 'MSG_PONG']
import base64
import binascii
import collections
import hashlib
import struct
from aiohttp impo... | apache-2.0 | 6,830,857,299,312,674,000 | 31.94717 | 79 | 0.596953 | false | 3.974056 | false | false | false |
dsavransky/EXOSIMS | EXOSIMS/StarCatalog/SIMBAD300Catalog.py | 1 | 1291 | # -*- coding: utf-8 -*-
from EXOSIMS.StarCatalog.SIMBADCatalog import SIMBADCatalog
from EXOSIMS.util.get_dirs import get_cache_dir
import os, inspect
class SIMBAD300Catalog(SIMBADCatalog):
"""SIMBAD300 Catalog class
This class populates the star catalog used in EXOSIMS from the SIMBAD300
ca... | bsd-3-clause | 8,737,107,476,047,672,000 | 38.34375 | 77 | 0.620449 | false | 3.763848 | false | false | false |
thedanotto/google-maps-urlerator | google_maps_urlerator/settings/local_mini.py | 1 | 4841 | import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'google_maps_urlerator.sqlite3', ... | mit | 3,139,702,584,782,255,000 | 36.246154 | 127 | 0.706259 | false | 3.575332 | false | false | false |
virantha/photokeeper | photokeeper/filecopy.py | 1 | 2553 | # Copyright 2016 Virantha Ekanayake All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 1,588,081,966,827,932,400 | 34.458333 | 89 | 0.617313 | false | 4.020472 | false | false | false |
breeezzz/local-bitcoins-api | LocalBitcoins/market_depth.py | 1 | 6253 | '''
Created on 7 Jun 2013
@author: Jamie
'''
import urllib2
import math
import re
import itertools
import argparse
from bs4 import BeautifulSoup
import matplotlib.pyplot as plt
markets = {'UK': {'url': 'gb/united%20kingdom/', 'curr': 'GBP'},
'USA': {'url': 'us/united%20states/', 'curr': 'USD'},
... | mit | -5,073,392,285,492,566,000 | 34.731429 | 107 | 0.592196 | false | 3.162873 | false | false | false |
dougfelt/nototools | nototools/merge_fonts.py | 1 | 6510 | #!/usr/bin/env python
#
# Copyright 2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | apache-2.0 | -1,896,441,785,038,470,700 | 35.166667 | 131 | 0.697389 | false | 3.166342 | false | false | false |
planetarymike/IDL-Colorbars | IDL_py_test/027_Eos_B.py | 1 | 5942 | from matplotlib.colors import LinearSegmentedColormap
from numpy import nan, inf
cm_data = [[1., 1., 1.],
[1., 1., 1.],
[0.498039, 0.498039, 0.498039],
[0., 0., 0.513725],
[0., 0., 0.533333],
[0., 0., 0.54902],
[0., 0., 0.564706],
[0., 0., 0.580392],
[0., 0., 0.6],
[0., 0., 0.615686],
[0., 0., 0.568627],
[0., 0., 0.584... | gpl-2.0 | -4,094,152,691,494,448,000 | 20.686131 | 69 | 0.49411 | false | 1.823259 | false | true | false |
frederica07/Dragon_Programming_Process | PyOpenGL-3.0.2/OpenGL/GL/VERSION/GL_1_3.py | 1 | 1829 | '''OpenGL extension VERSION.GL_1_3
This module customises the behaviour of the
OpenGL.raw.GL.VERSION.GL_1_3 to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/VERSION/GL_1_3.txt
'''
from OpenGL import platform, constants, constant,... | bsd-2-clause | 7,089,357,555,982,002,000 | 26.298507 | 70 | 0.618917 | false | 3.524085 | false | false | false |
GFibrizo/TPS_7529 | TP1/Estadistico de orden K/fuerza_bruta.py | 1 | 1235 | def es_estadistico_orden_k(conjunto, candidato, k):
menores = 0
for elem in conjunto:
if elem < candidato:
menores += 1
return menores == k
################################################################################
##########################################################... | apache-2.0 | -2,356,529,184,397,459,000 | 38.83871 | 80 | 0.364372 | false | 3.753799 | false | false | false |
ifengkou/python_splider | history/smzdm_splider_re.py | 1 | 4876 | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
import string
import urllib2
import re
import json
class HTML_Tool:
# 用 非贪婪模式 匹配 \t 或者\n 或者 空格超链接 和图片
BgnCharToNoneRex = re.compile("(\t|\n|\r| |<a.*?>|<img.*?>)")
#用 非贪婪模式 陪 任意 <>
EndCharToNoneRex = re.compile("<.*?>")
... | mit | 8,403,273,562,992,043,000 | 30.7 | 131 | 0.520955 | false | 2.701156 | false | false | false |
ebilionis/variational-reformulation-of-inverse-problems | unittests/test_cached_function.py | 1 | 1091 | """
Tests the vuq.CachedFunction decorator.
Author:
Ilias Bilionis
Date:
6/6/2014
"""
import numpy as np
import time
from vuq import *
# Test the evaluation of a cached and of an un-cached function
# An expensive function
def f(x):
for i in xrange(1000):
x += i
x /= 1000000
return 2.... | gpl-2.0 | -7,619,550,343,440,725,000 | 15.283582 | 62 | 0.597617 | false | 2.878628 | false | false | false |
kgiusti/gofer | src/gofer/messaging/consumer.py | 1 | 4280 | # Copyright (c) 2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the impl... | lgpl-2.1 | 7,477,042,401,144,376,000 | 27.918919 | 75 | 0.573598 | false | 4.376278 | false | false | false |
HaebinShin/tensorflow | tensorflow/contrib/layers/python/layers/layers.py | 1 | 58331 | # Copyright 2016 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 | 7,947,719,514,058,417,000 | 42.465723 | 80 | 0.631842 | false | 4.288098 | false | false | false |
PersianWikipedia/Database-reports | zzkootah.py | 1 | 7721 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Reza(User:reza1615), 2011
# MIT license
import catlib ,pagegenerators
import wikipedia,urllib,gzip,codecs,re
import MySQLdb as mysqldb
import config,os
from datetime import timedelta,datetime
wikipedia.config.put_throttle = 0
wikipedia.put_throttle.setDelay()
i... | mit | -4,913,412,699,687,561,000 | 44.486486 | 234 | 0.486337 | false | 2.431955 | false | false | false |
cadappl/krep | krep_subcmds/topic_subcmd.py | 1 | 2707 |
import re
from topics import all_topics, SubCommand
class TopicSubcmd(SubCommand):
COMMAND = 'topic'
help_summary = 'Print the topic summaries'
help_usage = '''\
%prog <topic> ...
Display all registered topics of the program for debugging purpose.
Topic contains the classes that can be imported from "... | lgpl-3.0 | 8,216,177,758,233,503,000 | 30.114943 | 74 | 0.533801 | false | 4.040299 | false | false | false |
codewatchorg/dirscalate | dirscalate.py | 1 | 7428 | # Josh Berry
# CodeWatch
# December 2013
#
import re
import argparse
import StringIO
import datetime
import requests
from requests.auth import HTTPBasicAuth
from requests.auth import HTTPDigestAuth
from requests_ntlm import HttpNtlmAuth
parser = argparse.ArgumentParser(prog='dirscalate.py',
formatter_class=argpars... | bsd-2-clause | -6,577,279,926,893,694,000 | 32.165179 | 177 | 0.675283 | false | 3.604076 | false | false | false |
FrankNagel/qlc | src/webapp/quanthistling/scripts/annotations/annotations_for_payne1989.py | 1 | 4018 | # -*- coding: utf8 -*-
import sys, os
sys.path.append(os.path.abspath('.'))
import re
from operator import attrgetter
import difflib
# Pylons model init sequence
import pylons.test
import logging
from quanthistling.config.environment import load_environment
from quanthistling.model.meta import Sessi... | gpl-3.0 | 6,149,296,717,054,123,000 | 31.764706 | 115 | 0.623444 | false | 3.524561 | false | false | false |
smallyear/linuxLearn | salt/salt/loader.py | 1 | 51863 | # -*- coding: utf-8 -*-
'''
We wanna be free to ride our machines without being hassled by The Man!
And we wanna get loaded!
And we wanna have a good time!
And that's what we are gonna do. We are gonna have a good time...
'''
# Import python libs
from __future__ import absolute_import
import os
import imp
import sys
i... | apache-2.0 | 7,259,339,349,541,373,000 | 33.71419 | 118 | 0.503326 | false | 4.588834 | true | false | false |
aolindahl/streaking | process_hdf5.py | 1 | 46151 | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 8 15:37:51 2015
@author: Anton O Lindahl
"""
import h5py
import argparse
import matplotlib.pyplot as plt
import numpy as np
import time
import os
import sys
import lmfit
import warnings
from aolPyModules import wiener, wavelet_filter
import time_to_energy_conversion as ... | gpl-2.0 | 6,914,218,429,216,574,000 | 37.523372 | 79 | 0.554571 | false | 3.450026 | false | false | false |
anthrotype/gobject-introspection | giscanner/msvccompiler.py | 1 | 3827 | # -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2014 Chun-wei Fan
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; eithe... | gpl-2.0 | 5,496,914,266,710,373,000 | 36.891089 | 75 | 0.628691 | false | 4.285554 | false | false | false |
TiKunze/CanMics | src/python/01_SingleChannel/3pop/EIN/HeHiVariation/RUM_Detektor_HeHi_2ndversion_cluster.py | 1 | 5917 | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 22 17:15:03 2015
@author: Tim Kunze
Copyright (C) 2015, Tim Kunze. All rights reserved.
This script is a modified version of the RUM Detector:
instead of sweeping over He and Hi in every diagram, we sweep over lenge and intensity of the impulse (as in the actiation p... | gpl-3.0 | 4,919,975,346,268,894,000 | 29.979058 | 137 | 0.540984 | false | 2.712976 | false | false | false |
junkcollector/PlexNMT-100 | PlexNMT.py | 1 | 3652 | #!/usr/bin/env python
"""
PlexNMT
Sources:
PlexConnect: https://github.com/iBaa/PlexConnect/wiki
inter-process-communication (queue): http://pymotw.com/2/multiprocessing/communication.html
"""
import sys, time
from os import sep
import socket
from multiprocessing import Process, Pipe
import signal, errno
from Vers... | mit | -6,980,175,735,864,880,000 | 23.843537 | 91 | 0.592278 | false | 3.573386 | false | false | false |
cfangmeier/UNL-Gantry-Encapsulation-Monitoring | Logs2JSON.py | 1 | 10923 | #!/usr/bin/env python3
import io
import re
import json
import pydoc
import zipfile
import traceback
import argparse
import collections
from datetime import datetime
import urllib.request as request
from itertools import count
Vec3d = collections.namedtuple('Vec3d', 'x,y,z')
Orient3d = collections.namedtuple('Orient3d'... | mit | 165,149,412,829,744,670 | 35.654362 | 79 | 0.483017 | false | 3.639787 | false | false | false |
philgyford/django-spectator | spectator/events/migrations/0042_auto_20200407_1039.py | 1 | 1302 | # Generated by Django 3.0.5 on 2020-04-07 10:39
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("spectator_events", "0041_event_ticket"),
]
operations = [
migrations.AlterField(
model_name="venue... | mit | -8,364,434,065,121,548,000 | 31.55 | 131 | 0.490015 | false | 4.133333 | false | false | false |
spotify/cobbler | koan/app.py | 1 | 71889 | """
koan = kickstart over a network
a tool for network provisioning of virtualization (xen,kvm/qemu,vmware)
and network re-provisioning of existing Linux systems.
used with 'cobbler'. see manpage for usage.
Copyright 2006-2008 Red Hat, Inc and Others.
Michael DeHaan <michael.dehaan AT gmail>
This program is free s... | gpl-2.0 | -3,040,904,404,183,310,000 | 38.412829 | 161 | 0.508103 | false | 4.255298 | true | false | false |
Lazar-T/conference-crawler | openStack/spiders/openStackSpider.py | 1 | 2023 | # -*- coding: utf-8 -*-
import urlparse
from scrapy.http import Request
from scrapy.loader import ItemLoader
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from scrapy.loader.processors import Compose, MapCompose
from w3lib.html import replace_escape_chars, remove_tags
fr... | mit | 6,775,172,230,990,549,000 | 37.903846 | 93 | 0.659911 | false | 3.549123 | false | false | false |
ClaudioNahmad/Servicio-Social | Parametros/CosmoMC/CosmoMC-master/python/deleteJobs.py | 1 | 1785 | from __future__ import absolute_import
from __future__ import print_function
import subprocess
from paramgrid import batchjob_args, jobqueue
Opts = batchjob_args.batchArgs('Delete running or queued jobs', importance=True, batchPathOptional=True)
group = Opts.parser.add_mutually_exclusive_group()
group.add_argument('-... | gpl-3.0 | -3,567,789,519,922,405,400 | 43.625 | 112 | 0.716527 | false | 3.348968 | false | false | false |
benpicco/mate-deskbar-applet | deskbar/ui/cuemiac/CuemiacEntry.py | 1 | 5439 | import gobject
import gtk
import deskbar.ui.iconentry
# Make epydoc document signal
__extra_epydoc_fields__ = [('signal', 'Signals')]
class CuemiacEntry (deskbar.ui.iconentry.IconEntry):
"""
For all outside purposes this widget should appear to be a gtk.Entry
with an icon inside it. Use it as such - if y... | gpl-2.0 | 1,979,936,256,918,578,700 | 36.253425 | 110 | 0.58963 | false | 3.816842 | false | false | false |
Uli1/mapnik | scons/scons-local-2.4.0/SCons/Tool/packaging/tarbz2.py | 1 | 1780 | """SCons.Tool.Packaging.tarbz2
The tarbz2 SRC packager.
"""
#
# Copyright (c) 2001 - 2015 The SCons Foundation
#
# 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, includ... | lgpl-2.1 | -4,742,350,656,658,062,000 | 39.454545 | 115 | 0.754494 | false | 3.692946 | false | false | false |
GitYiheng/reinforcement_learning_test | test00_previous_files/mountaincar_q_learning.py | 1 | 4304 | import gym
import os
import sys
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from gym import wrappers
from datetime import datetime
from sklearn.pipeline import FeatureUnion
from sklearn.preprocessing import StandardScaler
from sklearn.kernel_approximation... | mit | 8,215,012,395,460,675,000 | 29.316901 | 104 | 0.702602 | false | 2.859801 | false | false | false |
TOTVS/mdmpublic | couchbase-cli/lib/python/pysnappy2/snappy_cffi.py | 1 | 7457 | import sys
from cffi import FFI
if sys.hexversion > 0x03000000:
unicode = str
ffi = FFI()
ffi.cdef('''
typedef enum {
SNAPPY_OK = 0,
SNAPPY_INVALID_INPUT = 1,
SNAPPY_BUFFER_TOO_SMALL = 2
} snappy_status;
typedef uint32_t crc_t;
int snappy_compress(const char* input,
size_t input_leng... | bsd-2-clause | -6,329,586,353,257,445,000 | 28.243137 | 78 | 0.670913 | false | 2.25151 | false | false | false |
fracpete/wekamooc | moredataminingwithweka/class-4.2.py | 1 | 2966 | # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | 8,800,521,282,337,979,000 | 36.075 | 102 | 0.708699 | false | 3.569194 | false | false | false |
aemerick/galaxy_analysis | particle_analysis/sn_rate.py | 1 | 9054 | #import yt.mods as yt
import yt
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import glob
__all__ = ['future_snr', 'snr']
_core_collapse_labels = ["SNII", "II", "2", "SN_II", "TypeII", "Type 2",
"Type II", "type II", "typeII", 'core collapse']
_... | mit | -6,070,210,651,879,594,000 | 35.955102 | 140 | 0.594765 | false | 3.077498 | false | false | false |
spacy-io/sense2vec | bin/cythonize.py | 1 | 6170 | #!/usr/bin/env python
""" cythonize
Cythonize pyx files into C files as needed.
Usage: cythonize [root_dir]
Default [root_dir] is 'spacy'.
Checks pyx files to see if they have been changed relative to their
corresponding C files. If they have, then runs cython on these files to
recreate the C files.
The script th... | mit | -7,298,232,426,281,872,000 | 30.01005 | 107 | 0.602431 | false | 3.642267 | false | false | false |
jeremiah-c-leary/vhdl-style-guide | vsg/rules/single_space_before_token.py | 1 | 1995 |
from vsg import parser
from vsg import rule
from vsg import violation
from vsg.rules import utils as rules_utils
class single_space_before_token(rule.Rule):
'''
Checks for a single space between two tokens.
Parameters
----------
name : string
The group the rule belongs to.
identifi... | gpl-3.0 | 6,567,652,907,927,217,000 | 32.813559 | 88 | 0.59198 | false | 3.807252 | false | false | false |
joshrule/LOTlib | LOTlib/Hypotheses/Proposers/RegenerationProposal.py | 1 | 1997 |
"""Regenerate proposals - chooses a node of type X and replaces it
with a newly sampled value of type X.
"""
from LOTlib.BVRuleContextManager import BVRuleContextManager
from LOTlib.FunctionNode import FunctionNode, NodeSamplingException
from LOTlib.Hypotheses.Proposers import ProposalFailedException
from LOTlib.Mis... | gpl-3.0 | -8,992,234,683,923,649,000 | 37.403846 | 122 | 0.696044 | false | 3.657509 | false | false | false |
AdamWill/bodhi | bodhi/server/services/packages.py | 1 | 2320 | # 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 distributed in the hope that it will be useful,
# bu... | gpl-2.0 | -6,014,736,767,507,379,000 | 34.151515 | 81 | 0.673276 | false | 3.815789 | false | false | false |
oscarforri/WebServices_Json | server.py | 1 | 3555 | #!flask/bin/python
from flask import Flask, jsonify, abort, make_response, request
from resources import posts, todos, comments, albums, photos, users
app = Flask(__name__)
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
@app.errorhandler(400)
def bad_requ... | gpl-3.0 | -146,195,189,189,963,100 | 27.902439 | 117 | 0.603657 | false | 3.185484 | false | false | false |
iglpdc/dmrg_helpers | scripts/append_metadata_from_xml.py | 1 | 2434 | #!/usr/bin/env python
"""Appends metadata to estimators files reading from input xml files.
The current version of the DMRG does not include any metadata into the
estimator files. Metadata are comment lines that have information about the run
the estimator was obtained from, such as the value of the Hamiltonian
parame... | mit | -7,388,700,737,663,430,000 | 37.634921 | 79 | 0.732128 | false | 3.643713 | false | false | false |
metamath/set.mm | scripts/iset-match.py | 1 | 1795 | #!/usr/bin/env python3
# iset-match.py: Report where iset.mm statements differ from set.mm.
# Author: David A. Wheeler
# SPDX-License-Identifier: MIT
import os,re
# Generate list of statements in set.mm and iset.mm.
os.system("metamath 'read set.mm' 'set width 9999' 'show statement *' quit > ,set-mm-statements")
os.s... | cc0-1.0 | 8,621,906,787,565,850,000 | 29.948276 | 99 | 0.640111 | false | 2.991667 | false | false | false |
SlicerRt/SlicerDebuggingTools | PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/_local.py | 1 | 4791 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
import sys
import time
import pydevd
from _pydevd_bundle.pydevd_comm import get_global_debugger
from ptvsd.pydevd_hooks import install
from ptvsd.runner ... | bsd-3-clause | -6,504,013,464,289,144,000 | 31.503497 | 77 | 0.594448 | false | 3.640578 | false | false | false |
saisankargochhayat/algo_quest | leetcode/1423. Maximum Points You Can Obtain from Cards/soln.py | 1 | 1199 | # Get prefix sum array, find n-k window for which n-k is minimum.
class Solution:
def maxScore(self, cardPoints: List[int], k: int) -> int:
n = len(cardPoints)
pSum = [0] * n
pSum[0] = cardPoints[0]
for i in range(1, n):
pSum[i] = cardPoints[i] + pSum[i-1]
... | apache-2.0 | -272,638,181,483,588,160 | 32.305556 | 76 | 0.527106 | false | 3.30303 | false | false | false |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/creation.py | 1 | 1903 | """
Boolean geometry utilities.
"""
from __future__ import absolute_import
from fabmetheus_utilities.geometry.geometry_utilities import evaluate
from fabmetheus_utilities import archive
__author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__credits__ = 'Art of Illusion <http://www.artofillusion.org/>'
__date__ =... | agpl-3.0 | 4,311,426,377,472,465,400 | 32.982143 | 108 | 0.76721 | false | 3.604167 | false | false | false |
gppg1994/Machine_Learning | Mail_Check/Main.py | 1 | 1521 | '''This automation helps you to automatically sign in to yahoo mail
without a single mouse/keyboard stroke. To run this piece of code successfully,
you need to have an existing yahoo account'''
from selenium import webdriver
import time
from Configure import Configure
def if_exists(idstr):
try:
el... | gpl-3.0 | -900,942,733,077,118,500 | 27.823529 | 80 | 0.610125 | false | 3.578824 | true | false | false |
ulfalizer/Kconfiglib | examples/find_symbol.py | 1 | 3437 | # Prints all menu nodes that reference a given symbol any of their properties
# or property conditions, along with their parent menu nodes.
#
# Usage:
#
# $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/examples/find_symbol.py SCRIPT_ARG=<name>
#
# Example output for SCRIPT_ARG=X86:
#
# Found 470 locations that... | isc | 8,374,800,690,160,126,000 | 29.6875 | 97 | 0.629328 | false | 3.242453 | true | false | false |
LazoCoder/Pokemon-Terminal | tests/test_broken.py | 1 | 1183 | #!/usr/bin/env python3
# To run the tests, use: python3 -m pytest --capture=sys
from pokemonterminal.database import Database
from tests.test_utils import expected_len
def broken_test_extra_length(region_name='extra'):
assert len(Database().get_extra()) == expected_len(region_name)
def broken_test_kanto_lengt... | gpl-3.0 | 5,885,401,772,013,508,000 | 29.333333 | 68 | 0.710904 | false | 3.154667 | true | false | false |
CFIS-Octarine/octarine | src/daomop/wcs.py | 1 | 12869 | import warnings
from copy import deepcopy
from astropy.units import Quantity
import math
from astropy import wcs as astropy_wcs
from astropy import units
import numpy
import logging
__author__ = "David Rusk <drusk@uvic.ca>"
PI180 = 57.2957795130823208767981548141052
class WCS(astropy_wcs.WCS):
def __init__(self, ... | gpl-3.0 | 2,123,899,054,085,605,400 | 26.794816 | 93 | 0.477737 | false | 3.264587 | false | false | false |
mosra/m.css | plugins/m/link.py | 1 | 2187 | #
# This file is part of m.css.
#
# Copyright © 2017, 2018, 2019, 2020 Vladimír Vondruš <mosra@centrum.cz>
#
# 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, inc... | mit | -436,906,536,956,411,650 | 38.709091 | 78 | 0.722527 | false | 3.682968 | false | false | false |
dagwieers/ansible | lib/ansible/modules/cloud/google/gcp_storage_bucket.py | 1 | 44498 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 | -5,727,255,997,407,053,000 | 34.120758 | 151 | 0.593802 | false | 4.429866 | false | false | false |
ContributeToScience/participant-booking-app | booking/core/ip2geo/__init__.py | 1 | 10628 | import math
import mmap
import gzip
import os
import codecs
import pytz
import const
from util import ip2long
from timezone import time_zone_by_country_and_region
MMAP_CACHE = const.MMAP_CACHE
MEMORY_CACHE = const.MEMORY_CACHE
STANDARD = const.STANDARD
class GeoIPError(Exception):
pass
class GeoIPMetaclass(t... | gpl-2.0 | -1,734,714,524,999,281,000 | 31.604294 | 117 | 0.5414 | false | 4.070471 | false | false | false |
afein/docker-microservice | service/service.py | 1 | 3362 | from flask import Flask, request, abort
import os
import time
import random
import requests
app = Flask("microservice")
service_name = os.environ["SERVICE_NAME"]
log = open("/var/log/micro/" + service_name + ".log", "w+")
requestID_counter = 1
def busy_wait(seconds):
dt = time.strptime(str(seconds), "%S")
... | apache-2.0 | -9,102,237,164,221,150,000 | 28.491228 | 91 | 0.516359 | false | 3.918415 | false | false | false |
clems71/pogle | pyassimp/structs.py | 1 | 34579 | #-*- coding: UTF-8 -*-
from ctypes import POINTER, c_void_p, c_int, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte, c_size_t, c_uint32
class Vector2D(Structure):
"""
See 'aiVector2D.h' for details.
"""
_fields_ = [
("x", c_float),("y", c_float),
]
class Matrix... | mit | -883,316,027,591,678,700 | 37.027503 | 128 | 0.541109 | false | 4.367138 | false | false | false |
gzamboni/sdnResilience | loxi/of11/action.py | 1 | 47031 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
# Copyright (c) 2011, 2012 Open Networking Foundation
# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
# See the file LICENSE.pyloxi which should have been included in the source distribution
# Automatically generated by LOXI from ... | gpl-2.0 | 5,950,182,360,299,091,000 | 27.297834 | 88 | 0.512534 | false | 3.57759 | false | false | false |
jakeharding/repo-health | repo_health/gh_issues/serializers/GhIssueStatsSerializer.py | 1 | 4835 | """
GhIssueStatsSerializer.py - (C) Copyright - 2017
This software is copyrighted to contributors listed in CONTRIBUTIONS.md.
SPDX-License-Identifier: MIT
Author(s) of this file:
J. Harding
Serializer for issue stats of a GitHub repo.
"""
import datetime
from rest_framework import serializers as s
from ..models i... | mit | -7,466,337,894,348,510,000 | 41.052174 | 132 | 0.658945 | false | 3.704981 | false | false | false |
wanghongjuan/crosswalk-test-suite | misc/sampleapp-android-tests/sampleapp/webgl_uninstall.py | 1 | 2600 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | bsd-3-clause | 6,075,899,156,710,533,000 | 43.067797 | 108 | 0.693077 | false | 4.0625 | true | false | false |
yhilpisch/dx | dx/plot.py | 1 | 5805 | #
# DX Analytics
# Helper Function for Plotting
# dx_plot.py
#
# DX Analytics is a financial analytics library, mainly for
# derviatives modeling and pricing by Monte Carlo simulation
#
# (c) Dr. Yves J. Hilpisch
# The Python Quants GmbH
#
# This program is free software: you can redistribute it and/or modify
# it unde... | agpl-3.0 | -1,432,545,182,039,051,300 | 30.042781 | 79 | 0.604134 | false | 3.151466 | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/range.py | 1 | 1470 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Range) on 2019-05-07.
# 2019, SMART Health IT.
from . import element
class Range(element.Element):
""" Set of values bounded by low and high.
A set of ordered Quantities defi... | bsd-3-clause | 917,025,002,437,808,800 | 29 | 102 | 0.6 | false | 4.016393 | false | false | false |
ging/python-keystoneclient | keystoneclient/auth/identity/v3.py | 1 | 13078 | # 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 | -5,012,167,486,128,561,000 | 38.391566 | 79 | 0.61829 | false | 4.436228 | false | false | false |
TheGoldLab/Lab-Matlab-Control | modularTasks/utilities/readPupilLabsData.py | 1 | 1388 | import sys
import scipy.io as scpy
import numpy as np
import msgpack
from file_methods import *
#Python Script to read Eye Data, extract desired information and then create a .mat structure where rows are times, columns are:
# 1. timestamp
# 2. gaze x
# 3. gaze y
# 4. confidence
#input:
#... | apache-2.0 | -4,823,258,720,058,868,000 | 32.071429 | 128 | 0.608069 | false | 2.897704 | false | false | false |
jgeewax/googlepersonfinder | app/photo.py | 1 | 1131 | #!/usr/bin/python2.5
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 5,566,294,216,070,481,000 | 32.264706 | 74 | 0.71176 | false | 3.757475 | false | false | false |
AdrianGaudebert/elmo | lib/auth/backends.py | 1 | 9276 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import ldap
from ldap.filter import filter_format
from django.conf import settings
from django.contrib.auth.models impor... | mpl-2.0 | -8,468,056,727,729,221,000 | 34.953488 | 79 | 0.559077 | false | 4.204896 | false | false | false |
ambyte/Vertaler | src/modules/httprequest.py | 1 | 1619 | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright (c) 2011 Sergey Gulyaev <astraway@gmail.com>
#
# This file is part of Vertaler.
#
# Vertaler is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | gpl-2.0 | -4,815,225,284,546,109,000 | 41.631579 | 118 | 0.64546 | false | 4.340483 | true | false | false |
Railk/T3S | Typescript.py | 1 | 23768 | # coding=utf8
import sublime
import sublime_plugin
from queue import Queue
from threading import Thread
from subprocess import Popen, PIPE
import subprocess
import os
import json
import re
import sys
# --------------------------------------- CONSTANT -------------------------------------- #
dirname = os.path.dirnam... | mit | 4,896,523,224,958,104,000 | 25.310421 | 161 | 0.64491 | false | 2.959102 | false | false | false |
fsquillace/pycious | tests/rc.py | 1 | 2263 | #!/usr/bin/python
from __future__ import division
from pycious.widgets.system import BatteryTextWidget, DateTextWidget, CPUGraphWidget
from pycious.widgets.web import MailTextWidget, GrssTextWidget
from pycious.api.timer import Timer
from pycious.api.widget import ImageBoxWidget
if __name__ == "__main__":
# ... | gpl-2.0 | 4,042,621,580,200,080,400 | 32.294118 | 84 | 0.526734 | false | 3.956294 | false | true | false |
barneygale/barneymc | barneymc/protocol/packet.py | 1 | 1741 | from time import gmtime, strftime
from data_types import *
from packet_structs import *
import packet_extensions
class Packet:
def __init__(self, **kargs):
self.ident = kargs.get('ident', 0)
self.direction = kargs.get('direction', CLIENT_TO_SERVER)
self.data = kargs.get('data', {}... | mit | -6,908,231,330,771,204,000 | 31.240741 | 106 | 0.569787 | false | 3.784783 | false | false | false |
openaid-IATI/OIPA | OIPA/api/codelist/views.py | 1 | 4510 | from django.apps import apps
from django.core.exceptions import FieldError
from rest_framework.exceptions import NotFound
from rest_framework.filters import OrderingFilter
from rest_framework_extensions.cache.mixins import CacheResponseMixin
from api.codelist.filters import AllDjangoFilterBackend
from api.codelist.ser... | agpl-3.0 | -3,173,719,476,157,136,400 | 29.680272 | 78 | 0.64745 | false | 4.107468 | false | false | false |
sfu-fas/coursys | oldcode/management/commands/crim_import.py | 1 | 5753 | from django.core.management.base import BaseCommand
from django.db import transaction
from django.core.files import File
from optparse import make_option
import csv
import datetime
import os.path
import mimetypes
from advisornotes.models import AdvisorNote
from coredata.models import Person, Unit
from coredata.queries... | gpl-3.0 | 9,127,078,747,302,222,000 | 34.085366 | 114 | 0.566661 | false | 3.792353 | false | false | false |
aligoren/pyalgo | evolutionary_algo.py | 1 | 1389 | from string import letters
from random import choice, random
target = list("METHINKS IT IS LIKE A WEASEL")
charset = letters + ' '
parent = [choice(charset) for _ in range(len(target))]
minmutaterate = .09
C = range(100)
perfectfitness = float(len(target))
def fitness(trial):
'Sum of matching chars by positio... | mit | 556,866,754,575,191,800 | 28.553191 | 88 | 0.637869 | false | 3.121348 | false | false | false |
aykut/django-oscar | oscar/apps/product/reviews/abstract_models.py | 1 | 5476 | from django.db import models
from django.utils.translation import gettext as _
from django.core.urlresolvers import reverse
from django.core.exceptions import ValidationError
from django.conf import settings
from django.db.models import Sum, Count
from oscar.apps.product.reviews.managers import (ApprovedReviewsManage... | bsd-3-clause | -6,377,473,219,612,442,000 | 38.395683 | 109 | 0.643718 | false | 3.956647 | false | false | false |
mozilla/kitchensinkserver | kitchensink/device/models.py | 1 | 1115 | """
device.models
-------------
"""
import logging
from django.db import models
from kitchensink.base.models import BaseModel
from kitchensink.device.managers import MakeManager
_log = logging.getLogger('kss.%s' % __name__)
class Make(BaseModel):
""" Which company made the device (i.e. LG)
"""
objects ... | bsd-3-clause | 6,497,167,644,692,732,000 | 20.037736 | 68 | 0.610762 | false | 3.667763 | false | false | false |
dwavesystems/dimod | dimod/sampleset.py | 1 | 63014 | # Copyright 2018 D-Wave Systems 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... | apache-2.0 | 2,160,505,098,050,896,100 | 36.86899 | 132 | 0.521233 | false | 4.271846 | false | false | false |
upconsulting/IsisCB | isiscb/isisdata/migrations/0076_auto_20180601_1948.py | 1 | 7720 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-06-01 19:48
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_depend... | mit | 1,103,525,495,658,646,800 | 57.484848 | 210 | 0.605829 | false | 3.858071 | false | false | false |
jobscry/vz-wiki | vz_wiki/admin.py | 1 | 1672 | from django.contrib import admin
from models import WikiPage, Revision, Comparison
def latest_revision_display(obj):
latest_revision = obj.latest_revision()
if latest_revision is None:
return '0'
return u'%s' % latest_revision.number
latest_revision_display.short_description = 'Version'
def who_... | mit | -6,895,925,225,505,879,000 | 29.962963 | 76 | 0.73445 | false | 3.542373 | true | false | false |
xSAVIKx/PRESENT-cipher | gmac/util/galue_fields.py | 1 | 3561 | # Author: Joao H de A Franco (jhafranco@acm.org)
#
# Description: Binary finite field multiplication in Python 3
#
# Date: 2012-02-16
#
# License: Attribution-NonCommercial-ShareAlike 3.0 Unported
# (CC BY-NC-SA 3.0)
# ===========================================================
from functools import reduce
# ... | apache-2.0 | 7,770,864,948,732,986,000 | 28.92437 | 89 | 0.505757 | false | 2.722477 | false | false | false |
penguintutor/networking-quiz | src/quizapp.py | 1 | 12224 | # This uses the dev branch of guizero which needs to be linked to the appropriate
# directory - in future this will use the normal production version of guizero
from guizero.build.lib.guizero import App, Text, PushButton, info, MenuBar, Picture, yesno
import quizdetails
# For testing the gui without the arduino comme... | gpl-3.0 | 7,559,067,779,343,305,000 | 39.343234 | 151 | 0.590396 | false | 3.632689 | false | false | false |
cellular-nanoscience/pyotic | pyoti/modification/modification.py | 1 | 26859 | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 12 14:22:31 2016
@author: Tobias Jachowski
"""
import collections
import matplotlib.pyplot as plt
import numpy as np
from abc import ABCMeta, abstractmethod
from .. import gui
from .. import helpers as hp
from .. import traces as tc
from ..evaluate import signal as sn
fr... | apache-2.0 | -1,852,494,407,888,080,000 | 37.757576 | 82 | 0.601102 | false | 4.551601 | false | false | false |
dougbenjamin/panda-harvester | pandaharvester/harvestermisc/apfmon.py | 1 | 16445 | """
API described here: http://apfmon.lancs.ac.uk/help
"""
import requests
import json
import time
import traceback
from pandaharvester.harvesterconfig import harvester_config
from pandaharvester.harvestercore import core_utils
from pandaharvester import panda_pkg_info
from pandaharvester.harvestermisc import generic... | apache-2.0 | 1,477,390,547,732,146,700 | 38.24821 | 272 | 0.515172 | false | 4.048498 | true | false | false |
kipe/miplant | miplant/miplant.py | 1 | 4030 | # -*- encoding: utf-8 -*-
from bluepy import btle
import logging
from math import isnan
class MiPlant(object):
def __init__(self, address, interface_index=0):
'''
Initializes the MiPlant -object.
Parameters
----------
address : string
The MAC-address of the dev... | mit | -1,960,080,027,998,492,200 | 30.724409 | 155 | 0.573591 | false | 4.17513 | false | false | false |
monikagrabowska/osf.io | kinto/kinto/core/errors.py | 1 | 7950 | import six
from pyramid import httpexceptions
from enum import Enum
from kinto.core.logs import logger
from kinto.core.utils import json, reapply_cors, encode_header
class ERRORS(Enum):
"""Predefined errors as specified by the API.
+-------------+-------+------------------------------------------------+
... | apache-2.0 | -8,970,654,734,963,827,000 | 40.19171 | 84 | 0.470189 | false | 4.86834 | false | false | false |
apophys/freeipa | ipatests/test_ipapython/test_session_storage.py | 1 | 1069 | #
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
#
"""
Test the `session_storage.py` module.
"""
import pytest
from ipapython import session_storage
@pytest.mark.skip_ipaclient_unittest
@pytest.mark.needs_ipaapi
class test_session_storage(object):
"""
Test the session storage interface
... | gpl-3.0 | 8,177,739,086,821,916,000 | 25.725 | 71 | 0.638915 | false | 3.493464 | true | false | false |
natukikazemizo/sedna | Sedna/src/python/recasting/grep_object.py | 1 | 5780 | #!BPY
# -*- coding: UTF-8 -*-
# Set IK Limits
#
# 2016.01.17 Natukikazemizo
import bpy
import math
import re
# Using Regular expression
#"[0]" 1文字が0
#"[0-9]" 1文字が0,1,2,3,4,5,6,7,8,9のいずれか
#"[02468]" 1文字が偶数
#"[BCD]" 1文字がB,C,Dのいずれか
#"[B-D]" 1文字がB,C,Dのいずれか
#"[0-2A-C]" 1文字が0,1,2,A,B,Cのいずれか
#"[^12]" 1文字が1,2以外
#"\w" 1文字が英数字
... | mit | 7,223,568,034,813,345,000 | 27.887218 | 117 | 0.598126 | false | 1.519778 | false | false | false |
citrix-openstack/nodepool | nodepool/provider_manager.py | 1 | 22543 | #!/usr/bin/env python
# Copyright (C) 2011-2013 OpenStack Foundation
#
# 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 ... | apache-2.0 | 4,222,597,944,849,373,000 | 35.418417 | 79 | 0.576764 | false | 4.191707 | false | false | false |
a10networks/acos-client | acos_client/v30/slb/virtual_server.py | 1 | 5582 | # Copyright 2014-2016, A10 Networks.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -5,504,389,639,245,075,000 | 48.839286 | 115 | 0.626478 | false | 4.056686 | false | false | false |
tumluliu/tracks-rest-api | tracksdb.py | 1 | 3636 | """
ORM definitions for mapping tracks data stored in PostgreSQL database
"""
from sqlalchemy import create_engine, Column, Integer, Float, String
from sqlalchemy.dialects.postgresql import INTERVAL, TIMESTAMP
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_ba... | mit | -7,546,321,651,937,122,000 | 37.680851 | 80 | 0.637514 | false | 3.540409 | false | false | false |
fabiking/plugin.video.fabiking | resources/tools/epg_formulatv.py | 1 | 24493 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# PalcoTV EPG FórmulaTV.com
# License: GPL (http://www.gnu.org/licenses/gpl-3.0.html)
#------------------------------------------------------------
# Gracias a la librería plugintools de Jesús (www.mimediacenter.info)
#---------------... | gpl-2.0 | -6,917,189,217,825,973,000 | 41.670157 | 336 | 0.590798 | false | 3.381275 | false | false | false |
raulperula/python_tutorials | tutorial-pygame/src/example18.py | 1 | 2277 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.utils.termcolors import background
__author__ = "Raul Perula-Martinez"
__date__ = "2015-01"
__version__ = "$ Revision: 1.0 $"
import pygame
class Player(pygame.sprite.Sprite):
def __init__(self, image):
self.image = image
self.rect = sel... | gpl-3.0 | -8,708,156,146,956,355,000 | 24.021978 | 57 | 0.515591 | false | 3.631579 | false | false | false |
jelly/calibre | src/calibre/ebooks/oeb/reader.py | 1 | 28670 | """
Container-/OPF-based input OEBBook reader.
"""
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>'
import sys, os, uuid, copy, re, cStringIO
from itertools import izip
from urlparse import urldefrag, urlparse
from urllib import unquote ... | gpl-3.0 | -4,345,886,397,232,031,000 | 38.599448 | 99 | 0.518242 | false | 3.904931 | false | false | false |
openstack/tooz | tooz/partitioner.py | 1 | 3970 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 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 r... | apache-2.0 | -8,275,849,643,799,480,000 | 39.927835 | 78 | 0.631234 | false | 4.034553 | false | false | false |
thinkopensolutions/tkobr-addons | tko_br_delivery_sale_stock/models/sale.py | 1 | 1879 |
from odoo import models, api, _
from odoo.exceptions import UserError
class SaleOrder(models.Model):
_inherit ='sale.order'
# do not create delivery line but set the value in total_frete
@api.multi
def delivery_set(self):
# Remove delivery products from the sale order
self._delivery_... | agpl-3.0 | -3,344,389,447,532,597,000 | 42.697674 | 110 | 0.566791 | false | 4.31954 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.