repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
3DGenomes/tadbit | scripts/liftover_tads_genomes.py | 2 | 7055 | """
17 May 2013
Liftover (1) wrapper applied to the comparison of topologically associated
domains.
This script allows to compare Hi-C experiments (mainly align TAD boundaries)
done with different assemblies (e.g.: NCBI36 and GRCh37 for human genome), or
in different species.
INSTALL:
- liftover tool needs to b... | gpl-3.0 | -5,894,526,456,116,291,000 | 38.634831 | 80 | 0.505599 | false |
smallyear/linuxLearn | salt/salt/modules/cloud.py | 1 | 8214 | # -*- coding: utf-8 -*-
'''
Salt-specific interface for calling Salt Cloud directly
'''
# Import python libs
from __future__ import absolute_import
import os
import logging
import copy
# Import salt libs
try:
import salt.cloud
HAS_SALTCLOUD = True
except ImportError:
HAS_SALTCLOUD = False
import salt.uti... | apache-2.0 | 4,759,294,254,014,473,000 | 20.061538 | 163 | 0.632213 | false |
jasonhamilton/hotwing-core | hotwing_core/panel.py | 1 | 3463 | from __future__ import division
from .rib import Rib
from .profile import Profile
from .coordinate import Coordinate
class Panel():
"""
A Panel is a representation of a wing panel and contains all of the items/objects
necessary to define a wing.
A Panel can be thought of as a wing facing down with ri... | gpl-3.0 | 3,650,149,134,089,995,000 | 28.862069 | 103 | 0.520358 | false |
emanuil-tolev/fundfind | fundfind/core.py | 1 | 1312 | import os
from flask import Flask
from flask.ext.login import LoginManager, current_user
from fundfind import default_settings
login_manager = LoginManager()
def create_app():
app = Flask(__name__)
configure_app(app)
configure_jinja(app)
setup_error_email(app)
login_manager.setup_app(app)
ret... | mit | 3,052,434,311,215,307,300 | 28.155556 | 64 | 0.632622 | false |
nikkomidoy/project_soa | project_soa/users/views.py | 1 | 1647 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.core.urlresolvers import reverse
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import User
class UserDetailView(Login... | mit | 1,562,233,376,126,577,700 | 29.5 | 79 | 0.694596 | false |
mozilla-releng/services | lib/please_cli/please_cli/config.py | 1 | 3928 | # -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import glob
import os
import click
CWD_DIR = os.path.abspath(os.getcwd())
NO_ROOT_DIR_ERROR =... | mpl-2.0 | -2,205,204,115,440,344,000 | 30.677419 | 93 | 0.52113 | false |
andreask/mailchimp-python | mailchimp/objects/mc_interest_category.py | 1 | 3803 | # coding=utf-8
import logging
from mailchimp.exceptions import MCInterestCategoryNotFound, MCListNotFound, ObjectNotFound
from mailchimp import Request
from .base_object import BaseObject
from .mc_link import MCLink
logger = logging.getLogger(__name__)
class MCInterestCategory(BaseObject):
item_url = '/lists/{... | mit | 8,170,451,207,158,942,000 | 32.359649 | 120 | 0.611097 | false |
sondree/Master-thesis | Python PLOTS/batchRunner.py | 1 | 1407 |
from plotfitness_emitter import main as main_em
from plotfitness_receiver import main as main_recv
from plotfitness_direction import main as main_dir
from time import sleep
production = True
if production:
print "Warning running in production mode. This will take a long time"
sleep(1)
num_steps = [1,1]
... | gpl-3.0 | -3,059,308,023,333,114,400 | 32.5 | 134 | 0.625444 | false |
zstackio/zstack-woodpecker | integrationtest/vm/e2e_mini/vm/test_delete_resume_vm.py | 1 | 1268 | # -*- coding:utf-8 -*-
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
vm = test_lib.lib_get_specific_stub('e2e_mini/vm', 'vm')
vm_ops = None
vm_name = 'vm-' + vm.get_time_postfix()
def test():
global vm_ops
vm_ops = vm.VM()
vm_ops.create_vm(name=vm_name)
... | apache-2.0 | 5,973,048,780,601,433,000 | 25.978723 | 81 | 0.621451 | false |
edx/edx-enterprise | tests/test_enterprise/management/test_migrate_enterprise_catalogs.py | 1 | 5050 | # -*- coding: utf-8 -*-
"""
Tests for the djagno management command `create_enterprise_course_enrollments`.
"""
import mock
from pytest import mark, raises
from django.core.management import call_command
from django.core.management.base import CommandError
from django.test import TestCase
from test_utils.factories i... | agpl-3.0 | 6,437,641,796,574,643,000 | 47.557692 | 116 | 0.712079 | false |
Bitcoin-ABC/bitcoin-abc | test/functional/abc_p2p_avalanche_voting.py | 1 | 9419 | #!/usr/bin/env python3
# Copyright (c) 2020-2021 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the resolution of forks via avalanche."""
import random
from test_framework.avatools import (
get_... | mit | -3,139,993,200,430,624,300 | 36.229249 | 94 | 0.591783 | false |
code-sauce/tensorflow | tensorflow/contrib/distributions/python/ops/kullback_leibler.py | 1 | 5019 | # Copyright 2016 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 | 2,924,097,993,749,842,400 | 34.097902 | 80 | 0.662483 | false |
kirstymcnaught/SpecialEffectMinecraftMods | src/gen_toml.py | 1 | 1831 |
import subprocess, re, shutil
## Grep all the files for MODID
cmd="find . -iname '*.java' | xargs grep 'MODID = ' -h"
regex = "\"(.*)\""
result = subprocess.run(cmd.split(), stdout=subprocess.PIPE, shell=True)
lines = result.stdout.decode("utf-8").split("\r\n")
mod_ids = []
for line in lines:
match = re.sear... | gpl-3.0 | 8,918,407,722,003,720,000 | 29.032787 | 87 | 0.59148 | false |
ericchill/gnofract4d | fract4dgui/painter.py | 1 | 1313 | # GUI for painting colors onto the fractal
import gtk
import dialog
import browser
import utils
def show(parent,f):
PainterDialog.show(parent,f)
class PainterDialog(dialog.T):
def show(parent, f):
dialog.T.reveal(PainterDialog, True, parent, None, f)
show = staticmethod(show)
def __ini... | bsd-3-clause | -2,438,796,135,652,036,600 | 28.177778 | 72 | 0.593298 | false |
kubernetes-client/python | kubernetes/client/configuration.py | 1 | 13238 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.18
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import c... | apache-2.0 | 6,432,329,210,058,188,000 | 32.261307 | 124 | 0.585662 | false |
Szkered/BC_2402 | sydb/stocks/admin.py | 1 | 1758 | from django.contrib import admin
from stocks.models import *
class StockAdmin(admin.ModelAdmin):
list_display = ['name', 'unit_measure', 'unit_price', 'category_slug']
ordering = ['name']
search_fields = ('name',)
class DonorAdmin(admin.ModelAdmin):
list_display = ['name', 'contact_no', 'address', 'r... | apache-2.0 | 4,979,858,879,367,325,000 | 27.354839 | 75 | 0.6843 | false |
Lukasa/urllib3 | test/contrib/test_pyopenssl_dependencies.py | 1 | 1662 | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from mock import patch... | mit | -2,780,362,765,998,670,300 | 35.130435 | 74 | 0.608303 | false |
mkollaro/destroystack | bin/packstack_deploy.py | 1 | 7940 | #!/usr/bin/env python
# Copyright (c) 2013 Red Hat, 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 applic... | apache-2.0 | -2,189,798,833,146,099,000 | 34.288889 | 79 | 0.68073 | false |
centricular/cerbero | cerbero/commands/check.py | 1 | 2640 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | lgpl-2.1 | -215,881,122,121,253,340 | 35.666667 | 79 | 0.623864 | false |
Teagan42/home-assistant | homeassistant/components/netatmo/binary_sensor.py | 1 | 6522 | """Support for the Netatmo binary sensors."""
import logging
import pyatmo
from homeassistant.components.binary_sensor import BinarySensorDevice
from .camera import CameraData
from .const import AUTH, DOMAIN, MANUFACTURER
_LOGGER = logging.getLogger(__name__)
# These are the available sensors mapped to binary_sens... | apache-2.0 | -1,740,085,250,344,084,000 | 36.268571 | 87 | 0.568997 | false |
dksr/REMIND | python/base/utils/LoggerManager.py | 1 | 3182 | #!/usr/bin/env python
import logging
import logging.handlers
from Singleton import Singleton
import os
LOGPATH = '/tmp'
class LoggerManager(Singleton):
def __init__(self):
self.loggers = {}
formatter = logging.Formatter('%(asctime)s:%(levelname)-8s:%(name)-10s:%(lineno)4s: %(mes... | mit | -1,496,373,961,397,045,000 | 48.734375 | 116 | 0.52137 | false |
trevor/calendarserver | txweb2/server.py | 1 | 26937 | # -*- test-case-name: txweb2.test.test_server -*-
##
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# Copyright (c) 2010-2014 Apple Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), t... | apache-2.0 | -2,017,913,453,591,127,000 | 36.516713 | 165 | 0.605932 | false |
elthariel/dff | modules/viewer/hexedit/offsetItem.py | 1 | 2183 | # DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2010 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more information about this... | gpl-2.0 | 3,857,610,205,408,654,000 | 27.723684 | 78 | 0.63628 | false |
aio-libs/aiohttp | tests/test_multipart.py | 1 | 50388 | # type: ignore
import asyncio
import io
import json
import pathlib
import sys
import zlib
from typing import Any, Optional
from unittest import mock
import pytest
import aiohttp
from aiohttp import payload
from aiohttp.hdrs import (
CONTENT_DISPOSITION,
CONTENT_ENCODING,
CONTENT_TRANSFER_ENCODING,
CON... | apache-2.0 | 4,208,057,882,136,613,000 | 32.983784 | 86 | 0.519047 | false |
iakov/margen | margen.py | 1 | 4589 | #!/usr/bin/python2
"""
Copyright 2016 Iakov Kirilenko
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 | -5,827,541,999,847,004,000 | 36.008065 | 119 | 0.577468 | false |
fiete201/qutebrowser | qutebrowser/mainwindow/prompt.py | 1 | 34258 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | 8,010,042,735,672,391,000 | 34.537344 | 81 | 0.594547 | false |
huggingface/transformers | src/transformers/utils/versions.py | 1 | 4381 | # Copyright 2020 The HuggingFace Team. 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 applicabl... | apache-2.0 | -2,630,832,435,068,718,000 | 35.508333 | 139 | 0.635471 | false |
fberanizo/neural_network | tests/ibovespa/external_rnn.py | 1 | 5741 | # -*- coding: utf-8 -*-
import sys, os
sys.path.insert(0, os.path.abspath('../..'))
import unittest, pandas, numpy, datetime, itertools, rnn
from sklearn import cross_validation, preprocessing
class ExternalRNN(unittest.TestCase):
"""Test cases for Ibovespa tendency problem."""
grid_search = True
def te... | bsd-2-clause | -760,951,907,419,125,500 | 42.801527 | 123 | 0.584699 | false |
Microvellum/Fluid-Designer | win64-vc/2.78/Python/bin/2.78/scripts/addons/io_scene_obj/export_obj.py | 1 | 38495 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | -8,155,557,614,567,815,000 | 44.181925 | 132 | 0.444317 | false |
rwl/PyCIM | CIM15/IEC61970/Informative/InfERPSupport/OrgErpPersonRole.py | 1 | 3445 | # Copyright (C) 2010-2011 Richard 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 restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | -5,857,759,180,858,380,000 | 40.506024 | 175 | 0.697823 | false |
OpenMined/PySyft | packages/grid/apps/worker/src/main/core/groups/group_ops.py | 1 | 2683 | # stdlib
from datetime import datetime
from datetime import timedelta
from json import dumps
from json import loads
from json.decoder import JSONDecodeError
import logging
from secrets import token_hex
# grid relative
from ..codes import RESPONSE_MSG
from ..database import Group
from ..database import Role
from ..data... | apache-2.0 | -8,161,439,248,849,288,000 | 24.798077 | 61 | 0.71748 | false |
priendeau/PyNOAAGeoMagIndiceHandler | build/lib.linux-x86_64-2.6/PyNOAAGeoMagIndiceHandler/GeoMagReferences.py | 1 | 8642 | from __future__ import with_statement
import os, sys, re, pynav, time, datetime, pytz ,pyaeso, spharm, matplotlib,xml_marshaller, xmlbuilder
from xml_marshaller import xml_marshaller
from xml_marshaller.xml_marshaller import *
from xmlbuilder import XMLBuilder
import numpy as np
from pynav import Pynav
from pyaeso i... | bsd-3-clause | -6,327,240,926,643,782,000 | 33.293651 | 171 | 0.5891 | false |
tarasane/h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_NOPASS_random_attack_medium.py | 1 | 4940 | import sys
sys.path.insert(1, "../../../")
import h2o, tests
import random
def random_attack():
def attack(family, train, valid, x, y):
kwargs = {}
kwargs['family'] = family
gaussian_links = ["inverse", "log", "identity"]
binomial_links = ["logit"]
poisson_links =... | apache-2.0 | -440,998,212,565,106,400 | 46.5 | 113 | 0.470445 | false |
GoogleCloudPlatform/declarative-resource-client-library | python/services/networkservices/beta/endpoint_config_selector.py | 1 | 21391 | # Copyright 2021 Google LLC. 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 applicable law o... | apache-2.0 | 6,402,314,300,991,686,000 | 36.201739 | 157 | 0.663457 | false |
romana/networking-romana | networking_romana/_i18n.py | 1 | 1404 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | 6,573,460,745,959,770,000 | 31.651163 | 78 | 0.730057 | false |
caronc/nzbget-subliminal | Subliminal/pkg_resources.py | 1 | 87985 | """Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipula... | gpl-3.0 | 6,505,110,880,996,614,000 | 31.916199 | 94 | 0.602159 | false |
ethz-asl/segmatch | segmappy/segmappy/models/model_groups_tf.py | 1 | 6314 | import tensorflow as tf
# define the cnn model
def init_model(input_shape, n_classes):
with tf.name_scope("InputScope") as scope:
cnn_input = tf.placeholder(
dtype=tf.float32, shape=(None,) + input_shape + (1,), name="input"
)
# base convolutional layers
y_true = tf.placeholder... | bsd-3-clause | -7,130,928,450,581,762,000 | 29.8 | 86 | 0.606589 | false |
ivanlyon/exercises | kattis/k_rockscissorspaper.py | 1 | 3696 | '''
Deliver state of Rock-Paper-Scissors style of Conway game of life
Status: Accepted
'''
###############################################################################
class RockPaperScissorsGrid():
'''Conway life-style grid'''
def __init__(self, grid):
self._grid = grid
self._rows = len(... | mit | 4,729,091,299,634,914,000 | 29.295082 | 99 | 0.502706 | false |
CollabQ/CollabQ | invite/views.py | 1 | 2741 | # Copyright 2010 http://www.collabq.com
# Copyright 2009 Google 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 ... | apache-2.0 | -7,093,654,507,555,927,000 | 33.708861 | 79 | 0.684422 | false |
kayhayen/Nuitka | nuitka/nodes/ReturnNodes.py | 1 | 6750 | # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | apache-2.0 | 6,049,847,874,321,408,000 | 25.162791 | 119 | 0.661185 | false |
cblop/tropic | instal-linux/instal/firstprinciples/cliinvocation/TestInstalSolveCLIInvocation.py | 1 | 2757 | from instal.firstprinciples.TestEngine import InstalTestCase, InstalCompareJSONTestCase
from instal.instalexceptions import InstalTestNotImplemented
import subprocess
import os
from instal.instalsolve import instal_solve_keyword
from instal.instalutility import temporary_text_file
import tempfile
class SolveCLIInvoca... | epl-1.0 | -1,831,571,274,394,504,700 | 53.058824 | 154 | 0.630758 | false |
pdinges/python-schoof | support/profiling.py | 1 | 11632 | # -*- coding: utf-8 -*-
# Copyright (c) 2010--2012 Peter Dinges <pdinges@acm.org>
#
# 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 la... | gpl-3.0 | -6,382,795,003,153,329,000 | 33.11437 | 97 | 0.588635 | false |
OxES/OxKeplerSC | src/cbvc/VBLinRegARD.py | 1 | 3845 | import numpy, sys
import scipy.linalg, scipy.special
'''
VBLinRegARD: Linear basis regression with automatic relevance priors
using Variational Bayes.
For more details on the algorithm see Apprendix of
Roberts, McQuillan, Reece & Aigrain, 2013, MNRAS, 354, 3639.
History:
2011: Translated by Thomas Evans from origina... | gpl-3.0 | 4,759,305,985,593,180,000 | 35.971154 | 108 | 0.584135 | false |
EternalPo/PythonTest | main/pythonmain.py | 1 | 1646 | #!/usr/bin/env python
#-*- coding: UTF-8 -*-
# 导入hello.py 文件 和
import hello
import pythontest
import pythondef
#hello.print_func("World")
# Python 读写文件
# 1.打开文件 使用 open 打开文件后, 一定要记得调用文件对象的close()方法,比如可用try/finally 语句来确保最后能关闭文件.
file_object = open("testfile")
print(file_object.name)
try:
all_the_test = file_... | apache-2.0 | 6,295,898,723,262,873,000 | 14.54023 | 90 | 0.677515 | false |
google/material-design-icons | update/venv/lib/python3.9/site-packages/fontTools/misc/xmlReader.py | 5 | 4764 | from fontTools import ttLib
from fontTools.misc.textTools import safeEval
from fontTools.ttLib.tables.DefaultTable import DefaultTable
import sys
import os
import logging
log = logging.getLogger(__name__)
class TTXParseError(Exception): pass
BUFSIZE = 0x4000
class XMLReader(object):
def __init__(self, fileOrPat... | apache-2.0 | 1,176,087,762,665,243,600 | 27.023529 | 86 | 0.690386 | false |
pytroll/pytroll-db | trolldb/sqltypes.py | 1 | 1645 | import sqlalchemy
from shapely import geometry, wkb
class Geography(sqlalchemy.types.TypeEngine):
"""PostGIS Geometry Type."""
def __init__(self, type_, dimension):
super(Geography, self).__init__()
self.SRID = 4326
self.type = type_.upper()
self.dimension = dimension
... | gpl-3.0 | 2,036,326,957,917,313,500 | 25.967213 | 67 | 0.564134 | false |
mainakibui/dkobo | dkobo/koboform/views/survey_draft_views.py | 1 | 11283 | import json
import requests
import pyxform.survey_from
from guardian.shortcuts import assign_perm
from django.http import HttpResponseBadRequest, HttpResponse, HttpResponseRedirect
from django.conf import settings
from django.utils.encoding import smart_unicode
from django.contrib.auth.decorators import login_required... | agpl-3.0 | -7,562,220,105,088,083,000 | 38.869258 | 133 | 0.639901 | false |
CollectQT/qapc | test/test_utils.py | 1 | 5877 | # builtin
import os
import sys
############################################################
# utils / setup
############################################################
base_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
sys.path.append(base_dir)
from lib import utils, file_load
############... | agpl-3.0 | -8,849,307,184,144,119,000 | 34.403614 | 95 | 0.65884 | false |
diath/pyfsw | pyfsw/models/shop.py | 1 | 2866 | from sqlalchemy import Column, Integer, String, Text, ForeignKey
from pyfsw import db
class ShopCategory(db.Model):
__tablename__ = 'shop_category'
# Standard columns
id = Column(Integer, primary_key=True, unique=True)
name = Column(String(32))
enabled = Column(Integer, default=1)
# Relationship
items = db.re... | mit | -5,246,374,000,673,775,000 | 20.877863 | 64 | 0.684229 | false |
justinvforvendetta/test1234 | src/blockchain_processor.py | 1 | 27894 | import ast
import hashlib
from json import dumps, loads
import os
from Queue import Queue
import random
import sys
import time
import threading
import urllib
import deserialize
from processor import Processor, print_log
from utils import *
from storage import Storage
from utils import logger
class BlockchainProcessor... | agpl-3.0 | -8,479,303,598,396,417,000 | 32.688406 | 153 | 0.525203 | false |
ericmjl/bokeh | bokeh/core/property/string.py | 1 | 3831 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 7,637,204,481,124,638,000 | 30.661157 | 117 | 0.394936 | false |
jacobzelek/ffprobe | ffprobe/ffprobe.py | 1 | 12463 | #!/usr/bin/python
# Filename: ffprobe.py
"""
Python wrapper for ffprobe command line tool. ffprobe must exist in the path or in a common installation path
"""
version = '0.4'
import subprocess
import re
import os
import sys
from os import listdir
from os.path import isfile, join
import json
import mimetypes
class FF... | mit | 3,546,136,138,872,157,700 | 31.371429 | 109 | 0.473482 | false |
Frky/scat | src/shell/chart/alloc.py | 1 | 6907 | #-*- coding: utf-8 -*-
import os
import sys
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import pylab as P
import pandas as pd
from .chart import Chart
from .entry.alloc import AllocEntry
class AllocChart(Chart):
def __init__(self, oracle, *args, **kwargs):
super(AllocChart, se... | mit | -6,983,431,459,954,425,000 | 37.586592 | 110 | 0.413638 | false |
hjoliver/cylc | cylc/flow/scripts/trigger.py | 1 | 2594 | #!/usr/bin/env python3
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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... | gpl-3.0 | -334,009,959,158,072,200 | 27.822222 | 78 | 0.676561 | false |
quarkslab/irma | probe/modules/custom/skeleton/plugin.py | 1 | 2240 | #
# Copyright (c) 2013-2018 Quarkslab.
# This file is part of IRMA project.
#
# 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 in the top-level directory
# of this distribution and at:
#
# http:... | apache-2.0 | 5,575,655,391,303,937,000 | 30.549296 | 74 | 0.615179 | false |
jabber-at/hp | hp/core/tests/tests_views.py | 1 | 1386 | # -*- coding: utf-8 -*-
#
# This file is part of the jabber.at homepage (https://github.com/jabber-at/hp).
#
# This project 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 | -114,297,983,326,547,660 | 36.459459 | 99 | 0.701299 | false |
ZeitOnline/zeit.cms | src/zeit/cms/workingcopy/browser/preview.py | 1 | 2690 | import urllib2
import urlparse
import zeit.cms.browser.preview
import zeit.cms.interfaces
import zeit.connector.interfaces
import zope.component
class WorkingcopyPreview(zeit.cms.browser.preview.Preview):
"""Preview for workingcopy versions of content objects.
This supports two modes of operation:
1. Up... | bsd-3-clause | -3,901,331,997,260,017,700 | 35.351351 | 78 | 0.662825 | false |
mluscon/ci-dnf-stack | dnf-docker-test/features/steps/repo_steps.py | 1 | 5554 | from __future__ import absolute_import
from __future__ import unicode_literals
import glob
import os
import tempfile
from behave import given
from behave import register_type
from behave import when
from behave.model import Table
import jinja2
import parse
from whichcraft import which
from command_steps import step_... | gpl-3.0 | -8,378,289,381,050,230,000 | 28.700535 | 77 | 0.601728 | false |
NSasquatch/vocoder | toolset.py | 1 | 2495 | # -*- coding: latin-1 -*-
"""
This module was created by Silas Gyger, silasgyger@gmail.com.
It stands under CC BY 4.0 License.
http://creativecommons.org/licenses/by/4.0/
"""
import thinkdsp
import numpy as np
from matplotlib import pyplot
class Wave(thinkdsp.Wave):
def __getitem__(self, key):
return self.ys[key]... | cc0-1.0 | 4,411,227,925,583,878,000 | 24.20202 | 116 | 0.694188 | false |
nugget/python-insteonplm | insteonplm/devices/climateControl.py | 1 | 3689 | """INSTEON Climate Control Device Class."""
import logging
from insteonplm.devices import Device
from insteonplm.constants import COMMAND_EXTENDED_GET_SET_0X2E_0X00
from insteonplm.messages.extendedSend import ExtendedSend
from insteonplm.messages.userdata import Userdata
from insteonplm.states.thermostat import (
... | mit | -4,059,959,734,203,768,000 | 24.978873 | 87 | 0.548658 | false |
johan92/yafpgatetris | string_stuff/big_string_to_mif.py | 1 | 1180 | #!/usr/bin/python
import sys
def print_usage( argv ):
print "Creates mif file for ROM for strings.\n Input: raw file with zeros and ones.\n Output: MIF file \nUsage: %s STRING_FILE_NAME MIF_FILE_NAME" % ( sys.argv[0] )
if __name__ == "__main__":
if len( sys.argv ) < 3:
print_usage( sys.argv )
exit(... | mit | 5,125,996,493,227,969,000 | 20.454545 | 169 | 0.534746 | false |
california-civic-data-coalition/django-calaccess-processed-data | calaccess_processed_flatfiles/managers/candidacies.py | 1 | 1893 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Managers for generating flatfiles that combine multiple table into a simplified file.
"""
from __future__ import unicode_literals
from calaccess_processed.postgres import (
JSONArrayLength,
JSONExtractPath,
MaxFromJSONIntegerArray,
)
from django.db.models im... | mit | -4,057,872,674,531,777,000 | 35.403846 | 85 | 0.603275 | false |
ajyoon/brown | brown/core/brace.py | 1 | 3241 | from brown.core.multi_staff_object import MultiStaffObject
from brown.core.music_font import MusicFontGlyphNotFoundError
from brown.core.music_text import MusicText
from brown.core.staff_object import StaffObject
from brown.utils.point import Point
from brown.utils.units import GraphicUnit
class Brace(MultiStaffObjec... | gpl-3.0 | 2,192,175,412,026,653,000 | 39.012346 | 85 | 0.59241 | false |
yw374cornell/e-mission-server | emission/analysis/intake/cleaning/cleaning_methods/speed_outlier_detection.py | 1 | 1286 | # Techniques for outlier detection of speeds. Each of these returns a speed threshold that
# can be used with outlier detection techniques.
# Standard imports
import logging
class BoxplotOutlier(object):
MINOR = 1.5
MAJOR = 3
def __init__(self, multiplier = MAJOR, ignore_zeros = False):
self.mult... | bsd-3-clause | 4,354,731,408,748,637,700 | 34.722222 | 91 | 0.635303 | false |
smurn/ifaddr | setup.py | 1 | 1701 | # Copyright (c) 2014 Stefan C. Mueller
# 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, di... | mit | 8,916,418,490,596,393,000 | 40.512195 | 85 | 0.736626 | false |
snower/forsun | forsun/servers/server.py | 1 | 2811 | # -*- coding: utf-8 -*-
# 15/6/10
# create by: snower
import logging
import threading
from tornado.ioloop import IOLoop, asyncio
from thrift.protocol.TBinaryProtocol import TBinaryProtocolAcceleratedFactory
from torthrift.transport import TIOStreamTransportFactory
from torthrift.server import TTornadoServer as BaseTTo... | mit | 2,440,367,594,320,221,000 | 33.292683 | 77 | 0.622199 | false |
kakapocoin/kakapocoin-old | contrib/pyminer/pyminer.py | 1 | 6434 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | mit | 3,967,279,225,010,473,500 | 24.531746 | 84 | 0.648896 | false |
yaybu/touchdown | touchdown/ssh/terminal.py | 1 | 3244 | # Copyright 2015 Isotoma Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | -4,779,550,030,188,554,000 | 26.965517 | 82 | 0.579531 | false |
HumanDynamics/openbadge-analysis | openbadge_analysis/visualization/contribution.py | 1 | 4081 | import datetime
from bokeh.charts import Area, output_file, show
from bokeh.models.formatters import DatetimeTickFormatter
from bokeh.models.widgets import Panel, Tabs
def unix_time_ms(dt):
"""
Converts datetime to timestamp float (milliseconds) for plotting
:param dt: datetime
:return: timestamp flo... | mit | 410,644,883,875,665,500 | 44.865169 | 120 | 0.616025 | false |
ludobox/ludobox-ui | server/ludobox/history.py | 2 | 5286 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Record and manage file changes and keep track of history.
Key concepts are :
- events : everytime somethin is changed, we use this event
- history : the whole thread of events that applies to a page
For each event, a unique SHA id is created (like git https://stackove... | agpl-3.0 | -5,003,481,011,867,409,000 | 29.37931 | 127 | 0.644344 | false |
cineuse/CNCGToolKit | cgtkLibs/cgtk_os/TemporaryDirectory.py | 1 | 2998 | # coding=utf8
# Copyright (c) 2016 Strack
import os
import warnings
from tempfile import mkdtemp
import logging
import cgtk_log
log = cgtk_log.cgtk_log(level=logging.INFO)
class TemporaryDirectory(object):
"""
Create and return a temporary directory. This has the same
behavior as mkdtemp but can be use... | mit | -9,125,791,930,769,588,000 | 29.907216 | 85 | 0.571714 | false |
modcloth/tory-client | tory_client/unregister.py | 1 | 2146 | # vim:fileencoding=utf-8
import argparse
import logging
import os
import sys
from . import __version__
from .client import delete_host
from .junkdrawer import HelpFormatter
USAGE = """%(prog)s [options]
Unregister host(s) in tory.
"""
EPILOGUE = """\
Examples:
# Unregister a machine by name
%(prog)s --name foo-ba... | mit | -5,951,089,021,157,053,000 | 25.493827 | 76 | 0.602982 | false |
bitcoinfees/bitcoin-feemodel | feemodel/txmempool.py | 1 | 32024 | from __future__ import division
import os
import threading
import sqlite3
import decimal
import logging
from time import time
from copy import copy
from itertools import groupby
from operator import attrgetter, itemgetter
from bitcoin.core import b2lx
from feemodel.config import config, datadir, MINRELAYTXFEE, PRIOR... | mit | 5,300,208,427,413,970,000 | 35.809195 | 79 | 0.548589 | false |
lukovnikov/teafacto | teafacto/scripts/simplequestions/subjdetchar.py | 1 | 5550 | import numpy as np
from teafacto.blocks.seq.oldseqproc import SimpleVec2Idx, MemVec2Idx
from teafacto.blocks.seq.enc import SimpleSeq2Vec
from teafacto.blocks.seq.enc import Seq2Idx
from teafacto.blocks.lang.wordvec import Glove
from teafacto.blocks.memory import LinearGateMemAddr, DotMemAddr
from teafacto.scripts.sim... | mit | -4,715,588,283,602,784,000 | 31.273256 | 133 | 0.609369 | false |
mvaled/sentry | src/sentry/reprocessing.py | 1 | 2078 | from __future__ import absolute_import
import uuid
REPROCESSING_OPTION = "sentry:processing-rev"
def get_reprocessing_revision(project, cached=True):
"""Returns the current revision of the projects reprocessing config set."""
from sentry.models import ProjectOption, Project
if cached:
return P... | bsd-3-clause | -1,081,322,319,088,191,900 | 29.115942 | 88 | 0.689124 | false |
patpatpatpatpat/pycolfin | pycolfin/cli.py | 1 | 1716 | # -*- coding: utf-8 -*-
import os
from getpass import getpass
import click
from .pycolfin import COLFin
verbosity_help = """
1 = User ID, Last Login
2 = Display all info from 1 and portfolio summary
3 = Display all info in 1 & 2 and detailed portfolio
"""
use_env_vars_help = """
Use USER_ID and PASSWORD from enviro... | mit | -6,550,584,323,671,788,000 | 26.677419 | 93 | 0.61655 | false |
3324fr/spinalcordtoolbox | dev/sct_register_multimodal_old/msct_register.py | 1 | 35723 | #!/usr/bin/env python
#
#
#
# ---------------------------------------------------------------------------------------
# Copyright (c) 2015 NeuroPoly, Polytechnique Montreal <www.neuro.polymtl.ca>
# Authors: Tanguy Magnan
# Modified: 2015-07-29
#
# License: see the LICENSE.TXT
#==========================================... | mit | 6,486,023,166,097,411,000 | 72.807851 | 220 | 0.683229 | false |
privb0x23/bliss-initramfs | pkg/hooks/Base.py | 1 | 2070 | # Copyright 2012-2017 Jonathan Vasquez <jon@xyinn.org>
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the fol... | bsd-2-clause | -8,870,375,991,799,534,000 | 31.857143 | 82 | 0.68599 | false |
divyamamgai/UdacityProjectMovieTrailerWebsite | media.py | 1 | 3327 | import webbrowser
import re
import urllib.request
import urllib.parse
import json
# as keyword creates an alias for xml.etree.ElementTree as ET, so we can use ET to reference xml.etree.ElementTree.
import xml.etree.ElementTree as eT
class Movie:
def __init__(self, title, plot, poster, trailer_url):
self.t... | mit | 3,126,210,087,341,528,000 | 54.45 | 115 | 0.637211 | false |
mattsmart/biomodels | transcriptome_clustering/spectrums.py | 1 | 9188 | import matplotlib.pyplot as plt
import numpy as np
import os
from inference import choose_J_from_general_form, infer_interactions, error_fn
from settings import FOLDER_OUTPUT
from visualize_matrix import plot_matrix
def get_spectrum_from_arr(J, real=True, sort=True):
# TODO deal with massive complex part if nece... | mit | 5,367,572,452,356,783,000 | 41.734884 | 141 | 0.626034 | false |
johnnoone/aioconsul | tests/test_common.py | 1 | 1306 | import pytest
from aioconsul.common import Address, parse_addr
from aioconsul.common import duration_to_timedelta, timedelta_to_duration
from datetime import timedelta
@pytest.mark.parametrize("a, b", [
("10s", timedelta(seconds=10)),
("2m", timedelta(minutes=2)),
("2h", timedelta(hours=2)),
("2d", ti... | bsd-3-clause | -8,695,781,263,740,024,000 | 32.487179 | 73 | 0.644717 | false |
nasa/39A | spaceapps/awards/models.py | 1 | 1227 | from django.db import models
from projects.models import Project
from locations.models import Location
class LocalAward(models.Model):
project = models.ForeignKey(Project)
location = models.ForeignKey(Location)
title = models.CharField(max_length=100, blank=True)
def is_eligible(self):
if se... | apache-2.0 | 4,471,971,229,118,569,000 | 30.487179 | 78 | 0.688672 | false |
commaai/openpilot | selfdrive/car/honda/carstate.py | 1 | 17654 | from cereal import car
from collections import defaultdict
from common.numpy_fast import interp
from opendbc.can.can_define import CANDefine
from opendbc.can.parser import CANParser
from selfdrive.config import Conversions as CV
from selfdrive.car.interfaces import CarStateBase
from selfdrive.car.honda.values import CA... | mit | 1,605,306,792,609,832,000 | 41.4375 | 158 | 0.614648 | false |
opinsys/aptirepo | aptirepo/setup.py | 1 | 2037 | # -*- coding: utf-8 -*-
# aptirepo - Simple APT Repository Tool
# Copyright (C) 2013,2014,2015 Opinsys
#
# 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... | gpl-2.0 | 7,825,566,279,488,568,000 | 36.685185 | 73 | 0.660934 | false |
evgfilim1/spin_everyday_bot | thebot.py | 1 | 20481 | # SpinEverydayBot
# Copyright © 2016-2017 Evgeniy Filimonov <https://t.me/evgfilim1>
# See full NOTICE at http://github.com/evgfilim1/spin_everyday_bot
import logging
from telegram import (Bot, Update, ParseMode, TelegramError,
InlineKeyboardMarkup, InlineKeyboardButton, ForceReply, ReplyKeyboar... | agpl-3.0 | -2,395,831,886,744,955,000 | 39.894737 | 120 | 0.628932 | false |
batoure/ScienceManager | App/service/data/provider.py | 1 | 3148 | #service.data.provider
from service.data.factory.baseProvider import BaseProvider
#TODO: Add textwrap to a query post processor
from model.workflow import *
class Provider(BaseProvider):
def __init__(self, log, connectionSettings):
self._log = log
#pass to the base connectionSettings
self... | mit | 8,614,728,280,032,674,000 | 47.446154 | 326 | 0.56385 | false |
arizvisa/syringe | lib/ptypes/__init__.py | 1 | 1981 | from . import ptype, parray, pstruct, pbinary, pint, pfloat, pstr
from . import utils, dynamic, provider
dyn, prov = dynamic, provider
__all__ = 'ptype','parray','pstruct','pbinary','pint','pfloat','pstr','dynamic','dyn','prov'
from . import config
Config = config.defaults
## globally changing the ptype provider
def... | bsd-2-clause | 1,039,058,835,156,158,200 | 36.377358 | 103 | 0.714286 | false |
YannickB/odoo-hosting | clouder_template_shinken/template.py | 1 | 11712 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Buron
# Copyright 2015, TODAY Clouder SASU
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License with Attribution
# ... | agpl-3.0 | -3,848,946,444,569,847,300 | 36.538462 | 79 | 0.518272 | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247972723/PyKDE4/kdeui/KApplication.py | 1 | 2567 | # encoding: utf-8
# module PyKDE4.kdeui
# from /usr/lib/python2.7/dist-packages/PyKDE4/kdeui.so
# by generator 1.135
# no doc
# imports
import PyKDE4.kdecore as __PyKDE4_kdecore
import PyQt4.QtCore as __PyQt4_QtCore
import PyQt4.QtGui as __PyQt4_QtGui
import PyQt4.QtSvg as __PyQt4_QtSvg
class KApplication(__PyQt4_Qt... | gpl-2.0 | 7,312,801,345,407,079,000 | 26.602151 | 82 | 0.653292 | false |
ajylee/gpaw-rtxs | gpaw/test/nonselfconsistent.py | 1 | 1069 | from ase import Atoms
from ase.units import Bohr
from gpaw import GPAW
from gpaw.test import equal
a = 7.5 * Bohr
n = 16
atoms = Atoms('He', [(0.0, 0.0, 0.0)], cell=(a, a, a), pbc=True)
calc = GPAW(gpts=(n, n, n), nbands=1, xc='PBE')
atoms.set_calculator(calc)
e1 = atoms.get_potential_energy()
niter1 = calc.get_number... | gpl-3.0 | 1,066,604,541,121,826,800 | 28.694444 | 64 | 0.695042 | false |
agoose77/hivesystem | manual/tetris/tetris-8.py | 1 | 10118 | import copy
import bee
import dragonfly.pandahive
from dragonfly.grid import bgrid
from dragonfly.canvas import box2d
import dragonfly.std, dragonfly.gen, dragonfly.random, dragonfly.logic
blocks = (
bgrid(values=((0, 0), (1, 0), (2, 0), (3, 0))), # I
bgrid(values=((0, 1), (0, 0), (1, 0), (2, 0))), #J
b... | bsd-2-clause | 6,362,046,269,218,194,000 | 29.113095 | 97 | 0.627496 | false |
jmartinezchaine/OpenERP | openerp/addons/nan_account_extension/partner.py | 1 | 6259 | # -*- encoding: latin-1 -*-
##############################################################################
#
# Copyright (c) 2010 NaN Projectes de Programari Lliure, S.L. All Rights Reserved.
# http://www.NaN-tic.com
#
# WARNING: This program as such is intended to be used by professional
# programme... | agpl-3.0 | -3,422,568,010,201,253,000 | 42.465278 | 125 | 0.588752 | false |
wavefrontHQ/python-client | test/test_user_group.py | 1 | 1242 | # coding: utf-8
"""
Wavefront REST API
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ... | apache-2.0 | 6,258,667,494,551,933,000 | 30.05 | 409 | 0.708535 | false |
googleapis/python-bigquery-datatransfer | samples/snippets/noxfile_config.py | 1 | 1607 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -1,555,643,134,543,847,400 | 41.289474 | 90 | 0.729932 | false |
nicolaiarocci/eve-swagger | eve_swagger/definitions.py | 1 | 7881 | # -*- coding: utf-8 -*-
"""
eve-swagger.definitions
~~~~~~~~~~~~~~~~~~~~~~~
swagger.io extension for Eve-powered REST APIs.
:copyright: (c) 2016 by Nicola Iarocci.
:license: BSD, see LICENSE for more details.
"""
from flask import current_app as app
from eve_swagger import OrderedDict
def defini... | bsd-3-clause | 2,573,368,983,479,785,500 | 31.974895 | 77 | 0.523411 | false |
algorhythms/LeetCode | 623 Add One Row to Tree.py | 1 | 2451 | #!/usr/bin/python3
"""
Given the root of a binary tree, then value v and depth d, you need to add a row
of nodes with value v at the given depth d. The root node is at depth 1.
The adding rule is: given a positive integer depth d, for each NOT null tree
nodes N in depth d-1, create two tree nodes with value v as N's l... | mit | 1,620,680,028,994,446,600 | 21.694444 | 80 | 0.550796 | false |
janusnic/ecommerce | ecommerce/extensions/analytics/utils.py | 1 | 2992 | from functools import wraps
import logging
from django.conf import settings
logger = logging.getLogger(__name__)
def is_segment_configured():
"""Returns a Boolean indicating if Segment has been configured for use."""
return bool(settings.SEGMENT_KEY)
def parse_tracking_context(user):
"""Extract user ... | agpl-3.0 | -5,083,399,345,460,941,000 | 34.619048 | 100 | 0.680816 | false |
partofthething/home-assistant | tests/components/homeassistant/triggers/test_numeric_state.py | 1 | 57730 | """The tests for numeric state automation."""
from datetime import timedelta
import logging
from unittest.mock import patch
import pytest
import voluptuous as vol
import homeassistant.components.automation as automation
from homeassistant.components.homeassistant.triggers import (
numeric_state as numeric_state_t... | mit | -3,673,311,556,926,365,000 | 31.072222 | 93 | 0.527403 | false |
ministryofjustice/cla_backend | cla_backend/apps/legalaid/management/commands/load_contactforresearchmethods.py | 1 | 1083 | from django.core.management import BaseCommand
from legalaid.models import ContactResearchMethod, PersonalDetails
import uuid
from cla_common.constants import RESEARCH_CONTACT_VIA
class Command(BaseCommand):
help = "Creates the contact for research methods default entities AND migrates data from contact_for_resea... | mit | -8,174,029,900,856,867,000 | 44.125 | 124 | 0.649123 | false |
natgry/python_training | test/test_del_group.py | 1 | 1265 | from model.group import Group
import random
def test_delete_group_by_id_with_db_check(app, db, check_ui):
if len(db.get_group_list()) == 0:
app.group.create(Group(name="test"))
old_groups = db.get_group_list()
group = random.choice(old_groups)
app.group.delete_group_by_id(group.id)
new_gro... | apache-2.0 | -1,836,625,386,796,996,400 | 31.435897 | 113 | 0.649802 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.