hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8e08988ea4cf640459c26fd2030ac36550909e58 | 5,320 | py | Python | main.py | biomadeira/gae_pubmed2rss | c033c8088249fcb67ed5ef5d1c0f236bd7cbf57a | [
"MIT"
] | null | null | null | main.py | biomadeira/gae_pubmed2rss | c033c8088249fcb67ed5ef5d1c0f236bd7cbf57a | [
"MIT"
] | null | null | null | main.py | biomadeira/gae_pubmed2rss | c033c8088249fcb67ed5ef5d1c0f236bd7cbf57a | [
"MIT"
] | null | null | null | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
-------
main.py
-------
Main methods (views + routes) implemented in the API.
.. moduleauthor:: Fabio Madeira
:module_version: 1.0
:created_on: 28-02-2015
"""
import webapp2
import os
import jinja2
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.FileSyst... | 34.771242 | 117 | 0.664098 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
-------
main.py
-------
Main methods (views + routes) implemented in the API.
.. moduleauthor:: Fabio Madeira
:module_version: 1.0
:created_on: 28-02-2015
"""
import webapp2
import logging
import os
import jinja2
import urllib
from tools import *
from google.appeng... | 0 | 0 | 0 | 2,652 | 0 | 269 | 0 | 10 | 303 |
0ac9376d1d6f2acf015536f7964222f793b50596 | 10,774 | py | Python | doc/TRexDataAnalysis.py | timgates42/trex-core | efe94752fcb2d0734c83d4877afe92a3dbf8eccd | [
"Apache-2.0"
] | 956 | 2015-06-24T15:04:55.000Z | 2022-03-30T06:25:04.000Z | doc/TRexDataAnalysis.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 782 | 2015-09-20T15:19:00.000Z | 2022-03-31T23:52:05.000Z | doc/TRexDataAnalysis.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 429 | 2015-06-27T19:34:21.000Z | 2022-03-23T11:02:51.000Z | #!/scratch/Anaconda2.4.0/bin/python
import matplotlib
matplotlib.use('Agg')
"""
This Module is structured to work with a raw data at the following JSON format:
{'setup_name': {'test1_name':[QUERY1,QUERY2,QUERY3],
'test2_name':[QUERY1,QUERY2,QUERY3]
}
'setup_name2': {'test1_name':[Q... | 45.268908 | 121 | 0.621589 | #!/scratch/Anaconda2.4.0/bin/python
import pandas as pd
import numpy as np
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
from matplotlib import dates as matdates
from matplotlib import lines as matlines
import os
import time
from datetime import datetime
"""
This Module is structured to... | 0 | 0 | 0 | 7,346 | 0 | 2,242 | 0 | 34 | 291 |
8564c60bc6da704fa49bb24a6f7e2132c38d2509 | 11,722 | py | Python | beyond/orbits/forms.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | beyond/orbits/forms.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | beyond/orbits/forms.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This module declares the different meanings that the Orbit 6 components can take
and their conversions
"""
TLE = Form("tle", ["i", "", "e", "", "M", "n"])
"""TLE special form
* i : inclination
* : right-ascension of ascending node
* e : eccentricity
... | 29.086849 | 87 | 0.494711 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This module declares the different meanings that the Orbit 6 components can take
and their conversions
"""
from numpy import cos, arccos, sin, arcsin, arctan2, sqrt, arctanh, sinh, cosh
import numpy as np
from ..errors import UnknownFormError
from ..utils.node import... | 300 | 7,568 | 0 | 1,530 | 0 | 123 | 0 | 78 | 137 |
181dd2ebd78938c6289753f8e6243a7398061b6f | 2,664 | py | Python | chroma_core/services/__init__.py | beevans/integrated-manager-for-lustre | 6b7e49b8a58058e6139ad815a4388f21a581dfa0 | [
"MIT"
] | 52 | 2018-09-13T03:26:23.000Z | 2022-03-25T16:51:37.000Z | chroma_core/services/__init__.py | beevans/integrated-manager-for-lustre | 6b7e49b8a58058e6139ad815a4388f21a581dfa0 | [
"MIT"
] | 1,264 | 2018-06-15T19:50:57.000Z | 2022-03-28T08:19:04.000Z | chroma_core/services/__init__.py | beevans/integrated-manager-for-lustre | 6b7e49b8a58058e6139ad815a4388f21a581dfa0 | [
"MIT"
] | 27 | 2018-06-18T08:51:59.000Z | 2022-03-16T15:35:34.000Z | # Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
| 27.75 | 111 | 0.650526 | # Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import threading
from kombu.connection import BrokerConnection
from kombu.messaging import Exchange
from kombu.entity import TRANSIENT_DELIVERY_MODE
import os
import sys... | 0 | 64 | 0 | 1,945 | 0 | 146 | 0 | 62 | 293 |
a61c895bde5c35a6c85ab9707bf4e5d78c16b929 | 312 | py | Python | my_awesome_project/users/migrations/0003_remove_user_bio.py | SocratesAncient/new | b8ffcb85b3691389d6a2627df1301643667a0de3 | [
"MIT"
] | null | null | null | my_awesome_project/users/migrations/0003_remove_user_bio.py | SocratesAncient/new | b8ffcb85b3691389d6a2627df1301643667a0de3 | [
"MIT"
] | null | null | null | my_awesome_project/users/migrations/0003_remove_user_bio.py | SocratesAncient/new | b8ffcb85b3691389d6a2627df1301643667a0de3 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.12 on 2021-06-23 17:25
| 17.333333 | 48 | 0.570513 | # Generated by Django 3.1.12 on 2021-06-23 17:25
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0002_user_bio'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='bio',
),
]
| 0 | 0 | 0 | 205 | 0 | 0 | 0 | 11 | 46 |
83b834e0a575aa2751c0d31ab4252ffc669e1430 | 4,513 | py | Python | tf2onnx/convert.py | duli2012/tensorflow-onnx | 32f7264e81fa69ebc36c204c7a606e2e8be90d80 | [
"MIT"
] | null | null | null | tf2onnx/convert.py | duli2012/tensorflow-onnx | 32f7264e81fa69ebc36c204c7a606e2e8be90d80 | [
"MIT"
] | null | null | null | tf2onnx/convert.py | duli2012/tensorflow-onnx | 32f7264e81fa69ebc36c204c7a606e2e8be90d80 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
"""
python -m tf2onnx.convert : tool to convert a frozen tensorflow to onnx
"""
from __future__ import division
from __future__ import print_function
import argparse
import sys
import tf2onnx.utils
from tf2onnx.tfonnx impo... | 37.297521 | 107 | 0.674053 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
"""
python -m tf2onnx.convert : tool to convert a frozen tensorflow to onnx
"""
from __future__ import division
from __future__ import print_function
import argparse
import sys
import onnx
from onnx import helper
import te... | 0 | 0 | 0 | 0 | 0 | 2,044 | 0 | 72 | 135 |
b2ba1ceb08ae0521e02059a609e9d4fd255d96f0 | 518 | py | Python | from_base64.py | jabbalaci/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 73 | 2015-03-31T01:12:26.000Z | 2021-07-10T19:45:04.000Z | from_base64.py | doc22940/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 2 | 2017-01-06T17:17:42.000Z | 2017-08-23T18:35:55.000Z | from_base64.py | doc22940/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 27 | 2015-01-03T18:51:23.000Z | 2020-11-15T11:49:51.000Z | #!/usr/bin/env python3
"""
Convert a base64 string back to a normal string (decode).
"""
##############################################################################
if __name__ == "__main__":
main()
| 19.185185 | 78 | 0.515444 | #!/usr/bin/env python3
"""
Convert a base64 string back to a normal string (decode).
"""
import readline # to overcome the 4k input limit
from lib.jhash import base64_to_str as back
def main():
try:
inp = input("base64 string> ")
except (KeyboardInterrupt, EOFError):
print()
retu... | 0 | 0 | 0 | 0 | 0 | 187 | 0 | 16 | 105 |
1f0f718e8960427f619ae5a29798356a0df97955 | 2,754 | py | Python | benchmark/qutip_benchmarks.py | trxw/qutip | b923c973edd9a071d86eb849650661549f73585f | [
"BSD-3-Clause"
] | 1 | 2015-11-06T06:35:06.000Z | 2015-11-06T06:35:06.000Z | benchmark/qutip_benchmarks.py | trxw/qutip | b923c973edd9a071d86eb849650661549f73585f | [
"BSD-3-Clause"
] | null | null | null | benchmark/qutip_benchmarks.py | trxw/qutip | b923c973edd9a071d86eb849650661549f73585f | [
"BSD-3-Clause"
] | null | null | null | # This file is part of QuTiP.
#
# QuTiP 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.
#
# QuTiP is distributed in the ... | 32.4 | 77 | 0.612564 | # This file is part of QuTiP.
#
# QuTiP 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.
#
# QuTiP is distributed in the ... | 0 | 0 | 0 | 0 | 0 | 324 | 0 | -9 | 110 |
456c5a74ca205e6d431e1daf8aae33ca461c59d9 | 452 | py | Python | Python_Exercicios/angulos.py | thalles-dreissig20/Quebra_Cabeca | eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79 | [
"MIT"
] | null | null | null | Python_Exercicios/angulos.py | thalles-dreissig20/Quebra_Cabeca | eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79 | [
"MIT"
] | 1 | 2021-11-29T18:37:14.000Z | 2021-11-29T18:37:14.000Z | Python_Exercicios/angulos.py | thalles-dreissig20/Quebra_Cabeca | eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79 | [
"MIT"
] | null | null | null | from math import radians, sin, cos, tan
angulo = float(input('Digita o angulo que voce deseja: '))
seno = sin(radians(angulo))
print('O angulo de {} tem o seno de {:.2f}'.format(angulo, seno))
coseno = cos(radians(angulo))
print('O angulo de {} tem o cosseno de {:.2f}'.format(angulo, coseno))
tangente = tan(radians(ang... | 41.090909 | 74 | 0.681416 | from math import radians, sin, cos, tan
angulo = float(input('Digita o angulo que voce deseja: '))
seno = sin(radians(angulo))
print('O angulo de {} tem o seno de {:.2f}'.format(angulo, seno))
coseno = cos(radians(angulo))
print('O angulo de {} tem o cosseno de {:.2f}'.format(angulo, coseno))
tangente = tan(radians(ang... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
34770d8a031ecc93e3549ae52b9ba394afc22181 | 603 | py | Python | pkgs/anaconda-navigator-1.1.0-py27_0/lib/python2.7/site-packages/anaconda_navigator/templates/__init__.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/anaconda-navigator-1.1.0-py27_0/lib/python2.7/site-packages/anaconda_navigator/templates/__init__.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/anaconda-navigator-1.1.0-py27_0/lib/python2.7/site-packages/anaconda_navigator/templates/__init__.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2016 Continuum Analytics, Inc.
# May be copied and distributed freely only as part of an Anaconda or
# Miniconda installation.
#
"""
This folder contains jinja2 templates used by Anaconda Navigator.
This folder is defined as a python module so that some convenience global
variabl... | 27.409091 | 73 | 0.772803 | # -*- coding: utf-8 -*-
#
# Copyright 2016 Continuum Analytics, Inc.
# May be copied and distributed freely only as part of an Anaconda or
# Miniconda installation.
#
"""
This folder contains jinja2 templates used by Anaconda Navigator.
This folder is defined as a python module so that some convenience global
variabl... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e7068a485f2ca1549f7033e2b99f4576733becd0 | 710 | py | Python | flask_wiki/frontend/frontend.py | gcavalcante8808/flask-wiki | a2c0af2e7fa6ce64faeb38e678a2e207ff63f3a6 | [
"BSD-2-Clause"
] | null | null | null | flask_wiki/frontend/frontend.py | gcavalcante8808/flask-wiki | a2c0af2e7fa6ce64faeb38e678a2e207ff63f3a6 | [
"BSD-2-Clause"
] | 35 | 2015-10-08T21:00:22.000Z | 2021-06-25T15:29:41.000Z | flask_wiki/frontend/frontend.py | gcavalcante8808/flask-wiki | a2c0af2e7fa6ce64faeb38e678a2e207ff63f3a6 | [
"BSD-2-Clause"
] | 1 | 2019-07-09T14:17:48.000Z | 2019-07-09T14:17:48.000Z | from flask import Flask
from flask_script import Manager
app = Flask(__name__)
app.config['TESTING'] = True
manager = Manager(app)
if __name__ == '__main__':
manager.run()
| 23.666667 | 66 | 0.676056 | from flask import Flask, render_template, abort, redirect, url_for
from flask_script import Manager
from jinja2 import TemplateNotFound
app = Flask(__name__)
app.config['TESTING'] = True
manager = Manager(app)
@app.route('/', endpoint='frontend-index')
def root():
# Redirect Base URL for the real Index Page.
... | 0 | 405 | 0 | 0 | 0 | 0 | 0 | 57 | 68 |
02c479119c63e0d1cf589aba3f5923da1cb34526 | 18,242 | py | Python | Logo/Logo.py | huky643/manim_sandbox | 397c8857145f371aeeca611e5e65c60083758d0c | [
"MIT"
] | 2 | 2020-11-01T05:34:28.000Z | 2020-11-01T05:34:31.000Z | Logo/Logo.py | huky643/manim_sandbox | 397c8857145f371aeeca611e5e65c60083758d0c | [
"MIT"
] | null | null | null | Logo/Logo.py | huky643/manim_sandbox | 397c8857145f371aeeca611e5e65c60083758d0c | [
"MIT"
] | null | null | null |
"""
logo
1. MK
2.
3.
4. 3B1B
logo@GrakePCH@GZTime@cigar666@
"""
# final
| 35.8389 | 148 | 0.591821 |
"""
关于logo创意:
1. 基础元素为M和K的负空间设计
2. 白色部分创意来自弦图
3. 整体图案本身可生成一个不错的分形
4. 配色致敬3B1B(具体的蓝色和棕色还得再微调一下)
logo主要创意由@GrakePCH提供,@GZTime、@cigar666、@鹤翔万里都提供了不少宝贵意见。目前设计工作还在继续完善,希望大家多提意见和建议
"""
from manimlib.imports import *
class Logo(VGroup):
CONFIG = {
'color_1': [WHITE, BLUE_B, BLUE_D],
'col... | 351 | 0 | 0 | 17,792 | 0 | 0 | 0 | 9 | 230 |
bd246d6ac90c60a4c8d7fbe993a1475528e524bc | 463 | py | Python | test/test_inference.py | phanxuanphucnd/wav2asr | 6e4d6f6ce0165bd1f2baf3c219b7755dc2202c36 | [
"MIT"
] | 1 | 2021-06-23T01:41:46.000Z | 2021-06-23T01:41:46.000Z | test/test_inference.py | phanxuanphucnd/wav2asr | 6e4d6f6ce0165bd1f2baf3c219b7755dc2202c36 | [
"MIT"
] | null | null | null | test/test_inference.py | phanxuanphucnd/wav2asr | 6e4d6f6ce0165bd1f2baf3c219b7755dc2202c36 | [
"MIT"
] | 2 | 2021-07-28T14:51:47.000Z | 2021-10-30T19:53:34.000Z | from arizona.asr.learner import Wav2AsrLearner
learner = Wav2AsrLearner(
pretrain_model='path/to/pretrain.pt',
finetune_model='path/to/finetune.pt',
dictionary='path/to/dict.ltr.txt',
lm_type='kenlm',
lm_lexicon='path/to/lm/lexicon.txt',
lm_model='path/to/lm/lm.bin',
lm_weight=1.5,
... | 22.047619 | 46 | 0.658747 | from arizona.asr.learner import Wav2AsrLearner
learner = Wav2AsrLearner(
pretrain_model='path/to/pretrain.pt',
finetune_model='path/to/finetune.pt',
dictionary='path/to/dict.ltr.txt',
lm_type='kenlm',
lm_lexicon='path/to/lm/lexicon.txt',
lm_model='path/to/lm/lm.bin',
lm_weight=1.5,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
83953f1d614b2e84fcb3dcb99d7d5d34855995b9 | 740 | py | Python | tests/data_sources/satellite/test_satellite_model.py | lenassero/nowcasting_dataset | deaf098c4d318f3ef532bac73f9cc4fa2858479b | [
"MIT"
] | null | null | null | tests/data_sources/satellite/test_satellite_model.py | lenassero/nowcasting_dataset | deaf098c4d318f3ef532bac73f9cc4fa2858479b | [
"MIT"
] | null | null | null | tests/data_sources/satellite/test_satellite_model.py | lenassero/nowcasting_dataset | deaf098c4d318f3ef532bac73f9cc4fa2858479b | [
"MIT"
] | null | null | null | """Test Satellite model."""
| 23.125 | 79 | 0.739189 | """Test Satellite model."""
import os
import tempfile
import numpy as np
import pytest
from nowcasting_dataset.data_sources.fake import satellite_fake
from nowcasting_dataset.data_sources.satellite.satellite_model import Satellite
def test_satellite_init(): # noqa: D103
_ = satellite_fake()
def test_satellit... | 0 | 0 | 0 | 0 | 0 | 435 | 0 | 71 | 203 |
d8dcee92379cf3ecf4def5fe4e4a50edef0975b9 | 5,230 | py | Python | src/htrun/host_tests_plugins/host_test_registry.py | Patater/greentea | 4fcf55396ab7f5960a542edb88365686b8f33624 | [
"Apache-2.0"
] | 37 | 2015-09-10T13:52:40.000Z | 2021-11-17T11:53:30.000Z | src/htrun/host_tests_plugins/host_test_registry.py | Patater/greentea | 4fcf55396ab7f5960a542edb88365686b8f33624 | [
"Apache-2.0"
] | 270 | 2015-09-09T13:00:53.000Z | 2021-12-16T17:39:05.000Z | src/htrun/host_tests_plugins/host_test_registry.py | Patater/greentea | 4fcf55396ab7f5960a542edb88365686b8f33624 | [
"Apache-2.0"
] | 51 | 2015-09-04T13:16:47.000Z | 2021-11-18T15:40:03.000Z | #
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Registry of available host test plugins."""
| 32.893082 | 84 | 0.570937 | #
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Registry of available host test plugins."""
class HostTestRegistry:
"""Register and store host test plugins for further usage."""
# Here we actually store all the plugins
PLUGINS = {} # '... | 0 | 0 | 0 | 5,045 | 0 | 0 | 0 | 0 | 23 |
65d5b20d577cda0ce9aba91179e9550e701e1148 | 3,132 | py | Python | script/alert.py | xbot/SmartHome | c473d455d7555e8806a2f5d09dff6db6beb8ae9b | [
"MIT"
] | 1 | 2021-02-09T09:40:17.000Z | 2021-02-09T09:40:17.000Z | script/alert.py | xbot/SmartHome | c473d455d7555e8806a2f5d09dff6db6beb8ae9b | [
"MIT"
] | null | null | null | script/alert.py | xbot/SmartHome | c473d455d7555e8806a2f5d09dff6db6beb8ae9b | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# encoding: utf-8
####################################################
#
# Description: Alert for invasion using pushbullet.
# Author: Donie Leigh<donie.leigh at gmail.com>
# License: MIT
#
####################################################
import sys, getopt, time, json
from Conf... | 33.319149 | 113 | 0.587165 | #!/usr/bin/env python2
# encoding: utf-8
####################################################
#
# Description: Alert for invasion using pushbullet.
# Author: Donie Leigh<donie.leigh at gmail.com>
# License: MIT
#
####################################################
import sys, getopt, time, json
from Conf... | 39 | 0 | 0 | 0 | 0 | 576 | 0 | 0 | 46 |
feb9c5c67882480ba12e4d921db5600c99a3ce73 | 8,149 | py | Python | pdserver/game.py | Gustavo6046/polydung | e8626c67b0f59e00a2400b5a5c644e3f6b925e00 | [
"MIT"
] | null | null | null | pdserver/game.py | Gustavo6046/polydung | e8626c67b0f59e00a2400b5a5c644e3f6b925e00 | [
"MIT"
] | null | null | null | pdserver/game.py | Gustavo6046/polydung | e8626c67b0f59e00a2400b5a5c644e3f6b925e00 | [
"MIT"
] | null | null | null | import sqlite3
tileset = []
SCODE_NEEDAUTH = 0
SCODE_BANNED = 1
SCODE_BADAUTH = 2
SCODE_BADREG = 3
| 32.466135 | 155 | 0.51356 | import objects
import logging
import sqlite3
import threading
import json
import serverprotocol
import sqlite3
import base64
import socket
tileset = []
SCODE_NEEDAUTH = 0
SCODE_BANNED = 1
SCODE_BADAUTH = 2
SCODE_BADREG = 3
class TileType(object):
def __init__(self, sprite="nulltile", functions=()):
sel... | 0 | 0 | 0 | 7,877 | 0 | 0 | 0 | -52 | 222 |
40e3bed3f3d2b5c988c4e485fc439ec96b3aea05 | 271 | py | Python | mainapp/migrations/0073_merge_20180822_0015.py | raeeska/rescuekerala | 649070cd051e0bf2ef54549c96493d5c4c5d89c9 | [
"MIT"
] | 1 | 2018-08-21T15:06:21.000Z | 2018-08-21T15:06:21.000Z | mainapp/migrations/0073_merge_20180822_0015.py | pranavmodx/rescuekerala | dd75a06b191b39ff4bdcd8e42d61c98a6509f052 | [
"MIT"
] | 1 | 2018-08-28T13:26:26.000Z | 2018-08-28T13:26:26.000Z | mainapp/migrations/0073_merge_20180822_0015.py | shashwat1002/rescuekerala | be7b7a959a2f4fa949768115b9c76eb3cccc32cb | [
"MIT"
] | 5 | 2019-11-07T11:34:56.000Z | 2019-11-07T11:36:00.000Z | # Generated by Django 2.1 on 2018-08-21 18:45
| 18.066667 | 47 | 0.649446 | # Generated by Django 2.1 on 2018-08-21 18:45
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0072_auto_20180822_0000'),
('mainapp', '0071_auto_20180821_2358'),
]
operations = [
]
| 0 | 0 | 0 | 167 | 0 | 0 | 0 | 11 | 46 |
b6da1f10160c1db772b332558a590bb3896e3f11 | 3,313 | py | Python | 4_m5C_step-by-step_pileup/concat_bam.py | caoy3/RNA-m5C | 65b4e9d66f4c2a75e2854c7f9de5ed63b892d844 | [
"MIT"
] | 2 | 2021-03-07T12:02:56.000Z | 2022-03-12T08:24:36.000Z | 4_m5C_step-by-step_pileup/concat_bam.py | caoy3/RNA-m5C | 65b4e9d66f4c2a75e2854c7f9de5ed63b892d844 | [
"MIT"
] | null | null | null | 4_m5C_step-by-step_pileup/concat_bam.py | caoy3/RNA-m5C | 65b4e9d66f4c2a75e2854c7f9de5ed63b892d844 | [
"MIT"
] | 8 | 2019-05-17T08:22:29.000Z | 2022-03-04T04:18:41.000Z | #!bin/usr/env python
#Jianheng Liu @ Zhanglab, SYSU
#Feb, 2018
#Email: liujh26@mail2.sysu.edu.cn
#Usage: This program is used to merge multiple BAM filtes to one, then sort and index it
#Input: [.bam]
import sys, os
import argparse
import pysam
import time
from time import strftime
if __name__ == "__main__":
descri... | 40.901235 | 162 | 0.711138 | #!bin/usr/env python
#Jianheng Liu @ Zhanglab, SYSU
#Feb, 2018
#Email: liujh26@mail2.sysu.edu.cn
#Usage: This program is used to merge multiple BAM filtes to one, then sort and index it
#Input: [.bam]
import sys,os
import argparse
import pysam
import time
from time import gmtime, strftime
def merge_bam(fin,fout):
w... | 0 | 0 | 0 | 0 | 0 | 782 | 0 | 7 | 46 |
7a27cbd111b959281707eb4f759182f97a7d02d6 | 32,025 | py | Python | opengl/gl/raw/gl_2_0.py | SilentPenguin/OpenGL.py | dd16bf7ea2fa20a7ea489e711a5df20d604c34dc | [
"Apache-2.0"
] | 1 | 2016-11-09T06:11:24.000Z | 2016-11-09T06:11:24.000Z | opengl/gl/raw/gl_2_0.py | SilentPenguin/OpenGL.py | dd16bf7ea2fa20a7ea489e711a5df20d604c34dc | [
"Apache-2.0"
] | 3 | 2016-11-09T06:21:08.000Z | 2016-11-18T15:17:22.000Z | opengl/gl/raw/gl_2_0.py | SilentPenguin/OpenGL.py | dd16bf7ea2fa20a7ea489e711a5df20d604c34dc | [
"Apache-2.0"
] | null | null | null | #BEWARE: automatically generated code
#This code was generated by /generate/__main__.py
BLEND_EQUATION_RGB = 0x8009
VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622
VERTEX_ATTRIB_ARRAY_SIZE = 0x8623
VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624
VERTEX_ATTRIB_ARRAY_TYPE = 0x8625
CURRENT_VERTEX_ATTRIB = 0x8626
VERTEX_PROGRAM_POINT_SIZE = 0x8... | 30.675287 | 94 | 0.714379 | #BEWARE: automatically generated code
#This code was generated by /generate/__main__.py
from opengl.gl.raw.bindings import *
@accepts(t.enum, t.enum)
@returns(t.void)
@binds(dll)
def blend_equation_separate(modergb, modealpha):
'''
set the RGB blend equation and the alpha blend equation separately.
A... | 0 | 27,533 | 0 | 0 | 0 | 0 | 0 | 15 | 2,162 |
46197a584db2c1a4a57c3ce00e14574ba08eaec0 | 1,353 | py | Python | presearch_trrosetta/prepare/crawling.py | jobc90/Protein-Resarch | 0b3d9366cc66fdc50e791991c323de1ae7840a61 | [
"MIT"
] | null | null | null | presearch_trrosetta/prepare/crawling.py | jobc90/Protein-Resarch | 0b3d9366cc66fdc50e791991c323de1ae7840a61 | [
"MIT"
] | null | null | null | presearch_trrosetta/prepare/crawling.py | jobc90/Protein-Resarch | 0b3d9366cc66fdc50e791991c323de1ae7840a61 | [
"MIT"
] | 2 | 2021-06-29T00:06:50.000Z | 2021-06-29T04:21:49.000Z |
if __name__ == '__main__':
main() | 30.066667 | 86 | 0.617886 | from bs4 import BeautifulSoup
from urllib import request
from urllib.error import HTTPError
import tqdm
import os
import argparse
def get_download(url, fname):
try:
request.urlretrieve(url, fname)
except HTTPError as e:
print('error')
return
def get_casp_data(casps, downl... | 0 | 0 | 0 | 0 | 0 | 1,096 | 0 | -2 | 213 |
b413c46d5bf2d1d42f0aa6e600f5711c0f78b565 | 1,269 | py | Python | app/src/main/python/make_first_page.py | 108360224/watch_video | bfbcd0fbe617eceb974d8c1e9c976f47ad7b0814 | [
"MIT"
] | null | null | null | app/src/main/python/make_first_page.py | 108360224/watch_video | bfbcd0fbe617eceb974d8c1e9c976f47ad7b0814 | [
"MIT"
] | null | null | null | app/src/main/python/make_first_page.py | 108360224/watch_video | bfbcd0fbe617eceb974d8c1e9c976f47ad7b0814 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat May 2 11:26:18 2020
@author: max
""" | 32.538462 | 117 | 0.62569 | # -*- coding: utf-8 -*-
"""
Created on Sat May 2 11:26:18 2020
@author: max
"""
import cv2
import numpy as np
from PIL import Image, ImageDraw, ImageFont
import requests
def make_first_page(src,text):
def cv2ImgAddText(img, text, left, top, textColor=(0, 0, 0), textSize=10):
if (isinstance(img, np.ndarray... | 24 | 0 | 0 | 0 | 0 | 1,068 | 0 | 2 | 110 |
fcd925ed6692d34e5f41292cc768682829c1cd50 | 4,707 | py | Python | decoder/utils.py | Am473ur/HexQBot | 0c9605ec972ff43ce626a257bc087bf614379d6d | [
"Apache-2.0"
] | 20 | 2020-07-13T17:18:41.000Z | 2022-03-02T01:21:58.000Z | decoder/utils.py | Am473ur/HexQBot | 0c9605ec972ff43ce626a257bc087bf614379d6d | [
"Apache-2.0"
] | 1 | 2020-07-14T15:26:02.000Z | 2020-07-17T15:07:01.000Z | decoder/utils.py | Am473ur/HexQBot | 0c9605ec972ff43ce626a257bc087bf614379d6d | [
"Apache-2.0"
] | 2 | 2020-11-17T13:10:13.000Z | 2020-11-17T13:30:47.000Z |
def ensure_str(s, encoding='utf-8', errors='strict'):
"""Coerce *s* to `str`.
For Python 3:
- `str` -> `str`
- `bytes or bytearray` -> decoded to `str`
"""
if not isinstance(s, (str, bytes, bytearray)):
raise TypeError("not expecting type '%s'" % type(s))
if isinstance(s, (byte... | 37.959677 | 102 | 0.577438 | import requests
from base64 import b32encode, b32decode, b64encode, b64decode, b85encode, b85decode
from base58 import b58decode, b58encode
import base91
import hashlib
import json
def ensure_str(s, encoding='utf-8', errors='strict'):
"""Coerce *s* to `str`.
For Python 3:
- `str` -> `str`
- `byte... | 0 | 0 | 0 | 0 | 0 | 3,839 | 0 | 50 | 385 |
51318ed4899cccb49c4022e5edbbaa06ce91410f | 6,879 | py | Python | model_neu/princeton/mod_1.py | lelange/cu-ssp | 9f1a7abf79a2fb6ef2ae0f37de79469c2dc3488f | [
"MIT"
] | null | null | null | model_neu/princeton/mod_1.py | lelange/cu-ssp | 9f1a7abf79a2fb6ef2ae0f37de79469c2dc3488f | [
"MIT"
] | null | null | null | model_neu/princeton/mod_1.py | lelange/cu-ssp | 9f1a7abf79a2fb6ef2ae0f37de79469c2dc3488f | [
"MIT"
] | null | null | null | """
Cascaded Convolution Model
- Pranav Shrestha (ps2958)
- Jeffrey Wan (jw3468)
"""
import numpy as np
from keras.preprocessing import sequence
from keras.preprocessing.text import Tokenizer
from keras.utils import to_categorical
import keras
from keras.callbacks import EarlyStopping, ModelCheckpoint
### Data Retr... | 34.918782 | 120 | 0.725687 | """
Cascaded Convolution Model
- Pranav Shrestha (ps2958)
- Jeffrey Wan (jw3468)
"""
import pickle
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from keras.preprocessing import text, sequence
from keras.preprocessing.text import Tokenizer
from keras.utils import to_categorical
from keras.mo... | 0 | 0 | 0 | 0 | 0 | 1,690 | 0 | 104 | 313 |
67426b9d856287309ee4d0aa254d80958bd28adc | 689 | py | Python | stage1/Criteria.py | zyl1205/mywork | 04b02b5f72dde17f094b169459385ca8635ecb95 | [
"MIT"
] | null | null | null | stage1/Criteria.py | zyl1205/mywork | 04b02b5f72dde17f094b169459385ca8635ecb95 | [
"MIT"
] | null | null | null | stage1/Criteria.py | zyl1205/mywork | 04b02b5f72dde17f094b169459385ca8635ecb95 | [
"MIT"
] | null | null | null | #
#author :Sachin Mehta
#Description : This repository contains source code for semantically segmenting WSIs; however, it could be easily
# adapted for other domains such as natural image segmentation
#File Description: This file implements the Cross entropy loss for 2D data.
#===========... | 34.45 | 117 | 0.624093 | #
#author :Sachin Mehta
#Description : This repository contains source code for semantically segmenting WSIs; however, it could be easily
# adapted for other domains such as natural image segmentation
#File Description: This file implements the Cross entropy loss for 2D data.
#===========... | 0 | 0 | 0 | 211 | 0 | 0 | 0 | 1 | 68 |
aba6561375f6e3d6efb4747ad67f9608dec2e9bc | 2,419 | py | Python | aardvark/aardvark_connection.py | dalyIsaac/PIM_Mini_Tests | 6929d2ab2e580333fb8a5487a752d9961da91978 | [
"Unlicense"
] | null | null | null | aardvark/aardvark_connection.py | dalyIsaac/PIM_Mini_Tests | 6929d2ab2e580333fb8a5487a752d9961da91978 | [
"Unlicense"
] | null | null | null | aardvark/aardvark_connection.py | dalyIsaac/PIM_Mini_Tests | 6929d2ab2e580333fb8a5487a752d9961da91978 | [
"Unlicense"
] | null | null | null | """
Defines the abstract class Aardvark Connection, which is used by child classes
to test the I2C and SPI connections.
"""
| 32.253333 | 86 | 0.641174 | """
Defines the abstract class Aardvark Connection, which is used by child classes
to test the I2C and SPI connections.
"""
from abc import ABCMeta, abstractmethod
import unittest
from aardvark_py import aa_find_devices_ext, aa_open, aa_close, AA_PORT_NOT_FREE
class AardvarkConnection(unittest.TestCase):
"""
... | 0 | 530 | 0 | 1,603 | 0 | 0 | 0 | 71 | 90 |
2489033ff8cd99e1f60ac2c043d6d3a6b725a1e8 | 2,117 | py | Python | Nut-defect-detection/dataset.py | GT-AcerZhang/Dive-into-Computer-Vision-in-PaddlePaddle2.0 | a0ee2058996bd2cac4e46bb4c0d93520251173fd | [
"Apache-2.0"
] | 5 | 2020-12-06T12:48:29.000Z | 2021-02-27T16:45:50.000Z | Nut-defect-detection/dataset.py | GT-AcerZhang/Dive-into-Computer-Vision-in-PaddlePaddle2.0 | a0ee2058996bd2cac4e46bb4c0d93520251173fd | [
"Apache-2.0"
] | null | null | null | Nut-defect-detection/dataset.py | GT-AcerZhang/Dive-into-Computer-Vision-in-PaddlePaddle2.0 | a0ee2058996bd2cac4e46bb4c0d93520251173fd | [
"Apache-2.0"
] | 2 | 2021-02-22T06:36:54.000Z | 2021-03-05T09:32:03.000Z | #!/usr/bin/env python
# _*_coding:utf-8 _*_
#@Time :2020/12/8 13:52
#@Author :Wenbo
#@FileName: dataset.py.py
# if __name__ == '__main__':
# transform = T.Compose([
# T.RandomResizedCrop([448,448]),
# T.Transpose(),
# T.Normal... | 32.075758 | 100 | 0.529523 | #!/usr/bin/env python
# _*_coding:utf-8 _*_
#@Time :2020/12/8 13:52
#@Author :Wenbo
#@FileName: dataset.py.py
import numpy as np
from PIL import Image
from paddle.io import Dataset
import paddle.vision.transforms as T
import paddle as pd
class MyDataset(Dataset):
"""
步骤一:继承paddle.io.Dataset... | 570 | 0 | 0 | 1,151 | 0 | 0 | 0 | 18 | 142 |
0000fa8f2d70592b5ba91e1ed71c42ac79a16509 | 67 | py | Python | starfiles/deneme.py | harunlakodla/Flutter_Python-flutter_python | 9dfa020fd73bff3bcf965476060ca441349ba96b | [
"Apache-2.0"
] | 10 | 2020-02-02T21:47:34.000Z | 2022-02-05T23:55:15.000Z | starfiles/deneme.py | harunlakodla/Flutter_Python-flutter_python | 9dfa020fd73bff3bcf965476060ca441349ba96b | [
"Apache-2.0"
] | 1 | 2021-11-02T10:43:48.000Z | 2021-11-02T10:43:48.000Z | starfiles/deneme.py | harunlakodla/Flutter_Python-flutter_python | 9dfa020fd73bff3bcf965476060ca441349ba96b | [
"Apache-2.0"
] | null | null | null | print("merhaba")
print("merhaba")
print("merhaba")
print("merhaba") | 16.75 | 16 | 0.716418 | print("merhaba")
print("merhaba")
print("merhaba")
print("merhaba") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
57f17179953aaaea6b6d3ab5a3fb3b7c60c6592d | 5,849 | py | Python | pulsar/system/MakeSystem.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | pulsar/system/MakeSystem.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | pulsar/system/MakeSystem.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | import re
import pulsar as psr
from . import ApplyBasisSet
def make_system(SomeString):
"""This function turns a string into a system object, which it then returns
Special thanks to Lori A. Burns for the original version of this function
=================================
Rules For Structuring Your S... | 37.980519 | 156 | 0.569328 | import re
import math
from copy import deepcopy
import pulsar as psr
from . import ApplyBasisSet
def make_system(SomeString):
"""This function turns a string into a system object, which it then returns
Special thanks to Lori A. Burns for the original version of this function
============================... | 0 | 0 | 0 | 0 | 0 | 22 | 0 | -6 | 75 |
c0a33a51c188efb2dd00413f01239574867164e0 | 1,336 | py | Python | individual1.py | MaksimSimanskiy/4.2 | 3fb83a11211383411333994dd19073e0073e9145 | [
"MIT"
] | null | null | null | individual1.py | MaksimSimanskiy/4.2 | 3fb83a11211383411333994dd19073e0073e9145 | [
"MIT"
] | null | null | null | individual1.py | MaksimSimanskiy/4.2 | 3fb83a11211383411333994dd19073e0073e9145 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
first , ; second ,
. multiply()
int. first
second.
"""
if __name__ == '__main__':
t1 = Real(12, 5)
t2 = Real(6, 5)
t2.read()
t1.display()
print(t1 * 5)
| 27.833333 | 87 | 0.592814 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Поле first — целое число, целая часть числа; поле second — положительное целое число,
дробная часть числа. Реализовать метод multiply() — умножение на произвольное целое
число типа int. Метод должен правильно работать при любых допустимых значениях first и
seco... | 507 | 0 | 0 | 772 | 0 | 0 | 0 | -10 | 48 |
62875e32dfa94934b88145781d02debe2392ae0e | 5,345 | py | Python | app.py | abhishekshree/FlaskLearnApp | eb201b3f414c482dffe860397ffb64a5e2b4b826 | [
"MIT"
] | null | null | null | app.py | abhishekshree/FlaskLearnApp | eb201b3f414c482dffe860397ffb64a5e2b4b826 | [
"MIT"
] | 2 | 2020-05-09T19:37:11.000Z | 2020-05-09T19:37:11.000Z | app.py | abhishekshree/FlaskLearnApp | eb201b3f414c482dffe860397ffb64a5e2b4b826 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
app = Flask( __name__, static_folder='static' )
app.config.from_pyfile('config.py')
Bootstrap(app)
db = SQLAlchemy(app)
login_manager = LoginManager()
login_manager.init_app(a... | 26.073171 | 108 | 0.731712 | from flask import Flask, render_template, redirect, url_for, request, make_response
from flask_bootstrap import Bootstrap
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import InputRequired , Email, Length
from flask_sqlalchemy import SQLAlchemy
from... | 0 | 2,884 | 0 | 1,154 | 0 | 0 | 0 | 274 | 616 |
fdb576221b2d5230c3aac5e421189c05dcfd9cb2 | 3,484 | py | Python | odoo/doc/_extensions/github_link.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 1 | 2019-12-29T11:53:56.000Z | 2019-12-29T11:53:56.000Z | odoo/doc/_extensions/github_link.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | odoo/doc/_extensions/github_link.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null |
"""
* adds github_link(mode) context variable: provides URL (in relevant mode) of
current document on github
* if sphinx.ext.linkcode is enabled, automatically generates github linkcode
links (by setting config.linkcode_resolve)
Settings
========
* ``github_user``, username/organisation under which the project l... | 33.180952 | 96 | 0.652411 | import inspect
import importlib
import os.path
from urlparse import urlunsplit
"""
* adds github_link(mode) context variable: provides URL (in relevant mode) of
current document on github
* if sphinx.ext.linkcode is enabled, automatically generates github linkcode
links (by setting config.linkcode_resolve)
Settin... | 0 | 0 | 0 | 0 | 0 | 1,992 | 0 | -9 | 134 |
064db3c7022248cee48f4a39a959f0cf7a675d53 | 1,197 | py | Python | examples/annotation_with_sed3.py | vlukes/io3d | 34d048b7f737a5e56610879f6ab103128e8f0750 | [
"MIT"
] | 8 | 2016-09-26T01:35:15.000Z | 2022-02-23T04:05:23.000Z | examples/annotation_with_sed3.py | vlukes/io3d | 34d048b7f737a5e56610879f6ab103128e8f0750 | [
"MIT"
] | 4 | 2016-05-18T11:04:56.000Z | 2018-10-24T11:03:03.000Z | examples/annotation_with_sed3.py | vlukes/io3d | 34d048b7f737a5e56610879f6ab103128e8f0750 | [
"MIT"
] | 6 | 2017-03-24T20:43:21.000Z | 2021-08-23T06:05:34.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
Module is used for visualization of segmentation stored in pkl, dcm and other files.
"""
import io3d
import sed3
import numpy as np
pth = io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True)
datap = io3d.read(pth)
# pth = io3d.datasets... | 27.204545 | 102 | 0.695071 | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
Module is used for visualization of segmentation stored in pkl, dcm and other files.
"""
from loguru import logger
import io3d
import sed3
import numpy as np
pth = io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True)
datap = io3d.read... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 23 |
e98e9ebf2c5f8b253553d891592684f474c1e66c | 691 | py | Python | nodedata/migrations/0006_peer.py | bartromgens/bitcoinnodestats | 04f9f6b4e3c7d9dd236476c558357ea9353aa022 | [
"MIT"
] | 17 | 2016-05-12T20:49:10.000Z | 2020-04-07T07:28:50.000Z | nodedata/migrations/0006_peer.py | bartromgens/bitcoinnodestats | 04f9f6b4e3c7d9dd236476c558357ea9353aa022 | [
"MIT"
] | 7 | 2016-05-13T15:09:15.000Z | 2021-06-10T19:09:06.000Z | nodedata/migrations/0006_peer.py | bartromgens/bitcoinnodestats | 04f9f6b4e3c7d9dd236476c558357ea9353aa022 | [
"MIT"
] | 5 | 2016-05-13T10:11:49.000Z | 2020-04-10T22:32:38.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-12 00:31
from __future__ import unicode_literals
| 27.64 | 114 | 0.616498 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-12 00:31
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('nodedata', '0005_rawnodedata_networkinfo_json'),
]
operation... | 0 | 0 | 0 | 489 | 0 | 0 | 0 | 21 | 68 |
d7ad1cdd8d8d266811acb2b8890656f37cb77f04 | 9,250 | py | Python | utils/pghelp.py | transfaeries/forest | e92ffcebf1b3adfebb8006b215e292973b7ca39d | [
"MIT"
] | null | null | null | utils/pghelp.py | transfaeries/forest | e92ffcebf1b3adfebb8006b215e292973b7ca39d | [
"MIT"
] | 1 | 2022-03-09T10:02:31.000Z | 2022-03-09T10:02:31.000Z | utils/pghelp.py | transfaeries/forest | e92ffcebf1b3adfebb8006b215e292973b7ca39d | [
"MIT"
] | null | null | null | #!/usr/bin/python3.9
# Copyright (c) 2021 MobileCoin Inc.
# Copyright (c) 2021 The Forest Team
import asyncio
import os
from typing import Optional
try:
import asyncpg
DUMMY = False
except ImportError:
from dummy_asyncpg import asyncpg
DUMMY = True
Loop = Optional[asyncio.events.AbstractEventLoop]... | 37.601626 | 128 | 0.585297 | #!/usr/bin/python3.9
# Copyright (c) 2021 MobileCoin Inc.
# Copyright (c) 2021 The Forest Team
import asyncio
import copy
import logging
import os
from contextlib import asynccontextmanager
from typing import Any, AsyncGenerator, Callable, Optional, Union
try:
import asyncpg
DUMMY = False
except ImportError:... | 0 | 251 | 1,453 | 6,411 | 0 | 371 | 0 | 42 | 181 |
5b9e759af14b63b1adeea004fac45e99e0507638 | 6,679 | py | Python | src/modules/php/visitors/resolvers.py | Mause/PHP-Parsers | 9fac9827fa34a48e1d514520bb7b8be7c0fd2156 | [
"MIT"
] | 11 | 2020-06-27T12:46:32.000Z | 2022-02-20T00:08:50.000Z | src/modules/php/visitors/resolvers.py | Mause/PHP-Parsers | 9fac9827fa34a48e1d514520bb7b8be7c0fd2156 | [
"MIT"
] | null | null | null | src/modules/php/visitors/resolvers.py | Mause/PHP-Parsers | 9fac9827fa34a48e1d514520bb7b8be7c0fd2156 | [
"MIT"
] | 5 | 2020-06-28T21:42:36.000Z | 2022-02-20T00:11:43.000Z | """Visitors that make certain mutations to the AST"""
| 39.288235 | 116 | 0.634077 | """Visitors that make certain mutations to the AST"""
import sys
import os
from src.modules.php import syntax_tree
from src.modules.php.base import Visitor
from src.compiler.php import phpast
class CircularImport(phpast.Node):
fields = ["file_name"]
def __init__(self, child_path, looping_tree):
self.... | 0 | 0 | 0 | 6,389 | 0 | 0 | 0 | 28 | 204 |
e3187245c38ccf41c17c623c9a0298ed26314124 | 547 | py | Python | decider.py | matez0/decide-raw | 1ad4aeb80539b2713eae62466d6672dd0d7711d6 | [
"MIT"
] | null | null | null | decider.py | matez0/decide-raw | 1ad4aeb80539b2713eae62466d6672dd0d7711d6 | [
"MIT"
] | null | null | null | decider.py | matez0/decide-raw | 1ad4aeb80539b2713eae62466d6672dd0d7711d6 | [
"MIT"
] | null | null | null | # coding: utf-8
#
# Copyright (c) 2019 Zoltn Mt
# All Rights Reserved.
#
# Author: Zoltn Mt <mate.zoltan0@gmail.com>
#
| 24.863636 | 81 | 0.674589 | # coding: utf-8
#
# Copyright (c) 2019 Zoltán Máté
# All Rights Reserved.
#
# Author: Zoltán Máté <mate.zoltan0@gmail.com>
#
def score(decider, values):
future_values = list(values)
orig_value = future_values.pop(0)
past_values = []
while future_values:
past_values.append(future_values.pop(0))
... | 12 | 0 | 0 | 0 | 0 | 375 | 0 | 0 | 46 |
40502073ddc75e5ccf9c6199875480768d1155af | 1,367 | py | Python | wezer_mail/utils.py | Abdur-rahmaanJ/wezer-mail | 6070ee45ae872961f10553a5946048cb74155ea3 | [
"MIT"
] | null | null | null | wezer_mail/utils.py | Abdur-rahmaanJ/wezer-mail | 6070ee45ae872961f10553a5946048cb74155ea3 | [
"MIT"
] | null | null | null | wezer_mail/utils.py | Abdur-rahmaanJ/wezer-mail | 6070ee45ae872961f10553a5946048cb74155ea3 | [
"MIT"
] | null | null | null | # send mail function | 26.803922 | 61 | 0.678127 | # send mail function
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
import time
from jinja2 import Environment, FileSystemLoader
import configparser
def send_mail(to_, subject_, body_):
config = configparser.ConfigParser()
conf... | 0 | 0 | 0 | 0 | 0 | 1,062 | 0 | 58 | 227 |
83203dfab91326ca83bc4bf21da8b4b84b3751a4 | 3,007 | py | Python | apps/locations/models.py | rapidsms/rapidsms-legacy | 43c2ecd41fd1541a2538326edee3d9e816d84529 | [
"BSD-3-Clause"
] | null | null | null | apps/locations/models.py | rapidsms/rapidsms-legacy | 43c2ecd41fd1541a2538326edee3d9e816d84529 | [
"BSD-3-Clause"
] | null | null | null | apps/locations/models.py | rapidsms/rapidsms-legacy | 43c2ecd41fd1541a2538326edee3d9e816d84529 | [
"BSD-3-Clause"
] | 1 | 2019-11-02T19:35:54.000Z | 2019-11-02T19:35:54.000Z | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
| 37.5875 | 143 | 0.645494 | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from django.db import models
from rapidsms.webui.managers import *
class LocationType(models.Model):
name = models.CharField(max_length=100)
class Meta:
verbose_name = "Type"
def __unicode__(self):
return self.name
class... | 0 | 0 | 0 | 2,839 | 0 | 0 | 0 | 23 | 91 |
0eae708db50a092a1f792e3bbbd1ae39f97467ef | 6,730 | py | Python | kit_django/restAPICore/views.py | safakoner/kit | aec36a70137febfb5f3e3a9205ea58879736eea4 | [
"MIT"
] | 6 | 2020-06-29T20:36:15.000Z | 2021-09-08T23:34:01.000Z | kit_django/restAPICore/views.py | safakoner/kit | aec36a70137febfb5f3e3a9205ea58879736eea4 | [
"MIT"
] | 9 | 2021-03-30T13:46:29.000Z | 2022-03-12T00:38:27.000Z | kit_django/restAPICore/views.py | safakoner/kit | aec36a70137febfb5f3e3a9205ea58879736eea4 | [
"MIT"
] | 1 | 2020-07-20T18:40:24.000Z | 2020-07-20T18:40:24.000Z | #
# ----------------------------------------------------------------------------------------------------
# DESCRIPTION
# ----------------------------------------------------------------------------------------------------
#
# --------------------------------------------------------------------------------------------... | 37.597765 | 120 | 0.502823 | #
# ----------------------------------------------------------------------------------------------------
# DESCRIPTION
# ----------------------------------------------------------------------------------------------------
#
# --------------------------------------------------------------------------------------------... | 0 | 0 | 0 | 5,423 | 0 | 0 | 0 | 258 | 200 |
18670e302470b64e0aff41fcdc84db343061d262 | 11,285 | py | Python | model-optimizer/extensions/front/tf/CTCLossReplacement.py | Andruxin52rus/openvino | d824e371fe7dffb90e6d3d58e4e34adecfce4606 | [
"Apache-2.0"
] | 2 | 2021-02-26T15:46:19.000Z | 2021-05-16T20:48:13.000Z | model-optimizer/extensions/front/tf/CTCLossReplacement.py | Andruxin52rus/openvino | d824e371fe7dffb90e6d3d58e4e34adecfce4606 | [
"Apache-2.0"
] | 30 | 2020-11-13T11:44:07.000Z | 2022-02-21T13:03:16.000Z | model-optimizer/extensions/front/tf/CTCLossReplacement.py | mmakridi/openvino | 769bb7709597c14debdaa356dd60c5a78bdfa97e | [
"Apache-2.0"
] | 1 | 2020-12-18T15:47:45.000Z | 2020-12-18T15:47:45.000Z | """
Copyright (C) 2020 Intel Corporation
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 wri... | 60.347594 | 127 | 0.652193 | """
Copyright (C) 2020 Intel Corporation
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 wri... | 0 | 0 | 0 | 9,823 | 0 | 0 | 0 | 437 | 443 |
6df332d10e41fb18978a39581a88073aeb9deebf | 21,214 | py | Python | Code/TrustRegion.py | iTsingalis/torch-trust-ncg | d45b8eb8f4b45c9bdaa1801bdc9f099f90ae598e | [
"MIT"
] | null | null | null | Code/TrustRegion.py | iTsingalis/torch-trust-ncg | d45b8eb8f4b45c9bdaa1801bdc9f099f90ae598e | [
"MIT"
] | null | null | null | Code/TrustRegion.py | iTsingalis/torch-trust-ncg | d45b8eb8f4b45c9bdaa1801bdc9f099f90ae598e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @author Vasileios Choutas
# Contact: vassilis.choutas@tuebingen.mpg.de
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from typing import NewType
import torch
import torch.optim as optim
import torch.autograd as autograd
Tensor... | 38.431159 | 119 | 0.555765 | # -*- coding: utf-8 -*-
# @author Vasileios Choutas
# Contact: vassilis.choutas@tuebingen.mpg.de
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from typing import NewType, List, Tuple
import torch
from torch import norm
import torch.optim as optim
impor... | 0 | 13,055 | 0 | 7,601 | 0 | 105 | 0 | 4 | 91 |
0af89f7156b96ef95ef85efe8d69e2dfa62d252c | 5,356 | py | Python | chinesenotes/similarity_train.py | alexamies/chinesenotes-python | 778712e98a54860e9bb24a5111a9ca8a96644214 | [
"Apache-2.0"
] | null | null | null | chinesenotes/similarity_train.py | alexamies/chinesenotes-python | 778712e98a54860e9bb24a5111a9ca8a96644214 | [
"Apache-2.0"
] | null | null | null | chinesenotes/similarity_train.py | alexamies/chinesenotes-python | 778712e98a54860e9bb24a5111a9ca8a96644214 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "L... | 30.605714 | 86 | 0.648432 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "L... | 0 | 0 | 0 | 0 | 0 | 766 | 0 | 13 | 68 |
5c4ff07fa09c1f57cc06fbf9936c0f7bf55c9908 | 1,693 | py | Python | script.py | Feezy15/subreddit_scraper | 9e9ec989101f13e9474234473e62493034eb7611 | [
"MIT"
] | null | null | null | script.py | Feezy15/subreddit_scraper | 9e9ec989101f13e9474234473e62493034eb7611 | [
"MIT"
] | null | null | null | script.py | Feezy15/subreddit_scraper | 9e9ec989101f13e9474234473e62493034eb7611 | [
"MIT"
] | null | null | null | """ A script that scrapes various bits of data from subreddits
"""
import praw
import sqlite3
SQ_LITE_FILE = "avexchange_data.db"
def get_urls(subreddit):
""" scrape for certain keywords on a subreddit
"""
print("getting urls from r/{}".format(subreddit))
reddit = praw.Reddit("bot1")
conn = sqlite... | 32.557692 | 136 | 0.627289 | """ A script that scrapes various bits of data from subreddits
"""
import praw
import requests
import os
import sqlite3
SQ_LITE_FILE = "avexchange_data.db"
def init_database():
if not os.path.isfile(os.path.dirname(os.path.abspath(__file__)) + "/{}".format(SQ_LITE_FILE)):
print("creating db {}-".format(SQ... | 0 | 0 | 0 | 0 | 0 | 459 | 0 | -18 | 67 |
5aba35ab361297d91284da0b44616c3ca2742dbb | 14,791 | py | Python | nodemonitor/agent.py | foxty/node_monitor | 2d3b8870a20cf2fe4d7ae3f4c95f2fd74da6c8e0 | [
"Apache-2.0"
] | 3 | 2018-01-09T05:58:21.000Z | 2021-07-15T13:18:10.000Z | nodemonitor/agent.py | foxty/node_monitor | 2d3b8870a20cf2fe4d7ae3f4c95f2fd74da6c8e0 | [
"Apache-2.0"
] | 14 | 2018-01-17T06:19:48.000Z | 2022-02-12T02:29:14.000Z | nodemonitor/agent.py | foxty/node-monitor | 2d3b8870a20cf2fe4d7ae3f4c95f2fd74da6c8e0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Created on 2017-12-22
@author: foxty
Node Agent
"""
# ==============================
# Node Agent
# ==============================
import os
import sys
import logging
from common import set_logging
_MAX_BACKOFF_SECOND = 60 # in agent retry policy
DEF_CONFIG = {
... | 34.639344 | 107 | 0.573862 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Created on 2017-12-22
@author: foxty
Node Agent
"""
# ==============================
# Node Agent
# ==============================
import os
import sys
import logging
import logging.handlers
import socket
import select
import Queue as Q
import threading
from datetime im... | 0 | 400 | 0 | 12,580 | 0 | 535 | 0 | 116 | 246 |
2d94e570a5fb66ee4ea2b0b645009575fe90c529 | 4,419 | py | Python | pyroute/compress/compress.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | pyroute/compress/compress.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | pyroute/compress/compress.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#----------------------------------------------------------------
#
#------------------------------------------------------
# Usage:
#
#------------------------------------------------------
# Copyright 2007, Oliver White
#
# This program is free software: you can redistribute it and/or modify
# it un... | 31.340426 | 218 | 0.56687 | #!/usr/bin/python
#----------------------------------------------------------------
#
#------------------------------------------------------
# Usage:
#
#------------------------------------------------------
# Copyright 2007, Oliver White
#
# This program is free software: you can redistribute it and/or modify
# it un... | 0 | 0 | 0 | 3,221 | 0 | 0 | 0 | -1 | 45 |
b6cfc149a70283a6388eec6ed094070716e7e105 | 5,357 | py | Python | gooey/gui/components/options/validators.py | geosaleh/Gooey | c2aa8afc269271d55f011c6bc89828992a30b3f0 | [
"MIT"
] | 1 | 2022-02-21T05:51:21.000Z | 2022-02-21T05:51:21.000Z | gooey/gui/components/options/validators.py | geosaleh/Gooey | c2aa8afc269271d55f011c6bc89828992a30b3f0 | [
"MIT"
] | 1 | 2021-12-02T07:42:03.000Z | 2021-12-02T07:42:03.000Z | gooey/gui/components/options/validators.py | geosaleh/Gooey | c2aa8afc269271d55f011c6bc89828992a30b3f0 | [
"MIT"
] | null | null | null |
def lift(f):
"""
Lifts a basic predicate to the SuperBool type
stealing the docstring as the rationale message.
This is largely just goofing around and experimenting
since it's a private internal API.
"""
return inner
def is_0to20(value):
"""Precision values must be in the ra... | 26.519802 | 96 | 0.663244 | import re
from functools import wraps
from gooey.gui.components.filtering.prefix_filter import OperatorType
class SuperBool(object):
"""
A boolean which keeps with it the rationale
for when it is false.
"""
def __init__(self, value, rationale):
self.value = value
self.rationale = ... | 0 | 2,012 | 0 | 331 | 0 | 237 | 0 | 42 | 461 |
5807257790cef3d53abb06fe45677a87bcfe3f8b | 3,812 | py | Python | server/iotud/api/devices.py | hollwann/dashboard-iot-udistrital | a92c6b65fce5c343abeffcb5badf1f4bfd9ab1f2 | [
"MIT"
] | 2 | 2020-07-02T19:09:12.000Z | 2020-07-05T00:33:55.000Z | server/iotud/api/devices.py | hollwann/dashboard-iot-udistrital | a92c6b65fce5c343abeffcb5badf1f4bfd9ab1f2 | [
"MIT"
] | 3 | 2020-07-05T00:55:08.000Z | 2022-02-27T11:29:51.000Z | server/iotud/api/devices.py | hollwann/dashboard-iot-udistrital | a92c6b65fce5c343abeffcb5badf1f4bfd9ab1f2 | [
"MIT"
] | null | null | null | from flask import Blueprint
bp = Blueprint('devices', __name__, url_prefix="/users")
| 35.626168 | 101 | 0.644019 | import functools
from datetime import datetime
from flask import Blueprint, jsonify, request
from iotud.tools import fetch_all, fetch_one, update, insert, get_auth_props, either_response, delete
from string import ascii_lowercase
import random
from oslash import Right, Left
from toolz import accumulate, assoc, reduce
... | 0 | 1,668 | 0 | 0 | 0 | 1,477 | 0 | 138 | 430 |
80d14ac67554130253c5695660674cb336aa2294 | 2,598 | py | Python | templates/movie_info_popup.py | rikbarker/watcher | dadacd21a5790ee609058a98a17fcc8954d24439 | [
"Apache-2.0"
] | 194 | 2016-12-23T19:11:09.000Z | 2020-12-07T04:04:10.000Z | templates/movie_info_popup.py | rikbarker/watcher | dadacd21a5790ee609058a98a17fcc8954d24439 | [
"Apache-2.0"
] | 236 | 2016-11-20T07:56:15.000Z | 2017-04-12T12:10:00.000Z | templates/movie_info_popup.py | rikbarker/watcher | dadacd21a5790ee609058a98a17fcc8954d24439 | [
"Apache-2.0"
] | 51 | 2016-11-20T08:05:33.000Z | 2021-01-26T13:22:40.000Z |
# pylama:ignore=W0401
| 37.652174 | 158 | 0.54311 | import json
import core
from core.movieinfo import Trailer
from dominate.tags import *
class MovieInfoPopup():
def __init__(self):
return
def html(self, data_json):
'''
data: str json object movie data dict
'''
data = json.loads(data_json)
trailer = Trailer... | 0 | 0 | 0 | 2,463 | 0 | 0 | 0 | -1 | 112 |
8a78cc74ff0b5595f02947a1d7e6f8bbbc2fdf09 | 196 | py | Python | scripts/item/consume_2436229.py | lynsone/swordie | 7e9d564c1f2659a87e01c376089e1ee0a3842c5b | [
"MIT"
] | 2 | 2020-04-15T03:16:07.000Z | 2020-08-12T23:28:32.000Z | scripts/item/consume_2436229.py | lynsone/swordie | 7e9d564c1f2659a87e01c376089e1ee0a3842c5b | [
"MIT"
] | null | null | null | scripts/item/consume_2436229.py | lynsone/swordie | 7e9d564c1f2659a87e01c376089e1ee0a3842c5b | [
"MIT"
] | 3 | 2020-08-25T06:55:25.000Z | 2020-12-01T13:07:43.000Z | # Pig Bar Damage Skin
success = sm.addDamageSkin(2436229)
if success:
sm.chat("The Pig Bar Damage Skin has been added to your account's damage skin collection.")
# sm.consumeItem(2436229)
| 32.666667 | 95 | 0.739796 | # Pig Bar Damage Skin
success = sm.addDamageSkin(2436229)
if success:
sm.chat("The Pig Bar Damage Skin has been added to your account's damage skin collection.")
# sm.consumeItem(2436229)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9776a56824d42f2bff18ed175f92278719ddf139 | 93 | py | Python | jhu_primitives/euclidean_nomination/__init__.py | remram44/primitives-interfaces | f6d305d6f65fc8c89c14bef6f2b8b4d86d44005b | [
"Apache-2.0"
] | null | null | null | jhu_primitives/euclidean_nomination/__init__.py | remram44/primitives-interfaces | f6d305d6f65fc8c89c14bef6f2b8b4d86d44005b | [
"Apache-2.0"
] | 23 | 2017-09-20T08:12:13.000Z | 2022-03-01T01:49:11.000Z | jhu_primitives/euclidean_nomination/__init__.py | remram44/primitives-interfaces | f6d305d6f65fc8c89c14bef6f2b8b4d86d44005b | [
"Apache-2.0"
] | 8 | 2018-05-14T18:44:38.000Z | 2021-03-18T19:53:23.000Z | from __future__ import absolute_import
| 31 | 53 | 0.903226 | from __future__ import absolute_import
from .euclidean_nomination import EuclideanNomination
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 22 |
67358a218c8de9c7a4a7b5c11a14dc74a49ac17a | 403 | py | Python | Startup.py | TimothyBergstrom/Zergy | ca9e51afccd0907dc343c36e3421211ed9861319 | [
"Apache-2.0"
] | null | null | null | Startup.py | TimothyBergstrom/Zergy | ca9e51afccd0907dc343c36e3421211ed9861319 | [
"Apache-2.0"
] | 1 | 2017-11-06T21:59:41.000Z | 2017-11-06T21:59:41.000Z | Startup.py | TimothyBergstrom/Zergy | ca9e51afccd0907dc343c36e3421211ed9861319 | [
"Apache-2.0"
] | null | null | null | import subprocess
import os
try:
Settings=[]
f=open('data/Settings.txt','r')
_lines=f.readlines()
Settings.append([i.replace('\n','') for i in _lines])
Settings=Settings[0] #Because list in list
f.close()
except:
Settings=['Manual: Fill',5,0,'No','No']
try:
subprocess.Popen(['GUI.exe'... | 21.210526 | 81 | 0.652605 | import subprocess
import os
try:
Settings=[]
f=open('data/Settings.txt','r')
_lines=f.readlines()
Settings.append([i.replace('\n','') for i in _lines])
Settings=Settings[0] #Because list in list
f.close()
except:
Settings=['Manual: Fill',5,0,'No','No']
try:
subprocess.Popen(['GUI.exe'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
598d01312b8f1651df66dcdb2419ccaee00465e3 | 280 | py | Python | src/stemming.py | Stoeoeoe/InnovationThesis | eaf8e419bdd8d0ee33f30a789c5ac93633ae3062 | [
"MIT"
] | null | null | null | src/stemming.py | Stoeoeoe/InnovationThesis | eaf8e419bdd8d0ee33f30a789c5ac93633ae3062 | [
"MIT"
] | null | null | null | src/stemming.py | Stoeoeoe/InnovationThesis | eaf8e419bdd8d0ee33f30a789c5ac93633ae3062 | [
"MIT"
] | null | null | null | from nltk.tag import pos_tag
from nltk.tokenize import word_tokenize
text1 = 'His acting was amazing.'
text2 = 'He was merely acting.'
print(pos_tag(word_tokenize(text1)))
print(pos_tag(word_tokenize(text2))) | 23.333333 | 39 | 0.792857 | from nltk import stem
from nltk import tokenize
from nltk import tag
from nltk.tag import pos_tag
from nltk.tokenize import word_tokenize
text1 = 'His acting was amazing.'
text2 = 'He was merely acting.'
print(pos_tag(word_tokenize(text1)))
print(pos_tag(word_tokenize(text2))) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 66 |
d623c86c78e6b71a533d2abdd161fcf6efba9130 | 935 | py | Python | test/test_miner-search.py | sckott/pyminer | 00f05067f536465d664999d613e4c37500653976 | [
"MIT"
] | 6 | 2016-02-02T21:29:11.000Z | 2020-08-16T14:11:19.000Z | test/test_miner-search.py | sckott/pyminer | 00f05067f536465d664999d613e4c37500653976 | [
"MIT"
] | 9 | 2016-11-12T16:14:13.000Z | 2020-09-25T13:15:42.000Z | test/test_miner-search.py | sckott/pyminer | 00f05067f536465d664999d613e4c37500653976 | [
"MIT"
] | null | null | null | """Tests for miner module - search methods"""
from pyminer import Miner
m = Miner()
# def test_search_filter():
# "miner.search - diff taxonKey2"
# res = miner.search()
# assert 'dict' == res.__class__.__name__
# assert 6 == len(res)
# assert 2683264 == res['results'][0]['taxonKey']
| 31.166667 | 63 | 0.677005 | """Tests for miner module - search methods"""
import os
import pytest
import vcr
from pyminer import Miner
m = Miner()
@vcr.use_cassette('test/vcr_cassettes/search.yaml')
def test_search():
"miner.search - basic test"
res = m.search(filter = {'has_full_text': True}, limit = 5)
assert 'Mined' == res.__class... | 0 | 549 | 0 | 0 | 0 | 0 | 0 | -31 | 112 |
d530591ad3e0b6d1d80a67611a179ab599febfb7 | 1,830 | py | Python | neural_network.py | maxlorenz/Simple_NN | 2752663fd3ccacee42e339859060eed5125f61d5 | [
"Apache-2.0"
] | 88 | 2017-02-25T14:44:01.000Z | 2022-01-28T23:24:04.000Z | neural_network.py | maxlorenz/Simple_NN | 2752663fd3ccacee42e339859060eed5125f61d5 | [
"Apache-2.0"
] | 2 | 2017-02-25T19:36:21.000Z | 2017-02-27T21:59:18.000Z | neural_network.py | maxlorenz/Simple_NN | 2752663fd3ccacee42e339859060eed5125f61d5 | [
"Apache-2.0"
] | 10 | 2017-02-25T19:20:03.000Z | 2018-08-21T12:05:03.000Z | from random import choice
if __name__ == "__main__":
nn = NeuralNetwork(inputs=2, hidden_neurons=4)
training = [([0, 0], 0), ([0, 1], 1), ([1, 0], 1), ([1, 1], 0)]
for epoch in range(100000):
input, target = choice(training)
nn.learn(input, target)
for input, target in training:
... | 26.911765 | 69 | 0.571585 | from random import random, choice
class Neuron(object):
def __init__(self, num_inputs):
self.inputs = []
self.learning_rate = 0.01
self.weights = [random() for _ in range(num_inputs)]
self.bias = random()
@staticmethod
def activation(x):
"""ReLU function"""
... | 0 | 146 | 0 | 1,201 | 0 | 0 | 0 | 8 | 46 |
351137de7e2941c3ec14e6b66c19e390ce537c11 | 1,562 | py | Python | coastl/stl_toolkit/stl_processing.py | prathgan/COASTL | 2ee009964f8bafc2d108aba6554f230549cb09e3 | [
"MIT"
] | null | null | null | coastl/stl_toolkit/stl_processing.py | prathgan/COASTL | 2ee009964f8bafc2d108aba6554f230549cb09e3 | [
"MIT"
] | null | null | null | coastl/stl_toolkit/stl_processing.py | prathgan/COASTL | 2ee009964f8bafc2d108aba6554f230549cb09e3 | [
"MIT"
] | null | null | null | from .stl_parsing import parse_logic
from .stl_constraints import create_constraints
from .utilities.simple_utilities import remove_gurobi_log, parentheses_match
def solve(logic):
"""Finds solutions for all binary and continuous variables in logic string"""
return synthesize_stl(create_model_stl(parse_stl(logic)),re... | 39.05 | 119 | 0.792574 | import re
from gurobipy import *
from .stl_parsing import parse_logic
from .stl_constraints import create_constraints
from .utilities.simple_utilities import remove_gurobi_log, parentheses_match
def solve(logic):
"""Finds solutions for all binary and continuous variables in logic string"""
return synthesize_stl(crea... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -11 | 44 |
1e01397b0e0b55041950595176edcb92e499b82c | 169 | py | Python | mtd/__init__.py | jbernhard/mtd | 6326fdb44f071311ace7862371e658d609f43d08 | [
"MIT"
] | 4 | 2017-02-21T21:20:07.000Z | 2020-11-03T15:54:13.000Z | mtd/__init__.py | jbernhard/mtd | 6326fdb44f071311ace7862371e658d609f43d08 | [
"MIT"
] | null | null | null | mtd/__init__.py | jbernhard/mtd | 6326fdb44f071311ace7862371e658d609f43d08 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__version__ = '0.1.dev0'
| 16.9 | 28 | 0.710059 | # -*- coding: utf-8 -*-
__version__ = '0.1.dev0'
from .multigp import MultiGP
from .pca import PCA
from .util import *
from . import priors
from george import kernels
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 111 |
9d53527b82665492d24c2490026e630dce7fcf5e | 724 | py | Python | 15/15_b_selection_sort.py | srinijadharani/DataStructuresLab | fa6fd5fa64467cdb62302c66a708b041792da862 | [
"MIT"
] | null | null | null | 15/15_b_selection_sort.py | srinijadharani/DataStructuresLab | fa6fd5fa64467cdb62302c66a708b041792da862 | [
"MIT"
] | null | null | null | 15/15_b_selection_sort.py | srinijadharani/DataStructuresLab | fa6fd5fa64467cdb62302c66a708b041792da862 | [
"MIT"
] | null | null | null | '''
Write a program to implement various sorting techniques:
[Compare with Pythons Built-In Sorting Functions also]
Insertion sort
Selection Sort
Bubble Sort
Merge Sort
Quick Sort
'''
# SELECTION SORT
n = int(input("Enter the number of list items: "))
arr = []
for i in range(0, n):
ele = int(inp... | 25.857143 | 58 | 0.603591 | '''
Write a program to implement various sorting techniques:
[Compare with Python’s Built-In Sorting Functions also]
• Insertion sort
• Selection Sort
• Bubble Sort
• Merge Sort
• Quick Sort
'''
# SELECTION SORT
n = int(input("Enter the number of list items: "))
arr = []
for i in range(0, n):
ele = i... | 18 | 0 | 0 | 0 | 0 | 237 | 0 | 0 | 25 |
c417ac78d6a74a21d493d6480c2e10db351b3d0a | 374 | py | Python | python/delay_vs_fanout.py | antmicro/nextpnr | bb5a8162dfebdf2d2cbf64bf5503142a0deef2a9 | [
"0BSD"
] | 865 | 2018-08-01T11:41:26.000Z | 2022-03-29T08:34:29.000Z | python/delay_vs_fanout.py | antmicro/nextpnr | bb5a8162dfebdf2d2cbf64bf5503142a0deef2a9 | [
"0BSD"
] | 533 | 2018-08-01T14:01:59.000Z | 2022-03-30T13:11:09.000Z | python/delay_vs_fanout.py | antmicro/nextpnr | bb5a8162dfebdf2d2cbf64bf5503142a0deef2a9 | [
"0BSD"
] | 194 | 2018-08-01T12:48:19.000Z | 2022-03-29T10:19:57.000Z | with open("delay_vs_fanout.csv", "w") as f:
print("fanout,delay", file=f)
for net_name, net in ctx.nets:
if net.driver.cell is None:
continue
if net.driver.cell.type == "DCCA":
continue # ignore global clocks
for user in net.users:
print(f"{len(net.use... | 34 | 84 | 0.590909 | with open("delay_vs_fanout.csv", "w") as f:
print("fanout,delay", file=f)
for net_name, net in ctx.nets:
if net.driver.cell is None:
continue
if net.driver.cell.type == "DCCA":
continue # ignore global clocks
for user in net.users:
print(f"{len(net.use... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
939e70e5d13b2a3fe17b2bb42d0609a0c007c0ee | 9,957 | py | Python | Bio/PDB/TorusDBN/_io.py | mchelem/biopython | 2daa5fee06077bbada8b89fe6032c3f123318fc2 | [
"PostgreSQL"
] | 1 | 2020-06-29T17:32:16.000Z | 2020-06-29T17:32:16.000Z | Bio/PDB/TorusDBN/_io.py | mchelem/biopython | 2daa5fee06077bbada8b89fe6032c3f123318fc2 | [
"PostgreSQL"
] | null | null | null | Bio/PDB/TorusDBN/_io.py | mchelem/biopython | 2daa5fee06077bbada8b89fe6032c3f123318fc2 | [
"PostgreSQL"
] | null | null | null | # Copyright (C) 2011 by Michele Silva (michele.silva@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import os
import math
import numpy
from mocapy.framework import eMISMASK
from Bio.PDB ... | 33.982935 | 102 | 0.568545 | # Copyright (C) 2011 by Michele Silva (michele.silva@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import os
import math
import numpy
from mocapy.framework import eMISMASK
from Bio.PDB ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 |
bd4cfb50614b26d2a45f7796cdb6de5d44ba7f1a | 6,598 | py | Python | pool.py | scarecrow87/nhzpool | 90a5718a6a491e0432a5c60429b3b16ac8114df1 | [
"MIT"
] | 1 | 2015-02-16T11:49:16.000Z | 2015-02-16T11:49:16.000Z | pool.py | scarecrow87/nhzpool | 90a5718a6a491e0432a5c60429b3b16ac8114df1 | [
"MIT"
] | null | null | null | pool.py | scarecrow87/nhzpool | 90a5718a6a491e0432a5c60429b3b16ac8114df1 | [
"MIT"
] | 5 | 2015-02-16T12:42:45.000Z | 2019-07-14T20:50:49.000Z | #!/usr/bin/env python
# author: pharesim@nhzcrypto.org
import sqlite3
import ConfigParser
config = ConfigParser.RawConfigParser()
config.read('config.ini')
conn = sqlite3.connect(config.get("pool", "database"))
c = conn.cursor()
if __name__ == "__main__":
main()
| 37.91954 | 191 | 0.615944 | #!/usr/bin/env python
# author: pharesim@nhzcrypto.org
import json
import urllib
import urllib2
import sqlite3
import math
import ConfigParser
import time
config = ConfigParser.RawConfigParser()
config.read('config.ini')
conn = sqlite3.connect(config.get("pool", "database"))
c = conn.cursor()
def main():
whil... | 0 | 0 | 0 | 0 | 0 | 6,045 | 0 | -45 | 311 |
6027c33c333db43152b335b880f0d183ba49d46d | 4,319 | py | Python | parsl/tests/manual_tests/test_basic.py | benclifford/parsl | 21f8681882779050d2e074591e95ada43789748f | [
"Apache-2.0"
] | 2 | 2019-02-25T16:43:30.000Z | 2019-03-04T17:25:00.000Z | parsl/tests/manual_tests/test_basic.py | benclifford/parsl | 21f8681882779050d2e074591e95ada43789748f | [
"Apache-2.0"
] | null | null | null | parsl/tests/manual_tests/test_basic.py | benclifford/parsl | 21f8681882779050d2e074591e95ada43789748f | [
"Apache-2.0"
] | 2 | 2019-04-30T13:46:23.000Z | 2019-06-04T16:14:46.000Z | import argparse
import parsl
# Tested. Confirmed. Local X Local X SingleNodeLauncher
from parsl.tests.configs.local_ipp import config
# Tested. Confirmed. ssh X Slurm X SingleNodeLauncher
# from parsl.tests.configs.midway_ipp import config
# Tested. Confirmed. ssh X Slurm X SingelNodeLauncher
# from parsl.tests.conf... | 26.496933 | 77 | 0.664737 | import argparse
import time
import parsl
# Tested. Confirmed. Local X Local X SingleNodeLauncher
from parsl.tests.configs.local_ipp import config
# Tested. Confirmed. ssh X Slurm X SingleNodeLauncher
# from parsl.tests.configs.midway_ipp import config
# Tested. Confirmed. ssh X Slurm X SingelNodeLauncher
# from pars... | 0 | 294 | 0 | 0 | 0 | 1,265 | 0 | 5 | 243 |
2950cf0bc349ff3760e44a141ca72bdffc988490 | 255 | py | Python | __init__.py | blackCheetah/YouTube---Checker-for-Giveaways | c20b8ad762669a38c4ccfeb91486f008b7f0833c | [
"MIT"
] | null | null | null | __init__.py | blackCheetah/YouTube---Checker-for-Giveaways | c20b8ad762669a38c4ccfeb91486f008b7f0833c | [
"MIT"
] | 3 | 2021-02-08T20:25:28.000Z | 2021-06-01T22:43:03.000Z | __init__.py | blackCheetah/YouTube---Checker-for-Giveaways | c20b8ad762669a38c4ccfeb91486f008b7f0833c | [
"MIT"
] | null | null | null | """
General details about the program
"""
__version__ = '0.2.0'
__author__ = 'blackCheetah'
__created__ = '27.09.2018'
__updated__ = '07.10.2018'
__description__ = 'Retrieve all subscribers who made a comment on your last 50 videos.'
| 28.333333 | 87 | 0.678431 | """
General details about the program
"""
__version__ = '0.2.0'
__author__ = 'blackCheetah'
__created__ = '27.09.2018'
__updated__ = '07.10.2018'
__description__ = 'Retrieve all subscribers who made a comment on your last 50 videos.'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fcdcbb79481d3bb5f02262e55c738c7678897fbb | 52,534 | py | Python | src/operation.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 4 | 2021-10-17T11:17:59.000Z | 2022-02-28T16:58:40.000Z | src/operation.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 17 | 2021-10-05T21:44:06.000Z | 2022-03-31T16:58:40.000Z | src/operation.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 8 | 2021-09-02T18:55:49.000Z | 2022-03-09T21:05:28.000Z | #!/usr/bin/env python
"""
Schema
Schema | Name | Type | Owner
--------+-------------------+----------+---------
public | job | table | huangch
public | job_definition | table | huangch
public | job_definition_id | sequence | huangch
public | job_id | sequence | ... | 28.848984 | 357 | 0.634675 | #!/usr/bin/env python
"""
Schema
Schema | Name | Type | Owner
--------+-------------------+----------+---------
public | job | table | huangch
public | job_definition | table | huangch
public | job_definition_id | sequence | huangch
public | job_id | sequence | ... | 0 | 0 | 0 | 0 | 0 | 43,529 | 0 | 0 | 1,288 |
993c6b3484d477798ccc852287106e2dcf851281 | 775 | py | Python | project/five_fold.py | jayson-garrison/ML-Naive-Bayes | 8026fae6413bc4f5b42d66eff8f1296a310b467c | [
"MIT"
] | 1 | 2022-01-18T01:58:24.000Z | 2022-01-18T01:58:24.000Z | project/five_fold.py | jayson-garrison/ML-Naive-Bayes | 8026fae6413bc4f5b42d66eff8f1296a310b467c | [
"MIT"
] | null | null | null | project/five_fold.py | jayson-garrison/ML-Naive-Bayes | 8026fae6413bc4f5b42d66eff8f1296a310b467c | [
"MIT"
] | null | null | null | """"
Author: Jayson C. Garrison
Dates: 01/19/2022
Course: CS-5333 (Machine Learning)
Description: Function that partitions data according to five fold cross validation
GitHub: https://github.com/jayson-garrison/ML-Naive-Bayes
""" | 28.703704 | 82 | 0.6 | """"
Author: Jayson C. Garrison
Dates: 01/19/2022
Course: CS-5333 (Machine Learning)
Description: Function that partitions data according to five fold cross validation
GitHub: https://github.com/jayson-garrison/ML-Naive-Bayes
"""
class FiveFold:
# partition a data set into a list of 5 tuples for training and testi... | 0 | 0 | 0 | 524 | 0 | 0 | 0 | 0 | 22 |
57896a723fbc502aa7a96e61088aa5e895edfcd3 | 1,186 | py | Python | src/faber/config/try_compile.py | drmoose/faber | f447d58f2b42ad496c155cc8b3491379ac97c6f8 | [
"BSL-1.0"
] | 14 | 2017-05-27T00:18:24.000Z | 2021-09-11T03:51:02.000Z | src/faber/config/try_compile.py | drmoose/faber | f447d58f2b42ad496c155cc8b3491379ac97c6f8 | [
"BSL-1.0"
] | 26 | 2017-07-16T17:20:57.000Z | 2021-02-08T02:49:53.000Z | src/faber/config/try_compile.py | stefanseefeld/constructor | 0f369a8a9e4de305e5379d9662b2e79bffd43910 | [
"BSL-1.0"
] | 3 | 2018-05-24T13:52:40.000Z | 2020-06-30T16:46:26.000Z | #
# Copyright (c) 2016 Stefan Seefeld
# All rights reserved.
#
# This file is part of Faber. It is made available under the
# Boost Software License, Version 1.0.
# (Consult LICENSE or http://www.boost.org/LICENSE_1_0.txt)
| 33.885714 | 74 | 0.632378 | #
# Copyright (c) 2016 Stefan Seefeld
# All rights reserved.
#
# This file is part of Faber. It is made available under the
# Boost Software License, Version 1.0.
# (Consult LICENSE or http://www.boost.org/LICENSE_1_0.txt)
from .check import check
from ..artefact import intermediate, always
from ..tools.compiler impor... | 0 | 0 | 0 | 762 | 0 | 0 | 0 | 66 | 134 |
f18ac13ba65aed5e3dfba48ba08ef246fff78e5e | 3,354 | py | Python | pyscripts/analyse_swm_loc_trunc.py | luanfs/iModel | 8dd39e3564b6bc01df8dfe417493d9c7b22c40a8 | [
"MIT"
] | 10 | 2015-10-09T17:44:51.000Z | 2021-06-10T01:56:33.000Z | pyscripts/analyse_swm_loc_trunc.py | luanfs/iModel | 8dd39e3564b6bc01df8dfe417493d9c7b22c40a8 | [
"MIT"
] | 2 | 2018-08-29T11:49:32.000Z | 2021-03-18T18:07:53.000Z | pyscripts/analyse_swm_loc_trunc.py | luanfs/iModel | 8dd39e3564b6bc01df8dfe417493d9c7b22c40a8 | [
"MIT"
] | 14 | 2016-03-18T19:24:56.000Z | 2021-09-01T10:38:57.000Z | #! /usr/bin/env python3
#---------------------------------
# Plots errors of experiments
# obtained from iModel output
# Pedro Peixoto (ppeixoto@usp.br)
# Novembre 2018
#----------------------------------
import sys
import string
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
#Custom plotting setu... | 23.131034 | 93 | 0.683363 | #! /usr/bin/env python3
#---------------------------------
# Plots errors of experiments
# obtained from iModel output
# Pedro Peixoto (ppeixoto@usp.br)
# Novembre 2018
#----------------------------------
import sys
import os
import re
import string
import numpy as np
import matplotlib
#matplotlib.use('Ag... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -13 | 156 |
59559039502c8f55ac9f29f68ebb611f4d96e2cd | 6,641 | py | Python | h/script.py | RichardLitt/h | f98d7e19a7913c82a3d3c43c226994366ebd3009 | [
"MIT"
] | null | null | null | h/script.py | RichardLitt/h | f98d7e19a7913c82a3d3c43c226994366ebd3009 | [
"MIT"
] | null | null | null | h/script.py | RichardLitt/h | f98d7e19a7913c82a3d3c43c226994366ebd3009 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from urlparse import uses_netloc, uses_relative
from clik import App
from pyramid.path import AssetResolver
from h import __version__
version = __version__
description = """\
The Hypothes.is Project Annotation System
"""
command = App(
'hypothesis',
version=version,
description=d... | 29.780269 | 78 | 0.680922 | # -*- coding: utf-8 -*-
import json
from os import chdir, getcwd, makedirs, mkdir, walk
from os.path import abspath, exists, join
from shutil import copyfile, rmtree
from urlparse import urljoin, urlparse, urlunparse, uses_netloc, uses_relative
from chameleon.zpt.template import PageTextTemplateFile
from clik import A... | 0 | 2,321 | 0 | 0 | 0 | 2,940 | 0 | 280 | 517 |
4dfcd178b71eaa0a60e7f9386fde5faf6871fbbb | 3,874 | py | Python | diff_representation/vocab.py | microsoft/iclr2019-learning-to-represent-edits | e5777d6aa6cdeda500cf076646177c48d1cb4622 | [
"MIT"
] | 8 | 2021-03-15T18:57:18.000Z | 2021-08-23T11:28:22.000Z | diff_representation/vocab.py | microsoft/iclr2019-learning-to-represent-edits | e5777d6aa6cdeda500cf076646177c48d1cb4622 | [
"MIT"
] | null | null | null | diff_representation/vocab.py | microsoft/iclr2019-learning-to-represent-edits | e5777d6aa6cdeda500cf076646177c48d1cb4622 | [
"MIT"
] | 4 | 2021-03-27T14:19:09.000Z | 2021-09-13T12:35:31.000Z | #!/usr/bin/env python
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Usage:
vocab.py [options] TRAIN_FILE VOCAB_FILE
Options:
-h --help Show this screen.
--size=<int> vocab size [default: 10000]
--freq_cutoff=<int> frequency cutoff [de... | 30.503937 | 117 | 0.593443 | #!/usr/bin/env python
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Usage:
vocab.py [options] TRAIN_FILE VOCAB_FILE
Options:
-h --help Show this screen.
--size=<int> vocab size [default: 10000]
--freq_cutoff=<int> frequency cutoff [de... | 0 | 1,212 | 0 | 1,675 | 0 | 0 | 0 | 6 | 113 |
691d093f8e188fd2228b63061c9ed8aeb574df99 | 1,620 | py | Python | graphs/partitions_graph.py | jnfran92/adaptive-boxes | bcf03a91d48877b3a24125b74a233bda5bd8e044 | [
"MIT"
] | 7 | 2020-06-05T23:18:14.000Z | 2021-12-27T01:27:06.000Z | graphs/partitions_graph.py | jnfran92/adaptive-boxes | bcf03a91d48877b3a24125b74a233bda5bd8e044 | [
"MIT"
] | 3 | 2019-09-15T15:43:29.000Z | 2020-11-19T16:27:22.000Z | graphs/partitions_graph.py | jnfran92/adaptive-boxes | bcf03a91d48877b3a24125b74a233bda5bd8e044 | [
"MIT"
] | 1 | 2020-09-24T08:01:39.000Z | 2020-09-24T08:01:39.000Z |
import matplotlib.pyplot as plt
import networkx as nx
import pandas as pd
summary_groups_data_path = '/Users/Juan/django_projects/adaptive-boxes/graphs/partitions_data/hall/summary_groups.csv'
x_units_path = '/Users/Juan/django_projects/adaptive-boxes/graphs/partitions_data/hall/x_units.csv'
y_units_path = '/Users/J... | 23.478261 | 118 | 0.71358 |
import matplotlib.pyplot as plt
import networkx as nx
import pandas as pd
from networkx.readwrite import json_graph, write_gexf
from matplotlib import pylab
summary_groups_data_path = '/Users/Juan/django_projects/adaptive-boxes/graphs/partitions_data/hall/summary_groups.csv'
x_units_path = '/Users/Juan/django_projec... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 44 |
8698e112f320339793a7016d5eccfaf6f1d310cc | 6,299 | py | Python | scripts/zMayaTools/bake_transform.py | fsanges/zMayaTools | 795168d497459b43439e03a55233320f90d8d11c | [
"MIT"
] | 1 | 2021-01-28T05:13:47.000Z | 2021-01-28T05:13:47.000Z | scripts/zMayaTools/bake_transform.py | fsanges/zMayaTools | 795168d497459b43439e03a55233320f90d8d11c | [
"MIT"
] | null | null | null | scripts/zMayaTools/bake_transform.py | fsanges/zMayaTools | 795168d497459b43439e03a55233320f90d8d11c | [
"MIT"
] | null | null | null | # Bake the transform on each frame from one transform to another.
#
# This is similar to the graph editor's keyframe bake (without any smart key reduction),
# but bakes one object to another. This is useful for baking a constraint to another
# transform.
#
# For example, you can constrain a locator to a character's ha... | 42.560811 | 107 | 0.646611 | # Bake the transform on each frame from one transform to another.
#
# This is similar to the graph editor's keyframe bake (without any smart key reduction),
# but bakes one object to another. This is useful for baking a constraint to another
# transform.
#
# For example, you can constrain a locator to a character's ha... | 0 | 0 | 0 | 0 | 0 | 5,287 | 0 | 68 | 182 |
78f75ad9c04b23ec42185b40ad735003f1b7b9e5 | 4,233 | py | Python | deckbuilder/card/models.py | maxawolff/mtg-deckbuilder | 4ac7d0d7a0ed015dafd5143df0021182deb7cb01 | [
"MIT"
] | null | null | null | deckbuilder/card/models.py | maxawolff/mtg-deckbuilder | 4ac7d0d7a0ed015dafd5143df0021182deb7cb01 | [
"MIT"
] | null | null | null | deckbuilder/card/models.py | maxawolff/mtg-deckbuilder | 4ac7d0d7a0ed015dafd5143df0021182deb7cb01 | [
"MIT"
] | null | null | null | """Model of a single magic card."""
# class Transform(models.Model):
# """Model for the fliped side of a trasnform card."""
# front =
| 41.910891 | 79 | 0.605245 | """Model of a single magic card."""
from django.db import models
from multiselectfield import MultiSelectField
from django.utils.text import slugify
class Set(models.Model):
"""Class for set model."""
name = models.CharField(max_length=50)
set_id = models.CharField(max_length=5, null=True, blank=True)
... | 0 | 0 | 0 | 3,903 | 0 | 0 | 0 | 47 | 135 |
0aebbaf8b359a3b4a74ff1c6e8498b0e0f6277fc | 1,431 | py | Python | .github/workflows/ensure_clean_notebooks.py | ICESAT-2HackWeek/website2022 | 10229090a94edb3e5734dbc00149b0502ad5396a | [
"MIT"
] | 8 | 2022-02-01T16:54:29.000Z | 2022-03-22T18:09:31.000Z | .github/workflows/ensure_clean_notebooks.py | ICESAT-2HackWeek/website2022 | 10229090a94edb3e5734dbc00149b0502ad5396a | [
"MIT"
] | 99 | 2022-01-27T22:01:05.000Z | 2022-03-31T19:42:28.000Z | .github/workflows/ensure_clean_notebooks.py | ICESAT-2HackWeek/website2022 | 10229090a94edb3e5734dbc00149b0502ad5396a | [
"MIT"
] | 25 | 2022-02-02T00:58:27.000Z | 2022-03-24T20:59:57.000Z | import yaml
import nb_clean as nbc
from pathlib import Path
import nbformat
import sys
with open('./book/_config.yml') as f:
data = yaml.safe_load(f)
# Sometimes we use rendered notebooks instead of executing them
exclude_paths = []
for pattern in data['execute']['exclude_patterns']:
exclude_paths += list(Path(... | 34.902439 | 82 | 0.675751 | import yaml
import nb_clean as nbc
from pathlib import Path
import nbformat
import sys
with open('./book/_config.yml') as f:
data = yaml.safe_load(f)
# Sometimes we use rendered notebooks instead of executing them
exclude_paths = []
for pattern in data['execute']['exclude_patterns']:
exclude_paths += list(Path(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
30f3acb68606b47810d80f6613338364bf126a6e | 75,314 | py | Python | gerenciador_operacoes.py | David-Machado-Git/LABS---PROGRAMA-HAVAN | c084d8d1b3ba8cca726663cc1400149c3d34a64f | [
"MIT"
] | null | null | null | gerenciador_operacoes.py | David-Machado-Git/LABS---PROGRAMA-HAVAN | c084d8d1b3ba8cca726663cc1400149c3d34a64f | [
"MIT"
] | null | null | null | gerenciador_operacoes.py | David-Machado-Git/LABS---PROGRAMA-HAVAN | c084d8d1b3ba8cca726663cc1400149c3d34a64f | [
"MIT"
] | 1 | 2021-06-24T20:39:03.000Z | 2021-06-24T20:39:03.000Z | from time import sleep
dados = {} ### --> DICIONRIO RECEBE TODOS OS DADOS COM SEUS RESPECTIVOS VALORES; ID, NOME ETC...
lista_de_dados = []
lista_principal = []
copia_dados = []### --> DICIONRIO RECEBE TODOS OS DADOS
codigo_cliente = 0 ### --> CONTADOR CONTAGEM TRANSAES
moeda_origem_sigla = 'R$:'
moeda_destino_sigla =... | 50.580255 | 148 | 0.42036 | from time import sleep
dados = {} ### --> DICIONÁRIO RECEBE TODOS OS DADOS COM SEUS RESPECTIVOS VALORES; ID, NOME ETC...
lista_de_dados = []
lista_principal = []
copia_dados = []### --> DICIONÁRIO RECEBE TODOS OS DADOS
codigo_cliente = 0 ### --> CONTADOR CONTAGEM TRANSAÇÕES
moeda_origem_sigla = 'R$:'
moeda_destino_sig... | 1,072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c02d6565bfebaec5de189a39aa7ec6f21d1d6700 | 382 | py | Python | sweep_test.py | winksaville/cadquery-wing1 | 43da6a179e1a527401a4328764f3726048d66339 | [
"MIT"
] | null | null | null | sweep_test.py | winksaville/cadquery-wing1 | 43da6a179e1a527401a4328764f3726048d66339 | [
"MIT"
] | null | null | null | sweep_test.py | winksaville/cadquery-wing1 | 43da6a179e1a527401a4328764f3726048d66339 | [
"MIT"
] | null | null | null | a = 1
b = 5
h = b*5
d = a*5
s = (
cq.Workplane("XY")
.ellipse(a,b)
.sweep(
cq.Workplane("XZ")
# Start 0deg tangent, Tip finishes with 90deg tangent
.spline([(0, i) for i in range(h)] + [(d,h)],[(0,1),(1,0)])
# Start 0deg tangent, Tip finishes with 45deg tangent
#.sp... | 21.222222 | 67 | 0.494764 | a = 1
b = 5
h = b*5
d = a*5
s = (
cq.Workplane("XY")
.ellipse(a,b)
.sweep(
cq.Workplane("XZ")
# Start 0deg tangent, Tip finishes with 90deg tangent
.spline([(0, i) for i in range(h)] + [(d,h)],[(0,1),(1,0)])
# Start 0deg tangent, Tip finishes with 45deg tangent
#.sp... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67ca4046b26fc6f2949edcf97d480f0651eba7a6 | 7,442 | py | Python | designateclient/functionaltests/v2/fixtures.py | mail2nsrajesh/python-designateclient | 3bb401758c00a9d66383484c60933421d9a21d63 | [
"Apache-2.0"
] | null | null | null | designateclient/functionaltests/v2/fixtures.py | mail2nsrajesh/python-designateclient | 3bb401758c00a9d66383484c60933421d9a21d63 | [
"Apache-2.0"
] | null | null | null | designateclient/functionaltests/v2/fixtures.py | mail2nsrajesh/python-designateclient | 3bb401758c00a9d66383484c60933421d9a21d63 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2015 Rackspace
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
dist... | 34.775701 | 79 | 0.658963 | """
Copyright 2015 Rackspace
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
dist... | 0 | 1,113 | 0 | 5,278 | 0 | 0 | 0 | 68 | 340 |
2dfdec1d2a034d95564f8f983b6af317c3bf00d9 | 135 | py | Python | app/recipe/admin.py | fdomingues-travelperk/recipes-exercise | fbc00f98ba93043850e8c2ec0512f18bff274551 | [
"MIT"
] | null | null | null | app/recipe/admin.py | fdomingues-travelperk/recipes-exercise | fbc00f98ba93043850e8c2ec0512f18bff274551 | [
"MIT"
] | null | null | null | app/recipe/admin.py | fdomingues-travelperk/recipes-exercise | fbc00f98ba93043850e8c2ec0512f18bff274551 | [
"MIT"
] | null | null | null | from django.contrib import admin
from recipe import models
admin.site.register(models.Recipe)
admin.site.register(models.Ingredient)
| 19.285714 | 38 | 0.82963 | from django.contrib import admin
from recipe import models
admin.site.register(models.Recipe)
admin.site.register(models.Ingredient)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6f66a39ae443cdb3ff11e4b0bec5ccb6b7a6512e | 24,373 | py | Python | nipype/interfaces/semtools/filtering/featuredetection.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | null | null | null | nipype/interfaces/semtools/filtering/featuredetection.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | 2 | 2017-10-05T21:08:38.000Z | 2018-10-09T23:01:23.000Z | nipype/interfaces/semtools/filtering/featuredetection.py | effigies/nipype | 18fe222557cf3b9627e06b2a66fba589feaca581 | [
"Apache-2.0"
] | 1 | 2016-10-11T19:18:53.000Z | 2016-10-11T19:18:53.000Z | # -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
| 37.097412 | 287 | 0.761129 | # -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
import os
from ...base import (CommandLine, CommandLineInputSpec, SEMLikeCommandLine,
TraitedSpec, File, Directory, traits, isdefined,
... | 0 | 0 | 0 | 22,718 | 0 | 0 | 0 | 166 | 1,288 |
fb13245a2c7ed2656aecee51c83e4daf02bf09af | 1,699 | py | Python | product_catalog/tests/test_urls.py | ssorin/django-product-catalog | 98495de057a5bb6a04801dac800edc8fb3437f47 | [
"BSD-3-Clause"
] | 4 | 2018-12-02T14:51:47.000Z | 2020-12-12T09:06:18.000Z | product_catalog/tests/test_urls.py | ssorin/django-product-catalog | 98495de057a5bb6a04801dac800edc8fb3437f47 | [
"BSD-3-Clause"
] | 6 | 2018-12-20T08:22:25.000Z | 2022-03-11T23:11:30.000Z | product_catalog/tests/test_urls.py | ssorin/django-product-catalog | 98495de057a5bb6a04801dac800edc8fb3437f47 | [
"BSD-3-Clause"
] | 2 | 2017-12-06T23:56:14.000Z | 2021-07-23T16:16:18.000Z | # coding=utf-8
""" Product Catalog: urls test cases """
| 35.395833 | 83 | 0.64744 | # coding=utf-8
""" Product Catalog: urls test cases """
from django.test import TestCase
from django.urls import reverse
from django.urls import resolve
from product_catalog.models.product import Product
from product_catalog.models.category import Category
class UrlsTestCase(TestCase):
def setUp(self):
... | 0 | 0 | 0 | 1,416 | 0 | 0 | 0 | 91 | 135 |
c0624a4c47c50d8a78a829cdb8707fb16a0bbf74 | 8,194 | py | Python | code/msa.py | yanwang271/PKSpop | 458e719a4bf1c67a9ea6a3f70b579d62e24a0191 | [
"BSD-3-Clause"
] | 2 | 2019-04-11T16:35:31.000Z | 2019-04-11T16:43:44.000Z | code/msa.py | yanwang271/PKSpop | 458e719a4bf1c67a9ea6a3f70b579d62e24a0191 | [
"BSD-3-Clause"
] | null | null | null | code/msa.py | yanwang271/PKSpop | 458e719a4bf1c67a9ea6a3f70b579d62e24a0191 | [
"BSD-3-Clause"
] | 3 | 2019-04-11T16:36:36.000Z | 2020-11-20T16:10:04.000Z | #!/usr/bin/env python3
"""
Cluster and align the docking domain sequences
"""
import os
import subprocess
from Bio import SeqIO
from extract_seq import remove_invalid_pro
def clustering(info_dict):
'''
Cluster the query sequences to 3 classes
'''
c_seq = info_dict['c_seq_path']
n_seq = info_dict... | 33.444898 | 95 | 0.601782 | #!/usr/bin/env python3
"""
Cluster and align the docking domain sequences
"""
import os
import subprocess
from Bio import SeqIO
from extract_seq import remove_invalid_pro
def clustering(info_dict):
'''
Cluster the query sequences to 3 classes
'''
c_seq = info_dict['c_seq_path']
n_seq = info_dict... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
83a66691e7934e92a54af2411e1d853cc3a1d32c | 1,146 | py | Python | examples/reproject.py | EdsonGermano/socrata-py-walkthrough | 56901627fd3760987a8133a16710fbc5c5517aac | [
"Apache-2.0"
] | 1 | 2017-10-31T18:37:12.000Z | 2017-10-31T18:37:12.000Z | examples/reproject.py | EdsonGermano/socrata-py-walkthrough | 56901627fd3760987a8133a16710fbc5c5517aac | [
"Apache-2.0"
] | null | null | null | examples/reproject.py | EdsonGermano/socrata-py-walkthrough | 56901627fd3760987a8133a16710fbc5c5517aac | [
"Apache-2.0"
] | null | null | null | import sys
from examples.auth import authorization
from socrata import Socrata
socrata = Socrata(authorization)
file_path = sys.argv[1]
"""
This shows reprojecting from British National Grid
to WGS84
We're using the proj4 def from here:
http://spatialreference.org/ref/epsg/27700/
"""
with open(file_path, 'rb') as ... | 24.382979 | 138 | 0.558464 | import sys
from examples.auth import authorization
from socrata import Socrata
socrata = Socrata(authorization)
file_path = sys.argv[1]
"""
This shows reprojecting from British National Grid
to WGS84
We're using the proj4 def from here:
http://spatialreference.org/ref/epsg/27700/
"""
with open(file_path, 'rb') as ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
596ff1419f0846f4d08cc8c3657fe39286179bfa | 7,650 | py | Python | yandex/cloud/mdb/greenplum/v1/resource_preset_pb2.py | ovandriyanov/python-sdk | eec7dc65ef23789388fa46d13087d4a03cdc6e57 | [
"MIT"
] | null | null | null | yandex/cloud/mdb/greenplum/v1/resource_preset_pb2.py | ovandriyanov/python-sdk | eec7dc65ef23789388fa46d13087d4a03cdc6e57 | [
"MIT"
] | null | null | null | yandex/cloud/mdb/greenplum/v1/resource_preset_pb2.py | ovandriyanov/python-sdk | eec7dc65ef23789388fa46d13087d4a03cdc6e57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: yandex/cloud/mdb/greenplum/v1/resource_preset.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflect... | 47.515528 | 804 | 0.765621 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: yandex/cloud/mdb/greenplum/v1/resource_preset.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflect... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b91366659a3c4d04636e40540c25f7eb5e166e1 | 380 | py | Python | PythonProgram/learningList.challenge.py | subash-kc/2022-01-04-Python | 5ce51e4265bcd860a4e62423edef6ec9cd1437b4 | [
"MIT"
] | 1 | 2022-01-14T18:03:42.000Z | 2022-01-14T18:03:42.000Z | PythonProgram/learningList.challenge.py | subash-kc/2022-01-04-Python | 5ce51e4265bcd860a4e62423edef6ec9cd1437b4 | [
"MIT"
] | null | null | null | PythonProgram/learningList.challenge.py | subash-kc/2022-01-04-Python | 5ce51e4265bcd860a4e62423edef6ec9cd1437b4 | [
"MIT"
] | null | null | null | # display only the IP addresses to the screen.
iplist = [ 5060, "80", 55, "10.0.0.1", "10.20.30.1", "ssh" ]
# example 1 - add up the strings
print("IP addresses: " + iplist[3] + ", and " + iplist[4])
# example 2 - use the comma separator
print("IP addresses:", iplist[3], ", and", iplist[4])
# example 3 - use an 'f-s... | 31.666667 | 60 | 0.621053 | # display only the IP addresses to the screen.
iplist = [ 5060, "80", 55, "10.0.0.1", "10.20.30.1", "ssh" ]
# example 1 - add up the strings
print("IP addresses: " + iplist[3] + ", and " + iplist[4])
# example 2 - use the comma separator
print("IP addresses:", iplist[3], ", and", iplist[4])
# example 3 - use an 'f-s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
62e51c96917728ce58f07d0e579853deb7b9df81 | 1,672 | py | Python | examples/fake_blinkt.py | druck13/blinkt | 4370a64cbd4cf7d6177967b902f16793a4c5fa60 | [
"MIT"
] | null | null | null | examples/fake_blinkt.py | druck13/blinkt | 4370a64cbd4cf7d6177967b902f16793a4c5fa60 | [
"MIT"
] | null | null | null | examples/fake_blinkt.py | druck13/blinkt | 4370a64cbd4cf7d6177967b902f16793a4c5fa60 | [
"MIT"
] | null | null | null | """fake_blink terminal simulation of blinkt, to use rename to blinkt.py and place in same directory as blinkt program"""
import atexit
_clear_on_exit = True
_true_color = True
NUM_PIXELS = 8
pixels = [(0,0,0)] * NUM_PIXELS
def set_clear_on_exit(value=True):
"""Set whether Blinkt! should be cl... | 21.714286 | 120 | 0.597488 | """fake_blink terminal simulation of blinkt, to use rename to blinkt.py and place in same directory as blinkt program"""
import sys
import pantilthat
import atexit
import signal
_clear_on_exit = True
_true_color = True
NUM_PIXELS = 8
pixels = [(0,0,0)] * NUM_PIXELS
def _exit():
if _clear_on_exit:
... | 0 | 0 | 0 | 0 | 0 | 826 | 0 | -23 | 227 |
dc7855f40ff09180648f562fab98406c09b77282 | 180 | py | Python | src/cqml/__init__.py | TheSwanFactory/cqml | 0ca1ddfa23c8fa44612cf520896f2e4159ef5d49 | [
"MIT"
] | null | null | null | src/cqml/__init__.py | TheSwanFactory/cqml | 0ca1ddfa23c8fa44612cf520896f2e4159ef5d49 | [
"MIT"
] | null | null | null | src/cqml/__init__.py | TheSwanFactory/cqml | 0ca1ddfa23c8fa44612cf520896f2e4159ef5d49 | [
"MIT"
] | null | null | null | # CQML
# Compact Query Meta-language
# https://github.com/TheSwanFactory/hclang/blob/master/hc/cqml.hc
# TODO: https://github.com/LucaCanali/sparkMeasure
| 22.5 | 65 | 0.766667 | # CQML
# Compact Query Meta-language
# https://github.com/TheSwanFactory/hclang/blob/master/hc/cqml.hc
# TODO: https://github.com/LucaCanali/sparkMeasure
from .wrappers import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 23 |
19281664ee89ca7e557219fcf463320f03835ff5 | 4,329 | py | Python | src/gocept/template_rewrite/main.py | Wiseqube/gocept.template_rewrite | 28f5742de9eaf6e204e7923c7f7020c36852456b | [
"MIT"
] | 3 | 2018-08-29T12:59:16.000Z | 2019-08-21T07:41:16.000Z | src/gocept/template_rewrite/main.py | Wiseqube/gocept.template_rewrite | 28f5742de9eaf6e204e7923c7f7020c36852456b | [
"MIT"
] | 10 | 2019-08-13T12:02:02.000Z | 2021-01-21T13:52:48.000Z | src/gocept/template_rewrite/main.py | Wiseqube/gocept.template_rewrite | 28f5742de9eaf6e204e7923c7f7020c36852456b | [
"MIT"
] | 3 | 2018-09-18T11:15:04.000Z | 2021-11-29T14:13:50.000Z | import argparse
import logging
import os
import pdb # noqa
log = logging.getLogger(__name__)
parser = argparse.ArgumentParser(
description='Rewrite Python expressions in DTML and ZPT template files.')
parser.add_argument('paths', type=str, nargs='+', metavar='path',
help='paths of files whi... | 34.632 | 79 | 0.607993 | from gocept.template_rewrite.dtml import DTMLRegexRewriter
from gocept.template_rewrite.lib2to3 import rewrite_using_2to3
from gocept.template_rewrite.pagetemplates import PTParseError
from gocept.template_rewrite.pagetemplates import PTParserRewriter
import argparse
import logging
import os
import os.path
import pathl... | 0 | 0 | 0 | 2,679 | 0 | 0 | 0 | 150 | 155 |
aa6e809a57dfb74a5cc56be92f56d5c95ac81e0c | 22,400 | py | Python | stingray/events.py | nimeshvashistha/stingray | 10530b4dbcde6c0ef8228c0e634aa202b186cf22 | [
"MIT"
] | null | null | null | stingray/events.py | nimeshvashistha/stingray | 10530b4dbcde6c0ef8228c0e634aa202b186cf22 | [
"MIT"
] | null | null | null | stingray/events.py | nimeshvashistha/stingray | 10530b4dbcde6c0ef8228c0e634aa202b186cf22 | [
"MIT"
] | null | null | null | """
Definition of :class:`EventList`.
:class:`EventList` is used to handle photon arrival times.
"""
__all__ = ['EventList']
| 33.333333 | 114 | 0.557902 | """
Definition of :class:`EventList`.
:class:`EventList` is used to handle photon arrival times.
"""
import copy
import pickle
import warnings
import numpy as np
import numpy.random as ra
from astropy.table import Table
from .filters import get_deadtime_mask
from .gti import append_gtis, check_separate, cross_gtis
... | 0 | 3,668 | 0 | 18,227 | 0 | 0 | 0 | 109 | 268 |
4e06ec75f27c21b311de337c41d0325864cd8128 | 4,919 | py | Python | src/pythonScripts/modules/DataChecks.py | colebrookson/research-access | cd36a516d8a08fe98e726ea8d7fc7dfa5828b28f | [
"CC-BY-4.0"
] | null | null | null | src/pythonScripts/modules/DataChecks.py | colebrookson/research-access | cd36a516d8a08fe98e726ea8d7fc7dfa5828b28f | [
"CC-BY-4.0"
] | 3 | 2021-08-10T13:44:16.000Z | 2021-08-14T17:46:54.000Z | src/pythonScripts/modules/DataChecks.py | colebrookson/research-access | cd36a516d8a08fe98e726ea8d7fc7dfa5828b28f | [
"CC-BY-4.0"
] | null | null | null | import numpy as np
import pandas as pd
def validate_cISSN(issn:str) -> bool:
"""
Validates the last character (c) of the ISSN number, based on the first 7 digits
returns: boolean: True if c is valid False otherwise
"""
assert type(issn) == str, "issn must be a string"
issn_num = is... | 30.937107 | 118 | 0.60988 | import numpy as np
import pandas as pd
class DataChecksException(Exception):
def __init__(self, msg, sheetID, ref, detail):
self.msg = msg
self.sheetID = sheetID
self.ref = ref
self.detail = detail
def getSheetID(self):
return self.sheetID
def getTyp... | 0 | 0 | 0 | 470 | 0 | 374 | 0 | 0 | 125 |
54ec696345f81105b1ebefad5e46a229d6bcb23f | 7,254 | py | Python | rdflib_sqlalchemy/tables.py | gjhiggins/rdflib-sqlalchemy | d4c057934cd2675083d3df943103bdffb20341d4 | [
"BSD-3-Clause"
] | 112 | 2015-02-21T15:56:34.000Z | 2022-02-22T12:10:26.000Z | rdflib_sqlalchemy/tables.py | gjhiggins/rdflib-sqlalchemy | d4c057934cd2675083d3df943103bdffb20341d4 | [
"BSD-3-Clause"
] | 64 | 2015-01-22T12:40:11.000Z | 2021-12-27T19:15:14.000Z | rdflib_sqlalchemy/tables.py | gjhiggins/rdflib-sqlalchemy | d4c057934cd2675083d3df943103bdffb20341d4 | [
"BSD-3-Clause"
] | 28 | 2015-06-22T08:06:58.000Z | 2022-02-16T11:17:49.000Z |
MYSQL_MAX_INDEX_LENGTH = 200
TABLE_NAME_TEMPLATES = [
"{interned_id}_asserted_statements",
"{interned_id}_literal_statements",
"{interned_id}_namespace_binds",
"{interned_id}_quoted_statements",
"{interned_id}_type_statements",
]
| 33.897196 | 90 | 0.600772 | from sqlalchemy import Column, Table, Index, types
from rdflib_sqlalchemy.types import TermType
MYSQL_MAX_INDEX_LENGTH = 200
TABLE_NAME_TEMPLATES = [
"{interned_id}_asserted_statements",
"{interned_id}_literal_statements",
"{interned_id}_namespace_binds",
"{interned_id}_quoted_statements",
"{int... | 0 | 0 | 0 | 0 | 0 | 6,760 | 0 | 52 | 183 |
67527770fab38a278e3a6a862f1b7858af4000da | 1,633 | py | Python | ubersmith_client/_http_utils.py | internap/python-ubersmithclient | b406eddfdc11315e8f685285ca8ba6523bc0fba3 | [
"Apache-2.0"
] | 1 | 2016-01-29T18:56:23.000Z | 2016-01-29T18:56:23.000Z | ubersmith_client/_http_utils.py | internap/python-ubersmithclient | b406eddfdc11315e8f685285ca8ba6523bc0fba3 | [
"Apache-2.0"
] | 16 | 2016-02-01T18:26:25.000Z | 2020-04-29T17:09:24.000Z | ubersmith_client/_http_utils.py | internap/python-ubersmithclient | b406eddfdc11315e8f685285ca8ba6523bc0fba3 | [
"Apache-2.0"
] | 8 | 2016-03-09T19:38:25.000Z | 2017-02-15T21:26:56.000Z | # Copyright 2017 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 34.020833 | 77 | 0.642376 | # Copyright 2017 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 0 | 0 | 0 | 0 | 0 | 988 | 0 | 0 | 69 |
9d9624410acf29a1d17afa7bb5a3ed7e67173e13 | 1,276 | py | Python | open511_server/utils/optimization.py | Open511/open511-server | f78301bff6aae582baae71022bc84e97c44e7650 | [
"MIT"
] | 1 | 2021-01-11T03:22:39.000Z | 2021-01-11T03:22:39.000Z | open511_server/utils/optimization.py | Open511/open511-server | f78301bff6aae582baae71022bc84e97c44e7650 | [
"MIT"
] | 2 | 2015-11-27T20:16:43.000Z | 2015-11-27T20:27:46.000Z | open511_server/utils/optimization.py | Open511/open511-server | f78301bff6aae582baae71022bc84e97c44e7650 | [
"MIT"
] | null | null | null | import time
_cached_objects = dict()
CACHE_EXPIRY = 60 * 10
def get_cached_object(model, id):
"""
A very, very simple in-memory cache for ORM objects.
No invalidation other than restarting this app or waiting CACHE_EXPIRY seconds.
"""
lookup = (model, id)
cached = _cached_objects.get(lookup)
... | 27.73913 | 88 | 0.610502 | from functools import partial
import time
_cached_objects = dict()
CACHE_EXPIRY = 60 * 10
def get_cached_object(model, id):
"""
A very, very simple in-memory cache for ORM objects.
No invalidation other than restarting this app or waiting CACHE_EXPIRY seconds.
"""
lookup = (model, id)
cached =... | 0 | 0 | 0 | 721 | 0 | 0 | 0 | 8 | 45 |
8a804905c39b600ecce37c7c31b15a42d43ab1af | 25,309 | py | Python | repo2docker/app.py | bmcgtech/repo2docker | a2a812d5670e0677dc33cf22f305368b6279ffa8 | [
"BSD-3-Clause"
] | 1 | 2021-03-02T12:18:17.000Z | 2021-03-02T12:18:17.000Z | repo2docker/app.py | bmcgtech/repo2docker | a2a812d5670e0677dc33cf22f305368b6279ffa8 | [
"BSD-3-Clause"
] | null | null | null | repo2docker/app.py | bmcgtech/repo2docker | a2a812d5670e0677dc33cf22f305368b6279ffa8 | [
"BSD-3-Clause"
] | 1 | 2019-10-15T14:59:07.000Z | 2019-10-15T14:59:07.000Z | """repo2docker: convert git repositories into jupyter-suitable docker images
Images produced by repo2docker can be used with Jupyter notebooks standalone
or with BinderHub.
Usage:
python -m repo2docker https://github.com/you/your-repo
"""
| 32.489089 | 107 | 0.554151 | """repo2docker: convert git repositories into jupyter-suitable docker images
Images produced by repo2docker can be used with Jupyter notebooks standalone
or with BinderHub.
Usage:
python -m repo2docker https://github.com/you/your-repo
"""
import json
import sys
import logging
import os
import getpass
import shut... | 0 | 385 | 0 | 23,913 | 0 | 0 | 0 | 298 | 466 |
936e1df9e466c953b4b6a6e778cd6224ad63282a | 4,790 | py | Python | parser/utils/alg.py | Jacob-Zhou/spw-parser | 5f746a54d9a1da0591fc34f024eac2639bc3f407 | [
"MIT"
] | null | null | null | parser/utils/alg.py | Jacob-Zhou/spw-parser | 5f746a54d9a1da0591fc34f024eac2639bc3f407 | [
"MIT"
] | null | null | null | parser/utils/alg.py | Jacob-Zhou/spw-parser | 5f746a54d9a1da0591fc34f024eac2639bc3f407 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import torch.autograd as autograd
| 35.481481 | 79 | 0.597912 | # -*- coding: utf-8 -*-
from parser.utils.fn import stripe
import torch
import torch.autograd as autograd
def kmeans(x, k):
x = torch.tensor(x, dtype=torch.float)
# count the frequency of each datapoint
d, indices, f = x.unique(return_inverse=True, return_counts=True)
# calculate the sum of the valu... | 0 | 785 | 0 | 0 | 0 | 3,801 | 0 | 4 | 138 |
d2762a23bb2cdc8d49d2ea06f39df76edbe2c4d3 | 3,803 | py | Python | atari/eval_reward.py | yilin-wang/tril | fb3f1090d2056c063602c65d8b7d952ea5037872 | [
"MIT"
] | 1 | 2021-10-17T07:00:05.000Z | 2021-10-17T07:00:05.000Z | atari/eval_reward.py | yilin-wang/tril | fb3f1090d2056c063602c65d8b7d952ea5037872 | [
"MIT"
] | null | null | null | atari/eval_reward.py | yilin-wang/tril | fb3f1090d2056c063602c65d8b7d952ea5037872 | [
"MIT"
] | null | null | null | import cv2
cv2.ocl.setUseOpenCL(False)
import sys
import matplotlib
import pickle
import torch
import torch.nn as nn
from baselines.common.trex_utils import preprocess
sys.path[0] += '/baselines'
# from baselines.common.cmd_util import make_vec_env
try:
matplotlib.use('GTK3Agg')
except Exception:
pass
if __na... | 31.429752 | 111 | 0.648961 | import argparse
import gym
from gym import spaces
import cv2
cv2.ocl.setUseOpenCL(False)
import pygame
import sys
import time
import matplotlib
import numpy as np
import pickle
import random
import torch
import torch.nn as nn
import torch.nn.functional as F
from run_test import *
from baselines.common.trex_utils impor... | 0 | 0 | 0 | 1,259 | 0 | 427 | 0 | 91 | 360 |
247c64042c7a5d5b5cae2efb1bf244c7d158f68c | 315 | py | Python | save_tiff.py | xpspectre/cell-image | 6ceb7bc362d36408fe3c634f9c7155238d92c337 | [
"MIT"
] | 1 | 2017-06-07T14:28:15.000Z | 2017-06-07T14:28:15.000Z | save_tiff.py | xpspectre/cell-image | 6ceb7bc362d36408fe3c634f9c7155238d92c337 | [
"MIT"
] | null | null | null | save_tiff.py | xpspectre/cell-image | 6ceb7bc362d36408fe3c634f9c7155238d92c337 | [
"MIT"
] | null | null | null | from PIL import Image, TiffImagePlugin
TiffImagePlugin.WRITE_LIBTIFF = True
def save_tiff(output, img):
"""Save numpy array img as compressed TIFF as output file
Args:
output:
img:
Returns:
"""
pil_img = Image.fromarray(img)
pil_img.save(output, compression='packbits') | 18.529412 | 61 | 0.669841 | from PIL import Image, TiffImagePlugin
TiffImagePlugin.WRITE_LIBTIFF = True
def save_tiff(output, img):
"""Save numpy array img as compressed TIFF as output file
Args:
output:
img:
Returns:
"""
pil_img = Image.fromarray(img)
pil_img.save(output, compression='packbits') | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
22f9a5041480ef7fa689f8e7296ecbdfa9a3cc6a | 1,360 | py | Python | Assignment02/Part01/testfile2.py | saurabhkakade21/AIS_spring2021 | 784d20670794c405505b09c1feea36e0a504ae5d | [
"MIT"
] | null | null | null | Assignment02/Part01/testfile2.py | saurabhkakade21/AIS_spring2021 | 784d20670794c405505b09c1feea36e0a504ae5d | [
"MIT"
] | null | null | null | Assignment02/Part01/testfile2.py | saurabhkakade21/AIS_spring2021 | 784d20670794c405505b09c1feea36e0a504ae5d | [
"MIT"
] | null | null | null |
from program2_funs import Searcher
# , hSLD, SNode
# (b) Show your program loading in the 30-node sample file.
s = Searcher("30node.txt")
# (c) Show you program setting start node=U and end node=T.
s.setStartGoal('U','T')
# myViz should be a DRDViz instance -> save map to file on disk.
s.myViz.sav... | 26.666667 | 83 | 0.627941 |
from program2_funs import Searcher
# , hSLD, SNode
# (b) Show your program loading in the 30-node sample file.
s = Searcher("30node.txt")
# (c) Show you program setting start node=U and end node=T.
s.setStartGoal('U','T')
# myViz should be a DRDViz instance -> save map to file on disk.
s.myViz.sav... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bff1e76ad164593084fbefad95a83b162df75c01 | 146 | py | Python | headers/__init__.py | kirsn/py-message-headers | 3b79ce640823940552ed146d2171d4cd42c0796f | [
"MIT"
] | null | null | null | headers/__init__.py | kirsn/py-message-headers | 3b79ce640823940552ed146d2171d4cd42c0796f | [
"MIT"
] | null | null | null | headers/__init__.py | kirsn/py-message-headers | 3b79ce640823940552ed146d2171d4cd42c0796f | [
"MIT"
] | null | null | null | # Generated on 2019-02-03T13:03:06.509000
VERSION = "2019.02.03"
| 16.222222 | 41 | 0.726027 | # Generated on 2019-02-03T13:03:06.509000
from mail import *
from http import *
from mime import *
from netnews import *
VERSION = "2019.02.03"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -9 | 89 |
1a1d3d9e95c93601968362551c5458c497c9c24f | 111 | py | Python | images/backer/src/lib/django_webpack/__init__.py | elston/djangit | 1d9ec2e287447fa8926a6fc440469771120df6a1 | [
"MIT"
] | null | null | null | images/backer/src/lib/django_webpack/__init__.py | elston/djangit | 1d9ec2e287447fa8926a6fc440469771120df6a1 | [
"MIT"
] | null | null | null | images/backer/src/lib/django_webpack/__init__.py | elston/djangit | 1d9ec2e287447fa8926a6fc440469771120df6a1 | [
"MIT"
] | null | null | null | __author__ = 'Den Elston'
__version__ = '0.0.1'
default_app_config = 'django_webpack.apps.DjangoWebpackConfig' | 27.75 | 62 | 0.792793 | __author__ = 'Den Elston'
__version__ = '0.0.1'
default_app_config = 'django_webpack.apps.DjangoWebpackConfig' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d1c5ce506f21389536550ff93ab7ab36b9a910d5 | 355 | py | Python | Python/circle pattern.py | Chanchal2125/Hacktoberfest2021_PatternMaking | c962f1e93f45a97351fbffc49ed1fc526741d772 | [
"MIT"
] | 1 | 2021-10-09T11:48:21.000Z | 2021-10-09T11:48:21.000Z | Python/circle pattern.py | Chanchal2125/Hacktoberfest2021_PatternMaking | c962f1e93f45a97351fbffc49ed1fc526741d772 | [
"MIT"
] | null | null | null | Python/circle pattern.py | Chanchal2125/Hacktoberfest2021_PatternMaking | c962f1e93f45a97351fbffc49ed1fc526741d772 | [
"MIT"
] | null | null | null | radius = 10
printPattern(radius) | 25.357143 | 49 | 0.55493 | import math
def printPattern(radius):
for i in range((2 * radius)+1):
for j in range((2 * radius)+1):
dist = math.sqrt((i - radius) * (i - radius) +
(j - radius) * (j - radius))
if (dist > radius - 1 and dist < radius + 1):
print("*",end="")
else:
print(" ",end="")
print()
# Driver co... | 0 | 0 | 0 | 0 | 0 | 289 | 0 | -10 | 44 |
131cff53f9f192f8189f494bd1d77586bae6e6dc | 470 | py | Python | coding/learn_gevent/gevent_29_pool_structure.py | yatao91/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | 3 | 2021-05-25T16:58:52.000Z | 2022-02-05T09:37:17.000Z | coding/learn_gevent/gevent_29_pool_structure.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | coding/learn_gevent/gevent_29_pool_structure.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 20.434783 | 51 | 0.565957 | # -*- coding: utf-8 -*-
from gevent.pool import Pool
class SocketPool(object):
def __init__(self):
self.pool = Pool(1000)
self.pool.start()
def listen(self, socket):
while True:
socket.recv()
def add_handler(self, socket):
if self.pool.full():
rai... | 0 | 0 | 0 | 393 | 0 | 0 | 0 | 7 | 45 |