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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5b24576277ff90503d0b77ea45447ed2cd207807 | 3,443 | py | Python | add_label.py | Mause/pull_requests | 6c3aa3feb8ec775c184eaa70d09b944ba753125b | [
"MIT"
] | null | null | null | add_label.py | Mause/pull_requests | 6c3aa3feb8ec775c184eaa70d09b944ba753125b | [
"MIT"
] | 39 | 2021-02-10T05:59:09.000Z | 2022-03-18T07:21:29.000Z | add_label.py | Mause/pull_requests | 6c3aa3feb8ec775c184eaa70d09b944ba753125b | [
"MIT"
] | null | null | null | from asyncio import get_event_loop
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union
from aiohttp import ClientSession
from pydantic import BaseModel
from sgqlc.endpoint.base import BaseEndpoint
from sgqlc.operation import Operation
from sgqlc_schemas.github.schema import (
Ad... | 27.544 | 88 | 0.652338 | 1,239 | 0.359861 | 0 | 0 | 926 | 0.268951 | 2,179 | 0.632878 | 249 | 0.072321 |
5b24e7eb961669dcd20e501b760778d98a071d8b | 851 | py | Python | DataEngineering/Chapter7/7.6/financialdata/financialdata/scheduler.py | yz830620/FinMindBook | 1ffda3541eb73e6d4cb47798bf9d28b66a49939b | [
"MIT"
] | 5 | 2021-12-13T12:03:22.000Z | 2022-03-30T08:51:19.000Z | DataEngineering/Chapter7/7.6/financialdata/financialdata/scheduler.py | yz830620/FinMindBook | 1ffda3541eb73e6d4cb47798bf9d28b66a49939b | [
"MIT"
] | 1 | 2022-01-26T05:42:56.000Z | 2022-03-12T08:24:57.000Z | DataEngineering/Chapter7/7.6/financialdata/financialdata/scheduler.py | yz830620/FinMindBook | 1ffda3541eb73e6d4cb47798bf9d28b66a49939b | [
"MIT"
] | 6 | 2021-12-14T04:32:01.000Z | 2022-03-31T17:15:11.000Z | import time
import datetime
from apscheduler.schedulers.background import BackgroundScheduler
from financialdata.producer import Update
from loguru import logger
def sent_crawler_task():
# 將此段,改成發送任務的程式碼
# logger.info(f"sent_crawler_task {dataset}")
today = datetime.datetime.today().date().strftime("%Y-%... | 24.314286 | 74 | 0.679201 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.327311 |
d289828efb378099de1d3d6011a5a3e50df04330 | 2,692 | py | Python | openmc_plasma_source/plotting/plot_tokamak_source.py | mdfaisal98/openmc-plasma-source | e55d61ce6d641f4d382ce298b6f6335cd46bc507 | [
"MIT"
] | null | null | null | openmc_plasma_source/plotting/plot_tokamak_source.py | mdfaisal98/openmc-plasma-source | e55d61ce6d641f4d382ce298b6f6335cd46bc507 | [
"MIT"
] | null | null | null | openmc_plasma_source/plotting/plot_tokamak_source.py | mdfaisal98/openmc-plasma-source | e55d61ce6d641f4d382ce298b6f6335cd46bc507 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
def scatter_tokamak_source(source, quantity=None, **kwargs):
"""Create a 2D scatter plot of the tokamak source.
See https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.scatter.html
for more arguments.
Args:
s... | 33.65 | 103 | 0.658247 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,176 | 0.43685 |
d28a47045a9d4366365cea9cca22f372e578a38f | 620 | py | Python | Exercício feitos pela primeira vez/ex046.py | Claayton/pythonExerciciosLinux | 696cdb16983638418bd0d0d4fe44dc72662b9c97 | [
"MIT"
] | 1 | 2021-01-23T15:43:34.000Z | 2021-01-23T15:43:34.000Z | Exercício feitos pela primeira vez/ex046.py | Claayton/pythonExerciciosLinux | 696cdb16983638418bd0d0d4fe44dc72662b9c97 | [
"MIT"
] | null | null | null | Exercício feitos pela primeira vez/ex046.py | Claayton/pythonExerciciosLinux | 696cdb16983638418bd0d0d4fe44dc72662b9c97 | [
"MIT"
] | null | null | null | #Exercício046
from time import sleep
import emoji
print('\033[32mCONTAGEM REGRESSIVA PARA O ANO NOVO:\033[m')
sleep(1)
for c in range(10, 0 - 1, -1):#repete os números de 10 até o 0
print(c)
sleep(1)
print(emoji.emojize("\033[31m:boom::boom::boom:KABUM:boom::boom::boom:", use_aliases=True))
print(emoji.emojize(... | 47.692308 | 104 | 0.720968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.547352 |
d28ad97667405531526925b2fe6abf6f466b39ff | 10,989 | py | Python | bmds/bmds2/logic/rules.py | shapiromatron/bmds | 57562858f3c45e9b9ec23e1c229a8a1de0ea4a70 | [
"MIT"
] | 2 | 2017-05-01T20:00:26.000Z | 2019-07-09T16:42:25.000Z | bmds/bmds2/logic/rules.py | shapiromatron/bmds | 57562858f3c45e9b9ec23e1c229a8a1de0ea4a70 | [
"MIT"
] | 20 | 2016-11-23T21:30:22.000Z | 2022-02-28T15:42:36.000Z | bmds/bmds2/logic/rules.py | shapiromatron/bmds | 57562858f3c45e9b9ec23e1c229a8a1de0ea4a70 | [
"MIT"
] | 2 | 2016-06-28T20:32:00.000Z | 2017-02-23T20:30:24.000Z | import abc
import math
from ... import constants
class Rule(abc.ABC):
def __init__(self, failure_bin, **kwargs):
self.failure_bin = failure_bin
self.enabled = kwargs.get("enabled", True)
self.threshold = kwargs.get("threshold", float("nan"))
self.rule_name = kwargs.get("rule_name"... | 31.760116 | 101 | 0.628629 | 10,877 | 0.989448 | 0 | 0 | 388 | 0.035295 | 0 | 0 | 2,341 | 0.212954 |
d28b5d6c386f989e7b581b7ea7ba92a93a7470b3 | 1,959 | py | Python | nets/static/conv_rnn_convT.py | MaximilienLC/nevo | c701a1202bc18d89a622472918733bf78ba5e304 | [
"Apache-2.0"
] | null | null | null | nets/static/conv_rnn_convT.py | MaximilienLC/nevo | c701a1202bc18d89a622472918733bf78ba5e304 | [
"Apache-2.0"
] | null | null | null | nets/static/conv_rnn_convT.py | MaximilienLC/nevo | c701a1202bc18d89a622472918733bf78ba5e304 | [
"Apache-2.0"
] | 1 | 2022-03-31T20:44:09.000Z | 2022-03-31T20:44:09.000Z | # Copyright 2022 Maximilien Le Clei.
#
# 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 w... | 26.472973 | 74 | 0.598264 | 1,294 | 0.660541 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.293517 |
d28b646d833333371908e74411b14fa7d1f681ca | 3,306 | py | Python | ors2bryton.py | andbue/ors2bryton | 7a843cbf2e4d1fc4ca85497cb23919431d8d3843 | [
"Unlicense"
] | null | null | null | ors2bryton.py | andbue/ors2bryton | 7a843cbf2e4d1fc4ca85497cb23919431d8d3843 | [
"Unlicense"
] | 1 | 2021-02-02T13:11:23.000Z | 2021-09-10T16:38:16.000Z | ors2bryton.py | andbue/ors2bryton | 7a843cbf2e4d1fc4ca85497cb23919431d8d3843 | [
"Unlicense"
] | null | null | null | from sys import argv
from os.path import splitext
from lxml import etree
from struct import pack
def main():
print(argv)
gpx = argv[1]
"""
bryton:
1: go ahead
2: right
3: left
4: slight right
5: slight left
6: close right
7: close left
... | 31.485714 | 151 | 0.468845 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,624 | 0.491228 |
d28b98aeee69dc1cdd515a34f7751e391f42ef74 | 5,022 | py | Python | src/main/python/smart/smartplots3_run.py | cday97/beam | 7e1ab50eecaefafd04daab360f8b12bc7cab559b | [
"BSD-3-Clause-LBNL"
] | 123 | 2017-04-06T20:17:19.000Z | 2022-03-02T13:42:15.000Z | src/main/python/smart/smartplots3_run.py | cday97/beam | 7e1ab50eecaefafd04daab360f8b12bc7cab559b | [
"BSD-3-Clause-LBNL"
] | 2,676 | 2017-04-26T20:27:27.000Z | 2022-03-31T16:39:53.000Z | src/main/python/smart/smartplots3_run.py | cday97/beam | 7e1ab50eecaefafd04daab360f8b12bc7cab559b | [
"BSD-3-Clause-LBNL"
] | 60 | 2017-04-06T20:14:32.000Z | 2022-03-30T20:10:53.000Z | import pandas as pd
import smartplots3_setup
def createSetup(name,expansion_factor,percapita_factor,plot_size,settings):
plt_setup_smart={
'name': name,
'expansion_factor':expansion_factor,
'percapita_factor':percapita_factor,
'scenarios_itr': [],
'scenarios_id':[],
... | 50.727273 | 110 | 0.788331 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,654 | 0.329351 |
d28c4ad642d7e25e12003d4150c60dd4429d8299 | 50 | py | Python | genrl/deep/agents/sac/__init__.py | ajaysub110/JigglypuffRL | 083fd26d05b7eac018e6db7d32c4be4587461766 | [
"MIT"
] | null | null | null | genrl/deep/agents/sac/__init__.py | ajaysub110/JigglypuffRL | 083fd26d05b7eac018e6db7d32c4be4587461766 | [
"MIT"
] | null | null | null | genrl/deep/agents/sac/__init__.py | ajaysub110/JigglypuffRL | 083fd26d05b7eac018e6db7d32c4be4587461766 | [
"MIT"
] | null | null | null | from genrl.deep.agents.sac.sac import SAC # noqa
| 25 | 49 | 0.76 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.12 |
d28c64bd9262b8b74070c47f2ceb3b8061a39ebe | 238 | py | Python | contrib/libs/cxxsupp/libsan/generate_symbolizer.py | HeyLey/catboost | f472aed90604ebe727537d9d4a37147985e10ec2 | [
"Apache-2.0"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | contrib/libs/cxxsupp/libsan/generate_symbolizer.py | HeyLey/catboost | f472aed90604ebe727537d9d4a37147985e10ec2 | [
"Apache-2.0"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | contrib/libs/cxxsupp/libsan/generate_symbolizer.py | HeyLey/catboost | f472aed90604ebe727537d9d4a37147985e10ec2 | [
"Apache-2.0"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | import os
import sys
def main():
print 'const char* ya_get_symbolizer_gen() {'
print ' return "{}";'.format(os.path.join(os.path.dirname(sys.argv[1]), 'llvm-symbolizer'))
print '}'
if __name__ == '__main__':
main()
| 18.307692 | 98 | 0.621849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.365546 |
d28c678a957ea394e636e4d4799124a81070a2a0 | 775 | py | Python | scripts/scheduler/scheduler.py | OCHA-DAP/hdx-scraper-unosat-flood-portal | 80b0bcd404993e4bd1dae442f794c9f86b6d5328 | [
"MIT"
] | 1 | 2016-07-22T13:32:54.000Z | 2016-07-22T13:32:54.000Z | scripts/scheduler/scheduler.py | OCHA-DAP/hdx-scraper-unosat-flood-portal | 80b0bcd404993e4bd1dae442f794c9f86b6d5328 | [
"MIT"
] | 21 | 2015-07-08T21:30:32.000Z | 2015-08-27T17:52:24.000Z | scripts/scheduler/scheduler.py | OCHA-DAP/hdxscraper-unosat-flood-portal | 80b0bcd404993e4bd1dae442f794c9f86b6d5328 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import time
import schedule
dir = os.path.split(os.path.split(os.path.realpath(__file__))[0])[0]
sys.path.append(dir)
from utilities.prompt_format import item
from unosat_flood_portal_collect import collect as Collect
def Wrapper(patch=False):
'''Wrap... | 16.145833 | 68 | 0.68129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.264516 |
d28c6e3b8a94c187af7ae1ba6acb241b56167d9b | 1,916 | py | Python | grAdapt/sampling/initializer/Vertices.py | mkduong-ai/grAdapt | 94c2659b0f6ff9a2984a9dc58e3c83213313bf90 | [
"Apache-2.0"
] | 25 | 2020-11-13T05:57:01.000Z | 2021-06-18T11:16:03.000Z | grAdapt/sampling/initializer/Vertices.py | mkduong-ai/grAdapt | 94c2659b0f6ff9a2984a9dc58e3c83213313bf90 | [
"Apache-2.0"
] | null | null | null | grAdapt/sampling/initializer/Vertices.py | mkduong-ai/grAdapt | 94c2659b0f6ff9a2984a9dc58e3c83213313bf90 | [
"Apache-2.0"
] | null | null | null | # python
# import warnings
# Third party imports
import numpy as np
# grAdapt
from .base import Initial
from grAdapt.utils.sampling import sample_corner_bounds
class Vertices(Initial):
"""
Samples vertices if n_evals >= 2 ** len(bounds).
Else low discrepancy sequences are sampled.
"""
def __ini... | 34.214286 | 97 | 0.581942 | 1,751 | 0.913883 | 0 | 0 | 0 | 0 | 0 | 0 | 906 | 0.47286 |
d28e9a15ec55f39d2fbe7a6ba1ac7924e04991a1 | 6,456 | py | Python | thirdweb/modules/base.py | princetonwong/python-sdk | f35181d97620e29d055498fca75f3702f3bb2449 | [
"Apache-2.0"
] | 1 | 2022-02-18T16:59:12.000Z | 2022-02-18T16:59:12.000Z | thirdweb/modules/base.py | princetonwong/python-sdk | f35181d97620e29d055498fca75f3702f3bb2449 | [
"Apache-2.0"
] | null | null | null | thirdweb/modules/base.py | princetonwong/python-sdk | f35181d97620e29d055498fca75f3702f3bb2449 | [
"Apache-2.0"
] | null | null | null | """Base Module."""
from abc import ABC, abstractmethod
from typing import Callable, Dict, List, Optional, Union, cast
from eth_account.account import LocalAccount
from thirdweb_web3 import Web3
from thirdweb_web3.types import TxReceipt
from zero_ex.contract_wrappers import TxParams
import json
from ..abi.coin import ... | 33.278351 | 95 | 0.623296 | 5,650 | 0.875155 | 0 | 0 | 73 | 0.011307 | 0 | 0 | 1,068 | 0.165428 |
d291c41a3b15e20796ea46ca106a1298d83274c2 | 17,356 | py | Python | data_util.py | shiyu-wangbyte/leadopt | ef289ab349a19ba1f8aa581638ef7e8e3810cb41 | [
"Apache-2.0"
] | null | null | null | data_util.py | shiyu-wangbyte/leadopt | ef289ab349a19ba1f8aa581638ef7e8e3810cb41 | [
"Apache-2.0"
] | null | null | null | data_util.py | shiyu-wangbyte/leadopt | ef289ab349a19ba1f8aa581638ef7e8e3810cb41 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Jacob Durrant
# 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, sof... | 33.441233 | 93 | 0.589191 | 13,031 | 0.750807 | 0 | 0 | 0 | 0 | 0 | 0 | 5,499 | 0.316836 |
d291cc8632d543ebd26c04ae26559da840755d11 | 4,181 | py | Python | add_socket_response_event.py | Kur0den/kur0bot | d36722617bb4094bdf636779b20a799f9bd3b419 | [
"MIT"
] | 1 | 2021-09-09T11:17:17.000Z | 2021-09-09T11:17:17.000Z | add_socket_response_event.py | Kur0den/kur0bot | d36722617bb4094bdf636779b20a799f9bd3b419 | [
"MIT"
] | 1 | 2021-09-18T15:46:59.000Z | 2021-09-18T15:46:59.000Z | add_socket_response_event.py | Kur0den/kur0bot | d36722617bb4094bdf636779b20a799f9bd3b419 | [
"MIT"
] | 1 | 2021-09-09T02:34:17.000Z | 2021-09-09T02:34:17.000Z | from discord.gateway import DiscordWebSocket, utils, _log, KeepAliveHandler, ReconnectWebSocket
async def received_message(self, msg, /):
if type(msg) is bytes:
self._buffer.extend(msg)
if len(msg) < 4 or msg[-4:] != b'\x00\x00\xff\xff':
return
msg = self._zlib.decompre... | 32.664063 | 100 | 0.566611 | 0 | 0 | 0 | 0 | 0 | 0 | 4,022 | 0.961971 | 758 | 0.181296 |
d2936347651280722332cf187a2ad771feb61ab8 | 2,207 | py | Python | Image_detection_codes/Keras_training/test2.py | pasadyash/CitizenServiceApp | 01a0389d70624f04f6df25c1eb842b3bbce652da | [
"MIT"
] | null | null | null | Image_detection_codes/Keras_training/test2.py | pasadyash/CitizenServiceApp | 01a0389d70624f04f6df25c1eb842b3bbce652da | [
"MIT"
] | null | null | null | Image_detection_codes/Keras_training/test2.py | pasadyash/CitizenServiceApp | 01a0389d70624f04f6df25c1eb842b3bbce652da | [
"MIT"
] | null | null | null | import numpy as np
np.random.seed(123) # for reproducibility
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.utils import np_utils
from dataset_pothole import pothole
from keras.models import model_from_j... | 27.5875 | 68 | 0.7372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 573 | 0.259628 |
d2945eb56ca24287c1bd0834d603839aee1fedac | 2,094 | py | Python | platform/web/api/device/models.py | JMSHDev/regent.dev | e4cedf04dd241ad00012735b543ee3447a8da8a2 | [
"Apache-2.0"
] | 1 | 2021-12-23T14:06:08.000Z | 2021-12-23T14:06:08.000Z | platform/web/api/device/models.py | JMSHDev/regent.dev | e4cedf04dd241ad00012735b543ee3447a8da8a2 | [
"Apache-2.0"
] | null | null | null | platform/web/api/device/models.py | JMSHDev/regent.dev | e4cedf04dd241ad00012735b543ee3447a8da8a2 | [
"Apache-2.0"
] | 1 | 2021-06-28T22:17:28.000Z | 2021-06-28T22:17:28.000Z | import hashlib
import random
import string
import logging
from django.db import models
LOG = logging.getLogger(__name__)
class Device(models.Model):
name = models.CharField(max_length=50, unique=True)
customer = models.CharField(max_length=50)
agent_status = models.CharField(max_length=10, default="off... | 34.327869 | 108 | 0.722063 | 1,958 | 0.935053 | 0 | 0 | 346 | 0.165234 | 0 | 0 | 94 | 0.04489 |
d294cefa293f8d84c96bacb7467d9cfe88246372 | 147 | py | Python | armageddon/__init__.py | acse-ns1321/asteroid-impact-simulator | 986c12ff1276e5d0547a4f760e1d2cb90fe4ba11 | [
"MIT"
] | null | null | null | armageddon/__init__.py | acse-ns1321/asteroid-impact-simulator | 986c12ff1276e5d0547a4f760e1d2cb90fe4ba11 | [
"MIT"
] | null | null | null | armageddon/__init__.py | acse-ns1321/asteroid-impact-simulator | 986c12ff1276e5d0547a4f760e1d2cb90fe4ba11 | [
"MIT"
] | null | null | null | # flake8:NOQA
"""Python asteroid airburst calculator"""
from .solver import *
from .damage import *
from .locator import *
from .mapping import *
| 18.375 | 41 | 0.734694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.367347 |
d294d257d8cdf140b519b1d91dd4b68639347768 | 8,235 | py | Python | proxy_server/backend_services.py | lmanzurv/django_proxy_server | 20304829ef1ddcbb281e1373d308e5fa826fcd39 | [
"Apache-2.0"
] | 11 | 2015-07-18T02:23:43.000Z | 2021-11-15T11:43:21.000Z | proxy_server/backend_services.py | lmanzurv/django_proxy_server | 20304829ef1ddcbb281e1373d308e5fa826fcd39 | [
"Apache-2.0"
] | null | null | null | proxy_server/backend_services.py | lmanzurv/django_proxy_server | 20304829ef1ddcbb281e1373d308e5fa826fcd39 | [
"Apache-2.0"
] | 5 | 2015-02-24T15:37:36.000Z | 2021-10-10T16:42:22.000Z | from django.contrib.auth import SESSION_KEY
from django.core.cache import cache
from django.conf import settings
from django.http import HttpResponse, HttpResponseServerError
from proxy_server.response import AJAX_REQUEST
import httplib, json, proxy_server
def invoke_backend_service(method, function_path, json_data=di... | 37.094595 | 131 | 0.600364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 0.097146 |
d294ed611a40faaaff54b7db50b237d6a8c768e7 | 1,645 | py | Python | py/trawl_analyzer/TrawlSensorsDB_model.py | nwfsc-fram/pyFieldSoftware | 477ba162b66ede2263693cda8c5a51d27eaa3b89 | [
"MIT"
] | null | null | null | py/trawl_analyzer/TrawlSensorsDB_model.py | nwfsc-fram/pyFieldSoftware | 477ba162b66ede2263693cda8c5a51d27eaa3b89 | [
"MIT"
] | 176 | 2019-11-22T17:44:55.000Z | 2021-10-20T23:40:03.000Z | py/trawl_analyzer/TrawlSensorsDB_model.py | nwfsc-fram/pyFieldSoftware | 477ba162b66ede2263693cda8c5a51d27eaa3b89 | [
"MIT"
] | 1 | 2021-05-07T01:06:32.000Z | 2021-05-07T01:06:32.000Z | # from peewee import *
from playhouse.apsw_ext import TextField, IntegerField, PrimaryKeyField
from py.trawl_analyzer.Settings import SensorsModel as BaseModel
# database = SqliteDatabase('data\clean_sensors.db', **{})
class UnknownField(object):
def __init__(self, *_, **__): pass
class EnviroNetRawFiles(Base... | 38.255814 | 83 | 0.764134 | 1,413 | 0.858967 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.243161 |
d29572229651c45d1ad6870cb96992f7e8dc3c59 | 9,754 | py | Python | src/statemachine.py | CEOAI-ABM/SIR-Modelling | 02ab89d64040b09ddce820a1ecbbc0cfc9b13f29 | [
"MIT"
] | 1 | 2021-06-13T11:50:08.000Z | 2021-06-13T11:50:08.000Z | src/statemachine.py | CEOAI-ABM/SIR-Modelling | 02ab89d64040b09ddce820a1ecbbc0cfc9b13f29 | [
"MIT"
] | null | null | null | src/statemachine.py | CEOAI-ABM/SIR-Modelling | 02ab89d64040b09ddce820a1ecbbc0cfc9b13f29 | [
"MIT"
] | null | null | null | import transitions
from functools import partial
# from transitions import transitions.Machine
# TODO: whenever there is a state chage store the following
# (DAY,function_called) -> Stored for every person for agent status, state and Testing state
class AgentStatusA(object):
"""The Statemachine of the agent"""
stat... | 28.190751 | 159 | 0.705454 | 9,491 | 0.973037 | 0 | 0 | 0 | 0 | 0 | 0 | 2,720 | 0.27886 |
d295e921737512140cabce35cb8da35469a21633 | 304 | py | Python | hard-gists/5898352/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/5898352/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/5898352/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | import os
import scipy.io.wavfile as wav
# install lame
# install bleeding edge scipy (needs new cython)
fname = 'XC135672-Red-winged\ Blackbird1301.mp3'
oname = 'temp.wav'
cmd = 'lame --decode {0} {1}'.format( fname,oname )
os.system(cmd)
data = wav.read(oname)
# your code goes here
print len(data[1])
| 25.333333 | 51 | 0.720395 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.513158 |
d29646348f53744d285a4ab6a2096da4edb810a8 | 2,612 | py | Python | examples/home-assistant/custom_components/evacalor/config_flow.py | fredericvl/pyevacalor | 37a3d96f867efffdec4457f11119977e6e887b8a | [
"Apache-2.0"
] | 2 | 2020-10-25T15:42:03.000Z | 2021-01-06T10:25:58.000Z | examples/home-assistant/custom_components/evacalor/config_flow.py | fredericvl/pyevacalor | 37a3d96f867efffdec4457f11119977e6e887b8a | [
"Apache-2.0"
] | 2 | 2021-01-06T09:24:58.000Z | 2021-02-13T21:12:02.000Z | examples/home-assistant/custom_components/evacalor/config_flow.py | fredericvl/pyevacalor | 37a3d96f867efffdec4457f11119977e6e887b8a | [
"Apache-2.0"
] | null | null | null | """Config flow for Eva Calor."""
from collections import OrderedDict
import logging
import uuid
from pyevacalor import ( # pylint: disable=redefined-builtin
ConnectionError,
Error as EvaCalorError,
UnauthorizedError,
evacalor,
)
import voluptuous as vol
from homeassistant import config_entries
from h... | 31.095238 | 87 | 0.616003 | 1,976 | 0.756508 | 0 | 0 | 0 | 0 | 1,520 | 0.58193 | 366 | 0.140123 |
d2965c42b4aa6f52d9c6e78125bcdb00950f4d9f | 6,608 | py | Python | library_samples/Python3/ocs_sample_library_preview/Dataview/Dataview.py | osi-awoodall/OSI-Samples-OCS | 1995ccda20e4fe2ae66f3b67afbc1127d638a6fc | [
"Apache-2.0"
] | null | null | null | library_samples/Python3/ocs_sample_library_preview/Dataview/Dataview.py | osi-awoodall/OSI-Samples-OCS | 1995ccda20e4fe2ae66f3b67afbc1127d638a6fc | [
"Apache-2.0"
] | null | null | null | library_samples/Python3/ocs_sample_library_preview/Dataview/Dataview.py | osi-awoodall/OSI-Samples-OCS | 1995ccda20e4fe2ae66f3b67afbc1127d638a6fc | [
"Apache-2.0"
] | null | null | null | # Dataview.py
#
import json
from .DataviewQuery import DataviewQuery
from .DataviewMapping import DataviewMapping
from .DataviewIndexConfig import DataviewIndexConfig
from .DataviewGroupRule import DataviewGroupRule
class Dataview(object):
"""
Dataview definition
"""
def __init__(
self,
... | 25.513514 | 87 | 0.575969 | 6,389 | 0.966858 | 0 | 0 | 4,111 | 0.622125 | 0 | 0 | 2,322 | 0.351392 |
d296cec19b3a1e77f406394741a977e6895ca59f | 392 | py | Python | PYTHON_Code/TestGUI.py | ROBO-BEV/BARISTO | 0e87d79966efc111cc38c1a1cf22e2d8ee18c350 | [
"CC-BY-3.0",
"MIT"
] | 8 | 2018-03-12T04:52:28.000Z | 2021-05-19T19:37:01.000Z | PYTHON_Code/TestGUI.py | ROBO-BEV/BARISTO | 0e87d79966efc111cc38c1a1cf22e2d8ee18c350 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | PYTHON_Code/TestGUI.py | ROBO-BEV/BARISTO | 0e87d79966efc111cc38c1a1cf22e2d8ee18c350 | [
"CC-BY-3.0",
"MIT"
] | 1 | 2018-01-30T09:43:36.000Z | 2018-01-30T09:43:36.000Z | from tkinter import *
window0 = Tk()
window0.geometry('960x540')
#tk.iconbitmap(default='ROBO_BEV_LOGO.ico')
window0.title("BARISTO")
photo = PhotoImage(file="Page1.png")
widget = Label(window0, image=photo)
widget.photo = photo
widget = Label(window0, text="10", fg="white", font=("Source Sans Pro",50))
#widget = L... | 19.6 | 75 | 0.709184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.372449 |
d297adc463629ff967a82e11d0f42bb013364af4 | 2,354 | py | Python | handlers/play.py | AftahBagas/AlphaMusik | c8c3804a26ad393b6f666fecd4d3464727ce2544 | [
"MIT"
] | null | null | null | handlers/play.py | AftahBagas/AlphaMusik | c8c3804a26ad393b6f666fecd4d3464727ce2544 | [
"MIT"
] | null | null | null | handlers/play.py | AftahBagas/AlphaMusik | c8c3804a26ad393b6f666fecd4d3464727ce2544 | [
"MIT"
] | 1 | 2021-06-22T08:08:43.000Z | 2021-06-22T08:08:43.000Z | from os import path
from telethon import Client
from telethon.types import Message, Voice
from callsmusic import callsmusic, queues
import converter
from downloaders import youtube
from config import BOT_NAME as bn, DURATION_LIMIT
from helpers.filters import command, other_filters
from helpers.decorators import err... | 34.115942 | 116 | 0.658454 | 0 | 0 | 0 | 0 | 1,880 | 0.793249 | 1,819 | 0.767511 | 360 | 0.151899 |
d2992c7176a1b65595e782d6603b030801317e72 | 2,662 | py | Python | Sindri/Properties.py | mrcsbrn/TCC_software | 17a5335aed17d4740c3bbd0ef828b0fc5dcea1da | [
"MIT"
] | 11 | 2019-10-17T02:01:51.000Z | 2022-03-17T17:39:34.000Z | Sindri/Properties.py | mrcsbrn/TCC_software | 17a5335aed17d4740c3bbd0ef828b0fc5dcea1da | [
"MIT"
] | 2 | 2019-07-25T22:16:16.000Z | 2020-03-28T01:59:59.000Z | Sindri/Properties.py | mrcsbrn/TCC_software | 17a5335aed17d4740c3bbd0ef828b0fc5dcea1da | [
"MIT"
] | 5 | 2019-07-15T18:19:36.000Z | 2021-12-24T08:06:24.000Z | from __future__ import annotations
from constants import DBL_EPSILON
class DeltaProp(object):
def __init__(self, cp: float, h: float, s: float, g: float, u: float, a: float):
self.Cp = cp
self.H = h
self.S = s
self.G = g
self.U = u
self.A = a
def subtract(self... | 24.422018 | 87 | 0.531555 | 2,583 | 0.970323 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.038693 |
d29a434df89a3b05d94919b3e887c98d5f6aef26 | 8,240 | py | Python | algorithms/randcommuns.py | eXascaleInfolab/clubmark | 5c329a5308a39d53f77db790a31d621245a7c693 | [
"Apache-2.0"
] | 14 | 2018-11-20T08:32:30.000Z | 2022-03-14T02:46:35.000Z | algorithms/randcommuns.py | eXascaleInfolab/clubmark | 5c329a5308a39d53f77db790a31d621245a7c693 | [
"Apache-2.0"
] | null | null | null | algorithms/randcommuns.py | eXascaleInfolab/clubmark | 5c329a5308a39d53f77db790a31d621245a7c693 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:39:00.000Z | 2019-05-22T08:39:00.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:Brief: Produces rand disjoint communities (clusters) for the given network with sizes similar in the ground truth.
:Description:
Takes number of the resulting communities and their sizes from the specified groundtruth (actually any sample
of the community structure, ... | 40.392157 | 116 | 0.701942 | 884 | 0.107282 | 0 | 0 | 0 | 0 | 0 | 0 | 4,703 | 0.570752 |
d29d169f662bf82cfbfb0172089e264d38e0b3c3 | 17,578 | py | Python | utils/save_atten.py | xiaomengyc/SPG | 0006659c5be4c3451f8c9a188f1e91e9ff682fa9 | [
"MIT"
] | 152 | 2018-07-25T01:55:33.000Z | 2022-02-02T15:16:09.000Z | utils/save_atten.py | xiaomengyc/SPG | 0006659c5be4c3451f8c9a188f1e91e9ff682fa9 | [
"MIT"
] | 15 | 2018-09-13T06:35:16.000Z | 2021-08-05T06:23:16.000Z | utils/save_atten.py | xiaomengyc/SPG | 0006659c5be4c3451f8c9a188f1e91e9ff682fa9 | [
"MIT"
] | 27 | 2018-07-26T03:47:55.000Z | 2021-04-05T08:06:41.000Z | import numpy as np
import cv2
import os
import torch
import os
import time
from torchvision import models, transforms
from torch.utils.data import DataLoader
from torch.optim import SGD
from torch.autograd import Variable
idx2catename = {'voc20': ['aeroplane','bicycle','bird','boat','bottle','bus','car','cat','chair',... | 42.458937 | 131 | 0.529867 | 15,973 | 0.908693 | 0 | 0 | 0 | 0 | 0 | 0 | 7,965 | 0.453123 |
d29d26d475e134ec64d93b0a0c67aac73b58249e | 453 | py | Python | integration/config/service_names.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | null | null | null | integration/config/service_names.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | 1 | 2020-03-03T01:46:46.000Z | 2020-03-03T01:46:46.000Z | integration/config/service_names.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | null | null | null | COGNITO = "Cognito"
SERVERLESS_REPO = "ServerlessRepo"
MODE = "Mode"
XRAY = "XRay"
LAYERS = "Layers"
HTTP_API = "HttpApi"
IOT = "IoT"
CODE_DEPLOY = "CodeDeploy"
ARM = "ARM"
GATEWAY_RESPONSES = "GatewayResponses"
MSK = "MSK"
KMS = "KMS"
CWE_CWS_DLQ = "CweCwsDlq"
CODE_SIGN = "CodeSign"
MQ = "MQ"
USAGE_PLANS = "UsagePlans... | 19.695652 | 38 | 0.708609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.439294 |
d29e1b642a0cdbe5b86c0d36bda20ce0cce1d92a | 2,373 | py | Python | tools/onnx_utilis/export_vfe_weight.py | neolixcn/OpenPCDet | 32bae37db13711a4fb35ad2980068470bb6cee1c | [
"Apache-2.0"
] | null | null | null | tools/onnx_utilis/export_vfe_weight.py | neolixcn/OpenPCDet | 32bae37db13711a4fb35ad2980068470bb6cee1c | [
"Apache-2.0"
] | null | null | null | tools/onnx_utilis/export_vfe_weight.py | neolixcn/OpenPCDet | 32bae37db13711a4fb35ad2980068470bb6cee1c | [
"Apache-2.0"
] | null | null | null | import onnx
import onnxruntime
import torch
import onnx.numpy_helper
# added by huxi, load rpn config
from pcdet.pointpillar_quantize_config import load_rpn_config_json
# ========================================
config_dict = load_rpn_config_json.get_config()
onnx_model_file = config_dict["vfe_onnx_file"]
onnx_mode... | 28.25 | 93 | 0.702908 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0.135272 |
d29e58f5104bd6d4a19025c66f8dbd6cd3fc3f1a | 1,825 | py | Python | color_extractor/cluster.py | hcoura/color-extractor | a69fc4a9a8b7c90d292f954d289c84a38323eda6 | [
"MIT"
] | 276 | 2016-07-25T10:00:06.000Z | 2022-03-10T16:56:26.000Z | color_extractor/cluster.py | hcoura/color-extractor | a69fc4a9a8b7c90d292f954d289c84a38323eda6 | [
"MIT"
] | 13 | 2017-05-25T12:45:30.000Z | 2022-03-11T23:16:30.000Z | color_extractor/cluster.py | hcoura/color-extractor | a69fc4a9a8b7c90d292f954d289c84a38323eda6 | [
"MIT"
] | 74 | 2016-12-14T07:31:18.000Z | 2022-03-12T18:36:57.000Z | from sklearn.cluster import KMeans
from .exceptions import KMeansException
from .task import Task
class Cluster(Task):
"""
Use the K-Means algorithm to group pixels by clusters. The algorithm tries
to determine the optimal number of clusters for the given pixels.
"""
def __init__(self, settings=N... | 26.838235 | 78 | 0.572603 | 1,723 | 0.94411 | 0 | 0 | 256 | 0.140274 | 0 | 0 | 269 | 0.147397 |
d29e853085f1e22d6f5c45806ff223b5999daf1d | 315 | py | Python | notebooks/datasets.py | jweill-aws/jupyterlab-data-explorer | 3db8eed9562f35d2b0e44370cf22f32ac9ffbc4d | [
"BSD-3-Clause"
] | 173 | 2019-01-04T05:18:08.000Z | 2022-03-28T11:15:30.000Z | notebooks/datasets.py | jweill-aws/jupyterlab-data-explorer | 3db8eed9562f35d2b0e44370cf22f32ac9ffbc4d | [
"BSD-3-Clause"
] | 115 | 2019-01-04T01:09:41.000Z | 2022-03-24T01:07:00.000Z | notebooks/datasets.py | jweill-aws/jupyterlab-data-explorer | 3db8eed9562f35d2b0e44370cf22f32ac9ffbc4d | [
"BSD-3-Clause"
] | 34 | 2019-06-12T16:46:53.000Z | 2022-02-01T08:41:40.000Z | #
# @license BSD-3-Clause
#
# Copyright (c) 2019 Project Jupyter Contributors.
# Distributed under the terms of the 3-Clause BSD License.
import IPython.display
import pandas
def output_url(url):
IPython.display.publish_display_data(
{"application/x.jupyter.relative-dataset-urls+json": [url]}
)
| 21 | 67 | 0.730159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.580952 |
d29f3df5f35ab4781444eaf48243bf8b792bb433 | 1,154 | py | Python | django_india/conf.py | k-mullapudi/django-india | 662a5fb363ac4360b573f5864df65619f2794dc8 | [
"MIT"
] | null | null | null | django_india/conf.py | k-mullapudi/django-india | 662a5fb363ac4360b573f5864df65619f2794dc8 | [
"MIT"
] | null | null | null | django_india/conf.py | k-mullapudi/django-india | 662a5fb363ac4360b573f5864df65619f2794dc8 | [
"MIT"
] | null | null | null | import django.conf
url_bases = {
'geonames': {
'dump': 'http://download.geonames.org/export/dump/',
'zip': 'http://download.geonames.org/export/zip/',
},
}
india_country_code = 'IN'
files = {
'state': {
'filename': '',
'urls': [
url_bases['geonames']['dump'] + ... | 19.233333 | 73 | 0.47747 | 411 | 0.356153 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.353553 |
d29f77fa5fac3eb65fe044b9f6c664cd6a9d69a3 | 1,588 | py | Python | src/dao/evaluation_dao.py | Asconius/trading-bot | df544f058d12c5378a0f8c110e28d49d983e0393 | [
"Apache-2.0"
] | 2 | 2021-06-04T11:27:02.000Z | 2021-12-19T03:24:51.000Z | src/dao/evaluation_dao.py | Asconius/trading-bot | df544f058d12c5378a0f8c110e28d49d983e0393 | [
"Apache-2.0"
] | 22 | 2020-08-24T05:16:11.000Z | 2021-12-13T20:51:25.000Z | src/dao/evaluation_dao.py | Asconius/trading-bot | df544f058d12c5378a0f8c110e28d49d983e0393 | [
"Apache-2.0"
] | null | null | null | from decimal import Decimal
from typing import List
from src.dao.dao import DAO
from src.dto.attempt_dto import AttemptDTO
from src.entity.evaluation_entity import EvaluationEntity
from src.utils.utils import Utils
class EvaluationDAO:
@staticmethod
def create(summation: Decimal, funds: str, attempt: Attempt... | 40.717949 | 116 | 0.706549 | 1,369 | 0.862091 | 0 | 0 | 1,326 | 0.835013 | 0 | 0 | 0 | 0 |
d29fef12d764089bdcfe8679c802e9724d8f9325 | 1,031 | py | Python | src/lib/others/info_gathering/finder/finding_comment.py | nahuelhm17/vault_scanner | 574da226db5d274794d751d9d7959cd785bc9990 | [
"MIT"
] | 230 | 2019-01-10T07:43:01.000Z | 2022-03-25T03:16:07.000Z | src/lib/others/info_gathering/finder/finding_comment.py | nahuelhm17/vault_scanner | 574da226db5d274794d751d9d7959cd785bc9990 | [
"MIT"
] | 65 | 2018-11-18T12:48:27.000Z | 2019-01-05T22:40:07.000Z | src/lib/others/info_gathering/finder/finding_comment.py | nahuelhm17/vault_scanner | 574da226db5d274794d751d9d7959cd785bc9990 | [
"MIT"
] | 64 | 2019-01-16T11:56:18.000Z | 2022-01-12T17:28:37.000Z | #! /usr/bin/python
import requests
import re
from bs4 import BeautifulSoup
import colors
class FindingComments(object):
def __init__(self, url):
self.url = url
self.comment_list = ['<!--(.*)-->']
self.found_comments = {}
def get_soure_code(self):
resp_text = requests.get(sel... | 27.131579 | 69 | 0.596508 | 938 | 0.909796 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.065955 |
d2a2c147c06d327188733c71e9a83b70f75131b1 | 27 | py | Python | micro-benchmark-key-errs/snippets/dicts/type_coercion/main.py | WenJinfeng/PyCG | b45e8e04fe697d8301cf27222a8f37646d69f168 | [
"Apache-2.0"
] | 121 | 2020-12-16T20:31:37.000Z | 2022-03-21T20:32:43.000Z | micro-benchmark-key-errs/snippets/dicts/type_coercion/main.py | WenJinfeng/PyCG | b45e8e04fe697d8301cf27222a8f37646d69f168 | [
"Apache-2.0"
] | 24 | 2021-03-13T00:04:00.000Z | 2022-03-21T17:28:11.000Z | micro-benchmark-key-errs/snippets/dicts/type_coercion/main.py | WenJinfeng/PyCG | b45e8e04fe697d8301cf27222a8f37646d69f168 | [
"Apache-2.0"
] | 19 | 2021-03-23T10:58:47.000Z | 2022-03-24T19:46:50.000Z | d = {"1": "a"}
d[1]
d["1"]
| 6.75 | 14 | 0.259259 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.333333 |
d2a35e41a7de7ed1c211d10b17e2843c3afc87ce | 2,753 | py | Python | scripts/link_assignment.py | metagenomics/antibio | ac79c64417c749ed40263fc97d22498097f2e9b9 | [
"MIT"
] | 4 | 2015-11-03T22:00:33.000Z | 2017-10-21T06:57:35.000Z | scripts/link_assignment.py | metagenomics/antibio | ac79c64417c749ed40263fc97d22498097f2e9b9 | [
"MIT"
] | 49 | 2015-09-28T11:32:38.000Z | 2016-04-11T14:05:00.000Z | scripts/link_assignment.py | metagenomics/antibio | ac79c64417c749ed40263fc97d22498097f2e9b9 | [
"MIT"
] | 2 | 2018-08-27T15:15:45.000Z | 2020-03-31T01:50:48.000Z | #!/usr/bin/python
# This program revises the existing overview file.
# If a keyword is found in an Abstract of an accession of a gene, the url of the abstract is added to the overview file
# The revised overview.txt is created in the same directory of the old one and named overview_new.txt
"""
Usage: link_assignment.py... | 35.753247 | 119 | 0.694878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 884 | 0.321104 |
d2a6ca53031a949367ecbf3f9d3bfdb61563f697 | 5,421 | py | Python | app/views.py | LauretteMongina/Instagram-clone | 617135bcebcf6b73f2de7af73a66c177718d338c | [
"MIT"
] | null | null | null | app/views.py | LauretteMongina/Instagram-clone | 617135bcebcf6b73f2de7af73a66c177718d338c | [
"MIT"
] | null | null | null | app/views.py | LauretteMongina/Instagram-clone | 617135bcebcf6b73f2de7af73a66c177718d338c | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect,get_object_or_404
from django.contrib.auth.decorators import login_required
from .models import *
import cloudinary
import cloudinary.uploader
import cloudinary.api
from django.http import HttpResponseRedirect, JsonResponse
from .forms import RegistrationForm, UpdateUserForm... | 34.310127 | 98 | 0.642317 | 0 | 0 | 0 | 0 | 4,009 | 0.739531 | 0 | 0 | 786 | 0.144992 |
d2a7333fba6a0b271b7f3ddd6746591c934cb750 | 1,557 | py | Python | at_export_config.py | Fmstrat/FreeCAD-ArchTextures | e3af6198ea5e07848602a3b8ba01ebab2335d6b1 | [
"MIT"
] | 21 | 2018-11-16T05:56:31.000Z | 2021-11-09T13:21:53.000Z | at_export_config.py | Fmstrat/FreeCAD-ArchTextures | e3af6198ea5e07848602a3b8ba01ebab2335d6b1 | [
"MIT"
] | 39 | 2018-10-02T18:16:18.000Z | 2022-02-11T13:45:50.000Z | at_export_config.py | Fmstrat/FreeCAD-ArchTextures | e3af6198ea5e07848602a3b8ba01ebab2335d6b1 | [
"MIT"
] | 10 | 2019-07-15T16:34:51.000Z | 2022-01-25T23:57:03.000Z | import FreeCAD, FreeCADGui
from arch_texture_utils.resource_utils import iconPath
import arch_texture_utils.qtutils as qtutils
from arch_texture_utils.selection_utils import findSelectedTextureConfig
class ExportTextureConfigCommand:
toolbarName = 'ArchTexture_Tools'
commandName = 'Export_Config'
def Get... | 33.12766 | 122 | 0.689788 | 1,014 | 0.651252 | 0 | 0 | 0 | 0 | 0 | 0 | 399 | 0.256262 |
d2a75f44feb7064f817bce0160b3db28ad77852c | 597 | py | Python | barcode/charsets/ean.py | Azd325/python-barcode | b41b1d5d479fb0ad3290a0a6235a8d3203d34ee9 | [
"MIT"
] | null | null | null | barcode/charsets/ean.py | Azd325/python-barcode | b41b1d5d479fb0ad3290a0a6235a8d3203d34ee9 | [
"MIT"
] | null | null | null | barcode/charsets/ean.py | Azd325/python-barcode | b41b1d5d479fb0ad3290a0a6235a8d3203d34ee9 | [
"MIT"
] | null | null | null | EDGE = '101'
MIDDLE = '01010'
CODES = {
'A': (
'0001101', '0011001', '0010011', '0111101', '0100011', '0110001',
'0101111', '0111011', '0110111', '0001011'
),
'B': (
'0100111', '0110011', '0011011', '0100001', '0011101', '0111001',
'0000101', '0010001', '0001001', '0010111'
... | 28.428571 | 73 | 0.515913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 371 | 0.621441 |
d2a835bc55a30790d6234339c5e466df15a50aed | 2,787 | py | Python | Sushant_Boosting/code.py | sushant-bahekar/ga-learner-dsmp-repo | 1087bec60382c2b3156f26cb87629a3b931fc41f | [
"MIT"
] | null | null | null | Sushant_Boosting/code.py | sushant-bahekar/ga-learner-dsmp-repo | 1087bec60382c2b3156f26cb87629a3b931fc41f | [
"MIT"
] | null | null | null | Sushant_Boosting/code.py | sushant-bahekar/ga-learner-dsmp-repo | 1087bec60382c2b3156f26cb87629a3b931fc41f | [
"MIT"
] | null | null | null | # --------------
import pandas as pd
from sklearn.model_selection import train_test_split
#path - Path of file
# Code starts here
df = pd.read_csv(path)
df.head(5)
X = df.drop(['customerID','Churn'],1)
y = df['Churn']
X_train,X_test,y_train,y_test = train_test_split(X, y, test_size = 0.3, random_state = 0)
# --... | 24.663717 | 89 | 0.742375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 737 | 0.264442 |
d2a9213337ceeb22964f6608d3d20eb1d939ae74 | 16,566 | py | Python | slsgd.py | xcgoner/ecml2019-slsgd | e4856b2015d4c7c39e28743dab2222ef8e0131fa | [
"MIT"
] | 3 | 2019-09-10T15:46:04.000Z | 2020-09-21T17:53:10.000Z | slsgd.py | xcgoner/ecml2019-slsgd | e4856b2015d4c7c39e28743dab2222ef8e0131fa | [
"MIT"
] | null | null | null | slsgd.py | xcgoner/ecml2019-slsgd | e4856b2015d4c7c39e28743dab2222ef8e0131fa | [
"MIT"
] | null | null | null | import argparse, time, logging, os, math, random
os.environ["MXNET_USE_OPERATOR_TUNING"] = "0"
import numpy as np
from scipy import stats
import mxnet as mx
from mxnet import gluon, nd
from mxnet import autograd as ag
from mxnet.gluon import nn
from mxnet.gluon.data.vision import transforms
from gluoncv.model_zoo im... | 40.306569 | 253 | 0.650247 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,150 | 0.190148 |
d2a9e60639815c6fa23b7d5054d4eac994971146 | 59,644 | py | Python | predictor.py | MIC-DKFZ/DetectionAndRegression | 40f3cb92ec6447767bd85b62a015b0d50e32ad26 | [
"Apache-2.0"
] | 40 | 2019-09-24T08:11:35.000Z | 2022-02-23T13:49:01.000Z | predictor.py | MIC-DKFZ/MedicalDetectionRegression | 40f3cb92ec6447767bd85b62a015b0d50e32ad26 | [
"Apache-2.0"
] | 13 | 2019-11-04T10:52:40.000Z | 2022-03-11T23:57:14.000Z | predictor.py | MIC-DKFZ/MedicalDetectionRegression | 40f3cb92ec6447767bd85b62a015b0d50e32ad26 | [
"Apache-2.0"
] | 22 | 2019-08-28T15:32:25.000Z | 2022-02-18T11:27:30.000Z | #!/usr/bin/env python
# Copyright 2019 Division of Medical Image Computing, German Cancer Research Center (DKFZ).
#
# 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... | 59.229394 | 192 | 0.598803 | 37,716 | 0.632352 | 0 | 0 | 0 | 0 | 0 | 0 | 23,311 | 0.390836 |
d2aa2e4deaca6a1a85b89b1e9c89d89fa5c4d8f5 | 424 | py | Python | archive/jonesboro/__init__.py | jayktee/scrapers-us-municipal | ff52a331e91cb590a3eda7db6c688d75b77acacb | [
"MIT"
] | 67 | 2015-04-28T19:28:18.000Z | 2022-01-31T03:27:17.000Z | archive/jonesboro/__init__.py | jayktee/scrapers-us-municipal | ff52a331e91cb590a3eda7db6c688d75b77acacb | [
"MIT"
] | 202 | 2015-01-15T18:43:12.000Z | 2021-11-23T15:09:10.000Z | archive/jonesboro/__init__.py | jayktee/scrapers-us-municipal | ff52a331e91cb590a3eda7db6c688d75b77acacb | [
"MIT"
] | 54 | 2015-01-27T03:15:45.000Z | 2021-09-10T19:35:32.000Z | from pupa.scrape import Jurisdiction
from legistar.ext.pupa import LegistarPeopleScraper
class Jonesboro(Jurisdiction):
division_id = 'ocd-division/country:us/state:ar/place:jonesboro'
jurisdiction_id = 'ocd-jurisdiction/country:us/state:ar/place:jonesboro/government'
name = 'Jonesboro City Council'
... | 28.266667 | 87 | 0.735849 | 332 | 0.783019 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.42217 |
d2aa498a5dc13b5e44bb5a53742aa0908d8d79da | 2,766 | py | Python | src/config.py | La-tale/MessyTable | 42ae08294f1a576d2477a4b4c12b2aec047c2ba9 | [
"MIT"
] | 32 | 2020-07-13T04:30:00.000Z | 2022-03-17T12:04:32.000Z | src/config.py | La-tale/MessyTable | 42ae08294f1a576d2477a4b4c12b2aec047c2ba9 | [
"MIT"
] | 12 | 2020-08-31T02:58:37.000Z | 2022-03-26T04:05:27.000Z | src/config.py | La-tale/MessyTable | 42ae08294f1a576d2477a4b4c12b2aec047c2ba9 | [
"MIT"
] | 8 | 2020-07-27T05:20:33.000Z | 2022-02-04T06:58:37.000Z | import yaml
import os
def parse_config(args):
"""
prepare configs
"""
file_dir = os.path.dirname(os.path.realpath('__file__'))
messytable_dir = os.path.realpath(os.path.join(file_dir, '..'))
config_pathname = os.path.join(messytable_dir,'models',args.config_dir,'train.yaml')
config = yaml.... | 56.44898 | 181 | 0.713304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,130 | 0.408532 |
d2ab49c4b3562bad12874570d0c5751dda4cf3e6 | 1,194 | py | Python | tests/settings.py | josemarimanio/django-adminlte2-templates | d39ab5eaec674c4725015fe43fc93e74dce78a6e | [
"MIT"
] | 10 | 2020-03-21T10:50:11.000Z | 2022-03-04T08:36:43.000Z | tests/settings.py | josemarimanio/django-adminlte2-templates | d39ab5eaec674c4725015fe43fc93e74dce78a6e | [
"MIT"
] | 6 | 2020-06-06T08:48:29.000Z | 2021-06-10T18:49:35.000Z | tests/settings.py | josemarimanio/django-adminlte2-templates | d39ab5eaec674c4725015fe43fc93e74dce78a6e | [
"MIT"
] | 1 | 2021-09-14T02:00:43.000Z | 2021-09-14T02:00:43.000Z | import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '!t_(11ght0&nmb&$tf4to=gdg&u$!hsm3@)c6dzp=zdc*c9zci' # nosec
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'adminlte2_templ... | 23.88 | 74 | 0.629816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 675 | 0.565327 |
d2ae04ea58cc84694d33370988510f0b8bdcadb9 | 2,658 | py | Python | two-variables-function-fitting/fxy_gen.py | ettoremessina/fitting-with-mlp-using-tensorflow | 50303c7161521f690c37b80a72a281129052365b | [
"MIT"
] | 9 | 2020-03-21T08:45:28.000Z | 2021-11-30T02:49:41.000Z | two-variables-function-fitting/fxy_gen.py | ettoremessina/fitting-with-mlp-using-tensorflow | 50303c7161521f690c37b80a72a281129052365b | [
"MIT"
] | null | null | null | two-variables-function-fitting/fxy_gen.py | ettoremessina/fitting-with-mlp-using-tensorflow | 50303c7161521f690c37b80a72a281129052365b | [
"MIT"
] | 3 | 2020-04-08T15:35:03.000Z | 2022-03-22T02:19:02.000Z | import argparse
import numpy as np
import csv
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='fxy_gen.py generates a synthetic dataset file calling a two-variables real function on a rectangle')
parser.add_argument('--dsout',
type=str,
d... | 37.971429 | 150 | 0.482318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 551 | 0.207299 |
d2aee573a11ac0e4ec731ba7feda47d776f90ea2 | 995 | py | Python | custom/icds_reports/dashboard_utils.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/dashboard_utils.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/dashboard_utils.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | from corehq.apps.locations.util import location_hierarchy_config
from custom.icds_reports.utils import icds_pre_release_features
def get_dashboard_template_context(domain, couch_user):
context = {}
context['location_hierarchy'] = location_hierarchy_config(domain)
context['user_location_id'] = couch_user.g... | 34.310345 | 78 | 0.729648 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.226131 |
d2af35f5ecd1284185b97cd7fd48a1dabdbf319d | 1,714 | py | Python | data_input.py | zpcore/OnePass | fc102fae172c617535d4661bfa99a0302cbe09db | [
"MIT"
] | null | null | null | data_input.py | zpcore/OnePass | fc102fae172c617535d4661bfa99a0302cbe09db | [
"MIT"
] | null | null | null | data_input.py | zpcore/OnePass | fc102fae172c617535d4661bfa99a0302cbe09db | [
"MIT"
] | null | null | null | import json
import string, sys
from random import *
class Token:
def __init__(self):
self.company, self.website, self.email, self.username, self.password = None, None, None, None, None
def get_input(self):
while(self.company in (None,'')):
self.company = input('Account Association:')
if(self.company in (N... | 32.339623 | 101 | 0.656943 | 1,584 | 0.924154 | 0 | 0 | 0 | 0 | 0 | 0 | 586 | 0.34189 |
d2af5783fc08617f08a4edb9dc33a39579f11d65 | 1,401 | py | Python | examples/python/test_dict.py | SmartEconomyWorkshop/workshop | 5961dcc8832f60b3a0407cb9a8361ba5485ac280 | [
"MIT"
] | 79 | 2017-10-22T03:35:06.000Z | 2021-12-02T10:28:06.000Z | examples/python/test_dict.py | SmartEconomyWorkshop/workshop | 5961dcc8832f60b3a0407cb9a8361ba5485ac280 | [
"MIT"
] | 122 | 2017-10-19T12:34:08.000Z | 2020-08-20T12:38:17.000Z | examples/python/test_dict.py | SmartEconomyWorkshop/workshop | 5961dcc8832f60b3a0407cb9a8361ba5485ac280 | [
"MIT"
] | 76 | 2017-10-19T05:09:55.000Z | 2020-12-08T12:03:59.000Z | from boa_test.tests.boa_test import BoaTest
from boa.compiler import Compiler
from neo.Settings import settings
from neo.Prompt.Commands.BuildNRun import TestBuild
class TestContract(BoaTest):
def test_dict1(self):
output = Compiler.instance().load('%s/boa_test/example/DictTest1.py' % TestContract.dirna... | 36.868421 | 108 | 0.666667 | 1,234 | 0.880799 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.085653 |
d2b08bd5689396a0415385c35a4d92cedae61e22 | 520 | py | Python | deployment_classifier/setup.py | m-santh/VayuAnukulani | d1b881ac6268c24761dc0ef6db296d7e5ee1a22e | [
"MIT"
] | 1 | 2021-04-19T17:04:03.000Z | 2021-04-19T17:04:03.000Z | deployment_classifier/setup.py | m-santh/VayuAnukulani | d1b881ac6268c24761dc0ef6db296d7e5ee1a22e | [
"MIT"
] | 18 | 2020-01-28T22:36:26.000Z | 2020-07-28T17:01:35.000Z | deployment_classifier/setup.py | m-santh/VayuAnukulani | d1b881ac6268c24761dc0ef6db296d7e5ee1a22e | [
"MIT"
] | 3 | 2019-04-01T10:33:20.000Z | 2020-10-23T23:29:09.000Z | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['tensorflow==1.8.0','pandas==0.23.1','setuptools==38.7.0','numpy==1.14.1','Keras==2.1.4','scikit_learn==0.19.1','h5py']
setup(
name='classifier',
version='0.1',
install_requires=REQUIRED_PACKAGES,
packages=find_pack... | 28.888889 | 140 | 0.701923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.394231 |
d2b08ef7b1d20d9d85caa8e8727b92065aef39a2 | 1,023 | py | Python | day5.py | zsmoore/Advent-Of-Code-2017 | 895a7fbaa8b8b82a338dac967bccbf97b2092b20 | [
"MIT"
] | null | null | null | day5.py | zsmoore/Advent-Of-Code-2017 | 895a7fbaa8b8b82a338dac967bccbf97b2092b20 | [
"MIT"
] | null | null | null | day5.py | zsmoore/Advent-Of-Code-2017 | 895a7fbaa8b8b82a338dac967bccbf97b2092b20 | [
"MIT"
] | null | null | null | import sys
import copy
def main():
in_file = open(sys.argv[1], 'r')
jumps = []
for line in in_file.readlines():
jumps.append(int(line.strip()))
#print(compute_exit(jumps))
print(compute_exit2(jumps))
def compute_exit(jump_list):
current_ind = 0
step_num = 0
while True:
... | 22.23913 | 60 | 0.567937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.039101 |
d2b26b4fc46e989fc34f786c463f49d76b84289c | 4,949 | py | Python | pycudasirecon/_recon_params.py | tlambert03/pycudasirecon | 17ca242b1cfed14216d97df480ca2c7f3471d770 | [
"MIT"
] | 2 | 2021-06-09T15:35:50.000Z | 2021-06-10T05:33:11.000Z | pycudasirecon/_recon_params.py | tlambert03/pycudasirecon | 17ca242b1cfed14216d97df480ca2c7f3471d770 | [
"MIT"
] | null | null | null | pycudasirecon/_recon_params.py | tlambert03/pycudasirecon | 17ca242b1cfed14216d97df480ca2c7f3471d770 | [
"MIT"
] | null | null | null | import os
from contextlib import contextmanager
from tempfile import NamedTemporaryFile
from typing import Optional, Sequence
from pydantic import BaseModel, Field, FilePath
@contextmanager
def temp_config(**kwargs):
"""A context manager that creates a temporary config file for SIMReconstructor.
`**kwargs` ... | 40.235772 | 88 | 0.658921 | 4,336 | 0.876137 | 416 | 0.084057 | 432 | 0.08729 | 0 | 0 | 1,884 | 0.380683 |
d2b2f379a4dedf2bd69de6e708c00763f4c5952f | 4,098 | py | Python | tesseract_converters/tesseract_to_sa_converter.py | superannotateai/annotateonline-input-converters | 753211f48676d06718bb2d32501ba1df3ace9121 | [
"Apache-2.0"
] | 10 | 2020-04-30T08:36:08.000Z | 2021-02-27T21:46:45.000Z | tesseract_converters/tesseract_to_sa_converter.py | superannotateai/input_converters | 753211f48676d06718bb2d32501ba1df3ace9121 | [
"Apache-2.0"
] | 5 | 2020-03-27T07:16:36.000Z | 2020-07-06T04:45:47.000Z | tesseract_converters/tesseract_to_sa_converter.py | superannotateai/annotateonline-input-converters | 753211f48676d06718bb2d32501ba1df3ace9121 | [
"Apache-2.0"
] | 2 | 2020-06-26T20:02:10.000Z | 2020-06-30T20:56:04.000Z | import os
import json
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
'--input',
help='Path to input files or folder\
with tesseract dict format.\
File name structure \
[IMAGE_NAME]___te... | 32.784 | 80 | 0.476086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 868 | 0.211811 |
d2b3079900df546aeac436f737e69c681f72b12c | 24,525 | py | Python | fhirclient/r4models/contract_tests.py | cspears-mitre/CapStatement | 2390566ed75d420e0615e3a0aacb77e8c030fdcc | [
"Apache-2.0"
] | 1 | 2021-12-24T11:14:38.000Z | 2021-12-24T11:14:38.000Z | fhirclient/r4models/contract_tests.py | cspears-mitre/CapStatement | 2390566ed75d420e0615e3a0aacb77e8c030fdcc | [
"Apache-2.0"
] | null | null | null | fhirclient/r4models/contract_tests.py | cspears-mitre/CapStatement | 2390566ed75d420e0615e3a0aacb77e8c030fdcc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.6.0-bd605d07 on 2018-12-20.
# 2018, SMART Health IT.
import os
import io
import unittest
import json
from . import contract
from .fhirdate import FHIRDate
class ContractTests(unittest.TestCase):
def instantiate_from(self, filename):
... | 69.279661 | 152 | 0.685219 | 24,290 | 0.990418 | 0 | 0 | 0 | 0 | 0 | 0 | 6,650 | 0.271152 |
d2b34796cb7b21344e2370533fa5aa6227ece2be | 9,978 | py | Python | evaluation/evaluation.py | Ennosigaeon/xautoml | 6e49ee8b2ffb6d19dcfd9cbe8b3397416c9b5ded | [
"BSD-3-Clause"
] | 4 | 2022-02-27T08:54:08.000Z | 2022-03-30T21:19:29.000Z | evaluation/evaluation.py | Ennosigaeon/xautoml | 6e49ee8b2ffb6d19dcfd9cbe8b3397416c9b5ded | [
"BSD-3-Clause"
] | 1 | 2022-02-28T09:41:00.000Z | 2022-03-02T07:44:17.000Z | evaluation/evaluation.py | Ennosigaeon/xautoml | 6e49ee8b2ffb6d19dcfd9cbe8b3397416c9b5ded | [
"BSD-3-Clause"
] | 2 | 2022-03-01T00:38:09.000Z | 2022-03-21T09:38:49.000Z | import math
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from scipy.stats import ttest_ind
from sklearn.preprocessing import LabelEncoder
def load_data():
questionnaire = pd.read_excel('XAutoML.xlsx')
encoder = LabelEncoder()
encoder.classes_ = np.array([... | 35.763441 | 173 | 0.538785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,948 | 0.29545 |
d2b462f25f6094199e7adc2a1e6de5c3e66fd2f5 | 4,941 | py | Python | matplotlib/tutorials_python/colors/colors.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | matplotlib/tutorials_python/colors/colors.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | matplotlib/tutorials_python/colors/colors.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | """
*****************
Specifying Colors
*****************
Matplotlib recognizes the following formats to specify a color:
* an RGB or RGBA (red, green, blue, alpha) tuple of float values in closed
interval ``[0, 1]`` (e.g., ``(0.1, 0.2, 0.5)`` or ``(0.1, 0.2, 0.5, 0.3)``);
* a hex RGB or RGBA string (e.g., ``'#0f0f... | 36.330882 | 79 | 0.646225 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,789 | 0.766849 |
d2b6b250831a7174cf7989d9fc42a91268a025cd | 1,313 | py | Python | 12-listComprehensions.py | pgiardiniere/notes-WhirlwindTourOfPython | 10f483ea4452f0a45f2103886992fd77c2f3ac7c | [
"CC0-1.0"
] | null | null | null | 12-listComprehensions.py | pgiardiniere/notes-WhirlwindTourOfPython | 10f483ea4452f0a45f2103886992fd77c2f3ac7c | [
"CC0-1.0"
] | null | null | null | 12-listComprehensions.py | pgiardiniere/notes-WhirlwindTourOfPython | 10f483ea4452f0a45f2103886992fd77c2f3ac7c | [
"CC0-1.0"
] | null | null | null | # List Comprehensions
#########################
### Basic List Comprehensions
#########################
# allow us to circumvent constructing lists with for loops
l = [] # The Old Way
for n in range(12):
l.append(n**2)
[n ** 2 for n in range(12)] # Comprehension way
# General Syntax:
# [ ... | 26.795918 | 61 | 0.545316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 789 | 0.6 |
d2b6cbdba4cdbf4de3ed032d08f889932f594f92 | 1,515 | py | Python | src/chemical_roles/export/cli.py | bgyori/chemical-roles | 31a917e911075e3be7eea509e143d3ff48e942cc | [
"MIT"
] | 5 | 2021-02-05T01:27:53.000Z | 2021-07-12T15:47:08.000Z | src/chemical_roles/export/cli.py | bgyori/chemical-roles | 31a917e911075e3be7eea509e143d3ff48e942cc | [
"MIT"
] | 8 | 2019-10-10T13:02:18.000Z | 2020-05-11T18:41:56.000Z | src/chemical_roles/export/cli.py | bgyori/chemical-roles | 31a917e911075e3be7eea509e143d3ff48e942cc | [
"MIT"
] | 5 | 2020-06-07T13:11:34.000Z | 2021-07-12T14:24:01.000Z | # -*- coding: utf-8 -*-
"""CLI for Chemical Roles exporters."""
import os
import click
from ..constants import DATA
@click.group()
def export():
"""Export the database."""
@export.command(name='all')
@click.pass_context
def export_all(ctx):
"""Export all."""
ctx.invoke(summary)
ctx.invoke(obo)
... | 21.041667 | 106 | 0.684488 | 0 | 0 | 0 | 0 | 1,272 | 0.839604 | 0 | 0 | 335 | 0.221122 |
d2b7475246a09fa72d42e65c0defb8588ba3890e | 4,681 | py | Python | gdsfactory/geometry/write_drc.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 42 | 2020-05-25T09:33:45.000Z | 2022-03-29T03:41:19.000Z | gdsfactory/geometry/write_drc.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 133 | 2020-05-28T18:29:04.000Z | 2022-03-31T22:21:42.000Z | gdsfactory/geometry/write_drc.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 17 | 2020-06-30T07:07:50.000Z | 2022-03-17T15:45:27.000Z | """Write DRC rule decks in klayout.
TODO:
- add min area
- define derived layers (composed rules)
"""
import pathlib
from dataclasses import asdict, is_dataclass
from typing import List, Optional
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from gdsfactory.confi... | 26.902299 | 85 | 0.654134 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,472 | 0.528092 |
d2b75bb3697ff16713aa871c5e493e77fa916f5c | 1,620 | py | Python | virtus/core/migrations/0004_auto_20180417_1625.py | eltonjncorreia/gerenciar-dados-virtus | b8e1b8caa152b18221046f6841761d805b232268 | [
"MIT"
] | null | null | null | virtus/core/migrations/0004_auto_20180417_1625.py | eltonjncorreia/gerenciar-dados-virtus | b8e1b8caa152b18221046f6841761d805b232268 | [
"MIT"
] | null | null | null | virtus/core/migrations/0004_auto_20180417_1625.py | eltonjncorreia/gerenciar-dados-virtus | b8e1b8caa152b18221046f6841761d805b232268 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.4 on 2018-04-17 19:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20180417_1613'),
]
operations = [
migrations.CreateModel(
name='Item',
fields=[
('... | 38.571429 | 114 | 0.569753 | 1,530 | 0.942699 | 0 | 0 | 0 | 0 | 0 | 0 | 496 | 0.305607 |
d2b7ebb7c7ccc1338b94c19d7637e3ceac872b46 | 2,173 | py | Python | image_demo.py | a888999a/yolov3fusion1 | 3659898aee34a351e95ea545236b8bc682901498 | [
"MIT"
] | 7 | 2020-09-23T10:37:17.000Z | 2021-12-26T00:23:02.000Z | image_demo.py | a888999a/yolov3fusion1 | 3659898aee34a351e95ea545236b8bc682901498 | [
"MIT"
] | null | null | null | image_demo.py | a888999a/yolov3fusion1 | 3659898aee34a351e95ea545236b8bc682901498 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding=utf-8
#================================================================
# Copyright (C) 2019 * Ltd. All rights reserved.
#
# Editor : VIM
# File name : image_demo.py
# Author : YunYang1994
# Created date: 2019-01-20 16:06:06
# Description :
#
#====================... | 35.048387 | 135 | 0.673263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 625 | 0.287621 |
d2b930c9508039d505766f1d70318392c9baf277 | 7,090 | py | Python | Sensor/main.py | mahsahadian/EdgeBenchmarkTool | cafddb2eb66732da0bff8f26107788e3c93fbe2f | [
"MIT"
] | null | null | null | Sensor/main.py | mahsahadian/EdgeBenchmarkTool | cafddb2eb66732da0bff8f26107788e3c93fbe2f | [
"MIT"
] | null | null | null | Sensor/main.py | mahsahadian/EdgeBenchmarkTool | cafddb2eb66732da0bff8f26107788e3c93fbe2f | [
"MIT"
] | 2 | 2022-01-31T01:55:56.000Z | 2022-02-01T01:43:20.000Z |
import cv2
from datetime import *
import time
import logging
import base64
import sys
import os
import shutil
import paho.mqtt.client as mqtt
from influxdb import InfluxDBClient
import datetime
import sys
import re
from typing import NamedTuple
import json
from dotenv import load_dotenv
load_dotenv("sensor-variab... | 33.130841 | 146 | 0.629478 | 3,485 | 0.491537 | 0 | 0 | 0 | 0 | 0 | 0 | 2,360 | 0.332863 |
d2b975627d7b7c61820ad7bec967dad5b7b1e8aa | 4,511 | py | Python | oxide/plugins/other/StartupItems.py | john-clark/rust-oxide-umod | 56feca04f96d8a43a1b56e080fc81d526f7471c3 | [
"MIT"
] | 13 | 2019-05-13T08:03:50.000Z | 2022-02-06T16:44:35.000Z | oxide/plugins/other/StartupItems.py | john-clark/rust-oxide-umod | 56feca04f96d8a43a1b56e080fc81d526f7471c3 | [
"MIT"
] | null | null | null | oxide/plugins/other/StartupItems.py | john-clark/rust-oxide-umod | 56feca04f96d8a43a1b56e080fc81d526f7471c3 | [
"MIT"
] | 8 | 2019-12-12T15:48:03.000Z | 2021-12-24T17:04:45.000Z | # Note:
# I add an underscore at the biginning of the variable name for example: "_variable" to prevent
# conflicts with build-in variables from Oxide.
# Use to manage the player's inventory.
import ItemManager
# Use to get player's information.
import BasePlayer
# The plug-in name should be the same as the ... | 51.261364 | 153 | 0.570162 | 4,164 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 2,366 | 0.524496 |
d2bbabe21477b77848cbfcaba239a66c8fe04262 | 1,043 | py | Python | error_handler.py | jrg1381/sm_asr_console | 47c4090075deaaa7f58e9a092423a58bc7b0a30f | [
"MIT"
] | 2 | 2019-08-07T11:08:06.000Z | 2021-01-20T11:28:37.000Z | error_handler.py | jrg1381/sm_asr_console | 47c4090075deaaa7f58e9a092423a58bc7b0a30f | [
"MIT"
] | null | null | null | error_handler.py | jrg1381/sm_asr_console | 47c4090075deaaa7f58e9a092423a58bc7b0a30f | [
"MIT"
] | null | null | null | # encoding: utf-8
""" Parameterized decorator for catching errors and displaying them in an error popup """
from enum import Enum
import npyscreen
class DialogType(Enum):
"""
Enum defining the type of dialog.
CONFIRM - the dialog waits until the user clicks OK
BRIEF - the dialog appears for a few sec... | 29.8 | 89 | 0.681687 | 274 | 0.262704 | 0 | 0 | 0 | 0 | 0 | 0 | 553 | 0.530201 |
d2bbf8bdae1a8922b42a68b17b2aafcf8fd38f67 | 13,043 | py | Python | parlai/tasks/taskmaster2/agents.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 2 | 2017-09-20T21:49:51.000Z | 2018-08-12T06:58:10.000Z | parlai/tasks/taskmaster2/agents.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 7 | 2021-01-12T01:07:03.000Z | 2022-03-12T00:50:45.000Z | parlai/tasks/taskmaster2/agents.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 1 | 2021-01-07T11:45:03.000Z | 2021-01-07T11:45:03.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Taskmaster-2 implementation for ParlAI.
No official train/valid/test splits are available as of 2020-05-18, so we m... | 35.734247 | 86 | 0.521966 | 12,004 | 0.92034 | 3,689 | 0.282834 | 839 | 0.064326 | 0 | 0 | 2,907 | 0.222878 |
d2bc823500d7e835a13076bd5554f0f404893ff4 | 243 | py | Python | jmeter_api/timers/__init__.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 11 | 2020-03-22T13:30:21.000Z | 2021-12-25T06:23:44.000Z | jmeter_api/timers/__init__.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 2 | 2020-03-23T00:06:42.000Z | 2021-02-24T21:41:40.000Z | jmeter_api/timers/__init__.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 3 | 2020-11-09T14:14:25.000Z | 2021-05-27T02:54:38.000Z | from jmeter_api.timers.constant_throughput_timer.elements import ConstantThroughputTimer, BasedOn
from jmeter_api.timers.constant_timer.elements import ConstantTimer
from jmeter_api.timers.uniform_random_timer.elements import UniformRandTimer
| 60.75 | 97 | 0.90535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2bd972bab298994d41d91b8c6a75e48470ccec5 | 2,520 | py | Python | tensorfn/distributed/launch.py | rosinality/tensorfn | cd410c5e6f6906d223f740501e711b9cfae260e4 | [
"Apache-2.0"
] | 13 | 2021-04-08T03:09:42.000Z | 2022-03-18T08:27:17.000Z | tensorfn/distributed/launch.py | rosinality/tensorfn | cd410c5e6f6906d223f740501e711b9cfae260e4 | [
"Apache-2.0"
] | 2 | 2020-08-16T20:25:34.000Z | 2021-07-13T00:35:52.000Z | tensorfn/distributed/launch.py | rosinality/tensorfn | cd410c5e6f6906d223f740501e711b9cfae260e4 | [
"Apache-2.0"
] | null | null | null | import os
import torch
from torch import distributed as dist
from torch import multiprocessing as mp
from tensorfn import distributed as dist_fn
def find_free_port():
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(("", 0))
port = sock.getsockname()[1]
sock.clo... | 27.096774 | 101 | 0.636508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.175794 |
d2bffe6b8d76be452fc84a9fa325b868d681f43c | 4,097 | py | Python | VideoStitchingSubsystem/StereoCameraAPIs/MonoLensStream.py | AriaPahlavan/see-through-adas-core | 7cc530243d324aecd9db538883bb77ee2d519661 | [
"Apache-2.0"
] | null | null | null | VideoStitchingSubsystem/StereoCameraAPIs/MonoLensStream.py | AriaPahlavan/see-through-adas-core | 7cc530243d324aecd9db538883bb77ee2d519661 | [
"Apache-2.0"
] | null | null | null | VideoStitchingSubsystem/StereoCameraAPIs/MonoLensStream.py | AriaPahlavan/see-through-adas-core | 7cc530243d324aecd9db538883bb77ee2d519661 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
from threading import Thread
import cv2
import time
class Resolution(Enum):
_32p = (64, 32)
_96p = (128, 96)
_120p = (160, 120)
_144p = (256, 144)
_240p = (360, 240)
_288p = (480, 272)
_360p = (480, 360)
_480p = (720, 480)
_576p = (720, 576)
_Hd = (1280, ... | 28.255172 | 107 | 0.573102 | 4,016 | 0.980229 | 0 | 0 | 0 | 0 | 0 | 0 | 778 | 0.189895 |
d2c143baf7ea1e8434d64873e45800bbd43dfe04 | 444 | py | Python | sdk/python/approzium/mysql/connector/pooling.py | UpGado/approzium | 306b40f16a1ba0dfbe3a312e1c40881e98518137 | [
"Apache-2.0"
] | 59 | 2020-07-14T17:18:09.000Z | 2022-02-24T07:39:22.000Z | sdk/python/approzium/mysql/connector/pooling.py | UpGado/approzium | 306b40f16a1ba0dfbe3a312e1c40881e98518137 | [
"Apache-2.0"
] | 66 | 2020-07-09T19:11:55.000Z | 2022-03-15T11:42:55.000Z | sdk/python/approzium/mysql/connector/pooling.py | UpGado/approzium | 306b40f16a1ba0dfbe3a312e1c40881e98518137 | [
"Apache-2.0"
] | 9 | 2020-07-09T19:20:45.000Z | 2022-02-24T07:39:26.000Z | from mysql.connector.pooling import MySQLConnectionPool
from ._connect import _parse_kwargs, _patch_MySQLConnection
class MySQLConnectionPool(MySQLConnectionPool):
def set_config(self, **kwargs):
kwargs = _parse_kwargs(kwargs)
super(MySQLConnectionPool, self).set_config(**kwargs)
def add_con... | 31.714286 | 61 | 0.75 | 324 | 0.72973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2c1cd83dd904d0ffd396c1f85ce4d771a28e638 | 4,813 | py | Python | app/network_x_tools/network_x_utils.py | ThembiNsele/ClimateMind-Backend | 0e418000b2a0141a1e4a7c11dbe3564082a3f4bb | [
"MIT"
] | 6 | 2020-08-20T10:49:59.000Z | 2022-01-24T16:49:46.000Z | app/network_x_tools/network_x_utils.py | ThembiNsele/ClimateMind-Backend | 0e418000b2a0141a1e4a7c11dbe3564082a3f4bb | [
"MIT"
] | 95 | 2020-07-24T22:32:34.000Z | 2022-03-05T15:01:16.000Z | app/network_x_tools/network_x_utils.py | ThembiNsele/ClimateMind-Backend | 0e418000b2a0141a1e4a7c11dbe3564082a3f4bb | [
"MIT"
] | 5 | 2020-07-30T17:29:09.000Z | 2021-01-10T19:46:15.000Z | class network_x_utils:
"""
This class provides commonly used utils which are shared between all different types
of NetworkX nodes (Feed Items, Solutions, Myths). For each of these, we want to be
able to pull basic information like the IRI, Descriptions, Images, etc.
Include any generalized Networ... | 39.45082 | 122 | 0.635155 | 4,814 | 0.999792 | 0 | 0 | 0 | 0 | 0 | 0 | 3,235 | 0.671859 |
d2c30d506f338f0ad2e0b0a0c5af2f47676aea3a | 267 | py | Python | setup.py | Faust-Wang/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 21 | 2021-03-03T10:51:46.000Z | 2022-03-28T11:00:35.000Z | setup.py | Faust-Wang/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 2 | 2021-07-21T07:57:16.000Z | 2022-03-17T12:41:51.000Z | setup.py | hvourtsis/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 8 | 2021-02-27T14:29:55.000Z | 2022-01-05T19:40:38.000Z | # Do not manually invoke this setup.py, use catkin instead!
from setuptools import setup
from catkin_pkg.python_setup import generate_distutils_setup
setup_args = generate_distutils_setup(
packages=['vswarm'],
package_dir={'': 'src'}
)
setup(**setup_args)
| 22.25 | 60 | 0.764045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.277154 |
d2c38a755a40c6e19281f0cc94b831f228ba7f94 | 250 | py | Python | 实例学习Numpy与Matplotlib/创建 numpy.array.py | shao1chuan/pythonbook | cd9877d04e1e11422d38cc051e368d3d9ce2ab45 | [
"MulanPSL-1.0"
] | 95 | 2020-10-11T04:45:46.000Z | 2022-02-25T01:50:40.000Z | 实例学习Numpy与Matplotlib/创建 numpy.array.py | shao1chuan/pythonbook | cd9877d04e1e11422d38cc051e368d3d9ce2ab45 | [
"MulanPSL-1.0"
] | null | null | null | 实例学习Numpy与Matplotlib/创建 numpy.array.py | shao1chuan/pythonbook | cd9877d04e1e11422d38cc051e368d3d9ce2ab45 | [
"MulanPSL-1.0"
] | 30 | 2020-11-05T09:01:00.000Z | 2022-03-08T05:58:55.000Z |
import numpy as np
nparr = np.array([i for i in range(10)])
a = np.zeros(10)
f = np.zeros(10,dtype=float)
n = np.full((3,5),44)
r = np.random.randint(0,100,size=(3,5))
r2 = np.random.random((3,5))
x = np.linspace(0,100,50)
print(nparr,a,f,n,r,r2,x) | 22.727273 | 40 | 0.64 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2c38e45f035250f5b56f9b05cf87de9978e93b9 | 4,790 | py | Python | examples/DecryptLoginExamples/crawlers/weibomonitor/weibomonitor.py | hedou/DecryptLogin | ff86a5d378c8a42d1caebbb7482658a95053f716 | [
"Apache-2.0"
] | null | null | null | examples/DecryptLoginExamples/crawlers/weibomonitor/weibomonitor.py | hedou/DecryptLogin | ff86a5d378c8a42d1caebbb7482658a95053f716 | [
"Apache-2.0"
] | null | null | null | examples/DecryptLoginExamples/crawlers/weibomonitor/weibomonitor.py | hedou/DecryptLogin | ff86a5d378c8a42d1caebbb7482658a95053f716 | [
"Apache-2.0"
] | null | null | null | '''
Function:
微博监控
Author:
Charles
微信公众号:
Charles的皮卡丘
'''
import re
import time
from DecryptLogin import login
'''微博监控'''
class WeiboMonitor():
def __init__(self, username, password, time_interval=30):
_, self.session = self.login(username, password)
self.headers = {
'Accep... | 43.153153 | 161 | 0.571816 | 4,844 | 0.966095 | 0 | 0 | 0 | 0 | 0 | 0 | 1,421 | 0.283406 |
d2c3e3e6ef11ddd684a0bcebf23085d7e1d9152c | 1,191 | py | Python | crawlai/items/critter/base_critter.py | apockill/CreepyCrawlAI | 2862c03e686801884ffb579a7be29f3c9d0da610 | [
"MIT"
] | 13 | 2020-05-04T03:11:26.000Z | 2021-12-05T03:57:45.000Z | crawlai/items/critter/base_critter.py | apockill/CreepyCrawlAI | 2862c03e686801884ffb579a7be29f3c9d0da610 | [
"MIT"
] | null | null | null | crawlai/items/critter/base_critter.py | apockill/CreepyCrawlAI | 2862c03e686801884ffb579a7be29f3c9d0da610 | [
"MIT"
] | null | null | null | from godot.bindings import ResourceLoader
from crawlai.grid_item import GridItem
from crawlai.items.food import Food
from crawlai.math_utils import clamp
from crawlai.turn import Turn
from crawlai.position import Position
_critter_resource = ResourceLoader.load("res://Game/Critter/Critter.tscn")
class BaseCritter(G... | 24.306122 | 74 | 0.715365 | 889 | 0.746432 | 0 | 0 | 61 | 0.051217 | 0 | 0 | 80 | 0.06717 |
d2c4507ff5f2b0e60108a433da49147fd8f6e6c4 | 3,008 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/nios.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/plugins/doc_fragments/nios.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/plugins/doc_fragments/nios.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | # -*- coding: utf-8 -*-
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
options:
provider:
descriptio... | 35.809524 | 104 | 0.635306 | 2,825 | 0.939162 | 0 | 0 | 0 | 0 | 0 | 0 | 2,942 | 0.978059 |
d2c4dfb8a30f8c36fa075d277e4458a4776a5ca8 | 25,299 | py | Python | torchrec/metrics/rec_metric.py | xing-liu/torchrec | 82ffde7a69fdb9c66b79a753d6f03afa5db3f73e | [
"BSD-3-Clause"
] | 814 | 2022-02-23T17:24:14.000Z | 2022-03-31T16:52:23.000Z | torchrec/metrics/rec_metric.py | xing-liu/torchrec | 82ffde7a69fdb9c66b79a753d6f03afa5db3f73e | [
"BSD-3-Clause"
] | 89 | 2022-02-23T17:29:56.000Z | 2022-03-31T23:44:13.000Z | torchrec/metrics/rec_metric.py | xing-liu/torchrec | 82ffde7a69fdb9c66b79a753d6f03afa5db3f73e | [
"BSD-3-Clause"
] | 68 | 2022-02-23T17:42:17.000Z | 2022-03-28T06:39:55.000Z | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#!/usr/bin/env python3
import abc
import math
from collections import defaultdict, dequ... | 38.331818 | 117 | 0.616072 | 24,152 | 0.954662 | 2,183 | 0.086288 | 742 | 0.029329 | 0 | 0 | 6,644 | 0.262619 |
d2c55dd79284c9bf304a1f86538b6964cbb89f09 | 7,594 | py | Python | alison.py | johanhoiness/SlothBot | 556f9e0f67aa90543bd98889b06a4b939e30450d | [
"MIT"
] | 1 | 2017-06-28T09:24:49.000Z | 2017-06-28T09:24:49.000Z | alison.py | johanhoiness/SlothBot | 556f9e0f67aa90543bd98889b06a4b939e30450d | [
"MIT"
] | null | null | null | alison.py | johanhoiness/SlothBot | 556f9e0f67aa90543bd98889b06a4b939e30450d | [
"MIT"
] | null | null | null | __author__ = 'JohnHiness'
import sys
import os
import random
import time
import string
import connection
from time import strftime
import ceq
import json, urllib2
import thread
args = sys.argv
req_files = ['filegen.py', 'connection.py', 'commands.py', 'general.py', 'automatics.py']
for filename in req_files:
if os.... | 29.095785 | 157 | 0.658019 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,173 | 0.154464 |
d2c5679b86d58ca48ad37cdef98dbe5e554266cb | 2,364 | py | Python | pyroomacoustics/experimental/tests/test_deconvolution.py | HemaZ/pyroomacoustics | c401f829c71ff03a947f68f9b6b2f48346ae84b2 | [
"MIT"
] | 1 | 2020-02-13T14:39:37.000Z | 2020-02-13T14:39:37.000Z | pyroomacoustics/experimental/tests/test_deconvolution.py | HemaZ/pyroomacoustics | c401f829c71ff03a947f68f9b6b2f48346ae84b2 | [
"MIT"
] | null | null | null | pyroomacoustics/experimental/tests/test_deconvolution.py | HemaZ/pyroomacoustics | c401f829c71ff03a947f68f9b6b2f48346ae84b2 | [
"MIT"
] | 1 | 2021-01-14T08:42:47.000Z | 2021-01-14T08:42:47.000Z |
from unittest import TestCase
import numpy as np
from scipy.signal import fftconvolve
import pyroomacoustics as pra
# fix seed for repeatability
np.random.seed(0)
h_len = 30
x_len = 1000
SNR = 1000. # decibels
h_lp = np.fft.irfft(np.ones(5), n=h_len)
h_rand = np.random.randn(h_len)
h_hann = pra.hann(h_len, flag='... | 26.266667 | 115 | 0.630711 | 901 | 0.381134 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.092217 |
d2c5ccb03692b30b21e99cbcada633194e147414 | 7,423 | py | Python | pthelper/img_to_txt.py | hkcountryman/veg-scanner | 6b3aa4d0799c901cecdbc0f4b5ca61b0d754ab30 | [
"MIT"
] | null | null | null | pthelper/img_to_txt.py | hkcountryman/veg-scanner | 6b3aa4d0799c901cecdbc0f4b5ca61b0d754ab30 | [
"MIT"
] | null | null | null | pthelper/img_to_txt.py | hkcountryman/veg-scanner | 6b3aa4d0799c901cecdbc0f4b5ca61b0d754ab30 | [
"MIT"
] | null | null | null | import cv2 as cv
from deskew import determine_skew
import numpy as np
from PIL import Image, ImageFilter, ImageOps
from pytesseract import image_to_string
from skimage import io
from skimage.color import rgb2gray
from skimage.transform import rotate
from spellchecker import SpellChecker
import traceback
# On Windows, ... | 33.588235 | 108 | 0.649064 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,027 | 0.677219 |
d2c5ed1f81d8bfe0be0278969594e7da6dcf2781 | 3,544 | py | Python | scripts/training.py | tobinsouth/privacy-preserving-synthetic-mobility-data | fd4d1851b47e3e7304761a894b460e8345fae5db | [
"MIT"
] | null | null | null | scripts/training.py | tobinsouth/privacy-preserving-synthetic-mobility-data | fd4d1851b47e3e7304761a894b460e8345fae5db | [
"MIT"
] | null | null | null | scripts/training.py | tobinsouth/privacy-preserving-synthetic-mobility-data | fd4d1851b47e3e7304761a894b460e8345fae5db | [
"MIT"
] | null | null | null | # Params
learning_rate = 0.001
k = 0.0025
x0 =2500
epochs = 4
batch_size=16
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
import torch, numpy as np
from tqdm import tqdm
# Get the dataloader
from dataloader import get_train_test
trainStays, testStays = get_train_test(train_size=0.95, batch_siz... | 30.290598 | 110 | 0.628668 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 616 | 0.173815 |
d2c662f276d75d5cf194b16fa8615d6ac1fdca1d | 1,674 | py | Python | tests/compute/planar/test_rotateZ.py | ianna/vector | c00b258049c0ea1de46f90311849923b96068a02 | [
"BSD-3-Clause"
] | null | null | null | tests/compute/planar/test_rotateZ.py | ianna/vector | c00b258049c0ea1de46f90311849923b96068a02 | [
"BSD-3-Clause"
] | null | null | null | tests/compute/planar/test_rotateZ.py | ianna/vector | c00b258049c0ea1de46f90311849923b96068a02 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019-2021, Jonas Eschle, Jim Pivarski, Eduardo Rodrigues, and Henry Schreiner.
#
# Distributed under the 3-clause BSD license, see accompanying file LICENSE
# or https://github.com/scikit-hep/vector for details.
import numpy
import pytest
import vector.backends.numpy_
import vector.backends.object_
... | 37.2 | 94 | 0.680406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.152927 |
d2c66e24087a653bf88316c9ed3e62b1ba5b4aa5 | 3,791 | py | Python | src/RIOT/tests/pkg_tensorflow-lite/mnist/mnist_mlp.py | ARte-team/ARte | 19f17f57522e1b18ba390718fc94be246451837b | [
"MIT"
] | 2 | 2020-04-30T08:17:45.000Z | 2020-05-23T08:46:54.000Z | src/RIOT/tests/pkg_tensorflow-lite/mnist/mnist_mlp.py | ARte-team/ARte | 19f17f57522e1b18ba390718fc94be246451837b | [
"MIT"
] | null | null | null | src/RIOT/tests/pkg_tensorflow-lite/mnist/mnist_mlp.py | ARte-team/ARte | 19f17f57522e1b18ba390718fc94be246451837b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
# imports for array-handling
import numpy as np
import tensorflow as tf
# keras imports for the dataset and building our neural network
from tensorflow.keras.datasets import mnist
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout
# l... | 32.127119 | 92 | 0.759166 | 0 | 0 | 101 | 0.026642 | 0 | 0 | 0 | 0 | 1,265 | 0.333685 |
d2c77644e40785600cc8b3b66d9450e3d85ddf12 | 67 | py | Python | lang/Python/random-numbers-1.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/random-numbers-1.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/random-numbers-1.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | import random
values = [random.gauss(1, .5) for i in range(1000)]
| 16.75 | 51 | 0.686567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2c7feb7c74a18d3044bb9f836e91d4015495e7f | 155 | py | Python | src/display.py | thebruce87/Photobooth | 43ba9e9537bd51040c2cb2ffb809d7a8ca0633ef | [
"MIT"
] | null | null | null | src/display.py | thebruce87/Photobooth | 43ba9e9537bd51040c2cb2ffb809d7a8ca0633ef | [
"MIT"
] | null | null | null | src/display.py | thebruce87/Photobooth | 43ba9e9537bd51040c2cb2ffb809d7a8ca0633ef | [
"MIT"
] | null | null | null | class Display():
def __init__(self, width, height):
self.width = width
self.height = height
def getSize(self):
return (self.width, self.height)
| 19.375 | 35 | 0.690323 | 154 | 0.993548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2c876fb5f375461dc3ae3b4e7ececc7c2f8aa23 | 2,091 | py | Python | stock_api_handler.py | Sergix/analyst-server | a2ec7cc92610f78ac2a4ce4a46c52410219cd360 | [
"MIT"
] | 2 | 2020-03-16T01:09:10.000Z | 2020-03-16T03:02:57.000Z | stock_api_handler.py | Sergix/analyst-server | a2ec7cc92610f78ac2a4ce4a46c52410219cd360 | [
"MIT"
] | 1 | 2020-04-21T16:49:53.000Z | 2020-04-29T02:15:45.000Z | stock_api_handler.py | Sergix/analyst-server | a2ec7cc92610f78ac2a4ce4a46c52410219cd360 | [
"MIT"
] | 3 | 2020-03-16T14:46:41.000Z | 2020-03-21T13:55:24.000Z | # This python script handles stock api request from yfinance
# Last Updated: 4/7/2020
# Credits:nóto
#Import yfinance api lib
import yfinance as yf
#Import pandas lib
import pandas as pd
#Import json to manipulate api data
import json
#Import math
import math
class StockApi():
def __init__(self):
self.pan... | 35.440678 | 109 | 0.648015 | 1,828 | 0.873805 | 0 | 0 | 0 | 0 | 0 | 0 | 770 | 0.368069 |
d2c9cfe9e4e2384aabafbe6f290a4052329e6bc7 | 1,493 | py | Python | hth/shows/tests/factories.py | roperi/myband | ec1955626fe6997484fd92ed02127b6899cd7062 | [
"MIT"
] | 1 | 2016-04-12T17:38:26.000Z | 2016-04-12T17:38:26.000Z | hth/shows/tests/factories.py | bhrutledge/jahhills.com | 74fe94a214f1ed5681bd45159315f0b68daf5a33 | [
"MIT"
] | 92 | 2015-04-03T10:04:55.000Z | 2021-07-17T11:13:52.000Z | hth/shows/tests/factories.py | roperi/myband | ec1955626fe6997484fd92ed02127b6899cd7062 | [
"MIT"
] | 1 | 2021-01-26T18:02:49.000Z | 2021-01-26T18:02:49.000Z | from datetime import date
from random import randrange
import factory
import factory.fuzzy
from hth.core.tests.utils import from_today
class VenueFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'shows.Venue'
name = factory.Sequence(lambda n: 'Venue %d' % n)
city = factory.Sequ... | 26.192982 | 77 | 0.704622 | 1,340 | 0.897522 | 0 | 0 | 332 | 0.222371 | 0 | 0 | 169 | 0.113195 |
d2ca30ab580a71ee2a0484e370c2d881b8376a24 | 2,143 | py | Python | homeassistant/components/eight_sleep/binary_sensor.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 22,481 | 2020-03-02T13:09:59.000Z | 2022-03-31T23:34:28.000Z | homeassistant/components/eight_sleep/binary_sensor.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | homeassistant/components/eight_sleep/binary_sensor.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 11,411 | 2020-03-02T14:19:20.000Z | 2022-03-31T22:46:07.000Z | """Support for Eight Sleep binary sensors."""
from __future__ import annotations
import logging
from pyeight.eight import EightSleep
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.enti... | 27.474359 | 86 | 0.691087 | 860 | 0.401307 | 0 | 0 | 167 | 0.077928 | 658 | 0.307046 | 265 | 0.123658 |
d2cb2cb149ab4d390a0fe9859ee6b67392f9a4c2 | 3,384 | py | Python | tensorbay/opendataset/FLIC/loader.py | rexzheng324-c/tensorbay-python-sdk | 764c28f34069229daa41474e2f104786dbfa973f | [
"MIT"
] | null | null | null | tensorbay/opendataset/FLIC/loader.py | rexzheng324-c/tensorbay-python-sdk | 764c28f34069229daa41474e2f104786dbfa973f | [
"MIT"
] | null | null | null | tensorbay/opendataset/FLIC/loader.py | rexzheng324-c/tensorbay-python-sdk | 764c28f34069229daa41474e2f104786dbfa973f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=invalid-name
# pylint: disable=missing-module-docstring
import os
from typing import Any, Dict, Iterator, Tuple
from tensorbay.dataset import Data, Dataset
from tensorbay.exception import ModuleImportError
from tensorba... | 31.924528 | 89 | 0.638889 | 0 | 0 | 1,454 | 0.429669 | 0 | 0 | 0 | 0 | 959 | 0.283392 |
d2cb4dbefc7f4606adaa9b77d466de95f1e38071 | 3,925 | py | Python | my_answers/homework/OOP/athlete.py | eyalle/python_course | acc75fd3c81f69f314099051026c81d80d141a84 | [
"MIT"
] | null | null | null | my_answers/homework/OOP/athlete.py | eyalle/python_course | acc75fd3c81f69f314099051026c81d80d141a84 | [
"MIT"
] | null | null | null | my_answers/homework/OOP/athlete.py | eyalle/python_course | acc75fd3c81f69f314099051026c81d80d141a84 | [
"MIT"
] | null | null | null |
def get_time(time_in_seconds):
import datetime
time_str = str(datetime.timedelta(time_in_seconds))
time_fractions = time_str.split(":")
time_fractions[0] = time_fractions[0].replace(",","")
time_fractions[-1] += 's'
time_fractions[-2] += 'm'
time_fractions[-3] += 'h'
# print(time_fracti... | 39.25 | 125 | 0.642803 | 2,799 | 0.713121 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.087389 |
d2cbe0ce287e68ba03cda24086915b54c95f413e | 3,391 | py | Python | osisoft/pidevclub/piwebapi/models/pi_data_server_license.py | jugillar/PI-Web-API-Client-Python | 9652e18384d8c66194c6d561d5ef01f60d820253 | [
"Apache-2.0"
] | 30 | 2019-01-03T03:09:25.000Z | 2022-03-30T17:42:54.000Z | osisoft/pidevclub/piwebapi/models/pi_data_server_license.py | jugillar/PI-Web-API-Client-Python | 9652e18384d8c66194c6d561d5ef01f60d820253 | [
"Apache-2.0"
] | null | null | null | osisoft/pidevclub/piwebapi/models/pi_data_server_license.py | jugillar/PI-Web-API-Client-Python | 9652e18384d8c66194c6d561d5ef01f60d820253 | [
"Apache-2.0"
] | 46 | 2018-11-07T14:46:35.000Z | 2022-03-31T12:23:39.000Z | # coding: utf-8
"""
Copyright 2018 OSIsoft, LLC
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 t... | 23.548611 | 118 | 0.714833 | 2,745 | 0.809496 | 0 | 0 | 830 | 0.244766 | 0 | 0 | 875 | 0.258036 |
d2ccb686d34873a1a30c9b50f3a2bad12ac217e0 | 4,054 | py | Python | bot.py | JavierOramas/scholar_standing_bot | 9afde1fc0d56a3c57cf281092ff5c3d123ddac2f | [
"MIT"
] | null | null | null | bot.py | JavierOramas/scholar_standing_bot | 9afde1fc0d56a3c57cf281092ff5c3d123ddac2f | [
"MIT"
] | null | null | null | bot.py | JavierOramas/scholar_standing_bot | 9afde1fc0d56a3c57cf281092ff5c3d123ddac2f | [
"MIT"
] | 2 | 2021-09-19T21:08:55.000Z | 2021-09-19T21:09:39.000Z | #! /root/anaconda3/bin/python
import os
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from pyrogram import Client, filters
from read_config import read_config
import json
import requests
import schedule
import time
def get_value_usd(sum):
price = requests.get('https://api.coingecko.com/api/v3/simple/... | 30.712121 | 228 | 0.619142 | 0 | 0 | 0 | 0 | 3,050 | 0.751787 | 0 | 0 | 1,387 | 0.341878 |
d2d16238955afe2195185ab27a0954cf27e01b00 | 7,622 | py | Python | skdecide/discrete_optimization/rcpsp_multiskill/parser/rcpsp_multiskill_parser.py | emilienDespres/scikit-decide | 2a3dd2d93e5e6d07984e1bc02b6e969261aeefbc | [
"MIT"
] | 27 | 2020-11-23T11:45:31.000Z | 2022-03-22T08:08:00.000Z | skdecide/discrete_optimization/rcpsp_multiskill/parser/rcpsp_multiskill_parser.py | emilienDespres/scikit-decide | 2a3dd2d93e5e6d07984e1bc02b6e969261aeefbc | [
"MIT"
] | 94 | 2021-02-24T09:50:23.000Z | 2022-02-27T10:07:15.000Z | skdecide/discrete_optimization/rcpsp_multiskill/parser/rcpsp_multiskill_parser.py | emilienDespres/scikit-decide | 2a3dd2d93e5e6d07984e1bc02b6e969261aeefbc | [
"MIT"
] | 12 | 2020-12-08T10:38:26.000Z | 2021-10-01T09:17:04.000Z | # Copyright (c) AIRBUS and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations
from typing import Dict, Tuple
from skdecide.discrete_optimization.rcpsp_multiskill.rcpsp_multiskill import (
E... | 39.697917 | 126 | 0.494358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,699 | 0.222907 |
d2d1d69838e8dd6599bd00b4fca0bacfaf367308 | 530 | py | Python | pipe_anchorages/logging_monkeypatch.py | GlobalFishingWatch/anchorages_pipeline | 88764545b693bfb65fc7a7f62a344fb2afbc3d97 | [
"Apache-2.0"
] | 3 | 2017-12-22T10:19:15.000Z | 2020-04-20T10:28:43.000Z | pipe_tools/beam/logging_monkeypatch.py | GlobalFishingWatch/pipe-tools | 34dff591997bb2c25e018df86d13a9d42972032b | [
"Apache-2.0"
] | 37 | 2017-10-22T12:00:59.000Z | 2022-02-08T19:17:58.000Z | pipe_tools/beam/logging_monkeypatch.py | GlobalFishingWatch/pipe-tools | 34dff591997bb2c25e018df86d13a9d42972032b | [
"Apache-2.0"
] | 3 | 2018-01-21T14:07:58.000Z | 2021-07-28T16:02:20.000Z | import logging
# monkey patch to suppress the annoying warning you get when you import apache_beam
#
# No handlers could be found for logger "oauth2client.contrib.multistore_file"
#
# This warning is harmless, but annooying when you are using beam from a command line app
# see: https://issues.apache.org/jira/browse/BE... | 33.125 | 89 | 0.792453 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 416 | 0.784906 |
d2d2f4b2d01e6090619cd23b148cfe0e1bc36f87 | 330 | py | Python | core/managers.py | Bilal815/ecommerce_storee | 45e61f1d865a65b4c52d74502b4fcab7ee6c1adf | [
"MIT"
] | 95 | 2020-04-13T09:02:30.000Z | 2022-03-25T14:11:34.000Z | core/managers.py | Bilal815/ecommerce_api | a3d8ce7a9e1fa2528d240d5ab508afe92607c9f8 | [
"MIT"
] | 87 | 2020-02-21T17:58:56.000Z | 2022-03-21T21:37:05.000Z | core/managers.py | Bilal815/ecommerce_api | a3d8ce7a9e1fa2528d240d5ab508afe92607c9f8 | [
"MIT"
] | 33 | 2021-01-18T09:30:29.000Z | 2022-03-30T01:31:57.000Z | from django.db import models
class SoftDeleteManager(models.Manager):
def save_soft_delete(self):
self.is_deleted = True
self.save()
return True
def get_soft_delete(self):
return self.filter(is_deleted=True)
def get_unsoft_delete(self):
return self.filter(is_delet... | 22 | 44 | 0.681818 | 298 | 0.90303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2d2fa8cda2955386068decf56b4b942626e5d83 | 22,286 | py | Python | mizani/breaks.py | stillmatic/mizani | 9a9dcb2b2ae8fca9a1c5b5e475be4d1f801bda1c | [
"BSD-3-Clause"
] | null | null | null | mizani/breaks.py | stillmatic/mizani | 9a9dcb2b2ae8fca9a1c5b5e475be4d1f801bda1c | [
"BSD-3-Clause"
] | null | null | null | mizani/breaks.py | stillmatic/mizani | 9a9dcb2b2ae8fca9a1c5b5e475be4d1f801bda1c | [
"BSD-3-Clause"
] | null | null | null | """
All scales have a means by which the values that are mapped
onto the scale are interpreted. Numeric digital scales put
out numbers for direct interpretation, but most scales
cannot do this. What they offer is named markers/ticks that
aid in assessing the values e.g. the common odometer will
have ticks and values to... | 28.793282 | 75 | 0.531634 | 20,661 | 0.927084 | 0 | 0 | 477 | 0.021404 | 0 | 0 | 10,007 | 0.449026 |
d2d32938d031d59331d2f4a11e7ede6bb4a40fe0 | 2,412 | py | Python | examples/04_sweep_wind_directions.py | ElieKadoche/floris | d18f4d263ecabf502242592f9d60815a07c7b89c | [
"Apache-2.0"
] | null | null | null | examples/04_sweep_wind_directions.py | ElieKadoche/floris | d18f4d263ecabf502242592f9d60815a07c7b89c | [
"Apache-2.0"
] | 1 | 2019-03-02T00:29:12.000Z | 2019-03-02T04:59:54.000Z | examples/04_sweep_wind_directions.py | ElieKadoche/floris | d18f4d263ecabf502242592f9d60815a07c7b89c | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 NREL
# 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
# distri... | 31.736842 | 95 | 0.76534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,558 | 0.645937 |
d2d3e9419d90d8f17a71b13f9d3381c03813b4d4 | 623 | py | Python | 1.main.py | learning-nn/nn_from_scratch | 8f8f46efd5814a3cca645b644f70ddc07210256f | [
"MIT"
] | null | null | null | 1.main.py | learning-nn/nn_from_scratch | 8f8f46efd5814a3cca645b644f70ddc07210256f | [
"MIT"
] | null | null | null | 1.main.py | learning-nn/nn_from_scratch | 8f8f46efd5814a3cca645b644f70ddc07210256f | [
"MIT"
] | null | null | null | import numpy
import numpy as np
# converting to a layer with 4 input and 3 neuron
inputs = [[1.2, 2.1, 3.4, 1.2],
[1.2, 2.1, 3.4, 1.2],
[1.2, 2.1, 3.4, 1.2]]
print(numpy.shape(inputs))
weights = [[4.1, -4.5, 3.1, 2.3],
[-4.1, 4.5, 2.1, 2.3],
[4.1, 4.5, 3.1, -2.3]]
print(numpy... | 23.961538 | 71 | 0.536116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.078652 |
d2d3eacc8c8caee95603f50b68c177c406992381 | 83 | py | Python | backend/grant/task/__init__.py | DSBUGAY2/zcash-grant-system | 729b9edda13bd1eeb3f445d889264230c6470d7e | [
"MIT"
] | 8 | 2019-06-03T16:29:49.000Z | 2021-05-11T20:38:36.000Z | backend/grant/task/__init__.py | DSBUGAY2/zcash-grant-system | 729b9edda13bd1eeb3f445d889264230c6470d7e | [
"MIT"
] | 342 | 2019-01-15T19:13:58.000Z | 2020-03-24T16:38:13.000Z | backend/grant/task/__init__.py | DSBUGAY2/zcash-grant-system | 729b9edda13bd1eeb3f445d889264230c6470d7e | [
"MIT"
] | 5 | 2019-02-15T09:06:47.000Z | 2022-01-24T21:38:41.000Z | from . import models
from . import views
from . import commands
from . import jobs | 16.6 | 22 | 0.759036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |