hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 3 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794502a18bee31b215c0a2a7da77542aba31669b | 880 | py | Python | linda/linda_app/admin.py | cbotsikas/LindaWorkbench | b2bfa091fb4ec80ac35b3f68edf46780c1e9ffea | [
"MIT"
] | null | null | null | linda/linda_app/admin.py | cbotsikas/LindaWorkbench | b2bfa091fb4ec80ac35b3f68edf46780c1e9ffea | [
"MIT"
] | null | null | null | linda/linda_app/admin.py | cbotsikas/LindaWorkbench | b2bfa091fb4ec80ac35b3f68edf46780c1e9ffea | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.admin import AdminSite
from django.utils.translation import ugettext_lazy
from models import *
class VocabularyAdmin(admin.ModelAdmin):
pass
admin.site.register(Vocabulary, VocabularyAdmin)
class VocabularyRankingAdmin(admin.ModelAdmin):
pass
admin.s... | 20 | 70 | 0.828409 |
794502cb76a63c4751694070a8feb659124ce651 | 6,627 | py | Python | build/lib/airlab/registration/registration.py | ltorres6/airlab | 83a2debebc4c880b51c545c2e95bc9c52e73f4ae | [
"Apache-2.0"
] | null | null | null | build/lib/airlab/registration/registration.py | ltorres6/airlab | 83a2debebc4c880b51c545c2e95bc9c52e73f4ae | [
"Apache-2.0"
] | null | null | null | build/lib/airlab/registration/registration.py | ltorres6/airlab | 83a2debebc4c880b51c545c2e95bc9c52e73f4ae | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 University of Basel, Center for medical Image Analysis and Navigation
#
# 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
#
# U... | 31.259434 | 100 | 0.6303 |
79450327f865cdb09532663fa652c0650923d4f0 | 834 | py | Python | demos/p0-io.py | utep-cs-systems-courses/1-shell-HectorRichart | 2c9e039614acb7ed7704999ec5f9b2d8d4a9d34e | [
"BSD-3-Clause"
] | null | null | null | demos/p0-io.py | utep-cs-systems-courses/1-shell-HectorRichart | 2c9e039614acb7ed7704999ec5f9b2d8d4a9d34e | [
"BSD-3-Clause"
] | null | null | null | demos/p0-io.py | utep-cs-systems-courses/1-shell-HectorRichart | 2c9e039614acb7ed7704999ec5f9b2d8d4a9d34e | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python3
import os, sys, re
fdOut = os.open("p0-output.txt", os.O_CREAT | os.O_WRONLY)
fdIn = os.open("p0-io.py", os.O_RDONLY)
print(f"fdIn={fdIn}, fdOut={fdOut}");
# note that
# fd #0 is "standard input" (by default, attached to kbd) keyboard
# fd #1 is "standard ouput" (by default, attached to d... | 30.888889 | 79 | 0.630695 |
79450456b70e2d9a93b90196616ec9de929ea057 | 3,493 | py | Python | tests/posting/test_log2k8s.py | pawelkopka/kopf | 51a3a70e09a17cf3baec2946b64b125a90595cf4 | [
"MIT"
] | null | null | null | tests/posting/test_log2k8s.py | pawelkopka/kopf | 51a3a70e09a17cf3baec2946b64b125a90595cf4 | [
"MIT"
] | null | null | null | tests/posting/test_log2k8s.py | pawelkopka/kopf | 51a3a70e09a17cf3baec2946b64b125a90595cf4 | [
"MIT"
] | null | null | null | import logging
import pytest
from kopf.config import EventsConfig
from kopf.engines.logging import ObjectLogger, LocalObjectLogger
OBJ1 = {'apiVersion': 'group1/version1', 'kind': 'Kind1',
'metadata': {'uid': 'uid1', 'name': 'name1', 'namespace': 'ns1'}}
REF1 = {'apiVersion': 'group1/version1', 'kind': 'Kind... | 31.468468 | 108 | 0.659319 |
794506b6c929125cc55d8f4a1dc084ffae4eb6c2 | 5,120 | py | Python | dxm/lib/DxFileFormat/DxFileFormat.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 5 | 2018-08-23T15:47:05.000Z | 2022-01-19T23:38:18.000Z | dxm/lib/DxFileFormat/DxFileFormat.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 59 | 2018-10-15T10:37:00.000Z | 2022-03-22T20:49:25.000Z | dxm/lib/DxFileFormat/DxFileFormat.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 12 | 2019-03-08T19:59:13.000Z | 2021-12-16T03:28:04.000Z | #
# 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
# distributed under ... | 31.604938 | 117 | 0.615234 |
794507366ee63c1df48639225d9f5d2da792d956 | 79,402 | py | Python | ProcessYcsbLog.py | TSDBBench/Overlord | d72b6927ceaf6631f5b07f411e34bec9904158c4 | [
"Apache-2.0"
] | 6 | 2017-07-05T16:59:16.000Z | 2020-07-01T10:17:09.000Z | ProcessYcsbLog.py | TSDBBench/Overlord | d72b6927ceaf6631f5b07f411e34bec9904158c4 | [
"Apache-2.0"
] | 8 | 2017-11-03T13:36:53.000Z | 2021-09-05T11:05:17.000Z | ProcessYcsbLog.py | TSDBBench/Overlord | d72b6927ceaf6631f5b07f411e34bec9904158c4 | [
"Apache-2.0"
] | 6 | 2016-11-10T12:56:41.000Z | 2018-06-19T21:53:58.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import copy
import gzip
from dateutil import tz
import jinja2
import logging
import argparse
import magic
import os
import re
import datetime
import locale
import cPickle
import bokeh.charts
from itertools import islice
import pdfkit
import pytz
import Util
import webcolor... | 50.703704 | 267 | 0.589935 |
79450780a27f3f1d891b198a1775fc502c90eac5 | 1,162 | py | Python | dancingtogether/runner.py | rgardner/dancingtogether | 48b52cadb2059df56a6b7c95bae947cd849b758a | [
"MIT"
] | null | null | null | dancingtogether/runner.py | rgardner/dancingtogether | 48b52cadb2059df56a6b7c95bae947cd849b758a | [
"MIT"
] | 19 | 2019-03-29T04:01:43.000Z | 2020-07-10T18:55:23.000Z | dancingtogether/runner.py | rgardner/dancingtogether | 48b52cadb2059df56a6b7c95bae947cd849b758a | [
"MIT"
] | null | null | null | from django.test.runner import DiscoverRunner
import pytest
class PytestTestRunner(DiscoverRunner):
"""Runs pytest to discover and run tests."""
def __init__(self, *args, junit_xml=None, **kwargs):
self.junit_xml = junit_xml
super().__init__(*args, **kwargs)
@classmethod
def add_argum... | 30.578947 | 71 | 0.589501 |
794507aab2b2dddef1934a7ea375b726668f1eaf | 776 | py | Python | data/17498 data/run_17498.py | outs1der/beans | 2a2b9b8deeb877b54d78301b5fe880298d1b6cdb | [
"MIT"
] | 2 | 2019-11-22T06:40:47.000Z | 2021-05-16T04:18:18.000Z | data/17498 data/run_17498.py | outs1der/beans | 2a2b9b8deeb877b54d78301b5fe880298d1b6cdb | [
"MIT"
] | 6 | 2020-11-20T01:08:03.000Z | 2022-01-05T05:13:22.000Z | data/17498 data/run_17498.py | outs1der/beans | 2a2b9b8deeb877b54d78301b5fe880298d1b6cdb | [
"MIT"
] | 4 | 2019-12-02T23:39:18.000Z | 2021-06-15T06:36:31.000Z |
from beans import Beans
B = Beans(ndim=10, nwalkers=200, nsteps=200, run_id="17498_4bursts",
obsname='/home/tom//Documents/Thermonuclear bursts project/beans install/beans/data/17498_obs_new.txt',
burstname='/home/tom//Documents/Thermonuclear bursts project/beans install/beans/data/17498_bursts_new.txt',
gtiname=... | 45.647059 | 109 | 0.740979 |
794507fd1e0c3a09263509fe5195a0d30ed77092 | 3,572 | py | Python | finrl/trade/backtest.py | Darivian/FinRL | e2853d9c2a0a126a9abfac421c59a224c0755607 | [
"MIT"
] | null | null | null | finrl/trade/backtest.py | Darivian/FinRL | e2853d9c2a0a126a9abfac421c59a224c0755607 | [
"MIT"
] | null | null | null | finrl/trade/backtest.py | Darivian/FinRL | e2853d9c2a0a126a9abfac421c59a224c0755607 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from pyfolio import timeseries
import pyfolio
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from copy import deepcopy
from finrl.marketdata.yahoodownloader import YahooDownloader
from finrl.config import config
def get_daily_return(df, value_co... | 37.208333 | 145 | 0.68645 |
794508a3297f6c4482565faeb2c92772cf2b7637 | 64,382 | py | Python | test/sql/test_resultset.py | AllanDaemon/sqlalchemy | e57d63ab96bccac77c549771ab60fecd6d1bb770 | [
"MIT"
] | 2 | 2020-02-19T17:50:50.000Z | 2021-02-10T02:52:41.000Z | test/sql/test_resultset.py | AllanDaemon/sqlalchemy | e57d63ab96bccac77c549771ab60fecd6d1bb770 | [
"MIT"
] | null | null | null | test/sql/test_resultset.py | AllanDaemon/sqlalchemy | e57d63ab96bccac77c549771ab60fecd6d1bb770 | [
"MIT"
] | null | null | null | from contextlib import contextmanager
import csv
import operator
from sqlalchemy import CHAR
from sqlalchemy import column
from sqlalchemy import exc
from sqlalchemy import exc as sa_exc
from sqlalchemy import ForeignKey
from sqlalchemy import func
from sqlalchemy import INT
from sqlalchemy import Integer
from sqlalch... | 32.36903 | 79 | 0.548476 |
7945090ba89589545bc08e770a82098cba240aa1 | 40,506 | py | Python | tensorflow/python/training/supervisor.py | 285219011/hello-world | dfb71ea206eb9f61e5d97c9727caa1a6449e39cb | [
"Apache-2.0"
] | 6 | 2017-04-25T01:30:41.000Z | 2019-12-11T15:08:46.000Z | tensorflow/python/training/supervisor.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | null | null | null | tensorflow/python/training/supervisor.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | 4 | 2017-04-14T07:31:18.000Z | 2021-08-30T11:06:24.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.069549 | 80 | 0.697033 |
7945099aaa5bbaf3488a4bdf9426b834cbcdb923 | 645 | py | Python | datasets/text_to_bytes.py | hcngdaniel/VAEFaceRecognition | f13c95675998bb59c4efa1c197ffcaeadc4fd1ed | [
"MIT"
] | null | null | null | datasets/text_to_bytes.py | hcngdaniel/VAEFaceRecognition | f13c95675998bb59c4efa1c197ffcaeadc4fd1ed | [
"MIT"
] | null | null | null | datasets/text_to_bytes.py | hcngdaniel/VAEFaceRecognition | f13c95675998bb59c4efa1c197ffcaeadc4fd1ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
with open('landmarks_in_bytes.txt', 'w', encoding='latin1') as outfile:
with open('landmarks.txt', 'r') as f:
print('counting...')
lines = list(iter(f))
lines_len = len(lines)
print(lines_len)
print('start')
all_num = []
... | 33.947368 | 71 | 0.562791 |
794509c3d3f96ca49d617521f4956449d4665ff3 | 1,688 | py | Python | parser_py/__main__.py | MridulS/binder-launches | 8047f9e4a6c1a60d8ef75fbab2d5d135a3158613 | [
"MIT"
] | 1 | 2021-04-08T14:39:47.000Z | 2021-04-08T14:39:47.000Z | parser_py/__main__.py | MridulS/binder-launches | 8047f9e4a6c1a60d8ef75fbab2d5d135a3158613 | [
"MIT"
] | 5 | 2021-04-05T10:37:16.000Z | 2021-04-16T13:28:48.000Z | parser_py/__main__.py | MridulS/binder-launches | 8047f9e4a6c1a60d8ef75fbab2d5d135a3158613 | [
"MIT"
] | 1 | 2021-04-08T14:39:51.000Z | 2021-04-08T14:39:51.000Z | from datetime import datetime
from datetime import timedelta
from time import sleep
from time import time
from .parser import parse
from .settings import load_settings
from .utils import upgrade_db
if __name__ == "__main__":
settings = load_settings()
logger = settings["logger"]
if settings["db_upgrade"]... | 33.76 | 76 | 0.53436 |
79450b42e24fd240e8e5109286bd56facefc99f2 | 616 | py | Python | sol/iniciante/1018 - Cedulas.py | thiagojobson/PyURI | 93a16c9a4cf4fc22e9f3f545a452fe26e7e761e3 | [
"Unlicense"
] | null | null | null | sol/iniciante/1018 - Cedulas.py | thiagojobson/PyURI | 93a16c9a4cf4fc22e9f3f545a452fe26e7e761e3 | [
"Unlicense"
] | null | null | null | sol/iniciante/1018 - Cedulas.py | thiagojobson/PyURI | 93a16c9a4cf4fc22e9f3f545a452fe26e7e761e3 | [
"Unlicense"
] | null | null | null | # 1018 - Cédulas
# https://www.urionlinejudge.com.br/judge/pt/problems/view/1018
# count_banknotes(Tuple[int, ...], int) -> Iterator[Tuple(int, int)]
def count_banknotes(banknotes, value):
counter = {}
for bkn in banknotes:
counter[bkn] = value // bkn
value %= bkn
return sorted(counter.ite... | 24.64 | 68 | 0.61526 |
79450b5b3cff7df68ac26a4f5a90fc8c01b4dc35 | 18,859 | py | Python | httpx_caching/_policy.py | johtso/httpx-caching | df7cb162c8986237102e62475338f4bef659468e | [
"Apache-2.0"
] | 35 | 2020-09-26T16:49:49.000Z | 2022-03-20T13:27:54.000Z | httpx_caching/_policy.py | johtso/httpx-caching | df7cb162c8986237102e62475338f4bef659468e | [
"Apache-2.0"
] | 4 | 2021-03-24T17:32:33.000Z | 2022-03-28T18:32:44.000Z | httpx_caching/_policy.py | johtso/httpx-caching | df7cb162c8986237102e62475338f4bef659468e | [
"Apache-2.0"
] | 4 | 2020-09-26T20:07:24.000Z | 2021-10-30T19:15:38.000Z | import calendar
import logging
import time
import typing
from copy import copy
from dataclasses import dataclass
from email.utils import parsedate_tz
from enum import Enum
from typing import Awaitable, Callable, Generator, Iterable, Optional, Tuple, Union
from httpx import ByteStream, Headers, Request, codes
from ._h... | 33.028021 | 103 | 0.659261 |
79450b6997be06b3d2f6e74e527b98b16d885883 | 7,700 | py | Python | hbctool/util.py | utpk/hbctool | f55ec0c39f31af862d556c9952a2781bbab0dc63 | [
"MIT"
] | 108 | 2021-01-11T11:32:16.000Z | 2022-03-21T17:25:10.000Z | hbctool/util.py | bbhunter/hbctool | cd229290e98974bb2d52ca9357f17755c7551c75 | [
"MIT"
] | 11 | 2021-01-12T04:41:01.000Z | 2022-03-11T15:48:46.000Z | hbctool/util.py | bbhunter/hbctool | cd229290e98974bb2d52ca9357f17755c7551c75 | [
"MIT"
] | 22 | 2021-01-11T12:06:30.000Z | 2022-03-17T01:37:41.000Z |
from struct import pack, unpack
# File Object
class BitWriter(object):
def __init__(self, f):
self.accumulator = 0
self.bcount = 0
self.out = f
self.write = 0
self.remained = 0
def __enter__(self):
return self
def __exit__(self, exc_type, exc_val, exc_tb)... | 22.647059 | 129 | 0.492727 |
79450c3f70792fad3a01a8f2eb7542d10e0a1186 | 13,822 | py | Python | tensorflow/python/kernel_tests/pool_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 1 | 2018-11-15T08:44:10.000Z | 2018-11-15T08:44:10.000Z | tensorflow/python/kernel_tests/pool_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/pool_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 1 | 2020-07-20T18:02:33.000Z | 2020-07-20T18:02:33.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.288089 | 96 | 0.530459 |
79450cf78047cedeeeda15fc79dcc6f09934bbf2 | 1,737 | py | Python | Deploy-ML-Model-with-Apache/flask_demo/flask_predict_api.py | SuperBruceJia/pytorch-flask-deploy-webapp | 114f64c11b64fce378d488f90b2f9743e351e302 | [
"MIT"
] | 16 | 2020-09-10T09:40:56.000Z | 2021-12-28T12:56:25.000Z | Deploy-ML-Model-with-Apache/flask_demo/flask_predict_api.py | hexieshenghuo/pytorch-flask-deploy-webapp | a9484c22ad07f4fb7fa472c34344575e89493a77 | [
"MIT"
] | null | null | null | Deploy-ML-Model-with-Apache/flask_demo/flask_predict_api.py | hexieshenghuo/pytorch-flask-deploy-webapp | a9484c22ad07f4fb7fa472c34344575e89493a77 | [
"MIT"
] | 2 | 2020-12-29T01:44:49.000Z | 2021-01-04T09:38:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pickle
from flask import Flask, request
# pip install flasgger==0.8.1
from flasgger import Swagger
import numpy as np
import pandas as pd
with open('/var/www/flask_predict_api/rf.pkl', 'rb') as model_file:
model = pickle.load(model_file)
app = Flask(__name__... | 24.125 | 82 | 0.630973 |
79450d109d75327a1c617c572fbbba3b61d7b12b | 21,241 | py | Python | tests/test_config.py | melexis/warnings-plugin | 6f821f5c82c2cdf37988d28e651646e1452faf43 | [
"Apache-2.0"
] | 7 | 2017-04-21T12:05:23.000Z | 2019-12-12T13:37:07.000Z | tests/test_config.py | melexis/warnings-plugin | 6f821f5c82c2cdf37988d28e651646e1452faf43 | [
"Apache-2.0"
] | 100 | 2017-04-24T10:50:33.000Z | 2022-02-18T10:39:42.000Z | tests/test_config.py | melexis/warnings-plugin | 6f821f5c82c2cdf37988d28e651646e1452faf43 | [
"Apache-2.0"
] | 2 | 2017-05-23T11:50:59.000Z | 2019-11-06T09:26:33.000Z | from io import StringIO
from unittest import TestCase
from unittest.mock import patch
from mlx.junit_checker import JUnitChecker
from mlx.regex_checker import DoxyChecker, SphinxChecker, XMLRunnerChecker
from mlx.robot_checker import RobotChecker
from mlx.warnings import WarningsPlugin
class TestConfig(TestCase):
... | 40.001883 | 160 | 0.543195 |
79450e1e45ec95062483bcf47dba8bfe3c3991f1 | 2,654 | py | Python | sql/sqlParser.py | skylarkgit/sql2java | befd55180969b0ec68e242991c3260272d755cc9 | [
"MIT"
] | 2 | 2019-10-23T08:27:30.000Z | 2019-10-23T09:58:45.000Z | sql/sqlParser.py | skylarkgit/sql2java | befd55180969b0ec68e242991c3260272d755cc9 | [
"MIT"
] | null | null | null | sql/sqlParser.py | skylarkgit/sql2java | befd55180969b0ec68e242991c3260272d755cc9 | [
"MIT"
] | null | null | null | from sql.sqlTable import SQLTable
from sql.sqlField import SQLField
from sql.language import *
from sql.sqlDB import SQLDB
from sql.sqlType import SQLType
import enum
class SQL_TOKEN_TYPE (enum.Enum):
OPERATOR = 1
DATATYPE = 2
FUNCTION = 3
PROPERTY = 4
COMMAND = 4
ENTITY = 4
class SQLToken:
... | 31.595238 | 100 | 0.636021 |
79450e920cb8757227e132e96359143773c0f1ab | 11,865 | py | Python | arcgispro/src/Import_bif2.py | fmaas90/GeologicToolbox | 4474e3d038388ab25256ba6d24154b4d1c1fcb3b | [
"Apache-2.0"
] | 5 | 2019-03-01T08:59:00.000Z | 2021-06-22T01:54:23.000Z | arcgispro/src/Import_bif2.py | fmaas90/GeologicToolbox | 4474e3d038388ab25256ba6d24154b4d1c1fcb3b | [
"Apache-2.0"
] | 5 | 2019-03-13T09:56:42.000Z | 2019-09-03T08:30:38.000Z | arcgispro/src/Import_bif2.py | fmaas90/GeologicToolbox | 4474e3d038388ab25256ba6d24154b4d1c1fcb3b | [
"Apache-2.0"
] | 7 | 2019-03-12T14:55:41.000Z | 2022-01-20T09:30:05.000Z | import arcpy
import os
import sys
from arcpy import env
Input_BIF2 = arcpy.GetParameterAsText(0)
Output_BIF2 = arcpy.GetParameterAsText(1)
Input_BIF2List = Input_BIF2.split(";")
Continuous_borehole = arcpy.GetParameter(2)
if Continuous_borehole == True:
out_path, out_name = Output_BIF2.split(".gdb\... | 45.988372 | 142 | 0.548841 |
79450ecf5f8a55a057d9e40d62c05344ef44c8ea | 2,687 | py | Python | model_2d/scripts/crocoddyl_controller.py | ChristofDubs/DoubleBallBalancer | 6869220ed9f8c5234b00fc653bf05bb7e0bf6737 | [
"Apache-2.0"
] | 3 | 2018-04-08T13:32:26.000Z | 2018-06-29T16:15:50.000Z | model_2d/scripts/crocoddyl_controller.py | ChristofDubs/DoubleBallBalancer | 6869220ed9f8c5234b00fc653bf05bb7e0bf6737 | [
"Apache-2.0"
] | null | null | null | model_2d/scripts/crocoddyl_controller.py | ChristofDubs/DoubleBallBalancer | 6869220ed9f8c5234b00fc653bf05bb7e0bf6737 | [
"Apache-2.0"
] | 1 | 2020-07-18T03:47:41.000Z | 2020-07-18T03:47:41.000Z | """Controller class for controlling 2D Double Ball Balancer
"""
import numpy as np
from model_2d.dynamics_2 import DynamicModel, StateIndex
import crocoddyl
class ActionModel(crocoddyl.ActionModelAbstract):
def __init__(self, param):
crocoddyl.ActionModelAbstract.__init__(self, crocoddyl.StateVector(7),... | 35.826667 | 114 | 0.621139 |
79450f60f23adb803dcbc50a5720e0437c3a0a68 | 2,528 | py | Python | tests/run/for_in_iter.py | minrk/cython | 9422a4b11d9410574a02112c0b54da2917501c9b | [
"Apache-2.0"
] | 2 | 2021-08-20T02:33:24.000Z | 2021-11-17T10:54:00.000Z | tests/run/for_in_iter.py | felix-salfelder/cython | 5446ec2921d6247611978cd17c66e215421b20c4 | [
"Apache-2.0"
] | null | null | null | tests/run/for_in_iter.py | felix-salfelder/cython | 5446ec2921d6247611978cd17c66e215421b20c4 | [
"Apache-2.0"
] | null | null | null | # mode: run
# tag: forin
import sys
import cython
try:
from builtins import next
except ImportError:
def next(it):
return it.next()
def for_in_pyiter_pass(it):
"""
>>> it = Iterable(5)
>>> for_in_pyiter_pass(it)
>>> next(it)
Traceback (most recent call last):
StopIteration
... | 20.721311 | 55 | 0.506725 |
79450fc56a54ca195c443a859e6fcd59e7b707db | 1,552 | py | Python | LAB/05/0508_KNN.py | LegenDad/KTM_Lab | 09a1671b1dfe9b667008279ef41a959f08babbfc | [
"MIT"
] | null | null | null | LAB/05/0508_KNN.py | LegenDad/KTM_Lab | 09a1671b1dfe9b667008279ef41a959f08babbfc | [
"MIT"
] | null | null | null | LAB/05/0508_KNN.py | LegenDad/KTM_Lab | 09a1671b1dfe9b667008279ef41a959f08babbfc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 8 10:41:11 2018
@author: ktm
"""
from sklearn.datasets import load_breast_cancer
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
import matplotlib.pyplot as plt
cancer = load_breast... | 28.218182 | 71 | 0.720361 |
7945100e4ede7631d6d23e9f11a34147861ad792 | 2,742 | py | Python | Vigenere.py | Dylan-W-Ray/Pypher | cb3624f41fd4b6971f57710569fec2c2a70bf2c6 | [
"MIT"
] | null | null | null | Vigenere.py | Dylan-W-Ray/Pypher | cb3624f41fd4b6971f57710569fec2c2a70bf2c6 | [
"MIT"
] | null | null | null | Vigenere.py | Dylan-W-Ray/Pypher | cb3624f41fd4b6971f57710569fec2c2a70bf2c6 | [
"MIT"
] | null | null | null | #English alphabet to be used in
#decipher/encipher calculations.
Alpha=['a','b','c','d','e','f','g',
'h','i','j','k','l','m','n',
'o','p','q','r','s','t','u',
'v','w','x','y','z']
def v_cipher(mode, text):
if(mode == "encipher"):
plainTxt = text
cipher... | 30.131868 | 59 | 0.357768 |
794510482991f9ea890d71b69737cce96ded2892 | 511 | py | Python | function.py | yhilpisch/function | 141a9ba815315da1641fadd3c9a98f71970fc391 | [
"MIT"
] | null | null | null | function.py | yhilpisch/function | 141a9ba815315da1641fadd3c9a98f71970fc391 | [
"MIT"
] | null | null | null | function.py | yhilpisch/function | 141a9ba815315da1641fadd3c9a98f71970fc391 | [
"MIT"
] | null | null | null | # coding: utf-8
#
# Simple Function
# (c) The Python Quants
#
def f(x):
''' Simple function to compute the square of a number.
Parameters
==========
x: float
input number
Returns
=======
y: float
(positive) output number
Raises
======
ValueErr... | 17.62069 | 63 | 0.53816 |
79451056e07a172e19dcfc696b7cbe8e69c4953b | 1,345 | py | Python | app/crud/shortcuts.py | correaleyval/Telezon-S3 | 1a6de581c73f7b2391207bfd717f0dfc42de0223 | [
"MIT"
] | 12 | 2021-03-18T20:42:19.000Z | 2021-06-08T18:43:05.000Z | app/crud/shortcuts.py | luiscib3r/Telezon-S3 | 1a6de581c73f7b2391207bfd717f0dfc42de0223 | [
"MIT"
] | 1 | 2021-03-19T14:08:51.000Z | 2021-03-19T23:09:55.000Z | app/crud/shortcuts.py | luiscib3r/Telezon-S3 | 1a6de581c73f7b2391207bfd717f0dfc42de0223 | [
"MIT"
] | 1 | 2021-04-11T04:35:14.000Z | 2021-04-11T04:35:14.000Z | from typing import Optional
from fastapi import HTTPException
from motor.motor_asyncio import AsyncIOMotorClient
from pydantic.networks import EmailStr
from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY
from app.crud.bucket import crud_get_bucket_by_name
from app.crud.user import crud_get_user_by_username, cr... | 34.487179 | 98 | 0.711524 |
7945113977cb64e2165c9c2d0e1339a5fcf175f3 | 5,066 | py | Python | build/PureCloudPlatformClientV2/models/edge_service_state_request.py | cjohnson-ctl/platform-client-sdk-python | 38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100 | [
"MIT"
] | 10 | 2019-02-22T00:27:08.000Z | 2021-09-12T23:23:44.000Z | libs/PureCloudPlatformClientV2/models/edge_service_state_request.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 5 | 2018-06-07T08:32:00.000Z | 2021-07-28T17:37:26.000Z | libs/PureCloudPlatformClientV2/models/edge_service_state_request.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 6 | 2020-04-09T17:43:07.000Z | 2022-02-17T08:48:05.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | 32.267516 | 180 | 0.623569 |
7945113de3fcc5c4e00abc90e48ffd9ecb366a01 | 10,108 | py | Python | fltk/util/arguments.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | 1 | 2022-03-24T10:14:31.000Z | 2022-03-24T10:14:31.000Z | fltk/util/arguments.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | 2 | 2021-05-11T12:48:14.000Z | 2021-05-11T12:49:24.000Z | fltk/util/arguments.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | 1 | 2022-03-30T09:11:37.000Z | 2022-03-30T09:11:37.000Z | import torch.nn.functional as F
import torch
import json
# Setting the seed for Torch
import yaml
from fltk.nets import Cifar10CNN, FashionMNISTCNN, Cifar100ResNet, FashionMNISTResNet, Cifar10ResNet, Cifar100VGG
SEED = 1
torch.manual_seed(SEED)
class Arguments:
def __init__(self, logger):
self.logger ... | 34.498294 | 152 | 0.653937 |
7945139c1176316867332232a351ef318cf97467 | 1,016 | py | Python | codes/contour2.py | cRyp70s/opencv-practice | 91b563164ebcc393e52a425c82574e5936b4259d | [
"BSD-3-Clause"
] | 1 | 2021-09-18T18:02:18.000Z | 2021-09-18T18:02:18.000Z | codes/contour2.py | cRyp70s/opencv-practice | 91b563164ebcc393e52a425c82574e5936b4259d | [
"BSD-3-Clause"
] | null | null | null | codes/contour2.py | cRyp70s/opencv-practice | 91b563164ebcc393e52a425c82574e5936b4259d | [
"BSD-3-Clause"
] | null | null | null | import cv2
import numpy as np
img1 = cv2.imread('0-a.png',0)
img2 = cv2.imread('0-b.png',0)
img3 = cv2.imread('0-c.png', 0)
img4 = cv2.imread('a-0.png', 0)
ret, thresh = cv2.threshold(img1, 127, 255,0)
ret, thresh2 = cv2.threshold(img2, 50, 255,0)
ret, thresh3 = cv2.threshold(img3, 127, 255,0)
ret, thresh4 = cv2.thresh... | 29.028571 | 50 | 0.697835 |
794513a741e3a4d621c7107de5fc65808370b943 | 154 | py | Python | test/unit/_2020/test_day4.py | Justintime50/adventofcode-2020 | c0d68e7b43c9cbc71dc5c19891c63489087124a6 | [
"MIT"
] | 2 | 2020-12-05T13:25:36.000Z | 2020-12-06T21:59:05.000Z | test/unit/_2020/test_day4.py | Justintime50/adventofcode-2020 | c0d68e7b43c9cbc71dc5c19891c63489087124a6 | [
"MIT"
] | 1 | 2021-12-06T08:06:37.000Z | 2021-12-28T21:45:23.000Z | test/unit/_2020/test_day4.py | Justintime50/adventofcode-2020 | c0d68e7b43c9cbc71dc5c19891c63489087124a6 | [
"MIT"
] | 1 | 2020-12-08T22:45:44.000Z | 2020-12-08T22:45:44.000Z | from adventofcode._2020.day4.challenge import main
def test_input():
answer1, answer2 = main()
assert answer1 == 208
assert answer2 == 167
| 17.111111 | 50 | 0.694805 |
794513d1a35f6377a090d106371adcf0c03580be | 1,371 | py | Python | setup.py | trifacta/nounType | 34478f75fa43e1bfd12bed1c9d624c1a673686d5 | [
"MIT"
] | null | null | null | setup.py | trifacta/nounType | 34478f75fa43e1bfd12bed1c9d624c1a673686d5 | [
"MIT"
] | null | null | null | setup.py | trifacta/nounType | 34478f75fa43e1bfd12bed1c9d624c1a673686d5 | [
"MIT"
] | null | null | null | try:
from setuptools import setup
except ImportError:
raise ImportError("setuptools module required, please go to https://pypi.python.org/pypi/setuptools and follow the instructions for installing setuptools")
setup(
version='0.1',
url='https://github.com/trifacta/nounType',
description='Parses Nam... | 40.323529 | 159 | 0.646244 |
79451583e04ba65d9bc692c2f6bd131623636a0d | 1,046 | py | Python | workload-account/setup.py | aws-samples/aws-continuous-compliance-for-terraform | 632ba08c05ffd28ff4dc47408d81edc806317e7b | [
"MIT-0"
] | 1 | 2022-01-18T10:45:31.000Z | 2022-01-18T10:45:31.000Z | workload-account/setup.py | aws-samples/aws-continuous-compliance-for-terraform | 632ba08c05ffd28ff4dc47408d81edc806317e7b | [
"MIT-0"
] | null | null | null | workload-account/setup.py | aws-samples/aws-continuous-compliance-for-terraform | 632ba08c05ffd28ff4dc47408d81edc806317e7b | [
"MIT-0"
] | 1 | 2022-03-26T17:06:57.000Z | 2022-03-26T17:06:57.000Z | import setuptools
with open("README.md") as fp:
long_description = fp.read()
setuptools.setup(
name="tools_account",
version="0.0.1",
description="An empty CDK Python app",
long_description=long_description,
long_description_content_type="text/markdown",
author="author",
package_d... | 22.73913 | 61 | 0.608031 |
794515c19bd23a51dee9146d1aba817b124ef40e | 1,151 | py | Python | tests/debug/test_debug_utils.py | fosterrath-mila/myia | b4382bd6eb53c709136a6142ee517e0b92d7baed | [
"MIT"
] | null | null | null | tests/debug/test_debug_utils.py | fosterrath-mila/myia | b4382bd6eb53c709136a6142ee517e0b92d7baed | [
"MIT"
] | null | null | null | tests/debug/test_debug_utils.py | fosterrath-mila/myia | b4382bd6eb53c709136a6142ee517e0b92d7baed | [
"MIT"
] | null | null | null | """Test some debug utilities that may be used in tests."""
import pytest
from myia.debug.utils import GraphIndex
from myia.pipeline import scalar_parse as parse
def test_GraphIndex():
@parse
def f(x, y):
a = x * y
b = x + y
c = a - b
return c
idx = GraphIndex(f)
as... | 20.553571 | 60 | 0.531712 |
794515f685594598407dbb3d18c20dcbe1c93362 | 1,215 | py | Python | setup.py | andriyor/chopper | cdb970a9afd9ea6d7e500bc44e1b423e1381981a | [
"MIT"
] | null | null | null | setup.py | andriyor/chopper | cdb970a9afd9ea6d7e500bc44e1b423e1381981a | [
"MIT"
] | null | null | null | setup.py | andriyor/chopper | cdb970a9afd9ea6d7e500bc44e1b423e1381981a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup
from chopper import __version__
with open('README.rst', 'r') as f:
long_description = f.read()
setup(
name='chopper',
version=__version__,
description="Lib to extract html elements by preserving ancestors and cleaning CSS",
long_description=lo... | 28.255814 | 88 | 0.595885 |
794516b4cec65b3b4fb85e66919ef8600e178d61 | 789 | py | Python | settings/test.py | de1o/loonflow | 8813461c789c55890fc30916fe56d04a2048d3f5 | [
"MIT"
] | 2 | 2019-08-19T13:47:35.000Z | 2019-08-20T01:46:34.000Z | settings/test.py | LezBaishi/loonflow | 6fa49deba5cb7e5733f427d4b50e9a89a93a667b | [
"MIT"
] | null | null | null | settings/test.py | LezBaishi/loonflow | 6fa49deba5cb7e5733f427d4b50e9a89a93a667b | [
"MIT"
] | 1 | 2022-02-11T13:16:01.000Z | 2022-02-11T13:16:01.000Z | from settings.common import *
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
... | 35.863636 | 111 | 0.619772 |
794516c437297e1f2776c48e5572f4e3efba598c | 335,938 | py | Python | hydrus/client/gui/ClientGUI.py | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | null | null | null | hydrus/client/gui/ClientGUI.py | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | null | null | null | hydrus/client/gui/ClientGUI.py | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | null | null | null | import collections
import gc
import hashlib
import os
import random
import re
import ssl
import subprocess
import sys
import threading
import time
import traceback
import cv2
import PIL
import sqlite3
import qtpy
from qtpy import QtCore as QC
from qtpy import QtWidgets as QW
from qtpy import QtGui as QG
from hydrus.... | 42.443209 | 1,694 | 0.560481 |
794516c5be526ec02c38c2085c25823f9cca38a4 | 11,687 | py | Python | reference_code/GSNet-release/demo/predictor.py | lkeab/gsnet | b150d13543cda61b1b736ac6ae911d2e0ab9663f | [
"MIT"
] | 78 | 2020-08-02T12:21:31.000Z | 2022-03-31T10:43:59.000Z | reference_code/GSNet-release/demo/predictor.py | PionnerLC/gsnet | 69c418fd5c8ec9ee90b4298888f59d9ce5b37749 | [
"MIT"
] | 15 | 2020-09-08T18:47:47.000Z | 2022-03-11T14:37:44.000Z | reference_code/GSNet-release/demo/predictor.py | PionnerLC/gsnet | 69c418fd5c8ec9ee90b4298888f59d9ce5b37749 | [
"MIT"
] | 18 | 2021-02-27T17:55:45.000Z | 2022-03-31T05:16:12.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import atexit
import bisect
import multiprocessing as mp
from collections import deque
import cv2
import torch
import os
from detectron2.data import MetadataCatalog
from detectron2.engine.defaults import DefaultPredictor
from detectron2.utils.video... | 40.161512 | 141 | 0.584838 |
79451726e6774d2a9dbb666536a6f1385fe5b2fb | 4,331 | py | Python | sidebar/sidebar.py | letyndr/dash | 3ae8cfb9ea67eccc96e0f7a726a87616bb9e19b5 | [
"MIT"
] | null | null | null | sidebar/sidebar.py | letyndr/dash | 3ae8cfb9ea67eccc96e0f7a726a87616bb9e19b5 | [
"MIT"
] | null | null | null | sidebar/sidebar.py | letyndr/dash | 3ae8cfb9ea67eccc96e0f7a726a87616bb9e19b5 | [
"MIT"
] | null | null | null | """
This app creates a responsive sidebar layout with dash-bootstrap-components and
some custom css with media queries.
When the screen is small, the sidebar moved to the top of the page, and the
links get hidden in a collapse element. We use a callback to toggle the
collapse when on a small screen, and the custom CSS... | 34.102362 | 79 | 0.596629 |
7945182a18c2a2f0af00967776796529b9cd1955 | 122 | py | Python | src/TB3Util/tb3exporter.py | csvance/tb3util | 63191c4e9fddec809d3943f9ee402eae0e2d4659 | [
"MIT"
] | null | null | null | src/TB3Util/tb3exporter.py | csvance/tb3util | 63191c4e9fddec809d3943f9ee402eae0e2d4659 | [
"MIT"
] | null | null | null | src/TB3Util/tb3exporter.py | csvance/tb3util | 63191c4e9fddec809d3943f9ee402eae0e2d4659 | [
"MIT"
] | null | null | null | class TB3Exporter:
def __init__(self,export_path):
self.path = export_path
def export_bank(self,bank):
assert(False) | 24.4 | 32 | 0.770492 |
7945183e040b2fd5479453d0c7d9a7393b88eb6a | 748 | py | Python | setup.py | cnicol-gwlogic/pyemu | f1624da68f59f6ae8be54ddba9d39982cc7f3b1c | [
"BSD-3-Clause"
] | 41 | 2020-06-04T12:53:37.000Z | 2022-03-30T17:56:13.000Z | setup.py | cnicol-gwlogic/pyemu | f1624da68f59f6ae8be54ddba9d39982cc7f3b1c | [
"BSD-3-Clause"
] | 184 | 2020-05-29T14:25:23.000Z | 2022-03-29T04:01:42.000Z | setup.py | cnicol-gwlogic/pyemu | f1624da68f59f6ae8be54ddba9d39982cc7f3b1c | [
"BSD-3-Clause"
] | 40 | 2020-05-29T14:31:06.000Z | 2022-03-23T02:41:19.000Z | import sys
#from distutils.core import setup
from setuptools import setup
long_description = \
"""pyemu is a set of python modules for interfacing with PEST and PEST++.
"""
setup(name="pyemu",
description=long_description,
long_description=long_description,
author="Jeremy White, Mi... | 37.4 | 98 | 0.669786 |
79451a19bfe6f6526876428bdb5cd047da930e37 | 1,008 | py | Python | landlab/framework/decorators.py | amanaster2/landlab | ea17f8314eb12e3fc76df66c9b6ff32078caa75c | [
"MIT"
] | 257 | 2015-01-13T16:01:21.000Z | 2022-03-29T22:37:43.000Z | landlab/framework/decorators.py | amanaster2/landlab | ea17f8314eb12e3fc76df66c9b6ff32078caa75c | [
"MIT"
] | 1,222 | 2015-02-05T21:36:53.000Z | 2022-03-31T17:53:49.000Z | landlab/framework/decorators.py | amanaster2/landlab | ea17f8314eb12e3fc76df66c9b6ff32078caa75c | [
"MIT"
] | 274 | 2015-02-11T19:56:08.000Z | 2022-03-28T23:31:07.000Z | #! /usr/bin/env python
"""Decorators for TheLandlab package."""
import re
def camel_case(text, sep=None):
"""Convert to camel case.
Convert *text* to camel case. Use the *sep* keyword to specify the word
separator. The default is to split on whitespace.
>>> from landlab.framework.decorators import c... | 26.526316 | 76 | 0.614087 |
79451a9103f175f4eec6abdf1f1f27c28ec34494 | 1,119 | py | Python | vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/lib/charms/kubernetes/common.py | BinaryTreeNode/KDS | 6220475814b42733c86ac0005e8548bb9a481c75 | [
"Apache-2.0"
] | 1 | 2020-07-02T14:53:18.000Z | 2020-07-02T14:53:18.000Z | vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/lib/charms/kubernetes/common.py | BinaryTreeNode/KDS | 6220475814b42733c86ac0005e8548bb9a481c75 | [
"Apache-2.0"
] | null | null | null | vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/lib/charms/kubernetes/common.py | BinaryTreeNode/KDS | 6220475814b42733c86ac0005e8548bb9a481c75 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 31.083333 | 75 | 0.681859 |
79451afb03cd1792d1aa3f6b1d7531a81acd9ec6 | 10,880 | py | Python | meta_learning_without_memorization/pose_code/maml_bbb_2.py | jrmendeshurb/google-research | f9fa8cdd2fb77975b524371fd29df008b9dc6cf4 | [
"Apache-2.0"
] | 6 | 2019-12-16T04:23:57.000Z | 2021-12-09T14:17:14.000Z | meta_learning_without_memorization/pose_code/maml_bbb_2.py | jrmendeshurb/google-research | f9fa8cdd2fb77975b524371fd29df008b9dc6cf4 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:19:53.000Z | 2022-02-10T00:39:26.000Z | meta_learning_without_memorization/pose_code/maml_bbb_2.py | ZachT1711/google-research | 662e6837a3efa0c40b11cb4122447c4b028d2115 | [
"Apache-2.0"
] | 1 | 2019-12-19T09:44:55.000Z | 2019-12-19T09:44:55.000Z | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 37.777778 | 111 | 0.631893 |
79451c218aa2954fde5b781dbf86872556f588e0 | 41,046 | py | Python | custodian/qchem/tests/test_jobs.py | utf/custodian | 148d21e2bbcc0222122a287582d27021f20d9452 | [
"MIT"
] | 80 | 2015-04-04T18:53:40.000Z | 2022-03-16T05:58:31.000Z | custodian/qchem/tests/test_jobs.py | utf/custodian | 148d21e2bbcc0222122a287582d27021f20d9452 | [
"MIT"
] | 111 | 2015-09-08T20:49:36.000Z | 2022-03-25T05:56:01.000Z | custodian/qchem/tests/test_jobs.py | utf/custodian | 148d21e2bbcc0222122a287582d27021f20d9452 | [
"MIT"
] | 102 | 2015-01-07T10:25:46.000Z | 2022-02-08T22:52:16.000Z | # coding: utf-8
from __future__ import unicode_literals, division
import os
import shutil
from unittest import TestCase
try:
from unittest.mock import patch # type: ignore
except ImportError:
from mock import patch # type: ignore
import unittest
from custodian.qchem.jobs import QCJob
from pymatgen.io.qche... | 35.142123 | 109 | 0.555596 |
79451c4280356e64ed97bb3088c81d212d7e01d5 | 46,648 | py | Python | tensorflow/contrib/learn/python/learn/estimators/estimator.py | PedroLelis/tensorflow | 8852b0032ad49acbc59009776665c60f86c06f91 | [
"Apache-2.0"
] | 1 | 2019-02-16T10:41:53.000Z | 2019-02-16T10:41:53.000Z | tensorflow/contrib/learn/python/learn/estimators/estimator.py | PedroLelis/tensorflow | 8852b0032ad49acbc59009776665c60f86c06f91 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/estimators/estimator.py | PedroLelis/tensorflow | 8852b0032ad49acbc59009776665c60f86c06f91 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.972579 | 85 | 0.669332 |
79451dcde0249e930f89c984e48640fd17eba3af | 1,312 | py | Python | Accelerometer_and_circular_store/seri.py | PremSuresh/Udaya-bon | 27298512e33815a08807896e8743b08ad4e09355 | [
"MIT"
] | 4 | 2022-02-27T18:45:52.000Z | 2022-03-01T05:24:56.000Z | Accelerometer_and_circular_store/seri.py | PremSuresh/Udaya-bon | 27298512e33815a08807896e8743b08ad4e09355 | [
"MIT"
] | null | null | null | Accelerometer_and_circular_store/seri.py | PremSuresh/Udaya-bon | 27298512e33815a08807896e8743b08ad4e09355 | [
"MIT"
] | null | null | null | import csv
import serial
import time
import numpy
z1baudrate = 115200
z1port = 'COM3' # set the correct port before run it
b = 0.00
z1serial = serial.Serial(port=z1port, baudrate=z1baudrate)
z1serial.timeout = 2 # set read timeout
# print z1serial # debug serial.
print(z1serial.is_open) # True for opened
if z1ser... | 26.77551 | 58 | 0.448933 |
79451e94bdf75ce76de144b3df62cca58d4c9e56 | 9,050 | py | Python | models/loop_qcd_qed_sm/object_library.py | khurtado/MG5_aMC | 9cde676b0a1097058c416983017af257385fa375 | [
"NCSA"
] | 5 | 2018-10-23T14:37:18.000Z | 2021-11-22T20:59:02.000Z | models/loop_qcd_qed_sm/object_library.py | khurtado/MG5_aMC | 9cde676b0a1097058c416983017af257385fa375 | [
"NCSA"
] | 26 | 2018-10-08T15:49:32.000Z | 2020-05-15T13:33:36.000Z | models/loop_qcd_qed_sm/object_library.py | khurtado/MG5_aMC | 9cde676b0a1097058c416983017af257385fa375 | [
"NCSA"
] | 4 | 2019-02-18T11:42:18.000Z | 2021-11-11T20:46:08.000Z | ##
##
## Feynrules Header
##
##
##
##
##
import cmath
import re
class UFOError(Exception):
"""Exception raised if when inconsistencies are detected in the UFO model."""
pass
class UFOBaseClass(object):
"""The class from which all FeynRules classes are derived."""
require_args = []
def ... | 27.591463 | 198 | 0.587403 |
79451f91ab5d6a9886e191f4fa38ace98892ef39 | 1,134 | py | Python | py/py_0419_look_and_say_sequence.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0419_look_and_say_sequence.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0419_look_and_say_sequence.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | # Solution of;
# Project Euler Problem 419: Look and say sequence
# https://projecteuler.net/problem=419
#
# The look and say sequence goes 1, 11, 21, 1211, 111221, 312211, 13112221,
# 1113213211, . . . The sequence starts with 1 and all other members are
# obtained by describing the previous member in terms of cons... | 37.8 | 79 | 0.677249 |
7945210ec0b26191f18cf6abc132542dafe6fe02 | 8,359 | py | Python | python/src/iceberg/transforms.py | zzcclp/iceberg | bf582ebf68ea05be26f38d786584d474aebe048b | [
"Apache-2.0"
] | null | null | null | python/src/iceberg/transforms.py | zzcclp/iceberg | bf582ebf68ea05be26f38d786584d474aebe048b | [
"Apache-2.0"
] | 1 | 2021-11-02T00:48:17.000Z | 2021-11-02T00:48:17.000Z | python/src/iceberg/transforms.py | zzcclp/iceberg | bf582ebf68ea05be26f38d786584d474aebe048b | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.307116 | 106 | 0.67867 |
794521e6159cdcab684371529ea857f68d7bfdf6 | 281 | py | Python | Hyeongdo/greedy/boj/13558.py | sonnysorry/codingtest | 478e0168e3209eb97b6b16910027bf12ccc3ccd0 | [
"MIT"
] | 2 | 2021-09-27T19:10:36.000Z | 2021-11-09T05:40:39.000Z | Hyeongdo/greedy/boj/13558.py | sonnysorry/codingtest | 478e0168e3209eb97b6b16910027bf12ccc3ccd0 | [
"MIT"
] | 1 | 2021-11-15T14:56:54.000Z | 2021-11-15T14:56:54.000Z | Hyeongdo/greedy/boj/13558.py | sonnysorry/codingtest | 478e0168e3209eb97b6b16910027bf12ccc3ccd0 | [
"MIT"
] | null | null | null | # 등차수열의 개수
n = int(input())
num_list = list(map(int, input().split(" ")))
count = 0
for i in range(n-2):
for j in range(i+1, n-1):
for k in range(j+1, n):
if num_list[j] - num_list[i] == num_list[k] - num_list[j]:
count += 1
print(count) | 20.071429 | 70 | 0.519573 |
794522d7704ade598f6667b459f77e1e28e45093 | 1,670 | py | Python | tests/py3.py | ariebovenberg/gentools | 4a1f9f928c7f8b4752b69168858e83b4b23d6bcb | [
"MIT"
] | 8 | 2018-01-23T08:43:16.000Z | 2022-02-02T12:09:28.000Z | tests/py3.py | ariebovenberg/gentools | 4a1f9f928c7f8b4752b69168858e83b4b23d6bcb | [
"MIT"
] | 9 | 2018-01-21T11:31:40.000Z | 2018-03-02T18:02:53.000Z | tests/py3.py | ariebovenberg/gentools | 4a1f9f928c7f8b4752b69168858e83b4b23d6bcb | [
"MIT"
] | null | null | null | """only python3-compatible generators"""
def oneway_delegator(gen):
return (yield from gen)
def delegator(gen):
try:
return (yield from gen)
except GeneratorExit:
return
def try_until_positive(req):
"""an example relay"""
response = yield req
while response < 0:
try... | 20.617284 | 44 | 0.537725 |
7945230ea92770bebbc2c9d1004bd12cce649c6c | 276 | py | Python | spikeforest2_utils/autoextractors/__init__.py | michaeljohnclancy/spikeforest2 | 93bdde2c570aef9426b3d7bceb69f3605c9f005a | [
"Apache-2.0"
] | 26 | 2020-02-03T02:12:20.000Z | 2022-03-25T09:14:32.000Z | spikeforest2_utils/autoextractors/__init__.py | michaeljohnclancy/spikeforest2 | 93bdde2c570aef9426b3d7bceb69f3605c9f005a | [
"Apache-2.0"
] | 27 | 2020-01-10T12:35:55.000Z | 2021-08-01T23:13:52.000Z | spikeforest2_utils/autoextractors/__init__.py | michaeljohnclancy/spikeforest2 | 93bdde2c570aef9426b3d7bceb69f3605c9f005a | [
"Apache-2.0"
] | 11 | 2019-02-15T15:21:47.000Z | 2021-09-23T01:07:24.000Z | from .autosortingextractor import AutoSortingExtractor
from .autorecordingextractor import AutoRecordingExtractor
from .mdaextractors import DiskReadMda, readmda, writemda32, writemda64, writemda, appendmda
from .mdaextractors import MdaRecordingExtractor, MdaSortingExtractor | 69 | 92 | 0.887681 |
79452465432b66b69b7902eb37388a0ee5b82e0e | 1,288 | py | Python | examples/functions.py | cyrilbois/PFNET.py | 81d2fd911c6e6aae4c5de0d1739c6f5361799ce2 | [
"BSD-2-Clause"
] | 3 | 2018-03-21T11:54:38.000Z | 2020-12-29T16:46:14.000Z | examples/functions.py | cyrilbois/PFNET.py | 81d2fd911c6e6aae4c5de0d1739c6f5361799ce2 | [
"BSD-2-Clause"
] | 23 | 2018-03-29T00:42:06.000Z | 2021-01-05T19:15:05.000Z | examples/functions.py | cyrilbois/PFNET.py | 81d2fd911c6e6aae4c5de0d1739c6f5361799ce2 | [
"BSD-2-Clause"
] | 5 | 2018-10-01T19:05:11.000Z | 2020-05-27T06:19:11.000Z | #***************************************************#
# This file is part of PFNET. #
# #
# Copyright (c) 2015, Tomas Tinoco De Rubira. #
# #
# PFNET is released under the BSD 2-clause license... | 21.466667 | 65 | 0.562112 |
794524c9cdf895471aad644ec2867614338225d3 | 4,966 | py | Python | configs/powerline/mendeley/top_down/hrnet_w32_mendeley_256x256_udp.py | rubeea/pl_mmpose | 3b3643c66db636e8f743d0ac8f8fc14b0d5662fc | [
"Apache-2.0"
] | null | null | null | configs/powerline/mendeley/top_down/hrnet_w32_mendeley_256x256_udp.py | rubeea/pl_mmpose | 3b3643c66db636e8f743d0ac8f8fc14b0d5662fc | [
"Apache-2.0"
] | null | null | null | configs/powerline/mendeley/top_down/hrnet_w32_mendeley_256x256_udp.py | rubeea/pl_mmpose | 3b3643c66db636e8f743d0ac8f8fc14b0d5662fc | [
"Apache-2.0"
] | null | null | null | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=10, metric='mAP', key_indicator='AP')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_config = dict(grad_clip=None)
# learning... | 27.588889 | 79 | 0.585179 |
7945255b314df51ccc2a4b1d0d5d8a4c187b0407 | 1,170 | py | Python | python/getselectors.py | hunchly/hunchly-maltego | 84200e0f661a854906b4e5d7634907f8f49c9a29 | [
"Apache-2.0"
] | 5 | 2021-09-11T08:21:58.000Z | 2022-03-18T05:44:41.000Z | python/getselectors.py | hunchly/hunchly-maltego | 84200e0f661a854906b4e5d7634907f8f49c9a29 | [
"Apache-2.0"
] | 3 | 2021-09-14T16:44:47.000Z | 2021-12-20T20:30:23.000Z | python/getselectors.py | hunchly/hunchly-maltego | 84200e0f661a854906b4e5d7634907f8f49c9a29 | [
"Apache-2.0"
] | 2 | 2022-01-05T12:06:13.000Z | 2022-02-26T02:52:55.000Z | ###
# File: getselectors.py
# Authors: Divya Bhagavathiappan (divya@hunch.ly) and Justin Seitz (justin@hunch.ly)
# Last modified: 2021-02-19
###
import json
from entities import *
from MaltegoTransform import *
from config import *
from subprocess import Popen, PIPE
# initialize the transform object
transform = Malt... | 27.857143 | 136 | 0.705128 |
7945268c3ee2e1089e4630b6c31912879e590d2a | 3,169 | py | Python | flake8_coding.py | malfet/flake8-coding | 1106d953dde998ab6dd7f951efc804dea562d609 | [
"Apache-2.0"
] | null | null | null | flake8_coding.py | malfet/flake8-coding | 1106d953dde998ab6dd7f951efc804dea562d609 | [
"Apache-2.0"
] | null | null | null | flake8_coding.py | malfet/flake8-coding | 1106d953dde998ab6dd7f951efc804dea562d609 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import re
__version__ = '1.3.3'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
'--accept-enc... | 37.282353 | 110 | 0.568003 |
794526988de26132e4feb19b36a899e0663f79b1 | 635 | py | Python | src/models/loaders/__init__.py | takedarts/skipresnet | d6f1e16042f8433a287355009e17e4e5768ad319 | [
"MIT"
] | 3 | 2022-02-03T13:25:12.000Z | 2022-02-04T16:12:23.000Z | src/models/loaders/__init__.py | takedarts/skipresnet | d6f1e16042f8433a287355009e17e4e5768ad319 | [
"MIT"
] | null | null | null | src/models/loaders/__init__.py | takedarts/skipresnet | d6f1e16042f8433a287355009e17e4e5768ad319 | [
"MIT"
] | 1 | 2022-02-04T12:28:02.000Z | 2022-02-04T12:28:02.000Z | from .convnext import load_convnext_parameters # noqa
from .densenet import load_densenet_parameters # noqa
from .efficientnet import load_efficientnet_parameters # noqa
from .mobilenet import load_mobilenetv2_parameters, load_mobilenetv3_parameters # noqa
from .nfnet import load_nfnet_parameters # noqa
from .regn... | 52.916667 | 87 | 0.837795 |
794526a0ea0aaf58209bf560b230c4978fff4545 | 6,616 | py | Python | .github/actions/check-version/docker-entrypoint.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | 1 | 2021-09-25T22:33:01.000Z | 2021-09-25T22:33:01.000Z | .github/actions/check-version/docker-entrypoint.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | 16 | 2021-07-20T07:09:01.000Z | 2022-03-31T07:15:34.000Z | .github/actions/check-version/docker-entrypoint.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | 3 | 2021-12-25T09:43:09.000Z | 2022-02-16T14:20:00.000Z | #!/usr/bin/env python
import json
import click
from actions_toolkit import core
class BooleanOption(click.Option):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.type = click.Choice(["true", "false", ""], case_sensitive=False)
self.callback = self._callback
... | 30.915888 | 88 | 0.624849 |
794526e29a31c54d2161df4921e027fe1ca84512 | 1,742 | py | Python | tests/compare_versions/Cartesian3d_check_v0.1.0.py | tdegeus/GMatElastoPlastic | ace74265f46fbc83af16d237db84d147c57598fb | [
"MIT"
] | null | null | null | tests/compare_versions/Cartesian3d_check_v0.1.0.py | tdegeus/GMatElastoPlastic | ace74265f46fbc83af16d237db84d147c57598fb | [
"MIT"
] | 15 | 2019-04-11T14:17:01.000Z | 2021-08-30T07:10:09.000Z | tests/compare_versions/Cartesian3d_check_v0.1.0.py | tdegeus/GMatElastoPlastic | ace74265f46fbc83af16d237db84d147c57598fb | [
"MIT"
] | 1 | 2019-11-12T12:09:25.000Z | 2019-11-12T12:09:25.000Z | import h5py
import numpy as np
import GMatElastoPlastic.Cartesian3d as GMat
import unittest
class Test(unittest.TestCase):
def test_main(self):
with h5py.File('Cartesian3d_random.hdf5', 'r') as data:
shape = data['/shape'][...]
i = np.eye(3)
I = np.einsum('xy,ij', np... | 32.867925 | 111 | 0.502296 |
79452b31a8805674ceabdd448ab190d4282d1be7 | 20 | py | Python | backend/fsubs/config/__init__.py | joe-eklund/foreign-subs | 1ccbe4bc705abe89374738a2b6735346a83bd2c1 | [
"MIT"
] | 1 | 2020-05-01T15:19:23.000Z | 2020-05-01T15:19:23.000Z | backend/fsubs/config/__init__.py | joe-eklund/foreign-subs | 1ccbe4bc705abe89374738a2b6735346a83bd2c1 | [
"MIT"
] | 19 | 2020-05-20T02:20:00.000Z | 2022-02-13T13:55:35.000Z | backend/fsubs/config/__init__.py | joe-eklund/foreign-subs | 1ccbe4bc705abe89374738a2b6735346a83bd2c1 | [
"MIT"
] | null | null | null | """Fsubs config."""
| 10 | 19 | 0.55 |
79452b42364e2b7bea0ef34521c7afa8c58702f4 | 5,656 | py | Python | aliyun-python-sdk-waf-openapi/aliyunsdkwaf_openapi/request/v20190910/ModifyDomainRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-waf-openapi/aliyunsdkwaf_openapi/request/v20190910/ModifyDomainRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-waf-openapi/aliyunsdkwaf_openapi/request/v20190910/ModifyDomainRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 39.277778 | 79 | 0.756895 |
79452b53d1e8e8cf36e7a79627de913e9a401376 | 3,310 | py | Python | nem_bot/settings.py | TedKoba/nem_bot | 089314c8919d6750c4711b21cf8f303da44eec8b | [
"MIT"
] | null | null | null | nem_bot/settings.py | TedKoba/nem_bot | 089314c8919d6750c4711b21cf8f303da44eec8b | [
"MIT"
] | 6 | 2020-06-05T18:08:39.000Z | 2022-01-07T01:51:53.000Z | nem_bot/settings.py | TedKoba/nem_bot | 089314c8919d6750c4711b21cf8f303da44eec8b | [
"MIT"
] | null | null | null | """
Django settings for nem_bot project.
Generated by 'django-admin startproject' using Django 2.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
fr... | 25.075758 | 91 | 0.689426 |
79452c6d3313ff4182e638d9ae58acd68478d42c | 5,120 | py | Python | dvc/command/version.py | arthurcgusmao/dvc | dff27bb163419bd2f93acaa0906dfdee7359d9d6 | [
"Apache-2.0"
] | 1 | 2020-08-01T08:31:18.000Z | 2020-08-01T08:31:18.000Z | dvc/command/version.py | arthurcgusmao/dvc | dff27bb163419bd2f93acaa0906dfdee7359d9d6 | [
"Apache-2.0"
] | null | null | null | dvc/command/version.py | arthurcgusmao/dvc | dff27bb163419bd2f93acaa0906dfdee7359d9d6 | [
"Apache-2.0"
] | null | null | null | import argparse
import itertools
import logging
import os
import pathlib
import platform
import uuid
from dvc.command.base import CmdBaseNoRepo, append_doc_link
from dvc.exceptions import DvcException, NotDvcRepoError
from dvc.scm.base import SCMError
from dvc.system import System
from dvc.utils import relpath
from dv... | 30.117647 | 79 | 0.564844 |
79452caad83e3bea15b4ba8efe573ff0bd4f3651 | 17,507 | py | Python | sponsors/admin.py | hugovk/pythondotorg | 8a02c109590e6e81aa05f8213e7fde7a3d05858f | [
"Apache-2.0"
] | null | null | null | sponsors/admin.py | hugovk/pythondotorg | 8a02c109590e6e81aa05f8213e7fde7a3d05858f | [
"Apache-2.0"
] | 31 | 2021-07-01T14:13:46.000Z | 2022-03-25T14:17:01.000Z | sponsors/admin.py | hugovk/pythondotorg | 8a02c109590e6e81aa05f8213e7fde7a3d05858f | [
"Apache-2.0"
] | null | null | null | from ordered_model.admin import OrderedModelAdmin
from polymorphic.admin import PolymorphicInlineSupportMixin, StackedPolymorphicInline
from django.template import Context, Template
from django.contrib import admin
from django.contrib.humanize.templatetags.humanize import intcomma
from django.urls import path, reverse... | 31.71558 | 152 | 0.570115 |
79452cc71e03804cc55f87ac1e7ea1860585208f | 1,492 | py | Python | e3sm_diags/parameter/__init__.py | E3SM-Project/acme_diags | 0dce677a359aff9b385fb9a6184ccefddb067f47 | [
"BSD-3-Clause"
] | 2 | 2018-05-15T02:09:07.000Z | 2018-06-06T20:35:45.000Z | e3sm_diags/parameter/__init__.py | E3SM-Project/acme_diags | 0dce677a359aff9b385fb9a6184ccefddb067f47 | [
"BSD-3-Clause"
] | 62 | 2018-04-20T20:12:25.000Z | 2019-01-17T20:07:38.000Z | e3sm_diags/parameter/__init__.py | E3SM-Project/acme_diags | 0dce677a359aff9b385fb9a6184ccefddb067f47 | [
"BSD-3-Clause"
] | 1 | 2018-05-15T02:09:02.000Z | 2018-05-15T02:09:02.000Z | from .annual_cycle_zonal_mean_parameter import ACzonalmeanParameter
from .area_mean_time_series_parameter import AreaMeanTimeSeriesParameter
from .arm_diags_parameter import ARMDiagsParameter
from .core_parameter import CoreParameter
from .diurnal_cycle_parameter import DiurnalCycleParameter
from .enso_diags_parameter ... | 43.882353 | 82 | 0.837131 |
79452ce8045692c2f0c4028ec56e7288a7fe3638 | 3,128 | py | Python | sumoenv.py | ccwutw/rl-control | 39ec21871f3cb435841dfb4b0646bcb2cbbc79b7 | [
"MIT"
] | null | null | null | sumoenv.py | ccwutw/rl-control | 39ec21871f3cb435841dfb4b0646bcb2cbbc79b7 | [
"MIT"
] | null | null | null | sumoenv.py | ccwutw/rl-control | 39ec21871f3cb435841dfb4b0646bcb2cbbc79b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import numpy as np
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)
else:
sys.exit("please declare environment variable 'SUMO_HOME'")
import traci
class SumoEnv:
place_len = ... | 32.583333 | 148 | 0.560422 |
79452da2b5acc0e6a3432a246a211a80ef11e87a | 5,321 | py | Python | functions/app.py | msakasai/mm-list-channels | 0a0fa1d6fdb246abdfa008dd08d0b2e0227f38d8 | [
"MIT"
] | null | null | null | functions/app.py | msakasai/mm-list-channels | 0a0fa1d6fdb246abdfa008dd08d0b2e0227f38d8 | [
"MIT"
] | null | null | null | functions/app.py | msakasai/mm-list-channels | 0a0fa1d6fdb246abdfa008dd08d0b2e0227f38d8 | [
"MIT"
] | null | null | null | import os
import json
import requests
from jinja2 import Template
from aws_lambda_powertools import Logger
from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
from aws_lambda_powertools.utilities.data_classes import EventBridgeEvent
from aws_lambda_powertools.utilities.data_classes import APIG... | 30.757225 | 250 | 0.586544 |
79452dfbc3e7abe63d8b213ca5aa1eece6ac29ac | 1,710 | py | Python | app/src/domain/entity/slack.py | hagifoo/gae-pomodoro | 6babdfc8d4ac8483b59b4da1d2c9b13fddcc4383 | [
"MIT"
] | null | null | null | app/src/domain/entity/slack.py | hagifoo/gae-pomodoro | 6babdfc8d4ac8483b59b4da1d2c9b13fddcc4383 | [
"MIT"
] | null | null | null | app/src/domain/entity/slack.py | hagifoo/gae-pomodoro | 6babdfc8d4ac8483b59b4da1d2c9b13fddcc4383 | [
"MIT"
] | null | null | null | from infra import slack
class Slack(object):
def __init__(self, owner, firebase, name=None, domain=None,
channel_id=None, mention=''):
self._owner = owner
self._name = name
self._domain = domain
self._channel_id = channel_id
self._token = None
self.... | 30 | 81 | 0.605263 |
79452e7dd21ddf621f9148e46f1468a09de9f939 | 3,666 | py | Python | DjangoQuickTour/DjangoQuickTour/settings.py | mingyeh/DjangoQuickTour | 22d89135c0f708d92967039880349524c00ec461 | [
"MIT"
] | 1 | 2017-01-02T03:41:31.000Z | 2017-01-02T03:41:31.000Z | DjangoQuickTour/DjangoQuickTour/settings.py | mingyeh/DjangoQuickTour | 22d89135c0f708d92967039880349524c00ec461 | [
"MIT"
] | null | null | null | DjangoQuickTour/DjangoQuickTour/settings.py | mingyeh/DjangoQuickTour | 22d89135c0f708d92967039880349524c00ec461 | [
"MIT"
] | 2 | 2017-07-01T23:31:39.000Z | 2019-03-04T16:02:15.000Z | """
Django settings for DjangoQuickTour project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
i... | 27.358209 | 91 | 0.690125 |
79453186938c8e3b86ff70fccc7ee7f84d5593ed | 23,732 | py | Python | instapy/like_util.py | SeoMinbong/InstaPy | 0d180d4ed182241d3e68f0e91dcad50df72696ac | [
"MIT"
] | 1 | 2019-02-21T02:26:07.000Z | 2019-02-21T02:26:07.000Z | instapy/like_util.py | SeoMinbong/InstaPy | 0d180d4ed182241d3e68f0e91dcad50df72696ac | [
"MIT"
] | null | null | null | instapy/like_util.py | SeoMinbong/InstaPy | 0d180d4ed182241d3e68f0e91dcad50df72696ac | [
"MIT"
] | null | null | null | import re
import random
"""Module that handles the like features"""
from .util import format_number
from math import ceil
from re import findall
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import WebDriverException
from .time_util import sleep
from .util import update_activity
from... | 36.343032 | 154 | 0.575594 |
794531b10fc3263ae13bf2014886f79ce3cf7b77 | 1,156 | py | Python | interview/leet/778_Swim_in_Rising_Water.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2020-10-12T13:33:29.000Z | 2020-10-12T13:33:29.000Z | interview/leet/778_Swim_in_Rising_Water.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | null | null | null | interview/leet/778_Swim_in_Rising_Water.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2016-11-09T07:28:45.000Z | 2016-11-09T07:28:45.000Z | #!/usr/bin/env python3
# Thinking process
# The animation of spanning with colors black/white/gray
# Like the ones in princeton lecture really helped me
from heapq import heappush, heappop
class Solution:
def swimInWater(self, grid):
l, heap, delta = len(grid), [(grid[0][0], 0, 0)], [(0,1),(0,-1),(1,0),(-... | 35.030303 | 85 | 0.467993 |
794532923fb7491591d8157e69d39950293a8ac4 | 689 | py | Python | antarest/study/storage/rawstudy/model/filesystem/root/input/thermal/series/series.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:40:22.000Z | 2020-11-09T09:06:30.000Z | antarest/study/storage/rawstudy/model/filesystem/root/input/thermal/series/series.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/rawstudy/model/filesystem/root/input/thermal/series/series.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from antarest.study.storage.rawstudy.model.filesystem.config.model import (
FileStudyTreeConfig,
)
from antarest.study.storage.rawstudy.model.filesystem.folder_node import (
FolderNode,
)
from antarest.study.storage.rawstudy.model.filesystem.inode import TREE
from antarest.study.storage.rawstudy.model.filesyste... | 31.318182 | 98 | 0.702467 |
7945338768de8a7ffa1412ed9f7e3c1b3239888a | 10,265 | py | Python | pygls/server.py | Maxattax97/pygls | db24ee52299b8429f7b4efd82fdea995f781f3e7 | [
"Apache-2.0"
] | null | null | null | pygls/server.py | Maxattax97/pygls | db24ee52299b8429f7b4efd82fdea995f781f3e7 | [
"Apache-2.0"
] | null | null | null | pygls/server.py | Maxattax97/pygls | db24ee52299b8429f7b4efd82fdea995f781f3e7 | [
"Apache-2.0"
] | null | null | null | ############################################################################
# Copyright(c) Open Law Library. All rights reserved. #
# See ThirdPartyNotices.txt in the project root for additional notices. #
# #
# Licensed u... | 37.057762 | 95 | 0.602825 |
794534d7f92e767dc59122429f7b5ba1e5f42ddd | 6,046 | py | Python | geoutils/utils.py | behzad89/pochas-geoutils | 45323ee5e3f47a7f11b4f50cf01f3a8cb6e56623 | [
"MIT"
] | null | null | null | geoutils/utils.py | behzad89/pochas-geoutils | 45323ee5e3f47a7f11b4f50cf01f3a8cb6e56623 | [
"MIT"
] | null | null | null | geoutils/utils.py | behzad89/pochas-geoutils | 45323ee5e3f47a7f11b4f50cf01f3a8cb6e56623 | [
"MIT"
] | null | null | null | import datetime as dt
import json
import os
import numpy as np
import numpy.ma as ma
import rioxarray
import xarray as xr
from pyproj import CRS, Proj # type: ignore
# ModisAPI.py utils:
def geometry_from_geojson(filepath: str):
with open(filepath, "r") as f:
json_obj = json.load(f)
geojson_type = ... | 29.783251 | 99 | 0.573602 |
79453525ec9d5f998b11f8a71e5780fa96153157 | 405 | py | Python | zExtraLearning/get_file_encoding.py | talk2sunil83/UpgradLearning | 70c4f993c68ce5030e9df0edd15004bbb9fc71e7 | [
"Apache-2.0"
] | null | null | null | zExtraLearning/get_file_encoding.py | talk2sunil83/UpgradLearning | 70c4f993c68ce5030e9df0edd15004bbb9fc71e7 | [
"Apache-2.0"
] | null | null | null | zExtraLearning/get_file_encoding.py | talk2sunil83/UpgradLearning | 70c4f993c68ce5030e9df0edd15004bbb9fc71e7 | [
"Apache-2.0"
] | null | null | null | # %%
def predict_encoding(file_path, n_lines=20):
'''Predict a file's encoding using chardet'''
import chardet
# Open the file as binary data
with open(file_path, 'rb') as f:
# Join binary lines for specified number of lines
rawdata = b''.join([f.readline() for _ in range(n_lines)])
... | 27 | 66 | 0.671605 |
79453538a003d572ab0794e0bb23bbe7764998d8 | 149 | py | Python | jumper/entities/weapon.py | ccmikechen/Jumper-Game | b68a03cdfee27cea2bfb321f77b57ce80904bef6 | [
"MIT"
] | null | null | null | jumper/entities/weapon.py | ccmikechen/Jumper-Game | b68a03cdfee27cea2bfb321f77b57ce80904bef6 | [
"MIT"
] | null | null | null | jumper/entities/weapon.py | ccmikechen/Jumper-Game | b68a03cdfee27cea2bfb321f77b57ce80904bef6 | [
"MIT"
] | 1 | 2017-12-19T17:42:52.000Z | 2017-12-19T17:42:52.000Z | from jumper.entities.item import Item
class Weapon(Item):
def trigger(self, env):
pass
def get_type(self):
return 'weapon'
| 16.555556 | 37 | 0.637584 |
794535e1eb8f99345ede9c1ed4270ebc90abd556 | 5,534 | py | Python | tests/conftest.py | CK-Chaitanya/rasa_core | cf2868ab9f04527ebe8bf5ef685536f3027c16c8 | [
"Apache-2.0"
] | 1 | 2020-09-03T01:26:39.000Z | 2020-09-03T01:26:39.000Z | tests/conftest.py | farooqarahim/rasa_core | acbf97ff1923a553eadd5cf881e64c50e622ae90 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | farooqarahim/rasa_core | acbf97ff1923a553eadd5cf881e64c50e622ae90 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import os
from builtins import str
import matplotlib
import pytest
from pytest_localserver.http import WSGIServer
from rasa_core import train, server
fro... | 28.973822 | 76 | 0.722082 |
79453658a167a04ae171d9ba78119cbe2644c875 | 28,593 | py | Python | python/pyspark/sql/context.py | souo/spark | 5cdea7d1e54e751f928876ead33fc01e7e2f3437 | [
"Apache-2.0"
] | 1 | 2019-12-02T03:54:41.000Z | 2019-12-02T03:54:41.000Z | python/pyspark/sql/context.py | souo/spark | 5cdea7d1e54e751f928876ead33fc01e7e2f3437 | [
"Apache-2.0"
] | 2 | 2016-02-04T21:55:13.000Z | 2016-02-22T21:34:56.000Z | python/pyspark/sql/context.py | souo/spark | 5cdea7d1e54e751f928876ead33fc01e7e2f3437 | [
"Apache-2.0"
] | 2 | 2020-07-23T13:31:01.000Z | 2021-05-06T15:46:24.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 38.022606 | 100 | 0.612667 |
79453709975a0c8c854bcb9382a6c064360bf829 | 4,204 | py | Python | internal/notes/builtin-SAVE/packages/qbox/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/qbox/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/qbox/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 44.723404 | 78 | 0.651998 |
794537e8bb21535241ebfd4b553b51fc13805c99 | 2,023 | py | Python | pylot/control/flags.py | alvkao58/pylot | ab49647236fcbc8aa08ec9650e0596e778e9ef85 | [
"Apache-2.0"
] | null | null | null | pylot/control/flags.py | alvkao58/pylot | ab49647236fcbc8aa08ec9650e0596e778e9ef85 | [
"Apache-2.0"
] | null | null | null | pylot/control/flags.py | alvkao58/pylot | ab49647236fcbc8aa08ec9650e0596e778e9ef85 | [
"Apache-2.0"
] | null | null | null | from absl import flags
# PID controller parameters.
flags.DEFINE_float('pid_p', 0.25, 'PID p parameter')
flags.DEFINE_float('pid_i', 0.20, 'PID i parameter')
flags.DEFINE_float('pid_d', 0.0, 'PID d parameter')
# Agent stopping configs.
flags.DEFINE_bool('stop_for_traffic_lights', True,
'True to enabl... | 50.575 | 79 | 0.714286 |
794538468230b90f2faecdc3dd5c11688193ea3c | 11,441 | py | Python | bentoml/_internal/runner/utils.py | matheusMoreno/BentoML | 4c139142fae486ba1ccf6b24e89505c030e3df3f | [
"Apache-2.0"
] | null | null | null | bentoml/_internal/runner/utils.py | matheusMoreno/BentoML | 4c139142fae486ba1ccf6b24e89505c030e3df3f | [
"Apache-2.0"
] | null | null | null | bentoml/_internal/runner/utils.py | matheusMoreno/BentoML | 4c139142fae486ba1ccf6b24e89505c030e3df3f | [
"Apache-2.0"
] | null | null | null | import os
import re
import math
import ctypes
import typing as t
import logging
import itertools
from typing import TYPE_CHECKING
from functools import lru_cache
from simple_di.providers import SingletonFactory
from ...exceptions import BentoMLException
logger = logging.getLogger(__name__)
# Some constants taken fr... | 31.692521 | 97 | 0.589022 |
7945395b3ddc4f27e3d7c06365b0dbe369cf5ec9 | 759 | py | Python | pks/templatetags/domainFilters.py | xingyifei2016/clusterCAD | fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6 | [
"BSD-3-Clause-LBNL"
] | 7 | 2018-11-06T00:04:47.000Z | 2021-08-05T04:37:12.000Z | pks/templatetags/domainFilters.py | xingyifei2016/clusterCAD | fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6 | [
"BSD-3-Clause-LBNL"
] | 26 | 2017-08-11T21:51:46.000Z | 2022-03-11T23:18:25.000Z | pks/templatetags/domainFilters.py | xingyifei2016/clusterCAD | fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6 | [
"BSD-3-Clause-LBNL"
] | 7 | 2017-08-16T17:28:40.000Z | 2022-03-02T00:07:00.000Z | from django import template
from django.utils.http import urlquote
from rdkit import Chem
from pks.models import ACP, cMT, PCP, Module
import re
register = template.Library()
@register.filter
def classname(obj):
return obj.__class__.__name__
@register.filter
def smiles(mol):
if mol:
smiles = Chem.Mol... | 21.083333 | 59 | 0.71805 |
794539825f09ce2fa3f7863315f644155730b952 | 216 | py | Python | codebraid/codeprocessors/__init__.py | musm/codebraid | 0fabf430050193027470ed2c0920ab4a57d3bf29 | [
"BSD-3-Clause"
] | 270 | 2019-02-26T07:46:56.000Z | 2022-03-23T00:34:09.000Z | codebraid/codeprocessors/__init__.py | musm/codebraid | 0fabf430050193027470ed2c0920ab4a57d3bf29 | [
"BSD-3-Clause"
] | 50 | 2019-02-28T01:49:36.000Z | 2022-03-06T15:00:12.000Z | codebraid/codeprocessors/__init__.py | musm/codebraid | 0fabf430050193027470ed2c0920ab4a57d3bf29 | [
"BSD-3-Clause"
] | 11 | 2019-05-28T21:08:07.000Z | 2022-02-26T21:10:35.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2019, Geoffrey M. Poore
# All rights reserved.
#
# Licensed under the BSD 3-Clause License:
# http://opensource.org/licenses/BSD-3-Clause
#
from .base import CodeProcessor
| 18 | 45 | 0.694444 |
79453a1b73242bc8d238a891ec92130ba1e993ec | 16,666 | py | Python | My poop analysis.py | PClough/My-2020-year-in-poo | 9c842b2f2688228f071bbfe65288e112c1e3abad | [
"MIT"
] | 2 | 2021-01-01T07:40:37.000Z | 2021-01-01T13:07:45.000Z | My poop analysis.py | PClough/My-2020-year-in-poo | 9c842b2f2688228f071bbfe65288e112c1e3abad | [
"MIT"
] | null | null | null | My poop analysis.py | PClough/My-2020-year-in-poo | 9c842b2f2688228f071bbfe65288e112c1e3abad | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Poop analysis
Created 2020
@author: PClough
"""
import pandas as pd
import numpy as np
import chart_studio
import plotly.graph_objects as go
from plotly.offline import plot
from plotly.subplots import make_subplots
from scipy import stats
import datetime as dt
from time i... | 34.151639 | 160 | 0.593784 |
79453a32521440527075b87e88247a34a306036b | 548 | py | Python | stadiumpy/__init__.py | apexcodings/stadiumpyGUI | 436723dd40847b5ca1c54327ac083129f31e75da | [
"MIT"
] | 3 | 2020-12-30T07:40:47.000Z | 2022-03-24T18:48:57.000Z | stadiumpy/__init__.py | apexcodings/stadiumpyGUI | 436723dd40847b5ca1c54327ac083129f31e75da | [
"MIT"
] | null | null | null | stadiumpy/__init__.py | apexcodings/stadiumpyGUI | 436723dd40847b5ca1c54327ac083129f31e75da | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Initialize the library.
:copyright: 2020 STADIUMPy
:license: MIT
"""
# from stadiumpy.stadiumpy.startpage import StartPage
# from stadiumpy.prf_page import prfview
# from stadiumpy.srf_page import srfview
# from stadiumpy.dataenquirypage import dataenquiry
# from stadiumpy.sks_page import sk... | 26.095238 | 53 | 0.781022 |
79453b48f2ff15912a20f3ac7d46160d32c04dab | 165 | py | Python | src/my_pkg/main_character.py | satamame/my_pkg | d22aaa3b0a101b37654189dded3e96d10871dd29 | [
"MIT"
] | null | null | null | src/my_pkg/main_character.py | satamame/my_pkg | d22aaa3b0a101b37654189dded3e96d10871dd29 | [
"MIT"
] | null | null | null | src/my_pkg/main_character.py | satamame/my_pkg | d22aaa3b0a101b37654189dded3e96d10871dd29 | [
"MIT"
] | null | null | null | from .character import Character
class MainCharacter(Character):
def __init__(self, name='ヒロ', age=14):
self.name = name
super().__init__(age)
| 20.625 | 42 | 0.660606 |
79453c8934438baba6e79fbdbe6563865bc3264d | 10,142 | py | Python | lib/fast_rcnn/config.py | candacelax/bottom-up-attention | dea4e48d71aa7d9abba5a3b4a338e3d688a76a79 | [
"MIT"
] | null | null | null | lib/fast_rcnn/config.py | candacelax/bottom-up-attention | dea4e48d71aa7d9abba5a3b4a338e3d688a76a79 | [
"MIT"
] | null | null | null | lib/fast_rcnn/config.py | candacelax/bottom-up-attention | dea4e48d71aa7d9abba5a3b4a338e3d688a76a79 | [
"MIT"
] | 1 | 2020-03-20T10:27:02.000Z | 2020-03-20T10:27:02.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Fast R-CNN config system.
This file specifies default config option... | 32.402556 | 99 | 0.696312 |
79453def3eb8d6a2b896a00dc7f7c2511a321d06 | 3,871 | py | Python | FASTQ_Preprocess.py | pkMyt1/ScarMapper | 39ebc5b15a6224e8002cb5748eeb60397f8a4b06 | [
"MIT"
] | 4 | 2020-10-28T15:36:45.000Z | 2022-01-04T14:47:08.000Z | FASTQ_Preprocess.py | pkMyt1/ScarMapper | 39ebc5b15a6224e8002cb5748eeb60397f8a4b06 | [
"MIT"
] | 11 | 2020-03-23T12:43:14.000Z | 2020-10-14T19:14:59.000Z | FASTQ_Preprocess.py | pkMyt1/ScarMapper | 39ebc5b15a6224e8002cb5748eeb60397f8a4b06 | [
"MIT"
] | null | null | null | """
@author: Dennis A. Simpson
University of North Carolina at Chapel Hill
Chapel Hill, NC 27599
@copyright: 2019
"""
import datetime
import os
import collections
import subprocess
import argparse
import sys
import time
from distutils.util import strtobool
from scipy.stats import gmean
from scarmapp... | 37.221154 | 118 | 0.690519 |
79453fa87f0a0447989673bec807b4ef3bb1ce28 | 381 | py | Python | PyMOTW/source/os.path/ospath_join.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2019-01-04T05:47:50.000Z | 2019-01-04T05:47:50.000Z | PyMOTW/source/os.path/ospath_join.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2020-07-18T03:52:03.000Z | 2020-07-18T04:18:01.000Z | PyMOTW/source/os.path/ospath_join.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 2 | 2021-03-06T04:28:32.000Z | 2021-03-06T04:59:17.000Z | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""Combine path components to create a single path.
"""
#end_pymotw_header
import os.path
PATHS = [
('one', 'two', 'three'),
('/', 'one', 'two', 'three'),
('/one', '/two', '/three'),
]
for parts in PATHS... | 18.142857 | 58 | 0.590551 |
794540df37732c1dae7f6a73410031d2dc9b7495 | 2,234 | py | Python | src/opserver/plugins/alarm_base.py | UbuntuEvangelist/contrail-controller | 4e8a992230f8f8e91e4f753e19b5442d9e1b446d | [
"Apache-2.0"
] | null | null | null | src/opserver/plugins/alarm_base.py | UbuntuEvangelist/contrail-controller | 4e8a992230f8f8e91e4f753e19b5442d9e1b446d | [
"Apache-2.0"
] | null | null | null | src/opserver/plugins/alarm_base.py | UbuntuEvangelist/contrail-controller | 4e8a992230f8f8e91e4f753e19b5442d9e1b446d | [
"Apache-2.0"
] | 18 | 2017-01-12T09:28:44.000Z | 2019-04-18T20:47:42.000Z | import abc
from collections import namedtuple
class AlarmBase(object):
"""Base class for Alarms
"""
SYS_EMERG, SYS_ALERT, SYS_CRIT, SYS_ERR,\
SYS_WARN, SYS_NOTICE, SYS_INFO, SYS_DEBUG = range(8)
_RULES = None
def __init__(self, sev, at=0, it=0, fec=False, fcs=0, fct=0):
self._con... | 27.925 | 66 | 0.623993 |
794541b5fa4f16ec1c5f5a043a4ea43f18a71543 | 1,780 | py | Python | data_structures/stack/stack_using_linked_list.py | FatiahBalo/python-ds | 9eb88425822b6da4d7bd673a124c13fbe6f17523 | [
"MIT"
] | 1,723 | 2019-07-30T07:06:22.000Z | 2022-03-31T15:22:22.000Z | data_structures/stack/stack_using_linked_list.py | FatiahBalo/python-ds | 9eb88425822b6da4d7bd673a124c13fbe6f17523 | [
"MIT"
] | 213 | 2019-10-06T08:07:47.000Z | 2021-10-04T15:38:36.000Z | data_structures/stack/stack_using_linked_list.py | FatiahBalo/python-ds | 9eb88425822b6da4d7bd673a124c13fbe6f17523 | [
"MIT"
] | 628 | 2019-10-06T10:26:25.000Z | 2022-03-31T01:41:00.000Z | """ Use LinkedList class to implement a Stack. """
class Element(object):
def __init__(self, value):
self.value = value
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def append(self, new_element):
current = self.... | 25.070423 | 79 | 0.600562 |
794542246562967703384b9fe6a6da547edd2814 | 1,678 | py | Python | test/test_send_report_email.py | Danilka/APIv3-python-library | c96472f47d652d2e09e8b4a48a80e33fde06e7f1 | [
"MIT"
] | null | null | null | test/test_send_report_email.py | Danilka/APIv3-python-library | c96472f47d652d2e09e8b4a48a80e33fde06e7f1 | [
"MIT"
] | null | null | null | test/test_send_report_email.py | Danilka/APIv3-python-library | c96472f47d652d2e09e8b4a48a80e33fde06e7f1 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SendinBlue API
SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h... | 40.926829 | 820 | 0.675209 |
794542827e17c56ddafcf8d99aaabfde15db912b | 1,715 | py | Python | reachy_pyluos_hal/tools/reachy_dynamixel_config.py | pollen-robotics/reachy_pyluos_hal | dcd2ddc937c60170907f258994590fc9ecfe5d7f | [
"Apache-2.0"
] | null | null | null | reachy_pyluos_hal/tools/reachy_dynamixel_config.py | pollen-robotics/reachy_pyluos_hal | dcd2ddc937c60170907f258994590fc9ecfe5d7f | [
"Apache-2.0"
] | 2 | 2021-04-07T15:34:45.000Z | 2022-01-26T09:03:44.000Z | reachy_pyluos_hal/tools/reachy_dynamixel_config.py | pollen-robotics/reachy_pyluos_hal | dcd2ddc937c60170907f258994590fc9ecfe5d7f | [
"Apache-2.0"
] | null | null | null | """Command line utility tool to configure Dynamixel motor by using the Reachy configuration file."""
from subprocess import call
from ..config import load_config
from ..dynamixel import DynamixelMotor, DynamixelError
def main():
"""Run main entry point."""
import argparse
parser = argparse.ArgumentParse... | 32.980769 | 143 | 0.660641 |
794542ad2ed6fef126c06e82eee150b72c58102c | 9,277 | py | Python | fastai/tabular/data.py | claudiosv/fastai | e36fc3dc9f6f7a9b9ae5134486bfb2b9388e7a98 | [
"Apache-2.0"
] | 3 | 2019-07-26T11:25:59.000Z | 2021-12-20T04:13:18.000Z | fastai/tabular/data.py | claudiosv/fastai | e36fc3dc9f6f7a9b9ae5134486bfb2b9388e7a98 | [
"Apache-2.0"
] | 2 | 2021-09-28T05:55:12.000Z | 2022-02-26T11:19:08.000Z | fastai/tabular/data.py | claudiosv/fastai | e36fc3dc9f6f7a9b9ae5134486bfb2b9388e7a98 | [
"Apache-2.0"
] | 1 | 2020-04-04T10:22:30.000Z | 2020-04-04T10:22:30.000Z | "Data loading pipeline for structured data support. Loads from pandas DataFrame"
from ..torch_core import *
from .transform import *
from ..basic_data import *
from ..data_block import *
from ..basic_train import *
from .models import *
from pandas.api.types import is_numeric_dtype, is_categorical_dtype
__all__ = ['Ta... | 52.117978 | 134 | 0.630376 |
794542af83b191e08a447b1b6487c48d5c5531ce | 16,144 | py | Python | pyfolio/utils.py | dimitar-petrov/pyfolio | 39758af5a34ab2ae3359b0e2c82675de0661dcc2 | [
"Apache-2.0"
] | 4,542 | 2015-07-14T02:34:19.000Z | 2022-03-31T02:12:06.000Z | pyfolio/utils.py | anojangra/pyfolio | 4b901f6d73aa02ceb6d04b7d83502e5c6f2e81aa | [
"Apache-2.0"
] | 558 | 2015-07-14T18:16:43.000Z | 2022-03-15T02:22:23.000Z | pyfolio/utils.py | anojangra/pyfolio | 4b901f6d73aa02ceb6d04b7d83502e5c6f2e81aa | [
"Apache-2.0"
] | 1,572 | 2015-07-15T23:06:09.000Z | 2022-03-31T17:54:33.000Z | #
# Copyright 2018 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 29.785978 | 78 | 0.647113 |
794542cb9d4c824ca75e1bd4a2063dfcad138eba | 5,572 | py | Python | homeassistant/components/rflink/cover.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/rflink/cover.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/rflink/cover.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for Rflink Cover devices."""
import logging
import voluptuous as vol
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverDevice
from homeassistant.const import CONF_NAME, CONF_TYPE, STATE_OPEN
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.restore_state import ... | 32.395349 | 88 | 0.644113 |
794543e16813640adcddf6bd58e3d62edf26d08a | 1,036 | py | Python | src/byro/common/migrations/0007_auto_20180224_2114.py | mv-idatalytics/jenkins-byro | 1be7f30a8a8c40adf93ea099e9d85cd28fc19783 | [
"Apache-2.0"
] | null | null | null | src/byro/common/migrations/0007_auto_20180224_2114.py | mv-idatalytics/jenkins-byro | 1be7f30a8a8c40adf93ea099e9d85cd28fc19783 | [
"Apache-2.0"
] | null | null | null | src/byro/common/migrations/0007_auto_20180224_2114.py | mv-idatalytics/jenkins-byro | 1be7f30a8a8c40adf93ea099e9d85cd28fc19783 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 1.11.8 on 2018-02-24 21:14
from django.db import migrations
def init_templates(apps, schema_editor):
from byro.mails import default
MailTemplate = apps.get_model("mails", "MailTemplate")
Configuration = apps.get_model("common", "Configuration")
config, _ = Configuration.objects... | 34.533333 | 84 | 0.737452 |
7945445e5f3173f3895b6dc9bf88d760f37fe19b | 11,313 | py | Python | Jumpscale/tools/configmanager/DbConfig.py | threefoldtech/jumpscale_core9 | f366bea61bf2e6112c4afb5a4979ec00b843e58a | [
"Apache-2.0"
] | null | null | null | Jumpscale/tools/configmanager/DbConfig.py | threefoldtech/jumpscale_core9 | f366bea61bf2e6112c4afb5a4979ec00b843e58a | [
"Apache-2.0"
] | 162 | 2018-07-31T14:40:33.000Z | 2019-04-03T06:31:20.000Z | Jumpscale/tools/configmanager/DbConfig.py | threefoldtech/jumpscale_core9 | f366bea61bf2e6112c4afb5a4979ec00b843e58a | [
"Apache-2.0"
] | 2 | 2018-07-31T12:42:02.000Z | 2018-11-21T09:40:22.000Z | from jumpscale import j
import re
import json
from inspect import getmodule
JSBASE = j.application.jsbase_get_class()
HSET_NAME = "cfg::{configrepo}::{instance}::{clientpath}"
def get_key_info(k):
m = re.match("cfg::(?P<configrepo>\w+)::(?P<instance>.+)::(?P<clientpath>.+)", k)
if m:
return m.groupd... | 32.696532 | 120 | 0.566516 |
7945447624fcf35240819f3d84244ac56d1d3804 | 2,086 | py | Python | src/azure-cli-core/azure/cli/core/extension/_homebrew_patch.py | psignoret/azure-cli | 1a4a043750315f9a7f2894b4287126089978b615 | [
"MIT"
] | 1 | 2020-12-14T15:30:11.000Z | 2020-12-14T15:30:11.000Z | src/azure-cli-core/azure/cli/core/extension/_homebrew_patch.py | psignoret/azure-cli | 1a4a043750315f9a7f2894b4287126089978b615 | [
"MIT"
] | 4 | 2018-08-08T20:01:17.000Z | 2018-09-17T15:20:06.000Z | src/azure-cli-core/azure/cli/core/extension/_homebrew_patch.py | psignoret/azure-cli | 1a4a043750315f9a7f2894b4287126089978b615 | [
"MIT"
] | 1 | 2020-12-22T00:28:33.000Z | 2020-12-22T00:28:33.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 40.901961 | 114 | 0.598274 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.