hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4daef32de5d0a4eada8ed86fdce977e9cb3a3093 | 117 | py | Python | mandaw/examples/window.py | mandaw2014/MandawEngineSDL | 597798e556751c57945b1ed6302f17cb6e9d8d22 | [
"MIT"
] | null | null | null | mandaw/examples/window.py | mandaw2014/MandawEngineSDL | 597798e556751c57945b1ed6302f17cb6e9d8d22 | [
"MIT"
] | null | null | null | mandaw/examples/window.py | mandaw2014/MandawEngineSDL | 597798e556751c57945b1ed6302f17cb6e9d8d22 | [
"MIT"
] | 1 | 2021-09-21T08:28:50.000Z | 2021-09-21T08:28:50.000Z | from mandaw import *
mandaw = Mandaw("Window!", width = 800, height = 600, bg_color = (0, 0, 0, 255))
mandaw.loop() | 23.4 | 80 | 0.641026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.076923 |
4daf588bf7222a0428a4b569a5e2c8de42912a40 | 1,333 | py | Python | bio-info/bio-info5.py | kyamada101/Python | a9be850b1818fb4784cb84e86b20cf2c61784e38 | [
"MIT"
] | null | null | null | bio-info/bio-info5.py | kyamada101/Python | a9be850b1818fb4784cb84e86b20cf2c61784e38 | [
"MIT"
] | null | null | null | bio-info/bio-info5.py | kyamada101/Python | a9be850b1818fb4784cb84e86b20cf2c61784e38 | [
"MIT"
] | null | null | null | import numpy as np
with open("./dice.txt",'r') as f:
input_str = f.read()
input_data=list(map(int,input_str))
inf = -float('inf')
class box():
def __init__(self):
self.v = inf
self.root = -1
def __repr__(self):
return str(self.v)
def run_viterbi(n,k):
if X[n][k].v != inf:... | 25.634615 | 104 | 0.534134 | 131 | 0.097981 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.077786 |
4dafa7a5729cfadd647edbfafb8f9ae3d3c677d0 | 10,464 | py | Python | src/tests/scheduling/schedule_config_test.py | Ket3r/script-server | 919a2b7eb29c7bba7acba8e374a0a5cc696bd859 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/tests/scheduling/schedule_config_test.py | Ket3r/script-server | 919a2b7eb29c7bba7acba8e374a0a5cc696bd859 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/tests/scheduling/schedule_config_test.py | Ket3r/script-server | 919a2b7eb29c7bba7acba8e374a0a5cc696bd859 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | from unittest import TestCase
from parameterized import parameterized
from scheduling.schedule_config import ScheduleConfig
from utils import date_utils
def to_datetime(short_datetime_string):
dt_string = short_datetime_string + ':0.000000Z'
return date_utils.parse_iso_datetime(dt_string.replace(' ', 'T'))
... | 79.877863 | 115 | 0.549981 | 10,141 | 0.969132 | 0 | 0 | 10,005 | 0.956135 | 0 | 0 | 7,206 | 0.688647 |
4db08c1ad06a4f3c0a888874af940f73222f14eb | 1,458 | py | Python | mojo/python/tests/bindings_constants_unittest.py | zbowling/mojo | 4d2ed40dc2390ca98a6fea0580e840535878f11c | [
"BSD-3-Clause"
] | 1 | 2020-04-28T14:35:10.000Z | 2020-04-28T14:35:10.000Z | mojo/python/tests/bindings_constants_unittest.py | TribeMedia/sky_engine | 4a3894ed246327931b198a7d64652bd0b615b036 | [
"BSD-3-Clause"
] | null | null | null | mojo/python/tests/bindings_constants_unittest.py | TribeMedia/sky_engine | 4a3894ed246327931b198a7d64652bd0b615b036 | [
"BSD-3-Clause"
] | 1 | 2020-04-28T14:35:11.000Z | 2020-04-28T14:35:11.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import math
import unittest
# Generated files
# pylint: disable=F0401
import sample_service_mojom
import test_constants_mojom
class ConstantBindingsTest(un... | 37.384615 | 77 | 0.752401 | 1,166 | 0.799726 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.151578 |
4db107eb3d9119fdeaf236399451aa583978436f | 5,219 | py | Python | home/pi/blissflixx/lib/chanutils/chanutils.py | erick-guerra/Royalbox | 967dbbdddc94b9968e6eba873f0d20328fd86f66 | [
"MIT"
] | 1 | 2022-01-29T11:17:58.000Z | 2022-01-29T11:17:58.000Z | home/pi/blissflixx/lib/chanutils/chanutils.py | erick-guerra/Royalbox | 967dbbdddc94b9968e6eba873f0d20328fd86f66 | [
"MIT"
] | null | null | null | home/pi/blissflixx/lib/chanutils/chanutils.py | erick-guerra/Royalbox | 967dbbdddc94b9968e6eba873f0d20328fd86f66 | [
"MIT"
] | null | null | null | import requests, lxml.html, re
import htmlentitydefs, urllib, random
from lxml.cssselect import CSSSelector
from StringIO import StringIO
import cherrypy
import requests
from cachecontrol import CacheControl
_PROXY_LIST = None
_HEADERS = {
'accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*... | 27.613757 | 153 | 0.637095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,023 | 0.196015 |
4db11a5afb53d4558aa8f33a19f180a1ecbc8f9d | 5,672 | py | Python | test/07-text-custom-field-list-test.py | hklarner/couchdb-mango | e519f224423ca4696a61d0065530103dd8c6651b | [
"Apache-2.0"
] | 39 | 2015-02-04T09:48:20.000Z | 2021-11-09T22:07:45.000Z | test/07-text-custom-field-list-test.py | hklarner/couchdb-mango | e519f224423ca4696a61d0065530103dd8c6651b | [
"Apache-2.0"
] | 37 | 2015-02-24T17:59:26.000Z | 2021-05-25T12:20:54.000Z | test/07-text-custom-field-list-test.py | hklarner/couchdb-mango | e519f224423ca4696a61d0065530103dd8c6651b | [
"Apache-2.0"
] | 21 | 2015-04-26T05:53:44.000Z | 2021-11-09T22:06:58.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | 35.672956 | 79 | 0.571403 | 5,025 | 0.885931 | 0 | 0 | 5,097 | 0.898625 | 0 | 0 | 2,499 | 0.440585 |
4db2f85a35fd948e670a5be341c3efca737c01ed | 6,534 | py | Python | tests/test_reviews_rest.py | miw-upm/betca-tpv-customer-support | e36946b934123a5c139924192a189c5ce8f3864c | [
"MIT"
] | 1 | 2021-05-04T01:33:00.000Z | 2021-05-04T01:33:00.000Z | tests/test_reviews_rest.py | miw-upm/betca-tpv-customer-support | e36946b934123a5c139924192a189c5ce8f3864c | [
"MIT"
] | null | null | null | tests/test_reviews_rest.py | miw-upm/betca-tpv-customer-support | e36946b934123a5c139924192a189c5ce8f3864c | [
"MIT"
] | 5 | 2021-04-02T15:42:31.000Z | 2022-03-07T09:02:16.000Z | from http import HTTPStatus
from unittest import TestCase, mock
import jwt
from fastapi.testclient import TestClient
from src.api.review_resource import REVIEWS
from src.config import config
from src.main import app
from src.models.article import Article
from src.models.review import Review
def _bearer(**payload):
... | 50.261538 | 120 | 0.718549 | 4,512 | 0.690542 | 0 | 0 | 3,051 | 0.466942 | 0 | 0 | 1,278 | 0.195592 |
4db7b0957c01b75e339ff138abd1c5327cd961ef | 2,354 | py | Python | python/dset/write_dataset_W1BS.py | spongezhang/vlb | 52a6b2ab8608496182ac2a33c961344db4a84333 | [
"BSD-2-Clause"
] | 11 | 2017-09-08T16:32:46.000Z | 2022-02-02T15:28:22.000Z | python/dset/write_dataset_W1BS.py | albutko/vlb | 437245c0991948eeb36a277937a7e67d389041e4 | [
"BSD-2-Clause"
] | 9 | 2017-09-13T20:22:51.000Z | 2019-03-13T02:38:25.000Z | python/dset/write_dataset_W1BS.py | albutko/vlb | 437245c0991948eeb36a277937a7e67d389041e4 | [
"BSD-2-Clause"
] | 3 | 2017-09-08T21:07:14.000Z | 2021-02-17T17:42:43.000Z | import json
sequence_name_list = ['A','G','L','map2photo','S']
description_list = ['Viewpoint Appearance','Viewpoint','ViewPoint Lighting','Map to Photo','Modality']
label_list = [
['arch', 'obama', 'vprice0', 'vprice1', 'vprice2', 'yosemite'],
['adam', 'boat','ExtremeZoomA','face','fox','graf','mag','... | 41.298246 | 102 | 0.607477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 953 | 0.404843 |
4db85d3fc2b5c525eb2343fee5b61c2b7cad4134 | 27 | py | Python | salman.py | Fayad-hub/Fayad-hub | b132b8266da8a36b6162feb69c67639067a90b69 | [
"BSD-2-Clause"
] | null | null | null | salman.py | Fayad-hub/Fayad-hub | b132b8266da8a36b6162feb69c67639067a90b69 | [
"BSD-2-Clause"
] | null | null | null | salman.py | Fayad-hub/Fayad-hub | b132b8266da8a36b6162feb69c67639067a90b69 | [
"BSD-2-Clause"
] | 1 | 2021-05-26T06:06:38.000Z | 2021-05-26T06:06:38.000Z | <html> salman.py
<html/>
| 6.75 | 16 | 0.592593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4db8e935817372c07e59b82af45086b871e6303e | 579 | py | Python | broadcast.py | InukaRanmira/Image-to-pdf | 44f7e33b13aba44c03c3ec5c7e4efe4efe0b1911 | [
"MIT"
] | 1 | 2021-12-24T18:11:49.000Z | 2021-12-24T18:11:49.000Z | broadcast.py | InukaRanmira/Image-to-pdf | 44f7e33b13aba44c03c3ec5c7e4efe4efe0b1911 | [
"MIT"
] | null | null | null | broadcast.py | InukaRanmira/Image-to-pdf | 44f7e33b13aba44c03c3ec5c7e4efe4efe0b1911 | [
"MIT"
] | null | null | null | from pyrogram import Client ,filters
import os
from helper.database import getid
ADMIN = int(os.environ.get("ADMIN", 1696230986))
@Client.on_message(filters.private & filters.user(ADMIN) & filters.command(["broadcast"]))
async def broadcast(bot, message):
if (message.reply_to_message):
ms = await message.reply_te... | 30.473684 | 90 | 0.690846 | 0 | 0 | 0 | 0 | 446 | 0.770294 | 355 | 0.613126 | 120 | 0.207254 |
4db99233bd49c358c3fdefaa1fa9186de53680eb | 11,351 | py | Python | scripts/calibration/cal_methods.py | jielyugt/calibration | 1b9be673fb7ff8cf481e875153b1a7649e3b6e67 | [
"MIT"
] | null | null | null | scripts/calibration/cal_methods.py | jielyugt/calibration | 1b9be673fb7ff8cf481e875153b1a7649e3b6e67 | [
"MIT"
] | null | null | null | scripts/calibration/cal_methods.py | jielyugt/calibration | 1b9be673fb7ff8cf481e875153b1a7649e3b6e67 | [
"MIT"
] | null | null | null | # Calibration methods including Histogram Binning and Temperature Scaling
import numpy as np
from scipy.optimize import minimize
from sklearn.metrics import log_loss
import pandas as pd
import time
from sklearn.metrics import log_loss, brier_score_loss
from tensorflow.keras.losses import categorical_crossentropy
from... | 36.616129 | 124 | 0.602854 | 4,664 | 0.410889 | 0 | 0 | 0 | 0 | 0 | 0 | 5,541 | 0.488151 |
4db9d563f39ee0c9eaa0404dfef96153f8e1cbb5 | 2,259 | py | Python | neuralmonkey/nn/projection.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-24T21:10:03.000Z | 2019-05-22T13:19:35.000Z | neuralmonkey/nn/projection.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | null | null | null | neuralmonkey/nn/projection.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-25T01:36:44.000Z | 2019-12-13T15:04:03.000Z | """Module which implements various types of projections."""
from typing import List, Callable
import tensorflow as tf
from neuralmonkey.nn.utils import dropout
def maxout(inputs: tf.Tensor,
size: int,
scope: str = "MaxoutProjection") -> tf.Tensor:
"""Apply a maxout operation.
Implementa... | 29.723684 | 79 | 0.611332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 776 | 0.343515 |
4db9da7c1b63e7750aa55027e3ed9ae8620596ff | 148 | py | Python | test_default_application/application.py | Ca11MeE/dophon | 6737b0f0dc9ec2c2229865940c3c6d6ee326fc28 | [
"Apache-2.0"
] | 1 | 2018-08-13T09:57:34.000Z | 2018-08-13T09:57:34.000Z | test_default_application/application.py | Ca11MeE/dophon | 6737b0f0dc9ec2c2229865940c3c6d6ee326fc28 | [
"Apache-2.0"
] | null | null | null | test_default_application/application.py | Ca11MeE/dophon | 6737b0f0dc9ec2c2229865940c3c6d6ee326fc28 | [
"Apache-2.0"
] | null | null | null | # properties detail please read \
# default_properties.py in dophon_properties module \
# inside your used dophon module package.
# author: CallMeE
| 29.6 | 53 | 0.790541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.972973 |
4dbb39dfe98094fd9498b0f54ec487acfb06c3ae | 5,989 | py | Python | afk.py | bsoyka/sunset-bot | ea05000e52e1883ddba77ab754e5f733c8b3375c | [
"MIT"
] | 1 | 2021-06-21T16:58:48.000Z | 2021-06-21T16:58:48.000Z | afk.py | bsoyka/sunset-bot | ea05000e52e1883ddba77ab754e5f733c8b3375c | [
"MIT"
] | 4 | 2021-08-13T16:52:51.000Z | 2021-09-01T13:05:42.000Z | afk.py | sunset-vacation/bot | ea05000e52e1883ddba77ab754e5f733c8b3375c | [
"MIT"
] | 4 | 2021-06-21T22:16:12.000Z | 2021-08-11T21:01:19.000Z | from datetime import datetime
from textwrap import shorten
from typing import Optional, Union
import discord
from discord.abc import Messageable
from discord.errors import Forbidden
from discord.ext.commands import Bot, Cog, Context, check, command, is_owner
from discord.utils import get
from config import ... | 29.79602 | 135 | 0.574553 | 5,307 | 0.885829 | 0 | 0 | 4,400 | 0.734435 | 4,950 | 0.826239 | 491 | 0.081956 |
4dbb6e20146ebd5e06052b663dfca81bbe6df5e3 | 2,176 | pyde | Python | dice/dice.pyde | ahoefnagel/ProjectA-Digital-Components | 79d326f9beb433ded191187ef13d3b5a823057ef | [
"MIT"
] | null | null | null | dice/dice.pyde | ahoefnagel/ProjectA-Digital-Components | 79d326f9beb433ded191187ef13d3b5a823057ef | [
"MIT"
] | null | null | null | dice/dice.pyde | ahoefnagel/ProjectA-Digital-Components | 79d326f9beb433ded191187ef13d3b5a823057ef | [
"MIT"
] | null | null | null | # The shape of the numbers for the dice
dice = { 1: [[None, None, None], [None, "", None], [None, None, None]],
2: [["", None, None], [None, None, None], [None, None, ""]],
3: [["", None, None], [None, "", None], [None, None, ""]],
4: [["", None, ""], [None, None, None], ["", None, ""]],
... | 32 | 103 | 0.483456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.169577 |
4dbc315472764792a06e13d3e501c508bdc38cb4 | 769 | py | Python | src/pdf/domain/encrypt.py | ichiro-kazusa/PDFCon | 529c22145bfd20919b015b5ba70e8bab33feed01 | [
"MIT"
] | null | null | null | src/pdf/domain/encrypt.py | ichiro-kazusa/PDFCon | 529c22145bfd20919b015b5ba70e8bab33feed01 | [
"MIT"
] | null | null | null | src/pdf/domain/encrypt.py | ichiro-kazusa/PDFCon | 529c22145bfd20919b015b5ba70e8bab33feed01 | [
"MIT"
] | null | null | null |
from ..command.encrypt import EncryptionCommand
class Encryption:
def __init__(self, owner: str = '', user: str = '') -> None:
self.__owner = owner
self.__user = user
self.__verify_entries()
@property
def owner(self):
return self.__owner
@property
def user(self)... | 24.806452 | 76 | 0.625488 | 716 | 0.931079 | 0 | 0 | 239 | 0.310793 | 0 | 0 | 156 | 0.202861 |
4dbd2fe8b25b1e5fbb2859a59ee51157048af1ed | 709 | py | Python | photos/migrations/0002_auto_20190616_1812.py | savannah8/The-gallery | ddb95d08e81e874fe8b24046a2acc40be0a68cbe | [
"Unlicense"
] | null | null | null | photos/migrations/0002_auto_20190616_1812.py | savannah8/The-gallery | ddb95d08e81e874fe8b24046a2acc40be0a68cbe | [
"Unlicense"
] | 5 | 2020-06-05T21:16:21.000Z | 2021-09-08T01:03:08.000Z | photos/migrations/0002_auto_20190616_1812.py | savannah8/The-gallery | ddb95d08e81e874fe8b24046a2acc40be0a68cbe | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-06-16 15:12
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('photos', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_... | 21.484848 | 46 | 0.543018 | 561 | 0.791255 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.231312 |
4dbd6eb36e7e0009be0cae3c766793da9b62afee | 17,853 | py | Python | scripts/old_scripts/test1.py | noambuckman/mpc-multiple-vehicles | a20949c335f1af97962569eed112e6cef46174d9 | [
"MIT"
] | 1 | 2021-11-02T15:16:17.000Z | 2021-11-02T15:16:17.000Z | scripts/old_scripts/test1.py | noambuckman/mpc-multiple-vehicles | a20949c335f1af97962569eed112e6cef46174d9 | [
"MIT"
] | 5 | 2021-04-14T17:08:59.000Z | 2021-05-27T21:41:02.000Z | scripts/old_scripts/test1.py | noambuckman/mpc-multiple-vehicles | a20949c335f1af97962569eed112e6cef46174d9 | [
"MIT"
] | 2 | 2022-02-07T08:16:05.000Z | 2022-03-09T23:30:17.000Z | import time, datetime, argparse
import os, sys
import numpy as np
np.set_printoptions(precision=2)
import matplotlib.pyplot as plt
import copy as cp
import pickle
PROJECT_PATH = '/home/nbuckman/Dropbox (MIT)/DRL/2020_01_cooperative_mpc/mpc-multiple-vehicles/'
sys.path.append(PROJECT_PATH)
import casadi as cas
import ... | 47.863271 | 286 | 0.58752 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,215 | 0.236095 |
4dbda883d570920c96f7e2803783e01d7ee5bd65 | 712 | py | Python | RenameMaps.py | uesp/uesp-dbmapscripts | f2bb914661423d19a5bd4b7c090af2b2142654c2 | [
"MIT"
] | null | null | null | RenameMaps.py | uesp/uesp-dbmapscripts | f2bb914661423d19a5bd4b7c090af2b2142654c2 | [
"MIT"
] | null | null | null | RenameMaps.py | uesp/uesp-dbmapscripts | f2bb914661423d19a5bd4b7c090af2b2142654c2 | [
"MIT"
] | null | null | null | import os
import sys
import shutil
import re
INPUT_PATH = "d:\\dbmaps\\test\\final\\"
OUTPUT_PATH = "d:\\dbmaps\\test\\zoom17\\"
for filename in os.listdir(INPUT_PATH):
InputFile = INPUT_PATH + filename
matchResult = re.search('([a-zA-Z]+)-([0-9]+)-([0-9]+)-([0-9]+)\.', filename)
if (not ma... | 25.428571 | 83 | 0.594101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.189607 |
4dbe3d037f49de1a5bf9a99b444cecb6fba61822 | 2,984 | py | Python | my/rtm.py | almereyda/HPI | c83bfbd21ce94a96f7af01ab0a82f20535f4aefb | [
"MIT"
] | null | null | null | my/rtm.py | almereyda/HPI | c83bfbd21ce94a96f7af01ab0a82f20535f4aefb | [
"MIT"
] | null | null | null | my/rtm.py | almereyda/HPI | c83bfbd21ce94a96f7af01ab0a82f20535f4aefb | [
"MIT"
] | null | null | null | """
[[https://rememberthemilk.com][Remember The Milk]] tasks and notes
"""
REQUIRES = [
'icalendar',
]
import re
from pathlib import Path
from typing import Dict, List, Optional, Iterator
from datetime import datetime
from .common import LazyLogger, get_files, group_by_key, cproperty, make_dict
from my.config i... | 24.661157 | 78 | 0.612936 | 2,088 | 0.699732 | 311 | 0.104223 | 952 | 0.319035 | 0 | 0 | 428 | 0.143432 |
4dc1180d1faca62d2a5375c9a1f39fa3d254832a | 350 | py | Python | learnpython/fib.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2019-05-19T11:54:26.000Z | 2019-05-19T12:03:49.000Z | learnpython/fib.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 1 | 2020-11-27T07:55:15.000Z | 2020-11-27T07:55:15.000Z | learnpython/fib.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2021-09-06T18:06:12.000Z | 2021-12-31T07:44:43.000Z | # def fib2(n): # 返回到 n 的斐波那契数列
# result = []
# a, b = 0, 1
# while b < n:
# result.append(b)
# a, b = b, a+b
# return result
#
# a = fib2(500)
# print(a)
def recur_fibo(n):
"""递归函数
输出斐波那契数列"""
if n <= 1:
return n
else:
return(recur_fibo(n-1) + recur_fibo(n-2))... | 15.217391 | 48 | 0.485714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.614213 |
4dc36673ab2928033fca50873ad953a0612cf554 | 820 | py | Python | taco/tests/aws_wrappers/dynamodb/integration/consts.py | Intsights/taco | f9a912d146d74a6539d31c33ec289eff3fbfca8f | [
"Apache-2.0"
] | 18 | 2019-09-05T07:53:26.000Z | 2021-02-15T18:23:45.000Z | taco/tests/aws_wrappers/dynamodb/integration/consts.py | Intsights/taco | f9a912d146d74a6539d31c33ec289eff3fbfca8f | [
"Apache-2.0"
] | null | null | null | taco/tests/aws_wrappers/dynamodb/integration/consts.py | Intsights/taco | f9a912d146d74a6539d31c33ec289eff3fbfca8f | [
"Apache-2.0"
] | null | null | null | import taco.aws_wrappers.dynamodb_wrapper.consts as dynamodb_consts
from taco.boto3.boto_config import Regions
DEFAULT_REGION = Regions.n_virginia.value
RESPONSE_KEY_NAME = 'Responses'
PRIMARY_KEY_NAME = 'KEY1'
ATTRIBUTE_DEFINITIONS = [
dynamodb_consts.property_schema(PRIMARY_KEY_NAME, dynamodb_consts.AttributeTy... | 41 | 115 | 0.842683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.113415 |
4dc47970f015540fdb076bfa3a3c9a472b731090 | 1,790 | py | Python | examples/HMF_oxidation_WO3/model.py | flboudoire/chemical-kinetics | 70db1b3fc899f357d86834708950b9559b4d19fb | [
"MIT"
] | null | null | null | examples/HMF_oxidation_WO3/model.py | flboudoire/chemical-kinetics | 70db1b3fc899f357d86834708950b9559b4d19fb | [
"MIT"
] | null | null | null | examples/HMF_oxidation_WO3/model.py | flboudoire/chemical-kinetics | 70db1b3fc899f357d86834708950b9559b4d19fb | [
"MIT"
] | 2 | 2021-09-23T14:17:33.000Z | 2022-03-26T01:06:34.000Z |
import numpy as np
from scipy import constants
measured_species = ["HMF", "DFF", "HMFCA", "FFCA", "FDCA"]
all_species = measured_species.copy()
all_species.extend(["H_" + s for s in measured_species])
all_species.extend(["Hx_" + s for s in measured_species])
def c_to_q(c):
c_e = list()
for i, s in enumera... | 31.403509 | 96 | 0.488268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 601 | 0.335754 |
4dc54e3f4ce59c3a9f8980ef33d1443e375f1870 | 905 | py | Python | cayennelpp/tests/test_lpp_type_humidity.py | smlng/pycayennelpp | 28f2ba4fba602527d3369c9cfbce16b783916933 | [
"MIT"
] | 16 | 2019-02-18T10:57:51.000Z | 2022-03-29T01:54:51.000Z | cayennelpp/tests/test_lpp_type_humidity.py | smlng/pycayennelpp | 28f2ba4fba602527d3369c9cfbce16b783916933 | [
"MIT"
] | 40 | 2018-11-04T17:28:49.000Z | 2021-11-26T16:05:16.000Z | cayennelpp/tests/test_lpp_type_humidity.py | smlng/pycayennelpp | 28f2ba4fba602527d3369c9cfbce16b783916933 | [
"MIT"
] | 12 | 2018-11-09T19:06:36.000Z | 2021-05-21T17:44:28.000Z | import pytest
from cayennelpp.lpp_type import LppType
@pytest.fixture
def hum():
return LppType.get_lpp_type(104)
def test_humidity(hum):
val = (50.00,)
hum_buf = hum.encode(val)
assert hum.decode(hum_buf) == val
hum_buf = hum.encode(50.25)
assert hum.decode(hum_buf) == val
val = (50.50... | 21.046512 | 43 | 0.667403 | 0 | 0 | 0 | 0 | 63 | 0.069613 | 0 | 0 | 0 | 0 |
4dc60387a6447f2906c626319f97969c75a2af08 | 118 | py | Python | src/frogtips/api/__init__.py | FROG-TIPS/frog.tips-python-client | 16d1603151469522d90f352fe5bac828e4fb3e3d | [
"MIT"
] | 2 | 2019-11-04T04:00:56.000Z | 2019-11-21T19:53:36.000Z | src/frogtips/api/__init__.py | FROG-TIPS/frog.tips-python-client | 16d1603151469522d90f352fe5bac828e4fb3e3d | [
"MIT"
] | null | null | null | src/frogtips/api/__init__.py | FROG-TIPS/frog.tips-python-client | 16d1603151469522d90f352fe5bac828e4fb3e3d | [
"MIT"
] | 1 | 2019-11-21T19:53:40.000Z | 2019-11-21T19:53:40.000Z | from frogtips.api.Credentials import Credentials
from frogtips.api.Tip import Tip
from frogtips.api.Tips import Tips
| 23.6 | 48 | 0.838983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4dc612995d0e9e6a026d052503209dc02bc22a03 | 5,218 | py | Python | scripts/studs_dist.py | inesc-tec-robotics/carlos_controller | ffcc45f24dd534bb953d5bd4a47badd3d3d5223d | [
"BSD-3-Clause"
] | null | null | null | scripts/studs_dist.py | inesc-tec-robotics/carlos_controller | ffcc45f24dd534bb953d5bd4a47badd3d3d5223d | [
"BSD-3-Clause"
] | null | null | null | scripts/studs_dist.py | inesc-tec-robotics/carlos_controller | ffcc45f24dd534bb953d5bd4a47badd3d3d5223d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from mission_ctrl_msgs.srv import *
from studs_defines import *
import rospy
import time
import carlos_vision as crlv
from geometry_msgs.msg import PointStamped
from geometry_msgs.msg import PoseArray
from geometry_msgs.msg import Pose
from carlos_controller.msg import StudsPoses
#import geometry... | 30.87574 | 99 | 0.652166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 678 | 0.129935 |
4dc68b6c713419a1c2bd43c406530fcd60ac199b | 9,204 | py | Python | code/bodmas/utils.py | whyisyoung/BODMAS | 91e63bbacaa53060488c94e54af3a2fb91cfa88a | [
"BSD-2-Clause"
] | 18 | 2021-07-20T13:50:06.000Z | 2022-03-29T18:20:43.000Z | code/bodmas/utils.py | whyisyoung/BODMAS | 91e63bbacaa53060488c94e54af3a2fb91cfa88a | [
"BSD-2-Clause"
] | 1 | 2022-01-19T23:52:14.000Z | 2022-01-21T20:35:32.000Z | code/bodmas/utils.py | whyisyoung/BODMAS | 91e63bbacaa53060488c94e54af3a2fb91cfa88a | [
"BSD-2-Clause"
] | 2 | 2021-11-20T10:44:10.000Z | 2021-12-31T02:38:08.000Z | # -*- coding: utf-8 -*-
"""
utils.py
~~~~~~~~
Helper functions for setting up the environment and parsing args, etc.
"""
import os
os.environ['PYTHONHASHSEED'] = '0'
from numpy.random import seed
import random
random.seed(1)
seed(1)
import sys
import logging
import argparse
import pickle
import json
import numpy a... | 39.165957 | 159 | 0.661669 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,098 | 0.445241 |
4dc6f19452f1928a12cb21256eb1100495d990ef | 2,539 | py | Python | session11.py | sahanashetty31/session_11_epai3_assignment | 4b2d7f299fea2d3cb6f8cb1c90804f3cc4976647 | [
"MIT"
] | null | null | null | session11.py | sahanashetty31/session_11_epai3_assignment | 4b2d7f299fea2d3cb6f8cb1c90804f3cc4976647 | [
"MIT"
] | null | null | null | session11.py | sahanashetty31/session_11_epai3_assignment | 4b2d7f299fea2d3cb6f8cb1c90804f3cc4976647 | [
"MIT"
] | null | null | null | import math
from functools import lru_cache
class Polygon:
def __init__(self, n, R):
if n < 3:
raise ValueError('Polygon must have at least 3 vertices.')
self._n = n
self._R = R
def __repr__(self):
return f'Polygon(n={self._n}, R={self._R})'
@property
def c... | 25.39 | 102 | 0.568334 | 2,492 | 0.981489 | 0 | 0 | 852 | 0.335565 | 0 | 0 | 139 | 0.054746 |
4dc6fa3514e2ac738a922e6c666fe8ccb1623cf7 | 1,937 | py | Python | Software for Other Building Blocks and Integration/PoW.py | fkerem/Cryptocurrency-Blockchain | 965268a09a6f8b3e700e8bbc741e49a4d54805c6 | [
"MIT"
] | null | null | null | Software for Other Building Blocks and Integration/PoW.py | fkerem/Cryptocurrency-Blockchain | 965268a09a6f8b3e700e8bbc741e49a4d54805c6 | [
"MIT"
] | null | null | null | Software for Other Building Blocks and Integration/PoW.py | fkerem/Cryptocurrency-Blockchain | 965268a09a6f8b3e700e8bbc741e49a4d54805c6 | [
"MIT"
] | null | null | null | """
PoW.py
"""
import DSA
import sys
import hashlib
if sys.version_info < (3, 6):
import sha3
def rootMerkle(TxBlockFile, TxLen): #To Get the Root Hash of the Merkle Tree
TxBlockFileBuffer = open(TxBlockFile, "r")
lines = TxBlockFileBuffer.readlines()
TxBlockFileBuffer.close()
Tx... | 29.8 | 90 | 0.588539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 366 | 0.188952 |
4dc7d26cc18475fbd2b690b1e9dc6d7f0d1003fa | 637 | py | Python | core/cdag/node/sub.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | core/cdag/node/sub.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | core/cdag/node/sub.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# SubNode
# ----------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Python modules
from ... | 25.48 | 75 | 0.44113 | 224 | 0.351648 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.568289 |
4dc88ebb3a9af63d834dc6d3c95d28f963145c6a | 287 | py | Python | chapter03/3.5_simulate_output_layer.py | Myeonghan-Jeong/deep-learning-from-scratch | 0df7f9f352920545f5309e8e11c7cf879ad477e5 | [
"MIT"
] | null | null | null | chapter03/3.5_simulate_output_layer.py | Myeonghan-Jeong/deep-learning-from-scratch | 0df7f9f352920545f5309e8e11c7cf879ad477e5 | [
"MIT"
] | 3 | 2021-06-08T21:22:11.000Z | 2021-09-08T01:55:11.000Z | chapter03/3.5_simulate_output_layer.py | myeonghan-nim/deep-learning-from-scratch | fef3e327c49593b5df74728a1cba1144948a2999 | [
"MIT"
] | null | null | null | import numpy as np
# softmax function
def softmax(a):
exp_a = np.exp(a)
sum_a = np.sum(exp_a)
return exp_a / sum_a
# modified softmax function
def modified_softmax(a):
maxA = np.max(a)
exp_a = np.exp(a - maxA)
sum_a = np.sum(exp_a)
return exp_a / sum_a
| 15.105263 | 28 | 0.634146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.156794 |
4dc8b44f56e787d0b3156d5c7fc12d0fb557c818 | 1,770 | py | Python | example.py | luisfciencias/intro-cv | 2908d21dd8058acf13b5479a2cb409a6e00859c1 | [
"MIT"
] | null | null | null | example.py | luisfciencias/intro-cv | 2908d21dd8058acf13b5479a2cb409a6e00859c1 | [
"MIT"
] | 5 | 2020-01-28T22:54:12.000Z | 2022-02-10T00:26:51.000Z | example.py | luisfciencias/intro-cv | 2908d21dd8058acf13b5479a2cb409a6e00859c1 | [
"MIT"
] | null | null | null | # example of mask inference with a pre-trained model (COCO)
import sys
from keras.preprocessing.image import img_to_array
from keras.preprocessing.image import load_img
from mrcnn.config import Config
from mrcnn.model import MaskRCNN
from mrcnn.visualize import display_instances
from tools import load_config
# load co... | 32.181818 | 85 | 0.719774 | 111 | 0.062712 | 0 | 0 | 0 | 0 | 0 | 0 | 723 | 0.408475 |
4dc8ffc44718b6bc253375644e19671ce86d5269 | 8,260 | py | Python | rubi/datasets/vqa2.py | abhipsabasu/rubi.bootstrap.pytorch | 9fa9639c1ee4a040958d976eeb5dca2dd2203980 | [
"BSD-3-Clause"
] | 83 | 2021-03-02T07:49:14.000Z | 2022-03-30T03:07:26.000Z | rubi/datasets/vqa2.py | abhipsabasu/rubi.bootstrap.pytorch | 9fa9639c1ee4a040958d976eeb5dca2dd2203980 | [
"BSD-3-Clause"
] | 14 | 2019-07-14T14:10:28.000Z | 2022-01-27T18:53:34.000Z | cfvqa/cfvqa/datasets/vqa2.py | yuleiniu/introd | a40407c7efee9c34e3d4270d7947f5be2f926413 | [
"Apache-2.0"
] | 14 | 2019-09-20T01:49:13.000Z | 2022-03-29T16:42:34.000Z | import os
import csv
import copy
import json
import torch
import numpy as np
from os import path as osp
from bootstrap.lib.logger import Logger
from bootstrap.lib.options import Options
from block.datasets.vqa_utils import AbstractVQA
from copy import deepcopy
import random
import tqdm
import h5py
class VQA2(AbstractV... | 45.635359 | 122 | 0.607385 | 7,959 | 0.963559 | 0 | 0 | 0 | 0 | 0 | 0 | 2,719 | 0.329177 |
4dcb123bec4d3c0380f0862774b7117039deb91f | 281 | py | Python | W3Schools/dates.py | FRX-DEV/Python-Practice-Challenges | 8cddfb8f4181f987aa71cb75dee1f65d4d766954 | [
"MIT"
] | null | null | null | W3Schools/dates.py | FRX-DEV/Python-Practice-Challenges | 8cddfb8f4181f987aa71cb75dee1f65d4d766954 | [
"MIT"
] | null | null | null | W3Schools/dates.py | FRX-DEV/Python-Practice-Challenges | 8cddfb8f4181f987aa71cb75dee1f65d4d766954 | [
"MIT"
] | null | null | null | import datetime
x = datetime.datetime.now()
print(x)
# 2021-07-13 22:55:43.029046
print(x.year)
print(x.strftime("%A"))
"""
2021
Tuesday
"""
x = datetime.datetime(2020, 5, 17)
print(x)
# 2020-05-17 00:00:00
x = datetime.datetime(2018, 6, 1)
print(x.strftime("%B"))
# June | 12.217391 | 34 | 0.647687 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.30605 |
4dcb5c28ab7f560dea6a9712a1a25dda90260ee7 | 2,564 | py | Python | venv/lib/python2.7/site-packages/ebcli/objects/tier.py | zwachtel11/fruitful-backend | 45b8994917182e7b684b9e25944cc79c9494c9f3 | [
"MIT"
] | 4 | 2017-01-17T09:09:07.000Z | 2018-12-19T14:06:22.000Z | venv/lib/python2.7/site-packages/ebcli/objects/tier.py | zwachtel11/fruitful-backend | 45b8994917182e7b684b9e25944cc79c9494c9f3 | [
"MIT"
] | 1 | 2020-06-03T13:57:07.000Z | 2020-06-22T10:27:48.000Z | venv/lib/python2.7/site-packages/ebcli/objects/tier.py | zwachtel11/fruitful-backend | 45b8994917182e7b684b9e25944cc79c9494c9f3 | [
"MIT"
] | 4 | 2017-08-13T09:09:31.000Z | 2020-11-04T04:58:58.000Z | # Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 31.654321 | 73 | 0.559282 | 1,943 | 0.7578 | 0 | 0 | 1,247 | 0.486349 | 0 | 0 | 920 | 0.358814 |
4dcb9047f54eac204a9bac1c46c12bc3341a699a | 11,237 | py | Python | Leetcode.py | SakuraSa/Leetcode_CodeDownloader | cba23e3ec85b24e14fdf856e0e7eefb2c95644eb | [
"Apache-2.0"
] | 3 | 2015-10-20T13:05:18.000Z | 2020-07-27T19:45:58.000Z | Leetcode.py | SakuraSa/Leetcode_CodeDownloader | cba23e3ec85b24e14fdf856e0e7eefb2c95644eb | [
"Apache-2.0"
] | null | null | null | Leetcode.py | SakuraSa/Leetcode_CodeDownloader | cba23e3ec85b24e14fdf856e0e7eefb2c95644eb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
import os
import re
import requests
import datetime
import BeautifulSoup
#url requests setting
host_url = 'https://oj.leetcode.com'
login_url = 'https://oj.leetcode.com/accounts/login/'
question_list_url = 'https://oj.leetcode.com/problems/'
code_... | 41.464945 | 112 | 0.568924 | 9,016 | 0.802349 | 1,402 | 0.124766 | 102 | 0.009077 | 0 | 0 | 1,983 | 0.176471 |
4dccb31b43009dc8e9a6ff9aaa09678332eccb6f | 1,028 | py | Python | tokenizer.py | momennaas/kalam-lp | fdf032ca71a155169f507cba40275ca38f409c87 | [
"MIT"
] | 6 | 2019-03-31T04:46:27.000Z | 2020-02-27T16:39:31.000Z | tokenizer.py | momennaas/kalam-lp | fdf032ca71a155169f507cba40275ca38f409c87 | [
"MIT"
] | null | null | null | tokenizer.py | momennaas/kalam-lp | fdf032ca71a155169f507cba40275ca38f409c87 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
##############################################################
## Author: Abdulmumen Naas
## Description: Arabic Natural Language Processor (Kalam-lp)
## Version: 0.0.1
## Copyright (c) 2014 Abdulmumen Naas
##############################################################
import re
impo... | 25.073171 | 72 | 0.559339 | 591 | 0.574903 | 0 | 0 | 572 | 0.55642 | 0 | 0 | 476 | 0.463035 |
4dcd01eb4188987a9436e56ef1dddd73f316c897 | 1,617 | py | Python | Class4/shoppingcart_pom/features/lib/pages/summer_dresses_catalog_page.py | techsparksguru/python_ci_automation | 65e66266fdf2c14f593c6f098a23770621faef41 | [
"MIT"
] | null | null | null | Class4/shoppingcart_pom/features/lib/pages/summer_dresses_catalog_page.py | techsparksguru/python_ci_automation | 65e66266fdf2c14f593c6f098a23770621faef41 | [
"MIT"
] | 9 | 2020-02-13T09:14:12.000Z | 2022-01-13T03:17:03.000Z | Class4/shoppingcart_pom/features/lib/pages/summer_dresses_catalog_page.py | techsparksguru/python_ci_automation | 65e66266fdf2c14f593c6f098a23770621faef41 | [
"MIT"
] | 1 | 2021-03-10T03:27:37.000Z | 2021-03-10T03:27:37.000Z | __author__ = 'techsparksguru'
from selenium.webdriver.common.by import By
from .base_page_object import BasePage
class SummerDressesCatalogPage(BasePage):
def __init__(self, context):
BasePage.__init__(
self,
context.browser,
base_url='http://www.automationpractice.com... | 37.604651 | 100 | 0.564626 | 1,501 | 0.928262 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.345083 |
4dcdd9abff0ad027ebd337ca976c53333922e6fc | 446 | py | Python | ch3/collatz_test.py | jakdept/pythonbook | 862e445ef1bcb36c890fe7e27e144354f6c855b5 | [
"MIT"
] | null | null | null | ch3/collatz_test.py | jakdept/pythonbook | 862e445ef1bcb36c890fe7e27e144354f6c855b5 | [
"MIT"
] | null | null | null | ch3/collatz_test.py | jakdept/pythonbook | 862e445ef1bcb36c890fe7e27e144354f6c855b5 | [
"MIT"
] | null | null | null |
import unittest
import collatz
class TestCollatz(unittest.TestCase):
'''tests the collatz.py script'''
def test_collatz(self):
'''table driven test to verify collatz'''
tests = ((742, 371),
(418, 209),
(118, 59),
(1978, 989))
for tes... | 21.238095 | 63 | 0.544843 | 361 | 0.809417 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.188341 |
4dceebb4aaf3cbc5f66e75e0222673f73c95b189 | 4,046 | py | Python | test/surrogate/test_sk_random_forest.py | Dee-Why/lite-bo | 804e93b950148fb98b7e52bd56c713edacdb9b6c | [
"BSD-3-Clause"
] | 184 | 2021-06-02T06:35:25.000Z | 2022-03-31T10:33:11.000Z | test/surrogate/test_sk_random_forest.py | ZongWei-HUST/open-box | 011791aba4e44b20a6544020c73601638886d143 | [
"MIT"
] | 16 | 2021-11-15T11:13:57.000Z | 2022-03-24T12:51:17.000Z | test/surrogate/test_sk_random_forest.py | ZongWei-HUST/open-box | 011791aba4e44b20a6544020c73601638886d143 | [
"MIT"
] | 24 | 2021-06-18T04:52:57.000Z | 2022-03-30T11:14:03.000Z | from sklearn.ensemble import RandomForestRegressor
from openbox.utils.config_space import ConfigurationSpace
from openbox.utils.config_space import UniformFloatHyperparameter, \
CategoricalHyperparameter, Constant, UniformIntegerHyperparameter
import numpy as np
from openbox.utils.config_space.util import convert_c... | 32.894309 | 109 | 0.712803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 945 | 0.233564 |
4dcf592e4a02e009b4cb4e7b4d57ff918fb14acc | 3,258 | py | Python | cli_wrapper.py | anirbandas18/report-engine | de7d3c0caab972243a61e681abbb9a06e9c54857 | [
"MIT"
] | null | null | null | cli_wrapper.py | anirbandas18/report-engine | de7d3c0caab972243a61e681abbb9a06e9c54857 | [
"MIT"
] | null | null | null | cli_wrapper.py | anirbandas18/report-engine | de7d3c0caab972243a61e681abbb9a06e9c54857 | [
"MIT"
] | null | null | null | import subprocess, os
# constants with global scope
INPUT = "--input"
OUTPUT = "--output"
FILTERS = "--filters"
SUPPPLEMENTS = "--supplements"
JAR_DIRECTORY = "target"
JAR_NAME = "report-engine.jar"
def build_jar():
should_package = input("\nBuild " + JAR_NAME + " file from src (Y/N) ? ")
# check ... | 42.868421 | 123 | 0.624002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,329 | 0.407919 |
4dcfc7f344c60db35f7d0923585dc078c2f43a3c | 11,267 | py | Python | 19-05-150_protein_ridge/inference.py | danhtaihoang/sparse-network | 763a19f5f333df5cfa9852d965a7110e813d52d5 | [
"MIT"
] | null | null | null | 19-05-150_protein_ridge/inference.py | danhtaihoang/sparse-network | 763a19f5f333df5cfa9852d965a7110e813d52d5 | [
"MIT"
] | null | null | null | 19-05-150_protein_ridge/inference.py | danhtaihoang/sparse-network | 763a19f5f333df5cfa9852d965a7110e813d52d5 | [
"MIT"
] | null | null | null | ##========================================================================================
import numpy as np
from scipy import linalg
from sklearn.preprocessing import OneHotEncoder
from scipy.spatial import distance
#=========================================================================================
def itab(n... | 30.125668 | 101 | 0.454158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,690 | 0.23875 |
4dcff13d4501aa2f3c3df9d643bf2c4ada7cfd82 | 335 | py | Python | src/test/resources/script/jython/testReturnString.py | adchilds/jythonutil | 24e6b945cf7474358be1f43e0a72f37411289e39 | [
"CNRI-Jython"
] | 5 | 2016-02-05T19:44:57.000Z | 2017-05-26T10:26:29.000Z | src/test/resources/script/jython/testReturnString.py | adchilds/jythonutil | 24e6b945cf7474358be1f43e0a72f37411289e39 | [
"CNRI-Jython"
] | 1 | 2017-02-03T06:19:21.000Z | 2017-02-11T03:55:55.000Z | src/test/resources/script/jython/testReturnString.py | adchilds/jythonutil | 24e6b945cf7474358be1f43e0a72f37411289e39 | [
"CNRI-Jython"
] | null | null | null | import sys
if __name__ == '__main__':
# Set the defaults
a = ''
b = ''
# If arguments were passed to this script, use those
try:
a = sys.argv[1]
b = sys.argv[2]
except Exception:
pass
# Sets the result to the longer of the two Strings
result = a if len(a) ... | 19.705882 | 56 | 0.552239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.4 |
4dd0b98da97f43f66eaf8f6486394d5b6746b436 | 5,050 | py | Python | scraper.py | quake0day/chessreview | 1cb1aa6689f2db46546da9b1bf328da25b1b67ba | [
"Apache-2.0"
] | null | null | null | scraper.py | quake0day/chessreview | 1cb1aa6689f2db46546da9b1bf328da25b1b67ba | [
"Apache-2.0"
] | null | null | null | scraper.py | quake0day/chessreview | 1cb1aa6689f2db46546da9b1bf328da25b1b67ba | [
"Apache-2.0"
] | null | null | null | """
PGN Scraper is a small program which downloads each of a user's archived games from chess.com and stores them in a pgn file.
When running the user is asked for the account name which shall be scraped and for game types.
The scraper only downloads games of the correct type.
Supported types are: bullet, rapid, blitz... | 31.36646 | 143 | 0.60396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,837 | 0.561782 |
4dd0f6aca6f1e8e85ab78942074e05e47cb24566 | 2,117 | py | Python | testpro1/DB_handler_jjd.py | dongkakika/OXS | 95166365fb5e35155af3b8de6859ec87f3d9ca78 | [
"MIT"
] | 4 | 2020-04-22T08:42:01.000Z | 2021-07-31T19:28:51.000Z | testpro1/DB_handler_jjd.py | dongkakika/OXS | 95166365fb5e35155af3b8de6859ec87f3d9ca78 | [
"MIT"
] | null | null | null | testpro1/DB_handler_jjd.py | dongkakika/OXS | 95166365fb5e35155af3b8de6859ec87f3d9ca78 | [
"MIT"
] | null | null | null | import sqlite3
import codecs # for using '한글'
import os
# 타이틀 정보 읽어오기
f = codecs.open("jjd_info_title.txt", "r")
title_list = []
while True:
line = f.readline() # 한 줄씩 읽
if not line: break # break the loop when it's End Of File
title_list.append(line) # split the line and append it to... | 28.608108 | 90 | 0.600378 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,233 | 0.552172 |
4dd104cc2e6c9e4bdd3ba911a3d5a31df0366e7f | 429 | py | Python | scripts/regression_tests.py | zhangxaochen/Opt | 7f1af802bfc84cc9ef1adb9facbe4957078f529a | [
"MIT"
] | 260 | 2017-03-02T19:57:51.000Z | 2022-01-21T03:52:03.000Z | scripts/regression_tests.py | zhangxaochen/Opt | 7f1af802bfc84cc9ef1adb9facbe4957078f529a | [
"MIT"
] | 102 | 2017-03-03T00:42:56.000Z | 2022-03-30T14:15:20.000Z | scripts/regression_tests.py | zhangxaochen/Opt | 7f1af802bfc84cc9ef1adb9facbe4957078f529a | [
"MIT"
] | 71 | 2017-03-02T20:22:33.000Z | 2022-01-02T03:49:04.000Z | from opt_utils import *
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--skip_compilation", action='store_true', help="skip compilation")
args = parser.parse_args()
if not args.skip_compilation:
compile_all_opt_examples()
for example in all_examples:
args = []
output = run_example(ex... | 28.6 | 93 | 0.748252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.16317 |
4dd688bf34007f2b88b7cc72d6792e3f5c02e4ad | 801 | py | Python | rec/migrations/0005_auto_20200922_1701.py | lpkyrius/rg1 | 6132ec5cd8db86088f8635f2e12ce6bf16aeff8e | [
"MIT"
] | null | null | null | rec/migrations/0005_auto_20200922_1701.py | lpkyrius/rg1 | 6132ec5cd8db86088f8635f2e12ce6bf16aeff8e | [
"MIT"
] | 2 | 2020-09-16T14:06:34.000Z | 2020-09-16T18:14:26.000Z | rec/migrations/0005_auto_20200922_1701.py | lpkyrius/rg1 | 6132ec5cd8db86088f8635f2e12ce6bf16aeff8e | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-09-22 20:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rec', '0004_auto_20200922_1633'),
]
operations = [
migrations.AlterField(
model_name='convenio',
name='cnpj',
... | 27.62069 | 87 | 0.574282 | 708 | 0.883895 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.171036 |
4dd73302eae1ae2e039d31c3cb2e7f24834961a5 | 6,452 | py | Python | deeppavlov/deep.py | cclauss/DeepPavlov | 8726173c92994b3f789790b5879052d2f7953f47 | [
"Apache-2.0"
] | 3 | 2020-04-16T04:25:10.000Z | 2021-05-07T23:04:43.000Z | deeppavlov/deep.py | sachinsingh3107/Deeppavlov_Chatbot | f10b9485c118cdec69e73c89833a1a5a164404de | [
"Apache-2.0"
] | 12 | 2020-01-28T22:14:04.000Z | 2022-02-10T00:10:17.000Z | deeppavlov/deep.py | sachinsingh3107/Deeppavlov_Chatbot | f10b9485c118cdec69e73c89833a1a5a164404de | [
"Apache-2.0"
] | 1 | 2021-02-05T13:01:48.000Z | 2021-02-05T13:01:48.000Z | """
Copyright 2017 Neural Networks and Deep Learning lab, MIPT
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 a... | 47.094891 | 116 | 0.66739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,780 | 0.275883 |
4dd83f2bdedcce578bc2f4f15b92a56d3b2455a9 | 3,345 | py | Python | test/test_cfg/read_grammar.py | wannaphong/pycfg | ffa67958ed1c3deb73cadb3969ac086336fb1269 | [
"MIT"
] | 8 | 2017-12-18T08:51:27.000Z | 2020-11-26T02:21:06.000Z | test/test_cfg/read_grammar.py | wannaphong/pycfg | ffa67958ed1c3deb73cadb3969ac086336fb1269 | [
"MIT"
] | 1 | 2020-01-09T15:41:09.000Z | 2020-01-09T15:41:09.000Z | test/test_cfg/read_grammar.py | wannaphong/pycfg | ffa67958ed1c3deb73cadb3969ac086336fb1269 | [
"MIT"
] | 6 | 2017-06-12T16:58:40.000Z | 2019-11-27T06:55:07.000Z | '''Read grammar specifications for test cases.'''
import re
import sys
from pprint import pprint
from cfg.core import ContextFreeGrammar, Terminal, Nonterminal, Marker
from cfg.table import END_MARKER, ParseTableNormalForm
class GrammarTestCase(object):
'''Contains a CFG and optionally a parse table.'''
def ... | 31.261682 | 93 | 0.564425 | 497 | 0.14858 | 126 | 0.037668 | 0 | 0 | 0 | 0 | 448 | 0.133931 |
4dd85a981091c632d855dbb819f62a7e6d570ba9 | 59,286 | py | Python | pype/plugins/global/publish/extract_review.py | barklaya/pype | db3f708b1918d4f81951b36e1575eb3ecf0551c5 | [
"MIT"
] | null | null | null | pype/plugins/global/publish/extract_review.py | barklaya/pype | db3f708b1918d4f81951b36e1575eb3ecf0551c5 | [
"MIT"
] | null | null | null | pype/plugins/global/publish/extract_review.py | barklaya/pype | db3f708b1918d4f81951b36e1575eb3ecf0551c5 | [
"MIT"
] | null | null | null | import os
import re
import copy
import json
import pyblish.api
import clique
import pype.api
import pype.lib
class ExtractReview(pyblish.api.InstancePlugin):
"""Extracting Review mov file for Ftrack
Compulsory attribute of representation is tags list with "review",
otherwise the representation is ignored... | 38.003846 | 95 | 0.540347 | 59,174 | 0.998111 | 0 | 0 | 0 | 0 | 0 | 0 | 18,102 | 0.305333 |
4dd8bacf6b045e8713670a0e2435de01e5e09f0a | 6,683 | py | Python | tests/peerfinder_test.py | wusel42/PeerFinder | 35f132b45f2947902adfb6327ebcdf60bce4bdc2 | [
"MIT"
] | 49 | 2017-07-13T13:58:14.000Z | 2022-03-04T12:23:35.000Z | tests/peerfinder_test.py | wusel42/PeerFinder | 35f132b45f2947902adfb6327ebcdf60bce4bdc2 | [
"MIT"
] | 9 | 2017-07-11T13:23:15.000Z | 2021-02-06T22:25:15.000Z | tests/peerfinder_test.py | wusel42/PeerFinder | 35f132b45f2947902adfb6327ebcdf60bce4bdc2 | [
"MIT"
] | 17 | 2017-07-11T12:37:25.000Z | 2022-01-29T14:19:35.000Z | import unittest
from unittest.mock import Mock
import mock
import peerfinder.peerfinder as peerfinder
import requests
from ipaddress import IPv6Address, IPv4Address
class testPeerFinder(unittest.TestCase):
def setUp(self):
self.netixlan_set = {
"id": 1,
"ix_id": 2,
"nam... | 36.519126 | 87 | 0.575939 | 6,466 | 0.96753 | 0 | 0 | 391 | 0.058507 | 0 | 0 | 908 | 0.135867 |
4dd917ca4b89b1723693aa78f18f3c1b80e9acd7 | 5,372 | py | Python | ceilometer/network/notifications.py | rackerlabs/instrumented-ceilometer | 6ac5215ac0476120d9c99adcabc9cad0d32963da | [
"Apache-2.0"
] | 3 | 2021-04-18T00:37:48.000Z | 2021-07-21T10:20:11.000Z | ceilometer/network/notifications.py | lexxito/monitoring | bec8dfb8d3610331c7ae5ec543e0b8da0948c164 | [
"Apache-2.0"
] | null | null | null | ceilometer/network/notifications.py | lexxito/monitoring | bec8dfb8d3610331c7ae5ec543e0b8da0948c164 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Julien Danjou <[email protected]>
#
# 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:... | 32.167665 | 79 | 0.642033 | 4,113 | 0.765494 | 1,569 | 0.292016 | 1,357 | 0.252559 | 0 | 0 | 2,532 | 0.471245 |
4dda7edb222a2d84997df6163df89166d292eb6b | 2,407 | py | Python | optax/_src/update_test.py | pierricklee/optax | a75dbf99ce7af05e18bb6a2c518531ddc7303d13 | [
"Apache-2.0"
] | 2 | 2021-03-13T23:25:27.000Z | 2022-03-09T09:38:27.000Z | optax/_src/update_test.py | rwightman/optax | ba0bc11d172054d65b4387ecae840c04e2bc7035 | [
"Apache-2.0"
] | null | null | null | optax/_src/update_test.py | rwightman/optax | ba0bc11d172054d65b4387ecae840c04e2bc7035 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019 DeepMind Technologies Limited. 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
#
# ... | 33.901408 | 80 | 0.665974 | 1,501 | 0.623598 | 0 | 0 | 1,457 | 0.605318 | 0 | 0 | 747 | 0.310345 |
4ddab5e3d9aa744300fde8fef5e302f340725170 | 44,868 | py | Python | scripts/venv/lib/python2.7/site-packages/cogent/core/entity.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | 3 | 2015-11-20T08:44:42.000Z | 2016-12-14T01:40:03.000Z | scripts/venv/lib/python2.7/site-packages/cogent/core/entity.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | 1 | 2017-09-04T14:04:32.000Z | 2020-05-26T19:04:00.000Z | scripts/venv/lib/python2.7/site-packages/cogent/core/entity.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Provides the entities, the building blocks of the SMRCA hierachy
representation of a macromolecular structure.
The MultiEntity class is a special Entity class to hold multiple instances of
other entities. All Entities apart from the Atom can hold others and inherit
from the MultiEntity. T... | 37.483709 | 99 | 0.584693 | 39,531 | 0.881051 | 0 | 0 | 0 | 0 | 0 | 0 | 14,554 | 0.324374 |
4ddb38d835903f3211b8436bd705a411ed81f133 | 3,381 | py | Python | venv/lib/python3.9/site-packages/ajsonrpc/tests/test_dispatcher.py | janten/ESP32-Paxcounter | 212317f3800ec87aef4847e7d60971d4bb9e7d70 | [
"Apache-2.0"
] | 12 | 2019-03-06T03:44:42.000Z | 2021-07-22T03:47:24.000Z | venv/lib/python3.9/site-packages/ajsonrpc/tests/test_dispatcher.py | janten/ESP32-Paxcounter | 212317f3800ec87aef4847e7d60971d4bb9e7d70 | [
"Apache-2.0"
] | 10 | 2020-10-28T10:04:58.000Z | 2021-07-21T20:47:27.000Z | venv/lib/python3.9/site-packages/ajsonrpc/tests/test_dispatcher.py | janten/ESP32-Paxcounter | 212317f3800ec87aef4847e7d60971d4bb9e7d70 | [
"Apache-2.0"
] | 4 | 2021-07-21T20:00:14.000Z | 2021-10-12T19:43:30.000Z | import unittest
from ..dispatcher import Dispatcher
class Math:
@staticmethod
def sum(a, b):
return a + b
@classmethod
def diff(cls, a, b):
return a - b
def mul(self, a, b):
return a * b
class TestDispatcher(unittest.TestCase):
def test_empty(self):
self.ass... | 27.487805 | 79 | 0.561964 | 3,323 | 0.982845 | 0 | 0 | 166 | 0.049098 | 0 | 0 | 408 | 0.120674 |
4ddd26506c5a2c32c298c1cac79c89b498178da9 | 7,206 | py | Python | mesh.py | msellens/pms | d175fded80087a907e8fab6ae09f6d1be69b3353 | [
"MIT"
] | null | null | null | mesh.py | msellens/pms | d175fded80087a907e8fab6ae09f6d1be69b3353 | [
"MIT"
] | null | null | null | mesh.py | msellens/pms | d175fded80087a907e8fab6ae09f6d1be69b3353 | [
"MIT"
] | null | null | null | from itertools import product
import struct
import pickle
import numpy as np
from scipy import sparse
from scipy import isnan as scipy_isnan
import numpy.matlib
ASCII_FACET = """facet normal 0 0 0
outer loop
vertex {face[0][0]:.4f} {face[0][1]:.4f} {face[0][2]:.4f}
vertex {face[1][0]:.4f} {face[1][1]:.4f} {face[1][2]... | 28.709163 | 96 | 0.543991 | 1,745 | 0.242159 | 0 | 0 | 0 | 0 | 0 | 0 | 1,181 | 0.163891 |
4ddd878eccdd7091a7bbb342e9e801e07d0428f5 | 4,759 | py | Python | vaccine.py | brannbrann/findavaccinesms | 91e21a91a25d69efed3266c2ccbb5b0e76f5ca1b | [
"Apache-2.0"
] | null | null | null | vaccine.py | brannbrann/findavaccinesms | 91e21a91a25d69efed3266c2ccbb5b0e76f5ca1b | [
"Apache-2.0"
] | null | null | null | vaccine.py | brannbrann/findavaccinesms | 91e21a91a25d69efed3266c2ccbb5b0e76f5ca1b | [
"Apache-2.0"
] | null | null | null | '''
This is a python script that requires you have python installed, or in a cloud environment.
This script scrapes the CVS website looking for vaccine appointments in the cities you list.
To update for your area, update the locations commented below.
If you receive an error that says something is not installed, type... | 37.769841 | 128 | 0.63921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,591 | 0.544442 |
4ddf8f7618bc1ce4a506f069f1a4aa3da6ef6a1b | 22 | py | Python | pefile/__init__.py | 0x1F9F1/binja-msvc | be2577c22c8d37fd1e2e211f80b1c9a920705bd2 | [
"MIT"
] | 9 | 2019-02-08T10:01:39.000Z | 2021-04-29T12:27:34.000Z | pefile/__init__.py | DatBrick/binja-msvc | 751ffc1450c569bad23ac67a761d0f1fbd4ca4c4 | [
"MIT"
] | 1 | 2019-07-04T20:09:57.000Z | 2019-07-12T11:10:15.000Z | pefile/__init__.py | DatBrick/binja-msvc | 751ffc1450c569bad23ac67a761d0f1fbd4ca4c4 | [
"MIT"
] | 2 | 2019-03-03T13:00:14.000Z | 2020-05-01T05:35:04.000Z | from .pefile import *
| 11 | 21 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4de04f66464c9444c5a3decd7af60b9026030890 | 6,643 | py | Python | examples/viewer3DVolume.py | vincefn/silx | 4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444 | [
"CC0-1.0",
"MIT"
] | null | null | null | examples/viewer3DVolume.py | vincefn/silx | 4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444 | [
"CC0-1.0",
"MIT"
] | null | null | null | examples/viewer3DVolume.py | vincefn/silx | 4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444 | [
"CC0-1.0",
"MIT"
] | 1 | 2017-04-02T18:00:14.000Z | 2017-04-02T18:00:14.000Z | # coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | 32.091787 | 79 | 0.663104 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,666 | 0.551859 |
4de27831141702d223c7260054a467c2f0b9791f | 260 | py | Python | solentware_misc/core/__init__.py | RogerMarsh/solentware-misc | 3b031b26bc747193f25f7ffc9e6d24d7278ad30b | [
"BSD-3-Clause"
] | null | null | null | solentware_misc/core/__init__.py | RogerMarsh/solentware-misc | 3b031b26bc747193f25f7ffc9e6d24d7278ad30b | [
"BSD-3-Clause"
] | null | null | null | solentware_misc/core/__init__.py | RogerMarsh/solentware-misc | 3b031b26bc747193f25f7ffc9e6d24d7278ad30b | [
"BSD-3-Clause"
] | null | null | null | # __init__.py
# Copyright 2017 Roger Marsh
# Licence: See LICENCE (BSD licence)
"""Miscellaneous modules for applications available at solentware.co.uk.
These do not belong in the solentware_base or solentware_grid packages,
siblings of solentware_misc.
"""
| 26 | 72 | 0.792308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.980769 |
4de2f8a837d616a9960e145e5c2a45f95ecf9856 | 127 | py | Python | learn_tf/MNIST.py | pkumusic/AI | 912f1b6f12177e301c4a7efccc305bcb52e4d823 | [
"MIT"
] | 1 | 2017-05-26T15:23:03.000Z | 2017-05-26T15:23:03.000Z | learn_tf/MNIST.py | pkumusic/AI | 912f1b6f12177e301c4a7efccc305bcb52e4d823 | [
"MIT"
] | null | null | null | learn_tf/MNIST.py | pkumusic/AI | 912f1b6f12177e301c4a7efccc305bcb52e4d823 | [
"MIT"
] | null | null | null | __author__ = "Music"
# MNIST For ML Beginners
# https://www.tensorflow.org/versions/r0.9/tutorials/mnist/beginners/index.html
| 25.4 | 79 | 0.771654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.866142 |
4de340ca20d63248997dbff4ccd4dfac76793fb6 | 294 | py | Python | EXC/CW1/task7/mapper.py | easyCZ/UoE-Projects | 7651c8caf329c4f7b4562eba441bfc24124cfcfd | [
"BSD-2-Clause"
] | null | null | null | EXC/CW1/task7/mapper.py | easyCZ/UoE-Projects | 7651c8caf329c4f7b4562eba441bfc24124cfcfd | [
"BSD-2-Clause"
] | 1 | 2022-02-23T07:34:53.000Z | 2022-02-23T07:34:53.000Z | EXC/CW1/task7/mapper.py | easyCZ/UoE-Projects | 7651c8caf329c4f7b4562eba441bfc24124cfcfd | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# mapper.py
import sys
for line in sys.stdin:
row, values = line.strip().split('\t')
row_values = values.split(' ')
for (col, col_value) in enumerate(row_values):
# out: <col> <row> <value>
print("{0}\t{1}\t{2}".format(col, row, col_value)) | 26.727273 | 58 | 0.585034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.278912 |
4de518de130a1d423998bfe32aad3a8e89b7b784 | 171 | py | Python | rllib/algorithms/maddpg/__init__.py | willfrey/ray | 288a81b42ef0186ab4db33b30191614a7bdb69f6 | [
"Apache-2.0"
] | null | null | null | rllib/algorithms/maddpg/__init__.py | willfrey/ray | 288a81b42ef0186ab4db33b30191614a7bdb69f6 | [
"Apache-2.0"
] | null | null | null | rllib/algorithms/maddpg/__init__.py | willfrey/ray | 288a81b42ef0186ab4db33b30191614a7bdb69f6 | [
"Apache-2.0"
] | 1 | 2019-09-24T16:24:49.000Z | 2019-09-24T16:24:49.000Z | from ray.rllib.algorithms.maddpg.maddpg import (
MADDPGConfig,
MADDPGTrainer,
DEFAULT_CONFIG,
)
__all__ = ["MADDPGConfig", "MADDPGTrainer", "DEFAULT_CONFIG"]
| 21.375 | 61 | 0.730994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.263158 |
4de6e32302e33f5a63e0ba995f624e069fef3439 | 1,849 | py | Python | Fig8_RTM/RTM.py | GeoCode-polymtl/Seis_float16 | 5f9660cbdc37e5ab7f6054f7547df2ffb661a81d | [
"MIT"
] | null | null | null | Fig8_RTM/RTM.py | GeoCode-polymtl/Seis_float16 | 5f9660cbdc37e5ab7f6054f7547df2ffb661a81d | [
"MIT"
] | 5 | 2020-01-28T22:17:04.000Z | 2022-02-09T23:33:07.000Z | Fig8_RTM/RTM.py | GeoCode-polymtl/Seis_float16 | 5f9660cbdc37e5ab7f6054f7547df2ffb661a81d | [
"MIT"
] | 3 | 2019-11-27T06:06:04.000Z | 2020-06-05T17:18:15.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Perform RTM on marmousi
"""
import os
import numpy as np
import h5py as h5
from scipy.ndimage.filters import gaussian_filter
import sys
import shutil
from SeisCL import SeisCL
names = ['fp32', 'fp16io', 'fp16com']
filedata = os.getcwd() + '/marmfp32'
seis = SeisCL()
... | 31.87931 | 81 | 0.670092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 804 | 0.43483 |
4de77886992362775de86d085f926f5ea3304df0 | 954 | py | Python | doc/default_issue/fix.py | nadavweidman/pytconf | 6203d3607c1cc383c60d1c138efc1109c7a6ab59 | [
"MIT"
] | null | null | null | doc/default_issue/fix.py | nadavweidman/pytconf | 6203d3607c1cc383c60d1c138efc1109c7a6ab59 | [
"MIT"
] | 1 | 2021-12-03T11:35:46.000Z | 2021-12-03T11:52:52.000Z | doc/default_issue/fix.py | nadavweidman/pytconf | 6203d3607c1cc383c60d1c138efc1109c7a6ab59 | [
"MIT"
] | 8 | 2021-12-03T11:07:55.000Z | 2022-03-23T13:35:05.000Z | #!/usr/bin/python3
from typing import List
from registry import the_registry
from param_collector import the_collector
class MetaConfig(type):
"""
Meta class for all configs
"""
def __new__(mcs, name, bases, namespace):
ret = super().__new__(mcs, name, bases, namespace)
i = 0
... | 18.346154 | 73 | 0.627883 | 605 | 0.634172 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.111111 |
4de7d409e55429843384ad1f22b9b00b0eb2103a | 3,437 | py | Python | argonneV14.py | floresab/Toy-Models | 0b990563e1be903cbdcb56ead57d83bc3ca71198 | [
"MIT"
] | null | null | null | argonneV14.py | floresab/Toy-Models | 0b990563e1be903cbdcb56ead57d83bc3ca71198 | [
"MIT"
] | null | null | null | argonneV14.py | floresab/Toy-Models | 0b990563e1be903cbdcb56ead57d83bc3ca71198 | [
"MIT"
] | null | null | null | """
File : argonneV14.py
Language : Python 3.6
Created : 7/13/2018
Edited : 7/13/2018
San Digeo State University
Department of Physics and Astronomy
#https://journals.aps.org/prc/pdf/10.1103/PhysRevC.51.38 --argonneV18
This code implements Argonne V14 potential outlined in ...
--CONSTANTS --
... | 33.696078 | 84 | 0.364562 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,864 | 0.542333 |
4de80e2e1c94dbe6762d16201a946a481593a775 | 543 | py | Python | solutions/python3/problem1556.py | tjyiiuan/LeetCode | abd10944c6a1f7a7f36bd9b6218c511cf6c0f53e | [
"MIT"
] | null | null | null | solutions/python3/problem1556.py | tjyiiuan/LeetCode | abd10944c6a1f7a7f36bd9b6218c511cf6c0f53e | [
"MIT"
] | null | null | null | solutions/python3/problem1556.py | tjyiiuan/LeetCode | abd10944c6a1f7a7f36bd9b6218c511cf6c0f53e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
1556. Thousand Separator
Given an integer n, add a dot (".") as the thousands separator and return it in string format.
Constraints:
0 <= n < 2^31
"""
class Solution:
def thousandSeparator(self, n: int) -> str:
res = ""
str_n = str(n)
count = 0
ind = ... | 19.392857 | 94 | 0.46593 | 358 | 0.6593 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.3407 |
4de95b2ae160d83f0a0fab9908a283c692256619 | 6,483 | py | Python | app/resources/base.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/resources/base.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/resources/base.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Controller para fornecer dados da CEE '''
from flask_restful import Resource
from service.qry_options_builder import QueryOptionsBuilder
from model.thematic import Thematic
class BaseResource(Resource):
''' Classe de base de resource '''
DEFAULT_SWAGGER_PARAMS = [
{"name": "valor", "required": Fals... | 46.640288 | 94 | 0.608669 | 6,363 | 0.972638 | 0 | 0 | 358 | 0.054723 | 0 | 0 | 4,809 | 0.735096 |
4de9705438995df854b9ebaf6e2d9530e21d53a7 | 3,155 | py | Python | tapioca_trello/resource_mapping/checklist.py | humrochagf/tapioca-trello | a7067a4c43b22e64cef67b68068580448a4cb420 | [
"MIT"
] | null | null | null | tapioca_trello/resource_mapping/checklist.py | humrochagf/tapioca-trello | a7067a4c43b22e64cef67b68068580448a4cb420 | [
"MIT"
] | null | null | null | tapioca_trello/resource_mapping/checklist.py | humrochagf/tapioca-trello | a7067a4c43b22e64cef67b68068580448a4cb420 | [
"MIT"
] | 1 | 2018-07-31T23:04:34.000Z | 2018-07-31T23:04:34.000Z | # -*- coding: utf-8 -*-
CHECKLIST_MAPPING = {
'checklist_retrieve': {
'resource': '/checklists/{id}',
'docs': (
'https://developers.trello.com/v1.0/reference'
'#checklistsid'
),
'methods': ['GET'],
},
'checklist_field_retrieve': {
'resource': ... | 28.944954 | 64 | 0.496672 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,959 | 0.620919 |
4dea1d4995a7ebb956d68ed48040d475a502bb1f | 2,962 | py | Python | investimentos.py | isaiaspereira307/invest | ad0aa40dca4ece75fb7dad98415e73dc382f662a | [
"MIT"
] | null | null | null | investimentos.py | isaiaspereira307/invest | ad0aa40dca4ece75fb7dad98415e73dc382f662a | [
"MIT"
] | null | null | null | investimentos.py | isaiaspereira307/invest | ad0aa40dca4ece75fb7dad98415e73dc382f662a | [
"MIT"
] | null | null | null | import json
import os
def calculo(self):
meta = float(input('valor da meta: ')) # 1000000
valorinicial = float(input('valor inicial: ')) # 5637.99
valormensal = float(input('investimento mensal: ')) # 150
dividendos = float(input('dividendos: ')) # 16.86
meta = meta - valorinicial - valormensal - d... | 27.174312 | 61 | 0.609723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 613 | 0.206189 |
4dea6041225ae15383493ad1d5f6078ade49cd6b | 10,718 | py | Python | lib/ipython_view.py | drewp/light9 | ab173a40d095051546e532962f7a33ac502943a6 | [
"MIT"
] | 2 | 2018-10-05T13:32:46.000Z | 2022-01-01T22:51:20.000Z | lib/ipython_view.py | drewp/light9 | ab173a40d095051546e532962f7a33ac502943a6 | [
"MIT"
] | 4 | 2021-06-08T19:33:40.000Z | 2022-03-11T23:18:06.000Z | lib/ipython_view.py | drewp/light9 | ab173a40d095051546e532962f7a33ac502943a6 | [
"MIT"
] | null | null | null | # this version is adapted from http://wiki.ipython.org/Old_Embedding/GTK
"""
Backend to the console plugin.
@author: Eitan Isaacson
@organization: IBM Corporation
@copyright: Copyright (c) 2007 IBM Corporation
@license: BSD
All rights reserved. This program and the accompanying materials are made
available under ... | 35.026144 | 90 | 0.628755 | 9,292 | 0.866953 | 0 | 0 | 0 | 0 | 0 | 0 | 1,307 | 0.121944 |
4deba880f54b833c42a876a0e52201d76815fdfb | 513 | py | Python | todo/urls.py | incomparable/Django | ba2f38f694b1055215559c4ca4173c245918fabf | [
"Apache-2.0"
] | null | null | null | todo/urls.py | incomparable/Django | ba2f38f694b1055215559c4ca4173c245918fabf | [
"Apache-2.0"
] | null | null | null | todo/urls.py | incomparable/Django | ba2f38f694b1055215559c4ca4173c245918fabf | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^get', views.index, name='index'),
url(r'^details/(?P<id>\w)/$', views.details, name='details'),
url(r'^add', views.add, name='add'),
url(r'^delete', views.delete, name='delete'),
... | 28.5 | 65 | 0.598441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.45809 |
4debda04f4303a03d05f73d0f622731078a63cdf | 336 | py | Python | first_steps_in_coding_and_simple_operations_and_calculations/exercise/charity_campaign.py | PetkoAndreev/Python-basics | a376362548380ae50c7c707551cb821547f44402 | [
"MIT"
] | null | null | null | first_steps_in_coding_and_simple_operations_and_calculations/exercise/charity_campaign.py | PetkoAndreev/Python-basics | a376362548380ae50c7c707551cb821547f44402 | [
"MIT"
] | null | null | null | first_steps_in_coding_and_simple_operations_and_calculations/exercise/charity_campaign.py | PetkoAndreev/Python-basics | a376362548380ae50c7c707551cb821547f44402 | [
"MIT"
] | null | null | null | days = int(input())
sladkar = int(input())
cake = int(input())
gofreta = int(input())
pancake = int(input())
cake_price = cake*45
gofreta_price = gofreta*5.8
pancake_price = pancake*3.2
day_price = (cake_price + gofreta_price + pancake_price)*sladkar
total_price = days*day_price
campaign = total_price - (total_price/8)... | 28 | 64 | 0.741071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4dec80c0904955f695f9881970d5b2f7945e222c | 9,234 | py | Python | deepbiome/loss_and_metric.py | Young-won/deepbiome | 644bc226f1149038d0af7203a03a77ca6e931835 | [
"BSD-3-Clause"
] | 4 | 2019-10-20T15:56:19.000Z | 2021-03-17T16:48:35.000Z | deepbiome/loss_and_metric.py | Young-won/deepbiome | 644bc226f1149038d0af7203a03a77ca6e931835 | [
"BSD-3-Clause"
] | 1 | 2019-11-11T22:47:57.000Z | 2019-11-11T22:47:57.000Z | deepbiome/loss_and_metric.py | Young-won/deepbiome | 644bc226f1149038d0af7203a03a77ca6e931835 | [
"BSD-3-Clause"
] | 1 | 2019-11-11T18:17:58.000Z | 2019-11-11T18:17:58.000Z | ######################################################################
## DeepBiome
## - Loss and metrics (mse, cross-entropy)
##
## July 10. 2019
## Youngwon ([email protected])
##
## Reference
## - Keras (https://github.com/keras-team/keras)
######################################################################
i... | 42.164384 | 144 | 0.594975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,788 | 0.410223 |
4ded2765ebba38c75e11130b9978c0647bfd5359 | 3,177 | py | Python | Hough.py | andresgmz/Scripts-Python | 1f56e5790dc9c38d9bbf5dc040ead45a8f3ca937 | [
"MIT"
] | null | null | null | Hough.py | andresgmz/Scripts-Python | 1f56e5790dc9c38d9bbf5dc040ead45a8f3ca937 | [
"MIT"
] | null | null | null | Hough.py | andresgmz/Scripts-Python | 1f56e5790dc9c38d9bbf5dc040ead45a8f3ca937 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.pyplot as plt
#from matplotlib import pyplot as plt
from tkinter import filedialog
from tkinter import *
root = Tk()
root.withdraw()
root.filename = filedialog.askopenfilename(initialdir = "/",title = "Select file",filetypes = (("all files",".*"),("jpg files","... | 38.743902 | 153 | 0.645892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,638 | 0.515419 |
4dee15ccda1b59264009aac028177487941365ec | 3,927 | py | Python | src/SentimentAnalyzer.py | IChowdhury01/Sentiment-Analyzer | 0a566365eed00b0e76feb77c638579dd80f75068 | [
"MIT"
] | null | null | null | src/SentimentAnalyzer.py | IChowdhury01/Sentiment-Analyzer | 0a566365eed00b0e76feb77c638579dd80f75068 | [
"MIT"
] | null | null | null | src/SentimentAnalyzer.py | IChowdhury01/Sentiment-Analyzer | 0a566365eed00b0e76feb77c638579dd80f75068 | [
"MIT"
] | null | null | null | # Binary Sentiment Analysis using Recurrent Neural Networks
# Import libraries & dataset list
import tensorflow as tf
import tensorflow_datasets as dslist
# Load Dataset
print("\nLoading dataset...")
# Download dataset and dataset info
DATASET_CODE = 'imdb_reviews/subwords8k' # Usin... | 30.679688 | 181 | 0.689585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,692 | 0.430863 |
4dee9911d375f6b557bb57e2701f998ccd07ef1c | 5,146 | py | Python | google_image_scraping_script_for_arg.py | KuoYuHong/Shihu-Cat-Image-Recognition-System | 5f184e4902fa6edb4602f01369b56ef03ad4790d | [
"MIT"
] | 1 | 2021-11-24T14:46:06.000Z | 2021-11-24T14:46:06.000Z | google_image_scraping_script_for_arg.py | KuoYuHong/Shihu-Cat-Image-Recognition-System | 5f184e4902fa6edb4602f01369b56ef03ad4790d | [
"MIT"
] | null | null | null | google_image_scraping_script_for_arg.py | KuoYuHong/Shihu-Cat-Image-Recognition-System | 5f184e4902fa6edb4602f01369b56ef03ad4790d | [
"MIT"
] | null | null | null | import selenium
from selenium import webdriver
import time
import requests
import os
from PIL import Image
import io
import hashlib
# All in same directory
DRIVER_PATH = 'chromedriver.exe'
def fetch_image_urls(query:str, max_links_to_fetch:int, wd:webdriver, sleep_between_interactions:int=0.5):
def scroll_to_end... | 36.496454 | 171 | 0.621842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,645 | 0.3125 |
4df16cb84c883d268ef0671570a73d61fad65816 | 1,515 | py | Python | pyslowloris/utils.py | goasdsdkai/daas | 78ef23b254893efca22748fe619ef22648b8c1e8 | [
"MIT"
] | 75 | 2017-06-15T05:58:02.000Z | 2022-03-31T22:59:25.000Z | pyslowloris/utils.py | goasdsdkai/daas | 78ef23b254893efca22748fe619ef22648b8c1e8 | [
"MIT"
] | 8 | 2017-08-25T04:14:19.000Z | 2021-09-10T06:21:33.000Z | pyslowloris/utils.py | goasdsdkai/daas | 78ef23b254893efca22748fe619ef22648b8c1e8 | [
"MIT"
] | 32 | 2017-03-22T22:52:26.000Z | 2022-03-07T15:53:01.000Z | """
MIT License
Copyright (c) 2020 Maxim Krivich
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,... | 36.95122 | 78 | 0.69769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,333 | 0.879868 |
4df1faa8f49c3cdacafcecb2f8765081676e89ad | 5,305 | py | Python | brahe/data_models/geojson.py | duncaneddy/brahe | 4a1746ef3c14211b0709de6e7e34b6f52fc0e686 | [
"MIT"
] | 14 | 2019-05-29T13:36:55.000Z | 2022-02-11T15:26:13.000Z | brahe/data_models/geojson.py | duncaneddy/brahe | 4a1746ef3c14211b0709de6e7e34b6f52fc0e686 | [
"MIT"
] | 1 | 2020-05-27T12:14:39.000Z | 2020-05-27T15:51:21.000Z | brahe/data_models/geojson.py | duncaneddy/brahe | 4a1746ef3c14211b0709de6e7e34b6f52fc0e686 | [
"MIT"
] | 2 | 2019-10-24T05:20:54.000Z | 2019-12-08T03:59:10.000Z | """The geojson module provides data model classes for initialization and storing
of GeoJSON objects.
"""
import typing
import typing_extensions
import pydantic
import numpy as np
import brahe.astro as astro
import brahe.coordinates as coords
import brahe.frames as frames
geographic_point = pydantic.conlist(float, mi... | 35.604027 | 121 | 0.604713 | 4,958 | 0.93459 | 1,922 | 0.3623 | 4,158 | 0.783789 | 0 | 0 | 1,653 | 0.311593 |
4df2f7977ee6df4348bd5f199099edb4427af89e | 521 | py | Python | lab7/7.7.py | rikudo765/algorithms | eb78852143662bc2e42df6271e9a015cfa8ffdd1 | [
"MIT"
] | 1 | 2020-11-16T18:46:24.000Z | 2020-11-16T18:46:24.000Z | lab7/7.7.py | rikudo765/algorithms | eb78852143662bc2e42df6271e9a015cfa8ffdd1 | [
"MIT"
] | null | null | null | lab7/7.7.py | rikudo765/algorithms | eb78852143662bc2e42df6271e9a015cfa8ffdd1 | [
"MIT"
] | null | null | null | n = int(input())
lst = list(map(int, input().split()))
def sort1(arr):
l = len(arr)
for i in range(1, n):
cur = arr[i]
pos = i
check = False
while pos > 0:
if arr[pos - 1] > cur:
check = True
arr[pos] = arr[pos - 1]
e... | 19.296296 | 39 | 0.380038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.009597 |
4df34ddd891c605f94b640242ef9b998d8ecdfb4 | 7,141 | py | Python | CORE/engines/Gudmundsson_Constraint.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | 15 | 2017-11-08T10:03:26.000Z | 2021-12-21T07:02:44.000Z | CORE/engines/Gudmundsson_Constraint.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | 9 | 2020-01-17T15:09:22.000Z | 2022-03-25T19:02:05.000Z | CORE/engines/Gudmundsson_Constraint.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
##################################################################################
# File: c:\Projects\KENYA ONE PROJECT\CORE\engines\Gudmundsson_Constraint.py #
# Project: c:\Projects\KENYA ONE PROJECT\CORE\engines #
# Created Date: Thur... | 37 | 88 | 0.555805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,617 | 0.506512 |
4df5b2217528684af4f56e2341cb113e5407f9fe | 3,988 | py | Python | libs/blocks/tests/test_variable_filter.py | dendisuhubdy/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 295 | 2015-09-25T21:15:04.000Z | 2022-01-13T01:16:18.000Z | libs/blocks/tests/test_variable_filter.py | shenshenzhanzhan/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 21 | 2015-10-28T19:06:32.000Z | 2022-03-11T23:13:05.000Z | libs/blocks/tests/test_variable_filter.py | shenshenzhanzhan/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 114 | 2015-09-26T21:23:02.000Z | 2021-11-19T02:36:41.000Z | from nose.tools import raises
from blocks.bricks import Bias, Linear, Logistic
from blocks.bricks.parallel import Merge
from blocks.filter import VariableFilter
from blocks.graph import ComputationGraph
from blocks.roles import BIAS, FILTER, PARAMETER, OUTPUT
from theano import tensor
def test_variable_filter():
... | 34.678261 | 73 | 0.719157 | 0 | 0 | 0 | 0 | 610 | 0.152959 | 0 | 0 | 605 | 0.151705 |
4df630aed0715b9f32b05663f7a43496c48ccb52 | 12,437 | py | Python | techminer/gui/comparative_analysis.py | jdvelasq/techMiner | c611d96d2f812b0890513514d9d19787a1edfe2d | [
"MIT"
] | 2 | 2020-09-25T02:42:34.000Z | 2021-08-22T11:27:58.000Z | techminer/gui/comparative_analysis.py | jdvelasq/techMiner | c611d96d2f812b0890513514d9d19787a1edfe2d | [
"MIT"
] | 1 | 2020-10-17T14:38:45.000Z | 2020-10-17T14:50:19.000Z | techminer/gui/comparative_analysis.py | jdvelasq/techMiner | c611d96d2f812b0890513514d9d19787a1edfe2d | [
"MIT"
] | 2 | 2019-10-14T18:05:25.000Z | 2021-07-17T19:28:04.000Z | from collections import Counter
import pandas as pd
import ipywidgets as widgets
import techminer.core.dashboard as dash
from techminer.core import (
CA,
Dashboard,
TF_matrix,
TFIDF_matrix,
add_counters_to_axis,
clustering,
corpus_filter,
exclude_terms,
)
# from techminer.core.params... | 28.265909 | 88 | 0.514674 | 11,083 | 0.890845 | 0 | 0 | 0 | 0 | 0 | 0 | 2,169 | 0.174343 |
4df876adfaa448099ddfc3311827d0272a1fac44 | 56,425 | py | Python | WayOfTheTurtle1.0.py | BYHu-2/- | 3243d3a0ccd9144573943b00ac4364dc5c320207 | [
"MIT"
] | 2 | 2021-12-25T00:04:12.000Z | 2021-12-25T00:14:35.000Z | WayOfTheTurtle1.0.py | BYHu-2/Turtle | 3243d3a0ccd9144573943b00ac4364dc5c320207 | [
"MIT"
] | null | null | null | WayOfTheTurtle1.0.py | BYHu-2/Turtle | 3243d3a0ccd9144573943b00ac4364dc5c320207 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import qtawesome
import matplotlib.pyplot as plt
import csv
import numpy as np
import datetime
import os
class Stack:
def __init__(self):
self.items=[]
def isEmpty(self):
return self.i... | 43.504241 | 208 | 0.572955 | 44,353 | 0.764694 | 0 | 0 | 0 | 0 | 0 | 0 | 15,048 | 0.259444 |
4dfab55975cccc588661b8464faec98ada96eafa | 11,800 | py | Python | posthog/test/test_update_person_props.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | 58 | 2020-08-26T16:26:18.000Z | 2022-03-30T05:32:23.000Z | posthog/test/test_update_person_props.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | 15 | 2021-11-09T10:49:34.000Z | 2021-11-09T16:11:01.000Z | posthog/test/test_update_person_props.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | 13 | 2020-09-08T13:27:07.000Z | 2022-03-19T17:27:10.000Z | from datetime import datetime
from django.db import connection
from posthog.models import Person
from posthog.test.base import BaseTest
# How we expect this function to behave:
# | call | value exists | call TS is ___ existing TS | previous fn | write/override
# 1| set | no | N/A ... | 42.446043 | 107 | 0.527203 | 10,178 | 0.862542 | 0 | 0 | 0 | 0 | 0 | 0 | 5,221 | 0.442458 |
4dfb10a7a1f3430a5ca4e269077867482eeda87b | 762 | py | Python | setup.py | cclauss/AIF360 | 4fb4e0d3e4ed65c9b4d7a2d5238881a04cc334c1 | [
"Apache-2.0"
] | null | null | null | setup.py | cclauss/AIF360 | 4fb4e0d3e4ed65c9b4d7a2d5238881a04cc334c1 | [
"Apache-2.0"
] | null | null | null | setup.py | cclauss/AIF360 | 4fb4e0d3e4ed65c9b4d7a2d5238881a04cc334c1 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='aif360',
version='0.1.0',
description='IBM AI Fairness 360',
author='aif360 developers',
author_email='[email protected]',
url='https://github.com/IBM/AIF360',
... | 29.307692 | 83 | 0.57874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.370079 |
4dfb5ac8775c4305591fb5eb4b61c6ac65e66c47 | 390 | py | Python | src/examples/customstyle/wow_style/widgetstyle/radiobutton.py | robertkist/qtmodernredux | c7f791a1492ff855f3e4b963b8e9f20c46ba503f | [
"Apache-2.0"
] | 4 | 2021-04-12T19:30:47.000Z | 2022-02-11T18:24:16.000Z | src/examples/customstyle/wow_style/widgetstyle/radiobutton.py | robertkist/qtmodernredux | c7f791a1492ff855f3e4b963b8e9f20c46ba503f | [
"Apache-2.0"
] | null | null | null | src/examples/customstyle/wow_style/widgetstyle/radiobutton.py | robertkist/qtmodernredux | c7f791a1492ff855f3e4b963b8e9f20c46ba503f | [
"Apache-2.0"
] | null | null | null | radiobutton_style = '''
QRadioButton:disabled {
background: transparent;
}
QRadioButton::indicator {
background: palette(dark);
width: 8px;
height: 8px;
border: 3px solid palette(dark);
border-radius: 7px;
}
QRadioButton::indicator:checked {
background: palette(highlight);
}
QRadioButton:... | 18.571429 | 42 | 0.697436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 370 | 0.948718 |
4dfbb4858f95304472fccbca8344763f96bb417e | 1,788 | py | Python | engine.py | kevioconnor/day0 | 6a72bf55dba1021850b810e647c87cb53ef86763 | [
"MIT"
] | null | null | null | engine.py | kevioconnor/day0 | 6a72bf55dba1021850b810e647c87cb53ef86763 | [
"MIT"
] | null | null | null | engine.py | kevioconnor/day0 | 6a72bf55dba1021850b810e647c87cb53ef86763 | [
"MIT"
] | null | null | null | from __future__ import annotations
import lzma, pickle
from typing import TYPE_CHECKING
from numpy import e
from tcod.console import Console
from tcod.map import compute_fov
import exceptions, render_functions
from message_log import MessageLog
if TYPE_CHECKING:
from entity import Actor
from game_map import... | 33.111111 | 117 | 0.657718 | 1,445 | 0.808166 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.009508 |
4dfbb723c6f3d56895498fae876785ec1b7ea406 | 19,132 | py | Python | pysnmp/ERI-DNX-STS1-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/ERI-DNX-STS1-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/ERI-DNX-STS1-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module ERI-DNX-STS1-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ERI-DNX-STS1-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:51:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar ... | 127.546667 | 2,554 | 0.744041 | 224 | 0.011708 | 0 | 0 | 0 | 0 | 0 | 0 | 3,222 | 0.168409 |
4dfc7fdfe3108af912d30eab1c90b722d5d0ec3d | 357 | py | Python | friday/models/__init__.py | alexa-infra/friday | 297f9bfd94e88490d53e460c93727c399b2efcb2 | [
"MIT"
] | 1 | 2019-03-17T08:11:18.000Z | 2019-03-17T08:11:18.000Z | friday/models/__init__.py | alexa-infra/friday | 297f9bfd94e88490d53e460c93727c399b2efcb2 | [
"MIT"
] | null | null | null | friday/models/__init__.py | alexa-infra/friday | 297f9bfd94e88490d53e460c93727c399b2efcb2 | [
"MIT"
] | null | null | null | # flake8: noqa
# pylint: disable=cyclic-import
from .base import db, Model, metadata
from .link import Link
from .user import User
from .event import Event, Repeat
from .bookmark import Bookmark
from .tag import Tag
from .doc import Doc, DocTag
from .recipe import Recipe, RecipeImage
from .pagination import paginate, P... | 27.461538 | 44 | 0.792717 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.12605 |
4dfd222e1995b07a6acae65ab8a9083933dc5471 | 632 | py | Python | nqs_tf/models/ffnn.py | ameya1101/neural-quantum-states | 2ab4f970e4cd7ed2a4ed3ebfdfe66bab396c11af | [
"MIT"
] | null | null | null | nqs_tf/models/ffnn.py | ameya1101/neural-quantum-states | 2ab4f970e4cd7ed2a4ed3ebfdfe66bab396c11af | [
"MIT"
] | null | null | null | nqs_tf/models/ffnn.py | ameya1101/neural-quantum-states | 2ab4f970e4cd7ed2a4ed3ebfdfe66bab396c11af | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense
from activations.activations import tan_sigmoid, exponential, ReLU
class FFNN(Model):
""" Creates a generic Feedforward neural network.
"""
def __init__(self):
super(FFNN, self).__init__()
... | 30.095238 | 67 | 0.683544 | 454 | 0.718354 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.09019 |
15005a003729bb6329d26f74028fc03fd8df4427 | 3,495 | py | Python | examples/other/text_frontend/test_g2p.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | examples/other/text_frontend/test_g2p.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | examples/other/text_frontend/test_g2p.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle 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 appli... | 35.30303 | 77 | 0.640343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,033 | 0.292717 |
15011a09f8a6b93bb0cb155a2b3d2cf4e30e89b7 | 530 | py | Python | data_split.py | DataXujing/ExtremeNet-Pytorch | fc8bf91cb748c144e85d2de271aea117ea54e808 | [
"BSD-3-Clause"
] | 9 | 2020-01-15T05:54:54.000Z | 2021-12-08T06:01:37.000Z | data_split.py | DataXujing/ExtremeNet-Pytorch | fc8bf91cb748c144e85d2de271aea117ea54e808 | [
"BSD-3-Clause"
] | 3 | 2020-12-01T10:26:19.000Z | 2021-01-20T07:51:47.000Z | data_split.py | DataXujing/ExtremeNet-Pytorch | fc8bf91cb748c144e85d2de271aea117ea54e808 | [
"BSD-3-Clause"
] | 3 | 2020-03-31T14:40:08.000Z | 2021-02-22T07:49:34.000Z |
# VOC分割训练集和测试集
import os
import random
import shutil
trainval_percent = 0.1
train_percent = 0.9
imgfilepath = '../myData/JPEGImages' #原数据存放地
total_img = os.listdir(imgfilepath)
sample_num = len(total_img)
trains = random.sample(total_img,int(sample_num*train_percent))
for file in total_img:
if file in trains... | 17.096774 | 86 | 0.711321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.230357 |
15035bfbd1a02ccbee3c988cf9c68e7e783016d5 | 3,104 | py | Python | sciunit/models/examples.py | russelljjarvis/sciun | f8f6ede84299dc700afe94b07ae4e98f87a19116 | [
"MIT"
] | 1 | 2020-05-28T00:35:23.000Z | 2020-05-28T00:35:23.000Z | sciunit/models/examples.py | ChihweiLHBird/sciunit | f5669d165fa505c3a17ac17af3d3c78aafd44ae2 | [
"MIT"
] | 1 | 2020-12-29T04:28:57.000Z | 2020-12-29T04:28:57.000Z | sciunit/models/examples.py | russelljjarvis/sciunit | f8f6ede84299dc700afe94b07ae4e98f87a19116 | [
"MIT"
] | null | null | null | """Example SciUnit model classes."""
import random
from sciunit.models import Model
from sciunit.capabilities import ProducesNumber
from sciunit.utils import class_intern, method_cache
from sciunit.utils import method_memoize # Decorator for caching of capability method results.
from typing import Union
class ConstM... | 30.732673 | 171 | 0.661727 | 2,519 | 0.811534 | 0 | 0 | 849 | 0.273518 | 0 | 0 | 1,417 | 0.456508 |
1504d1248cc2e761c3fb76bb1b97319d6ca7d7fb | 140 | py | Python | semantic/semantic/model/model.py | VladimirSiv/semantic-search-system | 96b6581f191aacb1157b1408b2726e317ddc2c49 | [
"MIT"
] | 1 | 2021-07-01T08:53:46.000Z | 2021-07-01T08:53:46.000Z | semantic/semantic/model/model.py | VladimirSiv/semantic-search-system | 96b6581f191aacb1157b1408b2726e317ddc2c49 | [
"MIT"
] | null | null | null | semantic/semantic/model/model.py | VladimirSiv/semantic-search-system | 96b6581f191aacb1157b1408b2726e317ddc2c49 | [
"MIT"
] | 1 | 2021-12-29T01:18:38.000Z | 2021-12-29T01:18:38.000Z | from sentence_transformers import SentenceTransformer
from semantic.config import CONFIG
model = SentenceTransformer(CONFIG["model_name"])
| 28 | 53 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.085714 |
1504effc59c426c8cdd37004ed34fbfb801a2d4e | 8,619 | py | Python | utils/models.py | miladalipour99/time_series_augmentation | 3c314468df689a70e84ae6b433f9cdf5bae63400 | [
"Apache-2.0"
] | 140 | 2020-04-21T05:01:42.000Z | 2022-03-30T20:03:21.000Z | utils/models.py | miladalipour99/time_series_augmentation | 3c314468df689a70e84ae6b433f9cdf5bae63400 | [
"Apache-2.0"
] | 5 | 2021-06-08T01:43:46.000Z | 2021-12-22T11:37:28.000Z | utils/models.py | miladalipour99/time_series_augmentation | 3c314468df689a70e84ae6b433f9cdf5bae63400 | [
"Apache-2.0"
] | 32 | 2020-04-26T14:00:58.000Z | 2022-03-09T01:25:32.000Z | from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, Flatten, Dropout, Input
from tensorflow.keras.layers import MaxPooling1D, Conv1D
from tensorflow.keras.layers import LSTM, Bidirectional
from tensorflow.keras.layers import BatchNormalization, GlobalAveragePooling1D, Permute, concatena... | 31.922222 | 257 | 0.647987 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,414 | 0.279107 |
1504fcdc48e346e97fc1b686d7489c610536fa41 | 2,468 | py | Python | ai_flow/test/util/test_sqlalchemy_db.py | flink-extended/ai-flow | d1427a243097d94d77fedbe1966500ae26975a13 | [
"Apache-2.0"
] | 79 | 2021-10-15T07:32:27.000Z | 2022-03-28T04:10:19.000Z | ai_flow/test/util/test_sqlalchemy_db.py | flink-extended/ai-flow | d1427a243097d94d77fedbe1966500ae26975a13 | [
"Apache-2.0"
] | 153 | 2021-10-15T05:23:46.000Z | 2022-02-23T06:07:10.000Z | ai_flow/test/util/test_sqlalchemy_db.py | flink-extended/ai-flow | d1427a243097d94d77fedbe1966500ae26975a13 | [
"Apache-2.0"
] | 23 | 2021-10-15T02:36:37.000Z | 2022-03-17T02:59:27.000Z | # Copyright 2022 The AI Flow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 29.73494 | 67 | 0.724878 | 1,111 | 0.450162 | 0 | 0 | 0 | 0 | 0 | 0 | 643 | 0.260535 |
1506feffa85f0e03250b9a11fac052405432fbe0 | 628 | py | Python | test.py | blodzbyte/isEven | 18e42cfdad052d34318900fdd91167a533b52210 | [
"MIT"
] | 44 | 2020-03-11T16:44:41.000Z | 2022-03-16T07:55:24.000Z | test.py | blodzbyte/isEven | 18e42cfdad052d34318900fdd91167a533b52210 | [
"MIT"
] | 9 | 2020-03-11T21:07:01.000Z | 2021-07-08T18:49:23.000Z | test.py | blodzbyte/isEven | 18e42cfdad052d34318900fdd91167a533b52210 | [
"MIT"
] | 18 | 2020-03-11T20:03:50.000Z | 2021-07-22T21:40:00.000Z | #!/usr/bin/env python3
from isEven import isEven
def testRange(min, max, evens):
print('Testing [{},{}] {}...'.format(min, max, 'evens' if evens else 'odds'))
for i in range(min, max, 2):
i = i if evens else i - 1
result = isEven(i)
if(not result and evens):
raise Exception('Test faile... | 29.904762 | 80 | 0.517516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.234076 |
15073013e66266b93b368bf7d20e3350da16c0c6 | 1,139 | py | Python | comm.py | thedognexttothetrashcan/spi_tmall | 021dc9a6a23841373000a5f09ca300abd376ad15 | [
"Apache-2.0"
] | null | null | null | comm.py | thedognexttothetrashcan/spi_tmall | 021dc9a6a23841373000a5f09ca300abd376ad15 | [
"Apache-2.0"
] | null | null | null | comm.py | thedognexttothetrashcan/spi_tmall | 021dc9a6a23841373000a5f09ca300abd376ad15 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# encoding=utf-8
import os
import datetime,time
from selenium import webdriver
import config
import threading
import numpy as np
def writelog(msg,log):
nt=datetime.datetime.now().strftime('%Y-%m-%d %H-%M-%S')
text="[%s] %s " % (nt,msg)
os.system("echo %s >> %s" % (text.encode('utf8'),l... | 21.903846 | 73 | 0.637401 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.108867 |
15077392ea3f2519132c06a08d94b11524ea1c19 | 1,584 | py | Python | sherlockpipe/objectinfo/preparer/LightcurveBuilder.py | LuisCerdenoMota/SHERLOCK | 5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1 | [
"MIT"
] | null | null | null | sherlockpipe/objectinfo/preparer/LightcurveBuilder.py | LuisCerdenoMota/SHERLOCK | 5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1 | [
"MIT"
] | null | null | null | sherlockpipe/objectinfo/preparer/LightcurveBuilder.py | LuisCerdenoMota/SHERLOCK | 5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1 | [
"MIT"
] | null | null | null | import re
from abc import ABC, abstractmethod
from sherlockpipe.star.EpicStarCatalog import EpicStarCatalog
from sherlockpipe.star.KicStarCatalog import KicStarCatalog
from sherlockpipe.star.TicStarCatalog import TicStarCatalog
class LightcurveBuilder(ABC):
OBJECT_ID_REGEX = "^(KIC|TIC|EPIC)[-_ ]([0-9]+)$"
NU... | 38.634146 | 91 | 0.674874 | 1,354 | 0.854798 | 0 | 0 | 76 | 0.04798 | 0 | 0 | 130 | 0.082071 |