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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
042cef1b04899572fbadfca55ccfcbd5ddae72ee | 826 | py | Python | ghostIm/oneBitGen.py | acyanbird/flappyGhost | 28cecd35a1b405e9c1f0b93c97e1a41a82bf0b92 | [
"WTFPL"
] | 2 | 2022-02-21T01:11:58.000Z | 2022-02-27T15:12:38.000Z | ghostIm/oneBitGen.py | acyanbird/flappyGhost | 28cecd35a1b405e9c1f0b93c97e1a41a82bf0b92 | [
"WTFPL"
] | null | null | null | ghostIm/oneBitGen.py | acyanbird/flappyGhost | 28cecd35a1b405e9c1f0b93c97e1a41a82bf0b92 | [
"WTFPL"
] | null | null | null | from PIL import Image
def img2coe(name):
img = Image.open(name)
img = img.convert("1")
width, height = img.size
output_file = name.split('.')[0] + ".coe"
f = open(output_file, "w")
# using the 16, so change radix to 16, can be 2(binary), 10(decimal), 16(hex)
f.write("memory_initializat... | 25.030303 | 81 | 0.547215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.322034 |
042d96c35e9f7f0bf2fb17cb3dd402631cdff742 | 473 | py | Python | cursoEmVideo/Python/Mundo 2/Exercicios/Ex067.py | VictorDG00/Cursos | b1411f3179ef17f128c883b0f5a56c2478de45e8 | [
"MIT"
] | 2 | 2021-02-08T13:34:15.000Z | 2021-02-08T19:43:42.000Z | cursoEmVideo/Python/Mundo 2/Exercicios/Ex067.py | VictorDG00/Cursos | b1411f3179ef17f128c883b0f5a56c2478de45e8 | [
"MIT"
] | null | null | null | cursoEmVideo/Python/Mundo 2/Exercicios/Ex067.py | VictorDG00/Cursos | b1411f3179ef17f128c883b0f5a56c2478de45e8 | [
"MIT"
] | null | null | null | # faça um programa que mostre a tabuada de varios numeros
# um de cada vez, para cada valor digitado
# o programa sera interrompido quando for solicityado um numero negativo
while True:
multiplicado = int(input('Digite um numero para ver sua tabuada: '))
for tab in range(1, 11):
print(f'{multiplicado}x... | 33.785714 | 72 | 0.691332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.639241 |
042f01e87ae3c4cbb27a11e0655de18410d4c635 | 818 | py | Python | events/migrations/0002_auto_20210501_1442.py | seanyoung247/TWCoulsdon | 870ae7e8ea6a3fc23d24fe21bbb21965cdbab27b | [
"MIT"
] | 1 | 2021-12-28T15:43:39.000Z | 2021-12-28T15:43:39.000Z | events/migrations/0002_auto_20210501_1442.py | seanyoung247/TWCoulsdon | 870ae7e8ea6a3fc23d24fe21bbb21965cdbab27b | [
"MIT"
] | 5 | 2021-05-14T22:46:26.000Z | 2021-05-26T02:18:46.000Z | events/migrations/0002_auto_20210501_1442.py | seanyoung247/TWCoulsdon | 870ae7e8ea6a3fc23d24fe21bbb21965cdbab27b | [
"MIT"
] | 1 | 2021-05-29T18:24:49.000Z | 2021-05-29T18:24:49.000Z | # Generated by Django 3.2 on 2021-05-01 14:42
from django.db import migrations, models
import easy_thumbnails.fields
import embed_video.fields
class Migration(migrations.Migration):
dependencies = [
('events', '0001_initial'),
]
operations = [
migrations.AddField(
model_name... | 26.387097 | 100 | 0.601467 | 671 | 0.820293 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.141809 |
042f5abcee94ea90c313bab39cfcbe9ccffaafb9 | 6,748 | py | Python | python/utils.py | JonathanAMichaels/NeuropixelsRegistration | b2623f0777b12c72ab304f7f2c1477e9954ef54a | [
"MIT"
] | null | null | null | python/utils.py | JonathanAMichaels/NeuropixelsRegistration | b2623f0777b12c72ab304f7f2c1477e9954ef54a | [
"MIT"
] | null | null | null | python/utils.py | JonathanAMichaels/NeuropixelsRegistration | b2623f0777b12c72ab304f7f2c1477e9954ef54a | [
"MIT"
] | null | null | null | import numpy as np
from scipy.io import loadmat
import os
import logging
from scipy.signal import butter, filtfilt
def mat2npy(mat_chanmap_dir):
mat_chanmap = loadmat(mat_chanmap_dir)
x = mat_chanmap['xcoords']
y = mat_chanmap['ycoords']
npy_chanmap = np.hstack([x,y])
#np.save('chanmap.npy', n... | 27.769547 | 91 | 0.621962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,448 | 0.510966 |
043096d9c304faa314eb3f6d6324739396959dcd | 9,024 | py | Python | fairseq/models/wav2vec/wav2vec2_cif_bert.py | eastonYi/fairseq | 3cec3773990ddc0487aae7f2f253edbe591f973c | [
"MIT"
] | null | null | null | fairseq/models/wav2vec/wav2vec2_cif_bert.py | eastonYi/fairseq | 3cec3773990ddc0487aae7f2f253edbe591f973c | [
"MIT"
] | null | null | null | fairseq/models/wav2vec/wav2vec2_cif_bert.py | eastonYi/fairseq | 3cec3773990ddc0487aae7f2f253edbe591f973c | [
"MIT"
] | null | null | null | # 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.
import copy
import contextlib
import torch
import torch.nn.functional as F
from typing import List, Tuple, Dict, Optional
from transformers imp... | 34.707692 | 103 | 0.630762 | 6,588 | 0.730053 | 0 | 0 | 6,813 | 0.754987 | 0 | 0 | 1,250 | 0.13852 |
0430aa9e29f2dc11a3655c69ef15ad30f7e0af32 | 3,250 | py | Python | 2/src/3_2D_ritter.py | dsanmartin/IPM468-PJ | d0cdd030498bdca590cfa907941679db6438b1b9 | [
"BSD-3-Clause"
] | null | null | null | 2/src/3_2D_ritter.py | dsanmartin/IPM468-PJ | d0cdd030498bdca590cfa907941679db6438b1b9 | [
"BSD-3-Clause"
] | null | null | null | 2/src/3_2D_ritter.py | dsanmartin/IPM468-PJ | d0cdd030498bdca590cfa907941679db6438b1b9 | [
"BSD-3-Clause"
] | null | null | null | import pathlib
import numpy as np
from dambreak import Experiment2D
from plot import plot2D, plot3D, quiver
#%% Initial condition
def h0_(x, y, x0, y0, h0):
H = np.zeros_like(x)
idx = np.array((x <= x0) & (y <= y0))
H[idx] = h0
return H
#%%Parameters
h_0 = 40
x0 = 1000
y0 = 1000
L = 2000
T = 40
Nx = 100
Ny = ... | 27.083333 | 127 | 0.548923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 463 | 0.142462 |
04317857b939c2cd80e35a253468a62b54df8cd9 | 1,025 | py | Python | realsense/manual/cluster.py | mrzhuzhe/yunru | faa7380a5363f654f1dc8f5d53b077d9f33bff6f | [
"MIT"
] | null | null | null | realsense/manual/cluster.py | mrzhuzhe/yunru | faa7380a5363f654f1dc8f5d53b077d9f33bff6f | [
"MIT"
] | null | null | null | realsense/manual/cluster.py | mrzhuzhe/yunru | faa7380a5363f654f1dc8f5d53b077d9f33bff6f | [
"MIT"
] | null | null | null | # 聚类
# 需要移除远处点
import open3d as o3d
import numpy as np
import matplotlib.pyplot as plt
sourcePath="./zz_test_panda/scene/integrated.ply"
tatgetPath="./zz_test_panda/scene/cropped_1.ply"
# 加载点云
print("Load a ply point cloud, print it, and render it")
pcd = o3d.io.read_point_cloud(sourcePath)
with o3d.utility.Verbosi... | 35.344828 | 89 | 0.736585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 219 | 0.208373 |
0431b86b5fec8a3a6766b7ed7c6bc620c17ad76e | 86 | py | Python | functionalities.py | Dilkovak/Naggy-Bot | 7727a77d1916336d6f3f52efc40437a9d1ae960b | [
"MIT"
] | null | null | null | functionalities.py | Dilkovak/Naggy-Bot | 7727a77d1916336d6f3f52efc40437a9d1ae960b | [
"MIT"
] | null | null | null | functionalities.py | Dilkovak/Naggy-Bot | 7727a77d1916336d6f3f52efc40437a9d1ae960b | [
"MIT"
] | null | null | null | import random
def coinflip():
# print(random.random())
return random.random() | 17.2 | 28 | 0.674419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.27907 |
0436d3f10986a9986bb88f66529f9631838fc465 | 295 | py | Python | class2/demo3.py | sanderslhc/python-learing | 2769f72c9b6de24d768175bed1aa9851d0469d19 | [
"MIT"
] | 1 | 2021-07-20T09:52:55.000Z | 2021-07-20T09:52:55.000Z | class2/demo3.py | sanderslhc/python-learning | 2769f72c9b6de24d768175bed1aa9851d0469d19 | [
"MIT"
] | null | null | null | class2/demo3.py | sanderslhc/python-learning | 2769f72c9b6de24d768175bed1aa9851d0469d19 | [
"MIT"
] | null | null | null | #多分支结构
score=int(input('请输入成绩'))
#判断
if score>=90 and score<=100:
print('A')
elif score>=80 and score<=89:
print('B')
elif score>=70 and score<=79:
print('C')
elif score>=60 and score<=69:
print('D')
elif score>=0 and score<=59:
print('E')
else:
print('无效') | 19.666667 | 30 | 0.572881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.201238 |
0437a3c33994a58eba5b0112b7cbac4e87e6fafd | 8,126 | py | Python | lib/sdf/sdf_optimizer.py | phschoepf/PoseCNN-PyTorch | e2a67dbb37b695474d5fd93b07e85aa297293d7e | [
"BSD-Source-Code"
] | 85 | 2020-12-13T22:30:11.000Z | 2022-03-21T10:30:57.000Z | lib/sdf/sdf_optimizer.py | phschoepf/PoseCNN-PyTorch | e2a67dbb37b695474d5fd93b07e85aa297293d7e | [
"BSD-Source-Code"
] | 24 | 2021-01-08T06:02:40.000Z | 2022-03-18T13:01:53.000Z | lib/sdf/sdf_optimizer.py | phschoepf/PoseCNN-PyTorch | e2a67dbb37b695474d5fd93b07e85aa297293d7e | [
"BSD-Source-Code"
] | 24 | 2021-01-03T06:48:17.000Z | 2022-02-27T00:27:07.000Z | # Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
# This work is licensed under the NVIDIA Source Code License - Non-commercial. Full
# text can be found in LICENSE.md
import sys
import cv2
import time
from .sdf_utils import *
import _init_paths
from fcn.config import cfg
from layers.sdf_matching_loss impo... | 40.63 | 144 | 0.563992 | 7,793 | 0.95902 | 0 | 0 | 0 | 0 | 0 | 0 | 996 | 0.12257 |
043875b930e6d05d2634154e8b1a9777e170c2cc | 10,563 | py | Python | src/game_elements/Map.py | crazyStewie/ProjetoJojinho | 04657ebfcbbf940c250721a8fe00d79af0bd927c | [
"MIT"
] | null | null | null | src/game_elements/Map.py | crazyStewie/ProjetoJojinho | 04657ebfcbbf940c250721a8fe00d79af0bd927c | [
"MIT"
] | null | null | null | src/game_elements/Map.py | crazyStewie/ProjetoJojinho | 04657ebfcbbf940c250721a8fe00d79af0bd927c | [
"MIT"
] | null | null | null | from pymunk.vec2d import Vec2d
from src.utils import AngleHelper
import pymunk
class Map:
def __init__(self):
self.crossings = []
self.streets = []
self.STREET_WIDTH = 50
self.SIDEWALK_WIDTH = 60
self.sidewalk_crossings = []
self.sidewalks = []
self.distance... | 55.303665 | 117 | 0.586102 | 10,481 | 0.992237 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.010698 |
0438c8f80da4005db7ce794a5dd25fc90d51a567 | 2,110 | py | Python | custom_components/magic_lights/setup_tasks/create_living_space.py | justanotherariel/hass_MagicLights | 61ac0db1f7c3575e52912b372176d45e647b728e | [
"MIT"
] | null | null | null | custom_components/magic_lights/setup_tasks/create_living_space.py | justanotherariel/hass_MagicLights | 61ac0db1f7c3575e52912b372176d45e647b728e | [
"MIT"
] | null | null | null | custom_components/magic_lights/setup_tasks/create_living_space.py | justanotherariel/hass_MagicLights | 61ac0db1f7c3575e52912b372176d45e647b728e | [
"MIT"
] | null | null | null | from __future__ import annotations
import asyncio
import logging
from custom_components.magic_lights.setup_tasks.task import SetupTask
from custom_components.magic_lights.helpers.service_call import create_async_call
from typing import Dict, Tuple
from custom_components.magic_lights.magicbase.share import get_magic
f... | 24.252874 | 81 | 0.667773 | 351 | 0.166351 | 0 | 0 | 0 | 0 | 234 | 0.1109 | 196 | 0.092891 |
043990336053a8c30d65aae2c3797d6e1d5d4f40 | 2,382 | py | Python | layouts/landing_page.py | nikitcha/ceebios-biowser | d416a026d14dc410f5d1e48190f8a6ba74e97998 | [
"MIT"
] | null | null | null | layouts/landing_page.py | nikitcha/ceebios-biowser | d416a026d14dc410f5d1e48190f8a6ba74e97998 | [
"MIT"
] | null | null | null | layouts/landing_page.py | nikitcha/ceebios-biowser | d416a026d14dc410f5d1e48190f8a6ba74e97998 | [
"MIT"
] | null | null | null | import dash_html_components as html
import dash
app = dash.Dash(__name__)
style_div = {'display': 'flex','flex-wrap': 'wrap', 'padding':'20px'}
style_text = {'width': '500px', 'padding':'20px'}
div_octo = html.Div([
html.Div([html.Img(src=app.get_asset_url('planet1.jpg'), width="500px")]),
html.Div([
... | 47.64 | 302 | 0.626784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,181 | 0.495802 |
043b52518e89dcaaaeab64ad5579462c5d5febe7 | 1,405 | py | Python | examples/network_diagram.py | community-fabric/python-ipfabric-diagrams | 55de2ff36c853f9ed13a804768ee0f0ca5eeb467 | [
"MIT"
] | 1 | 2022-02-14T10:14:25.000Z | 2022-02-14T10:14:25.000Z | examples/network_diagram.py | community-fabric/python-ipfabric-diagrams | 55de2ff36c853f9ed13a804768ee0f0ca5eeb467 | [
"MIT"
] | 9 | 2022-02-08T19:25:47.000Z | 2022-02-16T19:29:41.000Z | examples/network_diagram.py | community-fabric/python-ipfabric-diagrams | 55de2ff36c853f9ed13a804768ee0f0ca5eeb467 | [
"MIT"
] | 2 | 2022-02-01T18:26:31.000Z | 2022-02-02T19:02:36.000Z | """
network_diagram.py
"""
from ipfabric_diagrams import IPFDiagram, Network, NetworkSettings, VALID_NET_PROTOCOLS, Layout
if __name__ == '__main__':
ipf = IPFDiagram()
net = Network(sites=['MPLS', 'LAB01'], all_network=True)
json_data = ipf.diagram_json(net)
model_data = ipf.diagram_model(net)
w... | 32.674419 | 95 | 0.687544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.158007 |
043b92e9fc3c08c42abcd8a0ffd5711626dda83e | 878 | py | Python | msteams/adaptivecard/containers/fact_set.py | HarshadRanganathan/pyteams | d9ced98281e594b454ab7d98dce5b997d1711c8b | [
"MIT"
] | 6 | 2019-08-09T05:29:25.000Z | 2021-08-02T10:27:51.000Z | msteams/adaptivecard/containers/fact_set.py | HarshadRanganathan/pyteams | d9ced98281e594b454ab7d98dce5b997d1711c8b | [
"MIT"
] | 3 | 2020-03-24T17:06:42.000Z | 2021-02-02T22:11:50.000Z | msteams/adaptivecard/containers/fact_set.py | HarshadRanganathan/pyteams | d9ced98281e594b454ab7d98dce5b997d1711c8b | [
"MIT"
] | 3 | 2019-10-07T21:59:25.000Z | 2021-11-18T09:12:56.000Z | from msteams.adaptivecard.containers.layout import Layout
class FactSet(Layout):
"""
FactSet element displays a series of facts (i.e. name/value pairs) in a tabular form
"""
FACTS = 'facts'
def __init__(self, spacing=None, separator=None):
"""
:param spacing: amount of spacing
... | 28.322581 | 88 | 0.592255 | 817 | 0.930524 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.392938 |
043caa4a27e42e50eb3c3d0263e33d97780cb0a2 | 6,057 | py | Python | tests/functional/conftest.py | andreakropp/datarobot-user-models | 423ab8c703a545491ad6013a0b7efa3119e2c0fc | [
"Apache-2.0"
] | null | null | null | tests/functional/conftest.py | andreakropp/datarobot-user-models | 423ab8c703a545491ad6013a0b7efa3119e2c0fc | [
"Apache-2.0"
] | null | null | null | tests/functional/conftest.py | andreakropp/datarobot-user-models | 423ab8c703a545491ad6013a0b7efa3119e2c0fc | [
"Apache-2.0"
] | null | null | null | import os
import uuid
import warnings
import datarobot as dr
import pytest
from dr_usertool.datarobot_user_database import DataRobotUserDatabase
from dr_usertool.utils import get_permissions
from tests.drum.constants import TESTS_DATA_PATH, PUBLIC_DROPIN_ENVS_PATH
ENDPOINT_URL = "http://localhost/api/v2"
def dr_us... | 35.215116 | 100 | 0.746409 | 0 | 0 | 0 | 0 | 5,396 | 0.89087 | 0 | 0 | 942 | 0.155523 |
0441025076cf40e78b85477fb35263fe77deca58 | 5,464 | py | Python | test/units/modules/network/f5/test_bigip_policy.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | test/units/modules/network/f5/test_bigip_policy.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | test/units/modules/network/f5/test_bigip_policy.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import sys
from nose.plugins.skip import SkipTest
i... | 32.141176 | 91 | 0.64202 | 3,247 | 0.594253 | 0 | 0 | 0 | 0 | 0 | 0 | 876 | 0.160322 |
04411ddb9c08843c7fce53cffbe76f07e4b16489 | 58 | py | Python | experiments/spooky-mouse.py | Nithanaroy/invisible-pen | d6e69e20866b2992b5c2c5b47d623a693bed3134 | [
"MIT"
] | null | null | null | experiments/spooky-mouse.py | Nithanaroy/invisible-pen | d6e69e20866b2992b5c2c5b47d623a693bed3134 | [
"MIT"
] | 6 | 2020-07-19T07:33:33.000Z | 2022-03-27T04:52:28.000Z | experiments/spooky-mouse.py | Nithanaroy/invisible-pen | d6e69e20866b2992b5c2c5b47d623a693bed3134 | [
"MIT"
] | null | null | null | import pyautogui
pyautogui.moveTo(2317, 425, duration=1)
| 14.5 | 39 | 0.793103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
04428cad6e41d07f787bb5f233146087def3d4cc | 50 | py | Python | __main__.py | wwakabobik/openweather_pws | bda08b550982b7e3d797a57c23ae97d4d4ececf7 | [
"MIT"
] | null | null | null | __main__.py | wwakabobik/openweather_pws | bda08b550982b7e3d797a57c23ae97d4d4ececf7 | [
"MIT"
] | null | null | null | __main__.py | wwakabobik/openweather_pws | bda08b550982b7e3d797a57c23ae97d4d4ececf7 | [
"MIT"
] | null | null | null | from openweather_pws import Station, Measurements
| 25 | 49 | 0.88 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
044384aad57c8b47c884459c4de588bd7b7bdff9 | 2,731 | py | Python | main.py | JakeSichley/Discord-Bot | 4fd968a0e588f8ea3ea5a8e6636b0d1579eb974b | [
"MIT"
] | 1 | 2021-05-13T01:57:16.000Z | 2021-05-13T01:57:16.000Z | main.py | JakeSichley/Discord-Bot | 4fd968a0e588f8ea3ea5a8e6636b0d1579eb974b | [
"MIT"
] | null | null | null | main.py | JakeSichley/Discord-Bot | 4fd968a0e588f8ea3ea5a8e6636b0d1579eb974b | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 Jake Sichley
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... | 32.129412 | 114 | 0.696814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,644 | 0.601977 |
04446591d618aa90ff9944a3d3bb5ea29803ace3 | 415 | py | Python | tests/test_lighting.py | HighCWu/neural-renderer-paddle | c5c8375b0400a0b7722ab893e46ca706153b5a43 | [
"MIT"
] | 14 | 2021-12-11T10:37:14.000Z | 2022-01-04T05:34:59.000Z | tests/test_lighting.py | HighCWu/neural-renderer-paddle | c5c8375b0400a0b7722ab893e46ca706153b5a43 | [
"MIT"
] | null | null | null | tests/test_lighting.py | HighCWu/neural-renderer-paddle | c5c8375b0400a0b7722ab893e46ca706153b5a43 | [
"MIT"
] | 1 | 2021-12-17T05:30:24.000Z | 2021-12-17T05:30:24.000Z | import unittest
import paddle
import neural_renderer_paddle as nr
class TestLighting(unittest.TestCase):
def test_case1(self):
"""Test whether it is executable."""
faces = paddle.randn([64, 16, 3, 3], dtype=paddle.float32)
textures = paddle.randn([64, 16, 8, 8, 8, 3], dtype=paddle.fl... | 20.75 | 75 | 0.653012 | 294 | 0.708434 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.110843 |
044584bfb16a9cd74a91b6362bd86d9a6c685e01 | 4,709 | py | Python | InterpretationTechniques/featureExamination/iceForPredictor.py | HelenaMaria112/PredictionInterpreter | d87f0386114da76df8c84025d4a23ea04dd142d4 | [
"MIT"
] | 1 | 2020-04-17T08:42:05.000Z | 2020-04-17T08:42:05.000Z | InterpretationTechniques/featureExamination/iceForPredictor.py | HelenaMaria112/PredictionInterpreter | d87f0386114da76df8c84025d4a23ea04dd142d4 | [
"MIT"
] | null | null | null | InterpretationTechniques/featureExamination/iceForPredictor.py | HelenaMaria112/PredictionInterpreter | d87f0386114da76df8c84025d4a23ea04dd142d4 | [
"MIT"
] | null | null | null | '''
Created on 04.10.2019
@author: areb
'''
import pycebox.ice as pIce
from Connections.predictor import *
import matplotlib.pyplot as plt
from InterpretationTechniques.PlotAndShow import *
# https://github.com/AustinRochford/PyCEbox/blob/master/pycebox/ice.py
def plotIce(data, pr):
'''
:param data: pandas da... | 39.241667 | 91 | 0.556806 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 736 | 0.156296 |
0447af988a6ba77384680fe4e01e6a7e24dba0af | 2,253 | py | Python | src/ch3/generatefeedvector.py | amolnayak311/Programming-Collective-Intelligence | eaa55c3989a8d36e7b766fbaba267b4cbaedf5be | [
"Apache-2.0"
] | null | null | null | src/ch3/generatefeedvector.py | amolnayak311/Programming-Collective-Intelligence | eaa55c3989a8d36e7b766fbaba267b4cbaedf5be | [
"Apache-2.0"
] | null | null | null | src/ch3/generatefeedvector.py | amolnayak311/Programming-Collective-Intelligence | eaa55c3989a8d36e7b766fbaba267b4cbaedf5be | [
"Apache-2.0"
] | null | null | null | '''
Created on Sep 4, 2015
@author: Amol
'''
from feedparser import parse
import re
from itertools import groupby
#Remove HTML and get the remaining words
def getwords(html):
txt = re.compile(r'<[^>]+>').sub('', html)
words = re.compile(r'[^A-Z^a-z]+').split(txt)
return [word.lower() for word in words if... | 31.732394 | 127 | 0.637816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 842 | 0.373724 |
0447f89b16924c658675e5b392cea181645339b7 | 2,904 | py | Python | examples/withRaycing/01_SynchrotronSources/U32TaperedScan.py | adinatan/xrt | 75b884c0cba7e1aac15b30f2d0d803597328a208 | [
"MIT"
] | null | null | null | examples/withRaycing/01_SynchrotronSources/U32TaperedScan.py | adinatan/xrt | 75b884c0cba7e1aac15b30f2d0d803597328a208 | [
"MIT"
] | null | null | null | examples/withRaycing/01_SynchrotronSources/U32TaperedScan.py | adinatan/xrt | 75b884c0cba7e1aac15b30f2d0d803597328a208 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = "Roman Chernikov"
__date__ = "08 Mar 2016"
#import pickle
import numpy as np
#import matplotlib.pyplot as plt
import os, sys; sys.path.append(os.path.join('..', '..', '..')) # analysis:ignore
import xrt.backends.raycing as raycing
import xrt.backends.raycing.sources as rs
import ... | 28.470588 | 82 | 0.626033 | 0 | 0 | 316 | 0.108815 | 0 | 0 | 0 | 0 | 365 | 0.125689 |
044827b9d07d435e78e2b33c9bff2fa4f98ef026 | 1,277 | py | Python | Python_10_Plot_Bokeh_Candlestick.py | rogerolowski/SimpleStockAnalysisPython | 758e04b28eda4b8eb4124f4b1e0ed493b0f93106 | [
"MIT"
] | 195 | 2019-04-19T16:52:22.000Z | 2022-03-28T12:16:12.000Z | Python_10_Plot_Bokeh_Candlestick.py | rogerolowski/SimpleStockAnalysisPython | 758e04b28eda4b8eb4124f4b1e0ed493b0f93106 | [
"MIT"
] | null | null | null | Python_10_Plot_Bokeh_Candlestick.py | rogerolowski/SimpleStockAnalysisPython | 758e04b28eda4b8eb4124f4b1e0ed493b0f93106 | [
"MIT"
] | 72 | 2019-05-02T12:30:30.000Z | 2022-03-25T07:11:09.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 27 08:09:11 2020
@author: Tin
"""
# Plot Candlestick in bokeh
import pandas as pd # Dataframe Library
from math import pi
from bokeh.plotting import figure, show, output_file
pd.set_option('max_columns', None) # To show all columns
import yfinance as yf
yf... | 26.604167 | 102 | 0.660141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 478 | 0.374315 |
044b50d8db56607e7050551dc8a60c8b30177833 | 7,124 | py | Python | elephant.py | polewskm/lvl1-elephant | 511c9248762e108342f6cc0e8b48a1118c182538 | [
"Apache-2.0"
] | null | null | null | elephant.py | polewskm/lvl1-elephant | 511c9248762e108342f6cc0e8b48a1118c182538 | [
"Apache-2.0"
] | null | null | null | elephant.py | polewskm/lvl1-elephant | 511c9248762e108342f6cc0e8b48a1118c182538 | [
"Apache-2.0"
] | null | null | null | #
# elephant.py
#
from threading import Thread
from adafruit_servokit import ServoKit
from gpiozero import LED,Button,Servo
import time
import random
import board
import neopixel
import subprocess
import os.path
print("Initializing...")
# pin definitions
PIN_LEFT_EYE = 17
PIN_LEFT_BROW = 23
PIN_RIGHT_EYE = 27
PIN_RI... | 29.683333 | 153 | 0.711538 | 276 | 0.038742 | 0 | 0 | 0 | 0 | 0 | 0 | 3,071 | 0.431078 |
044bb9506b68dc9263b143fd71b62d2aa484539b | 10,954 | py | Python | 0.17/_downloads/8c453dbbabf4b225611c41642ea9b1d5/plot_morph_stc.py | drammock/mne-tools.github.io | 5d3a104d174255644d8d5335f58036e32695e85d | [
"BSD-3-Clause"
] | null | null | null | 0.17/_downloads/8c453dbbabf4b225611c41642ea9b1d5/plot_morph_stc.py | drammock/mne-tools.github.io | 5d3a104d174255644d8d5335f58036e32695e85d | [
"BSD-3-Clause"
] | null | null | null | 0.17/_downloads/8c453dbbabf4b225611c41642ea9b1d5/plot_morph_stc.py | drammock/mne-tools.github.io | 5d3a104d174255644d8d5335f58036e32695e85d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
================================================================
Morphing source estimates: Moving data from one brain to another
================================================================
Morphing refers to the operation of transferring
:ref:`source estimates <sphx_glr_auto_tutorial... | 43.125984 | 80 | 0.726675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,953 | 0.999635 |
044c425f4547c6aed3f6f7f9c9c78fa729ba7b06 | 680 | py | Python | jasper.py | ramosmy/acoustic_model | 3c721b15830dcaeb71f3b828cacb999c14e9651c | [
"MIT"
] | 6 | 2019-07-18T07:33:51.000Z | 2021-11-27T12:48:02.000Z | jasper.py | ramosmy/acoustic_model | 3c721b15830dcaeb71f3b828cacb999c14e9651c | [
"MIT"
] | 2 | 2019-11-08T07:25:39.000Z | 2019-12-03T16:38:37.000Z | jasper.py | ramosmy/acoustic_model | 3c721b15830dcaeb71f3b828cacb999c14e9651c | [
"MIT"
] | 7 | 2019-09-23T05:30:48.000Z | 2021-01-19T08:34:18.000Z | """
Citing from jasper from Nvidia
"""
import torch
import torch.nn as nn
import torch.functional as F
class SubBlock(nn.Module):
def __init__(self, dropout):
super(SubBlock, self).__init__()
self.conv = nn.Conv1d(in_channels=256, out_channels=256,
kernel_size=11... | 25.185185 | 66 | 0.607353 | 568 | 0.835294 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.061765 |
044cb4af3a6867d40b90f56d954b5919ff9ca98a | 513 | py | Python | charts/create_datasets.py | Smelly-London/datavisualisation | feaf0e8e3f48b0f70640149ce37d149ae4219c0d | [
"Apache-2.0"
] | 1 | 2016-09-28T13:42:29.000Z | 2016-09-28T13:42:29.000Z | charts/create_datasets.py | Smelly-London/datavisualisation | feaf0e8e3f48b0f70640149ce37d149ae4219c0d | [
"Apache-2.0"
] | null | null | null | charts/create_datasets.py | Smelly-London/datavisualisation | feaf0e8e3f48b0f70640149ce37d149ae4219c0d | [
"Apache-2.0"
] | null | null | null | import pandas as pd
# Load the original csv
df = pd.read_csv('data/carto.csv')
# Group by name of borough
# The output is a list of tuples with ('name of borough', dataframe of that borough)
grouped = list(df.groupby('location_name'))
for x in grouped:
# Get the name of the borough
name_of_borough = x[0]
... | 25.65 | 85 | 0.680312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.553606 |
044cd6d55aaaa85ed616104d85f7411196227c7a | 91 | py | Python | pm4pymdl/algo/mvp/gen_framework/rel_activities/__init__.py | dorian1000/pm4py-mdl | 71e0c2425abb183da293a58d31e25e50137c774f | [
"MIT"
] | 5 | 2021-01-31T22:45:29.000Z | 2022-02-22T14:26:06.000Z | pm4pymdl/algo/mvp/gen_framework/rel_activities/__init__.py | Javert899/pm4py-mdl | 4cc875999100f3f1ad60b925a20e40cf52337757 | [
"MIT"
] | 3 | 2021-07-07T15:32:55.000Z | 2021-07-07T16:15:36.000Z | pm4pymdl/algo/mvp/gen_framework/rel_activities/__init__.py | dorian1000/pm4py-mdl | 71e0c2425abb183da293a58d31e25e50137c774f | [
"MIT"
] | 9 | 2020-09-23T15:34:11.000Z | 2022-03-17T09:15:40.000Z | from pm4pymdl.algo.mvp.gen_framework.rel_activities import classic, rel_activities_builder
| 45.5 | 90 | 0.89011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
044e54d26f4864c1f8e33c9bd102edca09c831c3 | 5,047 | py | Python | batched_flattened_indices_pseudo_random_permutation.py | eladn/tensors_data_class | 78dd3182d5d070f3ae87bb7141cb38e778d0740a | [
"MIT"
] | null | null | null | batched_flattened_indices_pseudo_random_permutation.py | eladn/tensors_data_class | 78dd3182d5d070f3ae87bb7141cb38e778d0740a | [
"MIT"
] | null | null | null | batched_flattened_indices_pseudo_random_permutation.py | eladn/tensors_data_class | 78dd3182d5d070f3ae87bb7141cb38e778d0740a | [
"MIT"
] | null | null | null | import torch
import hashlib
import dataclasses
import numpy as np
from typing import List, Tuple, final
from .misc import collate_tensors_with_variable_shapes, CollateData, inverse_permutation
from .tensors_data_class_base import TensorsDataClass
from .mixins import HasTargetIndexingGroupMixin
__all__ = ['BatchedFla... | 54.858696 | 116 | 0.699425 | 4,655 | 0.92233 | 0 | 0 | 4,685 | 0.928274 | 0 | 0 | 685 | 0.135724 |
044fa9bc2b971a59a7630fd706352bd033dc7523 | 2,761 | py | Python | legacy/zero_training.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 4 | 2021-07-27T14:39:02.000Z | 2022-03-07T10:57:13.000Z | legacy/zero_training.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 2 | 2021-07-03T07:07:32.000Z | 2022-03-10T16:07:20.000Z | legacy/zero_training.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 1 | 2021-02-16T00:47:46.000Z | 2021-02-16T00:47:46.000Z | # Copyright The PyTorch Lightning team.
#
# 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 i... | 29.063158 | 100 | 0.688156 | 1,673 | 0.60594 | 0 | 0 | 0 | 0 | 0 | 0 | 750 | 0.271641 |
045138c95caf400b1764962f762f8235e32b7a22 | 1,404 | py | Python | lab02/lab02/operaciones/views.py | josepilco7501/TECSUP-DAE-2021-2 | f6e433193edd2b9547a7385f0e03b0aacdb4dcd0 | [
"MIT"
] | null | null | null | lab02/lab02/operaciones/views.py | josepilco7501/TECSUP-DAE-2021-2 | f6e433193edd2b9547a7385f0e03b0aacdb4dcd0 | [
"MIT"
] | null | null | null | lab02/lab02/operaciones/views.py | josepilco7501/TECSUP-DAE-2021-2 | f6e433193edd2b9547a7385f0e03b0aacdb4dcd0 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def calculadora(request):
context = {
'titulo' : "Ingrese los numeros",
}
return render(request,'operaciones/formulario.html',context)
def resultado(request):
a=request.POST['numeroa']
b=req... | 28.653061 | 67 | 0.64245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 463 | 0.329303 |
0451439c3c8986ca671570c793596df3e6737f99 | 40,552 | py | Python | sim/turn.py | adacker10/showdown | 8ceb1ff46d5c33ec3055928d6ad293224446f63c | [
"MIT"
] | 8 | 2019-02-02T01:15:57.000Z | 2021-12-23T04:43:46.000Z | sim/turn.py | adacker10/showdown | 8ceb1ff46d5c33ec3055928d6ad293224446f63c | [
"MIT"
] | null | null | null | sim/turn.py | adacker10/showdown | 8ceb1ff46d5c33ec3055928d6ad293224446f63c | [
"MIT"
] | 6 | 2020-09-11T13:15:05.000Z | 2022-03-18T15:46:35.000Z | '''
Nicolas Lindbloom-Airey
turn.py
This file is entirely devoted to the do_turn(Battle) method.
One call of do_turn does all the logic for a single turn.
Functions defined in this file are:
* functions are are only called in the do_turn method.
Functions called by run_move are called only once per run_move call... | 32.782538 | 186 | 0.592301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,824 | 0.316236 |
04522f05b28efbf881a74b37b11db3f8da797911 | 8,936 | py | Python | opencamlib-read-only/scripts/voronoi/voronoi_bisectors.py | play113/swer | 78764c67885dfacb1fa24e494a20681265f5254c | [
"MIT"
] | null | null | null | opencamlib-read-only/scripts/voronoi/voronoi_bisectors.py | play113/swer | 78764c67885dfacb1fa24e494a20681265f5254c | [
"MIT"
] | null | null | null | opencamlib-read-only/scripts/voronoi/voronoi_bisectors.py | play113/swer | 78764c67885dfacb1fa24e494a20681265f5254c | [
"MIT"
] | 1 | 2020-07-04T13:58:00.000Z | 2020-07-04T13:58:00.000Z | import ocl
import camvtk
import time
import vtk
import datetime
import math
import random
def drawVertex(myscreen, p, vertexColor, rad=1):
myscreen.addActor( camvtk.Sphere( center=(p.x,p.y,p.z), radius=rad, color=vertexColor ) )
def drawEdge(myscreen, e, edgeColor=camvtk.yellow):
p1 = e[0]
p2 = e[1]
... | 30.189189 | 109 | 0.513653 | 3,871 | 0.433192 | 0 | 0 | 0 | 0 | 0 | 0 | 3,088 | 0.345568 |
045237c527cde898e9b9472e8d4dba096a190def | 760 | py | Python | wheel5/scheduler.py | xdralex/pytorch-wheel5 | 336529e354a45908cf3f8f12cd401a95fb2a5351 | [
"MIT"
] | 2 | 2020-06-08T13:10:06.000Z | 2020-07-07T05:34:18.000Z | wheel5/scheduler.py | xdralex/pytorch-wheel5 | 336529e354a45908cf3f8f12cd401a95fb2a5351 | [
"MIT"
] | 1 | 2020-04-29T08:46:14.000Z | 2020-04-29T08:46:14.000Z | wheel5/scheduler.py | xdralex/pytorch-wheel5 | 336529e354a45908cf3f8f12cd401a95fb2a5351 | [
"MIT"
] | null | null | null | from torch.optim.lr_scheduler import _LRScheduler
class WarmupScheduler(_LRScheduler):
def __init__(self, optimizer, epochs, next_scheduler):
self.epochs = epochs
self.next_scheduler = next_scheduler
super(WarmupScheduler, self).__init__(optimizer)
def get_lr(self):
if self.la... | 34.545455 | 86 | 0.659211 | 707 | 0.930263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0453131e08ad9df3feb4129ffbeb4612445ebb21 | 763 | py | Python | analysis/dbase/tracking/train.py | BrancoLab/FC_analysis | 7124a7d998275bce6f7a18c264399c7dabfd430b | [
"MIT"
] | 1 | 2018-08-20T14:47:09.000Z | 2018-08-20T14:47:09.000Z | analysis/dbase/tracking/train.py | BrancoLab/FC_analysis | 7124a7d998275bce6f7a18c264399c7dabfd430b | [
"MIT"
] | null | null | null | analysis/dbase/tracking/train.py | BrancoLab/FC_analysis | 7124a7d998275bce6f7a18c264399c7dabfd430b | [
"MIT"
] | 1 | 2018-09-24T15:58:57.000Z | 2018-09-24T15:58:57.000Z | import deeplabcut as dlc
import os
from fcutils.file_io.utils import listdir
# from fcutils.video.utils import trim_clip
config_file = 'D:\\Dropbox (UCL - SWC)\\Rotation_vte\\Locomotion\\dlc\\locomotion-Federico\\config.yaml'
dlc.train_network(config_file)
# fld = 'D:\\Dropbox (UCL - SWC)\\Rotation_vte\\Locomotion... | 34.681818 | 162 | 0.728702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 624 | 0.817824 |
04538ee88a4559bebed7924c46e1d13c7c263e79 | 5,290 | py | Python | rmApp.py | LREN-CHUV/mip-apps-manager | 989d4a9fa5bf398ba71b5e4622e3f1deed0ac055 | [
"MIT"
] | null | null | null | rmApp.py | LREN-CHUV/mip-apps-manager | 989d4a9fa5bf398ba71b5e4622e3f1deed0ac055 | [
"MIT"
] | null | null | null | rmApp.py | LREN-CHUV/mip-apps-manager | 989d4a9fa5bf398ba71b5e4622e3f1deed0ac055 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse, shutil, os, sys
def getArgs():
parser = argparse.ArgumentParser()
parser.add_argument('app', help='Application identifier (used by the app developer)')
parser.add_argument('mipDir', help='Directory containing the mip application (<path>/app/)')
return parser.parse_args()
... | 28.138298 | 98 | 0.656333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,830 | 0.345936 |
04548c65b3a29cd8c065d7a21cdd9addeb849019 | 1,846 | py | Python | setup.py | aparafita/flow-torch | 4b94a444d05f75334c91bfd697087b393c49d3c3 | [
"MIT"
] | 22 | 2020-01-20T02:32:45.000Z | 2021-12-14T17:22:40.000Z | setup.py | aparafita/flow-torch | 4b94a444d05f75334c91bfd697087b393c49d3c3 | [
"MIT"
] | null | null | null | setup.py | aparafita/flow-torch | 4b94a444d05f75334c91bfd697087b393c49d3c3 | [
"MIT"
] | 2 | 2020-08-19T03:03:29.000Z | 2021-06-10T05:49:26.000Z | #!/usr/bin/env python
from setuptools import setup
version = '0.1.2'
long_description = """
# flow
This project implements basic Normalizing Flows in PyTorch
and provides functionality for defining your own easily,
following the conditioner-transformer architecture.
This is specially useful for lower-dimensional... | 32.385965 | 80 | 0.712351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,254 | 0.678939 |
0454da70bf56318261f39eb6d452f26d17c27244 | 430 | py | Python | app/routes/__init__.py | Poketnans/capstone-q3 | 38d550a54ff41387534241df85eb8aa8c9b6ba7e | [
"MIT"
] | null | null | null | app/routes/__init__.py | Poketnans/capstone-q3 | 38d550a54ff41387534241df85eb8aa8c9b6ba7e | [
"MIT"
] | 4 | 2022-03-03T12:47:02.000Z | 2022-03-08T18:10:34.000Z | app/routes/__init__.py | Poketnans/capstone-q3 | 38d550a54ff41387534241df85eb8aa8c9b6ba7e | [
"MIT"
] | 1 | 2022-03-17T14:21:30.000Z | 2022-03-17T14:21:30.000Z | from flask import Flask
from .storage_blueprint import bp_storage
from .tattooists_blueprint import bp_tattooists
from .tattoos_blueprint import bp_tattoos
from .clients_blueprint import bp_clients
def init_app(app: Flask) -> None:
''' Registra as blueprints '''
app.register_blueprint(bp_storage)
app.re... | 26.875 | 47 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.069767 |
0455b199d187f2d50b426f8cc0174c4016c20c0b | 692 | py | Python | PDF-Tools/makepdf/make-pdf-helloworld.py | maysam-h/pdf-toolz | dc182242b11dd1737ee787f19395569382af510f | [
"BSD-2-Clause"
] | null | null | null | PDF-Tools/makepdf/make-pdf-helloworld.py | maysam-h/pdf-toolz | dc182242b11dd1737ee787f19395569382af510f | [
"BSD-2-Clause"
] | null | null | null | PDF-Tools/makepdf/make-pdf-helloworld.py | maysam-h/pdf-toolz | dc182242b11dd1737ee787f19395569382af510f | [
"BSD-2-Clause"
] | 1 | 2020-09-17T23:17:16.000Z | 2020-09-17T23:17:16.000Z | #20080518
#20080519
import mPDF
import time
import zlib
import sys
if len(sys.argv) != 2:
print "Usage: make-pdf-helloworld pdf-file"
print " "
print " Source code put in the public domain by Didier Stevens, no Copyright"
print " Use at your own risk"
print " https://DidierStevens... | 20.352941 | 83 | 0.605491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 376 | 0.543353 |
0455f230ec9eb1646bbd8b355eef81e8a026f547 | 5,969 | py | Python | tests/test_adapters.py | bernt-matthias/cutadapt | 9ba5b705ba0e6cc5e32d4ce3810788b05b16a306 | [
"MIT"
] | null | null | null | tests/test_adapters.py | bernt-matthias/cutadapt | 9ba5b705ba0e6cc5e32d4ce3810788b05b16a306 | [
"MIT"
] | null | null | null | tests/test_adapters.py | bernt-matthias/cutadapt | 9ba5b705ba0e6cc5e32d4ce3810788b05b16a306 | [
"MIT"
] | null | null | null | import pytest
from dnaio import Sequence
from cutadapt.adapters import Adapter, Match, Where, LinkedAdapter
def test_issue_52():
adapter = Adapter(
sequence='GAACTCCAGTCACNNNNN',
where=Where.BACK,
remove='suffix',
max_error_rate=0.12,
min_overlap=5,
read_wildcards=... | 33.346369 | 107 | 0.640978 | 0 | 0 | 0 | 0 | 236 | 0.039538 | 0 | 0 | 1,140 | 0.190987 |
04562a0ab45671a8901e0ae58163340c6b6aee32 | 160 | py | Python | oaff/app/oaff/app/data/sources/common/provider.py | JBurkinshaw/ogc-api-fast-features | 4fc6ba3cc4df1600450fe4c9f35320b00c69f158 | [
"MIT"
] | 19 | 2021-07-06T16:35:27.000Z | 2022-02-08T04:59:21.000Z | oaff/app/oaff/app/data/sources/common/provider.py | JBurkinshaw/ogc-api-fast-features | 4fc6ba3cc4df1600450fe4c9f35320b00c69f158 | [
"MIT"
] | 30 | 2021-07-14T04:13:11.000Z | 2021-11-22T20:45:15.000Z | oaff/app/oaff/app/data/sources/common/provider.py | JBurkinshaw/ogc-api-fast-features | 4fc6ba3cc4df1600450fe4c9f35320b00c69f158 | [
"MIT"
] | 6 | 2021-07-06T16:35:28.000Z | 2021-09-17T19:24:49.000Z | from typing import List, Optional
from pydantic import BaseModel
class Provider(BaseModel):
url: str
name: str
roles: Optional[List[str]] = None
| 16 | 37 | 0.7125 | 91 | 0.56875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0456a960cd6f7a8fb4aa5ca64de8acbb20393184 | 1,909 | py | Python | hackerrank/Data Structures/Super Maximum Cost Queries/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerrank/Data Structures/Super Maximum Cost Queries/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerrank/Data Structures/Super Maximum Cost Queries/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | #!/bin/python3
import os
#
# Complete the 'solve' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts following parameters:
# 1. 2D_INTEGER_ARRAY tree
# 2. 2D_INTEGER_ARRAY queries
#
def solve(tree, queries):
# Write your code here
from bisect import bisect_righ... | 23 | 64 | 0.510739 | 0 | 0 | 1,138 | 0.596124 | 0 | 0 | 0 | 0 | 266 | 0.13934 |
0457bad8f142fab99c1a60023685415f8bbe17c7 | 2,598 | py | Python | tests/test.py | bitlang/kabob | fe5c428df2723979183bb72a7435ffd34e404199 | [
"MIT"
] | null | null | null | tests/test.py | bitlang/kabob | fe5c428df2723979183bb72a7435ffd34e404199 | [
"MIT"
] | null | null | null | tests/test.py | bitlang/kabob | fe5c428df2723979183bb72a7435ffd34e404199 | [
"MIT"
] | null | null | null | from unittest import TestCase
from kabob import _
class KabobTestCase(TestCase):
def _T(self, obj, kbb):
from kabob.wand import Kabob
self.assertIsInstance(kbb, Kabob)
return [x for x in kbb(obj)]
class TestKabob(KabobTestCase):
def test_contains(self):
fixture = [dict(bar=1... | 33.307692 | 91 | 0.550038 | 2,541 | 0.97806 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.025789 |
0459c4c4ec84836ab5b740797c06885228f4e2e7 | 1,336 | bzl | Python | flatbuffers/internal/run_flatc.bzl | kgreenek/rules_flatbuffers | 057e887e81749e64f405381a3471eb9e9674b9b5 | [
"Apache-2.0"
] | 2 | 2021-09-27T05:43:14.000Z | 2021-10-04T09:31:55.000Z | flatbuffers/internal/run_flatc.bzl | kgreenek/rules_flatbuffers | 057e887e81749e64f405381a3471eb9e9674b9b5 | [
"Apache-2.0"
] | null | null | null | flatbuffers/internal/run_flatc.bzl | kgreenek/rules_flatbuffers | 057e887e81749e64f405381a3471eb9e9674b9b5 | [
"Apache-2.0"
] | null | null | null | load("//flatbuffers/internal:string_utils.bzl", "capitalize_first_char")
def _include_args_from_depset(includes_depset):
# Always include the workspace root.
include_args = ["-I", "."]
for include in includes_depset.to_list():
include_args.append("-I")
include_args.append(include)
retur... | 32.585366 | 98 | 0.656437 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.131737 |
045a80d7f686a5ac42ed1b41490dca313e15dfed | 2,412 | py | Python | src/search_name.py | MansurS404/MS403 | 77f582dfdbc8918c9ea160c4f1af3cf14f9ea691 | [
"Apache-2.0"
] | 1 | 2020-10-09T18:36:58.000Z | 2020-10-09T18:36:58.000Z | src/search_name.py | MansurS404/MS403 | 77f582dfdbc8918c9ea160c4f1af3cf14f9ea691 | [
"Apache-2.0"
] | 1 | 2020-10-09T18:38:48.000Z | 2020-10-09T18:38:48.000Z | src/search_name.py | MansurS404/MS403 | 77f582dfdbc8918c9ea160c4f1af3cf14f9ea691 | [
"Apache-2.0"
] | null | null | null | #!usr/bin/python2.7
# coding=utf-8
#######################################################
# Name : Multi BF (MBF) <cookie method> #
# File : search_name.py #
# Author : DulLah #
# Github : https://github.com/dz-id #
# Fa... | 32.16 | 144 | 0.532338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,087 | 0.450663 |
045ab6d7b2818c3906b03b2e9bb0ddef41f82336 | 26,619 | py | Python | vistrails/gui/modules/constant_configuration.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/gui/modules/constant_configuration.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/gui/modules/constant_configuration.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | ###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: [email protected]
##
## This file is part of VisTrails.
##
## ... | 37.125523 | 122 | 0.626845 | 23,016 | 0.864646 | 0 | 0 | 0 | 0 | 0 | 0 | 5,328 | 0.200158 |
045aff75c614e75b486992543a832ede496de5f2 | 1,324 | py | Python | setup.py | davidrpugh/solowPy | 91577e04481cec80679ae571ec2bdaa5788151b4 | [
"MIT"
] | 31 | 2016-02-29T00:20:53.000Z | 2022-01-26T17:40:38.000Z | setup.py | rfonsek/solowPy | 91577e04481cec80679ae571ec2bdaa5788151b4 | [
"MIT"
] | 11 | 2015-04-04T20:01:35.000Z | 2017-02-20T05:42:49.000Z | setup.py | rfonsek/solowPy | 91577e04481cec80679ae571ec2bdaa5788151b4 | [
"MIT"
] | 20 | 2015-08-23T23:42:09.000Z | 2022-02-23T08:00:53.000Z | import os
from distutils.core import setup
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
DESCRIPTION = ("Library for solving, simulating, and estimating the " +
"Solow (1956) model of economic... | 33.1 | 71 | 0.561934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 707 | 0.533988 |
045b9a5f27ab07d95821029cdcec623c2884d66a | 3,236 | py | Python | seaport/pull_request/portfile.py | fossabot/seaport | e4a5c5ada7f21529912f688e36c75cecd3a2c53c | [
"BSD-3-Clause"
] | null | null | null | seaport/pull_request/portfile.py | fossabot/seaport | e4a5c5ada7f21529912f688e36c75cecd3a2c53c | [
"BSD-3-Clause"
] | null | null | null | seaport/pull_request/portfile.py | fossabot/seaport | e4a5c5ada7f21529912f688e36c75cecd3a2c53c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2021, harens
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this... | 36.772727 | 82 | 0.717553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,471 | 0.763597 |
045e78652d194f324a318fa3d010fd1ce3d5d4e7 | 12,020 | py | Python | CRYSTAL/crystal_raman.py | permanentchange/raman-sc | 909c8d879dd97f118860e2a3a4edae2aa03f02b5 | [
"MIT"
] | 1 | 2021-01-30T12:38:07.000Z | 2021-01-30T12:38:07.000Z | CRYSTAL/crystal_raman.py | permanentchange/raman-sc | 909c8d879dd97f118860e2a3a4edae2aa03f02b5 | [
"MIT"
] | null | null | null | CRYSTAL/crystal_raman.py | permanentchange/raman-sc | 909c8d879dd97f118860e2a3a4edae2aa03f02b5 | [
"MIT"
] | 1 | 2021-05-10T01:38:30.000Z | 2021-05-10T01:38:30.000Z | #!/usr/bin/env python
#
# Raman off-resonant activity calculator
# using CRYSTAL as a back-end.
#
# Contributors: Alexandr Fonari (Georgia Tech)
# MIT license, 2013
#
#
def parse_fort34_header(fort34_fh):
import sys
from math import sqrt
#
fort34_fh.seek(0) # just in case
#
header = [fort34_fh.n... | 39.281046 | 152 | 0.505324 | 543 | 0.045175 | 126 | 0.010483 | 0 | 0 | 0 | 0 | 3,709 | 0.308569 |
045eb6a2ba55cf3cf66628da3f1e015463d0468c | 2,281 | py | Python | src/eval/novel_bigrams.py | HenryDashwood/sentence-planner | 0bf9b88d7af36a936febe90672eeb5aed0022c63 | [
"MIT"
] | 3 | 2021-09-30T15:11:50.000Z | 2022-02-15T09:25:57.000Z | src/eval/novel_bigrams.py | HenryDashwood/sentence-planner | 0bf9b88d7af36a936febe90672eeb5aed0022c63 | [
"MIT"
] | null | null | null | src/eval/novel_bigrams.py | HenryDashwood/sentence-planner | 0bf9b88d7af36a936febe90672eeb5aed0022c63 | [
"MIT"
] | 2 | 2022-02-23T14:34:11.000Z | 2022-03-11T08:21:34.000Z | #
# Copyright (c) 2021 Idiap Research Institute, https://www.idiap.ch/
# Written by Andreas Marfurt <[email protected]>
#
""" Computes the proportion of novel bigrams in the summary. """
import numpy as np
import pandas as pd
from interface import Evaluation
from eval_utils import preprocess_article, preproce... | 40.732143 | 118 | 0.704516 | 1,638 | 0.718106 | 0 | 0 | 589 | 0.25822 | 0 | 0 | 509 | 0.223148 |
f086f739861192cb28069ef1a4ac8f79101a91b4 | 2,003 | py | Python | examples/caget.py | delta-accelerator/channel_access.client | 531a35634845a6b009210b9537c3acf42c86f76f | [
"MIT"
] | null | null | null | examples/caget.py | delta-accelerator/channel_access.client | 531a35634845a6b009210b9537c3acf42c86f76f | [
"MIT"
] | null | null | null | examples/caget.py | delta-accelerator/channel_access.client | 531a35634845a6b009210b9537c3acf42c86f76f | [
"MIT"
] | null | null | null | import argparse
import channel_access.common as ca
import channel_access.client as cac
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Read process values')
parser.add_argument('pvs', metavar='PV', type=str, nargs='+',
help='list of process values')
args ... | 43.543478 | 105 | 0.591113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 969 | 0.483774 |
f087078a59a53f53c94da1a5511f5c19ca713f04 | 6,975 | py | Python | utils/hamiltonian.py | fhoeb/fh-thesis-scripts | 8894296ee2ca64bc208cc28803ac888b33bb4a94 | [
"BSD-3-Clause"
] | 2 | 2020-09-27T16:17:06.000Z | 2022-02-01T15:25:40.000Z | utils/hamiltonian.py | fhoeb/fh-thesis-scripts | 8894296ee2ca64bc208cc28803ac888b33bb4a94 | [
"BSD-3-Clause"
] | null | null | null | utils/hamiltonian.py | fhoeb/fh-thesis-scripts | 8894296ee2ca64bc208cc28803ac888b33bb4a94 | [
"BSD-3-Clause"
] | 1 | 2021-01-18T00:13:01.000Z | 2021-01-18T00:13:01.000Z | from scipy.special import factorial
from itertools import count
import numpy as np
from tmps.utils import pauli, fock
def get_boson_boson_dim(alpha, cutoff_coh):
"""
Find the cutoff for the local dimension (identical everywhere) from the chosen accuracy alpha for the impurity
coherent state.
"... | 42.791411 | 118 | 0.677993 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,927 | 0.419642 |
f08884e338e058e8d57f6ec08eecc817c73c4a4f | 2,564 | py | Python | zpgc_2016/include/logbook.py | mpatacchiola/naogui | 2c71c82362edcf66b1a24a5f2af23e9719011146 | [
"MIT"
] | 2 | 2017-12-22T14:33:07.000Z | 2020-07-23T09:35:59.000Z | zpgc_2016/include/logbook.py | mpatacchiola/naogui | 2c71c82362edcf66b1a24a5f2af23e9719011146 | [
"MIT"
] | null | null | null | zpgc_2016/include/logbook.py | mpatacchiola/naogui | 2c71c82362edcf66b1a24a5f2af23e9719011146 | [
"MIT"
] | 4 | 2016-04-01T10:02:39.000Z | 2018-04-14T08:05:20.000Z | #!/usr/bin/env python
import os
import time
class Logbook(object):
def __init__(self):
"""
Class initialization
"""
self._id = time.strftime("%d%m%Y_%H%M%S", time.gmtime()) #id of the log, it's the timestamp
self._trial = 0
self._pinv = 0.0
self._rinv = 0.0... | 32.871795 | 213 | 0.49454 | 2,516 | 0.981279 | 0 | 0 | 0 | 0 | 0 | 0 | 630 | 0.24571 |
f08b09f830197b622c222148be38b3159d8bff5d | 6,346 | py | Python | src/experimental_results/outdoor test/path_planning_analysis.py | NASLab/GroundROS | 6673db009ffcff59500eb1e3d5873111282e7749 | [
"MIT"
] | 1 | 2017-12-17T11:11:55.000Z | 2017-12-17T11:11:55.000Z | src/experimental_results/outdoor test/path_planning_analysis.py | NASLab/GroundROS | 6673db009ffcff59500eb1e3d5873111282e7749 | [
"MIT"
] | 2 | 2015-10-02T19:02:06.000Z | 2015-10-02T19:02:36.000Z | src/experimental_results/outdoor test/path_planning_analysis.py | NASLab/GroundROS | 6673db009ffcff59500eb1e3d5873111282e7749 | [
"MIT"
] | null | null | null | # python experimental tests for Husky
from numpy import sin, cos, pi, load
import matplotlib.pyplot as plt
from time import sleep
yaw_bound = 2 * pi / 180
yaw_calibrate = pi / 180 * (0)
x_offset_calibrate = 0
y_offset_calibrate = -.08
f0 = plt.figure()
ax0 = f0.add_subplot(111)
ax1 = f0.add_subplot(111)
env_data = ... | 30.956098 | 129 | 0.560668 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,359 | 0.686889 |
f08b140b4aa6ed14ab345d4ef1509b7d92f9f433 | 1,770 | py | Python | source/study/score.py | mverleg/WW | b58a9bbfc91d19541840f490ed59997d85389c0a | [
"MIT"
] | null | null | null | source/study/score.py | mverleg/WW | b58a9bbfc91d19541840f490ed59997d85389c0a | [
"MIT"
] | 1 | 2016-03-18T09:29:42.000Z | 2016-03-18T09:29:42.000Z | source/study/score.py | mverleg/WW | b58a9bbfc91d19541840f490ed59997d85389c0a | [
"MIT"
] | null | null | null | from sys import stderr
from study.models import Result, ActiveTranslation
def update_score(learner, result, verified=False):
"""
Update the score after a phrase has been judged.
:param result: Result.CORRECT, Result.CLOSE or Result.INCORRECT
:return: Result instance
"""
if result == Result.CORRECT:
base =... | 39.333333 | 292 | 0.766102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,138 | 0.642938 |
f08ba58aa1ee5462b9589a7cefae921b8d9e4b35 | 477 | py | Python | titan/react_pkg/prettier/__init__.py | mnieber/moonleap | 2c951565c32f2e733a063b4a4f7b3d917ef1ec07 | [
"MIT"
] | null | null | null | titan/react_pkg/prettier/__init__.py | mnieber/moonleap | 2c951565c32f2e733a063b4a4f7b3d917ef1ec07 | [
"MIT"
] | null | null | null | titan/react_pkg/prettier/__init__.py | mnieber/moonleap | 2c951565c32f2e733a063b4a4f7b3d917ef1ec07 | [
"MIT"
] | null | null | null | from pathlib import Path
from moonleap import add, create
from titan.project_pkg.service import Tool
from titan.react_pkg.nodepackage import load_node_package_config
class Prettier(Tool):
pass
base_tags = [("prettier", ["tool"])]
@create("prettier")
def create_prettier(term, block):
prettier = Prettier(n... | 22.714286 | 66 | 0.761006 | 30 | 0.062893 | 0 | 0 | 235 | 0.492662 | 0 | 0 | 47 | 0.098532 |
f08c68a65e967b9aa34c701a06cb12906d568f55 | 787 | py | Python | docs/make_readme.py | thombashi/tabledata | 4e93930f89ae27c4ed852b4b61082a0457183019 | [
"MIT"
] | 4 | 2018-09-15T14:57:57.000Z | 2022-01-05T20:27:37.000Z | docs/make_readme.py | thombashi/tabledata | 4e93930f89ae27c4ed852b4b61082a0457183019 | [
"MIT"
] | null | null | null | docs/make_readme.py | thombashi/tabledata | 4e93930f89ae27c4ed852b4b61082a0457183019 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
import sys
from readmemaker import ReadmeMaker
PROJECT_NAME = "tabledata"
OUTPUT_DIR = ".."
def main():
maker = ReadmeMaker(
PROJECT_NAME,
OUTPUT_DIR,
is_make_toc=True,
project_url=f"... | 19.675 | 67 | 0.683609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.337992 |
f08e63b84393000dc066899772d576a46b3ce28c | 1,860 | py | Python | expired_cert_finder/scanner.py | alphagov/expired-cert-finder | c77843dab36a12f82cba9cdf18d85dfc5dd5e7c5 | [
"MIT"
] | 1 | 2021-01-30T18:45:02.000Z | 2021-01-30T18:45:02.000Z | expired_cert_finder/scanner.py | alphagov/expired-cert-finder | c77843dab36a12f82cba9cdf18d85dfc5dd5e7c5 | [
"MIT"
] | null | null | null | expired_cert_finder/scanner.py | alphagov/expired-cert-finder | c77843dab36a12f82cba9cdf18d85dfc5dd5e7c5 | [
"MIT"
] | 2 | 2021-01-31T00:07:09.000Z | 2021-04-10T20:17:57.000Z | #! /usr/bin/env python
from expired_cert_finder.plugins.raw import RawParser
from expired_cert_finder.plugins.yaml import YamlParser
from expired_cert_finder.allowed_certs import AllowedCerts
rawParser = RawParser
yamlParser = YamlParser
# handle dynamic loading.
def scan_file_for_certificate(path, expired_only, d... | 31 | 127 | 0.56828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 265 | 0.142473 |
f08fc0d043f30f7b77fc0be9f310cc14919727ea | 153 | py | Python | pywi/processing/__init__.py | jeremiedecock/mrif | 094b0dd81ff2be0e24bf3871caab48da1b5d138b | [
"MIT"
] | 1 | 2021-07-06T06:02:45.000Z | 2021-07-06T06:02:45.000Z | pywi/processing/__init__.py | jeremiedecock/mrif | 094b0dd81ff2be0e24bf3871caab48da1b5d138b | [
"MIT"
] | null | null | null | pywi/processing/__init__.py | jeremiedecock/mrif | 094b0dd81ff2be0e24bf3871caab48da1b5d138b | [
"MIT"
] | 1 | 2019-01-07T10:50:38.000Z | 2019-01-07T10:50:38.000Z | """Processing modules
This package contains image processing algorithms.
"""
from . import compositing
from . import filtering
from . import transform
| 17 | 50 | 0.784314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.503268 |
f08fde25b780c828cb41e9681045e08d41cd14d7 | 3,128 | py | Python | atlas/foundations_contrib/src/test/test_lazy_bucket.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 296 | 2020-03-16T19:55:00.000Z | 2022-01-10T19:46:05.000Z | atlas/foundations_contrib/src/test/test_lazy_bucket.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 57 | 2020-03-17T11:15:57.000Z | 2021-07-10T14:42:27.000Z | atlas/foundations_contrib/src/test/test_lazy_bucket.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 38 | 2020-03-17T21:06:05.000Z | 2022-02-08T03:19:34.000Z |
import unittest
from mock import Mock
from foundations_spec.helpers.spec import Spec
from foundations_spec.helpers import let, let_mock, set_up
class TestLazyBucket(Spec):
@let
def lazy_bucket(self):
from foundations_contrib.lazy_bucket import LazyBucket
return LazyBucket(self.bucket_constru... | 38.146341 | 84 | 0.728581 | 2,979 | 0.952366 | 0 | 0 | 233 | 0.074488 | 0 | 0 | 0 | 0 |
f0924e750052f6e9608fdfdf58fe2cfd7f5812d2 | 1,557 | py | Python | Hw/H3_CNN/model.py | zhigangjiang/DLAndML-Experiment | 162fb9c2a0865b6adf16f9a9e9a3f6a9b3e7f9b6 | [
"MIT"
] | 2 | 2021-11-09T14:28:19.000Z | 2022-03-03T17:49:23.000Z | Hw/H3_CNN/model.py | zhigangjiang/DLAndML-Experiment | 162fb9c2a0865b6adf16f9a9e9a3f6a9b3e7f9b6 | [
"MIT"
] | null | null | null | Hw/H3_CNN/model.py | zhigangjiang/DLAndML-Experiment | 162fb9c2a0865b6adf16f9a9e9a3f6a9b3e7f9b6 | [
"MIT"
] | null | null | null | from abc import ABC
import torch.nn as nn
class CNN5(nn.Module, ABC):
def __init__(self):
super(CNN5, self).__init__()
# torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride, padding)
# torch.nn.MaxPool2d(kernel_size, stride, padding)
# input 維度 [3, 128, 128]
self... | 30.529412 | 82 | 0.451509 | 1,516 | 0.971172 | 0 | 0 | 0 | 0 | 0 | 0 | 296 | 0.189622 |
f0935e4564c845dcf620246319af92237bea563f | 167 | py | Python | calvestbr/__init__.py | IsaacHiguchi/calvestbr | ebf702e9e67299c822a6cc21cad60b247446fcfa | [
"MIT"
] | null | null | null | calvestbr/__init__.py | IsaacHiguchi/calvestbr | ebf702e9e67299c822a6cc21cad60b247446fcfa | [
"MIT"
] | null | null | null | calvestbr/__init__.py | IsaacHiguchi/calvestbr | ebf702e9e67299c822a6cc21cad60b247446fcfa | [
"MIT"
] | null | null | null | """Top-level package for Calendário dos Vestibulares do Brasil."""
__author__ = """Ana_Isaac_Marina"""
__email__ = '[email protected]'
__version__ = '0.0.1'
| 27.833333 | 66 | 0.742515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.738095 |
f095a7bbf05cec0014035a747e47610d7205956c | 776 | py | Python | controllers/utils_faq.py | haoyuchen1992/CourseBuilder | ba8f0e05c53cc74bb4e46235a7855fdfbd63dff7 | [
"Apache-2.0"
] | null | null | null | controllers/utils_faq.py | haoyuchen1992/CourseBuilder | ba8f0e05c53cc74bb4e46235a7855fdfbd63dff7 | [
"Apache-2.0"
] | null | null | null | controllers/utils_faq.py | haoyuchen1992/CourseBuilder | ba8f0e05c53cc74bb4e46235a7855fdfbd63dff7 | [
"Apache-2.0"
] | null | null | null | from utils import BaseHandler
class FaqHandler(BaseHandler):
"""Handler for FAQ page."""
def get(self):
"""Handler GET requests."""
# print "Get current get_user"
# print self.get_user()
# if not self.get_user():
# self.transient_student = True
#This if statement will let the non-student un... | 32.333333 | 71 | 0.675258 | 740 | 0.953608 | 0 | 0 | 0 | 0 | 0 | 0 | 409 | 0.527062 |
f095d3380b5ebd2361d49e633805f48a1b42caba | 2,866 | py | Python | tests/knowledge/rules/aws/context_aware/test_ec2_role_share_rule.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | tests/knowledge/rules/aws/context_aware/test_ec2_role_share_rule.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | tests/knowledge/rules/aws/context_aware/test_ec2_role_share_rule.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | import unittest
from cloudrail.knowledge.context.aws.aws_connection import PublicConnectionDetail, PolicyConnectionProperty, ConnectionDirectionType
from cloudrail.knowledge.context.aws.ec2.ec2_instance import Ec2Instance
from cloudrail.knowledge.context.aws.ec2.network_interface import NetworkInterface
from cloudrail... | 40.942857 | 132 | 0.759944 | 2,185 | 0.762387 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.045359 |
f097797de16f7deb2c318c5dc0e0e9f9d0347528 | 1,967 | py | Python | python/setup.py | rpiotrow/lolo | 54c9b065daccb1f617639dc8f5ff262eb572f626 | [
"Apache-2.0"
] | 34 | 2017-01-30T18:57:10.000Z | 2022-02-24T22:34:59.000Z | python/setup.py | rpiotrow/lolo | 54c9b065daccb1f617639dc8f5ff262eb572f626 | [
"Apache-2.0"
] | 121 | 2017-01-10T16:47:39.000Z | 2022-02-15T03:23:20.000Z | python/setup.py | rpiotrow/lolo | 54c9b065daccb1f617639dc8f5ff262eb572f626 | [
"Apache-2.0"
] | 14 | 2017-02-15T18:40:51.000Z | 2021-10-20T05:47:41.000Z | from setuptools import setup
from glob import glob
import shutil
import sys
import os
# single source of truth for package version
version_ns = {}
with open(os.path.join("lolopy", "version.py")) as f:
exec(f.read(), version_ns)
version = version_ns['__version__']
# Find the lolo jar
JAR_FILE = glob(os.path.join('... | 34.508772 | 102 | 0.708185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,024 | 0.52059 |
f0994ccd4067e97928229e99678562d13da50032 | 5,254 | py | Python | src/zebrafish_ec_migration/pipelines/cell_trajectory_analysis_pipeline/compute_trajectory_features.py | wgiese/zebrafish_ec_migration | 6c0e83716f4b9dcf8ca67528ae1efba031c75117 | [
"Apache-2.0"
] | null | null | null | src/zebrafish_ec_migration/pipelines/cell_trajectory_analysis_pipeline/compute_trajectory_features.py | wgiese/zebrafish_ec_migration | 6c0e83716f4b9dcf8ca67528ae1efba031c75117 | [
"Apache-2.0"
] | null | null | null | src/zebrafish_ec_migration/pipelines/cell_trajectory_analysis_pipeline/compute_trajectory_features.py | wgiese/zebrafish_ec_migration | 6c0e83716f4b9dcf8ca67528ae1efba031c75117 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from typing import Dict, List
import numpy as np
import pylab as plt
def compute_trajectory_features_set1(aligned_trajector_key_file: pd.DataFrame, parameters: Dict, start_time, end_time):
features_df = pd.DataFrame()
data_statistics_df = pd.DataFrame()
counter = 0
frame_interval =... | 47.763636 | 120 | 0.611153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 802 | 0.152646 |
f09aa0a3772d06c65a4b92ef0f3b86114c850ba5 | 22,421 | py | Python | scripts/beck/st/error_injection.py | papan-singh/cortx-motr-1 | 79351a56dffcb3968db9a6d4fee685a5443ed2f7 | [
"Apache-2.0"
] | null | null | null | scripts/beck/st/error_injection.py | papan-singh/cortx-motr-1 | 79351a56dffcb3968db9a6d4fee685a5443ed2f7 | [
"Apache-2.0"
] | 1 | 2022-02-03T09:51:48.000Z | 2022-02-03T09:51:48.000Z | scripts/beck/st/error_injection.py | papan-singh/cortx-motr-1 | 79351a56dffcb3968db9a6d4fee685a5443ed2f7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
#
# Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
#
# 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
#
# Un... | 41.908411 | 134 | 0.611659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,411 | 0.375139 |
f09b0ac82d16a4658253e26c01ef5ddc01555542 | 703 | py | Python | vaksinasi/migrations/0003_auto_20211029_0123.py | harmonica-pacil/invid19 | b4986f3375721deb02c9b9b8c982cd4e426c423c | [
"Unlicense"
] | 1 | 2021-12-27T12:50:05.000Z | 2021-12-27T12:50:05.000Z | vaksinasi/migrations/0003_auto_20211029_0123.py | harmonica-pacil/invid19 | b4986f3375721deb02c9b9b8c982cd4e426c423c | [
"Unlicense"
] | null | null | null | vaksinasi/migrations/0003_auto_20211029_0123.py | harmonica-pacil/invid19 | b4986f3375721deb02c9b9b8c982cd4e426c423c | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-28 18:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vaksinasi', '0002_alter_pendaftar_nik'),
]
operations = [
migrations.AlterField(
model_name='pendaftar',
name='NIK',... | 29.291667 | 132 | 0.618777 | 610 | 0.86771 | 0 | 0 | 0 | 0 | 0 | 0 | 210 | 0.29872 |
f09c5c08205d285d8d7e7dce3b7328bf5dab9194 | 1,991 | py | Python | classes/stack.py | EashanKaushik/Data-Structures | e5bd391e029cb47e650d5665647ff57590b9b343 | [
"MIT"
] | null | null | null | classes/stack.py | EashanKaushik/Data-Structures | e5bd391e029cb47e650d5665647ff57590b9b343 | [
"MIT"
] | null | null | null | classes/stack.py | EashanKaushik/Data-Structures | e5bd391e029cb47e650d5665647ff57590b9b343 | [
"MIT"
] | null | null | null | # node class for develping linked list
class Node:
def __init__(self, data=None, pointer=None):
self.data = data
self.pointer = pointer
def set_data(self, data):
self.data = data
def get_data(self):
return self.data
def set_pointer(self, pointer):
... | 21.641304 | 64 | 0.547464 | 1,710 | 0.858865 | 0 | 0 | 0 | 0 | 0 | 0 | 311 | 0.156203 |
f09cb2a4e4c26044201ef4e090ad7fb351584737 | 2,562 | py | Python | demo.py | jjegg01/abp.spherical2d.pairdistribution | 0bf26cda1190239e66050a747aed0a7999e12fa5 | [
"MIT"
] | null | null | null | demo.py | jjegg01/abp.spherical2d.pairdistribution | 0bf26cda1190239e66050a747aed0a7999e12fa5 | [
"MIT"
] | null | null | null | demo.py | jjegg01/abp.spherical2d.pairdistribution | 0bf26cda1190239e66050a747aed0a7999e12fa5 | [
"MIT"
] | null | null | null | #!/usb/bin/env python3
"""Demo script for abp.spherical2d.pairdistribution module."""
__author__ = "Julian Jeggle, Raphael Wittkowski"
__copyright__ = "Copyright (C) 2019 Julian Jeggle, Raphael Wittkowski"
__license__ = "MIT"
__version__ = "1.0"
import argparse
import numpy as np
import matplotlib.pyplot as plt
fro... | 29.790698 | 79 | 0.704528 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,084 | 0.423107 |
f09cd4790660d9a86da869eaae87a9f25e67fb79 | 12,481 | py | Python | pdfMerge/pdf_merge.py | R3CEPT0R/pdfuse | beeb4f9ef42d49728653752094563d3e0bcef68f | [
"MIT"
] | null | null | null | pdfMerge/pdf_merge.py | R3CEPT0R/pdfuse | beeb4f9ef42d49728653752094563d3e0bcef68f | [
"MIT"
] | null | null | null | pdfMerge/pdf_merge.py | R3CEPT0R/pdfuse | beeb4f9ef42d49728653752094563d3e0bcef68f | [
"MIT"
] | null | null | null | import PyPDF2
import fitz
import io
from PIL import Image
import os
import random
import string
import pikepdf
from tqdm import tqdm
from zipfile import ZipFile
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
from pathlib import Path
"""
Converts entire PDF to set of disjoint
PNG images... | 31.438287 | 86 | 0.60548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,687 | 0.295409 |
f09d6bc79182104f7a69ace2308580f3f628dc90 | 1,902 | py | Python | grAdapt/sampling/equidistributed/Mitchell.py | mkduong-ai/grAdapt | 94c2659b0f6ff9a2984a9dc58e3c83213313bf90 | [
"Apache-2.0"
] | 25 | 2020-11-13T05:57:01.000Z | 2021-06-18T11:16:03.000Z | grAdapt/sampling/equidistributed/Mitchell.py | mkduong-ai/grAdapt | 94c2659b0f6ff9a2984a9dc58e3c83213313bf90 | [
"Apache-2.0"
] | null | null | null | grAdapt/sampling/equidistributed/Mitchell.py | mkduong-ai/grAdapt | 94c2659b0f6ff9a2984a9dc58e3c83213313bf90 | [
"Apache-2.0"
] | null | null | null | # Python Standard Libraries
import warnings
# grAdapt
# from .base import Equidistributed
from .MaximalMinDistance import MaximalMinDistance
class Mitchell(MaximalMinDistance):
"""
[Mitchell et al., 1991],
Spectrally optimal sampling for distribution ray tracing
"""
def __init__(self, m=3):
... | 35.886792 | 84 | 0.605152 | 1,757 | 0.923764 | 0 | 0 | 0 | 0 | 0 | 0 | 1,303 | 0.685068 |
f09dd989151cb3043faf87d4533e594413a8d5d4 | 1,141 | py | Python | poly_py_tools/payload.py | mjmunger/PolyPyTools | 116014a47479f360ee73006d6ba3ddc7f362c7a1 | [
"MIT"
] | 7 | 2017-11-15T19:25:37.000Z | 2022-01-20T01:30:56.000Z | poly_py_tools/payload.py | DrDamnit/PolyPyTools | 116014a47479f360ee73006d6ba3ddc7f362c7a1 | [
"MIT"
] | 40 | 2020-05-19T19:46:20.000Z | 2020-11-12T16:13:55.000Z | poly_py_tools/payload.py | mjmunger/PolyPyTools | 116014a47479f360ee73006d6ba3ddc7f362c7a1 | [
"MIT"
] | null | null | null | import os
from poly_py_tools.dialplan_entry import Entry
from poly_py_tools.polypy_config import PolypyConfig
class Payload:
dialplan_entry = None
provisioned_directory = None
config = None
sources = None
def __init__(self, config:PolypyConfig, dialplan_entry: Entry):
self.dialplan_entr... | 32.6 | 129 | 0.660824 | 1,028 | 0.900964 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.079755 |
f09e721d7a2aea6a6da9968525dbcc1b80b3e3d5 | 549 | py | Python | tests/test_cosine_estimator.py | lefnire/lefnire_ml_utils | 65b84bb59faa41268aa14405daa58f6ba0b2509b | [
"MIT"
] | 3 | 2020-10-27T04:03:16.000Z | 2021-03-06T01:26:06.000Z | tests/test_cosine_estimator.py | lefnire/lefnire_ml_utils | 65b84bb59faa41268aa14405daa58f6ba0b2509b | [
"MIT"
] | 3 | 2020-10-08T22:47:55.000Z | 2020-10-29T18:43:36.000Z | tests/test_cosine_estimator.py | lefnire/lefnire_ml_utils | 65b84bb59faa41268aa14405daa58f6ba0b2509b | [
"MIT"
] | null | null | null | from ml_tools import CosineEstimator, Similars
from ml_tools.fixtures import articles
import numpy as np
corpus = articles()
split_ = len(corpus)//3
x, y = corpus[split_:], corpus[:split_] # note reversal; x should be smaller
x, y = Similars(x, y).embed().value()
def test_cosine_estimator():
dnn = CosineEstimat... | 28.894737 | 77 | 0.712204 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.1949 |
f0a252d3651a304580c3dce4edc0080b4ebde52d | 402 | py | Python | tests/test_euclidean_distance.py | danielwardega141196/unittests-with-pytest | 8dbedbe87fbfc5786856872dff6873395e6f4726 | [
"MIT"
] | null | null | null | tests/test_euclidean_distance.py | danielwardega141196/unittests-with-pytest | 8dbedbe87fbfc5786856872dff6873395e6f4726 | [
"MIT"
] | null | null | null | tests/test_euclidean_distance.py | danielwardega141196/unittests-with-pytest | 8dbedbe87fbfc5786856872dff6873395e6f4726 | [
"MIT"
] | null | null | null | from application.euclidean_distance import euclidean_distance
def test_euclidean_distance():
point_a = (0, 0)
point_b = (3, 4)
distance_between_a_and_b = euclidean_distance(point_a, point_b)
assert distance_between_a_and_b == 5
point_c = (-2, 3)
point_d = (2, 3)
distance_between_c_and_... | 23.647059 | 67 | 0.728856 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f0a3ad494e78ea0104d2f74ce9643e9fed92e18a | 423 | py | Python | Material.py | YuvalAriel/Path_Tracing | 105ff37b94943eb3d9e0ebf13077547a5767b639 | [
"Unlicense"
] | null | null | null | Material.py | YuvalAriel/Path_Tracing | 105ff37b94943eb3d9e0ebf13077547a5767b639 | [
"Unlicense"
] | null | null | null | Material.py | YuvalAriel/Path_Tracing | 105ff37b94943eb3d9e0ebf13077547a5767b639 | [
"Unlicense"
] | null | null | null | import numpy as np
class Material:
"""send color as list of 3 floats in range of 0-1"""
def __init__(self, color, reflection=0, transparency=0, emission=np.array((0, 0, 0)), refraction_ind=1):
self.color = np.array(color)
self.emission = emission # only for light sources
self.reflect... | 32.538462 | 108 | 0.671395 | 401 | 0.947991 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.179669 |
f0a3b174092260f45b2b53d775a1f36bc4ab8698 | 4,599 | py | Python | MTVulnerability/models/DRNSegDepth.py | yamizi/taskaugment | 8393e15d7ae16f267592edf1d67e20368aeeb1b5 | [
"MIT"
] | null | null | null | MTVulnerability/models/DRNSegDepth.py | yamizi/taskaugment | 8393e15d7ae16f267592edf1d67e20368aeeb1b5 | [
"MIT"
] | null | null | null | MTVulnerability/models/DRNSegDepth.py | yamizi/taskaugment | 8393e15d7ae16f267592edf1d67e20368aeeb1b5 | [
"MIT"
] | null | null | null | import math
import sys
import torch
from torch import nn
import models.drn as drn
# class Decoder(nn.Module):
#
# def __init__(self,
# output_channels = 3,
# ):
#
# self.output_channels = 3
#
# # DEFINING MODEL AS COMPLEMENT OF BASE CHOSEN FOR DRN
#
# self... | 32.387324 | 152 | 0.56621 | 3,761 | 0.817786 | 0 | 0 | 0 | 0 | 0 | 0 | 1,622 | 0.352685 |
f0a3f15b303ced78faaebde15a58c43f37452c94 | 5,686 | py | Python | src/web/modules/post/controllers/post/create.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | 2 | 2017-04-30T07:29:23.000Z | 2017-04-30T07:36:27.000Z | src/web/modules/post/controllers/post/create.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | null | null | null | src/web/modules/post/controllers/post/create.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | null | null | null | from flask import request, render_template
import json
import traceback
import lib.es as es
import web.util.tools as tools
import web.modules.post.services.workflow as workflow
import web.modules.post.services.upload as upload
import web.util.jinja as jinja
import web.modules.admin.services.notification as notification... | 34.047904 | 109 | 0.470805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,038 | 0.358424 |
f0a5756f3c51f204fd2707019d372fb6aa8f9179 | 7,096 | py | Python | stibium/bot.py | szymonszl/stibium | bf9a7756edd8dcaeb65f1afdacbf8f4780827d00 | [
"BSD-3-Clause"
] | null | null | null | stibium/bot.py | szymonszl/stibium | bf9a7756edd8dcaeb65f1afdacbf8f4780827d00 | [
"BSD-3-Clause"
] | null | null | null | stibium/bot.py | szymonszl/stibium | bf9a7756edd8dcaeb65f1afdacbf8f4780827d00 | [
"BSD-3-Clause"
] | null | null | null | """This module provies the main Bot class"""
import time
import traceback
import json
import threading
import sched
from fbchat import models
from ._fbclient import Client
from ._logs import log
from .dataclasses import Thread
from .handlers import BaseHandler
from ._i18n import _
class Bot(object):
"""Main St... | 33.471698 | 98 | 0.52748 | 6,808 | 0.959414 | 0 | 0 | 0 | 0 | 0 | 0 | 1,337 | 0.188416 |
f0a6aad82c1650cdcb381029fba97553f6a8cf60 | 5,296 | py | Python | train.py | SwatiSharda/Solar-forecasting | 455b3573bd827bda5b00aea643cf29fea38958b2 | [
"BSD-3-Clause"
] | 3 | 2021-04-03T01:40:48.000Z | 2021-11-21T11:52:53.000Z | train.py | SwatiSharda/Solar-forecasting | 455b3573bd827bda5b00aea643cf29fea38958b2 | [
"BSD-3-Clause"
] | null | null | null | train.py | SwatiSharda/Solar-forecasting | 455b3573bd827bda5b00aea643cf29fea38958b2 | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
from torch.utils.data import DataLoader
import multiprocessing as mp
import argparse
from DataSet import Dataset
import torch
import torch.nn as nn
from os import path
import Infer
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
cpu = torch.device('cpu')
parser = argparse.A... | 42.368 | 126 | 0.719033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 918 | 0.173338 |
f0a82aad993bf49b4180b264ae6f6a38e0fa4607 | 1,842 | py | Python | txtpp/src/txtpp.py | Cc618/dotmgt | 7c34ca1971e20a50ebdb4731ae43620e1296cc80 | [
"MIT"
] | 2 | 2022-01-08T10:11:58.000Z | 2022-01-09T10:25:16.000Z | txtpp/src/txtpp.py | Cc618/dotmgt | 7c34ca1971e20a50ebdb4731ae43620e1296cc80 | [
"MIT"
] | null | null | null | txtpp/src/txtpp.py | Cc618/dotmgt | 7c34ca1971e20a50ebdb4731ae43620e1296cc80 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
import sys
import io
import os
import traceback
class TextPreprocessorError(Exception):
def __init__(self, file_id, line, msg):
super().__init__(f"{file_id}:{line}: {msg}")
def debug_print(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def preprocess(
... | 23.615385 | 135 | 0.623779 | 136 | 0.073833 | 0 | 0 | 0 | 0 | 0 | 0 | 361 | 0.195983 |
f0a9b76e7527fc4562f1dffa72d9bb26c30f1073 | 30 | py | Python | vggface/resnet50/__init__.py | claudiourbina/VGGFace | 362cc8f805c1fd4135fddf8d602026735bcfdf5a | [
"MIT"
] | null | null | null | vggface/resnet50/__init__.py | claudiourbina/VGGFace | 362cc8f805c1fd4135fddf8d602026735bcfdf5a | [
"MIT"
] | null | null | null | vggface/resnet50/__init__.py | claudiourbina/VGGFace | 362cc8f805c1fd4135fddf8d602026735bcfdf5a | [
"MIT"
] | null | null | null | from .resnet50 import ResNet50 | 30 | 30 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f0a9ef787da7675bb95305830e5a4f6a73cec7a5 | 14,354 | py | Python | supportal/tests/app/management/commands/test_email_users_with_expiring_assignments.py | Elizabeth-Warren/supportal-backend | e55b0e8fd154730bab1708f27386b2adcb18cfbc | [
"MIT"
] | 34 | 2020-03-27T14:59:04.000Z | 2021-11-15T10:24:12.000Z | supportal/tests/app/management/commands/test_email_users_with_expiring_assignments.py | Elizabeth-Warren/supportal-backend | e55b0e8fd154730bab1708f27386b2adcb18cfbc | [
"MIT"
] | 5 | 2021-03-18T22:51:05.000Z | 2022-02-10T15:03:33.000Z | supportal/tests/app/management/commands/test_email_users_with_expiring_assignments.py | Elizabeth-Warren/supportal-backend | e55b0e8fd154730bab1708f27386b2adcb18cfbc | [
"MIT"
] | 14 | 2020-03-27T17:36:39.000Z | 2020-06-18T21:47:43.000Z | from datetime import datetime, timezone
from io import StringIO
from unittest import mock
import freezegun
import pytest
from django.conf import settings
from django.core.management import call_command
from django.utils import timezone
from model_bakery import baker
from supportal.app.common.enums import CanvassResul... | 33.933806 | 88 | 0.725442 | 0 | 0 | 0 | 0 | 11,489 | 0.800404 | 0 | 0 | 1,716 | 0.119549 |
f0aa0b1b2287e2d9b265d630907c744aa79a38c2 | 9,128 | py | Python | reinforcement_learning/rl_hvac_coach_energyplus/src/eplus/envs/data_center_env.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 5 | 2019-01-19T23:53:35.000Z | 2022-01-29T14:04:31.000Z | reinforcement_learning/rl_hvac_coach_energyplus/src/eplus/envs/data_center_env.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 6 | 2020-01-28T23:08:49.000Z | 2022-02-10T00:27:19.000Z | reinforcement_learning/rl_hvac_coach_energyplus/src/eplus/envs/data_center_env.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 8 | 2020-12-14T15:49:24.000Z | 2022-03-23T18:38:36.000Z | import gym
from gym import error, spaces, utils
from gym.utils import seeding
from eplus.envs import pyEp
import socket
from eplus.envs.socket_builder import socket_builder
import numpy as np
import os
class DataCenterEnv(gym.Env):
def __init__(self, config):
#timestep=12, days=1, eplus_path=None,
... | 41.490909 | 120 | 0.60528 | 8,923 | 0.977542 | 0 | 0 | 0 | 0 | 0 | 0 | 3,918 | 0.429229 |
f0ab28142605e757508c738f9eafe63973378e0d | 55 | py | Python | test1.py | ktbyers/pyneta | 1690ce5a6ddb640198ccf3bca26f32a65d772b92 | [
"Apache-2.0"
] | 2 | 2018-11-08T09:20:42.000Z | 2021-07-15T18:12:06.000Z | test1.py | ktbyers/pyneta | 1690ce5a6ddb640198ccf3bca26f32a65d772b92 | [
"Apache-2.0"
] | null | null | null | test1.py | ktbyers/pyneta | 1690ce5a6ddb640198ccf3bca26f32a65d772b92 | [
"Apache-2.0"
] | null | null | null | print("hello")
while True:
print("Infinite loop")
| 11 | 26 | 0.654545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.4 |
f0ad10d1d55fd2bdc2c491c48aba252ed553fa31 | 3,568 | py | Python | srblib/__init__.py | srbcheema1/srblib | 26146cb0d5586548da5f97a9fe3af355cd97f3ca | [
"MIT"
] | 2 | 2019-04-03T00:51:54.000Z | 2019-05-16T10:33:44.000Z | srblib/__init__.py | srbcheema1/srblib | 26146cb0d5586548da5f97a9fe3af355cd97f3ca | [
"MIT"
] | null | null | null | srblib/__init__.py | srbcheema1/srblib | 26146cb0d5586548da5f97a9fe3af355cd97f3ca | [
"MIT"
] | null | null | null | __version__ = '0.1.6'
__mod_name__ = 'srblib'
from .colour import Colour # A class with color names and a static print function which prints coloured output to stderr
from .debugger import debug # a boolean whose value can be changed in ~/.config/srblib/debug.json
from .debugger import on_appveyor # a boolean value ... | 60.474576 | 120 | 0.7912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,189 | 0.613509 |
f0ae594509e7de16319dd68dba06754107fabb34 | 2,880 | py | Python | src/msfbe/handlers/CountiesHandler.py | Noella-W/MethaneSourceFinder-BackEndDocker-1 | e935a4bbbcdf2f9bf11814a96ebbe1d8b59eed2b | [
"Apache-2.0"
] | null | null | null | src/msfbe/handlers/CountiesHandler.py | Noella-W/MethaneSourceFinder-BackEndDocker-1 | e935a4bbbcdf2f9bf11814a96ebbe1d8b59eed2b | [
"Apache-2.0"
] | 4 | 2021-06-08T23:39:15.000Z | 2022-03-12T00:49:52.000Z | src/msfbe/handlers/CountiesHandler.py | Noella-W/MethaneSourceFinder-BackEndDocker-1 | e935a4bbbcdf2f9bf11814a96ebbe1d8b59eed2b | [
"Apache-2.0"
] | 1 | 2021-09-11T05:30:07.000Z | 2021-09-11T05:30:07.000Z | """
Copyright (c) 2018 Jet Propulsion Laboratory,
California Institute of Technology. All rights reserved
"""
import json
from msfbe.webmodel import BaseHandler, service_handler
import requests
import psycopg2
class CountiesColumns:
COUNTY_ID = 0
NAME = 1
AREA = 2
PERIMETER = 3
CACOA = 4
CACO... | 26.666667 | 79 | 0.546181 | 2,644 | 0.918056 | 0 | 0 | 2,368 | 0.822222 | 0 | 0 | 624 | 0.216667 |
f0aee58dff262da24995b34a28866e048d9466ad | 347 | py | Python | ai for simple games/connect 4/tictoc.py | gustasvs/AI | 23360a8865e8211568594c2b2ced11dcdc9b0006 | [
"MIT"
] | 1 | 2022-02-03T18:21:28.000Z | 2022-02-03T18:21:28.000Z | ai for simple games/connect 4/tictoc.py | gustasvs/AI | 23360a8865e8211568594c2b2ced11dcdc9b0006 | [
"MIT"
] | null | null | null | ai for simple games/connect 4/tictoc.py | gustasvs/AI | 23360a8865e8211568594c2b2ced11dcdc9b0006 | [
"MIT"
] | null | null | null | import time
def tic():
#Homemade version of matlab tic and toc functions
global startTime_for_tictoc
startTime_for_tictoc = time.time()
def toc():
if 'startTime_for_tictoc' in globals():
print("Elapsed time is " + str(time.time() - startTime_for_tictoc) + " seconds.")
else:
print... | 24.785714 | 89 | 0.665706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.360231 |
f0b1d2bc676f5219d5c50eeed54f3ef0c2068b76 | 243 | py | Python | contrib/enginedesign/openmdao.examples.enginedesign/openmdao/examples/enginedesign/releaseinfo.py | mjfwest/OpenMDAO-Framework | a5521f47ad7686c25b203de74e1c7dff5fd7a52b | [
"Apache-2.0"
] | 69 | 2015-01-02T19:10:08.000Z | 2021-11-14T04:42:28.000Z | contrib/enginedesign/openmdao.examples.enginedesign/openmdao/examples/enginedesign/releaseinfo.py | jcchin/OpenMDAO-Framework | 038e89b06da1c74f00918f4c6fbd8bd365e25657 | [
"Apache-2.0"
] | 3 | 2015-01-15T23:08:18.000Z | 2015-03-11T16:57:35.000Z | contrib/enginedesign/openmdao.examples.enginedesign/openmdao/examples/enginedesign/releaseinfo.py | jcchin/OpenMDAO-Framework | 038e89b06da1c74f00918f4c6fbd8bd365e25657 | [
"Apache-2.0"
] | 31 | 2015-09-16T00:37:35.000Z | 2022-01-10T06:27:55.000Z |
# This file is automatically generated
__version__ = '0.10.3.2'
__comments__ = """too many spaces :/
Merge pull request #1848 from swryan/work"""
__date__ = '2014-11-15 09:50:34 -0500'
__commit__ = '97c66aaecfad3451bc6a0b1cae1fce4c0595037a'
| 27 | 55 | 0.753086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.753086 |
f0b1f9e76ce0827997c1af6729dbd897a8b9fe82 | 779 | py | Python | Utils/get_skeleton.py | Kohulan/DECIMER-Image-Segmentation | 68ee9a9693e5bad5c41826d28e2d6558a20fe21f | [
"MIT"
] | 29 | 2021-01-08T13:48:18.000Z | 2022-01-17T08:29:00.000Z | Utils/get_skeleton.py | Kohulan/DECIMER-Image-Segmentation | 68ee9a9693e5bad5c41826d28e2d6558a20fe21f | [
"MIT"
] | 23 | 2021-01-07T21:43:21.000Z | 2022-03-14T21:52:17.000Z | Utils/get_skeleton.py | Kohulan/DECIMER-Image-Segmentation | 68ee9a9693e5bad5c41826d28e2d6558a20fe21f | [
"MIT"
] | 8 | 2021-01-08T05:39:21.000Z | 2022-02-14T10:06:38.000Z | '''
* This Software is under the MIT License
* Refer to LICENSE or https://opensource.org/licenses/MIT for more information
* Written by ©Kohulan Rajan 2020
'''
from skimage import img_as_float
from skimage import io, color, morphology
import matplotlib.pyplot as plt
def get_skeleton_and_thin(input_image):
image =... | 32.458333 | 79 | 0.770218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.347436 |
f0b23ace85262a4a9788725f73969adf1044950b | 1,328 | py | Python | Task/CSV-to-HTML-translation/Python/csv-to-html-translation-5.py | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2021-05-05T13:42:20.000Z | 2021-05-05T13:42:20.000Z | Task/CSV-to-HTML-translation/Python/csv-to-html-translation-5.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | Task/CSV-to-HTML-translation/Python/csv-to-html-translation-5.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | from csv import DictReader
from xml.etree import ElementTree as ET
def csv2html_robust(txt, header=True, attr=None):
# Use DictReader because, despite what the docs say, reader() doesn't
# return an object with .fieldnames
# (DictReader expects an iterable that returns lines, so split on \n)
reader = D... | 34.947368 | 73 | 0.618223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 471 | 0.354669 |
f0b260ad5df3102bf13fd8cb7dbdddf25e662251 | 2,763 | py | Python | src/gausskernel/dbmind/tools/sqldiag/load_sql_from_wdr.py | opengauss-mirror/openGauss-graph | 6beb138fd00abdbfddc999919f90371522118008 | [
"MulanPSL-1.0"
] | null | null | null | src/gausskernel/dbmind/tools/sqldiag/load_sql_from_wdr.py | opengauss-mirror/openGauss-graph | 6beb138fd00abdbfddc999919f90371522118008 | [
"MulanPSL-1.0"
] | null | null | null | src/gausskernel/dbmind/tools/sqldiag/load_sql_from_wdr.py | opengauss-mirror/openGauss-graph | 6beb138fd00abdbfddc999919f90371522118008 | [
"MulanPSL-1.0"
] | null | null | null | import os
import re
import sys
import argparse
from preprocessing import templatize_sql
from utils import DBAgent, check_time_legality
__description__ = "Get sql information based on wdr."
def parse_args():
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
... | 40.043478 | 113 | 0.641694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 565 | 0.204488 |
f0b3c832cf8e1ee83bee7a2645bdcc49172d3621 | 344 | py | Python | program_train/hachina1.py | zhujisheng/HAComponent | 29c44a5ea3090d748738830a50e2d25c07e1bac8 | [
"Apache-2.0"
] | 39 | 2017-12-17T13:51:13.000Z | 2022-02-25T02:57:39.000Z | program_train/hachina1.py | vitc-123/HAComponent | 29c44a5ea3090d748738830a50e2d25c07e1bac8 | [
"Apache-2.0"
] | 5 | 2019-05-30T07:09:49.000Z | 2021-07-15T02:53:49.000Z | program_train/hachina1.py | vitc-123/HAComponent | 29c44a5ea3090d748738830a50e2d25c07e1bac8 | [
"Apache-2.0"
] | 28 | 2018-01-05T10:48:28.000Z | 2021-12-07T13:59:22.000Z | """
文件名:hachina.py.
演示程序,三行代码创建一个新设备.
"""
def setup(hass, config):
"""HomeAssistant在配置文件中发现hachina域的配置后,会自动调用hachina.py文件中的setup函数."""
# 设置实体hachina.Hello_World的状态。
# 注意1:实体并不需要被创建,只要设置了实体的状态,实体就自然存在了
# 注意2:实体的状态可以是任何字符串
hass.states.set("hachina.hello_world", "太棒了!")
# 返回True代表... | 20.235294 | 72 | 0.671512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.821678 |
f0b5d4652c83e4ec1fe94bf488284b069e276dc7 | 4,263 | py | Python | simple_ddl_parser/dialects/hql.py | swiatek25/simple-ddl-parser | b46f99b4e1838718bc4024cd281a66cd1b78b165 | [
"MIT"
] | null | null | null | simple_ddl_parser/dialects/hql.py | swiatek25/simple-ddl-parser | b46f99b4e1838718bc4024cd281a66cd1b78b165 | [
"MIT"
] | null | null | null | simple_ddl_parser/dialects/hql.py | swiatek25/simple-ddl-parser | b46f99b4e1838718bc4024cd281a66cd1b78b165 | [
"MIT"
] | null | null | null | from simple_ddl_parser.utils import check_spec, remove_par
class HQL:
def p_expression_location(self, p):
"""expr : expr LOCATION STRING"""
p[0] = p[1]
p_list = list(p)
p[0]["location"] = p_list[-1]
def p_row_format(self, p):
"""row_format : ROW FORMAT SERDE
| ... | 31.345588 | 74 | 0.524513 | 4,201 | 0.985456 | 0 | 0 | 0 | 0 | 0 | 0 | 1,498 | 0.351396 |
f0b7d59823b393f5c64dfa9a82c8f3f19e0a14bc | 5,627 | py | Python | pydaemon/tx_sms_service_.py | tmkasun/pysmsgate | 42c06f1e8e3598697844fd9b098f314a24709777 | [
"Apache-2.0"
] | null | null | null | pydaemon/tx_sms_service_.py | tmkasun/pysmsgate | 42c06f1e8e3598697844fd9b098f314a24709777 | [
"Apache-2.0"
] | null | null | null | pydaemon/tx_sms_service_.py | tmkasun/pysmsgate | 42c06f1e8e3598697844fd9b098f314a24709777 | [
"Apache-2.0"
] | null | null | null | import json
import sys
import time
from twisted.internet.task import deferLater
from twisted.web import http
from twisted.web.resource import Resource
from twisted.web.server import Site
from twisted.internet import reactor
from gsmmodem.modem import GsmModem, SentSms
from gsmmodem.exceptions import TimeoutException,... | 30.917582 | 103 | 0.602808 | 3,839 | 0.682246 | 0 | 0 | 0 | 0 | 0 | 0 | 1,268 | 0.225342 |
f0b7dafc2a4cbe01ebdeb4efbbb1605f26910088 | 391 | py | Python | plugins/vad/snr_vad/test_snr_vad.py | kowo-zahl/Naomi | 476cfc42036a1ac88e33451431fc64d5ea1aa49a | [
"MIT"
] | 194 | 2018-07-28T14:54:35.000Z | 2022-03-18T12:40:10.000Z | plugins/vad/snr_vad/test_snr_vad.py | HoltTechnologyCorporation/Naomi | 16d5f6ba03ea96c3fa13ed4e2c1f082041d9de31 | [
"MIT"
] | 239 | 2018-07-13T16:15:25.000Z | 2022-03-31T17:55:01.000Z | plugins/vad/snr_vad/test_snr_vad.py | Longshotpro2/Naomi | 9330c63fe24606dc45194d297c665f37a4ec10f7 | [
"MIT"
] | 64 | 2018-07-26T02:18:33.000Z | 2022-01-07T06:53:01.000Z | # -*- coding: utf-8 -*-
from naomi import testutils
from . import snr_vad
class TestSNR_VADPlugin(testutils.Test_VADPlugin):
def setUp(self):
super(TestSNR_VADPlugin, self).setUp()
self.plugin = testutils.get_plugin_instance(
snr_vad.SNRPlugin,
self._test_input
)
... | 24.4375 | 52 | 0.641944 | 314 | 0.803069 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.158568 |
f0b832955eefe7451229c65ceb69048f96000730 | 13,243 | py | Python | dali/test/python/test_operator_rotate.py | L-Net-1992/DALI | 982224d8b53e1156ae092f73f5a7d600982a1eb9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | dali/test/python/test_operator_rotate.py | L-Net-1992/DALI | 982224d8b53e1156ae092f73f5a7d600982a1eb9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | dali/test/python/test_operator_rotate.py | L-Net-1992/DALI | 982224d8b53e1156ae092f73f5a7d600982a1eb9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 37.945559 | 131 | 0.671751 | 3,515 | 0.265423 | 3,848 | 0.290569 | 0 | 0 | 0 | 0 | 1,145 | 0.086461 |
f0b8a938a5d0cde1b5aa321a0fcf6ce1d6ace0f2 | 524 | py | Python | graph/templatetags/helpers.py | Soaring-Outliers/news_graph | ae7cde461e49b6ee8fe932fcf6c581f3a5574da4 | [
"MIT"
] | 1 | 2015-04-19T08:26:34.000Z | 2015-04-19T08:26:34.000Z | graph/templatetags/helpers.py | Soaring-Outliers/news_graph | ae7cde461e49b6ee8fe932fcf6c581f3a5574da4 | [
"MIT"
] | 5 | 2015-04-28T07:31:22.000Z | 2015-05-11T12:47:57.000Z | graph/templatetags/helpers.py | Soaring-Outliers/news_graph | ae7cde461e49b6ee8fe932fcf6c581f3a5574da4 | [
"MIT"
] | null | null | null | from django import template
import bleach
# import the logging library
import logging
# Get an instance of a logger
logger = logging.getLogger(__name__)
register = template.Library()
@register.filter
def sanitize(text):
ALLOWED_TAGS = ['p', 'span', 'h5', 'h6']
ALLOWED_ATTRIBUTES = []
ALLOWED_STYLES ... | 23.818182 | 79 | 0.725191 | 0 | 0 | 0 | 0 | 331 | 0.631679 | 0 | 0 | 74 | 0.141221 |