hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
37675e31c38367e5cd174cb18ac480f67fa67fbf
3,686
py
Python
model.py
samsonmking/BehavioralCloning
871802f31fb3e06135a1050e639941ab91112b20
[ "MIT" ]
null
null
null
model.py
samsonmking/BehavioralCloning
871802f31fb3e06135a1050e639941ab91112b20
[ "MIT" ]
null
null
null
model.py
samsonmking/BehavioralCloning
871802f31fb3e06135a1050e639941ab91112b20
[ "MIT" ]
null
null
null
import csv import cv2 import numpy as np import tensorflow as tf from keras.callbacks import EarlyStopping, ModelCheckpoint from keras.layers.convolutional import Conv2D, Convolution2D, Cropping2D from keras.layers.core import Activation, Dense, Dropout, Flatten, Lambda from keras.layers.normalization import BatchNorm...
34.12963
84
0.704286
90355f637c1c936cd213e8a2807257b8ff1229bd
1,495
py
Python
src/gafaelfawr/handlers/logout.py
slaclab/gafaelfawr
7a64b0f159003d4745531c89d5b0f7d9777f7bce
[ "MIT" ]
null
null
null
src/gafaelfawr/handlers/logout.py
slaclab/gafaelfawr
7a64b0f159003d4745531c89d5b0f7d9777f7bce
[ "MIT" ]
null
null
null
src/gafaelfawr/handlers/logout.py
slaclab/gafaelfawr
7a64b0f159003d4745531c89d5b0f7d9777f7bce
[ "MIT" ]
null
null
null
"""Log out handler (``/logout``).""" from __future__ import annotations from typing import Optional from fastapi import APIRouter, Depends, status from fastapi.responses import RedirectResponse from ..dependencies.context import RequestContext, context_dependency from ..dependencies.return_url import return_url fro...
30.510204
76
0.729766
8ea11d382b357a5f3839336f76b007bba8878107
42
py
Python
react/__init__.py
Stift007/react.py
e0640cba48debdd745f9ee55fdc073c1927641f2
[ "MIT" ]
null
null
null
react/__init__.py
Stift007/react.py
e0640cba48debdd745f9ee55fdc073c1927641f2
[ "MIT" ]
null
null
null
react/__init__.py
Stift007/react.py
e0640cba48debdd745f9ee55fdc073c1927641f2
[ "MIT" ]
null
null
null
from .app import * from .globals import *
14
22
0.714286
5bf1a3737aac5b35994ee53b90ae1638e35f630f
137
py
Python
tools/vidTest.py
rtgoring/py-faster-rcnn-thesis
62d330268147d212fd9661a4ba995b45cd404b6c
[ "BSD-2-Clause" ]
null
null
null
tools/vidTest.py
rtgoring/py-faster-rcnn-thesis
62d330268147d212fd9661a4ba995b45cd404b6c
[ "BSD-2-Clause" ]
null
null
null
tools/vidTest.py
rtgoring/py-faster-rcnn-thesis
62d330268147d212fd9661a4ba995b45cd404b6c
[ "BSD-2-Clause" ]
1
2019-08-24T05:21:13.000Z
2019-08-24T05:21:13.000Z
import cv2 cap = cv2.VideoCapture('test.avi') while True: ret, im = cap.read() cv2.imshow('frame',im) cv2.waitKey(20)
13.7
34
0.605839
59a4ff9689662103cabbb1b07e9ef0f4b2a1367a
733
py
Python
movie_planet/movies/utils.py
d-wysocki/MoviePlanet
389fb24189d7ac98b80617deb9a727c9b6bb4dd4
[ "MIT" ]
null
null
null
movie_planet/movies/utils.py
d-wysocki/MoviePlanet
389fb24189d7ac98b80617deb9a727c9b6bb4dd4
[ "MIT" ]
null
null
null
movie_planet/movies/utils.py
d-wysocki/MoviePlanet
389fb24189d7ac98b80617deb9a727c9b6bb4dd4
[ "MIT" ]
null
null
null
from collections import Counter from datetime import datetime, timedelta def generate_movie_rank(items): counter = Counter(items).most_common() result = [] rank = 0 for movie_id, total_comments in counter: if rank != 0 and counter[rank - 1][1] == total_comments: pass else:...
26.178571
82
0.624829
85090d89bd87ac642e4e4e8fefa3ef7f0c67de84
3,578
py
Python
tests/processing_components/test_primary_beam_illumination.py
SKA-ScienceDataProcessor/rascil
bd3b47f779e18e184781e2928ad1539d1fdc1c9b
[ "Apache-2.0" ]
7
2019-12-14T13:42:33.000Z
2022-01-28T03:31:45.000Z
tests/processing_components/test_primary_beam_illumination.py
SKA-ScienceDataProcessor/rascil
bd3b47f779e18e184781e2928ad1539d1fdc1c9b
[ "Apache-2.0" ]
6
2020-01-08T09:40:08.000Z
2020-06-11T14:56:13.000Z
tests/processing_components/test_primary_beam_illumination.py
SKA-ScienceDataProcessor/rascil
bd3b47f779e18e184781e2928ad1539d1fdc1c9b
[ "Apache-2.0" ]
3
2020-01-14T11:14:16.000Z
2020-09-15T05:21:06.000Z
"""Unit tests for testing support """ import os import logging import unittest import numpy from astropy import units as u from astropy.coordinates import SkyCoord import matplotlib.pyplot as plt from rascil.data_models.polarisation import PolarisationFrame from rascil.processing_components.image.operations impor...
44.725
121
0.629961
ea8c8a848370363243044d9ed0781e1f2b4f00e0
1,086
py
Python
tests/test_crud/test_weapon_crud.py
OrderAndCh4oS/drone_squadron_api_prototype
4d7c22cebb03576986d443634b17910cb460a60f
[ "MIT" ]
1
2020-05-20T09:44:37.000Z
2020-05-20T09:44:37.000Z
tests/test_crud/test_weapon_crud.py
sarcoma/drone_squadron_api_prototype
4d7c22cebb03576986d443634b17910cb460a60f
[ "MIT" ]
1
2021-06-01T22:30:10.000Z
2021-06-01T22:30:10.000Z
tests/test_crud/test_weapon_crud.py
OrderAndCh4oS/drone_squadron_api_prototype
4d7c22cebb03576986d443634b17910cb460a60f
[ "MIT" ]
null
null
null
from sqlalchemy.engine import ResultProxy from drone_squadron.crud.weapon_crud import WeaponCrud from drone_squadron.schema import weapon class TestWeaponCrud: crud = WeaponCrud def test_insert(self, setup): with self.crud() as crud: result = crud.insert(name="Rifle", fire_rate=5) # typ...
35.032258
94
0.624309
7666474a3407f4725b46d13ff87602069a02acba
605
py
Python
chartify/_core/__init__.py
rohankumardubey/chartify
5ac3a88e54cf620389741f396cc19d60fe032822
[ "Apache-2.0" ]
3,111
2018-09-18T01:59:56.000Z
2022-03-29T14:45:00.000Z
chartify/_core/__init__.py
rohankumardubey/chartify
5ac3a88e54cf620389741f396cc19d60fe032822
[ "Apache-2.0" ]
97
2018-09-21T19:53:19.000Z
2022-03-03T04:48:54.000Z
chartify/_core/__init__.py
rohankumardubey/chartify
5ac3a88e54cf620389741f396cc19d60fe032822
[ "Apache-2.0" ]
316
2018-10-06T05:39:39.000Z
2022-03-21T08:38:00.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2017-2018 Spotify AB # # 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.8125
74
0.74876
9348d86e734a824f9e4153e6af1bf853f83d26f0
440
py
Python
p23.py
cemulate/python-challenge
1c3b790d3a32cd51b3bc9ed4d1acc2760405f358
[ "MIT" ]
null
null
null
p23.py
cemulate/python-challenge
1c3b790d3a32cd51b3bc9ed4d1acc2760405f358
[ "MIT" ]
null
null
null
p23.py
cemulate/python-challenge
1c3b790d3a32cd51b3bc9ed4d1acc2760405f358
[ "MIT" ]
null
null
null
import this print "\nRot13 message:" string = 'va gur snpr bs jung?' print string, "\n" string = string.encode("rot13") print string print "\nambiguity" print "Apologizing to Leopold..." #import smtplib #server = smtplib.SMTP('smtp.gmail.com:587') #server.starttls() #server.login("c.ed.mead@gmail.com", raw_input("...
23.157895
85
0.713636
e09e409da08b385d66c55ada60e095214621998b
40,337
py
Python
openstack_dashboard/api/cinder.py
lostmap/horizon
584aa54985e6d0945f8ea08195530cb67e7ff72a
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/api/cinder.py
lostmap/horizon
584aa54985e6d0945f8ea08195530cb67e7ff72a
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/api/cinder.py
lostmap/horizon
584aa54985e6d0945f8ea08195530cb67e7ff72a
[ "Apache-2.0" ]
1
2020-04-21T22:12:55.000Z
2020-04-21T22:12:55.000Z
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apach...
32.874491
79
0.668394
0cd337768335351c2576104180ff8a29305ef3d0
20,136
py
Python
aiml/PatternMgr.py
gontovnik/python-aiml
e063641776cf4d46cb60ebe028f1f02a48e56429
[ "BSD-2-Clause" ]
null
null
null
aiml/PatternMgr.py
gontovnik/python-aiml
e063641776cf4d46cb60ebe028f1f02a48e56429
[ "BSD-2-Clause" ]
null
null
null
aiml/PatternMgr.py
gontovnik/python-aiml
e063641776cf4d46cb60ebe028f1f02a48e56429
[ "BSD-2-Clause" ]
null
null
null
''' This class implements the AIML pattern-matching algorithm described by Dr. Richard Wallace at the following site: http://www.alicebot.org/documentation/matching.html ''' from __future__ import print_function from collections import namedtuple import marshal import pprint import re import string import sys from ...
42.391579
107
0.524732
aa6d091d63cc3ce556245976c0d4caa732e26680
59
py
Python
python/testData/refactoring/introduceVariable/substringBreaksEscapes.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/refactoring/introduceVariable/substringBreaksEscapes.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/refactoring/introduceVariable/substringBreaksEscapes.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
print(u"Hel<selection>lo \u00d6sterreich\\!\</selection>n")
59
59
0.745763
3573d04395de1ce80942e8535657043b31f6fe5c
4,317
py
Python
tests/components/kaleidescape/test_remote.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/kaleidescape/test_remote.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/kaleidescape/test_remote.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for Kaleidescape remote platform.""" from unittest.mock import MagicMock import pytest from homeassistant.components.remote import ( ATTR_COMMAND, DOMAIN as REMOTE_DOMAIN, SERVICE_SEND_COMMAND, ) from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON from homeassistant...
27.496815
81
0.672226
fb5ffab2181ac3697c207b57d70b1bdb18cc82ec
305
py
Python
data/multilingual/Latn.ORH/Serif_12/pdf_to_json_test_Latn.ORH_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.ORH/Serif_12/pdf_to_json_test_Latn.ORH_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.ORH/Serif_12/pdf_to_json_test_Latn.ORH_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.ORH/Serif_12/udhr_Latn.ORH_Serif_12.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.5
75
0.813115
d9488d43fdcb3dcbccf19e995109a29e77099401
1,270
py
Python
wids-datathon-2020/wids_datathon_2020/data/unzip_dataset.py
iainwo/kaggle
3d36393d6cb14d118a39bbe742cada5914e7fb9b
[ "MIT" ]
2
2020-07-30T15:51:12.000Z
2020-11-11T23:01:25.000Z
wids-datathon-2020/wids_datathon_2020/data/unzip_dataset.py
iainwo/kaggle
3d36393d6cb14d118a39bbe742cada5914e7fb9b
[ "MIT" ]
null
null
null
wids-datathon-2020/wids_datathon_2020/data/unzip_dataset.py
iainwo/kaggle
3d36393d6cb14d118a39bbe742cada5914e7fb9b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import zipfile @click.command() @click.argument('input_filepath', type=click.Path(exists=True), default='data/external/widsdatathon2020.zip') @click.argument('output_filepath', type=click.Path(exis...
34.324324
109
0.725197
278e6954791732ac3e0f90cdea3932d7e8c32719
499
py
Python
backend/api/views/__init__.py
EagleC0318/disfactory-backend
d0f3b5bf24f3a5ca1f33696f9c47d354706089b9
[ "MIT" ]
35
2020-01-02T10:52:49.000Z
2022-03-18T06:01:15.000Z
backend/api/views/__init__.py
EagleC0318/disfactory-backend
d0f3b5bf24f3a5ca1f33696f9c47d354706089b9
[ "MIT" ]
348
2019-10-09T12:58:42.000Z
2022-03-30T14:17:51.000Z
backend/api/views/__init__.py
EagleC0318/disfactory-backend
d0f3b5bf24f3a5ca1f33696f9c47d354706089b9
[ "MIT" ]
19
2019-10-09T12:51:11.000Z
2021-12-12T01:02:32.000Z
from .factories_cr import get_nearby_or_create_factories, get_factory_by_sectcode from .factories_u import update_factory_attribute from .factory_report_record_r import get_factory_report from .image_c import post_image_url from .factory_image_c import post_factory_image_url from .statistics_r import get_factories_coun...
49.9
81
0.905812
6665937ebea1948cdaf0950151aab7e84bd5ef0a
583
py
Python
socks5-node-docker/server.py
14avengers/sentinel
825768d2242ad28896c41684bc08e8527cdf2f30
[ "MIT" ]
342
2017-08-21T20:12:56.000Z
2022-03-19T17:58:25.000Z
socks5-node-docker/server.py
14avengers/sentinel
825768d2242ad28896c41684bc08e8527cdf2f30
[ "MIT" ]
57
2017-11-13T11:16:47.000Z
2022-03-01T13:54:31.000Z
socks5-node-docker/server.py
14avengers/sentinel
825768d2242ad28896c41684bc08e8527cdf2f30
[ "MIT" ]
72
2017-11-23T05:13:24.000Z
2022-02-25T14:18:33.000Z
# coding=utf-8 import json import falcon from sentinel.server import GetSockCreds from sentinel.server import Token from sentinel.utils import JSONTranslator class Up(object): def on_post(self, req, resp): resp.status = falcon.HTTP_200 resp.body = json.dumps({'status': 'UP'}) def on_get(sel...
22.423077
50
0.684391
20b850714f7f0d6ef7c215e037f595ad05eaade7
13,847
py
Python
python/paddle/fluid/tests/unittests/test_reduce_op.py
abbasidaniyal/Paddle
c3527f5526ee96398760cbef11d7de48f41fe998
[ "Apache-2.0" ]
1
2020-03-07T16:05:22.000Z
2020-03-07T16:05:22.000Z
python/paddle/fluid/tests/unittests/test_reduce_op.py
abbasidaniyal/Paddle
c3527f5526ee96398760cbef11d7de48f41fe998
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_reduce_op.py
abbasidaniyal/Paddle
c3527f5526ee96398760cbef11d7de48f41fe998
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
31.257336
94
0.583014
27f0d397ac683c61ef2e8f9f0ed531f2db303881
984
py
Python
metrics/sql2text/evaluator.py
HKUNLP/UnifiedSKG
49a2ff950bb312b980c22ad72b11520db72ab6a3
[ "Apache-2.0" ]
191
2021-12-14T11:33:09.000Z
2022-03-31T09:20:41.000Z
metrics/sql2text/evaluator.py
HKUNLP/UnifiedSKG
49a2ff950bb312b980c22ad72b11520db72ab6a3
[ "Apache-2.0" ]
7
2022-01-20T05:41:51.000Z
2022-03-20T06:43:22.000Z
metrics/sql2text/evaluator.py
HKUNLP/UnifiedSKG
49a2ff950bb312b980c22ad72b11520db72ab6a3
[ "Apache-2.0" ]
22
2021-12-14T12:59:42.000Z
2022-03-29T03:45:51.000Z
# encoding=utf8 from third_party.BLEC.Spider import BLECSpider class EvaluateTool(object): def __init__(self, args): self.args = args self.blec_test = BLECSpider(template_path="third_party/BLEC/template_to_names_test.json") self.blec_dev = BLECSpider(template_path="third_party/BL...
28.114286
98
0.555894
7e2455538bbfba7ac7180462d8f7ca287056b352
422
py
Python
py_selenim/sel21_cookies.py
MdNazmul9/PYTHON_CODE_ALL
75046943f1bb6b4a010955b23bfe3f01cd08a473
[ "MIT" ]
null
null
null
py_selenim/sel21_cookies.py
MdNazmul9/PYTHON_CODE_ALL
75046943f1bb6b4a010955b23bfe3f01cd08a473
[ "MIT" ]
null
null
null
py_selenim/sel21_cookies.py
MdNazmul9/PYTHON_CODE_ALL
75046943f1bb6b4a010955b23bfe3f01cd08a473
[ "MIT" ]
null
null
null
from selenium import webdriver driver = webdriver.Chrome() driver.get("https://www.amazon.in/") cookies = driver.get_cookies() print(len(cookies)) print(cookies) cookie = {'name':'MyCookie','value':'12346790'} driver.add_cookie(cookie) cookies = driver.get_cookies() print(len(cookies)) print(cookies) d...
22.210526
48
0.725118
e3e7baed8a2024acfef94c8726d5d7957b127e2a
2,593
py
Python
deep_rl/utils/logger.py
Louis-Bagot/DeepRL
0b152c52bbba90362c8276c223fee3f9a464eb32
[ "MIT" ]
null
null
null
deep_rl/utils/logger.py
Louis-Bagot/DeepRL
0b152c52bbba90362c8276c223fee3f9a464eb32
[ "MIT" ]
null
null
null
deep_rl/utils/logger.py
Louis-Bagot/DeepRL
0b152c52bbba90362c8276c223fee3f9a464eb32
[ "MIT" ]
null
null
null
####################################################################### # Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # Permission given to modify the code as long as you keep this # # declaration at the top # ################################...
34.118421
97
0.577324
640739f65e05b15fb844614796c5327c7e4025c3
140
py
Python
whilesimple.py
Yeeeeeeeha/123
9e16c8edc32008e7567bf6b6747bfa2b9e734e1a
[ "MIT" ]
null
null
null
whilesimple.py
Yeeeeeeeha/123
9e16c8edc32008e7567bf6b6747bfa2b9e734e1a
[ "MIT" ]
null
null
null
whilesimple.py
Yeeeeeeeha/123
9e16c8edc32008e7567bf6b6747bfa2b9e734e1a
[ "MIT" ]
null
null
null
# цикл - while answer = None while answer != 'Хорошо': answer = input('Как дела?') print('Рассказать анекдот') print('Все ок.')
12.727273
31
0.614286
9feac8f6d395929b12d07bde93240217d81357ff
1,366
py
Python
gui/kivy/uix/dialogs/question.py
Durendal/electrum-rubycoin
a3c55806c29a2c4c846ebefefd57e47b9a102af9
[ "MIT" ]
null
null
null
gui/kivy/uix/dialogs/question.py
Durendal/electrum-rubycoin
a3c55806c29a2c4c846ebefefd57e47b9a102af9
[ "MIT" ]
null
null
null
gui/kivy/uix/dialogs/question.py
Durendal/electrum-rubycoin
a3c55806c29a2c4c846ebefefd57e47b9a102af9
[ "MIT" ]
null
null
null
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from kivy.uix.checkbox import CheckBox from kivy.uix.label import Label from kivy.uix.widget import Widget from electrum_rubycoin_gui.kivy.i18n import _ Builder.load_string(''' <Question@...
25.296296
45
0.537335
560f7145f862e6de8737ab29d9a455cf64e9fc4b
4,342
py
Python
src/api/resources/Resource.py
girardinsamuel/api
6e4ec0a991fb2df1a9e23e8676a93bebfd0b53d5
[ "MIT" ]
12
2018-09-23T02:37:57.000Z
2021-11-08T08:50:56.000Z
src/api/resources/Resource.py
girardinsamuel/api
6e4ec0a991fb2df1a9e23e8676a93bebfd0b53d5
[ "MIT" ]
12
2018-10-01T17:10:59.000Z
2021-04-25T16:29:14.000Z
src/api/resources/Resource.py
girardinsamuel/api
6e4ec0a991fb2df1a9e23e8676a93bebfd0b53d5
[ "MIT" ]
8
2018-09-23T08:08:07.000Z
2021-04-25T18:37:05.000Z
import json from masonite.request import Request from masonite.routes import BaseHttpRoute from ..exceptions import (ApiNotAuthenticated, ExpiredToken, InvalidToken, NoApiTokenFound, PermissionScopeDenied, RateLimitReached) class Resource(BaseHttpRoute): "...
35.884298
110
0.603178
42bad0b2a19169902438dd8d815c988ae5f2cdf3
158,123
py
Python
sympy/solvers/tests/test_ode.py
GaurangTandon/sympy
e3b2c4e302c05d4a438fdebb49d348010b71c882
[ "BSD-3-Clause" ]
1
2020-04-09T14:19:51.000Z
2020-04-09T14:19:51.000Z
sympy/solvers/tests/test_ode.py
mohitacecode/sympy
1e536959853e86f924855923de70df52e377d991
[ "BSD-3-Clause" ]
null
null
null
sympy/solvers/tests/test_ode.py
mohitacecode/sympy
1e536959853e86f924855923de70df52e377d991
[ "BSD-3-Clause" ]
null
null
null
from sympy import (acos, acosh, asinh, atan, cos, Derivative, diff, dsolve, Dummy, Eq, Ne, erf, erfi, exp, Function, I, Integral, LambertW, log, O, pi, Rational, rootof, S, simplify, sin, sqrt, Subs, Symbol, tan, asin, sinh, Piecewise, symbols, Poly, sec, Ei) from sympy.solvers.ode import (_undetermined_coe...
49.506262
152
0.54266
b149712ead3876de8c8b1bdfc88eb583d38fded5
1,506
py
Python
ryu/services/protocols/bgp/operator/commands/show/importmap.py
MrCocoaCat/ryu
9e9571991a73380099b7ba7c6f37e0e587080a6a
[ "Apache-2.0" ]
null
null
null
ryu/services/protocols/bgp/operator/commands/show/importmap.py
MrCocoaCat/ryu
9e9571991a73380099b7ba7c6f37e0e587080a6a
[ "Apache-2.0" ]
null
null
null
ryu/services/protocols/bgp/operator/commands/show/importmap.py
MrCocoaCat/ryu
9e9571991a73380099b7ba7c6f37e0e587080a6a
[ "Apache-2.0" ]
null
null
null
from ryu.services.protocols.bgp.operator.command import Command from ryu.services.protocols.bgp.operator.command import CommandsResponse from ryu.services.protocols.bgp.operator.command import STATUS_ERROR from ryu.services.protocols.bgp.operator.command import STATUS_OK from ryu.services.protocols.bgp.operator.com...
35.023256
80
0.648074
7682b528524de796c467abd571c8846292aa5ddf
3,814
py
Python
Software de Trading/freqtrade/misc.py
NatanNMB15/tcc-pytradebot
52b19251a030ab9c1a1b95157b4d57a9cf6df9dc
[ "MIT" ]
1
2020-05-13T14:12:42.000Z
2020-05-13T14:12:42.000Z
Software de Trading/freqtrade/misc.py
NatanNMB15/tcc-pytradebot
52b19251a030ab9c1a1b95157b4d57a9cf6df9dc
[ "MIT" ]
7
2020-02-12T02:58:40.000Z
2021-06-04T23:24:08.000Z
Software de Trading/freqtrade/misc.py
NatanNMB15/tcc-pytradebot
52b19251a030ab9c1a1b95157b4d57a9cf6df9dc
[ "MIT" ]
null
null
null
""" Various tool function for Freqtrade and scripts """ import gzip import logging import re from datetime import datetime from pathlib import Path from typing.io import IO import numpy as np import rapidjson logger = logging.getLogger(__name__) def shorten_date(_date: str) -> str: """ Trim the date so it f...
29.338462
100
0.601468
ff270b67fa25eabcc003187c6e8d4c34d6e9944b
1,385
py
Python
src/losses/aic20_loss.py
hthieu166/selab-aic20-track-2
5a87a075e64711388e06fc22171ee314cca1ae10
[ "MIT" ]
null
null
null
src/losses/aic20_loss.py
hthieu166/selab-aic20-track-2
5a87a075e64711388e06fc22171ee314cca1ae10
[ "MIT" ]
null
null
null
src/losses/aic20_loss.py
hthieu166/selab-aic20-track-2
5a87a075e64711388e06fc22171ee314cca1ae10
[ "MIT" ]
null
null
null
from __future__ import print_function from __future__ import division from __future__ import absolute_import import sys import os sys.path.insert(0, os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..', 'src'))) import src.utils.logging as logging logger = logging.get_logger(__name__) import torch...
32.209302
74
0.695307
efaf4579a9371e18d8835ab66c1fe28f480a33c1
8,962
py
Python
tools/ci_build/github/android/build_aar_package.py
vpisarev/onnxruntime
bab9b80f1f2330d3a115e0abbb4d8278c2be3f44
[ "MIT" ]
null
null
null
tools/ci_build/github/android/build_aar_package.py
vpisarev/onnxruntime
bab9b80f1f2330d3a115e0abbb4d8278c2be3f44
[ "MIT" ]
null
null
null
tools/ci_build/github/android/build_aar_package.py
vpisarev/onnxruntime
bab9b80f1f2330d3a115e0abbb4d8278c2be3f44
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import argparse import json import os import pathlib import shutil import subprocess import sys SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) REPO_DIR = os.path.normpath(os.path.join(SCRIPT_...
42.67619
115
0.699286
5402a0b2b567449ce509dddf4b1a68f39757d0df
1,650
py
Python
examples/signing.py
Barre/python-dkim
55403408038a5347ac3469adc9bbdc7de36c6076
[ "BSD-2-Clause" ]
1
2020-12-19T21:21:58.000Z
2020-12-19T21:21:58.000Z
examples/signing.py
Barre/python-dkim
55403408038a5347ac3469adc9bbdc7de36c6076
[ "BSD-2-Clause" ]
1
2020-12-19T21:23:55.000Z
2020-12-19T21:23:55.000Z
examples/signing.py
Barre/python-dkim
55403408038a5347ac3469adc9bbdc7de36c6076
[ "BSD-2-Clause" ]
1
2021-12-31T10:56:00.000Z
2021-12-31T10:56:00.000Z
import dkim from email.parser import Parser def main(): message = """From: Example <example@example.com> This is a message body. Fun! """ selector = "_dkim" signing_domain = "example.com" secret_key = "-----BEGIN RSA PRIVATE KEY-----\n" \ "MIICXQIBAAKBgQC4GUGr+d/6SFNzVLYpphnRd0QPGKz2...
48.529412
98
0.690909
766180d609eb46cd46add723016ceb50c9f039bf
5,447
py
Python
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operation_status_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operation_status_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operation_status_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.633929
217
0.683128
b182e16b73619b2f22441046a8f57e51ba28faed
2,887
py
Python
feasibility.py
BYU-PRISM/Grid-Energy-Management
a10c6f9a9bbd9a8a8a44dc0b42fb7bd923d33cd0
[ "MIT" ]
1
2021-12-16T17:53:48.000Z
2021-12-16T17:53:48.000Z
feasibility.py
BYU-PRISM/Grid-Energy-Management
a10c6f9a9bbd9a8a8a44dc0b42fb7bd923d33cd0
[ "MIT" ]
null
null
null
feasibility.py
BYU-PRISM/Grid-Energy-Management
a10c6f9a9bbd9a8a8a44dc0b42fb7bd923d33cd0
[ "MIT" ]
null
null
null
import numpy as np def load_feasibility(gen_time, tol=1e-8): gen = gen_time[0] time = gen_time[1] r = np.zeros(len(time)) r[0] = 0 dt = time[1] - time[0] for i in range(1, len(time)): r[i] = (gen[i] - gen[i-1])/dt # r = gen_time[2] # r = np.diff(gen)/np.diff(time) # r = np...
27.759615
76
0.520956
d12dda65d86b33c031adc62f235474b2ea90d5e0
689
py
Python
mii_sorter/migrations/0010_auto_fix_folder_path.py
MiiRaGe/miilibrary
f613c6654f21db62668a6a9d68e6678fdd2a1d03
[ "MIT" ]
null
null
null
mii_sorter/migrations/0010_auto_fix_folder_path.py
MiiRaGe/miilibrary
f613c6654f21db62668a6a9d68e6678fdd2a1d03
[ "MIT" ]
1
2018-01-26T15:52:51.000Z
2018-01-26T15:52:51.000Z
mii_sorter/migrations/0010_auto_fix_folder_path.py
MiiRaGe/miilibrary
f613c6654f21db62668a6a9d68e6678fdd2a1d03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations from mii_sorter.models import Movie, Episode def change_folder_path_to_abs(apps, schema_editor): for movie in Movie.objects.exclude(folder_path__icontains=settings.DESTINATION_PLACEHO...
27.56
103
0.741655
5450281b1fc890e668b2e68b591c82e76aab4fd8
3,469
py
Python
hummingbot/connector/exchange/binance/binance_constants.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
2
2022-03-03T10:00:27.000Z
2022-03-08T13:57:56.000Z
hummingbot/connector/exchange/binance/binance_constants.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
6
2022-01-31T15:44:54.000Z
2022-03-06T04:27:12.000Z
hummingbot/connector/exchange/binance/binance_constants.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
1
2022-02-22T11:03:02.000Z
2022-02-22T11:03:02.000Z
from hummingbot.core.api_throttler.data_types import LinkedLimitWeightPair, RateLimit from hummingbot.core.data_type.in_flight_order import OrderState HBOT_ORDER_ID_PREFIX = "x-XEKWYICX" # Base URL REST_URL = "https://api.binance.{}/api/" WSS_URL = "wss://stream.binance.{}:9443/ws" PUBLIC_API_VERSION = "v3" PRIVATE_...
37.706522
97
0.751513
a98aa5c04913f10b7503188867931f72f5d000a9
2,890
py
Python
core/urls.py
MTES-MCT/appel
3b840ccea600ef31cfea57721fe5e6edbdbc2c79
[ "MIT" ]
null
null
null
core/urls.py
MTES-MCT/appel
3b840ccea600ef31cfea57721fe5e6edbdbc2c79
[ "MIT" ]
null
null
null
core/urls.py
MTES-MCT/appel
3b840ccea600ef31cfea57721fe5e6edbdbc2c79
[ "MIT" ]
null
null
null
"""core URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
34.404762
88
0.652941
0003f116b9c117432d025f2e4df4d079ba8a9a06
1,141
py
Python
model-optimizer/mo/utils/ir_reader/extenders/strided_slice_extender.py
fujunwei/dldt
09497b7724de4be92629f7799b8538b483d809a2
[ "Apache-2.0" ]
1
2021-07-30T17:03:50.000Z
2021-07-30T17:03:50.000Z
model-optimizer/mo/utils/ir_reader/extenders/strided_slice_extender.py
fujunwei/dldt
09497b7724de4be92629f7799b8538b483d809a2
[ "Apache-2.0" ]
null
null
null
model-optimizer/mo/utils/ir_reader/extenders/strided_slice_extender.py
fujunwei/dldt
09497b7724de4be92629f7799b8538b483d809a2
[ "Apache-2.0" ]
null
null
null
""" Copyright (C) 2018-2020 Intel Corporation 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...
32.6
96
0.729185
cdf4ad5a77e0021447ec71f737535fa0c21822f5
3,746
py
Python
textflow/view/dashboard/__init__.py
ysenarath/textflow
ebb86cbedaf6ba7ed62a9f811a7d7d1818d938ac
[ "MIT" ]
4
2020-12-10T19:38:15.000Z
2021-08-02T02:00:46.000Z
textflow/view/dashboard/__init__.py
ysenarath/textflow
ebb86cbedaf6ba7ed62a9f811a7d7d1818d938ac
[ "MIT" ]
2
2021-01-08T18:35:04.000Z
2021-02-07T04:25:56.000Z
textflow/view/dashboard/__init__.py
ysenarath/textflow
ebb86cbedaf6ba7ed62a9f811a7d7d1818d938ac
[ "MIT" ]
1
2021-04-04T19:21:40.000Z
2021-04-04T19:21:40.000Z
# Copyright 2021 by Yasas Senarath. # All rights reserved. # This file is part of the TextFlow, # and is released under the "MIT License Agreement". Please see the LICENSE # file that should have been included as part of this package. from collections import namedtuple import flask from flask import Blueprint, sessio...
38.22449
105
0.693807
51b916dc4a6e6471de9dfaa865dccebabdce13be
1,639
py
Python
hourglass/middleware.py
davezen1/calc
410d114f01e84e9fc6363f58853a4d9451a00ef2
[ "CC0-1.0" ]
null
null
null
hourglass/middleware.py
davezen1/calc
410d114f01e84e9fc6363f58853a4d9451a00ef2
[ "CC0-1.0" ]
3
2021-03-19T23:45:25.000Z
2022-03-21T22:21:12.000Z
hourglass/middleware.py
davezen1/calc
410d114f01e84e9fc6363f58853a4d9451a00ef2
[ "CC0-1.0" ]
null
null
null
from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from debug_toolbar.middleware import DebugToolbarMiddleware class ComplianceMiddleware: ''' Middleware to add security-related response headers. If the SECURITY_HEADERS_ON_ERROR_ONLY setting is True, then the headers ...
29.8
75
0.708969
8c627692e56b3023602d700ce8063ece88bac228
293
py
Python
v1/feedback/factories/feedback.py
buckyroberts/Website-API
e74d202a41533c7622acbe12c793d047d44012ad
[ "MIT" ]
64
2020-10-02T02:58:06.000Z
2022-01-29T20:00:50.000Z
v1/feedback/factories/feedback.py
buckyroberts/Website-API
e74d202a41533c7622acbe12c793d047d44012ad
[ "MIT" ]
93
2020-10-04T22:53:46.000Z
2022-03-05T18:17:46.000Z
v1/feedback/factories/feedback.py
buckyroberts/Website-API
e74d202a41533c7622acbe12c793d047d44012ad
[ "MIT" ]
21
2020-10-11T14:16:13.000Z
2021-11-09T17:50:25.000Z
import factory from factory.django import DjangoModelFactory from ..models.feedback import Feedback class FeedbackFactory(DjangoModelFactory): name = factory.Faker('pystr') email = factory.Faker('email') message = factory.Faker('text') class Meta: model = Feedback
20.928571
45
0.723549
941a05081705291290592fa69ffd66a22a2f2fc1
2,216
py
Python
convert_model/test_conversion.py
dzubke/speech-lite
65f83ac2b7551650820f079ce5152741f2a6fdb8
[ "Apache-2.0" ]
null
null
null
convert_model/test_conversion.py
dzubke/speech-lite
65f83ac2b7551650820f079ce5152741f2a6fdb8
[ "Apache-2.0" ]
null
null
null
convert_model/test_conversion.py
dzubke/speech-lite
65f83ac2b7551650820f079ce5152741f2a6fdb8
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import onnx from onnx import onnx_pb from onnx_coreml import convert import coremltools class TestNet(nn.Module): def __init__(self, inplace=False): super(TestNet, self).__init__() self.relu = nn.ReLU(inplace=inplace) self.conv1 = nn.Conv2d(1, 32, (5, 3...
30.356164
89
0.599278
d373cff78cb535cbfe37251e5c801749457b504c
7,746
py
Python
network/textnet.py
shuyansy/A-detection-and-recognition-pipeline-of-complex-meters-in-wild
15bc2b97078d3216cfd075ccba1cf2d2e42af54f
[ "MIT" ]
17
2022-03-20T05:41:51.000Z
2022-03-25T04:53:17.000Z
network/textnet.py
shuyansy/A-detection-and-recognition-pipeline-of-complex-meters-in-wild
15bc2b97078d3216cfd075ccba1cf2d2e42af54f
[ "MIT" ]
null
null
null
network/textnet.py
shuyansy/A-detection-and-recognition-pipeline-of-complex-meters-in-wild
15bc2b97078d3216cfd075ccba1cf2d2e42af54f
[ "MIT" ]
1
2022-03-23T03:06:51.000Z
2022-03-23T03:06:51.000Z
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from network.vgg import VggNet from network.resnet import ResNet from util.roi import batch_roi_transform from network.crnn import CRNN from util.converter import keys from util.misc import mkdirs, to_device import cv2 from util.tool ...
32.410042
107
0.587142
1683b2e27c33baa5d6ef3476dc2ca7dbf0986bcb
83
py
Python
python/testData/copyPaste/IndentTabIncrease.after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/copyPaste/IndentTabIncrease.after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/copyPaste/IndentTabIncrease.after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
print "Line 2" class Test: def __init__(self): print "Line 2" print "Line 1"
11.857143
20
0.650602
33cf843dde8e8eb984fa54f006e1cb8440807ed3
627
py
Python
bin/passing_arguments.py
gshklover/async_v20
965346eafee09ee4ee510b22a064d3cf661b7aa4
[ "MIT" ]
23
2017-10-30T18:49:11.000Z
2022-02-08T12:22:18.000Z
bin/passing_arguments.py
gshklover/async_v20
965346eafee09ee4ee510b22a064d3cf661b7aa4
[ "MIT" ]
23
2017-10-20T12:32:18.000Z
2021-03-13T07:43:23.000Z
bin/passing_arguments.py
gshklover/async_v20
965346eafee09ee4ee510b22a064d3cf661b7aa4
[ "MIT" ]
12
2017-10-30T18:49:13.000Z
2021-02-06T02:26:37.000Z
import asyncio from async_v20 import OandaClient client = OandaClient() # This coroutine_1 = client.create_order('AUD_USD', 10) # Is the same as this from async_v20 import InstrumentName, DecimalNumber coroutine_2 = client.create_order( InstrumentName('AUD_USD'), DecimalNumber(10) ) # Is the same as this from...
18.441176
53
0.722488
fa994748f68202886bbb279e7ffaba42f8805022
2,207
py
Python
xlib/qt/widgets/QXFixedLayeredImages.py
seanwan/DeepFaceLive
0a076dbfdffdc5d12b7986d2ec3361eec5812382
[ "MIT" ]
null
null
null
xlib/qt/widgets/QXFixedLayeredImages.py
seanwan/DeepFaceLive
0a076dbfdffdc5d12b7986d2ec3361eec5812382
[ "MIT" ]
null
null
null
xlib/qt/widgets/QXFixedLayeredImages.py
seanwan/DeepFaceLive
0a076dbfdffdc5d12b7986d2ec3361eec5812382
[ "MIT" ]
null
null
null
from typing import List, Union import numpy as np from PyQt6.QtCore import * from PyQt6.QtGui import * from PyQt6.QtWidgets import * from ..gui.from_np import QImage_from_np from .QXWidget import QXWidget class QXFixedLayeredImages(QXWidget): """ A widget to show multiple stacked images in fixed area al...
26.590361
80
0.546443
47f471b026d40b6c66fc458af134201313f4ab2e
2,707
py
Python
Preprocessing/code/options/config.py
dongkwonjin/Semantic-Line-MWCS
2533bbaa62dde955b560fa2ab6a78a9b1a0038ac
[ "MIT" ]
16
2021-04-19T06:43:14.000Z
2022-03-28T06:37:59.000Z
Preprocessing/code/options/config.py
dongkwonjin/Semantic-Line-MWCS
2533bbaa62dde955b560fa2ab6a78a9b1a0038ac
[ "MIT" ]
1
2021-09-22T07:10:36.000Z
2022-03-20T12:02:48.000Z
Preprocessing/code/options/config.py
dongkwonjin/Semantic-Line-MWCS
2533bbaa62dde955b560fa2ab6a78a9b1a0038ac
[ "MIT" ]
null
null
null
import os import torch class Config(object): def __init__(self): self.settings_for_system() self.settings_for_path() self.settings_for_image_processing() self.settings_for_preprocessing() self.settings_for_dataloading() self.settings_for_visualization() sel...
36.093333
118
0.611008
16bd3013b868ddb9d061097c7813e4086449f7e1
3,357
py
Python
src/machinable/repository.py
machinable-org/machinable
9d96e942dde05d68699bc7bc0c3d062ee18652ad
[ "MIT" ]
23
2020-02-28T14:29:04.000Z
2021-12-23T20:50:54.000Z
src/machinable/repository.py
machinable-org/machinable
9d96e942dde05d68699bc7bc0c3d062ee18652ad
[ "MIT" ]
172
2020-02-24T12:12:11.000Z
2022-03-29T03:08:24.000Z
src/machinable/repository.py
machinable-org/machinable
9d96e942dde05d68699bc7bc0c3d062ee18652ad
[ "MIT" ]
1
2020-11-23T22:42:20.000Z
2020-11-23T22:42:20.000Z
from typing import TYPE_CHECKING, List, Optional, Tuple, Union from re import L from machinable import schema from machinable.component import compact from machinable.element import Connectable, Element from machinable.group import Group from machinable.project import Project from machinable.settings import get_setti...
32.278846
82
0.631218
7764ef409976db3a84de8358223ff4c7f3844b60
7,408
py
Python
runcode/views.py
lgb2002/club
099f5777699abe48f067684fc5fd2b7c7e97e07d
[ "MIT" ]
1
2019-09-15T01:23:32.000Z
2019-09-15T01:23:32.000Z
runcode/views.py
lgb2002/club
099f5777699abe48f067684fc5fd2b7c7e97e07d
[ "MIT" ]
1
2022-02-12T05:22:29.000Z
2022-02-12T05:22:29.000Z
runcode/views.py
lgb2002/club
099f5777699abe48f067684fc5fd2b7c7e97e07d
[ "MIT" ]
null
null
null
from django.shortcuts import render import requests, json, os, urllib from django.http import JsonResponse, HttpResponse from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from urllib.parse import urlencode from django.utils import timezone from runcode.models...
29.991903
575
0.697354
4e61c11a2dce123e2be5dda9199bfafde96f507a
546
py
Python
demos/live/live_demo.py
pearsonlab/improv
9dfa92a0a0e768505ee90586004d84a8e360c6a8
[ "MIT" ]
11
2019-09-24T18:11:20.000Z
2021-08-16T09:58:01.000Z
demos/live/live_demo.py
pearsonlab/improv
9dfa92a0a0e768505ee90586004d84a8e360c6a8
[ "MIT" ]
4
2019-12-05T20:48:53.000Z
2021-03-16T19:50:52.000Z
demos/live/live_demo.py
pearsonlab/improv
9dfa92a0a0e768505ee90586004d84a8e360c6a8
[ "MIT" ]
2
2021-03-11T04:33:49.000Z
2021-04-19T02:37:12.000Z
import logging # Matplotlib is overly verbose by default logging.getLogger("matplotlib").setLevel(logging.WARNING) from improv.nexus import Nexus loadFile = './live_demo.yaml' nexus = Nexus('Nexus') nexus.createNexus(file=loadFile) # All modules needed have been imported # so we can change the level of logging here ...
24.818182
57
0.750916
9277ab1df95b65643c018ccd3f1b659d4dc12d8d
30,246
py
Python
model_deployment/model/grapy/networks/deeplab_xception_synBN.py
Pherokung/VIRTUON
987cf4e37a72b214f02f0f7fbda68c0cc74e6de4
[ "MIT" ]
55
2019-11-14T02:32:59.000Z
2022-02-04T08:03:15.000Z
model_deployment/model/grapy/networks/deeplab_xception_synBN.py
Pherokung/VIRTUON
987cf4e37a72b214f02f0f7fbda68c0cc74e6de4
[ "MIT" ]
7
2020-02-27T12:13:21.000Z
2021-05-14T00:10:22.000Z
model_deployment/model/grapy/networks/deeplab_xception_synBN.py
Pherokung/VIRTUON
987cf4e37a72b214f02f0f7fbda68c0cc74e6de4
[ "MIT" ]
11
2020-11-28T04:09:29.000Z
2022-03-21T09:00:55.000Z
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as model_zoo from torch.nn.parameter import Parameter from collections import OrderedDict from sync_batchnorm import SynchronizedBatchNorm1d, DataParallelWithCallback, SynchronizedBatchNorm2d def fixed_padding(...
38.628352
130
0.577795
889b0bd9dc34f58c1e4ce23a94d9fc9911eddd7c
12,807
py
Python
src/python/grpcio_tests/commands.py
arghyadip01/grpc
9e10bfc8a096ef91a327e22f84f10c0fabff4417
[ "Apache-2.0" ]
4
2020-08-11T10:00:16.000Z
2021-10-08T15:17:25.000Z
src/python/grpcio_tests/commands.py
arghyadip01/grpc
9e10bfc8a096ef91a327e22f84f10c0fabff4417
[ "Apache-2.0" ]
54
2020-06-23T17:34:04.000Z
2022-03-31T02:04:06.000Z
src/python/grpcio_tests/commands.py
arghyadip01/grpc
9e10bfc8a096ef91a327e22f84f10c0fabff4417
[ "Apache-2.0" ]
12
2020-07-14T23:59:57.000Z
2022-03-22T09:59:18.000Z
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
37.121739
115
0.687046
21f535ec1e4ffe9a4d767165a107778b9afb582e
235
py
Python
homeassistant/components/brother/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/brother/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/brother/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Constants for Brother integration.""" from __future__ import annotations from typing import Final DATA_CONFIG_ENTRY: Final = "config_entry" DOMAIN: Final = "brother" PRINTER_TYPES: Final = ["laser", "ink"] SNMP: Final = "snmp"
18.076923
41
0.73617
c8ff9d323fa639776c7b84efc969b747b68b2f41
2,373
py
Python
Backend/getplate/read_plate.py
skwasiborski/Stroller
78bf15beb6ae55aa2fa39446139353e15154d337
[ "MIT" ]
null
null
null
Backend/getplate/read_plate.py
skwasiborski/Stroller
78bf15beb6ae55aa2fa39446139353e15154d337
[ "MIT" ]
null
null
null
Backend/getplate/read_plate.py
skwasiborski/Stroller
78bf15beb6ae55aa2fa39446139353e15154d337
[ "MIT" ]
null
null
null
import os import cv2 import numpy as np import matplotlib.pyplot as plt from local_utils import detect_lp from os.path import splitext, basename from keras.models import model_from_json import glob import matplotlib.gridspec as gridspec from sklearn.preprocessing import LabelEncoder from helper import *...
33.422535
81
0.59587
0663ae571c913ec173c0d8dcf8af4d087404a3e2
9,591
py
Python
tensorflow_hub/keras_layer.py
Jabrils/hub
84ac11ac756050a186cc8bddb54e104323fb9dff
[ "Apache-2.0" ]
1
2020-07-12T06:36:06.000Z
2020-07-12T06:36:06.000Z
tensorflow_hub/keras_layer.py
Jabrils/hub
84ac11ac756050a186cc8bddb54e104323fb9dff
[ "Apache-2.0" ]
null
null
null
tensorflow_hub/keras_layer.py
Jabrils/hub
84ac11ac756050a186cc8bddb54e104323fb9dff
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Hub 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 app...
43.39819
98
0.701178
d9f2ecbca370dedc98136f53d5c271738a65ebea
8,544
py
Python
test/test_envelopes.py
keefehuang/c3
1df65bc43d891c7af77c8eff0ef8879b2fe5c3e6
[ "Apache-2.0" ]
null
null
null
test/test_envelopes.py
keefehuang/c3
1df65bc43d891c7af77c8eff0ef8879b2fe5c3e6
[ "Apache-2.0" ]
2
2020-10-28T21:46:21.000Z
2020-10-30T17:25:01.000Z
test/test_envelopes.py
keefehuang/c3
1df65bc43d891c7af77c8eff0ef8879b2fe5c3e6
[ "Apache-2.0" ]
1
2021-06-01T17:04:31.000Z
2021-06-01T17:04:31.000Z
import pickle from c3.c3objs import Quantity from c3.libraries.envelopes import envelopes import numpy as np import pytest ts = np.linspace(0, 10e-9, 100) with open("test/envelopes.pickle", "rb") as filename: test_data = pickle.load(filename) ABS_TOL_FACTOR = 1e-11 def get_atol(test_type: str) -> float: "...
27.56129
113
0.617158
8e35b375550915c15c3e17f0ca932b8175c87c98
3,849
py
Python
lib/surface/compute/backend_services/add_signed_url_key.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/compute/backend_services/add_signed_url_key.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/backend_services/add_signed_url_key.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. 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...
42.766667
78
0.762796
d7adcfb877318ad9d29cd3230d140eab98e7fdfd
788
py
Python
field_permissions/forms.py
brunopastor/django-field-permissions
5e52c8b1984ca1e72ae6461e42064d783f1d0f3b
[ "MIT" ]
26
2016-09-23T12:46:10.000Z
2021-12-03T11:36:34.000Z
field_permissions/forms.py
brunopastor/django-field-permissions
5e52c8b1984ca1e72ae6461e42064d783f1d0f3b
[ "MIT" ]
2
2017-11-01T19:29:41.000Z
2018-10-10T13:33:23.000Z
field_permissions/forms.py
tiliv/django-field-permissions
4536037247c8a04ccb34ed9d5fa5b0d866286fbd
[ "MIT" ]
16
2017-07-17T15:33:17.000Z
2021-11-22T13:14:35.000Z
from django import forms class FieldPermissionFormMixin: """ ModelForm logic for removing fields when a user is found not to have change permissions. """ def __init__(self, *args, **kwargs): user = kwargs.pop('user') super(FieldPermissionFormMixin, self).__init__(*args, **kwargs) ...
32.833333
97
0.687817
23b3574af032d07d4a9e7e00e719ae1163524bed
6,958
py
Python
models/system_model_v3/model/parts/eth_leveragers.py
trangnv/geb-simulations-h20
df86e1ad1ff8e98cf2c3f6025d1626d260a3b125
[ "MIT" ]
7
2021-08-31T13:11:51.000Z
2022-02-10T09:05:16.000Z
models/system_model_v3/model/parts/eth_leveragers.py
trangnv/geb-simulations-h20
df86e1ad1ff8e98cf2c3f6025d1626d260a3b125
[ "MIT" ]
null
null
null
models/system_model_v3/model/parts/eth_leveragers.py
trangnv/geb-simulations-h20
df86e1ad1ff8e98cf2c3f6025d1626d260a3b125
[ "MIT" ]
8
2021-09-03T08:29:09.000Z
2021-12-04T04:20:49.000Z
import pandas as pd from .utils import target_rate_to_apy from .debt_market import is_cdp_above_liquidation_ratio from .debt_market import wipe_to_rr_apy, draw_to_rr_apy from .uniswap import get_output_price, get_input_price """ A DEFI saver kind of an agent. The agent keeps a CDP open and keeps its liquidation ratio ...
46.386667
128
0.610808
86b3b682945b9b7f83aa83501bff6a82dbe481ab
13,770
py
Python
enso/contrib/scriptotron/tracker.py
blackdaemon/enso-launcher-continued
346f82811e77caf73560619cdeb16afabfbf1fce
[ "BSD-3-Clause" ]
7
2015-09-19T20:57:32.000Z
2020-12-31T16:34:42.000Z
enso/contrib/scriptotron/tracker.py
blackdaemon/enso-launcher-continued
346f82811e77caf73560619cdeb16afabfbf1fce
[ "BSD-3-Clause" ]
21
2015-11-03T23:15:25.000Z
2018-10-11T21:57:45.000Z
enso/contrib/scriptotron/tracker.py
blackdaemon/enso-launcher-continued
346f82811e77caf73560619cdeb16afabfbf1fce
[ "BSD-3-Clause" ]
4
2015-09-15T17:18:00.000Z
2021-06-16T07:06:06.000Z
# Copyright (c) 2008, Humanized, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditio...
39.568966
93
0.594553
db6393ee5e487342e49c57389330b3e3dcf21faf
7,614
py
Python
workflow/scripts/rm_orphan_pe_bam.py
AnnaLorenc/ATACseq
19d1e48da2022fa75837d400e5165050bd131787
[ "MIT" ]
19
2020-04-15T14:52:36.000Z
2022-03-13T06:50:49.000Z
workflow/scripts/rm_orphan_pe_bam.py
AnnaLorenc/ATACseq
19d1e48da2022fa75837d400e5165050bd131787
[ "MIT" ]
5
2020-05-06T18:10:56.000Z
2022-02-03T23:43:19.000Z
workflow/scripts/rm_orphan_pe_bam.py
AnnaLorenc/ATACseq
19d1e48da2022fa75837d400e5165050bd131787
[ "MIT" ]
16
2020-10-20T09:05:31.000Z
2021-07-16T11:30:25.000Z
#!/usr/bin/env python # source: https://github.com/nf-core/chipseq/blob/master/bin/bampe_rm_orphan.py # MIT License # # Copyright (c) Philip Ewels # # 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 S...
40.935484
162
0.51471
d107a261dfe9e54d46ef322437fe421038e40c9f
7,050
py
Python
moai/export/local/rendered_mesh.py
ai-in-motion/moai
e38cac046c059d2e2331ef4883bbabc5a500a5cf
[ "Apache-2.0" ]
10
2021-04-02T11:21:33.000Z
2022-01-18T18:32:32.000Z
moai/export/local/rendered_mesh.py
ai-in-motion/moai
e38cac046c059d2e2331ef4883bbabc5a500a5cf
[ "Apache-2.0" ]
1
2022-03-22T20:10:55.000Z
2022-03-24T13:11:02.000Z
moai/export/local/rendered_mesh.py
ai-in-motion/moai
e38cac046c059d2e2331ef4883bbabc5a500a5cf
[ "Apache-2.0" ]
3
2021-05-16T20:47:40.000Z
2021-12-01T21:15:36.000Z
from moai.export.local.image2d import Image2d from moai.monads.execution.cascade import _create_accessor import torch import pyrender import typing import logging import numpy as np import math import trimesh import itertools from PIL import Image log = logging.getLogger(__name__) __all__ = ["RenderedMesh"] class R...
44.339623
109
0.54766
70763b25617a9ef03a6d9f3855387b41dd80a448
1,084
py
Python
rdpyg/draw/pyopengl/paths.py
illume/eyestabs
9ce717743a6a4fe7b561c68599e9352da3acf080
[ "Unlicense" ]
null
null
null
rdpyg/draw/pyopengl/paths.py
illume/eyestabs
9ce717743a6a4fe7b561c68599e9352da3acf080
[ "Unlicense" ]
null
null
null
rdpyg/draw/pyopengl/paths.py
illume/eyestabs
9ce717743a6a4fe7b561c68599e9352da3acf080
[ "Unlicense" ]
null
null
null
from OpenGL.GL import glBegin, GL_LINES, glVertex3f, glEnd, glPushAttrib, GL_ALL_ATTRIB_BITS, glMatrixMode, GL_MODELVIEW, glLoadIdentity, glScale, glTranslatef, glPopAttrib from OpenGL.GLUT import glutSolidTeapot def draw_path(a_path): """ draws a path with opengl lines. """ glBegin(GL_LINES) tr...
15.485714
172
0.633764
7d5aeaf8c411ef1af39c896f2901406ab897e754
1,080
py
Python
services/migrations/0024_parler_field_type_change.py
City-of-Helsinki/opencity-profile
a430b562b9937f443d391475fabdc27068b95c49
[ "MIT" ]
null
null
null
services/migrations/0024_parler_field_type_change.py
City-of-Helsinki/opencity-profile
a430b562b9937f443d391475fabdc27068b95c49
[ "MIT" ]
null
null
null
services/migrations/0024_parler_field_type_change.py
City-of-Helsinki/opencity-profile
a430b562b9937f443d391475fabdc27068b95c49
[ "MIT" ]
null
null
null
# Generated by Django 3.2.11 on 2022-01-13 12:18 import django.db.models.deletion import parler.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("services", "0023_change_ordering__noop"), ] operations = [ migrations.AlterField( ...
28.421053
60
0.564815
7df746e3d44d5a3da77726b436147b566721958e
541
py
Python
backend/post/migrations/0012_auto_20191003_1840.py
VarunDev2000/CTF
1cc296cb18a3ec08ef198b47b3ac6980d66bef71
[ "bzip2-1.0.6" ]
null
null
null
backend/post/migrations/0012_auto_20191003_1840.py
VarunDev2000/CTF
1cc296cb18a3ec08ef198b47b3ac6980d66bef71
[ "bzip2-1.0.6" ]
null
null
null
backend/post/migrations/0012_auto_20191003_1840.py
VarunDev2000/CTF
1cc296cb18a3ec08ef198b47b3ac6980d66bef71
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.0 on 2019-10-03 13:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('post', '0011_remove_posts_createdat'), ] operations = [ migrations.AlterFiel...
25.761905
143
0.667283
b64ceb4273cc06d4eefffd113b40c2f37aa3ca3e
3,260
py
Python
ymir/backend/src/ymir_controller/tests/unit/test_invoker_cmd_branch_commit.py
Zhang-SJ930104/ymir
dd6481be6f229ade4cf8fba64ef44a15357430c4
[ "Apache-2.0" ]
64
2021-11-15T03:48:00.000Z
2022-03-25T07:08:46.000Z
ymir/backend/src/ymir_controller/tests/unit/test_invoker_cmd_branch_commit.py
Zhang-SJ930104/ymir
dd6481be6f229ade4cf8fba64ef44a15357430c4
[ "Apache-2.0" ]
35
2021-11-23T04:14:35.000Z
2022-03-26T09:03:43.000Z
ymir/backend/src/ymir_controller/tests/unit/test_invoker_cmd_branch_commit.py
Aryalfrat/ymir
d4617ed00ef67a77ab4e1944763f608bface4be6
[ "Apache-2.0" ]
57
2021-11-11T10:15:40.000Z
2022-03-29T07:27:54.000Z
import logging import os import shutil import unittest from unittest import mock from google.protobuf.json_format import MessageToDict, ParseDict import tests.utils as test_utils from controller.utils.invoker_call import make_invoker_cmd_call from controller.utils.invoker_mapping import RequestTypeToInvoker from prot...
37.906977
103
0.647239
7906810ca3e53172179e0508842ca7cdc2d85ad2
4,110
py
Python
pyyolo/utils.py
isarandi/pyyolo
0f26210fd72f7ce973b34d51b6a38b5dd0f57115
[ "Apache-2.0" ]
null
null
null
pyyolo/utils.py
isarandi/pyyolo
0f26210fd72f7ce973b34d51b6a38b5dd0f57115
[ "Apache-2.0" ]
null
null
null
pyyolo/utils.py
isarandi/pyyolo
0f26210fd72f7ce973b34d51b6a38b5dd0f57115
[ "Apache-2.0" ]
null
null
null
""" File name: utils Author: rameshpr Date: 11/5/18 """ import numpy as np from ctypes import * from typing import List, Tuple import cv2 from pyyolo.darknet import c_array, IMAGE, METADATA, predict_image, get_network_boxes, \ do_nms_obj, do_nms_sort, free_image, free_detections, ndarray_image import ...
29.148936
130
0.652798
876f2a61c527dc5fea95afa33224ba11b553dd34
4,809
py
Python
qiskit_experiments/library/tomography/qst_experiment.py
spencerking/qiskit-experiments
11a254b010afe35933aaabac70de12b5b5a244bf
[ "Apache-2.0" ]
null
null
null
qiskit_experiments/library/tomography/qst_experiment.py
spencerking/qiskit-experiments
11a254b010afe35933aaabac70de12b5b5a244bf
[ "Apache-2.0" ]
null
null
null
qiskit_experiments/library/tomography/qst_experiment.py
spencerking/qiskit-experiments
11a254b010afe35933aaabac70de12b5b5a244bf
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
42.557522
96
0.684342
bf2846be11fec909044eb0a5efa89e183d434bd5
11,503
py
Python
test/test_LensModel/test_numeric_lens_differentials.py
jiwoncpark/lenstronomy
c1d12580f8d8cf1d065d80568a58c0694e23945a
[ "MIT" ]
1
2020-07-31T07:55:17.000Z
2020-07-31T07:55:17.000Z
test/test_LensModel/test_numeric_lens_differentials.py
jiwoncpark/lenstronomy
c1d12580f8d8cf1d065d80568a58c0694e23945a
[ "MIT" ]
null
null
null
test/test_LensModel/test_numeric_lens_differentials.py
jiwoncpark/lenstronomy
c1d12580f8d8cf1d065d80568a58c0694e23945a
[ "MIT" ]
2
2020-10-26T10:45:11.000Z
2021-03-04T12:25:19.000Z
__author__ = 'sibirrer' import pytest import numpy as np import numpy.testing as npt from lenstronomy.LensModel.lens_model import LensModel class TestNumerics(object): """ tests the source model routines """ def setup(self): self.lensModel = LensModel(['GAUSSIAN']) self.kwargs = [{'a...
38.73064
114
0.609754
5d4897c51786b74da66187d2524d9e3fe0098af1
20,223
py
Python
skfda/misc/operators/_linear_differential_operator.py
KonstantinKlepikov/scikit-fda
93c4ad80aaba8739b4f90932a2a759d6f5960387
[ "BSD-3-Clause" ]
1
2020-06-27T22:25:49.000Z
2020-06-27T22:25:49.000Z
skfda/misc/operators/_linear_differential_operator.py
KonstantinKlepikov/scikit-fda
93c4ad80aaba8739b4f90932a2a759d6f5960387
[ "BSD-3-Clause" ]
null
null
null
skfda/misc/operators/_linear_differential_operator.py
KonstantinKlepikov/scikit-fda
93c4ad80aaba8739b4f90932a2a759d6f5960387
[ "BSD-3-Clause" ]
null
null
null
import numbers from numpy import polyder, polyint, polymul, polyval import scipy.integrate from scipy.interpolate import PPoly import numpy as np from ..._utils import _same_domain from ...representation import FDataGrid from ...representation.basis import Constant, Monomial, Fourier, BSpline from ._operators import...
34.687822
78
0.604806
31b38d30a709b9a6e24bb1c073a418c48f795b90
557
py
Python
src/activelyDeletingState.py
bobjects/dharmacorder
082144c3e70a9ae5f788ad4130d79599c2400dfa
[ "MIT" ]
null
null
null
src/activelyDeletingState.py
bobjects/dharmacorder
082144c3e70a9ae5f788ad4130d79599c2400dfa
[ "MIT" ]
null
null
null
src/activelyDeletingState.py
bobjects/dharmacorder
082144c3e70a9ae5f788ad4130d79599c2400dfa
[ "MIT" ]
null
null
null
from deletingState import DeletingState # from selectingFileDeletingState import SelectingFileDeletingState import waitingDeletingState class ActivelyDeletingState(DeletingState): def enter_state(self): super(ActivelyDeletingState, self).enter_state() session = self._state_machine.session_to_delet...
39.785714
85
0.789946
9d5b7576921f10bf4d1fe4b109a8c7b3f9c7c28f
259
py
Python
ipc/PoemTokenizer.py
farshad-nejati/icp
e0f8db33fba23382782a0ac3f26ab6dd3b104553
[ "MIT" ]
1
2020-05-17T21:16:34.000Z
2020-05-17T21:16:34.000Z
ipc/PoemTokenizer.py
farshad-nejati/icp
e0f8db33fba23382782a0ac3f26ab6dd3b104553
[ "MIT" ]
null
null
null
ipc/PoemTokenizer.py
farshad-nejati/icp
e0f8db33fba23382782a0ac3f26ab6dd3b104553
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from hazm import word_tokenize from .IOManager import * class PoemTokenizer: @staticmethod def tokenize_poem(poem): poem_content = IOManager.read_file(poem) return word_tokenize(poem_content)
21.583333
48
0.760618
d7299b09bf9d7001bb7936d66f431e82f22b3085
40,732
py
Python
src/sage/matrix/matrix_integer_dense_hnf.py
mkoeppe/sage-1
249fc903897809e1eb081fbacb94741e01b37e73
[ "BSL-1.0" ]
1
2020-08-30T04:27:27.000Z
2020-08-30T04:27:27.000Z
src/sage/matrix/matrix_integer_dense_hnf.py
mkoeppe/sage-1
249fc903897809e1eb081fbacb94741e01b37e73
[ "BSL-1.0" ]
null
null
null
src/sage/matrix/matrix_integer_dense_hnf.py
mkoeppe/sage-1
249fc903897809e1eb081fbacb94741e01b37e73
[ "BSL-1.0" ]
1
2020-07-23T10:40:14.000Z
2020-07-23T10:40:14.000Z
""" Modular algorithm to compute Hermite normal forms of integer matrices AUTHORS: - Clement Pernet and William Stein (2008-02-07): initial version """ from __future__ import print_function from six.moves import range from copy import copy from sage.misc.misc import verbose, cputime from sage.matrix.constructor imp...
31.140673
119
0.555927
3e6a201ba832d4a7202125469af4a72190cfe25e
1,213
py
Python
day08.py
Matematik411/AdventOfCode2020
7af8e2240a7735b3a87777fad6f2dbe10d86ba16
[ "MIT" ]
2
2020-12-01T21:03:19.000Z
2020-12-04T11:43:21.000Z
day08.py
Matematik411/AdventOfCode2020
7af8e2240a7735b3a87777fad6f2dbe10d86ba16
[ "MIT" ]
null
null
null
day08.py
Matematik411/AdventOfCode2020
7af8e2240a7735b3a87777fad6f2dbe10d86ba16
[ "MIT" ]
null
null
null
orders = [] while True: try: a = input().split() orders.append([a[0], int(a[1])]) except: break def run_program(): acc = 0 visited = [0 for _ in range(len(orders))] i = 0 finished = True while True: if i == len(orders): print("Finished well!") ...
20.913793
45
0.439406
9ae017dbb5422908eae75006fea16fa5597ddef2
3,174
py
Python
prob/mhdmodes3d/build.py
soumide1102/nubhlight
85046add8b7e2c1419538864eb54205d33078772
[ "BSD-3-Clause" ]
16
2020-02-05T22:59:21.000Z
2022-03-18T11:05:37.000Z
prob/mhdmodes3d/build.py
soumide1102/nubhlight
85046add8b7e2c1419538864eb54205d33078772
[ "BSD-3-Clause" ]
13
2020-03-06T02:10:48.000Z
2021-06-15T20:00:30.000Z
prob/mhdmodes3d/build.py
soumide1102/nubhlight
85046add8b7e2c1419538864eb54205d33078772
[ "BSD-3-Clause" ]
4
2020-02-21T04:59:44.000Z
2020-12-10T21:42:12.000Z
################################################################################ # # # 3D LINEAR RMHD MODES # # ...
34.5
80
0.596723
5935af385279c98416227b491606b200c7cb59cb
4,514
py
Python
90_Tower/python/tower.py
auryn31/basic-computer-games
85226984a6ac52daf82d5ab2d16d0c58c02ffaf5
[ "Unlicense" ]
null
null
null
90_Tower/python/tower.py
auryn31/basic-computer-games
85226984a6ac52daf82d5ab2d16d0c58c02ffaf5
[ "Unlicense" ]
null
null
null
90_Tower/python/tower.py
auryn31/basic-computer-games
85226984a6ac52daf82d5ab2d16d0c58c02ffaf5
[ "Unlicense" ]
null
null
null
import sys class Disk: def __init__(self, size): self.__size = size def size(self): return self.__size def print(self): print("[ %s ]" % self.size()) class Tower: def __init__(self): self.__disks = [] def empty(self): return len(self.__disks) == 0 ...
26.244186
106
0.525698
714d2b1a6d362701e70159b2349e03d0718a6ed1
18,863
py
Python
src/config/svc-monitor/svc_monitor/tests/test_ha_proxy.py
biswajit-mandal/contrail-controller
80c4a7e8515f7296b18ba4c21a439bd3daefcc4a
[ "Apache-2.0" ]
null
null
null
src/config/svc-monitor/svc_monitor/tests/test_ha_proxy.py
biswajit-mandal/contrail-controller
80c4a7e8515f7296b18ba4c21a439bd3daefcc4a
[ "Apache-2.0" ]
null
null
null
src/config/svc-monitor/svc_monitor/tests/test_ha_proxy.py
biswajit-mandal/contrail-controller
80c4a7e8515f7296b18ba4c21a439bd3daefcc4a
[ "Apache-2.0" ]
1
2021-03-09T10:44:33.000Z
2021-03-09T10:44:33.000Z
import mock from mock import patch import unittest from cfgm_common.vnc_db import DBBase from svc_monitor import config_db from svc_monitor import loadbalancer_agent from vnc_api.vnc_api import * import argparse import ConfigParser class HAProxyTest(unittest.TestCase): def setUp(self): self.vnc_lib = mock....
44.279343
95
0.60791
d7c3f58abfb0bddabdcb04e60dec779fcb76895a
2,646
py
Python
tools/trendx_wrapper.py
michaelpdu/adversary_ml
6adec09ae5b8e30b9b58df7e8d9476793b4228bf
[ "Apache-2.0" ]
1
2021-09-24T19:30:44.000Z
2021-09-24T19:30:44.000Z
tools/trendx_wrapper.py
michaelpdu/adversarial_ml
6adec09ae5b8e30b9b58df7e8d9476793b4228bf
[ "Apache-2.0" ]
null
null
null
tools/trendx_wrapper.py
michaelpdu/adversarial_ml
6adec09ae5b8e30b9b58df7e8d9476793b4228bf
[ "Apache-2.0" ]
1
2021-09-24T19:30:49.000Z
2021-09-24T19:30:49.000Z
import os from ml_tool_interface import * from trendx_tool.run import * from housecallx import * class TrendXWrapper(MLToolInterface): """""" def __init__(self, config): self.config_ = config self.hcx_path_ = '' def set_hcx(self, hcx_path): self.hcx_path_ = hcx_path ...
29.4
86
0.513228
6d23b83aa7d8f9a8a9ec1d8275c2811d312e1d43
923
py
Python
setup.py
eaybek/getthat
3ca34902f773ec6a40a1df0b7dac5845a22cc8e4
[ "MIT" ]
null
null
null
setup.py
eaybek/getthat
3ca34902f773ec6a40a1df0b7dac5845a22cc8e4
[ "MIT" ]
null
null
null
setup.py
eaybek/getthat
3ca34902f773ec6a40a1df0b7dac5845a22cc8e4
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() long_description += "```python3" with open("sample/sample.py", "r") as fh: long_description += fh.read() long_description += "```" setuptools.setup( name="getthat", version="0.0.2", author="Erdem Aybek", author_...
27.147059
55
0.611051
08a8fada0fc755a8c5323bfd881a3b4f89e3ed30
1,100
py
Python
docker-manager-flask/app/libs/opreation_excel.py
sssbase/-
e4e7105cf0405d493c2ad316c27e2f72ca2c98be
[ "MIT" ]
82
2019-11-11T09:36:12.000Z
2022-03-23T09:08:31.000Z
docker-manager-flask/app/libs/opreation_excel.py
sssbase/-
e4e7105cf0405d493c2ad316c27e2f72ca2c98be
[ "MIT" ]
28
2019-10-10T14:02:48.000Z
2022-03-25T19:01:07.000Z
docker-manager-flask/app/libs/opreation_excel.py
sssbase/-
e4e7105cf0405d493c2ad316c27e2f72ca2c98be
[ "MIT" ]
22
2019-11-15T01:29:03.000Z
2021-12-10T13:33:00.000Z
""" @Time : 2018/8/29 19:08 @Author : 郭家兴 @Email : 302802003@qq.com @File : opreation_excel.py @Desc :操作excel """ import xlrd from xlutils.copy import copy class OperationExcel: def __init__(self,file_name): self.workbook = self.get_workbook(file_name) def get_workbook(self,file_name): ...
26.829268
60
0.659091
d7df8f848929e249f972b059a8e9436eccd08ca1
17,241
py
Python
functest/utils/openstack_clean.py
hashnfv/hashnfv-functest
ff34df7ec7be6cd5fcf0f7557b393bd5d6266047
[ "Apache-2.0" ]
null
null
null
functest/utils/openstack_clean.py
hashnfv/hashnfv-functest
ff34df7ec7be6cd5fcf0f7557b393bd5d6266047
[ "Apache-2.0" ]
null
null
null
functest/utils/openstack_clean.py
hashnfv/hashnfv-functest
ff34df7ec7be6cd5fcf0f7557b393bd5d6266047
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Description: # Cleans possible leftovers after running functest tests: # - Nova instances # - Glance images # - Cinder volumes # - Floating IPs # - Neutron networks, subnets and ports # - Routers # - Users and tenants # - Tacker VNFDs and VNFs ...
39.817552
79
0.579723
574942eb0b7b73017fa1738b1f0ae7cfa0c9943a
7,635
py
Python
Exerc01.py
Numbess/PO-2019-IFCE-Prof.Ronaldo-CT0101
4be0bbfedbd4369a6608c994d0a53b45f9b870e1
[ "Apache-2.0" ]
null
null
null
Exerc01.py
Numbess/PO-2019-IFCE-Prof.Ronaldo-CT0101
4be0bbfedbd4369a6608c994d0a53b45f9b870e1
[ "Apache-2.0" ]
null
null
null
Exerc01.py
Numbess/PO-2019-IFCE-Prof.Ronaldo-CT0101
4be0bbfedbd4369a6608c994d0a53b45f9b870e1
[ "Apache-2.0" ]
null
null
null
#ATIVIDADE PEDIDA: (Prof.Ronaldo)####################################################################### #CT0101 – Primeira contribuição da primeira etapa # #Implementa o algoritmo bubblesort e imprimir os seguintes gráficos: # ...
81.223404
173
0.26706
b99a529f2ec283eefce459ffb904f148642b5e3d
81
py
Python
shell/Outputs/header.py
vasco2016/shellsploit-framework
04eb4a0449acaba0b70c40a78c61a0d5e2527406
[ "MIT" ]
61
2017-06-13T13:48:38.000Z
2022-03-02T17:43:45.000Z
shell/Outputs/header.py
T0mcat3r/shellsploit-framework
04eb4a0449acaba0b70c40a78c61a0d5e2527406
[ "MIT" ]
null
null
null
shell/Outputs/header.py
T0mcat3r/shellsploit-framework
04eb4a0449acaba0b70c40a78c61a0d5e2527406
[ "MIT" ]
28
2017-08-15T05:38:27.000Z
2020-12-31T03:39:38.000Z
from time import strftime from .logger import logs from binascii import unhexlify
27
30
0.851852
594aa0437688437b03d9337b91563de102fd9a2a
10,091
py
Python
tests/unit/test_module_names.py
johnj/salt
b23656fa5ee24047c43ac702d6796a700570f749
[ "Apache-2.0" ]
null
null
null
tests/unit/test_module_names.py
johnj/salt
b23656fa5ee24047c43ac702d6796a700570f749
[ "Apache-2.0" ]
null
null
null
tests/unit/test_module_names.py
johnj/salt
b23656fa5ee24047c43ac702d6796a700570f749
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' tests.unit.test_test_module_name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' # Import Python libs from __future__ import absolute_import import fnmatch import os # Import Salt libs import salt.utils.path import salt.utils.stringutils # Import Salt Testing libs from tests.support.unit imp...
41.020325
109
0.591319
95810a8a6d79ab1e78dd1756556e382ad21b677a
1,502
py
Python
main.py
mavroudisv/Mahalanobis-Classifier
9029b2d84215afd02d8ccdbe3be7ea875b83deb6
[ "MIT" ]
1
2021-01-12T19:12:06.000Z
2021-01-12T19:12:06.000Z
main.py
mavroudisv/Mahalanobis-Classifier
9029b2d84215afd02d8ccdbe3be7ea875b83deb6
[ "MIT" ]
null
null
null
main.py
mavroudisv/Mahalanobis-Classifier
9029b2d84215afd02d8ccdbe3be7ea875b83deb6
[ "MIT" ]
null
null
null
''' Multiclass classifier based on Mahalanobis distance (https://en.wikipedia.org/wiki/Mahalanobis_distance) Vasilios Mavroudis, 2019 Generalized version of the binary classifier shown here: https://www.machinelearningplus.com/statistics/mahalanobis-distance/ ''' from sklearn.model_selection import train_test_split i...
36.634146
125
0.783622
c8249209a6e2e7486b12dd2df96acb9220199e8d
436
py
Python
HLTrigger/Configuration/python/HLT_75e33/modules/hlt3PFPuppiCentralJet45MaxEta2p4_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:24:46.000Z
2021-11-30T16:24:46.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hlt3PFPuppiCentralJet45MaxEta2p4_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
4
2021-11-29T13:57:56.000Z
2022-03-29T06:28:36.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hlt3PFPuppiCentralJet45MaxEta2p4_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:16:05.000Z
2021-11-30T16:16:05.000Z
import FWCore.ParameterSet.Config as cms hlt3PFPuppiCentralJet45MaxEta2p4 = cms.EDFilter("HLT1PFJet", MaxEta = cms.double(2.4), MaxMass = cms.double(-1.0), MinE = cms.double(-1.0), MinEta = cms.double(-2.4), MinMass = cms.double(-1.0), MinN = cms.int32(3), MinPt = cms.double(45.0), inpu...
29.066667
60
0.658257
b3788fe070f5e4376ef9a185eb0a476706765258
8,203
py
Python
DQM/SiPixelCommon/test/client_template_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
DQM/SiPixelCommon/test/client_template_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
DQM/SiPixelCommon/test/client_template_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester process = cms.Process("SIPIXELDQM") # load all appropriate modules: # get alignment conditions needed for geometry: process.load("Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff") process.load("Geometry...
50.325153
203
0.739851
f4b17047a8676107c9df6468353b956832a909c9
6,948
py
Python
davisputnam/tests/test_parse.py
Bram-Hub/DP-Visuals
43d9c7f17bbe7b54b8528ebcbcce421727103e7c
[ "MIT" ]
null
null
null
davisputnam/tests/test_parse.py
Bram-Hub/DP-Visuals
43d9c7f17bbe7b54b8528ebcbcce421727103e7c
[ "MIT" ]
6
2016-03-18T03:10:46.000Z
2016-05-03T15:05:02.000Z
davisputnam/tests/test_parse.py
Bram-Hub/DP-Visuals
43d9c7f17bbe7b54b8528ebcbcce421727103e7c
[ "MIT" ]
1
2019-01-15T01:17:49.000Z
2019-01-15T01:17:49.000Z
import unittest from parse import parse class TestParsing(unittest.TestCase): def test_no_match(self): vals = [] vals.append(parse("a")) vals.append(parse("AB")) vals.append(parse("A B")) for val in vals: self.assertIsNone(val, msg="Invalid pattern Parsed!") ...
38.6
68
0.600173
0b51ded3ef690eedeeb6c79073b94daaf1b13ff7
3,582
py
Python
tests/test_schema.py
dmsolow/fastavro
9912b310107964948a110a8f2f0779d55a1c8528
[ "MIT" ]
null
null
null
tests/test_schema.py
dmsolow/fastavro
9912b310107964948a110a8f2f0779d55a1c8528
[ "MIT" ]
null
null
null
tests/test_schema.py
dmsolow/fastavro
9912b310107964948a110a8f2f0779d55a1c8528
[ "MIT" ]
null
null
null
import pytest import fastavro from fastavro.schema import SchemaParseException, UnknownType, parse_schema pytestmark = pytest.mark.usefixtures("clean_schemas") def test_named_types_have_names(): record_schema = { "type": "record", "fields": [{ "name": "field", "type": "str...
23.565789
75
0.545226
4bc44380df8d46602145d9e259f4593f268bb387
2,305
py
Python
evasdk/__init__.py
mkeegan/eva_python_sdk
8dbf4bce5931fe1333586d656554837b9367b0e4
[ "Apache-2.0" ]
null
null
null
evasdk/__init__.py
mkeegan/eva_python_sdk
8dbf4bce5931fe1333586d656554837b9367b0e4
[ "Apache-2.0" ]
null
null
null
evasdk/__init__.py
mkeegan/eva_python_sdk
8dbf4bce5931fe1333586d656554837b9367b0e4
[ "Apache-2.0" ]
null
null
null
"""Eva Python SDK This module provides convenient access to the Automata Eva API from applications written in Python 3. ## Examples The Eva object allows you to directly control an Eva robot. It provides lots of useful helper function for interacting with the robot. ### Eva **Connecting** ```python host = '<your_...
29.177215
134
0.66551
159fc1c5e7c939a6489df7e5fa549f0d4c070da4
1,871
py
Python
pybpodgui_api/models/task/task_file.py
pybpod/pybpod-gui-api
a69ff79a4d9e4b6b99b618a0b373d7dc2927e156
[ "MIT" ]
null
null
null
pybpodgui_api/models/task/task_file.py
pybpod/pybpod-gui-api
a69ff79a4d9e4b6b99b618a0b373d7dc2927e156
[ "MIT" ]
null
null
null
pybpodgui_api/models/task/task_file.py
pybpod/pybpod-gui-api
a69ff79a4d9e4b6b99b618a0b373d7dc2927e156
[ "MIT" ]
null
null
null
# !/usr/bin/python3 # -*- coding: utf-8 -*- import logging import re from pybpodgui_api.models.task.task_io import TaskIO logger = logging.getLogger(__name__) class TaskFile(TaskIO): """ Represents a state machine """ def find_task_variables_from_file(self): task_variables = [] # match an...
31.711864
101
0.606627
7513da19f828f5dc97fbbb6052359fdc196ead75
20,859
py
Python
luigi/parameter.py
vgmartinez/luigi
b5ad3eba1501bdc25e91e98901bc781128f2d8a7
[ "Apache-2.0" ]
null
null
null
luigi/parameter.py
vgmartinez/luigi
b5ad3eba1501bdc25e91e98901bc781128f2d8a7
[ "Apache-2.0" ]
null
null
null
luigi/parameter.py
vgmartinez/luigi
b5ad3eba1501bdc25e91e98901bc781128f2d8a7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
37.181818
150
0.611007
86fe162658334557824ac072e70d8f8ea71256c6
8,361
py
Python
knlp/seq_labeling/hmm/train.py
Kevin1906721262/knlp
d8a829151a4ac71f6106046c9f2586d8fdd86908
[ "MIT" ]
5
2022-01-23T15:41:41.000Z
2022-03-19T06:25:17.000Z
knlp/seq_labeling/hmm/train.py
Rooki1e/knlp
b19d8e0d0661b697ff4a73201c30b5a6e8969b6e
[ "MIT" ]
4
2022-03-08T16:28:18.000Z
2022-03-28T15:11:11.000Z
knlp/seq_labeling/hmm/train.py
Rooki1e/knlp
b19d8e0d0661b697ff4a73201c30b5a6e8969b6e
[ "MIT" ]
4
2022-02-12T13:42:07.000Z
2022-03-18T02:11:36.000Z
# !/usr/bin/python # -*- coding:UTF-8 -*- # -----------------------------------------------------------------------# # File Name: train # Author: Junyi Li # Mail: 4ljy@163.com # Created Time: 2021-03-18 # Description: # -----------------------------------------------------------------------# """ 针对hmm的训练和推理,要清晰的分为不同的步骤...
33.310757
165
0.646334
f24292e13987fb1726538b85e57e1f0dd2d08427
7,390
py
Python
cryptoapis/model/list_transactions_by_block_hash_response_item_recipients.py
xan187/Crypto_APIs_2.0_SDK_Python
a56c75df54ef037b39be1315ed6e54de35bed55b
[ "MIT" ]
null
null
null
cryptoapis/model/list_transactions_by_block_hash_response_item_recipients.py
xan187/Crypto_APIs_2.0_SDK_Python
a56c75df54ef037b39be1315ed6e54de35bed55b
[ "MIT" ]
null
null
null
cryptoapis/model/list_transactions_by_block_hash_response_item_recipients.py
xan187/Crypto_APIs_2.0_SDK_Python
a56c75df54ef037b39be1315ed6e54de35bed55b
[ "MIT" ]
1
2021-07-21T03:35:18.000Z
2021-07-21T03:35:18.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
42.228571
484
0.606225
d550d39918ef3fd7e6c148e7fb58533cbdde8253
72
py
Python
custom_components/panasonic_smart_app/smartApp/utils.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
27
2021-03-04T16:54:27.000Z
2022-03-13T05:22:25.000Z
custom_components/panasonic_smart_app/smartApp/utils.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
44
2021-03-09T03:29:37.000Z
2022-03-29T06:40:22.000Z
custom_components/panasonic_smart_app/smartApp/utils.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
13
2021-03-04T15:03:34.000Z
2022-03-06T11:03:00.000Z
def chunks(L, n): return [L[x : x + n] for x in range(0, len(L), n)]
36
54
0.527778
615618035647358b959ae66fe4f07206164d3b55
3,523
py
Python
lab4/training/run_experiment.py
Agyey/fsdl-text-recognizer-2021-labs
4bd85042ab9f6decd78849bb655c197cc13ffc11
[ "MIT" ]
1
2021-02-12T06:10:10.000Z
2021-02-12T06:10:10.000Z
lab4/training/run_experiment.py
Agyey/fsdl-text-recognizer-2021-labs
4bd85042ab9f6decd78849bb655c197cc13ffc11
[ "MIT" ]
null
null
null
lab4/training/run_experiment.py
Agyey/fsdl-text-recognizer-2021-labs
4bd85042ab9f6decd78849bb655c197cc13ffc11
[ "MIT" ]
null
null
null
"""Experiment-running framework.""" import argparse import importlib import numpy as np import torch import pytorch_lightning as pl from text_recognizer import lit_models # In order to ensure reproducible experiments, we must set random seeds. np.random.seed(42) torch.manual_seed(42) def _import_class(module_and_...
35.585859
120
0.724666
3dcc1c7599683b34b1d3ec9cba9617db5327506f
753
py
Python
2-1/process/04process_pool.py
qumogu/pystudy
66bd8848ed625265961808a525e6c33c3cc8d8be
[ "Apache-2.0" ]
null
null
null
2-1/process/04process_pool.py
qumogu/pystudy
66bd8848ed625265961808a525e6c33c3cc8d8be
[ "Apache-2.0" ]
null
null
null
2-1/process/04process_pool.py
qumogu/pystudy
66bd8848ed625265961808a525e6c33c3cc8d8be
[ "Apache-2.0" ]
null
null
null
#from multiprocessing import Pool import multiprocessing import time import os def po_fun(q,num): pid = os.getpid() num += 1 for i in range(1,4): print("当下是第%d个任务,进程%d正在执行%d次." % (num,pid,i)) time.sleep(1) q.put((num,pid)) print("----第%d个任务,执行完成----" % num) #2.创建消息队列 #q = multiproc...
17.928571
53
0.573705
93dc21727e90dcd310c1d8e23d8868e55b3e9714
845
py
Python
queue_data_structure.py
zhouyuexie/algorithms
aa2279b8cd0fc6ddecf8c9d477149d6191eaebfb
[ "MIT" ]
null
null
null
queue_data_structure.py
zhouyuexie/algorithms
aa2279b8cd0fc6ddecf8c9d477149d6191eaebfb
[ "MIT" ]
null
null
null
queue_data_structure.py
zhouyuexie/algorithms
aa2279b8cd0fc6ddecf8c9d477149d6191eaebfb
[ "MIT" ]
null
null
null
#-*-coding:utf-8-*- """队列:队列是一种先进先出的数据结构,比如排队,先来的先被服务。""" class Queue(): def __init__(self):# 初始化队列数据 self._queue=[]# 使用数组存储数据 def push(self,*value):# 增加数据 for n in value: self._queue.append(n) def out(self):# 推出元素 if(len(self._queue)==0): print("No data can use.") return False els...
19.651163
39
0.629586
34165d388ff13e17105be61cb7edd09cf6b36e78
4,099
py
Python
circus/tests/test_client.py
thedrow/circus
4e284eb60eaa365b05546e94c092d6063c00f446
[ "Apache-2.0" ]
null
null
null
circus/tests/test_client.py
thedrow/circus
4e284eb60eaa365b05546e94c092d6063c00f446
[ "Apache-2.0" ]
null
null
null
circus/tests/test_client.py
thedrow/circus
4e284eb60eaa365b05546e94c092d6063c00f446
[ "Apache-2.0" ]
null
null
null
import time from tornado.testing import gen_test from tornado.gen import coroutine, Return from circus.tests.support import TestCircus, EasyTestSuite from circus.client import make_message, CallError from circus.stream import QueueStream class TestClient(TestCircus): @coroutine def status(self, cmd, **prop...
36.598214
78
0.600634
dbc7397a3d0981dd2f1786945e3cf0f4a695a0f3
478
py
Python
read_sophie.py
Dartspacephysiker/NOAA_Asymm
afe62e1764dddd7204d144a689adb797bef40c8b
[ "MIT" ]
null
null
null
read_sophie.py
Dartspacephysiker/NOAA_Asymm
afe62e1764dddd7204d144a689adb797bef40c8b
[ "MIT" ]
null
null
null
read_sophie.py
Dartspacephysiker/NOAA_Asymm
afe62e1764dddd7204d144a689adb797bef40c8b
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Mar 22 13:39:28 2020 @author: jone """ #Read sophie import pandas as pd s=pd.read_csv('./data_jone/sophie75.txt',delimiter=' ', header=10) s.loc[:,'datetime'] = pd.to_datetime(s.DATE, format='%Y/%m/%d-%H:%M:%S') s.index = s.datetime s.loc[:,'ssphase']...
25.157895
72
0.606695
26eee9ce1962fe8b817b07c58aed68f7199ca361
60,828
py
Python
vw_connection.py
Madex7/volkswagencarnet
b300dd7de4841d1f5c8c376f96e22345933826f0
[ "Apache-2.0" ]
null
null
null
vw_connection.py
Madex7/volkswagencarnet
b300dd7de4841d1f5c8c376f96e22345933826f0
[ "Apache-2.0" ]
null
null
null
vw_connection.py
Madex7/volkswagencarnet
b300dd7de4841d1f5c8c376f96e22345933826f0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Communicate with We Connect services.""" import base64 import os """Modified to utilize API calls derived from Android Apps instead of Web API""" import re import time import logging import asyncio import hashlib import jwt from sys import version_info, argv from date...
47.336965
174
0.563047
72e542fa40470107db4b9fc30dd4704d62871fb3
532
py
Python
tests/extract_errors_test.py
Guy-Markman/Wikipedia-API
240128d72d92501a3019182fa4380bcaae373453
[ "MIT" ]
323
2017-12-11T19:38:46.000Z
2022-03-28T19:25:44.000Z
tests/extract_errors_test.py
Guy-Markman/Wikipedia-API
240128d72d92501a3019182fa4380bcaae373453
[ "MIT" ]
46
2017-12-16T01:22:47.000Z
2022-01-25T09:57:04.000Z
tests/extract_errors_test.py
Guy-Markman/Wikipedia-API
240128d72d92501a3019182fa4380bcaae373453
[ "MIT" ]
61
2018-01-11T03:36:25.000Z
2022-03-28T05:55:49.000Z
# -*- coding: utf-8 -*- import unittest from tests.mock_data import wikipedia_api_request import wikipediaapi class TestErrorsExtracts(unittest.TestCase): def setUp(self): self.wiki = wikipediaapi.Wikipedia("en") self.wiki._query = wikipedia_api_request def test_title_before_fetching(self): ...
26.6
51
0.695489