repo_name stringlengths 8 92 | path stringlengths 5 221 | copies stringclasses 10
values | size stringlengths 4 6 | content stringlengths 974 828k | license stringclasses 15
values | hash int64 -9,212,977,344,346,658,000 9,220,224,517B | line_mean float64 8.67 91.6 | line_max int64 15 966 | alpha_frac float64 0.29 0.86 | autogenerated bool 1
class | nl_text stringlengths 0 164k | nl_size int64 0 164k | nl_language stringclasses 17
values | nl_language_score float64 0.04 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
agabert/zeus | stages/keystone/fabfile.py | 1 | 5050 |
import os
from zeus.config import ConfigManager
from zeus.common import FabricManager
from zeus.common import PasswordManager
from zeus.configmanagement import ConfigEditor
from zeus.ubuntu import RepoManager
from zeus.services import ServiceControl
from fabric.api import parallel, roles, run, env
metadata = Config... | apache-2.0 | 8,810,368,617,381,399,000 | 33.827586 | 81 | 0.852475 | false | http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-install.html | 75 | en | 0.416267 |
GregorCH/ipet | ipet/parsing/StatisticReader_CustomReader.py | 1 | 6339 | """
The MIT License (MIT)
Copyright (c) 2018 Zuse Institute Berlin, www.zib.de
Permissions are granted as stated in the license file you have obtained
with this software. If you find the library useful for your purpose,
please refer to README.md for how to cite IPET.
@author: Gregor Hendel
"""
from .StatisticReader ... | mit | -7,036,275,254,161,661,000 | 31.84456 | 151 | 0.581953 | false | Reader to be initialised interactively through IPET or from an interactive python shell
constructor of a custom reader to parse additional simple solver output from log file context
Parameters:
-----------
name : a name to distinguish this reader from the others
regpattern : A string or regular expression pattern to... | 1,094 | en | 0.737069 |
jackfirth/flask-negotiate | setup.py | 1 | 1312 | """
flask-negotiate2
===============
Content negotiation utility for Flask apps. Fork of Flask-Negotiate by
Matt Wright (github.com/mattupstate)
Resources
---------
- `Documentation <http://packages.python.org/flask-negotiate2/>`_
- `Issue Tracker <http://github.com/jackfirth/flask-negotiate/issues>`_
- `Code <http... | mit | -3,190,932,591,787,335,000 | 28.155556 | 71 | 0.645579 | false | flask-negotiate2
===============
Content negotiation utility for Flask apps. Fork of Flask-Negotiate by
Matt Wright (github.com/mattupstate)
Resources
---------
- `Documentation <http://packages.python.org/flask-negotiate2/>`_
- `Issue Tracker <http://github.com/jackfirth/flask-negotiate/issues>`_
- `Code <http://g... | 359 | en | 0.730527 |
NoneGroupTeam/Let-s-Go | webapp/app/views.py | 1 | 18587 | from django.contrib.auth import authenticate, logout, login
from django.contrib.auth import get_user_model
from django.http import HttpResponse
from app.models import Label, Place, Guide, Question, Answer
from hashlib import md5
import json
import re
LOGIN_OK_CODE = 200
LOGIN_OK = 'Login success'
LOGOUT_OK_CODE = 201... | gpl-3.0 | -4,711,005,114,202,626,000 | 38.63113 | 111 | 0.555334 | false | check format database search | 28 | en | 0.166142 |
AutorestCI/azure-sdk-for-python | azure-mgmt-servicebus/azure/mgmt/servicebus/operations/operations.py | 1 | 3676 | # 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,970,386,953,209,789,000 | 37.291667 | 144 | 0.616703 | false | Operations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:ivar api_version: Client API version. Constant value: "2017-04-01".
Lists all of the available ServiceBus ... | 1,384 | en | 0.569058 |
quantopian/zipline | tests/test_clock.py | 1 | 5702 | from datetime import time
from unittest import TestCase
import pandas as pd
from trading_calendars import get_calendar
from trading_calendars.utils.pandas_utils import days_at_time
from zipline.gens.sim_engine import (
MinuteSimulationClock,
SESSION_START,
BEFORE_TRADING_START_BAR,
BAR,
SESSION_END... | apache-2.0 | 564,505,686,380,273,340 | 30.677778 | 79 | 0.539635 | false | july 15 is friday, so there are 3 sessions in this range (15, 18, 19) since 19:05 Eastern is after the NYSE is closed, we don't emit BEFORE_TRADING_START. therefore, each day has SESSION_START, 390 BARs, and then SESSION_END | 225 | en | 0.959245 |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2016_12_01/operations/routes_operations.py | 1 | 17924 | # 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 | -8,097,506,177,059,138,000 | 43.81 | 158 | 0.632671 | false | RoutesOperations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:ivar api_version: Client API version. Constant value: "2016-12-01".
Creates or updates a route in th... | 4,193 | en | 0.569612 |
google-research/google-research | neural_guided_symbolic_regression/utils/generate_empirical_distribution_df_test.py | 1 | 6620 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | apache-2.0 | -8,822,368,325,674,619,000 | 37.71345 | 86 | 0.575378 | false | Tests for generate_empirical_distribution_df.
coding=utf-8 Copyright 2021 The Google Research Authors. 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... | 722 | en | 0.876454 |
p-montero/py-ans | class8/ex7.py | 1 | 1695 | #!/usr/bin/env python
'''
Use processes and Netmiko to connect to each of the devices in the database.
Execute 'show version' on each device. Record the amount of time required to do this.
DISCLAIMER NOTE: Solution is limited to the exercise's scope
'''
from net_system.models import NetworkDevice
import django
from mu... | apache-2.0 | 5,557,594,805,842,516,000 | 35.06383 | 116 | 0.676106 | false | !/usr/bin/env python Execute cmd with NETMIKO Output cmd Main function to connect to the devices using NETMIKO and execute a cmd. Multi-processing support. Record start time Create a PROCESS for each device connection/cmd Start the THREAD Function sh_ver runtime calculation | 274 | en | 0.700354 |
disco-stu/pcs | pcs/test/test_utils.py | 1 | 58548 | import os
import sys
import shutil
import unittest
import xml.dom.minidom
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, parentdir)
from pcs_test_functions import pcs, ac
import utils
empty_cib = "empty.xml"
temp_cib = "temp.xml"
class UtilsTest(unittest.TestCase):
def... | gpl-2.0 | 8,559,471,900,549,907,000 | 33.059337 | 87 | 0.508745 | false | 0 | en | 0.110449 | |
NiloFreitas/Deep-Reinforcement-Learning | tensorblock/recipe/recipe_input.py | 1 | 3410 |
import tensorflow as tf
import tensorblock as tb
import numpy as np
class recipe_input:
####### Add Input
def addInput( self , **args ):
pars = { **self.defs_input , **args }
pars['name'] = self.add_label(
self.inputs , 'Input' , pars['name'] , add_order = True )
pars = s... | mit | -6,245,500,325,249,844,000 | 36.888889 | 98 | 0.482405 | false | Add Input Add Variable Parse Pars Copying Nothing | 49 | ru | 0.198043 |
DmitryFillo/berserker_resolver | setup.py | 1 | 1337 | import os, sys
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def dep_dnspython():
name = 'dnspython'
if sys.version_info[0] == 3:
name += '3'
return name
setup(
name='berserker_resolver',
version='2.0.1',
author='D... | bsd-2-clause | 917,970,695,018,627,100 | 30.833333 | 74 | 0.618549 | false | 0 | en | 0.110449 | |
larsks/cobbler-larsks | cobbler/api.py | 1 | 36927 | """
python API module for Cobbler
see source for cobbler.py, or pydoc, for example usage.
CLI apps and daemons should import api.py, and no other cobbler code.
Copyright 2006-2009, Red Hat, Inc
Michael DeHaan <mdehaan@redhat.com>
This program is free software; you can redistribute it and/or modify
it under the terms ... | gpl-2.0 | 7,651,953,824,866,149,000 | 37.993664 | 157 | 0.578168 | false | notes on locking: BootAPI is a singleton object the XMLRPC variants allow 1 simultaneous request therefore we flock on /etc/cobbler/settings for now on a request by request basis. =========================================================== FIXME: this should be switchable through some simple system NOTE: we do not log ... | 4,150 | en | 0.500028 |
Adamssss/projectEuler | Problem 001-150 Python/pb103.py | 1 | 1978 | import math
import time
t1 = time.time()
# using all the numbers
# the sub pairs cover the exact original set
def exactsub(oset):
l = len(oset)
if l == 2:
return [[[oset[0]],[oset[1]]]]
result = []
f = oset[0]
rest = oset[1:]
result.append([[f],rest])
for i in exactsub(rest):
... | mit | 849,634,466,316,029,700 | 18.979798 | 74 | 0.505561 | false | using all the numbers the sub pairs cover the exact original set | 64 | en | 0.554238 |
NeurodataWithoutBorders/api-python | examples/create_scripts/extensions/e-trajectorySeries2.py | 1 | 2936 | # Definitions of extension to TimeSeries to store trajectory information
# All format specifications must be stored in dictionary "fs"
# "mnts2" is the "namespace" for this extension
# This extension explicitly specifies meaning for each column of dataset data
{"fs": {"mnts2": {
"info": {
"name": "Sabes lab data ... | bsd-3-clause | -9,183,462,637,381,410,000 | 42.835821 | 96 | 0.419619 | false | Definitions of extension to TimeSeries to store trajectory information All format specifications must be stored in dictionary "fs" "mnts2" is the "namespace" for this extension This extension explicitly specifies meaning for each column of dataset data define components of trajectories dimension | 296 | en | 0.731908 |
tangyaohua/dl4mt | session2/lm/deepy/trainers/optimize.py | 1 | 4684 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging as loggers
import numpy as np
import theano
import theano.tensor as T
from theano.ifelse import ifelse
from ..utils import FLOATX, dim_to_var, EPSILON
from .util import wrap_core, multiple_l2_norm
from ..conf import TrainerConfig
logging = loggers.getLog... | bsd-3-clause | -5,147,573,832,780,105,000 | 33.696296 | 123 | 0.609308 | false | Create a optimizing function receives gradients.
Parameters:
params - parameters
config - training configuration
Returns:
updating function receives gradients
General optimization function for Theano.
Parameters:
params - parameters
gradients - gradients
config - training config
Returns:
The... | 569 | en | 0.477375 |
TeamHG-Memex/hgprofiler | lib/cli/run_server.py | 1 | 1340 | import app
import cli
class RunServerCli(cli.BaseCli):
""" A tool for running a development server. """
def _get_args(self, arg_parser):
""" Customize arguments. """
arg_parser.add_argument(
'--debug',
action='store_true',
help='Enable debug mode: errors p... | apache-2.0 | 466,433,427,109,874,750 | 26.346939 | 76 | 0.526866 | false | A tool for running a development server.
Customize arguments.
Main entry point.
Disable secure cookies for the development server. | 135 | en | 0.77943 |
yephper/django | django/conf/locale/en_GB/formats.py | 1 | 2159 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j M Y' #... | bsd-3-clause | -7,802,788,513,267,937,000 | 49.404762 | 79 | 0.443261 | false | -*- encoding: utf-8 -*- This file is distributed under the same license as the Django package. The *_FORMAT strings use the Django date format syntax, see http://docs.djangoproject.com/en/dev/ref/templates/builtins/date '25 Oct 2006' '2:30 p.m.' '25 Oct 2006, 2:30 p.m.' 'October 2006' '25 October' '25/10/2006' '25/10/2... | 1,025 | en | 0.372873 |
mcf-rocha/swagger-graph | api-ingestor.py | 1 | 2985 | import sys
import pysvn
import json
import configparser, os
from pymongo import MongoClient
config = configparser.RawConfigParser()
config.read('/Users/mcf/configuration.cfg')
svnroot = config.get('SVN', 'root')
svnpath = config.get('SVN', 'path')
svnusername = config.get('SVN', 'username')
svnpwd = config.get('SVN... | mit | 6,348,466,525,802,908,000 | 40.444444 | 170 | 0.628227 | false | print("Starting to process document {}".format(item.path))-------------------AJUSTES REQUERIDOS PELO SINTAXE DO SWAGGER QUE NÃO SÃO PERMITIDOS NO MONGO-------------------print(swaggercontentstring2)else: print(" An encoding problem has happened when inserting Swagger information into the MongoDB collection... {... | 375 | en | 0.329731 |
TwoBitAlchemist/NeoAlchemy | neoalchemy/cypher/verbs.py | 1 | 4169 | from __future__ import unicode_literals
import six
from ..shared.objects import Property
from .operations import CypherExpression, ComparisonExpression, QueryParams
class CypherQuery(list):
def __init__(self, graph_obj, use_full_pattern=False):
self.params = QueryParams()
try:
verb ... | mit | -7,028,930,501,125,680,000 | 28.992806 | 75 | 0.550971 | false | 0 | en | 0.110449 | |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy_dnspolicylabel_binding.py | 1 | 6004 | #
# Copyright (c) 2008-2015 Citrix 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 l... | apache-2.0 | -9,121,447,943,516,050,000 | 26.167421 | 134 | 0.698368 | false | Binding class showing the dnspolicylabel that can be bound to dnspolicy.
converts nitro response into object and returns the object array in case of get request.
Returns the value of object identifier argument
Indicates whether policy is bound or not.
Location... | 1,972 | en | 0.81123 |
pudo/regenesis | legacy/regenesis/test_table.py | 1 | 2695 | # -*- coding: utf-8 -*-
import unittest
import table
MIKROZENSUS_11111_0001 = """GENESIS-Tabelle: Temporär
Gebietsfläche: Bundesländer, Stichtag;;;;;;;;;;;;;
Feststellung des Gebietsstands;;;;;;;;;;;;;
Gebietsfläche (qkm);;;;;;;;;;;;;
;Stichtag;Stichtag;Stichtag;Stichtag;Stichtag;Stichtag;Stichtag;Stichtag;Stichtag... | mit | -8,605,079,979,203,655,000 | 38.529412 | 143 | 0.709341 | false | -*- coding: utf-8 -*- | 21 | en | 0.767281 |
hexpl0it/plugin.video.genesi-ita | resources/lib/libraries/js2py/prototypes/jsarray.py | 1 | 14657 | def to_arr(this):
"""Returns Python array from Js array"""
return [this.get(str(e)) for e in xrange(len(this))]
ARR_STACK = set({})
class ArrayPrototype:
def toString():
# this function is wrong but I will leave it here fore debugging purposes.
func = this.get('join')
if not func.... | gpl-3.0 | 2,274,216,971,756,242,200 | 32.011261 | 116 | 0.492324 | false | Returns Python array from Js array
this function is wrong but I will leave it here fore debugging purposes. separator is simply a comma ','todo check todo check my own algorithmtodo check todo check do nothing 1-8 9 10-11 12 13 14-17 converted to js array automatically initial value present initial value present | 315 | en | 0.561872 |
Battleroid/yanker | yanker/yanker.py | 1 | 2508 | """
Yanker
Usage:
yanker [--threads=<tnum>]
"""
__version__ = '1.0.1'
import Queue
import threading
import youtube_dl as ydl
import pyperclip as clip
import time
from docopt import docopt
class ErrLogger(object):
def debug(self, msg):
pass
def warning(self, msg):
pass
def error(sel... | mit | -6,076,938,484,919,029,000 | 24.08 | 101 | 0.539474 | false | 0 | en | 0.110449 | |
Traumflug/Teacup_Firmware | configtool/calcscrew.py | 1 | 9429 | import wx
from configtool.data import BSIZESMALL, reFloat, offsetChLabel, offsetTcLabel
class CalcScrew(wx.Dialog):
def __init__(self, parent, font, cbUse):
wx.Dialog.__init__(
self,
parent,
wx.ID_ANY,
"Steps calculator for screw driven axes",
si... | gpl-2.0 | -6,171,746,121,561,787,000 | 26.814159 | 88 | 0.509492 | false | 0 | en | 0.110449 | |
BadWizard/Inflation | SPF/source/get_clean_GDP.py | 1 | 3646 |
def get_clean_HICP(data_dir="../data/",
output_dir="../clean_data/",
year=2016,
quarter=1):
'''
This function takes a raw csv file from SPF
and creates a new csv file with forecasts
only for HICP
'''
import pandas as pd
... | mit | 8,939,961,401,442,536,000 | 36.204082 | 91 | 0.472024 | false | This function takes a raw csv file from SPF
and creates a new csv file with forecasts
only for HICP
this is fixed list, will use it to create a new target this is the raw file name this is the name of the file that will be saved full path of the input file check if the input file exists find the row where the growth ... | 419 | en | 0.836874 |
factorlibre/carrier-delivery | delivery_carrier_mrw/model/stock.py | 1 | 8462 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2015 FactorLibre (http://www.factorlibre.com)
# Hugo Santos <hugo.santos@factorlibre.com>
#
# This program is free software: you... | agpl-3.0 | -7,478,398,197,497,246,000 | 40.024272 | 79 | 0.609869 | false | Add label generation for MRW
-*- encoding: utf-8 -*- OpenERP, Open Source Management Solution Copyright (C) 2015 FactorLibre (http://www.factorlibre.com) Hugo Santos <hugo.santos@factorlibre.com> This program is free software: you can redistribute it and/or modify it under the terms of t... | 1,540 | es | 0.360597 |
xlevus/python-diana | docs/source/conf.py | 1 | 9861 | # -*- coding: utf-8 -*-
#
# Diana documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 22 12:48:46 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | mit | -4,637,041,529,167,908,000 | 27.749271 | 82 | 0.689585 | false | -*- coding: utf-8 -*- Diana documentation build configuration file, created by sphinx-quickstart on Wed Jun 22 12:48:46 2016. This file is execfile()d with the current directory set to its containing dir. Note that not all possible configuration values are present in this autogenerated file. All configuration values ha... | 8,239 | en | 0.66767 |
alphagov/digitalmarketplace-admin-frontend | tests/app/main/views/test_outcomes.py | 1 | 9064 | import csv
import mock
import pytest
from dmtestutils.api_model_stubs import FrameworkStub
from ...helpers import LoggedInApplicationTest
class TestDirectAwardView(LoggedInApplicationTest):
def setup_method(self, method):
super().setup_method(method)
self.data_api_client_patch = mock.patch('app... | mit | -5,713,912,630,763,795,000 | 36.924686 | 107 | 0.492056 | false | convert byte-string to string checks if CSV is valid checks that only awarded outcomes are shown checks headers checks results | 126 | en | 0.731152 |
dc3-plaso/dfvfs | tests/path/os_path_spec.py | 1 | 1764 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the operating system path specification implementation."""
import platform
import unittest
from dfvfs.path import os_path_spec
from tests.path import test_lib
class OSPathSpecTest(test_lib.PathSpecTestCase):
"""Tests for the operating system path specificati... | apache-2.0 | -6,657,228,756,776,693,000 | 26.138462 | 73 | 0.674036 | false | Tests for the operating system path specification implementation.
Tests the path specification comparable property.
Tests the path specification initialization.
Tests the IsSystemLevel function.
Tests for the operating system path specification implementation.
!/usr/bin/python -*- coding: utf-8 -*- | 300 | en | 0.743174 |
georgeouzou/survgr | transform/migrations/0001_initial.py | 1 | 1205 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-22 14:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateMo... | mit | 4,114,823,400,723,477,000 | 33.428571 | 116 | 0.561826 | false | -*- coding: utf-8 -*- Generated by Django 1.9 on 2016-01-22 14:55 | 65 | en | 0.765993 |
fazalmajid/temboz | tembozapp/normalize.py | 1 | 32692 | # -*- coding: iso-8859-1 -*-
from __future__ import print_function
import sys, time, re, codecs, string, traceback, socket, hashlib
import unicodedata, requests, feedparser
from . import param, transform, util, porter2
import bleach
try:
import html.entities as htmlentitydefs
except ImportError:
import htmlentityd... | mit | -4,501,585,619,127,446,500 | 43.844993 | 173 | 0.580693 | false | Recursively dereference a URL
Escape entities for a XML target
Turn a string lower-case, including stripping accents
Case-insensitive replacement of the 1st occurrence of pat in s by repl
Sanitize text fields like title or feed description for XSS
-*- coding: iso-8859-1 -*- XXX TODO XXX normalize feed['title'] to quo... | 5,501 | en | 0.866865 |
a-krebs/finances | finances/finances/urls.py | 1 | 1583 | # Copyright (C) 2012 Aaron Krebs akrebs@ualberta.ca
# 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... | gpl-3.0 | 1,204,365,858,756,522,800 | 40.657895 | 86 | 0.749842 | false | Copyright (C) 2012 Aaron Krebs akrebs@ualberta.ca 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 i... | 941 | en | 0.859398 |
XD-embedded/xd-build-core | tests/recipe_file_test.py | 1 | 4304 | from xd.build.core.recipe_file import *
from case import *
import unittest
import io
class tests(unittest.case.TestCase):
def test_split_no_version(self):
name, version = RecipeFile.split_name_and_version('foo')
self.assertEqual(name, 'foo')
self.assertEqual(str(version), '')
def tes... | mit | 5,633,485,530,337,033,000 | 34.278689 | 77 | 0.619424 | false | 0 | en | 0.110449 | |
oztalha/weatherforecast | weather.py | 1 | 14123 | """
author Talha Oz
this is the main code implemented for cs780 class project
"""
# -*- coding: utf-8 -*-
import pandas as p
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
import re
from sklearn import cross_validation
import preprocessing as pre
from sklearn.naive_bayes import Multinom... | mit | -7,789,753,431,757,353,000 | 42.592593 | 290 | 0.705091 | false | -*- coding: utf-8 -*- Shink current axis by 20% Put a legend to the right of the current axisax.legend(('1','2'),('1a','2a'))legendkeys,legendvalues X_train1, X_test1, y_train, y_true = cross_validation.train_test_split(train['tweet'], y, test_size=.20, random_state = 0) X_train2, X_test2, y_train, y_true = cross_valid... | 4,168 | en | 0.372216 |
sjdv1982/seamless | docs/plans/big-data/testing.py | 1 | 12459 | """
Performance tests based on tests/highlevel/high-in-low6-memory.py
See also auth-*py.
- Data overhead is now at ~6.5 ms / MB.
A lot of the data overhead comes from json.dumps. This is to build mixed cells.
The rest is from get_hash.
Pure Python version (with get_hash and dumps) is at 6.3 ms / MB,
so the res... | mit | -8,654,298,033,990,642,000 | 34.804598 | 151 | 0.662332 | false | Performance tests based on tests/highlevel/high-in-low6-memory.py
See also auth-*py.
- Data overhead is now at ~6.5 ms / MB.
A lot of the data overhead comes from json.dumps. This is to build mixed cells.
The rest is from get_hash.
Pure Python version (with get_hash and dumps) is at 6.3 ms / MB,
so the rest of... | 2,268 | en | 0.694797 |
PuzzleboxIO/jigsaw-python | Puzzlebox/Jigsaw/Design_Plugin_Eeg.py | 1 | 34778 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'interface/puzzlebox_jigsaw_interface_design-plugin_eeg.ui'
#
# Created: Sun May 10 18:28:33 2015
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
... | agpl-3.0 | -5,169,383,353,182,562,000 | 77.328829 | 289 | 0.807637 | false | -*- coding: utf-8 -*- Form implementation generated from reading ui file 'interface/puzzlebox_jigsaw_interface_design-plugin_eeg.ui' Created: Sun May 10 18:28:33 2015 by: pyside-uic 0.2.15 running on PySide 1.2.2 WARNING! All changes made in this file will be lost!Form.resize() | 283 | en | 0.761299 |
pcaro90/Python-AES | ProgressBar.py | 1 | 1773 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ---------------------------------------------------
# Copyright (c) 2013 Pablo Caro. All Rights Reserved.
# Pablo Caro <me@pcaro.es> - http://pcaro.es/
# ProgressBar.py
# ---------------------------------------------------
import sys
class ProgressBar:
... | bsd-3-clause | 3,480,556,556,003,482,000 | 24.462687 | 79 | 0.478285 | false | !/usr/bin/env python -*- coding: utf-8 -*- --------------------------------------------------- Copyright (c) 2013 Pablo Caro. All Rights Reserved. Pablo Caro <me@pcaro.es> - http://pcaro.es/ ProgressBar.py --------------------------------------------------- | 257 | en | 0.269674 |
kefatong/ops | app/models.py | 1 | 24843 | # -*- coding:utf-8 -*-
__author__ = 'eric'
import hashlib
from datetime import datetime
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from werkzeug.security import generate_password_hash, check_password_hash
from flask.ext.login import UserMixin
from flask import current_app, request... | apache-2.0 | -4,587,166,439,716,651,500 | 34.864823 | 133 | 0.588358 | false | -*- coding:utf-8 -*- Email Address Username password Md5 Hash Role 鍏宠仈 Role table 鐪熷疄濮撳悕 鍦板潃 职位 鍏充簬鎴� 手机号码 QQ号码 娉ㄥ唽鏃堕棿 鏈�鍚庣櫥褰曟椂闂� 璐︽埛鐘舵�� 澶村儚 杩滄帶鍗P鍦板潃 鏄惁鍒犻櫎 澶囨敞 褰曞叆浜� 褰曞叆鏃堕棿 所属业务 褰曞叆浜� 褰曞叆鏃堕棿 澶囨敞 Hostname SN 璁惧搴忓垪鍙� os绫诲瀷 鐢熶骇鍟� 鍝佺墝 鍨嬪彿 CPU 鍨嬪彿 CPU 鏍告暟 鍐呭瓨瀹归噺 所属业务 电源状态 浣跨敤鐘舵�� 浣跨敤閮ㄩ棬 閮ㄩ棬浣跨敤浜� 涓昏鐢ㄩ�� 褰曞叆浜� 褰曞叆鏃堕棿 澶囨敞... | 729 | zh | 0.940259 |
gbjuno/coreprogramming | chapter7/7-6.py | 1 | 1400 | #!/usr/bin/env python
def stockDataSort(stockData,userInput):
stockDataAfterSort = {}
if userInput == None:
print "input wrong items"
exit(1)
else:
for i in stockData:
stockDataAfterSort[i[userInput]] = i
print "-----------------------------------"
for dataItem i... | mit | 1,574,336,147,322,682,400 | 32.333333 | 92 | 0.604286 | false | !/usr/bin/env python | 20 | fr | 0.225372 |
futurice/vdsm | vdsm/network/configurators/__init__.py | 1 | 5484 | # Copyright 2013-2014 Red Hat, Inc.
#
# 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... | gpl-2.0 | 1,205,282,231,433,251,600 | 33.708861 | 79 | 0.642232 | false | Update an interface's MTU when one of its users is removed.
:param iface: interface object (bond or nic device)
:type iface: NetDevice instance
:param ifaceVlans: vlan devices using the interface 'iface'
:type ifaceVlans: iterable
:return mtu value that was applied
returns None when all the nets were successfully ro... | 1,445 | en | 0.906411 |
dhermes/ncaa-bracket-scenarios | run_all_scenarios.py | 1 | 1579 | from __future__ import print_function
import itertools
import json
import pickle
from game_tree_classes import WinnerOf
import utils
with open(utils.SWEET16_PICKLE, 'r') as fh:
SLOTS_BEFORE = pickle.load(fh)
def complete_bracket(game_slots, choice_slots, choices):
result = game_slots.copy()
for slot_i... | apache-2.0 | -6,612,150,762,153,403,000 | 28.240741 | 74 | 0.639012 | false | 0 | en | 0.110449 | |
Gaia3D/QGIS | python/plugins/processing/algs/qgis/DeleteHoles.py | 1 | 2935 | # -*- coding: utf-8 -*-
"""
***************************************************************************
DeleteHoles.py
---------------------
Date : April 2015
Copyright : (C) 2015 by Etienne Trimaille
***************************************************************************... | gpl-2.0 | -8,316,699,685,901,509,000 | 35.246914 | 75 | 0.527768 | false | ***************************************************************************
DeleteHoles.py
---------------------
Date : April 2015
Copyright : (C) 2015 by Etienne Trimaille
***************************************************************************
* ... | 912 | en | 0.61793 |
smira/spamfighter | spamfighter/core/null_partner.py | 1 | 3199 | # -*- coding: utf-8 -*-
#
# SpamFighter, Copyright 2008, 2009 NetStream LLC (http://netstream.ru/, we@netstream.ru)
#
# This file is part of SpamFighter.
#
# SpamFighter 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 Fou... | gpl-3.0 | -2,622,230,818,337,814,000 | 30.840909 | 111 | 0.70414 | false | Партнер, авторизованный без логина/пароля (на доверии).
@ivar domain: корневой домен партнера
@type domain: L{BaseDomain}
Провайдер авторизации партнеров без логина/пароля (на доверии).
В этой ситуации доступ к СпамоБорцу ограничен с помощью других средств
(HTTP-proxy, firewall).
@ivar partner: единственный партнер,... | 1,512 | ru | 0.380948 |
lowitty/eeep | insertdb/insertmodeldata.py | 1 | 6340 | #encoding=utf-8
import MySQLdb, os
from django.core.checks.registry import Tags
def insertDomain(db):
cursor = db.cursor()
sql = "insert into %(table)s (%(para)s) values ('%(value)s')"
insertValues = {'table' : 'quotation_domain', 'para' : 'name', 'value' : 'CD'}
f = open(os.path.dirname(os.path.abspa... | mit | -8,395,665,122,548,171,000 | 37.90184 | 218 | 0.519085 | false | encoding=utf-8print sql % insertValuespassprint (sql % insertDatas).encode('utf-8')print exesqlinsertDomain(db)insertSubDomain(db)insertValuesWithForignKey(db, 'quotation_unitid', 'name', 'domain_id', "quotation_domain", "name")insertRegion(db, 'quotation_region', 'name', 'regionandcountry')insertValuesWithForignKey(db... | 576 | en | 0.077541 |
xen0l/ansible | lib/ansible/modules/cloud/vmware/vmware_vm_facts.py | 1 | 5877 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
... | gpl-3.0 | -3,481,050,722,794,838,500 | 31.832402 | 105 | 0.602008 | false | Function to get all virtual machines and related configurations information
!/usr/bin/python -*- coding: utf-8 -*- Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> Copyright: (c) 2018, Ansible Project GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) https://github.com/v... | 448 | en | 0.654545 |
googleapis/googleapis-gen | google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/services/entity_types/client.py | 1 | 38725 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 7,160,798,180,582,101,000 | 44.345433 | 180 | 0.601704 | false | Service for managing
[EntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityType].
Metaclass for the EntityTypes client.
This provides class-level methods for building and retrieving
support objects (e.g. transport) without polluting the client instance
objects.
Instantiates the entity types client.
Args:
credent... | 19,696 | en | 0.76407 |
CloudVE/djcloudbridge | djcloudbridge/drf_routers.py | 1 | 1991 | from django.conf.urls import url
from rest_framework import routers, viewsets
from rest_framework_nested import routers as nested_routers
class HybridRoutingMixin(object):
"""
Extends functionality of DefaultRouter adding possibility to register
simple API views, not just Viewsets.
Based on:
htt... | mit | 7,499,356,688,837,228,000 | 29.630769 | 104 | 0.64892 | false | Extends functionality of DefaultRouter adding possibility to register
simple API views, not just Viewsets.
Based on:
http://stackoverflow.com/questions/18818179/routing-api-views-in-django-rest-framework
http://stackoverflow.com/questions/18817988/using-django-rest-frameworks-browsable-api-with-apiviews
Checks if the v... | 678 | en | 0.756823 |
brentjens/rm-synthesis | doc/source/conf.py | 1 | 7970 | # -*- coding: utf-8 -*-
#
# RM-Synthesis documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 30 10:43:10 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... | mit | -7,558,729,425,361,679,000 | 31.933884 | 102 | 0.705019 | false | -*- coding: utf-8 -*- RM-Synthesis documentation build configuration file, created by sphinx-quickstart on Mon Jan 30 10:43:10 2012. This file is execfile()d with the current directory set to its containing dir. Note that not all possible configuration values are present in this autogenerated file. All configuration va... | 6,646 | en | 0.652478 |
Disiok/poetry-seq2seq | model.py | 1 | 22939 | #! /usr/bin/env python
#-*- coding:utf-8 -*-
# standard
import os
from IPython import embed
# framework
import tensorflow as tf
from tensorflow.contrib import seq2seq, rnn
from tensorflow.python.layers.core import Dense
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
class Seq2SeqModel:
"""
Seq2Seq model based on... | mit | -8,786,661,998,776,761,000 | 39.314587 | 128 | 0.594097 | false | ! /usr/bin/env python-*- coding:utf-8 -*- standard framework Build encoder and decoder networks Merge all the training summaries TODO(sdsuo): Understand dropout embedding_placeholder: [vocab_size, hidden_units] encode_inputs: [batch_size, time_steps] encoder_inputs_length: [batch_size] use dynamic batch_size based on i... | 2,790 | en | 0.657492 |
examachine/pisi | tests/constantstests.py | 1 | 2098 | # Copyright (C) 2005, TUBITAK/UEKAE
#
# 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.
#
# Please read the COPYING file.
... | gpl-3.0 | -8,041,903,705,030,690,000 | 29.852941 | 79 | 0.585796 | false | Copyright (C) 2005, TUBITAK/UEKAE 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. Please read the COPYING file. Author: Eray Oz... | 738 | en | 0.929081 |
michalczaplinski/pitchfork | tests/test_pitchfork.py | 1 | 1447 | from pitchfork.pitchfork import search, Review
import json
import unittest
class TestReview(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.review = search('mogwai', 'come on')
def test_review(self):
self.assertIsInstance(self.review, Review)
def test_review_album(self):
... | mit | 450,088,298,809,097,200 | 30.456522 | 109 | 0.665515 | false | 0 | en | 0.110449 | |
korepwx/tfsnippet | tests/trainer/test_base_trainer.py | 1 | 8778 | import functools
import numpy as np
import pytest
import tensorflow as tf
from mock import Mock
from tfsnippet.dataflows import DataFlow
from tfsnippet.scaffold import TrainLoop, AnnealingVariable, EventKeys
from tfsnippet.trainer import *
from tfsnippet.utils import EventSource
class BaseTrainerTestCase(tf.test.Te... | mit | -1,548,108,472,786,013,200 | 37.5 | 80 | 0.503418 | false | test add test remove test error add test default loss weight and merged feed dict test re-entrant error | 103 | en | 0.50903 |
mancoast/CPythonPyc_test | fail/312_test_platform.py | 1 | 7787 | import sys
import os
import unittest
import platform
import subprocess
from test import support
class PlatformTest(unittest.TestCase):
def test_architecture(self):
res = platform.architecture()
if hasattr(os, "symlink"):
def test_architecture_via_symlink(self): # issue3762
def get... | gpl-3.0 | -7,698,688,418,364,413,000 | 36.985366 | 113 | 0.516502 | false | issue3762 Old test. branch and revision are not "parsed", but fetched from sys.subversion. Ignore them Tests for python_implementation(), python_version(), python_branch(), python_revision(), python_build(), and python_compiler(). We're on a MacOSX system, check that the right version information is returned On Snow L... | 540 | en | 0.73625 |
promediacorp/flask-blog | post.py | 1 | 6890 | import datetime
import cgi
from bson.objectid import ObjectId
from helper_functions import *
class Post:
def __init__(self, default_config):
self.collection = default_config['POSTS_COLLECTION']
self.response = {'error': None, 'data': None}
self.debug_mode = default_config['DEBUG']
de... | mit | -2,047,660,337,586,939,400 | 36.650273 | 99 | 0.475907 | false | permalink = random_string(12) | 29 | en | 0.076697 |
andrewharvey/asgs-stylesheets | configure.py | 1 | 4492 | #!/usr/bin/env python
# Copyright (c) 2011, Development Seed, Inc.
# 2011, Andrew Harvey <andrew.harvey4@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#... | cc0-1.0 | 5,764,988,682,530,616,000 | 42.61165 | 168 | 0.672752 | false | !/usr/bin/env python Copyright (c) 2011, Development Seed, Inc. 2011, Andrew Harvey <andrew.harvey4@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistribut... | 1,989 | en | 0.855166 |
pedromagnus/kilink | kilink/kilink.py | 1 | 8947 | # Copyright 2011-2013 Facundo Batista
# All Rigths Reserved
"""The server and main app for kilink."""
import json
import logging
import time
from functools import update_wrapper
from flask import (
Flask,
jsonify,
make_response,
redirect,
render_template,
request,
)
from flask.ext.assets im... | gpl-3.0 | -927,307,090,625,272,600 | 27.676282 | 78 | 0.612831 | false | Copyright 2011-2013 Facundo Batista All Rigths Reserved set up flask flask-assets logger metrics need to fix the name because it's used by flask accesory pages views get the content get the treeAPI get the tree load config log setup set up the backend | 251 | en | 0.65208 |
locationlabs/confab | confab/options.py | 1 | 4182 | """
Options for managing Confab.
"""
from os import getcwd
from os.path import basename
from fabric.api import env, task
from fabric.utils import _AttributeDict
from difflib import unified_diff
from magic import Magic
from re import match
def _should_render(mime_type):
"""
Return whether a template file of ... | apache-2.0 | -6,501,699,333,116,751,000 | 24.345455 | 96 | 0.646341 | false | Context manager to temporarily set options.
Returns publicly names values in module's __dict__.
Return a diff using '---', '+++', and '@@' control lines.
By default, uses unified_diff.
Return the default filter func, which excludes temporary and internal files.
Returns the base directory for user's template and data d... | 1,791 | en | 0.801004 |
jpartogi/django-job-board | job_board/urls.py | 1 | 1230 | from django.conf.urls.defaults import *
from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap
from job_board.models import Job
from job_board.feeds import JobFeed
from job_board.forms import JobForm
from job_board.views import JobFormPreview, job_list, job_detail, job_search
feeds = {
'jobs': JobFee... | bsd-3-clause | 4,233,101,760,313,957,000 | 23.137255 | 86 | 0.604065 | false | This must be last after everything else has been evaluated | 58 | en | 0.978275 |
coco-project/coco | coco/core/auth/authentication_backends.py | 1 | 3945 | from coco.contract.errors import AuthenticationError, ConnectionError, \
UserNotFoundError
from coco.core.helpers import get_internal_ldap_connected, get_user_backend_connected
from coco.core.models import BackendGroup, BackendUser, \
CollaborationGroup
from django.contrib.auth.models import User
from django.co... | bsd-3-clause | -1,043,595,838,817,111,200 | 33.008621 | 106 | 0.586565 | false | Class used to authenticate with the user backends.
more info: https://docs.djangoproject.com/en/1.8/topics/auth/default/#django.contrib.auth.authenticate
:inherit.
Create the groups for the logging-in user.
:param name: The name of the group to create.
:param gid: The group's ID (on the backend).
Create the Django us... | 750 | en | 0.736664 |
ADL175/data-structures | src/graph.py | 1 | 7286 | """Creates a Graph data structure, featuring graph traversal and two shortest path algorithms."""
import timeit
import random
class Graph(object):
"""Define the Graph class structure."""
def __init__(self):
"""Make an empty dictionary."""
self.graph_dict = {}
def add_node(self, value):
... | mit | -7,696,677,436,234,390,000 | 34.198068 | 126 | 0.542136 | false | Define the Graph class structure.
Make an empty dictionary.
Ensure that nodes of val1 and val2 exist (creating them if they don't.Then make an edge connecting val1 to val2.
Check if node of given value exists in dictionary.If not, add it with an empty list.
Return True if edge exists, else return false.
An implementati... | 1,495 | en | 0.868954 |
Harmon758/discord.py | discord/client.py | 1 | 48861 | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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, merg... | mit | -2,710,249,609,055,593,000 | 32.238776 | 144 | 0.579951 | false | Represents a client connection that connects to Discord.
This class is used to interact with the Discord WebSocket and API.
A number of options can be passed to the :class:`Client`.
Parameters
-----------
max_messages: Optional[:class:`int`]
The maximum number of messages to store in the internal message cache.
... | 15,633 | en | 0.753231 |
twoodford/audiovisualizer | build-movie.py | 1 | 1391 | import os
import os.path
import subprocess
import sys
from PIL import Image
LISTF = "_list.txt"
def get_dimensions(fpath):
#print(fpath)
return Image.open(fpath).size
def run(folder, outfile, framerate=30, outres=(1920,1080)):
jpglist = [os.path.join(folder, f) for f in os.listdir(folder) if f.startswith(... | apache-2.0 | -3,590,627,063,179,411,500 | 37.638889 | 112 | 0.594536 | false | print(fpath) | 12 | en | 0.628882 |
dsweet04/rekall | rekall-lib/rekall_lib/registry.py | 1 | 5206 | # Rekall Memory Forensics
# Copyright (C) 2011
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Michael Cohen <scudette@gmail.com>
#
# ******************************************************
#
# * This program is free software; you can redistribute it and/or
# * modify it under the terms of the GNU General Public... | gpl-2.0 | -1,171,829,265,467,452,700 | 33.939597 | 87 | 0.619478 | false | Automatic Plugin Registration through metaclasses.
Give each object a unique ID.
unlike id() this number will not be reused when the objects are destroyed,
hence it can be used to identify identical objects without keeping these
around.
A property that can be called on classes.
This module implements a class registry.... | 2,252 | en | 0.870441 |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/available_providers_list_country.py | 1 | 1381 | # 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 | -3,422,688,781,120,634,400 | 36.324324 | 77 | 0.604634 | false | Country details.
:param country_name: The country name.
:type country_name: str
:param providers: A list of Internet service providers.
:type providers: list[str]
:param states: List of available states in the country.
:type states:
list[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListState]
coding=utf... | 762 | en | 0.552356 |
droark/bitcoin | test/functional/rpc_rawtransaction.py | 1 | 24591 | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the rawtransaction RPCs.
Test the following RPCs:
- createrawtransaction
- signrawtransacti... | mit | -347,579,343,606,388,000 | 55.143836 | 263 | 0.641373 | false | Dictionary that allows duplicate keys.
Constructed with a list of (key, value) tuples. When dumped by the json module,
will output invalid json with repeated keys, eg:
>>> json.dumps(multidict([(1,2),(1,2)])
'{"1": 2, "1": 2}'
Used to test calls to rpc methods with repeated keys in the json object.
Test the rawtransa... | 3,682 | en | 0.704729 |
utam0k/c3os | c3os/client.py | 1 | 1344 | import socket
import json
import time
import multiprocessing as mp
from c3os import utils
from c3os import conf
from c3os import db
from c3os.api.type import APITYPE
CONF = conf.CONF
def start():
""" Start client service """
mp.Process(target=client).start()
def client():
""" client main routine """
... | mit | -5,227,906,240,231,535,000 | 23.888889 | 75 | 0.594494 | false | client main routine
Information on its DB is sent to other c3os.
Args:
db_pool (DBPool): DBPool class.
Returns:
None:
Start client service | 148 | en | 0.842371 |
plotly/python-api | packages/python/plotly/plotly/figure_factory/_annotated_heatmap.py | 1 | 10195 | from __future__ import absolute_import, division
from plotly import exceptions, optional_imports
import plotly.colors as clrs
from plotly.figure_factory import utils
from plotly.graph_objs import graph_objs
from plotly.validators.heatmap import ColorscaleValidator
# Optional imports, may be None for users that only u... | mit | -5,518,445,393,110,075,000 | 32.316993 | 87 | 0.567043 | false | Refer to TraceFactory.create_annotated_heatmap() for docstring
Function that creates annotated heatmaps
This function adds annotations to each cell of the heatmap.
:param (list[list]|ndarray) z: z matrix to create heatmap.
:param (list) x: x axis labels.
:param (list) y: y axis labels.
:param (list[list]|ndarray) ann... | 2,972 | en | 0.641721 |
gangadhar-kadam/sapphire_app | accounts/report/budget_variance_report/budget_variance_report.py | 1 | 4626 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes import _, msgprint
from webnotes.utils import flt
import time
from accounts.utils import get_fiscal_year
from controllers.trends import ... | agpl-3.0 | 6,781,928,573,172,004,000 | 35.722222 | 93 | 0.68396 | false | Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. License: GNU General Public License v3. See license.txtGet cost center & target detailsGet target distribution details of accounts of cost centerGet actual details from gl entry | 230 | en | 0.542669 |
kdeldycke/meta-package-manager | meta_package_manager/tests/test_platform.py | 1 | 4103 | # Copyright Kevin Deldycke <kevin@deldycke.com> and contributors.
# All Rights Reserved.
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) ... | gpl-2.0 | 920,887,995,347,523,500 | 28.307143 | 77 | 0.645625 | false | Check all managers are accounted for on each platforms.
Copyright Kevin Deldycke <kevin@deldycke.com> and contributors. All Rights Reserved. This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either ve... | 1,079 | en | 0.86254 |
sunqm/pyscf | pyscf/mcscf/test/test_newton_casscf.py | 1 | 4618 | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | apache-2.0 | 7,542,723,317,859,126,000 | 34.251908 | 82 | 0.621914 | false | !/usr/bin/env python Copyright 2014-2018 The PySCF Developers. 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 a... | 694 | en | 0.854958 |
Hammer2900/SunflowerX | application/tools/find_files.py | 1 | 13799 | import os
import gtk
import user
import pango
import gobject
from threading import Thread, Event
class Column:
ICON = 0
NAME = 1
DIRECTORY = 2
class FindFiles(gobject.GObject):
"""Find files tool"""
__gtype_name__ = 'Sunflower_FindFiles'
__gsignals__ = {
'notify-start': (gobject.SI... | gpl-3.0 | -399,886,151,447,045,440 | 32.250602 | 94 | 0.560838 | false | Find files tool
Create rename extensions
Threaded find files method
Handle actions on list
Update button status
Update status label with current scanning path
Show 'FileChooser' dialog
Close window
Handle pressing keys
Start searching for files
Stop searching for files
store parameters thread control object configure... | 1,543 | en | 0.703232 |
bdang2012/taiga-back-casting | tests/unit/test_timeline.py | 1 | 3510 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2015 Anler Hernández <hello@anler.me>
# This program is free software: you can redistribute it and/or modify
# it under ... | agpl-3.0 | -5,399,271,881,389,798,000 | 42.296296 | 111 | 0.687482 | false | Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> Copyright (C) 2014-2015 Anler Hernández <hello@anler.me> This program is free software: you can redistribute it and/or modify it under the terms of... | 860 | en | 0.819366 |
trnewman/VT-USRP-daughterboard-drivers_python | gr-wxgui/src/python/numbersink.py | 1 | 25273 | #!/usr/bin/env python
#
# Copyright 2003,2004,2005,2006,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 | 1,420,374,950,807,376,000 | 40.161238 | 158 | 0.585328 | false | !/usr/bin/env python Copyright 2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio 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, or (at your optio... | 5,236 | en | 0.483159 |
icebreaker/pyGLox | demo/particlesystem.py | 1 | 1664 | """
Copyright (c) 2011, Mihail Szabolcs
All rights reserved.
See LICENSE for more information.
"""
import random
import math
from pyglet.gl import *
class Particle(object):
def __init__(self):
self.p = [0,0,0]
self.a = 1
self.dx = (random.random() - 0.5)
self.dy = (random.random() - 0.5)
def update(s... | mit | 7,980,364,552,582,119,000 | 21.794521 | 57 | 0.640625 | false | Copyright (c) 2011, Mihail Szabolcs
All rights reserved.
See LICENSE for more information.
glColor4f(1, 0.6, 0.0, self.a)glPointParameterf(GL_POINT_FADE_THRESHOLD_SIZE, 60.0);glPointParameterf(GL_POINT_SIZE_MIN, 30.0);glPointParameterf(GL_POINT_SIZE_MAX, 40.0); | 263 | en | 0.384646 |
dnaextrim/django_adminlte_x | adminlte/static/plugins/datatables/extensions/Responsive/examples/initialisation/index.html.py | 1 | 2778 | XXXXXXXXX XXXXX
XXXXXX
XXXXXX
XXXXX XXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXX X... | mit | -3,221,245,733,640,435,000 | 41.753846 | 160 | 0.861411 | false | 0 | en | 0.110449 | |
mne-tools/mne-python | mne/tests/test_annotations.py | 1 | 53208 | # Authors: Jaakko Leppakangas <jaeilepp@student.jyu.fi>
# Robert Luke <mail@robertluke.net>
#
# License: BSD 3 clause
from collections import OrderedDict
from datetime import datetime, timezone
from itertools import repeat
import sys
import os.path as op
import pytest
from pytest import approx
from numpy.te... | bsd-3-clause | -2,619,110,020,765,893,600 | 39.431611 | 79 | 0.596583 | false | Create a raw object with annotations from descriptions.
The returning raw object contains as many annotations as description given.
All starting at `annotation_start_sampl`.
Create csv file for testing.
Create txt file for testing.
Deal with "n/a" strings in BIDS events with nan durations.
Test description sanitizing.... | 5,691 | en | 0.761194 |
andrewsosa/hackfsu_com | api/api/views/hackathon/get/stats.py | 2 | 4468 | """
Get public statistics for current hackathon
"""
from django import forms
from django.http.request import HttpRequest
from hackfsu_com.views.generic import ApiView
from hackfsu_com.util import acl
from api.models import Hackathon, HackerInfo, MentorInfo, JudgeInfo, OrganizerInfo, AttendeeStatus
from django.utils... | apache-2.0 | 7,364,637,496,740,350,000 | 47.043011 | 113 | 0.643912 | false | Get public statistics for current hackathon | 43 | en | 0.779734 |
sevein/archivematica | src/dashboard/src/contrib/utils.py | 1 | 2104 | # This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica 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 ... | agpl-3.0 | 4,646,505,071,088,285,000 | 32.396825 | 123 | 0.681559 | false | Attempts to extract a directory name given a transfer or SIP path. Expected format:
%sharedPath%watchedDirectories/workFlowDecisions/createDip/ImagesSIP-69826e50-87a2-4370-b7bd-406fc8aad94f/
Given this example, this function would return 'ImagesSIP'.
If the optional `default` keyword argument is passed in, the provid... | 1,165 | en | 0.785005 |
basak/netkeyscript | netkeyscript-send.py | 1 | 2002 | #!/usr/bin/python
# Copyright 2012 Robie Basak
#
# 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, p... | mit | -4,701,440,638,697,542,000 | 32.932203 | 78 | 0.720779 | false | !/usr/bin/python Copyright 2012 Robie Basak 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, distri... | 1,064 | en | 0.867519 |
algolia/algoliasearch-django | tests/settings.py | 1 | 2390 | """
Django settings for core project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
import os
BAS... | mit | 176,922,860,896,906,560 | 25.555556 | 70 | 0.667364 | false | Django settings for core project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
Application definition... | 373 | en | 0.685364 |
all-of-us/raw-data-repository | rdr_service/tools/update_release_tracker.py | 1 | 2190 | #!/usr/bin/env python
"""Updates JIRA release notes when deploying to an environment.
This requires the
JIRA_API_USER_PASSWORD and
JIRA_API_USER_NAME
environment variables to be set, and flags for version and instance to be provided.
"""
import logging
import os
import sys
import jira
from rdr_service.main_... | bsd-3-clause | -2,994,243,296,558,638,600 | 36.118644 | 113 | 0.66895 | false | Updates JIRA release notes when deploying to an environment.
This requires the
JIRA_API_USER_PASSWORD and
JIRA_API_USER_NAME
environment variables to be set, and flags for version and instance to be provided.
!/usr/bin/env python Release tickets are moved from our usual project, DA, to the PD project for chan... | 384 | en | 0.844007 |
mark-r-g/hydrus | tests/test_model.py | 1 | 1242 | # Mark Gatheman <markrg@protonmail.com>
#
# This file is part of Hydrus.
#
# Hydrus 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.
#
... | gpl-3.0 | -6,105,238,677,537,839,000 | 37.8125 | 70 | 0.741546 | false | Mark Gatheman <markrg@protonmail.com> This file is part of Hydrus. Hydrus 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. Hydrus is distribu... | 660 | en | 0.911181 |
google/earthengine-community | samples/python/apidocs/ee-dictionary-select.py | 1 | 1194 | # Copyright 2021 The Google Earth Engine Community Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | -7,978,989,095,025,099,000 | 38.8 | 74 | 0.697655 | false | Copyright 2021 The Google Earth Engine Community Authors 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to ... | 747 | en | 0.830034 |
AdaptivePELE/AdaptivePELE | AdaptivePELE/analysis/crossValidationClustering.py | 1 | 3872 | from __future__ import absolute_import, division, print_function, unicode_literals
import os
import argparse
import matplotlib.pyplot as plt
import numpy as np
import pyemma.coordinates as coor
import pyemma.msm as msm
from AdaptivePELE.freeEnergies import cluster
plt.switch_backend("pdf")
plt.style.use("ggplot")
def... | mit | -8,509,077,382,591,035,000 | 44.552941 | 102 | 0.612603 | false | Create command-line interface
cluster data | 44 | en | 0.441508 |
GoogleCloudPlatform/sap-deployment-automation | third_party/github.com/ansible/awx/awx/main/tests/functional/api/test_unified_job_template.py | 1 | 2858 | import pytest
from awx.api.versioning import reverse
from awx.main import models
@pytest.mark.django_db
def test_aliased_forward_reverse_field_searches(instance, options, get, admin):
url = reverse('api:unified_job_template_list')
response = options(url, None, admin)
assert 'job_template__search' in resp... | apache-2.0 | -8,665,169,606,486,610,000 | 32.623529 | 108 | 0.580126 | false | Test case reflects historical bug where ordinary users got weird error
message when editing an orphaned project | 111 | en | 0.504271 |
cloew/KaoJson | kao_json/Test/test_conversion_config.py | 1 | 1361 | from .class_hierarchy import A, AChild, AGrandchild
from ..conversion_config import ConversionConfig
import unittest
class find(unittest.TestCase):
""" Test cases of find """
def test_matchingClassFound(self):
""" Test that a matching class is found properly """
expected = "Dummy Conf... | mit | -7,443,373,079,876,724,000 | 33.05 | 71 | 0.62601 | false | Test cases of find
Test cases of newConverter
Test that the Converter was built properly
Test that a matching descendant class is found properly
Test that a matching class is found properly
Test that when no match is found, None is returned | 245 | en | 0.935343 |
agx/git-buildpackage | gbp/deb/rollbackgit.py | 1 | 5051 | # vim: set fileencoding=utf-8 :
#
# (C) 2018 Guido Günther <agx@sigxcpu.org>
"""A git repository for Debian packages that can roll back operations"""
from .. import log
from .. git import GitRepositoryError
from . git import DebianGitRepository
class RollbackError(GitRepositoryError):
"""
Error raised if th... | gpl-2.0 | 3,977,356,638,823,929,300 | 36.671642 | 118 | 0.565571 | false | Like a DebianGitRepository but can also perform rollbacks and knows
about some of the inner workings upstream vcs_tag, …
Error raised if the rollback failed
Perform a complete rollback
Try to roll back as much as possible and remember what failed.
Remember ref for rollback
@param refname: ref to roll back
@param acti... | 693 | en | 0.786752 |
conversationai/wikidetox | experimental/conversation_go_awry/feature_extraction/utils/write_lexicons.py | 1 | 1163 | import json
lexicon = {
'pron_me': ['i', "i'd", "i'll", "i'm", "i've", 'id', 'im', 'ive',
'me', 'mine', 'my', 'myself'],
'pron_we': ["let's", 'lets', 'our', 'ours', 'ourselves', 'us',
'we', "we'd", "we'll", "we're", "we've", 'weve'],
'pron_you': ["y'all", 'yall', 'you', "you... | apache-2.0 | -5,095,081,116,083,255,000 | 40.535714 | 75 | 0.468616 | false | 0 | en | 0.110449 | |
hcrlab/access_teleop | limb_manipulation/src/limb_pbd_server_with_moveit_commander.py | 1 | 43291 | #! /usr/bin/env python
import rospy
import math
from pprint import pprint
import numpy as np
import fetch_api
from std_msgs.msg import String, Header, ColorRGBA, Bool
from std_srvs.srv import Empty
from image_geometry import PinholeCameraModel
import tf
import tf.transformations as tft
# from tf import TransformBroadc... | mit | -8,208,984,794,664,362,000 | 40.827053 | 150 | 0.642281 | false | ! /usr/bin/env python from tf import TransformBroadcaster maximum times to retry if a transform lookup fails colors for trajectory visualization Vector3(0.055, 0.009, 0.009) body parts and their corresponding ID and actions , "right leg medial rotation", "right leg lateral rotation"],, "left leg medial rotation", "left... | 5,250 | en | 0.759712 |
mmktomato/zenmai-bts | test/test_zenmai.py | 1 | 15025 | """Unit test"""
import unittest
import re
import io
from datetime import datetime, timedelta
from flask import request, session
from . import ctx
from .zenmai_test_utils import create_issue, create_comment, create_attached_file, create_user, \
login, logout, delete_all_issues
from web.m... | mit | 1,231,649,006,724,835,000 | 40.969274 | 164 | 0.568053 | false | TestCase class
Helper method of 403 assertion.
Helper method of issue detail page assertion.
Args:
data (string): HTTP Response body.
subject (string): Regex string of subject.
body (string): Regex string of body.
pub_date (datetime): pub_date.
state_name (string): Regex string of state name.
a... | 1,500 | en | 0.746566 |
MrBhendel/Cirrus | ModulusList.py | 1 | 1374 | import sys
from abc import ABCMeta, abstractmethod
class ModulusList:
'''
Maintains a list of (host, modulus, e) tuples.
'''
__metaclass__ = ABCMeta
def __init__(self):
self._modulusList = []
def addModulusList(self, other):
for i in range(0, other.length()):
item = other[i]
self.add(item[0], item[... | mit | 1,942,632,575,379,380,700 | 19.818182 | 53 | 0.6754 | false | Maintains a list of (host, modulus, e) tuples. | 46 | en | 0.510229 |
kshimasaki/ML-fMRI-Pipeline | Python_Code/dendrogram_specific_file.py | 1 | 6075 | import scipy
import scipy.cluster.hierarchy as sch
import matplotlib.pylab as plt
import matplotlib.axes
import scipy.io as scio
import os
import numpy
import sklearn.metrics.pairwise
import scipy.spatial.distance
import sys
def cluster(network, subjects_or_features, gt_append , method_name):
os.chdir('/Volumes/TITAN... | gpl-2.0 | 5,425,072,207,551,465,000 | 33.913793 | 207 | 0.677695 | false | for root, dirs, files in os.walk('/Volumes/TITAN/Workingdir/Studies/Space_Fortress/Inputs/Neurodata/Features/Learn_Features/Sub/'+network+'_from_'+network+'/Uncontrolled/No_GT/'+gt_append, topdown=False):for matrix in files:if matrix.endswith("_Features.mat"): featuressubjectsd = sch.distance.pdist(data, 'euclidea... | 2,426 | en | 0.272591 |
pf4d/dolfin-adjoint | dolfin_adjoint/adjrhs.py | 1 | 10667 | import libadjoint
import backend
import ufl
import ufl.algorithms
import adjglobals
import adjlinalg
import utils
def find_previous_variable(var):
''' Returns the previous instance of the given variable. '''
for timestep in range(var.timestep, -1, -1):
prev_var = libadjoint.Variable(var.name, timestep... | lgpl-3.0 | -4,020,333,220,749,036,500 | 38.507407 | 167 | 0.630355 | false | RHS is a adjlinalg.Vector. Find the dolfin Function corresponding to variable. RHS is a adjlinalg.Vector. Its derivative is therefore zero. Find the dolfin Function corresponding to variable. RHS is a adjlinalg.Vector. Its derivative is therefore zero. We want to mark that the RHS term /also/ depends on the previous va... | 772 | en | 0.879138 |
loadimpact/http2-test | fabfile.py | 1 | 11989 | """
We need two special hostnames to connect to:
StationA
and
StationB
"""
from __future__ import with_statement, print_function
from fabric.api import local, settings, abort, run, sudo, cd, hosts, env, execute
from fabric.contrib.console import confirm
from fabric.operations import put, get
from fabric.contri... | bsd-3-clause | -2,658,566,617,386,937,000 | 29.820051 | 131 | 0.63967 | false | Copies code to StationA
Copies both the chrome plugin and the DNSMasq watcher
Copies the ca certificate to the home...
Copies Openssl and curl to the target hosts...
We need two special hostnames to connect to:
StationA
and
StationB
TODO: Put a proper deployment mechanism here. TODO: Make the IP numb... | 595 | en | 0.713275 |
iceflow/aws-demo | s3/s3-bucket-copy/existing-bucket-copy/solutions/2-different-account-same-region/check_sqs_list.py | 1 | 1564 | #!/usr/bin/python
# -*- coding: utf8 -*-
from pprint import pprint
import sys,os
import random
import json
import gzip
import random
import boto3
s3 = boto3.resource('s3')
client = boto3.client('sqs')
QUEUE_ENDPOINT='https://eu-west-1.queue.amazonaws.com/888250974927/s3-copy-list'
DST_BUCKET='ireland-leo-test'
de... | gpl-3.0 | 2,473,053,559,471,726,000 | 25.066667 | 137 | 0.641944 | false | !/usr/bin/python -*- coding: utf8 -*-print('check_queue_status(%s)'%(qurl))return {'number':0}pprint(response){u'Attributes': {'ApproximateNumberOfMessages': '1',print('%04d/%04d : %s'%(message_number, not_visiable_message_number, qurl)) | 237 | en | 0.206167 |
burunduk3/testsys | console.py | 1 | 19930 | #!/usr/bin/env python3
import argparse, select, socket, sys, termios, time
from dts import config
from dts.protocol import Packet, PacketParser
class Console:
NORMAL, LOCK, WAIT = range(3)
def __init__( self, tab, command ):
self.state = Console.NORMAL
self.value = None
self.__line = '... | gpl-3.0 | 7,367,696,288,431,108,000 | 36.91619 | 174 | 0.550035 | false | !/usr/bin/env python3 TODO: calculate width using termios and renew it using SIGWINCH zsh style TODO: setup keys for different terminals Ctrl+← Ctrl+→ Ctrl+W TODO: optimize with prefix tree TODO: default port 17240, or not console.write("[debug] work with packet %s\n" % str(packet)) TODO: check for ignored keys console... | 6,329 | en | 0.305045 |
deculler/DataScienceTableDemos | CalGrads/timetable.py | 1 | 7684 | from datascience import Table
import numpy as np
from scipy.interpolate import UnivariateSpline
class TimeTable(Table):
"""Table with a designated column as a sequence of times in the first column."""
def __init__(self, *args, time_column = 'Year'):
Table.__init__(self, *args)
self.time_column... | bsd-2-clause | 1,163,413,192,845,707,000 | 40.989071 | 125 | 0.587585 | false | Table with a designated column as a sequence of times in the first column.
Apply a function to the non-time columns of TimeTable.
Construct a time table by aggregating rows of each category by year.
Construct a TimeTableable of successive differences down each non-time column.
Project a TimeTable forward from last inte... | 989 | en | 0.826566 |
elliotthill/django-oscar | oscar/apps/order/migrations/0019_auto__chg_field_order_billing_address__chg_field_order_user__chg_field.py | 1 | 37418 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing ... | bsd-3-clause | -2,684,955,528,462,074,000 | 90.043796 | 224 | 0.562163 | false | -*- coding: utf-8 -*- Changing field 'Order.billing_address' Changing field 'Order.user' Changing field 'Order.shipping_address' Changing field 'Order.billing_address' Changing field 'Order.user' Changing field 'Order.shipping_address' | 235 | en | 0.669378 |
danger89/stanford-parser-clientserver | stanford_server.py | 1 | 3076 | #!/usr/bin/env jython
# -*- coding: utf-8 -*-
# Copyright 2014 by Melroy van den Berg
"""
Stanford Parser Server running on localhost
Requirements
------------
- Jython >= 2.7 (http://www.jython.org/downloads.html)
- Pyro4 (https://github.com/irmen/Pyro4)
"""
__author__ = "Melroy van den Berg <melroy@melroy.org>"
_... | apache-2.0 | 5,812,613,648,402,874,000 | 29.156863 | 92 | 0.75065 | false | Helper class around the StanfordParser class
Setup the Stanford Parser
Parse the word list
Stanford Parser Server running on localhost
Requirements
------------
- Jython >= 2.7 (http://www.jython.org/downloads.html)
- Pyro4 (https://github.com/irmen/Pyro4)
!/usr/bin/env jython -*- coding: utf-8 -*- Co... | 929 | en | 0.688848 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.