repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
r0h4n/node-agent | tendrl/node_agent/tests/test_tendrl_glusterfs_profile_info.py | 1 | 2013 | import importlib
import json
import sys
from mock import MagicMock
from mock import patch
from tendrl.node_agent.tests import mock_gluster_state
sys.modules['tendrl_gluster'] = mock_gluster_state
sys.modules['collectd'] = MagicMock()
utils = importlib.import_module(
"tendrl.node_agent."
"monitoring.collectd.c... | lgpl-2.1 | -1,681,463,659,755,732,700 | 39.26 | 71 | 0.697466 | false | 3.371859 | false | false | false |
rickerc/cinder_audit | cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py | 3 | 2059 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | apache-2.0 | 7,981,020,353,765,700,000 | 32.754098 | 78 | 0.644973 | false | 4.219262 | false | false | false |
dominicrodger/django-magazine | magazine/tests/views.py | 1 | 17818 | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from magazine.models import Author, Issue, Article
from magazine.tests.test_utils import initialise_article_text, LoginGuard
class MagazineGeneralViewsTestCase(TestCase):
fixtures = ['test_iss... | mit | 7,483,589,349,213,357,000 | 49.333333 | 79 | 0.576047 | false | 4.241371 | true | false | false |
MERegistro/meregistro | meregistro/apps/seguridad/forms/UsuarioCreateForm.py | 1 | 1087 | # -*- coding: UTF-8 -*-
from django import forms
from django.forms import ModelForm
from apps.seguridad.models import Ambito, Rol, Usuario
class UsuarioCreateForm(ModelForm):
class Meta:
model = Usuario
password = forms.CharField(widget=forms.PasswordInput(render_value=False), label='contraseña')
... | bsd-3-clause | -8,375,158,918,915,616,000 | 48.227273 | 163 | 0.711911 | false | 3.40566 | false | false | false |
jwvhewitt/rixs | animob.py | 1 | 3202 | import things
class AnimOb( things.Thing ):
def __init__(self, x=0, y=0, width=64, height=64, sprite_name="", start_frame=0, end_frame=0, ticks_per_frame = 1, loop = 0 ):
super(AnimOb, self).__init__(x,y,width,height,sprite_name,start_frame)
self.start_frame = start_frame
self.end_frame = e... | lgpl-2.1 | 7,005,671,672,683,083,000 | 34.577778 | 130 | 0.564022 | false | 2.599026 | false | false | false |
m4h7/juriscraper | juriscraper/opinions/united_states/state/neb.py | 2 | 2335 | # Author: Michael Lissner
# Date created: 2013-06-13
from datetime import date
from datetime import datetime
from juriscraper.OpinionSite import OpinionSite
class Site(OpinionSite):
def __init__(self, *args, **kwargs):
super(Site, self).__init__(*args, **kwargs)
self.court_id = self.__module__
... | bsd-2-clause | 3,455,796,131,265,861,600 | 38.576271 | 112 | 0.549036 | false | 3.138441 | false | false | false |
geodynamics/pylith | pylith/meshio/MeshIOLagrit.py | 1 | 3937 | # ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copy... | mit | -831,717,743,607,661,700 | 30.496 | 82 | 0.593599 | false | 3.785577 | false | false | false |
janpipek/physt | physt/histogram1d.py | 1 | 21916 | """One-dimensional histograms."""
from abc import ABC, abstractmethod
from typing import Any, Dict, Mapping, Optional, Tuple, TYPE_CHECKING, Type, Union
import numpy as np
from physt import bin_utils
from physt.histogram_base import HistogramBase
from physt.binnings import BinningBase, BinningLike
from physt.typing_a... | mit | 6,907,549,307,644,847,000 | 32.155825 | 113 | 0.583866 | false | 4.035353 | false | false | false |
Sylnai/pizza-auth | pizza_auth/keytools.py | 2 | 1959 | import eveapi
import json
import datetime
with open('config.json', 'r') as fh:
config = json.loads(fh.read())
api = eveapi.EVEAPIConnection()
class KeyTools():
def __init__(self, config):
self.config = config["keytools"]
self.authconfig = config
self.bluealliances = self.getBlueAlliances()
def getBlueAllia... | mit | -3,580,288,089,574,756,000 | 32.20339 | 101 | 0.751914 | false | 3.164782 | true | false | false |
rwl/puddle | puddle/resource/action/close_all_action.py | 1 | 3791 | #------------------------------------------------------------------------------
# Copyright (C) 2009 Richard W. Lincoln
#
# 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 restrictio... | mit | -8,203,364,910,856,622,000 | 38.082474 | 79 | 0.460301 | false | 5.558651 | false | false | false |
mjg/Impressive-svn | Artwork/make_menu_images.py | 2 | 1668 | from __future__ import print_function
from PIL import Image
from builtins import bytes
Height = 32
Width = 64
FileName = "../site/menu_%s.png"
GradStart = 0.875
GradEnd = 0.75
BaseGradient = [GradStart + (y / float(Height - 1)) * (GradEnd - GradStart) for y in range(Height)]
def tf(x): return x*x * (3 - 2*x)
Transi... | gpl-2.0 | 7,660,627,011,247,939,000 | 28.263158 | 99 | 0.580336 | false | 2.60625 | false | false | false |
Reddine/dzlibs | tweeza/items/forms.py | 9 | 1931 | # -*- coding: utf-8 -*-
from flask.ext.wtf import Form
from wtforms import TextField, TextAreaField, SubmitField, SelectField
from wtforms.fields.html5 import URLField
from flask.ext.babel import lazy_gettext as _
from flask_wtf.file import FileField
class BaseForm(Form):
"""
this contains shared fields amon... | mpl-2.0 | -6,143,750,140,093,622,000 | 24.407895 | 70 | 0.648887 | false | 4.272124 | false | false | false |
Caseyftw/astronet | astronet/augmentations/normalize.py | 1 | 1531 | import numpy as np
import copy
class Normalize():
""" Calculates the batch mean and standard deviation. Then normalizes inputs by first
subtracting the mean, then dividing by the standard deviation. This prevents rounding
errors when dealing with large inputs and allows for easier learning of the network.... | gpl-2.0 | -3,884,831,450,505,397,000 | 31.574468 | 90 | 0.572175 | false | 4.556548 | false | false | false |
chrisrink10/mumpy | mumpy/parser.py | 1 | 47751 | """MUMPy Parser
The MUMPS parsing rules written as dictated by the PLY package.
Licensed under a BSD license. See LICENSE for more information.
Author: Christopher Rink"""
import logging
import ply.yacc as yacc
import mumpy
import mumpy.lang as lang
# noinspection PyMethodMayBeStatic
class MUMPSParser:
def __i... | bsd-3-clause | 762,227,502,112,888,400 | 33.67756 | 119 | 0.491801 | false | 3.725018 | false | false | false |
plotly/python-api | packages/python/plotly/_plotly_utils/colors/carto.py | 1 | 7800 | """
Color sequences and scales from CARTO's CartoColors
Learn more at https://github.com/CartoDB/CartoColor
CARTOColors are made available under a Creative Commons Attribution license: https://creativecommons.org/licenses/by/3.0/us/
"""
from ._swatches import _swatches
def swatches(template=None):
return _swat... | mit | -3,901,390,791,292,925,400 | 18.948849 | 124 | 0.466795 | false | 2.411874 | false | false | false |
rackerlabs/deuce-client | deuceclient/api/block.py | 1 | 5913 | """
Deuce Client - Block API
"""
import hashlib
import json
from stoplight import validate
from deuceclient.common.validation import *
class Block(object):
@staticmethod
def make_id(data):
sha1 = hashlib.sha1()
sha1.update(data)
return sha1.hexdigest().lower()
# TODO: Add a val... | apache-2.0 | -128,730,484,950,031,490 | 30.962162 | 77 | 0.557416 | false | 4.303493 | false | false | false |
kball/ambry | ambry/server/main.py | 1 | 29639 | '''
REST Server For DataBundle Libraries.
'''
import bottle
from bottle import error, hook, get, put, post, request, response, redirect
from bottle import HTTPResponse, static_file, install, url, local
from bottle import ServerAdapter, server_names, Bottle
from bottle import run, debug
from decorator import decora... | bsd-2-clause | -2,039,594,038,725,926,700 | 27.417066 | 126 | 0.609332 | false | 3.850721 | true | false | false |
jrlusby/asai-monitor-notifications | MonitorMain.py | 1 | 2261 | #! /usr/bin/env python3
import sys
import threading
def main(argv):
config_file = "monitor.conf"
settings = {}
keywords = []
to_emails = []
#create settings dictionary
with open(config_file) as f:
for line in f:
#A fairly lousy comment skipper, only checks for lines tha... | mit | -4,811,711,743,282,196,000 | 36.065574 | 129 | 0.497125 | false | 4.381783 | false | false | false |
LonamiWebs/Telethon | telethon/sessions/string.py | 2 | 1990 | import base64
import ipaddress
import struct
from .abstract import Session
from .memory import MemorySession
from ..crypto import AuthKey
_STRUCT_PREFORMAT = '>B{}sH256s'
CURRENT_VERSION = '1'
class StringSession(MemorySession):
"""
This session file can be easily saved and loaded as a string. According
... | mit | 7,214,784,694,772,908,000 | 30.587302 | 79 | 0.617588 | false | 4.036511 | false | false | false |
mathemage/matraz | app.py | 1 | 2114 | import os
from flask import Flask, render_template
from flask.ext.socketio import SocketIO, emit
from flask.ext.sqlalchemy import SQLAlchemy
from contact import get_contact
from doi import get_doi
from license import get_license
from utils import get_repo_info
app = Flask(__name__)
app.config.from_object(os.environ... | unlicense | 3,566,912,831,331,949,600 | 28.774648 | 74 | 0.59035 | false | 3.329134 | false | false | false |
yodebu/Interview-Street | Server/PythonCrawl/SOURCE_CODE/Tree_Generate.py | 1 | 4553 | #!/usr/bin/env python
'''
this is the file containing function to implement the various Trees
from an input of distance matrix
Author: Sourya Bhattacharyya
Dept of CSE, IIT Kharagpur
V1.0 - 06.02.2014 - basic implementation
'''
import Header
from Header import *
import UtilFunc
from UtilFunc import *
#---------... | mit | -2,102,486,608,699,733,000 | 44.089109 | 121 | 0.696244 | false | 3.462357 | false | false | false |
jmlopez-rod/pyjoint | setup.py | 1 | 1787 | """pyjoint setup script"""
import imp
import os.path as pt
from setuptools import setup
def get_version():
"Get version & version_info without importing pyjoint.__init__ "
path = pt.join(pt.dirname(__file__), 'pyjoint', '__version__.py')
mod = imp.load_source('pyjoint_version', path)
return mod.VERSI... | bsd-2-clause | -4,642,219,192,141,247,000 | 29.288136 | 77 | 0.622272 | false | 3.524655 | false | false | false |
fogleman/primitive | scripts/process.py | 1 | 1894 | from Queue import Queue
import itertools
import os
import subprocess
import sys
import threading
def makedirs(x):
try:
os.makedirs(x)
except Exception:
pass
def primitive(i, o, n, a, m):
makedirs(os.path.split(o)[0])
args = (i, o, n, a, m)
cmd = 'primitive -r 128 -s 512 -i %s -o %s... | mit | -6,062,819,047,454,850,000 | 24.594595 | 72 | 0.551214 | false | 3.079675 | false | false | false |
dylanleong/mysite | userprofile/migrations/0001_initial.py | 1 | 2460 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | mit | 4,323,790,950,712,773,000 | 48.2 | 114 | 0.583333 | false | 4.052718 | false | false | false |
IT-PM-OpenAdaptronik/Webapp | apps/projects/migrations/0003_auto_20180427_0823.py | 1 | 1124 | # Generated by Django 2.0 on 2018-04-27 08:23
from django.db import migrations
categories = [
{
'name': 'Sonstiges',
'children': []
},
]
def save(model, name, parent=None):
try:
entry = model.objects.get(name=name, parent=parent)
except model.DoesNotExist:
entry = mode... | mit | -1,165,955,411,366,282,000 | 23.977778 | 63 | 0.614769 | false | 3.985816 | false | false | false |
freethenation/OpenCLNoise | oclwn.py | 2 | 4091 | #!/usr/bin/python
from openclnoise import *
from openclnoise.filterstack import ByteKernel
import optparse
import sys
import os
# Function to prompt for device selection
def askLongOptions(prompt,options):
print("{0}:".format(prompt))
for i,o in enumerate(options):
print("\t{0}: {1}".format(i,o.name))
... | mit | -8,613,666,348,649,616,000 | 32.260163 | 95 | 0.657052 | false | 3.3782 | false | false | false |
sideeffects/HoudiniEngineForMaya | scripts/houdiniEngineSelection.py | 1 | 2204 | from maya import cmds
def get_selected_components(component_type):
components = []
sel_mask = -1
type_name = ''
expand = False
lwr_component_type = component_type.lower()
if lwr_component_type == 'vertex':
sel_mask = 31
type_name = 'vertices'
elif lwr_component_typ... | mit | 2,314,755,787,256,800,000 | 34.548387 | 140 | 0.592559 | false | 3.786942 | false | false | false |
nanaki82/marvin-telegram-bot | modules/events/event_inline.py | 1 | 6862 | from typing import List
from telegram import Bot
from telegram import InlineKeyboardButton
from telegram import InlineKeyboardMarkup
from telegram import InlineQueryResultArticle
from telegram import InputTextMessageContent
from telegram import ParseMode
from telegram import Update
from telegram.ext import CallbackQue... | gpl-3.0 | -4,608,505,274,392,806,400 | 39.60355 | 116 | 0.529583 | false | 4.248916 | false | false | false |
sdaxen/pymol_scripts | rdkitalign.py | 1 | 2298 | """Align two molecules using RDKit.
Author: Seth Axen
E-mail: seth.axen@gmail.com
"""
import os
import tempfile
from pymol import cmd
import rdkit
import rdkit.Chem
from rdkit.Chem import rdMolAlign
try:
import numpy as np
HAS_NP = True
except ImportError:
HAS_NP = False
def obj_to_rdmol(obj, state=-1):
... | lgpl-3.0 | -8,288,627,085,737,818,000 | 29.64 | 79 | 0.646214 | false | 3.325615 | false | false | false |
any1m1c/ipc20161 | lista4/ipc_lista4.21.py | 1 | 1161 | #Beatriz Pessoa Longato 1615310001
#Equipe 3
carros=[]
kmsporlitro=[]
litrospara1000=[]
precopara1000=[]
menor_consumo=0
pos=0
print " "
print "Comparativo de Consumo de Combustível"
print " "
for i in range (5):
carro=raw_input('Veículo: ' )
kmporlitro= float(raw_input("Km por litro: "))
... | apache-2.0 | -1,620,822,078,029,572,400 | 14.635135 | 75 | 0.574762 | false | 2.728774 | false | false | false |
yafraorg/yafra-database | traveldb/tdb-model.py | 1 | 88665 | # coding: utf-8
from sqlalchemy import BigInteger, Column, DateTime, Float, ForeignKey, Index, Integer, LargeBinary, String, Table
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
metadata = Base.metadata
t_akt_detail = Table(
'akt_detail'... | apache-2.0 | 4,005,079,489,188,221,000 | 28.194929 | 126 | 0.63317 | false | 3.092066 | false | false | false |
Pyco7/django-ajax-views | ajaxviews/views.py | 1 | 15145 | from django.http import HttpResponseRedirect
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView
try:
from extra_views import ModelFormSetView
except ImportError:
Mode... | mit | 7,182,276,854,406,513,000 | 38.134367 | 115 | 0.667679 | false | 4.111021 | false | false | false |
gitsimon/tq_website | payment/postfinance_connector.py | 2 | 7886 | import base64
import logging
import re
import xml.etree.ElementTree as ET
from io import StringIO
from datetime import datetime
from django.core.files.base import ContentFile
from django.db import DatabaseError
from paramiko.client import SSHClient, AutoAddPolicy
from paramiko import RSAKey
from payment.models import... | gpl-2.0 | 5,905,439,822,534,104,000 | 39.860104 | 163 | 0.58775 | false | 3.813346 | false | false | false |
cackharot/geosnap-server | src/geosnap/resources/site.py | 1 | 1866 | from bson import ObjectId, json_util
from flask import g, request
from flask_login import login_required
from flask_restful import Resource
from geosnap import mongo
from geosnap.service.SiteService import SiteService
class SiteListApi(Resource):
method_decorators = [login_required]
def __init__(self):
... | apache-2.0 | 356,031,994,079,206,200 | 31.172414 | 104 | 0.589496 | false | 3.91195 | false | false | false |
RoboArmadillo/RoboSim-V2-Alpha | odelib/__init__.py | 1 | 26969 | """
odelib/__init__.py
A module containing extensions to the PyODE Library.
Written By:
James Thomas
Email: jt@missioncognition.net
Web: http://missioncognition.net/
Copyright 2009
This file is part of the VisualPyODE package.
This library is free software; you can redistribute it and/or
modify it under the term... | gpl-2.0 | 8,749,197,762,073,843,000 | 38.660294 | 112 | 0.65731 | false | 4.043935 | false | false | false |
khchine5/xl | lino_xl/lib/extensible/models.py | 1 | 7573 | # -*- coding: UTF-8 -*-
# Copyright 2011-2017 Luc Saffre
#
# License: BSD (see file COPYING for details)
"""
Database models for `lino_xl.lib.extensible`.
.. autosummary::
"""
from __future__ import unicode_literals
import logging
logger = logging.getLogger(__name__)
import datetime
from django.conf import sett... | bsd-2-clause | 5,538,927,268,830,506,000 | 30.164609 | 102 | 0.628417 | false | 3.721376 | false | false | false |
City-of-Helsinki/smbackend | services/tests/test_notifications_api.py | 1 | 2358 | import pytest
from django.urls import reverse
from rest_framework.test import APIClient
from services.models import Announcement, ErrorMessage
from services.tests.utils import get
def create_notifications(model):
model.objects.create(
title_en="Visible notification",
title_fi="Esimerkki-ilmoitus"... | agpl-3.0 | 4,219,605,083,319,857,000 | 31.273973 | 88 | 0.642615 | false | 3.602446 | true | false | false |
ifduyue/sentry | tests/sentry/lang/native/test_utils.py | 1 | 42574 | from __future__ import absolute_import
import os
from sentry.lang.native.utils import get_sdk_from_event, cpu_name_from_data, \
version_build_from_data, merge_minidump_event
def test_get_sdk_from_event():
sdk_info = get_sdk_from_event(
{
'debug_meta': {
'sdk_info': {
... | bsd-3-clause | 6,704,930,447,990,639,000 | 38.23871 | 109 | 0.372622 | false | 3.818638 | false | false | false |
henry-ngo/VIP | vip_hci/negfc/simplex_fmerit.py | 1 | 7444 | #! /usr/bin/env python
"""
Module with the function of merit definitions for the NEGFC optimization.
"""
from __future__ import print_function
import numpy as np
from skimage.draw import circle
from ..phot import cube_inject_companions
from ..var import frame_center
from ..pca import pca_annulus
def chisquare(model... | mit | -2,820,252,750,280,505,300 | 41.537143 | 87 | 0.632724 | false | 4.008616 | false | false | false |
ooici/pyon | pyon/core/thread.py | 1 | 10921 | #!/usr/bin/env python
"""Classes to build and manage pyon container worker processes."""
__author__ = 'Adam R. Smith'
from pyon.util.async import *
from pyon.util.log import log
from pyon.core.exception import ContainerError
import time
import os
import signal
from gevent.event import AsyncResult
class PyonThrea... | bsd-2-clause | -3,481,359,029,649,299,500 | 29.937677 | 117 | 0.590972 | false | 4.239519 | false | false | false |
csvelasq/TepUnderScenarios | tepmodel/TepScenariosNSGA.py | 1 | 10955 | import random
import numpy as np
from deap import base
from deap import creator
from deap import tools
import TepScenariosModel
import time
from datetime import timedelta
import logging
import Utils
class TepScenariosNsga2SolverParams(object):
def __init__(self, number_generations=1, number_individuals=100,
... | mit | 4,595,212,093,922,641,000 | 49.483871 | 114 | 0.632497 | false | 4.052904 | false | false | false |
pennlabs/penn-mobile-server | server/studyspaces/cancel.py | 1 | 2379 | from flask import jsonify, request
from penn.base import APIError
from server import app, sqldb
from server.models import User
from server.penndata import studyspaces, wharton
from server.studyspaces.book import save_booking, save_wharton_sessionid
from server.studyspaces.models import StudySpacesBooking
@app.route(... | mit | 8,001,863,402,918,858,000 | 35.6 | 99 | 0.586801 | false | 3.874593 | false | false | false |
AnsgarSchmidt/sensomatic | knot/python/Motion.py | 1 | 1041 | import time
import RPi.GPIO as GPIO
import paho.mqtt.client as mqtt
def on_connect(client, userdata, rc):
print("Connected with result code "+str(rc))
def on_message(client, userdata, msg):
print "Mq Received on channel %s -> %s" % (msg.topic, msg.payload)
if __name__ == "__main__":
GPIO.setmode... | apache-2.0 | 3,331,700,732,170,915,000 | 26.394737 | 80 | 0.595581 | false | 3.458472 | false | false | false |
HumanExposure/factotum | apps_api/api/views.py | 1 | 16366 | import operator
import types
import uuid
from django.db.models import Prefetch, Q
from django.http import JsonResponse
from django.template.defaultfilters import pluralize
from django.utils.datastructures import MultiValueDict
from django_filters.rest_framework import DjangoFilterBackend
from django_mysql.models impor... | gpl-3.0 | 8,099,023,605,967,604,000 | 36.450801 | 107 | 0.672064 | false | 4.107932 | false | false | false |
DistributedML/TorML | ML/code/softmax_model_test.py | 1 | 1671 | from __future__ import division
import numpy as np
import utils
import matplotlib.pyplot as plt
import pdb
datatest = utils.load_dataset("mnist/mnist_test", npy=True)
Xtest, ytest = datatest['X'], datatest['y']
datatrain = utils.load_dataset("mnist/mnist_train", npy=True)
XBin, yBin = datatrain['X'], datatrain['y']
... | mit | 3,351,148,282,523,343,400 | 20.423077 | 61 | 0.609216 | false | 2.721498 | true | false | false |
tkerola/chainer | chainer/optimizers/ada_delta.py | 5 | 3487 | import numpy
import chainer
from chainer.backends import cuda
from chainer import optimizer
from chainer import types
if types.TYPE_CHECKING:
import typing_extensions as tpe
class AdaDeltaHyperparameter(tpe.Protocol):
"""Protocol class for hyperparameter of Zeiler's ADADELTA.
This is only f... | mit | 4,908,170,119,172,536,000 | 29.858407 | 87 | 0.591913 | false | 3.786102 | false | false | false |
openmicroanalysis/calczaf | .github/sync.py | 1 | 11745 | """
Script to synchronize CalcZAF source code from Probe Software with GitHub using
Travis CI.
Steps:
* Pull repository from GitHub
* Download ZIP containing CalcZAF source code from Probe Software website
* Parse version text file and compare for new changes
* Extract files from ZIP
* Add modified files, co... | mit | -7,767,250,187,842,426,000 | 30.236702 | 111 | 0.601873 | false | 3.723843 | false | false | false |
defnull/gitvid | gitvid.py | 1 | 8732 | import pygments
import pygments.lexers
from pygments.token import Token
import PIL, PIL.Image, PIL.ImageFont, PIL.ImageDraw
from PIL.ImageColor import getrgb
import sys, os
import subprocess, re
font = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'font.pil')
class StyleDict(dict):
''' Store color info... | mit | -4,585,974,071,758,533,000 | 33.788845 | 178 | 0.509162 | false | 3.54527 | false | false | false |
eirannejad/pyRevit | extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/Wipe.pulldown/Wipe Collab Cache.pushbutton/script.py | 1 | 1276 | "Erase selected BIM360 collaboration cache"
#pylint: disable=import-error,invalid-name,broad-except,superfluous-parens
from pyrevit.revit import bim360
from pyrevit import forms
from pyrevit import script
logger = script.get_logger()
output = script.get_output()
class CacheModelItem(forms.TemplateListItem):
"""... | gpl-3.0 | -6,293,792,692,476,199,000 | 26.73913 | 74 | 0.648903 | false | 3.564246 | false | false | false |
makinacorpus/Geotrek | geotrek/trekking/filters.py | 1 | 1240 | from django.utils.translation import gettext_lazy as _
from geotrek.authent.filters import StructureRelatedFilterSet
from geotrek.core.filters import TopologyFilter
from geotrek.zoning.filters import ZoningFilterSet
from .models import Trek, POI, Service
class TrekFilterSet(ZoningFilterSet, StructureRelatedFilterSet... | bsd-2-clause | -1,993,821,014,303,776,800 | 32.513514 | 72 | 0.712097 | false | 3.887147 | false | false | false |
Enether/python_wow | utils/helper.py | 1 | 3166 | """
This module holds helper functions.
i.e functions that do not serve any specific purpose but are needed in multiple places
"""
from copy import deepcopy
def parse_int(value) -> int:
"""
this function is used to parse data from the DB into an integer.
because a lot of the cells can be empty, we get Non... | mit | 862,484,010,829,290,400 | 40.116883 | 110 | 0.692672 | false | 3.992434 | false | false | false |
pombredanne/taskflow-1 | taskflow/listeners/claims.py | 2 | 4129 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | apache-2.0 | -2,091,058,076,399,149,300 | 39.480392 | 79 | 0.646161 | false | 4.166498 | false | false | false |
kimgea/domain_name_finder | domainfinder/run.py | 1 | 1364 | '''
Created on Aug 29, 2015
@author: kim
'''
import pymongo
import time
import random
from domainmaker import makedomain
from domainchecker import checkDomain_checkDomain#, checkDomain_whois
#check = [checkDomain_checkDomain, checkDomain_whois]
#check = [checkDomain_checkDomain,]
MONGODB_SERVER = "localhost"
MONGO... | mit | -9,199,589,757,802,223,000 | 22.135593 | 86 | 0.628299 | false | 3.637333 | false | false | false |
mnori/foldatlas | foldatlas/app.py | 1 | 5922 | from flask import Flask, render_template, request, Response, send_from_directory
from flask_sqlalchemy import SQLAlchemy
from sys import argv
import settings
from utils import FastaExporter, FastaSplitter
app = Flask(__name__)
# these commands enable migrations, see https://flask-migrate.readthedocs.org/en/latest/
#... | mit | 504,437,045,325,544,600 | 32.647727 | 103 | 0.764944 | false | 3.51454 | false | false | false |
austincawley/news-sentiment | sentiment_scraper/models/article.py | 1 | 5690 | """
"""
from datetime import datetime
import boto3
from botocore.exceptions import ClientError
from sentiment_scraper import db
from sentiment_scraper.models.facebook_stats import FacebookStats
from sentiment_scraper.models.text_analysis import TextAnalysis
ARTICLE_BUCKET_NAME = 'scraped-articles'
ARTICLE_RAW_PREFIX ... | mit | 663,021,054,367,073,400 | 32.081395 | 105 | 0.593146 | false | 3.862865 | false | false | false |
alexgorban/models | research/object_detection/utils/patch_ops_test.py | 1 | 4927 | # Copyright 2019 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 | -5,720,877,302,414,600,000 | 34.446043 | 80 | 0.609093 | false | 3.033867 | true | false | false |
polyaxon/polyaxon | core/polyaxon/utils/date_utils.py | 1 | 7608 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -3,700,048,312,625,364,000 | 31.652361 | 89 | 0.641299 | false | 4.702101 | false | false | false |
shvechikov/python-rtfng | rtfng/document/section.py | 4 | 1686 | from rtfng.PropertySets import StandardPaper, MarginsPropertySet
class Section( list ) :
NONE = 1
COLUMN = 2
PAGE = 3
EVEN = 4
ODD = 5
BREAK_TYPES = [ NONE, COLUMN, PAGE, EVEN, ODD ]
def __init__( self, paper=None, margins=None, break_type=None, headery=None, footery=None, landsc... | mit | -7,938,016,015,029,761,000 | 29.107143 | 137 | 0.609134 | false | 3.5125 | false | false | false |
ChugR/qpid-dispatch | tests/system_tests_link_route_credit.py | 1 | 25338 | #
# 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... | apache-2.0 | -2,919,499,859,774,791,000 | 41.656566 | 115 | 0.543216 | false | 4.170178 | true | false | false |
votervoice/openstates | openstates/nh/people.py | 1 | 5749 | import re
from pupa.scrape import Person, Scraper
from openstates.utils import LXMLMixin
class NHPersonScraper(Scraper, LXMLMixin):
members_url = 'http://www.gencourt.state.nh.us/downloads/Members.txt'
lookup_url = 'http://www.gencourt.state.nh.us/house/members/memberlookup.aspx'
house_profile_url = 'htt... | gpl-3.0 | -4,182,390,810,113,675,000 | 36.090323 | 98 | 0.528266 | false | 3.782237 | false | false | false |
iAmeeth/CL3 | A3/A3.py | 1 | 1674 | from bitstring import BitArray
from flask import Flask
from flask import request
from flask import render_template
app = Flask(__name__)
def booth(m,r,x,y):
totalLength=x+y+1
mA=BitArray(int=m,length=totalLength)
print mA
A=mA<<(y+1)
print A
mA1=BitArray(int=-m,length=totalLength)
S=mA1<<(y+1)
P1=BitArray(int=... | mit | -8,625,056,341,922,436,000 | 24.363636 | 70 | 0.654122 | false | 2.262162 | false | false | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/FormEncode-1.0.1-py2.5.egg/formencode/validators.py | 1 | 94327 | ## FormEncode, a Form processor
## Copyright (C) 2003, Ian Bicking <ianb@colorstudy.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 Foundation; either
## version 2.1 of the License, or ... | bsd-3-clause | 6,074,821,179,870,173,000 | 32.881825 | 226 | 0.532053 | false | 4.054459 | false | false | false |
MatthewGWilliams/Staff-Transport | emergencyTransport/emergencyTransport/settings.py | 1 | 2549 | """
Django settings for emergencyTransport project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_D... | mit | 7,839,047,797,108,068,000 | 23.27619 | 71 | 0.717536 | false | 3.327676 | false | false | false |
BirchJD/RPiTimer | PiTimer_Step-10/Relays.py | 1 | 4502 | # PiTimer - Python Hardware Programming Education Project For Raspberry Pi
# Copyright (C) 2015 Jason Birch
#
# 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
... | gpl-3.0 | -5,327,384,494,041,099,000 | 36.516667 | 98 | 0.502443 | false | 4.03405 | false | false | false |
assefay/inasafe | safe_qgis/tools/function_browser.py | 2 | 6805 | # coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid -
**Impact Functions Dialog.**
Contact : ole.moller.nielsen@gmail.com
.. note:: 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 Soft... | gpl-3.0 | -7,811,658,565,128,872,000 | 37.01676 | 79 | 0.627186 | false | 4.040974 | false | false | false |
Micronaet/micronaet-docnaet | docnaet/docnaet.py | 1 | 34842 | # -*- coding: utf-8 -*-
###############################################################################
#
# ODOO (ex OpenERP)
# Open Source Management Solution
# Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>)
# Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>)
# This prog... | agpl-3.0 | -8,901,254,716,880,275,000 | 35.218295 | 87 | 0.522215 | false | 4.090877 | false | false | false |
Monsho/D3D12Samples | resources/data/aces_1.0.3/python/aces_ocio/process.py | 1 | 20938 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A process wrapper class that maintains the text output and execution status of
a process or a list of other process wrappers which carry such data.
"""
from __future__ import division
import os
import sys
import traceback
__author__ = 'ACES Developers'
__copyright__... | mit | 5,291,990,221,559,987,000 | 26.806109 | 79 | 0.469911 | false | 4.703055 | false | false | false |
kirmani/goto.kirmani.io | goto.py | 1 | 1810 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 Sean Kirmani <sean@kirmani.io>
#
# Distributed under terms of the MIT license.
import os
from forms import ShortLinkForm
from flask import Flask,redirect
from flask import render_template
from python import tools
from python import sh... | mit | 8,307,908,561,015,588,000 | 26.830769 | 72 | 0.684909 | false | 3.097603 | false | false | false |
sidrakesh93/grpc-tools | benchmarking/performance_db/performance_db_frontend/performance_db_frontend/settings.py | 1 | 4256 | #
# Copyright 2015 Google Inc. 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, this list of conditions and the fo... | bsd-3-clause | 4,897,933,013,604,006,000 | 33.601626 | 72 | 0.727209 | false | 3.806798 | false | false | false |
tschad/schadpy | reg/contnorm.py | 1 | 2370 | #contnorm.py
from numpy import sort,int
def contnorm(d0,fraction = None, axis = None):
'''
Determines the normalization factor of a numpy array of up to 4 dimensions by sorting
the array, and locating the value for which the number of entries below the value
correspond the inputed fraction.
... | mit | 4,149,642,707,194,009,000 | 36.619048 | 91 | 0.586076 | false | 3.030691 | false | false | false |
Jokeren/neon | neon/transforms/cost.py | 1 | 18880 | # ----------------------------------------------------------------------------
# Copyright 2014-2016 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | apache-2.0 | 3,634,670,616,771,678,700 | 33.642202 | 99 | 0.562818 | false | 3.889576 | false | false | false |
onceuponatimeforever/oh-mainline | vendor/packages/ghettoq/ghettoq/taproot.py | 17 | 8077 | import atexit
import socket
import sys
from itertools import count
from time import time, sleep
from anyjson import serialize, deserialize
from carrot.backends.base import BaseBackend, BaseMessage
from carrot.utils import gen_unique_id
from ghettoq.backends import Connection
from ghettoq.messaging import Empty as Qu... | agpl-3.0 | 4,945,850,442,500,271,000 | 30.185328 | 75 | 0.589699 | false | 4.396843 | false | false | false |
opencivicdata/scrapers-ca | ca_qc_kirkland/people.py | 1 | 1470 | from utils import CanadianScraper, CanadianPerson as Person
import re
COUNCIL_PAGE = 'http://www.ville.kirkland.qc.ca/portrait-municipal/conseil-municipal/elus-municipaux'
class KirklandPersonScraper(CanadianScraper):
def scrape(self):
page = self.lxmlize(COUNCIL_PAGE, 'iso-8859-1')
councillors... | mit | 8,237,721,856,123,090,000 | 38.72973 | 137 | 0.565986 | false | 3.295964 | false | false | false |
munin/munin | queries/porting.py | 1 | 7394 | #!/usr/bin/env python
# This file is part of Munin.
# Munin 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.
# Munin is distributed i... | gpl-2.0 | -3,681,811,537,692,089,300 | 31.28821 | 87 | 0.647552 | false | 3.220383 | false | false | false |
BronzeCrab/ud_fullstack_p4 | conference.py | 1 | 36435 | #!/usr/bin/env python
"""
conference.py -- Udacity conference server-side Python App Engine API;
uses Google Cloud Endpoints
$Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $
created by wesc on 2014 apr 21
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
from datetime import datetime
from dat... | apache-2.0 | -2,688,367,052,765,264,400 | 38.093348 | 94 | 0.591519 | false | 4.309794 | false | false | false |
rubenochiavone/ternary-rk-fit | src/TernaryRKModel.py | 1 | 3754 | from RedlichKisterEquation import RedlichKisterEquation
class TernaryRKModel:
modelTag = "TernaryRKModel::model @"
@staticmethod
def model(params, data, verbose = False):
n = range(len(data))
z1 = data[:, 0] # compound #1 composition data
z2 = data[:, 1] # compound ... | mit | -5,576,637,935,027,447,000 | 41.179775 | 110 | 0.582845 | false | 3.369838 | false | false | false |
pizzapanther/Race-Manager | devserver.py | 2 | 2038 | #!/usr/bin/env python3
import os
import time
import subprocess
import tornado.ioloop
import tornado.web
import tornado.autoreload
from tornado.log import enable_pretty_logging
from jinja2 import Template
import nracer_builder as builder
PATH = os.path.abspath(os.path.dirname(__file__))
class StaticHandler (tornad... | mit | -377,264,249,623,205,950 | 24.810127 | 74 | 0.633464 | false | 3.34647 | false | false | false |
michaelfardu/thinkconfluent | confluent_server/confluent/consoleserver.py | 3 | 21121 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 7,179,518,114,049,210,000 | 36.783542 | 79 | 0.595947 | false | 4.240313 | true | false | false |
Chemcy/vnpy | vn.api/vn.ksgold/pyscript/ksgold_struct.py | 23 | 12940 | # encoding: UTF-8
structDict = {}
#用户登录请求
CThostFtdcReqUserLoginField = {}
CThostFtdcReqUserLoginField["accountID"] = "string"
CThostFtdcReqUserLoginField["loginType"] = "int"
CThostFtdcReqUserLoginField["memberID"] = "string"
CThostFtdcReqUserLoginField["password"] = "string"
CThostFtdcReqUserLoginField... | mit | -1,086,663,133,647,387,000 | 35.708934 | 85 | 0.805228 | false | 3.900184 | false | true | false |
fabella/pymongo | tutorials/chapter3/homework_3_1.py | 1 | 1329 | import sys
import pymongo
def drop_lowest_homework_grade():
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.school
students = db.students
try:
# get all the students, only bring the scores
studs = students.find({}, {'scores': True})
for student in stu... | apache-2.0 | 7,157,433,423,821,756,000 | 34.918919 | 112 | 0.561324 | false | 4.371711 | false | false | false |
nremynse/Automation-Scripts | dynamic_cloudflare.py | 1 | 4299 | #!/usr/bin/env python
"""Cloudflare API code - example"""
from __future__ import print_function
import os
import sys
import re
import json
import requests
import CloudFlare
sys.path.insert(0, os.path.abspath('..'))
def my_ip_address():
"""Cloudflare API code - example"""
# This list is adjustable - plus ... | mit | -2,887,600,352,018,702,000 | 29.489362 | 92 | 0.585718 | false | 3.314572 | false | false | false |
muneebalam/scrapenhl2 | scrapenhl2/plot/team_lineup_cf.py | 1 | 3590 | """
This module contains methods to generate a graph showing player CF%. 18 little graphs, 1 for each of 18 players.
"""
import matplotlib.pyplot as plt
import pandas as pd
import scrapenhl2.scrape.players as players
import scrapenhl2.plot.visualization_helper as vhelper
import scrapenhl2.plot.rolling_cf_gf as rollin... | mit | -5,297,561,093,137,504,000 | 38.888889 | 119 | 0.616713 | false | 3.105536 | false | false | false |
avanzosc/event-wip | event_track_assistant/wizard/wiz_impute_in_presence_from_session.py | 1 | 3841 | # -*- coding: utf-8 -*-
# Copyright © 2016 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import fields, models, api, exceptions, _
class WizImputeInPresenceFromSession(models.TransientModel):
_name = 'wiz.impute.in.presence.from.session'
lines =... | agpl-3.0 | 2,240,277,191,320,108,000 | 42.636364 | 78 | 0.592448 | false | 3.809524 | false | false | false |
davidjb/css.css3githubbuttons | setup.py | 1 | 1527 | from setuptools import setup, find_packages
import os
# The version of the wrapped library is the starting point for the
# version number of the python package.
# In bugfix releases of the python package, add a '-' suffix and an
# incrementing integer.
# For example, a packaging bugfix release version 1.4.4 of the
# j... | bsd-3-clause | 7,026,821,050,641,985,000 | 27.811321 | 72 | 0.642436 | false | 3.688406 | false | false | false |
ssxenon01/music-app | main/control/admin.py | 1 | 5594 | # coding: utf-8
from flask.ext import wtf
import flask
import wtforms
import auth
import config
import model
import util
from main import app
###############################################################################
# Admin Stuff
###############################################################################... | mit | 5,063,323,562,363,850,000 | 45.616667 | 119 | 0.625492 | false | 4.059507 | true | false | false |
guillochon/FriendlyFit | mosfit/modules/parameters/kroupa.py | 1 | 2911 | """Definitions for the `Kroupa` class."""
import numpy as np
from mosfit.modules.parameters.parameter import Parameter
# Important: Only define one ``Module`` class per file.
class Kroupa(Parameter):
"""Kroupa IMF from https://arxiv.org/pdf/astro-ph/0102155.pdf.
Requires that min_value = 0.01 solar masses.... | mit | -2,735,713,077,533,015,600 | 36.805195 | 79 | 0.433528 | false | 2.973442 | false | false | false |
oscar9/statistics_viewer | processmanager/processdirectory/stat3.py | 1 | 2016 | # encoding: utf-8
import gvsig
import addons.statistics_viewer.statisticprocess
reload(addons.statistics_viewer.statisticprocess)
from addons.statistics_viewer.statisticprocess.abstractprocess import AbstractStatisticProcess
import os
class StatProcess(AbstractStatisticProcess):
name = u"Correlation b... | gpl-3.0 | -3,057,373,453,245,577,000 | 31.532258 | 123 | 0.676587 | false | 3.74026 | false | false | false |
jseabold/statsmodels | statsmodels/datasets/china_smoking/data.py | 4 | 1812 | """Smoking and lung cancer in eight cities in China."""
from statsmodels.datasets import utils as du
__docformat__ = 'restructuredtext'
COPYRIGHT = """Intern. J. Epidemiol. (1992)"""
TITLE = __doc__
SOURCE = """
Transcribed from Z. Liu, Smoking and Lung Cancer Incidence in China,
Intern. J. Epidemiol., 2... | bsd-3-clause | 2,985,421,626,147,614,700 | 27.761905 | 87 | 0.642384 | false | 3.484615 | false | false | false |
quantopian/coal-mine | coal_mine/business_logic.py | 1 | 22389 | # Copyright 2015 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | 4,417,517,623,887,938,000 | 35.884679 | 79 | 0.559962 | false | 4.388279 | false | false | false |
reimandlab/ActiveDriverDB | website/views/filters.py | 1 | 14709 | from sqlalchemy import exists
from models import MC3Mutation, Disease, source_manager, SiteType, PCAWGMutation
from models.bio.drug import DrugGroup, Drug
from models import Cancer
from models import Mutation
from models import Site
from models import The1000GenomesMutation
from models import ExomeSequencingMutation
f... | lgpl-2.1 | 8,435,539,815,570,489,000 | 34.528986 | 95 | 0.607247 | false | 3.967899 | false | false | false |
btimby/tpq | tpq/__main__.py | 1 | 2890 | """
TPQ CLI
Trivial Postgres Queue Command Line Interface
"""
from __future__ import absolute_import
import json
import sys
import logging
from docopt import docopt, DocoptExit
from schema import Schema, Use, SchemaError
import tpq
LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(logging.NullHandler())
d... | mit | 6,850,883,098,056,298,000 | 21.403101 | 78 | 0.563668 | false | 3.709884 | false | false | false |
cdcapano/pycbc | pycbc/distributions/constraints.py | 2 | 4190 | # Copyright (C) 2017 Christopher M. Biwer
# 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 distribute... | gpl-3.0 | 2,111,104,488,640,436,200 | 37.440367 | 77 | 0.646062 | false | 4.211055 | false | false | false |
peak6/st2 | st2client/st2client/commands/rule.py | 6 | 4457 | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | apache-2.0 | 8,131,762,788,038,046,000 | 41.855769 | 95 | 0.617456 | false | 4.465932 | false | false | false |
cdent/tiddlywebplugins.extraclude | tiddlywebplugins/extraclude.py | 1 | 1797 | """
Process extraclusions on PUT of a single Tiddler.
Tiddler validation happens after bag policy checks
so we know we can write.
As long as this validator is late in the stack of
validators, other, security related, validators will
operate on the extraclude text.
"""
from tiddlyweb.model.tiddler import Tiddler
from... | bsd-3-clause | -2,440,950,198,888,177,700 | 27.078125 | 76 | 0.672788 | false | 3.285192 | false | false | false |
hydratk/hydratk-lib-network | src/hydratk/lib/network/dbi/sqlite_client.py | 1 | 6982 | # -*- coding: utf-8 -*-
"""SQLite DB client
.. module:: network.dbi.sqlite_client
:platform: Unix
:synopsis: SQLite DB client
.. moduleauthor:: Petr Rašek <bowman@hydratk.org>
"""
"""
Events:
-------
dbi_before_connect
dbi_after_connect
dbi_before_exec_query
dbi_after_exec_query
"""
from hydratk.core.masterh... | bsd-3-clause | -7,489,964,396,359,756,000 | 25.85 | 86 | 0.490044 | false | 4.058721 | false | false | false |
juliensiebert/playingcards | src/generate_tex.py | 1 | 2944 | # -*- coding: utf-8 -*-
import cards_texcode as ctc # where the latex code of the cards is stored
import sys, getopt # used to manage command line arguments
import numpy as np
def parse(filename,outdir,texcode):
"""
Parse the csv file 'filename', create the tex files (from texcode + the just parsed d... | gpl-2.0 | -4,091,882,873,217,966,000 | 42.294118 | 158 | 0.615489 | false | 3.634568 | false | false | false |
maykinmedia/django-mailer-2 | django_mailer/models.py | 2 | 2897 | #!/usr/bin/env python
# encoding: utf-8
# ----------------------------------------------------------------------------
from django.db import models
from django_mailer import constants, managers
try:
from django.utils.timezone import now
except ImportError:
import datetime
now = datetime.datetime.now
PRIO... | mit | 4,116,293,121,459,960,000 | 26.855769 | 78 | 0.651363 | false | 4.23538 | false | false | false |
smithsps/LawsonAPI | old/src/discover.py | 1 | 1819 | import subprocess
import sqlite3 as sqlite
import logging
import os.path
import time
from datetime import datetime
import getpass
import discover_linux
import discover_windows
import discover_users
import discover_labs
DB_NAME = "discover.db"
#Builds the a new sqlite3 database, if missing.
def build_db():
if (not o... | mit | 3,866,121,009,174,333 | 21.45679 | 92 | 0.64541 | false | 3.412758 | false | false | false |
sony/nnabla | python/src/nnabla/experimental/graph_converters/channel_first.py | 1 | 5642 | # Copyright 2020,2021 Sony Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 | 7,458,873,195,108,244,000 | 37.910345 | 112 | 0.558667 | false | 3.768871 | false | false | false |
spaghetti-/imusim | imusim/all/__init__.py | 2 | 1447 | """
Package which imports all commonly used symbols from IMUSim.
"""
# Copyright (C) 2009-2011 University of Edinburgh
#
# This file is part of IMUSim.
#
# IMUSim 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... | gpl-3.0 | -4,133,926,210,074,354,000 | 38.108108 | 77 | 0.684865 | false | 3.778068 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.