repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ActiveState/code | recipes/Python/436834_Yet_another_Design_Contract_module/recipe-436834.py | 1 | 16029 | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
###############################################################################
#
# Yet another invariant/pre-/postcondition design-by-contract support module.
#
# Written by Dmitry Dvoinikov <dmitry@targeted.org>
# Distributed under MIT license.
#
# The latest version... | mit | -315,259,735,851,058,900 | 43.401662 | 118 | 0.558924 | false | 4.526687 | false | false | false |
RobLoach/lutris | lutris/util/display.py | 1 | 3005 | import subprocess
from lutris.util.log import logger
def get_vidmodes():
xrandr_output = subprocess.Popen(["xrandr"],
stdout=subprocess.PIPE).communicate()[0]
return list([line for line in xrandr_output.decode().split("\n")])
def get_outputs():
"""Return list of tup... | gpl-3.0 | 8,808,335,972,586,504,000 | 29.663265 | 77 | 0.575707 | false | 4.214586 | false | false | false |
ctsit/redi-dropper-client | app/redidropper/database/crud_mixin.py | 1 | 1438 | """
Goal: simplify the code when interacting with entities
Usage when declaring a model:
import db
class MyEntity(db.Model, CRUDMixin):
id = db.Column('myID', db.Integer, primary_key=True)
data = db.Column('myData', db.String(255))
MyTableEntity.create(data="abc")
my = MyTableEntity(data="abc")
db.session.s... | bsd-3-clause | -703,312,452,427,858,200 | 25.145455 | 59 | 0.616134 | false | 3.640506 | false | false | false |
mesosphere/mesos-hydra | mrun.py | 1 | 8006 | #!/usr/bin/env python
import mesos
import mesos_pb2
import os
import logging
import re
import sys
import time
import math
import threading
import socket
import time
import tempfile
from optparse import OptionParser
from subprocess import *
def printOutput(p):
for line in p.stdout:
print line,
def startMPIE... | apache-2.0 | 2,096,012,464,750,074,400 | 30.031008 | 149 | 0.624032 | false | 3.517575 | false | false | false |
walshjon/openmc | openmc/material.py | 1 | 35739 | from collections import OrderedDict
from copy import deepcopy
from numbers import Real, Integral
import warnings
from xml.etree import ElementTree as ET
import numpy as np
import openmc
import openmc.data
import openmc.checkvalue as cv
from openmc.clean_xml import clean_xml_indentation
from .mixin import IDManagerMix... | mit | -6,152,514,071,550,136,000 | 33.867317 | 83 | 0.574303 | false | 4.134066 | false | false | false |
Inspq/ansible | lib/ansible/plugins/connection/netconf.py | 1 | 4517 | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is d... | gpl-3.0 | -3,208,970,745,957,846,000 | 31.496403 | 100 | 0.640469 | false | 4.080397 | false | false | false |
nathanaevitas/odoo | openerp/release.py | 1 | 2634 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | -2,245,725,345,032,258,300 | 44.413793 | 117 | 0.643888 | false | 3.545087 | false | false | false |
kovidgoyal/kitty | kittens/tui/operations.py | 1 | 11292 | #!/usr/bin/env python3
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
import sys
from contextlib import contextmanager
from functools import wraps
from typing import (
IO, Any, Callable, Dict, Generator, Optional, Tuple, TypeVar, Union
)
from kitty.rgb import Col... | gpl-3.0 | -8,834,894,098,076,934,000 | 26.144231 | 133 | 0.590418 | false | 3.067645 | false | false | false |
DYWCn/mxonline | MXOnline/apps/origanization/migrations/0001_initial.py | 1 | 3648 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2017-03-24 08:13
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
... | mit | -4,469,214,834,793,879,000 | 52.647059 | 159 | 0.587171 | false | 3.313351 | false | false | false |
priyaganti/rockstor-core | src/rockstor/storageadmin/urls/share.py | 1 | 2128 | """
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... | gpl-3.0 | -8,414,302,478,397,085,000 | 39.150943 | 79 | 0.659774 | false | 3.552588 | false | false | false |
globocom/database-as-a-service | dbaas/maintenance/migrations/0015_auto__add_maintenanceparameters.py | 1 | 5853 | # -*- 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
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'MaintenanceParameters'
db.create_table(u'maintenance_main... | bsd-3-clause | -3,582,005,703,774,428,700 | 68.678571 | 191 | 0.572185 | false | 3.711477 | false | false | false |
PermutaTriangle/Permuta | permuta/perm_sets/permset.py | 1 | 7411 | import multiprocessing
from itertools import islice
from typing import ClassVar, Dict, Iterable, List, NamedTuple, Optional, Union
from ..patterns import MeshPatt, Perm
from ..permutils import is_finite, is_insertion_encodable, is_polynomial
from .basis import Basis, MeshBasis
class AvBase(NamedTuple):
"""A base... | bsd-3-clause | 2,888,055,935,576,423,400 | 36.619289 | 84 | 0.575361 | false | 3.917019 | false | false | false |
jensck/fluidity | fluidity/incubator/next_actions_view.py | 1 | 4059 | import gtk
import pango
class NextActionsView(gtk.VBox):
"""Simple class for display of Next Actions"""
def __init__(self):
super(NextActionsView, self).__init__()
self._liststore = gtk.ListStore(bool, str, int, str)
self._treeview = gtk.TreeView()
self._treeview.g... | gpl-3.0 | -4,824,018,486,579,330,000 | 40.845361 | 81 | 0.647204 | false | 3.765306 | false | false | false |
goldengod/dep | plib.py | 1 | 20556 | #some import
import numpy
import itertools
import random
import math
import os.path
import urllib2
import sys
#global variables
n = None
N = None
Dk = None
Du = None
Dc = None
e = None
r = None
x = None
xa = None
ASW = None
EXC = None
INS = None
pASW = None
pEXC = None
pINS = None
#help func... | gpl-2.0 | -3,328,842,759,987,136,500 | 22.886199 | 158 | 0.570393 | false | 2.430074 | false | false | false |
RobinQuetin/CAIRIS-web | cairis/cairis/WeaknessAnalysisPanel.py | 1 | 1665 | # 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... | apache-2.0 | -8,500,019,050,988,761,000 | 38.642857 | 80 | 0.76036 | false | 3.627451 | false | false | false |
gizwits/gservice_sdk_py | gservice/api/client.py | 1 | 1504 | #coding:utf-8
'''
moduls::APIClient
~~~~~~~~~~~~~~~~~
request handler
'''
import requests
import json
from ..calls.g_login import login as login_call
class APIClient(object):
def __init__(self):
self.session = requests.Session()
self.token = None
self.uid = None
self.expire_at =... | mit | 4,340,423,305,111,544,300 | 26.345455 | 68 | 0.577128 | false | 4.010667 | false | false | false |
hugoShaka/photo-mailer | mailerv2.py | 1 | 5032 | # -*- coding: utf-8 -*-
import getpass
import sys, os
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
from iptcinfo import IPTCInfo
import logging
logging.basicConfig(filenam... | apache-2.0 | -2,709,665,014,651,973,000 | 30.248447 | 152 | 0.667661 | false | 3.496178 | false | false | false |
CWBudde/Ink2SmartCanvas | Ink2SmartCanvas/svg/Text.py | 1 | 1318 | from ink2canvas.svg.AbstractShape import AbstractShape
class Text(AbstractShape):
def textHelper(self, tspan):
val = ""
if tspan.text:
val += tspan.text
for ts in tspan:
val += self.textHelper(ts)
if tspan.tail:
val += tspan.tail
return va... | gpl-2.0 | -2,483,348,612,490,102,300 | 29.651163 | 78 | 0.552352 | false | 3.842566 | false | false | false |
rrah/PyLiteCo | __main__.py | 1 | 1670 | """Main launcher for pyliteco.
Author: Robert Walker <rrah99@gmail.com>
Copyright (C) 2015 Robert Walker
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; version 2.
This program is ... | gpl-2.0 | -2,271,374,031,831,028,500 | 35.326087 | 100 | 0.711976 | false | 4.1133 | false | false | false |
KayJohnston/jackies-map | edi.py | 1 | 4447 | #!/usr/bin/env python
from __future__ import print_function
import sys
import shlex
import logging
import time
import cmd
import argparse
import traceback
if __name__ == '__main__':
print("Loading environment...")
import env
log = logging.getLogger("edi")
# Now env is loaded, import the apps
import ship
import ed... | bsd-3-clause | -2,765,339,657,584,099,000 | 22.908602 | 161 | 0.641106 | false | 3.272259 | false | false | false |
cokelaer/spectrum | test/test_correlog.py | 1 | 1904 | from spectrum import CORRELOGRAMPSD, CORRELATION, pcorrelogram, marple_data
from spectrum import data_two_freqs
from pylab import log10, plot, savefig, linspace
from numpy.testing import assert_array_almost_equal, assert_almost_equal
def test_correlog():
psd = CORRELOGRAMPSD(marple_data, marple_data, lag=15)
... | bsd-3-clause | -7,416,000,210,789,189,000 | 33.618182 | 93 | 0.697479 | false | 2.708393 | true | false | false |
pklaus/PyOscilloskop | gui/rigolUi.py | 1 | 3717 | #!/usr/bin/python
# -*- encoding: UTF8 -*-
# pyOscilloskop
#
# Copyright (19.2.2011) Sascha Brinkmann
#
# 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... | gpl-3.0 | -7,523,303,664,822,341,000 | 36.545455 | 120 | 0.658596 | false | 3.567179 | false | false | false |
yvesalexandre/bandicoot | bandicoot/tests/test_parsers.py | 1 | 5328 | # The MIT License (MIT)
#
# Copyright (c) 2015-2016 Massachusetts Institute of Technology.
#
# 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 ... | mit | 3,988,811,326,115,238,400 | 39.06015 | 80 | 0.579955 | false | 4.08589 | true | false | false |
flavour/ifrc_qa | modules/s3db/supply.py | 1 | 104079 | # -*- coding: utf-8 -*-
""" Sahana Eden Supply Model
@copyright: 2009-2016 (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 withou... | mit | 6,612,580,975,636,968,000 | 38.39402 | 161 | 0.433469 | false | 4.859417 | false | false | false |
trenton3983/Artificial_Intelligence_for_Humans | vol3/vol3-python-examples/examples/example_mnist_conv.py | 1 | 2549 | #!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 3: Deep Learning and Neural Networks
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2015 by Jeff Heaton
Licensed under the Apache License, V... | apache-2.0 | -293,695,254,517,834,240 | 28.988235 | 76 | 0.708513 | false | 3.439946 | false | false | false |
demisto/content | Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.py | 1 | 50344 | from CommonServerPython import *
import jwt
import uuid
import requests
import json
import re
import zipfile
from StringIO import StringIO
from datetime import datetime, timedelta
# disable insecure warnings
requests.packages.urllib3.disable_warnings()
# CONSTANTS
TOKEN_TIMEOUT = 300 # 5 minutes
URI_AUTH = 'auth/v2/... | mit | 6,929,150,291,079,900,000 | 33.364505 | 120 | 0.598184 | false | 3.73361 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v6/resources/types/customer_client_link.py | 1 | 2276 | # -*- 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 o... | apache-2.0 | -4,313,098,730,890,692,600 | 34.015385 | 98 | 0.681459 | false | 4.108303 | false | false | false |
geomf/omf-fork | omf/solvers/gridlabd/__init__.py | 1 | 9449 | # Portions Copyright (C) 2015 Intel Corporation
''' Code for running Gridlab and getting results into pythonic data structures. '''
import sys
import os
import subprocess
import platform
import re
import datetime
import shutil
import traceback
import math
import time
import tempfile
import json
from os.path import joi... | gpl-2.0 | -5,696,401,509,147,885,000 | 39.904762 | 163 | 0.580167 | false | 3.659566 | true | false | false |
TardigradeX/Space-Race-RX | backend/Commands_util.py | 1 | 1776 | from Commands import Commands, Targets, Defaults, Payloads
dd = Defaults.DELIMETER
dt = Defaults.TARGET_DELIMETER
dn = Defaults.NONE
""" COMMANDS TO BE SENT BY ANY """
def createLogin(targetType, roomid = dn ):
playerId = dn
payload = dn
target = dt.join([targetType, roomid, playerId])
msg = dd.join([... | mit | -8,001,001,289,209,257,000 | 30.714286 | 93 | 0.693131 | false | 3.455253 | false | false | false |
sheeshmohsin/mozioproj | mozio/settings.py | 1 | 3500 | """
Django settings for mozio project.
Generated by 'django-admin startproject' using Django 1.9.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# B... | mit | -3,582,490,734,909,463,600 | 24.547445 | 91 | 0.671429 | false | 3.468781 | false | false | false |
ianmiell/shutit-distro | python3/python3.py | 1 | 1207 | """ShutIt module. See http://shutit.tk
"""
from shutit_module import ShutItModule
class python3(ShutItModule):
def build(self, shutit):
shutit.send('mkdir /tmp/build/python')
shutit.send('cd /tmp/build/python')
shutit.send('wget -qO- https://www.python.org/ftp/python/3.4.2/Python-3.4.2.tar.xz | xz -d | tar -... | gpl-2.0 | -146,777,834,580,436,640 | 27.738095 | 138 | 0.691798 | false | 2.493802 | false | false | false |
att-comdev/drydock | drydock_provisioner/drivers/node/maasdriver/models/boot_resource.py | 1 | 3592 | # Copyright 2017 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | 7,456,596,019,089,050,000 | 31.954128 | 79 | 0.615256 | false | 4.157407 | false | false | false |
xfire/pydzen | plugins/mem.py | 1 | 2041 | #
# Copyright (C) 2008 Rico Schiekel (fire at downgra dot de)
#
# 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... | gpl-2.0 | 772,684,951,767,942,500 | 34.189655 | 135 | 0.617834 | false | 3.2656 | false | false | false |
Micronaet/micronaet-mx | sale_address/address.py | 1 | 2562 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP module
# Copyright (C) 2010 Micronaet srl (<http://www.micronaet.it>)
#
# Italian OpenERP Community (<http://www.openerp-italia.com>)
#
#####################################################... | agpl-3.0 | -4,763,169,489,420,876,000 | 35.6 | 78 | 0.633099 | false | 4.206897 | false | false | false |
uranix/ttpy | tt/ksl/ksl.py | 1 | 6075 | """ Dynamical TT-approximation """
import numpy as np
import dyn_tt
import tt
def ksl(A, y0, tau, verb=1, scheme='symm', space=8, rmax=2000):
""" Dynamical tensor-train approximation based on projector splitting
This function performs one step of dynamical tensor-train approximation
for the equatio... | mit | 5,739,514,568,776,435,000 | 27.255814 | 129 | 0.523457 | false | 3.142783 | false | false | false |
openSUSE/polkit-default-privs | tools/remove_duplicate_entries.py | 1 | 2188 | #!/usr/bin/python3
# vim: ts=4 et sw=4 sts=4 :
import argparse
from pkcommon import *
class DuplicateEntryRemover:
def __init__(self):
self.m_parser = argparse.ArgumentParser(
description = "Removes superfluous duplicate entries from polkit profiles or warns about conflicting ones."
... | gpl-2.0 | -189,961,837,190,509,020 | 27.789474 | 123 | 0.516453 | false | 4.167619 | false | false | false |
gbanegas/HappyClient | happy/tests/models/__init__.py | 1 | 1611 | # -*- coding: utf-8 -*-
"""Unit test suite for the models of the application."""
from nose.tools import eq_
from happy.model import DBSession
from happy.tests import load_app
from happy.tests import setup_db, teardown_db
__all__ = ['ModelTest']
def setup():
"""Setup test fixture for all model tests."""
load... | apache-2.0 | 1,707,177,911,946,079,000 | 24.171875 | 72 | 0.58473 | false | 4.152062 | true | false | false |
eepgwde/pyeg0 | pandas0/ch09/portfolio0.py | 1 | 2641 | import matplotlib.pyplot as plt
import pandas as pd
import pandas.io.data as web
from collections import defaultdict
names = ['AAPL', 'GOOG', 'MSFT', 'DELL', 'GS', 'MS', 'BAC', 'C']
def get_px(stock, start, end):
return web.get_data_yahoo(stock, start, end)['Adj Close']
#
px = pd.DataFrame({n: get_px(n, '1/1/2... | gpl-3.0 | -4,000,118,988,380,880,000 | 30.392857 | 72 | 0.687903 | false | 2.989796 | false | false | false |
himaaaatti/qtile | libqtile/widget/generic_poll_text.py | 1 | 2336 | import json
import six
from six.moves.urllib.request import urlopen, Request
from libqtile.widget import base
from libqtile.log_utils import logger
class GenPollText(base.ThreadedPollText):
"""
A generic text widget that polls using poll function to get the text.
"""
orientations = base.ORIENTATI... | mit | -4,587,477,473,095,674,400 | 26.809524 | 77 | 0.577483 | false | 4.020654 | false | false | false |
didicout/python_util | time_util.py | 1 | 4169 | # coding=utf8
"""
time util.
"""
__author__ = 'didicout <i@julin.me>'
import time
import datetime
def date_str_2_stamp(date_str, millisecond=False):
if millisecond:
return int(time.mktime(time.strptime(date_str, '%Y-%m-%d'))) * 1000
else:
return int(time.mktime(time.strptime(date_str, '%Y-... | mit | -4,047,810,320,677,002,000 | 26.797297 | 104 | 0.651106 | false | 2.880252 | false | false | false |
getsmap/smap4 | WS/email/sendEmail.py | 1 | 1254 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Import smtplib for the actual sending function
import sys, os
import smtplib
import email
# Import the email modules we'll need
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header impo... | apache-2.0 | 6,888,675,901,893,147,000 | 26.577778 | 79 | 0.63336 | false | 3.223377 | false | false | false |
qbilius/autoart | dots/dots.py | 1 | 1438 | import numpy as np
from PIL import Image
import scipy.ndimage
import matplotlib.pyplot as plt
def gabor(
theta=0,
gamma=1,
sigma=2,
lam=5.6,
k=10
):
# Mutch and Lowe, 2006
theta -= np.pi/2
x,y = np.meshgrid(np.arange(-k,k),np.arange(-k,k))
X = x*np.cos(theta) - y*np.sin(theta)
... | mit | -7,737,220,422,988,155,000 | 25.62963 | 82 | 0.609875 | false | 2.384743 | false | false | false |
keishi/chromium | tools/isolate/run_test_cases_smoke_test.py | 1 | 2333 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import re
import subprocess
import sys
import unittest
ROOT_DIR = os.path.dirname(os.path.abspath(__file_... | bsd-3-clause | 5,622,570,705,021,971,000 | 29.697368 | 79 | 0.571367 | false | 3.139973 | true | false | false |
leethargo/geonet | geonet/degeneracy.py | 1 | 2109 | '''
Detecting degeneracy and merging zero-length edges.
'''
from geonet.network import SteinerTree, merge_pos
from geonet.geometry import distance
from geonet.constants import abstol
def degenerate_edges(tree, steiner_pos, abstol=abstol):
'''list of edges with (numerically) zero length'''
assert isinstance(tr... | mit | 4,646,769,807,229,963,000 | 30.954545 | 79 | 0.614983 | false | 3.234663 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/data/_errordata.py | 1 | 2335 |
import datetime
import os.path
import subprocess
import time
import xml.etree.ElementTree
import dsz
import ops
XALAN = os.path.join(ops.RESDIR, 'ExternalLibraries', 'java-j2se_1.6-sun', 'xalan.jar')
STYLESHEET = os.path.join(ops.DATA, 'DszErrorExtractor.xsl')
class DszCommandError(list, ):
def __init__(self, ti... | unlicense | -5,100,924,808,575,776,000 | 32.855072 | 155 | 0.6197 | false | 3.464392 | false | false | false |
AustereCuriosity/astropy | astropy/coordinates/builtin_frames/__init__.py | 1 | 5052 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This package contains the coordinate frames actually implemented by astropy.
Users shouldn't use this module directly, but rather import from the
`astropy.coordinates` module. While it is likely to exist for the long-term,
the... | bsd-3-clause | 1,821,318,041,240,630,800 | 38.76378 | 118 | 0.70396 | false | 3.899614 | false | false | false |
RedBulli/CourseDeadlines | CourseDeadlines/settings.py | 1 | 6055 | # Django settings for CourseDeadlines project.
import os
settings_dir = os.path.dirname(__file__)
project_dir = os.path.join(os.path.split(os.path.realpath(__file__))[0], os.path.pardir)
DEBUG = True
TASTYPIE_FULL_DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS... | mit | 1,575,287,465,834,630,700 | 33.016854 | 127 | 0.688852 | false | 3.623579 | false | false | false |
nict-isp/scn-openflow-driver | src/ncps_openflow/scn/plugins/middleware/interface.py | 1 | 6895 | # -*- coding: utf-8 -*-
"""
scn.plugins.middleware.interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright (c) 2015, National Institute of Information and Communications Technology.All rights reserved.
:license: GPL3, see LICENSE for more details.
"""
import json
from pox.core import core
from pox.lib.addr... | gpl-3.0 | -4,565,760,055,426,813,400 | 32.009756 | 116 | 0.598493 | false | 3.66974 | false | false | false |
yeming233/rally | rally/plugins/openstack/context/quotas/quotas.py | 1 | 4765 | # Copyright 2014: Dassault Systemes
# 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 requir... | apache-2.0 | 7,832,287,058,500,353,000 | 41.544643 | 79 | 0.590766 | false | 4.213086 | false | false | false |
akkana/scripts | wpnet.py | 1 | 17033 | #!/usr/bin/env python3
# A wrapper script to make it easier to use wpa_cli to connect.
# https://wiki.archlinux.org/index.php/WPA_supplicant#Connecting_with_wpa_cli
# was very helpful.
#
# For extending this to eth0, browse /etc/dhcpcd.conf
# and /usr/share/dhcpcd/hooks/10-wpa_supplicant on raspbian,
# where dhcpcd is... | gpl-2.0 | 2,445,823,374,214,298,000 | 29.634892 | 109 | 0.573358 | false | 3.500411 | true | false | false |
peterwilletts24/Monsoon-Python-Scripts | geopotential/plot_geopotential_diff_from_global.py | 1 | 16864 | """
Load mean geopotential heights and plot in colour
"""
import os, sys
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_cm
from mpl_toolkits.basemap import Basemap
import iris
import numpy as np
import imp
import h5py
import cartopy.crs as ccrs
import scipy.interpolate
from textwrap import wrap
model... | mit | -4,436,724,991,769,473,000 | 39.057007 | 180 | 0.59968 | false | 2.987422 | false | false | false |
mr-martian/potential-doodle | doodle.py | 1 | 78676 | #!/usr/bin/env python3
import re, itertools, random, copy, os
from collections import defaultdict
from subprocess import Popen, PIPE
from os.path import isfile
from types import SimpleNamespace
Globals = SimpleNamespace(path=os.path.abspath(__file__)[:-9], unknown_error=True, flat=False, partial=True, keepmeta=True, sp... | mit | 781,176,970,670,820,000 | 39.28469 | 207 | 0.488751 | false | 3.893117 | false | false | false |
dmerejkowsky/qibuild | python/qitoolchain/feed.py | 1 | 3967 | ## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved.
## Use of this source code is governed by a BSD-style license that can be
## found in the COPYING file.
""" Toolchain feeds
"""
import os
import sys
import hashlib
import urlparse
from xml.etree import ElementTree
from qisys import ui
import qisys
... | bsd-3-clause | -1,921,144,499,196,732,200 | 29.05303 | 83 | 0.586589 | false | 4.115145 | false | false | false |
onyedikilo/tacotron | prepro.py | 1 | 1722 | # -*- coding: utf-8 -*-
#/usr/bin/python2
'''
By kyubyong park. kbpark.linguist@gmail.com.
https://www.github.com/kyubyong/tacotron
'''
import numpy as np
import librosa
from hyperparams import Hyperparams as hp
import glob
import re
import os
import csv
import codecs
def load_vocab():
vocab = "E abcdefghijklmn... | apache-2.0 | -1,971,481,082,590,631,700 | 28.689655 | 90 | 0.613821 | false | 3.230769 | false | false | false |
hroyrh/svt | applications_scalability/websockets_perf/test_scripts/v_user.py | 1 | 2067 | from websocket import create_connection
from ConfigParser import SafeConfigParser
import ssl
import gevent
import time
import json
class Transaction(object):
... | apache-2.0 | -8,251,251,100,229,687,000 | 34.637931 | 159 | 0.400581 | false | 5.259542 | false | false | false |
ztane/jaspyx | jaspyx/visitor/function.py | 1 | 2365 | from __future__ import absolute_import, division, print_function
import ast
from jaspyx.ast_util import ast_call, ast_load
from jaspyx.context.function import FunctionContext
from jaspyx.visitor import BaseVisitor
from jaspyx.compat import get_arg_id
class Function(BaseVisitor):
def visit_FunctionDef(self, node):... | mit | -2,808,383,720,302,337,500 | 28.936709 | 70 | 0.421564 | false | 4.601167 | false | false | false |
jacobian/valor | valor/link.py | 1 | 6044 | import re
import six
import json
import requests
from .model import model_factory
from .utils import is_ref, python_attr
PARAMETER_REGEX = re.compile(r'\{\([%\/a-zA-Z0-9_-]*\)\}')
class Link(object):
def __init__(self, schema, session, url, link_schema):
self._schema = schema
self._session = sess... | bsd-3-clause | 8,497,193,895,521,270,000 | 39.02649 | 120 | 0.604732 | false | 4.139726 | false | false | false |
kevinpetersavage/BOUT-dev | examples/MMS/GBS/circle.py | 3 | 3721 | # Generates an input mesh for circular, large aspect-ratio
# simulations:
#
# o Constant magnetic field
# o Curvature output as a 3D logB variable
# o Z is poloidal direction
# o Y is parallel (toroidal)
#
# NOTE: This reverses the standard BOUT/BOUT++ convention
# so here Bt and Bp are reversed
#
from __future_... | gpl-3.0 | -8,111,180,562,648,416,000 | 24.312925 | 68 | 0.515453 | false | 2.916144 | false | false | false |
gurneyalex/odoo | addons/l10n_it_edi/models/ir_mail_server.py | 4 | 18207 | # -*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import zipfile
import io
import re
import logging
import email
import dateutil
import pytz
import base64
try:
from xmlrpc import client as xmlrpclib
except ImportError:
import xmlrpclib
from lxml import etree
fr... | agpl-3.0 | -5,329,390,525,778,321,000 | 47.420213 | 159 | 0.543502 | false | 4.215328 | false | false | false |
genome/flow-workflow | flow_workflow/parallel_id.py | 1 | 1987 | from collections import OrderedDict
import json
import logging
LOG = logging.getLogger(__name__)
class ParallelIdentifier(object):
def __init__(self, parallel_id=[]):
self._entries = OrderedDict([(int(op_id), int(par_idx))
for op_id, par_idx in parallel_id])
@property
def index... | agpl-3.0 | -4,437,954,520,125,725,700 | 26.985915 | 74 | 0.618017 | false | 4.183158 | false | false | false |
jaredhoney/pyrad | pyrad/client.py | 1 | 6822 | # client.py
#
# Copyright 2002-2007 Wichert Akkerman <wichert@wiggy.net>
__docformat__ = "epytext en"
import select
import socket
import time
import six
from pyrad import host
from pyrad import packet
class Timeout(Exception):
"""Simple exception class which is raised when a timeout occurs
while waiting for... | bsd-3-clause | 2,550,055,677,371,712,000 | 34.34715 | 77 | 0.595133 | false | 4.320456 | false | false | false |
Swappsco/koalixerp | crm_core/admin.py | 1 | 6050 |
import reversion
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from crm_core.models import (UserExtension, Customer, Invoice, PurchaseOrder,
Quote, Supplie... | bsd-3-clause | -2,307,273,416,514,383,000 | 22.003802 | 78 | 0.614711 | false | 3.736875 | false | false | false |
nearlg/greenPi | relays/relays/log.py | 1 | 2044 | #!/usr/bin/env python
import time
import json
from datetime import datetime
class Log:
fileName = "/home/pi/.greenPi/relays/log.json"
#fileName = os.environ['HOME'] + "/.greenPi/relays/log.json"
@staticmethod
def writeLog(key, cycleName, numRelays, mode, seconds=None):
log = Log.getLog()
... | gpl-3.0 | 5,454,230,350,684,585,000 | 29.507463 | 77 | 0.51272 | false | 3.849341 | false | false | false |
AntSharesSDK/antshares-python | sdk/AntShares/Network/RemoteNode.py | 1 | 2537 | # -*- coding:utf-8 -*-
"""
Description:
Remote Node, use to broadcast tx
Usage:
from AntShares.Network.RemoteNode import RemoteNode
"""
#from AntShares.Network.RPC.RpcClient import RpcClient
from RPC.RpcClient import RpcClient
class RemoteNode(object):
"""docstring for RemoteNode"""
def __init__(sel... | apache-2.0 | 1,516,765,743,379,418,400 | 27.829545 | 70 | 0.53449 | false | 4.389273 | false | false | false |
freundTech/deepl-cli | test/translator.py | 1 | 1489 | import unittest
import requests
import deepl
paragraph_text = """This is a text with multiple paragraphs. This is still the first one.
This is the second one.
This is the third paragraph."""
paragraph_list = [
'This is a text with multiple paragraphs. This is still the first one.',
'This is the second one.',... | mit | -7,055,180,190,798,253,000 | 28.196078 | 110 | 0.650772 | false | 4.057221 | true | false | false |
nelsonmonteiro/django-sage-api | sage_api/models.py | 1 | 9916 | from __future__ import unicode_literals
try:
from urllib import urlencode, quote
except ImportError:
from urllib.parse import urlencode, quote
import json
import pytz
import datetime
import base64
import requests
import hashlib
import hmac
import urlparse
from collections import OrderedDict
from uuid import uui... | mit | 354,929,042,206,438,900 | 35.725926 | 114 | 0.590056 | false | 3.983929 | false | false | false |
scoin/redis-py-datamapper | redislist.py | 1 | 1913 | class RedisList:
import redis
r = redis.StrictRedis(host='localhost', port=6379, db=0)
def __init__(self, key):
self.key = key
def append(self, *values):
self.r.rpush(self.key, *values)
def unshift(self, *values):
self.r.lpush(self.key, *values)
def insert(self, pivot,... | mit | 1,374,646,387,132,393,700 | 35.788462 | 111 | 0.573968 | false | 3.403915 | false | false | false |
chippey/gaffer | python/GafferSceneUI/OutputsUI.py | 1 | 8592 | ##########################################################################
#
# Copyright (c) 2012, John Haddon. 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 so... | bsd-3-clause | -2,263,930,681,211,126,500 | 31.91954 | 140 | 0.670507 | false | 3.818667 | false | false | false |
chewse/djangorestframework-signed-permissions | signedpermissions/permissions.py | 1 | 2401 | # -*- coding: utf-8 -*-
from django.core import signing
from rest_framework import permissions
from .signing import unsign_filters_and_actions
class SignedPermission(permissions.BasePermission):
"""
Allow access to a particular set of filters if the sign is valid.
This permission allows access to sets ... | mit | -497,435,760,355,794,200 | 35.378788 | 87 | 0.588088 | false | 4.530189 | false | false | false |
zmughal/xerox-parc-uplib-mirror | win32/stopStartUpLibServices.py | 1 | 3546 | #
# This file is part of the "UpLib 1.7.11" release.
# Copyright (C) 2003-2011 Palo Alto Research Center, 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 Licens... | gpl-2.0 | -4,299,353,383,845,718,000 | 39.905882 | 178 | 0.64608 | false | 3.796574 | false | false | false |
mozman/ezdxf | examples/tiled_window_setup.py | 1 | 2522 | # Purpose: tiled window model space setup for AutoCAD
# Copyright (c) 2018 Manfred Moitzi
# License: MIT License
import ezdxf
FILENAME = r'C:\Users\manfred\Desktop\Outbox\tiled_windows_R2000.dxf'
# FILENAME = 'tiled_windows_R2000.dxf'
def draw_raster(doc):
marker = doc.blocks.new(name='MARKER')
attribs = {... | mit | -3,377,911,553,956,720,600 | 39.031746 | 119 | 0.635607 | false | 3.09828 | false | false | false |
godiard/pathagar | books/management/commands/addbooks.py | 1 | 3644 | # Copyright (C) 2010, One Laptop Per Child
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distrib... | gpl-2.0 | -4,907,735,612,702,819,000 | 31.828829 | 123 | 0.585071 | false | 4.053393 | false | false | false |
manastech/de-bee | index.py | 1 | 3273 | from google.appengine.ext import webapp
from google.appengine.api import users
from google.appengine.ext.webapp import template
from model import Membership
from util import membershipsOfUser
from util import descriptionOfBalanceInGroup
from util import descriptionOfTotalBalance
from comparators import compareMe... | mit | 6,012,039,414,046,494,000 | 31.418367 | 117 | 0.545066 | false | 4.164122 | false | false | false |
steinwurf/bongo | bongo/settings.py | 1 | 3513 | #! /usr/bin/env python
# encoding: utf-8
"""
Django settings for bongo project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import os
from config import *
# Bu... | bsd-3-clause | 921,367,275,572,019,300 | 27.330645 | 75 | 0.674637 | false | 3.502493 | false | false | false |
dedeco/cnddh-denuncias | cnddh/models.py | 1 | 25670 | # coding=latin-1
from database import db
from sqlalchemy.orm import relationship, backref, with_polymorphic
from sqlalchemy import Sequence, ForeignKey, UniqueConstraint
from cnddh.uploadsets import anexos_upload
import datetime
class Denuncia(db.Model):
__tablename__ = 'denuncias'
id = db... | apache-2.0 | -2,305,448,814,111,855,600 | 38.36478 | 124 | 0.628321 | false | 3.194375 | false | false | false |
yanikou19/pymatgen | pymatgen/io/abinitio/eos.py | 1 | 10838 | # coding: utf-8
"""Tools to compute equations of states with different models."""
from __future__ import unicode_literals, division, print_function
import collections
import numpy as np
import pymatgen.core.units as units
from pymatgen.core.units import FloatWithUnit
import logging
logger = logging.getLogger(__file_... | mit | 272,119,726,745,626,140 | 27.150649 | 104 | 0.537738 | false | 3.116159 | false | false | false |
salspaugh/queryutils | queryutils/csvparser.py | 1 | 6137 | import csv
import dateutil.parser
import os
import splparser.parser
from user import *
from query import *
from logging import getLogger as get_logger
from os import path
from splparser.exceptions import SPLSyntaxError, TerminatingSPLSyntaxError
BYTES_IN_MB = 1048576
LIMIT = 2000*BYTES_IN_MB
logger = get_logger("q... | bsd-3-clause | -6,412,215,798,137,213,000 | 34.473988 | 85 | 0.556135 | false | 4.309691 | false | false | false |
Lilykos/inspire-next | setup.py | 1 | 2682 | # -*- coding: utf-8 -*-
#
## This file is part of INSPIRE.
## Copyright (C) 2012, 2013 CERN.
##
## INSPIRE 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 opti... | gpl-2.0 | 5,499,976,328,954,376,000 | 27.83871 | 78 | 0.62267 | false | 3.709544 | false | false | false |
mimischi/django-clock | config/settings/local.py | 1 | 2439 | # -*- coding: utf-8 -*-
import socket
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bool("DJANGO_DEBUG", default=True)
TEMPLATES[0]["OPTIONS"]["debug"] = DEBUG
# SECRET CONFIGURATION
# -----------------------------------------------... | mit | 5,362,180,584,308,313,000 | 31.092105 | 84 | 0.507995 | false | 3.859177 | false | false | false |
libyal/libexe | tests/pyexe_test_support.py | 1 | 3236 | #!/usr/bin/env python
#
# Python-bindings support functions test script
#
# Copyright (C) 2011-2021, Joachim Metz <joachim.metz@gmail.com>
#
# Refer to AUTHORS for acknowledgements.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as ... | lgpl-3.0 | -7,019,984,351,821,116,000 | 28.962963 | 77 | 0.704883 | false | 3.838671 | true | false | false |
relic7/prodimages | python/drafts/walk_scraps/walkdir_exiv2.py | 1 | 2162 | #!/usr/bin/env python
import os,sys
import PIL
def recursive_dirlist(rootdir):
walkedlist = []
for dirname, dirnames, filenames in os.walk(rootdir):
# print path to all subdirectories first.
#for subdirname in dirnames:
#print os.path.join(dirname, subdirname)
# print path... | mit | 3,377,195,295,547,329,000 | 26.730769 | 84 | 0.637835 | false | 3.420886 | false | false | false |
netgroup/svef | computepsnr.py | 1 | 1285 | #!/usr/bin/env python
# take a psnr file and compute the average psnr on a specified range
import sys
if len(sys.argv) < 4:
print >> sys.stderr, """
Usage:
%s <beginning frame> <ending frame> <psnr file1> [<psnr file 2>]
""" % (sys.argv[0])
sys.exit(1)
beginningframe = int(sys.argv[1])
endingframe = int(... | gpl-3.0 | -3,360,558,190,853,625,000 | 21.946429 | 83 | 0.661479 | false | 2.495146 | false | false | false |
BhallaLab/moose-thalamocortical | pymoose/tests/randnum/kstest.py | 1 | 2706 | #!/usr/bin/env python
#
# This is a simple implementation of KS-test.
from math import *
from numpy import *
# Values taken from Knuth, TAOCP II: 3.3.1, Table 2
test_table = {1: [0.01000, 0.0500, 0.2500, 0.5000, 0.7500, 0.9500, 0.9900],
2: [0.01400, 0.06749, 0.2929, 0.5176, 0.7071, 1.0980, 1.2728],
... | lgpl-2.1 | 144,061,998,017,744,800 | 41.28125 | 160 | 0.585366 | false | 2.833508 | true | false | false |
michaelaye/pyciss | pyciss/solitons.py | 1 | 1916 | from datetime import datetime as dt
import pandas as pd
import pkg_resources as pr
from astropy import units as u
from numpy import poly1d
from . import io
from .ringcube import RingCube
def get_year_since_resonance(ringcube):
"Calculate the fraction of the year since moon swap."
t0 = dt(2006, 1, 21)
td... | isc | -6,622,842,903,339,667,000 | 28.030303 | 89 | 0.640919 | false | 3.385159 | false | false | false |
euanlau/django-umessages | umessages/fields.py | 1 | 2111 | from django import forms
from django.forms import widgets
from django.utils.translation import ugettext_lazy as _
from umessages.utils import get_user_model
class CommaSeparatedUserInput(widgets.Input):
input_type = 'text'
def render(self, name, value, attrs=None):
if value is None:
value... | bsd-3-clause | -4,658,207,798,081,575,000 | 34.779661 | 128 | 0.632875 | false | 4.196819 | false | false | false |
liavkoren/djangoDev | django/db/models/base.py | 1 | 60943 | from __future__ import unicode_literals
import copy
import sys
from functools import update_wrapper
import warnings
from django.apps import apps
from django.apps.config import MODELS_MODULE_NAME
from django.conf import settings
from django.core import checks
from django.core.exceptions import (ObjectDoesNotExist,
... | bsd-3-clause | 566,368,153,932,182,660 | 40.42964 | 166 | 0.545034 | false | 4.456852 | false | false | false |
kctan0805/vdpm | share/gdal/gdal-2.0.0/swig/python/samples/gdalinfo.py | 1 | 23758 | #!/usr/bin/env python
#/******************************************************************************
# * $Id: gdalinfo.py 28391 2015-01-30 19:57:31Z rouault $
# *
# * Project: GDAL Utilities
# * Purpose: Python port of Commandline application to list info about a file.
# * Author: Even Rouault, <even dot rouault ... | lgpl-2.1 | -3,859,931,217,219,883,500 | 37.883797 | 95 | 0.440946 | false | 4.30945 | false | false | false |
DolphinDream/sverchok | nodes/object_nodes/getsetprop.py | 1 | 9587 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | 4,452,298,741,122,461,000 | 29.826367 | 99 | 0.593616 | false | 3.573239 | false | false | false |
maxhutch/nek-analyze | interfaces/nek/slice.py | 1 | 2125 | from interfaces.abstract import AbstractSlice
import numpy as np
class DenseSlice(AbstractSlice):
""" Uninspired dense slice """
def __init__(self, shape, op=None):
self.shape = shape
self.op = op
if self.op is 'int' or self.op is None:
self.op = np.add
if self.op is np.maximum:
se... | gpl-3.0 | -7,998,525,873,178,120,000 | 26.597403 | 75 | 0.600941 | false | 3.08418 | false | false | false |
dirmeier/dataframe | dataframe/dataframe.py | 1 | 7810 | # dataframe: a data-frame implementation using method piping
#
# Copyright (C) 2016 Simon Dirmeier
#
# This file is part of dataframe.
#
# dataframe 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 versi... | gpl-3.0 | -6,358,612,851,086,372,000 | 30.365462 | 80 | 0.596927 | false | 4.286498 | false | false | false |
LabProdam/LabDiario | ChefeDeGabinete/Exoneracao.py | 1 | 2777 | #!/usr/bin/python
#coding: utf-8
from DiarioTools.Parser import *
from DiarioTools.Process import *
from DiarioTools.Search import *
import re
class ParseExoneracaoChefeDeGabinete(GenericParser):
def Initialize(self):
self.AddExpression("^\s*Exonerar.{0,1000}?(senhora|senhor)([^,]+).{0,400}?Chefe de Gabinete.(.+)",... | gpl-2.0 | -2,094,007,997,226,392,300 | 37.472222 | 169 | 0.662094 | false | 2.591207 | false | false | false |
safchain/contrail-sandesh | library/python/pysandesh/sandesh_client.py | 1 | 3139 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# Sandesh Client
#
from sandesh_connection import SandeshConnection
from sandesh_logger import SandeshLogger
from transport import TTransport
from protocol import TXMLProtocol
from sandesh_uve import SandeshUVETypeMaps
class SandeshClient(object)... | apache-2.0 | -5,720,518,425,684,812,000 | 37.280488 | 118 | 0.606881 | false | 3.692941 | false | false | false |
valmynd/MediaFetcher | src/plugins/youtube_dl/youtube_dl/extractor/puls4.py | 1 | 1992 | # coding: utf-8
from __future__ import unicode_literals
from .prosiebensat1 import ProSiebenSat1BaseIE
from ..utils import (
unified_strdate,
parse_duration,
compat_str,
)
class Puls4IE(ProSiebenSat1BaseIE):
_VALID_URL = r'https?://(?:www\.)?puls4\.com/(?P<id>[^?#&]+)'
_TESTS = [{
'url': 'http://www.puls4.com... | gpl-3.0 | 8,175,801,211,725,513,000 | 33.947368 | 147 | 0.677209 | false | 2.444172 | false | false | false |
aspiers/gertty | gertty/alembic/versions/50344aecd1c2_add_files_table.py | 1 | 3437 | """add files table
Revision ID: 50344aecd1c2
Revises: 1bb187bcd401
Create Date: 2015-04-13 08:08:08.682803
"""
# revision identifiers, used by Alembic.
revision = '50344aecd1c2'
down_revision = '1bb187bcd401'
import re
import sys
from alembic import op, context
import sqlalchemy as sa
import git.exc
import gertty... | apache-2.0 | -1,252,221,657,392,162,000 | 35.56383 | 136 | 0.571429 | false | 3.617895 | false | false | false |
KeithSloan/PressureClickBarometer | ReadSensor.py | 1 | 1544 | import smbus
import datetime
def GetTime ():
now = datetime.datetime.now()
return (str(now.hour)+":"+str(now.minute)+"."+str(now.second))
#init bus
bus = smbus.SMBus(1)
print GetTime()
# power up LPS331AP pressure sensor & set BDU
bus.write_byte_data(0x5d, 0x20, 0b10000100)
#write value 0b1 to register 0x... | gpl-2.0 | -7,952,943,462,252,300,000 | 25.62069 | 67 | 0.686528 | false | 2.4704 | false | false | false |
uclmr/inferbeddings | scripts/wn18/UCL_WN18_adv_hinge_v1.py | 1 | 4537 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import itertools
import os
import os.path
import sys
import argparse
import logging
def cartesian_product(dicts):
return (dict(zip(dicts, x)) for x in itertools.product(*dicts.values()))
def summary(configuration):
kvs = sorted([(k, v) for k, v in configurati... | mit | -6,206,648,303,705,620,000 | 33.371212 | 112 | 0.517743 | false | 3.476628 | true | false | false |
florath/init4boot | init4boot/plugins/multipath.py | 1 | 3244 | #
# multipath iSCSI plugin
#
# (c) 2008-2009 by flonatel (sf@flonatel.org)
# (c) 2015 by Andreas Florath (andreas@florath.org)
#
# For licensing details see COPYING
#
import os
from init4boot.lib.FilesystemUtils import fsutils
class multipath(object):
def __init__(self, config, opts):
self.config = confi... | gpl-3.0 | -1,211,690,267,482,373,000 | 25.809917 | 78 | 0.569667 | false | 3.803048 | false | false | false |
MjAbuz/foundation | foundation/organisation/migrations/0016_auto__add_projectlist.py | 1 | 14482 | # -*- 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
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ProjectList'
db.create_table(u'organisation_projectlist',... | mit | -6,140,818,890,270,693,000 | 79.016575 | 200 | 0.558348 | false | 3.670046 | false | false | false |
Mohamad1994HD/LinkArchiever | app/models/linkList.py | 1 | 1189 | from sets import Set
from interfaceDB import insert_link_with_tag, is_link, is_tag, get_tags_ids_of_link, get_tags_from_ids, \
get_links_ids_from_tag, get_link_data_from_id
class LinkList(list):
def __init__(self, link_name, link_desc=None, link_tags=[]):
list.__init__([])
self.name = link_n... | gpl-3.0 | -3,530,685,358,061,000,700 | 26.651163 | 107 | 0.606392 | false | 2.965087 | false | false | false |
conda-forge/conda-forge-webservices | conda_forge_webservices/webapp.py | 1 | 28798 | import os
import asyncio
import tornado.escape
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.locks
import hmac
import hashlib
import json
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
import atexit
# import functools
import logging
import requests
import git... | bsd-3-clause | 1,596,594,711,162,535,400 | 32.721311 | 88 | 0.494514 | false | 4.470351 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.