hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e2b777f0216872b3c536e3c9b5048ceb307fde12 | 1,271 | py | Python | master-node-docker/sentinel/helpers/tokens.py | ramesh-kr/sentinel | ff65bc9200f6c940aa184c0ec0872fdcfef25363 | [
"MIT"
] | 342 | 2017-08-21T20:12:56.000Z | 2022-03-19T17:58:25.000Z | master-node-docker/sentinel/helpers/tokens.py | ramesh-kr/sentinel | ff65bc9200f6c940aa184c0ec0872fdcfef25363 | [
"MIT"
] | 57 | 2017-11-13T11:16:47.000Z | 2022-03-01T13:54:31.000Z | master-node-docker/sentinel/helpers/tokens.py | smtcrms/sentinel | ff65bc9200f6c940aa184c0ec0872fdcfef25363 | [
"MIT"
] | 72 | 2017-11-23T05:13:24.000Z | 2022-02-25T14:18:33.000Z | # coding=utf-8
import requests
from ..config import FEE_PERCENTAGE
from ..config import SWAP_TOKENS
class Tokens(object):
def __init__(self, swap_tokens):
self.tokens = {}
for token in swap_tokens:
self.tokens[token['symbol']] = token
def get_price(self, token):
price = N... | 28.886364 | 72 | 0.579072 |
7309f3bb451a0f25bd9c0cbbf984403fe3c3a35c | 389 | py | Python | tips/urls.py | trojsten/django-tips | 5dee1baaa165091bad66ac848fbd8df7730185a5 | [
"BSD-3-Clause"
] | 9 | 2016-06-10T20:01:41.000Z | 2020-01-07T08:16:40.000Z | tips/urls.py | trojsten/django-tips | 5dee1baaa165091bad66ac848fbd8df7730185a5 | [
"BSD-3-Clause"
] | 17 | 2016-06-17T21:30:57.000Z | 2021-05-09T12:08:22.000Z | tips/urls.py | trojsten/django-tips | 5dee1baaa165091bad66ac848fbd8df7730185a5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import url
from django.views.generic import TemplateView
from . import views
app_name = 'tips'
urlpatterns = [
url(r'get_current_tip/?$', views.get_current_tip_of_day),
url(r'mark_tip_as_read/(?P<tip_id>[0-9]+)?$', views.mark_tip_as_read),
url(r'', TemplateVi... | 27.785714 | 89 | 0.709512 |
de5816c8851ed98f95adeed3937e908bdaa7eed4 | 3,388 | py | Python | app/recipe/views.py | AnonC0DER/recipe-app-api | 40652d328e74a0f3cb2f76d0ad3362ad7c58a3bf | [
"MIT"
] | null | null | null | app/recipe/views.py | AnonC0DER/recipe-app-api | 40652d328e74a0f3cb2f76d0ad3362ad7c58a3bf | [
"MIT"
] | null | null | null | app/recipe/views.py | AnonC0DER/recipe-app-api | 40652d328e74a0f3cb2f76d0ad3362ad7c58a3bf | [
"MIT"
] | null | null | null | from rest_framework.decorators import action
from rest_framework.response import Response
from rest_framework import viewsets, mixins, status
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from core.models import Tag, Ingredient, Recipe
from recipe.s... | 34.222222 | 131 | 0.679162 |
91f1b34275b8f8218be0a643d87030280a91838c | 2,633 | py | Python | kaolin/ops/reduction.py | T0mt0mp/kaolin | 57d1e1478eec8df49dc7cc492f25637cec40399f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/ops/reduction.py | T0mt0mp/kaolin | 57d1e1478eec8df49dc7cc492f25637cec40399f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/ops/reduction.py | T0mt0mp/kaolin | 57d1e1478eec8df49dc7cc492f25637cec40399f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 39.298507 | 102 | 0.698823 |
b3b9f2d3bffe2ce5dfb8b32b5efde71b8973ff07 | 4,272 | py | Python | torch_geometric/datasets/tosca.py | itamblyn/pytorch_geometric | 67ed16492863378b8434b03713a75924f0cc5df1 | [
"MIT"
] | 1 | 2021-10-03T07:45:07.000Z | 2021-10-03T07:45:07.000Z | torch_geometric/datasets/tosca.py | itamblyn/pytorch_geometric | 67ed16492863378b8434b03713a75924f0cc5df1 | [
"MIT"
] | null | null | null | torch_geometric/datasets/tosca.py | itamblyn/pytorch_geometric | 67ed16492863378b8434b03713a75924f0cc5df1 | [
"MIT"
] | null | null | null | import os
import os.path as osp
import glob
import torch
from torch_geometric.data import (InMemoryDataset, Data, download_url,
extract_zip)
from torch_geometric.io import read_txt_array
class TOSCA(InMemoryDataset):
r"""The TOSCA dataset from the `"Numerical Geometry of Non-Rid... | 42.72 | 79 | 0.624064 |
dc6131d854c71bb660cc3b8b6d9f78c4028658c0 | 3,218 | py | Python | src/elliptic/activation_test/torch_routines.py | tk-rusch/DL-HoQMC | 1e748b08f6b05aeeab806b903469bcde146848f5 | [
"MIT"
] | null | null | null | src/elliptic/activation_test/torch_routines.py | tk-rusch/DL-HoQMC | 1e748b08f6b05aeeab806b903469bcde146848f5 | [
"MIT"
] | null | null | null | src/elliptic/activation_test/torch_routines.py | tk-rusch/DL-HoQMC | 1e748b08f6b05aeeab806b903469bcde146848f5 | [
"MIT"
] | null | null | null | import torch
from torch import nn, optim
import numpy as np
from pathlib import Path
import os
def HO_loss(x1, y1, x2, y2):
loss = nn.MSELoss()
return 2.*loss(x1, y1) + loss(x2, y2)
def E_T(x1, y1, x2, y2):
loss = nn.MSELoss()
return torch.sqrt(torch.abs(2.*loss(x1, y1) - loss(x2, y2)))
def init_weig... | 38.771084 | 139 | 0.6445 |
6a8cf45c8359abc1efbdf6bf2dfb017aa78675cc | 1,316 | py | Python | stix_graph_absorber/stix_importer.py | sebastien-mitea/graph_absorber | a4859af097bc140941ed0032781cec8f0a0c76a0 | [
"BSD-3-Clause"
] | null | null | null | stix_graph_absorber/stix_importer.py | sebastien-mitea/graph_absorber | a4859af097bc140941ed0032781cec8f0a0c76a0 | [
"BSD-3-Clause"
] | null | null | null | stix_graph_absorber/stix_importer.py | sebastien-mitea/graph_absorber | a4859af097bc140941ed0032781cec8f0a0c76a0 | [
"BSD-3-Clause"
] | null | null | null | class Graph_absorber:
def __init__(self, blob) -> None:
"""Returns list of dictionaries"""
self.blob=blob
def keep(self, *funcs):
"""Returns elements that match all functions in *funcs"""
data = self.blob
for func in funcs:
data = [d for d in data if func(d)]... | 32.9 | 76 | 0.579027 |
7b9b0ac0401f0b96fa0e291170fc8be1536753f9 | 521 | py | Python | app/models/phonebook.py | jonaeroy/Hobby | 4a829c048df6a290a979580dd42202d435d3fb8c | [
"MIT"
] | null | null | null | app/models/phonebook.py | jonaeroy/Hobby | 4a829c048df6a290a979580dd42202d435d3fb8c | [
"MIT"
] | null | null | null | app/models/phonebook.py | jonaeroy/Hobby | 4a829c048df6a290a979580dd42202d435d3fb8c | [
"MIT"
] | null | null | null | from ferris.core.ndb import BasicModel
from ferris.behaviors.searchable import Searchable
from google.appengine.ext import ndb
class Phonebook(BasicModel):
Name = ndb.StringProperty(required=True)
Number = ndb.StringProperty(required=True)
class Meta:
behaviors = (Searchable,)
@classmeth... | 21.708333 | 50 | 0.642994 |
b4ad887f180d3ae46b7739719f4ddd1688b95a6f | 20 | py | Python | Aula 1/Arquivos/ola.py | Projeto-ALES/AulasWeb | 7e513f522a4dd808ef34b33091c43d17407d2eba | [
"MIT"
] | null | null | null | Aula 1/Arquivos/ola.py | Projeto-ALES/AulasWeb | 7e513f522a4dd808ef34b33091c43d17407d2eba | [
"MIT"
] | null | null | null | Aula 1/Arquivos/ola.py | Projeto-ALES/AulasWeb | 7e513f522a4dd808ef34b33091c43d17407d2eba | [
"MIT"
] | null | null | null | print("Olá, mundo")
| 10 | 19 | 0.65 |
8b0956ef7df6e062b8e21c826c9c6626fd2fe019 | 4,289 | py | Python | main.py | kirill-pinigin/DeepImagePrediction | 7422949aa313662e5cbbbf6cacc35e887f3ec2db | [
"Apache-2.0"
] | null | null | null | main.py | kirill-pinigin/DeepImagePrediction | 7422949aa313662e5cbbbf6cacc35e887f3ec2db | [
"Apache-2.0"
] | null | null | null | main.py | kirill-pinigin/DeepImagePrediction | 7422949aa313662e5cbbbf6cacc35e887f3ec2db | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import torch
import torch.optim as optim
import torch.nn as nn
from ImagePredictionCSVDataSet import ImagePredictionCSVDataSet
from DeepImagePrediction import DeepImagePrediction
from MobilePredictor import MobilePredictor
from MnasPredictor import MnasPredictor
from ResidualPredictor impo... | 51.059524 | 194 | 0.651434 |
93f71ee2ea976b7059caf358f2f202d2c6f7ad96 | 3,871 | py | Python | treq/content.py | twm/treq | b6f73b62a001af3bc0e73c2c772c74971f2ad83e | [
"MIT"
] | null | null | null | treq/content.py | twm/treq | b6f73b62a001af3bc0e73c2c772c74971f2ad83e | [
"MIT"
] | null | null | null | treq/content.py | twm/treq | b6f73b62a001af3bc0e73c2c772c74971f2ad83e | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import cgi
import json
from twisted.python.compat import _PY3
from twisted.internet.defer import Deferred, succeed
from twisted.internet.protocol import Protocol
from twisted.web.client import ResponseDone
from twisted.web.http import PotentialDataLoss... | 28.88806 | 79 | 0.676569 |
2bcd27dfd01427adc5217cefebc92f4d4e6c4014 | 1,173 | py | Python | computer_vision_concepts/Curs Gradients and Color Spaces/extract lines based on HLS.py | Ceachi/Project-Self-Driving-Car-Advanced-Lane-Lines | ab9b101b211fde7f2eb714d0ae6b47961d63f056 | [
"MIT"
] | 2 | 2020-01-04T15:30:48.000Z | 2021-09-28T15:58:53.000Z | computer_vision_concepts/Curs Gradients and Color Spaces/extract lines based on HLS.py | Ceachi/Project-Self-Driving-Car-Advanced-Lane-Lines | ab9b101b211fde7f2eb714d0ae6b47961d63f056 | [
"MIT"
] | null | null | null | computer_vision_concepts/Curs Gradients and Color Spaces/extract lines based on HLS.py | Ceachi/Project-Self-Driving-Car-Advanced-Lane-Lines | ab9b101b211fde7f2eb714d0ae6b47961d63f056 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import cv2
# Read in an image, you can also try test1.jpg or test4.jpg
image = mpimg.imread('test6.jpg')
# TODO: Define a function that thresholds the S-channel of HLS
# Use exclusive lower bound (>) and inclusive upper (<=)
def hls_... | 33.514286 | 73 | 0.680307 |
c3b53e82472648ebd22c912d520c5ae84b2d1d75 | 324 | py | Python | my_lib.py | vv31415926/python_lesson_18 | 8eebad59df94634c3f35f4f0efa2d7a988514922 | [
"MIT"
] | null | null | null | my_lib.py | vv31415926/python_lesson_18 | 8eebad59df94634c3f35f4f0efa2d7a988514922 | [
"MIT"
] | null | null | null | my_lib.py | vv31415926/python_lesson_18 | 8eebad59df94634c3f35f4f0efa2d7a988514922 | [
"MIT"
] | null | null | null | def get_week( n:int ):
r = 'понедельник'
if n == 1:
r = 'понедельник'
if n == 2:
r = 'вторник'
if n == 3:
r = 'среда'
if n == 4:
r = 'четверг'
if n == 5:
r = 'пятница'
if n == 6:
r = 'суббота'
if n == 0:
r = 'воскресенье'
return... | 17.052632 | 25 | 0.382716 |
8498e50f614937779a07306557bc41ef1487ed50 | 2,220 | py | Python | alternative_wmiircs/python/pyxp/messages.py | wrigleyster/wmii-release | 5904d8b625064995fbebc7b0bca00eb74a176e11 | [
"MIT"
] | 3 | 2016-05-09T07:15:29.000Z | 2021-03-20T11:00:39.000Z | alternative_wmiircs/python/pyxp/messages.py | wrigleyster/wmii-release | 5904d8b625064995fbebc7b0bca00eb74a176e11 | [
"MIT"
] | null | null | null | alternative_wmiircs/python/pyxp/messages.py | wrigleyster/wmii-release | 5904d8b625064995fbebc7b0bca00eb74a176e11 | [
"MIT"
] | 1 | 2017-01-27T15:55:33.000Z | 2017-01-27T15:55:33.000Z | from pyxp.fields import *
class MessageBase(type):
idx = 0
def __new__(cls, name, bases, attrs):
fields = []
fieldmap = {}
for k, v in attrs.items():
if isinstance(v, Field):
attrs[k] = None
fields.append(v)
fieldmap[k] = v
... | 30 | 74 | 0.518468 |
be9b7ee40a374cdeb2ff4c38de786791e7801596 | 3,523 | py | Python | tests/test_creation.py | popsa-hq/cookiecutter-data-science | 32dba14aaa279ff494160ba120e37f328928f429 | [
"MIT"
] | null | null | null | tests/test_creation.py | popsa-hq/cookiecutter-data-science | 32dba14aaa279ff494160ba120e37f328928f429 | [
"MIT"
] | null | null | null | tests/test_creation.py | popsa-hq/cookiecutter-data-science | 32dba14aaa279ff494160ba120e37f328928f429 | [
"MIT"
] | null | null | null | import os
import pytest
from subprocess import check_output
from conftest import system_check
def no_curlies(filepath):
""" Utility to make sure no curly braces appear in a file.
That is, was jinja able to render everthing?
"""
with open(filepath, 'r') as f:
data = f.read()
template_s... | 30.903509 | 78 | 0.56855 |
a75cf0f6b17381cc46c165e11b13a408ad719695 | 6,292 | py | Python | plot_usage.py | trendscenter/docker-resource-usage | f8e1a336018a8f7f51a3b04aa9b260aded9252aa | [
"MIT"
] | null | null | null | plot_usage.py | trendscenter/docker-resource-usage | f8e1a336018a8f7f51a3b04aa9b260aded9252aa | [
"MIT"
] | 2 | 2020-03-31T09:37:14.000Z | 2021-02-02T22:25:50.000Z | plot_usage.py | trendscenter/docker-resource-usage | f8e1a336018a8f7f51a3b04aa9b260aded9252aa | [
"MIT"
] | null | null | null | """
# Docker Resource Usage
Plots resource usage by a Docker container
## Usage
Before you start a Docker container, run this command in a Terminal window:
`while true; do docker stats --no-stream | tee -a stats.txt; sleep 1; done`
This command will create a file that looks like this:
CONTAINER ID NAME ... | 32.266667 | 155 | 0.63398 |
9da58e1b7c9490dbe5e3339d5e68f2eacb1b22d9 | 20,291 | py | Python | test/functional/fake_stake/base_test.py | bytn-team/byt | a978b71d938fceeaba3a03856d0ba91f65bbb93c | [
"MIT"
] | 1 | 2020-08-07T15:00:09.000Z | 2020-08-07T15:00:09.000Z | test/functional/fake_stake/base_test.py | bytn-team/byt | a978b71d938fceeaba3a03856d0ba91f65bbb93c | [
"MIT"
] | null | null | null | test/functional/fake_stake/base_test.py | bytn-team/byt | a978b71d938fceeaba3a03856d0ba91f65bbb93c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019 The PIVX developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# -*- coding: utf-8 -*-
from io import BytesIO
from struct import pack
from random import randint, choice
import time
... | 46.538991 | 138 | 0.601005 |
1e6bf762992d3d6dff8ed6b7a22e97d198ecfdc7 | 819 | py | Python | oscilloscope_pyplot.py | salihmarangoz/oscilloscope_visualizer | 306aefe25a0ef813820258f5eb6e21533be169e3 | [
"MIT"
] | null | null | null | oscilloscope_pyplot.py | salihmarangoz/oscilloscope_visualizer | 306aefe25a0ef813820258f5eb6e21533be169e3 | [
"MIT"
] | null | null | null | oscilloscope_pyplot.py | salihmarangoz/oscilloscope_visualizer | 306aefe25a0ef813820258f5eb6e21533be169e3 | [
"MIT"
] | null | null | null |
# ref:
# - https://python-sounddevice.readthedocs.io/en/0.4.3/examples.html#real-time-text-mode-spectrogram
# - https://soundcard.readthedocs.io/en/latest/
import soundcard as sc
import numpy as np
import matplotlib.pyplot as plt
mics = sc.all_microphones(include_loopback=True)
plt.ion()
plt.figure(figsize=(4,4))
f... | 30.333333 | 100 | 0.565324 |
2de5910a6f75682b24fd6889ef6834bcaef0eb13 | 5,057 | py | Python | sdk/schemaregistry/azure-schemaregistry/tests/perfstress_tests/_test_base.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/schemaregistry/azure-schemaregistry/tests/perfstress_tests/_test_base.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/schemaregistry/azure-schemaregistry/tests/perfstress_tests/_test_base.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 37.738806 | 103 | 0.631402 |
bbae925c69685b1afc80beabc3092c5d2a69c824 | 1,726 | py | Python | src/adagraph/configs/config_house.py | anshuln/Training-for-the-Future | dea30999827ff5882468d318fa536f96455267ca | [
"MIT"
] | 1 | 2022-02-02T08:44:58.000Z | 2022-02-02T08:44:58.000Z | src/adagraph/configs/config_house.py | anshuln/Training-for-the-Future | dea30999827ff5882468d318fa536f96455267ca | [
"MIT"
] | 2 | 2021-12-07T06:18:36.000Z | 2021-12-17T09:38:23.000Z | src/adagraph/configs/config_house.py | anshuln/Training-for-the-Future | dea30999827ff5882468d318fa536f96455267ca | [
"MIT"
] | null | null | null | import torch
import torchvision.transforms as transforms
from dataloaders.house import House, HouseSampler
# OPTS FOR COMPCARS
BATCH_SIZE = 64
TEST_BATCH_SIZE = 100
EPOCHS= 15
STEP=4
LR=0.001
DECAY=0.000001
MOMENTUM=0.9
BANDWIDTH=1
DATES=['2009','2010','2011','2012','2013','2014']
VIEWS=['1','2','3','4','5']
CLAS... | 25.014493 | 131 | 0.667439 |
23f80a4fae5b3d8e5cd2a635fe6924552e5e9e2c | 1,130 | py | Python | homeassistant/components/volvooncall/lock.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 1,635 | 2015-01-01T14:59:18.000Z | 2016-04-13T02:36:16.000Z | homeassistant/components/volvooncall/lock.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 1,463 | 2015-01-06T06:18:07.000Z | 2016-04-12T22:30:37.000Z | homeassistant/components/volvooncall/lock.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 659 | 2015-01-05T14:02:23.000Z | 2016-04-12T23:39:31.000Z | """Support for Volvo On Call locks."""
from __future__ import annotations
from homeassistant.components.lock import LockEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from ... | 28.25 | 73 | 0.714159 |
053b2905bc99ca66e0c723eb6e4432a40e12ee7c | 1,555 | py | Python | pythainlp/augment/word2vec/ltw2v.py | Gorlph/pythainlp | 6135ba5f490e00640de902a0d5c65a4537739d98 | [
"Apache-2.0"
] | 569 | 2017-10-22T16:48:55.000Z | 2022-03-30T09:59:14.000Z | pythainlp/augment/word2vec/ltw2v.py | Gorlph/pythainlp | 6135ba5f490e00640de902a0d5c65a4537739d98 | [
"Apache-2.0"
] | 531 | 2017-10-24T04:34:13.000Z | 2022-03-20T16:30:14.000Z | pythainlp/augment/word2vec/ltw2v.py | Gorlph/pythainlp | 6135ba5f490e00640de902a0d5c65a4537739d98 | [
"Apache-2.0"
] | 218 | 2017-12-08T01:52:25.000Z | 2022-03-21T06:56:32.000Z | # -*- coding: utf-8 -*-
from pythainlp.augment.word2vec.core import Word2VecAug
from pythainlp.corpus import get_corpus_path
from pythainlp.tokenize import word_tokenize
from typing import List, Tuple
class LTW2VAug:
"""
Text Augment using word2vec from LTW2V
LTW2V:
`github.com/PyThaiNLP/large-thaiwo... | 26.810345 | 96 | 0.589711 |
f608f28df1bd58b7dc60a505791569981d68938c | 4,899 | py | Python | ex02/lib/linear_layer_fa.py | anianruoss/LDABNN | 5637d391b48a21d99248ed2ba5983ae423410a69 | [
"MIT"
] | null | null | null | ex02/lib/linear_layer_fa.py | anianruoss/LDABNN | 5637d391b48a21d99248ed2ba5983ae423410a69 | [
"MIT"
] | null | null | null | ex02/lib/linear_layer_fa.py | anianruoss/LDABNN | 5637d391b48a21d99248ed2ba5983ae423410a69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2020 Alexander Meulemans
#
# 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... | 37.396947 | 80 | 0.649929 |
444ff6e00306e3e7e0f86da9334f17ebece0fa36 | 14,091 | py | Python | applications/iSpark/languages/en.py | Justin261997/payroll-system-python | 2d6d5bcdcda5fccafa9b13b8c05ecf89a89f4400 | [
"BSD-3-Clause"
] | null | null | null | applications/iSpark/languages/en.py | Justin261997/payroll-system-python | 2d6d5bcdcda5fccafa9b13b8c05ecf89a89f4400 | [
"BSD-3-Clause"
] | null | null | null | applications/iSpark/languages/en.py | Justin261997/payroll-system-python | 2d6d5bcdcda5fccafa9b13b8c05ecf89a89f4400 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
{
'!=': '!=',
'!langcode!': 'en-us',
'!langname!': 'English (US)',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN... | 39.917847 | 287 | 0.657654 |
ad929aa1de82565fb8c4bc6a0758b27557ec93c0 | 258 | py | Python | extension_file.py | Chaytali/Python | a5dbb537078747283850e69637d2994b267f0a3c | [
"bzip2-1.0.6"
] | null | null | null | extension_file.py | Chaytali/Python | a5dbb537078747283850e69637d2994b267f0a3c | [
"bzip2-1.0.6"
] | null | null | null | extension_file.py | Chaytali/Python | a5dbb537078747283850e69637d2994b267f0a3c | [
"bzip2-1.0.6"
] | null | null | null | def ext():
filename = input("Input the Filename: ")
f_extns = filename.split(".")
#print ("The extension of the file is : " + repr(f_extns[-1]))
print f_extns
print type(f_extns)
print f_extns[1]
if(__name__=='__main__'):
ext()
| 21.5 | 66 | 0.608527 |
2f3926fc0fb38c05fe8ad4577bed1233d458a849 | 19,604 | py | Python | notebooks/128.3-BDP-path-cluster-again.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/128.3-BDP-path-cluster-again.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | notebooks/128.3-BDP-path-cluster-again.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | # %% [markdown]
# # THE MIND OF A MAGGOT
# %% [markdown]
# ## Imports
import os
import time
import warnings
from itertools import chain
import colorcet as cc
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.transforms as transforms
import networkx as nx
import numpy as np
import pandas as pd... | 26.208556 | 97 | 0.671853 |
3cd2969196c20edf604e62f58d80fd22c03683eb | 2,395 | py | Python | samples/snippets/quickstart_listassets.py | LaudateCorpus1/python-asset | 6d03a57e37387342c047ca76f9e6c15941390ad6 | [
"Apache-2.0"
] | 24 | 2020-04-24T04:15:30.000Z | 2022-03-23T12:24:00.000Z | samples/snippets/quickstart_listassets.py | LaudateCorpus1/python-asset | 6d03a57e37387342c047ca76f9e6c15941390ad6 | [
"Apache-2.0"
] | 115 | 2020-02-07T03:12:01.000Z | 2022-03-07T16:39:29.000Z | samples/snippets/quickstart_listassets.py | LaudateCorpus1/python-asset | 6d03a57e37387342c047ca76f9e6c15941390ad6 | [
"Apache-2.0"
] | 21 | 2020-02-08T04:14:50.000Z | 2022-01-29T08:07:32.000Z | #!/usr/bin/env python
# Copyright 2020 Google 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... | 32.808219 | 89 | 0.687265 |
477a11f010ec983438cc8dbd8ee65a054d10618d | 32,568 | py | Python | pgmpy/inference/ExactInference.py | daanknoope/pgmpy | b1ad5ec01837dc1fc369dd542971492fae642ab4 | [
"MIT"
] | null | null | null | pgmpy/inference/ExactInference.py | daanknoope/pgmpy | b1ad5ec01837dc1fc369dd542971492fae642ab4 | [
"MIT"
] | 20 | 2019-02-22T09:24:57.000Z | 2019-02-25T14:53:54.000Z | pgmpy/inference/ExactInference.py | daanknoope/pgmpy | b1ad5ec01837dc1fc369dd542971492fae642ab4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import copy
import itertools
import networkx as nx
import numpy as np
from pgmpy.extern.six.moves import filter, range
from pgmpy.extern.six import string_types
from pgmpy.factors import factor_product
from pgmpy.inference import Inference
from pgmpy.models import JunctionTree
from pgmpy.utils ... | 44.552668 | 118 | 0.558493 |
fd5bd99fcbfbe161a4b64ddac6d9b650558802ca | 7,289 | py | Python | historic_hebrew_dates/chart_parser.py | UUDigitalHumanitieslab/historic-hebrew-dates | 5ace44d9b1315a96a96ea296383f0b618d994212 | [
"BSD-3-Clause"
] | 1 | 2020-06-24T10:29:17.000Z | 2020-06-24T10:29:17.000Z | historic_hebrew_dates/chart_parser.py | UUDigitalHumanitieslab/historic-hebrew-dates | 5ace44d9b1315a96a96ea296383f0b618d994212 | [
"BSD-3-Clause"
] | 11 | 2019-10-10T08:50:01.000Z | 2022-03-02T05:23:55.000Z | historic_hebrew_dates/chart_parser.py | UUDigitalHumanitieslab/historic-hebrew-dates | 5ace44d9b1315a96a96ea296383f0b618d994212 | [
"BSD-3-Clause"
] | null | null | null | from typing import cast, List, Dict, Tuple, Set, TypeVar
from functools import reduce
from itertools import chain
from .pattern_matcher import PatternMatcher
from .tokenizer import FragmentedToken
from historic_hebrew_dates.pattern_matcher import PatternMatcherState, TokenSpan
T = TypeVar('T', bound='ChartParser')
c... | 36.445 | 97 | 0.568528 |
e205a727cda78e8202f84523bc9d0fa7e9abd570 | 553 | py | Python | migrations/versions/554a80bfdef0_add_remote_network_services_column.py | 5genesis/Portal | f486c0b0939f07588c1dfa0411ce1e8ba7625e57 | [
"Apache-2.0"
] | 1 | 2020-04-16T16:55:40.000Z | 2020-04-16T16:55:40.000Z | migrations/versions/554a80bfdef0_add_remote_network_services_column.py | 5genesis/Portal | f486c0b0939f07588c1dfa0411ce1e8ba7625e57 | [
"Apache-2.0"
] | 6 | 2020-03-06T11:33:23.000Z | 2021-07-30T07:08:20.000Z | migrations/versions/554a80bfdef0_add_remote_network_services_column.py | 5genesis/Portal | f486c0b0939f07588c1dfa0411ce1e8ba7625e57 | [
"Apache-2.0"
] | 1 | 2020-07-12T13:10:25.000Z | 2020-07-12T13:10:25.000Z | """Add remote network services column
Revision ID: 554a80bfdef0
Revises: 6d03b6285416
Create Date: 2020-10-22 09:10:18.603156
"""
from alembic import op
import sqlalchemy as sa
from app.models import JSONEncodedDict
# revision identifiers, used by Alembic.
revision = '554a80bfdef0'
down_revision = '6d03b6285416'
br... | 21.269231 | 101 | 0.770344 |
2c05b96637d8858208e910c519facb9386b314b4 | 3,444 | py | Python | demo.py | casastorta/software_versions | 7b1b36563ebfe38be3e4fb3b4e83721025bf55a6 | [
"MIT"
] | null | null | null | demo.py | casastorta/software_versions | 7b1b36563ebfe38be3e4fb3b4e83721025bf55a6 | [
"MIT"
] | 2 | 2015-03-09T12:50:03.000Z | 2015-05-26T16:30:00.000Z | demo.py | casastorta/software_versions | 7b1b36563ebfe38be3e4fb3b4e83721025bf55a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Testcase for software versions.
Scenario:
Check for latest stable software versions
'''
import os
import sys
def main():
from software_versions import versions as ver
print (("Sendmail: %s" % (ver.check_sendmail())))
print (("ISC BIND: %s" % (ver.check_b... | 46.540541 | 72 | 0.480546 |
9bb1fb9abd4b9e2d66fc8543b41e187b3d0ed897 | 1,475 | py | Python | test/test_tokenizer.py | mismaah/dhivehi-nlp | 5faa31141a446933e0949bdc29dd9905a1548b90 | [
"MIT"
] | 9 | 2021-04-18T17:55:19.000Z | 2022-01-25T03:47:53.000Z | test/test_tokenizer.py | mismaah/dhivehi-nlp | 5faa31141a446933e0949bdc29dd9905a1548b90 | [
"MIT"
] | null | null | null | test/test_tokenizer.py | mismaah/dhivehi-nlp | 5faa31141a446933e0949bdc29dd9905a1548b90 | [
"MIT"
] | 1 | 2021-06-04T10:42:41.000Z | 2021-06-04T10:42:41.000Z | import unittest
from dhivehi_nlp import tokenizer
class test_tokenizer(unittest.TestCase):
def test_sentence_tokenizer(self):
self.assertEqual(
tokenizer.sentence_tokenize(
"މާފަ ބުނެފަ އެވެ. އިތުރު ހާމައެއް ނުކުރެ އެވެ."
),
["މާފަ ބުނެފަ އެވެ", "އިތުރު ... | 32.065217 | 86 | 0.475932 |
1b90079865b052000711f8e47612ac410a12b5e0 | 2,555 | py | Python | tests/flow/test_self_pointing_node.py | leibale/RedisGraph | 7ca05445ab604e2cb2463d3fb88ecb985bffbbd2 | [
"ISC",
"Apache-2.0",
"MIT",
"Ruby",
"BSD-3-Clause"
] | 988 | 2019-05-13T13:46:45.000Z | 2022-03-31T19:36:19.000Z | tests/flow/test_self_pointing_node.py | leibale/RedisGraph | 7ca05445ab604e2cb2463d3fb88ecb985bffbbd2 | [
"ISC",
"Apache-2.0",
"MIT",
"Ruby",
"BSD-3-Clause"
] | 1,033 | 2019-05-14T07:54:38.000Z | 2022-03-31T14:28:38.000Z | tests/flow/test_self_pointing_node.py | leibale/RedisGraph | 7ca05445ab604e2cb2463d3fb88ecb985bffbbd2 | [
"ISC",
"Apache-2.0",
"MIT",
"Ruby",
"BSD-3-Clause"
] | 165 | 2019-05-14T07:31:30.000Z | 2022-03-30T19:04:17.000Z | import os
import sys
from RLTest import Env
from redisgraph import Graph, Node, Edge
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from base import FlowTestsBase
redis_graph = None
GRAPH_ID = "G"
class testSelfPointingNode(FlowTestsBase):
def __init__(self):
self.env = Env(decodeRespon... | 33.181818 | 71 | 0.63953 |
8d73a090ed6f84db9f6cb404f7cc2dd270892ac4 | 15,511 | py | Python | python/tvm/relay/expr.py | eleflea/tvm | d199243d8907b2d8062dd9c20b69dcb9765a970f | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 90 | 2019-01-26T00:38:49.000Z | 2022-03-11T23:12:34.000Z | python/tvm/relay/expr.py | were/tvm | 7f567264ae1bc1e4bc24a2eeb5b18425997dce22 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 91 | 2019-02-27T00:17:01.000Z | 2022-02-21T18:08:21.000Z | python/tvm/relay/expr.py | were/tvm | 7f567264ae1bc1e4bc24a2eeb5b18425997dce22 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 41 | 2019-01-28T14:37:03.000Z | 2022-03-31T03:58:57.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 28.67098 | 92 | 0.634582 |
1178903a9eebbca1d253b1ca603daeac076adb83 | 233 | py | Python | hold_grudge/hold_grudge/settings/develop.py | xiaopangxia/hold_grudge | 58c6842a2f8ea41604b3cf37d3bd28c449cabd14 | [
"MIT"
] | 1 | 2020-11-23T16:12:55.000Z | 2020-11-23T16:12:55.000Z | hold_grudge/hold_grudge/settings/develop.py | xiaopangxia/hold_grudge | 58c6842a2f8ea41604b3cf37d3bd28c449cabd14 | [
"MIT"
] | null | null | null | hold_grudge/hold_grudge/settings/develop.py | xiaopangxia/hold_grudge | 58c6842a2f8ea41604b3cf37d3bd28c449cabd14 | [
"MIT"
] | null | null | null | from .base import * # NOQA
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
| 19.416667 | 63 | 0.60515 |
ca244c156d24771f043d03910a0d4bbd6db165a1 | 6,396 | py | Python | src/utils/visualizer.py | hrshl95/Music_Player_Based_On_Face_Expression_Recognition | acc3516a7c630f775b02db8366a77ea49e776200 | [
"MIT"
] | null | null | null | src/utils/visualizer.py | hrshl95/Music_Player_Based_On_Face_Expression_Recognition | acc3516a7c630f775b02db8366a77ea49e776200 | [
"MIT"
] | null | null | null | src/utils/visualizer.py | hrshl95/Music_Player_Based_On_Face_Expression_Recognition | acc3516a7c630f775b02db8366a77ea49e776200 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
import numpy as np
import matplotlib.cm as cm
from mpl_toolkits.axes_grid1 import make_axes_locatable
# import matplotlib.pyplot as plt
import numpy.ma as ma
def make_mosaic(images, num_rows, num_cols, border=1, class_names=None):
num... | 35.142857 | 83 | 0.654784 |
41059f0419ee2d4abf1eeb319397193755be22d0 | 1,070 | py | Python | app/campusnet_login.py | OpenJUB/jCourse | a2b953480b913c3d2cf9774afd5802b0c5364189 | [
"MIT"
] | null | null | null | app/campusnet_login.py | OpenJUB/jCourse | a2b953480b913c3d2cf9774afd5802b0c5364189 | [
"MIT"
] | null | null | null | app/campusnet_login.py | OpenJUB/jCourse | a2b953480b913c3d2cf9774afd5802b0c5364189 | [
"MIT"
] | null | null | null | import requests
_UNIVERSITY_LOGINS = [
{
"name": "Jacobs University Bremen",
"url": 'https://campusnet.jacobs-university.de/scripts/mgrqispi.dll',
"domain": 'jacobs-university.de',
"payload": {
'usrname': "",
'pass': "",
"APPNAME": "CampusNet",
... | 28.157895 | 78 | 0.536449 |
9929727674dc82c99cdd26ba5ae776d6c3cb91cf | 6,912 | py | Python | py-polars/polars/datatypes.py | ritchie46/polars | 5b595b8657434c9782b735390f8aab36de58f45b | [
"MIT"
] | 1,595 | 2020-06-17T11:23:08.000Z | 2021-05-06T12:56:22.000Z | py-polars/polars/datatypes.py | ritchie46/polars | 5b595b8657434c9782b735390f8aab36de58f45b | [
"MIT"
] | 346 | 2020-06-24T07:11:19.000Z | 2021-05-06T10:39:22.000Z | py-polars/polars/datatypes.py | ritchie46/polars | 5b595b8657434c9782b735390f8aab36de58f45b | [
"MIT"
] | 92 | 2020-07-11T04:46:19.000Z | 2021-04-30T20:25:31.000Z | import ctypes
import typing as tp
from typing import Any, Callable, Dict, Sequence, Type
import numpy as np
try:
import pyarrow as pa
_PYARROW_AVAILABLE = True
except ImportError:
_PYARROW_AVAILABLE = False
from _ctypes import _SimpleCData
try:
from polars.polars import PySeries
_DOCUMENTING =... | 19.748571 | 82 | 0.615596 |
e00192185874f797d2d36b6eaea49241f03ecaeb | 341 | py | Python | app/services/models/pool_member.py | tirinox/thorchainmonitorbot | 9f4604ea3c4ce91239e570b51381209096fc769f | [
"MIT"
] | 3 | 2020-10-13T16:48:35.000Z | 2021-06-02T19:11:51.000Z | app/services/models/pool_member.py | tirinox/thorchainmonitorbot | 9f4604ea3c4ce91239e570b51381209096fc769f | [
"MIT"
] | null | null | null | app/services/models/pool_member.py | tirinox/thorchainmonitorbot | 9f4604ea3c4ce91239e570b51381209096fc769f | [
"MIT"
] | 1 | 2021-02-28T19:22:18.000Z | 2021-02-28T19:22:18.000Z | from dataclasses import dataclass
@dataclass
class PoolMemberDetails:
asset_added: int = 0
asset_withdrawn: int = 0
asset_address: str = ''
rune_added: int = 0
rune_withdrawn: int = 0
run_address: str = ''
date_first_added: int = 0
date_last_added: int = 0
liquidity_units: int = ... | 18.944444 | 33 | 0.651026 |
e8ed4e19370e0d5a31a849400d9cbfb4c39bd53d | 7,266 | py | Python | spectree/utils.py | Michae1Weiss/spectree | 4fc056c42bd9bf8ed4a84f93ff33b413bdc013ae | [
"Apache-2.0"
] | null | null | null | spectree/utils.py | Michae1Weiss/spectree | 4fc056c42bd9bf8ed4a84f93ff33b413bdc013ae | [
"Apache-2.0"
] | 1 | 2022-01-18T22:30:20.000Z | 2022-01-18T22:30:20.000Z | spectree/utils.py | Michae1Weiss/spectree | 4fc056c42bd9bf8ed4a84f93ff33b413bdc013ae | [
"Apache-2.0"
] | null | null | null | import inspect
import logging
import re
from hashlib import sha1
from typing import Any, Callable, Optional, Tuple, Type
from pydantic import BaseModel
# parse HTTP status code to get the code
HTTP_CODE = re.compile(r"^HTTP_(?P<code>\d{3})$")
logger = logging.getLogger(__name__)
def parse_comments(func: Callable[.... | 29.298387 | 88 | 0.634462 |
898c69d6e5102cbfb392d5d707d09a9b85f243e7 | 1,029 | py | Python | pinder/peering_requests/migrations/0001_initial.py | maznu/pinder | 3262a7e5f209ca782b57f172ef459d0a8f37f210 | [
"Apache-2.0"
] | 13 | 2016-10-23T18:28:08.000Z | 2021-04-14T22:37:47.000Z | pinder/peering_requests/migrations/0001_initial.py | maznu/pinder | 3262a7e5f209ca782b57f172ef459d0a8f37f210 | [
"Apache-2.0"
] | 2 | 2016-10-23T18:34:18.000Z | 2020-07-09T17:34:04.000Z | pinder/peering_requests/migrations/0001_initial.py | maznu/pinder | 3262a7e5f209ca782b57f172ef459d0a8f37f210 | [
"Apache-2.0"
] | 2 | 2018-01-16T11:03:21.000Z | 2020-06-21T08:15:05.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-22 15:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Reques... | 35.482759 | 190 | 0.596696 |
3af52fe80f993bfce71705af3135b5ce1ca1a5c5 | 11,452 | py | Python | dashboard/bq_export/bq_export/bq_jobs.py | Scopetta197/catapult | 9cbc959a8a88460f71473794bdc92e39d6b3ee0d | [
"BSD-3-Clause"
] | 1 | 2021-07-04T03:26:43.000Z | 2021-07-04T03:26:43.000Z | dashboard/bq_export/bq_export/bq_jobs.py | Keshawnjones/catapult | b226a4b7af31ec65e2c3ae3fcf3f46eb89df28ac | [
"BSD-3-Clause"
] | null | null | null | dashboard/bq_export/bq_export/bq_jobs.py | Keshawnjones/catapult | b226a4b7af31ec65e2c3ae3fcf3f46eb89df28ac | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Export pinpoint job data to BigQuery with Beam & Cloud Dataflow."""
from __future__ import absolute_import
from __future__ import division
from __futu... | 30.216359 | 80 | 0.497468 |
ad10eb23c457fcc00b02b01cc0131679307a45da | 41 | py | Python | exercise/main_test.py | progzc/PythonDemo | 0515fee3511bc132bfddf480014f61ce52080616 | [
"Apache-2.0"
] | null | null | null | exercise/main_test.py | progzc/PythonDemo | 0515fee3511bc132bfddf480014f61ce52080616 | [
"Apache-2.0"
] | null | null | null | exercise/main_test.py | progzc/PythonDemo | 0515fee3511bc132bfddf480014f61ce52080616 | [
"Apache-2.0"
] | null | null | null | import calc2
print(calc2.add(100, 200))
| 10.25 | 26 | 0.731707 |
1a5376fe6ff44b4b0780e9b05e0b7d04b5e38153 | 10,423 | py | Python | cave_factory.py | huderlem/mcdungeon | fb81fa13808662b0c44ea7cb022d0e32871c0c53 | [
"MIT"
] | 1 | 2021-01-12T11:37:16.000Z | 2021-01-12T11:37:16.000Z | cave_factory.py | huderlem/mcdungeon | fb81fa13808662b0c44ea7cb022d0e32871c0c53 | [
"MIT"
] | null | null | null | cave_factory.py | huderlem/mcdungeon | fb81fa13808662b0c44ea7cb022d0e32871c0c53 | [
"MIT"
] | null | null | null | # Cave factory produces a cave-like structure with no disconnected
# rooms. Caves typically have a smooth, twisty appearance with lots of
# alcoves. This is based largely on the cellular automata examples at:
#
# http://roguebasin.roguelikedevelopment.org
#
# It also borrows code for joining disconnected cells from Da... | 33.840909 | 79 | 0.469347 |
b5363b02518d989c733c8b775d7a7e4ac7545316 | 13,224 | py | Python | contrib/devtools/pixie.py | Garlic-HM/garliccoin | 9eefb7a2a8c7cccfbc833756c7b16bc181473b6d | [
"MIT"
] | null | null | null | contrib/devtools/pixie.py | Garlic-HM/garliccoin | 9eefb7a2a8c7cccfbc833756c7b16bc181473b6d | [
"MIT"
] | null | null | null | contrib/devtools/pixie.py | Garlic-HM/garliccoin | 9eefb7a2a8c7cccfbc833756c7b16bc181473b6d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Compact, self-contained ELF implementation for garliccoin-core security checks.
'''
import struct
import types... | 40.814815 | 392 | 0.657063 |
cfdd6662b59d2a6677e193fac9553f4e5d3e7d62 | 2,322 | py | Python | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_glmpredictstreamop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_glmpredictstreamop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_glmpredictstreamop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | import unittest
from pyalink.alink import *
import numpy as np
import pandas as pd
class TestGlmPredictStreamOp(unittest.TestCase):
def test_glmpredictstreamop(self):
# data
df = pd.DataFrame([
[1.6094,118.0000,69.0000,1.0000,2.0000],
[2.3026,58.0000,35.0000,1.0000,2.0000],
... | 34.656716 | 135 | 0.507321 |
0a9ff80aad3d60818aa9c3ef17ea08a9ed9ebeae | 835 | py | Python | setup.py | elmcrest/async-telegram-client | 567df1cce0a04a708d7d477bc91a0ccb9b2dce56 | [
"MIT"
] | null | null | null | setup.py | elmcrest/async-telegram-client | 567df1cce0a04a708d7d477bc91a0ccb9b2dce56 | [
"MIT"
] | null | null | null | setup.py | elmcrest/async-telegram-client | 567df1cce0a04a708d7d477bc91a0ccb9b2dce56 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='aioteleclient',
version='0.0.1',
url='https://github.com/elmcrest/aioteleclient',
license='MIT',
description='An fast and heavily tested async telegram messenger client.',
long_description="An fast and heavily tested async telegram messen... | 33.4 | 87 | 0.668263 |
3841b4456d952d28891557557a6becc44badb30d | 4,722 | py | Python | loguetools/explode.py | GenevieveBuckley/loguetools | 23001b6e9615e72572394234ba3cb85fd1a9f811 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T12:11:34.000Z | 2020-10-15T12:11:34.000Z | loguetools/explode.py | GenevieveBuckley/loguetools | 23001b6e9615e72572394234ba3cb85fd1a9f811 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T12:18:34.000Z | 2020-10-15T12:18:34.000Z | loguetools/explode.py | GenevieveBuckley/loguetools | 23001b6e9615e72572394234ba3cb85fd1a9f811 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import click
from zipfile import ZipFile, ZIP_DEFLATED
import pathlib
import hashlib
import re
from loguetools import og, xd, common
from loguetools import version
XD_PATCH_LENGTH = 1024
def explode(filename, match_name, match_ident, prepend_id, append_md5_4, append_version, unskip_init):
"... | 39.35 | 110 | 0.662431 |
680d86adcbdd7c3b75d7670e4a97d197ee319933 | 487 | py | Python | extensions/iocompython/tests/test_spy.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | extensions/iocompython/tests/test_spy.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | extensions/iocompython/tests/test_spy.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | from iocompython import Root, MemoryBlock, Connection, Signal, json2bin
import ioterminal
import time
def main():
root = Root('spy', device_nr=10000, network_name='cafenet', security='certchainfile=myhome-bundle.crt')
root.queue_events()
ioterminal.start(root)
connection = Connection(root, "127.... | 23.190476 | 107 | 0.675565 |
da2f650bbdad2c4ab438c5c91643ac0be3e82a0a | 468 | py | Python | scripts/add_leading_zeroes.py | Hunter8moon/h8m2 | 9cb2ced9d701650258f5e4d14e6036a3b56b0b96 | [
"MIT"
] | null | null | null | scripts/add_leading_zeroes.py | Hunter8moon/h8m2 | 9cb2ced9d701650258f5e4d14e6036a3b56b0b96 | [
"MIT"
] | null | null | null | scripts/add_leading_zeroes.py | Hunter8moon/h8m2 | 9cb2ced9d701650258f5e4d14e6036a3b56b0b96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import shutil
sourcedir = r"../resources/input/predict_input"
prefix = r""
extension = r"jpg"
files = [(f, f[f.rfind("."):], f[:f.rfind(".")].replace(prefix, "")) for f in os.listdir(sourcedir) if f.endswith(extension)]
maxlen = len(max([f[2] for f in files], key=len))
for item in f... | 29.25 | 125 | 0.623932 |
26ac2f303e72c57468715e8ed41d8a18592de1d5 | 3,527 | py | Python | heatmiserV3/devices.py | toby200/heatmiserV3 | d23529490048a4d83b8b45e0660b6d7fba4b5939 | [
"MIT"
] | null | null | null | heatmiserV3/devices.py | toby200/heatmiserV3 | d23529490048a4d83b8b45e0660b6d7fba4b5939 | [
"MIT"
] | null | null | null | heatmiserV3/devices.py | toby200/heatmiserV3 | d23529490048a4d83b8b45e0660b6d7fba4b5939 | [
"MIT"
] | null | null | null | from .crc16 import CRC16
from .config import Config
from .connection import Connection
from .protocol_manager import ProtocolManager
import logging
class Device:
def __init__(self, protocol_id :str, name :str, address :int):
self.protocol_id = protocol_id
self.name = name
self.a... | 36.360825 | 105 | 0.613836 |
ba6635a94c1f026840e42341c5ed6b1f1dbb9b30 | 1,034 | py | Python | utils/lex_yacc/gen_lex_cpp.py | openharmony-gitee-mirror/graphic_standard | dc99aa91453f9133c16f488c6f071d7ef1936f2f | [
"Apache-2.0"
] | null | null | null | utils/lex_yacc/gen_lex_cpp.py | openharmony-gitee-mirror/graphic_standard | dc99aa91453f9133c16f488c6f071d7ef1936f2f | [
"Apache-2.0"
] | null | null | null | utils/lex_yacc/gen_lex_cpp.py | openharmony-gitee-mirror/graphic_standard | dc99aa91453f9133c16f488c6f071d7ef1936f2f | [
"Apache-2.0"
] | 1 | 2021-09-13T11:18:12.000Z | 2021-09-13T11:18:12.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Huawei Device Co., Ltd.
# 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... | 31.333333 | 74 | 0.7147 |
96a80e960e4eb7f0d3f37f743eb2acbaf27d1b4e | 13,013 | py | Python | utils/utils.py | bzho3923/GNN_SWINIT | ff4099c0103da9f44d3520fcc52a995cf1dbfa69 | [
"Apache-2.0"
] | null | null | null | utils/utils.py | bzho3923/GNN_SWINIT | ff4099c0103da9f44d3520fcc52a995cf1dbfa69 | [
"Apache-2.0"
] | null | null | null | utils/utils.py | bzho3923/GNN_SWINIT | ff4099c0103da9f44d3520fcc52a995cf1dbfa69 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from utils.data_processing import get_data
from torch_geometric.data import TemporalData
class MergeLayer(torch.nn.Module):
def __init__(self, dim1, dim2, dim3, dim4):
super().__init__()
self.fc1 = torch.nn.Linear(dim1 + dim2, dim3)
self.fc2 = torch.nn.Linear(dim3, dim4)
... | 50.832031 | 217 | 0.697841 |
6498d4e0e417083332f41a9bd000769248aba4a5 | 2,069 | py | Python | cms/migrations/0004_auto_20170122_1521.py | josemlp91/django-landingcms | 9d9270204369e9663ff15eb0bd4c4093b3727c6c | [
"Apache-2.0"
] | null | null | null | cms/migrations/0004_auto_20170122_1521.py | josemlp91/django-landingcms | 9d9270204369e9663ff15eb0bd4c4093b3727c6c | [
"Apache-2.0"
] | null | null | null | cms/migrations/0004_auto_20170122_1521.py | josemlp91/django-landingcms | 9d9270204369e9663ff15eb0bd4c4093b3727c6c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-22 15:21
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('content', '0002_auto_20170122_1509'),
('cms', '0003... | 43.104167 | 168 | 0.663122 |
a4ffde0d81ccb4fc14489c99c5677c3a7d9472c7 | 1,689 | py | Python | code.py | pawan-shewale/clustering-mall-customers | 3db27c33c4e8d6201ee51b4ee83688fd6b3d2fcc | [
"MIT"
] | null | null | null | code.py | pawan-shewale/clustering-mall-customers | 3db27c33c4e8d6201ee51b4ee83688fd6b3d2fcc | [
"MIT"
] | null | null | null | code.py | pawan-shewale/clustering-mall-customers | 3db27c33c4e8d6201ee51b4ee83688fd6b3d2fcc | [
"MIT"
] | null | null | null | # --------------
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.cluster import KMeans
from sklearn import preprocessing
import scipy.cluster.hierarchy as sch
import matplotlib.pyplot as plt
from scipy.cluster.hierarchy import dendrogram, linkage
#Impor... | 24.478261 | 87 | 0.73653 |
57c3ba1133848e6519decde8b0f3f0aaebea726a | 880 | py | Python | testing/test_sct_dmri_compute_bvalue.py | valosekj/spinalcordtoolbox | 266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09 | [
"MIT"
] | 1 | 2021-09-07T08:52:21.000Z | 2021-09-07T08:52:21.000Z | testing/test_sct_dmri_compute_bvalue.py | valosekj/spinalcordtoolbox | 266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09 | [
"MIT"
] | null | null | null | testing/test_sct_dmri_compute_bvalue.py | valosekj/spinalcordtoolbox | 266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#########################################################################################
#
# Test function for sct_dmri_concat_bvecs
#
# ---------------------------------------------------------------------------------------
# Copyright (c) 2017 Polytechnique Montreal <www.neuro.polymtl.ca>
# Aut... | 29.333333 | 89 | 0.469318 |
18e22abedeb7a0faf10d1c7cfd168c9151ac6650 | 1,171 | py | Python | tests/unit_tests/test_map_class_names_to_ints.py | diamondproblem/Naive-Bayes | 36daed4fa848199778d495da993a58f563339ba0 | [
"MIT"
] | 1 | 2020-12-15T21:27:36.000Z | 2020-12-15T21:27:36.000Z | tests/unit_tests/test_map_class_names_to_ints.py | diamondproblem/Naive-Bayes | 36daed4fa848199778d495da993a58f563339ba0 | [
"MIT"
] | null | null | null | tests/unit_tests/test_map_class_names_to_ints.py | diamondproblem/Naive-Bayes | 36daed4fa848199778d495da993a58f563339ba0 | [
"MIT"
] | 1 | 2020-12-15T21:27:46.000Z | 2020-12-15T21:27:46.000Z | from naive_bayes import NaiveBayesClassifier
import random
def test_map_class_names_to_ints():
classifier = NaiveBayesClassifier()
dataset = [['3.393533211', '2.331273381', '0'],
['3.110073483', '1.781539638', '0'],
['1.343808831', '3.368360954', '0'],
... | 36.59375 | 74 | 0.557643 |
80b938e3ac57e9d6a9df07528f3f1be4c81cad40 | 182,011 | py | Python | colour/colorimetry/datasets/cmfs.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | 6 | 2019-06-18T18:53:29.000Z | 2021-09-10T21:02:45.000Z | colour/colorimetry/datasets/cmfs.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/colorimetry/datasets/cmfs.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Multi-Spectral Distributions of the Colour Matching Functions
=============================================================
Defines the multi-spectral distributions of the colour matching functions.
The colour matching functions data is in the form of a *dict* of
:class:`colour.colorimetry... | 55.660856 | 79 | 0.603821 |
4a769e7e02866c03e77d439fd3bcded5695b8ef1 | 7,271 | py | Python | src/mist/api/containers/models.py | SpiralUp/mist.api | a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934 | [
"Apache-2.0"
] | null | null | null | src/mist/api/containers/models.py | SpiralUp/mist.api | a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934 | [
"Apache-2.0"
] | null | null | null | src/mist/api/containers/models.py | SpiralUp/mist.api | a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934 | [
"Apache-2.0"
] | null | null | null | """Definition of Container mongoengine models"""
import uuid
import logging
import mongoengine as me
from mist.api.models import Cloud
from mist.api.models import CloudLocation
from mist.api.models import Organization
from mist.api.tag.models import Tag
from mist.api.ownership.mixins import OwnershipMixin
from mist.... | 31.890351 | 79 | 0.595104 |
ebd30670e995b15e70911f7feaf678fb06bebb39 | 1,097 | py | Python | setup.py | nens/batch-calculator | bb6b4f99db4828f9ff94fa9ff34661eb89aea2da | [
"MIT"
] | null | null | null | setup.py | nens/batch-calculator | bb6b4f99db4828f9ff94fa9ff34661eb89aea2da | [
"MIT"
] | 13 | 2020-03-03T14:02:35.000Z | 2020-10-13T12:05:54.000Z | setup.py | nens/batch-calculator | bb6b4f99db4828f9ff94fa9ff34661eb89aea2da | [
"MIT"
] | null | null | null | from setuptools import setup
version = "0.1.dev0"
long_description = "\n\n".join([open("README.rst").read(), open("CHANGES.rst").read()])
install_requires = ["h5py", "jwt"]
tests_require = [
"pytest",
"mock",
"pytest-cov",
"pytest-flakes",
"pytest-black",
"threedi-api-client",
"requests"... | 26.756098 | 87 | 0.674567 |
323a67988923efd80bcdeb76ee6ebd63c9dc54a3 | 4,990 | py | Python | daemon/__init__.py | mee-kell/jina | 77f71e8a9db0a66dc20341d12ac240b7ece817d0 | [
"Apache-2.0"
] | 4 | 2021-06-29T04:14:31.000Z | 2021-08-01T07:01:08.000Z | daemon/__init__.py | mee-kell/jina | 77f71e8a9db0a66dc20341d12ac240b7ece817d0 | [
"Apache-2.0"
] | null | null | null | daemon/__init__.py | mee-kell/jina | 77f71e8a9db0a66dc20341d12ac240b7ece817d0 | [
"Apache-2.0"
] | 1 | 2021-06-29T03:55:56.000Z | 2021-06-29T03:55:56.000Z | import os
import pathlib
import subprocess
from pathlib import Path
from queue import Queue
from threading import Thread
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from uvicorn import Config, Server
from jina import __version__, __resources_path__, __docker_host__
from jina.logging... | 28.19209 | 85 | 0.591984 |
8d34777e383ff18c779313d570bacb3c711ddb42 | 4,548 | py | Python | sdk/tests/utilities/test_retry.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | 5 | 2019-06-01T11:37:48.000Z | 2021-08-23T17:37:33.000Z | sdk/tests/utilities/test_retry.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | 98 | 2020-04-15T06:05:43.000Z | 2022-03-01T10:25:25.000Z | sdk/tests/utilities/test_retry.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | 9 | 2019-09-30T11:19:25.000Z | 2021-11-17T19:49:59.000Z | import unittest
import lusid.api
from lusid import ApiException
from lusid.utilities import ApiClientFactory
from utilities import CredentialsSource
class MockApi:
invocations = 0
def __init__(self, api_client):
pass
def execute_retryable_call(self, *args, **kwargs):
if self.invocatio... | 30.119205 | 102 | 0.653474 |
5793b0ffcc7dd0ba9ff34394ee6546ce9da6cee7 | 3,615 | py | Python | padasip/preprocess/pca.py | huangshunliang/padasip | b44c2815000dd4d1b855c49e469072e919df15cd | [
"MIT"
] | 194 | 2016-08-28T09:23:19.000Z | 2022-03-30T02:55:22.000Z | padasip/preprocess/pca.py | huangshunliang/padasip | b44c2815000dd4d1b855c49e469072e919df15cd | [
"MIT"
] | 14 | 2016-11-15T13:33:53.000Z | 2022-02-04T13:41:12.000Z | padasip/preprocess/pca.py | huangshunliang/padasip | b44c2815000dd4d1b855c49e469072e919df15cd | [
"MIT"
] | 41 | 2016-12-07T19:40:25.000Z | 2022-02-24T21:32:19.000Z | """
.. versionadded:: 0.6
Principal component analysis (PCA) is a statistical method how to convert a set of observations with possibly correlated variables into a data-set of linearly uncorrelated variables (principal components). The number of principal components is less or equal than the number of original variabl... | 27.386364 | 411 | 0.668326 |
5d9cf930b7eae92ec4330221ee1f183a9928ef3b | 16,894 | py | Python | twqq/objects.py | istayping/pyhton1 | 6d954e5c59672e35b400a08134d1fec4cdd8806f | [
"MIT"
] | 23 | 2015-01-26T06:05:09.000Z | 2019-03-08T09:33:57.000Z | twqq/objects.py | istayping/pyhton1 | 6d954e5c59672e35b400a08134d1fec4cdd8806f | [
"MIT"
] | 1 | 2015-11-10T02:11:22.000Z | 2015-11-13T05:52:51.000Z | twqq/objects.py | istayping/pyhton1 | 6d954e5c59672e35b400a08134d1fec4cdd8806f | [
"MIT"
] | 17 | 2015-01-23T11:26:13.000Z | 2020-08-05T14:01:10.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : cold
# E-mail : wh_linux@126.com
# Date : 14/04/11 17:28:15
# Desc : 将返回信息实例化
#
""" 对应WebQQ的数据结构抽象
"""
import logging
logger = logging.getLogger("twqq")
class UniqueIds(object):
""" 唯一ID
为每个好友/群/讨论组/群成员都保持一个唯一标识
"""
T_F... | 26.688784 | 78 | 0.54469 |
61fff477970dfc8439fec75606c76250f571f6ab | 2,301 | py | Python | gooch_maf_tools/commands/names/parse_symbolcheck_output.py | kotoroshinoto/TCGA_MAF_Analysis | 48e9293015d47ee0f97ea9707896798b84f14feb | [
"Unlicense"
] | null | null | null | gooch_maf_tools/commands/names/parse_symbolcheck_output.py | kotoroshinoto/TCGA_MAF_Analysis | 48e9293015d47ee0f97ea9707896798b84f14feb | [
"Unlicense"
] | 2 | 2017-03-15T17:55:43.000Z | 2017-03-15T17:57:50.000Z | gooch_maf_tools/commands/names/parse_symbolcheck_output.py | kotoroshinoto/TCGA_MAF_Analysis | 48e9293015d47ee0f97ea9707896798b84f14feb | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import click
import re
import sys
__author__ = 'mgooch'
@click.command(help="Compute exonic sizes of genes and relate them to HUGO IDs")
@click.option('--symbolcheck', type=click.File('r'), required=True, help="TSV output from http://www.genenames.org/cgi-bin/symbol_checker")
@click.option('--o... | 41.089286 | 139 | 0.740548 |
f9bd581b0d8c1bb752cac424b900ee9038274322 | 4,038 | py | Python | termmenu/termmenu.py | dnorhoj/termmenu | 0d14eb7b50daef44a8f61f38dde221c34bec60ca | [
"MIT"
] | 1 | 2019-05-21T15:55:18.000Z | 2019-05-21T15:55:18.000Z | termmenu/termmenu.py | dnorhoj/termmenu | 0d14eb7b50daef44a8f61f38dde221c34bec60ca | [
"MIT"
] | 1 | 2019-05-21T19:43:31.000Z | 2019-05-21T19:43:31.000Z | termmenu/termmenu.py | dnorhoj/termmenu | 0d14eb7b50daef44a8f61f38dde221c34bec60ca | [
"MIT"
] | 3 | 2019-05-21T15:55:54.000Z | 2019-05-21T18:17:08.000Z | import re
class EntryNotFoundError(Exception): pass
class CustomEntryIsNumberError(Exception): pass
class Menu:
r"""Create an instance of this class to start off.
A number of options can be passed to the :class:`Menu` class
Parameters
-----------
title: Optional[:class:`str`]
This is the text displayed at th... | 28.041667 | 125 | 0.666667 |
a237f9bd54644ea03285168f4b112e62d4194606 | 1,569 | py | Python | app/v1/modules/super_user/serial.py | SyedaZehra95/wfh-demo | 84ed156861e423544fbcd2f44e004f5c4b5d5480 | [
"Apache-2.0"
] | null | null | null | app/v1/modules/super_user/serial.py | SyedaZehra95/wfh-demo | 84ed156861e423544fbcd2f44e004f5c4b5d5480 | [
"Apache-2.0"
] | null | null | null | app/v1/modules/super_user/serial.py | SyedaZehra95/wfh-demo | 84ed156861e423544fbcd2f44e004f5c4b5d5480 | [
"Apache-2.0"
] | null | null | null |
from app.v1 import v1_api
from flask_restplus import fields,Namespace
super_user_reg_model_list = v1_api.model('super_user_Reg', {
'position': fields.String(required=True, description='position_name'),
'role': fields.String(required=True, description='role_name'),
#'deleted': fields.Int... | 35.659091 | 84 | 0.694073 |
c37ef89c6ed183402756bf841e4bea663771992f | 123 | py | Python | ask_fandom/intents/wiki/__init__.py | Wikia/ask-fandom | cc1d6f9b73a41c0e67b62512c8c0731d340b3015 | [
"MIT"
] | 5 | 2019-03-09T11:25:47.000Z | 2021-11-03T09:44:03.000Z | ask_fandom/intents/wiki/__init__.py | Wikia/ask-fandom | cc1d6f9b73a41c0e67b62512c8c0731d340b3015 | [
"MIT"
] | 11 | 2019-03-08T17:58:25.000Z | 2019-03-24T10:57:26.000Z | ask_fandom/intents/wiki/__init__.py | Wikia/ask-fandom | cc1d6f9b73a41c0e67b62512c8c0731d340b3015 | [
"MIT"
] | 1 | 2019-03-18T17:39:55.000Z | 2019-03-18T17:39:55.000Z | """
Wiki templates based intents
"""
from .football import FootballPlayerFactIntent
from .qa_wiki import AnswersWikiIntent
| 20.5 | 46 | 0.821138 |
753249dda0078b5299fd7cb1444cb0958c2153c6 | 3,354 | py | Python | lib/surface/compute/instances/remove_labels.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instances/remove_labels.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instances/remove_labels.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 37.685393 | 74 | 0.757901 |
66fc5b68db7d377b67b33ca6050631dc04bc5fda | 2,961 | py | Python | PyTorch/mnist_vanilla.py | fredmosc/RNNP-ITAIPU | 0bc69c3ca4e233b0d8ed8cbe0dbce8b2dadc6d89 | [
"MIT"
] | 5 | 2021-05-21T17:06:12.000Z | 2021-06-01T01:23:47.000Z | PyTorch/mnist_vanilla.py | fredmosc/RNNP-ITAIPU | 0bc69c3ca4e233b0d8ed8cbe0dbce8b2dadc6d89 | [
"MIT"
] | null | null | null | PyTorch/mnist_vanilla.py | fredmosc/RNNP-ITAIPU | 0bc69c3ca4e233b0d8ed8cbe0dbce8b2dadc6d89 | [
"MIT"
] | 4 | 2021-05-21T17:06:33.000Z | 2021-06-25T19:51:19.000Z | # -*- coding: utf-8 -*-
"""
Criado em Wed Mar 31 16:00:00 2021
@author: Jasmine Moreira
1) Preparar dados
2) Criar o modelo (input, output size, forward pass)
3) Criar a função de erro (loss) e o otimizador
4) Criar o loop de treinamento
- forward pass: calcular a predição e o erro
- backward pass: calcular os... | 26.918182 | 94 | 0.630193 |
fd25bf7d2d93dd21e49ddbde8328eac006cf2c38 | 5,082 | py | Python | sdk/python/approzium/asyncpg/_asyncpg_connect.py | UpGado/approzium | 306b40f16a1ba0dfbe3a312e1c40881e98518137 | [
"Apache-2.0"
] | 59 | 2020-07-14T17:18:09.000Z | 2022-02-24T07:39:22.000Z | sdk/python/approzium/asyncpg/_asyncpg_connect.py | UpGado/approzium | 306b40f16a1ba0dfbe3a312e1c40881e98518137 | [
"Apache-2.0"
] | 66 | 2020-07-09T19:11:55.000Z | 2022-03-15T11:42:55.000Z | sdk/python/approzium/asyncpg/_asyncpg_connect.py | UpGado/approzium | 306b40f16a1ba0dfbe3a312e1c40881e98518137 | [
"Apache-2.0"
] | 9 | 2020-07-09T19:20:45.000Z | 2022-02-24T07:39:26.000Z | import logging
import asyncpg
from asyncpg.connect_utils import _ConnectionParameters
from asyncpg.protocol import Protocol
import approzium
from .._postgres import PGAuthClient, construct_msg, parse_msg
logger = logging.getLogger(__name__)
def appz_authenticate(self, data):
# This method is used to override ... | 37.925373 | 87 | 0.692444 |
dcab6dc95f3f98de3048d5f62847cf672fe795da | 7,083 | py | Python | cmdb-compliance/libs/aws/events.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null | cmdb-compliance/libs/aws/events.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | 1 | 2022-01-04T13:53:16.000Z | 2022-01-04T13:53:16.000Z | cmdb-compliance/libs/aws/events.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : events.py
# @Author: Fred Yangxiaofei
# @Date : 2019/8/23
# @Role : 获取AWS Events事件信息
import sys, os
Base_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# print(Base_DIR)
sys.path.append(Base_DIR)
import boto3
from libs.db... | 36.890625 | 194 | 0.617535 |
a1ce12e88e654c374b34306c6fe99685be06b8ae | 33,744 | py | Python | pkgs/sdk-pkg/src/genie/libs/sdk/triggers/blitz/tests/test_rpcbuilder.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 94 | 2018-04-30T20:29:15.000Z | 2022-03-29T13:40:31.000Z | pkgs/sdk-pkg/src/genie/libs/sdk/triggers/blitz/tests/test_rpcbuilder.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 67 | 2018-12-06T21:08:09.000Z | 2022-03-29T18:00:46.000Z | pkgs/sdk-pkg/src/genie/libs/sdk/triggers/blitz/tests/test_rpcbuilder.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 49 | 2018-06-29T18:59:03.000Z | 2022-03-10T02:07:59.000Z | #! /usr/bin/env python
import sys
import unittest
import logging
import os.path
import lxml.etree as et
from genie.libs.sdk.triggers.blitz.rpcverify import RpcVerify
from genie.libs.sdk.triggers.blitz.rpcbuilder import YSNetconfRPCBuilder, RpcInputError
# TODO: Needs to be part of genielibs test run
log = logging.g... | 36.244898 | 87 | 0.57794 |
b6d9a72e67682ef6d42af2a99ee691046c4bf562 | 5,172 | py | Python | src/chaperone-localisation/1_cellpose.py | dezeraecox-manuscripts/RAEBURN_Nuclear-versus-cytoplasmic-proteostasis | 40ada06c3c547ce46c87beb27ff89902f9dc685e | [
"MIT"
] | null | null | null | src/chaperone-localisation/1_cellpose.py | dezeraecox-manuscripts/RAEBURN_Nuclear-versus-cytoplasmic-proteostasis | 40ada06c3c547ce46c87beb27ff89902f9dc685e | [
"MIT"
] | null | null | null | src/chaperone-localisation/1_cellpose.py | dezeraecox-manuscripts/RAEBURN_Nuclear-versus-cytoplasmic-proteostasis | 40ada06c3c547ce46c87beb27ff89902f9dc685e | [
"MIT"
] | null | null | null | from skimage.morphology import closing, square, remove_small_objects
from skimage.measure import label
from skimage.segmentation import clear_border
from skimage.filters import threshold_otsu
from scipy.ndimage import gaussian_filter
import os
import numpy as np
import matplotlib.pyplot as plt
import skimage.io
from c... | 42.393443 | 179 | 0.70727 |
e95ed7ed4449b113bffa86ec0eb27494cbc16e78 | 850 | py | Python | examples/beautifulsoup_example.py | Vl-tb/CSGO_Enemy_Scanner | 2d2667ec290b34c1a28e7a8137cbf3b4323d4066 | [
"MIT"
] | 1 | 2021-04-14T11:08:08.000Z | 2021-04-14T11:08:08.000Z | examples/beautifulsoup_example.py | Vl-tb/CSGO_Enemy_Scanner | 2d2667ec290b34c1a28e7a8137cbf3b4323d4066 | [
"MIT"
] | null | null | null | examples/beautifulsoup_example.py | Vl-tb/CSGO_Enemy_Scanner | 2d2667ec290b34c1a28e7a8137cbf3b4323d4066 | [
"MIT"
] | 1 | 2021-04-03T10:59:50.000Z | 2021-04-03T10:59:50.000Z | from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc, 'html.parser')
for link in soup.find_all('a'):
print(link.get('href'))
# http://example.com/elsie
# http://example.com/lacie
# http://example.com/tillie
soup.title
# <title>The Dormouse's story</title>
soup.title.name
# u'title'
soup.ti... | 24.285714 | 76 | 0.66 |
bfcf29dc8697d9c1052f75c0ea7547e2c6f132c2 | 936 | py | Python | pykeg/core/kb_common.py | theshiv303/kegbot-server | 425b0f8779e0d97aa6ca032b29b2623d693f9fd4 | [
"MIT"
] | 75 | 2015-01-12T22:51:20.000Z | 2022-02-23T02:09:50.000Z | pykeg/core/kb_common.py | theshiv303/kegbot-server | 425b0f8779e0d97aa6ca032b29b2623d693f9fd4 | [
"MIT"
] | 83 | 2015-01-03T19:04:46.000Z | 2021-07-11T19:06:39.000Z | pykeg/core/kb_common.py | theshiv303/kegbot-server | 425b0f8779e0d97aa6ca032b29b2623d693f9fd4 | [
"MIT"
] | 66 | 2015-01-05T01:55:06.000Z | 2021-11-27T17:07:24.000Z | """System constants and defaults."""
# FT330-RJ default.
DEFAULT_TICKS_PER_ML = 2.724
# Minimum session size, in milliliters, to display
MIN_SESSION_VOLUME_DISPLAY_ML = 177 # 6 ounces
# Maximum time between consecutive drinks to be considered in the same 'session'
# (see UserDrinkingSession table)
DRINK_SESSION_TIM... | 29.25 | 80 | 0.785256 |
40f4ce08672c231879ea43896826b5f0fb7f0c66 | 12,993 | py | Python | dipole/tests/test_dipole.py | thisch/pydipole | e496177fe60c3ec1d3b28d2dc843c0fd54b5757c | [
"MIT"
] | null | null | null | dipole/tests/test_dipole.py | thisch/pydipole | e496177fe60c3ec1d3b28d2dc843c0fd54b5757c | [
"MIT"
] | null | null | null | dipole/tests/test_dipole.py | thisch/pydipole | e496177fe60c3ec1d3b28d2dc843c0fd54b5757c | [
"MIT"
] | null | null | null | from __future__ import print_function
import logging
import numpy as np
import pytest
import matplotlib.pyplot as plt
from ..field import dipole_e_ff
from ..field import dipole_general
from ..field import dipole_radiant_intensity
from ..helper import gen_r
from .base import Base
LG = logging.getLogger('dip')
def m... | 35.40327 | 91 | 0.483337 |
cba5cb34219c6e5cf509f65174315f5496c7593f | 63,019 | py | Python | lib/spack/spack/ci.py | jhu-arch/spack | 5692c15e3a0703af7579f61069c6ac2c0e1b67c5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-05-07T17:24:45.000Z | 2020-05-07T17:24:45.000Z | lib/spack/spack/ci.py | jhu-arch/spack | 5692c15e3a0703af7579f61069c6ac2c0e1b67c5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 15 | 2021-04-14T12:34:46.000Z | 2022-03-02T19:08:00.000Z | lib/spack/spack/ci.py | mahermanns/spack | 849943c63d1948c65f75cb8164e96ed361ca7a7f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import base64
import copy
import datetime
import json
import os
import re
import shutil
import stat
import tempfile
import... | 36.767211 | 83 | 0.587902 |
87297c70ff9d9b07284227d8a696fc4e386c56bb | 1,627 | py | Python | cogs/misccog.py | Jambon123/cuddly-broccoli | 8ea507847bbaac00806f76b93643f2f368047f66 | [
"MIT"
] | null | null | null | cogs/misccog.py | Jambon123/cuddly-broccoli | 8ea507847bbaac00806f76b93643f2f368047f66 | [
"MIT"
] | null | null | null | cogs/misccog.py | Jambon123/cuddly-broccoli | 8ea507847bbaac00806f76b93643f2f368047f66 | [
"MIT"
] | null | null | null | #Accreditation (Do not Remove)
#Original Creator of Software Jambon(https://github.com/Jambon123)
#Imports
import os, sys #System Imports
from dotenv import load_dotenv
import discord, discord.utils #Discord Imports
from discord.ext import tasks, commands
from nationstates import Shard
import re #Misc Impor... | 33.204082 | 143 | 0.633067 |
f13a467ac47f6ae4eb1761bc97a689e53524b89a | 4,463 | py | Python | bob/db/pola_thermal/driver.py | bioidiap/bob.db.pola_thermal | ae6088518ba83961d2e2b5485c8dd4379bf1889c | [
"BSD-3-Clause"
] | null | null | null | bob/db/pola_thermal/driver.py | bioidiap/bob.db.pola_thermal | ae6088518ba83961d2e2b5485c8dd4379bf1889c | [
"BSD-3-Clause"
] | null | null | null | bob/db/pola_thermal/driver.py | bioidiap/bob.db.pola_thermal | ae6088518ba83961d2e2b5485c8dd4379bf1889c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Laurent El Shafey <laurent.el-shafey@idiap.ch>
# Fri Aug 23 16:51:41 CEST 2013
#
# Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... | 34.068702 | 228 | 0.703787 |
6744b5eb032d9a15075407d3b5bffc872ec9be4e | 8,212 | py | Python | lib/mpdaf/obj/arithmetic.py | jzabl/mpdaf | 806baab8b793ba1cdbde4ce9ea13116f8ca327ee | [
"BSD-3-Clause"
] | 4 | 2019-08-12T18:08:08.000Z | 2022-02-03T11:55:43.000Z | lib/mpdaf/obj/arithmetic.py | jzabl/mpdaf | 806baab8b793ba1cdbde4ce9ea13116f8ca327ee | [
"BSD-3-Clause"
] | 21 | 2019-08-12T13:49:38.000Z | 2022-01-29T12:44:27.000Z | lib/mpdaf/obj/arithmetic.py | jzabl/mpdaf | 806baab8b793ba1cdbde4ce9ea13116f8ca327ee | [
"BSD-3-Clause"
] | 2 | 2019-07-25T17:22:18.000Z | 2019-11-26T10:05:14.000Z | # -*- coding: utf-8 -*-
"""
Copyright (c) 2010-2018 CNRS / Centre de Recherche Astrophysique de Lyon
Copyright (c) 2016-2019 Simon Conseil <simon.conseil@univ-lyon1.fr>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following condi... | 35.704348 | 79 | 0.634316 |
21eb4ad7e77251a1ec6754454247c9ac1eeca982 | 1,079 | py | Python | autograde/backend/local/summary.py | cssh-rwth/autograde | 8b5485766296a59710bb16230c8662d5b3d3c154 | [
"MIT"
] | 8 | 2020-02-28T14:28:02.000Z | 2022-01-17T14:05:14.000Z | autograde/backend/local/summary.py | cssh-rwth/autograde | 8b5485766296a59710bb16230c8662d5b3d3c154 | [
"MIT"
] | 24 | 2020-03-02T15:57:41.000Z | 2022-03-12T01:05:47.000Z | autograde/backend/local/summary.py | cssh-rwth/autograde | 8b5485766296a59710bb16230c8662d5b3d3c154 | [
"MIT"
] | 4 | 2020-04-30T07:56:34.000Z | 2021-07-19T12:04:04.000Z | from pathlib import Path
from autograde.backend.local.util import find_archives, traverse_archives, merge_results, b64str, \
plot_score_distribution, summarize_results
from autograde.util import logger, render
def cmd_summary(result: Path) -> int:
assert result.is_dir(), f'{result} is no regular directory'
... | 33.71875 | 99 | 0.71177 |
f9036bcfa0f97c7fbedf407c9a36584ca5354bf3 | 63,159 | py | Python | tests/components/mqtt/test_cover.py | csseal/core | 5802d65ef71697e6627b82e1677894d13d0f16d7 | [
"Apache-2.0"
] | 3 | 2019-11-13T18:19:33.000Z | 2021-07-18T11:40:37.000Z | tests/components/mqtt/test_cover.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 45 | 2020-07-21T12:58:24.000Z | 2022-03-31T06:01:46.000Z | tests/components/mqtt/test_cover.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 2 | 2017-09-03T16:06:02.000Z | 2021-01-12T15:07:52.000Z | """The tests for the MQTT cover platform."""
import pytest
from homeassistant.components import cover
from homeassistant.components.cover import (
ATTR_CURRENT_POSITION,
ATTR_CURRENT_TILT_POSITION,
ATTR_POSITION,
ATTR_TILT_POSITION,
)
from homeassistant.components.mqtt.cover import MqttCover
from homea... | 32.422485 | 88 | 0.600532 |
d96ac4773aef5d736ccbf85e6f84d62108e64d2b | 9,089 | py | Python | mindspore/train/summary/summary_record.py | TommyLike/mindspore | 401dabb786a9097d6dd84f391657d266b04e9a37 | [
"Apache-2.0"
] | 1 | 2020-05-23T07:08:46.000Z | 2020-05-23T07:08:46.000Z | mindspore/train/summary/summary_record.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 7 | 2020-03-30T08:31:56.000Z | 2020-04-01T09:54:39.000Z | mindspore/train/summary/summary_record.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 1 | 2020-03-30T17:07:43.000Z | 2020-03-30T17:07:43.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 38.350211 | 114 | 0.61778 |
ebf031b14e2ac1a55397284ab05a5b63288055e6 | 1,108 | py | Python | repos/system_upgrade/el7toel8/actors/checkbtrfs/tests/test_btrfs_checkbtrfs.py | AsM0DeUz/leapp-repository | b67a395ee3d67d3d628037c250a210bb52e9187c | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkbtrfs/tests/test_btrfs_checkbtrfs.py | AsM0DeUz/leapp-repository | b67a395ee3d67d3d628037c250a210bb52e9187c | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkbtrfs/tests/test_btrfs_checkbtrfs.py | AsM0DeUz/leapp-repository | b67a395ee3d67d3d628037c250a210bb52e9187c | [
"Apache-2.0"
] | null | null | null | from leapp.models import ActiveKernelModule, ActiveKernelModulesFacts
from leapp.reporting import Report
from leapp.snactor.fixture import current_actor_context
from leapp.utils.report import is_inhibitor
def create_modulesfacts(kernel_modules):
return ActiveKernelModulesFacts(kernel_modules=kernel_modules)
def... | 36.933333 | 81 | 0.797834 |
74e929b5f0dc0d1f8a78966f104db2e54e3ffe28 | 22,566 | py | Python | glance_store/_drivers/rbd.py | petrutlucian94/glance_store | 58a391fc7d9f3104dc1c3a4ae3ea5d1163093cdd | [
"Apache-2.0"
] | null | null | null | glance_store/_drivers/rbd.py | petrutlucian94/glance_store | 58a391fc7d9f3104dc1c3a4ae3ea5d1163093cdd | [
"Apache-2.0"
] | null | null | null | glance_store/_drivers/rbd.py | petrutlucian94/glance_store | 58a391fc7d9f3104dc1c3a4ae3ea5d1163093cdd | [
"Apache-2.0"
] | null | null | null | # Copyright 2010-2011 Josh Durgin
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 40.010638 | 79 | 0.572897 |
88b6f5f1c912ddc0a3527760cd37fe385ca51386 | 3,930 | py | Python | clickbait_classification.py | altprime/clickbait-classification | ec55cbcdb8aada826eb73830534ac2a0e01af35a | [
"MIT"
] | null | null | null | clickbait_classification.py | altprime/clickbait-classification | ec55cbcdb8aada826eb73830534ac2a0e01af35a | [
"MIT"
] | null | null | null | clickbait_classification.py | altprime/clickbait-classification | ec55cbcdb8aada826eb73830534ac2a0e01af35a | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics import confusion_matrix
from mlxtend.plotting import plot_confusion_matrix
from tensorflow.keras.models import Se... | 31.95122 | 180 | 0.729262 |
184b6c5d4a5dc995eee4267a402b492584dd5613 | 3,335 | py | Python | neural_pipeline/data_processor/model.py | pfriesch/neural-pipeline | 2df4f7467a721b1fbd93f4439086c6dcee5dac2c | [
"MIT"
] | null | null | null | neural_pipeline/data_processor/model.py | pfriesch/neural-pipeline | 2df4f7467a721b1fbd93f4439086c6dcee5dac2c | [
"MIT"
] | null | null | null | neural_pipeline/data_processor/model.py | pfriesch/neural-pipeline | 2df4f7467a721b1fbd93f4439086c6dcee5dac2c | [
"MIT"
] | null | null | null | import torch
from torch.nn import Module
from neural_pipeline.utils.file_structure_manager import FileStructManager, CheckpointsManager
__all__ = ['Model']
class Model:
"""
Wrapper for :class:`torch.nn.Module`. This class provide initialization, call and serialization for it
:param base_model: :class:`... | 33.686869 | 115 | 0.609595 |
d2c478147ca1af77011d7538dfa49c1e9665b20b | 9,252 | py | Python | python/rapidstream/tapa_parser.py | Licheng-Guo/RapidStream | 19d0d8c0f7766fdfb612252483f59660e21fddc0 | [
"MIT"
] | 69 | 2021-12-16T12:58:10.000Z | 2022-03-22T00:45:13.000Z | python/rapidstream/tapa_parser.py | Licheng-Guo/RapidStream | 19d0d8c0f7766fdfb612252483f59660e21fddc0 | [
"MIT"
] | 1 | 2021-12-16T16:43:34.000Z | 2021-12-16T16:43:34.000Z | python/rapidstream/tapa_parser.py | Licheng-Guo/RapidStream | 19d0d8c0f7766fdfb612252483f59660e21fddc0 | [
"MIT"
] | 10 | 2021-12-17T18:18:19.000Z | 2022-03-17T15:56:15.000Z | import click
import logging
import json
from typing import Callable, Dict
import pyverilog.vparser.ast as ast
from pyverilog.ast_code_generator import codegen
from pyverilog.vparser.parser import parse
from rapidstream.util import setup_logging
_logger = logging.getLogger().getChild(__name__)
STREAM_TYPES = (
'fi... | 26.973761 | 94 | 0.675205 |
5fcf75cf0e9ffd7c8828b565db07b626967a73bb | 9,939 | py | Python | CNS_UDP_FAST.py | LeeDaeil/CNS_Autonomous | 2ae3688cfd654b9669893e3cdf4cdf1ac0748b9f | [
"Apache-2.0"
] | 2 | 2020-03-22T14:35:00.000Z | 2020-05-26T05:06:41.000Z | CNS_UDP_FAST.py | LeeDaeil/CNS_Autonomous | 2ae3688cfd654b9669893e3cdf4cdf1ac0748b9f | [
"Apache-2.0"
] | null | null | null | CNS_UDP_FAST.py | LeeDaeil/CNS_Autonomous | 2ae3688cfd654b9669893e3cdf4cdf1ac0748b9f | [
"Apache-2.0"
] | null | null | null | import socket
import logging
from struct import unpack, pack
from time import sleep
from numpy import shape
from collections import deque
class CNS:
def __init__(self, threrad_name, CNS_IP, CNS_Port, Remote_IP, Remote_Port, Max_len=10):
# thread name
self.th_name = threrad_name
# Ip, Port
... | 36.406593 | 137 | 0.519972 |
95989198532b5b743394663580ad16f87083582a | 2,228 | py | Python | examples/datasets/plot_brainstorm_data.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 1 | 2022-03-24T01:18:03.000Z | 2022-03-24T01:18:03.000Z | examples/datasets/plot_brainstorm_data.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 23 | 2017-09-12T11:08:26.000Z | 2019-10-04T11:11:29.000Z | examples/datasets/plot_brainstorm_data.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 3 | 2019-01-28T13:48:00.000Z | 2019-07-10T16:02:11.000Z | """
.. _ex-brainstorm-raw:
=====================================
Brainstorm raw (median nerve) dataset
=====================================
Here we compute the evoked from raw for the Brainstorm
tutorial dataset. For comparison, see [1]_ and:
https://neuroimage.usc.edu/brainstorm/Tutorials/MedianNerveCtf
Refer... | 27.85 | 78 | 0.690754 |
23b4a73b23d28ecc4ad3a2e0181a5c059de4a030 | 56,853 | py | Python | tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 384 | 2017-02-21T18:38:04.000Z | 2022-02-22T07:30:25.000Z | tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 15 | 2017-03-01T20:18:43.000Z | 2020-05-07T10:33:51.000Z | udacity-car/lib/python2.7/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py | 808brick/CarND-Capstone | f9e536b4a9d96322d7e971073602c8969dbd9369 | [
"MIT"
] | 81 | 2017-02-21T19:31:19.000Z | 2022-02-22T07:30:24.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 46.448529 | 80 | 0.677695 |
79773db3f45d48f0a4ce04e7613c3cb23523399c | 6,008 | py | Python | spleeter/commands/__init__.py | ogut77/spleeter3 | fb900a8eea57a5a286acf2bf257e66a70db50f2f | [
"MIT"
] | null | null | null | spleeter/commands/__init__.py | ogut77/spleeter3 | fb900a8eea57a5a286acf2bf257e66a70db50f2f | [
"MIT"
] | null | null | null | spleeter/commands/__init__.py | ogut77/spleeter3 | fb900a8eea57a5a286acf2bf257e66a70db50f2f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf8
""" This modules provides spleeter command as well as CLI parsing methods. """
import json
import logging
from argparse import ArgumentParser
from tempfile import gettempdir
from os.path import exists, join
__email__ = 'spleeter@deezer.com'
__author__ = 'Deezer Research'
__licens... | 28.746411 | 111 | 0.661119 |
8aec4a3f9bba8635af58b44c9a0b031c12f74e58 | 779 | py | Python | getSerialData.py | jaredmcqueen/hot-wheels-radar-gun | cdfdd7510c2375295ae2134f92283f407fb25eee | [
"MIT"
] | 3 | 2016-09-15T21:15:14.000Z | 2021-04-30T09:24:15.000Z | getSerialData.py | jaredmcqueen/hot-wheels-radar-gun | cdfdd7510c2375295ae2134f92283f407fb25eee | [
"MIT"
] | null | null | null | getSerialData.py | jaredmcqueen/hot-wheels-radar-gun | cdfdd7510c2375295ae2134f92283f407fb25eee | [
"MIT"
] | 1 | 2020-08-03T13:52:54.000Z | 2020-08-03T13:52:54.000Z | import serial
import time
import datetime
import csv
ser = serial.Serial('/dev/cu.usbmodem1411', 9600, timeout=0)
my_file = 'data.csv'
f = open(my_file, 'wt')
writer = csv.writer(f)
writer.writerow(('dateTime', 'analogValue')) # csv column headers
while True:
try:
# write a csv row
writer.writer... | 25.966667 | 74 | 0.627728 |
4977d1f069beb78f8f57236761429d2cd8ed1a64 | 900 | py | Python | pytest_vw.py | The-Compiler/pytest-vw | 05ad1846038cc63a7e875c96da1b8fb8ab073da3 | [
"MIT"
] | 149 | 2015-10-07T18:20:07.000Z | 2022-02-21T17:20:20.000Z | pytest_vw.py | The-Compiler/pytest-vw | 05ad1846038cc63a7e875c96da1b8fb8ab073da3 | [
"MIT"
] | 3 | 2015-10-08T08:20:49.000Z | 2020-04-09T14:44:00.000Z | pytest_vw.py | The-Compiler/pytest-vw | 05ad1846038cc63a7e875c96da1b8fb8ab073da3 | [
"MIT"
] | 10 | 2015-10-08T18:45:35.000Z | 2020-03-09T12:23:40.000Z | # -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
EXAMINATORS = [
'bamboo.buildKey',
'BUILD_ID',
'BUILD_NUMBER',
'BUILDKITE',
'CI',
'CIRCLECI',
'CONTINUOUS_INTEGRATION',
'GITHUB_ACTIONS',
'HUDSON_URL',
'JENKINS... | 20.454545 | 73 | 0.661111 |
050dc374bd579da19eb14e753247aa051229df72 | 39,883 | py | Python | azure-iot-hub/azure/iot/hub/iothub_registry_manager.py | zolvarga/azure-iot-sdk-python | 2510e104144032fdfd5417014f3509db9af48a06 | [
"MIT"
] | null | null | null | azure-iot-hub/azure/iot/hub/iothub_registry_manager.py | zolvarga/azure-iot-sdk-python | 2510e104144032fdfd5417014f3509db9af48a06 | [
"MIT"
] | null | null | null | azure-iot-hub/azure/iot/hub/iothub_registry_manager.py | zolvarga/azure-iot-sdk-python | 2510e104144032fdfd5417014f3509db9af48a06 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .ioth... | 42.931109 | 172 | 0.662839 |
48d1ffcd74f48127639e0d0b49895b16a541df2b | 14,210 | py | Python | code/UAV2SEN_crisp2fuzzyDNN.py | PCdurham/UAV2Sen | f8405d24690cc5fe6254534265e0b2f11bb153c9 | [
"MIT"
] | 3 | 2021-07-14T08:10:52.000Z | 2022-02-05T11:41:45.000Z | code/UAV2SEN_crisp2fuzzyDNN.py | PCdurham/UAV2Sen | f8405d24690cc5fe6254534265e0b2f11bb153c9 | [
"MIT"
] | null | null | null | code/UAV2SEN_crisp2fuzzyDNN.py | PCdurham/UAV2Sen | f8405d24690cc5fe6254534265e0b2f11bb153c9 | [
"MIT"
] | 1 | 2021-10-31T17:49:00.000Z | 2021-10-31T17:49:00.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
__author__ = 'Patrice Carbonneau'
__contact__ = 'patrice.carbonneau@durham.ac.uk'
__copyright__ = '(c) Patrice Carbonneau'
__license__ = 'MIT'
'''
This script performs crisp classification of ... | 40.141243 | 311 | 0.693526 |
1a437fe5c8c23b416fa462eef6819c511eb242d8 | 162 | py | Python | example_slackbot_settings.py | hugovk/foosbot | 11898741035eeda6d395c9f87b9adf00f0271214 | [
"MIT"
] | null | null | null | example_slackbot_settings.py | hugovk/foosbot | 11898741035eeda6d395c9f87b9adf00f0271214 | [
"MIT"
] | 1 | 2021-11-10T19:47:12.000Z | 2021-11-10T19:47:12.000Z | example_slackbot_settings.py | hugovk/foosbot | 11898741035eeda6d395c9f87b9adf00f0271214 | [
"MIT"
] | null | null | null | # https://my.slack.com/apps/new/A0F7YS25R-bots
API_TOKEN = "<your-api-token>"
DEFAULT_REPLY = "Sorry but I didn't understand you"
ERRORS_TO = "sandbox-foosbot"
| 23.142857 | 51 | 0.734568 |
8075d11f107796fedc2282a9ff78ab0d68e394f0 | 742 | py | Python | Chapter13.whileandforLoops/line_by_line.py | mindnhand/Learning-Python-5th | 3dc1b28d6e048d512bf851de6c7f6445edfe7b84 | [
"MIT"
] | null | null | null | Chapter13.whileandforLoops/line_by_line.py | mindnhand/Learning-Python-5th | 3dc1b28d6e048d512bf851de6c7f6445edfe7b84 | [
"MIT"
] | null | null | null | Chapter13.whileandforLoops/line_by_line.py | mindnhand/Learning-Python-5th | 3dc1b28d6e048d512bf851de6c7f6445edfe7b84 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#encoding=utf-8
#----------------------------------------
# Usage: python3 line_by_line.py test.txt
# Description: read by lines
#----------------------------------------
import sys
i_f = sys.argv[1]
t_file_lines = open(i_f).readlines()
for line in t_file_lines:
print(line.rstrip())
... | 22.484848 | 92 | 0.657682 |
9507f4cd8a66c33ca9a12dcbfb9f1bce5a39197d | 109 | py | Python | 1159.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 6 | 2021-04-13T00:33:43.000Z | 2022-02-10T10:23:59.000Z | 1159.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | null | null | null | 1159.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 3 | 2021-03-23T18:42:24.000Z | 2022-02-10T10:24:07.000Z | while True:
n = int(input())
if n == 0: break
n = n+1 if n % 2 != 0 else n
print(5 * n + 20)
| 18.166667 | 32 | 0.449541 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.