hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | 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 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 251 | 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 3 251 | 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
baabebe68001f5a86db47d7193ffb4993729d00a | 2,258 | py | Python | AdminServer/appscale/admin/stop_services.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AdminServer/appscale/admin/stop_services.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AdminServer/appscale/admin/stop_services.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | """ Tries to stop all services until they are stopped. """
import argparse
import logging
import time
from appscale.common import service_helper
from appscale.common.constants import LOG_FORMAT
from appscale.common.retrying import retry
logger = logging.getLogger(__name__)
def start_service():
""" Starts a servic... | 28.225 | 80 | 0.714792 |
baae7a77a1095d6e64fb2a0dd1d7975466686eba | 516 | py | Python | numpy-001-ndarray/numpy03.py | gemark/numpy-note | 3da01f5ef96c9421ac088ce067dcb916ff09c304 | [
"MIT"
] | null | null | null | numpy-001-ndarray/numpy03.py | gemark/numpy-note | 3da01f5ef96c9421ac088ce067dcb916ff09c304 | [
"MIT"
] | null | null | null | numpy-001-ndarray/numpy03.py | gemark/numpy-note | 3da01f5ef96c9421ac088ce067dcb916ff09c304 | [
"MIT"
] | null | null | null | import numpy as np
one_d_array = [0, 1, 2, 3, 4, 5]
two_d_array = [
[11, 12, 13, 14, 15],
[16, 17, 18, 19, 20],
[21, 22, 23, 24, 25],
[26, 27, 28 ,29, 30],
[31, 32, 33, 34, 35]
]
t = one_d_array[3]
# x: coord(index)
e = two_d_array[2][1]
# y x y:row x:column
arr = ... | 17.793103 | 44 | 0.53876 |
baaeaec1d23ac6d10b242873651e941d98509832 | 4,409 | py | Python | adaequare_gsp/helpers/schema/gstr_2a.py | mohsinalimat/adaequare_gsp | e3e8bb282f25dc791cb07cc41e04bc60a7066e07 | [
"MIT"
] | null | null | null | adaequare_gsp/helpers/schema/gstr_2a.py | mohsinalimat/adaequare_gsp | e3e8bb282f25dc791cb07cc41e04bc60a7066e07 | [
"MIT"
] | null | null | null | adaequare_gsp/helpers/schema/gstr_2a.py | mohsinalimat/adaequare_gsp | e3e8bb282f25dc791cb07cc41e04bc60a7066e07 | [
"MIT"
] | null | null | null | import frappe
from datetime import datetime
from adaequare_gsp.helpers.schema.states import number_state_mapping
from adaequare_gsp.helpers.schema.gstr_2b import (
GST_CATEGORY,
NOTE_TYPE,
YES_NO,
)
DATE_FORMAT = "%d-%m-%Y"
DATE_FORMAT2 = "%d-%b-%y"
AMEND_TYPE = {
"R": "Receiver GSTIN Amended",
"... | 26.244048 | 130 | 0.583125 |
baaed601b57819cd0c0b609a22a34160a35adc0d | 3,995 | py | Python | layer_quantize/train.py | ratansingh98/tf_quantization | eb1210887e9a956b1af721de07d76637d1177cec | [
"MIT"
] | 2 | 2020-10-13T05:25:00.000Z | 2021-01-04T10:07:59.000Z | layer_quantize/train.py | ratansingh98/tf_quantization | eb1210887e9a956b1af721de07d76637d1177cec | [
"MIT"
] | null | null | null | layer_quantize/train.py | ratansingh98/tf_quantization | eb1210887e9a956b1af721de07d76637d1177cec | [
"MIT"
] | 1 | 2020-10-13T05:25:04.000Z | 2020-10-13T05:25:04.000Z | import tempfile
import tensorflow as tf
import tensorflow_model_optimization as tfmot
from tensorflow.keras.models import load_model
import os
from tensorflow import keras
import time
# Load MNIST dataset
mnist = keras.datasets.mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()
# Norma... | 29.592593 | 127 | 0.749437 |
bab0b72e6638fea1e7b054909698296bb1524034 | 948 | py | Python | test/codec_implementations/__init__.py | G-AshwinKumar/experiment-notebook | aae1c5fb9ef8f84dce5d75989ed8975797282f37 | [
"MIT"
] | null | null | null | test/codec_implementations/__init__.py | G-AshwinKumar/experiment-notebook | aae1c5fb9ef8f84dce5d75989ed8975797282f37 | [
"MIT"
] | null | null | null | test/codec_implementations/__init__.py | G-AshwinKumar/experiment-notebook | aae1c5fb9ef8f84dce5d75989ed8975797282f37 | [
"MIT"
] | null | null | null | import pkgutil as _pkgutil
import enb.icompression
# Dynamically updated by inspection of modules found
__all__ = []
all_codec_classes = []
all_lossless_codec_classes = []
all_lossy_codec_classes = []
for loader, module_name, is_pkg in _pkgutil.walk_packages(__path__):
if not module_name.startswith("codec"):
... | 33.857143 | 70 | 0.699367 |
bab113e16eaad6cbc67608faad8b86d0f01e96d5 | 1,474 | py | Python | python/agent.py | tbvanderwoude/research-project | 1c5cb09a424a0db83f18dae3278ecb7ad6866d2c | [
"Apache-2.0",
"MIT"
] | 3 | 2021-08-23T18:00:44.000Z | 2022-02-09T06:00:50.000Z | python/agent.py | tbvanderwoude/research-project | 1c5cb09a424a0db83f18dae3278ecb7ad6866d2c | [
"Apache-2.0",
"MIT"
] | null | null | null | python/agent.py | tbvanderwoude/research-project | 1c5cb09a424a0db83f18dae3278ecb7ad6866d2c | [
"Apache-2.0",
"MIT"
] | 1 | 2021-06-15T11:38:45.000Z | 2021-06-15T11:38:45.000Z | from __future__ import annotations
import copy
from typing import Optional
from mapfmclient import MarkedLocation
from python.coord import Coord, UncalculatedCoord
# An agent that has not yet been calculated. Stand in
# for agents in OD when states are only partially calculated
UncalculatedAgent = Agent(Uncalcula... | 29.48 | 92 | 0.695387 |
bab1ab98b5b9a432147ce95b3a0dad2f4a850934 | 10,929 | py | Python | Efficiency Test/arcadameVM_dictionaries.py | bernardotc/Arcadame | 258a26498fc9de7f95c577704bba8c7709b2d4fc | [
"MIT"
] | null | null | null | Efficiency Test/arcadameVM_dictionaries.py | bernardotc/Arcadame | 258a26498fc9de7f95c577704bba8c7709b2d4fc | [
"MIT"
] | null | null | null | Efficiency Test/arcadameVM_dictionaries.py | bernardotc/Arcadame | 258a26498fc9de7f95c577704bba8c7709b2d4fc | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# Bernardo Daniel Trevino Caballero A00813175
# Myriam Maria Gutierrez Aburto A00617060
# arcadame.py
#
# Virtual Machine for the languange Arcadame
# -----------------------------------------------------------------------------... | 33.835913 | 179 | 0.586238 |
bab397e5f72283ecbde2833e1cf23136eb41bdb7 | 1,606 | py | Python | database.py | premkarat/expensify_bot | d464d85793079f8b5229a91ba907068527fd7255 | [
"Apache-2.0"
] | 2 | 2021-07-14T02:56:07.000Z | 2021-07-14T05:17:50.000Z | database.py | premkarat/expensify_bot | d464d85793079f8b5229a91ba907068527fd7255 | [
"Apache-2.0"
] | null | null | null | database.py | premkarat/expensify_bot | d464d85793079f8b5229a91ba907068527fd7255 | [
"Apache-2.0"
] | null | null | null | import sqlalchemy as sq
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
engine = create_engine('sqlite:///tmp/expense.db',
connect_args={"check_same_thread": False},
... | 25.492063 | 68 | 0.603362 |
bab3ff9be49b8a19139c53d2ee877f5f6476ae7c | 1,252 | py | Python | web/web/urls.py | danieltrt/UnchartIt_UI | dbaefcb68e8d1a3e48b9ee071a9918dcc6eceebe | [
"BSD-3-Clause-Clear"
] | 2 | 2020-09-27T14:40:28.000Z | 2022-01-20T14:52:27.000Z | web/web/urls.py | danieltrt/UnchartIt | dbaefcb68e8d1a3e48b9ee071a9918dcc6eceebe | [
"BSD-3-Clause-Clear"
] | null | null | null | web/web/urls.py | danieltrt/UnchartIt | dbaefcb68e8d1a3e48b9ee071a9918dcc6eceebe | [
"BSD-3-Clause-Clear"
] | null | null | null | """web URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 37.939394 | 77 | 0.718051 |
bab44158e7690e136f74ee2ac2ec518705c4c9d9 | 20,873 | py | Python | dh_abstracts/app/abstracts/forms.py | dSHARP-CMU/dhweb_app | fe3d89aeb6c59e6606596747a236a2df5529e9a4 | [
"MIT"
] | 3 | 2021-05-07T17:01:33.000Z | 2022-01-08T07:54:22.000Z | dh_abstracts/app/abstracts/forms.py | dSHARP-CMU/dhweb_app | fe3d89aeb6c59e6606596747a236a2df5529e9a4 | [
"MIT"
] | 336 | 2019-12-04T23:06:08.000Z | 2022-03-31T16:23:15.000Z | dh_abstracts/app/abstracts/forms.py | dSHARP-CMU/dhweb_app | fe3d89aeb6c59e6606596747a236a2df5529e9a4 | [
"MIT"
] | null | null | null | from django import forms
from dal import forward
from dal.autocomplete import ModelSelect2, ModelSelect2Multiple
from django.forms import formset_factory, inlineformset_factory, modelformset_factory
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit
from .... | 35.680342 | 302 | 0.623581 |
bab55835a0be259b1891523cbd9476f589f8cad9 | 4,963 | py | Python | legacy/scripts/srd_functions.py | pvkraju80/leo | f6ed6f4ee6eb34c47581d40d4d3fea69f42140f3 | [
"CNRI-Python"
] | 99 | 2016-11-02T14:29:41.000Z | 2022-03-02T23:53:02.000Z | legacy/scripts/srd_functions.py | pvkraju80/leo | f6ed6f4ee6eb34c47581d40d4d3fea69f42140f3 | [
"CNRI-Python"
] | null | null | null | legacy/scripts/srd_functions.py | pvkraju80/leo | f6ed6f4ee6eb34c47581d40d4d3fea69f42140f3 | [
"CNRI-Python"
] | 86 | 2016-11-05T15:39:08.000Z | 2022-03-14T04:37:17.000Z | #
# Module with functions for
# Gruenbichler and Longstaff (1996) model
#
# (c) Dr. Yves J. Hilpisch
# Listed Volatility and Variance Derivatives
#
import math
import numpy as np
import scipy.stats as scs
def futures_price(v0, kappa, theta, zeta, T):
''' Futures pricing formula in GL96 model.
Parameters
... | 26.540107 | 79 | 0.56619 |
bab5c049512fb65f2c9e1cd838290529bbc19cb0 | 73 | py | Python | spydrnet/tests/test_verilog_to_edif.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | 34 | 2020-03-12T15:40:49.000Z | 2022-02-28T07:13:47.000Z | spydrnet/tests/test_verilog_to_edif.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | 104 | 2020-01-06T20:32:19.000Z | 2022-01-02T00:20:14.000Z | spydrnet/tests/test_verilog_to_edif.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | 10 | 2020-09-02T20:24:00.000Z | 2022-02-24T16:10:07.000Z | import unittest
| 9.125 | 43 | 0.767123 |
bab63b515b6226062b8e12c9766e8f95c269589e | 4,986 | py | Python | qnarre/prep/tokens/perceiver.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/perceiver.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/perceiver.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix 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 applicable l... | 37.208955 | 100 | 0.604894 |
bab6a18249c041770c616493b83bf7abb970132e | 3,538 | py | Python | 20180715/FeatureSelection/FeatureSelection.py | fengjiaxin/Home_Credit_Default_Risk | 3407e76b4e5cfb8dd6056d24675b80fe0e82c123 | [
"Apache-2.0"
] | 26 | 2018-06-13T07:34:16.000Z | 2020-12-07T16:38:25.000Z | 20180715/FeatureSelection/FeatureSelection.py | fengjiaxin/Home_Credit_Default_Risk | 3407e76b4e5cfb8dd6056d24675b80fe0e82c123 | [
"Apache-2.0"
] | 1 | 2019-05-02T12:48:31.000Z | 2019-05-25T09:06:22.000Z | 20180715/FeatureSelection/FeatureSelection.py | fengjiaxin/Home_Credit_Default_Risk | 3407e76b4e5cfb8dd6056d24675b80fe0e82c123 | [
"Apache-2.0"
] | 6 | 2018-08-02T11:03:33.000Z | 2021-11-09T10:42:11.000Z | # coding:utf-8
import os
import re
import sys
import tqdm
import numpy as np
import pandas as pd
from category_encoders import TargetEncoder
def filter_nan_feature(feature):
"""
:param feature: feature pd.Series
:return:
"""
return (np.sum(feature.isna()) / len(feature)) > 0.9
if __name__ == "_... | 38.043011 | 113 | 0.667326 |
bab80a31d238be536a1982c0370a6e9ddb03e510 | 360 | py | Python | {{cookiecutter.project_slug}}/tests/unit/{{cookiecutter.project_slug}}/graphql/resolvers/test_query.py | Maximilien-R/cookiecutter-tartiflette-aiohttp | 66e7e0897b315df6a1908c6c31ec58b74e0b3a6f | [
"MIT"
] | 3 | 2020-06-01T14:16:19.000Z | 2021-11-07T19:54:08.000Z | {{cookiecutter.project_slug}}/tests/unit/{{cookiecutter.project_slug}}/graphql/resolvers/test_query.py | Maximilien-R/cookiecutter-tartiflette-aiohttp | 66e7e0897b315df6a1908c6c31ec58b74e0b3a6f | [
"MIT"
] | 88 | 2019-11-15T17:35:54.000Z | 2021-08-02T04:50:51.000Z | {{cookiecutter.project_slug}}/tests/unit/{{cookiecutter.project_slug}}/graphql/resolvers/test_query.py | Maximilien-R/cookiecutter-tartiflette-aiohttp | 66e7e0897b315df6a1908c6c31ec58b74e0b3a6f | [
"MIT"
] | 2 | 2020-05-04T08:35:34.000Z | 2020-10-22T17:47:26.000Z | from unittest.mock import Mock
import pytest
from {{cookiecutter.project_slug}}.graphql.resolvers import resolve_query_hello
| 25.714286 | 79 | 0.725 |
bab948ec89d69e0f2809e71ae5e5a33760537a3e | 2,493 | py | Python | mease_elabftw/logger.py | ssciwr/mease-elabftw | 068db8d9c188697ac7e4a23e82e692cb36482ba8 | [
"MIT"
] | null | null | null | mease_elabftw/logger.py | ssciwr/mease-elabftw | 068db8d9c188697ac7e4a23e82e692cb36482ba8 | [
"MIT"
] | 10 | 2021-10-08T12:24:17.000Z | 2021-12-13T09:13:15.000Z | mease_elabftw/logger.py | ssciwr/mease-elabftw | 068db8d9c188697ac7e4a23e82e692cb36482ba8 | [
"MIT"
] | null | null | null | import logging
import os
import time
# By default no log will be written.
log_level = logging.DEBUG
logger = logging.getLogger("mease-elabftw")
logger.setLevel(logging.CRITICAL)
# this is the default log-file path
output_file = os.path.join("mease_elabftw", "logging", "logging.log")
def activate_logger(toggle_bool... | 28.011236 | 86 | 0.685118 |
babbbc3188b2ac7eb453bce93107324257a810eb | 265 | py | Python | bin/collect.py | nw-engineer/collectiontools | 7a5cf183c4f626e4ad21d218ebb99d2780f9f4e4 | [
"Apache-2.0"
] | 1 | 2021-11-16T16:43:03.000Z | 2021-11-16T16:43:03.000Z | bin/collect.py | nw-engineer/collectiontools | 7a5cf183c4f626e4ad21d218ebb99d2780f9f4e4 | [
"Apache-2.0"
] | null | null | null | bin/collect.py | nw-engineer/collectiontools | 7a5cf183c4f626e4ad21d218ebb99d2780f9f4e4 | [
"Apache-2.0"
] | null | null | null | import sys
import requests
from bs4 import BeautifulSoup
from urllib import request
args = sys.argv[1]
url = args
response = request.urlopen(url)
soup = BeautifulSoup(response, features = "html.parser")
response.close()
print(soup.title.text)
print(soup.pre.text)
| 20.384615 | 56 | 0.777358 |
babe753c663e8e6eda5976d8debb36989d7c6a88 | 3,794 | py | Python | app/validation.py | chrieke/vector-validator | 538672664310c6237bb37d6c264ac68cdad7d505 | [
"MIT"
] | 11 | 2021-04-01T04:10:06.000Z | 2022-01-18T07:02:29.000Z | app/validation.py | chrieke/vector-validator | 538672664310c6237bb37d6c264ac68cdad7d505 | [
"MIT"
] | 1 | 2021-04-06T14:37:45.000Z | 2021-04-13T21:02:27.000Z | app/validation.py | chrieke/vector-validator | 538672664310c6237bb37d6c264ac68cdad7d505 | [
"MIT"
] | 1 | 2022-01-18T07:02:53.000Z | 2022-01-18T07:02:53.000Z | from typing import List, Union
from geopandas import GeoDataFrame
| 31.098361 | 79 | 0.56932 |
babe8b95850690a2a05a8ea7152e079552a4a989 | 218 | py | Python | boaapi/status.py | boalang/api-python | f68ba63bbec5c8c5ed769eb1d0788561fc358a3b | [
"Apache-2.0"
] | 3 | 2020-08-19T09:55:00.000Z | 2021-12-29T16:30:11.000Z | boaapi/status.py | boalang/api-python | f68ba63bbec5c8c5ed769eb1d0788561fc358a3b | [
"Apache-2.0"
] | 1 | 2022-02-06T19:11:49.000Z | 2022-02-07T01:28:45.000Z | boaapi/status.py | boalang/api-python | f68ba63bbec5c8c5ed769eb1d0788561fc358a3b | [
"Apache-2.0"
] | 1 | 2019-09-02T17:53:21.000Z | 2019-09-02T17:53:21.000Z | from enum import Enum
| 14.533333 | 28 | 0.582569 |
babf1c5d1dc172f7d693916c24dae0cf6a628224 | 5,815 | py | Python | src/cfgparse.py | user12986714/SpamSoup | 3dace5ed99083995d5d6a25b1abfe9eec7e65b6c | [
"Unlicense"
] | null | null | null | src/cfgparse.py | user12986714/SpamSoup | 3dace5ed99083995d5d6a25b1abfe9eec7e65b6c | [
"Unlicense"
] | 29 | 2020-06-06T22:35:05.000Z | 2020-07-18T15:42:19.000Z | src/cfgparse.py | user12986714/SpamSoup | 3dace5ed99083995d5d6a25b1abfe9eec7e65b6c | [
"Unlicense"
] | 1 | 2020-06-29T06:38:11.000Z | 2020-06-29T06:38:11.000Z | # coding=utf-8
import json
import decorator
import verinfo
def resolve_path(base, path):
""" Resolve (some) relative path. """
if path[0] == "/":
# Absolute path
return path
return base + path
def depth_first_parser(data_base, route, exec_cfg):
""" Depth first parser for ml route. "... | 37.75974 | 110 | 0.553568 |
babf2401c1d04931b1444d02cca839b3978bfc18 | 7,316 | py | Python | settings_window.py | Lewak/PracaMagisterska | 9e82e905ca008430b01792eb00df180f990f0654 | [
"MIT"
] | null | null | null | settings_window.py | Lewak/PracaMagisterska | 9e82e905ca008430b01792eb00df180f990f0654 | [
"MIT"
] | null | null | null | settings_window.py | Lewak/PracaMagisterska | 9e82e905ca008430b01792eb00df180f990f0654 | [
"MIT"
] | null | null | null | #dada
from dearpygui import core, simple
from generic_window import GenericWindow
from tensor_flow_interface import TensorFlowInterface
from tensor_flow_interface import ModelDataContainer
from import_window import ImportWindow
from output_visualisation_window import OutputVisualisationWindow
from better_visualizer imp... | 49.100671 | 212 | 0.709541 |
bac02f9420e1a152c687e6ca65c38d615edd2218 | 3,284 | py | Python | word_segmentation.py | yuhsiangfu/news-analysis | cc094420e6298b61844ebc3be8851badc264c294 | [
"MIT"
] | null | null | null | word_segmentation.py | yuhsiangfu/news-analysis | cc094420e6298b61844ebc3be8851badc264c294 | [
"MIT"
] | null | null | null | word_segmentation.py | yuhsiangfu/news-analysis | cc094420e6298b61844ebc3be8851badc264c294 | [
"MIT"
] | null | null | null | # import modular
import collections
import jieba
import json
import os
import os.path
import sys
# define variables
DIRNAME_NEWS = "news\\"
DIRNAME_WORDS = "words\\"
FILENAME_STOP_WORDS = "stopwords_all.txt"
FILENAME_USER_DICT = "userdict_all.txt"
NON_BMP_MAP = dict.fromkeys(range(0x10000, sys.maxunicod... | 30.12844 | 128 | 0.520706 |
bac1a879b7217b1098f8cc504f841bb3e5af5775 | 7,315 | py | Python | data/vqa.py | BUAAw-ML/KE-OPT | d957798ccd62b8e98ab2bbed9562c50bd5f772f9 | [
"MIT"
] | null | null | null | data/vqa.py | BUAAw-ML/KE-OPT | d957798ccd62b8e98ab2bbed9562c50bd5f772f9 | [
"MIT"
] | null | null | null | data/vqa.py | BUAAw-ML/KE-OPT | d957798ccd62b8e98ab2bbed9562c50bd5f772f9 | [
"MIT"
] | null | null | null | """
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
VQA dataset
"""
import torch
from torch.nn.utils.rnn import pad_sequence
from toolz.sandbox import unzip
from .data import TxtVideoAudioDataset, TxtMapper
import json
import os
import string
punctuation = string.punctuation
from pytorch_pretrai... | 34.504717 | 96 | 0.645113 |
bac203797720f8182f74be38446757d3fb8d706e | 4,345 | py | Python | source/keeper/storage/streams.py | rob-smallshire/keeper | 560427b2b7d8df6b0fcc24f52380fc0d50ffef19 | [
"MIT"
] | 1 | 2021-02-25T21:16:50.000Z | 2021-02-25T21:16:50.000Z | source/keeper/storage/streams.py | rob-smallshire/keeper | 560427b2b7d8df6b0fcc24f52380fc0d50ffef19 | [
"MIT"
] | 1 | 2020-11-04T12:32:07.000Z | 2020-11-05T11:15:15.000Z | source/keeper/storage/streams.py | rob-smallshire/keeper | 560427b2b7d8df6b0fcc24f52380fc0d50ffef19 | [
"MIT"
] | 1 | 2020-11-11T13:29:37.000Z | 2020-11-11T13:29:37.000Z | import io
def flush(self):
return self._f.flush()
def isatty(self):
return self._f.isatty() | 23.61413 | 82 | 0.608976 |
bac5b4b38a78ca5bdb0f775ea7cef114d7faeffb | 2,768 | py | Python | main/python/model/Base.py | ShangxuanWu/MT_python | b64bea6e773d9f0df3f8f850252a909e6e4afff5 | [
"CNRI-Python"
] | null | null | null | main/python/model/Base.py | ShangxuanWu/MT_python | b64bea6e773d9f0df3f8f850252a909e6e4afff5 | [
"CNRI-Python"
] | null | null | null | main/python/model/Base.py | ShangxuanWu/MT_python | b64bea6e773d9f0df3f8f850252a909e6e4afff5 | [
"CNRI-Python"
] | null | null | null | # Shangxuan Wu @ Myraid of Things
# 31 Jun 2017
# add path for root ('tf_code/') directory if not in sys.path
import sys, os
root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
if root_path not in sys.path
sys.path.append(root_path)
from main.python.utils impo... | 32.186047 | 105 | 0.67052 |
bac5fc1e09a2e012dfac85c34379f3c2de92c1a0 | 771 | py | Python | src/integration-tests/expecteds/py/duplicate-names.py | shanejonas/transpiler | ed293861635c23c004ef8276196e461ca5b940db | [
"Apache-2.0"
] | 5 | 2020-10-26T23:32:25.000Z | 2022-01-20T17:02:18.000Z | src/integration-tests/expecteds/py/duplicate-names.py | shanejonas/transpiler | ed293861635c23c004ef8276196e461ca5b940db | [
"Apache-2.0"
] | 525 | 2020-04-20T08:58:52.000Z | 2022-03-26T02:26:13.000Z | src/integration-tests/expecteds/py/duplicate-names.py | shanejonas/transpiler | ed293861635c23c004ef8276196e461ca5b940db | [
"Apache-2.0"
] | 6 | 2020-10-26T23:32:45.000Z | 2021-12-29T18:03:03.000Z | from typing import NewType
from typing import Union
from typing import List
from typing import Tuple
from typing import TypedDict
from typing import Optional
Baz = NewType("Baz", bool)
Foo = NewType("Foo", str)
"""array of strings is all...
"""
UnorderedSetOfFooz1UBFn8B = NewType("UnorderedSetOfFooz1UBFn8B", List[Foo... | 29.653846 | 150 | 0.788586 |
bac65dbd6a7060ed2081b0cb0b52496151e704ac | 292 | py | Python | Software/__init__.py | justins0923/zephyrus-iaq | 10e5f14f4dc0d1d72a2eff928df4ad572fc99e4c | [
"MIT"
] | 1 | 2019-11-05T18:45:52.000Z | 2019-11-05T18:45:52.000Z | Software/__init__.py | justins0923/zephyrus-iaq | 10e5f14f4dc0d1d72a2eff928df4ad572fc99e4c | [
"MIT"
] | null | null | null | Software/__init__.py | justins0923/zephyrus-iaq | 10e5f14f4dc0d1d72a2eff928df4ad572fc99e4c | [
"MIT"
] | null | null | null | Software/
Config/
GUI/
IAQ_GUI.py
HAT/
IAQ_DAC43608.py
IAQ_Mux.py
Sensors/
IAQ_Sensor.py
IAQ_MqGas.py
third_party/
bme680-python
IAQ_AnalogPortController.py
IAQ_Exceptions.py
IAQ_FileHandler.py
IAQ_Logger.py
| 17.176471 | 31 | 0.60274 |
bac7916afa7e6b2813f450c6068dae12eac86200 | 4,373 | py | Python | tst/lyap/verifier/test_Z3Verifier.py | oxford-oxcav/fossil | f5b8e2bba80d8792b149ee75b51d3ee74df9b88e | [
"BSD-3-Clause"
] | 1 | 2021-05-21T17:24:31.000Z | 2021-05-21T17:24:31.000Z | tst/lyap/verifier/test_Z3Verifier.py | oxford-oxcav/fossil | f5b8e2bba80d8792b149ee75b51d3ee74df9b88e | [
"BSD-3-Clause"
] | null | null | null | tst/lyap/verifier/test_Z3Verifier.py | oxford-oxcav/fossil | f5b8e2bba80d8792b149ee75b51d3ee74df9b88e | [
"BSD-3-Clause"
] | 1 | 2021-11-09T15:35:26.000Z | 2021-11-09T15:35:26.000Z | # Copyright (c) 2021, Alessandro Abate, Daniele Ahmed, Alec Edwards, Mirco Giacobbe, Andrea Peruffo
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from src.lyap.verifier.z3verifier import Z3Ve... | 36.747899 | 99 | 0.621541 |
bac852e76d72f264f2be673496b458a4609e122d | 2,102 | py | Python | repoxplorer/controllers/tags.py | Priya-100/repoxplorer | 45fba33cf27702a56cea54cb9f7afa472ef5498c | [
"Apache-2.0"
] | 107 | 2016-05-05T19:41:12.000Z | 2022-01-29T22:49:03.000Z | repoxplorer/controllers/tags.py | Priya-100/repoxplorer | 45fba33cf27702a56cea54cb9f7afa472ef5498c | [
"Apache-2.0"
] | 68 | 2016-05-08T13:30:07.000Z | 2021-12-22T21:33:39.000Z | repoxplorer/controllers/tags.py | Priya-100/repoxplorer | 45fba33cf27702a56cea54cb9f7afa472ef5498c | [
"Apache-2.0"
] | 27 | 2018-08-31T09:27:41.000Z | 2022-02-17T03:35:53.000Z | # Copyright 2017, Fabien Boucher
# Copyright 2017, Red Hat
#
# 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 appli... | 36.877193 | 79 | 0.653663 |
baca64a9bf13dbe3eddf574f91adf4b6870c2ccb | 40,884 | py | Python | config/includes.chroot/etc/skel/.weechat/python/weeget.py | ddarksmith/S0lar0S | b91971000c089f77d1ff76a00262252a65680e5b | [
"WTFPL"
] | null | null | null | config/includes.chroot/etc/skel/.weechat/python/weeget.py | ddarksmith/S0lar0S | b91971000c089f77d1ff76a00262252a65680e5b | [
"WTFPL"
] | null | null | null | config/includes.chroot/etc/skel/.weechat/python/weeget.py | ddarksmith/S0lar0S | b91971000c089f77d1ff76a00262252a65680e5b | [
"WTFPL"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2012 Sebastien Helleu <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your opt... | 42.279214 | 126 | 0.550215 |
bacc74e14cea55ddb3f53681cd742f9b52ee85c7 | 310 | py | Python | output/models/nist_data/atomic/non_positive_integer/schema_instance/nistschema_sv_iv_atomic_non_positive_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/non_positive_integer/schema_instance/nistschema_sv_iv_atomic_non_positive_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/non_positive_integer/schema_instance/nistschema_sv_iv_atomic_non_positive_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.atomic.non_positive_integer.schema_instance.nistschema_sv_iv_atomic_non_positive_integer_pattern_1_xsd.nistschema_sv_iv_atomic_non_positive_integer_pattern_1 import NistschemaSvIvAtomicNonPositiveIntegerPattern1
__all__ = [
"NistschemaSvIvAtomicNonPositiveIntegerPattern1",
]
| 51.666667 | 240 | 0.912903 |
bacc8d6c0e83a1a56af59ed1571c25b1d3982f6b | 4,269 | py | Python | vizMetrics.py | binocularity/vizMetrics | df0d1ab856a938be2e65dcefc26cb1c7979db895 | [
"Apache-2.0"
] | null | null | null | vizMetrics.py | binocularity/vizMetrics | df0d1ab856a938be2e65dcefc26cb1c7979db895 | [
"Apache-2.0"
] | null | null | null | vizMetrics.py | binocularity/vizMetrics | df0d1ab856a938be2e65dcefc26cb1c7979db895 | [
"Apache-2.0"
] | null | null | null | #
#
# vizMetrics - an interactive toolset for calculating visualization metrics
#
#
#
import os
from kivy.app import App
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.lang import Builder
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import StringProperty
f... | 29.040816 | 105 | 0.691263 |
bacf4d39f5fbeb42654a350adf51085e8d3342f4 | 3,988 | py | Python | gen_from_config.py | aftermisak/LuaAdapter_AutoGeneration | 2303ca439195bc93338e0138d9b63907321f8278 | [
"MIT"
] | null | null | null | gen_from_config.py | aftermisak/LuaAdapter_AutoGeneration | 2303ca439195bc93338e0138d9b63907321f8278 | [
"MIT"
] | null | null | null | gen_from_config.py | aftermisak/LuaAdapter_AutoGeneration | 2303ca439195bc93338e0138d9b63907321f8278 | [
"MIT"
] | null | null | null | #coding=utf8
import sys
import json
codes_fmt = '''
auto ns = LuaAdapterEnvironment::getInstance().getNamespace("%s");
ns->begin();
{
ns->registerClass("%s", typeid(%s));
auto cls = ns->getClass("%s");
cls->begin();
%s//extends
%s//constructors
%s//destructor
%s//nonmember variables
%s//member vari... | 33.512605 | 136 | 0.695587 |
bacfca92e194bbbf998d8a83fbe671c5707d212b | 1,381 | py | Python | IMUGrabberPython/imugrabber/tests/fong_tests.py | maxlem/AVRCpp | 63349326c7e326da2309d92857dd14735ef4f51d | [
"MIT"
] | null | null | null | IMUGrabberPython/imugrabber/tests/fong_tests.py | maxlem/AVRCpp | 63349326c7e326da2309d92857dd14735ef4f51d | [
"MIT"
] | null | null | null | IMUGrabberPython/imugrabber/tests/fong_tests.py | maxlem/AVRCpp | 63349326c7e326da2309d92857dd14735ef4f51d | [
"MIT"
] | null | null | null | '''
Created on 2009-08-11
@author: malem303
'''
import unittest
from imugrabber.algorithms import fong_accelero, utils, statistics
from imugrabber.algorithms import io
import os
import scipy as sp
from numpy import testing
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main... | 32.880952 | 104 | 0.585083 |
bad31635f08436ee2a866d2a03d49721eb7a8118 | 603 | py | Python | discord_key_bot/colours.py | gadogttas/discord-key-bot | 230cbc1ea90cb751cc113b3ad12b3794a9ed162d | [
"Unlicense"
] | 1 | 2021-12-01T05:33:47.000Z | 2021-12-01T05:33:47.000Z | discord_key_bot/colours.py | bayangan1991/discord-key-bot | e1ed7d23d639cc04163c0af7d32a02134c95e930 | [
"Unlicense"
] | null | null | null | discord_key_bot/colours.py | bayangan1991/discord-key-bot | e1ed7d23d639cc04163c0af7d32a02134c95e930 | [
"Unlicense"
] | 1 | 2021-11-06T22:07:40.000Z | 2021-11-06T22:07:40.000Z | from enum import IntEnum, unique
| 20.793103 | 34 | 0.669983 |
bad372f59eceb34c0bd08e617152894bf7213f32 | 4,530 | py | Python | twtinsights.py | iamvineeth23/twtinsights | 3593f10479f34340a657c21859b578ff18fa12a8 | [
"MIT"
] | null | null | null | twtinsights.py | iamvineeth23/twtinsights | 3593f10479f34340a657c21859b578ff18fa12a8 | [
"MIT"
] | null | null | null | twtinsights.py | iamvineeth23/twtinsights | 3593f10479f34340a657c21859b578ff18fa12a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 1 18:25:21 2020
@author: vinnie
"""
import tweepy
from collections import defaultdict
import pandas as pd
import argparse
import os
from stats import tweet_analyzer
from wordanalysis import WordsAnalysis
from keys import (
api_key,
api_se... | 28.670886 | 136 | 0.575938 |
bad719cf9311790e0960fabcfa0c5d3ced6ef911 | 1,392 | py | Python | pcdet/models/dense_heads/__init__.py | ocNflag/point2seq | 710686f576b3df5469a06c66860758b25f852dbd | [
"Apache-2.0"
] | 21 | 2022-03-24T09:37:38.000Z | 2022-03-31T13:21:54.000Z | pcdet/models/dense_heads/__init__.py | ocNflag/point2seq | 710686f576b3df5469a06c66860758b25f852dbd | [
"Apache-2.0"
] | null | null | null | pcdet/models/dense_heads/__init__.py | ocNflag/point2seq | 710686f576b3df5469a06c66860758b25f852dbd | [
"Apache-2.0"
] | 1 | 2022-03-24T09:37:48.000Z | 2022-03-24T09:37:48.000Z | from .anchor_head_multi import AnchorHeadMulti
from .anchor_head_single import AnchorHeadSingle
from .anchor_head_template import AnchorHeadTemplate
from .point_head_box import PointHeadBox
from .point_head_simple import PointHeadSimple
from .point_intra_part_head import PointIntraPartOffsetHead
from .anchor_head_seg i... | 33.142857 | 59 | 0.808908 |
bad73494b48c4c4a78b1757a8910e49eba34ac3a | 12,506 | py | Python | morph_approach_v0.6.py | rivernuthead/DoD_analysis | b06219d4026e89a9b9f1e8939010a63612750c80 | [
"MIT"
] | null | null | null | morph_approach_v0.6.py | rivernuthead/DoD_analysis | b06219d4026e89a9b9f1e8939010a63612750c80 | [
"MIT"
] | null | null | null | morph_approach_v0.6.py | rivernuthead/DoD_analysis | b06219d4026e89a9b9f1e8939010a63612750c80 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 15 09:44:30 2021
@author: erri
"""
import os
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap, BoundaryNorm
#############################################################################################... | 39.955272 | 120 | 0.563649 |
bad76dfcd2609b2507329453ee6f5bac67a31210 | 2,083 | py | Python | examples/example_flow.py | Shchusia/orchestrator | 993935a8e22b617d5618fc298b0f6414498c5ab1 | [
"Unlicense"
] | 1 | 2021-04-09T11:58:29.000Z | 2021-04-09T11:58:29.000Z | examples/example_flow.py | Shchusia/orchestrator | 993935a8e22b617d5618fc298b0f6414498c5ab1 | [
"Unlicense"
] | null | null | null | examples/example_flow.py | Shchusia/orchestrator | 993935a8e22b617d5618fc298b0f6414498c5ab1 | [
"Unlicense"
] | null | null | null | """
ExampleFlow
"""
from orchestrator_service import Block
from orchestrator_service import Flow, FlowBlock, FlowBuilder
from orchestrator_service import Message, MessageCustom
if __name__ == '__main__':
msg_2 = MessageCustom(body={}, header={'source': 'second'})
msg_3 = MessageCustom(body={... | 23.144444 | 64 | 0.543447 |
bad7d648118bd2858bf49d2a44a2f4cfe07ecd25 | 465 | py | Python | tests/factories/input/types/float_input.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 1 | 2020-12-30T12:43:34.000Z | 2020-12-30T12:43:34.000Z | tests/factories/input/types/float_input.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 59 | 2019-12-25T13:14:56.000Z | 2021-07-22T12:24:46.000Z | tests/factories/input/types/float_input.py | TheLabbingProject/django_analyses | 08cac40a32754a265b37524f08ec6160c69ebea8 | [
"Apache-2.0"
] | 2 | 2020-05-24T06:44:27.000Z | 2020-07-09T15:47:31.000Z | from factory import SubFactory
from factory.django import DjangoModelFactory
from factory.faker import Faker
| 31 | 94 | 0.765591 |
bad8f5ba5bba6f1c09743a472987af8c5e7d904e | 291 | py | Python | tests/supply-test.py | perpetualCreations/bandage | 1b61b9b9ac68a5a59dbbb4b5586c22f6961e935b | [
"MIT"
] | 1 | 2021-03-21T05:04:42.000Z | 2021-03-21T05:04:42.000Z | tests/supply-test.py | perpetualCreations/bandage | 1b61b9b9ac68a5a59dbbb4b5586c22f6961e935b | [
"MIT"
] | null | null | null | tests/supply-test.py | perpetualCreations/bandage | 1b61b9b9ac68a5a59dbbb4b5586c22f6961e935b | [
"MIT"
] | null | null | null | """unit test for bandage.Supply"""
import bandage
supplier = bandage.Supply(
"https://github.com/perpetualCreations/bandage/releases/tag/BANDAGE",
"F://bandage//tests//test_target//VERSION")
print(supplier.realize())
print(supplier.pre_collect_dump())
print(supplier.version_gap)
| 24.25 | 73 | 0.752577 |
badae7fa2546703ec6a20b95cc69a793bfa6b940 | 492 | py | Python | desktop/core/ext-py/greenlet-0.3.1/tests/test_weakref.py | digideskio/hortonworks-sandbox | dd8e95c91faee3daa094707baeb94c3953b41efa | [
"Apache-2.0"
] | 19 | 2015-05-01T19:59:03.000Z | 2021-12-09T08:03:16.000Z | desktop/core/ext-py/greenlet-0.3.1/tests/test_weakref.py | digideskio/hortonworks-sandbox | dd8e95c91faee3daa094707baeb94c3953b41efa | [
"Apache-2.0"
] | 1 | 2018-01-03T15:26:49.000Z | 2018-01-03T15:26:49.000Z | desktop/core/ext-py/greenlet-0.3.1/tests/test_weakref.py | hortonworks/hortonworks-sandbox | dd8e95c91faee3daa094707baeb94c3953b41efa | [
"Apache-2.0"
] | 30 | 2015-03-25T19:40:07.000Z | 2021-05-28T22:59:26.000Z | import gc
import greenlet
import weakref
import unittest
| 24.6 | 46 | 0.617886 |
badc471c18802ff07742dbc8a984c7483d241aed | 334 | py | Python | unit6/spiders/p5_downloader_middleware_handson/p5_downloader_middleware_handson/settings.py | nulearn3296/scrapy-training | 8981dbc33b68bd7246839eee34ca8266d5a0066f | [
"BSD-3-Clause"
] | 182 | 2017-04-05T23:39:22.000Z | 2022-02-22T19:49:52.000Z | unit6/spiders/p5_downloader_middleware_handson/p5_downloader_middleware_handson/settings.py | nulearn3296/scrapy-training | 8981dbc33b68bd7246839eee34ca8266d5a0066f | [
"BSD-3-Clause"
] | 3 | 2017-04-18T07:16:39.000Z | 2019-05-04T22:54:53.000Z | unit6/spiders/p5_downloader_middleware_handson/p5_downloader_middleware_handson/settings.py | nulearn3296/scrapy-training | 8981dbc33b68bd7246839eee34ca8266d5a0066f | [
"BSD-3-Clause"
] | 53 | 2017-04-07T03:25:54.000Z | 2022-02-21T21:51:01.000Z | BOT_NAME = 'p5_downloader_middleware_handson'
SPIDER_MODULES = ['p5_downloader_middleware_handson.spiders']
NEWSPIDER_MODULE = 'p5_downloader_middleware_handson.spiders'
ROBOTSTXT_OBEY = True
DOWNLOADER_MIDDLEWARES = {
'p5_downloader_middleware_handson.middlewares.SeleniumDownloaderMiddleware': 543,
}
SELENIUM_E... | 27.833333 | 85 | 0.844311 |
badd5ae6da50e2f10d1862e8ec10efc717872601 | 5,392 | py | Python | utils/functions.py | rvhonorato/gdock | 36b05dd17457ef49f0d20caaa21742c3b57e78d8 | [
"RSA-MD"
] | 5 | 2020-11-12T20:35:21.000Z | 2022-02-01T09:54:16.000Z | utils/functions.py | rvhonorato/gdock | 36b05dd17457ef49f0d20caaa21742c3b57e78d8 | [
"RSA-MD"
] | 12 | 2022-01-21T16:46:38.000Z | 2022-02-26T12:07:06.000Z | utils/functions.py | rvhonorato/gdock | 36b05dd17457ef49f0d20caaa21742c3b57e78d8 | [
"RSA-MD"
] | 1 | 2021-11-04T14:22:29.000Z | 2021-11-04T14:22:29.000Z | import shlex
import tempfile
import subprocess # nosec
import os
import logging
import secrets
import ast
import numpy
import sys
import configparser
from pathlib import Path
from utils.files import get_full_path
ga_log = logging.getLogger('ga_log')
etc_folder = get_full_path('etc')
ini = configparser.ConfigParser(o... | 32.287425 | 79 | 0.561202 |
bade483fcb1821220372bd41e8ce8d6fdbb4b560 | 1,699 | py | Python | BendersDecomposition/cplex.py | prameshk/Discrete-Optimization | 7cfb1e0977ab071ba5faf2b515e7838ff09fe579 | [
"MIT"
] | 4 | 2021-06-16T07:04:08.000Z | 2021-11-08T21:35:01.000Z | BendersDecomposition/cplex.py | prameshk/Discrete-Optimization | 7cfb1e0977ab071ba5faf2b515e7838ff09fe579 | [
"MIT"
] | null | null | null | BendersDecomposition/cplex.py | prameshk/Discrete-Optimization | 7cfb1e0977ab071ba5faf2b515e7838ff09fe579 | [
"MIT"
] | 1 | 2021-11-08T21:51:30.000Z | 2021-11-08T21:51:30.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Dec 30 22:26:17 2020
@author: Pramesh Kumar
"""
import numpy as np
import time
# Step 1: Initialize variables
C = 1000
F = 10
# Step 2: Start clock
ts = time.time()
# Step 3: Generate instance
C, F, p, f = generateFacilityLocationData(C,F)
##############################... | 28.316667 | 126 | 0.493231 |
badfbbd9b56faf325b5fbd4b579894848be72795 | 2,366 | py | Python | triangle.py | StephanieSunshine/py-pascals-triangle | f6cbcfcf3221e82ee6d704855c99863852fdecf4 | [
"MIT"
] | null | null | null | triangle.py | StephanieSunshine/py-pascals-triangle | f6cbcfcf3221e82ee6d704855c99863852fdecf4 | [
"MIT"
] | null | null | null | triangle.py | StephanieSunshine/py-pascals-triangle | f6cbcfcf3221e82ee6d704855c99863852fdecf4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Pascals triangle
# 2022 Stephanie Sunshine -- MIT License
import colorama
from colorama import Fore
from colorama import Style
C = "A "
SEED = 3
ITERATIONS = 49
SCREEN_WIDTH = 160
colorama.init()
# make traversal easy
children = []
# row 1 has no parents
prev_row = [None, None]
for row in... | 26.288889 | 123 | 0.567202 |
bae0fd3130d9a4cca880665d56041933ff8c8cae | 1,058 | py | Python | tests/unit_tests/test_parser_pin.py | mobiusklein/mokapot | 5148da1c09cfc92f9b776ae8306619429d0656cb | [
"Apache-2.0"
] | 14 | 2019-09-14T19:47:58.000Z | 2021-07-25T21:10:50.000Z | tests/unit_tests/test_parser_pin.py | mobiusklein/mokapot | 5148da1c09cfc92f9b776ae8306619429d0656cb | [
"Apache-2.0"
] | 28 | 2020-09-29T19:38:29.000Z | 2022-03-30T05:02:56.000Z | tests/unit_tests/test_parser_pin.py | mobiusklein/mokapot | 5148da1c09cfc92f9b776ae8306619429d0656cb | [
"Apache-2.0"
] | 6 | 2020-09-29T19:12:02.000Z | 2022-03-18T17:39:16.000Z | """Test that parsing Percolator input files works correctly"""
import pytest
import mokapot
import pandas as pd
def test_pin_parsing(std_pin):
"""Test pin parsing"""
df = mokapot.read_pin(std_pin, to_df=True)
assert df["LaBel"].dtype == "bool"
assert len(df) == 2
assert len(df[df["LaBel"]]) == 1
... | 27.842105 | 70 | 0.635161 |
bae3c98709fe8f290b3fd14acfa7ef132a814086 | 11,428 | py | Python | test.py | ostcar/file_merge | 2a33b6de707fe251963b4ce42d3a77925c71a524 | [
"MIT"
] | 1 | 2016-01-30T08:23:44.000Z | 2016-01-30T08:23:44.000Z | test.py | ostcar/file_merge | 2a33b6de707fe251963b4ce42d3a77925c71a524 | [
"MIT"
] | null | null | null | test.py | ostcar/file_merge | 2a33b6de707fe251963b4ce42d3a77925c71a524 | [
"MIT"
] | null | null | null | import unittest
import fake_filesystem
import file_merge.inode
# Do not print anything.
file_merge.utils.VERBOSE_LEVEL = 0
# Create a fake file system and some fake objects
filesystem = fake_filesystem.FakeFilesystem()
os = fake_filesystem.FakeOsModule(filesystem)
open = fake_filesystem.FakeFileOpen(filesystem)
# ... | 35.824451 | 107 | 0.643157 |
bae51954f7291dc684ae3b7e0bec963e4a16c4b2 | 3,748 | py | Python | tests/core/middleware/test_token_authentication.py | D0rs4n/api | 530a62fae664475e8e6c6caf1a92dc198d8623ea | [
"MIT"
] | null | null | null | tests/core/middleware/test_token_authentication.py | D0rs4n/api | 530a62fae664475e8e6c6caf1a92dc198d8623ea | [
"MIT"
] | 1 | 2021-06-14T19:41:21.000Z | 2021-06-14T19:41:21.000Z | tests/core/middleware/test_token_authentication.py | D0rs4n/api | 530a62fae664475e8e6c6caf1a92dc198d8623ea | [
"MIT"
] | null | null | null | import itertools
import json
import typing
from unittest.mock import Mock, patch
import pytest
from hypothesis import assume, given
from hypothesis.strategies import text
from starlette.authentication import AuthCredentials, AuthenticationError, SimpleUser
from starlette.responses import JSONResponse
from api.core im... | 29.746032 | 85 | 0.739328 |
bae579336fd33b78fe74ee10d59617926f6afd6e | 1,188 | py | Python | testing_dns.py | bcklexisnexis/dba_automations | efbe7e4609c6e23c6f457960c37a416e9efcb7e6 | [
"Unlicense"
] | null | null | null | testing_dns.py | bcklexisnexis/dba_automations | efbe7e4609c6e23c6f457960c37a416e9efcb7e6 | [
"Unlicense"
] | null | null | null | testing_dns.py | bcklexisnexis/dba_automations | efbe7e4609c6e23c6f457960c37a416e9efcb7e6 | [
"Unlicense"
] | null | null | null | import socket
import argparse
def get_ip(dn):
"""
Returns first ip address that corresponds
to domain name.
"""
try:
data = socket.gethostbyname(dn)
ip = repr(data)
return ip
except Exception:
return False
def get_ipx(dn):
"""
Returns all ip addresses... | 18.5625 | 50 | 0.570707 |
bae7cca8444daf84b1303c7cc23d26eea6613a64 | 29,137 | py | Python | track_vehicles.py | StoicLobster/Udacity-SelfDrivingCar-T1P5 | 7c545c97017a6ede44549a7cccfbb95792df3397 | [
"MIT"
] | null | null | null | track_vehicles.py | StoicLobster/Udacity-SelfDrivingCar-T1P5 | 7c545c97017a6ede44549a7cccfbb95792df3397 | [
"MIT"
] | null | null | null | track_vehicles.py | StoicLobster/Udacity-SelfDrivingCar-T1P5 | 7c545c97017a6ede44549a7cccfbb95792df3397 | [
"MIT"
] | null | null | null | ## Import
import numpy as np
import cv2
from skimage.feature import hog
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import pickle
from scipy.ndimage.measurements import label
import time
import glob
from sklearn import svm, grid_search
from sklearn.preprocessing import StandardScaler
# NOTE: the ne... | 42.350291 | 167 | 0.592854 |
bae8b718e3446380ed825168a0cb10c9cc92ed7b | 881 | py | Python | authentication/urls.py | shuoO-24/QA-Community | f993fa811e6b266f0ae13612e6183542753a1fc2 | [
"MIT"
] | null | null | null | authentication/urls.py | shuoO-24/QA-Community | f993fa811e6b266f0ae13612e6183542753a1fc2 | [
"MIT"
] | null | null | null | authentication/urls.py | shuoO-24/QA-Community | f993fa811e6b266f0ae13612e6183542753a1fc2 | [
"MIT"
] | null | null | null | from django.urls import include, path
# auth_views django.contrib.auth.views
from django.contrib.auth import views as auth_views
from .views import UserSignupView
# {% url %}
# {% url 'authentication:signup' %}
# authentication name signup path
app_name = 'authentication'
urlpatterns = [
# path route... | 32.62963 | 68 | 0.723042 |
bae9abee735558f26edead261f576dc0f852beff | 380 | py | Python | script_napari.py | plotly/dash-3d-viz | 496d521ffb2f394a2f7a3a1b68c9d5776bf1a028 | [
"MIT"
] | 2 | 2020-06-04T20:56:52.000Z | 2020-06-05T11:06:44.000Z | script_napari.py | plotly/dash-3d-viz | 496d521ffb2f394a2f7a3a1b68c9d5776bf1a028 | [
"MIT"
] | 1 | 2020-06-16T20:31:57.000Z | 2020-06-17T15:00:53.000Z | script_napari.py | plotly/dash-3d-viz | 496d521ffb2f394a2f7a3a1b68c9d5776bf1a028 | [
"MIT"
] | null | null | null | import napari
from nilearn import image
from skimage import segmentation
img = image.image.load_img('assets/BraTS19_2013_10_1_flair.nii').get_data()
viewer = napari.view_image(img)
pix = segmentation.slic(img, n_segments=10000, compactness=0.002, multichannel=False,
)
pix_boundaries = segmenta... | 31.666667 | 85 | 0.768421 |
baea3b2f8575034be19e0d6d559722c78a729f7c | 188 | py | Python | sudkampPython/turingMachAlgs.py | thundergolfer/sudkamp-langs-machines-python | 04e07758464891dd9815a9578cf158638bab8f24 | [
"MIT"
] | 8 | 2016-08-21T10:28:35.000Z | 2017-05-30T12:33:50.000Z | sudkampPython/turingMachAlgs.py | thundergolfer/sudkamp-langs-machines-python | 04e07758464891dd9815a9578cf158638bab8f24 | [
"MIT"
] | 1 | 2018-02-27T05:10:19.000Z | 2018-02-27T05:10:19.000Z | sudkampPython/turingMachAlgs.py | thundergolfer/sudkamp-langs-machines-python | 04e07758464891dd9815a9578cf158638bab8f24 | [
"MIT"
] | null | null | null | import turingMachines
| 26.857143 | 47 | 0.542553 |
baea62682ef38e88de63dcad1e80ba987ad9cac0 | 1,708 | py | Python | syllabus/utils/schedulestarter.py | sayamindu/course-starter | f013581ccf774f5e9c86546ab16d59261f7503d8 | [
"MIT"
] | null | null | null | syllabus/utils/schedulestarter.py | sayamindu/course-starter | f013581ccf774f5e9c86546ab16d59261f7503d8 | [
"MIT"
] | null | null | null | syllabus/utils/schedulestarter.py | sayamindu/course-starter | f013581ccf774f5e9c86546ab16d59261f7503d8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import csv
import datetime
import dateutil.relativedelta as relativedelta
import dateutil.rrule as rrule
if __name__ == '__main__':
start, end, days, cols, csvfile = parse_args()
rr = rrule.rrule(rrule.WEEKLY, byweekday=days, dtstart=start)
days = rr.between(start, ... | 34.857143 | 119 | 0.651054 |
baec0cd869d7afb2b17b039efdaef8410a2bebc6 | 249 | py | Python | ws4py/_asyncio_compat.py | diveyez/WebSocket-for-Python | a3e6d157b7bb1da1009e66aa750170f1c07aa143 | [
"BSD-3-Clause"
] | 733 | 2015-01-02T12:11:25.000Z | 2022-03-20T21:00:45.000Z | ws4py/_asyncio_compat.py | diveyez/WebSocket-for-Python | a3e6d157b7bb1da1009e66aa750170f1c07aa143 | [
"BSD-3-Clause"
] | 124 | 2015-01-11T10:22:48.000Z | 2021-11-24T17:44:18.000Z | ws4py/_asyncio_compat.py | diveyez/WebSocket-for-Python | a3e6d157b7bb1da1009e66aa750170f1c07aa143 | [
"BSD-3-Clause"
] | 251 | 2015-01-11T09:39:16.000Z | 2022-02-22T17:22:20.000Z | """Provide compatibility over different versions of asyncio."""
import asyncio
if hasattr(asyncio, "async"):
# Compatibility for Python 3.3 and older
ensure_future = getattr(asyncio, "async")
else:
ensure_future = asyncio.ensure_future | 27.666667 | 63 | 0.742972 |
baf0d4e23de23f1c34b1f0ddba9107cd86bc94e3 | 45 | py | Python | grasshopper/__init__.py | kmarburger/livestock3d | 767e6bd1b7658357f720e112d550416cb7c45226 | [
"MIT"
] | 1 | 2021-03-05T16:46:30.000Z | 2021-03-05T16:46:30.000Z | grasshopper/__init__.py | kmarburger/livestock3d | 767e6bd1b7658357f720e112d550416cb7c45226 | [
"MIT"
] | 1 | 2018-06-22T11:40:15.000Z | 2018-06-27T16:35:45.000Z | grasshopper/__init__.py | kmarburger/livestock3d | 767e6bd1b7658357f720e112d550416cb7c45226 | [
"MIT"
] | 4 | 2018-03-29T19:41:01.000Z | 2019-12-06T14:06:46.000Z | from . templates import *
from . ssh import * | 22.5 | 25 | 0.711111 |
baf129a810bf414995d2f5915ec8689447b32c3e | 1,093 | py | Python | beproductive/pomodoro.py | JohannesStutz/beproductive | 119e766ba4eb29d16908dd9ff2e9b677a9cec955 | [
"Apache-2.0"
] | 2 | 2021-02-01T23:36:38.000Z | 2021-03-08T04:26:37.000Z | beproductive/pomodoro.py | JohannesStutz/beproductive | 119e766ba4eb29d16908dd9ff2e9b677a9cec955 | [
"Apache-2.0"
] | null | null | null | beproductive/pomodoro.py | JohannesStutz/beproductive | 119e766ba4eb29d16908dd9ff2e9b677a9cec955 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 02_pomodoro.ipynb (unless otherwise specified).
__all__ = ['WORK_TIME', 'BREAK_TIME', 'POMODOROS', 'pomodoro']
# Cell
from time import sleep
from .blocker import *
import sys
WORK_TIME = 25 # minutes
BREAK_TIME = 5 # minutes
POMODOROS = 4
# Cell
| 34.15625 | 113 | 0.63678 |
baf2db26dc2a1baf60400ce6691c5cc2f241ec04 | 794 | py | Python | learnign/2.py | xiaoxin12/pythonlearn | 2d86e77b15f45920e324ab2e888ee3339721265d | [
"Apache-2.0"
] | null | null | null | learnign/2.py | xiaoxin12/pythonlearn | 2d86e77b15f45920e324ab2e888ee3339721265d | [
"Apache-2.0"
] | null | null | null | learnign/2.py | xiaoxin12/pythonlearn | 2d86e77b15f45920e324ab2e888ee3339721265d | [
"Apache-2.0"
] | null | null | null | #
# (I)1010%
# 10201010%107.5%
# 2040205%
# 4060403%
# 60100601.5%
# 1001001%
# I
# !/usr/bin/python
# _*_ coding:UTF-8 _*_
li = ""
arr = [100000, 200000, 400000, 600000, 1000000, 0]
rat = [0.1, 0.075, 0.05, 0.03, 0.015, 0.01 ]
for c in range(1,6,6):
start() | 26.466667 | 56 | 0.586902 |
baf43f38cc9b07342d1f1d2e40a5df32e2005cd5 | 453 | py | Python | AmexTest.py | n1cfury/ViolentPython | c758de753bd56fe8b5c5b6db6f0f1b134023bf6f | [
"MIT"
] | null | null | null | AmexTest.py | n1cfury/ViolentPython | c758de753bd56fe8b5c5b6db6f0f1b134023bf6f | [
"MIT"
] | null | null | null | AmexTest.py | n1cfury/ViolentPython | c758de753bd56fe8b5c5b6db6f0f1b134023bf6f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import re
if __name__ == '__main__':
main()
| 22.65 | 60 | 0.668874 |
baf44ab86b415c0190d926602534d793de744f9b | 620 | py | Python | lab07/filterWord.py | NickStucchi/CSC221 | b6ef5e1df48fb75354c330e3ed20189fca40b339 | [
"MIT"
] | null | null | null | lab07/filterWord.py | NickStucchi/CSC221 | b6ef5e1df48fb75354c330e3ed20189fca40b339 | [
"MIT"
] | null | null | null | lab07/filterWord.py | NickStucchi/CSC221 | b6ef5e1df48fb75354c330e3ed20189fca40b339 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Nick Stucchi
# 03/23/2017
# Filter out words and replace with dashes
if __name__ == "__main__":
main()
| 18.787879 | 84 | 0.58871 |
baf5cd31e38dc263cdc4440453a88e75480f1571 | 7,049 | py | Python | analysis/export.py | sunlightlabs/regulations-scraper | 5f2644a3cf54f915d7d90957645073737ab91022 | [
"BSD-3-Clause"
] | 13 | 2015-09-28T16:59:31.000Z | 2020-06-20T01:23:13.000Z | analysis/export.py | sunlightlabs/regulations-scraper | 5f2644a3cf54f915d7d90957645073737ab91022 | [
"BSD-3-Clause"
] | 1 | 2019-02-18T20:26:21.000Z | 2021-02-25T01:43:44.000Z | analysis/export.py | sunlightlabs/regulations-scraper | 5f2644a3cf54f915d7d90957645073737ab91022 | [
"BSD-3-Clause"
] | 6 | 2015-07-08T22:41:34.000Z | 2019-09-03T18:19:32.000Z | #!/usr/bin/env python
import sys
import os
import csv
import time
import multiprocessing
from Queue import Empty
from datetime import datetime
from collections import namedtuple
from pymongo import Connection
import StringIO
pid = os.getpid()
import_start = time.time()
print '[%s] Loading trie...' % pid
from oxtail.... | 36.335052 | 183 | 0.632714 |
baf894b0dfcabe5ee8bb98007cd88daf0f51c8d4 | 122 | py | Python | popmon/version.py | SCarozza/popmon | 89add7f0c93781526571895c9075d935bdc6d89b | [
"MIT"
] | null | null | null | popmon/version.py | SCarozza/popmon | 89add7f0c93781526571895c9075d935bdc6d89b | [
"MIT"
] | null | null | null | popmon/version.py | SCarozza/popmon | 89add7f0c93781526571895c9075d935bdc6d89b | [
"MIT"
] | null | null | null | """THIS FILE IS AUTO-GENERATED BY SETUP.PY."""
name = "popmon"
version = "0.3.12"
full_version = "0.3.12"
release = True
| 17.428571 | 46 | 0.655738 |
baf8a923f8e86ba94779e8a9219587645f4eb60c | 2,882 | py | Python | CTK/Radio.py | pigmej/CTK | f2e15a190bb5b0c3a6bba3baeeee896da43b97a6 | [
"BSD-3-Clause"
] | 1 | 2018-08-27T11:56:48.000Z | 2018-08-27T11:56:48.000Z | CTK/Radio.py | pigmej/CTK | f2e15a190bb5b0c3a6bba3baeeee896da43b97a6 | [
"BSD-3-Clause"
] | null | null | null | CTK/Radio.py | pigmej/CTK | f2e15a190bb5b0c3a6bba3baeeee896da43b97a6 | [
"BSD-3-Clause"
] | null | null | null | # CTK: Cherokee Toolkit
#
# Authors:
# Taher Shihadeh
# Alvaro Lopez Ortega
#
# Copyright (C) 2010-2011 Alvaro Lopez Ortega
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free Software Foundatio... | 28.254902 | 102 | 0.600278 |
bafb09d54ced0389dfe8042f970928a1b6e44637 | 777 | py | Python | altair_recipes/stripplot.py | piccolbo/altair_recipes | d9013ba60373c353ea14ce192c7dc978cc6836e5 | [
"BSD-3-Clause"
] | 89 | 2018-08-15T16:49:16.000Z | 2022-03-30T12:22:46.000Z | altair_recipes/stripplot.py | piccolbo/altair_recipes | d9013ba60373c353ea14ce192c7dc978cc6836e5 | [
"BSD-3-Clause"
] | 16 | 2018-08-14T17:56:36.000Z | 2022-02-23T05:56:11.000Z | altair_recipes/stripplot.py | piccolbo/altair_recipes | d9013ba60373c353ea14ce192c7dc978cc6836e5 | [
"BSD-3-Clause"
] | 4 | 2018-11-19T05:00:21.000Z | 2020-02-28T19:16:54.000Z | """Generate stripplots."""
from .common import multivariate_preprocess
from .signatures import multivariate_recipe, opacity, color
import altair as alt
from autosig import autosig, Signature
| 31.08 | 88 | 0.693694 |
bafbd573e6799db93aad7945d6800b943fd0c309 | 189 | py | Python | keep_alive.py | LeoATX/blackjack-bot | c4067bf590cbc7f61a25b0fb8447b9fae79d280f | [
"MIT"
] | null | null | null | keep_alive.py | LeoATX/blackjack-bot | c4067bf590cbc7f61a25b0fb8447b9fae79d280f | [
"MIT"
] | null | null | null | keep_alive.py | LeoATX/blackjack-bot | c4067bf590cbc7f61a25b0fb8447b9fae79d280f | [
"MIT"
] | null | null | null | import flask
import threading
app = flask.Flask('main.py')
t = threading.Thread(target=app.run())
t.start()
| 13.5 | 46 | 0.687831 |
bafd0f298ba3b913543c74149f1aa9f9d8ab61b9 | 5,118 | py | Python | rpi-clock.py | ericfitz/lcars-pi-clock | 29991b719f34c172cf122c77c70b233142063007 | [
"Apache-2.0"
] | 2 | 2020-09-09T21:24:52.000Z | 2020-09-20T17:30:28.000Z | rpi-clock.py | ericfitz/lcars-pi-clock | 29991b719f34c172cf122c77c70b233142063007 | [
"Apache-2.0"
] | null | null | null | rpi-clock.py | ericfitz/lcars-pi-clock | 29991b719f34c172cf122c77c70b233142063007 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import os
import logging
import calendar
logging.basicConfig(level=logging.DEBUG)
basepath = os.path.dirname(os.path.realpath(__file__))
logging.debug("base path: %s", basepath)
picdir = os.path.join(basepath, 'pic')
logging.debug("picdir: %s", picdir)
libdir = os.... | 39.068702 | 107 | 0.636968 |
bafd6340165538337f4b9e91f1df7b9aca5de98e | 1,048 | py | Python | reports/urls.py | LCOGT/globalskypartners | ecb4ffc7c8ed0902e71b648907046093ea82dc77 | [
"MIT"
] | null | null | null | reports/urls.py | LCOGT/globalskypartners | ecb4ffc7c8ed0902e71b648907046093ea82dc77 | [
"MIT"
] | 2 | 2021-05-25T13:16:56.000Z | 2021-06-18T08:29:36.000Z | reports/urls.py | LCOGT/globalskypartners | ecb4ffc7c8ed0902e71b648907046093ea82dc77 | [
"MIT"
] | null | null | null | from django.urls import path, include
from .views import ReportCreate, ReportList, ImpactCreate, ReportEdit, \
ReportDetail, ReportAddImpact, DeleteImpact, ReportSubmit, FinalReport
from .plots import meta_plot
urlpatterns = [
path('impact/', ImpactCreate.as_view(), name='report-impact'),
path('create/',... | 49.904762 | 82 | 0.692748 |
bafe7ac606b9b8801391ce23d3b5a2861d6d8cb3 | 314 | py | Python | learning_to_adapt/utils/lda.py | ondrejklejch/learning_to_adapt | 6de0b98370769596da16a1688582925ea2e1fa29 | [
"Apache-2.0"
] | 18 | 2019-10-24T04:42:16.000Z | 2021-11-24T03:07:59.000Z | learning_to_adapt/utils/lda.py | choko/learning_to_adapt | 6de0b98370769596da16a1688582925ea2e1fa29 | [
"Apache-2.0"
] | null | null | null | learning_to_adapt/utils/lda.py | choko/learning_to_adapt | 6de0b98370769596da16a1688582925ea2e1fa29 | [
"Apache-2.0"
] | 4 | 2018-08-31T01:08:50.000Z | 2019-05-10T12:12:57.000Z | import numpy as np
| 18.470588 | 75 | 0.512739 |
2400d60a4d6e3518eb284e789af4504597b07210 | 890 | py | Python | pyarcher/record.py | kylecribbs/pyarcher | c654c971c1f8a230c257b11768258edfda5fda2b | [
"MIT"
] | 3 | 2020-01-20T04:37:29.000Z | 2021-12-02T08:31:20.000Z | pyarcher/record.py | kylecribbs/pyarcher | c654c971c1f8a230c257b11768258edfda5fda2b | [
"MIT"
] | 7 | 2019-11-22T23:32:44.000Z | 2021-05-28T22:29:26.000Z | pyarcher/record.py | kylecribbs/pyarcher | c654c971c1f8a230c257b11768258edfda5fda2b | [
"MIT"
] | 1 | 2020-01-20T04:55:40.000Z | 2020-01-20T04:55:40.000Z | # -*- coding: utf-8 -*-
"""User module."""
from pyarcher.base import ArcherBase
| 27.8125 | 78 | 0.595506 |
24012d90f4f5107433d3a1f7fdfdc8e9f5f6a738 | 3,319 | py | Python | survol/sources_types/com/registered_type_lib/com_registered_type_lib_versions.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | survol/sources_types/com/registered_type_lib/com_registered_type_lib_versions.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | survol/sources_types/com/registered_type_lib/com_registered_type_lib_versions.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Versions of registered COM type libraries
"""
import os
import sys
import lib_util
import lib_common
from lib_properties import pc
import win32con
import win32api
import lib_com_type_lib
Usable = lib_util.UsableWindows
if __name__ == '__main__':
Main()
| 28.612069 | 129 | 0.683338 |
2403d88629fdc712c4bd73bb84c646b45869e60e | 18,927 | py | Python | pretrain.py | ku21fan/STR-Fewer-Labels | 9ca8c5e6707e5ed1300babd5607b1741a916ddda | [
"MIT"
] | 105 | 2021-03-07T05:40:10.000Z | 2022-03-30T02:33:01.000Z | pretrain.py | ku21fan/STR-Fewer-Labels | 9ca8c5e6707e5ed1300babd5607b1741a916ddda | [
"MIT"
] | 4 | 2021-03-22T09:38:21.000Z | 2022-01-13T04:05:02.000Z | pretrain.py | ku21fan/STR-Fewer-Labels | 9ca8c5e6707e5ed1300babd5607b1741a916ddda | [
"MIT"
] | 13 | 2021-06-09T11:37:42.000Z | 2022-03-17T16:14:59.000Z | import os
import sys
import time
import random
import string
import argparse
import torch
import torch.backends.cudnn as cudnn
import torch.nn.init as init
import torch.optim as optim
import torch.utils.data
import numpy as np
from tqdm import tqdm
from utils import Averager, adjust_learning_rate, Attn... | 35.44382 | 160 | 0.552333 |
2405a00ead3fbf251d47c33976de3d9e6c7bd727 | 1,407 | py | Python | activitysim/examples/scan_examples_for_errors.py | mxndrwgrdnr/activitysim | 722d6e36b2210d5d24dfa2ac4a3504c1e8f75336 | [
"BSD-3-Clause"
] | 85 | 2018-02-16T15:08:13.000Z | 2022-03-23T15:08:08.000Z | activitysim/examples/scan_examples_for_errors.py | mxndrwgrdnr/activitysim | 722d6e36b2210d5d24dfa2ac4a3504c1e8f75336 | [
"BSD-3-Clause"
] | 311 | 2018-01-16T01:59:47.000Z | 2022-03-29T00:46:40.000Z | activitysim/examples/scan_examples_for_errors.py | mxndrwgrdnr/activitysim | 722d6e36b2210d5d24dfa2ac4a3504c1e8f75336 | [
"BSD-3-Clause"
] | 63 | 2018-02-05T15:27:51.000Z | 2022-03-04T20:36:33.000Z | # This script looks for errors in the examples creates by `create_run_all_examples.py`
import argparse
import glob
parser = argparse.ArgumentParser()
parser.add_argument(
'working_dir',
type=str,
metavar='PATH',
help='path to examples working directory',
)
args = parser.parse_args()
files_with_error... | 31.977273 | 86 | 0.540156 |
240615f1d4df73056442520f13c47d7c975f93f0 | 1,439 | py | Python | lifegame.py | maysrp/lifegame | 6d2eafb5466d2c35ea41c12bad9c7e8ef735e91f | [
"Apache-2.0"
] | null | null | null | lifegame.py | maysrp/lifegame | 6d2eafb5466d2c35ea41c12bad9c7e8ef735e91f | [
"Apache-2.0"
] | null | null | null | lifegame.py | maysrp/lifegame | 6d2eafb5466d2c35ea41c12bad9c7e8ef735e91f | [
"Apache-2.0"
] | null | null | null | # from machine import I2C,Pin
# from ssd1306 import SSD1306_I2C#I2Coled
# i2c=I2C(0,sda=Pin(0), scl=Pin(1), freq=400000)
# oled = SSD1306_I2C(128, 64, i2c) #OLEDI2C
# import ujson as json
# oled.fill(1) #
# oled.show()
# oled.fill(0)
# oled.show()
import json
import time
import gc
f=open("a.json",'r'... | 24.810345 | 60 | 0.462126 |
2406dd887fe5b4ed719d2434768385bde8958704 | 3,281 | py | Python | glue_jupyter/widgets/tests/test_linked_dropdown.py | pkgw/glue-jupyter | f8fff629fa5859c69f9c71264042ff9c0e347076 | [
"BSD-3-Clause"
] | null | null | null | glue_jupyter/widgets/tests/test_linked_dropdown.py | pkgw/glue-jupyter | f8fff629fa5859c69f9c71264042ff9c0e347076 | [
"BSD-3-Clause"
] | null | null | null | glue_jupyter/widgets/tests/test_linked_dropdown.py | pkgw/glue-jupyter | f8fff629fa5859c69f9c71264042ff9c0e347076 | [
"BSD-3-Clause"
] | null | null | null | from glue.core.state_objects import State
from glue.core.data_combo_helper import ComponentIDComboHelper
from glue.external.echo import SelectionCallbackProperty
from ..linked_dropdown import LinkedDropdown, LinkedDropdownMaterial
| 30.663551 | 87 | 0.689424 |
240781e5f78a676d15400f85ceee92f3f1a4291f | 24,989 | py | Python | CNN/CNN_Baseline.py | waljan/pT1-Gland-Graph-Dataset | 66bf79ab0ccae23216c3fd93391a5efdb02f954a | [
"MIT"
] | 1 | 2019-11-15T09:16:51.000Z | 2019-11-15T09:16:51.000Z | CNN/CNN_Baseline.py | waljan/GNNpT1 | 66bf79ab0ccae23216c3fd93391a5efdb02f954a | [
"MIT"
] | null | null | null | CNN/CNN_Baseline.py | waljan/GNNpT1 | 66bf79ab0ccae23216c3fd93391a5efdb02f954a | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import
import torch
import torch.nn as nn
from torchvision import transforms
from torchvision.models import vgg16_bn
from torch.utils.data import Dataset, DataLoader
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
import os
from statistics impor... | 42.211149 | 199 | 0.556845 |
240c1c3a378cec866bf0cedd04b34880c5cbfff2 | 5,368 | py | Python | src/testing/acceptance/test_firewall.py | cloudsigma/pycloudsigma | 220a18481c84357b4a4251241a01faae68f44ae1 | [
"BSD-3-Clause"
] | 13 | 2015-04-24T10:38:04.000Z | 2022-01-22T12:48:56.000Z | src/testing/acceptance/test_firewall.py | cloudsigma/pycloudsigma | 220a18481c84357b4a4251241a01faae68f44ae1 | [
"BSD-3-Clause"
] | 8 | 2015-02-23T18:16:14.000Z | 2022-02-17T09:50:24.000Z | src/testing/acceptance/test_firewall.py | cloudsigma/pycloudsigma | 220a18481c84357b4a4251241a01faae68f44ae1 | [
"BSD-3-Clause"
] | 6 | 2015-02-23T07:39:48.000Z | 2021-08-08T09:34:50.000Z | import unittest
from nose.plugins.attrib import attr
from testing.utils import DumpResponse
import cloudsigma.resource as resource
| 33.761006 | 101 | 0.515089 |
240d3483ae4f14b0494d34d78828bf09f96b22a8 | 465 | py | Python | djangocms_newsletter/testsettings.py | nephila/djangocms-newsletter | 5ebd8d3e1e2c85b2791d0261a954469f2548c840 | [
"BSD-3-Clause"
] | null | null | null | djangocms_newsletter/testsettings.py | nephila/djangocms-newsletter | 5ebd8d3e1e2c85b2791d0261a954469f2548c840 | [
"BSD-3-Clause"
] | null | null | null | djangocms_newsletter/testsettings.py | nephila/djangocms-newsletter | 5ebd8d3e1e2c85b2791d0261a954469f2548c840 | [
"BSD-3-Clause"
] | 2 | 2021-03-15T13:33:53.000Z | 2021-05-18T20:34:47.000Z | """Settings for testing emencia.django.newsletter"""
SITE_ID = 1
USE_I18N = False
ROOT_URLCONF = 'emencia.django.newsletter.urls'
DATABASES = {'default': {'NAME': 'newsletter_tests.db',
'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['django.contrib.contenttypes',
... | 27.352941 | 65 | 0.584946 |
240d56a168cf083bae8fab48f140eb403ff22ace | 811 | py | Python | 647_palindromic_substrings.py | ericness/leetcode | 3d0883ed737fa19152426055a2b0de7353b3b52a | [
"MIT"
] | null | null | null | 647_palindromic_substrings.py | ericness/leetcode | 3d0883ed737fa19152426055a2b0de7353b3b52a | [
"MIT"
] | null | null | null | 647_palindromic_substrings.py | ericness/leetcode | 3d0883ed737fa19152426055a2b0de7353b3b52a | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=647 lang=python3
#
# [647] Palindromic Substrings
#
# @lc code=start
# @lc code=end
| 23.852941 | 71 | 0.47349 |
240e3fd26d3d03e39ac0d7a1d868656a43824a8a | 1,887 | py | Python | btc_address_dump/wif_util.py | 0xMars/btc-address-dump | eefb89d040a00e440b619255d985ccca158bf2f4 | [
"MIT"
] | 1 | 2021-01-23T01:47:25.000Z | 2021-01-23T01:47:25.000Z | btc_address_dump/wif_util.py | zeusdice/btc-address-dump | eefb89d040a00e440b619255d985ccca158bf2f4 | [
"MIT"
] | null | null | null | btc_address_dump/wif_util.py | zeusdice/btc-address-dump | eefb89d040a00e440b619255d985ccca158bf2f4 | [
"MIT"
] | 1 | 2021-03-22T00:17:29.000Z | 2021-03-22T00:17:29.000Z | import binascii
import hashlib
import base58
from typing import Union
# wallet import format key - base58 encoded format
# https://bitcoin.stackexchange.com/questions/9244/private-key-to-wif
| 34.309091 | 108 | 0.721251 |
240e999c966fd2219adea6ecbd775e1f4a9b09ec | 306 | py | Python | 4. RPA Challenge - Json Parsing/libraries/MyLibrary.py | antusystem/Uipath-Challenges-with-Robocorp | a7e91a3954aa1542b3e452b5d2a9690791834eb7 | [
"MIT"
] | 1 | 2021-10-31T19:21:14.000Z | 2021-10-31T19:21:14.000Z | 4. RPA Challenge - Json Parsing/libraries/MyLibrary.py | antusystem/Uipath-Challenges-with-Robocorp | a7e91a3954aa1542b3e452b5d2a9690791834eb7 | [
"MIT"
] | null | null | null | 4. RPA Challenge - Json Parsing/libraries/MyLibrary.py | antusystem/Uipath-Challenges-with-Robocorp | a7e91a3954aa1542b3e452b5d2a9690791834eb7 | [
"MIT"
] | null | null | null | from robot.api import logger
| 23.538462 | 58 | 0.633987 |
2410e1a67686b8e447aec4cf28d0622950fdf8f2 | 293 | py | Python | rdp/__init__.py | emulbreh/rdp | 73e974c88604b59f6a5aacf6664cc27669e6de6e | [
"MIT"
] | null | null | null | rdp/__init__.py | emulbreh/rdp | 73e974c88604b59f6a5aacf6664cc27669e6de6e | [
"MIT"
] | 2 | 2017-05-04T12:51:21.000Z | 2017-06-21T06:27:43.000Z | rdp/__init__.py | emulbreh/rdp | 73e974c88604b59f6a5aacf6664cc27669e6de6e | [
"MIT"
] | null | null | null | from rdp.grammar import Grammar, GrammarBuilder, ignore
from rdp.symbols import Terminal, repeat, Regexp, Optional, Lookahead
from rdp.symbols import epsilon, flatten, drop, keep
from rdp.parser import Parser
from rdp.exceptions import ParseError, LeftRecursion, InvalidGrammar, TokenizeError
| 48.833333 | 83 | 0.832765 |
2412e937f76bf39a77720b16f02c64cdeb94da86 | 855 | py | Python | MyExtenstion.extension/Gaochao.tab/Gaochao.panel/Wall_Modify.pulldown/Wall_CurtainWall_Test.pushbutton/script.py | gaochaowyq/MyPyRevitExtentision | 0c8b134744550889dd95b2709299b2ef5a0cea6a | [
"MIT"
] | null | null | null | MyExtenstion.extension/Gaochao.tab/Gaochao.panel/Wall_Modify.pulldown/Wall_CurtainWall_Test.pushbutton/script.py | gaochaowyq/MyPyRevitExtentision | 0c8b134744550889dd95b2709299b2ef5a0cea6a | [
"MIT"
] | null | null | null | MyExtenstion.extension/Gaochao.tab/Gaochao.panel/Wall_Modify.pulldown/Wall_CurtainWall_Test.pushbutton/script.py | gaochaowyq/MyPyRevitExtentision | 0c8b134744550889dd95b2709299b2ef5a0cea6a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__doc__=""
import System
from System.Collections.Generic import List, Dictionary,IList
import sys
import clr
import os
import rpw
from rpw import revit, db, ui,DB,UI
from rpw.ui.forms import FlexForm, Label, ComboBox, TextBox, TextBox,Separator, Button, Alert
import json
from MyLib import Help... | 20.853659 | 93 | 0.804678 |
2417ef670caec38e28250102ccdd91e9ce3ae36e | 1,999 | py | Python | sem1/lab3_3/lsm.py | NetherQuartz/NumericalMethodsLabs | 731ba11bc068018371d5e1a2f9b521ec7c4619ad | [
"MIT"
] | 1 | 2021-04-10T18:10:48.000Z | 2021-04-10T18:10:48.000Z | sem1/lab3_3/lsm.py | NetherQuartz/NumericalMethodsLabs | 731ba11bc068018371d5e1a2f9b521ec7c4619ad | [
"MIT"
] | null | null | null | sem1/lab3_3/lsm.py | NetherQuartz/NumericalMethodsLabs | 731ba11bc068018371d5e1a2f9b521ec7c4619ad | [
"MIT"
] | null | null | null | """ 3.3, , 8-303-18"""
import numpy as np
import fire # CLI
import matplotlib.pyplot as plt
from sem1.lab1_1.gauss import lu_decomposition, lu_solve
def f(coeffs, x):
""" coeffs"""
return sum([x ** i * c for i, c in enumerate(coeffs)])
def sum_squared_errors(f, y):
""" """
return sum((f_i -... | 24.378049 | 95 | 0.55928 |
2419e8382da04300dd6726a9071e0bba2fde5693 | 2,481 | py | Python | batterym/plotter.py | evanjt/batterym | 52075526d50e5d49908812cda387f5ee28376195 | [
"Apache-2.0"
] | 30 | 2017-04-10T20:16:53.000Z | 2022-02-14T06:18:22.000Z | batterym/plotter.py | evanjt/batterym | 52075526d50e5d49908812cda387f5ee28376195 | [
"Apache-2.0"
] | 19 | 2017-04-09T14:43:17.000Z | 2022-03-12T12:37:27.000Z | batterym/plotter.py | evanjt/batterym | 52075526d50e5d49908812cda387f5ee28376195 | [
"Apache-2.0"
] | 7 | 2017-04-09T14:30:49.000Z | 2019-12-05T08:54:56.000Z | #!/usr/bin/python
import log
import config
import unittest
import datetime
from history import History
from future import Future
from chart import Chart
# def main():
# battery_data = BatteryData()
# caluclate_chart('capacity_history_12h.svg', battery_data)
# if __name__ == '__main__':
# main()
| 29.188235 | 72 | 0.648529 |
241b213f2cda88442b412272be2996e834b683b1 | 1,083 | py | Python | check-in/weekly/Smallest-Value-of-the-Rearranged-Number-(Medium).py | huandrew99/LeetCode | aa36b48d06100ce5f0bc64c789a906ec29409440 | [
"MIT"
] | 36 | 2021-12-23T15:44:41.000Z | 2022-03-31T04:26:26.000Z | check-in/weekly/Smallest-Value-of-the-Rearranged-Number-(Medium).py | wzy0766/LeetCode-1 | 3070e672c519e8af74966811b8058a9baef8c0bc | [
"MIT"
] | null | null | null | check-in/weekly/Smallest-Value-of-the-Rearranged-Number-(Medium).py | wzy0766/LeetCode-1 | 3070e672c519e8af74966811b8058a9baef8c0bc | [
"MIT"
] | 11 | 2022-02-26T22:41:26.000Z | 2022-03-02T07:18:41.000Z | """
LC 6001
Return the rearranged number with minimal value.
Note that the sign of the number does not change after rearranging the digits.
Example 1:
Input: num = 310
Output: 103
Explanation: The possible arrangements for the digits of 310 are 013, 031, 103, 130, 301, 310.
The arrangement with the ... | 27.075 | 96 | 0.611265 |
241bc13076480472685703c7a93528944e6cbeac | 9,977 | py | Python | scripts/intensity_exploratory.py | dougmvieira/options-microstructure | d15e6ed935924f2e236946485bb260266e16bc1d | [
"MIT"
] | 4 | 2020-08-27T02:24:28.000Z | 2021-12-31T21:28:39.000Z | scripts/intensity_exploratory.py | dxcv/options-microstructure | d15e6ed935924f2e236946485bb260266e16bc1d | [
"MIT"
] | null | null | null | scripts/intensity_exploratory.py | dxcv/options-microstructure | d15e6ed935924f2e236946485bb260266e16bc1d | [
"MIT"
] | 3 | 2019-12-10T02:17:22.000Z | 2021-09-07T10:42:02.000Z | from argparse import ArgumentParser
from itertools import starmap
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from fyne import blackscholes, heston
from matplotlib.patches import Patch
from scipy.stats import gaussian_kde
import settings
from align_settings import STARTTIME, ENDTIME
from ut... | 44.941441 | 281 | 0.624536 |
241bc7702cb56affbc662f5ebb938c50e4bb694b | 3,922 | py | Python | cinder/volume/drivers/violin/vxg/vshare/igroup.py | rlucio/cinder-violin-driver-icehouse | 1632bf1bdf67f7e26a586c819dd836f6541c4f3d | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/violin/vxg/vshare/igroup.py | rlucio/cinder-violin-driver-icehouse | 1632bf1bdf67f7e26a586c819dd836f6541c4f3d | [
"Apache-2.0"
] | 1 | 2021-01-12T23:22:22.000Z | 2021-01-12T23:22:22.000Z | cinder/volume/drivers/violin/vxg/vshare/igroup.py | rlucio/cinder-violin-driver-icehouse | 1632bf1bdf67f7e26a586c819dd836f6541c4f3d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Violin Memory, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | 27.619718 | 78 | 0.59536 |
241c799cbda783aaa197e112f3a776e9a6ce2824 | 4,089 | py | Python | gtimer/local/merge.py | astooke/gtimer | 2146dab459e5d959feb291821733d3d3ba7c523c | [
"MIT"
] | 8 | 2016-09-08T05:40:40.000Z | 2020-04-29T18:17:54.000Z | gtimer/local/merge.py | astooke/gtimer | 2146dab459e5d959feb291821733d3d3ba7c523c | [
"MIT"
] | 1 | 2022-01-27T13:11:58.000Z | 2022-01-27T13:11:58.000Z | gtimer/local/merge.py | astooke/gtimer | 2146dab459e5d959feb291821733d3d3ba7c523c | [
"MIT"
] | null | null | null |
"""
Merging data from a new times instances into the receiving instance
(e.g. when they correspond to the same code segments.).
"""
from __future__ import absolute_import
from gtimer.util import iteritems
#
# Function to expose elsewhere in the package.
#
#
# Private, helper functions.
#
| 32.712 | 78 | 0.561996 |
241c932f8d6884657a5776df61573b2c75265623 | 1,062 | py | Python | TWT/apps/challenges/views/__init__.py | avibn/twtcodejam.net | 938b9a536dc6407dd86651697abde4f167fc52a8 | [
"MIT"
] | null | null | null | TWT/apps/challenges/views/__init__.py | avibn/twtcodejam.net | 938b9a536dc6407dd86651697abde4f167fc52a8 | [
"MIT"
] | null | null | null | TWT/apps/challenges/views/__init__.py | avibn/twtcodejam.net | 938b9a536dc6407dd86651697abde4f167fc52a8 | [
"MIT"
] | null | null | null | from .home import HomeView
from .logout import LogoutView
from .new import NewChallengeView
from .view import DetailView
from .test import TestView
from .end import EndView
from .start import StartView
from .stop_team import StopTeams
from .start_submission import StartSubmission
from .stop_submission import StopSubmis... | 34.258065 | 45 | 0.826742 |
241e95009d78fdfb77d3e61f1604105036f0346c | 22,564 | py | Python | tests/test_tokenizer.py | cd109/scrappybara | 691385e3eb18eac4c5bec58950166b4c03c75a4b | [
"MIT"
] | null | null | null | tests/test_tokenizer.py | cd109/scrappybara | 691385e3eb18eac4c5bec58950166b4c03c75a4b | [
"MIT"
] | null | null | null | tests/test_tokenizer.py | cd109/scrappybara | 691385e3eb18eac4c5bec58950166b4c03c75a4b | [
"MIT"
] | 1 | 2020-10-20T03:36:59.000Z | 2020-10-20T03:36:59.000Z | import unittest
from scrappybara.preprocessing.tokenizer import Tokenizer
_TOKENIZE = Tokenizer()
if __name__ == '__main__':
unittest.main()
| 62.15978 | 119 | 0.613056 |
241f705876f68dc663cbfe9b5081351be4c4a1bd | 3,224 | py | Python | Download_test_data.py | yanhaidong1/TEmarker | 120a9555d075c14db8b2c6a409d8df96e4acfead | [
"BSD-3-Clause"
] | 2 | 2022-01-17T19:29:58.000Z | 2022-02-23T02:03:12.000Z | Download_test_data.py | yanhaidong1/TEmarker | 120a9555d075c14db8b2c6a409d8df96e4acfead | [
"BSD-3-Clause"
] | 1 | 2022-03-30T06:43:20.000Z | 2022-03-30T12:22:42.000Z | Download_test_data.py | yanhaidong1/TEmarker | 120a9555d075c14db8b2c6a409d8df96e4acfead | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
##this script will download the testing data for step 1,2,3
##Also download the testing data for step 0
##BUILT-IN MODULES
import argparse
import sys
import os
import subprocess
from distutils.spawn import find_executable
##SCRIPTS
##define a function to download testing data
if __name__ =... | 39.317073 | 199 | 0.651055 |
2420d25edc02fc425d58bf39ce86f78c2a795cad | 325 | py | Python | blog/migrations/0003_remove_comment_approved_comment.py | noodleslove/django_blog | 301d3190e70e32fd4637720ae1ed58882ccda876 | [
"MIT"
] | null | null | null | blog/migrations/0003_remove_comment_approved_comment.py | noodleslove/django_blog | 301d3190e70e32fd4637720ae1ed58882ccda876 | [
"MIT"
] | 9 | 2020-08-16T08:04:41.000Z | 2022-03-12T00:44:59.000Z | blog/migrations/0003_remove_comment_approved_comment.py | noodleslove/django_blog | 301d3190e70e32fd4637720ae1ed58882ccda876 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-05-02 01:41
from django.db import migrations
| 18.055556 | 47 | 0.587692 |
242341e9e1bf59a4615a25a30a10f10f8226a2f1 | 3,033 | py | Python | python/tests/test_Board.py | klenium/tetris | ddd51715cc796da9cffef107572a2e24a5b2487a | [
"MIT"
] | 2 | 2021-05-11T17:56:13.000Z | 2021-11-01T23:14:32.000Z | python/tests/test_Board.py | klenium/tetris | ddd51715cc796da9cffef107572a2e24a5b2487a | [
"MIT"
] | 11 | 2018-09-09T11:56:01.000Z | 2019-04-20T13:58:21.000Z | python/tests/test_Board.py | klenium/tetris | ddd51715cc796da9cffef107572a2e24a5b2487a | [
"MIT"
] | 1 | 2020-10-09T03:04:56.000Z | 2020-10-09T03:04:56.000Z | import unittest
import tests.helpers.util as util
from tetris.logic.board.Board import Board
from tetris.logic.tetromino.Tetromino import Tetromino
from tetris.util.containers import Dimension
| 31.268041 | 75 | 0.553907 |
2424da7f928544695c3b2c6c130e8eb4a39499bb | 317 | py | Python | evaluation_framework/constants.py | mozjay0619/ml-evaluation-framework | ab2ba55e8f4c94dd097b283aa0bce3c2854ed4e4 | [
"BSD-3-Clause"
] | null | null | null | evaluation_framework/constants.py | mozjay0619/ml-evaluation-framework | ab2ba55e8f4c94dd097b283aa0bce3c2854ed4e4 | [
"BSD-3-Clause"
] | null | null | null | evaluation_framework/constants.py | mozjay0619/ml-evaluation-framework | ab2ba55e8f4c94dd097b283aa0bce3c2854ed4e4 | [
"BSD-3-Clause"
] | null | null | null |
EF_UUID_NAME = "__specialEF__float32_UUID"
EF_ORDERBY_NAME = "__specialEF__int32_dayDiff"
EF_PREDICTION_NAME = "__specialEF__float32_predictions"
EF_DUMMY_GROUP_COLUMN_NAME = "__specialEF__dummy_group"
HMF_MEMMAP_MAP_NAME = "__specialHMF__memmapMap"
HMF_GROUPBY_NAME = "__specialHMF__groupByNumericEncoder"
| 24.384615 | 56 | 0.85489 |
242558f70eb57dcf9a66564a8d01e8e023f92612 | 5,205 | py | Python | sampyl/tests/test_samplers.py | wilsonify/sampyl | fb05a0d04393e4f1691bcc9bc664dbc1b688fc97 | [
"MIT"
] | 308 | 2015-06-30T18:16:04.000Z | 2022-03-14T17:21:59.000Z | sampyl/tests/test_samplers.py | wilsonify/sampyl | fb05a0d04393e4f1691bcc9bc664dbc1b688fc97 | [
"MIT"
] | 20 | 2015-07-02T06:12:20.000Z | 2020-11-26T16:06:57.000Z | sampyl/tests/test_samplers.py | wilsonify/sampyl | fb05a0d04393e4f1691bcc9bc664dbc1b688fc97 | [
"MIT"
] | 66 | 2015-07-27T11:19:03.000Z | 2022-03-24T03:35:53.000Z | from ..core import np
from ..exceptions import *
from .logps import *
import sampyl as smp
import pytest
#TODO: Make tests to check correctness of samplers
np_source = np.__package__
n_samples = 100
| 26.287879 | 67 | 0.642459 |
242679dc3636e6ab88594c724fca9be694e428e4 | 1,722 | py | Python | Bots/Python/Consumers/CodeFirst/WaterfallHostBot/dialogs/sso/sso_signin_dialog.py | gabog/BotFramework-FunctionalTests | 9ebd811539648bf7d53f6f92af42ff8ef60344a1 | [
"MIT"
] | 28 | 2020-09-21T17:41:35.000Z | 2022-03-16T00:56:38.000Z | Bots/Python/Consumers/CodeFirst/WaterfallHostBot/dialogs/sso/sso_signin_dialog.py | gabog/BotFramework-FunctionalTests | 9ebd811539648bf7d53f6f92af42ff8ef60344a1 | [
"MIT"
] | 196 | 2020-08-06T04:42:31.000Z | 2022-03-11T21:35:06.000Z | Bots/Python/Consumers/CodeFirst/WaterfallHostBot/dialogs/sso/sso_signin_dialog.py | GiulianoDolceTalianoSantoro/BotFramework-FunctionalTests | f21bded918cf9e51a296fcb0b87ad6495c59bea8 | [
"MIT"
] | 25 | 2020-07-31T10:05:40.000Z | 2022-03-23T19:35:52.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.dialogs import (
ComponentDialog,
WaterfallDialog,
WaterfallStepContext,
OAuthPrompt,
OAuthPromptSettings,
)
| 29.689655 | 103 | 0.590592 |
2427de993e3f47e157e8a27409af3be831c1ba4d | 1,286 | py | Python | src/products/api/serializers.py | bchuey/justapair | 4d71e4b80c1d48679741b1751c7a04f358e0b6a4 | [
"MIT"
] | null | null | null | src/products/api/serializers.py | bchuey/justapair | 4d71e4b80c1d48679741b1751c7a04f358e0b6a4 | [
"MIT"
] | null | null | null | src/products/api/serializers.py | bchuey/justapair | 4d71e4b80c1d48679741b1751c7a04f358e0b6a4 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from products.models import Jean, Brand, Size, Style, Color
| 18.911765 | 59 | 0.520995 |
24283473985b53fc5aa7fc2d4e03fc97813ef66a | 461 | py | Python | singlecellmultiomics/utils/iteration.py | zztin/SingleCellMultiOmics | d3035c33eb1375f0703cc49537417b755ad8a693 | [
"MIT"
] | 17 | 2019-05-21T09:12:16.000Z | 2022-02-14T19:26:58.000Z | singlecellmultiomics/utils/iteration.py | zztin/SingleCellMultiOmics | d3035c33eb1375f0703cc49537417b755ad8a693 | [
"MIT"
] | 70 | 2019-05-20T08:08:45.000Z | 2021-06-22T15:58:01.000Z | singlecellmultiomics/utils/iteration.py | zztin/SingleCellMultiOmics | d3035c33eb1375f0703cc49537417b755ad8a693 | [
"MIT"
] | 7 | 2020-04-09T15:11:12.000Z | 2022-02-14T15:23:31.000Z | from more_itertools import consecutive_groups
# https://stackoverflow.com/questions/2154249/identify-groups-of-continuous-numbers-in-a-list
| 32.928571 | 94 | 0.655098 |
2428c50b640451167088655dc742de4914408ebf | 403 | py | Python | Analytics/utils/constants.py | fga-eps-mds/2021-1-PUMA | c2e5a363bf72bd952614da65dc5da4a68bf7d333 | [
"MIT"
] | 3 | 2021-09-08T18:18:48.000Z | 2021-11-08T15:58:20.000Z | Analytics/utils/constants.py | fga-eps-mds/2021-1-PUMA | c2e5a363bf72bd952614da65dc5da4a68bf7d333 | [
"MIT"
] | 109 | 2021-08-16T17:12:36.000Z | 2021-11-10T19:56:01.000Z | Analytics/utils/constants.py | fga-eps-mds/2021-1-PUMA | c2e5a363bf72bd952614da65dc5da4a68bf7d333 | [
"MIT"
] | 1 | 2021-11-03T21:25:10.000Z | 2021-11-03T21:25:10.000Z | SERVICES = [
'UserService',
'ProjectService',
'NotifyService',
'AlocateService',
'ApiGateway',
'Frontend'
]
METRICS = [
'files',
'functions',
'complexity',
'coverage',
'ncloc',
'comment_lines_density',
'duplicated_lines_density',
'security_rating',
'tests',
... | 15.5 | 31 | 0.605459 |