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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GiulioRossetti/ndlib | ndlib/models/dynamic/DynKerteszThresholdModel.py | 1 | 5263 | from ..DynamicDiffusionModel import DynamicDiffusionModel
import numpy as np
import networkx as nx
import future.utils
from scipy import stats
__author__ = "Letizia Milli"
__license__ = "BSD-2-Clause"
__email__ = "letizia.milli@isti.cnr.it"
class DynKerteszThresholdModel(DynamicDiffusionModel):
"""
... | bsd-2-clause | 4,391,935,727,741,786,000 | 36.870504 | 109 | 0.462854 | false | 4.66992 | false | false | false |
yanheven/ali-opensearch-sdk | opensearchsdk/client.py | 1 | 1243 | # -*- encoding: utf-8 -*-
"""
opensearch python sdk client.
"""
from opensearchsdk.apiclient import api_base
from opensearchsdk.v2 import app
from opensearchsdk.v2 import data
from opensearchsdk.v2 import search
from opensearchsdk.v2 import suggest
from opensearchsdk.v2 import index
from opensearchsdk.v2 import quota
f... | apache-2.0 | -6,480,389,077,498,145,000 | 30.075 | 64 | 0.679807 | false | 3.179028 | false | false | false |
usc-isi-i2/etk | etk/knowledge_graph/namespacemanager.py | 1 | 5476 | import re
from typing import Optional, Union
import rdflib.namespace
from rdflib.namespace import Namespace, OWL, RDF, XSD
from rdflib import URIRef
import warnings
from etk.etk_exceptions import WrongFormatURIException, PrefixNotFoundException, PrefixAlreadyUsedException
from etk.etk_exceptions import SplitURIWithUnkn... | mit | -873,871,421,257,443,200 | 38.114286 | 120 | 0.600073 | false | 4.235112 | false | false | false |
haggi/mayaToCommon | python/renderer/osltools.py | 1 | 15495 | import path
import logging
import subprocess
import pymel.core as pm
import os
import shutil
import sys
import xml.etree.cElementTree as ET
import xml.dom.minidom as minidom
#from test.badsyntax_future3 import result
#global shader dictionary
SHADER_DICT = {}
log = logging.getLogger("renderLogger")
def compileOSLSha... | mit | 8,010,389,929,872,782,000 | 41.68595 | 166 | 0.557728 | false | 3.990471 | false | false | false |
qbuat/rootpy | benchmarks/tree/io/tree_write.py | 1 | 1634 | #!/usr/bin/env python
from rootpy.tree import Tree, TreeModel
from rootpy.io import root_open
from rootpy.types import FloatCol, ObjectCol
from rootpy.math.physics.vector import LorentzVector
from random import gauss, randint
import ROOT
f = root_open("test.root", "recreate")
# define the model
class Event(TreeMode... | gpl-3.0 | 6,959,599,886,263,334,000 | 24.138462 | 52 | 0.584455 | false | 2.998165 | false | false | false |
reimandlab/Visualisation-Framework-for-Genome-Mutations | website/views/mutation.py | 1 | 1795 | from flask import render_template as template
from flask_classful import FlaskView
from flask_login import current_user
from models import Protein
from models import Mutation
from database import get_or_create
class MutationView(FlaskView):
def show(self, refseq, position, alt):
protein = Protein.query.... | lgpl-2.1 | 8,244,506,505,683,201,000 | 28.42623 | 79 | 0.558217 | false | 4.521411 | false | false | false |
manueldl/retrosmart-openbox-themes | src/mkobt.py | 1 | 8268 | #!/usr/bin/env python3
# mkobt --light white --dark black --active blue --inactive darkgrey
# --box grey --notify yellow --menu orange -w red
import configparser
import os
import argparse
def get_config(configfile):
''' Get config from config file. Overwrited by command line options. '''
# FIXME: Need to val... | gpl-3.0 | -32,108,374,974,227,184 | 32.204819 | 83 | 0.623609 | false | 3.406675 | true | false | false |
qilicun/python | python2/PyMOTW-1.132/PyMOTW/copy/copy_deep.py | 1 | 1504 | #!/usr/bin/env python
#
# Copyright 2007 Doug Hellmann.
#
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and tha... | gpl-3.0 | 8,389,593,776,071,244,000 | 29.08 | 70 | 0.699468 | false | 3.522248 | false | false | false |
deepsound-project/samplernn-pytorch | trainer/__init__.py | 1 | 3211 | import torch
from torch.autograd import Variable
import heapq
# Based on torch.utils.trainer.Trainer code.
# Allows multiple inputs to the model, not all need to be Tensors.
class Trainer(object):
def __init__(self, model, criterion, optimizer, dataset, cuda=False):
self.model = model
self.crite... | mit | 8,735,711,560,593,110,000 | 31.11 | 76 | 0.524136 | false | 4.321669 | false | false | false |
dunnette/st-gae | ST_Ingestor.py | 1 | 10028 | from google.transit import gtfs_realtime_pb2
import urllib
import datetime
import time
import zipfile
import StringIO
import csv
import sqlite3
class Ingestor:
_endpoint_url = 'http://datamine.mta.info/mta_esi.php'
_static_data_url = 'http://web.mta.info/developers/data/nyct/subway/google_transit.zip'
_... | apache-2.0 | -2,361,568,920,494,936,600 | 61.291925 | 202 | 0.525927 | false | 3.201788 | false | false | false |
Proteus-tech/nikola | nikola/plugins/command/console.py | 1 | 3918 | # -*- coding: utf-8 -*-
# Copyright © 2012-2013 Roberto Alsina and others.
# 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 t... | mit | -2,686,168,264,356,726,000 | 34.609091 | 124 | 0.615267 | false | 4.396184 | false | false | false |
paulscherrerinstitute/pyscan | tests/helpers/epics_test_server.py | 1 | 1979 | from threading import Thread
from time import sleep
from pcaspy import Driver, SimpleServer
class MotorTestDriver(Driver):
prefix = 'PYSCAN:TEST:'
pvdb = {
'MOTOR1:SET': {},
'MOTOR1:GET': {},
'MOTOR2:SET': {},
'MOTOR2:GET': {},
'MOTOR:PRE1:SET': {},
'MOTOR:PRE1... | gpl-3.0 | 7,085,164,592,644,586,000 | 26.109589 | 76 | 0.562911 | false | 3.705993 | false | false | false |
mizzy/maglica | maglica/virt.py | 1 | 6798 | import libvirt
import maglica.config
from xml.etree.ElementTree import *
import subprocess
class Virt:
def __init__(self, hosts=[{"name": "test", "weight": 1}]):
self.hosts = []
self.conf = {}
for host in hosts:
if host["name"] == "test":
uri = "test:///default... | bsd-2-clause | -7,884,297,534,597,810,000 | 28.301724 | 79 | 0.497499 | false | 4.024867 | false | false | false |
kodi-czsk/plugin.video.markiza.sk | default.py | 1 | 1688 | # -*- coding: UTF-8 -*-
#/*
# * Copyright (C) 2013 Maros Ondrasek
# *
# *
# * 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, or (at your option)
# * any later versi... | gpl-2.0 | -3,396,649,888,943,652,000 | 37.363636 | 135 | 0.704976 | false | 3.451943 | false | false | false |
daikk115/openstack_upgrade_test | python_script/cinder.py | 1 | 1919 | import json
from config import *
from utils import *
from get_auth import TOKEN, PROJECT_ID
# Create network
create_volume_url = "http://{}:8776/v2/{}/volumes".format(IP, PROJECT_ID)
token_headers = {
'X-Auth-Token': TOKEN,
'Content-Type': 'application/json'
}
# Get network for DELETE
get_list_url = create_v... | mit | -7,918,150,234,920,109,000 | 32.086207 | 99 | 0.563835 | false | 3.527574 | false | false | false |
ethantkoenig/fro | fro/_implementation/parser.py | 1 | 29302 | import io
from builtins import bytes, str
from fro._implementation import chompers
class Parser(object):
"""
An immutable parser.
"""
def __init__(self, chomper):
self._chomper = chomper
# public interface
def parse(self, lines, loud=True):
"""
Parse an iterable co... | mit | 1,714,660,193,398,273,500 | 38.121495 | 144 | 0.620538 | false | 4.083333 | false | false | false |
UmassJin/Leetcode | LintCode/Maximum Subarray II.py | 1 | 1321 | '''
Given an array of integers, find two non-overlapping subarrays which have the largest sum.
The number in each subarray should be contiguous.
Return the largest sum.
Have you met this question in a real interview? Yes
Example
For given [1, 3, -1, 2, -1, 2], the two subarrays are [1, 3] and [2, -1, 2] or [1, 3, -1... | mit | -8,938,331,880,923,857,000 | 27.106383 | 135 | 0.553369 | false | 3.378517 | false | false | false |
keflavich/pyspeckit-obsolete | pyspeckit/spectrum/models/lorentzian.py | 1 | 2204 | """
=================
Lorentzian Fitter
=================
"""
import numpy
from numpy.ma import median
from numpy import pi
from pyspeckit.mpfit import mpfit
from . import fitter
class LorentzianFitter(fitter.SimpleFitter):
def __init__(self,multisingle='multi'):
self.npars = 3
self.npeaks = 1
... | mit | 5,442,105,374,143,549,000 | 31.411765 | 106 | 0.548548 | false | 3.385561 | false | false | false |
rbuffat/pyidf | pyidf/zone_hvac_radiative.py | 1 | 277967 | """ Data objects in group "Zone HVAC Radiative"
"""
from collections import OrderedDict
import logging
from pyidf.helper import DataObject
logger = logging.getLogger("pyidf")
logger.addHandler(logging.NullHandler())
class ZoneHvacBaseboardRadiantConvectiveWater(DataObject):
""" Corresponds to IDD object `Zone... | apache-2.0 | 4,034,167,525,222,251,500 | 41.489606 | 122 | 0.483788 | false | 4.921861 | false | false | false |
mort11/SummerPyGames | sounds.py | 1 | 1681 |
import pygame,os
pygame.mixer.init()
class Sounds:
levelOnePath = "assets"+ os.sep + "levelonemusic.ogg"
levelTwoPath = "assets"+os.sep + "leveltwomusic.ogg"
levelThreePath = "assets"+ os.sep + "levelthreemusic.ogg"
bossPath = "assets"+ os.sep + "bossmusic.ogg"
levelOnePathExists = os.path.exists(levelOnePath)... | gpl-3.0 | -7,616,903,154,836,659,000 | 34.765957 | 83 | 0.738251 | false | 2.797005 | false | false | false |
Snegovikufa/HPGL-GUI | hpgl_run/ok_thread.py | 1 | 1761 | from geo_bsd import set_output_handler
from geo_bsd import set_progress_handler
from geo_bsd import ordinary_kriging
from PySide import QtCore
class OKThread(QtCore.QThread):
propSignal = QtCore.Signal(object)
logMessage = QtCore.Signal(str)
progressMessage = QtCore.Signal(int)
def __init__(self, Prop... | gpl-2.0 | 6,031,413,768,818,087,000 | 35.6875 | 89 | 0.626917 | false | 3.803456 | false | false | false |
evelynmitchell/smc | src/install.py | 1 | 3781 | #!/usr/bin/env python
import argparse, os, sys, time
SRC = os.path.split(os.path.realpath(__file__))[0]
def cmd(s):
t0 = time.time()
os.chdir(SRC)
s = "umask 022; " + s
print s
if os.system(s):
sys.exit(1)
print "TOTAL TIME: %.1f seconds"%(time.time() - t0)
def pull():
cmd("git pu... | gpl-3.0 | -2,563,759,346,312,329,000 | 39.223404 | 186 | 0.670722 | false | 3.468807 | false | false | false |
JohnKendrick/PDielec | Examples/Mie/MgO_lognormal/script.py | 1 | 2470 | #
# SettingsTab
#
tab = self.notebook.settingsTab
tab.settings['Eckart flag'] = False
tab.settings['Neutral Born charges'] = False
tab.settings['Sigma value'] = 5
tab.settings['Mass definition'] = 'program'
#
# 0th Scenario tabs
#
tab = self.notebook.scenarios[0]
tab.settings['Matrix'] = 'ptfe'
tab.settings['Mass or vo... | mit | -3,816,098,478,310,137,300 | 35.865672 | 119 | 0.632794 | false | 3.324361 | false | false | false |
alfa-addon/addon | plugin.video.alfa/lib/jsunpack.py | 1 | 6575 | # -*- coding: utf-8 -*-
"""
urlresolver XBMC Addon
Copyright (C) 2013 Bstrdsmkr
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 y... | gpl-3.0 | -5,109,073,872,867,415,000 | 33.744565 | 107 | 0.550418 | false | 3.681411 | false | false | false |
sussexstudent/falmer | falmer/content/migrations/0044_schemeindexpage_schemepage.py | 1 | 3058 | # Generated by Django 2.0.8 on 2018-09-28 11:23
from django.db import migrations, models
import django.db.models.deletion
import falmer.content.blocks
import wagtail.core.blocks
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0040_page_draft_title'),
... | mit | -2,090,710,673,239,123,000 | 62.708333 | 648 | 0.628842 | false | 3.950904 | false | false | false |
carpyncho/bmdiff | bmdiff.py | 1 | 5022 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
# =============================================================================
# DOCS
# =============================================================================
__doc__ = """Make band merges difference and union."""
__version... | bsd-3-clause | -3,502,625,808,794,091,500 | 28.541176 | 79 | 0.496217 | false | 3.566761 | false | false | false |
l0kix2/django-granular-access | granular_access/tests/acl.py | 1 | 5399 | # coding: utf-8
from __future__ import unicode_literals
from django.contrib.auth.models import User, Group
from stored_filters import create_filter
from granular_access.models import ACL
from granular_access.tests.base import BaseTest
from granular_access.acl import match_acl
class MatchACLTest(BaseTest):
def se... | mit | 5,175,976,775,508,591,000 | 38.408759 | 75 | 0.577514 | false | 3.990392 | true | false | false |
jouk0/robotframework-selenium2library | src/Selenium2Library/__init__.py | 1 | 5671 | from keywords import *
VERSION = '0.5.3'
__version__ = VERSION
class Selenium2Library(
_LoggingKeywords,
_RunOnFailureKeywords,
_BrowserManagementKeywords,
_ElementKeywords,
_TableElementKeywords,
_FormElementKeywords,
_SelectElementKeywords,
_JavaScriptKeywords,
_CookieKeyword... | apache-2.0 | 8,650,677,049,075,434,000 | 49.633929 | 155 | 0.638688 | false | 4.389319 | false | false | false |
googlecolab/colabtools | tests/test_cv2_import_hook.py | 1 | 4400 | # Copyright 2018 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | -3,485,079,484,362,797,600 | 29.769231 | 76 | 0.678864 | false | 3.568532 | true | false | false |
raziorx/simpleftp | Final/try.py | 1 | 5206 | import signal
signal.signal(signal.SIGINT, signal.SIG_IGN)
import socket
import os
import sys
import curses
import traceback
import atexit
import time
from os import walk
class cmenu(object):
datum = {}
ordered = []
pos = 0
def __init__(self, options, title="FTP MENU"):
curses.initscr()
... | gpl-2.0 | 5,639,631,784,786,077,000 | 23.909091 | 79 | 0.485786 | false | 3.543907 | false | false | false |
billhart/dxf2gcodecli | DxfImport/GeoentLine.py | 1 | 4995 | # -*- coding: utf-8 -*-
############################################################################
#
# Copyright (C) 2008-2014
# Christian Kohlöffel
# Vinzenz Schulz
#
# This file is part of DXF2GCODE.
#
# DXF2GCODE is free software: you can redistribute it and/or modify
# it under the terms... | gpl-3.0 | -9,033,858,736,158,582,000 | 32.631944 | 91 | 0.520152 | false | 3.727205 | false | false | false |
sourcepole/ogrtools | ogrtools/interlis/model_loader.py | 1 | 4667 | import os
import tempfile
import mmap
import re
from xml.etree import ElementTree
from java_exec import run_java
NS = {'xmlns': "http://www.interlis.ch/INTERLIS2.3"}
class IliModel:
"""Metadata and link to model"""
def __init__(self, name, version="", uri="http://interlis.sourcepole.ch/"):
self.na... | mit | -2,641,228,215,955,413,500 | 34.9 | 99 | 0.518534 | false | 3.876246 | false | false | false |
alorenzo175/satellite_irradiance_optimal_interpolation | satoi/input_data.py | 1 | 13392 | # coding: utf-8
import os
from collections import OrderedDict
import logging
import argparse
import random
import netCDF4 as nc4
import pandas as pd
import numpy as np
import pvlib as pv
import scipy.io
from satoi import oi
DROP_SENSORS = []#[410, 424, 432, 446]
def suny_ghi(lats, lons, raw, terrain_elevation):... | mit | -4,064,009,050,974,871,000 | 40.079755 | 82 | 0.5852 | false | 3.341317 | false | false | false |
pyroscope/pyrocore | src/pyrocore/config.py | 1 | 2693 | # -*- coding: utf-8 -*-
# pylint: disable=I0011,C0103,W0404
""" Configuration.
For details, see https://pyrocore.readthedocs.io/en/latest/setup.html
Copyright (c) 2009, 2010, 2011 The PyroScope Project <pyroscope.project@gmail.com>
"""
# This program is free software; you can redistribute it and/or modify
# i... | gpl-2.0 | -288,202,316,236,055,800 | 31.059524 | 89 | 0.689194 | false | 3.858166 | false | false | false |
cwisecarver/osf.io | website/search/elastic_search.py | 1 | 25375 |
# -*- coding: utf-8 -*-
from __future__ import division
import copy
import functools
import logging
import math
import re
import unicodedata
from framework import sentry
import six
from django.apps import apps
from django.core.paginator import Paginator
from elasticsearch import (ConnectionError, Elasticsearch, No... | apache-2.0 | -1,198,237,155,588,281,000 | 34.840395 | 140 | 0.593537 | false | 3.920735 | false | false | false |
ceos-seo/Data_Cube_v2 | agdc-v2/tests/index/test_api_index_dataset.py | 1 | 8860 | # coding=utf-8
from __future__ import absolute_import
import datetime
from collections import namedtuple
from contextlib import contextmanager
from copy import deepcopy
import pytest
from datacube.index._datasets import DatasetResource
from datacube.index.exceptions import DuplicateRecordError
from datacube.model i... | apache-2.0 | 1,426,244,057,248,425,500 | 34.582329 | 119 | 0.513093 | false | 3.632636 | true | false | false |
cduhard/vimconfig | lib/extras/cocoa_classes.py | 1 | 2265 | #!/usr/bin/python
'''
Creates text file of Cocoa superclasses in given filename or in
./cocoa_indexes/classes.txt by default.
'''
import os, re
from cocoa_definitions import write_file, find
from commands import getoutput
def find_headers(frameworks):
'''Returns a dictionary of the headers for each given framework... | mit | 4,303,702,115,036,755,000 | 37.389831 | 79 | 0.631788 | false | 3.781302 | false | false | false |
python-control/python-control | control/tests/convert_test.py | 1 | 9776 | #!/usr/bin/env python
"""convert_test.py
Test state space and transfer function conversion.
Currently, this unit test script is not complete. It converts several random
state spaces back and forth between state space and transfer function
representations. Ideally, it should be able to assert that the conversion
ou... | bsd-3-clause | 3,108,473,527,264,625,700 | 36.171103 | 80 | 0.541939 | false | 3.521614 | true | false | false |
1200wd/1200wd_addons | sale_channel/models/account_invoice.py | 1 | 1630 | # -*- coding: utf-8 -*-
# © 2016 1200 WebDevelopment <1200wd.com>
# © 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import models, fields, api
_logger = logging.getLogger(__name__)
class AccountInvoice(models.Model):
_inherit = "... | agpl-3.0 | -1,032,813,394,358,445,600 | 32.22449 | 75 | 0.599509 | false | 3.708428 | false | false | false |
pengutronix/aiohttp-json-rpc | aiohttp_json_rpc/django/__init__.py | 1 | 1876 | import asyncio
default_app_config = 'aiohttp_json_rpc.django.apps.AiohttpJsonRpcConfig'
__already_patched = False
def local(original):
# we keep the original _connections in scope to keep the thread safety of
# Django for non-asyncio code.
class Storage(object):
pass
class TaskLocal(object)... | apache-2.0 | 6,655,427,241,117,574,000 | 26.188406 | 77 | 0.616205 | false | 4.553398 | false | false | false |
effluxsystems/pyefflux | efflux/base.py | 1 | 4583 | '''Base Class for Efflux Telemetry Data'''
from abc import ABCMeta
import thread
import logging
from logging.handlers import TimedRotatingFileHandler
from os.path import expanduser
import requests
import efflux.logger as log
logger = log.get_logger(__name__)
def _handle_resp(resp, *args, **kwargs):
if resp.sta... | mit | -3,039,024,013,011,721,000 | 29.966216 | 72 | 0.533493 | false | 4.453839 | false | false | false |
BetterWorks/healthchecks | hc/accounts/management/commands/pruneusers.py | 1 | 1187 | from datetime import timedelta
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
from django.db.models import Count
from django.utils import timezone
class Command(BaseCommand):
help = """Prune old, inactive user accounts.
Conditions for removing an user account... | bsd-3-clause | 1,684,007,417,303,882,800 | 31.081081 | 67 | 0.638585 | false | 3.983221 | false | false | false |
cmcantalupo/geopm | integration/experiment/monitor/run_monitor_amg.py | 1 | 2041 | #!/usr/bin/env python
#
# Copyright (c) 2015 - 2021, 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 source code must retain the above copyright
# notice, thi... | bsd-3-clause | 9,171,536,705,967,010,000 | 39.019608 | 74 | 0.732974 | false | 4.243243 | false | false | false |
gjhiggins/pyralod | pyralod/subscribers.py | 1 | 1398 | import logging
import rdflib
import sys
from pyramid.threadlocal import get_current_request
from pyramid.events import subscriber
from pyramid.events import BeforeRender
log = logging.getLogger(__name__)
class Cleanup:
def __init__(self, request):
self.request = request
def __del__(self):
pa... | apache-2.0 | -8,805,644,627,451,372,000 | 24.418182 | 67 | 0.653076 | false | 3.971591 | false | false | false |
ResearchSoftwareInstitute/MyHPOM | hs_core/forms.py | 1 | 46995 | """Django forms for hs_core module."""
import copy
from models import Party, Creator, Contributor, validate_user_url, Relation, Source, Identifier, \
FundingAgency, Description
from django.forms import ModelForm, BaseFormSet
from django.contrib.admin.widgets import forms
from django.utils.safestring import mark_s... | bsd-3-clause | 7,606,895,304,245,670,000 | 39.794271 | 101 | 0.573806 | false | 4.257951 | false | false | false |
intelxed/mbuild | mbuild/dag.py | 1 | 42244 | #!/usr/bin/env python
# -*- python -*-
# Mark Charney
#BEGIN_LEGAL
#
#Copyright (c) 2016 Intel Corporation
#
# 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/l... | apache-2.0 | 5,802,066,653,142,935,000 | 36.351017 | 93 | 0.516239 | false | 4.164432 | false | false | false |
smharper/openmc | openmc/deplete/integrators.py | 1 | 45948 | import copy
from itertools import repeat
from .abc import Integrator, SIIntegrator, OperatorResult
from ._matrix_funcs import (
cf4_f1, cf4_f2, cf4_f3, cf4_f4, celi_f1, celi_f2,
leqi_f1, leqi_f2, leqi_f3, leqi_f4, rk4_f1, rk4_f4
)
__all__ = [
"PredictorIntegrator", "CECMIntegrator", "CF4Integrator",
"... | mit | -7,184,277,923,341,904,000 | 39.842667 | 83 | 0.605772 | false | 3.79516 | false | false | false |
skosukhin/spack | lib/spack/spack/cmd/common/arguments.py | 1 | 5151 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -2,314,879,396,307,181,000 | 34.040816 | 100 | 0.652689 | false | 4.097852 | false | false | false |
lildadou/Flexget | flexget/plugins/api/user.py | 1 | 1967 | from __future__ import unicode_literals, division, absolute_import
from flask import request
from flask.ext.login import current_user
from flexget.api import api, APIResource
from flexget.webserver import change_password, generate_token, WeakPassword
user_api = api.namespace('user', description='Manage user login cr... | mit | -8,976,563,572,112,369,000 | 32.338983 | 96 | 0.644128 | false | 3.941884 | false | false | false |
sneharavi12/DeepLearningFinals | pymunk-pymunk-4.0.0/pymunk/pygame_util.py | 1 | 8461 | # ----------------------------------------------------------------------------
# pymunk
# Copyright (c) 2007-2012 Victor Blomqvist
#
# 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 with... | mit | -3,552,869,189,300,312,000 | 36.112613 | 92 | 0.624276 | false | 3.76379 | false | false | false |
BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/HMM/Utilities.py | 1 | 2063 | """Generic functions which are useful for working with HMMs.
This just collects general functions which you might like to use in
dealing with HMMs.
"""
def pretty_print_prediction(emissions, real_state, predicted_state,
emission_title = "Emissions",
real_title =... | gpl-2.0 | -527,838,770,743,073,800 | 34.568966 | 79 | 0.566651 | false | 4.417559 | false | false | false |
Canule/SwitchMouseSensitivity | Source/dataIO.py | 1 | 1959 | import json
import os
import glob
#https://github.com/Twentysix26/Red-DiscordBot/blob/master/dataIO.py
default_settings = ('{"curReg": 0, "lastSp": "sp1", "sp1": 0, "sp2": 0}')
def fileIO(filename, IO, data=None):
if IO == "save" and data != None:
with open(filename, encoding='utf-8', mode="w") as f:
f.wri... | mit | 8,543,503,939,832,838,000 | 32.20339 | 83 | 0.665135 | false | 3.104596 | false | false | false |
sonny-tarbouriech/ompl | tests/util/test_py_boost_function.py | 1 | 3764 | #!/usr/bin/env python
######################################################################
# Software License Agreement (BSD License)
#
# Copyright (c) 2010, Rice University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that t... | bsd-3-clause | -1,513,578,815,208,729,600 | 35.543689 | 74 | 0.632837 | false | 3.527648 | true | false | false |
zedshaw/idiopidae | idiopidae/runtime.py | 1 | 7925 | from __future__ import with_statement
# Copyright (C) Zed A. Shaw, licensed under the GPLv3
import idiopidae.parser
from pygments import highlight
from pygments.formatters import get_formatter_for_filename, get_formatter_by_name
from pygments.lexers import guess_lexer_for_filename, get_lexer_by_name
### @export "Bu... | gpl-3.0 | 1,859,517,051,528,340,700 | 34.379464 | 101 | 0.575899 | false | 4.321156 | false | false | false |
picklepete/pyicloud | pyicloud/services/photos.py | 1 | 21937 | """Photo service."""
import json
import base64
from six import PY2
# fmt: off
from six.moves.urllib.parse import urlencode # pylint: disable=bad-option-value,relative-import
# fmt: on
from datetime import datetime
from pyicloud.exceptions import PyiCloudServiceNotActivatedException
from pytz import UTC
class Photo... | mit | 4,992,312,043,741,052,000 | 32.801233 | 96 | 0.462506 | false | 4.526826 | false | false | false |
levilucio/SyVOLT | GM2AUTOSAR_MM/Properties/from_eclipse/HM2_then1_CompleteLHS.py | 1 | 8948 | from core.himesis import Himesis, HimesisPreConditionPatternLHS
import uuid
class HM2_then1_CompleteLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HM2_then1_CompleteLHS.
"""
# Fla... | mit | -6,776,843,655,321,992,000 | 49.553672 | 125 | 0.464685 | false | 5.377404 | false | false | false |
ionata/django-emailmeld | emailmeld/south_migrations/0001_initial.py | 1 | 1566 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'EmailMeldModel'
db.create_table('emailmeld_emailmeldmodel', (
('id', self.gf('dj... | bsd-2-clause | 2,746,133,304,663,976,000 | 40.236842 | 115 | 0.597701 | false | 3.65035 | false | false | false |
PythonicNinja/piper | piper/wsgi.py | 1 | 2219 | """
WSGI config for piper project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` se... | bsd-3-clause | 7,781,999,610,132,156,000 | 34.222222 | 79 | 0.730059 | false | 3.806175 | false | false | false |
htem/CATMAID | django/applications/catmaid/control/stats.py | 1 | 10178 | import json
import time
from datetime import timedelta, datetime
from dateutil import parser as dateparser
from django.http import HttpResponse
from django.db.models.aggregates import Count
from django.db import connection
from catmaid.control.authentication import requires_user_role
from catmaid.models import ClassI... | agpl-3.0 | 8,260,152,947,694,403,000 | 39.388889 | 116 | 0.624975 | false | 3.60794 | false | false | false |
hdc-arizona/lcvis | python_scripts/PLV_SDSS/pca.py | 1 | 1486 | import argparse
import csv
import json
import pickle
import numpy as np
from matplotlib.mlab import PCA
from mag_data import loadMagData
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('path', help='path to dataset folder')
args = parser.parse_args()
matrix = []
j... | gpl-2.0 | 3,950,814,282,781,567,000 | 27.576923 | 107 | 0.571332 | false | 3.354402 | false | false | false |
ActiveState/code | recipes/Python/576943_Serialize_Deserialize/recipe-576943.py | 1 | 4382 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "James Eric Pruitt"
__all__ = [ "serialize", "deserialize" ]
__version__ = "2009.11.04"
import collections
itertable = {}
for t in [set, frozenset, list, tuple, dict]:
itertable[t] = t.__name__
itertable[t.__name__] = t
supporteddict = {
int: (r... | mit | 1,307,183,209,777,693,000 | 33.777778 | 78 | 0.562529 | false | 3.556818 | true | false | false |
Donkyhotay/MoonPy | zope/tal/tests/utils.py | 1 | 1998 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | gpl-3.0 | 8,468,226,372,097,160,000 | 29.738462 | 78 | 0.616116 | false | 3.827586 | false | false | false |
ellonweb/merlin | Hooks/target/unbook.py | 1 | 3835 | # This file is part of Merlin.
# Merlin is the Copyright (C)2008,2009,2010 of Robin K. Hansen, Elliot Rosemarine, Andreas Jacobsen.
# Individual portions may be copyright by individual contributors, and
# are included in this collective work with permission of the copyright
# owners.
# This program is free software; ... | gpl-2.0 | 3,769,939,206,364,282,000 | 40.236559 | 131 | 0.592438 | false | 3.893401 | false | false | false |
ieugen/Teachingbox | usercontrib/crawler3D/python/pyui/base.py | 1 | 15239 | # PyUI
# Copyright (C) 2001-2002 Sean C. Riley
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful... | gpl-3.0 | 6,058,874,106,252,663,000 | 30.082105 | 123 | 0.543474 | false | 4.237764 | false | false | false |
ravyg/algorithms | python/17_letterCombinationsPhoneNum.py | 1 | 2017 |
# Iterative Solution
class Solution1:
# @return a list of strings, [s1, s2]
def letterCombinations(self, digits):
if not digits:
return []
lookup, result = ["", "", "abc", "def", "ghi", "jkl", "mno", \
"pqrs", "tuv", "wxyz"], [""]
for ... | gpl-3.0 | -8,483,070,012,113,320,000 | 29.119403 | 75 | 0.439266 | false | 3.673953 | false | false | false |
mispencer/vdebug | plugin/python/vdebug/event.py | 1 | 8981 | # coding=utf-8
import vdebug.log
import vdebug.opts
import vim
import re
class Dispatcher:
def __init__(self,runner):
self.runner = runner
def visual_eval(self):
if self.runner.is_alive():
event = VisualEvalEvent()
return event.execute(self.runner)
def eval_under_c... | mit | 8,688,293,920,578,501,000 | 31.897436 | 87 | 0.549159 | false | 3.768779 | false | false | false |
wesley1001/dokomoforms | dokomoforms/db/answer_choice.py | 1 | 3243 | """Allow access to the answer_choice table."""
from sqlalchemy import select
from sqlalchemy.engine import ResultProxy, Connection
from sqlalchemy.sql.dml import Insert
from dokomoforms.db import answer_choice_table
def answer_choice_insert(*,
is_type_exception: bool=None,
... | gpl-3.0 | -4,841,107,197,491,232,000 | 40.576923 | 77 | 0.636448 | false | 4.45467 | false | false | false |
JeremiahZhang/pybeginner | _src/om2py0w/0wd2/tutor04-7-1-default-argument-values.py | 1 | 1388 | # -*- coding: utf-8 -*-
print 'argument values'
def ask_ok(prompt, retries=4, complaint='yes or no, please!'):
while True:
ok = raw_input(prompt)
if ok in ('y', 'ye','yes'): # in
return True # return
if ok in ('n', 'no', 'nop', 'nope'):
return False
retries = retries - 1
if retries < 0:
rais... | mit | 4,688,631,109,825,943,000 | 22.218182 | 85 | 0.660658 | false | 2.449136 | false | false | false |
mrGeen/eden | controllers/sync.py | 1 | 5493 | # -*- coding: utf-8 -*-
""" Synchronization Controllers """
# -----------------------------------------------------------------------------
def index():
""" Module's Home Page """
module_name = T("Synchronization")
response.title = module_name
return dict(module_name=module_name)
# ---... | mit | -6,460,869,042,595,062,000 | 32.33125 | 91 | 0.428727 | false | 4.136295 | false | false | false |
jbedorf/tensorflow | tensorflow/python/eager/function.py | 1 | 85871 | # Copyright 2017 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 | 4,661,559,056,710,929,000 | 39.070462 | 104 | 0.680195 | false | 4.133183 | false | false | false |
ua-snap/geonode | geonode/layers/forms.py | 1 | 7893 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... | gpl-3.0 | -572,624,581,469,285,300 | 34.877273 | 100 | 0.555936 | false | 4.324932 | false | false | false |
openilabs/falconlab | env/lib/python2.7/site-packages/falcon/response.py | 1 | 7991 | """Defines the Response class
Copyright 2013 by Rackspace Hosting, 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... | mit | 9,215,780,792,881,274,000 | 30.58498 | 79 | 0.604805 | false | 4.449332 | false | false | false |
PnX-SI/GeoNature | contrib/gn_module_occhab/config/conf_schema_toml.py | 1 | 2224 | """
Spécification du schéma toml des paramètres de configurations
La classe doit impérativement s'appeller GnModuleSchemaConf
Fichier spécifiant les types des paramètres et leurs valeurs par défaut
Fichier à ne pas modifier. Paramètres surcouchables dans config/config_gn_module.tml
"""
from marshmallow imp... | gpl-3.0 | 7,341,147,133,768,321,000 | 37.189655 | 89 | 0.677201 | false | 3.544 | true | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/effective_network_security_group_list_result_py3.py | 1 | 1429 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -6,721,883,499,673,380,000 | 34.725 | 79 | 0.609517 | false | 4.565495 | false | false | false |
widowild/messcripts | exercice/python2/solutions/exercice_8_9.py | 1 | 1278 | # -*- coding:Latin-1 -*-
# Dessin d'un damier
from Tkinter import *
def damier():
"dessiner dix lignes de carrés avec décalage alterné"
y = 0
while y < 10:
if y % 2 == 0: # une fois sur deux, on
x = 0 # commencera la ligne de
else: ... | gpl-3.0 | -3,734,094,691,514,916,400 | 30.975 | 64 | 0.543036 | false | 2.736617 | false | false | false |
jcollie/txdnspython | src/txdnspython/tcp.py | 1 | 6634 | # -*- mode: python; coding: utf-8 -*-
# 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,
# d... | mit | -991,368,601,867,454,500 | 35.251366 | 108 | 0.646819 | false | 4.21474 | false | false | false |
profitbricks/profitbricks-sdk-python | tests/test_pylint.py | 1 | 2918 | # Copyright (C) 2010, Stefano Rivera <stefanor@debian.org>
# Copyright (C) 2017-2018, Benjamin Drung <bdrung@debian.org>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice app... | apache-2.0 | -5,637,045,073,656,455,000 | 41.911765 | 97 | 0.623029 | false | 4.284875 | true | false | false |
thijstriemstra/RPLCD | test_16x2.py | 1 | 4251 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
from RPLCD.gpio import CharLCD
from RPLCD import Alignment, CursorMode, ShiftMode
from RPLCD import cursor, cleared
from RPLCD import BacklightMode
try:
input = raw_input
except NameErr... | mit | 8,524,684,083,221,873,000 | 29.12766 | 110 | 0.720339 | false | 2.939792 | false | false | false |
jml/pyhazard | hazard/_rules.py | 1 | 2437 | # Copyright (c) 2015 Jonathan M. Lange <jml@mumak.net>
#
# 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... | apache-2.0 | -7,443,879,246,850,867,000 | 29.08642 | 76 | 0.636028 | false | 3.670181 | false | false | false |
asrozar/perception | perception/classes/daemons.py | 1 | 19036 | #!/usr/bin/env python
from signal import SIGTERM
from os import remove, path, kill, getpid, chdir, dup2, fork, setsid, umask
from sqlalchemy.exc import OperationalError
from time import sleep
from datetime import timedelta, datetime
from pytz import timezone
from perception.database.models import OpenvasAdmin,\
Ope... | mit | 213,860,933,475,428,480 | 37.148297 | 159 | 0.509298 | false | 4.382136 | true | false | false |
ghetzel/webfriend | webfriend/scripting/commands/cookies.py | 1 | 6302 | from __future__ import absolute_import
from __future__ import unicode_literals
from webfriend.scripting.commands.base import CommandProxy
from webfriend import exceptions
class CookiesProxy(CommandProxy):
def all(self, urls=None):
"""
Return a list of all cookies, optionally restricted to just a s... | bsd-2-clause | 5,430,626,565,645,320,000 | 28.586854 | 99 | 0.553634 | false | 4.586608 | false | false | false |
piMoll/SEILAPLAN | lib/reportlab/platypus/paraparser.py | 1 | 214268 | #Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
#history https://hg.reportlab.com/hg-public/reportlab/log/tip/src/reportlab/platypus/paraparser.py
__all__ = ('ParaFrag', 'ParaParser')
__version__='3.5.20'
__doc__='''The parser used to process markup within paragraphs'''
import string
imp... | gpl-2.0 | -3,848,432,515,814,018,600 | 61.872066 | 148 | 0.479904 | false | 3.750796 | false | false | false |
hfp/tensorflow-xsmm | tensorflow/python/distribute/values.py | 1 | 58281 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 7,125,613,292,501,644,000 | 35.747163 | 108 | 0.674182 | false | 3.784726 | false | false | false |
qinq-net/code | _1107/_old.py | 1 | 9050 | #!/usr/bin/python3 -i
import RPi.GPIO as GPIO
import time
import threading
GPIO.setmode(GPIO.BOARD)
#class control:
# GPIO.setmode(GPIO.BOARD)
# def change(self,arg):
# GPIO.remove_event_detect(self.IN)
# while GPIO.input(self.IN): 1
# if self.flag11: GPIO.output(self.OUT,GPIO.HIGH)
# ... | gpl-3.0 | -8,961,412,509,648,262,000 | 35.639676 | 76 | 0.521547 | false | 3.403535 | false | false | false |
c3nav/c3nav | src/c3nav/mapdata/migrations/0075_label_settings.py | 1 | 4590 | # Generated by Django 2.2.8 on 2019-12-21 23:27
import c3nav.mapdata.fields
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mapdata', '0074_show_labels'),
]
... | apache-2.0 | -3,110,318,069,826,387,000 | 46.319588 | 248 | 0.615904 | false | 4.157609 | false | false | false |
lutris/website | emails/messages.py | 1 | 2009 | """Email utility functions"""
from six import string_types
from django.template.loader import render_to_string
from django.core.mail import EmailMultiAlternatives
from django.conf import settings
from premailer import transform
def send_game_accepted(user, game):
"""Email an user when their game submission is acc... | agpl-3.0 | 5,177,386,140,400,501,000 | 35.527273 | 83 | 0.678945 | false | 3.931507 | false | false | false |
altai/nova-billing | nova_billing/heart/database/__init__.py | 1 | 1043 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Nova Billing
# Copyright (C) 2010-2012 Grid Dynamics Consulting Services, Inc
# All Rights Reserved
#
# 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 Fo... | lgpl-2.1 | -5,405,672,728,768,371,000 | 33.766667 | 68 | 0.772771 | false | 3.820513 | false | false | false |
hemny-singh/squealy | squealy/models.py | 1 | 6128 | from __future__ import unicode_literals
from django.db import models
from django.contrib.postgres import fields
from datetime import datetime
from croniter import croniter
from .constants import TRANSFORMATION_TYPES, PARAMETER_TYPES, COLUMN_TYPES
import json
class CustomJSONField(models.TextField):
def from_db... | mit | -2,836,749,680,836,855,300 | 30.751295 | 94 | 0.669713 | false | 4.05291 | false | false | false |
longmen21/edx-platform | common/lib/xmodule/xmodule/capa_module.py | 1 | 10897 | """Implements basics of Capa, including class CapaModule."""
import json
import logging
import sys
import re
from lxml import etree
from pkg_resources import resource_string
import dogstats_wrapper as dog_stats_api
from .capa_base import CapaMixin, CapaFields, ComplexEncoder
from capa import responsetypes
from .progr... | agpl-3.0 | -1,882,061,322,469,768,000 | 35.082781 | 100 | 0.609984 | false | 4.053943 | false | false | false |
openstack/zaqar | zaqar/cmd/server.py | 1 | 2976 | # Copyright (c) 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | 397,650,149,056,467,900 | 33.206897 | 75 | 0.655242 | false | 3.572629 | false | false | false |
presidentielcoin/presidentielcoin | qa/rpc-tests/sendheaders.py | 1 | 25825 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Presidentielcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import Presidentielcoin... | mit | 159,940,775,412,939,230 | 41.545305 | 116 | 0.608984 | false | 3.918222 | true | false | false |
saifhhasan/marketstalker | python/get_earning_calendar.py | 1 | 2191 | import argparse
import datetime as dt
import urllib
from bs4 import BeautifulSoup as bs
pattern = 'https://biz.yahoo.com/research/earncal/{}.html'
def date_to_str(date):
return date.strftime('%Y%m%d')
def date_strings(from_offset, to_offset):
today = dt.date.today()
ret = []
for off in xrange(from_offset, to_o... | apache-2.0 | 2,206,278,973,594,715,000 | 24.183908 | 87 | 0.653583 | false | 2.725124 | false | false | false |
maweis1981/hey001 | mayversion/mayversion/bookreader/appStore.py | 1 | 1594 | # coding: utf-8
#!/usr/bin/env python
# encoding: utf-8
"""
appStore.py
Created by peter on 2010-03-29.
Copyright (c) 2010 __maweis.com__. All rights reserved.
"""
import re
import urllib
import os
import json
import time
class SinaRead():
def get_book_title(self,html):
title = re.findall(r'<h1>(.*?)</h1... | lgpl-3.0 | 8,667,020,214,905,800,000 | 29.653846 | 217 | 0.613551 | false | 3.024668 | false | false | false |
kayarre/Tools | vmtk/get_slice_boxes.py | 1 | 7466 | #!/usr/bin/env python
import vtk
import numpy as np
from vmtk import vmtkscripts
import argparse
import itertools
import os
# clip boxes along the surface
# calculate basis from vector
# Tom Duff, James Burgess, Per Christensen, Christophe Hery, Andrew Kensler, Max Liani, and Ryusuke Villemin, Building an Orthonorma... | bsd-2-clause | -5,889,143,671,356,193,000 | 37.091837 | 224 | 0.567372 | false | 3.296247 | false | false | false |
GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/linux_packages/lapack.py | 1 | 1875 | # Copyright 2016 PerfKitBenchmarker 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 appli... | apache-2.0 | -7,125,263,527,940,620,000 | 30.779661 | 74 | 0.693333 | false | 3.029079 | false | false | false |
ujdhesa/unisubs | libs/rosetta/conf/settings.py | 1 | 1946 | from django.conf import settings
# Number of messages to display per page.
MESSAGES_PER_PAGE = getattr(settings,'ROSETTA_MESSAGES_PER_PAGE',20)
# Enable Google translation suggestions
ENABLE_TRANSLATION_SUGGESTIONS = getattr(settings,'ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS',True)
# Displays this language beside the... | agpl-3.0 | 7,634,053,539,530,343,000 | 41.304348 | 100 | 0.788284 | false | 3.815686 | false | false | false |
haggi/OpenMaya | src/mayaToCorona/mtco_devmodule/scripts/plug-ins/coronaPassesNode.py | 1 | 2954 | """Ambient render passes node plugin"""
import sys
import maya.OpenMaya as OpenMaya
import maya.OpenMayaMPx as OpenMayaMPx
nodeId = OpenMaya.MTypeId(0x0011EF6E)
def addNumAttr(attr, type, default, doc=""):
numAttr = OpenMaya.MFnNumericAttribute()
setattr(CoronaPassesNode, attr, numAttr.create(attr, attr, type... | mit | 5,775,975,615,142,290,000 | 36.392405 | 98 | 0.72715 | false | 3.086729 | false | false | false |
codekansas/liveqa2017 | liveqa/api/api_utils.py | 1 | 4651 | """Defines some common utils for building APIs.
The main feature of these APIs is that they are multi-threaded; in the
background, there are a number of threads handling requests that maintain
resources across calls (so that resources don't have to continually be
reloaded).
In particular, a QueryJob holds the input (... | gpl-3.0 | 2,651,370,788,528,132,000 | 30.006667 | 83 | 0.625242 | false | 4.47642 | false | false | false |
Didero/DideRobot | commands/LastMessage.py | 1 | 2824 | from CommandTemplate import CommandTemplate
from IrcMessage import IrcMessage
import GlobalStore
class Command(CommandTemplate):
triggers = ['lastmessage']
helptext = "Stores the last message for each channel the bot is in, so other modules can retrieve it through a commandfunction"
# Stores the last message. Key... | mit | 3,862,759,117,644,353,500 | 42.446154 | 129 | 0.762748 | false | 3.868493 | false | false | false |
TheDuckCow/MCprep | MCprep_addon/mcprep_ui.py | 1 | 42226 | # ##### 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 | 7,279,898,693,430,551,000 | 32.433096 | 86 | 0.675697 | false | 2.872322 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.