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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ChrisBeaumont/smother | smother/pytest_plugin.py | 1 | 2566 | import coverage
def pytest_addoption(parser):
"""Add options to control coverage."""
group = parser.getgroup(
'smother', 'smother reporting')
group.addoption('--smother', action='append', default=[], metavar='path',
nargs='?', const=True, dest='smother_source',
... | mit | -1,813,439,758,440,904,700 | 36.735294 | 78 | 0.604053 | false | 4.1056 | true | false | false |
CHT5/program-y | src/programy/parser/template/nodes/first.py | 3 | 1960 | """
Copyright (c) 2016 Keith Sterling
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute,... | mit | -3,051,542,893,517,082,000 | 40.702128 | 126 | 0.683163 | false | 4.434389 | false | false | false |
nathanielbecker/business-contacter-django-app | myproject/cookie_app/import_csv_data.py | 1 | 3338 | ############from http://stackoverflow.com/questions/1882469/how-do-i-transfer-data-in-csv-file-into-my-sqlite-database-in-django############
###this only works when you physically run it in python, not from command line *shrug*
# Full path and name to your csv file
csv_filepathname="/Users/natebecker/.virtualenvs/venv_... | apache-2.0 | -8,674,164,757,061,548,000 | 32.39 | 140 | 0.744458 | false | 2.793305 | false | false | false |
jds2001/ocp-checkbox | plainbox/plainbox/impl/commands/test_parse.py | 1 | 4892 | # This file is part of Checkbox.
#
# Copyright 2013 Canonical Ltd.
# Written by:
# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
#
# Checkbox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either versio... | gpl-3.0 | 2,719,804,544,921,510,400 | 35.781955 | 78 | 0.657604 | false | 4.209983 | true | false | false |
mdworks2016/work_development | Python/20_Third_Certification/venv/lib/python3.7/site-packages/sqlparse/cli.py | 4 | 5916 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2018 the sqlparse authors and contributors
# <see AUTHORS file>
#
# This module is part of python-sqlparse and is released under
# the BSD License: https://opensource.org/licenses/BSD-3-Clause
"""Module that contains the command line app.
Why does t... | apache-2.0 | -4,156,301,615,215,895,600 | 28.287129 | 79 | 0.588742 | false | 4.038225 | false | false | false |
ralphwort/chef-repo | build/python-neutronclient/neutronclient/neutron/v2_0/extension.py | 3 | 1438 | # Copyright 2012 OpenStack Foundation.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -3,699,927,800,258,113,000 | 31.681818 | 78 | 0.685675 | false | 3.972376 | false | false | false |
miltonsarria/dsp-python | audio/wav_process.py | 3 | 10196 | #Milton Orlando Sarria
#INRS - 2014
import numpy as np
import os
from scipy.signal import get_window
import math
from scipy.fftpack import fft, ifft
#######################
INT16_FAC = (2**15)-1
INT32_FAC = (2**31)-1
INT64_FAC = (2**63)-1
norm_fact = {'int16':INT16_FAC, 'int32':INT32_FAC, 'int64':INT64_FAC,'float32':... | mit | -6,859,906,501,244,738,000 | 53.524064 | 120 | 0.496175 | false | 3.772105 | false | false | false |
eallrich/checkniner | scripts/utilities/parse_analytics.py | 1 | 3650 | import datetime
import pprint
def escape_quoted_spaces(line):
in_quote = False
replacement = '!@#'
new_line = ""
for c in line:
new_c = c
if c == '"':
in_quote = not in_quote
new_c = ''
elif c == ' ' and in_quote:
new_c = replacement
n... | mit | -1,882,965,520,247,934,000 | 25.838235 | 135 | 0.565479 | false | 3.499521 | false | false | false |
chsherpa/OpenCV-py-TrackerPerformance | reference_materials/video_facial_landmarks.py | 1 | 2346 | # Source: http://www.pyimagesearch.com/2017/04/17/real-time-facial-landmark-detection-opencv-python-dlib/
# USAGE
# python video_facial_landmarks.py --shape-predictor shape_predictor_68_face_landmarks.dat
# python video_facial_landmarks.py --shape-predictor shape_predictor_68_face_landmarks.dat --picamera 1
# import t... | mit | -5,799,085,707,898,777,000 | 30.716216 | 105 | 0.7289 | false | 3.099075 | false | false | false |
kennedyshead/home-assistant | tests/components/mobile_app/conftest.py | 7 | 2341 | """Tests for mobile_app component."""
# pylint: disable=redefined-outer-name,unused-import
import pytest
from homeassistant.components.mobile_app.const import DOMAIN
from homeassistant.setup import async_setup_component
from .const import REGISTER, REGISTER_CLEARTEXT
@pytest.fixture
async def create_registrations(h... | apache-2.0 | 6,534,601,523,415,322,000 | 29.402597 | 66 | 0.677488 | false | 3.794165 | true | false | false |
google-research/text-to-text-transfer-transformer | t5/data/dataset_providers_test.py | 1 | 5186 | # Copyright 2021 The T5 Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | apache-2.0 | 1,503,391,037,710,201,600 | 31.21118 | 79 | 0.652912 | false | 3.508796 | true | false | false |
madphysicist/numpy | numpy/tests/test_scripts.py | 9 | 1573 | """ Test scripts
Test that we can run executable scripts that have been installed with numpy.
"""
import sys
import os
import pytest
from os.path import join as pathjoin, isfile, dirname
import subprocess
import numpy as np
from numpy.testing import assert_equal
is_inplace = isfile(pathjoin(dirname(np.__file__), '.... | bsd-3-clause | -4,761,501,116,119,630,000 | 33.195652 | 76 | 0.649078 | false | 3.318565 | true | false | false |
GenericStudent/home-assistant | tests/components/min_max/test_sensor.py | 6 | 12661 | """The test for the min/max sensor platform."""
from os import path
import statistics
from homeassistant import config as hass_config
from homeassistant.components.min_max import DOMAIN
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
PERCENTAGE,
SERVICE_RELOAD,
STATE_UNAVAILABLE,
STATE_... | apache-2.0 | -9,014,389,092,326,394,000 | 31.464103 | 78 | 0.616618 | false | 3.479253 | true | false | false |
grouan/udata | udata/tests/frontend/test_post_frontend.py | 1 | 1465 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from flask import url_for
from udata.models import Post
from . import FrontTestCase
from ..factories import PostFactory, AdminFactory
class OrganizationBlueprintTest(FrontTestCase):
def test_render_list(self):
'''It should render the post ... | agpl-3.0 | -8,510,221,749,637,539,000 | 30.847826 | 64 | 0.638908 | false | 3.927614 | true | false | false |
Comunitea/CMNT_00098_2017_JIM_addons | scripts/update_returned_qty_from_returned_move.py | 1 | 6373 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import xmlrpclib
import socket
class FixTemplateProduct(object):
def __init__(self, dbname, user, passwd, port):
"""método incial"""
try:
self.url_template = "http://%s:%s/xmlrpc/%s"
self.server = "localhost"
... | agpl-3.0 | 3,112,411,249,443,777,000 | 37.131737 | 128 | 0.53392 | false | 3.899571 | false | false | false |
krikunts/telegram-twitter-forwarder-bot | models.py | 1 | 3600 | import datetime
import tweepy
from peewee import (Model, DateTimeField, ForeignKeyField, BigIntegerField, CharField,
IntegerField, TextField, OperationalError, BooleanField)
from playhouse.migrate import migrate, SqliteMigrator, SqliteDatabase
from tweepy.auth import OAuthHandler
class TwitterUse... | lgpl-3.0 | 1,703,843,968,770,841,000 | 32.027523 | 101 | 0.699722 | false | 3.696099 | false | false | false |
TiZ-EX1/xfce4-dockbarx-plugin | src/xfce4-dockbarx-plug.py | 1 | 9626 | #!/usr/bin/python2
#
# xfce4-dockbarx-plug
#
# Copyright 2008-2013
# Aleksey Shaferov, Matias Sars, and Trent McPheron
#
# DockbarX 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... | mit | -2,756,400,996,012,826,600 | 38.941909 | 80 | 0.60347 | false | 3.515705 | false | false | false |
CitizenScienceInAstronomyWorkshop/pyIBCC | attic/get_planet_data.py | 2 | 6128 | '''
Created on 18 Jan 2013
@author: Kieran Finn
'''
import time
beginning=time.time()
import urllib2
import sys
import json
from functions import *
import time
import pickle
from math import pi
from scipy.integrate import quad
import numpy as np
from collections import defaultdict
import os
in_fnam... | mit | 2,306,245,926,126,142,500 | 26.239631 | 130 | 0.554504 | false | 3.271757 | false | false | false |
BioRoboticsUNAM/pyRobotics | pyrobotics/messages.py | 1 | 8290 | import threading
import re
from abc import ABCMeta
class MessageTypes(object):
'''
Internal pseudo-enum to set the type of message to a message.
The existing values are:
* MessageTypes.COMMAND
* MessageTypes.RESPONSE
* MessageTypes.SHARED_VAR
'''
__metaclass__ = AB... | mit | -4,916,811,320,980,953,000 | 32.97541 | 148 | 0.541737 | false | 4.105993 | false | false | false |
khosrow/metpx | sundew/unittests/unittest_Igniter.py | 1 | 2301 | # -*- coding: iso-8859-1 -*-
#############################################################################################
# Name: unittest_Igniter.py
# Author: Jun Hu
# Date: 2012-04-30
# Description: test cases for Igniter class
########################################################################################... | gpl-2.0 | -3,400,482,793,443,084,300 | 31.408451 | 95 | 0.579313 | false | 3.617925 | true | false | false |
iandees/all-the-places | locations/spiders/rubios.py | 1 | 1881 | # -*- coding: utf-8 -*-
import scrapy
import re
from locations.items import GeojsonPointItem
class RubiosSpider(scrapy.Spider):
name = "rubios"
allowed_domains = ['rubios.com']
start_urls = (
'https://www.rubios.com/sitemap.xml',
)
def parse(self, response):
response.selector.rem... | mit | -6,715,871,510,808,929,000 | 43.785714 | 133 | 0.573099 | false | 3.688235 | false | false | false |
3dfxsoftware/cbss-addons | stock_card/stock_card.py | 1 | 50758 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 CachicamoERP C.A. All Rights Reserved.
# Javier Duran <javieredm@gmail.com>
# Humberto Arocha <humbertoarocha@gmail.com>
#
#
# WARNING: This program as su... | gpl-2.0 | -1,996,725,239,870,738,700 | 43.330131 | 79 | 0.433429 | false | 3.968569 | false | false | false |
commaai/openpilot | selfdrive/car/honda/interface.py | 1 | 24696 | #!/usr/bin/env python3
import numpy as np
from cereal import car
from panda import Panda
from common.numpy_fast import clip, interp
from common.params import Params
from selfdrive.config import Conversions as CV
from selfdrive.car.honda.values import CruiseButtons, CAR, HONDA_BOSCH, HONDA_BOSCH_ALT_BRAKE_SIGNAL
from se... | mit | 8,620,706,014,802,180,000 | 42.02439 | 144 | 0.641804 | false | 2.75625 | false | false | false |
abhiii5459/sympy | sympy/parsing/sympy_parser.py | 43 | 30008 | """Transform a string with Python-like source code into SymPy expression. """
from __future__ import print_function, division
from .sympy_tokenize import \
generate_tokens, untokenize, TokenError, \
NUMBER, STRING, NAME, OP, ENDMARKER
from keyword import iskeyword
import ast
import re
import unicodedata
im... | bsd-3-clause | 2,356,793,139,194,653,700 | 32.679012 | 103 | 0.540956 | false | 4.289308 | false | false | false |
PinguinoIDE/pinguino-multilanguage | files/gide/bloques/blockConstructor.py | 2 | 38679 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys
from PySide import QtCore, QtGui
#from .linear import Linear
from .linear.linear import Ui_Form as Linear
#from .nested import Nested
from .nested.nested import Ui_Form as Nested
#from .nested_in_code import NestedLinear
from .nested_in_code.nested_line impor... | gpl-2.0 | -391,779,346,784,182,600 | 31.918298 | 145 | 0.51506 | false | 3.779461 | false | false | false |
lief-project/LIEF | examples/python/change_elf_interpreter.py | 1 | 1628 | #!/usr/bin/env python
import lief
import argparse
import os
import stat
import sys
def change_interpreter(target, interpreter, output=None):
if not os.path.isfile(target) or not lief.is_elf(target):
print("Wrong target! ({})".format(target))
return 1
if not os.path.isfile(interpreter) or not ... | apache-2.0 | 5,791,874,475,115,665,000 | 22.941176 | 98 | 0.623464 | false | 3.98044 | false | false | false |
sebgoa/oreilly-kubernetes | manifests/scheduling/scheduler.py | 1 | 1308 | #!/usr/bin/env python
import time
import random
import json
from kubernetes import client, config, watch
config.load_kube_config()
v1=client.CoreV1Api()
scheduler_name = "foobar"
def nodes_available():
ready_nodes = []
for n in v1.list_node().items:
for status in n.status.conditions:
... | apache-2.0 | 1,897,800,033,947,399,000 | 26.25 | 111 | 0.617737 | false | 3.780347 | false | false | false |
PeterWangIntel/crosswalk-webdriver-python | browser/devtools_client_impl.py | 1 | 14578 | __all__ = ["DevToolsClientImpl"]
import copy
import json
import yaml
import time
from status import *
from devtools_client import DevToolsClient
from base.bind import Bind
from base.log import VLOG
from net.websocket_factory import WebsocketFactory
from third_party.websocket_client.websocket import WebSocketConnection... | bsd-3-clause | 5,126,628,076,973,718,000 | 35.720403 | 104 | 0.693374 | false | 3.83329 | false | false | false |
almarklein/scikit-image | skimage/transform/hough_transform.py | 1 | 4550 | import numpy as np
from scipy import ndimage
from skimage import measure, morphology
def hough_line_peaks(hspace, angles, dists, min_distance=9, min_angle=10,
threshold=None, num_peaks=np.inf):
"""Return peaks in hough transform.
Identifies most prominent lines separated by a certain ang... | bsd-3-clause | -2,950,053,057,796,034,600 | 35.693548 | 79 | 0.597143 | false | 3.651685 | false | false | false |
rc500/ardrone_archive_aarons_laptop | examples/demo_height_control_1000.py | 1 | 4268 |
"""
Listening for control packets from the drone
============================================
This example is a simple Python example which sets up a Qt event loop which
listens for a control packet from the drone controller and displays it when
received.
"""
#-------------------------------------------------------... | apache-2.0 | -1,775,324,825,816,268,000 | 32.873016 | 83 | 0.550375 | false | 4.204926 | false | false | false |
KaiXin93/TextClassification | experiment2.0.py | 1 | 3062 | # encoding=utf-8
__author__ = 'qkx'
from svmutil import *
import jieba
# 读取停词
f_stop = open('stop_words_ch_utf-8.txt')
stop_word = f_stop.read().decode('utf-8').split('\n')
f_stop.close()
stop_word.append(u'\n')
# print(stop_word)
# 去停词和换行符
# 统计词频
def word_count(text):
# 词频阀值
value = 10
# 词频大于阀值的词集合
s... | apache-2.0 | 2,463,430,700,695,661,000 | 26.673077 | 83 | 0.503822 | false | 2.590459 | false | false | false |
terrycain/razer-drivers | scripts/daemon/chroma_keyboard/custom_effect.py | 5 | 1552 | import sys
import time
import openrazer.client
device_manager = openrazer.client.DeviceManager()
keyboard = None
for device in device_manager.devices:
if device.type == 'keyboard':
keyboard = device
break
else:
print("Could not find suitable keyboard", file=sys.stderr)
sys.exit(1)
if not... | gpl-2.0 | -5,408,304,503,323,109,000 | 26.714286 | 130 | 0.523196 | false | 3.448889 | false | false | false |
sminteractive/ndb-gae-admin | smadmin/core/html.py | 1 | 4961 | import os
from copy import deepcopy
from google.appengine.ext import ndb
from google.appengine.ext.webapp import template
class HtmlMarkup(object):
TEMPLATE_PATH = None
default_html_attributes = {}
def __init__(self, *form_items, **optional_parameters):
self._template_variables = deepcopy(
... | apache-2.0 | 7,337,145,837,305,574,000 | 28.011696 | 79 | 0.573876 | false | 4.243798 | false | false | false |
inmagik/django-multi-gtfs | multigtfs/models/transfer.py | 1 | 2381 | #
# Copyright 2012-2014 John Whitlock
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | 6,454,415,704,489,626,000 | 35.630769 | 74 | 0.655607 | false | 3.8096 | false | false | false |
eneldoserrata/marcos_openerp | addons/web_keyboard_shortcuts/__openerp__.py | 1 | 3769 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -2,253,552,480,649,077,800 | 44.865854 | 175 | 0.601702 | false | 3.746016 | false | false | false |
dev-coop/brains | src/apps/workers/tasks.py | 1 | 8790 | import os
import requests
import shutil
import signal
import subprocess
import sys
import time
import traceback
import yaml
from celery import task
from django.core.cache import cache
from threading import Thread
from Queue import Queue, Empty
from zipfile import ZipFile
from django.utils import timezone
from datase... | mit | -75,339,148,952,346,910 | 32.549618 | 122 | 0.628669 | false | 4.035813 | true | false | false |
jeromecc/doctoctocbot | src/optin/serializers.py | 1 | 1187 | from rest_framework import serializers
from optin.models import OptIn, Option
class OptInSerializer(serializers.Serializer):
authorize = serializers.BooleanField(required=True)
option = serializers.CharField(required=True, max_length=255)
def update(self, instance, validated_data):
instance... | mpl-2.0 | 7,088,524,315,314,533,000 | 36.125 | 96 | 0.663858 | false | 4.673228 | false | false | false |
ProfessionalIT/maxigenios-website | sdk/google_appengine/lib/django-1.5/django/core/management/commands/runserver.py | 47 | 5461 | from optparse import make_option
from datetime import datetime
import errno
import os
import re
import sys
import socket
from django.core.management.base import BaseCommand, CommandError
from django.core.servers.basehttp import run, get_internal_wsgi_application
from django.utils import autoreload
naiveip_re = re.com... | mit | -147,481,231,673,941,150 | 38.861314 | 94 | 0.569127 | false | 3.881308 | false | false | false |
mdinacci/rtw | contrib/src/mdlib/panda/input.py | 1 | 9123 | # -*- coding: utf-8-*-
"""
Author: Marco Dinacci <dev@dinointeractive.com>
Copyright © 2008-2009
Code to deal with user input, via mouse, keyboard and joysticks
"""
from mdlib.log import ConsoleLogger, DEBUG, INFO
logger = ConsoleLogger("input", INFO)
from pandac.PandaModules import ModifierButtons
from direct.show... | mit | 1,585,643,017,124,591,900 | 35.059289 | 86 | 0.577395 | false | 4.294727 | false | false | false |
audiolog/audiolog | src/finders/TitleFinder.py | 1 | 5758 | # -*- coding: utf-8 -*-
# Audiolog Music Organizer
# Copyright © 2011 Matt Hubert <matt@cfxnetworks.com>
# Robert Nagle <rjn945@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free... | gpl-3.0 | 6,695,720,918,503,821,000 | 37.637584 | 101 | 0.575126 | false | 4.286672 | false | false | false |
JulianKunkel/siox | tools/siox-skeleton-builder/siox-skeleton-builder.py | 1 | 35020 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# encoding: utf-8
from __future__ import print_function
global globalOnce
globalOnce = ""
global debug
debug = False
import os
import re
import sys
import argparse
import traceback
global precompiler
global templateParameters
templateParameters = {"globalOnce": "", "... | lgpl-3.0 | -4,604,581,130,170,674,700 | 35.290155 | 158 | 0.574929 | false | 4.555743 | false | false | false |
benpruitt/customarrayformatter | layouttools.py | 2 | 4576 | '''
Tools to facilitate manual Custom Array chip layout.
'''
import random
import numpy as np
CHIP_DIMENSIONS = {
'12K': (54, 224),
'90K': (272, 349)
}
def getElectrodePosition(electrode_num, chip_type='12K'):
''' Returns the electrode position (row, col) given the electrode number
'''
chip_r... | mit | -4,921,619,383,625,159,000 | 31.685714 | 111 | 0.582168 | false | 3.427715 | false | false | false |
Zamme/bge-editor | bgee_gamemanager.py | 1 | 2381 | # ##### 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... | lgpl-3.0 | -8,581,903,607,906,745,000 | 37.419355 | 113 | 0.629987 | false | 3.834138 | false | false | false |
UPDDI/mps-database-server | resources/migrations/0004.py | 1 | 2039 | # -*- coding: utf-8 -*-
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('resources', '0003'),
]
operations = [
migrations.AddField(
... | mit | -1,572,893,381,375,588,000 | 35.410714 | 155 | 0.594899 | false | 4.329087 | false | false | false |
quru/qis | src/imageserver/auxiliary/task_server.py | 1 | 9453 | #
# Quru Image Server
#
# Document: task_server.py
# Date started: 18 Dec 2012
# By: Matt Fozard
# Purpose: Background tasks server
# Requires:
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 | 3,765,004,370,726,413,300 | 35.080153 | 94 | 0.554321 | false | 4.160651 | false | false | false |
angadpc/Alexa-Project- | twilio/rest/pricing/v1/phone_number/__init__.py | 1 | 3898 | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.page import Page
from twilio.rest.pricing.v1.phone_number.country import ... | mit | -8,453,904,304,655,344,000 | 24.644737 | 73 | 0.58902 | false | 4.360179 | false | false | false |
kunesj/omad | omad/archive_controller.py | 1 | 2589 | #!/usr/bin/env python3
# encoding: utf-8
"""
This file is part of OMAD.
OMAD 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
any later version.
OMAD is distributed in the hope... | gpl-3.0 | -3,664,455,854,145,148,000 | 30.192771 | 90 | 0.646195 | false | 4.039002 | false | false | false |
joeryan/pytest-practice | birthday.py | 1 | 1083 | # birthday calculator
from datetime import date
class Birthday():
def __init__(self, year, month, day):
self._year = year
self._month = month
self._day = day
self._birthday = date(year, month, day)
def daysRemaining(self):
today = date.today()
if self._birthday < today:
self._birthday = self._birthda... | mit | -7,112,277,374,180,719,000 | 29.111111 | 96 | 0.661127 | false | 2.991713 | false | false | false |
nexdatas/configserver | tools/simpleClient.py | 1 | 1249 | #!/usr/bin/env python
# This file is part of nexdatas - Tango Server for NeXus data writer
#
# Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de>
#
# nexdatas is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | gpl-3.0 | -1,074,856,133,737,985,800 | 32.756757 | 73 | 0.680544 | false | 3.469444 | false | false | false |
dpaiton/OpenPV | pv-core/analysis/python/plot_1d_weight_patches.py | 1 | 1434 | """
Make a histogram of normally distributed random numbers and plot the
analytic PDF over it
"""
import sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import matplotlib.cm as cm
import PVReadWeights as rw
"""
Show how to modify the coordinate formatter to report the image "z"
va... | epl-1.0 | 7,381,255,249,293,483,000 | 18.916667 | 134 | 0.665969 | false | 2.721063 | false | false | false |
hankcs/HanLP | hanlp/layers/transformers/loader_tf.py | 1 | 4495 | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-01-04 06:05
import glob
import os
import bert
import tensorflow as tf
from bert import albert_models_tfhub, fetch_tfhub_albert_model, load_stock_weights
from bert.loader_albert import albert_params
from hanlp.layers.transformers.tf_imports import zh_albert_models_g... | apache-2.0 | 1,691,976,673,639,051,300 | 50.079545 | 168 | 0.661624 | false | 3.369565 | false | false | false |
e-koch/VLA_Lband | 14B-088/HI/analysis/co_comparison/h2_hi_ratio_analysis.py | 1 | 8804 |
'''
Compare the H2/HI distribution to theory.
The outputs from co_hi_linewidth_ratio.py and h2_hi_ratios.py should be
available. The former finds the column densities with a single Gaussian fit,
and the latter uses the moment arrays.
'''
import os
from os.path import join as osjoin
from spectral_cube import Projec... | mit | 7,350,784,125,216,247,000 | 34.643725 | 99 | 0.62199 | false | 2.591699 | false | false | false |
Tendrl/commons | tendrl/commons/tests/flows/unmanage_cluster/test_unmanage_cluster_init.py | 1 | 7689 | import __builtin__
import etcd
import maps
import mock
from mock import patch
import pytest
from tendrl.commons import objects
from tendrl.commons import TendrlNS
from tendrl.commons.flows.exceptions import FlowExecutionFailedError
from tendrl.commons.flows.unmanage_cluster import UnmanageCluster
from tendrl.commons.... | lgpl-2.1 | 7,143,137,564,872,379,000 | 31.858974 | 79 | 0.526336 | false | 3.548223 | true | false | false |
seblefevre/testerman | core/snmp/pysnmp/carrier/twisted/dispatch.py | 2 | 2023 | #
# Copyright (C) 2008 Truelite Srl <info@truelite.it>
# Author: Filippo Giunchedi <filippo@truelite.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2
# as published by the Free Software Foundation
#
# Description: Transpor... | gpl-2.0 | 6,985,478,389,089,465,000 | 37.169811 | 74 | 0.684627 | false | 4.25 | false | false | false |
cadithealth/pyramid_describe | pyramid_describe/util.py | 1 | 2767 | # -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/09/09
# copy: (C) Copyright 2013 Cadit Health Inc., All Rights Reserved.
#-----------------------------------------------------------------------... | mit | -4,012,988,652,332,018,700 | 30.089888 | 79 | 0.478858 | false | 4.343799 | false | false | false |
averrin/github_profile_analysis | main.py | 1 | 10164 | #!env python3
import requests
from requests.auth import HTTPBasicAuth
import jinja2
import os
import sys
import dateutil.parser
from creds import login, token
import json
from datetime import datetime, timedelta
from dateutil import tz
import time
import random
import copy
from time import sleep
export_json = False
if... | mit | -1,515,405,523,421,786,000 | 33.68942 | 137 | 0.547717 | false | 3.321569 | false | false | false |
Alex1942/WeCMS | Python_code/plot_from_thingSpeak-OBSOLETE_idea/plot_norm.py | 1 | 6179 | import numpy as np
import matplotlib.pyplot as plt
import urllib
import time
import matplotlib.animation as anim
import matplotlib.mlab as mlab
from scipy.stats import norm
fig1 = plt.figure(1)
fig2 = plt.figure(2)
def animatef1():
print ('Downloading File...')
urllib.request.urlretri... | gpl-3.0 | 5,070,761,604,851,528,000 | 35.676829 | 149 | 0.558019 | false | 2.768369 | false | false | false |
ddddwee1/SULsT | SUL1/sample/AgingNet/temp/AIM_gen.py | 1 | 8154 | import tensorflow as tf
import model as M
import network as N
import numpy as np
N.bn_training = True
class AIM_gen():
def __init__(self,model_path = './aim_model_gen/'):
self.model_path = model_path
self.inp_holder = tf.placeholder(tf.float32,[None,128,128,3])
self.age_holder = tf.placeholder(tf.float32,[... | lgpl-3.0 | 1,401,495,015,277,048,300 | 37.649289 | 119 | 0.681506 | false | 2.414569 | false | false | false |
erik/sketches | projects/squabble/squabble/rules/__init__.py | 1 | 4324 | import functools
import glob
import importlib
import importlib.util as import_util
import os.path
from squabble import logger, UnknownRuleException
def _load_plugin(directory):
"""
Given an arbitrary directory, try to load all Python files in order
to register the custom rule definitions.
Nothing is... | mit | -6,945,891,042,550,593,000 | 28.216216 | 81 | 0.592276 | false | 4.153698 | false | false | false |
iovisor/bcc | tools/btrfsslower.py | 2 | 9978 | #!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# btrfsslower Trace slow btrfs operations.
# For Linux, uses BCC, eBPF.
#
# USAGE: btrfsslower [-h] [-j] [-p PID] [min_ms] [-d DURATION]
#
# This script traces common btrfs file operations: reads, writes, opens, and
# syncs. It measures the ... | apache-2.0 | -3,189,943,275,611,433,000 | 27.590258 | 79 | 0.626278 | false | 3.018149 | false | false | false |
AWNystrom/lru_cache | lru_cacher/lru_cacher.py | 1 | 2201 | from doubly_linked_list import DoublyLinkedList
class LruCacher(object):
def __init__(self, max_size, plan_b_func):
"max_size: the largest number of items the cache can have."
"plan_b_func: the function that will be called with the query as its"
" argument if a query isn't cached. The result will th... | apache-2.0 | 425,039,795,888,011,260 | 31.382353 | 73 | 0.669696 | false | 3.130868 | false | false | false |
bjackman/lisa | libs/utils/analysis_register.py | 5 | 2478 | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2015, ARM Limited and contributors.
#
# 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
#
# ... | apache-2.0 | 7,089,105,486,555,810,000 | 31.605263 | 75 | 0.634383 | false | 4.317073 | false | false | false |
enkore/i3pystatus | i3pystatus/scores/mlb.py | 3 | 14487 | from i3pystatus.core.util import internet, require
from i3pystatus.scores import ScoresBackend
import copy
import json
import pytz
import re
import time
from datetime import datetime
from urllib.request import urlopen
LIVE_URL = 'https://www.mlb.com/gameday/%s'
SCOREBOARD_URL = 'http://m.mlb.com/scoreboard'
API_URL =... | mit | -5,849,842,896,336,161,000 | 42.717325 | 295 | 0.549677 | false | 3.581424 | false | false | false |
garnertb/python-mapnik | test/python_tests/image_encoding_speed_test.py | 1 | 3695 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from timeit import Timer, time
import mapnik
from .utilities import execution_path, run_all
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
combinati... | lgpl-2.1 | -9,097,173,152,599,664,000 | 27.206107 | 77 | 0.447903 | false | 3.043657 | false | false | false |
possoumous/Watchers | seleniumbase/core/mysql.py | 2 | 2155 | """
Wrapper for MySQL functions to make life easier
"""
import time
import mysql_conf as conf
class DatabaseManager():
"""
This class wraps database functions for easy use.
It connects to the testcase database.
"""
def __init__(self, database_env='test', conf_creds=None):
"""
Get... | mit | 2,025,422,762,174,702,800 | 30.691176 | 79 | 0.543852 | false | 4.498956 | false | false | false |
mateoqac/unqTip | language/vgbs/lang/board/fmt_gbt.py | 2 | 7824 | #
# Copyright (C) 2011, 2012 Pablo Barenbaum <foones@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Th... | gpl-3.0 | 8,357,975,355,185,992,000 | 31.736402 | 90 | 0.540133 | false | 3.130852 | false | false | false |
p-morais/rl | rl/algos/trpo.py | 1 | 5936 | """Trust Region Policy Optimization"""
import numpy as np
import torch
import torch.autograd as autograd
from torch.distributions.kl import kl_divergence
# TODO: move this out and share it across algorithms
class TRPOBuffer:
def __init__(self, gamma=0.99, lam=0.95, use_gae=False):
self.states = []
... | mit | 3,631,410,525,050,335,000 | 28.532338 | 92 | 0.534198 | false | 3.686957 | false | false | false |
simo5/custodia | custodia/kubernetes/authz.py | 2 | 2724 | # Copyright (C) 2015 Custodia Project Contributors - see LICENSE file
import requests
from custodia import log
from custodia.httpd.authorizers import HTTPAuthorizer
DEFAULT_API_SERVER = 'http://localhost:8080'
class KubeAuthz(HTTPAuthorizer):
def __init__(self, config=None):
super(KubeAuthz, self).__... | gpl-3.0 | -4,623,862,487,761,519,000 | 37.914286 | 78 | 0.535977 | false | 4.10241 | true | false | false |
fraoustin/flask-bluelogin | flask_bluelogin/main.py | 1 | 3938 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from os.path import join, dirname
import uuid
from flask_login import LoginManager
from flask import Blueprint, current_app, send_from_directory, redirect, request, send_file
from .controllers.login_controller import login, logout, current, add_user, get_user, set_u... | gpl-2.0 | 719,654,931,579,184,600 | 47.848101 | 182 | 0.6097 | false | 3.538185 | false | false | false |
shaunwbell/FOCI_Analysis | ReanalysisRetreival_orig/UnimakPass/UP_HRV2OISST_model_prep.py | 1 | 8998 | #!/usr/bin/env
"""
UP_HRV2OISST_model_prep.py
DataSource: ftp://ftp.cdc.noaa.gov/Datasets/noaa.oisst.v2.highres/
NOAA High Resolution SST data provided by the NOAA/OAR/ESRL PSD,
Boulder, Colorado, USA, from their Web site at http://www.esrl.noaa.gov/psd/
"""
#System Stack
import datetime
import sys
#Scienc... | mit | 4,433,651,777,084,182,000 | 32.574627 | 136 | 0.602689 | false | 2.90915 | false | false | false |
swvist/Ocrn | ocrn/feature.py | 1 | 1423 | import Image as im
import numpy as np
class feature:
#Return a 10X10 array from a monochrome BMP Image
@staticmethod
def getImageArray(imagepath):
try:
image = im.open(imagepath)
imagearray=np.asarray(image.crop(image.getbbox()).resize((10,10))).astype(float)
return imagearray
except IOError:
print ... | mit | -3,102,774,424,299,753,000 | 29.276596 | 83 | 0.71539 | false | 3.021231 | false | false | false |
muffinresearch/solitude | lib/paypal/tests/samples.py | 1 | 7183 | sample_refund = {
'action_type': 'PAY',
'charset': 'windows-1252',
'cancel_url': 'http://some.url/cancel',
'notify_version': 'UNVERSIONED',
'pay_key': '1234',
'payment_request_date': 'Mon Nov 21 15:23:02 PST 2011',
'reason_code': 'Refund',
'return_url': 'http://some.url/complete',
'r... | bsd-3-clause | -5,096,096,795,782,664,000 | 38.685083 | 79 | 0.605875 | false | 3.097456 | false | false | false |
slogan621/tscharts | tools/mkpypi/setup_template.py | 1 | 1446 | from distutils.core import setup
import os
def package_files(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join('..', path, filename))
return paths
extra_files = package_files('tschartslib')
setup(
na... | apache-2.0 | 3,970,313,766,442,674,000 | 32.627907 | 61 | 0.595436 | false | 3.961644 | false | false | false |
code-wukong/lolcomp | lolcomp/settings.py | 1 | 2854 | """
Django settings for lolcomp project.
Generated by 'django-admin startproject' using Django 1.8.
"""
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
SECRET_KEY = os.environ['SECRET_KEY']
if os.environ['ENV_ROLE'] == 'development':
DEBUG = True
else:
DEBUG = False
# https://github.com/rdegg... | gpl-2.0 | -2,748,385,195,636,419,600 | 24.256637 | 72 | 0.674492 | false | 3.506143 | false | false | false |
martomo/SublimeTextXdebug | tests/integration/test_debug_layout.py | 1 | 3558 | try:
from xdebug.unittesting import XdebugDeferrableTestCase
except:
from SublimeTextXdebug.xdebug.unittesting import XdebugDeferrableTestCase
class TestDebugLayout(XdebugDeferrableTestCase):
def window_does_not_have_debug_layout(self):
breakpoint_view = self.get_view_by_title('Xdebug Breakpoint'... | mit | 8,534,905,411,952,877,000 | 37.258065 | 93 | 0.660764 | false | 3.612183 | true | false | false |
walterbender/slideruler | SlideruleActivity.py | 1 | 23203 | # -*- coding: utf-8 -*-
#Copyright (c) 2009,2010 Walter Bender
#Copyright (c) 2012 Ignacio Rodriguez
# 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 yo... | gpl-3.0 | -8,129,225,385,005,216,000 | 37.996639 | 78 | 0.559971 | false | 3.694157 | false | false | false |
rbabichev/Astrafit | test.py | 1 | 35593 | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import loc
import time
# TODO: Create a new Chrome session
chrom... | apache-2.0 | 2,395,894,338,026,587,600 | 68.847561 | 220 | 0.754239 | false | 1.520712 | false | false | false |
drmalex07/alerts | alerts/lib/loggers.py | 1 | 1424 | import os
import logging
import zope.interface
import zope.schema
from zope.schema import getValidationErrors
from socket import getfqdn
from alerts import config
from .interfaces import ICheckContext
from .mailer import Mailer, make_mailer
## Filters ##
class LoggingContext(logging.Filter):
def __init__(se... | gpl-3.0 | -7,803,235,818,030,543,000 | 27.48 | 86 | 0.621489 | false | 4.188235 | false | false | false |
catapult-project/catapult-csm | tracing/tracing/value/diagnostics/diagnostic.py | 1 | 2107 | # Copyright 2017 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 uuid
from tracing.value.diagnostics import all_diagnostics
class Diagnostic(object):
def __init__(self):
self._guid = None
@property
def... | bsd-3-clause | -7,199,547,240,502,488,000 | 27.472973 | 80 | 0.673944 | false | 3.945693 | false | false | false |
viawest/infinibox-graphite | infinibox_space_graphite.py | 1 | 7638 | '''
Examples:
python infinibox_space_graphite.py
-F "<InfiniBox fqdn>"
-U "username"
-P "password"
'''
from __future__ import division
from pprint import pformat
import requests
import functions
import global_vars
from infinisdk import InfiniBox
import time
import socket
import yaml
global_vars.size =... | bsd-3-clause | -8,650,599,590,760,819,000 | 29.309524 | 135 | 0.696386 | false | 3.123926 | false | false | false |
pajlada/pajbot | pajbot/modules/quests/winhsbetwins.py | 2 | 1900 | import logging
from pajbot.managers.handler import HandlerManager
from pajbot.managers.redis import RedisManager
from pajbot.modules.base import ModuleSetting
from pajbot.modules.quest import QuestModule
from pajbot.modules.quests import BaseQuest
log = logging.getLogger(__name__)
class WinHsBetWinsQuestModule(Base... | mit | -2,644,035,102,078,991,400 | 27.358209 | 84 | 0.622632 | false | 3.682171 | false | false | false |
CrystallineEntity/bulbs | bulbs/views/topic.py | 1 | 3313 | from pyramid import threadlocal
from pyramid.view import view_config
from pyramid.response import Response
from bulbs.components import db
from bulbs.components import helpers
from bulbs.components.subcategory import subcat_title_from_id
from bulbs.components.topic import thread_pages
from urllib.parse import quote
... | mit | 4,103,263,464,352,221,700 | 35.811111 | 115 | 0.63447 | false | 3.593275 | false | false | false |
JavaCardOS/pyResMan | pyResMan/Dialogs/pyResManCommandDialog_MifareIncrement.py | 1 | 3334 | # -*- coding: utf-8 -*-
'''
Modified on 2017-03-28
@author: javacardos@gmail.com
@organization: https://www.javacardos.com/
@copyright: JavaCardOS Technologies. All rights reserved.
'''
from pyResMan.BaseDialogs.pyResManCommandDialogBase_MifareIncrement import CommandDialogBase_MifareIncrement
from pyResMan.Util imp... | gpl-2.0 | 2,105,500,810,830,181,600 | 31.686275 | 108 | 0.584583 | false | 4.204288 | false | false | false |
w0nk0/LSTMtest1 | rddt.py | 1 | 4350 | import html
import praw
from random import randint
BEGIN_TOKEN = '#_B_#'
END_TOKEN = '#_E_#'
MAX_POSTS = 50
DEBUG = False
class FlatSubreddit:
def __init__(self, subreddit, max_posts = MAX_POSTS, cache=True, escape_func=html.escape ):
self.sub = subreddit
self.max_posts = max_posts
self._t... | gpl-2.0 | -8,634,995,073,983,204,000 | 30.985294 | 95 | 0.534253 | false | 3.81914 | false | false | false |
hamsavardhini09/AWSLearning | ella/core/templatetags/related.py | 4 | 3670 | from django import template
from django.db import models
from ella.core.models import Related
register = template.Library()
class RelatedNode(template.Node):
def __init__(self, obj_var, count, var_name, models, finder):
self.obj_var = obj_var
self.count = count
self.var_name = var_name
... | bsd-3-clause | 580,938,360,139,182,300 | 35.336634 | 107 | 0.495095 | false | 4.717224 | false | false | false |
jaimeandrescatano/ekorre | 2017-Google-Developer-Challenge/Classmates/me/dreammaker.py | 1 | 3115 | # -*- coding: utf-8 -*-
"""
20171218
This program will help you to achieve your dreams
This program is open source, feel free to copy modify and share. Just let the author know the changes :)
Author: Jaime Andres Cataño Bernal
email: jaimeandrescatano@gmail.com
"""
def verificar(var1, var2):
while True:
... | mit | -5,532,529,699,423,827,000 | 27.568807 | 264 | 0.603725 | false | 3.005792 | false | false | false |
barseghyanartur/django-slim | src/slim/models/__init__.py | 1 | 7046 | from six import PY3, text_type
from django.db import models
from django.utils.translation import ugettext_lazy as _
from ..helpers import (
get_languages,
# default_language,
get_languages_keys,
admin_change_url,
admin_add_url
)
from ..translations import is_primary_language
__title__ = 'slim.mod... | gpl-2.0 | -8,342,359,641,531,218,000 | 32.235849 | 80 | 0.561169 | false | 4.776949 | false | false | false |
oemof/reegis-hp | reegis_hp/berlin_hp/plot.py | 3 | 2926 | import logging
from oemof import outputlib
from matplotlib import pyplot as plt
import oemof.solph as solph
import pandas as pd
def test_plots(berlin_e_system):
logging.info('Plot the results')
cdict = {'wind': '#5b5bae',
'pv': '#ffde32',
'storage': '#42c77a',
'pp_gas':... | gpl-3.0 | 497,670,138,951,335,800 | 31.511111 | 77 | 0.623718 | false | 2.997951 | false | false | false |
bingweichen/GOKU | backend/server/service/school_service.py | 1 | 3091 | # -*- coding: UTF-8 -*-
"""
@author: Bingwei Chen
@time: 2017.07.20
@desc: service for school
1. school Add/Get/Modify/Remove
浙江大学、浙江工业大学、浙江科技学院、浙江外国语学院、长征职业技术学院、万向职业技术学院
线下实体店有浙大Goku出行、浙工大Goku出行、浙科院Goku出行,身份认证到浙大的同学通知到浙大Goku出行提车,身份认证到浙外、浙工大、万向职业技术学院的同学通知到浙工大Goku出行提车,身份认证到浙科院、长征职业技术学院的同学通知到浙科院Goku出行提车
"""
# from... | apache-2.0 | -7,579,883,013,094,543,000 | 18.713178 | 131 | 0.525364 | false | 2.184708 | false | false | false |
HazyResearch/deepdive | ddlib/test/tsj_extractor_identity_udf.py | 1 | 1333 | #!/usr/bin/env python
# an identity UDF for Nasty TSJ input/output
# for testing @tsj_extractor parser and formatter
from deepdive import *
def identity_for_nasty_tsj(
v1 = "text",
v2 = "float",
v3 = "boolean",
v4 = "boolean",
v5 = "text",
v6 = "text",
v7 = "text... | apache-2.0 | 18,184,338,219,287,016 | 20.5 | 49 | 0.39835 | false | 3.3325 | false | false | false |
jefftc/changlab | Betsy/Betsy/modules/run_MACS14.py | 1 | 6848 | from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, antecedents, out_attributes, user_options, num_cores,
out_path):
import os
from genomicode import parallel
from genomicode i... | mit | 6,532,412,422,094,169,000 | 32.73399 | 79 | 0.577103 | false | 3.606108 | false | false | false |
labsanmartin/Bika-LIMS | bika/lims/controlpanel/bika_samplingrounds.py | 3 | 3974 | from plone.supermodel import model
from plone.dexterity.content import Container
from zope.interface import implements
from bika.lims.browser.bika_listing import BikaListingView
from plone.app.content.browser.interfaces import IFolderContentsView
from plone.app.layout.globals.interfaces import IViewView
from bika.lims ... | agpl-3.0 | -166,502,254,717,048,540 | 36.490566 | 101 | 0.483644 | false | 4.546911 | false | false | false |
JSBCCA/pythoncode | early_projects/grade.py | 1 | 1752 | def remove(numlist):
"""Removes negative numbers and numbers above 100 from a list"""
numremove = []
for item in numlist:
if item < 0 or item > 100:
numremove.append(item)
for item in numremove:
numlist.remove(item)
return (numlist)
def average(num):
"""Gets the ave... | mit | 968,606,473,705,234,300 | 24.028571 | 79 | 0.486872 | false | 3.57551 | false | false | false |
wpjesus/codematch | ietf/submit/utils.py | 1 | 16013 | import os
import re
import datetime
from django.conf import settings
from ietf.doc.models import Document, State, DocAlias, DocEvent, DocumentAuthor
from ietf.doc.models import NewRevisionDocEvent, save_document_in_history
from ietf.doc.models import RelatedDocument, DocRelationshipName
from ietf.doc.utils import add... | bsd-3-clause | -1,921,965,157,322,459,000 | 35.981524 | 180 | 0.656966 | false | 3.665141 | false | false | false |
send2zhao/boilerplate | flack/events.py | 2 | 2062 | from flask import g, session
from . import db, socketio, celery
from .models import User, Message
from .auth import verify_token
def push_model(model):
"""Push the model to all connected Socket.IO clients."""
socketio.emit('updated_model', {'class': model.__class__.__name__,
... | mit | 6,596,085,107,764,467,000 | 28.457143 | 78 | 0.621242 | false | 3.854206 | false | false | false |
aplicatii-romanesti/allinclusive-kodi-pi | .kodi/userdata/addon_data/plugin.video.p2p-streams/acestream/ace/ACEStream/Core/defaults.py | 1 | 9463 | #Embedded file name: ACEStream\Core\defaults.pyo
import sys
import os
from simpledefs import *
DEFAULTPORT = 7760
SESSDEFAULTS_VERSION = 2
sessdefaults = {}
sessdefaults['version'] = SESSDEFAULTS_VERSION
sessdefaults['state_dir'] = None
sessdefaults['install_dir'] = u'.'
sessdefaults['ip'] = ''
sessdefaults['minport'] ... | apache-2.0 | 7,268,869,438,830,076,000 | 39.965368 | 104 | 0.756948 | false | 3.246312 | false | true | false |
sassoo/goldman | goldman/models/login.py | 1 | 4962 | """
models.logins
~~~~~~~~~~~~~
The Login model & schema
"""
import goldman
import goldman.signals as signals
from ..models.default_schema import Model as DefaultSchemaModel
from datetime import datetime as dt
from goldman.exceptions import AuthRejected
from goldman.utils.str_helpers import (
cmp_val... | mit | 671,716,417,299,556,600 | 27.354286 | 77 | 0.614873 | false | 4.266552 | false | false | false |
Ricyteach/candemaker | src/candemaker/cid/linedef/pipe/concrete.py | 1 | 4170 | from ... import format_specs as fs
from ..general import line
'''
from ..parmatters import prefix_spec, Pardef, s10, d5, f10, CANDE_formatter
class B1Concrete(metaclass=CANDE_formatter):
_prefix = prefix_spec.format('B-1.Concrete')
fc = Pardef(f10, 4E6) # psi
Modulus = Pardef(f10, 33*150**1.5*4000**0.5) #... | bsd-2-clause | 8,967,662,822,950,879,000 | 34.922414 | 118 | 0.640663 | false | 2.618479 | false | false | false |
alena1108/python-agent | cattle/plugins/libvirt/utils.py | 5 | 2653 | import os
import subprocess
import logging
from cattle.type_manager import get_type_list, register_type
from .connection import LibvirtConnection
from xml.etree import ElementTree
log = logging.getLogger('libvirt')
_LIBVIRT_POOL_DRIVER = 'LIBVIRT_POOL_DRIVER'
_LIBVIRT_VOLUME_DRIVER = 'LIBVIRT_VOLUME_DRIVER'
DATA_... | apache-2.0 | -3,730,471,974,980,665,000 | 22.900901 | 70 | 0.620053 | false | 3.599729 | false | false | false |
sushant94/daedalus | elgamal.py | 1 | 3395 | # ElGamal Cryptanalysis Module.
# Contributor: Sushant Dinesh [:sushant94]
# Read Multiple signatures (r, s, m) from a JSON file.
# Check if the private factor is vulnerable due to re-use of 'r'
'''
JSON Input Format:
====================
{
"generator": ... , "safeprime": ... , "pubkey": ... ,
"sigs": [
... | mit | -172,589,543,243,743,740 | 30.435185 | 119 | 0.47511 | false | 3.418933 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.