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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
conyx/isjtests | wisimporter/wisimporter.py | 1 | 1383 | #!/usr/bin/env python3
"""
------------------------- WIS Importer for ISJ Tests --------------------------
Usage: ./wisimporter.py folder_with_input_files output_CSV_file
Description:
This script exports students points to CSV file in format:
xlogin00;POINTS
e.g.:
xbamba01;23,5
xjanda17;16,8
[The file in this format c... | bsd-3-clause | -5,370,217,662,830,862,000 | 28.425532 | 79 | 0.599422 | false | 3.316547 | false | false | false |
TechRunner2/i3-gaps-rice | .config/i3/bar/bumblebee/modules/layout.py | 1 | 2272 | # pylint: disable=C0111,R0903
"""Displays and changes the current keyboard layout
Requires the following executable:
* setxkbmap
Parameters:
* layout.lang: pipe-separated list of languages to cycle through (e.g. us|rs|de). Default: en
"""
import bumblebee.util
import bumblebee.input
import bumblebee.output
... | gpl-2.0 | 8,339,809,262,792,431,000 | 29.702703 | 97 | 0.573063 | false | 3.818487 | false | false | false |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_named_expressions.py | 1 | 16898 | import os
import unittest
GLOBAL_VAR = None
class NamedExpressionInvalidTest(unittest.TestCase):
def test_named_expression_invalid_01(self):
code = """x := 0"""
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
exec(code, {}, {})
def test_named_expression_invalid_02(se... | apache-2.0 | -9,035,707,188,850,126,000 | 31.558767 | 101 | 0.532903 | false | 3.700022 | true | false | false |
NKI-CCB/imfusion | src/imfusion/expression/counts.py | 2 | 7445 | # -*- coding: utf-8 -*-
"""Contains functions for generating and reading expression counts."""
# pylint: disable=wildcard-import,redefined-builtin,unused-wildcard-import
from __future__ import absolute_import, division, print_function
from builtins import *
# pylint: enable=wildcard-import,redefined-builtin,unused-wil... | mit | 5,669,393,050,516,405,000 | 29.264228 | 78 | 0.63358 | false | 4.043998 | false | false | false |
Miceuz/rs485-moist-sensor | utils/test.py | 1 | 1683 | #!/usr/bin/python
"""Waits for the sensor to appear on /dev/ttyUSB5, then reads moisture and temperature from it continuously"""
from chirp_modbus import SoilMoistureSensor
from time import sleep
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('serialport', metavar='SERIAL', type=str, help='Se... | apache-2.0 | 8,096,757,661,168,316,000 | 34.808511 | 178 | 0.69697 | false | 2.984043 | false | false | false |
monolithworks/trueseeing | trueseeing/app/grab.py | 1 | 3500 | # -*- coding: utf-8 -*-
# Trueseeing: Non-decompiling Android application vulnerability scanner
# Copyright (C) 2017 Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
#
# 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 F... | gpl-3.0 | -3,716,697,096,706,471,000 | 31.407407 | 133 | 0.652286 | false | 3.362152 | false | false | false |
MichaelSchreier/Pantheon | methods_ODESolve.py | 1 | 2304 | import array
import math
import numpy as np
def fGrav(pos1, pos2, mass1, mass2):
return 6.674 * pow(10, -11) * mass1 * mass2 * (pos2 - pos1) / pow(np.linalg.norm(pos2-pos1), 3)
#first order leapfrog --------------------------------------------------
def leapfrog_first_order_kick(pos, vel, mass, dt):
for ... | gpl-3.0 | -1,955,221,823,899,487,500 | 26.469136 | 96 | 0.477431 | false | 2.574302 | false | false | false |
19kestier/taiga-back | taiga/users/serializers.py | 2 | 4472 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | agpl-3.0 | -1,285,709,956,669,436,000 | 35.942149 | 97 | 0.63736 | false | 4.253092 | false | false | false |
neo1218/mana | mana/templates/auth/_auth_login_html.py | 1 | 2441 | # coding: utf-8
_auth_login_html_code = '''
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<meta name="descri... | mit | -50,760,581,313,807,200 | 32.619718 | 103 | 0.597822 | false | 3.124346 | false | false | false |
apacha/OMR-Datasets | omrdatasettools/tests/test_audiveris_image_generator.py | 1 | 1071 | import os
import shutil
import unittest
from glob import glob
from omrdatasettools.AudiverisOmrImageGenerator import AudiverisOmrImageGenerator
from omrdatasettools.Downloader import Downloader
from omrdatasettools.OmrDataset import OmrDataset
class AudiverisOmrImageGeneratorTest(unittest.TestCase):
def test_do... | mit | 5,236,683,666,788,865,000 | 31.454545 | 115 | 0.706816 | false | 3.4 | true | false | false |
H4213/Smart-City | model/modele.py | 1 | 3898 | # model.py
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy import Table, Column, create_engine
from sqlalchemy import Integer, ForeignKey, String, Unicode, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import backref, relation
app = Flask(__n... | gpl-2.0 | 5,084,076,327,563,510,000 | 30.184 | 156 | 0.558235 | false | 3.825319 | false | false | false |
tlienart/script2gle | s2gf.py | 1 | 5785 | from re import search, sub, match
from os.path import join
#
import s2gc
import s2gd
#
###########################
# LAMBDA FUNCTIONS ########
###########################
# match a certain expression at start of string
match_start = lambda expr,line: match(r'\s*(%s)[^a-zA-Z0-9]'%expr,line)
# ----------
# RECONSIDER
# ... | mit | 7,699,635,669,691,471,000 | 29.935829 | 138 | 0.551599 | false | 2.551831 | false | false | false |
turambar/pyDatasets | pydatasets/scripts/process_physionet_challenge2012_data.py | 2 | 4907 | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 9 14:29:38 2014
@author: dbell
@author: davekale
"""
from __future__ import division
import argparse
import glob
import os
import sys
import numpy as np
import scipy.io as sio
from pydatasets.physionet import challenge2012
from pydatasets.physionet.challenge2012 impo... | apache-2.0 | 349,646,103,027,934,600 | 37.03876 | 124 | 0.546362 | false | 2.964955 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-relay/azure/mgmt/relay/models/hybrid_connection.py | 2 | 2956 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -7,214,975,934,175,120,000 | 40.633803 | 107 | 0.622124 | false | 4.284058 | false | false | false |
dengs08/Visual-load | Quaternion.py | 1 | 2268 | from numpy import array
import numpy as np
import tensor as ts
def A(e):
'''
^
Return the 4*4 matrice operator A of quaternion e.
T
^ [e -e ]
A(e) = 0 -
= ~
[e e I + e ]
... | gpl-2.0 | -7,504,554,236,484,457,000 | 26 | 56 | 0.250441 | false | 3.172028 | false | false | false |
3sigma/GeerosRaspberryPython | Systeme_B/root/programmes_python/arduino/arduino.py | 1 | 1319 | import smbus
import struct
class Arduino(object):
def __init__(self):
self.bus = smbus.SMBus(1)
def command(self, cmd, byte_array):
bytes = [cmd] + byte_array
self.bus.write_i2c_block_data(20, 1, bytes)
while(not self.command_done()):
pass
def command_done(self):
self.bus.write_byte(2... | mit | 2,525,679,021,034,672,600 | 24.365385 | 67 | 0.636846 | false | 2.944196 | false | false | false |
areriff/pythonlearncanvas | Python Script Sample/daily_checks.py | 1 | 3383 | # Script Name : daily_checks.py
# Author : Craig Richards
# Created : 07th December 2011
# Last Modified : 01st May 2013
# Version : 1.4
# Modifications : 1.1 Removed the static lines for the putty sessions, it now reads a file, loops through and makes the connections.
# : 1.2 Added a variable filena... | mit | -8,720,012,445,828,145,000 | 45.342466 | 154 | 0.693467 | false | 3.622056 | false | false | false |
ekoeppen/panstamp-python | pyswapdmtgui/src/WaitDialog.py | 1 | 3717 | #########################################################################
#
# WaitDialog
#
# Copyright (c) 2011 Daniel Berenguer <dberenguer@usapiens.com>
#
# This file is part of the panStamp project.
#
# panStamp is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | gpl-2.0 | -6,364,070,640,253,904,000 | 28.5 | 73 | 0.57654 | false | 4.292148 | false | false | false |
fdibaldassarre/tag-search | src/TMWebManager.py | 1 | 2459 | #!/usr/bin/env python3
import os
from src.Profile import Profile
class TMWebManager(Profile):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Setup web folder
self.web_folder = 'archive/' + self.getProfileName()
self.web_thumbs_folder = 'thumbs/' + self.getProfileName()
... | gpl-3.0 | -6,028,282,958,630,017,000 | 28.27381 | 107 | 0.652298 | false | 3.218586 | false | false | false |
hazelnusse/pydy | examples/reaction_wheel/rxnw.py | 1 | 2254 | #!/usr/bin/env python
from pydy import *
from sympy import solve
# Declare a Newtonian Reference Frame
N = NewtonianReferenceFrame('N')
# Declare parameters, coordinates, and speeds
m1, m2, I1, I2, J1, J2, l, M = N.declare_parameters('m1 m2 I1 I2 J1 J2 l M')
(q1, q2, q3, q4, q5, q6, q7, q8), q_list, qdot_list = N.dec... | bsd-3-clause | 5,893,828,607,759,286,000 | 35.354839 | 78 | 0.610027 | false | 2.175676 | false | false | false |
nrao/guppi-controller | src/bee2_agent.py | 1 | 5076 | # Copyright (C) 2008 Associated Universities, Inc. Washington DC, USA.
#
# 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.... | gpl-3.0 | 5,400,375,307,411,877,000 | 33.767123 | 78 | 0.598897 | false | 4.298052 | false | false | false |
TUW-GEO/ecmwf_models | src/ecmwf_models/erainterim/reshuffle.py | 1 | 7289 | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2016, TU Wien
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
... | mit | -2,834,948,412,336,019,000 | 41.876471 | 120 | 0.638222 | false | 4.225507 | false | false | false |
adobe-research/video-lecture-summaries | Scripts/video.py | 1 | 12198 | #!/usr/bin/env python
import os
import re
import cv2
import numpy as np
import processframe as pf
import ntpath
import sys
import util
class Keyframe:
def __init__(self, frame_path, frame, time, framenum, video=None):
self.frame_path = os.path.abspath(frame_path)
self.frame_filename = ntpath.basen... | bsd-2-clause | 1,677,413,886,642,880,000 | 35.306548 | 116 | 0.514511 | false | 3.654284 | false | false | false |
Alwnikrotikz/tuxedo | src/database.py | 2 | 9178 | #
# Copyright 2008 Spencer Davis <SpencerDavis91@gmail.com>
#
# This file is part of Tuxedo.
#
# Tuxedo 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) an... | gpl-2.0 | 4,133,656,802,693,873,000 | 36.008065 | 151 | 0.530726 | false | 4.61206 | false | false | false |
Aalto-LeTech/a-plus | lib/cache/cached.py | 1 | 5195 | from datetime import datetime
from django.core.cache import cache
from time import time
import logging
logger = logging.getLogger('aplus.cached')
class CachedAbstract(object):
KEY_PREFIX = 'abstract'
@classmethod
def _key(cls, *models, modifiers):
keys = [str(m if isinstance(m, int) else getatt... | gpl-3.0 | -6,955,401,912,631,972,000 | 44.173913 | 189 | 0.617709 | false | 4.220146 | false | false | false |
vlsd/nlsymb | nlsymb/lqr.py | 1 | 10626 | import numpy as np
from scipy.linalg import schur
from numpy.linalg import inv
from scipy.integrate import ode
from . import matmult, sysIntegrate, Trajectory
# check that the dimensions of A and B are correct and return them
def DimExtract(A, B):
AA, BB = map(np.array, (A, B))
if AA.shape[0] is not AA.shap... | mit | -3,248,520,559,631,619,000 | 30.252941 | 80 | 0.512046 | false | 3.202532 | false | false | false |
Grulfen/pychat | chat/state.py | 1 | 5946 | """ Handle state of the chat server """
import sys
import re
from os import environ as env
import pickle
from helper import friend_online
from collections import namedtuple
from multiprocessing import Pipe, Process
from qt_chat import start_chat, Address
Friend = namedtuple('Friend', ['name', 'ip', 'port'])
class St... | mit | -4,826,318,514,968,537,000 | 33.77193 | 85 | 0.541204 | false | 4.12344 | false | false | false |
fzadow/CATMAID | django/applications/catmaid/control/notifications.py | 6 | 3354 | import json
from django.http import HttpResponse
from catmaid.models import UserRole, ChangeRequest
from catmaid.control.authentication import requires_user_role
@requires_user_role(UserRole.Browse)
def list_notifications(request, project_id = None):
""" Get a JSON representation of notifications for the reque... | agpl-3.0 | -2,206,143,346,941,577,200 | 44.324324 | 161 | 0.699761 | false | 3.785553 | false | false | false |
sacsant/avocado-misc-tests | security/annobin-tests.py | 4 | 2500 | #!/usr/bin/env python
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that... | gpl-2.0 | -6,727,155,047,679,248,000 | 37.461538 | 77 | 0.6284 | false | 3.968254 | true | false | false |
merlinthered/sublime-rainmeter | colorpicker.py | 1 | 6429 | import sublime
import sublime_plugin
import subprocess
import os
if sublime.platform() == 'windows':
import ctypes
from ctypes import c_int32, c_uint32, c_void_p, c_wchar_p, pointer, POINTER
class CHOOSECOLOR(ctypes.Structure):
_fields_ = [('lStructSize', c_uint32),
('hwndOwn... | mit | 3,107,729,180,965,496,000 | 35.528409 | 85 | 0.488256 | false | 3.868231 | false | false | false |
Plexxi/st2 | st2client/st2client/utils/misc.py | 3 | 1759 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | -6,573,985,223,141,075,000 | 26.920635 | 94 | 0.672541 | false | 4.006834 | false | false | false |
danclark5/python-sierpinski-carpets | sierpinski_0.1.py | 1 | 1783 | #-------------------------------------------------------------------------------
# Sierpinski's carpet
# Version: 0.1
# Date: 2017-10-25
# By: D. Clark
# Description:
# --------------------------------------
# End result of first attempt to create a script to generate a sierpinski's
# carpet. It's crude in that you can... | mit | -7,708,704,651,537,184,000 | 32.641509 | 107 | 0.491868 | false | 3.714583 | false | false | false |
gamernetwork/gn-django | gn_django/test/acceptance.py | 1 | 4942 | import unittest, time, sys
from urllib.parse import urlsplit, urlunsplit
from django.conf import settings
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from gn_django.url.utils import convert_to_camelcase
from .s... | mit | 1,038,271,252,870,847,500 | 39.508197 | 125 | 0.661675 | false | 4.118333 | true | false | false |
tonysimpson/Ni | py-utils/cvs.py | 5 | 3563 | import sys, os
def data2unix(lines):
data = []
modif = 0
for line in lines:
line1 = line.replace('\r', '')
modif = modif + (line!=line1)
data.append(line1)
return data, modif
def data2win(lines):
data = []
modif = 0
for line in lines:
if line[-1:] == '\n':
... | mit | 8,012,693,314,173,799,000 | 29.715517 | 83 | 0.507157 | false | 3.580905 | false | false | false |
jm-begon/randconv | randconv/image/subwindow_extractor.py | 1 | 25726 | # -*- coding: utf-8 -*-
"""
A set of subwindow extractor
"""
__author__ = "Begon Jean-Michel <jm.begon@gmail.com>"
__copyright__ = "3-clause BSD License"
__date__ = "20 January 2015"
try:
import Image
except ImportError:
from PIL import Image
from skimage.transform import resize
__all__ = ["SubWindowExtractor... | bsd-3-clause | 203,332,632,546,034,200 | 31.73028 | 126 | 0.55613 | false | 4.23125 | false | false | false |
micolous/cbus | cbus/protocol/dm_packet.py | 1 | 2810 | #!/usr/bin/env python
# cbus/protocol/dm_packet.py - Device Management Packet decoder
# Copyright 2012-2019 Michael Farrell <micolous+git@gmail.com>
#
# This library 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 ... | lgpl-3.0 | 1,219,993,927,090,160,400 | 33.268293 | 79 | 0.635943 | false | 4.200299 | false | false | false |
Debian/dak | daklib/conftest.py | 1 | 1325 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but... | gpl-2.0 | -7,136,242,605,362,842,000 | 29.113636 | 80 | 0.701132 | false | 4.416667 | false | false | false |
mSenyor/sl4a | python/src/Lib/test/test_parser.py | 53 | 17563 | import parser
import os
import unittest
import sys
from test import test_support
#
# First, we test that we can generate trees from valid source fragments,
# and that these valid trees are indeed allowed by the tree-loading side
# of the parser module.
#
class RoundtripLegalSyntaxTestCase(unittest.TestCase):
... | apache-2.0 | 3,666,343,965,348,280,300 | 31.705773 | 84 | 0.429938 | false | 3.693586 | true | false | false |
makefu/bepasty-server | bepasty/utils/formatters.py | 1 | 1873 | from pygments.formatters.html import HtmlFormatter
class CustomHtmlFormatter(HtmlFormatter):
"""Custom HTML formatter. Adds an option to wrap lines into HTML <p> tags."""
def __init__(self, **options):
super(CustomHtmlFormatter, self).__init__(**options)
self.lineparagraphs = options.get('line... | bsd-2-clause | 5,372,141,186,358,627,000 | 36.46 | 81 | 0.570208 | false | 4.266515 | false | false | false |
offtools/linux-show-player | lisp/plugins/triggers/triggers_settings.py | 3 | 5968 | # -*- coding: utf-8 -*-
#
# This file is part of Linux Show Player
#
# Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com>
#
# Linux Show Player is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ... | gpl-3.0 | 1,393,557,356,333,872,000 | 38.263158 | 78 | 0.637567 | false | 4.18807 | false | false | false |
licongyu95/learning_python | core_python_programming/cap8/cap8.py | 1 | 1522 | #!/usr/bin/env python
#encoding=utf-8
print '###:if条件语句的三种变通写法'
"""
if user.cmd == 'create':
action = 'create item'
elif user.cmd == 'delete':
action = 'delete item'
elif user.cmd == 'update':
action 'update item'
else:
action = 'invalid choice...'
if user.cmd in ('create','delete','update'):
action = '%s item'... | unlicense | 3,666,012,865,765,590,000 | 19.527778 | 127 | 0.598782 | false | 2.920949 | false | false | false |
kaykurokawa/pushtx | pushtx_client.py | 1 | 1264 | # This is client for pushtx_server.py
#
# USAGE:
#
# python pusthx_client.py <crypto> <tx hex>
import sys
import json
import socket
import cryptoconfig
import peersockets
import pushtx_server
SERVER_IP='localhost'
BUFFER_SIZE=500000
def _initclient(ip,port):
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
... | mit | -6,852,111,944,254,163,000 | 20.793103 | 92 | 0.660601 | false | 3.002375 | false | false | false |
dhruvilpatel/citation | tests/test_pipeline.py | 1 | 11160 | # Test the Metadata Extraction Pipeline Beginning to End
from django.contrib.auth.models import User
from django.db.models import Count
from django.test import TestCase
from citation.management.commands.load_bibtex import Command
from citation import models
class TestPipeline(TestCase):
@staticmethod
def loa... | gpl-3.0 | 7,577,793,280,821,480,000 | 50.428571 | 132 | 0.634946 | false | 3.933733 | true | false | false |
pbmanis/acq4 | acq4/analysis/old/AnalysisPlotWindow.py | 3 | 4308 | # -*- coding: utf-8 -*-
from __future__ import print_function
# Form implementation generated from reading ui file 'AnalysisPlotWindow.ui'
#
# Created: Mon Aug 16 15:31:55 2010
# by: PyQt4 UI code generator 4.5.4
#
# WARNING! All changes made in this file will be lost!
from acq4.util import Qt
class Ui_Analysis... | mit | 6,140,074,348,632,805,000 | 52.85 | 149 | 0.735608 | false | 4.083412 | false | false | false |
mjwtom/swift | test/dedupe/bin/real-dedupe-one-node.py | 1 | 3188 | import os
from swift.dedupe.deduplication import ChunkStore
from swift.common.utils import parse_options
from swift.common.wsgi import appconfig, ConfigFileError
from time import sleep
from swift.dedupe.time import time, time_diff
from swift.dedupe.compress import compress
import pickle
from swift.dedupe.chunk import C... | apache-2.0 | -7,828,720,811,221,459,000 | 27.212389 | 75 | 0.636763 | false | 3.472767 | true | false | false |
heiden-deng/anaconda | pyanaconda/ui/gui/spokes/lib/refresh.py | 10 | 3843 | # Disk configuration refresh dialog
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is dis... | gpl-2.0 | 5,367,562,497,285,402,000 | 37.818182 | 112 | 0.679417 | false | 4.049526 | false | false | false |
azavea/nyc-trees | src/nyc_trees/apps/login/uitests.py | 1 | 7342 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from unitest import skip
from django.core import mail
from django.core.urlresolvers import reverse
from django.contrib.sites.models import Site
from libs.ui_test_helpers im... | agpl-3.0 | 6,216,232,824,763,069,000 | 34.814634 | 76 | 0.625443 | false | 3.747831 | true | false | false |
thomarite/pynetw4 | w4-9.py | 1 | 3027 | #!/usr/bin/env python
from getpass import getpass
import sys
import warnings
with warnings.catch_warnings(record=True) as w:
import paramiko
import multiprocessing
from datetime import datetime
import netmiko
from netmiko.ssh_exception import NetMikoTimeoutException, NetMikoAuthenticationException
ip_addr = '... | apache-2.0 | 8,425,969,680,747,715,000 | 22.284615 | 89 | 0.599273 | false | 3.532089 | false | false | false |
cardmaster/makeclub | controlers/clubprivilige.py | 1 | 2748 | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub 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 versi... | agpl-3.0 | 6,012,110,969,766,952,000 | 35.157895 | 159 | 0.707424 | false | 3.326877 | false | false | false |
mdbartos/RIPS | temporary/ferc_util_prep.py | 1 | 198392 | import numpy as np
import pandas as pd
import os
import datetime
homedir = os.path.expanduser('~')
datadir = 'github/RIPS_kircheis/data/eia_form_714/processed/'
fulldir = homedir + '/' + datadir
# li = []
# for d1 in os.listdir('.'):
# for fn in os.listdir('./%s' % d1):
# li.append(fn)
# dir_u = pd.Seri... | mit | 4,881,580,996,330,403,000 | 90.047269 | 379 | 0.584756 | false | 2.315202 | false | false | false |
ahulab/RedditMemeGenBot | ImgurAPI.py | 1 | 4782 | import urllib2
import urllib
import json
import base64
from time import gmtime, strftime
from os import environ, curdir, listdir
from json import load
"""
Basic response model looks like:
{
data : Is null, boolean, or integer value. If it's a post then
this will contain an object with the all generated valu... | mit | -3,002,965,901,987,741,700 | 27.981818 | 96 | 0.649101 | false | 3.837881 | false | false | false |
jfizz/shirtsio-python | setup.py | 1 | 1379 | import os
import sys
NAME = 'ShirtsioAPI'
execfile('shirtsio/version.py')
DESCRIPTION = 'Shirts.io API for Python'
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
from dist... | mit | -4,255,943,538,297,463,300 | 29.644444 | 82 | 0.635243 | false | 3.985549 | false | false | false |
CanalTP/Chaos | migrations/versions/4ddbd7d83e6a_.py | 1 | 1968 | """ Create table Category
Revision ID: 4ddbd7d83e6a
Revises: 1b9a20f9a38f
Create Date: 2015-01-16 16:15:26.335065
"""
# revision identifiers, used by Alembic.
revision = '4ddbd7d83e6a'
down_revision = '1b9a20f9a38f'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgr... | agpl-3.0 | 3,867,240,791,957,316,000 | 36.846154 | 103 | 0.665142 | false | 3.539568 | false | false | false |
goldsborough/changes | changes/vcs.py | 1 | 1889 | import io
import logging
import click
import magic
import requests
from uritemplate import expand
from changes import shell
log = logging.getLogger(__name__)
def commit_version_change(context):
shell.dry_run('git commit -m %s %s/__init__.py CHANGELOG.md' % (context.new_version, context.module_name), context.d... | mit | 2,172,434,816,100,541,200 | 28.984127 | 127 | 0.626257 | false | 3.831643 | false | false | false |
liveblog/liveblog | server/liveblog/syndication/consumer.py | 2 | 6947 | import logging
from bson import ObjectId
from superdesk.resource import Resource
from superdesk.services import BaseService
from superdesk.errors import SuperdeskApiError
from superdesk import get_resource_service
from flask import current_app as app
from flask import Blueprint
from flask_cors import CORS
from liveblo... | agpl-3.0 | -2,838,627,325,298,515,000 | 33.391089 | 118 | 0.587304 | false | 4.036607 | false | false | false |
CoCaBoJangLeS/ExtensionWizards | questions.py | 1 | 1345 | import http.server
import socketserver
import logging
import cgi
import sys
def faqPY(text):
print(text)####
readFile=open("faq.xml", "r")#Opens current XML doc to be read
#_______________________________________________________________
#faqText = text.getvalue("text")
#faqAnswer = text.g... | apache-2.0 | 450,056,789,558,175,500 | 44.37931 | 169 | 0.515985 | false | 4.164087 | false | false | false |
Hernanarce/pelisalacarta | python/main-classic/channels/mejortorrent.py | 1 | 17794 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para mejortorrent
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import os
import re
import sys
import urllib
import urlpar... | gpl-3.0 | -1,825,241,169,227,018,200 | 40.449883 | 214 | 0.609212 | false | 3.188453 | false | false | false |
mbartoli/tAlign | tAlign.py | 1 | 1133 | import sys
import numpy as np
from PIL import Image
binarized_text = sys.argv[1] if len(sys.argv) == 2 else 'text.png'
data = np.array(Image.open(binarized_text))
fft = np.fft.fft2(data)
max_peak = np.max(np.abs(fft))
fft[fft < (max_peak * 0.25)] = 0
abs_data = 1 + np.abs(fft)
c = 255.0 / np.log(1 + max_peak)
log_da... | mit | 874,751,420,701,992,000 | 24.75 | 66 | 0.606355 | false | 2.49011 | false | false | false |
grahamking/goodenergy | core/tasks.py | 1 | 2236 | """ Worker daemon for Good Energy.
Runs in the background via oilcan, connected via Gearman,
and does long running tasks.
"""
# Copyright 2010,2011 Good Energy Research Inc. <graham@goodenergy.ca>, <jeremy@goodenergy.ca>
#
# This file is part of Good Energy.
#
# Good Energy is free software: you can ... | agpl-3.0 | 1,688,895,451,581,288,000 | 30.942857 | 97 | 0.70975 | false | 3.855172 | false | false | false |
Lapotor/libretime | python_apps/pypo/pypo/pypofile.py | 1 | 7676 | # -*- coding: utf-8 -*-
from threading import Thread
from Queue import Empty
import logging
import shutil
import time
import traceback
import os
import sys
import stat
import requests
import ConfigParser
import json
import hashlib
from requests.exceptions import ConnectionError, HTTPError, Timeout
CONFIG_PATH = '/et... | agpl-3.0 | -9,115,645,484,492,872,000 | 35.037559 | 123 | 0.53752 | false | 4.31721 | true | false | false |
jlorieau/mollib | mollib/core/residue.py | 1 | 9368 | from collections import namedtuple
from .geometry import measure_dihedral
from . import settings
class IonGroup(namedtuple('IonGroup', ['possible_atoms', 'pKs'])):
"""A group of ionizeable atoms and their pKs.
Attributes
----------
possible_atoms: list of :obj:`mollib.Atom` objects
A list of ... | gpl-3.0 | -2,597,973,933,746,540,500 | 34.218045 | 80 | 0.565329 | false | 3.806583 | false | false | false |
rmyers/clouddb-rpc | dashboard/stashboard/content/databases/logs/urls.py | 2 | 1138 | # Copyright 2016 Tesora 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... | apache-2.0 | 1,778,252,749,610,148,900 | 34.5625 | 78 | 0.697715 | false | 3.567398 | false | false | false |
MozillaSecurity/FuzzManager | server/taskmanager/cron.py | 1 | 1649 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from logging import getLogger
from django.conf import settings
from django.utils import timezone
from celeryconf import app
LOG = getLogger("taskmanager.cron")
@app.task(ignore_result=True)
def update_tasks():
import t... | mpl-2.0 | -7,435,348,422,339,933,000 | 34.085106 | 102 | 0.684051 | false | 3.713964 | false | false | false |
azariven/BioSig_SEAS | SEAS_Main/simulation/emission_spectra_simulator.py | 1 | 3205 | #!/usr/bin/env python
#
# Copyright (C) 2017 - Massachusetts Institute of Technology (MIT)
#
# 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... | gpl-3.0 | 3,916,498,367,256,636,400 | 26.62931 | 105 | 0.588456 | false | 4.02133 | false | false | false |
percolate/redset | redset/sets.py | 1 | 11194 |
import time
from redset.interfaces import Serializer
from redset.locks import Lock
import logging
log = logging.getLogger(__name__)
__all__ = (
'SortedSet',
'TimeSortedSet',
'ScheduledSet',
)
class SortedSet(object):
"""
A Redis-backed sorted set safe for multiprocess consumption.
By def... | bsd-2-clause | -1,370,521,173,900,530,400 | 25.154206 | 79 | 0.559049 | false | 4.25304 | false | false | false |
jdhenke/alar | prep_kb.py | 1 | 3373 | import argparse, csv, os, pickle
import numpy as np
from numpy.linalg import norm
from scipy.sparse import coo_matrix
from scipy.sparse.linalg import svds
def main():
# parse arguments
parser = argparse.ArgumentParser()
parser.add_argument("file", help="csv file of assertions")
args = parser.parse_args()
fna... | mit | -4,867,655,222,291,749,000 | 31.12381 | 75 | 0.654017 | false | 3.179076 | false | false | false |
fedora-infra/fedbadges | fedbadges/consumers.py | 1 | 8841 | # -*- coding; utf-8 -*-
""" Consumers for producing openbadges by listening for messages on fedmsg
Authors: Ross Delinger
Ralph Bean
"""
import os.path
import yaml
import traceback
import transaction
import threading
import time
import fedmsg.consumers
import datanommer.models
from badgrclient import Bad... | gpl-2.0 | -5,947,388,569,699,042,000 | 36.621277 | 82 | 0.598914 | false | 3.955705 | true | false | false |
otsaloma/poor-maps | tilesources/test/test_slippy_elliptical.py | 1 | 1359 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Osmo Salomaa
#
# 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 pr... | gpl-3.0 | -6,186,744,995,508,984,000 | 34.763158 | 84 | 0.693893 | false | 3.520725 | true | false | false |
ims-tyler/PyBBIO | tests/io_test.py | 3 | 1156 | # io_test.py - Alexander Hiam
# This was a quick test I wrote before starting in on PyBBIO.
# It's a good demonstration of how to use /dev/mem for hardware
# access. Blinks the on-board LED marked USR2
from mmap import mmap
import time, struct
GPIO1_offset = 0x4804c000 # Start of GPIO1 mux
GPIO1_size = 0x4804cfff-G... | mit | 5,301,695,836,611,323,000 | 31.111111 | 70 | 0.704152 | false | 2.713615 | false | false | false |
danbradham/mongoom | mongoom/fields.py | 1 | 8080 | from bson.objectid import ObjectId
from bson import DBRef
from collections import Iterable
import sys
from .utils import is_document, is_embedded
class ValidationError(Exception):
pass
class BaseField(object):
'''A descriptor that sets and gets data from the _data dict of an
object. The name attribute i... | gpl-2.0 | -5,277,203,396,797,728,000 | 33.529915 | 81 | 0.60854 | false | 4.124553 | false | false | false |
Peddle/hue | desktop/core/ext-py/lxml-3.3.6/doc/mklatex.py | 19 | 10880 | # The script builds the LaTeX documentation.
# Testing:
# python mklatex.py latex .. 1.0
from docstructure import SITE_STRUCTURE, BASENAME_MAP
import os, shutil, re, sys, datetime
try:
set
except NameError:
# Python 2.3
from sets import Set as set
TARGET_FILE = "lxmldoc.tex"
RST2LATEX_OPTIONS = " ".j... | apache-2.0 | 5,071,038,057,393,346,000 | 31 | 116 | 0.577114 | false | 3.507415 | false | false | false |
stscieisenhamer/ginga | ginga/canvas/coordmap.py | 1 | 6779 | #
# coordmap.py -- coordinate mappings.
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga import trcalc
from ginga.util import wcs
from ginga.util.six.moves import map
__all__ = ['CanvasMapper', 'CartesianMapper', 'DataMapper', 'OffsetMapper',
... | bsd-3-clause | -2,630,919,738,459,274,000 | 31.748792 | 80 | 0.589763 | false | 3.465746 | false | false | false |
mou4e/zirconium | build/android/gyp/package_resources.py | 4 | 5895 | #!/usr/bin/env python
#
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=C0301
"""Package resources into an apk.
See https://android.googlesource.com/platform/tools/base/+/master/legacy/a... | bsd-3-clause | -7,537,970,432,545,626,000 | 34.299401 | 130 | 0.641052 | false | 3.712217 | false | false | false |
semkiv/heppy_fcc | test/simple_analysis_cfg.py | 1 | 1248 | import os
import copy
import heppy.framework.config as cfg
import logging
# next 2 lines necessary to deal with reimports from ipython
logging.shutdown()
reload(logging)
logging.basicConfig(level=logging.WARNING)
comp = cfg.Component(
'example',
files = ['hh_ttbar.root']
)
comp.files.append("example2.root")
... | gpl-3.0 | -1,602,204,647,892,229,600 | 21.285714 | 69 | 0.741987 | false | 3.310345 | false | false | false |
rmosolgo/libgraphqlparser | ast/ast.py | 8 | 2371 | #!/usr/bin/env python
# Copyright (c) 2015, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from impor... | bsd-3-clause | -1,657,385,616,697,964,000 | 30.197368 | 77 | 0.615774 | false | 3.411511 | false | false | false |
klpdotorg/dubdubdub | apps/users/migrations/0019_auto_20140909_1253.py | 1 | 1747 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('schools', '__first__'),
('users', '0018_auto_20140908_1415'),
]
operations = [
migr... | mit | 4,745,685,355,640,346,000 | 30.763636 | 131 | 0.556382 | false | 4.411616 | false | false | false |
johncadigan/myenglishcloud | english/layouts.py | 1 | 1275 | from pyramid_layout.layout import layout_config
from models import *
@layout_config(template='english:templates/layouts/layout.mako')
@layout_config(name='user',template='english:templates/layouts/admin_layout.mako')
@layout_config(name='teacher',template='english:templates/layouts/admin_layout.mako')
@layout_config(... | mit | -8,321,140,042,317,937,000 | 26.717391 | 85 | 0.660392 | false | 3.493151 | false | false | false |
gandie/pyCrawler | crawler/draw.py | 1 | 1285 | # -*- coding: utf-8 -*-
#
# draw.py - helper module of pyCrawler to draw map from hosts using pygraphviz
#
# Copyright (c) 2019 Lars Bergmann
#
# GNU GENERAL PUBLIC LICENSE
# Version 3, 29 June 2007
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | gpl-3.0 | 4,674,132,540,029,957,000 | 34.694444 | 78 | 0.710506 | false | 3.619718 | false | false | false |
openstack/powervc-driver | neutron-powervc/powervc/neutron/db/migration/alembic_migration/versions/1ba55441bcc2_powervcmappings.py | 1 | 1907 | """create powervcmappings tables
Revision ID: 1ba55441bcc2
Revises: None
Create Date: 2014-08-27 16:24:01.765923
"""
# revision identifiers, used by Alembic.
revision = '1ba55441bcc2'
down_revision = None
from alembic import op
import sqlalchemy as sa
from oslo.db.sqlalchemy import session
from alembic import util ... | apache-2.0 | 281,368,126,772,301,470 | 33.053571 | 73 | 0.60409 | false | 4.11879 | false | false | false |
wangshiphys/HamiltonianPy | HamiltonianPy/tools/colorprint.py | 1 | 10787 | """
ANSI Color formatting for output in terminal
See also https://en.wikipedia.org/wiki/ANSI_escape_code
"""
__all__ = [
"coloring",
"color_print",
"color_demo",
]
COLOR_NAMES_STD_LONG = (
"black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"
)
COLOR_NAMES_STD_SHORT = ('k', 'r', 'g',... | gpl-3.0 | 469,315,639,742,949,570 | 33.796774 | 80 | 0.580606 | false | 3.210417 | false | false | false |
SilverLiningSystems/cxmanage-test2 | cxmanage_api/crc32.py | 4 | 5848 | # Copyright (c) 2012-2013, Calxeda Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions a... | bsd-3-clause | 3,764,090,795,400,070,000 | 45.412698 | 72 | 0.720417 | false | 2.25966 | false | false | false |
huggingface/pytorch-transformers | src/transformers/models/reformer/tokenization_reformer.py | 2 | 6679 | # coding=utf-8
# Copyright 2020 The Trax Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | apache-2.0 | -7,729,159,417,809,865,000 | 38.508876 | 135 | 0.643552 | false | 3.778721 | false | false | false |
wh1100717/tornado_skeleton | sdk/igetui/template/igt_base_template.py | 1 | 1551 | __author__ = 'wei'
from protobuf import *
class BaseTemplate:
def __init__(self):
self.appKey = ""
self.appId = ""
self.pushInfo = None
def getTransparent(self):
transparent = gt_req_pb2.Transparent()
transparent.id = ""
transparent.action = "pushmessage"
... | mit | 524,209,850,677,229,800 | 30.02 | 102 | 0.612508 | false | 3.956633 | false | false | false |
everlof/RestKit-n-Django-Sample | Project_Django/Project_Django/settings.py | 1 | 3523 | """
Django settings for Project_Django project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
impo... | mit | -8,664,907,396,651,540,000 | 25.096296 | 91 | 0.687766 | false | 3.562184 | false | false | false |
rc/elfpy | process.py | 1 | 13306 | #!/usr/bin/env python
"""
Analyze results of mechanical measurements by applying filters, plots, and save
commands to data files. The available commands can be listed using the --list
(or -l) option.
The commands can be specified using the command line options, and using a
command file. As the command line commands ar... | bsd-3-clause | 8,347,684,564,467,681,000 | 33.471503 | 243 | 0.579438 | false | 3.992199 | false | false | false |
bmingles/emeraldwalk | Emeraldwalk.ST3/FileMirror.py | 1 | 1576 | import sublime, sublime_plugin, subprocess
class FileMirror(sublime_plugin.EventListener):
def __init__(self):
self.config = sublime.load_settings(self.__class__.__name__+'.sublime-settings')
def local_root(self):
return self.config.get('local_root').lower()
def remote_host(self):
return self.config.get('re... | apache-2.0 | -8,132,332,759,626,451,000 | 29.307692 | 91 | 0.699873 | false | 3.066148 | true | false | false |
mefly2012/platform | test/test.py | 1 | 3173 | # -*- coding: utf-8 -*-
import codecs
all_tables = {
'ktgg': ['main'],
'zgcpwsw': ['title', 'casecode'],
#
# # 'ktgg',
# # 'cdfy_sfgk',
# # 'newktgg',
# # 'zyktgg',
# # 'zgcpwsw',
# # 'itslaw',
# # 'qyxg_zgcpwsw',
# # 'qyxg_wscpws',
#
'zhixing': ['pname', 'case_co... | apache-2.0 | 8,540,079,308,921,004,000 | 34.651685 | 92 | 0.577372 | false | 2.761532 | false | false | false |
riklaunim/django-content-bbcode | content_bbcode/parsers.py | 1 | 2992 | from re import findall
from django.conf import settings
class BaseTagParser(object):
regexp = NotImplementedError
def __init__(self, tags_definitions):
self.definitions = tags_definitions
self.parsed_data = {}
def parse(self, text):
tags_in_text = findall(self.regexp.format(PREF... | gpl-2.0 | 8,298,133,138,285,871,000 | 33.390805 | 123 | 0.555481 | false | 3.540828 | false | false | false |
MattNolanLab/ei-attractor | doc/conf.py | 1 | 11016 | # -*- coding: utf-8 -*-
#
# Grid cell modeling and data analysis documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 31 21:47:10 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
... | gpl-3.0 | 2,945,834,273,270,465,000 | 30.746398 | 105 | 0.674473 | false | 3.714093 | true | false | false |
ncoop/i3pystatus | i3pystatus/core/threading.py | 5 | 4258 | import threading
import time
import sys
import traceback
from i3pystatus.core.util import partition
timer = time.perf_counter if hasattr(time, "perf_counter") else time.clock
class Thread(threading.Thread):
def __init__(self, target_interval, workloads=None, start_barrier=1):
super().__init__()
s... | mit | 4,047,715,680,166,734,300 | 28.351724 | 85 | 0.589286 | false | 3.922581 | false | false | false |
CDNoyes/EDL-Py | EntryGuidance/Reconstruct.py | 1 | 11189 | """ Reconstruction of families of trajectories defined by a reference profile. """
from EntryEquations import EDL
import numpy as np
from scipy.optimize import root
from scipy.integrate import cumtrapz, odeint
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
def cost(x, E, D, m, model):
'... | gpl-3.0 | -424,310,617,039,268,350 | 37.854167 | 160 | 0.510233 | false | 3.225425 | false | false | false |
pkorus/swtk | swtk-analyzer.py | 1 | 3686 | __author__ = 'pkorus'
import os, sys, argparse, re, logging
from swtk import paper
from swtk import processors
# Parse command line arguments
parser = argparse.ArgumentParser(description='Scientific Writing Toolbox')
parser.add_argument('filename', type=str, help='input file (LaTeX, markdown, plaintext)')
parser.add_... | mit | 6,466,321,354,788,717,000 | 38.645161 | 118 | 0.708627 | false | 3.500475 | false | false | false |
makkemal/NGIMASEM | Demo_prob/Datfilereader.py | 1 | 1613 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 19 12:44:48 2018
@author: Michael P Hindley
"""
def getColumns(inFile, delim="\t", header=True):
"""
Get columns of data from inFile. The order of the rows is respected
:param inFile: column file separated by delim
:param header: if True the first ... | gpl-3.0 | 7,083,181,925,697,482,000 | 33.340426 | 81 | 0.548667 | false | 4.289894 | false | false | false |
askerlee/lapstyle | laplacian.py | 1 | 2158 | # Generate image Laplacian of a given image, save it as a .png file for visualization
import numpy as np
import scipy.optimize, scipy.ndimage, scipy.misc
import lasagne
from lasagne.layers import Conv2DLayer, InputLayer
import sys
import pdb
def prepare_image(image):
"""Given an image loaded from disk, ... | agpl-3.0 | 3,024,040,252,154,578,000 | 33.966667 | 99 | 0.644578 | false | 3.022409 | false | false | false |
jbvimort/LongitudinalQuantificationExtension | EasyClip/EasyClip.py | 1 | 36309 | from __main__ import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
import os
import numpy
import pickle
import logging
import sys
#
# Load Files
#
class EasyClip(ScriptedLoadableModule):
def __init__(self, parent):
ScriptedLoadableModule.__init__(self, parent)
parent.title = "Ea... | apache-2.0 | -6,715,936,396,347,489,000 | 52.553097 | 150 | 0.592718 | false | 4.1162 | true | false | false |
AlienStudio/jpsp_python | jpsp/jpspapp/migrations/0001_initial.py | 1 | 10096 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-08-07 14:12
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | mit | -73,974,923,636,925,700 | 51.621053 | 157 | 0.561412 | false | 4.122887 | false | false | false |
rsheftel/pandas_market_calendars | pandas_market_calendars/exchange_calendar_tase.py | 1 | 4346 | from datetime import time
from pandas import Timestamp
from pytz import timezone
from .market_calendar import MarketCalendar
TASEClosedDay = [
# 2019
Timestamp('2019-03-21', tz='Asia/Jerusalem'),
Timestamp('2019-04-09', tz='Asia/Jerusalem'),
Timestamp('2019-04-25', tz='Asia/Jerusalem'),
T... | mit | 175,467,467,607,557,250 | 33.333333 | 119 | 0.631155 | false | 2.942451 | false | false | false |
mtb-za/fatiando | cookbook/grid_pad.py | 1 | 2437 | """
Gridding: Pad gridded data
"""
from fatiando import mesher, gridder
from fatiando.gravmag import prism
from fatiando.vis import mpl
import numpy as np
# Generate gridded data
shape = (101, 172)
x, y, z = gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
model = [mesher.Prism(-4000, -3000, -4000, -3000, 0... | bsd-3-clause | 7,883,916,220,874,719,000 | 29.4625 | 78 | 0.670086 | false | 2.698782 | false | false | false |
edisonlz/fruit | web_project/base/site-packages/sms/__init__.py | 1 | 1267 | #coding=utf-8
import datetime
import httplib, urllib
is_register_sms = False
def http_service(params, action):
params = urllib.urlencode(params)
headers = {"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"}
conn = httplib.HTTPConnection("sdkhttp.eucp.b2m.cn")
... | apache-2.0 | -2,411,869,709,729,545,000 | 28.04878 | 107 | 0.6356 | false | 2.984962 | false | false | false |
alexschiller/evolution | utility.py | 1 | 1693 | import pyglet # noqa
from pyglet.gl import * # noqa
from collections import OrderedDict # noqa
from time import time # noqa
from os.path import abspath # noqa
from pyglet.window import key # noqa
mainbatches = [pyglet.graphics.Batch(), pyglet.graphics.Batch(), pyglet.graphics.Batch()]
window_height = 800
window_... | cc0-1.0 | -8,681,095,812,046,872,000 | 21.276316 | 89 | 0.581217 | false | 3.106422 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.