repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
rodrigolucianocosta/ProjectParking | ProjectParking/Parking/django-localflavor-1.1/tests/test_generic.py | 1 | 12114 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ValidationError, ImproperlyConfigured
from django.test import SimpleTestCase, TestCase
from django.utils import formats
from localflavor.generic.models import BICField, IBANField
from localflavor.generic.validators impo... | mpl-2.0 | 2,808,876,877,879,975,000 | 38.581699 | 117 | 0.621697 | false |
nprapps/dailygraphics | fabfile/flat.py | 1 | 2586 | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
import copy
from fnmatch import fnmatch
import hashlib
import mimetypes
import os
from boto.s3.key import Key
import app_config
import utils
def deploy_file(src, dst, headers={}):
"""
Deploy a single file to S3, if the local version is different.
"""
bucke... | mit | -9,011,076,063,537,600,000 | 24.60396 | 71 | 0.549884 | false |
Diblo/Pikaptcha | pikaptcha/console.py | 1 | 9224 | import argparse
import sys
import pikaptcha
from pikaptcha.ptcexceptions import *
from pikaptcha.tos import *
from pikaptcha.gmailv import *
from pikaptcha.url import *
from pgoapi.exceptions import AuthException, ServerSideRequestThrottlingException, NotLoggedInException
import pprint
import threading
import getopt
... | gpl-3.0 | -3,893,772,485,044,673,500 | 44.215686 | 163 | 0.591067 | false |
csaez/mauto | mauto/tests/main_tests.py | 1 | 1059 | import mauto
from nose import with_setup
def setup():
return mauto.new_macro("testsuite")
def setup_in_memory():
return mauto.new_macro("testsuite", save=False)
def teardown():
mauto.remove_macro("testsuite")
@with_setup(setup, teardown)
def test_list_macros():
return len(mauto.list_macros()) >=... | mit | 2,857,118,178,507,721,700 | 17.578947 | 51 | 0.691218 | false |
ScottBuchanan/eden | modules/s3db/deploy.py | 1 | 114755 | # -*- coding: utf-8 -*-
""" Sahana Eden Deployments Model
@copyright: 2011-2015 (c) Sahana Software Foundation
@license: MIT
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 w... | mit | -2,361,572,793,898,173,000 | 39.250789 | 140 | 0.406309 | false |
DavidNorman/tensorflow | tensorflow/python/ops/parallel_for/array_test.py | 1 | 11942 | # 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 | 4,554,197,278,193,086,500 | 29.699229 | 88 | 0.595629 | false |
ip-tools/ip-navigator | patzilla/util/web/uwsgi/uwsgidecorators.py | 1 | 9668 | # https://github.com/unbit/uwsgi/blob/master/uwsgidecorators.py
from functools import partial
import sys
from threading import Thread
try:
import cPickle as pickle
except:
import pickle
import uwsgi
if uwsgi.masterpid() == 0:
raise Exception(
"you have to enable the uWSGI master process to use th... | agpl-3.0 | 957,391,275,148,115,200 | 23.789744 | 102 | 0.543029 | false |
perrygeo/Fiona | fiona/transform.py | 4 | 3374 | """Coordinate and geometry warping and reprojection"""
from fiona._transform import _transform, _transform_geom
def transform(src_crs, dst_crs, xs, ys):
"""Transform coordinates from one reference system to another.
Parameters
----------
src_crs: str or dict
A string like 'EPSG:4326' or a di... | bsd-3-clause | -7,297,159,703,876,337,000 | 35.673913 | 76 | 0.635448 | false |
thopiekar/Uranium | UM/View/RenderBatch.py | 1 | 14238 | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
import copy
from UM.Logger import Logger
from UM.Math.Vector import Vector
from UM.View.GL.OpenGL import OpenGL
from UM.View.GL.OpenGLContext import OpenGLContext
from PyQt5.QtGui import QOpenGLVertexArrayObject
ver... | lgpl-3.0 | -598,423,587,618,263,700 | 43.914826 | 200 | 0.631128 | false |
nate1001/chess_jay | gui.py | 1 | 5079 | '''
Copyright Nate Carson 2012
'''
from PyQt4 import QtCore, QtGui, QtSvg
import db
import data
def setAttackSum(self, forces):
for force in forces:
self._squares[force.tid].setAttackSum(force.c_white, force.c_black)
def setAttackSum(self, c_white, c_black):
c_white, c_black = c_white or 0, c_black o... | gpl-3.0 | -2,556,928,310,813,353,500 | 21.674107 | 97 | 0.689703 | false |
jimsrc/seatos | mixed/figs/sheaths.paper/src/together4.py | 1 | 11024 | #!/usr/bin/env ipython
from pylab import *
import numpy as np
import console_colors as ccl
from scipy.io.netcdf import netcdf_file
import os, sys
import matplotlib.patches as patches
import matplotlib.transforms as transforms
from numpy import array
from matplotlib.gridspec import GridSpec
import matplotlib.pyplot as p... | mit | 3,020,075,155,036,923,400 | 35.026144 | 124 | 0.444757 | false |
wevoice/wesub | apps/videos/templatetags/recent_activity.py | 1 | 1465 | # Amara, universalsubtitles.org
#
# Copyright (C) 2013 Participatory Culture Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your op... | agpl-3.0 | 1,169,272,093,930,581,000 | 29.520833 | 74 | 0.734471 | false |
jenca-cloud/jenca-authentication | storage/storage.py | 1 | 6752 | """
A storage service for use by a Jenca Cloud authentication service.
"""
import os
from flask import Flask, json, jsonify, request, make_response
from flask.ext.sqlalchemy import SQLAlchemy
from flask_jsonschema import JsonSchema, ValidationError
from flask_negotiate import consumes
from requests import codes
db... | mit | -8,743,100,910,322,706,000 | 30.551402 | 79 | 0.659656 | false |
wxwilcke/MINOS | directives/optima_D1.MP.py | 1 | 8757 | #!/usr/bin/python3
import logging
from operator import itemgetter
from multiprocessing import Process, Manager, Pool, cpu_count
from functools import partial
from math import floor
from timeit import default_timer as timer
import rdflib
from .abstract_instruction_set import AbstractInstructionSet
from readers import r... | gpl-3.0 | 6,560,480,861,544,011,000 | 35.18595 | 111 | 0.518328 | false |
robotichead/NearBeach | tests/settings.py | 1 | 3530 | """
Django Settings for TESTING PURPOSES
Do not utilise this settings.py file for your own project. Even if it is not
a production environment.
This file is only for the automatic testing and is not build for server use.
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR ... | mit | 4,166,642,644,931,561,000 | 24.955882 | 91 | 0.665722 | false |
CleverChuk/ices | Python/multijob_module.py | 1 | 3479 | """
Author: Chukwubuikem Ume-Ugwa
Email: chubiyke@gmail.com
MIT License
Copyright (c) 2017 CleverChuk
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 limit... | mit | -8,221,127,842,817,743,000 | 22.666667 | 83 | 0.716873 | false |
rudisherry666/paigow | mainsite/settings.py | 1 | 6720 | # Django settings for paigow project.
import os
import sys
# The project starts at mainsite/ rather than top-level at the application,
# but we use a lot of things from the paigow/ folder. Create a global for
# the paigow folder as well.
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)) # mainsite/
(PAIGO... | apache-2.0 | 5,428,095,244,374,039,000 | 32.768844 | 86 | 0.70372 | false |
puiterwijk/HttpCA | Signer/httpca_signer/database.py | 1 | 1817 | # Copyright (c) 2013, Patrick Uiterwijk <puiterwijk@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:
# * Redistributions of source code must retain the above copyright
# notice... | bsd-3-clause | -9,116,164,682,939,716,000 | 55.78125 | 96 | 0.773803 | false |
mola/qgis | python/plugins/GdalTools/tools/widgetPluginBase.py | 1 | 5107 | # -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from dialogBase import GdalToolsBaseDialog as BaseDialog
import GdalTools_utils as Utils
class GdalToolsBasePluginWidget:
def __init__(self, iface, commandName, helpFileBaseName = None, paren... | gpl-2.0 | 3,448,043,704,059,595,300 | 30.91875 | 118 | 0.644801 | false |
ImpregnableProgrammer/Advent-of-Code | 2016/Day_10.py | 1 | 2375 | import re
# First Part
def First_Part(s):
Bot_Dict = {}
g=0
s=s.split('\n')
while 1:
p=re.sub('(?<=output )\d+',lambda k:str(-int(k.group(0))-1),s[g%len(s)])
G=re.findall('-?\d+',p)
if p[:3]=='bot' and G[0] in Bot_Dict.keys() and len(Bot_Dict[G[0]])>1:
if sorted(Bot_Dict[G[0]]... | gpl-3.0 | -5,439,650,238,929,213,000 | 35.538462 | 145 | 0.442526 | false |
clld/clldfabric | clldfabric/varnish.py | 1 | 2713 | """
deploy with varnish:
- apt-get install varnish
- create /etc/default/varnish
- create /etc/varnish/main.vcl
- create /etc/varnish/sites.vcl
- create /etc/varnish/sites/
(and require it to contain the correct include!)
- create /etc/varnish/sites/{app.name}.vcl
- /etc/init.d/varnish restart
- adapt nginx site con... | apache-2.0 | -8,543,023,170,142,532,000 | 27.260417 | 84 | 0.653151 | false |
udrg/kalibr | aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccCalibrator.py | 4 | 9778 | import aslam_backend as aopt
import aslam_splines as asp
import IccUtil as util
import incremental_calibration as inc
import kalibr_common as kc
import sm
import gc
import numpy as np
import multiprocessing
import sys
# make numpy print prettier
np.set_printoptions(suppress=True)
CALIBRATION_GROUP_ID = 0
HELPER_GROU... | bsd-3-clause | 5,931,766,575,764,862,000 | 40.786325 | 141 | 0.614645 | false |
bruckhaus/challenges | python_challenges/project_euler/p003_largest_prime_factor.py | 1 | 1769 | __author__ = 'tilmannbruckhaus'
# Largest prime factor
# Problem 3
# The prime factors of 13195 are 5, 7, 13 and 29.
# What is the largest prime factor of the number 600851475143 ?
class LargestPrimeFactor:
def __init__(self):
pass
@staticmethod
def is_divisible(number, divisor):
return ... | mit | 2,894,715,118,117,097,500 | 28.483333 | 70 | 0.573205 | false |
mfriesen/tentacle | src/tentacle/dht/dht_bucket_routing_table.py | 1 | 4577 | from tentacle.dht.routing_table import DHTRoutingTable, distance
from math import pow
MAX_BUCKET_SIZE = 8
class DHTBucket(object):
def __init__(self):
self._nodes = dict()
def add_node(self, dhtNode):
self._nodes[dhtNode._id] = dhtNode
def is_bucket_full(self):
return len(self._... | apache-2.0 | 9,090,170,006,814,538,000 | 33.938931 | 136 | 0.544243 | false |
ylatuya/Flumotion | flumotion/test/test_component_providers.py | 1 | 11789 | # vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Foundation.
# ... | gpl-2.0 | -2,112,570,596,379,799,300 | 33.270349 | 75 | 0.668929 | false |
kadaradam/ScavengeSurvive | misc/coordheatmap.py | 2 | 1715 | import timeit
import os
import copy
import io
import re
import itertools as IT
from PIL import Image, ImageDraw, ImageColor, ImageFont
import heatmap
o = re.compile(r'CreateObject\(([0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[... | gpl-3.0 | -9,063,381,471,335,428,000 | 18.055556 | 206 | 0.579592 | false |
lonnon/passphrase | passphrase.py | 1 | 1042 | #!/usr/bin/env python
# passphrase
#
# Generates a passphrase from random words (four by default, number may
# be specified as first argument on command line). By default, words are
# between 6 and 10 characters in length. Different minimum and maximum
# word lengths may be specified in the seconda and third command l... | mit | -5,795,021,236,046,037,000 | 27.944444 | 99 | 0.709213 | false |
nkrim/passwordgen | src/worddict.py | 1 | 4612 | # Copyright 2017 Noah Krim
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, softw... | apache-2.0 | 5,221,395,958,406,475,000 | 26.458333 | 101 | 0.656982 | false |
wavefrontHQ/python-client | wavefront_api_client/api/access_policy_api.py | 1 | 11678 | # coding: utf-8
"""
Wavefront REST API
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ... | apache-2.0 | -3,054,239,166,946,904,600 | 36.073016 | 409 | 0.577582 | false |
back-to/streamlink | src/streamlink/plugins/crunchyroll.py | 1 | 13696 | import argparse
import datetime
import re
import logging
from uuid import uuid4
from streamlink.plugin import Plugin, PluginError, PluginArguments, PluginArgument
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
log = logging.getLogger(__name__)
STREAM_WEIGHTS = {
"low": 240,
... | bsd-2-clause | -3,545,327,950,360,098,000 | 34.208226 | 120 | 0.555637 | false |
chjost/clebsch_gordan | group/quat.py | 1 | 6929 | """Class for the quaternions with inversion."""
import numpy as np
import utils
# quaternion parameters for the group O from Table 71.1 in:
# Simon L. Altmann, Peter Herzig, "Point-Group Theory Tables",
# Second Edition (corrected), Wien (2011)
V12 = np.sqrt(0.5) # sqrt(1/2)
# [[ lambda, Lambda_1, Lambda_2, Lambd... | gpl-3.0 | 2,441,700,839,144,792,600 | 33.645 | 106 | 0.405542 | false |
kmee/odoo-brazil-banking | l10n_br_account_banking_payment_cnab/model/payment_mode.py | 1 | 2946 | # -*- coding: utf-8 -*-
# #############################################################################
#
#
# Copyright (C) 2012 KMEE (http://www.kmee.com.br)
# @author Fernando Marcato Rodrigues
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | agpl-3.0 | -2,867,324,621,362,343,400 | 37.025974 | 79 | 0.625683 | false |
cortesi/qtile | libqtile/widget/prompt.py | 1 | 27051 | # -*- coding: utf-8 -*-
# Copyright (c) 2010-2011 Aldo Cortesi
# Copyright (c) 2010 Philip Kranz
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2011 Paul Colomiets
# Copyright (c) 2011-2012 roger
# Copyright (c) 2011-2012, 2014 Tycho Andersen
# Copyright (c) 2012 Dustin Lacewell
# Copyright (c) 2012 Laurie Clark-... | mit | -8,826,329,168,637,638,000 | 35.548649 | 91 | 0.542742 | false |
TheGhostHuCodes/spy_dir | spy_dir.py | 1 | 2182 | #!/usr/bin/env python
import os
import os.path as pt
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import argparse
#TODO: take decimal places as parameter for printing.
def sizeof_pp(num):
for unit in ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB']:
if abs(num) < 1024.... | apache-2.0 | -7,296,327,831,960,544,000 | 32.569231 | 73 | 0.597617 | false |
jfunction/capetown_loadshedding_map | convert_json.py | 1 | 1792 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# convert_json.py
#
# Copyright 2014 Jared <jarednorman@hotmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 o... | gpl-2.0 | 7,618,190,367,658,015,000 | 32.185185 | 85 | 0.679129 | false |
enthought/traitsgui | enthought/pyface/workbench/i_view.py | 1 | 4139 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | 3,023,312,889,010,713,600 | 28.147887 | 79 | 0.525489 | false |
gyllstar/appleseed | pox/openflow/libopenflow_01.py | 1 | 126928 | # Copyright 2011 James McCauley
#
# This file is part of POX.
#
# POX 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.
#
# POX is distri... | gpl-3.0 | -4,535,113,689,394,153,000 | 30.155621 | 260 | 0.603704 | false |
alvarop/silta | sw/examples/drivers/max31855.py | 1 | 1403 | #!/usr/bin/env python
#
# SPI example (using the STM32F407 discovery board)
#
import sys
import time
import ctypes
from silta import stm32f407
def bytes_to_int(byte_list):
num = 0
for byte in range(len(byte_list)):
num += byte_list[byte] << ((len(byte_list) - 1 - byte) * 8)
return num
class MA... | bsd-2-clause | -733,949,490,846,603,800 | 22.779661 | 77 | 0.543835 | false |
dcastro9/patternrec_ps2 | code/alcohol_script.py | 1 | 5623 | from Dataset import Dataset
from WTA_Hasher import WTAHasher
from kNN_Classifier import kNNClassifier
import numpy as np
import matplotlib.pyplot as plt
import copy
ds_train_dir = "../datasets/alcohol/alcoholism_training.csv"
ds_test_dir = "../datasets/alcohol/alcoholism_test.csv"
results_dir = "../final_results/alcoh... | mit | -64,797,038,294,500,720 | 44.354839 | 113 | 0.527121 | false |
OpusVL/odoo-trading-as | trading_as/res_partner.py | 1 | 1361 | # -*- coding: utf-8 -*-
##############################################################################
#
# Trading As Brands
# Copyright (C) 2015 OpusVL (<http://opusvl.com/>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | -7,650,469,349,843,259,000 | 35.783784 | 82 | 0.622337 | false |
fedebell/Laboratorio3 | Laboratorio2/GraficiBestFit/fitAnalistico.py | 1 | 1562 | import numpy
import pylab
from scipy.optimize import curve_fit
import math
import scipy.stats
V, dV, I, dI = pylab.loadtxt("data00.txt", unpack="True")
#Best fit analitico
#Dy e Dx sono le colonne di errori
x = V
Dx = dV
y = I
Dy = dI
#set error an statistical weight
sigma = Dy
w = 1/(sigma**2)
#determine the coeff... | gpl-3.0 | -3,018,592,897,091,491,300 | 20.39726 | 59 | 0.637004 | false |
claudep/translate | translate/tools/pydiff.py | 1 | 12227 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2005, 2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version ... | gpl-2.0 | -3,536,485,142,706,997,000 | 43.300725 | 122 | 0.559254 | false |
swiharta/radres | polls/pygooglechart.py | 1 | 22228 | """
PyGoogleChart - A complete Python wrapper for the Google Chart API
http://pygooglechart.slowchop.com/
Copyright 2007 Gerald Kaszuba
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 versio... | mit | 5,788,875,282,920,004,000 | 30.131653 | 79 | 0.549667 | false |
marvin-jens/fast_ska | setup.py | 1 | 2027 | from setuptools import setup
from setuptools.extension import Extension
try:
from Cython.Distutils import build_ext
from Cython.Build import cythonize
except ImportError:
use_cython = False
else:
use_cython = True
cmdclass = { }
ext_modules = [ ]
if use_cython:
ext_modules += [
#Extension... | mit | 7,618,767,076,867,865,000 | 30.671875 | 153 | 0.622595 | false |
the-virtual-brain/tvb-hpc | examples/btest.py | 1 | 1617 | import numpy as np
import loopy as lp
target = lp.CudaTarget()
kernel = lp.make_kernel(
"{ [i_node,j_node]: 0<=i_node,j_node<n_node}",
"""
<float32> coupling_value = params(1)
<float32> speed_value = params(0)
<float32> dt=0.1
<float32> M_PI_F = 2.0
<float32> rec_n = 1.0f / n_node
<float32> rec_speed_dt = 1... | apache-2.0 | 4,293,833,689,267,461,600 | 31.34 | 111 | 0.589363 | false |
zaxliu/deepnap | experiments/kdd-exps/experiment_DynaQNN_130_Feb10_2317.py | 1 | 5180 | # System built-in modules
import time
from datetime import datetime
import sys
import os
from multiprocessing import Pool
# Project dependency modules
import pandas as pd
pd.set_option('mode.chained_assignment', None) # block warnings due to DataFrame value assignment
import lasagne
# Project modules
sys.path.append('... | bsd-3-clause | 2,491,388,140,847,407,000 | 33.304636 | 103 | 0.653089 | false |
ebeshero/Pittsburgh_Frankenstein | collateXPrep/svg_tester_collation.py | 1 | 6475 | from typing import Pattern
from collatex import *
from xml.dom import pulldom
import string
import re
import json
import glob
regexWhitespace = re.compile(r'\s+')
regexNonWhitespace = re.compile(r'\S+')
regexEmptyTag = re.compile(r'/>$')
regexBlankLine = re.compile(r'\n{2,}')
regexLeadingBlankLine = re.compile(r'^\n'... | agpl-3.0 | 7,758,116,176,600,863,000 | 50.388889 | 119 | 0.681699 | false |
kedz/sumpy | sumpy/io.py | 1 | 4037 | import os
import re
import pandas as pd
def load_duc_docset(input_source):
docs = DucSgmlReader().read(input_source)
return docs
def load_duc_abstractive_summaries(input_source):
models = DucAbstractSgmlReader().read(input_source)
return models
class FileInput(object):
def gather_paths(self, sou... | apache-2.0 | 687,597,557,010,788,500 | 37.447619 | 80 | 0.494179 | false |
fabianekc/n7 | n7.py | 1 | 2906 | #!/usr/bin/python
import urllib, inflect, string, json, sys, Algorithmia
# tests
# python n7.py '{"h2t":"http://slashdot.org", "auth":"API_KEY"}'
# python n7.py '{"url":"http://derstandard.at"}'
# python n7.py '{"text":"life is a miracle"}'
# initialize
p = inflect.engine()
text = ""
offset = 7
start_line = -1
... | mit | -1,707,470,970,441,594,400 | 30.934066 | 102 | 0.569511 | false |
mathiasertl/django-ca | ca/django_ca/management/commands/init_ca.py | 1 | 10835 | # This file is part of django-ca (https://github.com/mathiasertl/django-ca).
#
# django-ca 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 | -3,941,580,537,189,006,000 | 38.115523 | 110 | 0.602492 | false |
hipikat/django-revkom | revkom/utils/mixins.py | 1 | 4147 | """
Generic mixins for classes.
"""
from functools import partial
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
class GetSettingsMixin(object):
"""
A generic class mixin which adds a _get_settings() method, which will
return a tuple of settings or throw appropri... | bsd-2-clause | 7,571,993,220,421,842,000 | 33.558333 | 83 | 0.600434 | false |
alaw1290/CS591B1 | analysis/test_data_weighted_sums.py | 1 | 2907 | import pickle
import numpy as np
import cf_recommender as cf
import similarity_functions as sf
import movie_reviews_compiler as mrc
path = '../data/'
def run_test_weighted_sums(cosine=True):
'''compute the predictions for masked values in the testing set (user review vectors) using the training set (critic review ma... | mit | 2,743,727,718,878,611,500 | 34.024096 | 132 | 0.687994 | false |
csirtgadgets/bearded-avenger | test/zsqlite/test_store_sqlite_tokens.py | 1 | 5082 | import logging
import os
import tempfile
from argparse import Namespace
import pytest
from cif.store import Store
from cifsdk.utils import setup_logging
import arrow
from datetime import datetime
from pprint import pprint
from cifsdk.exceptions import AuthError
args = Namespace(debug=True, verbose=None)
setup_logging(... | mpl-2.0 | 5,524,347,594,183,835,000 | 23.4375 | 87 | 0.561196 | false |
tbenthompson/taskloaf | taskloaf/promise.py | 1 | 5194 | import asyncio
import taskloaf
from .refcounting import Ref
from .object_ref import put, is_ref, ObjectRef
import logging
logger = logging.getLogger(__name__)
def await_handler(args):
req_addr = args[0]
pr = args[1]
async def await_wrapper():
result_ref = await pr._get_future()
taskloa... | mit | -699,904,581,837,523,300 | 25.100503 | 78 | 0.587986 | false |
AndrewBMartin/pygurobi | pygurobi/pygurobi.py | 1 | 31972 | """
Functions to support rapid interactive modification of Gurobi models.
For reference on Gurobi objects such as Models, Variables, and Constraints, see
http://www.gurobi.com/documentation/7.0/refman/py_python_api_overview.html.
"""
import csv
import json
try:
import gurobipy as gp
except ImportError:
raise ... | mit | -5,063,125,041,988,328,000 | 26.777585 | 99 | 0.613412 | false |
JeffRoy/mi-dataset | mi/dataset/driver/pco2w_abc/imodem/pco2w_abc_imodem_telemetered_driver.py | 1 | 2797 | #!/usr/bin/env python
"""
@package mi.dataset.driver.pco2w_abc.imodem
@file mi-dataset/mi/dataset/driver/pco2w_abc/imodem/pco2w_abc_imodem_recovered_driver.py
@author Mark Worden
@brief Driver for the pco2w_abc_imodem instrument
Release notes:
Initial Release
"""
from mi.dataset.dataset_parser import DataSetDriverC... | bsd-2-clause | 3,377,995,578,879,004,000 | 37.315068 | 104 | 0.725063 | false |
BrigDan/pykcd | xkcdb.py | 1 | 3602 | #!/usr/bin/env python3
import gi
import xkcd
from random import SystemRandom
gi.require_version("Gtk","3.0")
from gi.repository import Gtk
rand = SystemRandom()
class myWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="XKCD Browser")
#self.cur_comic stores the number of th... | gpl-3.0 | -4,089,844,444,127,332,000 | 32.981132 | 84 | 0.610217 | false |
TREND50/GRANDproto_DAQ | cmd_tektro.py | 1 | 6783 | #30/06/2017
#VELLEYEN Stephane
#############################
import os,sys
import vxi11
instr = vxi11.Instrument("192.168.1.10")
print(instr.ask("*IDN?"))
choix=sys.argv[1]
if choix =="1": #Choix des parametres
ch=sys.argv[2]
func=sys.argv[3]
freq=sys.argv[4]
vcc=sys.argv[5]
vcc=int(vcc)
vmax=vpp/2
vm... | gpl-3.0 | 8,711,170,751,405,201,000 | 19.369369 | 59 | 0.677871 | false |
tgbugs/pyontutils | neurondm/test/test_integration.py | 1 | 2300 | import unittest
from pathlib import Path
import pytest
from pyontutils.utils import get_working_dir
from pyontutils.config import auth
from pyontutils.integration_test_helper import _TestScriptsBase, Folders, Repo
import neurondm
class TestScripts(Folders, _TestScriptsBase):
""" woo! """
only = tuple()
lasts =... | mit | -2,036,565,728,753,498,400 | 33.328358 | 115 | 0.669565 | false |
akx/shoop | shoop/core/models/_units.py | 1 | 1973 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import with_statement
from decimal import Decimal
from dja... | agpl-3.0 | -1,413,495,837,681,102,800 | 30.822581 | 95 | 0.692854 | false |
xiangke/pycopia | process/pycopia/rsynclib.py | 1 | 2736 | #!/usr/bin/python2.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
#
# $Id$
#
# Copyright (C) 1999-2006 Keith Dart <keith@kdart.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software... | lgpl-2.1 | 7,716,549,130,176,562,000 | 31.963855 | 83 | 0.660453 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result.py | 1 | 1314 | # 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 | 546,748,436,018,200,060 | 31.85 | 76 | 0.577626 | false |
benagricola/exabgp | lib/exabgp/configuration/environment.py | 1 | 9259 | # encoding: utf-8
"""
environment.py
Created by Thomas Mangin on 2011-11-29.
Copyright (c) 2011-2015 Exa Networks. All rights reserved.
"""
# XXX: raised exception not caught
# XXX: reloading mid-program not possible
# XXX: validation for path, file, etc not correctly test (ie surely buggy)
import os
import sys
imp... | bsd-3-clause | -5,254,560,539,620,552,000 | 26.232353 | 154 | 0.654066 | false |
kizniche/Mycodo | mycodo/inputs/rpi_signal_revolutions.py | 1 | 4596 | # coding=utf-8
import time
import copy
from mycodo.inputs.base_input import AbstractInput
# Measurements
measurements_dict = {
0: {
'measurement': 'revolutions',
'unit': 'rpm'
}
}
# Input information
INPUT_INFORMATION = {
'input_name_unique': 'SIGNAL_RPM',
'input_manufacturer': 'Rasp... | gpl-3.0 | 8,378,247,199,154,533,000 | 27.196319 | 103 | 0.57376 | false |
bootphon/crossitlearn | simple_dnn.py | 1 | 32993 | """
A deep neural network with or w/o dropout in one file.
"""
import numpy
import theano
import sys
import math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
from collections import OrderedDict
BATCH_SIZE = 100
STACKSIZE = 69
def relu_f(vec):
... | mit | -3,261,284,628,923,946,000 | 39.13747 | 105 | 0.519898 | false |
freieslabor/info-display | info_display/screens/event_schedule/management/commands/updateevents.py | 1 | 1290 | from django.core.management.base import BaseCommand
from django.conf import settings
from datetime import datetime
from pytz import timezone
from dateutil.tz import tzlocal
from icalendar import Calendar
import urllib.request
from ...models import Event, CalendarFeed
class Command(BaseCommand):
help = 'Updates... | mpl-2.0 | -4,256,452,507,034,026,000 | 32.947368 | 77 | 0.584496 | false |
desihub/desispec | py/desispec/pipeline/control.py | 1 | 46258 | #
# See top-level LICENSE.rst file for Copyright information
#
# -*- coding: utf-8 -*-
"""
desispec.pipeline.control
===========================
Tools for controling pipeline production.
"""
from __future__ import absolute_import, division, print_function
import os
import sys
import re
import time
from collections ... | bsd-3-clause | 5,987,236,070,991,762,000 | 33.75432 | 91 | 0.581543 | false |
rwstauner/python-photo-shrinker | shrinkphotos.py | 1 | 2783 | #!/usr/bin/env python
"shrink photos so that it doesn't take 8 days to transfer them"
# Copyright (c) 2012 Randy Stauner
# Licensed under the MIT License: http://opensource.org/licenses/MIT
from PIL import Image
import os
from os.path import join, isfile, isdir, dirname, basename
import re
import sys
# configur... | mit | -1,206,501,911,200,051,200 | 26.284314 | 74 | 0.651096 | false |
50wu/gpdb | contrib/unaccent/generate_unaccent_rules.py | 7 | 12976 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This script builds unaccent.rules on standard output when given the
# contents of UnicodeData.txt [1] and Latin-ASCII.xml [2] given as
# arguments. Optionally includes ligature expansion and Unicode CLDR
# Latin-ASCII transliterator, enabled by default, this can be disabled... | apache-2.0 | 150,941,420,492,318,900 | 43.896194 | 361 | 0.677996 | false |
pkdevbox/trac | trac/ticket/tests/admin.py | 1 | 13172 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consists o... | bsd-3-clause | -7,359,954,567,975,773,000 | 37.17971 | 77 | 0.592621 | false |
clarkerubber/irwin | modules/irwin/training/Evaluation.py | 1 | 3292 | from default_imports import *
from conf.ConfigWrapper import ConfigWrapper
from modules.game.Player import Player
from modules.game.GameStore import GameStore
from modules.game.AnalysedGame import GameAnalysedGame
from modules.irwin.PlayerReport import PlayerReport
class Evaluation(NamedTuple('Evaluation', [
... | agpl-3.0 | 6,676,919,598,307,802,000 | 44.109589 | 202 | 0.593864 | false |
HybridF5/jacket | jacket/api/compute/openstack/compute/legacy_v2/contrib/server_diagnostics.py | 1 | 2408 | # Copyright 2011 OpenStack Foundation
# 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 requ... | apache-2.0 | 4,184,177,910,797,046,000 | 37.222222 | 79 | 0.675249 | false |
uclouvain/osis | program_management/forms/prerequisite.py | 1 | 3264 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | 6,778,399,643,430,902,000 | 48.439394 | 120 | 0.652467 | false |
fedspendingtransparency/data-act-core | dataactcore/scripts/databaseSetup.py | 1 | 1596 | import sqlalchemy_utils
from dataactcore.config import CONFIG_DB, ALEMBIC_PATH, MIGRATION_PATH
from alembic.config import Config
from alembic import command
from sqlalchemy.exc import ProgrammingError
def createDatabase(dbName):
"""Create specified database if it doesn't exist."""
config = CONFIG_DB
conne... | cc0-1.0 | 4,368,196,399,254,522,400 | 36.116279 | 76 | 0.678571 | false |
alexissmirnov/donomo | donomo_archive/deps/paypal.jonboxall/standard/pdt/tests/pdt.py | 1 | 5162 | """
run this with ./manage.py test website
see http://www.djangoproject.com/documentation/testing/ for details
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response
from django.template import Context
from django.template.loader import get_temp... | bsd-3-clause | -4,190,962,985,214,679,000 | 42.754237 | 101 | 0.626501 | false |
Dinnerbone/mcstatus | mcstatus/tests/protocol/test_connection.py | 1 | 9117 | import pytest
from mock import Mock, patch
from mcstatus.protocol.connection import (
Connection,
TCPSocketConnection,
UDPSocketConnection,
)
class TestConnection:
connection: Connection
def setup_method(self):
self.connection = Connection()
def test_flush(self):
self.conne... | apache-2.0 | -2,915,360,041,184,111,600 | 31.44484 | 109 | 0.670067 | false |
auto-mat/klub | apps/aklub/migrations/0040_auto_20170117_1325.py | 1 | 1245 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-17 13:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('aklub', '0039_auto_20161221_1256'),
]
operations =... | gpl-3.0 | -6,172,260,691,570,445,000 | 34.571429 | 191 | 0.625703 | false |
tejal29/pants | src/python/pants/goal/aggregated_timings.py | 1 | 1733 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from colle... | apache-2.0 | -8,865,574,243,113,284,000 | 36.673913 | 94 | 0.663012 | false |
vene/marseille | experiments/exp_rnn.py | 1 | 5162 | import os
import dill
import numpy as np
from sklearn.model_selection import KFold
from marseille.custom_logging import logging
from marseille.datasets import get_dataset_loader, load_embeds
from marseille.io import cache_fname
from marseille.argrnn import ArgumentLSTM
def argrnn_cv_score(dataset, dynet_weight_deca... | bsd-3-clause | -241,226,134,149,875,740 | 38.106061 | 79 | 0.509299 | false |
dementrock/nbgrader | nbgrader/tests/nbextensions/test_assignment_list.py | 1 | 13208 | import pytest
import os
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException, NoSuchElementException
from .. import run_python_module
def _wait(brow... | bsd-3-clause | 4,586,161,533,023,483,000 | 44.232877 | 138 | 0.696548 | false |
merc-devel/merc | merc/errors.py | 1 | 2503 | from merc import message
class BaseError(Exception, message.Reply):
pass
class Error(Exception, message.Message):
NAME = "ERROR"
FORCE_TRAILING = True
def __init__(self, reason):
self.reason = reason
def as_params(self, client):
return [self.reason]
class LinkError(Error):
NAME = "ERROR"
F... | mit | -4,638,788,628,289,347,000 | 17.819549 | 67 | 0.703556 | false |
ypcs/bearded-adventure | bearded_adventure/webvm/api.py | 1 | 1904 | from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS
from webvm.models import Slave, Snapshot, VirtualMachine, MachineImage, HwConfiguration, JobQueueItem
from bearded_adventure.common import CamelCaseJSONSerializer
from tastypie import fields
from tastypie.authentication import ApiKeyAuthentication
c... | gpl-3.0 | -1,674,742,944,250,033,200 | 37.857143 | 210 | 0.669118 | false |
zenoss/ZenPacks.community.IBMSystemxIMM | ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMMemVpdMap.py | 1 | 3309 | # ==============================================================================
# IBMIMMMemVpdMap modeler plugin
#
# Zenoss community Zenpack for IBM SystemX Integrated Management Module
# version: 0.3
#
# (C) Copyright IBM Corp. 2011. All Rights Reserved.
#
# This program is free software; you can redistribute it an... | gpl-2.0 | -2,510,824,104,534,055,400 | 37.476744 | 93 | 0.598368 | false |
saukrIppl/seahub | tests/api/test_dir.py | 1 | 1041 | import json
import os
from django.core.urlresolvers import reverse
from seahub.test_utils import BaseTestCase
class DirTest(BaseTestCase):
def setUp(self):
self.login_as(self.user)
self.endpoint = reverse('DirView', args=[self.repo.id])
self.folder_name = os.path.basename(self.folder)
... | apache-2.0 | -4,933,864,733,565,598,000 | 27.135135 | 75 | 0.621518 | false |
lgarren/spack | var/spack/repos/builtin/packages/r-yaml/package.py | 1 | 1687 | ##############################################################################
# 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 | -7,837,539,906,779,129,000 | 44.594595 | 78 | 0.676941 | false |
pikhovkin/instructor | instructor/model.py | 1 | 2702 | from collections import OrderedDict
from .errors import InvalidData, InvalidDataSize, InvalidModelDeclaration
from .fields import BaseFieldInstructor, DefaultByteOrder
__all__ = (
'InstructorModel',
)
class Opts(object):
pass
class MetaInstructor(type):
def __new__(cls, name, bases, attrs):
d... | mit | 4,084,107,766,100,893,700 | 29.022222 | 118 | 0.551813 | false |
rzarzynski/tempest | tempest/scenario/test_volume_boot_pattern.py | 1 | 8285 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | -8,211,220,916,780,681,000 | 41.706186 | 79 | 0.620881 | false |
soft-matter/mr | mr/tests/test_feature_saving.py | 1 | 1721 | import unittest
import nose
from numpy.testing import assert_almost_equal, assert_allclose
from numpy.testing.decorators import slow
from pandas.util.testing import (assert_series_equal, assert_frame_equal)
import os
from tempfile import NamedTemporaryFile
import pandas as pd
from pandas import DataFrame, Series
imp... | gpl-3.0 | 2,259,999,253,511,794,400 | 34.122449 | 75 | 0.606043 | false |
alexryndin/ambari | ambari-server/src/test/python/TestAmbariServer.py | 1 | 340374 | '''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | apache-2.0 | 1,978,595,072,674,674,700 | 38.286011 | 256 | 0.669998 | false |
gena/qgis-earthengine-plugin | ee_plugin.py | 1 | 5587 | # -*- coding: utf-8 -*-
"""
Main plugin file.
"""
from __future__ import absolute_import
import configparser
import requests
import webbrowser
from builtins import object
import os.path
import json
from qgis.PyQt.QtCore import QSettings, QTranslator, qVersion, QCoreApplication
from qgis.PyQt.QtWidgets import QAction... | mit | 1,137,429,394,335,913,300 | 35.756579 | 254 | 0.646501 | false |
1905410/Misago | misago/users/management/commands/synchronizeusers.py | 1 | 1305 | import time
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from misago.core.management.progressbar import show_progress
from misago.core.pgutils import batch_update
class Command(BaseCommand):
help = 'Synchronizes users'
def handle(self, *args, **options)... | gpl-2.0 | 5,006,594,123,180,027,000 | 31.625 | 78 | 0.638314 | false |
ybalgir/Quantop | Lec7.py | 1 | 1822 | import numpy as np
import pandas as pd
from statsmodels import regression
import statsmodels.api as sm
import matplotlib.pyplot as plt
import math
import pandas_datareader.data as web
from datetime import datetime
def Starter_Lec7():
start = datetime(2014, 1, 1)
end = datetime(2015, 1, 1)
asset = web.Da... | gpl-3.0 | 5,670,257,389,628,504,000 | 25.405797 | 107 | 0.623491 | false |
othelarian/arcns | mainscene/mainscene.py | 1 | 75804 | # -*- coding: utf-8 -*-
from direct.showbase.DirectObject import DirectObject
from direct.fsm.FSM import FSM
from direct.gui.OnscreenText import OnscreenText
from direct.gui.DirectGui import DirectFrame, DGG
from direct.stdpy.file import *
from direct.actor.Actor import Actor
from panda3d.core import Point3, TextNode,... | lgpl-3.0 | -9,076,149,160,606,977,000 | 76.313265 | 189 | 0.566619 | false |
studywolf/pydmps | pydmps/dmp_rhythmic.py | 1 | 5004 | """
Copyright (C) 2013 Travis DeWolf
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope t... | gpl-3.0 | -4,765,107,268,492,839,000 | 29.888889 | 79 | 0.592126 | false |
idrogeno/enigma2 | lib/python/Components/NimManager.py | 1 | 85000 | from boxbranding import getBoxType
from time import localtime, mktime
from datetime import datetime
import xml.etree.cElementTree
from os import path
from enigma import eDVBSatelliteEquipmentControl as secClass, \
eDVBSatelliteLNBParameters as lnbParam, \
eDVBSatelliteDiseqcParameters as diseqcParam, \
eDVBSatellit... | gpl-2.0 | 4,065,950,864,747,252,000 | 39.018832 | 352 | 0.680294 | false |
openstack/sahara-dashboard | sahara_dashboard/content/data_processing/clusters/cluster_templates/workflows/create.py | 1 | 16094 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | apache-2.0 | -5,240,183,144,820,533,000 | 36.168591 | 79 | 0.581832 | false |
SahilTikale/haas | hil/cli/project.py | 2 | 1764 | """Commands related to projects are in this module"""
import click
import sys
from hil.cli.client_setup import client
@click.group()
def project():
"""Commands related to project"""
@project.command(name='create')
@click.argument('project')
def project_create(project):
"""Create a new project"""
client.... | apache-2.0 | -3,346,851,995,693,047,000 | 24.565217 | 79 | 0.665533 | false |
greenapes/python-blitline | tools/scrape.py | 1 | 1910 | import re
import string
import urllib.request, urllib.error, urllib.parse
from datetime import datetime
from lxml import etree
def function_name(text, rex=re.compile(r'"name"\s*:\s*"([^"]+)"')):
match = rex.search(text)
if match:
return match.group(1)
return None
parser = etree.HTMLParser()
tree... | mit | -1,458,529,492,265,877,500 | 25.901408 | 78 | 0.624607 | false |
python-gitlab/python-gitlab | gitlab/v4/objects/hooks.py | 1 | 3071 | from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMixin, SaveMixin
__all__ = [
"Hook",
"HookManager",
"ProjectHook",
"ProjectHookManager",
"GroupHook",
"GroupHookManager",
]
class Hook(ObjectDeleteMixin, RESTObjec... | lgpl-3.0 | 785,224,633,121,416,800 | 25.938596 | 80 | 0.529144 | false |
DistrictDataLabs/topicmaps | topics/models.py | 1 | 3031 | # topics.models
# Topic modeling for data survey analysis
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Tue Sep 08 19:43:58 2015 -0400
#
# Copyright (C) 2015 District Data Labs
# For license information, see LICENSE.txt
#
# ID: models.py [] benjamin@bengfort.com $
"""
Topic modeling for ... | mit | 8,940,932,464,342,906,000 | 28.715686 | 105 | 0.527549 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.