repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DaneelOliwan/dotfiles-vim | .vim/bundle/powerline/powerline/lib/vcs/mercurial.py | 1 | 1524 | # vim:fileencoding=utf-8:noet
from __future__ import absolute_import
from mercurial import hg, ui, match
class Repository(object):
__slots__ = ('directory', 'ui')
statuses = 'MARDUI'
repo_statuses = (1, 1, 1, 1, 2)
repo_statuses_str = (None, 'D ', ' U', 'DU')
def __init__(self, directory):
self.directory = d... | gpl-2.0 | 5,757,095,985,155,974,000 | 28.882353 | 75 | 0.684383 | false | 3.14876 | false | false | false |
gtrdp/twitter-clustering | examples/clustering-handwritten.py | 1 | 3459 | print(__doc__)
from time import time
import numpy as np
import matplotlib.pyplot as plt
from sklearn import metrics
from sklearn.cluster import KMeans
from sklearn.datasets import load_digits
from sklearn.decomposition import PCA
from sklearn.preprocessing import scale
np.random.seed(42)
digits = load_digits()
data... | mit | -1,922,628,395,955,356,200 | 33.247525 | 76 | 0.635444 | false | 3.110612 | false | false | false |
fniksic/mister | src/mister/builder.py | 1 | 5072 | '''
Created on Mar 21, 2013
@author: fniksic
'''
from data import CoverabilityInstance, Transition, Interval
from mister.ast import Constraint
from mister.data import ReachabilityInstance
def build_problem_instance(program_node):
'''
Process node of the form Program(variables, rules, initial, target, invaria... | mit | -2,280,928,528,270,788,000 | 36.021898 | 126 | 0.648068 | false | 3.493113 | false | false | false |
axbaretto/beam | sdks/python/apache_beam/examples/streaming_wordcount_debugging_it_test.py | 5 | 4521 | #
# 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 us... | apache-2.0 | 2,522,499,625,863,726,600 | 35.168 | 80 | 0.709135 | false | 3.537559 | true | false | false |
becm/meson | mesonbuild/compilers/compilers.py | 1 | 38290 | # Copyright 2012-2019 The Meson development team
# 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 agree... | apache-2.0 | 2,358,479,463,119,432,700 | 37.991853 | 130 | 0.570384 | false | 3.973228 | false | false | false |
datasciencesg/knowledge-base | MOOC/Computer-Science-and-Python/Final Exam.py | 1 | 4248 | ### Final Exam
x = [2,1]
y = [2,1]
def jumpAndBackpedal(isMyNumber):
'''
isMyNumber: Procedure that hides a secret number.
It takes as a parameter one number and returns:
* -1 if the number is less than the secret number
* 0 if the number is equal to the secret number
* 1 if the number... | mit | -4,487,167,334,039,869,400 | 25.55 | 84 | 0.56403 | false | 3.554812 | false | false | false |
UT-CHG/PolyADCIRC | examples/run_framework/random_wall.py | 1 | 2145 | #! /usr/bin/env python
# import necessary modules
import polyadcirc.run_framework.domain as dom
import polyadcirc.run_framework.random_wall as rmw
import numpy as np
adcirc_dir = '/work/01837/lcgraham/v50_subdomain/work'
grid_dir = adcirc_dir + '/ADCIRC_landuse/Inlet/inputs/poly_walls'
save_dir = adcirc_dir + '/ADCIRC... | bsd-3-clause | -1,364,327,885,448,978,700 | 29.642857 | 84 | 0.711422 | false | 2.628676 | false | true | false |
xiaomatech/ops | controllers/cobbler.py | 1 | 3653 | #!/usr/bin/env python
# -*- coding:utf8 -*-
from library.cobbler import System, Profile
from configs import cobbler_config
class cobbler:
def help(self, req, resp):
h = '''
自动装机
把任务提交到cobbler 然后通过idrac或 ipmi重启机器执行任务
... | mit | -410,231,012,791,242,240 | 30.972477 | 68 | 0.544907 | false | 3.303318 | true | false | false |
taejoonlab/NuevoTx | MODtree/blast_tbl-to-gene_name_bits.py | 2 | 1231 | #!/usr/bin/env python3
import sys
import gzip
filename_tbl = sys.argv[1]
name_bits = dict()
f_tbl = open(filename_tbl, 'r')
if filename_tbl.endswith('.gz'):
f_tbl = gzip.open(filename_tbl, 'rt')
for line in f_tbl:
if line.startswith('#'):
continue
tokens = line.strip().split("\t")
q_name = t... | apache-2.0 | 2,327,587,298,146,024,400 | 30.564103 | 83 | 0.58489 | false | 2.753915 | false | false | false |
openmichigan/PSNM | Magnetohydrodynamics/Programs/Magnetohydrodynamics3D.py | 1 | 14217 | #!/usr/bin/env python
"""
A program to solve the 3D incompressible magnetohydrodynamics equations using the
implicit midpoint rule
The program is based on the Orszag-Patterson algorithm as documented on pg. 98
of C. Canuto, M.Y. Hussaini, A. Quarteroni and T.A. Zhang
"Spectral Methods: Evolution to Complex Geometri... | bsd-2-clause | -2,525,255,152,426,498,000 | 31.986079 | 93 | 0.688964 | false | 2.113738 | false | false | false |
lukaselmer/hierarchical-paragraph-vectors | code/lda_run.py | 1 | 4999 | import os
import time
import gensim
from gensim.interfaces import TransformedCorpus
from nltk.corpus import stopwords
from helpers.log_config import setup_logger, log_to_info
from helpers.random_helper import init_random
from models.data_preparer import DataPreparer
from models.model_parameters import ModelParameters
... | mit | 1,291,792,113,084,912,600 | 37.160305 | 140 | 0.675935 | false | 3.389153 | false | false | false |
tkerola/chainer | examples/image_captioning/predict.py | 7 | 3012 | #!/usr/bin/env python
import argparse
import glob
import os
import numpy as np
from PIL import Image
import chainer
from chainer import serializers
import datasets
from model import ImageCaptionModel
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--img', type=str,
... | mit | -1,051,142,676,440,670,300 | 34.435294 | 79 | 0.603254 | false | 3.686659 | false | false | false |
jwmueller/OptimalIntervention | my_predictive_gradients.py | 1 | 1441 | import numpy as np
import GPy
from GPy import kern
from GPy.core.model import Model
from GPy.core.mapping import Mapping
from GPy import likelihoods
import logging
import warnings
def my_predictive_gradient(Xnew, GPmodel, test_point, kern=None):
"""
Returns gradients of predictive mean, variance, and c... | mit | 7,877,979,405,394,616,000 | 42.69697 | 133 | 0.651631 | false | 3.065957 | false | false | false |
whelan957/leetcode | python3/Tree/leetcode543. Diameter of Binary Tree.py | 1 | 1162 | # Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.
# Example:
# Given a binary tree
# 1
# / \
# 2 3
# / \ ... | gpl-3.0 | -8,116,250,849,671,473,000 | 30.405405 | 227 | 0.589501 | false | 3.43787 | false | false | false |
dhh1128/lect | parsers/ply/parser.py | 1 | 1551 | import ply.lex as lex
# reserved words
reserved = 'if|then|else|while|for|class|func|try|catch|return|use|as'
x = {}
for word in reserved.split('|'):
x[word] = word.upper()
reserved = x
del(x)
# List of token names.
tokens = 'ID|ASSIGN|DOT|NUMBER|COLON|PLUS|MINUS|TIMES|DIVIDE|CPP_COMMENT|LPAREN|RPAREN|LANGL|RANGL|L... | apache-2.0 | 4,354,295,562,122,532,000 | 20.859155 | 127 | 0.591876 | false | 2.513776 | false | false | false |
meihuanyu/rental | ipproxytool/spiders/proxy/xicidaili.py | 1 | 1705 | #-*- coding: utf-8 -*-
from proxy import Proxy
from .basespider import BaseSpider
from scrapy.selector import Selector
class XiCiDaiLiSpider(BaseSpider):
name = 'xici'
def __init__(self, *a, **kw):
super(XiCiDaiLiSpider, self).__init__(*a, **kw)
self.urls = ['http://www.xicidaili.com/nn/%s'... | mit | -4,770,835,787,292,391,000 | 34.520833 | 111 | 0.517302 | false | 3.403194 | false | false | false |
ernest21/Docfiles | .conky/spotify-display/spotify_getinfo_wine.py | 1 | 1346 | #!/usr/bin/python2
import os
import feedparser
import urllib2
file_data =open(os.getenv('HOME') + '/.conky/spotify-display/data_wine.txt', 'r')
data = file_data.read().split('\n')
def perfect_length(str):
if len(str) > 16:
return str[:14] + '...'
else:
return str
playing_artist = data[1]
playing_song = ... | gpl-2.0 | 9,186,886,114,398,344,000 | 31.071429 | 138 | 0.650817 | false | 2.810021 | false | false | false |
serge-sans-paille/pythran | pythran/types/reorder.py | 1 | 4392 | """ Reorder top-level functions to prevent circular type dependencies. """
import gast as ast
import networkx as nx
from pythran.analyses import OrderedGlobalDeclarations
from pythran.passmanager import Transformation
from pythran.syntax import PythranSyntaxError
from pythran.types.type_dependencies import TypeDepe... | bsd-3-clause | -3,529,849,042,711,641,600 | 36.220339 | 79 | 0.569217 | false | 4.436364 | false | false | false |
openflint/matchstick-settings-firefox | lib/test/ssdp_client.py | 1 | 1519 | import socket
def _encode_len(n):
r = ''
if n >= 268435456:
r = r + chr(((n >> 28) & 0x7f) | 0x80)
pass
if n >= 2097152:
r = r + chr(((n >> 21) & 0x7f)| 0x80)
pass
if n >= 16384:
r = r + chr(((n >> 14) & 0x7f)| 0x80)
pass
if n >= 128:
r = r + c... | apache-2.0 | 8,967,323,920,869,512,000 | 20.714286 | 59 | 0.494404 | false | 2.844569 | false | false | false |
gstiebler/odemis | scripts/demo_overlay.py | 2 | 7703 | # -*- coding: utf-8 -*-
"""
Created on 11 Feb 2014
@author: Kimon Tsitsikas
Copyright © 2012-2013 Kimon Tsitsikas, Delmic
This script acquires a CCD and SEM image with the current settings and uses
FindOverlay module to generate the overlay image of them.
run as:
python demo_overlay.py --repetitions_x 4 --repetitio... | gpl-2.0 | 5,944,310,961,613,674,000 | 31.774468 | 123 | 0.63477 | false | 3.607494 | false | false | false |
pdxrunner/geode | ci/pipelines/render.py | 1 | 4344 | #!/usr/bin/env python3
#
# 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 "L... | apache-2.0 | -949,360,392,428,923,900 | 44.25 | 213 | 0.712247 | false | 3.871658 | false | false | false |
fire-uta/iiix-data-parser | session_time_slice.py | 1 | 3704 | from datetime import timedelta
from acts_as_session import ActsAsSession
class SessionTimeSlice(ActsAsSession):
def __init__(self, session, start_msecs, length_msecs, preceding_slice=None):
ActsAsSession.__init__(self, session.user, session.topic, session.condition)
self.session = session
self.start_ms... | mit | 4,761,061,595,859,281,000 | 38.827957 | 127 | 0.707343 | false | 3.445581 | false | false | false |
josephsuh/extra-specs | nova/api/openstack/compute/views/servers.py | 1 | 7868 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010-2011 OpenStack LLC.
# Copyright 2011 Piston Cloud Computing, 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 o... | apache-2.0 | 1,521,041,575,632,663,800 | 35.595349 | 78 | 0.531774 | false | 4.542725 | false | false | false |
aoeftiger/tunespreadtool | tunespreadtool/parameter-table.py | 1 | 1315 | import numpy as np
from os import system as ex
def go_through_table(twiss_files, table, lshape):
labels = ' --labels '
for actualsetting in table[1:]:
flags = ''
for i in xrange(len(table[0])):
flags += ' --' + table[0][i] + ' ' + str(actualsetting[i])
ex('python tunespread.... | apache-2.0 | 4,428,357,243,362,774,000 | 27.586957 | 82 | 0.532319 | false | 2.504762 | false | false | false |
seewindcn/tortoisehg | src/mercurial/demandimport.py | 1 | 9674 | # demandimport.py - global demand-loading of modules for Mercurial
#
# Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''
demandimport - automatic demandloading of modules
To e... | gpl-2.0 | 6,394,250,094,706,763,000 | 33.304965 | 80 | 0.569981 | false | 4.184256 | false | false | false |
blixt/storyteller | src/storyteller/view.py | 1 | 7111 | # -*- coding: utf-8 -*-
#
# Copyright © 2010 Andreas Blixt
#
# This file is part of Storyteller.
#
# Storyteller 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 opt... | gpl-3.0 | -6,571,203,865,050,592,000 | 32.380282 | 79 | 0.621097 | false | 4.44375 | false | false | false |
RUBi-ZA/MODE-TASK | internal_pca.py | 1 | 8282 | #!/usr/bin/env python
#filename: internal_pca.py
import os
import sys
import argparse
import mdtraj as md
import numpy as np
from sklearn.decomposition import PCA, KernelPCA, IncrementalPCA
from sklearn.metrics import euclidean_distances
from itertools import combinations
from lib.write_plot import write_plots, write_... | gpl-3.0 | -6,552,993,024,261,427,000 | 32.942623 | 223 | 0.598406 | false | 3.368036 | false | false | false |
wodo/WebTool3 | webtool/server/models/fitness.py | 1 | 2581 | # -*- coding: utf-8 -*-
from django.db import models
from .mixins import SeasonsMixin
from .category import Category
from .time_base import TimeMixin
from . import fields
# requirements to the level of physical fitness
class FitnessManager(models.Manager):
def get_by_natural_key(self, order):
return se... | bsd-2-clause | -2,135,083,415,594,377,700 | 25.336735 | 78 | 0.658272 | false | 3.692418 | false | false | false |
BackupTheBerlios/kimchi | src/ui/mvc/view/EntryListTableView.py | 1 | 2894 | # coding: utf-8
'''
Copyright (c) 2010, Alexandru Dancu
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of condit... | bsd-3-clause | -7,306,051,667,354,684,000 | 40.942029 | 88 | 0.72322 | false | 4.472952 | false | false | false |
Toofifty/Oracle2 | oracle/db.py | 1 | 2205 | #!/user/bin/env python
"""
Oracle 2.0 IRC Bot
db.py
http://oracle.toofifty.me/
"""
import user
import sqlite3, time
CON = sqlite3.connect('../data/data.db')
CON.row_factory = sqlite3.Row
CUR = CON.cursor()
def init():
with CON:
CUR.execute(
'CREATE TABLE users(nick TEXT, last_nick TEXT, seen... | mit | 1,202,319,922,533,187,300 | 22.967391 | 80 | 0.505669 | false | 3.868421 | false | false | false |
socrocket/trap-gen | processors/LEON2/LEONIsa.py | 1 | 145662 | ################################################################################
#
# _/_/_/_/_/ _/_/_/ _/ _/_/_/
# _/ _/ _/ _/_/ _/ _/
# _/ _/ _/ _/ _/ _/ _/
# _/ _/_/_/ _/_/_/_/ _/_/_/
# _/ _/ _/ _/ _/ _/
# ... | gpl-3.0 | -2,777,827,590,479,539,700 | 42.069781 | 232 | 0.674946 | false | 2.50666 | false | false | false |
borh/jsrs | jsrs/users/urls.py | 1 | 1364 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
from . import views
urlpatterns = [
# URL pattern for the UserListView
url(
regex=r'^$',
view=views.UserListView.as_view(),
name='list'
),
# URL pattern for the U... | mit | -6,921,644,834,927,488,000 | 21 | 56 | 0.546921 | false | 3.589474 | false | false | false |
gizmag/django-generic-follow | generic_follow/migrations/0001_initial.py | 1 | 1034 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
... | mit | 6,522,978,828,336,845,000 | 33.466667 | 114 | 0.592843 | false | 4.515284 | false | false | false |
whoflungpoop/badbot | plugins/comic.py | 3 | 5812 | #comic.py almost entirely by https://github.com/nekosune/WeedBot
#modified for yosbot by craisins
import os
import random
import base64
import requests
import time
import json
from util import hook, http
from random import shuffle
from PIL import Image, ImageDraw, ImageFont
comic_cache = {}
comic_cache_buffer_size ... | unlicense | -6,570,085,615,549,612,000 | 28.065 | 137 | 0.551789 | false | 3.005171 | false | false | false |
tetframework/tet_raven | setup.py | 1 | 1530 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division,\
print_function, unicode_literals
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.t... | bsd-3-clause | 1,721,597,984,157,268,500 | 33.772727 | 100 | 0.613072 | false | 3.873418 | false | true | false |
F5Networks/f5-ansible | ansible_collections/f5networks/f5_modules/tests/unit/modules/network/f5/test_bigip_interface.py | 2 | 5723 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2019, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 | 4,820,208,353,773,933,000 | 32.080925 | 114 | 0.592347 | false | 3.747872 | true | false | false |
openatx/uiautomator2 | tests/test_settings.py | 1 | 1436 | # coding: utf-8
#
import uiautomator2 as u2
import pytest
import logging
import time
def test_set_xpath_debug(sess):
with pytest.raises(TypeError):
sess.settings['xpath_debug'] = 1
sess.settings['xpath_debug'] = True
assert sess.settings['xpath_debug'] == True
assert sess.xpath.logger.le... | mit | -2,454,929,630,281,749,500 | 23.344828 | 62 | 0.618272 | false | 3.103297 | false | false | false |
hawkphantomnet/leetcode | SudokuSolver/Solution.py | 1 | 1470 | class Solution(object):
def __init__(self):
self.digits = "123456789"
def isValid(self, board, a, b):
r = len(board)
if r == 0:
return False
c = len(board[0])
for i in range(0, r):
if i != a and board[i][b] == board[a][b]:
... | mit | -5,374,306,399,419,820,000 | 30.666667 | 84 | 0.391156 | false | 3.951613 | false | false | false |
aquaya/pipeline | application/schedule_controllers.py | 1 | 20238 | ''' schedule_controllers
routes related to schedules
'''
import datetime
import json
from flask import (render_template, request, flash, redirect, url_for, session
, abort)
from redis import Redis
from rq import use_connection, Queue
from rq.job import Job
from rq_scheduler import Scheduler
from application impor... | mit | -5,116,270,736,682,399,000 | 42.710583 | 79 | 0.525991 | false | 4.856731 | true | false | false |
Shalantor/Connect4 | server/serverUtils.py | 1 | 9209 | #This file contains various functions to be used by the server for saving
#data, processing passwords and calculating a players elo
import string,random,smtplib
import uuid,hashlib,sqlite3,re
from email.mime.text import MIMEText
MINIMUM_GAMES = 10
#Insert users in database that decided to log in with game client
def ... | mit | -4,929,745,853,940,601,000 | 30.537671 | 97 | 0.651971 | false | 3.932109 | false | false | false |
joelarmstrong/analysis-purgatory | get_signatures.py | 1 | 2924 | #!/usr/bin/env python
from argparse import ArgumentParser
from subprocess import check_output
import itertools
import sys
from sonLib.bioio import fastaRead
def kmers(iterable, k):
iters = itertools.tee(iterable, k)
for i, iter in enumerate(iters):
for _ in xrange(i):
next(iter, None)
... | mit | -3,854,701,229,094,158,000 | 33.809524 | 88 | 0.520178 | false | 3.972826 | false | false | false |
ubccr/tacc_stats | analyze/process_pickles/userjobs.py | 1 | 1453 | #!/usr/bin/env python
import analyze_conf
import sys
import datetime, glob, job_stats, os, subprocess, time
import numpy
import scipy, scipy.stats
import argparse
import re
import multiprocessing
import functools
import tspl, tspl_utils, masterplot
def getuser(file,user,output_dir):
try:
ts=tspl.TSPLBase(file,['... | lgpl-2.1 | -4,517,136,979,816,043,500 | 30.586957 | 80 | 0.64969 | false | 3.501205 | false | false | false |
CERN/TIGRE | Python/tigre/utilities/plotproj.py | 1 | 8112 | from __future__ import print_function
import matplotlib
import matplotlib.animation as animation
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.axes_grid1 import make_axes_locatable
class plotProj:
# NOTE: type help(plotImg) after importing in order to get a readable manual.
... | bsd-3-clause | 808,284,138,760,631,600 | 31.110204 | 92 | 0.455498 | false | 3.803094 | false | false | false |
thisisshi/cloud-custodian | c7n/resolver.py | 2 | 6354 | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
import csv
import io
import jmespath
import json
import os.path
import logging
import itertools
from urllib.request import Request, urlopen
from urllib.parse import parse_qsl, urlparse
import zlib
from contextlib import closing
from c7n.uti... | apache-2.0 | -964,487,266,133,734,100 | 31.752577 | 85 | 0.559805 | false | 4.139414 | false | false | false |
linuxlizard/q60 | hist.py | 1 | 1241 | #!/usr/bin/python
# Draw a multiple histogram on same plt. Great for comparing before/after image
# manipulations.
# davep 10-Nov-2011
import sys
import numpy as np
import Image
import matplotlib.pyplot as plt
def multiple_histograms( infilename_list ) :
if len(infilename_list)==1 :
histtype="bar"
... | apache-2.0 | -4,698,741,175,045,290,000 | 23.333333 | 83 | 0.629331 | false | 3.46648 | false | false | false |
Elico-Corp/odoo-addons | project_timesheet_task_id/project_timesheet_task_id.py | 1 | 1114 | # -*- coding: utf-8 -*-
# © 2016-2017 Elico Corp (https://www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, api, fields
class ProjectWork(models.Model):
_inherit = 'project.task.work'
@api.model
def create(self, vals):
"""
... | agpl-3.0 | -8,897,850,142,109,559,000 | 27.538462 | 68 | 0.5885 | false | 3.544586 | false | false | false |
wx-ast/django-seo | regressiontests/userapp/models.py | 1 | 1514 | from django.db import models
from django.urls import reverse
class Page(models.Model):
title = models.CharField(max_length=255, default="", blank=True)
type = models.CharField(max_length=50, default="", blank=True)
content = models.TextField(default="", blank=True)
def get_absolute_url(self):
... | bsd-3-clause | -2,764,966,357,402,977,300 | 27.566038 | 82 | 0.659841 | false | 3.692683 | false | false | false |
sravanti/UVisa | visas/models.py | 1 | 1999 | from django.db import models
from django.contrib.auth.models import User
NUM_QUESTIONS = 50
class Answer(models.Model):
answer_text = models.TextField(blank=True, null=True)
transcription = models.TextField(blank=True, null=True)
audio = models.FileField(upload_to="audio/%Y/%m/%d", blank=True, null=True)
... | mit | -3,698,068,432,033,988,600 | 34.696429 | 85 | 0.572286 | false | 3.874031 | false | false | false |
alexandrudaia/InferentialThings | conditioning.py | 1 | 2749 | class conditional_probs(object):
def __init__(self,data):
self.data=np.array(data)#ads toy data table which shuld be np.array
self.cats=[{} for col in range(self.data.shape[1]-1)]
""" in cats are storing conditionals for each row .It is a list with empty dictionaries for each feat... | mit | 8,909,249,949,491,145,000 | 56.270833 | 121 | 0.659513 | false | 2.878534 | false | false | false |
nicholasserra/sentry | src/sentry/web/frontend/generic.py | 2 | 1354 | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.web.helpers imp... | bsd-3-clause | 4,675,398,548,476,602,000 | 27.208333 | 81 | 0.633678 | false | 3.868571 | false | false | false |
walchko/pygecko | retired/old_version/original/example/servers/Vision.py | 1 | 3619 | #!/usr/bin/env python
#
# Kevin J. Walchko 11 Nov 2014
#
from __future__ import print_function
from __future__ import division
import pygecko.ZmqClass as zmq
from pygecko import Messages as Msg
# import multiprocessing as mp
# import logging
import datetime as dt
# import cv2
import argparse
from opencvutils.video imp... | mit | -8,448,330,065,122,140,000 | 33.141509 | 150 | 0.644101 | false | 3.02592 | false | false | false |
FescueFungiShare/hydroshare | hs_access_control/migrations/0006_auto_add_new_fields.py | 3 | 3235 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('hs_core... | bsd-3-clause | 8,085,855,745,690,660,000 | 43.930556 | 165 | 0.627202 | false | 3.998764 | false | false | false |
bendaf/diff_drive_entropy | EntropicRobot/main_race.py | 1 | 4131 | import pygame
import sys
from PIL import Image # Python Imaging Library
from vector_math import Vector2
pygame.init()
# load map with PIL
image_filename = "track_new_3.bmp"
#image_filename = "empty.bmp"
class Environment:
def __init__(self):
img = Image.open(image_filename)
self.track = img.loa... | gpl-2.0 | 5,941,496,942,344,517,000 | 28.098592 | 93 | 0.572743 | false | 3.328767 | false | false | false |
pierg75/pier-sosreport | sos/plugins/omsa.py | 2 | 2164 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but... | gpl-2.0 | -2,802,534,732,333,992,000 | 39.830189 | 73 | 0.659427 | false | 3.630872 | false | false | false |
nicolatalin/rsas | src/lib/artifactrule.py | 1 | 1474 | from .artifactfspath import ArtifactFsPath
from .regkey import RegKey
from .artifactfound import ArtifactFound
class ArtifactRule:
def __init__(self, record):
self.__path = record['path']
self.__type = record['type']
self.__val = record['val']
self.__searchresults = None
def ... | gpl-3.0 | 7,577,437,310,250,614,000 | 29.708333 | 72 | 0.540706 | false | 4.309942 | false | false | false |
jacobboon/subtitle-wordcounter | subtitle-wordcounter.py | 1 | 6902 |
# coding: utf-8
"""
Copyright 2015 Jacob Boon
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 ... | apache-2.0 | -4,533,698,518,424,355,300 | 27.403292 | 159 | 0.575051 | false | 3.615506 | false | false | false |
polentozer/testing_0 | smooth-integer.py | 1 | 1718 | #######################################################################
# Script for detecting integers in dataset and taking values before #
# and after to calculate average and substitute the integer. #
# Intended use - fixing datasets from Tecan instruments, where #
# function-like output is expect... | mit | 7,737,294,951,916,452,000 | 30.814815 | 76 | 0.555879 | false | 3.49187 | false | false | false |
ryfx/modrana | core/bundle/upoints/osm.py | 2 | 20547 | #
# vim: set sw=4 sts=4 et tw=80 fileencoding=utf-8:
#
"""osm - Imports OpenStreetMap data files"""
# Copyright (C) 2007-2010 James Rowe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either... | gpl-3.0 | 4,900,804,274,409,517,000 | 37.371963 | 655 | 0.557114 | false | 3.405042 | false | false | false |
rdhyee/osf.io | api/search/serializers.py | 1 | 1567 | from api.base.serializers import (
JSONAPISerializer
)
from api.base.utils import absolute_reverse
from api.files.serializers import FileSerializer
from api.nodes.serializers import NodeSerializer
from api.registrations.serializers import RegistrationSerializer
from api.users.serializers import UserSerializer
from... | apache-2.0 | 9,036,509,074,583,429,000 | 33.065217 | 86 | 0.690491 | false | 4.705706 | false | false | false |
franklingu/leetcode-solutions | questions/container-with-most-water/Solution.py | 1 | 1127 | '''
Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
Note: You ma... | mit | 1,657,445,988,663,595,500 | 28.657895 | 302 | 0.61047 | false | 3.364179 | false | false | false |
GNOME/jhbuild | jhbuild/utils/compat.py | 1 | 2180 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-2.0 | -2,886,103,341,778,747,000 | 26.607595 | 75 | 0.641743 | false | 4.067164 | false | false | false |
bucaojit/MyLists | Cache/mongo_connector.py | 2 | 3906 | '''
@author: oliver
'''
# 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 (... | apache-2.0 | -1,351,589,393,017,209,000 | 36.557692 | 127 | 0.645417 | false | 3.913828 | false | false | false |
jobiols/odoo-addons | product_price_update/wizard/price_update.py | 1 | 7834 | from odoo import fields, models, api, _
from odoo.exceptions import UserError
class ProductPriceUpdate(models.TransientModel):
_name = 'product.price.update'
category_filter = fields.Boolean(
help="Determina si se va a filtrar por categorias",
string='Filtrar por categorías',
)
catego... | agpl-3.0 | 3,572,539,413,888,016,000 | 31.625 | 81 | 0.555428 | false | 3.882003 | false | false | false |
buzzsurfr/f5-bigsuds-utils | bigip-active.py | 1 | 1302 | #!/usr/bin/env python
#
# bigip_active: Connects to the active member of a Device Group regardless of
# the original hostname.
__author__ = 'buzzsurfr'
__version__ = '0.1'
# Standard Library
import sys
import itertools
# Related Third-Party
import getpass
# Local Application/Library Specific
import bigsuds
de... | gpl-3.0 | -7,807,420,128,219,783,000 | 35.166667 | 152 | 0.722734 | false | 3.17561 | false | false | false |
brainbots/assistant | assistant/keyboard/ui/keyboard_ui.py | 1 | 5127 | # -*- coding: utf-8 -*-
import settings
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import QFont
from .components import FlashingBox
class Ui_KeyboardWindow(object):
def setupUi(self, KeyboardWindow):
KeyboardWindow.setObjectName("KeyboardWindow")
KeyboardWindow.resize(769, 506)
... | apache-2.0 | 1,280,198,220,635,584,300 | 47.367925 | 108 | 0.688317 | false | 3.91673 | false | false | false |
PiJoules/ocr-project | ocr/extract.py | 1 | 21244 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
import cv2
import matplotlib.pyplot as plt
import numpy as np
import logging
from ocr.utils import (default_background_threshold,
grayscale_to_black_and_white, transform, show_img)
from collections i... | unlicense | 6,956,830,500,266,094,000 | 36.6 | 90 | 0.596498 | false | 4.072072 | false | false | false |
Floobits/floobits-neovim-old | plugin/floobits.py | 1 | 20296 | # coding: utf-8
import os
import os.path
import json
import re
import traceback
import atexit
import subprocess
import webbrowser
import uuid
import binascii
import imp
from functools import wraps
try:
unicode()
except NameError:
unicode = str
try:
import urllib
urllib = imp.reload(urllib)
from ur... | apache-2.0 | 6,267,606,468,700,764,000 | 30.861852 | 144 | 0.628794 | false | 3.44 | false | false | false |
cameronlai/ZemoteHost | gui/serialToolBar.py | 1 | 2852 | # This file is part of ZemoteHost.
#
# ZemoteHost is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ZemoteHost is distributed in th... | gpl-3.0 | 4,804,683,927,423,674,000 | 38.611111 | 116 | 0.639551 | false | 3.787517 | false | false | false |
9and3r/RPi-InfoScreen-Kivy | screens/londonbus/screen.py | 4 | 6429 | import os
import sys
import re
from kivy.clock import Clock
from kivy.uix.label import Label
from kivy.uix.togglebutton import ToggleButton
from kivy.uix.screenmanager import Screen
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.stacklayout import StackLayout
from kivy.uix.scrollview import ScrollView
from kiv... | gpl-3.0 | 7,527,171,428,648,644,000 | 33.196809 | 77 | 0.598227 | false | 3.797401 | false | false | false |
bongo-project/bongo | src/apps/storetool/bongo/storetool/StoreCommands.py | 1 | 3712 | import logging
import string
import sys
from gettext import gettext as _
import tarfile
from bongo.cmdparse import Command
from bongo.BongoError import BongoError
from bongo.store.StoreClient import DocTypes, StoreClient
class DocumentListCommand(Command):
log = logging.getLogger("Bongo.StoreTool")
def __in... | gpl-2.0 | 6,902,562,952,750,409,000 | 31.561404 | 130 | 0.533675 | false | 4.296296 | false | false | false |
hivesolutions/netius | src/netius/servers/smtp.py | 1 | 16962 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Hive Netius System
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Netius System.
#
# Hive Netius System is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apache
# Foun... | apache-2.0 | -1,119,657,513,592,083,700 | 33.780591 | 93 | 0.599528 | false | 3.851045 | false | false | false |
DEV3L/python-files-by-date | test/integration_test/test_integration_files_service.py | 1 | 2016 | import datetime
import os
import shutil
from unittest import TestCase
from files_by_date.service.files_service import FilesService, Count
from test.integration_test import RESOURCES_INPUT_DIR
class TestIntegrationFilesService(TestCase):
# TEST_DIR = f'.{os.sep}resources{os.sep}target_dir{os.sep}{datetime.datetim... | mit | 494,452,791,134,321,600 | 42.826087 | 116 | 0.678571 | false | 3.775281 | true | false | false |
oregoncountryfair/ocfnet | ocfnet/test.py | 1 | 1067 | import os
from datetime import datetime
from flask.ext.testing import TestCase
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from ocfnet import create_app, database
class OCFNetTest(TestCase):
def create_app(self):
return create_app(True)
def setUp(se... | mit | 7,771,729,743,491,653,000 | 32.34375 | 72 | 0.619494 | false | 4.217391 | true | false | false |
NLeSC/embodied-emotions-scripts | embem/machinelearning/rakel.py | 1 | 2524 | """Class to create RAKEL classifier
"""
from itertools import combinations
from math import factorial
import numpy as np
from sklearn.base import BaseEstimator, ClassifierMixin, clone
from sklearn.utils.random import check_random_state, choice
def _binomial(n, k):
return factorial(n) // (factorial(k) * factoria... | apache-2.0 | 9,196,386,134,906,928,000 | 36.117647 | 100 | 0.575277 | false | 3.883077 | false | false | false |
rdnetto/entropy | lib/entropy/core/settings/plugins/skel.py | 6 | 5612 | # -*- coding: utf-8 -*-
"""
@author: Fabio Erculiani <lxnay@sabayon.org>
@contact: lxnay@sabayon.org
@copyright: Fabio Erculiani
@license: GPL-2
B{Entropy Framework SystemSettings stub classes module}.
SystemSettingsPlugin is the base class for building valid SystemSettings
plugin modules... | gpl-2.0 | -6,558,760,054,922,080,000 | 33.429448 | 80 | 0.629366 | false | 4.6 | false | false | false |
mferenca/HMS-ecommerce | ecommerce/coupons/views.py | 1 | 10562 | from __future__ import unicode_literals
import csv
import logging
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.utils.decorators ... | agpl-3.0 | 3,626,627,706,327,688,000 | 38.118519 | 188 | 0.645616 | false | 4.130622 | false | false | false |
ollitapa/VTT-Raytracer | python_source/Rayfile readers/readBinLightToolsRay.py | 1 | 2393 | #
# Copyright 2015 VTT Technical Research Center of Finland
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | -5,465,975,563,287,441,000 | 29.291139 | 74 | 0.558295 | false | 3.17374 | false | false | false |
SCOAP3/scoap3 | bibsched_tasklets/bst_doi_timestamp.py | 1 | 5092 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014, 2017 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 opt... | gpl-2.0 | 7,913,548,749,566,829,000 | 45.715596 | 137 | 0.552435 | false | 3.684515 | false | false | false |
revoer/keystone-8.0.0 | swift/common/db_replicator.py | 4 | 36697 | # Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 agree... | apache-2.0 | -8,675,425,817,901,821,000 | 42.738975 | 79 | 0.556204 | false | 4.230689 | false | false | false |
batxes/4Cin | Six_mouse_models/Six_mouse_models_final_output_0.2_-0.1_11000/Six_mouse_models11017.py | 2 | 18199 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 | 2,143,972,119,882,560,800 | 45.307888 | 71 | 0.699544 | false | 2.672001 | false | false | false |
chen2aaron/SnirteneCodes | PythonCookbookPractise/chapter7/inline_callback_func.py | 1 | 1167 | # 7.11. Inlining Callback Functions
def apply_async(func, args, *, callback):
# Compute the result
result = func(*args)
# Invoke the callback with the result
callback(result)
from queue import Queue
from functools import wraps
class Async(object):
def __init__(self, func, args):
self.f... | gpl-2.0 | -4,609,593,548,467,029,500 | 19.12069 | 70 | 0.560411 | false | 3.681388 | false | false | false |
jmbeuken/abinit | scripts/pre_processing/Cell2Abinit.py | 4 | 3431 | #! /usr/bin/python
####################################################################
# MaterialsStudio Cell File To Abinit Config file Converter
# zhoubo
# 2006.9.26
####################################################################
import sys
import re
if __name... | gpl-3.0 | -2,556,894,164,815,270,000 | 29.633929 | 102 | 0.416205 | false | 3.273855 | false | false | false |
oblique-labs/pyVM | rpython/jit/backend/arm/locations.py | 1 | 3975 | from rpython.jit.metainterp.history import INT, FLOAT
from rpython.jit.backend.arm.arch import WORD, DOUBLE_WORD, JITFRAME_FIXED_SIZE
class AssemblerLocation(object):
_immutable_ = True
type = INT
def is_imm(self):
return False
def is_stack(self):
return False
def is_raw_sp(self)... | mit | -6,392,704,134,426,884,000 | 20.486486 | 80 | 0.576604 | false | 3.767773 | false | false | false |
ruipgpinheiro/subuser | logic/subuserCommands/subuser-pkg.py | 1 | 8735 | #!/usr/bin/env python
# This file should be compatible with both Python 2 and 3.
# If it is not, please file a bug report.
try:
import pathConfig
except ImportError:
pass
#external imports
import sys
import optparse
import json
import os
import copy
#internal imports
from subuserlib.classes.user import User
import... | lgpl-3.0 | -2,739,073,091,361,179,000 | 51.620482 | 315 | 0.716886 | false | 3.988584 | true | false | false |
aiace9/quantum_espresso_output_parser | regexp.py | 1 | 4159 | # util to regexp
unit = r'((?:Ry|a\.?u\.?|(?:b|B)ohr|\/|(?:a|A)ng|kbar|g|cm|ev)+'\
r'(?:\^|\*\*)?\d*)'
atoms_name = r'(?:C|H|O|N)'
# qe info
qe_info = dict(
r_PWSCF_version=r'^ *Program PWSCF (.+) starts',
r_close=r'JOB DONE')
# information of scf actually head informations
scf_input = dict(
r_pseu... | mit | 4,933,707,671,330,094,000 | 45.730337 | 79 | 0.454196 | false | 2.581626 | false | false | false |
BMJHayward/toga-gtk | toga_gtk/widgets/scrollcontainer.py | 1 | 1376 | from __future__ import print_function, absolute_import, division
from gi.repository import Gtk
from .base import Widget
class ScrollContainer(Widget):
def __init__(self, horizontal=True, vertical=True):
super(ScrollContainer, self).__init__()
self.horizontal = horizontal
self.vertical = ... | bsd-3-clause | 797,852,362,069,643,600 | 28.913043 | 107 | 0.617733 | false | 3.931429 | false | false | false |
edio/randrctl | randrctl/xrandr.py | 1 | 10440 | import os
from functools import reduce, lru_cache
import logging
import re
import subprocess
from randrctl import DISPLAY, XAUTHORITY
from randrctl.exception import XrandrException, ParseException
from randrctl.model import Profile, Viewport, XrandrConnection, Display
logger = logging.getLogger(__name__)
class Xra... | gpl-3.0 | 4,014,267,990,828,110,300 | 33.8 | 115 | 0.55182 | false | 3.924812 | false | false | false |
SimenB/thefuck | tests/rules/test_docker_login.py | 3 | 1480 | from thefuck.rules.docker_login import match, get_new_command
from thefuck.types import Command
def test_match():
err_response1 = """
Sending build context to Docker daemon 118.8kB
Step 1/6 : FROM foo/bar:fdb7c6d
pull access denied for foo/bar, repository does not exist or may require 'docker login'
"""
... | mit | -5,236,124,314,960,076,000 | 39 | 165 | 0.752703 | false | 2.857143 | false | false | false |
srimalik/pynfs | nfs4.0/servertests/st_acl.py | 1 | 1191 | from nfs4_const import *
from environment import check, checklist
from nfs4_type import nfsace4
# assuming server will accept any small positive integer as an owner name:
def testACL(t, env):
"""SETATTR/GETATTR of a simple ACL
FLAGS: acl all
DEPEND: LOOKFILE
CODE: ACL5
"""
c = env.c1
c.in... | gpl-2.0 | 4,424,036,127,409,363,500 | 23.8125 | 74 | 0.5911 | false | 2.876812 | false | false | false |
rtrajano/sphinx_rtfd | setup.py | 1 | 1514 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | bsd-3-clause | 8,555,990,243,394,540,000 | 24.677966 | 66 | 0.612946 | false | 3.813602 | true | false | false |
ultrabug/py3status | py3status/core.py | 1 | 40101 | import pkg_resources
import sys
import time
from collections import deque
from json import dumps
from pathlib import Path
from pprint import pformat
from signal import signal, SIGTERM, SIGUSR1, SIGTSTP, SIGCONT
from subprocess import Popen
from threading import Event, Thread
from syslog import syslog, LOG_ERR, LOG_INF... | bsd-3-clause | 939,860,897,817,102,000 | 37.264313 | 87 | 0.56046 | false | 4.339935 | true | false | false |
reedessick/eventSupervisor | notify/notify.py | 2 | 11269 | description = "a module housing notification and alerting checks for event_supervisor"
author = "reed.essick@ligo.org"
#---------------------------------------------------------------------------------------------------
from lvalertMP.lvalert.lvalertMPutils import sendEmail
import eventSupervisor.eventSupervisor... | mit | 7,459,463,444,181,025,000 | 36.069079 | 182 | 0.525158 | false | 4.707185 | false | false | false |
jgiannuzzi/pypi-server | pypi_server/handlers/api/users.py | 2 | 2057 | # encoding: utf-8
import re
from tornado.web import HTTPError
from pypi_server.db.users import Users
from pypi_server.handlers import route
from pypi_server.handlers.base import threaded
from pypi_server.handlers.api import JSONHandler
from pypi_server.handlers.api.login import authorization_required
LOGIN_EXP = re.c... | mit | -7,973,059,865,097,394,000 | 27.178082 | 65 | 0.485173 | false | 4.339662 | false | false | false |
sadsfae/misc-scripts | python/backup-file.py | 1 | 2520 | #!/usr/bin/env python
# simple encryption/archival tool
# tar and gpg encrypt a file or directory and copy it locally
# the local destination could be a remote share or rsync'd location
import argparse
import sys
import os
import datetime
# define optional verbose argument
parser=argparse.ArgumentParser()
parser.add_... | bsd-3-clause | -8,232,620,833,568,214,000 | 34 | 91 | 0.703968 | false | 3.631124 | false | false | false |
calexil/FightstickDisplay | pyglet/media/__init__.py | 1 | 5683 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# Copyright (c) 2008-2021 pyglet contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follo... | gpl-3.0 | -2,412,631,502,267,973,000 | 38.741259 | 100 | 0.705261 | false | 4.391808 | false | false | false |
nvbn/python-social-auth | social/tests/test_utils.py | 1 | 3895 | import sys
import unittest
from sure import expect
from social.utils import sanitize_redirect, user_is_authenticated, \
user_is_active, slugify, build_absolute_uri
PY3 = sys.version_info[0] == 3
class SanitizeRedirectTest(unittest.TestCase):
def test_none_redirect(self):
expec... | bsd-3-clause | -3,880,232,420,690,281,500 | 31.458333 | 76 | 0.606418 | false | 3.468388 | true | false | false |
opencobra/memote | scripts/update_mock_repo.py | 2 | 2474 | # -*- coding: utf-8 -*-
# Copyright 2019 Novo Nordisk Foundation Center for Biosustainability,
# Technical University of Denmark.
#
# 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... | apache-2.0 | 6,617,304,087,517,068,000 | 29.170732 | 76 | 0.679062 | false | 3.725904 | false | false | false |
y0va/hummingpy | install/config.py | 1 | 1800 | from platform import node
# CONSTANTS
#name of hive
HIVE=node()
#Length of the PCM to be recorded in minutes
LENGTH_PCM=1
#Downsamplerate in Hertz
DOWNSAMPLERATE=1
#How many values do we want to have? max=SAMPLERATE/(DOWNSAMPLERATE*2)
VALUES=500
#Samplingrate
SAMPLERATE=8000
#upload interval: 'm' each minute, 'h... | gpl-3.0 | 1,090,656,930,530,592,800 | 19.224719 | 89 | 0.750556 | false | 2.870813 | false | false | false |
ArcaniteSolutions/truffe2 | truffe2/accounting_tools/migrations/0014_auto__add_withdrawallogging__add_withdrawal__add_withdrawaltag__add_wi.py | 2 | 25063 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'WithdrawalLogging'
db.create_table(u'accounting_tools_wit... | bsd-2-clause | -7,348,445,428,752,103,000 | 78.821656 | 195 | 0.570602 | false | 3.636008 | false | false | false |
codingKilian/radarPython | endversionvollbildGroessereGeschwindigkeitsbereich.py | 1 | 14103 | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 22 10:27:34 2014
@author: s1105
"""
"""
Liest entweder ein Stereo- oder Audio-Signal ein, berechnet daraus mit Hilfe
der FFT die Geschwindigkeit. Diese wird in Form der aktuellen Geschwindigkeit
und als Plot der letzten 20 s auf einem Bildschirm ausgegeben. Der parallel... | gpl-3.0 | 4,610,349,335,144,572,000 | 35.533679 | 101 | 0.584669 | false | 3.086452 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.