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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5c4220f9d131f1935e1da9f7d3676230b409b02c | 6,399 | py | Python | Fcos_seg/detector/fcos_post.py | ricky40403/Fcos_seg | e2803108ca0114b906c739aa348e8b28f3c6342c | [
"MIT"
] | null | null | null | Fcos_seg/detector/fcos_post.py | ricky40403/Fcos_seg | e2803108ca0114b906c739aa348e8b28f3c6342c | [
"MIT"
] | 1 | 2021-09-29T17:10:01.000Z | 2021-09-29T17:10:01.000Z | Fcos_seg/detector/fcos_post.py | ricky40403/Fcos_seg | e2803108ca0114b906c739aa348e8b28f3c6342c | [
"MIT"
] | null | null | null | import torch
from torchvision import ops
from Fcos_seg.utils.box_list import BoxList
from Fcos_seg.utils.boxlist_ops import cat_boxlist
from Fcos_seg.utils.boxlist_ops import boxlist_ml_nms
from Fcos_seg.utils.boxlist_ops import remove_small_boxes
| 39.99375 | 128 | 0.563838 |
5c448a48693d658ba1ada5b6251627f69c54ad8f | 1,250 | py | Python | pmedapp/common/utilities.py | ibadkureshi/tnk-locationallocation | b06abcb7bf8675b13e4c2e4fe419afb5ee11018f | [
"MIT"
] | 1 | 2021-02-07T10:37:52.000Z | 2021-02-07T10:37:52.000Z | pmedapp/common/utilities.py | panosprotopapas/tnk-locationallocation | b06abcb7bf8675b13e4c2e4fe419afb5ee11018f | [
"MIT"
] | null | null | null | pmedapp/common/utilities.py | panosprotopapas/tnk-locationallocation | b06abcb7bf8675b13e4c2e4fe419afb5ee11018f | [
"MIT"
] | 2 | 2020-10-23T13:14:53.000Z | 2020-11-13T12:01:44.000Z | from pandas.api.types import is_numeric_dtype
from celery.result import AsyncResult
import json
#import redis
from django.http import HttpResponseBadRequest, HttpResponse
import mimetypes
def column_numeric(column):
"""
Ensure that the dataframe has only numeric values
"""
# numeric only data
if n... | 27.173913 | 87 | 0.6768 |
5c44e983388f0b714bbea71704fc073f94ce1888 | 2,573 | py | Python | nic/evaluation.py | StiliyanDr/neural-image-caption | 26135abc917242388d1e8d4622af0585a8dd966d | [
"MIT"
] | null | null | null | nic/evaluation.py | StiliyanDr/neural-image-caption | 26135abc917242388d1e8d4622af0585a8dd966d | [
"MIT"
] | null | null | null | nic/evaluation.py | StiliyanDr/neural-image-caption | 26135abc917242388d1e8d4622af0585a8dd966d | [
"MIT"
] | null | null | null | from tqdm import tqdm
from nic import (
captioning as cptn,
datapreparation as dp,
metrics as mcs,
)
from nic.datapreparation import utils
def bleu_score_of(model,
*,
is_decoder_only=True,
path_to_data,
batch_size=32,
... | 34.77027 | 71 | 0.605519 |
5c47e6ec8aa094da156faf41c9d5f546903de258 | 6,495 | py | Python | gitlabenv2csv/__main__.py | zales/gitlabenv2csv | 2362459380879717ce48769ce4511f7404de0370 | [
"MIT"
] | 1 | 2020-10-18T22:25:10.000Z | 2020-10-18T22:25:10.000Z | gitlabenv2csv/__main__.py | zales/gitlabenv2csv | 2362459380879717ce48769ce4511f7404de0370 | [
"MIT"
] | null | null | null | gitlabenv2csv/__main__.py | zales/gitlabenv2csv | 2362459380879717ce48769ce4511f7404de0370 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
gitlabenv2csv GitLab ENV downloader/uploader.
"""
import sys
from datetime import datetime
import re
import os
import logging
import gitlab
import configargparse
import pandas as pd
from pandas_schema.validation import CustomElementValidation
import pandas_schema
fro... | 32.313433 | 98 | 0.663741 |
5c482543235587e619471540dcd07c628bdf8c0f | 473 | py | Python | common/utils/file.py | BruceWW/flask-basic | 3252f47e6b3fca170b57819f8fdbdeb0f868654e | [
"MIT"
] | 1 | 2019-09-28T17:03:39.000Z | 2019-09-28T17:03:39.000Z | common/utils/file.py | BruceWW/flask-basic | 3252f47e6b3fca170b57819f8fdbdeb0f868654e | [
"MIT"
] | null | null | null | common/utils/file.py | BruceWW/flask-basic | 3252f47e6b3fca170b57819f8fdbdeb0f868654e | [
"MIT"
] | 1 | 2019-11-19T02:39:40.000Z | 2019-11-19T02:39:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/9/13 13:58
# @Author : Lin Luo
# @Site :
# @File : file
# @Software: PyCharm
from os import path
from application import app
from common.utils.format_time import stamp_to_date
| 20.565217 | 93 | 0.617336 |
5c48ff59411a148dbbbee7b176f4ddde04d0287f | 1,435 | py | Python | json_conf.py | luhouxiang/UnitTestServer | 296485fd9d80a215c52a41d9b07a9ef12dfaef29 | [
"Apache-2.0"
] | null | null | null | json_conf.py | luhouxiang/UnitTestServer | 296485fd9d80a215c52a41d9b07a9ef12dfaef29 | [
"Apache-2.0"
] | null | null | null | json_conf.py | luhouxiang/UnitTestServer | 296485fd9d80a215c52a41d9b07a9ef12dfaef29 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
json
data_dict = {"a":"1", "b":"2"}
JsonConf.set(data_dict)
jsonconfig.json
'''
import json
import os
if __name__ == "__main__":
# data = {"a": " 1", "f": "100", "b": "3000"}
# JsonConf.set("mytest.json", data)
pass
| 26.574074 | 70 | 0.568641 |
5c49845817eee8cb1f3241673b68791435214ce6 | 6,621 | py | Python | test/units/utils/amazon_placebo_fixtures.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | test/units/utils/amazon_placebo_fixtures.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | test/units/utils/amazon_placebo_fixtures.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | import errno
import os
import time
import mock
import pytest
boto3 = pytest.importorskip("boto3")
botocore = pytest.importorskip("botocore")
placebo = pytest.importorskip("placebo")
"""
Using Placebo to test modules using boto3:
This is an example test, using the placeboify fixture to test that a module
will fail if... | 31.985507 | 95 | 0.626643 |
5c4a59fd4ab6dc248a1ff53adc7b05c17efd6093 | 13,795 | py | Python | tests/catalyst/metrics/test_segmentation.py | tadejsv/catalyst | 2553ce8fd7cecc025ad88819aea73faf8abb229b | [
"Apache-2.0"
] | 2,693 | 2019-01-23T19:16:12.000Z | 2022-03-31T02:12:42.000Z | tests/catalyst/metrics/test_segmentation.py | Ran485/catalyst | 84bc7576c981278f389279d87dda85dd66a758b6 | [
"Apache-2.0"
] | 763 | 2019-01-22T20:12:56.000Z | 2022-03-27T18:36:10.000Z | tests/catalyst/metrics/test_segmentation.py | Ran485/catalyst | 84bc7576c981278f389279d87dda85dd66a758b6 | [
"Apache-2.0"
] | 445 | 2019-01-23T17:07:09.000Z | 2022-03-30T05:38:45.000Z | # flake8: noqa
from typing import Dict, List, Union
import pytest
import torch
from catalyst.metrics import DiceMetric, IOUMetric, TrevskyMetric
base_outputs = torch.tensor([[0.8, 0.1, 0], [0, 0.4, 0.3], [0, 0, 1]])
base_targets = torch.tensor([[1.0, 0, 0], [0, 1, 0], [1, 1, 0]])
base_outputs = torch.stack([base_ou... | 36.494709 | 82 | 0.539108 |
308377453a621d88e3984e2f0255355163d25b16 | 2,454 | py | Python | led_blink.py | combatwombat16/piplay | 7318d6bc5e617e91a5f8eacc37f2ae4ecb386e91 | [
"MIT"
] | null | null | null | led_blink.py | combatwombat16/piplay | 7318d6bc5e617e91a5f8eacc37f2ae4ecb386e91 | [
"MIT"
] | null | null | null | led_blink.py | combatwombat16/piplay | 7318d6bc5e617e91a5f8eacc37f2ae4ecb386e91 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
import time
import socket
morse = {"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":"-... | 25.040816 | 394 | 0.525265 |
30838b215cd243be104eaed5f18458e8b036722f | 4,342 | py | Python | main.py | 1blackghost/Fall_Management | ebd980c9866a873d681deca56e32e4a94ed64502 | [
"MIT"
] | 2 | 2021-12-17T15:49:36.000Z | 2022-01-27T05:14:34.000Z | main.py | 1blackghost/Fall_Management | ebd980c9866a873d681deca56e32e4a94ed64502 | [
"MIT"
] | null | null | null | main.py | 1blackghost/Fall_Management | ebd980c9866a873d681deca56e32e4a94ed64502 | [
"MIT"
] | null | null | null | from flask import *
app=Flask(__name__)
app.config['SECRET_KEY']="thisisasecretkey"
if __name__=="__main__":
app.run(debug=True) | 27.308176 | 129 | 0.651082 |
3083ca2aa8a6d14101817c5fb869cdcfbd06c3c0 | 45,648 | py | Python | Lib/compiler/strict/rewriter/rewriter.py | penguin-wwy/cinder | 2699849639420e1ed77269a671c0d480efe0981d | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/compiler/strict/rewriter/rewriter.py | penguin-wwy/cinder | 2699849639420e1ed77269a671c0d480efe0981d | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/compiler/strict/rewriter/rewriter.py | penguin-wwy/cinder | 2699849639420e1ed77269a671c0d480efe0981d | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
from __future__ import annotations
import ast
from ast import (
AST,
AnnAssign,
Assign,
AsyncFunctionDef,
Attribute,
Call,
ClassDef,
Constant,
Delete,
DictComp,
ExceptHandler,
For,
FunctionD... | 33.344047 | 95 | 0.52815 |
30841801931e8617046865d759b5329386fe5d45 | 7,285 | py | Python | code/client/visuals.py | xiaoxiae/Mynt | b8684bfbbca3f5d457e1ca80cf27c3a924d0c7b5 | [
"MIT"
] | null | null | null | code/client/visuals.py | xiaoxiae/Mynt | b8684bfbbca3f5d457e1ca80cf27c3a924d0c7b5 | [
"MIT"
] | null | null | null | code/client/visuals.py | xiaoxiae/Mynt | b8684bfbbca3f5d457e1ca80cf27c3a924d0c7b5 | [
"MIT"
] | null | null | null | """A module for anything color/animation related."""
from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses import dataclass
from math import ceil, cos, pi
from time import time
from typing import *
Numeric = Union[int, float]
def linear_interpolation(a: Numeric, b: Numeric, x: Nume... | 29.023904 | 86 | 0.612766 |
3085744ebaced72e37060cc6921567307ee0329c | 330 | py | Python | exporters/groupers/no_grouper.py | scrapinghub/exporters | b14f70530826bbbd6163d9e56e74345e762a9189 | [
"BSD-3-Clause"
] | 41 | 2016-06-16T15:29:39.000Z | 2021-08-06T03:29:13.000Z | exporters/groupers/no_grouper.py | bbotella/fluxo | c9fb01db1771ada4672bbffd67cb46e1f7802ab9 | [
"BSD-3-Clause"
] | 52 | 2016-06-20T12:46:57.000Z | 2018-02-08T12:22:03.000Z | exporters/groupers/no_grouper.py | bbotella/fluxo | c9fb01db1771ada4672bbffd67cb46e1f7802ab9 | [
"BSD-3-Clause"
] | 10 | 2016-06-23T08:49:36.000Z | 2018-01-13T10:12:10.000Z | from exporters.groupers.base_grouper import BaseGrouper
| 23.571429 | 70 | 0.681818 |
308696aec5daf6d1909385db9bbfaabec91c70ed | 12,678 | py | Python | cli/tests/test_polyflow/test_io.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | cli/tests/test_polyflow/test_io.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | cli/tests/test_polyflow/test_io.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2019 Polyaxon, 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 o... | 33.451187 | 88 | 0.54985 |
3086deb196e467ecb0e3c292f9798f7ee852eb32 | 6,468 | py | Python | data_structure/busca_profundidade_largura.py | uadson/data-structure | e7c62ff732b9b89e57b9b08dfc6f777e57a52397 | [
"MIT"
] | null | null | null | data_structure/busca_profundidade_largura.py | uadson/data-structure | e7c62ff732b9b89e57b9b08dfc6f777e57a52397 | [
"MIT"
] | null | null | null | data_structure/busca_profundidade_largura.py | uadson/data-structure | e7c62ff732b9b89e57b9b08dfc6f777e57a52397 | [
"MIT"
] | null | null | null |
grafo = Grafo()
import numpy as np
import numpy as np
#busca_profundidade = BuscaProfundidade(grafo.arad)
#busca_profundidade.buscar()
busca_largura = BuscaLargura(grafo.arad)
busca_largura.buscar() | 29.266968 | 128 | 0.687693 |
308884d924ff840a10ba014007f164cd905b2668 | 11,014 | py | Python | Assignment 4/NNet.py | Chirag-Galani/B551-Elements-Of-Artificial-Intelligence | 6e6d04bf17522768c176145e86ccc31e8ea903b4 | [
"MIT"
] | null | null | null | Assignment 4/NNet.py | Chirag-Galani/B551-Elements-Of-Artificial-Intelligence | 6e6d04bf17522768c176145e86ccc31e8ea903b4 | [
"MIT"
] | null | null | null | Assignment 4/NNet.py | Chirag-Galani/B551-Elements-Of-Artificial-Intelligence | 6e6d04bf17522768c176145e86ccc31e8ea903b4 | [
"MIT"
] | 2 | 2021-12-01T20:38:02.000Z | 2021-12-01T22:42:38.000Z | #!/usr/bin/env python
'''
#
# Neural networks is a supervised learning algorithm, which utilizes neurons (which is a mathematical functions which accepts weighted values, and gives an output using an activation function) inorder to learn a problem and
# then to evaluate and predict the outcomes for data which has not ... | 55.626263 | 233 | 0.605684 |
308948c012094a456aa305c3b4f3882158c01928 | 6,169 | py | Python | data_preparation_play.py | superporchetta/tide_prediction | 9946f0c97b7e1bbe0a791380d6a35e277f5d3a1c | [
"MIT"
] | null | null | null | data_preparation_play.py | superporchetta/tide_prediction | 9946f0c97b7e1bbe0a791380d6a35e277f5d3a1c | [
"MIT"
] | null | null | null | data_preparation_play.py | superporchetta/tide_prediction | 9946f0c97b7e1bbe0a791380d6a35e277f5d3a1c | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
from transformers import ViTFeatureExtractor, ViTModel, ViTConfig, DistilBertModel, DistilBertConfig
from tqdm.notebook import tqdm
from torch.autograd import Var... | 41.682432 | 164 | 0.688604 |
30896193f2c9fc48c6d9dfb68c7e349fb0ce9ff2 | 6,225 | py | Python | ORStools/core/directions_core.py | Fragoso09/orstool-qgis | 1fb88280efac2ba07dc535db4541a90500f4581f | [
"MIT"
] | null | null | null | ORStools/core/directions_core.py | Fragoso09/orstool-qgis | 1fb88280efac2ba07dc535db4541a90500f4581f | [
"MIT"
] | null | null | null | ORStools/core/directions_core.py | Fragoso09/orstool-qgis | 1fb88280efac2ba07dc535db4541a90500f4581f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
ORStools
A QGIS plugin
QGIS client to query openrouteservice
-------------------
begin : 2017-02-01
git sha ... | 36.617647 | 117 | 0.561124 |
30897546f1a8225ea9acc7ead30bf66a126f2574 | 1,257 | py | Python | utilities/visualisation/image_data/display_3d_depth_image.py | bootml/agent | 84235db931d6e4ef956962961c619994898ebdd5 | [
"Apache-2.0"
] | null | null | null | utilities/visualisation/image_data/display_3d_depth_image.py | bootml/agent | 84235db931d6e4ef956962961c619994898ebdd5 | [
"Apache-2.0"
] | null | null | null | utilities/visualisation/image_data/display_3d_depth_image.py | bootml/agent | 84235db931d6e4ef956962961c619994898ebdd5 | [
"Apache-2.0"
] | 1 | 2018-09-27T14:31:41.000Z | 2018-09-27T14:31:41.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'cnheider'
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import scipy.misc
if __name__ is '__main__':
main()
| 24.647059 | 83 | 0.647574 |
308a2605f618226352772f3160b53fc3042dafdf | 5,937 | py | Python | pyscripts/solution_parser.py | qwergram/vsxml2azurejson | 9f88e7c6ade715d73ea6fbe15da3bb0c794c55dc | [
"MIT"
] | null | null | null | pyscripts/solution_parser.py | qwergram/vsxml2azurejson | 9f88e7c6ade715d73ea6fbe15da3bb0c794c55dc | [
"MIT"
] | null | null | null | pyscripts/solution_parser.py | qwergram/vsxml2azurejson | 9f88e7c6ade715d73ea6fbe15da3bb0c794c55dc | [
"MIT"
] | 1 | 2020-11-04T04:28:05.000Z | 2020-11-04T04:28:05.000Z | import util
import io
| 45.320611 | 134 | 0.53495 |
308a8ead8c09d9060f476c9189d0c618fd81a7a3 | 1,027 | py | Python | documents/migrations/0001_initial.py | iliadmitriev/taskcamp | f0da4aa5694bd1f2235cddcf0e3026b07d957e2d | [
"MIT"
] | 4 | 2021-11-30T10:28:17.000Z | 2022-01-31T07:44:08.000Z | documents/migrations/0001_initial.py | iliadmitriev/taskcamp | f0da4aa5694bd1f2235cddcf0e3026b07d957e2d | [
"MIT"
] | 66 | 2021-08-17T08:20:20.000Z | 2022-03-31T02:20:53.000Z | documents/migrations/0001_initial.py | iliadmitriev/taskcamp | f0da4aa5694bd1f2235cddcf0e3026b07d957e2d | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-22 07:18
from django.db import migrations, models
import documents.helpers
| 34.233333 | 122 | 0.607595 |
308e1a6afb02da02569e46c7f2764bcdc0d6f48c | 107 | py | Python | src/quocslib/__init__.py | marcorossignolo/QuOCS | 5ed631e2aebc42b226f5992daf27e2da75a89af9 | [
"Apache-2.0"
] | null | null | null | src/quocslib/__init__.py | marcorossignolo/QuOCS | 5ed631e2aebc42b226f5992daf27e2da75a89af9 | [
"Apache-2.0"
] | null | null | null | src/quocslib/__init__.py | marcorossignolo/QuOCS | 5ed631e2aebc42b226f5992daf27e2da75a89af9 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
__VERSION__ = "0.0.a7"
| 26.75 | 82 | 0.82243 |
308fb8bd7bf03060c505e896b107cc423278c9aa | 9,749 | py | Python | src/cartpole_dqn.py | veda-s4dhak/OpenAI_Gym_Testing | 9cd0bef327fb820205ecc428d86072d0b690791e | [
"MIT"
] | null | null | null | src/cartpole_dqn.py | veda-s4dhak/OpenAI_Gym_Testing | 9cd0bef327fb820205ecc428d86072d0b690791e | [
"MIT"
] | null | null | null | src/cartpole_dqn.py | veda-s4dhak/OpenAI_Gym_Testing | 9cd0bef327fb820205ecc428d86072d0b690791e | [
"MIT"
] | 1 | 2020-05-01T11:18:26.000Z | 2020-05-01T11:18:26.000Z | """
This module contains the deep reinforcement learning model which can
learn the OpenAI Cartpole Gym using reinforcement learning or imitation
learning
"""
import random
import numpy as np
from collections import deque
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Ad... | 41.309322 | 133 | 0.605293 |
308fd779c425a8aa77041e0808189459f901cd7a | 19 | py | Python | lppydsmc/data/__init__.py | Quettle/lppydsmc | 37290792e845086f7ea182d81f284d68b6cdcbea | [
"MIT"
] | null | null | null | lppydsmc/data/__init__.py | Quettle/lppydsmc | 37290792e845086f7ea182d81f284d68b6cdcbea | [
"MIT"
] | null | null | null | lppydsmc/data/__init__.py | Quettle/lppydsmc | 37290792e845086f7ea182d81f284d68b6cdcbea | [
"MIT"
] | null | null | null | from . import saver | 19 | 19 | 0.789474 |
308fe16f0e128b44dd435ae0ddd91af9119d86c8 | 249 | py | Python | src/utils/encryption_utils.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 833 | 2016-09-08T13:27:36.000Z | 2022-03-27T07:10:48.000Z | src/utils/encryption_utils.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 528 | 2016-05-23T09:17:04.000Z | 2022-03-30T12:45:50.000Z | src/utils/encryption_utils.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 214 | 2016-09-08T14:46:41.000Z | 2022-03-25T01:04:14.000Z | import base64
import hashlib
from utils.apr1 import hash_apr1
| 17.785714 | 59 | 0.722892 |
3090bd4ae1bc431a0e0140abb9b38829f936bb15 | 1,219 | py | Python | joytest.py | AlessioMorale/fport-joy-bridge | ed5ff13acc391863d8df4005a3848743bf363d27 | [
"MIT"
] | null | null | null | joytest.py | AlessioMorale/fport-joy-bridge | ed5ff13acc391863d8df4005a3848743bf363d27 | [
"MIT"
] | null | null | null | joytest.py | AlessioMorale/fport-joy-bridge | ed5ff13acc391863d8df4005a3848743bf363d27 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from evdev import UInput, UInputError, ecodes, AbsInfo
from evdev import util
from fport import FportParser, FportMessageControl
import serial
from time import sleep
if __name__ == '__main__':
device = None
try:
description = 'TstAM'
default_props = AbsInfo(value=0, min=0... | 31.25641 | 87 | 0.584085 |
3093bbb9c7042c987260f233b991d866e2367f0b | 157 | py | Python | reagent/net_builder/continuous_actor/__init__.py | kellielu/ReAgent | c538992672220453cdc95044def25c4e0691a8b0 | [
"BSD-3-Clause"
] | 2 | 2021-10-31T01:05:46.000Z | 2021-11-08T09:43:25.000Z | reagent/net_builder/continuous_actor/__init__.py | kellielu/ReAgent | c538992672220453cdc95044def25c4e0691a8b0 | [
"BSD-3-Clause"
] | null | null | null | reagent/net_builder/continuous_actor/__init__.py | kellielu/ReAgent | c538992672220453cdc95044def25c4e0691a8b0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
from . import dirichlet_fully_connected # noqa
from . import fully_connected # noqa
from . import gaussian_fully_connected # noqa
| 26.166667 | 47 | 0.77707 |
3093f2eef129b7ff15a03825ab1986f511920339 | 1,058 | py | Python | bitHopper/Logic/__init__.py | DavidVorick/bitHopper | 72544e50b05aa2529ab0adf505bf9a9b609ae64c | [
"MIT"
] | 2 | 2018-04-24T07:30:32.000Z | 2018-06-19T18:13:38.000Z | bitHopper/Logic/__init__.py | KirillShaman/bitHopper | 72544e50b05aa2529ab0adf505bf9a9b609ae64c | [
"MIT"
] | null | null | null | bitHopper/Logic/__init__.py | KirillShaman/bitHopper | 72544e50b05aa2529ab0adf505bf9a9b609ae64c | [
"MIT"
] | 1 | 2018-04-24T07:30:33.000Z | 2018-04-24T07:30:33.000Z | """
This module contains all of the server selection logic.
It supplies one function:
get_server() which returns the name of a server to mine.
It has two external dependencies.
1) btcnet_info via btcnet_wrapper
2) a way to pull getworks for checking if we should delag pools
"""
import ServerLogic
import bitHopper.... | 24.045455 | 67 | 0.680529 |
3095eb472fe2ea8641f4f6e31710133c03d0d9a5 | 2,187 | py | Python | 2015/day08.py | mbcollins2/aoc | b94380fd5e92b4fe9f4af654e7762174c1c6ac91 | [
"MIT"
] | null | null | null | 2015/day08.py | mbcollins2/aoc | b94380fd5e92b4fe9f4af654e7762174c1c6ac91 | [
"MIT"
] | 3 | 2021-12-15T19:12:38.000Z | 2021-12-15T19:14:42.000Z | 2015/day08.py | mbcollins2/aoc | b94380fd5e92b4fe9f4af654e7762174c1c6ac91 | [
"MIT"
] | null | null | null | import re
if __name__ == '__main__':
s = solve_day()
print(f'Part 1: {s.part1()}')
print(f'Part 2: {s.part2()}') | 23.021053 | 63 | 0.395519 |
3097d07104eae77c84b8f2e0ab9b06458a291681 | 1,389 | py | Python | tests/test_forms.py | kennethlove/django-tempus-dominus | dbbb413292cf0faaf756efeb7cdc2dfb3878313a | [
"BSD-3-Clause"
] | 1 | 2018-11-01T15:05:12.000Z | 2018-11-01T15:05:12.000Z | tests/test_forms.py | kennethlove/django-tempus-dominus | dbbb413292cf0faaf756efeb7cdc2dfb3878313a | [
"BSD-3-Clause"
] | null | null | null | tests/test_forms.py | kennethlove/django-tempus-dominus | dbbb413292cf0faaf756efeb7cdc2dfb3878313a | [
"BSD-3-Clause"
] | null | null | null | import importlib
import pytest
from . import forms
from tempus_dominus import widgets
def test_form_media():
"""Check that the widget media makes it up to the form"""
form = forms.DateTimeFieldForm()
cdn_media = widgets.cdn_media()
# I'm not a fan of testing private methods but there's no
#... | 25.722222 | 68 | 0.691145 |
3098dcc308b0f38894e8932ddd5c2709945d9041 | 846 | py | Python | Ago-Dic-2019/DanielM/PracticaUno/3.9_DinnerGuests.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2019/DanielM/PracticaUno/3.9_DinnerGuests.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2019/DanielM/PracticaUno/3.9_DinnerGuests.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | # 3-9. Dinner Guests: Working with one of the programs from Exercises 3-4 through 3-7 (page 46),
# use len() to print a message indicating the number of people you are inviting to dinner.
guests = ['Antonio', 'Emanuel', 'Francisco']
message = "1.- Hello dear uncle " + guests[0] + ", I hope you can come this 16th for ... | 49.764706 | 120 | 0.628842 |
309b0655db3c1fd9b58f914f090d62e8f523e861 | 8,802 | py | Python | argocd_client/models/v1alpha1_cluster.py | thepabloaguilar/argocd-client | a6c4ff268a63ee6715f9f837b9225b798aa6bde2 | [
"BSD-3-Clause"
] | 1 | 2021-09-29T11:57:07.000Z | 2021-09-29T11:57:07.000Z | argocd_client/models/v1alpha1_cluster.py | thepabloaguilar/argocd-client | a6c4ff268a63ee6715f9f837b9225b798aa6bde2 | [
"BSD-3-Clause"
] | 1 | 2020-09-09T00:28:57.000Z | 2020-09-09T00:28:57.000Z | argocd_client/models/v1alpha1_cluster.py | thepabloaguilar/argocd-client | a6c4ff268a63ee6715f9f837b9225b798aa6bde2 | [
"BSD-3-Clause"
] | 2 | 2020-10-13T18:31:59.000Z | 2021-02-15T12:52:33.000Z | # coding: utf-8
"""
Consolidate Services
Description of all APIs # noqa: E501
The version of the OpenAPI document: version not set
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from argocd_client.configuration import Configuration
def to_... | 28.859016 | 204 | 0.60918 |
309ddfbd9a766a8a929b5b31731638f34ca48d1c | 1,489 | py | Python | src/msgraph/model/shared.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 7 | 2019-07-17T06:59:53.000Z | 2021-05-13T15:23:37.000Z | src/msgraph/model/shared.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | null | null | null | src/msgraph/model/shared.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 2 | 2020-06-30T13:06:59.000Z | 2021-06-03T09:47:35.000Z | # -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
from __future__ import unicode_literals
from ..model.identity_set i... | 26.589286 | 151 | 0.589657 |
30a0088ad1a76ce66806948cf918842140c715c0 | 1,013 | py | Python | speedtweet/twitterpost.py | MSAdministrator/speedtweet | ee9cb1b49d0d1a7e4f9f458bf801ca8e6548ac3d | [
"MIT"
] | 2 | 2021-06-05T22:09:50.000Z | 2021-07-03T21:39:58.000Z | speedtweet/twitterpost.py | MSAdministrator/speedtweet | ee9cb1b49d0d1a7e4f9f458bf801ca8e6548ac3d | [
"MIT"
] | null | null | null | speedtweet/twitterpost.py | MSAdministrator/speedtweet | ee9cb1b49d0d1a7e4f9f458bf801ca8e6548ac3d | [
"MIT"
] | 1 | 2021-06-07T12:47:17.000Z | 2021-06-07T12:47:17.000Z | import os
import requests
import tweepy
import random
from .littlebirdy import LittleBirdy
| 29.794118 | 117 | 0.600197 |
30a03b542b40e6bd2d94bb7eb538cc149b6c1af0 | 3,578 | py | Python | env/lib/python3.7/site-packages/wn/omw.py | thunlp/BkdAtk-LWS | 441c1e3d64b1f8b49cfc28fec4059ec91a323b7c | [
"MIT"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | env/lib/python3.7/site-packages/wn/omw.py | thunlp/BkdAtk-LWS | 441c1e3d64b1f8b49cfc28fec4059ec91a323b7c | [
"MIT"
] | 1 | 2021-08-03T12:23:01.000Z | 2021-08-10T08:35:22.000Z | env/lib/python3.7/site-packages/wn/omw.py | thunlp/BkdAtk-LWS | 441c1e3d64b1f8b49cfc28fec4059ec91a323b7c | [
"MIT"
] | 2 | 2021-12-09T07:23:21.000Z | 2022-03-31T06:13:10.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019-2020 NLTK Project
# Author:
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
import io
import os
from collections import defaultdict
from wn.constants import omw_dir
| 42.595238 | 106 | 0.604528 |
30a2375a14b5b4c6764ea4ac5055710385af2615 | 10,387 | py | Python | 2021/day1.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | 1 | 2020-12-05T06:14:37.000Z | 2020-12-05T06:14:37.000Z | 2021/day1.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | null | null | null | 2021/day1.py | Sujatha-Nagarajan/AdventOfCode | afce23c74fd0a72caa29c1604a582b21806e794e | [
"CC0-1.0"
] | null | null | null | #https://adventofcode.com/2021/day/1
input2="""131
140
136
135
155
175
178
186
187
189
194
195
203
193
178
179
180
188
204
214
215
252
253
261
281
294
293
299
300
301
307
333
324
322
323
335
319
312
313
312
320
323
324
336
341
347
357
358
363
357
334
348
364
365
367
370
369
373
344
328
330
327
339
340
341
335
342
347... | 5.10167 | 127 | 0.780591 |
30a5a0e086c1e5bcc5b8d078d1c0dc1d9e9e9454 | 2,844 | py | Python | pyplwnxml/tests/test_plwnxmlParser.py | red-rocket-dev/plwnXMLParser | b3d28d174c0915ecfc5530763a2cebc889cd1026 | [
"0BSD"
] | 5 | 2018-09-21T21:06:56.000Z | 2022-02-01T19:44:48.000Z | pyplwnxml/tests/test_plwnxmlParser.py | red-rocket-dev/plwnXMLParser | b3d28d174c0915ecfc5530763a2cebc889cd1026 | [
"0BSD"
] | 1 | 2018-08-22T15:42:46.000Z | 2019-12-02T20:38:10.000Z | pyplwnxml/tests/test_plwnxmlParser.py | red-rocket-dev/pyplwnxml | b3d28d174c0915ecfc5530763a2cebc889cd1026 | [
"0BSD"
] | null | null | null | from unittest import TestCase
from pyplwnxml import PlwnxmlParser, PartOfSpeech, SentimentType, Qualifier, RelationType
| 41.217391 | 89 | 0.701477 |
30a639ab06896771f31835d8f6c46de6c8814a2e | 1,870 | py | Python | pydsm/delsig/tests/test_simulateDSM.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | pydsm/delsig/tests/test_simulateDSM.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | pydsm/delsig/tests/test_simulateDSM.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2012, Sergio Callegari
# All rights reserved.
# This file is part of PyDSM.
# PyDSM 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, o... | 32.807018 | 71 | 0.644385 |
30a91eb24cb34accb4b988d68cdacee191be4e8d | 1,975 | py | Python | src-py/PublicVariables.py | ATSM-Bot/rickroll-lang | 9a9d1d94d99a4bfe6650e9c410c4f23b71fdfc30 | [
"MIT"
] | 1 | 2021-07-30T01:13:09.000Z | 2021-07-30T01:13:09.000Z | src-py/PublicVariables.py | ATSM-Bot/rickroll-lang | 9a9d1d94d99a4bfe6650e9c410c4f23b71fdfc30 | [
"MIT"
] | null | null | null | src-py/PublicVariables.py | ATSM-Bot/rickroll-lang | 9a9d1d94d99a4bfe6650e9c410c4f23b71fdfc30 | [
"MIT"
] | null | null | null | from sys import stdout
from random import choice
# Keywords
KW_print = 'i_just_wanna_tell_u_how_im_feeling'
KW_if = 'and_if_u_ask_me_how_im_feeling'
KW_let = 'give_u_up'
KW_import1 = 'we_know_the'
KW_import2 = "and_we're_gonna_play_it"
KW_def1 = 'never_knew'
KW... | 25.320513 | 84 | 0.562532 |
30ab6e7f6042639624953ffe483f974cab323857 | 1,184 | py | Python | tests/test_types.py | vitiral/tmq | 613800d5249ea5c8e2b60b6148c9eb159c30fbd6 | [
"MIT"
] | 1 | 2016-04-20T11:24:05.000Z | 2016-04-20T11:24:05.000Z | tests/test_types.py | cloudformdesign/tmq | 613800d5249ea5c8e2b60b6148c9eb159c30fbd6 | [
"MIT"
] | null | null | null | tests/test_types.py | cloudformdesign/tmq | 613800d5249ea5c8e2b60b6148c9eb159c30fbd6 | [
"MIT"
] | 1 | 2016-06-30T10:40:36.000Z | 2016-06-30T10:40:36.000Z | import socket
from unittest import TestCase
from tmq import define as td
| 28.878049 | 77 | 0.620777 |
30abbfa62591f83ed2fd836ae5d584e0bbebca55 | 1,554 | py | Python | errors.py | Rested/multi-translate | 565ef2ac7e8b5f94595cecc78b4076a3bc9be45e | [
"MIT"
] | 1 | 2021-08-22T14:43:11.000Z | 2021-08-22T14:43:11.000Z | errors.py | Rested/multi-translate | 565ef2ac7e8b5f94595cecc78b4076a3bc9be45e | [
"MIT"
] | null | null | null | errors.py | Rested/multi-translate | 565ef2ac7e8b5f94595cecc78b4076a3bc9be45e | [
"MIT"
] | null | null | null | from typing import Optional
from fastapi import HTTPException
| 27.263158 | 76 | 0.780566 |
30ae3cbe610349b285e7a2669b8ef77b43be4c92 | 235 | py | Python | argsort_info.py | ikwzm/ArgSort-Kv260 | 364f3c3164bb0a938bf65acdb254bd935873fd3f | [
"BSD-2-Clause"
] | 1 | 2020-10-21T01:48:22.000Z | 2020-10-21T01:48:22.000Z | argsort_info.py | ikwzm/ArgSort-Ultra96 | 7d18963d985403d67bc8e3dfa0e35493b99fb714 | [
"BSD-2-Clause"
] | null | null | null | argsort_info.py | ikwzm/ArgSort-Ultra96 | 7d18963d985403d67bc8e3dfa0e35493b99fb714 | [
"BSD-2-Clause"
] | null | null | null | from uio import Uio
from argsort_axi import ArgSort_AXI
if __name__ == '__main__':
uio = Uio('uio_argsort')
argsort_axi = ArgSort_AXI(uio.regs())
argsort_axi.print_info()
argsort_axi.print_debug()
| 23.5 | 41 | 0.659574 |
30ae6e3f4e096d6682d25c21fc12e815e531f331 | 30,320 | py | Python | SRC/__mainv2__.py | Prog-LucasAlves/dados_financeiros_b3 | e9cb2f6ed0e7b1a524fe68d75a444e458aad5689 | [
"MIT"
] | 3 | 2021-11-06T02:04:08.000Z | 2022-01-12T19:33:19.000Z | SRC/__mainv2__.py | Prog-LucasAlves/dados_financeiros_b3 | e9cb2f6ed0e7b1a524fe68d75a444e458aad5689 | [
"MIT"
] | 4 | 2021-11-06T01:44:42.000Z | 2022-03-03T16:21:39.000Z | SRC/__mainv2__.py | Prog-LucasAlves/dados_financeiros_b3 | e9cb2f6ed0e7b1a524fe68d75a444e458aad5689 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
'''
Author: Lucas Alves
Linkedin: https://www.linkedin.com/in/lucasalves-ast/
'''
# TODO #4 Atualizar python 3.9.5 -> 3.9.9
# Importar bibliotecas internas
import __conectdb__
import __query__
import __check__
import __check_semana__
import __list__
# Importar ... | 49.381107 | 795 | 0.342183 |
30af49b765dcbb3a66d9450622bc98eed6a582a1 | 1,115 | py | Python | setup.py | Ezio-Sarthak/urwid_picker_widgets | 534e5c34785ad3d78a58147a0a66ff4240a493d7 | [
"MIT"
] | null | null | null | setup.py | Ezio-Sarthak/urwid_picker_widgets | 534e5c34785ad3d78a58147a0a66ff4240a493d7 | [
"MIT"
] | null | null | null | setup.py | Ezio-Sarthak/urwid_picker_widgets | 534e5c34785ad3d78a58147a0a66ff4240a493d7 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name="urwid_picker_widgets",
version="0.4",
description="Specialized picker widgets for urwid "
"that extend its features.",
lon... | 33.787879 | 67 | 0.6 |
30afc8660c7eb2aaef5785919af30ff2be36675f | 2,807 | py | Python | Analysis/Clustering/mdrmsd.py | maccallumlab/calmodulin_pre_paper | 894cec2e098d8ab436c58bd8e7e3aca6484146ed | [
"MIT"
] | null | null | null | Analysis/Clustering/mdrmsd.py | maccallumlab/calmodulin_pre_paper | 894cec2e098d8ab436c58bd8e7e3aca6484146ed | [
"MIT"
] | null | null | null | Analysis/Clustering/mdrmsd.py | maccallumlab/calmodulin_pre_paper | 894cec2e098d8ab436c58bd8e7e3aca6484146ed | [
"MIT"
] | null | null | null | ##Clustering script for CaM_Trials##
#clusters using HDBSCAN the last 1 microsecond of simulation
#uses rmsd to native of backbone (excluding flexible tails but including peptide) as distance metric
import mdtraj as md
import numpy as np
import matplotlib.pyplot as plt
import hdbscan
MIN_SAMPLES = 200 #determined fr... | 34.654321 | 183 | 0.705736 |
30b2fb5b2befde28e12c0b3fe7d84ae662ef46d0 | 16,587 | py | Python | turtlex/turtlex_gym/scripts/arm_moveit_test.py | andreabradpitto/turtlex | 37a2315450f896d10dcb9ebc8968207e476dcf82 | [
"Apache-2.0"
] | null | null | null | turtlex/turtlex_gym/scripts/arm_moveit_test.py | andreabradpitto/turtlex | 37a2315450f896d10dcb9ebc8968207e476dcf82 | [
"Apache-2.0"
] | null | null | null | turtlex/turtlex_gym/scripts/arm_moveit_test.py | andreabradpitto/turtlex | 37a2315450f896d10dcb9ebc8968207e476dcf82 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import rospy
import numpy as np
import sys
import moveit_commander
#import moveit_msgs.msg
import geometry_msgs.msg
import time
#from std_srvs.srv import Empty
from utils import tcolors
# TODO this code is untested and not properly documented for the current version of the repository
# TODO ... | 42.860465 | 220 | 0.685718 |
30b30d3094d7a01c1edc83972202158cd08de412 | 1,580 | py | Python | python/src/aoc/year2017/day20.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | 1 | 2021-02-16T21:30:04.000Z | 2021-02-16T21:30:04.000Z | python/src/aoc/year2017/day20.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | null | null | null | python/src/aoc/year2017/day20.py | ocirne/adventofcode | ea9b5f1b48a04284521e85c96b420ed54adf55f0 | [
"Unlicense"
] | null | null | null | import re
from dataclasses import dataclass
from itertools import combinations
from aoc.util import load_input, load_example
def part1(lines):
r""" \_()_/ """
return next(index for index, line in enumerate(lines) if "a=<0,0,0>" in line)
def part2(lines):
"""
>>> part2(load_example(__file__, "20... | 22.898551 | 81 | 0.578481 |
30b4cc58be44d21f1ee7aa4386ff6c15fa728253 | 2,750 | py | Python | client/hr_services/doctype/employee_loan_application/employee_loan_application.py | mhbu50/client | b99003b872a1599ba8c4b0ca948610a1f49d527f | [
"MIT"
] | null | null | null | client/hr_services/doctype/employee_loan_application/employee_loan_application.py | mhbu50/client | b99003b872a1599ba8c4b0ca948610a1f49d527f | [
"MIT"
] | null | null | null | client/hr_services/doctype/employee_loan_application/employee_loan_application.py | mhbu50/client | b99003b872a1599ba8c4b0ca948610a1f49d527f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, math
from frappe import _
from frappe.utils import flt
from frappe.model.mapper import get_mapped_doc
from frappe.model.d... | 41.044776 | 143 | 0.768 |
30b56222a6760be51c10b4e7775cfc2a92a99324 | 7,115 | py | Python | hopper/utils/bitbake/BitBakeTask.py | Xilinx/hopper | 77b35f0744cde4608fe051ec41535ca0d2ca01c6 | [
"MIT"
] | 2 | 2015-09-06T02:31:34.000Z | 2017-08-04T07:13:19.000Z | hopper/utils/bitbake/BitBakeTask.py | Xilinx/hopper | 77b35f0744cde4608fe051ec41535ca0d2ca01c6 | [
"MIT"
] | null | null | null | hopper/utils/bitbake/BitBakeTask.py | Xilinx/hopper | 77b35f0744cde4608fe051ec41535ca0d2ca01c6 | [
"MIT"
] | null | null | null | # Copyright (c) 2015 Xilinx Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distrib... | 31.343612 | 112 | 0.691918 |
30b57b51f34a734cf817e94f825c3de8cc32a57f | 1,970 | py | Python | rainbow/dueling_dqn.py | RayYoh/BasicRL | bb5c27731f89e98b7c71fa966918220fddb47d5a | [
"Apache-2.0"
] | 12 | 2021-10-08T12:57:20.000Z | 2022-03-23T09:23:24.000Z | rainbow/dueling_dqn.py | RayYoh/BasicRL | bb5c27731f89e98b7c71fa966918220fddb47d5a | [
"Apache-2.0"
] | null | null | null | rainbow/dueling_dqn.py | RayYoh/BasicRL | bb5c27731f89e98b7c71fa966918220fddb47d5a | [
"Apache-2.0"
] | null | null | null | from dqn import DQN
from utils import *
from logx import *
import gym
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--env', type=str, default='CartPole-v0')
parser.add_argument('--target_update', type=int, default=100)
parser.add_argument('--epsi... | 35.818182 | 107 | 0.638071 |
30b638da5030fbfdcd883d8276e056b82e0090a9 | 2,200 | bzl | Python | tools/build_rules/test_rules_private.bzl | jobechoi/bazel | c03e9ac2588a590881350f4f9dd859de480240de | [
"Apache-2.0"
] | 16,989 | 2015-09-01T19:57:15.000Z | 2022-03-31T23:54:00.000Z | tools/build_rules/test_rules_private.bzl | jobechoi/bazel | c03e9ac2588a590881350f4f9dd859de480240de | [
"Apache-2.0"
] | 12,562 | 2015-09-01T09:06:01.000Z | 2022-03-31T22:26:20.000Z | tools/build_rules/test_rules_private.bzl | jobechoi/bazel | c03e9ac2588a590881350f4f9dd859de480240de | [
"Apache-2.0"
] | 3,707 | 2015-09-02T19:20:01.000Z | 2022-03-31T17:06:14.000Z | # Copyright 2019 The Bazel 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 la... | 46.808511 | 102 | 0.676364 |
30b73febe56f51aebdbe91d2261f2de1621b48b7 | 1,754 | py | Python | openmc_plasma_source/ring_source.py | mdfaisal98/openmc-plasma-source | e55d61ce6d641f4d382ce298b6f6335cd46bc507 | [
"MIT"
] | null | null | null | openmc_plasma_source/ring_source.py | mdfaisal98/openmc-plasma-source | e55d61ce6d641f4d382ce298b6f6335cd46bc507 | [
"MIT"
] | null | null | null | openmc_plasma_source/ring_source.py | mdfaisal98/openmc-plasma-source | e55d61ce6d641f4d382ce298b6f6335cd46bc507 | [
"MIT"
] | null | null | null |
import openmc
| 36.541667 | 98 | 0.614595 |
30b7f6927cf433ce23be01d4a486fea2d59cd181 | 989 | py | Python | python/items_factory.py | yeachan153/GildedRose-Refactoring-Kata | 77a5c01f3a2250882142f3695e3731372330618c | [
"MIT"
] | null | null | null | python/items_factory.py | yeachan153/GildedRose-Refactoring-Kata | 77a5c01f3a2250882142f3695e3731372330618c | [
"MIT"
] | null | null | null | python/items_factory.py | yeachan153/GildedRose-Refactoring-Kata | 77a5c01f3a2250882142f3695e3731372330618c | [
"MIT"
] | null | null | null | from python.items import AgedBrieItem, BackStageItem, RagnarosItem, ConjuredItem
from python.exceptions import InvalidRepositoryException
from typing import Union
| 28.257143 | 80 | 0.61274 |
30b91860bc2a1d24f754665429d1043bd8923a57 | 17,616 | py | Python | rdll.py | juntalis/python-ctypes-sandbox | a71783d79dff693fbf6d4f77b1ee864c8c1f30c9 | [
"WTFPL"
] | 3 | 2015-06-07T11:33:00.000Z | 2021-01-28T09:05:13.000Z | rdll.py | juntalis/python-ctypes-sandbox | a71783d79dff693fbf6d4f77b1ee864c8c1f30c9 | [
"WTFPL"
] | null | null | null | rdll.py | juntalis/python-ctypes-sandbox | a71783d79dff693fbf6d4f77b1ee864c8c1f30c9 | [
"WTFPL"
] | 1 | 2015-06-07T11:40:15.000Z | 2015-06-07T11:40:15.000Z | # encoding: utf-8
"""
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://sam.zoy.org/wtfpl/COPYING for mor... | 30.689895 | 106 | 0.699535 |
30b94d8884a9988e3bf75f6547fb55a3b5efb3c6 | 254 | py | Python | pyneos/mypaths.py | kavehshamsi/neos | 2ecfbd821c1cd53d1fecf1b51d25df8124955345 | [
"MIT"
] | null | null | null | pyneos/mypaths.py | kavehshamsi/neos | 2ecfbd821c1cd53d1fecf1b51d25df8124955345 | [
"MIT"
] | null | null | null | pyneos/mypaths.py | kavehshamsi/neos | 2ecfbd821c1cd53d1fecf1b51d25df8124955345 | [
"MIT"
] | null | null | null |
import os
home_dir = os.path.expanduser('~')
neos_dir = '.' # have this point to your neos directory
neos_cmd = neos_dir + '/bin/neos'
abc_cmd = neos_dir + '/bin/abc'
abclib_path = neos_dir + '/cells/simpler.lib'
neos_bench_dir = neos_dir + '/bench/'
| 23.090909 | 55 | 0.69685 |
30b99c2170d89f5d2ccfbed4277252914acb4cde | 181 | py | Python | allauth/socialaccount/providers/eveonline_provider/urls.py | Fuzzwah/django-allauth | 071cbef1388bb61a563d3e41197bd5b7c26664d2 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/eveonline_provider/urls.py | Fuzzwah/django-allauth | 071cbef1388bb61a563d3e41197bd5b7c26664d2 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/eveonline_provider/urls.py | Fuzzwah/django-allauth | 071cbef1388bb61a563d3e41197bd5b7c26664d2 | [
"MIT"
] | null | null | null | from allauth.socialaccount.providers.oauth2_provider.urls import default_urlpatterns
from .provider import EveOnlineProvider
urlpatterns = default_urlpatterns(EveOnlineProvider)
| 25.857143 | 84 | 0.878453 |
30b9b62f9f4a4350440a91a6d9b63e96c38bdc8e | 1,241 | py | Python | py-td3-cinema/obj.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td3-cinema/obj.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td3-cinema/obj.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from storage.struct import Struct as Struct
from storage.db import DB as DB
if not os.path.exists("data/"):
os.makedirs("data/")
# Classes
GuestDB = DB("data/guest.db", Guest)
FunctionaryDB = DB("data/functionary.db", Functionary)
ScreeningDB = DB("data/seanc... | 20.016129 | 54 | 0.598711 |
30ba430cdf76ad0b3be49be3a0fb1f251b2d55b7 | 4,139 | py | Python | portal/trigger_states/views.py | uwcirg/true_nth_usa_portal | e2434731aed86f1c43f15d428dde8ffc28ac7e5f | [
"BSD-3-Clause"
] | 3 | 2017-01-15T10:11:57.000Z | 2018-10-02T23:46:44.000Z | portal/trigger_states/views.py | uwcirg/true_nth_usa_portal | e2434731aed86f1c43f15d428dde8ffc28ac7e5f | [
"BSD-3-Clause"
] | 876 | 2016-04-04T20:45:11.000Z | 2019-02-28T00:10:36.000Z | portal/trigger_states/views.py | uwcirg/truenth-portal | 459a0d157982f010175c50b9cccd860a61790370 | [
"BSD-3-Clause"
] | 9 | 2016-04-13T01:18:55.000Z | 2018-09-19T20:44:23.000Z | from flask import Blueprint, current_app, jsonify, request
from .empro_states import users_trigger_state
from .models import TriggerState
from ..database import db
from ..date_tools import FHIR_datetime
from ..extensions import oauth
from ..models.user import get_user
from ..views.crossdomain import crossdomain
trigge... | 39.419048 | 76 | 0.692438 |
30bcfc077d963febf3414686b91e003bc8d29ce4 | 8,104 | py | Python | project/school-website/school_website/basic/views.py | imsks/Web-Dev-with-python-and-Django | dec87795d18c24a5492758202c29a463bbba105a | [
"MIT"
] | null | null | null | project/school-website/school_website/basic/views.py | imsks/Web-Dev-with-python-and-Django | dec87795d18c24a5492758202c29a463bbba105a | [
"MIT"
] | null | null | null | project/school-website/school_website/basic/views.py | imsks/Web-Dev-with-python-and-Django | dec87795d18c24a5492758202c29a463bbba105a | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic import (TemplateView, )
import datetime
# returns current year
| 27.658703 | 76 | 0.564166 |
30bd99617cc73c8aa8986128591a9028767938f9 | 2,144 | py | Python | ytdownloadbot/helpers/downloader.py | DiscordBot2020/KucingSMP-Downloader | e87507b979b172400d855a640c646b83be686631 | [
"MIT"
] | null | null | null | ytdownloadbot/helpers/downloader.py | DiscordBot2020/KucingSMP-Downloader | e87507b979b172400d855a640c646b83be686631 | [
"MIT"
] | null | null | null | ytdownloadbot/helpers/downloader.py | DiscordBot2020/KucingSMP-Downloader | e87507b979b172400d855a640c646b83be686631 | [
"MIT"
] | null | null | null | from .errors import DownloaderFinished, NotAcceptedFormat, StreamNotFound
from moviepy.audio.io.AudioFileClip import AudioFileClip
from typing import Any, BinaryIO, Optional
from pytube import Stream, YouTube
| 28.586667 | 76 | 0.597481 |
30bda8ef7e38b0405c6b820fe73dc16fb49cbd7d | 1,245 | py | Python | house_prices_regression_model/predict.py | jmonsalverodilla/house_prices_regression_model | 28fd24e777fcf838acffda6ea669e1339d92819d | [
"MIT"
] | null | null | null | house_prices_regression_model/predict.py | jmonsalverodilla/house_prices_regression_model | 28fd24e777fcf838acffda6ea669e1339d92819d | [
"MIT"
] | null | null | null | house_prices_regression_model/predict.py | jmonsalverodilla/house_prices_regression_model | 28fd24e777fcf838acffda6ea669e1339d92819d | [
"MIT"
] | null | null | null | import typing as t
import numpy as np
import pandas as pd
from house_prices_regression_model import __version__ as VERSION
from house_prices_regression_model.processing.data_manager import load_pipeline
from house_prices_regression_model.config.core import load_config_file, SETTINGS_PATH
from house_prices_regression_m... | 40.16129 | 95 | 0.774297 |
30be96e1cbd3a990456c230c0ae00a93ef7bc58a | 14,694 | py | Python | hybrid/samplers.py | arcondello/dwave-hybrid | 7c75c2dfea3b3d8b769e301da7114eab26bcb165 | [
"Apache-2.0"
] | null | null | null | hybrid/samplers.py | arcondello/dwave-hybrid | 7c75c2dfea3b3d8b769e301da7114eab26bcb165 | [
"Apache-2.0"
] | null | null | null | hybrid/samplers.py | arcondello/dwave-hybrid | 7c75c2dfea3b3d8b769e301da7114eab26bcb165 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 D-Wave Systems 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 wri... | 38.770449 | 115 | 0.675786 |
30c15578533a2994c5fc4ffc5aaf53e8cae12930 | 3,355 | py | Python | src/gui/SelectActorsFormWrapper.py | perfidia/afefuc | 9717f446dab909cbdac0dc57374859f75436238e | [
"MIT"
] | null | null | null | src/gui/SelectActorsFormWrapper.py | perfidia/afefuc | 9717f446dab909cbdac0dc57374859f75436238e | [
"MIT"
] | null | null | null | src/gui/SelectActorsFormWrapper.py | perfidia/afefuc | 9717f446dab909cbdac0dc57374859f75436238e | [
"MIT"
] | 1 | 2021-10-01T18:09:33.000Z | 2021-10-01T18:09:33.000Z | '''
Created on Apr 25, 2013
@author: Bartosz Alchimowicz
'''
from PyQt4 import QtCore, QtGui
from generated.ui.SelectForm import Ui_SelectForm
#from format import model
#from utils import converter
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
| 28.675214 | 115 | 0.742176 |
30c22525eb175856677ab787ab580cdf22d02aef | 737 | py | Python | guillotina/db/strategies/simple.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 173 | 2017-03-10T18:26:12.000Z | 2022-03-03T06:48:56.000Z | guillotina/db/strategies/simple.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 921 | 2017-03-08T14:04:43.000Z | 2022-03-30T10:28:56.000Z | guillotina/db/strategies/simple.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 60 | 2017-03-16T19:59:44.000Z | 2022-03-03T06:48:59.000Z | from guillotina import configure
from guillotina import glogging
from guillotina.db.interfaces import IDBTransactionStrategy
from guillotina.db.interfaces import ITransaction
from guillotina.db.strategies.base import BaseStrategy
logger = glogging.getLogger("guillotina")
| 33.5 | 85 | 0.766621 |
30c2f9dfa7bc2b1066e3c3e3652626f99548814b | 1,502 | py | Python | ktrade/ib_api.py | ShabbirHasan1/ktrade | 7b98f6647223b541e76b7937658c89fd5b3acd34 | [
"MIT"
] | null | null | null | ktrade/ib_api.py | ShabbirHasan1/ktrade | 7b98f6647223b541e76b7937658c89fd5b3acd34 | [
"MIT"
] | null | null | null | ktrade/ib_api.py | ShabbirHasan1/ktrade | 7b98f6647223b541e76b7937658c89fd5b3acd34 | [
"MIT"
] | null | null | null | import logging
from ktrade.config import is_configured, configuration_for
from time import sleep
from ktrade.queues import inbound_queue, outbound_queue
from ibapi.client import EClient
from ibapi.wrapper import EWrapper
from threading import Thread
def start_listening(app):
""" The main entry point to the backgroun... | 30.653061 | 72 | 0.690413 |
30c5f2bbaaebb57c2278a7e13761c8ab234ce074 | 945 | py | Python | app/grandchallenge/products/migrations/0007_projectairfiles.py | nlessmann/grand-challenge.org | 36abf6ccb40e2fc3fd3ff00e81deabd76f7e1ef8 | [
"Apache-2.0"
] | 101 | 2018-04-11T14:48:04.000Z | 2022-03-28T00:29:48.000Z | app/grandchallenge/products/migrations/0007_projectairfiles.py | nlessmann/grand-challenge.org | 36abf6ccb40e2fc3fd3ff00e81deabd76f7e1ef8 | [
"Apache-2.0"
] | 1,733 | 2018-03-21T11:56:16.000Z | 2022-03-31T14:58:30.000Z | app/grandchallenge/products/migrations/0007_projectairfiles.py | nlessmann/grand-challenge.org | 36abf6ccb40e2fc3fd3ff00e81deabd76f7e1ef8 | [
"Apache-2.0"
] | 42 | 2018-06-08T05:49:07.000Z | 2022-03-29T08:43:01.000Z | # Generated by Django 3.1.11 on 2021-07-01 20:18
from django.db import migrations, models
import grandchallenge.core.storage
| 25.540541 | 74 | 0.433862 |
30c75ce3dd644977b6527a49ba45c54bad05896b | 2,586 | py | Python | rl/valuefunction/linear.py | nickswalker/counterpoint-reinforcement-learning | 1d0481bd2c9976533175339e411a41f4eb1650aa | [
"MIT"
] | 1 | 2016-12-09T18:29:30.000Z | 2016-12-09T18:29:30.000Z | rl/valuefunction/linear.py | nickswalker/counterpoint-reinforcement-learning | 1d0481bd2c9976533175339e411a41f4eb1650aa | [
"MIT"
] | null | null | null | rl/valuefunction/linear.py | nickswalker/counterpoint-reinforcement-learning | 1d0481bd2c9976533175339e411a41f4eb1650aa | [
"MIT"
] | null | null | null | from typing import List, Set
import numpy as np
from rl.action import Action
from rl.state import State
from rl.valuefunction import FeatureExtractor
| 32.325 | 84 | 0.637664 |
30c78c08bfce5b97f5737d7a5077457a88b30664 | 225 | py | Python | shop/shop/products/validators.py | nikolaynikolov971/NftShop | 09a535a6f708f0f6da5addeb8781f9bdcea72cf3 | [
"MIT"
] | null | null | null | shop/shop/products/validators.py | nikolaynikolov971/NftShop | 09a535a6f708f0f6da5addeb8781f9bdcea72cf3 | [
"MIT"
] | null | null | null | shop/shop/products/validators.py | nikolaynikolov971/NftShop | 09a535a6f708f0f6da5addeb8781f9bdcea72cf3 | [
"MIT"
] | null | null | null | from django.core.exceptions import ValidationError
| 28.125 | 59 | 0.728889 |
30c7e84f74ba8bf12401ce79d2978143101f2226 | 298 | py | Python | src/oscar/templatetags/dashboard_tags.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/templatetags/dashboard_tags.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/templatetags/dashboard_tags.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django import template
from oscar.core.compat import assignment_tag
from oscar.core.loading import get_class
get_nodes = get_class('dashboard.menu', 'get_nodes')
register = template.Library()
| 22.923077 | 53 | 0.768456 |
30c939a4b0dc0d1167348e5202a204de6c5d17f1 | 762 | py | Python | amlearn/utils/tests/test_data.py | Qi-max/amlearn | 88189519bc1079ab5085d5871169c223e0d03057 | [
"BSD-3-Clause-LBNL"
] | 12 | 2019-02-07T16:45:29.000Z | 2021-03-15T12:44:07.000Z | amlearn/utils/tests/test_data.py | Qi-max/amlearn | 88189519bc1079ab5085d5871169c223e0d03057 | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-11-22T04:59:10.000Z | 2019-12-05T14:22:29.000Z | amlearn/utils/tests/test_data.py | Qi-max/amlearn | 88189519bc1079ab5085d5871169c223e0d03057 | [
"BSD-3-Clause-LBNL"
] | 5 | 2020-12-03T07:18:50.000Z | 2022-01-20T09:17:47.000Z | import numpy as np
from amlearn.utils.basetest import AmLearnTest
from amlearn.utils.data import get_isometric_lists
| 34.636364 | 74 | 0.624672 |
30ca99c39ead18bfbe2af06b6da4c3a7335961fa | 1,793 | py | Python | DishDash/pages/text_photo_parser.py | NealWhitlock/MyDish-DS | a6d6e87bf7f6d697a145811f65532f83bd742bf9 | [
"MIT"
] | 1 | 2020-05-30T02:33:31.000Z | 2020-05-30T02:33:31.000Z | DishDash/pages/text_photo_parser.py | Yonipineda/MyDish-DS | d3a74611530aae08abafc6ae7dcd38735b4b81ea | [
"MIT"
] | 7 | 2021-03-31T19:48:24.000Z | 2021-09-08T02:05:28.000Z | DishDash/pages/text_photo_parser.py | Yonipineda/MyDish-DS | d3a74611530aae08abafc6ae7dcd38735b4b81ea | [
"MIT"
] | 8 | 2020-04-08T06:36:29.000Z | 2020-06-05T14:34:46.000Z | # Imports from 3rd party libraries
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
# Imports from this application
from app import app
# 2 column layout. 1st column width = 4/12
# https://dash... | 28.460317 | 285 | 0.546012 |
30cb87139e9b61b8326a70dcabf17ec24ae226f9 | 1,055 | py | Python | setup.py | dsuch/warlock | 19b2b3e103ddd753bb5da5b5d96f801c267dad3b | [
"Apache-2.0"
] | 10 | 2016-09-14T22:00:03.000Z | 2019-01-28T21:58:43.000Z | setup.py | openstack/deb-python-warlock | 19b2b3e103ddd753bb5da5b5d96f801c267dad3b | [
"Apache-2.0"
] | null | null | null | setup.py | openstack/deb-python-warlock | 19b2b3e103ddd753bb5da5b5d96f801c267dad3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Brian Waldon
#
# 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,... | 30.142857 | 75 | 0.719431 |
30cc287a08506c5a6079474b64a72925e2e92dbf | 424 | py | Python | traxee-simple/traxee/flipkart/forms.py | chauhan17nitin/traxee | 2a861b89e2966024629f587b485a411ede958d02 | [
"Apache-2.0"
] | null | null | null | traxee-simple/traxee/flipkart/forms.py | chauhan17nitin/traxee | 2a861b89e2966024629f587b485a411ede958d02 | [
"Apache-2.0"
] | 2 | 2021-02-08T20:50:56.000Z | 2021-04-30T21:23:50.000Z | traxee-simple/traxee/flipkart/forms.py | chauhan17nitin/traxee | 2a861b89e2966024629f587b485a411ede958d02 | [
"Apache-2.0"
] | 1 | 2020-07-27T14:05:00.000Z | 2020-07-27T14:05:00.000Z | from django import forms
# class HandlerForm(forms.ModelForm):
# class Meta:
# model = Handlers
# fields = ['handle', 'handler_name']
| 26.5 | 71 | 0.658019 |
30ccb829ad766d8012210f355baec225b2c1fc29 | 226 | py | Python | fleet_management/core/vehicle/serializers.py | nahidsaikat/Fleet-Management-Backend | d3a20a9b971600eb039bcc62068599cbbc72537e | [
"MIT"
] | 3 | 2018-08-09T14:06:09.000Z | 2021-10-31T08:49:56.000Z | fleet_management/core/vehicle/serializers.py | nahidsaikat/Fleet-Management-Backend | d3a20a9b971600eb039bcc62068599cbbc72537e | [
"MIT"
] | null | null | null | fleet_management/core/vehicle/serializers.py | nahidsaikat/Fleet-Management-Backend | d3a20a9b971600eb039bcc62068599cbbc72537e | [
"MIT"
] | 2 | 2018-10-09T08:38:28.000Z | 2022-01-19T12:27:58.000Z | from rest_framework import serializers
from .models import Vehicle
| 25.111111 | 62 | 0.699115 |
30cd857191e434074dedf1737ca8f1179a3e4f2d | 183 | py | Python | src/profile_build_tools/__init__.py | atu4403/profile_build_tools | 37e7e03c285bd310a605b924d5e9c143036edd8b | [
"MIT"
] | null | null | null | src/profile_build_tools/__init__.py | atu4403/profile_build_tools | 37e7e03c285bd310a605b924d5e9c143036edd8b | [
"MIT"
] | null | null | null | src/profile_build_tools/__init__.py | atu4403/profile_build_tools | 37e7e03c285bd310a605b924d5e9c143036edd8b | [
"MIT"
] | null | null | null | from .atcoder_images import update_atcoder_images
from .pypi_stats import get_pypi_stats
from .qiita_stats import get_qiita_stats
from .github_stats import get_github_stats, _to_list
| 36.6 | 52 | 0.879781 |
30ce16a2a000257fc608a7033745bf529c0115b7 | 239 | py | Python | Ejercicios/for.py | julioh/python-chile | da7fc9cdfb03c69c36a98903b80a45c795f2c543 | [
"MIT"
] | null | null | null | Ejercicios/for.py | julioh/python-chile | da7fc9cdfb03c69c36a98903b80a45c795f2c543 | [
"MIT"
] | null | null | null | Ejercicios/for.py | julioh/python-chile | da7fc9cdfb03c69c36a98903b80a45c795f2c543 | [
"MIT"
] | null | null | null | #! /usr/bin/python
# -*- coding: iso-8859-15 -*-
n = int(input("Ingrese la cantidad de datos: "))
suma = 0
for i in range(n):
x = float(input("Ingrese el dato: "))
suma = suma + x
prom = suma / n
print("El promedio es: " ,prom) | 26.555556 | 48 | 0.585774 |
30d1376ed4a53ab1347ac9676cdec36e14b4c7cc | 823 | py | Python | interface/popup.py | spatocode/seeker | b7c3ccf5baa13ce12f6f9f33cc73fa9f09b8a1dc | [
"BSD-2-Clause"
] | null | null | null | interface/popup.py | spatocode/seeker | b7c3ccf5baa13ce12f6f9f33cc73fa9f09b8a1dc | [
"BSD-2-Clause"
] | null | null | null | interface/popup.py | spatocode/seeker | b7c3ccf5baa13ce12f6f9f33cc73fa9f09b8a1dc | [
"BSD-2-Clause"
] | null | null | null | import wx
| 29.392857 | 70 | 0.617254 |
30d165ce41d75db3b6c2ab11eadb6639cb54d231 | 4,872 | py | Python | backend-code/yeprayas_project/settings.py | sumitpal1007/yeprayas_react | f09f56e4357b94412b091cdf7cad0de6e45aa7b8 | [
"MIT"
] | null | null | null | backend-code/yeprayas_project/settings.py | sumitpal1007/yeprayas_react | f09f56e4357b94412b091cdf7cad0de6e45aa7b8 | [
"MIT"
] | null | null | null | backend-code/yeprayas_project/settings.py | sumitpal1007/yeprayas_react | f09f56e4357b94412b091cdf7cad0de6e45aa7b8 | [
"MIT"
] | null | null | null | """
Django settings for yeprayas_project project.
Generated by 'django-admin startproject' using Django 3.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
fro... | 26.917127 | 108 | 0.687397 |
30d1cc135258e97fecc0b8ea9dc90f0b189bdfae | 2,193 | py | Python | src/jobs_done10/_tests/test_repository.py | prusse-martin/jobs_done10 | 2433bfda862278c699a0532a3b32c9d7d0acf9e3 | [
"MIT"
] | 21 | 2015-11-26T13:27:01.000Z | 2022-01-11T03:17:54.000Z | src/jobs_done10/_tests/test_repository.py | prusse-martin/jobs_done10 | 2433bfda862278c699a0532a3b32c9d7d0acf9e3 | [
"MIT"
] | 7 | 2018-08-31T16:00:52.000Z | 2021-11-10T17:57:04.000Z | src/jobs_done10/_tests/test_repository.py | prusse-martin/jobs_done10 | 2433bfda862278c699a0532a3b32c9d7d0acf9e3 | [
"MIT"
] | 7 | 2016-02-12T18:13:21.000Z | 2020-06-09T15:15:24.000Z |
from jobs_done10.repository import Repository
| 43 | 101 | 0.554036 |
30d2229322a62fb2e0ac5875415e0837be9774f7 | 4,791 | py | Python | CAIL2020/sfksz/formatter/BertWordFormatter.py | ShenDezhou/CAIL | c4cfa98ab4ecedbce34a7a5a186830486047540c | [
"Apache-2.0"
] | 71 | 2020-07-16T01:49:27.000Z | 2022-03-27T16:55:00.000Z | CAIL2020/sfksz/formatter/BertWordFormatter.py | ShenDezhou/CAIL | c4cfa98ab4ecedbce34a7a5a186830486047540c | [
"Apache-2.0"
] | 11 | 2020-09-18T14:26:25.000Z | 2022-02-09T23:49:33.000Z | CAIL2020/sfksz/formatter/BertWordFormatter.py | ShenDezhou/CAIL | c4cfa98ab4ecedbce34a7a5a186830486047540c | [
"Apache-2.0"
] | 16 | 2020-07-15T07:24:30.000Z | 2022-03-19T05:41:11.000Z | import json
import torch
import numpy as np
import os
#from pytorch_pretrained_bert import BertTokenizer
from transformers import BertTokenizer
| 38.02381 | 104 | 0.550407 |
30d29665e569a1fad40e01acb4939e550d3579b3 | 418 | py | Python | docs/src/common/space/example.py | visigoths/visigoth | c5297148209d630f6668f0e5ba3039a8856d8320 | [
"MIT"
] | null | null | null | docs/src/common/space/example.py | visigoths/visigoth | c5297148209d630f6668f0e5ba3039a8856d8320 | [
"MIT"
] | 1 | 2021-01-26T16:55:48.000Z | 2021-09-03T15:29:14.000Z | docs/src/common/space/example.py | visigoths/visigoth | c5297148209d630f6668f0e5ba3039a8856d8320 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from visigoth import Diagram
from visigoth.common import Space, Text
d = Diagram(fill="white")
d.add(Text("Example Space, see below...",font_height=32,text_attributes={"stroke":"darkblue"}))
d.add(Space(200,200))
d.add(Text("...did you miss it? ^^^^",font_height=32,text_attributes={"stroke":"d... | 24.588235 | 95 | 0.679426 |
30d7351cc290ebbec3b32593c1c331e40980c0bc | 85 | py | Python | memit/apps.py | russlbrown/memit | cf89bb91264008d554602a6f44f2e0404a7903fc | [
"MIT"
] | null | null | null | memit/apps.py | russlbrown/memit | cf89bb91264008d554602a6f44f2e0404a7903fc | [
"MIT"
] | null | null | null | memit/apps.py | russlbrown/memit | cf89bb91264008d554602a6f44f2e0404a7903fc | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 14.166667 | 33 | 0.741176 |
30d773cd2d2e649aa8ce3ac7f8de4ec183f36637 | 106 | py | Python | djstripe/management/__init__.py | iqbalabd/dj-stripe | 0ae6b39e31e27f6e8076f3dd4f7d8f459380bdec | [
"MIT"
] | 2 | 2020-09-01T20:05:28.000Z | 2021-07-22T08:20:42.000Z | djstripe/management/__init__.py | iqbalabd/dj-stripe | 0ae6b39e31e27f6e8076f3dd4f7d8f459380bdec | [
"MIT"
] | 2 | 2019-07-29T08:40:11.000Z | 2019-08-01T09:45:30.000Z | djstripe/management/__init__.py | iqbalabd/dj-stripe | 0ae6b39e31e27f6e8076f3dd4f7d8f459380bdec | [
"MIT"
] | 2 | 2020-01-31T14:26:09.000Z | 2020-07-14T04:24:15.000Z | """
.. module:: djstripe.management.
:synopsis: dj-stripe - management module, contains commands.
"""
| 17.666667 | 63 | 0.679245 |
30d9ddb09f55d2ace753f27b29e345ba784b61c0 | 2,945 | py | Python | Mailbox/models.py | Positron11/Corkran | 53f463ca4f02e2617205bf67c123923dda2ce403 | [
"MIT"
] | null | null | null | Mailbox/models.py | Positron11/Corkran | 53f463ca4f02e2617205bf67c123923dda2ce403 | [
"MIT"
] | 3 | 2020-06-23T17:13:11.000Z | 2021-04-08T19:57:20.000Z | Mailbox/models.py | Positron11/Corkran | 53f463ca4f02e2617205bf67c123923dda2ce403 | [
"MIT"
] | null | null | null | from django.db import models
from datetime import datetime
from django.contrib import messages
from django.dispatch import receiver
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from polymorphic.models import PolymorphicModel
from Blog.models import Comment, Article, Announc... | 35.914634 | 164 | 0.788795 |
30dc1db20603dba0a6581e8467b5ea5697262a2a | 7,400 | py | Python | archive/extras/cat_dog_estimator/main.py | Pandinosaurus/tensorflow-workshop | 31c7ca9f9248d00da37a13ded55eada4c493c463 | [
"Apache-2.0"
] | 796 | 2016-09-27T17:35:54.000Z | 2021-08-23T06:15:03.000Z | archive/extras/cat_dog_estimator/main.py | Pandinosaurus/tensorflow-workshop | 31c7ca9f9248d00da37a13ded55eada4c493c463 | [
"Apache-2.0"
] | 18 | 2016-09-27T20:36:53.000Z | 2020-08-13T12:33:15.000Z | archive/extras/cat_dog_estimator/main.py | Pandinosaurus/tensorflow-workshop | 31c7ca9f9248d00da37a13ded55eada4c493c463 | [
"Apache-2.0"
] | 328 | 2016-09-27T17:36:06.000Z | 2021-01-18T03:17:17.000Z | """
A very simplified introduction to TensorFlow using Estimator API for training a
cat vs. dog classifier from the CIFAR-10 dataset. This version is intentionally
simplified and has a lot of room for improvment, in speed and accuracy.
Usage:
python main.py [train|predict] [predict file]
"""
import sys
import nump... | 29.365079 | 79 | 0.662838 |
30dc839ebe6b8f98f13b1bedf2d15538a5ad4f51 | 3,547 | py | Python | c2cgeoportal/tests/test_wfsparsing.py | pgiraud/c2cgeoportal | 3ec955c5c67d16256af726a62d586b3f4ec3b500 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cgeoportal/tests/test_wfsparsing.py | pgiraud/c2cgeoportal | 3ec955c5c67d16256af726a62d586b3f4ec3b500 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cgeoportal/tests/test_wfsparsing.py | pgiraud/c2cgeoportal | 3ec955c5c67d16256af726a62d586b3f4ec3b500 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Camptocamp SA
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# l... | 47.293333 | 81 | 0.74993 |
30dd5a7059f4e1bc53ae3794258405842dd99eed | 48,498 | py | Python | aiotfm/client.py | Athesdrake/aiotfm | c9054e215b8449cc72d28b5067679d25288c00ff | [
"MIT"
] | 30 | 2019-02-15T21:19:10.000Z | 2022-03-24T12:51:39.000Z | aiotfm/client.py | Athesdrake/aiotfm | c9054e215b8449cc72d28b5067679d25288c00ff | [
"MIT"
] | 11 | 2019-07-27T12:32:48.000Z | 2022-01-03T18:06:40.000Z | aiotfm/client.py | Athesdrake/aiotfm | c9054e215b8449cc72d28b5067679d25288c00ff | [
"MIT"
] | 23 | 2019-06-30T12:56:47.000Z | 2022-02-25T19:37:08.000Z | import asyncio
import logging
import random
import warnings
from typing import AnyStr, ByteString, Callable, List, Optional, Union
from aiotfm.connection import Connection
from aiotfm.enums import Community, GameMode, TradeError
from aiotfm.errors import AiotfmException, AlreadyConnected, CommunityPlatformErro... | 35.092619 | 114 | 0.672028 |
30e04e8a8cfcd79bf5f6b0eedf6e1ed94650416c | 782 | py | Python | cruzdb/sequence.py | adelq/cruzdb | 7df70bae92ddcda97263a21d4d916d63193c01d8 | [
"MIT"
] | 82 | 2015-01-20T03:04:05.000Z | 2022-02-02T10:41:13.000Z | cruzdb/sequence.py | adelq/cruzdb | 7df70bae92ddcda97263a21d4d916d63193c01d8 | [
"MIT"
] | 16 | 2015-02-21T18:09:43.000Z | 2021-10-08T07:53:49.000Z | cruzdb/sequence.py | adelq/cruzdb | 7df70bae92ddcda97263a21d4d916d63193c01d8 | [
"MIT"
] | 33 | 2015-01-01T17:19:56.000Z | 2021-11-18T10:23:09.000Z | import urllib as U
__all__ = ('sequence', )
def sequence(db, chrom, start, end):
"""
return the sequence for a region using the UCSC DAS
server. note the start is 1-based
each feature will have it's own .sequence method which sends
the correct start and end to this function.
>>> sequence('hg1... | 27.928571 | 68 | 0.612532 |
30e05beb76a59ba2b357811e38e4aba382bbac26 | 8,119 | py | Python | Tests/test_Statistics.py | jasmansingh84/PyStatisticalcalci | cc310f53472cb0a314849379c3c472ebd709c4b7 | [
"MIT"
] | null | null | null | Tests/test_Statistics.py | jasmansingh84/PyStatisticalcalci | cc310f53472cb0a314849379c3c472ebd709c4b7 | [
"MIT"
] | null | null | null | Tests/test_Statistics.py | jasmansingh84/PyStatisticalcalci | cc310f53472cb0a314849379c3c472ebd709c4b7 | [
"MIT"
] | null | null | null | import unittest
from CsvReader.CsvReader import CsvReader
from CsvReader.CsvReader2 import CsvReader2
from Statistics.Statistics import Statistics
if __name__ == '__main__':
unittest.main()
| 31.839216 | 107 | 0.631728 |
30e05fb9894ea163ce352e61d59cabed6bad2910 | 3,445 | py | Python | nipype/interfaces/tests/test_matlab.py | satra/NiPypeold | 23f3ce25a8bace32f29e912a3903fdc2485c68d3 | [
"BSD-3-Clause"
] | null | null | null | nipype/interfaces/tests/test_matlab.py | satra/NiPypeold | 23f3ce25a8bace32f29e912a3903fdc2485c68d3 | [
"BSD-3-Clause"
] | null | null | null | nipype/interfaces/tests/test_matlab.py | satra/NiPypeold | 23f3ce25a8bace32f29e912a3903fdc2485c68d3 | [
"BSD-3-Clause"
] | 1 | 2021-09-27T08:23:50.000Z | 2021-09-27T08:23:50.000Z | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
from tempfile import mkdtemp
from shutil import rmtree
from nipype.testing import (assert_equal, assert_true, assert_false,
assert_raises, skipif, parametric)
import ... | 36.263158 | 394 | 0.699274 |
30e1cf3af18e266744529cd1e097d5e081833dff | 260 | py | Python | malcolm/modules/xmap/blocks/__init__.py | hir12111/pymalcolm | 689542711ff903ee99876c40fc0eae8015e13314 | [
"Apache-2.0"
] | 11 | 2016-10-04T23:11:39.000Z | 2022-01-25T15:44:43.000Z | malcolm/modules/xmap/blocks/__init__.py | hir12111/pymalcolm | 689542711ff903ee99876c40fc0eae8015e13314 | [
"Apache-2.0"
] | 153 | 2016-06-01T13:31:02.000Z | 2022-03-31T11:17:18.000Z | malcolm/modules/xmap/blocks/__init__.py | hir12111/pymalcolm | 689542711ff903ee99876c40fc0eae8015e13314 | [
"Apache-2.0"
] | 16 | 2016-06-10T13:45:27.000Z | 2020-10-24T13:45:04.000Z | from malcolm.yamlutil import check_yaml_names, make_block_creator
xmap_driver_block = make_block_creator(__file__, "xmap_driver_block.yaml")
xmap_runnable_block = make_block_creator(__file__, "xmap_runnable_block.yaml")
__all__ = check_yaml_names(globals())
| 37.142857 | 78 | 0.85 |
30e1fd7441909339831253b7edc4f20af2eca867 | 536 | py | Python | tools/sam_filter.py | rishavray/PILFER | 1115dd87f6f7a9563b7ed8f6469f712daf941936 | [
"MIT"
] | 8 | 2019-04-03T14:39:48.000Z | 2022-01-18T18:10:58.000Z | tools/sam_filter.py | rishavray/PILFER | 1115dd87f6f7a9563b7ed8f6469f712daf941936 | [
"MIT"
] | 4 | 2018-12-17T05:08:07.000Z | 2022-01-19T07:54:27.000Z | tools/sam_filter.py | rishavray/PILFER | 1115dd87f6f7a9563b7ed8f6469f712daf941936 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import csv
import re
csvin = csv.reader(sys.stdin,delimiter="\t")
csvout = csv.writer(sys.stdout,delimiter="\t")
pattern = re.compile('NM:i:\d*')
for row in csvin:
nm_id = [i for i, x in enumerate(row) if re.search(pattern, x)]
nm_fields = row[nm_id[0]].split(':')
ref_fields = row[2].s... | 24.363636 | 64 | 0.684701 |
30e3bdfd7871899ee3a520a4d40bafa5df32a895 | 1,059 | py | Python | app/ac_common/testrunner.py | marwahaha/allecena | b8f8a15ca0dbc80e745febf0e81263ec197e7363 | [
"Apache-2.0"
] | 3 | 2018-04-29T15:40:37.000Z | 2020-04-15T20:37:08.000Z | app/ac_common/testrunner.py | marwahaha/allecena | b8f8a15ca0dbc80e745febf0e81263ec197e7363 | [
"Apache-2.0"
] | 1 | 2019-10-30T20:35:46.000Z | 2019-10-30T20:35:46.000Z | app/ac_common/testrunner.py | marwahaha/allecena | b8f8a15ca0dbc80e745febf0e81263ec197e7363 | [
"Apache-2.0"
] | 2 | 2019-08-04T02:54:22.000Z | 2021-03-03T21:03:11.000Z | # coding: utf-8
import os
from django.test.runner import DiscoverRunner
from django.conf import settings
| 32.090909 | 98 | 0.653447 |
30e3ef6e5c24a987b1fedcd5d0168ecfe09811cd | 3,720 | py | Python | plot_graphs_forest.py | jcdesousa/azure-ml-experiment | c2ac8cde52f910d0f27ecee92c629a735d8f1d08 | [
"MIT"
] | 2 | 2018-05-28T14:09:01.000Z | 2018-06-25T09:57:15.000Z | plot_graphs_forest.py | jcdesousa/azure-ml-experiment | c2ac8cde52f910d0f27ecee92c629a735d8f1d08 | [
"MIT"
] | null | null | null | plot_graphs_forest.py | jcdesousa/azure-ml-experiment | c2ac8cde52f910d0f27ecee92c629a735d8f1d08 | [
"MIT"
] | null | null | null | try:
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
from scipy import interp
from itertools import cycle
import numpy as np
from sklearn.metrics import roc_curve, auc
from sklearn.metrics import confusion_matrix
from sklearn.preprocessing import label_binari... | 31.794872 | 80 | 0.622312 |
30e7cf2e54979fe9556749814374d5edc81ce510 | 6,181 | py | Python | sigflow/blocks/filter.py | lamyc/sigflow | f7f9dae1a4bc9a588b7eb87ac0501fd9febb8b86 | [
"MIT"
] | 1 | 2021-08-05T15:17:15.000Z | 2021-08-05T15:17:15.000Z | sigflow/blocks/filter.py | lamyc/sigflow | f7f9dae1a4bc9a588b7eb87ac0501fd9febb8b86 | [
"MIT"
] | 1 | 2021-08-04T22:37:25.000Z | 2021-08-04T22:37:25.000Z | sigflow/blocks/filter.py | lamyc/sigflow | f7f9dae1a4bc9a588b7eb87ac0501fd9febb8b86 | [
"MIT"
] | 1 | 2021-09-02T08:50:02.000Z | 2021-09-02T08:50:02.000Z | """A filter block.
"""
import control
import numpy as np
import scipy
from .base import Block
def _reset_register(self):
"""Reset the input/output register"""
if self.num_d is not None and self.den_d is not None:
self.input_register = np.zeros_like(self.num_d)
self.output_... | 29.433333 | 80 | 0.588416 |
30e7d355b3ba63a871cabdf99afcb8758eaf40d1 | 1,157 | py | Python | cogs/restart.py | snoringninja/niftybot-discord | b3f7e92e2be3fda06e87ceb00a65b8dc85eec67c | [
"MIT"
] | null | null | null | cogs/restart.py | snoringninja/niftybot-discord | b3f7e92e2be3fda06e87ceb00a65b8dc85eec67c | [
"MIT"
] | 11 | 2018-06-06T19:01:08.000Z | 2019-07-29T14:55:03.000Z | cogs/restart.py | snoringninja/niftybot-discord | b3f7e92e2be3fda06e87ceb00a65b8dc85eec67c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
restart.py
@author xNifty
@site - https://snoring.ninja
Restart the python process
I wouldn't recommend using this
"""
import os
import sys
from discord.ext import commands
from resources.config import ConfigLoader
def setup(bot):
"""This makes it so we can actually use it."""
bo... | 24.104167 | 89 | 0.640449 |
30e7f72ecc1288ea86e7b7e84f8256f5f5bc6028 | 243 | py | Python | abc170/d_TLE.py | nishio/atcoder | 8db36537b5d8580745d5f98312162506ad7d7ab4 | [
"MIT"
] | 1 | 2021-03-09T04:28:13.000Z | 2021-03-09T04:28:13.000Z | abc170/d_TLE.py | nishio/atcoder | 8db36537b5d8580745d5f98312162506ad7d7ab4 | [
"MIT"
] | null | null | null | abc170/d_TLE.py | nishio/atcoder | 8db36537b5d8580745d5f98312162506ad7d7ab4 | [
"MIT"
] | null | null | null | N = int(input())
AS = [int(x) for x in input().split()]
ok = []
for i in range(N):
for j in range(N):
if i == j:
continue
if AS[i] % AS[j] == 0:
break
else:
ok.append(i)
print(len(ok))
| 16.2 | 38 | 0.436214 |
30e94968db2242192ef6d7100f4410fa00a4184b | 2,433 | py | Python | webapp/models.py | JagerCox/InverseRelation | 721c739e542ff26cd14e393227c2a5702a79093c | [
"MIT"
] | null | null | null | webapp/models.py | JagerCox/InverseRelation | 721c739e542ff26cd14e393227c2a5702a79093c | [
"MIT"
] | null | null | null | webapp/models.py | JagerCox/InverseRelation | 721c739e542ff26cd14e393227c2a5702a79093c | [
"MIT"
] | null | null | null | from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
| 65.756757 | 113 | 0.709001 |
30eaa2105d07e43d9a8ec898704e63e5994f330e | 12,680 | py | Python | MyUtils/ImageProcessing.py | mairob/Semantic-segmentation-and-Depth-estimation | d9624cdbde000a0c41e1025f89aa6edfdf947045 | [
"MIT"
] | 6 | 2018-06-15T21:18:58.000Z | 2021-07-05T08:41:21.000Z | MyUtils/ImageProcessing.py | mairob/Semantic-segmentation-and-Depth-estimation | d9624cdbde000a0c41e1025f89aa6edfdf947045 | [
"MIT"
] | null | null | null | MyUtils/ImageProcessing.py | mairob/Semantic-segmentation-and-Depth-estimation | d9624cdbde000a0c41e1025f89aa6edfdf947045 | [
"MIT"
] | 4 | 2018-06-15T21:19:08.000Z | 2021-07-05T08:41:23.000Z | #! /usr/bin/python3
#############################################################
### Helper File for TFRecords and Image manipulation ########
#############################################################
import tensorflow as tf
import numpy as np
## Label mapping for Cityscapes (34 classes)
Cityscapes34_I... | 44.181185 | 133 | 0.593612 |
30ebb04f0adfee1d3c35ad01d9f803e83c8654d5 | 8,567 | py | Python | src/traffic_analysis/d05_evaluation/frame_level_evaluator.py | dssg/air_pollution_estimation | 0e4172e7cecd98b834d728a3a06e39f71c8cc7b2 | [
"MIT"
] | 7 | 2019-10-26T11:23:23.000Z | 2021-08-25T13:15:58.000Z | src/traffic_analysis/d05_evaluation/frame_level_evaluator.py | dssg/air_pollution_estimation | 0e4172e7cecd98b834d728a3a06e39f71c8cc7b2 | [
"MIT"
] | null | null | null | src/traffic_analysis/d05_evaluation/frame_level_evaluator.py | dssg/air_pollution_estimation | 0e4172e7cecd98b834d728a3a06e39f71c8cc7b2 | [
"MIT"
] | 1 | 2020-03-24T02:13:39.000Z | 2020-03-24T02:13:39.000Z | import pandas as pd
import numpy as np
import xml.etree.ElementTree as ElementTree
from traffic_analysis.d00_utils.bbox_helpers import bboxcv2_to_bboxcvlib
from traffic_analysis.d05_evaluation.parse_annotation import parse_annotation
from traffic_analysis.d05_evaluation.compute_mean_average_precision import get_avg_p... | 43.933333 | 104 | 0.588071 |