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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mosajjal/mitmproxy | mitmproxy/connections.py | 1 | 8435 | import time
import os
from mitmproxy import stateobject
from mitmproxy import certs
from mitmproxy.net import tcp
from mitmproxy.utils import strutils
class ClientConnection(tcp.BaseHandler, stateobject.StateObject):
"""
A client connection
Attributes:
address: Remote address
ssl_estab... | mit | 109,459,879,326,476,290 | 31.072243 | 112 | 0.59182 | false | 4.022413 | false | false | false |
fatadama/mavlink-vscl | MAVProxy-master/modules/mavproxy_CUAV/camera.py | 1 | 29321 | #!/usr/bin/env python
'''camera control for ptgrey chameleon camera'''
import time, threading, sys, os, numpy, Queue, errno, cPickle, signal, struct, fcntl, select, cStringIO
import cv2.cv as cv
# use the camera code from the cuav repo (see githib.com/tridge)
sys.path.insert(0, os.path.join(os.path.dirname(os.path.re... | lgpl-3.0 | -3,917,443,366,669,114,000 | 37.835762 | 140 | 0.573753 | false | 3.650068 | false | false | false |
FAForever/client | src/util/theme.py | 1 | 12917 | from PyQt5 import QtGui, QtWidgets, QtCore, QtMultimedia, uic
from semantic_version import Version
import os
import logging
logger = logging.getLogger(__name__)
class Theme():
"""
Represents a single FAF client theme.
"""
def __init__(self, themedir, name):
"""
A 'None' themedir repre... | gpl-3.0 | -2,073,837,444,401,225,700 | 36.33237 | 135 | 0.589378 | false | 4.225384 | true | false | false |
darnould/integrations-core | twemproxy/test_twemproxy.py | 1 | 1590 | # stdlib
from nose.plugins.attrib import attr
# 3p
# project
from tests.checks.common import AgentCheckTest
instance = {
'host': '127.0.0.1',
'port': 6222,
}
GLOBAL_STATS = set([
'curr_connections',
'total_connections'
])
POOL_STATS = set([
'client_eof',
'client_err',
'client_connectio... | bsd-3-clause | -560,309,525,104,468,500 | 20.780822 | 79 | 0.593711 | false | 3.333333 | true | false | false |
janvc/astronx | source/scripts/showtrj.py | 1 | 3910 | #!/usr/bin/env python3
# Copyright 2012-2017 Jan von Cosel
#
# This file is part of astronx.
#
# astronx if 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) ... | gpl-3.0 | 6,579,715,909,527,065,000 | 35.886792 | 153 | 0.557801 | false | 3.016975 | false | false | false |
cshoe/PynamoDB | pynamodb/constants.py | 1 | 6979 | """
Pynamodb constants
"""
# Operations
BATCH_WRITE_ITEM = 'BatchWriteItem'
DESCRIBE_TABLE = 'DescribeTable'
BATCH_GET_ITEM = 'BatchGetItem'
CREATE_TABLE = 'CreateTable'
UPDATE_TABLE = 'UpdateTable'
DELETE_TABLE = 'DeleteTable'
LIST_TABLES = 'ListTables'
UPDATE_ITEM = 'UpdateItem'
DELETE_ITEM = 'DeleteItem'
GET_ITEM =... | mit | 5,136,472,739,059,773,000 | 29.880531 | 147 | 0.739934 | false | 2.996565 | true | false | false |
ICromwell/OCaSimTest | 18 - No Screening.py | 1 | 3415 | # -*- coding: utf-8 -*-
"""
This simulates the development of a de novo OPL, cancer, or death from old age
@author: icromwell
"""
import random
t_OPL_StageOne = random.normalvariate(800,100) # Time to developing stage I oral cancer given OPL+ status
t_OPL_NED = random.normalvariate(800,100) ... | gpl-3.0 | 2,836,444,580,478,216,000 | 45.458333 | 126 | 0.588873 | false | 3.748628 | false | false | false |
animekita/selvbetjening | selvbetjening/core/events/options/typemanager.py | 1 | 2840 |
from selvbetjening.core.events.models.options import AutoSelectChoiceOption, DiscountOption
from selvbetjening.core.events.options.widgets import BooleanWidget, TextWidget, ChoiceWidget, AutoSelectBooleanWidget, AutoSelectChoiceWidget, DiscountWidget
from selvbetjening.core.events.options.scope import SCOPE
from selvb... | mit | 5,923,400,757,978,187,000 | 27.41 | 158 | 0.688732 | false | 4.145985 | false | false | false |
adamginsburg/APEX_CMZ_H2CO | reduction/parameter_grid_explore_2014.py | 1 | 7257 | import socket
import itertools
import inspect
import os
import time
import spectral_cube
from astropy import units as u
from astropy.io import fits
dirpath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
if 'eso-macbook' in socket.gethostname():
execfile(os.path.join(dirpath,'run_pipe... | bsd-3-clause | 4,390,230,165,334,398,500 | 36.02551 | 126 | 0.645032 | false | 2.556182 | false | false | false |
twisteroidambassador/pluggabletransportadapter | ptadapter/relays.py | 1 | 1740 | import asyncio
from . import contexts
from . import log
BUF_SIZE = 2**13
_logger = log.pkg_logger.getChild('relay')
async def _relay_data_side(
reader: asyncio.StreamReader,
writer: asyncio.StreamWriter,
) -> None:
"""Pass data and EOF from reader to writer."""
while True:
buf = awa... | gpl-3.0 | -6,079,174,031,356,856,000 | 29.526316 | 78 | 0.581609 | false | 3.866667 | false | false | false |
thePortus/arakhne | arakhne/corpus/files/csv_file.py | 1 | 3622 | import csv
import sys
from arakhne.settings import Defaults
from . import BaseFile
class CSVFile(BaseFile):
filetype = 'csv'
settings = Defaults.FILES_CSV
def __init__(self, corpus, settings):
# Maxing CSV field size limit to enable large file loading
super().__init__(corpus=corpus, sett... | mit | 3,465,646,467,718,646,300 | 36.729167 | 77 | 0.536444 | false | 4.734641 | false | false | false |
google-research/google-research | cola/data.py | 1 | 3891 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -2,514,193,117,541,961,000 | 33.433628 | 79 | 0.657672 | false | 3.398253 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py | 1 | 1941 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -1,433,115,403,300,824,600 | 43.113636 | 98 | 0.655848 | false | 4.342282 | false | false | false |
laffra/auger | auger/generator/generator.py | 1 | 1029 | from __future__ import print_function
import os
import sys
file_to_module_name = dict()
def init_module_names():
modules = [item for item in sys.modules.items()]
file_to_module_name.update(dict(
(getattr(mod, '__file__').replace('.pyc', '.py'), name)
for name, mod in modules
if hasatt... | mit | -6,273,444,806,085,714,000 | 26.078947 | 76 | 0.638484 | false | 3.636042 | false | false | false |
tellapart/taba | src/taba/server/storage/mapping_storage.py | 1 | 4443 | # Copyright 2014 TellApart, 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 writi... | apache-2.0 | -3,012,093,875,975,386,600 | 27.120253 | 79 | 0.653387 | false | 3.784497 | false | false | false |
uclouvain/OSIS-Louvain | education_group/api/views/group_element_year.py | 1 | 3601 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | 5,969,703,544,294,927,000 | 39.449438 | 107 | 0.694444 | false | 3.938731 | false | false | false |
pet-finder/pet-finder | app/view.py | 1 | 6044 | #!/usr/bin/python2.5
# Copyright 2010 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 applicable law or ... | apache-2.0 | 6,600,649,657,870,641,000 | 38.763158 | 79 | 0.584381 | false | 4.081026 | false | false | false |
leppa/home-assistant | homeassistant/components/homekit/type_lights.py | 1 | 8939 | """Class to hold all light accessories."""
import logging
from pyhap.const import CATEGORY_LIGHTBULB
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_BRIGHTNESS_PCT,
ATTR_COLOR_TEMP,
ATTR_HS_COLOR,
ATTR_MAX_MIREDS,
ATTR_MIN_MIREDS,
DOMAIN,
SUPPORT_BRIGHTNESS,
SUPP... | apache-2.0 | 6,853,187,842,230,649,000 | 38.034934 | 89 | 0.579036 | false | 3.92578 | false | false | false |
nelhage/taktician | python/tak/train/corpus.py | 1 | 3196 | import tak.ptn
import tak.proto
import attr
import os
import struct
import grpc
import numpy as np
import tensorflow as tf
def xread(fh, n):
b = fh.read(n)
if len(b) == 0:
raise EOFError
if len(b) != n:
raise IOError("incomplete read ({0}/{1} at off={2})".format(
len(b), n, fh.tell()))
return... | mit | 491,422,879,414,073,660 | 24.98374 | 81 | 0.598248 | false | 3.032258 | false | false | false |
ggzzzzzzz/TestSSR | merge_json.py | 1 | 1112 | #!/usr/bin/python
# coding=UTF-8
#
# usage: ./merge_json.py 1.json 2.json 3.json ..
import os
import json, codecs
para_count=len(os.sys.argv)
d=dict()
d['configs']=[]
serverandport=[]
if para_count > 1:
for i in range(1,para_count,1):
if os.path.exists(os.sys.argv[i]) and os.sys.argv[i].sp... | gpl-3.0 | 1,079,533,520,537,659,400 | 32.8125 | 86 | 0.544065 | false | 3.106145 | false | false | false |
katakumpo/nicedjango | tests/utils.py | 1 | 2073 | from __future__ import print_function, unicode_literals
from operator import attrgetter
from django.db.models.loading import get_app, get_models
from nicedjango._compat import exclude, unicode
from nicedjango.graph.utils import sort_nodes
from nicedjango.serializers.compact_python import Serializer
from nicedjango.ut... | mit | -807,899,905,067,998,800 | 28.197183 | 91 | 0.626146 | false | 3.501689 | false | false | false |
codedecde/ImageQA | Src/TheanoModel/Code/demo.py | 1 | 3301 | #!/usr/bin/env python
import datetime
import os
import sys
import log
import logging
import argparse
import math
import pickle
from optimization_weight import *
from wbw_theano import *
from data_provision_att_vqa import *
from data_processing_vqa import *
from configurations import get_configurations
def AnswerQuest... | mit | -6,485,338,328,350,895,000 | 41.87013 | 140 | 0.662527 | false | 3.522946 | false | false | false |
ssharpjr/taskbuster-boilerplate | functional_tests/test_allauth.py | 1 | 2313 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
from django.core.urlresolvers import revers... | mit | -4,072,114,593,278,623,000 | 36.306452 | 73 | 0.663208 | false | 3.816832 | false | false | false |
silkypanda/pynched | getData/AmazonProduct.py | 1 | 14454 | class AmazonProduct(LXMLWrapper):
"""A wrapper class for an Amazon product.
"""
def __init__(self, item, aws_associate_tag, api, *args, **kwargs):
"""Initialize an Amazon Product Proxy.
:param item:
Lxml Item element.
"""
super(AmazonProduct, self).__init__(item)... | apache-2.0 | -8,527,705,772,347,754,000 | 28.320487 | 86 | 0.542964 | false | 4.323661 | false | false | false |
guykisel/robotframework-faker | robotframework-faker/FakerLibrary/keywords.py | 1 | 2202 | """
This is a very thin wrapper for faker. You can access all of faker's usual
methods via FakerLibrary calls in Robot Framework.
"""
# pylint: disable=no-value-for-parameter,unused-argument,useless-object-inheritance
import ast
import faker.factory
import faker.generator
import wrapt
def _str_to_data(string):
... | mit | 5,442,933,571,237,922,000 | 26.873418 | 105 | 0.600817 | false | 3.816291 | false | false | false |
uclouvain/osis | education_group/views/group/general_information_update.py | 1 | 2313 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | -2,497,438,322,074,282,000 | 40.285714 | 104 | 0.667388 | false | 3.986207 | false | false | false |
PerformLine/python-performline-client | performline/cli.py | 1 | 4799 | # Copyright (c) 2016, PerformLine, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditio... | bsd-3-clause | 1,451,907,435,498,720,500 | 35.633588 | 81 | 0.628464 | false | 4.19493 | false | false | false |
emdodds/DictLearner | DictLearner.py | 1 | 16189 | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 20 12:01:18 2015
@author: Eric Dodds
Abstract dictionary learner.
Includes gradient descent on MSE energy function as a default learning method.
"""
import numpy as np
import pickle
# the try/except block avoids an issue with the cluster
try:
import matp... | mit | -8,776,482,560,978,126,000 | 39.940415 | 82 | 0.567175 | false | 3.749189 | false | false | false |
chrisspen/burlap | burlap/aws.py | 1 | 4703 | from __future__ import print_function
import os
from burlap import Satchel
from burlap.constants import *
from burlap.decorators import task
class EC2MonitorSatchel(Satchel):
"""
Wraps the EC2 monitor script provided by Amazon:
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-s... | mit | -8,316,019,227,484,014,000 | 28.955414 | 132 | 0.596428 | false | 3.475979 | false | false | false |
DesertBus/txircd | txircd/modules/samode.py | 1 | 1985 | from twisted.words.protocols import irc
from txircd.modbase import Command
class SamodeCommand(Command):
def onUse(self, user, data):
if "targetchan" in data:
cdata = data["targetchan"]
modesSet = cdata.setMode(None, data["modes"], data["params"], user.prefix())
user.sen... | bsd-3-clause | 6,756,576,759,296,020,000 | 36.471698 | 122 | 0.531486 | false | 3.922925 | false | false | false |
zsjohny/jumpserver | apps/assets/views/domain.py | 1 | 5042 | # -*- coding: utf-8 -*-
#
from django.views.generic import (
TemplateView, CreateView, UpdateView, DeleteView, DetailView
)
from django.views.generic.detail import SingleObjectMixin
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse_lazy, reverse
from common.permissions import... | gpl-2.0 | 4,419,450,522,517,363,700 | 30.123457 | 79 | 0.635264 | false | 3.998414 | false | false | false |
lixianjian/tools_backend | parameters/views.py | 1 | 6409 | #coding=utf-8
#全局变量设置
from django.http import HttpResponse,HttpResponseForbidden,HttpResponseServerError
from django.views.decorators.csrf import csrf_exempt
from django.template import loader, RequestContext
from django.conf import settings
#import sys
#import os
import traceback as tb
#import datetime
#im... | epl-1.0 | -5,694,978,652,910,430,000 | 32.882022 | 108 | 0.580126 | false | 3.404057 | false | false | false |
nexdatas/recselector | test/TestMGSetUp.py | 1 | 5166 | #!/usr/bin/env python
# This file is part of nexdatas - Tango Server for NeXus data writer
#
# Copyright (C) 2012-2014 DESY, Jan Kotanski <jkotan@mail.desy.de>
#
# nexdatas is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | gpl-3.0 | -4,938,994,872,754,152,000 | 30.693252 | 78 | 0.540263 | false | 4.048589 | true | false | false |
shdowofdeath/rally | rally/plugins/openstack/wrappers/network.py | 1 | 13943 | # Copyright 2014: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 809,447,455,847,712,500 | 34.032663 | 78 | 0.582228 | false | 4.206033 | true | false | false |
tanghaibao/goatools | goatools/godag/obo_optional_attributes.py | 1 | 9557 | """Manage optional GO-DAG attributes."""
__copyright__ = "Copyright (C) 2015-present, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
import re
import collections as cx
class OboOptionalAttrs:
"""Manage optional GO-DAG attributes."""
optional_exp = set(['def', 'defn', 'synonym... | bsd-2-clause | -1,903,504,645,009,664,500 | 37.381526 | 97 | 0.57246 | false | 3.644928 | false | false | false |
ecreall/lagendacommun | lac/web_services/import_entities.py | 1 | 17511 |
# Copyright (c) 2016 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi, Sophie Jazwiecki
import colander
import json
import urllib
import transaction
from persistent.list import PersistentList
from pyramid.view import view_config
from pyra... | agpl-3.0 | 5,886,629,999,985,584,000 | 34.304435 | 94 | 0.595112 | false | 4.050659 | false | false | false |
amirkdv/biseqt | experiments/blot_stats.py | 1 | 31822 | import numpy as np
from matplotlib import pyplot as plt
from matplotlib import gridspec
from itertools import product
from scipy.ndimage.filters import gaussian_filter1d
import sys
import logging
from biseqt.blot import WordBlot, find_peaks, band_radius
from biseqt.sequence import Alphabet
from biseqt.stochastics imp... | bsd-3-clause | 4,470,350,873,487,483,000 | 41.656836 | 79 | 0.561058 | false | 3.212721 | false | false | false |
wax8280/web2kindle | main.py | 1 | 5103 | # !/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Vincent<vincent8280@outlook.com>
# http://wax8280.github.io
# Created on 2017/10/11 12:30
import click
import multiprocessing
import web2kindle.script.guoke_scientific
import web2kindle.script.zhihu_dail... | mit | -4,217,319,424,848,223,700 | 33.47973 | 111 | 0.687439 | false | 2.761364 | false | false | false |
stefanseefeld/numba | numba/targets/codegen.py | 1 | 20232 | from __future__ import print_function, division, absolute_import
import functools
import locale
import weakref
import llvmlite.llvmpy.core as lc
import llvmlite.llvmpy.passes as lp
import llvmlite.binding as ll
import llvmlite.ir as llvmir
from numba import config, utils
from numba.runtime.atomicops import remove_re... | bsd-2-clause | -8,729,384,321,049,508,000 | 32.496689 | 87 | 0.58452 | false | 4.112195 | false | false | false |
william-richard/moto | moto/logs/responses.py | 1 | 7491 | from moto.core.responses import BaseResponse
from .models import logs_backends
import json
# See http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/Welcome.html
class LogsResponse(BaseResponse):
@property
def logs_backend(self):
return logs_backends[self.region]
@property
d... | apache-2.0 | -3,817,439,936,542,415,000 | 34.169014 | 104 | 0.598318 | false | 3.81999 | false | false | false |
Princeton-CDH/winthrop-django | winthrop/books/models.py | 1 | 8200 | from django.db import models
from django.contrib.contenttypes.fields import GenericRelation
from django.urls import reverse
from django.utils.safestring import mark_safe
from djiffy.models import Manifest
from winthrop.common.models import Named, Notable, DateRange
from winthrop.places.models import Place
from winthro... | apache-2.0 | 7,285,286,906,633,182,000 | 34.964912 | 89 | 0.668293 | false | 4.015671 | false | false | false |
epage/nixnet-python | tests/test_frames.py | 1 | 17470 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import time
import mock # type: ignore
import pytest # type: ignore
import nixnet
from nixnet import _frames
from nixnet import constants
from nixnet import errors
from nixnet import types
def raise_code... | mit | -3,440,613,121,823,330,000 | 35.934461 | 148 | 0.655982 | false | 3.349952 | true | false | false |
melmothx/jsonbot | jsb/plugs/common/imdb.py | 1 | 2532 | ## jsb imports
from jsb.lib.commands import cmnds
from jsb.utils.url import geturl2, striphtml, decode_html_entities
from jsb.imports import getjson
from urllib import quote
import logging
import re
def do_imdb_api_query(query):
url = "http://www.deanclatworthy.com/imdb/?" + query
logging.warn(url)
result... | mit | -4,098,470,247,257,875,000 | 29.142857 | 312 | 0.584123 | false | 3.27555 | false | false | false |
miarmak/CloudFerry | cloud/cloud.py | 1 | 4023 | # Copyright (c) 2014 Mirantis 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 writing, so... | apache-2.0 | 1,343,101,120,892,547,600 | 39.636364 | 121 | 0.591101 | false | 4.279787 | true | false | false |
laochangxin/doubanMining | doubanMining/doubanMining/spider/ProxyCrawler.py | 1 | 2907 | from bs4 import BeautifulSoup
import urllib2
import httplib
import threading
class ProxyCrawler(object):
"""@Brief: Crawl proxy host&port from a proxy providing web"""
def run(self):
of = open('./data/proxy.txt' , 'w')
user_agent = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Tri... | gpl-2.0 | -5,077,874,072,480,369,000 | 34.876543 | 93 | 0.521515 | false | 3.743557 | false | false | false |
eahneahn/free | djangoproject/social_auth/migrations/0001_initial.py | 1 | 8277 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.conf import settings
USER_MODEL = getattr(settings, 'SOCIAL_AUTH_USER_MODEL', None) or \
getattr(settings, 'AUTH_USER_MODEL', None) or \
'auth.User'
... | agpl-3.0 | -5,563,063,639,572,120,000 | 60.311111 | 182 | 0.581974 | false | 3.672138 | false | false | false |
vernonrj/dognames | dognames.py | 1 | 1141 | """Create random dog names"""
import random
from functools import reduce
from dog_list import DOGS
def word_iter(words):
"""iterate on words"""
word = []
for char in words:
if char in ' \n\t':
if word:
yield ''.join(word)
word = []
else:
... | gpl-2.0 | -2,208,824,892,482,656,300 | 24.355556 | 72 | 0.606486 | false | 3.5 | false | false | false |
siddhartha-chandra/i_cake_python | 32.py | 1 | 1576 | # You created a game that is more popular than Angry Birds.
# Each round, players receive a score between 0 and 100, which you use to rank them from highest to lowest. So far you're using an algorithm that sorts in O(n\lg{n})O(nlgn) time, but players are complaining that their rankings aren't updated fast enough. You n... | gpl-3.0 | -6,689,949,833,234,319,000 | 42.611111 | 291 | 0.716561 | false | 3.158954 | false | false | false |
theyosh/TerrariumPI | contrib/toggle_switch.py | 1 | 3601 | #!/usr/bin/env python
import sys
import requests
import time
# Run this script as:
# without parameters, it will toggle the power state and leave in manual mode
# with paramterer on or off, it will toggle to the selected state and leave in manual mode
# with parameter on or off and a numeric value, will toggle the swi... | gpl-3.0 | -8,097,306,127,394,977,000 | 42.926829 | 176 | 0.694529 | false | 3.579523 | false | false | false |
nakagami/CyMySQL | cymysql/charset.py | 1 | 9806 |
def encoding_by_charset(charset):
if charset in ('utf8mb4', 'utf8mb3'):
return 'utf8'
return charset
class Charset(object):
def __init__(self, id, name, collation, is_default):
self.id, self.name, self.collation = id, name, collation
self.is_default = is_default == 'Yes'
class C... | mit | -8,882,876,964,885,631,000 | 51.159574 | 73 | 0.64899 | false | 2.395798 | false | false | false |
manuvarkey/cmbautomiser | cmbautomiser/openpyxl/chart/chartspace.py | 1 | 7902 | from __future__ import absolute_import
# Copyright (c) 2010-2018 openpyxl
"""
Enclosing chart object. The various chart types are actually child objects.
Will probably need to call this indirectly
"""
from openpyxl.compat import unicode
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descrip... | gpl-3.0 | 7,107,741,808,673,289,000 | 28.485075 | 89 | 0.606302 | false | 3.847128 | false | false | false |
leosartaj/PyChat | PyChat/server/startserver.py | 1 | 1346 | #!/usr/bin/env python2
##
# PyChat
# https://github.com/leosartaj/PyChat.git
#
# Copyright (c) 2014 Sartaj Singh
# Licensed under the MIT license.
##
"""
Helper functions for starting a server
"""
# Twisted Imports
from twisted.internet import reactor
from twisted.internet.error import CannotListenError
# factory/p... | mit | -1,021,957,207,768,436,000 | 25.92 | 67 | 0.729569 | false | 4.103659 | false | false | false |
Diaoul/Dobby | dobby/models/scenario.py | 1 | 1793 | # Copyright 2011 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of Dobby.
#
# Dobby is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ... | lgpl-3.0 | 4,736,567,790,910,257,000 | 42.731707 | 116 | 0.736754 | false | 4.102975 | false | false | false |
weidnerm/solar_data_monitor | Subfact_ina219.py | 1 | 9219 | #!/usr/bin/python
import time
import smbus
#from Adafruit_I2C import Adafruit_I2C
import Adafruit_GPIO.I2C as I2C
# ===========================================================================
# INA219 Class
# ===========================================================================
class INA219:
i2c = None
# ===... | mit | -8,543,372,143,050,764,000 | 44.865672 | 98 | 0.526196 | false | 3.006849 | true | false | false |
mlcommons/inference | language/bert/pytorch_SUT.py | 1 | 3800 | # coding=utf-8
# Copyright 2021 Arm Limited and affiliates.
# Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | apache-2.0 | 6,249,434,711,940,474,000 | 41.696629 | 128 | 0.663158 | false | 3.664417 | true | false | false |
ganga-devs/ganga | ganga/GangaCore/Core/GangaRepository/migrate.py | 1 | 6165 | # import ganga
import os
import time
import pickle
import pymongo
from GangaCore.Core.GangaRepository.VStreamer import from_file
from GangaCore.Core.GangaRepository.DStreamer import (
EmptyGangaObject,
index_from_database, index_to_database,
object_from_database, object_to_database
)
from GangaCore.... | gpl-2.0 | -1,133,834,777,365,368,600 | 36.822086 | 91 | 0.631955 | false | 3.430718 | true | false | false |
astrophysicist87/iEBE-Plumberg | EBE-Node/plot_scripts/plot_HBT_GF_w_v_wo_res.py | 1 | 4575 | #!/usr/bin/env python
from numpy import *
from pylab import *
import matplotlib.pyplot as plt
from scipy import interpolate
from scipy.interpolate import griddata
from matplotlib.patches import Ellipse
import sys, os
mpl.rcParams['pdf.fonttype'] = 42
### command-line arguments
thermalFileToPlot = sys.argv[1]
resonan... | gpl-3.0 | -8,798,006,646,072,858,000 | 36.809917 | 109 | 0.634536 | false | 2.708703 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/setup.py | 1 | 3043 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | mit | -1,181,227,971,356,520,700 | 32.811111 | 91 | 0.594808 | false | 3.827673 | false | false | false |
windsorschmidt/tzar-bomba | tzar-bomba.py | 1 | 5618 | #!/bin/env python3
#
# Copyright 2016 Windsor Schmidt <windsor.schmidt@gmail.com>
#
# License: MIT License. Let me know if you find this useful.
#
# This is intended to be called by EESchema's BOM generation tool as a plugin.
# The "Command line" field of the plugin dialog should look something like:
#
# /path/to/tzar-... | mit | 6,792,083,821,482,979,000 | 37.479452 | 79 | 0.6068 | false | 3.400726 | false | false | false |
juanscelyg/GRMI_underwater_drone | agente_sim.py | 1 | 2291 | '''
Code to connect AWS and the VREP simulation
@version 0.1
@author Juan Cely <juanscelyg@gmail.com>
Research Group of Robots and Intelligent Machines
Date: August/2017
'''
try:
import GRMI_MUR.AWS.AWS_updater as AWS_updater
import GRMI_MUR.Arm.arm_parts as Arm_parts
import GRMI_MUR.Simulate.arm as vrep_arm
import... | mit | 1,314,220,789,398,521,900 | 32.202899 | 78 | 0.63684 | false | 2.657773 | false | false | false |
kareem2048/HCI-Lap | HCI/Gesture Recognizer/Python/Main.py | 1 | 3351 |
from DTW import *
import cv2
import numpy as np
recognizer = DTWRecognizer()
#Using Laser
'''
cap = cv2.VideoCapture(0)
points = np.array([], np.int32)
name = "Draw a gesture"
flag = False
score = 0
while True:
ret, frame = cap.read()
#frame = cv2.flip(frame, 1)
hsv = cv2.cvtColor(frame,... | apache-2.0 | 3,247,513,180,038,737,400 | 30.852941 | 140 | 0.537153 | false | 3.046364 | false | false | false |
rlhelinski/scripts | python/raspicam-fetch.py | 1 | 1203 | #!/usr/bin/python
import logging
logging.basicConfig(level=logging.INFO)
from ftplib import FTP
import os
ftp = FTP('10.0.0.6')
while not ftp.login():
os.sleep(5)
#ftp.cwd('/media/...')
for d in ftp.nlst():
if os.path.isdir(d):
logging.info('Already have directory %s' % d)
if False:
... | gpl-3.0 | -184,588,770,723,941,220 | 31.513514 | 94 | 0.573566 | false | 3.369748 | false | false | false |
dstrockis/outlook-autocategories | lib/azure/storage/queue/_deserialization.py | 1 | 5227 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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://w... | apache-2.0 | -3,297,498,918,854,638,600 | 33.80137 | 112 | 0.62756 | false | 4.206924 | false | false | false |
arjandepooter/codejam | 2014/round_1b/the_bored_traveling_salesman/solution.py | 1 | 2745 | '''
graph = { "a" : ["c"],
"b" : ["c", "e"],
"c" : ["a", "b", "d", "e"],
"d" : ["c"],
"e" : ["c", "b"],
"f" : []
}
'''
import copy
def is_connected(graph):
if graph=={}:
return True
seen = set([next(graph.iterkeys())])
tocheck = seen.copy()
... | mit | 2,888,111,401,630,539,000 | 31.294118 | 74 | 0.519854 | false | 3.94964 | false | false | false |
lifemapper/core | LmCompute/tools/multi/occurrence_sorter.py | 1 | 1695 | """Sorts a CSV file on the group field
"""
import argparse
import csv
from operator import itemgetter
from LmCommon.common.lmconstants import ENCODING
# .............................................................................
def sort_file_on_field(input_filename, output_filename, group_position):
"""Sorts a... | gpl-3.0 | -1,143,413,869,647,763,600 | 31.596154 | 79 | 0.560472 | false | 4.291139 | false | false | false |
algui91/grado_informatica_criptografia | P2/streamciphers/ej4.py | 1 | 1289 | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 30 09:48:53 2015
@author: Alejandro Alcalde (elbauldelprogramador.com)
"""
from ej2 import LFSR
def geffe(coef1, s1, coef2, s2, coef3, s3, l):
l1 = LFSR(coef1, s1, l)
l2 = LFSR(coef2, s2, l)
l3 = LFSR(coef3, s3, l)
r = []
for i, j, k in zip(l1,l2... | gpl-3.0 | 5,513,804,138,624,247,000 | 17.955882 | 61 | 0.472459 | false | 2.170034 | false | false | false |
morrisonlevi/FrameworkBenchmarks | dart-stream/setup.py | 1 | 2738 | import subprocess
import sys
import setup_util
import os
def start(args, logfile, errfile):
setup_util.replace_text('dart-stream/postgresql.yaml', 'host: .*', 'host: ' + args.database_host)
setup_util.replace_text('dart-stream/mongodb.yaml', 'host: .*', 'host: ' + args.database_host)
try:
#
# install dar... | bsd-3-clause | 4,693,466,373,655,429,000 | 35.506667 | 190 | 0.61176 | false | 3.298795 | false | false | false |
JoepBC/urwish | urwish.py | 1 | 16696 | #!/usr/bin/env python3
###############################################################
# Urwish lib by Joep Bos-Coenraad (github.com/JoepBC)
# An easy wrapper for making linear console forms using \
# the Urwid library, www.urwid.org
###############################################################
import urwid
impor... | gpl-3.0 | 5,136,615,076,578,287,000 | 36.519101 | 213 | 0.709751 | false | 3.10104 | false | false | false |
pittjl/PyFr | pyfr-run.py | 1 | 1728 | # -*- coding: utf-8 -*-
import argparse
import frhost
def cmd_line_parse():
parser = argparse.ArgumentParser()
parser.add_argument('-a', '--address', help="target host ip address",
required=True)
parser.add_argument('-w', '--webport',
help="target web servi... | mit | 7,891,724,667,984,925,000 | 35 | 80 | 0.642361 | false | 3.540984 | false | false | false |
KnechtRootrechtCH/Mimir | content/Mods/XVM/XVM_Base/res_mods_content/mods/xfw_packages/xvm_main/python/topclans.py | 1 | 2348 | """ XVM (c) https://modxvm.com 2013-2020 """
import config
from logger import *
# PUBLIC
def getClanInfo(clanAbbrev):
global _clansInfo
if _clansInfo is None:
return None
rankWGM = None
rankWSH = None
topWGM = _clansInfo.getTopWGMClanInfo(clanAbbrev)
if topWGM is not None:
if ... | mit | -2,595,296,232,771,151,400 | 30.72973 | 128 | 0.616695 | false | 3.006402 | false | false | false |
wlitheng/gocd2gmail2slack | gocd2gmail2slack/slack.py | 1 | 3798 |
import json
import requests
from cfg.config import (
CI_STAGES,
DEPLOY_STAGES,
VERSION_CONTROL_TYPE
)
def send_to_slack(body, webhook_url):
requests.post(webhook_url, data=json.dumps(body))
def message_builder(gocd_details, changeset, dashboard_url):
if VERSION_CONTROL_TYPE == 'GIT':
... | mit | 7,111,678,147,622,747,000 | 30.633333 | 93 | 0.521865 | false | 3.954167 | false | false | false |
cryptocoinexplorer/Open-Source-CCE-4.0 | dbload.py | 1 | 15221 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# dbload.py
#
# Copyright 2015 Hartland PC LLC
#
# This file is part of the of the database loader for CCE 4.0 (open source version).
#
# This package is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... | gpl-3.0 | 7,149,457,617,349,150,000 | 41.997175 | 154 | 0.573484 | false | 3.893835 | false | false | false |
amalagon/TE_class | TE_class.py | 1 | 1222 | import numpy as np
from scipy.special import jn, jvp, jn_zeros
from scipy.integrate import quad
import matlibplot.pyplot as plt
class TE(object):
def __init__(self,l,m,n,R,L):
self.l = l
self.m = m
self.n = n
k1 = jn_zeros(m,l)/R
k3 = n*np.pi/L
def E_r(self, r, th... | mit | -3,437,810,034,897,210,400 | 22.980392 | 85 | 0.513912 | false | 3.024752 | false | false | false |
Ultimaker/Cura | cura/API/Account.py | 1 | 11853 | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from datetime import datetime
from typing import Optional, Dict, TYPE_CHECKING, Callable
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QTimer, Q_ENUMS
from UM.Logger import Logger
from UM.Message im... | lgpl-3.0 | 3,168,149,567,613,053,400 | 38.378738 | 145 | 0.655868 | false | 4.18982 | false | false | false |
earcanal/dotprobe | size.py | 1 | 1063 | #!/usr/bin/python
# calculate the number of pixels for a stimulus
# fixed: viewer distance, vertical resolution, visual angle
# argv[1] = vertical screen height (cm)
from math import atan2, degrees
import sys
if sys.argv[1]:
h = float(sys.argv[1])
else:
h = 21.5 # Dell laptop
h = 20.6 # M... | cc0-1.0 | 501,923,433,665,035,500 | 32.21875 | 95 | 0.658514 | false | 3.250765 | false | false | false |
gwind/YWeb | yweb/apps/auth/models.py | 1 | 14564 | # coding: utf-8
import os
import random
import json
import datetime
import time
import logging
from hashlib import sha256, sha1
from sqlalchemy import Column, Integer, String, \
Sequence, DateTime, Table, ForeignKey, Boolean, Text
from sqlalchemy.orm import relationship, backref
import yweb.utils.ydatetime
from ... | mit | -2,655,842,268,060,451,300 | 24.030631 | 86 | 0.563346 | false | 3.390774 | false | false | false |
inspirehep/invenio-formatter | invenio_formatter/template_context_functions/tfn_get_back_to_search_links.py | 1 | 2074 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 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... | gpl-2.0 | 9,196,461,224,380,242,000 | 31.920635 | 74 | 0.682257 | false | 3.988462 | false | false | false |
guoxuesong/deepstacks | deepstacks/framework/visual_action.py | 1 | 10507 | #!/usr/bin/env python
# coding:utf-8
# vi:tabstop=4:shiftwidth=4:expandtab:sts=4
import theano
import lasagne
import numpy as np
import cv2
import main
#from .main import batch_iterator_train,batch_iterator_test
from .main import register_training_callbacks, register_model_handler
from ..utils.curry import curry
floa... | mit | 493,716,393,059,293,700 | 31.630435 | 188 | 0.556486 | false | 3.228949 | false | false | false |
rafaduran/django-pluggable-registration | registration/models.py | 1 | 11723 | import datetime
import random
import re
from django.conf import settings
from django.db import models
from django.template.loader import render_to_string
from django.utils.hashcompat import sha_constructor
from django.utils.translation import ugettext_lazy as _
from django.core.mail import EmailMultiAlternatives
from ... | bsd-3-clause | 2,870,410,196,924,253,700 | 39.424138 | 83 | 0.618442 | false | 4.933923 | false | false | false |
briend/mypaint | gui/layerprops.py | 1 | 17077 | # This file is part of MyPaint.
# Copyright (C) 2017 by the MyPaint Development Team.
#
# 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... | gpl-2.0 | 4,685,672,151,787,558,000 | 30.50738 | 84 | 0.593078 | false | 3.681181 | false | false | false |
KarlParkinson/Graphs | Graph.py | 1 | 2909 | """
{description}
Copyright (C) {2014} {Karl Parkinson}
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.
... | gpl-2.0 | -5,222,031,627,790,246,000 | 29.946809 | 89 | 0.614644 | false | 4.023513 | false | false | false |
js850/pele | pele/optimize/_fire.py | 1 | 7347 | '''
Created on 30 Apr 2012
@author: ruehle
'''
import numpy as np
import math
import logging
from pele.optimize import Result
__all__ = ["Fire"]
_logger = logging.getLogger("pele.optimize")
class Fire(object):
'''
The FIRE optimization algorithm
Parameters
----------
coords : array
th... | gpl-3.0 | -1,265,201,723,714,130,000 | 31.653333 | 97 | 0.553151 | false | 3.848612 | false | false | false |
wackrat/structer | structer/named.py | 1 | 6439 | """
Assign attribute names to tuple indices
"""
import struct
from operator import itemgetter
from . import CacheAttr, NameSpace, NameList, Meta
class TupleDict(dict):
"""
MetaTuple namespace
"""
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.__names__ = ()
def __m... | mit | 3,598,232,183,105,975,000 | 30.563725 | 97 | 0.571517 | false | 4.214005 | false | false | false |
rbuffat/pyidf | tests/test_photovoltaicperformancesimple.py | 1 | 2209 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.electric_load_center import PhotovoltaicPerformanceSimple
log = logging.getLogger(__name__)
class TestPhotovoltaicPerformanceSimple(unittest.TestCase):
def setUp(self):
... | apache-2.0 | -5,194,418,483,505,201,000 | 39.925926 | 173 | 0.708918 | false | 3.506349 | false | false | false |
mansenfranzen/ultimate | django/app_tutorial/models.py | 1 | 3329 | """This module contains the data models"""
from django.db import models
from django.contrib.auth.models import User
class Nationality(models.Model):
abbreviation = models.CharField(max_length=5)
name = models.CharField(max_length=75)
class Division(models.Model):
name = models.CharField(max_length=50)
... | gpl-3.0 | 6,992,107,112,340,045,000 | 32.969388 | 78 | 0.692701 | false | 3.723714 | false | false | false |
wuxue/altanalyze | sampleIndexSelection.py | 1 | 8608 | import sys,string
import os
def makeTestFile():
all_data = [['name','harold','bob','frank','sally','kim','jim'],
['a','0','0','1','2','0','5'],['b','0','0','1','2','0','5'],
['c','0','0','1','2','0','5'],['d','0','0','1','2','0','5']]
input_file = 'test.txt'
export_object = open(input_... | apache-2.0 | 7,157,787,810,996,888,000 | 38.668203 | 228 | 0.564823 | false | 3.672355 | false | false | false |
nyusngroup/pyMCZ | pyMCZ/metallicity.py | 1 | 9229 | ##############################################################################
## Calculates oxygen abundance (here called metalicity) based on strong emission lines,
## based on code originally written in IDL by Lisa Kewley (Kewley & Ellison 2008). Outputs
## oxygen abundance in many different diagnostics (see Bianc... | mit | -3,687,344,618,905,903,000 | 34.910506 | 131 | 0.57406 | false | 2.967524 | false | false | false |
dww100/sct | python/bin/calculate_rfactor.py | 1 | 4887 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Compares pre-calculated theorerical scattering curves to
experimental x-ray and neutron scattering curves.
"""
# Copyright 2014 University College London
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance ... | apache-2.0 | 824,015,373,454,346,000 | 30.941176 | 116 | 0.5752 | false | 3.878571 | false | false | false |
FinalsClub/karmaworld | karmaworld/apps/notes/management/commands/import_ocw_json.py | 1 | 10560 | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Copyright (C) 2012 FinalsClub Foundation
import json
import os.path
import requests
from karmaworld.apps.notes.models import Note
from karmaworld.apps.notes.models import NoteMarkdown as NoteContent
from karmaworld.apps.notes.models import Document
from karmaworld.apps.n... | agpl-3.0 | 7,579,826,730,142,562,000 | 48.345794 | 210 | 0.471307 | false | 5.118759 | false | false | false |
EeOneDown/spbu4u | tg_bot/handlers/editor/hide.py | 1 | 5891 | from flask import g
import telebot_login
from app import db, new_functions as nf
from app.constants import (
hide_answer, hide_lesson_answer, selected_lesson_answer,
selected_lesson_info_answer, ask_to_select_types_answer, how_to_hide_answer
)
from app.models import Lesson
from tg_bot import bot
from tg_bot.ke... | apache-2.0 | 5,429,025,399,065,419,000 | 27.268293 | 79 | 0.650906 | false | 3.051606 | false | false | false |
Rolfchen/json-map | python/jsonMap.py | 1 | 9998 | #### Json Map ###
# beta
# @author Rolf Chen
# This module will "transform" one JSON object to another through the use of JSON Mapper Schema
# @license
#
# MIT License
#
# Copyright (c) 2016 Rolf Chen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated docume... | mit | 8,639,559,935,151,903,000 | 33.12628 | 462 | 0.685037 | false | 3.272668 | false | false | false |
lichong012245/cornerstone | prop_management/actions.py | 1 | 1402 | import csv
from unidecode import unidecode
from django.http import HttpResponse
def export_as_csv_action(description="Export selected objects as CSV file",
fields=None, exclude=None, header=True):
"""
This function returns an export csv action
'fields' and 'exclude' work like in ... | unlicense | -1,529,148,384,365,938,700 | 35.921053 | 105 | 0.633381 | false | 4.367601 | false | false | false |
openstack/cloudkitty | cloudkitty/cli/status.py | 1 | 1683 | # Copyright 2018 Objectif Libre
#
# 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 agr... | apache-2.0 | 6,150,540,138,014,820,000 | 29.053571 | 78 | 0.674391 | false | 4.125 | false | false | false |
xblia/Upgrade-service-for-java-application | py_custom_common_libs/pyversion/ClearTempFiles.py | 1 | 1320 | #coding=utf-8
'''/*
* Copyright 2015 lixiaobo
*
* VersionUpgrade project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 | -173,714,863,027,328,500 | 27.717391 | 78 | 0.649242 | false | 3.916914 | false | false | false |
Spoken-tutorial/spoken-website | cron/old/upload_videos.py | 1 | 4480 |
from builtins import str
import MySQLdb
import time
import sys
#sys.path.insert(0, '../spoken')
#sys.path.insert(0, '../../spoken')
from youtube_upload import *
from config import *
def convert_video(path):
file_name, file_extension = os.path.splitext(path)
try:
"""ffmpeg -i Hardware-requirement-to-in... | gpl-3.0 | -5,743,534,340,822,348,000 | 40.481481 | 192 | 0.59442 | false | 3.209169 | false | false | false |
kubeflow/pipelines | samples/core/ai_platform/training/trainer/model.py | 1 | 2478 | # Copyright 2019 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | 4,932,397,980,201,385,000 | 31.181818 | 80 | 0.706618 | false | 4.250429 | false | false | false |
OpenNumismat/open-numismat | OpenNumismat/Collection/Password.py | 1 | 3941 | import hashlib
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import *
def cryptPassword(password=''):
return hashlib.md5(password.encode('utf-8')).hexdigest()
def checkPassword(crypted_password, password):
if crypted_password != cryptPassword(password):
return False
return Tru... | gpl-3.0 | 6,384,421,995,999,796,000 | 34.155963 | 76 | 0.612789 | false | 4.603972 | false | false | false |
softside/peewee | peewee.py | 1 | 157476 | # coding: utf-8
# May you do good and not evil
# May you find forgiveness for yourself and forgive others
# May you share freely, never taking more than you give. -- SQLite source code
#
# As we enjoy great advantages from the inventions of others, we should be glad
# of an opportunity to serve others by an invention... | mit | -1,994,060,355,427,966,200 | 32.801678 | 119 | 0.564113 | false | 3.995322 | false | false | false |
uholzer/sempipe | sempipe-plan.py | 1 | 1449 | #!/usr/bin/python
import argparse
from rdflib import URIRef
from rdflib.collection import Collection
from rdflib.graph import QuotedGraph
from sys import stdin
import logging
logging.getLogger().setLevel(logging.INFO)
parser = argparse.ArgumentParser(description='SemPipe Planner: Construct commands to build resource... | mit | 6,325,521,333,301,947,000 | 36.153846 | 146 | 0.708765 | false | 3.102784 | false | false | false |
yakinaround/myadventure-api | app/views/delorme.py | 1 | 5381 | """
Initialize adventure delorme controller
"""
import logging
import urllib2
import datetime
from pykml import parser
from flask import Blueprint, abort, request, jsonify
from werkzeug.exceptions import BadRequest
from app.decorators import crossdomain
from app.views.auth import OAUTH
from app.models.adventure impor... | apache-2.0 | -1,576,119,242,009,634,300 | 33.056962 | 91 | 0.549712 | false | 4.045865 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.