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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eerotal/nsbcomp | nsbcomp/preprocessor.py | 1 | 5056 | #!/bin/python
# This file contains a C-like preprocessor implementation for the
# nsbcomp compiler.
import os
import errno
import os.path
import time
import re
import strutils
import cli
import sys
DIR_TMP_FALLBACK = 'tmp';
def init():
global DIR_TMP, PRE_KEYWORDS, INCLUDE_PATHS;
DIR_TMP = DIR_TMP_FALLBACK;
PRE... | bsd-3-clause | 990,218,194,065,392,800 | 21.672646 | 65 | 0.644778 | false | 2.734451 | false | false | false |
gk024kfd/gist_it | github.py | 1 | 1171 | import getpass
import os
import json
import requests
import uuid
class GithubException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class Github:
def get_credential(self,scopes,save_path):
if os.path.isfile(save_path):
... | mit | -1,795,090,270,502,833,200 | 26.880952 | 124 | 0.609735 | false | 3.68239 | false | false | false |
ludia/moto | moto/ec2/responses/availability_zones_and_regions.py | 14 | 1517 | from __future__ import unicode_literals
from moto.core.responses import BaseResponse
class AvailabilityZonesAndRegions(BaseResponse):
def describe_availability_zones(self):
zones = self.ec2_backend.describe_availability_zones()
template = self.response_template(DESCRIBE_ZONES_RESPONSE)
ret... | apache-2.0 | 6,361,233,404,006,131,000 | 36.925 | 113 | 0.675676 | false | 3.764268 | false | false | false |
pacificclimate/modelmeta | alembic/versions/12f290b63791_handle_variant_sampling_geometries.py | 1 | 7853 | """handle variant sampling geometries
Revision ID: 12f290b63791
Revises: 614911daf883
Create Date: 2018-03-01 17:08:12.325506
"""
from warnings import warn
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '12f290b63791'
down_revision = '614911daf883'
branch_labels ... | gpl-3.0 | -2,115,188,121,027,939,000 | 35.356481 | 129 | 0.628804 | false | 3.285774 | false | false | false |
yasserglez/pytiger2c | packages/pytiger2c/types/recordtype.py | 1 | 2660 | # -*- coding: utf-8 -*-
"""
Clase de la jerarquía de tipos de Tiger representando el tipo record.
"""
from pytiger2c.types.tigertype import TigerType
class RecordType(TigerType):
"""
Clase de la jerarquía de tipos de Tiger representando el tipo record.
"""
def _get_code_name(self):
"""
... | mit | 7,851,687,628,560,633,000 | 29.090909 | 96 | 0.591767 | false | 3.511936 | false | false | false |
jianajavier/pnc-cli | pnc_cli/licenses.py | 1 | 4255 | from pprint import pprint
import logging
from argh import arg
from six import iteritems
from pnc_cli import utils
from pnc_cli.swagger_client import LicenseRest
from pnc_cli.swagger_client import LicensesApi
licenses_api = LicensesApi(utils.get_api_client())
def _create_license_object(**kwargs):
created_license... | apache-2.0 | 5,580,857,809,884,284,000 | 30.992481 | 114 | 0.650999 | false | 3.652361 | false | false | false |
MerlijnWajer/TInance | stats.py | 1 | 3817 | #!/usr/bin/env python2
"""
This file is part of the TechInc Financial Administration
Copyright (c) 2014 by Merlijn Wajer
TInance is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or... | gpl-3.0 | -2,409,994,117,346,350,600 | 24.965986 | 77 | 0.632958 | false | 3.330716 | false | false | false |
seasonfif/python | learning/pyvisual-3d.py | 1 | 1281 | #!/usr/bin/env python
# coding=utf-8
# 科学计算模块
import numpy as np
# python可视化模块
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
np.random.seed(42)
# 采样个数500
n_samples = 500
dim = 3
# 先生成一组3维正态分布数据,数据方向完全随机
samples = np.random.multivariate_normal(
np.zeros(dim),
np.eye(dim),
n_sam... | apache-2.0 | 4,239,277,371,800,474,000 | 19.94 | 71 | 0.65043 | false | 1.883094 | false | false | false |
joysword/cs526.project1 | parseCTALines.py | 1 | 1160 | import csv
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
csvwrite = csv.writer(open('CHICAGO_DATA/CTARailLines.csv', 'wb'))
tree = ET.parse('CHICAGO_DATA/CTARailLines.kml')
root = tree.getroot()
start = root.find('Folder')
row=[]
count = 0
for segment in start... | mit | 7,541,995,523,310,591,000 | 20.090909 | 80 | 0.602586 | false | 2.473348 | false | false | false |
brsaylor/atn-tools | atntools/tree_range_plots.py | 1 | 4058 | import os
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
from atntools import settings
from atntools.trees import *
from atntools.tree_ranges import *
DEPENDENT_VAR = settings.DEFAULT_CLASS_ATTRIBUTE.replace('label_', '')
def plot_tree_ranges(tree_file, feature_file, output_dir):
... | gpl-3.0 | -3,526,402,085,154,594,300 | 37.283019 | 135 | 0.608181 | false | 3.629696 | false | false | false |
GeoMop/PythonOCC_Examples | src/glue_experiment.py | 1 | 4782 | from OCC.BRepFeat import BRepFeat_Gluer
from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox
from OCC.Display.SimpleGui import init_display
from OCC.LocOpe import LocOpe_FindEdges
from OCC.TopAbs import TopAbs_FACE
from OCC.TopExp import TopExp_Explorer
from OCC.TopLoc import TopLoc_Location
from OCC.TopoDS import topods_Fa... | gpl-2.0 | -4,653,485,016,213,815,000 | 27.634731 | 92 | 0.643455 | false | 3.099157 | false | false | false |
braams/shtoom | shtoom/doug/source.py | 1 | 3156 | import sys
class Source(object):
"A Source object is a source and sink of audio data"
# Can this Source handle DMTF?
wantsDTMF = False
def __init__(self):
self.leg = None
def getLeg(self):
return self.leg
def isPlaying(self):
return NotImplementedError
def isRec... | lgpl-2.1 | -1,632,496,209,778,878,500 | 23.091603 | 83 | 0.555767 | false | 4.2249 | false | false | false |
sostenibilidad-unam/abm2 | abmpy/LimitMatrix.py | 1 | 1296 | import pandas as pd
class LimitMatrix:
def __init__(self, csv_path):
df = pd.read_csv(csv_path, encoding="utf-8")
firstCriteriaRow = [i for i, x in enumerate(df.ix[:,0]) if "nan" not in str(x)][1] #the index of the second non null cell in first column
self.alternative_names = df.... | gpl-3.0 | -6,597,105,333,392,271,000 | 50.84 | 148 | 0.63966 | false | 3.23192 | false | false | false |
datakid/tvet | tafe/migrations/0006_auto__add_field_attendance_session__add_field_attendance_student.py | 1 | 9590 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Attendance.session'
db.add_column('tafe_attendance', 'session',
self.g... | gpl-3.0 | -7,678,748,335,600,907,000 | 62.509934 | 205 | 0.543483 | false | 3.628453 | false | false | false |
idnael/ctxsearch | ctxsearch/modfiles.py | 1 | 5038 | # -*- coding: utf-8 -*-
import io, urllib, subprocess, os, time, re, sys, psutil
from .actions import ModuleBase
# como tratar os icons?
# tem que receber o ActiosManager!
MODULE_NAME = "FilesModule"
# TODO recobnhecer tambem "ls -l"
# TODO pode ter icons para copiar, apagar etc. E para abrir, usa os icons dos p... | gpl-2.0 | -2,503,636,937,529,637,400 | 30.685535 | 147 | 0.57503 | false | 3.540408 | false | false | false |
ktbyers/netmiko | netmiko/session_log.py | 1 | 2465 | import io
from netmiko.utilities import write_bytes
from typing import Dict, Any, Union, Optional, TextIO
class SessionLog:
def __init__(
self,
file_name: Optional[str] = None,
buffered_io: Optional[io.BufferedIOBase] = None,
file_mode: str = "write",
file_encoding: str = "... | mit | 2,047,698,987,436,179,200 | 34.214286 | 86 | 0.566734 | false | 3.963023 | false | false | false |
PlayOnLinux/POL-POM-4 | python/lib/playonlinux.py | 1 | 13281 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (C) 2007-2010 PlayOnLinux Team
from . import Variables
import os
import subprocess, shlex, pipes, wx
import natsort
def winpath(script, path):
#path=os.path.realpath(path)
if(path[0] != "/"):
path=os.environ["WorkingDirectory"]+"/"+path
path ... | gpl-3.0 | 6,488,833,861,798,615,000 | 28.120614 | 248 | 0.542134 | false | 3.402255 | false | false | false |
chaiso-krit/autoencoder | network/network.py | 1 | 2708 | #!/usr/bin/env python
import numpy
import json
from layer import Layer
import theano
import theano.tensor as T
class Network(object):
def __init__(self, new_network=True, **kwargs):
if new_network:
self.new_network(**kwargs)
def new_network(self, layers, input, rng=numpy.random.RandomStat... | mit | 2,247,885,038,478,417,700 | 30.126437 | 132 | 0.562038 | false | 3.819464 | false | false | false |
grycap/cpyutils | runcommand.py | 1 | 2848 | # coding: utf-8
#
# CLUES Python utils - Utils and General classes that spin off from CLUES
# Copyright (C) 2017 - GRyCAP - Universitat Politecnica de Valencia
#
# 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 Soft... | gpl-3.0 | 5,388,883,593,795,784,000 | 39.112676 | 156 | 0.67802 | false | 3.812584 | false | false | false |
yolanother/ubuntumobidev_ubiquity | tests/test_wireless.py | 1 | 1636 | #! /usr/bin/python3
import unittest
import mock
from ubiquity import gtkwidgets, nm, plugin_manager
class WirelessTests(unittest.TestCase):
@mock.patch('ubiquity.nm.NetworkManager.start')
@mock.patch('ubiquity.nm.NetworkManager.get_state')
@mock.patch('ubiquity.misc.has_connection')
def setUp(self,... | gpl-3.0 | 6,346,037,383,716,976,000 | 38.902439 | 79 | 0.674205 | false | 3.401247 | false | false | false |
angea/corkami | src/HexII/hexII2bin.py | 1 | 1273 | #converts a HexII output back to a file
#Ange Albertini, BSD Licence 2014
from sys import argv
hexii, bin = argv[1:3]
def _3g(s):
"""splits a string in trigrams"""
for i in range(0, len(s), 3):
yield s[i:i+2] # we don't need the space separator
def convert_char(c):
"""converts ... | bsd-2-clause | 2,253,329,528,295,121,700 | 21.181818 | 94 | 0.520031 | false | 3.222785 | false | false | false |
lekum/python-snippets | actor_task/actor.py | 1 | 1156 | from queue import Queue
from threading import Thread, Event
class ActorExit(Exception):
pass
class Actor:
def __init__(self):
self._mailbox = Queue()
def send(self, msg):
"""
Send a message to the actor
"""
self._mailbox.put(msg)
def recv(self):
"""
... | gpl-3.0 | -4,229,863,264,164,454,000 | 18.931034 | 48 | 0.499135 | false | 4.446154 | false | false | false |
GiovanniConserva/TestDeploy | venv/Lib/site-packages/binstar_client/commands/download.py | 1 | 1868 | '''
Usage:
anaconda notebook download notebook
anaconda notebook download user/notebook
'''
from __future__ import unicode_literals
import argparse
import logging
from binstar_client import errors
from binstar_client.utils import get_server_api
from binstar_client.utils.notebook import Downloader, parse, has... | bsd-3-clause | 2,076,777,260,672,256,500 | 28.1875 | 97 | 0.649358 | false | 3.932632 | false | false | false |
anhel-strauke/horns_and_hooves | horns_site/catalog/migrations/0001_initial.py | 1 | 1159 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-14 06:51
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | mit | 2,637,999,238,665,161,700 | 32.114286 | 116 | 0.565142 | false | 4.390152 | false | false | false |
Synerty/vortexpy | vortex/test/vortexjs/TupleDataObservableTestHandler.py | 1 | 1973 | import logging
from datetime import datetime
import pytz
from twisted.internet import task
from vortex.DeferUtil import deferToThreadWrapWithLogger
from vortex.Payload import Payload
from vortex.TupleSelector import TupleSelector
from vortex.handler.TupleDataObservableHandler import TuplesProviderABC, \
TupleData... | mit | -7,920,099,811,018,468,000 | 34.872727 | 84 | 0.736442 | false | 4.002028 | true | false | false |
amwelch/a10sdk-python | a10sdk/core/ipv6/ipv6_nat_inside_source_list.py | 2 | 1478 | from a10sdk.common.A10BaseClass import A10BaseClass
class List(A10BaseClass):
"""Class Description::
IPv6 Access-List.
Class list supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param list_name: {"description": "IPv6 ac... | apache-2.0 | -1,752,286,045,152,682,000 | 35.95 | 195 | 0.61908 | false | 3.359091 | false | false | false |
kieranjol/IFIscripts | batchmetadata.py | 1 | 2245 | #!/usr/bin/env python
'''
'Traverses through subdirectories finding images sequences
and creating mediainfo and medatrace xml reports.
'''
import sys
import os
import argparse
from glob import glob
try:
from ififuncs import make_mediatrace
from ififuncs import make_mediainfo
except ImportError:
print '*** E... | mit | -172,946,559,824,034,460 | 31.071429 | 230 | 0.642762 | false | 3.656352 | false | false | false |
google-research/deeplab2 | data/preprocessing/autoaugment_policy.py | 1 | 2795 | # coding=utf-8
# Copyright 2021 The Deeplab2 Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 | -7,547,719,449,203,445,000 | 36.266667 | 76 | 0.636494 | false | 3.615783 | false | false | false |
CivilNet/Gemfield | src/python/c3d/video2image.py | 1 | 3249 | #!/usr/bin/env python
import sys
import os
import subprocess
import array
import cv2
def extract_frames(video, frame_dir, num_frames_to_extract=16):
# check output directory
if os.path.isdir(frame_dir):
print("[Warning] frame_dir={} does exist. Will overwrite".format(frame_dir))
else:
os.m... | gpl-3.0 | 1,671,242,527,288,111,900 | 32.84375 | 93 | 0.6008 | false | 3.40566 | false | false | false |
halbbob/dff | modules/hash/hash.py | 1 | 5048 | # DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2011 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more information about this... | gpl-2.0 | -3,819,942,518,371,353,600 | 35.316547 | 116 | 0.544572 | false | 4.057878 | false | false | false |
giacomov/fermi_blind_search | scripts/ltf_analyze_one_day.py | 1 | 2897 | #!/usr/bin/env python
#PBS -l walltime=04:00:00
#PBS -l nodes=1:ppn=10
#PBS -l vmem=30gb
#PBS -V
import datetime
import socket
import os
import shutil
import subprocess
import sys
import traceback
def are_we_at_slac():
hostname = socket.getfqdn()
if hostname.find('slac.stanford.edu') > 0:
return... | bsd-3-clause | -6,355,564,347,283,469,000 | 21.457364 | 94 | 0.602347 | false | 3.607721 | false | false | false |
eliseuegewarth/sibaho | empregado/migrations/0001_initial.py | 1 | 2202 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-27 19:18
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | lgpl-3.0 | 5,300,769,387,652,451,000 | 36.965517 | 122 | 0.549046 | false | 4.267442 | false | false | false |
studiawan/pygraphc | pygraphc/clustering/GraphEntropy.py | 1 | 8926 | from math import log
from ClusterUtility import ClusterUtility
from itertools import combinations
class GraphEntropy(object):
"""A class for graph clustering using entropy-based method [Kenley2011]_. The review of
some graph clustering method for PPI networks, including this entropy-based, was presented in... | mit | -2,791,999,254,352,797,700 | 41.504762 | 119 | 0.564643 | false | 4.556406 | false | false | false |
mzdaniel/oh-mainline | vendor/packages/django-debug-toolbar/debug_toolbar/middleware.py | 5 | 4767 | """
Debug Toolbar middleware
"""
import os
from django.conf import settings
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.utils.encoding import smart_unicode
from django.conf.urls.defaults import include, patterns
import debug_toolbar.urls
from debug_toolbar.... | agpl-3.0 | 7,446,535,437,256,584,000 | 40.815789 | 115 | 0.600587 | false | 4.365385 | false | false | false |
karlnewell/net-virt-platform | sdnplatform/example/packetStreamerClientExample.py | 3 | 4502 | #!/usr/bin/python
#
# Copyright (c) 2013 Big Switch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html
#
# Unless requir... | epl-1.0 | -5,068,555,680,859,375,000 | 28.424837 | 83 | 0.669036 | false | 3.487219 | false | false | false |
zutshi/S3CAMR | examples/nav/nav30nocache.py | 1 | 11214 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Must satisfy the signature
# [t,X,D,P] = sim_function(T,X0,D0,P0,I0);
"""Uses Assimulo solvers"""
import numpy as np
from assimulo.problem import Explicit_Problem
from assimulo.solvers.sundials import CVode
#from assimulo.solvers import LSODAR
#from assimulo.solvers import ... | bsd-2-clause | -3,600,118,587,238,327,300 | 27.753846 | 93 | 0.479936 | false | 2.591634 | false | false | false |
emilybache/texttest-runner | src/main/python/lib/default/batch/__init__.py | 1 | 48289 | #!/usr/local/bin/python
import os, plugins, sys, time, shutil, datetime, testoverview, logging, re, tarfile
from summarypages import GenerateSummaryPage, GenerateGraphs # only so they become package level entities
from ordereddict import OrderedDict
from batchutils import calculateBatchDate, BatchVersionFilter, parseF... | mit | -6,141,868,921,989,069,000 | 43.465009 | 165 | 0.613991 | false | 4.259416 | true | false | false |
osrf/opensplice | src/api/dcps/python/test/TestSequenceOfStructArray.py | 2 | 2503 | #
# Vortex OpenSplice
#
# This software and documentation are Copyright 2006 to TO_YEAR ADLINK
# Technology Limited, its affiliated companies and licensors. All rights
# reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in ... | apache-2.0 | 3,142,584,725,055,485,000 | 37.523077 | 113 | 0.638833 | false | 3.428767 | true | false | false |
john-wang-metro/metro-openerp | metro_mrp/work_order_cnc.py | 2 | 40372 | # -*- encoding: utf-8 -*-
from osv import fields,osv
from openerp.tools.translate import _
from openerp import netsvc
import time
import datetime
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.report.pyPdf import PdfFileWriter, PdfFileReader
from openerp.addons.metro import utils
import zipf... | agpl-3.0 | 7,251,418,935,697,877,000 | 54.995839 | 243 | 0.563584 | false | 3.605609 | false | false | false |
effluxsystems/pyefflux | tests/unit/test_netflow.py | 1 | 1408 | """
Tests for efflux.telemetry.netflow
"""
import json
import mock
import unittest
import requests
import efflux.telemetry.netflow
class EffluxNetflowTests(unittest.TestCase):
'''Tests for EffluxNetflow'''
MOCKS = [
'requests.get'
]
def setUp(self):
for target in self.MOCKS:
... | mit | 2,671,998,267,165,216,300 | 25.566038 | 57 | 0.604403 | false | 3.485149 | true | false | false |
ME-ICA/me-ica | gooey/gui/windows/advanced_config.py | 1 | 3429 | """
Managed the internal layout for configuration options
@author: Chris
"""
import wx
from wx.lib.scrolledpanel import ScrolledPanel
from itertools import chain, izip_longest
from gooey.gui.util import wx_util
from gooey.gui.lang import i18n
from gooey.gui.widgets import components
PADDING = 10
... | lgpl-2.1 | -6,681,910,294,888,879,000 | 29.172727 | 93 | 0.664334 | false | 3.365064 | false | false | false |
noba3/KoTos | addons/plugin.video.phstreams/resources/lib/resolvers/cloudzilla.py | 3 | 1154 | # -*- coding: utf-8 -*-
'''
Genesis Add-on
Copyright (C) 2015 lambda
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any ... | gpl-2.0 | -3,683,204,801,686,678,500 | 28.589744 | 90 | 0.663778 | false | 4.211679 | false | false | false |
Parallel-in-Time/pySDC | pySDC/playgrounds/Allen_Cahn/AllenCahn_output.py | 1 | 1116 | import pySDC.helpers.plot_helper as plt_helper
from pySDC.core.Hooks import hooks
class output(hooks):
def __init__(self):
"""
Initialization of Allen-Cahn monitoring
"""
super(output, self).__init__()
plt_helper.setup_mpl()
self.counter = 0
self.fig = No... | bsd-2-clause | 608,977,449,407,254,100 | 25.571429 | 98 | 0.569892 | false | 3.6 | false | false | false |
iABC2XYZ/abc | MEBT/MEBT2.py | 1 | 2972 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
@author: Peiyong Jiang
作者: 姜培勇
jiangpeiyong@impcas.ac.cn
本文件解释:
"""
import numpy as np
import matplotlib.pyplot as plt
def MapQuad(K,L):
# 生成四极铁的装配矩阵,其中K表示聚焦因子,L 表示四极铁的长度。
K2=np.sqrt(np.abs(K*1.))
K2_L=K2*L
if K>0:
C=np.cos(K2_L)
... | gpl-3.0 | -3,147,297,079,912,110 | 20.109489 | 82 | 0.593015 | false | 2.212701 | false | false | false |
noam09/deluge-telegramer | telegramer/include/telegram/passport/passportelementerrors.py | 1 | 14167 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2018
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | gpl-3.0 | 4,533,790,413,520,887,300 | 38.683473 | 99 | 0.61368 | false | 4.320525 | false | false | false |
marcelveldt/script.module.metadatautils | lib/metadatautils.py | 1 | 18089 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
script.module.metadatautils
Provides all kind of mediainfo for kodi media, returned as dict with details
'''
import helpers.kodi_constants as kodi_constants
from helpers.utils import log_msg, ADDON_ID
from simplecache import use_cache, SimpleCache
from urllib impo... | apache-2.0 | -13,932,220,097,756,036 | 40.205011 | 120 | 0.597877 | false | 3.912827 | false | false | false |
Linaro/lava-server | lava_server/management/commands/tokens.py | 1 | 4754 | # Copyright (C) 2017 Linaro Limited
#
# Author: Remi Duraffort <remi.duraffort@linaro.org>
#
# This file is part of LAVA Dispatcher.
#
# LAVA Dispatcher 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 v... | agpl-3.0 | 173,459,554,514,434,500 | 39.982759 | 100 | 0.60244 | false | 4.317893 | false | false | false |
maaaaz/androwarn | warn/search/malicious_behaviours/PIM_leakage.py | 1 | 4623 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of Androwarn.
#
# Copyright (C) 2012, 2019, Thomas Debize <tdebize at mail.com>
# All rights reserved.
#
# Androwarn is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
#... | lgpl-3.0 | -2,938,022,154,766,470,000 | 50.366667 | 195 | 0.574735 | false | 4.912859 | false | false | false |
shawncaojob/LC | QUESTIONS/174_dungeon_game.py | 2 | 2987 | # 174. Dungeon Game QuestionEditorial Solution My Submissions
# Total Accepted: 29666
# Total Submissions: 133649
# Difficulty: Hard
# The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) ... | gpl-3.0 | 6,901,816,634,040,871,000 | 37.792208 | 297 | 0.567794 | false | 3.293275 | false | false | false |
tomi77/ems-cli | ems_cli/i18n.py | 1 | 1404 | # from https://wiki.maemo.org/Internationalize_a_Python_application
import os
import sys
import locale
import gettext
# The translation files will be under
# @LOCALE_DIR@/@LANGUAGE@/LC_MESSAGES/@APP_NAME@.mo
APP_NAME = "ems-cli"
# APP_DIR = os.path.join(sys.prefix, 'share')
APP_DIR = os.path.dirname(__file__)
LOCA... | mit | -7,057,152,338,272,807,000 | 26 | 73 | 0.668091 | false | 3.618557 | false | false | false |
apel/apel | apel/parsers/slurm.py | 3 | 5107 | '''
Copyright (C) 2012 STFC
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 | -4,455,519,860,081,565,700 | 37.11194 | 125 | 0.57803 | false | 3.825468 | false | false | false |
tonysyu/matplotlib-style-gallery | mpl_style_gallery/plot_scripts/bar-plots.py | 1 | 1184 | import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
np.random.seed(0) # Set seed so plots look the same.
def histogram_demo(ax):
# example data
mu = 100 # mean of distribution
sigma = 15 # standard deviation of distribution
x = mu + sigma * np.random.randn(10000)
... | bsd-3-clause | 5,316,281,476,921,245,000 | 23.163265 | 79 | 0.615709 | false | 2.916256 | false | false | false |
strangemilk/ImageSort | main.py | 1 | 2757 | #!/usr/bin/env python3.4
import os
import sys
import imghdr
import shutil
import argparse
from PIL import Image
def main():
parser = argparse.ArgumentParser(description='Sort wallpapers inside a directory.')
parser.add_argument('-d', '--dirpath', help='directory path containing the images', required=True)
... | mit | 3,255,802,954,583,997,400 | 28.329787 | 111 | 0.648894 | false | 3.512102 | false | false | false |
royi1000/py-libhdate | hdate/converters.py | 2 | 6432 | # -*- coding: utf-8 -*-
"""Methods for going back and forth between various calendars."""
from __future__ import division
import datetime
from hdate.common import HebrewDate
from hdate.htables import Months
def get_chalakim(hours, parts):
"""Return the number of total parts (chalakim)."""
return (hours * ... | gpl-3.0 | -2,120,144,533,305,022,500 | 28.865116 | 88 | 0.57421 | false | 3.072249 | false | false | false |
ulif/megrok.paypal | src/megrok/paypal/tests/test_receiver.py | 1 | 11709 | # Tests for IPN- and other receivers
import datetime
import grok
import unittest
import megrok.paypal.tests
from zope.component import getMultiAdapter
from zope.interface.verify import verifyClass, verifyObject
from zope.publisher.browser import TestRequest
from zope.testbrowser.wsgi import Browser
from megrok.paypal.i... | gpl-3.0 | 1,154,079,683,884,194,300 | 36.893204 | 76 | 0.644035 | false | 3.930514 | true | false | false |
Migdalo/wd-label-builder | wdlabelbuilder/simplelinkedlist.py | 1 | 2079 | # -*- coding: UTF-8
from __future__ import print_function
class Node(object):
def __init__(self, qnumber, label):
self.qnumber = qnumber
self.label = label
self.next = None
try:
int(''.join(label.split()[-1:]))
self.point_in_time = int(''.join(label.split()... | mit | 7,657,295,800,490,788,000 | 26 | 65 | 0.494468 | false | 3.871508 | false | false | false |
ercius/openNCEM | ncempy/algo/rebin.py | 1 | 1501 | def rebin(im, f, funcType='sum'):
""" Rebin a 2D array. From stackoverflow:
https://stackoverflow.com/questions/4624112/grouping-2d-numpy-array-in-average
This should be used carefully. There is not antialiasing applied which could
produce odd effects for some data sets (such as high resolution data)
... | gpl-3.0 | 4,956,162,560,882,592,000 | 30.291667 | 95 | 0.580946 | false | 3.8 | false | false | false |
wfxiang08/zerorpc-python | tests/test_zmq.py | 1 | 2020 | # -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | mit | 7,165,150,716,109,884,000 | 30.746032 | 81 | 0.65 | false | 3.952569 | false | false | false |
oin/Glovebox | glovebox/play/TrackedObject.py | 1 | 6123 | #!/usr/bin/env python
# encoding: utf-8
# GloveBox. An experimental improvised music environment.
# Copyright (C) 2012 Jonathan Aceituno
# http://glovebox.oin.name
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free... | gpl-3.0 | -46,809,508,610,556,470 | 35.670659 | 141 | 0.724971 | false | 3.272582 | false | false | false |
iotaledger/iota.lib.py | examples/tutorials/06_store_encrypted.py | 1 | 1749 | """
Encrypt data and store it on the Tangle.
simplecrypt library is needed for this example (`pip install simple-crypt`)!
"""
from iota import Iota, TryteString, Tag, ProposedTransaction
from simplecrypt import encrypt
from base64 import b64encode
from getpass import getpass
import json
# Declare an API object
api =... | mit | -4,388,664,822,018,798,600 | 25.515152 | 94 | 0.728416 | false | 3.396117 | false | false | false |
ryfx/modrana | modules/mod_askMenu.py | 1 | 2068 | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Sample of a Rana module.
#----------------------------------------------------------------------------
# Copyright 2010, Martin Kolman
#
# This program is free software: you can redistribute it and/or modify
# it und... | gpl-3.0 | -7,469,706,464,503,628,000 | 36.6 | 79 | 0.598162 | false | 4.203252 | false | false | false |
PolymorhicCode/Veil-Evasion | modules/payloads/python/meterpreter/rev_https.py | 2 | 4821 | """
Custom-written pure python meterpreter/reverse_https stager.
Module by @harmj0y
"""
from modules.common import helpers
from modules.common import encryption
class Payload:
def __init__(self):
# required options
self.description = "pure windows/meterpreter/reverse_https stager, no shell... | gpl-3.0 | -2,278,835,543,506,035,000 | 53.168539 | 208 | 0.622485 | false | 3.550074 | false | false | false |
helixyte/TheLMA | thelma/resources/project.py | 1 | 1486 | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Project resource.
"""
from datetime import datetime
from everest.querying.specifications import AscendingOrderSpecification
from everest.resources.base impo... | mit | 8,518,188,202,774,892,000 | 34.380952 | 80 | 0.776581 | false | 4.082418 | false | false | false |
sk413025/twitter-sent-dnn | sentiment.py | 3 | 2308 | """
Sentiment prediction module
"""
import nltk
import numpy as np
from cPickle import load
def get_word_index_array(words, word2index):
u"""
Transform the words into list of int(word index)
Note: Unknown words are dropped
>>> words = [u"I", u"love", u"you", u"RANDOM STUFF"]
>>> word2ind... | mit | -2,340,922,460,335,286,000 | 28.589744 | 183 | 0.606586 | false | 2.903145 | false | false | false |
jdeltoft/uPyLoader | gui/code_edit.py | 2 | 5387 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './gui/qt\code_edit.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
# Added by buildgui.py script to support pyinstaller
from src.helpers.p... | mit | -7,903,087,611,680,185,000 | 52.336634 | 127 | 0.72248 | false | 3.937865 | false | false | false |
Opentaste/bombolone | bombolone/routes/content.py | 1 | 5760 | # -*- coding: utf-8 -*-
"""
content.py
~~~~~~
:copyright: (c) 2014 by @zizzamia
:license: BSD (See LICENSE for details)
"""
from flask import (Blueprint, abort, request, session, g, current_app,
render_template, send_from_directory)
# Imports inside Bombolone
import bombolone.model.pa... | bsd-3-clause | -3,717,585,810,710,158,300 | 34.226415 | 108 | 0.530556 | false | 3.74269 | false | false | false |
neoyk/search | planetlab/proximaty.py | 2 | 2766 | #! /usr/bin/python
import urllib2, os, sys, subprocess, shlex, re, time, socket
#vantage website RTT test
request = urllib2.urlopen("http://115.25.86.11/ping.php")
ip = request.read()
realip, vantage_ip, vantage_domain = ip.split('|')
vantage_domain = vantage_domain.strip()
cmd = 'hping3 -S -p 80 -c 5 '+vantage_ip
patt... | apache-2.0 | 4,672,326,126,707,277,000 | 34.012658 | 173 | 0.657267 | false | 2.561111 | false | false | false |
trendelkampschroer/msmtools | msmtools/analysis/dense/fingerprints_test.py | 1 | 14216 |
# This file is part of MSMTools.
#
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
#
# MSMTools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ... | lgpl-3.0 | 491,676,750,691,958,800 | 32.769596 | 99 | 0.542628 | false | 2.992842 | true | false | false |
xiaonanln/myleetcode-python | src/114. Flatten Binary Tree to Linked List.py | 1 | 1072 | """
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ \
2 5
/ \ \
3 4 6
The flattened tree should look like:
1
\
2
\
3
\
4
\
5
\
6
"""
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# ... | apache-2.0 | -8,308,978,149,128,034,000 | 15.765625 | 68 | 0.632463 | false | 2.897297 | false | false | false |
sassoftware/conary | conary/lib/httputils.py | 2 | 2258 | #
# Copyright (c) SAS Institute 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 w... | apache-2.0 | -6,544,657,864,333,414,000 | 29.513514 | 74 | 0.621346 | false | 3.961404 | false | false | false |
pablomuri/Engine | loader/loader/topology.py | 2 | 2562 | """
Copyright (c) 2015, NetIDE Consortium (Create-Net (CN), Telefonica Investigacion Y Desarrollo SA (TID), Fujitsu
Technology Solutions GmbH (FTS), Thales Communications & Security SAS (THALES), Fundacion Imdea Networks (IMDEA),
Universitaet Paderborn (UPB), Intel Research & Innovation Ireland Ltd (IRIIL), Fraunhof... | epl-1.0 | -1,025,416,335,048,765,400 | 35.585714 | 114 | 0.664584 | false | 3.193267 | false | false | false |
bw8932/inf1340_2015_asst1 | exercise1.py | 1 | 1091 | #!/usr/bin/env python
""" Assignment 1, Exercise 1, INF1340, Fall, 2014. Grade to gpa conversion
This module prints the amount of money that Lakshmi has remaining
after the stock transactions
"""
__author__ = 'Susan Sim'
__email__ = "ses@drsusansim.org"
__copyright__ = "2015 Susan Sim"
__license__ = "MIT License"
... | mit | -2,667,386,265,536,611,000 | 24.97619 | 74 | 0.687443 | false | 3.266467 | false | false | false |
tweakyllama/beam-app | server/beam/base/loads.py | 1 | 2770 | def return_load(**kwargs):
if kwargs['_type'] == 'Point':
load = PointLoad(**kwargs)
elif kwargs['_type'] == 'Uniform':
load = UniformLoad(**kwargs)
else:
print('Invalid type: returned default `PointLoad`')
return PointLoad()
return load
class PointLoad(object):
"""... | mit | 5,021,498,478,113,282,000 | 24.181818 | 91 | 0.588087 | false | 3.985612 | false | false | false |
elParaguayo/RPI-Info-Screen | default.py | 1 | 11008 | '''
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be... | gpl-3.0 | -8,177,337,339,740,280,000 | 30.008451 | 83 | 0.594295 | false | 3.938462 | false | false | false |
jeremyschulman/bracket_expansion | bracket_expansion.py | 1 | 3188 | #
# Copyright 2015, 2019 Jeremy Schulman, nwkautomaniac@gmail.com
#
# 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 appl... | apache-2.0 | -8,826,180,719,172,406,000 | 30.88 | 98 | 0.657779 | false | 3.827131 | false | false | false |
kevgliss/lemur | lemur/common/validators.py | 1 | 5585 | import re
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.x509 import NameOID
from flask import current_app
from marshmallow.exceptions import ValidationError
from lemur.auth.permissions import SensitiveD... | apache-2.0 | 3,325,856,690,779,725,000 | 38.055944 | 137 | 0.678245 | false | 4.174141 | false | false | false |
mertyildiran/Plexus | plexus/visualize.py | 1 | 2559 | import random
import time
def _visualize(self):
import pyqtgraph as pg
import numpy as np
# Enable antialiasing for prettier plots
pg.setConfigOptions(antialias=True)
w = pg.GraphicsWindow()
w.setWindowTitle('Visualization of the Network')
v = w.addViewBox()
v.setAspectLocked()
... | mit | 8,590,223,037,196,137,000 | 27.120879 | 74 | 0.545526 | false | 3.730321 | false | false | false |
Bakterija/mmplayer | mmplayer/appworker/worker.py | 1 | 2445 | from utils.compat_queue import Queue
from .async_funcs import task_switch
from time import time, sleep
import threading
class Worker(object):
'''A worker that interprets json tasks,
runs them in a separate thread and sends back results.
Continually looks in recv queue for a stop message
to be able to ... | mit | -287,601,049,251,153,500 | 32.040541 | 70 | 0.497751 | false | 4.289474 | false | false | false |
AndreaLombardo90/SDN-Controller | usersmanager.py | 1 | 1512 | from user import User
class UsersManager:
def __init__(self):
#dictionary of classes (keys) related to user lists (values) for each one
self.classes = {}
#dictionary of polcies. Each key identifies a user-class name and each value the minimum bandwidth guaranted for that class
self.policies = {}
... | apache-2.0 | 554,800,254,498,598,900 | 27.528302 | 127 | 0.609127 | false | 3.436364 | false | false | false |
vishnu2kmohan/dcos-commons | frameworks/helloworld/tests/test_placement.py | 1 | 16192 | import json
import logging
import pytest
import sdk_cmd
import sdk_install
import sdk_marathon
import sdk_plan
import sdk_tasks
import sdk_utils
import shakedown
from tests import config
log = logging.getLogger(__name__)
@pytest.fixture(scope='module', autouse=True)
def configure_package(configure_security):
tr... | apache-2.0 | -6,289,833,749,530,769,000 | 32.385567 | 120 | 0.619071 | false | 3.428329 | true | false | false |
erdc-cm/air-water-vv | 3d/floating_caisson/moveMesh_p.py | 1 | 1600 | from proteus.default_p import *
from proteus.mprans import MoveMesh
import numpy as np
from proteus import Context
ct = Context.get()
domain = ct.domain
nd = ct.domain.nd
mesh = domain.MeshOptions
genMesh = mesh.genMesh
movingDomain = ct.movingDomain
T = ct.T
initialConditions = None
analyticalSolution = {}
nMedi... | mit | -809,834,431,407,914,800 | 29.769231 | 78 | 0.60125 | false | 3.516484 | false | true | false |
h01000110/gerenciador-oficina-web | app/models/tables.py | 1 | 1680 | from app import db
import datetime
class Servico(db.Model):
__tablename__ = 'servicos'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
nome = db.Column(db.String)
telefone = db.Column(db.String)
email = db.Column(db.String)
cpf = db.Column(db.String)
endereco = db.Column(... | mit | 3,043,236,820,065,376,000 | 25.666667 | 77 | 0.597619 | false | 2.978723 | false | false | false |
Burtt/IllumicatsVision | RaspberryPi/ScanForSingleTarget.py | 1 | 1995 | #! /usr/bin/env python
import numpy as np
import cv2
import visiontable
display = False
cap = cv2.VideoCapture(0)
table = visiontable.VisionTable()
lower_lim = np.array([60,60,60])
upper_lim = np.array([100,255,255])
minContourArea = 400
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# fi... | mit | -3,713,860,531,460,117,500 | 28.338235 | 94 | 0.574937 | false | 3.181818 | false | false | false |
ville-k/tensorflow | tensorflow/python/layers/normalization_test.py | 5 | 29012 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,867,855,150,076,740,000 | 43.091185 | 80 | 0.640838 | false | 3.476156 | true | false | false |
maestrano/allocpsa | bin/alloccli/invoices.py | 1 | 3422 | """alloccli subcommand for viewing a list of invoices."""
from alloc import alloc
class invoices(alloc):
"""Print a list of invoices."""
# Setup the options that this cli can accept
ops = []
ops.append(('' , 'help ', 'Show this help.'))
ops.append(('' , 'csv=[WHEN] ', 'Return the results in ... | agpl-3.0 | -6,633,050,301,944,009,000 | 38.790698 | 102 | 0.578317 | false | 3.6875 | false | false | false |
wodo/WebTool3 | webtool/server/migrations/0017_role.py | 1 | 1788 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-17 10:27
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import server.models.fields
class Migration(migrations.Migration):
dependencies = [
('server', '0016_auto_20171111_17... | bsd-2-clause | 5,639,206,579,595,962,000 | 49.485714 | 231 | 0.620826 | false | 3.576923 | false | false | false |
locationtech/geowave | python/src/main/python/pygw/store/accumulo/accumulo_options.py | 2 | 2877 | #
# Copyright (c) 2013-2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 whic... | apache-2.0 | 8,841,141,749,998,820,000 | 27.205882 | 97 | 0.582551 | false | 4.365706 | false | false | false |
TimZaman/DIGITS | digits/model/images/classification/test_views.py | 2 | 42885 | # Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
from __future__ import absolute_import
import itertools
import json
import os
import re
import shutil
import tempfile
import time
import unittest
import urllib
# Find the best implementation available
try:
from cStringIO import StringIO
except I... | bsd-3-clause | -5,724,825,741,181,554,000 | 33.979608 | 121 | 0.582558 | false | 3.681432 | true | false | false |
shindo/elliptics | bindings/python/src/log.py | 6 | 2325 | # =============================================================================
# 2013+ Copyright (c) Kirill Smorodinnikov <shaitkir@gmail.com>
# All rights reserved.
#
# 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 Fre... | lgpl-3.0 | -4,458,817,911,760,037,000 | 33.701493 | 101 | 0.618495 | false | 4.181655 | false | false | false |
severinson/coded-computing-tools | stats.py | 2 | 11218 | ############################################################################
# Copyright 2016 Albin Severinson #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may no... | apache-2.0 | 6,124,768,268,219,857,000 | 29.075067 | 95 | 0.60813 | false | 4.17026 | false | false | false |
sauloal/cnidaria | scripts/parseCountCharsStats.py | 1 | 11816 | #!/usr/bin/python
import os
import sys
kmer_sizes = [ 11, 15, 17, 21, 31 ]
def main():
try:
ofile = sys.argv[1 ]
except:
print "no output file given"
sys.exit(1)
try:
ifiles = sys.argv[2:]
except:
print "no input files given"
sys.exit(1)
... | mit | 358,623,553,483,866,700 | 36.040752 | 192 | 0.48849 | false | 3.226652 | false | false | false |
niclabs/moca-bulletin-board | app/public/get_methods.py | 1 | 2970 | from app import application, db
from flask import request, make_response, jsonify
from app.models.candidate import Candidate
from app.models.ballot import Ballot
from app.models.dummy_share_key import DummyShareKey
from app.models.authority_public_key import AuthorityPublicKey
from app.models.final_outcome import Final... | mit | -2,038,777,006,032,129,500 | 29 | 105 | 0.702694 | false | 3.61754 | false | false | false |
qgu/cppProcessing2.0 | tools/profile_processing.py | 1 | 2439 |
import re
import subprocess
def run_the_function(repeat, width, print_result):
#subprocess.call('LD_LIBRARY_PATH="/dls_sw/prod/tools/RHEL6-x86_64/hdf5/1-8-15/prefix/lib"', shell=True)
#subprocess.call('HDF5_DISABLE_VERSION_CHECK="1"', shell=True)
# repeat = 5;
# width = 1024 * 55
program_to_e... | apache-2.0 | -4,034,670,399,528,627,700 | 33.842857 | 108 | 0.533415 | false | 3.50431 | false | false | false |
jameshy/libtree | libtree/core/positioning.py | 1 | 4995 | # Copyright (c) 2015 Fabian Kochem
"""
**Auto position**
``libtree`` has a feature called `auto position` which is turned on by
default and makes sure that whenever you insert, move or delete a node
its siblings stay correctly ordered.
Let's assume you have a node sequence like this::
position | 0 | 1
node... | mit | -4,651,784,916,826,591,000 | 25.151832 | 72 | 0.612412 | false | 3.970588 | false | false | false |
ParuninPavel/lenta4_hack | config/settings/production.py | 1 | 6748 | """
Production settings for test project.
- Use WhiteNoise for serving static files
- Use Amazon's S3 for storing uploaded media
- Use mailgun to send emails
- Use Redis for cache
- Use sentry for error logging
"""
import logging
from .base import * # noqa
# SECRET CONFIGURATION
# ----------------------------... | mit | -2,505,847,286,989,815,300 | 33.253807 | 117 | 0.596769 | false | 3.776161 | true | false | false |
Venkat1729/DS-and-Algorithms-Python | Miscellaneous/maxSet.py | 2 | 1431 | '''
Find out the maximum sub-array of non negative numbers from an array.
The sub-array should be continuous.
That is, a sub-array created by choosing the second and fourth element and skipping the third element is invalid.
Maximum sub-array is defined in terms of the sum of the elements in the sub-array.
Sub-array ... | mit | -2,613,180,449,402,754,600 | 30.130435 | 113 | 0.641509 | false | 2.684803 | false | false | false |
82Flex/DCRM | WEIPDCRM/migrations/0014_auto_20170326_1544.py | 1 | 2199 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-26 13:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('WEIPDCRM', '0013_auto_20170326_0633'),
]
operations = [
migrations.AlterFie... | agpl-3.0 | -3,374,376,381,401,731,000 | 42.98 | 206 | 0.618918 | false | 4.149057 | false | false | false |
google-research/kubric | kubric/renderer/blender_utils.py | 1 | 9164 | # Copyright 2021 The Kubric Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | 7,058,492,952,894,060,000 | 39.910714 | 118 | 0.684963 | false | 3.43221 | false | false | false |
ant31/kpm | kpm/command.py | 1 | 1996 | #!/usr/bin/env python
import argparse
import os
import yaml
import json
import copy
import re
from kpm.render_jsonnet import RenderJsonnet
from kpm.commands import all_commands
class LoadVariables(argparse.Action):
def _parse_cmd(self, var):
r = {}
try:
return json.loads(var)
... | apache-2.0 | -5,476,158,347,509,414,000 | 29.242424 | 97 | 0.56513 | false | 3.913725 | false | false | false |
wkh124/wkh124 | probe_planner.py | 2 | 23321 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Prepare sequences for probe design
# Prepare cDNA for Genbank submission
# Program information
__authors__ = "Eric Normandeau"
__program_name__ = "probe_planner"
__version_info__ = ('1', '2', '0')
__version__ = '.'.join(__version_info__)
__revision_date__ = "2011-02-17"... | gpl-3.0 | -2,690,512,145,717,554,000 | 34.334848 | 89 | 0.544231 | false | 3.502704 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.