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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errantlinguist/tangrams-analysis | tangrams_analysis/java_properties_files.py | 1 | 3600 | """
Utilities for manipulating Java-style "*.properties" files.
"""
__author__ = "Todd Shore <errantlinguist+github@gmail.com>"
__copyright__ = "Copyright 2017 Todd Shore"
__license__ = "Apache License, Version 2.0"
import os
import re
from typing import Dict, Iterable, Iterator, Mapping, MutableSequence, Union
ATT... | apache-2.0 | 2,046,042,581,035,111,700 | 36.894737 | 115 | 0.735833 | false | 3.299725 | false | false | false |
RustyBrain/PublicHealthCIs | public_health_cis/public_health_cis.py | 1 | 2565 | import numpy as np
from math import sqrt
from scipy.special import ndtri
from scipy.stats import chi2
def get_calc_variables(a):
norm_cum_dist = ndtri((100 + (100 - (100 * a))) / 200)
z = ndtri(1 - a / 2)
return norm_cum_dist, z
def wilson_lower(value, count, denominator, rate, alpha=0.05):
try:
... | mit | 1,543,250,997,386,965,200 | 31.884615 | 122 | 0.532164 | false | 3.352941 | false | false | false |
nosyndicate/pytorchrl | pytorchrl/policies/categorical_mlp_policy.py | 1 | 2695 | import numpy as np
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
from rllab.misc.overrides import overrides
from pytorchrl.core.parameterized import Parameterized
from pytorchrl.distributions.categorical import Categorical
from pytorchrl.policies.base import St... | mit | -7,502,618,938,575,838,000 | 25.174757 | 81 | 0.591837 | false | 4.204368 | false | false | false |
alquerci/cyg-apt | src/cygapt/path_mapper.py | 2 | 2286 | # -*- coding: utf-8 -*-
######################## BEGIN LICENSE BLOCK ########################
# This file is part of the cygapt package.
#
# Copyright (C) 2002-2009 Jan Nieuwenhuizen <janneke@gnu.org>
# 2002-2009 Chris Cormie <cjcormie@gmail.com>
# 2012 James Nylen <jnylen... | gpl-3.0 | -7,676,872,442,264,589,000 | 29.891892 | 69 | 0.520997 | false | 3.729201 | false | false | false |
stscieisenhamer/ginga | ginga/ImageView.py | 1 | 105925 | #
# ImageView.py -- base class for the display of image files
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
"""This module handles image viewers."""
import numpy
import math
import logging
import threading
import sys
import traceback
import time
from gi... | bsd-3-clause | -2,393,640,986,135,131,600 | 30.450416 | 89 | 0.534161 | false | 4.048966 | false | false | false |
hyperspy/hyperspyUI | hyperspyui/plugins/segmentation.py | 3 | 4922 | # -*- coding: utf-8 -*-
# Copyright 2014-2016 The HyperSpyUI developers
#
# This file is part of HyperSpyUI.
#
# HyperSpyUI 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 | 8,838,570,517,639,491,000 | 33.661972 | 79 | 0.59041 | false | 3.689655 | false | false | false |
kamal-gade/rockstor-core | src/rockstor/fs/btrfs.py | 1 | 11774 | """
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... | gpl-3.0 | 3,310,757,318,869,278,000 | 32.166197 | 79 | 0.59538 | false | 3.206427 | false | false | false |
lzambella/Qyoutube-dl | Controllers/MainWindowController.py | 1 | 6363 | from PyQt5.QtWidgets import QMainWindow, QDialog, QFileDialog
from PyQt5.QtCore import pyqtSlot, Qt
from Compiled_UI.MainWindow import Ui_MainWindow
from Compiled_UI.about import Ui_About
import sys
import subprocess
class MainWindow(QMainWindow):
argv = []
def __init__(self):
super(MainWindow, self)... | gpl-3.0 | 7,671,002,724,659,439,000 | 42.285714 | 107 | 0.584944 | false | 3.580754 | false | false | false |
dougsland/ovirt-register | src/ovirt_register/http.py | 2 | 1601 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Red Hat, Inc.
#
# 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, version 2 of the License.
#
# This program is distributed in the hope that it will ... | gpl-2.0 | -4,853,860,899,342,269,000 | 32.354167 | 75 | 0.595878 | false | 4.535411 | false | false | false |
auag92/n2dm | Asap-3.8.4/Debug/UnBalance.py | 1 | 1763 | #PBS -N UnBalance
#PBS -m ae
#PBS -q long
#PBS -l nodes=1:opteron:ppn=2
"""Test handling of extreme load-unbalancing."""
from asap3 import *
from asap3.md import MDLogger
from ase.lattice.cubic import FaceCenteredCubic
import numpy as np
from asap3.mpi import world
#DebugOutput("UnBalance.%d.out")
#set_verbose(1)
pr... | mit | -8,303,294,517,848,611,000 | 23.5 | 81 | 0.609756 | false | 2.600295 | false | false | false |
modoboa/modoboa | modoboa/admin/management/commands/subcommands/_import.py | 1 | 4331 | """Django management command to import admin objects."""
import csv
import io
import os
import progressbar
from chardet.universaldetector import UniversalDetector
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.utils.translation import ugettext as _
fr... | isc | -3,462,129,603,173,138,000 | 35.70339 | 78 | 0.513507 | false | 4.989631 | false | false | false |
atantet/transferPlasim | runPlasim/postprocessor/indices/get_index_area.py | 1 | 3261 | import os, sys
import numpy as np
from netCDF4 import Dataset
# Index calculation functions definition
def getAreaRange(srcVar, lat, lon, WEIGHTS, rng, win):
""" Calculate the Mean Surface Temperature. """
nt = srcVar.shape[0]
index = np.empty((nt,))
ilat = (lat >= win[1]) & (lat <= win[3])
ilon = ... | gpl-2.0 | 5,184,861,037,382,312,000 | 31.287129 | 90 | 0.655934 | false | 2.662041 | false | false | false |
m000/django_generic_confirmation | generic_confirmation/models.py | 1 | 3304 | from django.utils import timezone
from django.db import models
from django.db.models.query import Q
from django.contrib.contenttypes.models import ContentType
try:
# Django >= 1.8
from django.contrib.contenttypes.fields import GenericForeignKey
except ImportError:
# Django <= 1.7
from django.contrib.con... | bsd-3-clause | 3,788,120,052,762,542,000 | 34.913043 | 94 | 0.661925 | false | 4.034188 | false | false | false |
anonymouscontributor/cnr | ConvQuad_example.py | 1 | 4362 | '''
Comparison of Continuous No-Regret Algorithms:
Convex Quadratic
@date: May 22, 2015
'''
# Set up infrastructure and basic problem parameters
import matplotlib as mpl
mpl.use('Agg') # this is needed when running on a linux server over terminal
import multiprocessing as mp
import numpy as np
import datetime, os
fro... | mit | 3,500,018,926,383,345,700 | 43.969072 | 125 | 0.740715 | false | 3.1793 | false | false | false |
sohovet/sohovet | sohovet_appointment/models/appointment.py | 1 | 2681 | # -*- encoding: utf-8 -*-
##############################################################################
# #
# OpenERP, Open Source Management Solution. #
# ... | agpl-3.0 | 956,086,177,485,199,500 | 51.54902 | 84 | 0.493657 | false | 4.542373 | false | false | false |
odinho/medlemssys | medlemssys/medlem/behaviours.py | 2 | 4919 | # -*- coding: utf-8 -*-
# vim: ts=4 sts=4 expandtab ai
# Copyright 2009-2016 Odin Hørthe Omdal
# This file is part of Medlemssys.
# Medlemssys is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either v... | agpl-3.0 | -9,080,656,032,370,375,000 | 35.656716 | 85 | 0.623371 | false | 3.195836 | false | false | false |
google/timesketch | timesketch/lib/emojis.py | 1 | 2928 | # Copyright 2018 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 2,995,063,860,361,772,000 | 32.655172 | 78 | 0.66291 | false | 3.315968 | false | false | false |
kaday/rose | lib/python/rose/config_editor/ops/section.py | 1 | 14627 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2012-6 Met Office.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 | -7,283,426,526,915,770,000 | 44.709375 | 79 | 0.581185 | false | 4.070971 | true | false | false |
shanot/imp | modules/display/test/test_log.py | 2 | 1390 | import IMP
import IMP.test
import IMP.core
import IMP.display
import IMP.container
import os
class Tests(IMP.test.TestCase):
def setUp(self):
IMP.test.TestCase.setUp(self)
IMP.set_log_level(IMP.TERSE)
def _testopen(self, fname):
open(fname, "r")
def _testit(self, writer, nm):
... | gpl-3.0 | 835,133,214,244,091,000 | 24.272727 | 54 | 0.553957 | false | 2.970085 | true | false | false |
nathan-osman/ledcontrol | ledcontrol/device.py | 1 | 2976 | from colorsys import yiq_to_rgb, rgb_to_yiq
from math import cos, pi
from os.path import join
from time import sleep
class Device(object):
"""
Represents an LED device.
"""
_CHANNELS = ['red', 'green', 'blue']
_TICK = 30**-1
_PREDEFINED = {
'white': (1, 1, 1),
'silver': (0.75,... | mit | -2,482,384,599,167,463,000 | 27.342857 | 89 | 0.492944 | false | 3.39726 | false | false | false |
nuagenetworks/vspk-python | vspk/v6/nugatewayslocation.py | 1 | 17817 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyrigh... | bsd-3-clause | -3,325,586,771,869,136,400 | 30.648313 | 465 | 0.58983 | false | 4.673924 | false | false | false |
sug4rok/Servus | Servus/plugins/arduino_on_off_switch/models.py | 1 | 1499 | # coding=utf-8
from django.db import models
from plugins.arduino.models import Arduino, set_command
MODEL = 'OnOffSwitch'
class OnOffSwitch(models.Model):
"""
Модель переключателей с двумя состояниями (on/off).
"""
CONTAINER = 'home'
TYPE = 'OnOffSwitch'
WIDGET_TYPE = 'positioned'
nam... | mit | -181,330,350,376,583,230 | 23.210526 | 55 | 0.592754 | false | 3.087248 | false | false | false |
Acehaidrey/incubator-airflow | tests/api_connexion/endpoints/test_task_endpoint.py | 2 | 8752 | # 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 u... | apache-2.0 | 5,269,182,589,362,805,000 | 37.897778 | 109 | 0.558958 | false | 3.841967 | true | false | false |
ShawnMurd/MetPy | src/metpy/interpolate/points.py | 2 | 12988 | # Copyright (c) 2018 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Interpolate data valid at one set of points to another in multiple dimensions."""
import logging
import numpy as np
from scipy.interpolate import griddata, Rbf
from scipy.spatia... | bsd-3-clause | 1,396,883,168,745,926,100 | 33.089239 | 95 | 0.631814 | false | 4.022298 | false | false | false |
Den1al/JSShell | shell/plugins/select.py | 1 | 1542 | import argparse
from typing import List
from cmd2 import with_argparser, argparse_completer, with_category
from argparse import ArgumentParser
from common.models.client import Client
from shell import BasePlugin
class SelectPlugin(BasePlugin):
""" SelectPlugin - describes the `select` command """
select_pa... | mit | -8,670,271,421,346,747,000 | 34.860465 | 101 | 0.684176 | false | 4.005195 | false | false | false |
OCA/social | mail_show_follower/models/mail_mail.py | 1 | 4125 | from odoo import models, api
class MailMail(models.Model):
_inherit = "mail.mail"
@api.multi
def _send(self, auto_commit=False, raise_exception=False, smtp_session=None):
plain_text = (
'<div summary="o_mail_notification" style="padding: 0px; '
'font-size: 10px;"><b>CC</b>... | agpl-3.0 | -1,877,686,312,890,530,800 | 49.925926 | 86 | 0.435636 | false | 4.763279 | false | false | false |
Sebsebzen/skylens | skylens.py | 1 | 2616 | import os
from flask import Flask, request, render_template, redirect, abort, flash, jsonify
from twython import Twython, TwythonError
import hidden
import urllib
import json
import re
import requests
app = Flask(__name__)
#GoogleMaps(app)
serviceurl = 'http://maps.googleapis.com/maps/api/geocode/json?'
secrets = hid... | mit | -5,178,940,934,888,067,000 | 30.518072 | 124 | 0.606651 | false | 3.332484 | false | false | false |
lzamparo/crisprML | src/join_partitions.py | 1 | 1330 | from __future__ import print_function
import os
import sys
indir = sys.argv[1]
os.chdir(indir)
partition_dirs = [f for f in os.listdir('.')]
outfile = 'raw_features_computed_Cas9_sequences_fitting_annotation.csv'
def process_file(filename, outhandle, skip_header=True):
with open(filename, 'r') as f:
fo... | bsd-3-clause | -7,404,749,176,285,282,000 | 27.913043 | 95 | 0.634586 | false | 3.251834 | false | false | false |
shedskin/shedskin | shedskin/lib/datetime.py | 6 | 6127 | # Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE)
from time import struct_time
import string
MINYEAR = 1
MAXYEAR = 9999
class date:
def __init__(self, year, month, day):
self.year = year
self.month = month
self.day = day
def today():
return date(... | gpl-3.0 | 5,509,294,271,616,387,000 | 20.882143 | 103 | 0.588543 | false | 3.779766 | false | false | false |
yishayv/lyacorr | ism_spectra/write_real_median_spectrum.py | 1 | 5774 | """
Create stacked median ISM spectra.
This version uses a comparison based median, and requires that ALL spectra fit in RAM,
for the requested wavelength range.
"""
import cProfile
from os.path import splitext
import numpy as np
from astropy import table
from mpi4py import MPI
from scipy.signal import savgol_filter... | mit | 5,175,293,911,284,840,000 | 38.013514 | 112 | 0.688085 | false | 3.356977 | false | false | false |
jssjr/carbonate | carbonate/sync.py | 1 | 5380 | import os
import sys
import logging
import shutil
import subprocess
from time import time
from datetime import timedelta
from tempfile import mkdtemp, NamedTemporaryFile
from shutil import rmtree
from whisper import CorruptWhisperFile
from .fill import fill_archives
def sync_from_remote(sync_file, remote, staging, r... | mit | -5,161,218,910,859,300,000 | 33.267516 | 78 | 0.54145 | false | 4.094368 | false | false | false |
maisim/django-localflavor | localflavor/fr/models.py | 4 | 1578 | from django.db.models import CharField
from django.utils.translation import ugettext_lazy as _
class FRSIRENField(CharField):
"""
A :class:`~django.db.models.CharField` that checks that the value
is a valid French SIREN number
.. versionadded:: 1.1
"""
description = _("SIREN Number")
def... | bsd-3-clause | 1,182,748,511,457,201,400 | 29.346154 | 74 | 0.627376 | false | 3.84878 | false | false | false |
tectronics/coot | python/template_key_bindings.py | 2 | 6431 |
add_key_binding("Refine Active Residue", "r", lambda: manual_refine_residues(0))
add_key_binding("Refine Active Residue AA", "x", lambda: refine_active_residue())
add_key_binding("Triple Refine", "t", lambda: manual_refine_residues(1))
add_key_binding("Autofit Rotamer", "j", lambda: auto_fit_rotamer_active_residue())
... | gpl-3.0 | 1,028,170,383,449,334,700 | 40.224359 | 83 | 0.583735 | false | 3.066762 | false | false | false |
fhueske/flink | flink-python/pyflink/datastream/tests/test_state_backend.py | 3 | 8808 | ################################################################################
# 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... | apache-2.0 | 997,339,987,176,428,400 | 39.40367 | 97 | 0.658265 | false | 4.253018 | true | false | false |
rht/universe | universe/rewarder/reward_proxy_server.py | 2 | 8174 | import json
import logging
import os
import time
from autobahn.twisted import websocket
from universe.twisty import reactor
from twisted.internet import endpoints
logger = logging.getLogger(__name__)
class RewardServerClient(websocket.WebSocketClientProtocol, object):
def __init__(self):
super(RewardServ... | mit | -4,215,725,532,481,409,500 | 39.26601 | 173 | 0.61818 | false | 4.002938 | false | false | false |
gidden/cyclopts | cyclopts/condor/launch_master.py | 1 | 12060 | #!/usr/bin/python
import operator
import os
import sys
import subprocess
import work_queue as wq
import io
import time
import re
import math
mv_sh = u"""#!/bin/bash
echo "pwd: $PWD"
echo "dbdir: $PWD/{loc}"
ls -l {loc}
mv $1 {loc}
ls -l {loc}
"""
mv_sub = u"""universe = vanilla
executable = mv.sh
arguments = {indb}
... | bsd-3-clause | 8,511,622,915,037,579,000 | 34.680473 | 121 | 0.587148 | false | 3.160377 | false | false | false |
pdebuyl/RMPCDMD | scripts/compare_params.py | 2 | 1285 | #!/usr/bin/env python
r"""
Compare the arguments listed by Doxygen's \param directive and those read using
PTread_* functions. This program is use to check the consistency of the
documentation of the programs.
"""
from __future__ import print_function, division
import argparse
parser = argparse.ArgumentParser(descrip... | bsd-3-clause | -1,235,817,590,747,854,000 | 30.341463 | 79 | 0.670039 | false | 3.311856 | false | false | false |
blachlylab/pyega | pyega.py | 1 | 13618 | # Copyright 2017-2019 James S Blachly, MD.
#
# 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,911,841,348,644,567,000 | 38.132184 | 140 | 0.625349 | false | 3.618921 | false | false | false |
Haabb/pwnfork | pwn/shellcode/misc/mov.py | 1 | 8545 | from pwn.internal.shellcode_helper import *
import pwn
import string
@shellcode_reqs(arch=['i386', 'amd64', 'arm', 'thumb'])
def mov(dest, src, stack_allowed = True, arch = None):
"""Does a mov into the dest while newlines and null characters.
The src can be be an immediate or another register.
If the st... | mit | 5,612,921,583,626,808,000 | 31.245283 | 154 | 0.467057 | false | 2.920369 | false | false | false |
mtchetch/trello-rss | trellorss.py | 2 | 10656 | """
trello-rss - A Python module for creating an RSS feed for your Trello boards.
Written by Nate Collings
Required:
sarumont's py-trello Trello API Wrapper:
https://github.com/sarumont/py-trello
PyRSS2Gen:
https://pypi.python.org/pypi/PyRSS2Gen
A Trello API Key and token for the boards to view:
https://trello.com... | mit | -6,583,699,699,717,745,000 | 38.032967 | 122 | 0.560154 | false | 3.852495 | false | false | false |
koolspin/rosetta | graph/pad_capabilities.py | 1 | 1536 | from graph.enums import CapabilitiesType
from graph.mime_types import MimeTypes
class PadCapabilities:
"""
Defines the capabilities of a pad. Used for restrict pads to certain formats.
"""
def __init__(self, cap_match_type, mime_type, pad_props) -> None:
super().__init__()
self._cap_ma... | mit | 7,807,530,470,850,701,000 | 32.391304 | 90 | 0.622396 | false | 4.140162 | false | false | false |
rartino/ENVISIoN | envisionpy/processor_network/Bandstructure3DNetworkHandler.py | 1 | 13611 | # ENVISIoN
#
# Copyright (c) 2020-2021 Amanda Aasa, Amanda Svennblad, Gabriel Anderberg, Didrik Axén,
# Adam Engman, Kristoffer Gubberud Maras, Joakim Stenborg
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following co... | bsd-2-clause | 664,087,395,440,804,200 | 38.555233 | 123 | 0.627765 | false | 3.651906 | false | false | false |
OlivierBondu/GridIn | python/runFrameworkOnGrid.py | 4 | 2242 | #! /usr/bin/env python
__author__ = 'sbrochet'
"""
This script will be executed on a grid cluster by CRAB.
It extracts the list of files to run over, as well as the number of events, and the run / lumi list
"""
def decode_lfn(lfn):
"""
Convert LFN to PFN. To do that, call ``edmFileUtil``
:param lfn:
... | mit | -2,582,874,152,425,053,000 | 25.069767 | 106 | 0.671276 | false | 3.326409 | false | false | false |
StanfordBioinformatics/loom | client/loomengine/example.py | 2 | 4552 | #!/usr/bin/env python
import argparse
from collections import OrderedDict
import glob
import os
import shutil
EXAMPLE_DIR = os.path.join(os.path.dirname(__file__), 'examples')
EXAMPLE_INDEX = [
('hello_world', 'steps in serial and parallel, file inputs'),
('join_two_words', 'simplest example'),
('capitaliz... | agpl-3.0 | 4,363,017,281,832,900,000 | 31.985507 | 79 | 0.611819 | false | 4.141947 | false | false | false |
tuomas2/serviceform | serviceform/serviceform/forms.py | 1 | 23752 | # -*- coding: utf-8 -*-
# (c) 2017 Tuomas Airaksinen
#
# This file is part of Serviceform.
#
# Serviceform 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)... | gpl-3.0 | 4,685,044,507,231,443,000 | 39.671233 | 100 | 0.583109 | false | 4.36377 | false | false | false |
PaleTomato/datapoint-basic | datapointbasic/searchtools.py | 1 | 5123 | import datapoint
from datapointbasic.tools import distance_between_points
class LocationSearch(object):
"""
Class that is useful for searching through the catalogue of stations within
the Met Office DataPoint.
"""
def __init__(self, api_key=""):
# Store API key and estab... | gpl-3.0 | 8,714,793,925,094,921,000 | 31.927152 | 80 | 0.551435 | false | 4.801312 | false | false | false |
SlideAtlas/SlideAtlas-Server | slideatlas/ptiffstore/openslide_reader.py | 1 | 1309 | import os
from base_reader import InvertedReader
from common_utils import get_max_depth
import openslide
import logging
logger = logging.getLogger('slideatlas')
__all__ = ("OpenslideReader", )
class OpenslideReader(InvertedReader):
def __init__(self):
super(OpenslideReader, self).__init__()
def set... | apache-2.0 | 1,672,754,421,545,533,200 | 29.44186 | 96 | 0.618793 | false | 3.382429 | false | false | false |
tBaxter/django-fretboard | fretboard/models.py | 1 | 7838 | from django.conf import settings
from django.db import models
from django.urls import reverse
from django.utils.functional import cached_property
from easy_thumbnails.fields import ThumbnailerImageField
from tango_shared.models import set_img_path, BaseUserContentModel
from voting.models import Vote
from .ma... | mit | -3,416,365,460,241,758,000 | 27.577358 | 91 | 0.595815 | false | 4.140518 | false | false | false |
Caasar/imageviewer | wrapper/base.py | 1 | 4387 | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 11 18:49:52 2017
@author: Caasar
"""
KNOWN_ARCHIVES = set()
class WrapperIOError(IOError):
pass
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 11 18:50:02 2017
@author: Caasar
"""
import os
import re
#import htmllib,formatter
from six import text_type, next
#from... | mit | -6,831,341,552,739,520,000 | 26.591195 | 79 | 0.541828 | false | 4.373878 | false | false | false |
mrquim/mrquimrepo | script.module.youtube.dl/lib/youtube_dl/extractor/orf.py | 17 | 10860 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
HEADRequest,
unified_strdate,
strip_jsonp,
int_or_none,
float_or_none,
determine_ext,
remove_end,
unescapeHTML,
)
class ORFTVthekI... | gpl-2.0 | -5,165,880,708,637,770,000 | 34.135922 | 222 | 0.495072 | false | 3.53303 | false | false | false |
seangal/dcgan_vae_pytorch | main.py | 1 | 13368 | from __future__ import print_function
import argparse
import os
import random
import math
import torch
import torch.nn as nn
import torch.legacy.nn as lnn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.utils.data
import torchvision.datasets as dset
import torchvis... | bsd-3-clause | 3,406,859,162,595,727,000 | 37.08547 | 160 | 0.584156 | false | 3.191215 | false | false | false |
bruzen/employ_game | employ_game/server.py | 1 | 5473 | import os.path
import json
import random
import uuid as uuid_package
import pkgutil
import employ_game
import model
from collections import OrderedDict
actions = OrderedDict()
seeds = {}
names = {}
class Server(employ_game.swi.SimpleWebInterface):
def swi_static(self, *path):
if self.user is None: ret... | gpl-2.0 | -1,898,419,222,230,912,800 | 30.635838 | 91 | 0.531701 | false | 3.648667 | false | false | false |
Bakterija/mmplayer | mmplayer/kivy_soil/kb_system/compat_widgets/textinput.py | 2 | 1536 | from kivy_soil.kb_system.canvas import FocusBehaviorCanvas
from kivy_soil.kb_system.canvas import FocusBehaviorCanvasScroller
from kivy.uix.textinput import TextInput
__all__ = ('CompatTextInput', 'CompatTextInputScroller')
class CompatTextInputBase(TextInput):
ignored_keys = [9,]
ignored_text = '`'
def... | mit | -8,169,046,876,397,386,000 | 33.909091 | 76 | 0.680339 | false | 3.849624 | false | false | false |
previtus/MGR-Project-Code | Settings/set1-test_of_models_against_datasets/osm.py | 1 | 2140 | def Setup(Settings,DefaultModel):
# set1-test_of_models_against_datasets/osm.py
Settings["experiment_name"] = "set1b_Osm_model_versus_datasets"
Settings["graph_histories"] = ['together'] #['all','together',[],[1,0],[0,0,0],[]]
# 5556x_minlen30_640px 5556x_minlen20_640px 5556x_reslen20_299px 5556x_res... | mit | 8,248,284,552,679,536,000 | 43.583333 | 89 | 0.639252 | false | 3.13783 | false | false | false |
ccxt/ccxt | python/ccxt/coinegg.py | 1 | 18512 | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationE... | mit | -7,787,987,232,846,833,000 | 37.243802 | 163 | 0.456618 | false | 4.315691 | false | false | false |
zplab/rpc-scope | scope/client_util/z_stack.py | 1 | 2161 | # This code is licensed under the MIT License (see LICENSE file for details)
import numpy
import time
import contextlib
def z_stack(scope, mm_range, num_steps, tl_enabled=False, **spectra_state):
"""Acquire a z-series of images.
Parameters:
scope: microscope client object
mm_range: number of ... | mit | 7,185,840,456,316,939,000 | 47.022222 | 120 | 0.657566 | false | 4.009276 | false | false | false |
robmcmullen/peppy | peppy/major_modes/c.py | 1 | 5200 | # peppy Copyright (c) 2006-2010 Rob McMullen
# c_mode Copyright (c) 2007 Julian Back
# Licenced under the GPLv2; see http://peppy.flipturn.org for more info
"""C programming language editing support.
Major mode for editing ANSI C files.
"""
import os
import wx
import wx.stc
from peppy.lib.foldexplorer import *
from... | gpl-2.0 | 2,325,043,326,890,486,000 | 33.210526 | 85 | 0.597692 | false | 4.15004 | false | false | false |
fadiga/mstock | ui/reports_managers.py | 1 | 8638 | #!usr/bin/env python
# -*- coding: utf-8 -*-
# maintainer: Fadiga
from datetime import date, datetime
from PyQt4.QtCore import Qt, QDate
from PyQt4.QtGui import (
QVBoxLayout, QGridLayout, QTableWidgetItem, QIcon, QMenu)
from configuration import Config
from models import Reports, Store
from Common.ui.common impo... | apache-2.0 | 4,585,656,558,545,986,600 | 36.872807 | 84 | 0.570353 | false | 3.571133 | true | false | false |
hippo91/XVOF | xfv/src/cohesive_model/cohesive_zone_model.py | 1 | 2255 | # -*- coding: utf-8 -*-
"""
Definition of CohesiveZoneModel class to manage the cohesive discontinuities
"""
import numpy as np
from xfv.src.cohesive_model.cohesive_law import CohesiveLaw
from xfv.src.cohesive_model_unloading.unloading_model_base import UnloadingModelBase
class CohesiveZoneModel:
"""
A class... | gpl-3.0 | 20,324,078,903,407,508 | 37.844828 | 94 | 0.653795 | false | 3.628019 | false | false | false |
booi/aracna | RaspberryPypose/robotPi/Robot.py | 2 | 19101 | import os
from datetime import datetime
from time import sleep
from types import FunctionType
from copy import copy
from numpy import array
import dynamixel
from Motion import lInterp, scaleTime
from serial_stream import SerialStream
from dynamixel_network import DynamixelNetwork
'''
Much inspiration taken from http:... | gpl-3.0 | 4,875,393,516,232,598,000 | 35.803468 | 134 | 0.557719 | false | 4.177822 | false | false | false |
najce/freebook | app/users/views.py | 1 | 5543 | #-*- coding:utf-8 -*-
from app.extensions import mongo
from app.forms import LoginForm, RegisterForm, ProfileForm
from app.models import User
from app.util import bson_obj_id, AllowFile
from gridfs import GridFS, NoFile
from flask import render_template, redirect, url_for, request, flash, jsonify, abort, make_response
... | mit | 7,172,250,553,125,119,000 | 34.953333 | 99 | 0.571482 | false | 3.617036 | false | false | false |
festen/dotfiles | scripts/bin/server/server-stats/modules/disk_usage.py | 1 | 1058 | from modules.common import *
from subprocess import getoutput
class DiskUsageModule(TableModule):
def df(self, disk: str):
return getoutput("df -B1 | tail -n+2 | while read fs size used rest ; do if [ $used ] ; then echo $fs $used $size; fi; done | grep " + disk).split(' ')
def __init__(self):
... | mit | -3,912,811,556,833,947,600 | 36.785714 | 159 | 0.517013 | false | 2.875 | false | false | false |
ohbobbyboy/bobby_boy | qr.py | 1 | 2780 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import time
import zbar
import config
import pygame
from pygame import camera
from PIL import Image
from qrtools import QR
def get_qr_content(with_gui=False, manual_detect=False):
screen = None
detected = False
camera.init()
if not camera.list_came... | mit | -5,492,330,018,870,493,000 | 25.730769 | 83 | 0.538849 | false | 4.064327 | false | false | false |
tensorflow/text | tensorflow_text/tools/wordpiece_vocab/generate_vocab.py | 1 | 10045 | # coding=utf-8
# Copyright 2021 TF.Text 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 ag... | apache-2.0 | 980,266,142,827,378,800 | 42.484848 | 92 | 0.639423 | false | 4.029282 | false | false | false |
andela/troupon | troupon/merchant/tests/test_views.py | 1 | 1220 | from django.core.urlresolvers import reverse
from django.contrib.messages.storage.fallback import FallbackStorage
from django.utils.importlib import import_module
from django.conf import settings
from accounts.tests.test_routes import UserProfileMerchantTestCase
from deals.tests.test_routes import set_advertiser_and_c... | mit | -6,276,173,724,427,468,000 | 37.125 | 68 | 0.731967 | false | 4.121622 | true | false | false |
gfelbing/Docker | gfelbing_tensorflow/test_tensorflow.py | 1 | 1045 | #!/bin/python
# Example from https://www.tensorflow.org/versions/r0.9/get_started/index.html
import tensorflow as tf
import numpy as np
# Create 100 phony x, y data points in NumPy, y = x * 0.1 + 0.3
x_data = np.random.rand(100).astype(np.float32)
y_data = x_data * 0.1 + 0.3
# Try to find values for W and b that com... | gpl-3.0 | 425,898,809,941,160,060 | 26.5 | 78 | 0.669856 | false | 2.757256 | false | false | false |
sclausen/robomongo | src/third-party/mongodb/buildscripts/setup_multiversion_mongodb.py | 12 | 4882 | #!/usr/bin/python
import re
import sys
import os
import tempfile
import urllib2
import subprocess
import tarfile
import shutil
import errno
#
# Useful script for installing multiple versions of MongoDB on a machine
# Only really tested/works on Linux.
#
class MultiVersionDownloader :
def __init__(self, install_... | gpl-3.0 | 6,364,828,492,377,616,000 | 26.897143 | 119 | 0.590946 | false | 3.627043 | false | false | false |
GRArmstrong/invenio-inspire-ops | modules/oairepository/lib/oai_repository_admin.py | 24 | 32658 | ## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011, 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later ... | gpl-2.0 | -5,635,995,943,990,283,000 | 36.798611 | 381 | 0.464848 | false | 3.499946 | false | false | false |
andreas-kowasch/DomainSearch | DomainSearchViewer/additional/Database.py | 1 | 2808 | # -*- coding: utf-8 -*-
"""
The Database connection.
"""
import threading
import pymysql
from additional import Config
################################################################################
class Database:
"""
This class handles the connection to the database and executes queries.
"""
d... | bsd-2-clause | -9,037,182,823,001,637,000 | 24.071429 | 80 | 0.483262 | false | 5.420849 | false | false | false |
bak1an/django | django/contrib/postgres/fields/ranges.py | 61 | 7565 | import datetime
import json
from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange, Range
from django.contrib.postgres import forms, lookups
from django.db import models
from .utils import AttributeSetter
__all__ = [
'RangeField', 'IntegerRangeField', 'BigIntegerRangeField',
'FloatRangeField',... | bsd-3-clause | 4,504,095,334,228,441,000 | 29.019841 | 116 | 0.65499 | false | 3.938053 | false | false | false |
bis83/pomdog | tools/refactor_sources.py | 2 | 3487 | # Copyright (c) 2013-2015 mogemimi.
# Distributed under the MIT license. See LICENSE.md file for details.
import sys
import os
import argparse
import subprocess
import uuid
from string import Template
def ParsingCommandLineAraguments():
parser = argparse.ArgumentParser(
prog='refactor_sources',
... | mit | -5,697,623,939,250,491,000 | 23.907143 | 94 | 0.594207 | false | 3.827662 | false | false | false |
gforcada/haproxy_log_analysis | haproxy/tests/test_filters.py | 1 | 6733 | # -*- coding: utf-8 -*-
from haproxy import filters
import pytest
@pytest.mark.parametrize(
'to_filter, to_check, result',
[
('1.2.3.4', '1.2.3.4', True),
('2.3.4.5', '5.3.5.4', False),
('2001:db8::8a2e:370:7334', '2001:db8::8a2e:370:7334', True),
('2001:db8::8a2e:370:7334', '... | gpl-3.0 | -6,307,773,070,896,649,000 | 30.759434 | 84 | 0.603891 | false | 3.268447 | true | false | false |
rz4/Twitter-Presidential-Race-Sentiment-Clustering | src/ClusterTwitterData.py | 1 | 1842 | """
Twitter_Presidential_Race_Sentiment_Clustering: ClusterTwitterData.py
Authors: Justin Murphey, Rafael Zamora
Last Updated: 12/04/16
CHANGE-LOG:
-Code Review/Refactoring
-Updated Comments
"""
'''
This script is used to preform Birch clustering on the processed data set generated from
data gathered from Twitter.
... | mit | 1,755,568,225,546,431,500 | 31.892857 | 115 | 0.648208 | false | 3.361314 | false | false | false |
mp-coder/translate-dev-tools | esprima/jsx_syntax.py | 7 | 1876 | # -*- coding: utf-8 -*-
# Copyright JS Foundation and other contributors, https://js.foundation/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# ... | mit | -8,683,741,822,135,072,000 | 48.368421 | 78 | 0.770789 | false | 4.292906 | false | false | false |
yugang/crosswalk-test-suite | wrt/wrt-packertool2-android-tests/packertool2/comm.py | 1 | 1301 | #!/usr/bin/env python
import unittest
import os, sys, commands
import Queue, thread
Devices = list()
SCRIPT_PATH = os.path.realpath(__file__)
ConstPath = os.path.dirname(SCRIPT_PATH)
MainPath = os.getcwd()
APP_PATH = MainPath + "/resource/"
Pck_Tools = MainPath + "/tools/crosswalk/"
MANIFEST_PATH = ["manifest.json", ... | bsd-3-clause | 4,555,640,455,082,984,400 | 27.282609 | 90 | 0.596464 | false | 3.268844 | false | false | false |
fastats/fastats | fastats/scaling/scaling.py | 2 | 5619 |
from numba import prange
from numpy import empty_like, mean, std, sqrt, argsort, ones, nonzero, empty
from numpy import float64 as np_float64
from numpy import int32 as np_int32
from numpy import max as np_max
from numpy import min as np_min
def scale(A):
"""
A no-op data scaling transformation
"""
r... | mit | -4,687,869,428,207,728,000 | 23.973333 | 92 | 0.557395 | false | 3.382902 | false | false | false |
Netflix/lemur | lemur/plugins/views.py | 1 | 3370 | """
.. module: lemur.plugins.views
:platform: Unix
:synopsis: This module contains all of the accounts view code.
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from flask import Bluepr... | apache-2.0 | 3,648,778,314,968,436,700 | 26.177419 | 69 | 0.528487 | false | 4.597544 | false | false | false |
graphql-python/graphql-core | src/graphql/utilities/value_from_ast.py | 1 | 5756 | from typing import Any, Dict, List, Optional, cast
from ..language import (
ListValueNode,
NullValueNode,
ObjectValueNode,
ValueNode,
VariableNode,
)
from ..pyutils import inspect, Undefined
from ..type import (
GraphQLInputObjectType,
GraphQLInputType,
GraphQLList,
GraphQLNonNull,
... | mit | -6,615,787,111,572,963,000 | 37.630872 | 87 | 0.585997 | false | 4.393893 | false | false | false |
jemofthewest/GalaxyMage | src/Translate.py | 1 | 1695 | # Copyright (C) 2005 Colin McMillen <mcmillen@cs.cmu.edu>
#
# This file is part of GalaxyMage.
#
# GalaxyMage 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 opti... | gpl-2.0 | 3,370,847,179,086,206,500 | 38.418605 | 101 | 0.664897 | false | 3.834842 | false | false | false |
asterisk/testsuite | lib/python/sip_message.py | 2 | 4181 | #!/usr/bin/env python
import re
class SIPParseError(Exception):
pass
# This is not particularly efficient. I don't care.
# Ok, I do, but I'm not going to do anything about it.
class SIPMessage:
""" This generally parses out the first line, headers, and body in a SIP message.
It does not ensure that thos... | gpl-2.0 | -537,916,071,144,741,900 | 31.410853 | 172 | 0.534322 | false | 3.736372 | true | false | false |
mmpagani/oq-hazardlib | openquake/hazardlib/geo/polygon.py | 2 | 10618 | # The Hazard Library
# Copyright (C) 2012-2014, GEM Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
... | agpl-3.0 | 4,709,366,423,744,465,000 | 38.472119 | 79 | 0.621303 | false | 4.079139 | false | false | false |
dkodnik/paperbod | bot/bot_rss.py | 2 | 6714 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#ver:2014.07.04-2
import MySQLdb as mdb
import html2text.html2text as h2t
import feedparser
import diaspy.client as dsc
import hashlib
from datetime import datetime, date, time
import time as tm
import sys
import re
def remove_img_tags(data):
#p = re.compile(r'<img.... | agpl-3.0 | 3,486,209,659,787,335,700 | 40.378205 | 151 | 0.468082 | false | 3.662883 | false | false | false |
orgkhnargh/AssignRandomAppearances | AssignRandomAppearances/AssignRandomAppearances.py | 1 | 7214 | #Author-Dmytro Kyrychuk
#Description-Assign random appearance to each body.
# Copyright (C) 2015 Dmytro Kyrychuk
#
# This source file is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
# This program... | gpl-2.0 | 3,697,536,491,731,781,000 | 32.868545 | 79 | 0.639867 | false | 4.283848 | false | false | false |
dwhswenson/mdtraj | mdtraj/formats/psf.py | 10 | 9751 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2015 Stanford University and the Authors
#
# Authors: Jason Swails
# Contributors:
#
# MDTraj is free software: you ... | lgpl-2.1 | 8,328,891,960,197,991,000 | 34.202166 | 80 | 0.601067 | false | 4.184979 | false | false | false |
ghostshellgnome/clamwin | py/CloseWindows.py | 1 | 3715 | #-----------------------------------------------------------------------------
# Name: CloseWindows.py
# Product: ClamWin Free Antivirus
#
# Author: alch [alch at users dot sourceforge dot net]
#
# Created: 2004/22/03
# Copyright: Copyright alch (c) 2004
# Licence:
# This program is fre... | gpl-2.0 | -3,548,814,253,445,172,000 | 34.421569 | 90 | 0.582503 | false | 3.849741 | false | false | false |
sharkykh/nyaa | nyaa/views/torrents.py | 1 | 9776 | import json
import os.path
from urllib.parse import quote
import flask
from werkzeug.datastructures import CombinedMultiDict
from sqlalchemy.orm import joinedload
from nyaa import backend, forms, models, torrents
from nyaa.extensions import db
from nyaa.utils import cached_function
app = flask.current_app
bp = flas... | gpl-3.0 | 5,985,757,635,279,520,000 | 34.678832 | 98 | 0.617328 | false | 3.836735 | false | false | false |
mtagle/airflow | airflow/models/xcom.py | 4 | 8056 | #
# 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... | apache-2.0 | -3,667,710,273,012,180,500 | 33.874459 | 80 | 0.602532 | false | 4.191467 | false | false | false |
indico/indico | indico/modules/vc/plugins.py | 4 | 9554 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import re
from flask import render_template
from flask_pluginengine import render_plugin_template
from i... | mit | 3,677,719,809,104,597,500 | 38.974895 | 109 | 0.630731 | false | 3.8869 | false | false | false |
pravisankar/solum | solum/cmd/db_manage.py | 3 | 3270 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -1,642,077,893,720,216,800 | 32.71134 | 78 | 0.637003 | false | 4.057072 | false | false | false |
fyookball/electrum | lib/plugins.py | 1 | 42601 | #!/usr/bin/env python3
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including withou... | mit | 2,376,411,527,229,110,300 | 40.200193 | 140 | 0.598859 | false | 4.156601 | true | false | false |
natsutan/cocytus | example/vgg16_yolo/keras/vgg-yolo.py | 1 | 2744 | from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, InputLayer, Dropout
# 入力サイズ等はここを変更
width = 416
height = 416
r_w = 13
r_h = 13
r_n = 5
classes = 20
def vgg_yolo_model():
model = Sequential()
model.add(InputLayer(input_shape=(width, height, 3)))
model.add(Conv2D(64, data... | mit | -282,129,876,156,605,020 | 45.913793 | 88 | 0.598529 | false | 3.173862 | false | false | false |
geertj/draco2 | draco2/interface/standalone.py | 1 | 2336 | # vi: ts=8 sts=4 sw=4 et
#
# standalone.py: standalone webserver interface
#
# This file is part of Draco2. Draco2 is free software and is made available
# under the MIT license. Consult the file "LICENSE" that is distributed
# together with this file for the exact licensing terms.
#
# Draco2 is copyright (c) 1999-2007... | mit | -2,559,261,415,876,712,000 | 31.444444 | 84 | 0.603168 | false | 3.61051 | false | false | false |
Emsu/prophet | prophet/utils/tradingcalendar.py | 3 | 10803 | # The contents of this file are based on
# https://github.com/quantopian/zipline/blob/master/zipline/utils/tradingcalendar.py
#
# You may obtain a copy of the zipline License at
# http://www.apache.org/licenses/LICENSE-2.0
import pandas as pd
import pytz
from datetime import datetime, timedelta
from dateutil import rr... | bsd-3-clause | -2,311,044,730,046,358,500 | 26.280303 | 103 | 0.607424 | false | 3.131304 | false | false | false |
danvratil/xdg-app-repo-webui | ostree.py | 1 | 5829 | #!/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at ... | gpl-2.0 | 205,804,999,604,619,140 | 27.995025 | 105 | 0.538264 | false | 3.686275 | false | false | false |
iandees/all-the-places | locations/spiders/panera_bread.py | 1 | 4168 | import json
import scrapy
from locations.items import GeojsonPointItem
class PaneraBread(scrapy.Spider):
name = 'panera'
download_delay = 1.5
allowed_domains = ["panerabread.com"]
start_urls = (
'https://locations.panerabread.com/index.html',
)
def store_hours(self, day_hours):
... | mit | 2,815,438,201,670,407,700 | 39.076923 | 125 | 0.539827 | false | 3.734767 | false | false | false |
ngr/sm_00 | item/views.py | 1 | 6824 | from django.db.models import Q
from django.db.models import Sum
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import generics
from rest_framework import permissions
from area.models import Location
from item.models i... | mit | 3,336,613,911,818,237,400 | 38.378698 | 115 | 0.59027 | false | 4.442708 | false | false | false |
quimaguirre/diana | diana/toolbox/cluster_utilities.py | 1 | 9895 |
import network_utilities, text_utilities, wrappers
from time import strftime, sleep
import subprocess
import os, numpy, cPickle
import hashlib
def run_proximity_on_cluster(parameters, source_to_geneids, target_to_geneids, run_mode='array job', convert_names=True, md5_conversion=False, n_start = 0, n_end = 640000):
... | mit | 1,464,539,411,476,582,400 | 40.57563 | 182 | 0.655685 | false | 2.980422 | false | false | false |
cxmcc/ecsctl | ecsctl/wrapboto.py | 1 | 7893 |
import boto3
class BotoWrapper:
def __init__(self, session=None):
if not session:
session = boto3.session.Session()
self.session = session
self.ecs_client = session.client('ecs')
self.ec2_client = session.client('ec2')
def describe_instance(self, instance_id):
... | mit | -8,696,536,772,366,270,000 | 31.751037 | 77 | 0.570252 | false | 4.424327 | false | false | false |
manon-cortial/pypot | pypot/robot/config.py | 1 | 8451 | """
The config module allows the definition of the structure of your robot.
Configuration are written as Python dictionary so you can define/modify them programmatically. You can also import them form file such as JSON formatted file. In the configuration you have to define:
* controllers: For each defined controller... | gpl-3.0 | -8,977,189,409,374,794,000 | 30.416357 | 199 | 0.565969 | false | 3.72619 | true | false | false |
seokbeomKim/NdriveFUSE | setup.py | 1 | 1903 | from setuptools import setup
from setuptools.command.install import install
from setuptools import Command
from distutils.sysconfig import get_python_lib
import os
import site
install_requires=[
'rsa',
'requests',
'python-magic',
'clint',
'simplejson',
'fusepy',
'Ghost.py'
]
class Install... | gpl-2.0 | -2,234,220,243,268,554,000 | 29.693548 | 146 | 0.582239 | false | 3.269759 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.