repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
akretion/connector-telephony | sms_send_picking/stock.py | 1 | 2006 | # -*- coding: utf-8 -*-
###############################################################################
#
# Module for Odoo
# Copyright (C) 2015 Akretion (http://www.akretion.com).
# @author Valentin CHEMIERE <valentin.chemiere@akretion.com>
#
# This program is free software: you can redistribute it and/or modi... | agpl-3.0 | 272,878,598,223,131,200 | 39.938776 | 79 | 0.566301 | false | 4.08554 | false | false | false |
richbrowne/f5-openstack-agent | f5_openstack_agent/lbaasv2/drivers/bigip/exceptions.py | 1 | 9554 | # Copyright 2014-2017 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | -3,482,872,929,365,936,600 | 18.184739 | 79 | 0.699184 | false | 3.99081 | false | false | false |
nimzco/Environment | Sublime/Packages/SublimeLinter/sublimelinter.py | 1 | 17803 | #
# sublimelinter.py
# Part of SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ryan Hileman and Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter3
# License: MIT
#
"""This module provides the SublimeLinter plugin class and supporting methods."""
import os
import... | mit | -3,652,584,059,017,097,700 | 30.454064 | 120 | 0.570409 | false | 4.276483 | false | false | false |
CroceRossaItaliana/jorvik | curriculum/migrations/0004_titoli_di_studio.py | 1 | 1245 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.db.models import Q
def forwards_func(apps, schema_editor):
# We get the model from the versioned app registry;
# if we directly import it, it'll be the wrong version
Titol... | gpl-3.0 | 8,394,015,802,754,562,000 | 27.295455 | 104 | 0.683534 | false | 3.074074 | false | false | false |
qalhata/Python-Scripts-Repo-on-Data-Science | DataXplore_Analysis1.py | 1 | 1998 | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 7 02:30:02 2017
@author: Shabaka
"""
# ''Load and View Data ''''''''''#
# Import pandas
import pandas as pd
import matplotlib.pyplot as plt
# Read the file into a DataFrame: df
# df = pd.read_csv('dob_job_application_filings_subset.csv')
df = pd.read_csv('fixations.... | gpl-3.0 | -8,901,603,669,352,795,000 | 18.398058 | 68 | 0.685686 | false | 3.004511 | false | false | false |
elysium001/zamboni | mkt/extensions/urls.py | 1 | 1314 | from django.conf.urls import include, patterns, url
from rest_framework.routers import SimpleRouter
from rest_framework_nested.routers import NestedSimpleRouter
from mkt.extensions.views import (ExtensionSearchView, ExtensionVersionViewSet,
ExtensionViewSet,
... | bsd-3-clause | -8,646,074,966,640,327,000 | 40.0625 | 79 | 0.685693 | false | 4.578397 | false | false | false |
JDRomano2/VenomKB | venomkb/archive/scripts/pubmed_getter.py | 1 | 1592 | from __future__ import print_function
import requests
import os, sys
import subprocess
import json
import ipdb
from Bio import Entrez
from Bio import Medline
class PubmedGetter(object):
def __init__(self, pmid):
self.authors = []
self.title = ""
self.journal = ""
self.pmid = pmid
... | gpl-2.0 | -2,125,392,152,851,790,000 | 25.55 | 88 | 0.56407 | false | 3.483589 | false | false | false |
FireCARES/firecares | firecares/firecares_core/autocomplete_light_registry.py | 1 | 3524 | import autocomplete_light.shortcuts as al
from .models import Address
from django.contrib.auth import get_user_model
from firecares.firestation.models import FireDepartment, FireStation
User = get_user_model()
al.register(Address,
# Just like in ModelAdmin.search_fields
search_fields=['addres... | mit | -6,010,454,478,254,770,000 | 39.505747 | 90 | 0.571793 | false | 4.768606 | false | true | false |
DDelon/youtube-dl | youtube_dl/extractor/trilulilu.py | 1 | 3171 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
int_or_none,
parse_iso8601,
)
class TriluliluIE(InfoExtractor):
_VALID_URL = r'https?://(?:(?:www|m)\.)?trilulilu\.ro/(?:[^/]+/)?(?P<id>[^/#\?]+)'
_TESTS = [{
'u... | unlicense | 7,362,688,175,005,452,000 | 34.233333 | 105 | 0.499527 | false | 3.550952 | false | false | false |
statguy/S3LogAnalyzer | s3log_action.py | 1 | 1456 | #!/usr/bin/python
import optparse
import sys
import boto3
import re
parser = optparse.OptionParser("usage: %prog action [options]")
(options, args) = parser.parse_args()
if len(args) == 0:
parser.error("Argument 'action' missing.")
action = args[0]
if action not in ['print', 'delete']:
sys.exit("Invalid act... | mit | -8,702,920,849,281,361,000 | 28.12 | 150 | 0.64217 | false | 3.466667 | false | false | false |
agiliq/django-socialnews | socialnews/news/tags.py | 1 | 1390 | from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from helpers import *
import bforms
import logging
def topic_tag(request, topic_slug, tag_text):
topic = get_topic(request, topic_slu... | bsd-3-clause | -2,981,644,611,231,243,000 | 41.5 | 97 | 0.68705 | false | 3.536896 | false | false | false |
Alir3z4/markwhat-online | markwhat/settings.py | 1 | 3621 | import os
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get('DJANGO_DEBUG', '')
TEMPLATE_DEBUG = DEBUG
PROJECT_DIR = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.path.pardir)
)
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY ... | gpl-3.0 | -1,049,941,099,468,647,000 | 27.976 | 95 | 0.649544 | false | 3.574531 | false | false | false |
PaulWay/spacewalk | client/tools/rhnpush/rhnpush_v2.py | 1 | 2227 | #
# Copyright (c) 2008--2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 | -7,438,303,637,663,702,000 | 30.814286 | 85 | 0.635833 | false | 3.749158 | false | false | false |
Comunitea/CMNT_004_15 | project-addons/crm_claim_summary_report/tests/test_print_summary_report.py | 1 | 2431 | ##############################################################################
#
# Copyright 2015 Vauxoo
# Author : Osval Reyes <osval@vauxoo.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the F... | agpl-3.0 | -4,219,598,960,024,283,000 | 39.516667 | 78 | 0.616619 | false | 4.065217 | false | false | false |
MahjongRepository/tenhou-python-bot | project/game/ai/defence/yaku_analyzer/tanyao.py | 1 | 1040 | from game.ai.defence.yaku_analyzer.yaku_analyzer import YakuAnalyzer
from mahjong.constants import HONOR_INDICES, TERMINAL_INDICES
class TanyaoAnalyzer(YakuAnalyzer):
id = "tanyao"
def __init__(self, enemy):
self.enemy = enemy
def serialize(self):
return {"id": self.id}
def is_yaku_... | mit | -4,906,773,690,600,495,000 | 29.588235 | 78 | 0.610577 | false | 3.260188 | false | false | false |
JoelBender/bacpypes | py25/bacpypes/bsll.py | 1 | 24129 | #!/usr/bin/python
"""
BACnet Streaming Link Layer Module
"""
import hashlib
from .errors import EncodingError, DecodingError
from .debugging import ModuleLogger, DebugContents, bacpypes_debugging
from .pdu import LocalStation, PCI, PDUData
# some debugging
_debug = 0
_log = ModuleLogger(globals())
# a dictionary ... | mit | 353,885,677,401,259,400 | 25.63245 | 83 | 0.635418 | false | 3.212061 | false | false | false |
bmazin/ARCONS-pipeline | headers/DisplayStackHeaders.py | 1 | 19365 | '''
Author: Alex Walter
Date: Feb 2, 2015
This file contains the keywords and descriptions for display stack files
including image stacks, centroid files, and photometry files. It also
has the read and write functions.
Description functions:
imageStackHeaderDescription()
imageStackDataDescription()
centro... | gpl-2.0 | -4,657,362,375,971,099,000 | 46.697044 | 165 | 0.670591 | false | 4.007657 | false | false | false |
dschien/energy-aggregator | ep_secure_importer/models.py | 1 | 7773 | import logging
from ep.models import Unit, DeviceParameter, SECURE_SERVER_NAME
from django.db import models
from ep_secure_importer.controllers.secure_client import SecureClient, secure_vendor_name
__author__ = 'mitchell'
logger = logging.getLogger(__name__)
class SecureDeviceParameterActions(models.Model):
@s... | mit | -5,960,594,199,169,722,000 | 49.474026 | 116 | 0.723659 | false | 3.713808 | false | false | false |
waheedrafiq/waheedrafiq.github.io | dproj/OpenCV/bRm/DistanceTest1.py | 1 | 1141 |
# distance check
import numpy as np
import cv2
import glob
# termination criteria
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
objp = np.zeros((6*7,3), np.float32)
objp[:,:2] = np.mgrid[0:7,0:6].T.reshape(-1,2)
# Ar... | mit | 7,941,714,605,130,406,000 | 24.931818 | 74 | 0.656442 | false | 2.810345 | false | false | false |
kcaa/kcaa | server/kcaa/kcsapi/fleet_test.py | 1 | 4379 | #!/usr/bin/env python
import pytest
import fleet
import jsonobject
class TestFleetList(object):
def pytest_funcarg__fleet_list(self):
fleet_list = fleet.FleetList()
fleet_list.fleets.append(fleet.Fleet(
id=1,
name=u'FleetName',
ship_ids=[1, 2, 3]))
re... | apache-2.0 | -3,658,374,729,077,891,600 | 31.437037 | 70 | 0.465631 | false | 3.378858 | true | false | false |
rolurq/wit | plugins/loader.py | 1 | 1413 | from PyQt5.QtCore import pyqtProperty, pyqtSlot, pyqtSignal, QObject, Q_CLASSINFO
from PyQt5.QtQml import QQmlListProperty
import os
HEADER_SIZE = 21
PNG_HEADER = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00'
JPG_HEADER = b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00`\x00`\x00\x00\xff'
class ImageDescriptor(Q... | mit | -5,112,681,433,371,473,000 | 26.705882 | 82 | 0.624204 | false | 3.348341 | false | false | false |
notmatthancock/neural_network | shared_data_set.py | 1 | 1384 | import theano
import numpy as np
class SharedDataSet(object):
def __init__(self, input, response=None):
"""
SharedDataSet objects are containers for holding information about sets for training mlps.
Input and output paths should point to a *.npy file
input: string or ndarray
... | mit | 4,079,450,942,028,790,300 | 43.645161 | 112 | 0.648121 | false | 4.011594 | false | false | false |
tomato42/ecpp-verifier | src/ecpp/snfs_check.py | 1 | 2726 | import math
def snfs_vulnerable(n, distance=2**64):
"""
Check if number `n` is further away from any exact power than `distance`.
Test to verify if the number is vulnerable to Special Number Field Sieve
attack on discrete logarithm problem.
Return True if it is vulnerable, False if it is not vul... | lgpl-2.1 | -6,403,188,241,657,532,000 | 38.507246 | 78 | 0.612619 | false | 3.111872 | false | false | false |
inguardians/zigbee_tools | LAYER_identifier.py | 1 | 4990 | #! /usr/bin/env python
###############################
# Imports taken from zbscapy
###############################
# Import logging to suppress Warning messages
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
try:
from scapy.all import *
except ImportError:
print 'This Requires Scapy To ... | bsd-3-clause | -2,939,846,826,082,629,000 | 30.582278 | 145 | 0.573547 | false | 3.472512 | false | false | false |
acutesoftware/worldbuild | scripts/minecraft/multi_level_castle.py | 1 | 3598 | # multi_level_castle.py
# Minecraft Server 1.11.2
# Seed: -7560993781265470572
import castle_maker
import clear_area
import time
def main():
"""
.................................................................
....[back tower].................................................
....................... | gpl-2.0 | 7,695,247,068,047,335,000 | 33.27619 | 167 | 0.490272 | false | 2.973554 | false | false | false |
zachary822/sysbio_wiki_wordcloud | sysbio_wiki_wordcloud/__init__.py | 1 | 3675 | import os
from datetime import datetime
from math import floor
from typing import Generator, Set, Union
from urllib.parse import urljoin
import matplotlib
import requests
from PIL import Image, ImageDraw, ImageFont
from bs4 import BeautifulSoup, SoupStrainer
matplotlib.use('Agg')
from wordcloud import STOPWORDS, Wor... | mit | 5,874,084,213,115,637,000 | 31.8125 | 119 | 0.681361 | false | 3.402778 | false | false | false |
NightscoutFoundation/dataxfer | oh_data_source/views.py | 1 | 5279 | import logging
import os
import arrow
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import login, logout
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect, render
from django.views.decorators.http import require_http_methods
... | gpl-3.0 | 3,813,933,424,275,744,000 | 32.201258 | 100 | 0.618488 | false | 3.676184 | false | false | false |
krzychb/rtd-test-bed | tools/cmake/convert_to_cmake.py | 1 | 7624 | #!/usr/bin/env python
#
# Command line tool to convert simple ESP-IDF Makefile & component.mk files to
# CMakeLists.txt files
#
import argparse
import subprocess
import re
import os.path
import glob
debug = False
def get_make_variables(path, makefile="Makefile", expected_failure=False, variables={}):
"""
Giv... | apache-2.0 | 8,766,846,474,711,538,000 | 37.505051 | 151 | 0.604669 | false | 3.854398 | false | false | false |
DavidWhittingham/agstools | agstools/arcpyext/_copy.py | 1 | 1390 | from __future__ import print_function, unicode_literals, absolute_import
from agstools._helpers import create_argument_groups, execute_args, format_output_path
from ._helpers import open_map_document
def create_parser_save_copy(parser):
parser_copy = parser.add_parser("copy", add_help = False,
help = "Sav... | bsd-3-clause | 927,110,228,330,942,100 | 37.638889 | 117 | 0.658273 | false | 3.365617 | false | false | false |
jiangzhixiao/odoo | openerp/fields.py | 1 | 76059 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-2014 OpenERP (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | agpl-3.0 | 976,592,093,804,428,300 | 39.052133 | 114 | 0.585927 | false | 4.515495 | false | false | false |
Zanzibar82/streamondemand.test | servers_sports/liveall.py | 1 | 1157 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# streamondemand - XBMC Plugin
# Conector para liveall
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core impo... | gpl-3.0 | 7,353,125,819,645,950,000 | 36.322581 | 175 | 0.553155 | false | 3.028796 | false | false | false |
bminchew/uavsar_webpy | uavsar_insar_download.py | 1 | 9018 | #!/usr/bin/env python
"""
uavsar_insar_download.py : Download UAVSAR InSAR data from ASF through the password protection
Usage:
.. code-block:: bash
$ uavsar_insar_download.py url [options]
Parameter
---------
url : Any single URL corresponding to the desired UAVSAR data
Options
-------
para : da... | gpl-3.0 | -1,314,965,430,845,054,200 | 32.032967 | 171 | 0.545021 | false | 3.528169 | false | false | false |
arenadata/ambari | ambari-server/src/main/resources/stacks/ADH/1.0/services/HDFS/package/scripts/hdfs_snamenode.py | 1 | 2409 | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | apache-2.0 | -2,547,317,572,448,473,600 | 34.426471 | 74 | 0.706517 | false | 3.87299 | false | false | false |
salkinium/bachelor | experiment_control/commands/temperature_reached.py | 1 | 2162 | # -*- coding: utf-8 -*-
# Copyright (c) 2014, Niklas Hauser
# All rights reserved.
#
# The file is part of my bachelor thesis and is released under the 3-clause BSD
# license. See the file `LICENSE` for the full license governing this code.
# -----------------------------------------------------------------------------... | bsd-2-clause | 4,638,724,222,358,263,000 | 35.644068 | 112 | 0.609158 | false | 4.619658 | false | false | false |
moumoutte/django-perf-rec | tests/test_db.py | 1 | 2275 | # -*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import mock
from django.test import SimpleTestCase, TestCase
from django_perf_rec.db import AllDBRecorder, DBOp, DBRecorder
from .utils import run_query
class DBOpTests(SimpleTestCase):
def test_create(se... | mit | 270,893,002,596,449,820 | 26.083333 | 82 | 0.549011 | false | 3.772803 | true | false | false |
getnikola/nikola | nikola/plugins/compile/rest/doc.py | 1 | 4586 | # -*- coding: utf-8 -*-
# Copyright © 2012-2021 Roberto Alsina and others.
# 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 t... | mit | -269,171,982,548,911,260 | 33.734848 | 105 | 0.641439 | false | 3.798674 | false | false | false |
intellimath/pyaxon | lib/axon/test/test_element.py | 1 | 2996 | # coding: utf-8
from __future__ import unicode_literals
import unittest
from axon import *
class ElementTestCase(unittest.TestCase):
def setUp(self):
pass
#
def test_empty_element(self):
v = element('aaa', {}, [])
self.assertEqual(v.name, 'aaa')
self.assertEqual(v.mapping,... | mit | -155,778,918,004,434,430 | 27.264151 | 84 | 0.476636 | false | 3.005015 | true | false | false |
Flurbos/Flurbo | contrib/devtools/fix-copyright-headers.py | 1 | 1343 | #!/usr/bin/env python
'''
Run this script to update all the copyright headers of files
that were changed this year.
For example:
// Copyright (c) 2009-2012 The Flurbo Core developers
it will change it to
// Copyright (c) 2009-2015 The Flurbo Core developers
'''
import os
import time
import re
year = time.gmtime()[... | mit | 805,691,235,437,696,600 | 28.195652 | 81 | 0.614296 | false | 2.938731 | false | false | false |
taylor-oconnell/PyFBA | PyFBA/model/model.py | 1 | 21702 | from __future__ import print_function
import PyFBA
import copy
import sys
from os.path import basename
class Model:
"""
A model is a structured collection of reactions, compounds, and functional roles.
A model will provide methods for extracting its information and creating SBML-formatted files.
:iva... | mit | 3,836,442,681,381,935,000 | 36.2247 | 98 | 0.490646 | false | 4.351714 | false | false | false |
dukov/fuel-external-git | fuel_external_git/handlers.py | 1 | 4890 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | 5,221,824,239,276,511,000 | 29.754717 | 78 | 0.611656 | false | 3.847364 | false | false | false |
dset0x/invenio-checker | invenio_checker/checkerext/reporters/workflows_reporter.py | 1 | 1932 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 CERN.
#
# Invenio 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... | gpl-2.0 | 5,823,743,035,630,428,000 | 36.882353 | 76 | 0.67236 | false | 4.246154 | false | false | false |
seelmann/customer-management-service | customer-service-client/create-customer.py | 1 | 1766 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
import json
import urllib.request
def __input(text, default):
return input('%s [%s]: ' % (text, default)) or default
print()
print('Enter HTTP connection params:')
url = __input('REST service URL', 'http://customer-service.blue.s12n.de/customers')
... | apache-2.0 | 2,428,502,292,410,393,000 | 29.964912 | 100 | 0.622096 | false | 3.374761 | false | false | false |
yonglehou/apscheduler | apscheduler/triggers/cron/__init__.py | 1 | 4973 | from datetime import date, datetime
from apscheduler.triggers.cron.fields import *
from apscheduler.util import datetime_ceil, convert_to_datetime, iteritems
class CronTrigger(object):
FIELD_NAMES = ('year', 'month', 'day', 'week', 'day_of_week', 'hour', 'minute', 'second')
FIELDS_MAP = {
'year': Bas... | mit | -3,165,673,206,372,024,000 | 35.036232 | 107 | 0.512769 | false | 4.140716 | false | false | false |
esplinr/foodcheck | wsgi/foodcheck_proj/foodcheck_app/management/commands/import_city_data.py | 1 | 7601 | '''
Custom django admin command to import data from CSV file into database
'''
# Copyright (C) 2013 Timothy James Austen, Eileen Qiuhua Lin,
# Richard Esplin <richard-oss@esplins.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | agpl-3.0 | 8,932,072,381,804,260,000 | 46.50625 | 94 | 0.533219 | false | 4.365882 | false | false | false |
dmnfarrell/peat | PEATDB/BusyBar.py | 1 | 5598 | #!/bin/env python
#Busybar widget
"""
Rick Lawson
Heavily borrowed from ProgressBar.py which I got off the net but can't remember where
Feel free to add credits.
Comments by Stewart Midwinter:
I added a Quit button so you can stop the app.
I also set up a timer so that the BusyBar stops after a certain period.
Nex... | mit | -1,424,997,044,014,625,500 | 34.656051 | 108 | 0.608967 | false | 3.717131 | false | false | false |
lin-yue/WeChatConference | wechat/migrations/0010_auto_20161228_1248.py | 1 | 1259 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-12-28 04:48
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wechat', '0009_auto_20161223_1920'),
]
operations = [
migrations.RenameModel(
... | gpl-3.0 | -5,609,816,499,607,016,000 | 28.27907 | 55 | 0.579031 | false | 4.087662 | false | false | false |
coyotevz/nas | nas/api/bank.py | 1 | 2036 | # -*- coding: utf-8 -*-
from flask import abort
from marshmallow import Schema, fields, validates, ValidationError
from webargs.flaskparser import use_args
from ..utils import RestBlueprint, update_model
from ..models import Bank, BankAccount, db
from .bank_account import BankAccountSchema
bank_api = RestBlueprint(... | mit | 5,326,526,911,892,790,000 | 26.146667 | 91 | 0.663065 | false | 3.18125 | false | false | false |
ulope/guardhouse | guardhouse/main/migrations/0003_auto__add_field_site_belongs_to.py | 1 | 5983 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing M2M table for field sites on 'Account'
db.delete_table('main_account_sites')
# Adding ... | bsd-3-clause | -3,795,259,583,890,490,000 | 64.747253 | 183 | 0.559753 | false | 3.716149 | false | false | false |
yedurag/Type-2-Diabetes-SideEffectsAnalysis | Asapatient Topic Modeling/askapatientLDA.py | 1 | 12581 | #Ask A patient LDA Engine
#Author Yedurag Babu yzb0005
#Date 10/26/2015
from pattern.en import ngrams
from pattern.vector import stem, PORTER, LEMMA
from nltk.corpus import stopwords
from pattern.en import parsetree
import re
import collections
import numpy as np
import lda
import time
import threading
import mys... | gpl-2.0 | 6,336,942,957,215,623,000 | 42.98951 | 167 | 0.589222 | false | 3.059582 | false | false | false |
jamestwebber/scipy | scipy/optimize/_lsq/least_squares.py | 1 | 38242 | """Generic interface for least-squares minimization."""
from __future__ import division, print_function, absolute_import
from warnings import warn
import numpy as np
from numpy.linalg import norm
from scipy.sparse import issparse, csr_matrix
from scipy.sparse.linalg import LinearOperator
from scipy.optimize import _... | bsd-3-clause | 7,295,880,603,904,443,000 | 39.682979 | 80 | 0.607657 | false | 3.729108 | false | false | false |
fjruizruano/ngs-protocols | rm_join_out.py | 1 | 1478 | #! /usr/bin/python
import sys
try:
inp = sys.argv[1]
files = open(inp)
except:
files = open("lista_out.txt")
# process RM *.out file
dict_count = {}
dict_diver = {}
header = """ SW perc perc perc query position in query matching repe... | gpl-3.0 | 784,566,915,659,601,500 | 28.56 | 155 | 0.437754 | false | 4.049315 | false | false | false |
richardkiss/pycoin | pycoin/vm/ConditionalStack.py | 1 | 1430 |
class ConditionalStack(object):
def __init__(self, error_f):
self.true_count = 0
self.false_count = 0
self.error_f = error_f
def all_if_true(self):
return self.false_count == 0
def OP_IF(self, the_bool, reverse_bool=False):
if self.false_count > 0:
self... | mit | 7,206,833,375,451,911,000 | 28.183673 | 85 | 0.51049 | false | 3.638677 | false | false | false |
races1986/SafeLanguage | CEM/copyright_clean.py | 1 | 5992 | # -*- coding: utf-8 -*-
"""
"""
__version__ = '$Id: 51e0909e61b550a9cec8e27c364c596df6e90a13 $'
#
# (C) Francesco Cosoleto, 2006
#
# Distributed under the terms of the MIT license.
#
import sys
import httplib, socket, re, time
import wikipedia as pywikibot
import config, catlib, pagegenerators, query
from urllib i... | epl-1.0 | 9,003,378,699,416,804,000 | 29.438776 | 85 | 0.503688 | false | 3.568182 | false | false | false |
lanceman2/quickplot | CORNET-3D-Backend/web/Python/CORNET_3D_Webserver.py | 1 | 24900 | #!/usr/bin/env python
##############################################
# LIBRARIES IMPORT
##############################################
import sys
# 'Flask' libraries for web socket programming with the client/web-browser
from flask import Flask, render_template, request
from flask.ext.socketio import SocketIO, emit
... | gpl-3.0 | -7,643,509,394,843,575,000 | 37.845554 | 255 | 0.59257 | false | 4.296066 | false | false | false |
treyhunner/databundles | databundles/sourcesupport/us2010census.py | 1 | 12275 | '''
Created on Aug 19, 2012
@author: eric
'''
from databundles.sourcesupport.uscensus import UsCensusBundle
class Us2010CensusBundle(UsCensusBundle):
'''
Bundle code for US 2000 Census, Summary File 1
'''
def __init__(self,directory=None):
self.super_ = super(Us2010CensusBundle, self)
... | bsd-3-clause | 7,157,724,358,172,559,000 | 40.194631 | 110 | 0.47943 | false | 4.639078 | false | false | false |
appacitive/pyappacitive | pyappacitive/appacitive_email.py | 1 | 1987 | __author__ = 'sathley'
from .utilities import http, urlfactory
from .utilities import customjson
import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
class AppacitiveEmail(object):
def __init__(self):
pass
@staticmethod
def send_raw_email(to, subject, bod... | mit | -7,276,482,336,591,043,000 | 30.046875 | 175 | 0.584801 | false | 3.791985 | false | false | false |
CDSherrill/psi4 | psi4/driver/procrouting/proc.py | 1 | 182315 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2019 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 | 3,270,957,768,592,411,000 | 36.629309 | 226 | 0.583587 | false | 3.209867 | false | false | false |
rssalessio/PythonVRFT | examples/example1.py | 1 | 2641 | # Copyright (c) [2021] Alessio Russo [alessior@kth.se]. All rights reserved.
# This file is part of PythonVRFT.
# PythonVRFT is free software: you can redistribute it and/or modify
# it under the terms of the MIT License. You should have received a copy of
# the MIT License along with PythonVRFT.
# If not, see <https:/... | gpl-3.0 | 4,118,929,246,523,562,500 | 25.148515 | 94 | 0.673608 | false | 2.633101 | false | false | false |
rovere/productions | MinBias_13TeV_cfi_py_GEN_SIM.py | 1 | 5677 | # Auto generated configuration file
# using:
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: MinBias_13TeV_cfi.py --conditions auto:startup -n 1000 --eventcontent FEVTDEBUG --relval 9000,100 -s GEN,SIM --datatier GEN-SIM --no_exec
i... | gpl-3.0 | 2,645,883,833,307,275,300 | 44.782258 | 166 | 0.690858 | false | 3.353219 | true | false | false |
mbrandis/dosage | dosagelib/plugins/p.py | 1 | 9939 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
from re import compile, escape
from ..scraper import _BasicScraper, _ParserScraper
from ..helpers import bounceStarter, queryNamer, indirectStarter
from ..util import tagre
class ... | mit | -8,165,919,823,111,151,000 | 37.976471 | 147 | 0.602274 | false | 2.940533 | false | false | false |
PetePriority/home-assistant | homeassistant/components/homekit/type_locks.py | 1 | 2749 | """Class to hold all lock accessories."""
import logging
from pyhap.const import CATEGORY_DOOR_LOCK
from homeassistant.components.lock import (
ATTR_ENTITY_ID, DOMAIN, STATE_LOCKED, STATE_UNLOCKED)
from homeassistant.const import ATTR_CODE, STATE_UNKNOWN
from . import TYPES
from .accessories import HomeAccessory... | apache-2.0 | 674,897,193,309,765,500 | 37.180556 | 77 | 0.62641 | false | 3.584094 | false | false | false |
JustinSGray/pyCycle | pycycle/elements/test/test_duct.py | 1 | 7017 | """ Tests the duct component. """
import unittest
import os
import numpy as np
from openmdao.api import Problem, Group
from openmdao.utils.assert_utils import assert_near_equal, assert_check_partials
from pycycle.mp_cycle import Cycle
from pycycle.elements.duct import Duct
from pycycle.elements.flow_start import Fl... | apache-2.0 | 7,967,968,866,476,160,000 | 34.619289 | 103 | 0.566054 | false | 2.888843 | true | false | false |
sam-m888/gprime | gprime/plugins/textreport/indivcomplete.py | 1 | 50048 | #
# gPrime - A web-based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2012 Brian G. Matherly
# Copyright (C) 2009 Nick Hall
# Copyright (C) 2009 Benny Malengier
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011 Tim G L Lyons
# Copyright (C) 2012 Ma... | gpl-2.0 | -6,826,233,834,222,132,000 | 38.657686 | 79 | 0.551191 | false | 3.818126 | false | false | false |
magul/pywikibot-core | pywikibot/date.py | 1 | 125095 | # -*- coding: utf-8 -*-
"""Date data and manipulation module."""
#
# (C) Rob W.W. Hooft, 2003
# (C) Daniel Herding, 2004
# (C) Ævar Arnfjörð Bjarmason, 2004
# (C) Andre Engels, 2004-2005
# (C) Yuri Astrakhan, 2005-2006 (<Firstname><Lastname>@gmail.com)
# (years/decades/centuries/millenniums str <=> int conversion... | mit | 4,285,810,541,653,654,500 | 47.739861 | 89 | 0.4971 | false | 2.489569 | false | false | false |
AsinaHawk/3-UTR-Predict | gtfparse.py | 1 | 4815 | """
Written by Erdong Hu at the Postlethwait lab of the University of Oregon
Last updated August 16, 2015
"""
import re
import operator
import collections
import sys
import timeit
###Note###
# There is a large chunk of commented out code that is remnant from old version
"""Reads in a GTF file and organizes it by tr... | gpl-2.0 | 8,970,037,510,067,933,000 | 39.125 | 122 | 0.556386 | false | 3.548268 | false | false | false |
OCM-Lab-PUC/switch-chile | switch_mod/gen_tech.py | 1 | 21101 | # Copyright 2015 The Switch Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
"""
Defines model components to describe generation technologies for the
SWITCH-Pyomo model.
SYNOPSIS
>>> from switch_mod.utilities import define_AbstractModel
>>> model = define_Abs... | apache-2.0 | -6,241,112,405,971,737,000 | 46.417978 | 93 | 0.723236 | false | 3.833757 | false | false | false |
AltCtrlSupr/acs-nginx-api | resources/base.py | 1 | 1717 | # -*- coding: utf-8 -*-
import json
from flask import Flask, Blueprint, current_app, jsonify, url_for, redirect, request, Response
from cerberus import Validator
from database import mongo
from flask.ext.restful import Api, Resource
from bson.json_util import loads, dumps
from encoders.json_encoder import JSONEncoder
... | gpl-3.0 | 5,329,869,178,340,275,000 | 28.101695 | 94 | 0.621433 | false | 3.920091 | false | false | false |
ActiveState/code | recipes/Python/577300_Maclaurinsserieslnx/recipe-577300.py | 1 | 1488 | #On the name of ALLAH and may the blessing and peace of Allah
#be upon the Messenger of Allah Mohamed Salla Allahu Aliahi Wassalam.
#Author : Fouad Teniou
#Date : 10/07/10
#version :2.6
"""
maclaurin_ln is a function to compute ln(x) using maclaurin series
and the interval of convergence is -1 < x < +1
ln(y) = ln(1+x... | mit | -2,715,176,763,953,944,600 | 26.054545 | 75 | 0.571909 | false | 2.823529 | false | false | false |
krrr/Hazama | hazama/ui/customwidgets.py | 1 | 14380 | import logging
from PySide.QtCore import *
from PySide.QtGui import *
from hazama.ui import setStdEditMenuIcons, makeQIcon, fixWidgetSizeOnHiDpi
from hazama.ui.customobjects import TextFormatter, NTextDocument
class QLineEditWithMenuIcon(QLineEdit):
"""A QLineEdit with system theme icons in context-menu"""
de... | gpl-2.0 | -1,036,634,042,495,636,600 | 37.749326 | 97 | 0.593628 | false | 4.028019 | false | false | false |
kefo/moto | moto/iam/models.py | 1 | 34535 | from __future__ import unicode_literals
import base64
from datetime import datetime
import pytz
from moto.core import BaseBackend, BaseModel
from moto.core.utils import iso_8601_datetime_without_milliseconds
from .exceptions import IAMNotFoundException, IAMConflictException, IAMReportNotPresentException
from .utils i... | apache-2.0 | -7,275,665,902,548,512,000 | 34.529835 | 300 | 0.564123 | false | 4.115719 | false | false | false |
emilydolson/forestcat | pyrobot/tools/joystick.py | 2 | 6732 | import Tkinter
class Joystick(Tkinter.Toplevel):
def __init__(self, parent = None, hasZ = 0):
Tkinter.Toplevel.__init__(self, parent)
self.debug = 0
self.wm_title('Joystick')
self.protocol('WM_DELETE_WINDOW',self.destroy)
self.springBack = 0
self.hasZ = hasZ
self.mBar = Tk... | agpl-3.0 | 4,246,575,622,117,269,500 | 37.913295 | 127 | 0.573975 | false | 3.359281 | false | false | false |
jshufelt/privacyidea | tests/test_lib_tokenclass.py | 1 | 25026 | """
This test file tests the lib.tokenclass
The lib.tokenclass depends on the DB model and lib.user
"""
PWFILE = "tests/testdata/passwords"
from .base import MyTestCase
from privacyidea.lib.resolver import (save_resolver)
from privacyidea.lib.realm import (set_realm)
from privacyidea.lib.user import (User)
from priva... | agpl-3.0 | -140,930,115,520,080,020 | 40.502488 | 84 | 0.581196 | false | 3.619089 | true | false | false |
python-hyper/brotlipy | src/brotlicffi/_build.py | 1 | 10558 | # -*- coding: utf-8 -*-
import os
import sys
from cffi import FFI
ffi = FFI()
USE_SHARED_BROTLI = os.environ.get("USE_SHARED_BROTLI")
if USE_SHARED_BROTLI != "1":
libraries = ['libbrotli']
else:
libraries = ['brotlienc', 'brotlidec']
if 'win32' not in str(sys.platform).lower():
libraries.append('stdc++')... | mit | -4,618,881,608,315,846,000 | 44.904348 | 79 | 0.621519 | false | 4.161608 | false | false | false |
taedori81/shoop | shoop/xtheme/editing.py | 1 | 3323 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.contrib.auth.models import AnonymousUser
from django.contrib.sta... | agpl-3.0 | 1,181,672,729,452,930,800 | 31.578431 | 92 | 0.689738 | false | 3.806415 | false | false | false |
devilry/trix2 | setup.py | 1 | 1238 | from setuptools import setup, find_packages
with open('trix/version.py') as f:
code = compile(f.read(), "trix/version.py", 'exec')
exec(code)
setup(
name='trix',
description='Next generation Trix. Detailed task control and statistics app for better'
' learning outcome.',
version=__version__, ... | bsd-3-clause | -8,959,927,005,065,586,000 | 30.74359 | 91 | 0.602585 | false | 3.429363 | false | false | false |
PostRockFTW/ExcitingBike | src/runner.py | 1 | 2723 | import sys
import pygame
from excitingbike.screens.main_menu_screen import MainMenuScreen
from excitingbike.controller.controller import Controller
from excitingbike.locals import *
# Runs the main loop of the program
class Runner(object):
def __init__(self, initial_screen):
self.clock = pygame.time.... | gpl-2.0 | -5,135,848,873,343,243,000 | 29.255556 | 128 | 0.484392 | false | 4.638842 | false | false | false |
piranha/piu | piu/views.py | 1 | 5282 | import os
import os.path as op
import json
import re
import sys
from hashlib import sha1
from datetime import datetime as dt
from pygments import lexers
from bottle import route, request, redirect, static_file, response, abort
from bottle import jinja2_template as template
import markdown
import bleach
from piu impor... | isc | -5,467,364,528,379,414,000 | 25.812183 | 102 | 0.590117 | false | 3.412145 | false | false | false |
JavierIH/octosnake | python/octosnake.py | 1 | 1312 | import time
import math
from scipy import signal
class Oscillator(object):
def __init__(self, signal=None, period=2000, amplitude=50, phase=0, offset=0):
self.period = period
self.amplitude = amplitude
self.phase = phase
self.offset = offset
self.stop = False
self... | gpl-2.0 | -3,530,837,034,471,165,400 | 25.24 | 139 | 0.631098 | false | 3.381443 | false | false | false |
HaydenFaulkner/bottom-up-attention | lib/datasets/vg_eval.py | 1 | 4153 | # --------------------------------------------------------
# Fast/er R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Bharath Hariharan
# --------------------------------------------------------
import xml.etree.ElementTree as ET
import os
import cPickle
import numpy as np
from voc_eval im... | mit | 1,140,706,026,792,788,600 | 32.224 | 111 | 0.488322 | false | 3.564807 | false | false | false |
mdiluz/morcbot | lights.py | 1 | 3229 | #! /usr/bin/python
import sys
import time
import telepot
import logging
from phue import Bridge
from telepot.namedtuple import InlineKeyboardMarkup, InlineKeyboardButton
# Connection to phillips
def connect( ip ):
global phueBridge
phueBridge = Bridge(ip)
# Keep track of different chats
current_light_cmd_chats = {}... | unlicense | -5,611,844,360,076,070,000 | 34.483516 | 107 | 0.708888 | false | 3.072312 | false | false | false |
tylerbutler/xkcd2 | ptvs_virtualenv_proxy.py | 1 | 4022 | # ############################################################################
#
# Copyright (c) Microsoft Corporation.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of this distribution. If
# you ca... | mit | 4,310,518,585,247,203,000 | 33.067797 | 96 | 0.60199 | false | 3.746505 | false | false | false |
TuSimple/simpledet | utils/callback.py | 1 | 4391 | import time
import logging
import mxnet as mx
class Speedometer(object):
def __init__(self, batch_size, total_iter, frequent=50):
self.batch_size = batch_size
self.total_iter = total_iter
self.frequent = frequent
self.init = False
self.tic = 0
self.last_count = 0
... | apache-2.0 | 8,099,594,985,808,489,000 | 40.819048 | 176 | 0.501253 | false | 3.602133 | false | false | false |
totem/cluster-orchestrator | orchestrator/util.py | 1 | 3744 | """
General utility methods
"""
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import errno
from functools import wraps
import os
from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, ope... | mit | 4,653,657,531,263,812,000 | 28.714286 | 78 | 0.601496 | false | 4.54921 | false | false | false |
kigawas/coheoka | coheoka/assessment.py | 1 | 2509 | # -*- coding: utf-8 -*-
"""
Assess model performance
"""
from __future__ import print_function, division
import os
from nltk import sent_tokenize
from utils import replace_sents, pk_load
from evaluator import Evaluator
from coherence_probability import ProbabilityVector
class Assessment(object):
def __init__(se... | apache-2.0 | -6,709,469,233,111,105,000 | 28.517647 | 75 | 0.518932 | false | 3.599713 | false | false | false |
Telestream/telestream-cloud-python-sdk | telestream_cloud_qc_sdk/telestream_cloud_qc/models/audio_ppm_level_test.py | 1 | 9650 | # coding: utf-8
"""
Qc API
Qc API # noqa: E501
The version of the OpenAPI document: 3.0.0
Contact: cloudsupport@telestream.net
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from telestream_cloud_qc.configuration import Configuration
class... | mit | 3,256,024,933,206,955,500 | 28.331307 | 246 | 0.587565 | false | 3.636021 | true | false | false |
jcollie/ceph_exporter | ceph_exporter/ceph/commands/ceph_pg_dump.py | 1 | 11713 | # -*- mode: python; coding: utf-8 -*-
# Copyright © 2016 by Jeffrey C. Ollie
#
# This file is part of ceph_exporter.
#
# ceph_exporter 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
#... | gpl-3.0 | 7,387,347,671,078,067,000 | 44.046154 | 90 | 0.443648 | false | 4.360387 | false | false | false |
jonlabelle/SublimeHtmlEncoder | html_encoder.py | 1 | 2770 | # -*- coding: utf-8 -*-
import sys
import sublime
import sublime_plugin
PY_MAJOR_VER = sys.version_info[0]
PY_MINOR_VER = sys.version_info[1]
def selections(view, default_to_all=True):
regions = [r for r in view.sel() if not r.empty()]
if not regions and default_to_all:
regions = [sublime.Region(0, ... | mit | -7,682,793,793,098,971,000 | 29.777778 | 63 | 0.597834 | false | 4.067548 | false | false | false |
hypebeast/etapi | etapi/settings.py | 1 | 1478 | # -*- coding: utf-8 -*-
import os
os_env = os.environ
class Config(object):
SECRET_KEY = os_env.get('ETAPI_SECRET', 'secret-key') # TODO: Change me
APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory
PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
BCRYPT_LOG_ROUNDS... | bsd-3-clause | -3,609,062,129,203,086,300 | 31.130435 | 76 | 0.644114 | false | 3.164882 | true | false | false |
liweitianux/chandra-acis-analysis | bin/calc_pb_flux.py | 1 | 1627 | #!/usr/bin/env python3
#
# Copyright (c) 2017 Weitian LI <liweitianux@live.com>
# MIT license
"""
Calculate the particle background flux (e.g., 9.5-12.0 keV) of the spectra.
flux = counts / exposure / area
where 'counts' is the total photon counts within the specified energy range;
'area' is the value of the ``BACKSC... | mit | 7,315,432,524,043,394,000 | 33.617021 | 79 | 0.577136 | false | 3.864608 | false | false | false |
googleapis/nodejs-datacatalog | owlbot.py | 1 | 1756 | # Copyright 2018 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, s... | apache-2.0 | -2,665,185,563,280,453,000 | 52.212121 | 115 | 0.788155 | false | 3.902222 | false | false | false |
awesto/django-shop | shop/views/checkout.py | 1 | 7082 | from django.core.exceptions import ImproperlyConfigured
from django.db import transaction
from django.utils.module_loading import import_string
from django.utils.translation import gettext_lazy as _
from rest_framework import status
from rest_framework.decorators import action
from rest_framework.exceptions import Vali... | bsd-3-clause | -5,941,295,204,588,675,000 | 48.873239 | 107 | 0.639791 | false | 4.507957 | false | false | false |
rixx/tempus | tempus/timetracking/models.py | 1 | 4603 | import datetime
import random
import os
import yaml
import pytz
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.template.defaultfilters import slugify
class BaseTimetracking(models.Model):
name = models.CharField(max_length=200)
slug = mo... | mit | 4,963,372,143,780,198,000 | 30.312925 | 106 | 0.618075 | false | 3.971527 | false | false | false |
docmanny/RecBlast | RecBlast/RBC.py | 1 | 33853 | import bz2
import hashlib
import sqlite3
from functools import partial, reduce
from copy import deepcopy
from pathlib import Path
from datetime import datetime
import dill as pickle
from pickle import UnpicklingError
from Bio import SeqIO, SeqFeature
from Bio.SeqRecord import SeqRecord
from Bio.Blast.Record import Bla... | mit | -2,063,835,458,198,769,200 | 50.292424 | 120 | 0.447759 | false | 4.827867 | false | false | false |
lnls-sirius/dev-packages | siriuspy/siriuspy/clientconfigdb/types/as_ap_params.py | 1 | 10371 | """Parameters of the IOCs of the AP discipline."""
from copy import deepcopy as _dcopy
_off = 0
_on = 1
def get_dict():
"""Return configuration type dictionary."""
module_name = __name__.split('.')[-1]
_dict = {
'config_type_name': module_name,
'value': _dcopy(_template_dict),
'ch... | gpl-3.0 | -6,726,833,105,388,967,000 | 45.093333 | 71 | 0.587407 | false | 1.923048 | false | false | false |
pypa/warehouse | warehouse/migrations/versions/fb3278418206_ensure_file_md5_blake2_256__digest_are_.py | 1 | 1345 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 | 4,190,606,998,459,177,000 | 25.9 | 78 | 0.689963 | false | 3.484456 | false | false | false |
rbuffat/pyidf | tests/test_branch.py | 1 | 2792 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.node import Branch
log = logging.getLogger(__name__)
class TestBranch(unittest.TestCase):
def setUp(self):
self.fd, self.path = tempfile.mkstemp()
def tearDown... | apache-2.0 | -682,962,136,595,463,000 | 39.478261 | 100 | 0.663682 | false | 3.400731 | false | false | false |
dvopsway/icilambda | add_checks.py | 1 | 2122 | import requests
import json
import boto3
import collections
from properties import *
from icinga import *
ec = boto3.client('ec2')
def lambda_handler():
reservations = ec.describe_instances(
Filters=[
{'Name': 'tag-key', 'Values': ['monitor', 'Monitor']},
]
).get(
'Reserva... | gpl-3.0 | 5,568,911,580,640,840,000 | 34.366667 | 96 | 0.483506 | false | 4.457983 | false | false | false |
jcherqui/searx | utils/fetch_firefox_version.py | 1 | 2074 | #!/usr/bin/env python
# set path
from sys import path
from os.path import realpath, dirname, join
path.append(realpath(dirname(realpath(__file__)) + '/../'))
#
import json
import requests
import re
from distutils.version import LooseVersion, StrictVersion
from lxml import html
from searx.url_utils import urlparse, ur... | agpl-3.0 | -3,261,122,672,838,650,000 | 27.410959 | 89 | 0.627772 | false | 3.345161 | false | false | false |
wesleybeckner/afm-miner | afmMiner/version.py | 1 | 2598 | from os.path import join as pjoin
# Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z"
_version_major = 0
_version_minor = 1
_version_micro = '' # use '' for first of series, number for 1 and above
_version_extra = 'dev'
# _version_extra = '' # Uncomment this for full releases
# Construct fu... | mit | -3,068,306,602,326,729,700 | 40.238095 | 397 | 0.71863 | false | 3.554036 | false | false | false |
Room-10/Q-ball | qball/tools/mean.py | 1 | 1721 |
import numpy as np
import logging
def manifold_mean(expmap, vecs, weights, max_iter=200):
""" Calculate arithmetic (geodesic) means of points.
Args:
expmap : dictionary with entries 'inv' and 'map' denoting functions
inv(location, pfrom, vto) and map(location, vfrom) that project
... | gpl-3.0 | 6,292,446,405,683,425,000 | 34.142857 | 80 | 0.574085 | false | 3.476768 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.