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
4f3acba8758e2f7d838cec407a87762f476e5617
2,846
py
Python
analysis/merge_eval_files.py
xiaoeric/bmusegan
3b54448bb488d7426c1fc4c0f9a65d373dc8c05f
[ "MIT" ]
52
2018-04-19T04:59:22.000Z
2022-02-21T10:06:54.000Z
analysis/merge_eval_files.py
xiaoeric/bmusegan
3b54448bb488d7426c1fc4c0f9a65d373dc8c05f
[ "MIT" ]
9
2018-10-30T07:35:15.000Z
2021-08-06T08:33:03.000Z
analysis/merge_eval_files.py
xiaoeric/bmusegan
3b54448bb488d7426c1fc4c0f9a65d373dc8c05f
[ "MIT" ]
14
2018-04-26T06:06:37.000Z
2021-08-05T08:19:37.000Z
"""This file provides functions for merging evaluation files in a directory """ import os import joblib import numpy as np EXP_NAMES = [ 'lastfm_alternative_train_g_proposed_d_proposed_r_proposed_round', 'lastfm_alternative_train_g_proposed_d_proposed_r_proposed_bernoulli', 'lastfm_alternative_t...
35.135802
81
0.682713
44e191cc4e9b39673336a211ab40278be721f11f
252
py
Python
setup.py
Newsha612/pip-package
cdf7b34918547e0da620611a30bdd8998ff695b9
[ "MIT" ]
null
null
null
setup.py
Newsha612/pip-package
cdf7b34918547e0da620611a30bdd8998ff695b9
[ "MIT" ]
null
null
null
setup.py
Newsha612/pip-package
cdf7b34918547e0da620611a30bdd8998ff695b9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed May 8 13:04:20 2019 @author: newsh """ from setuptools import setup setup(name='gym_Path', version='0.0.1', install_requires=['gym>=0.2.3', 'hfo_py>=0.2'] )
18
39
0.511905
29e0c69bf58dc8c15ac5e70b71afe031a7311b2f
1,136
py
Python
mathematics_dataset/generate_settings.py
PhysicsTeacher13/Mathematics_Dataset
7f13bf661e6f36d61542bf0360b27f31eb9efe20
[ "Apache-2.0" ]
1,577
2019-04-03T10:05:30.000Z
2022-03-29T17:56:14.000Z
mathematics_dataset/generate_settings.py
PhysicsTeacher13/Mathematics_Dataset
7f13bf661e6f36d61542bf0360b27f31eb9efe20
[ "Apache-2.0" ]
15
2019-04-03T18:55:03.000Z
2022-01-12T16:04:12.000Z
mathematics_dataset/generate_settings.py
LaudateCorpus1/mathematics_dataset
e91dba649b843597c14b9d84dfe92bff79b7d299
[ "Apache-2.0" ]
226
2019-04-03T13:28:36.000Z
2022-03-27T18:41:01.000Z
# Copyright 2018 DeepMind Technologies Limited. # # 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 ag...
34.424242
80
0.772007
74022a34beb2e38928d649e9f748eac77abf725e
220
py
Python
serwer/app/__init__.py
DawidPiechota/Mapa-literacka-dla-korpus-w
c2460c77bb2165d32bb9c2ad917bc0f69c0bd0e0
[ "MIT" ]
null
null
null
serwer/app/__init__.py
DawidPiechota/Mapa-literacka-dla-korpus-w
c2460c77bb2165d32bb9c2ad917bc0f69c0bd0e0
[ "MIT" ]
2
2021-01-31T11:25:31.000Z
2021-02-01T17:38:02.000Z
serwer/app/__init__.py
DawidPiechota/Mapa-literacka-dla-korpus-w
c2460c77bb2165d32bb9c2ad917bc0f69c0bd0e0
[ "MIT" ]
1
2021-03-22T20:20:56.000Z
2021-03-22T20:20:56.000Z
from app.controllers import init_routes from flask_cors import CORS from app.services.app import app as flask_app from app.services.db import init_db def init_app(): CORS(flask_app) init_db() init_routes()
20
45
0.768182
1ba71007f9ed003b7c98d8c32698b4f37ee58e79
462
py
Python
test_etl.py
kokare-darshan/incubyte
a3a419ac75b2fb116ece2b50f6947c1935131061
[ "MIT" ]
null
null
null
test_etl.py
kokare-darshan/incubyte
a3a419ac75b2fb116ece2b50f6947c1935131061
[ "MIT" ]
null
null
null
test_etl.py
kokare-darshan/incubyte
a3a419ac75b2fb116ece2b50f6947c1935131061
[ "MIT" ]
null
null
null
import unittest from etl import extract, MongoComm, mongo_srv_link class TestETL(unittest.TestCase): def test_extract(self): self.assertIsNone(extract()) def test_mongo(self): mongo = MongoComm(mongo_srv_link) data = {"First Name": "Darshan", "Last Name": "Kokare", "Email":"kokare.dar...
33
100
0.681818
11374fe75f0f6f379ab0386b42f764594f5d75db
1,349
py
Python
2020/20200407/practice02.py
cbchoi/SIT32004
699598fc321845e46e5cce81c6c2a60999698e6e
[ "MIT" ]
1
2019-03-04T05:35:37.000Z
2019-03-04T05:35:37.000Z
2020/20200407/practice02.py
cbchoi/SIT32004
699598fc321845e46e5cce81c6c2a60999698e6e
[ "MIT" ]
null
null
null
2020/20200407/practice02.py
cbchoi/SIT32004
699598fc321845e46e5cce81c6c2a60999698e6e
[ "MIT" ]
6
2019-03-10T23:39:10.000Z
2020-03-20T11:37:12.000Z
import sqlite3 # Connect to SQLite DB con = sqlite3.connect("retak2e.db") with con: # Create Cursor from connection object cur = con.cursor() # Put SQL Query #cur.execute("CREATE TABLE customer(id integer primary key autoincrement, name text not null, category integer, region text);") #cur...
32.902439
131
0.633062
2eec65635582e626f940cea23f62bcf5bc85d60a
8,889
py
Python
scheduler/scheduler.py
weakiwi/haipproxy
15293d1d2ccd7020fff5935719a56baf00cfeb82
[ "MIT" ]
1
2018-03-20T09:14:33.000Z
2018-03-20T09:14:33.000Z
scheduler/scheduler.py
weakiwi/haipproxy
15293d1d2ccd7020fff5935719a56baf00cfeb82
[ "MIT" ]
null
null
null
scheduler/scheduler.py
weakiwi/haipproxy
15293d1d2ccd7020fff5935719a56baf00cfeb82
[ "MIT" ]
1
2018-09-08T08:06:54.000Z
2018-09-08T08:06:54.000Z
""" This module schedules all the tasks according to config.rules. """ import time from multiprocessing import Pool import click import schedule from twisted.internet import reactor from scrapy.crawler import CrawlerRunner from scrapy.utils.log import configure_logging from scrapy.utils.project import get_project_sett...
36.580247
118
0.646304
69c186171d0286a275656ad7492a32a289e83e47
794
py
Python
setup.py
RockefellerArchiveCenter/ElectronBonder
eeb7d6fd8146687059c53cc1e6cc243368105d18
[ "MIT" ]
null
null
null
setup.py
RockefellerArchiveCenter/ElectronBonder
eeb7d6fd8146687059c53cc1e6cc243368105d18
[ "MIT" ]
7
2020-04-28T22:06:59.000Z
2021-11-18T16:00:33.000Z
setup.py
RockefellerArchiveCenter/ElectronBonder
eeb7d6fd8146687059c53cc1e6cc243368105d18
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="ElectronBonder", url="https://github.com/RockefellerArchiveCenter/ElectronBonder", description="Project Electron Client Library", long_description=long_description, long_des...
27.37931
69
0.657431
427e66192e9b157b95eed1956777cc1640b641ea
3,664
py
Python
src/mailman_rss/scraper.py
bluesabre/mailman-rss
5f80d8ad6fc66fff64c38ba3e9e394c28f22f8a8
[ "MIT" ]
2
2019-05-02T21:35:35.000Z
2020-07-28T05:34:11.000Z
src/mailman_rss/scraper.py
bluesabre/mailman-rss
5f80d8ad6fc66fff64c38ba3e9e394c28f22f8a8
[ "MIT" ]
null
null
null
src/mailman_rss/scraper.py
bluesabre/mailman-rss
5f80d8ad6fc66fff64c38ba3e9e394c28f22f8a8
[ "MIT" ]
4
2018-03-28T17:41:00.000Z
2020-07-04T09:33:04.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from mailman_rss.mailman import MailmanArchive from collections import namedtuple from contextlib import closing from logging import getLogger import os from datetime import datetime import time logger = getLogger(__file__) try: impor...
34.566038
78
0.525109
6f4385c6ae7fbe5e965768077ee555789b3bd0ad
3,246
py
Python
pandajedi/jeditest/addTestTask.py
PanDAWMS/panda-jedi
e4c90563b3b9e9521cb73ccdedaa8ecaa38af5ed
[ "Apache-2.0" ]
2
2020-04-17T10:24:09.000Z
2020-05-12T17:59:06.000Z
pandajedi/jeditest/addTestTask.py
PanDAWMS/panda-jedi
e4c90563b3b9e9521cb73ccdedaa8ecaa38af5ed
[ "Apache-2.0" ]
20
2015-08-25T13:40:14.000Z
2022-03-29T12:50:46.000Z
pandajedi/jeditest/addTestTask.py
PanDAWMS/panda-jedi
e4c90563b3b9e9521cb73ccdedaa8ecaa38af5ed
[ "Apache-2.0" ]
10
2015-05-27T14:01:42.000Z
2021-09-20T17:38:02.000Z
import sys import uuid from pandajedi.jedicore.JediTaskBufferInterface import JediTaskBufferInterface from pandajedi.jedicore.JediTaskSpec import JediTaskSpec from pandajedi.jedicore.JediDatasetSpec import JediDatasetSpec tbIF = JediTaskBufferInterface() tbIF.setupInterface() task = JediTaskSpec() task.jediTaskID =...
29.243243
303
0.677141
56e532ce3c140b1895613b837ae29fabf38b40c4
2,169
py
Python
students/K33402/Barabanov Denis/lr2/lr2/settings.py
dEbAR38/ITMO_ICT_WebDevelopment_2020-2021
208cbc6d2b6d40c3043d35ce773a3433b377f671
[ "MIT" ]
null
null
null
students/K33402/Barabanov Denis/lr2/lr2/settings.py
dEbAR38/ITMO_ICT_WebDevelopment_2020-2021
208cbc6d2b6d40c3043d35ce773a3433b377f671
[ "MIT" ]
null
null
null
students/K33402/Barabanov Denis/lr2/lr2/settings.py
dEbAR38/ITMO_ICT_WebDevelopment_2020-2021
208cbc6d2b6d40c3043d35ce773a3433b377f671
[ "MIT" ]
null
null
null
from pathlib import Path import os BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'p=00&+=$@30lq%1qt@34&m%@k3vz(js_x8z)m&((qjk^&#(xpy' DEBUG = True ALLOWED_HOSTS = [] STATIC_URL = '/static/' AUTH_USER_MODEL = 'homework.CustomUser' # Application definition INSTALLED_APPS = [ 'django.contrib.admin'...
25.821429
91
0.667589
a8f8cf2cd104abac5f1efc801eb892adeec0b298
3,753
py
Python
source/python-vsmclient/vsmclient/v1/devices.py
ramkrsna/virtual-storage-manager
78125bfb4dd4d78ff96bc3274c8919003769c545
[ "Apache-2.0" ]
172
2015-01-07T08:40:17.000Z
2019-02-18T07:01:11.000Z
source/python-vsmclient/vsmclient/v1/devices.py
ramkrsna/virtual-storage-manager
78125bfb4dd4d78ff96bc3274c8919003769c545
[ "Apache-2.0" ]
83
2015-03-06T07:47:03.000Z
2018-07-05T15:10:19.000Z
source/python-vsmclient/vsmclient/v1/devices.py
ramkrsna/virtual-storage-manager
78125bfb4dd4d78ff96bc3274c8919003769c545
[ "Apache-2.0" ]
125
2015-01-05T12:22:15.000Z
2019-02-18T07:01:39.000Z
# Copyright 2014 Intel 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 require...
30.024
91
0.565414
97fbb59fce64a0232259b2c03d8c8118ce376ef1
264
py
Python
backend/base/serializers.py
slk007/Ecommerce-django
f588a8d9b69fd7e16624b9c4fc9d2713ae47ac03
[ "MIT" ]
null
null
null
backend/base/serializers.py
slk007/Ecommerce-django
f588a8d9b69fd7e16624b9c4fc9d2713ae47ac03
[ "MIT" ]
null
null
null
backend/base/serializers.py
slk007/Ecommerce-django
f588a8d9b69fd7e16624b9c4fc9d2713ae47ac03
[ "MIT" ]
null
null
null
from dataclasses import field from rest_framework import serializers from django.contrib.auth.models import User from .models import Product class ProductSerializer(serializers.ModelSerializer): class Meta: model = Product fields = "__all__"
24
53
0.768939
6643e910916db9c0d89244834e5b9207bbc84e1a
3,783
bzl
Python
repositories.bzl
rdesgroppes/rules_jvm
efa25bf3082e2cac752081b2869d5149dfb7133a
[ "Apache-2.0" ]
8
2021-12-13T10:22:03.000Z
2022-03-31T22:40:48.000Z
repositories.bzl
rdesgroppes/rules_jvm
efa25bf3082e2cac752081b2869d5149dfb7133a
[ "Apache-2.0" ]
8
2021-12-17T12:41:54.000Z
2022-03-28T13:41:12.000Z
repositories.bzl
rdesgroppes/rules_jvm
efa25bf3082e2cac752081b2869d5149dfb7133a
[ "Apache-2.0" ]
5
2021-12-13T09:50:32.000Z
2022-03-25T21:49:33.000Z
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//java/private:zip_repository.bzl", "zip_repository") def contrib_rules_jvm_deps(): maybe( http_archive, name = "apple_rules_lint", sha256 = "8feab4b08a9...
36.028571
111
0.659529
3522799f6f03fc4836f689264c061a70c588957a
1,054
py
Python
setup.py
delpass/aiokurento
eddbd908c24ea049db4a9f04a0e2c96c74ccd288
[ "MIT" ]
2
2016-08-20T15:07:07.000Z
2017-03-28T08:33:13.000Z
setup.py
delpass/aiokurento
eddbd908c24ea049db4a9f04a0e2c96c74ccd288
[ "MIT" ]
null
null
null
setup.py
delpass/aiokurento
eddbd908c24ea049db4a9f04a0e2c96c74ccd288
[ "MIT" ]
null
null
null
# import os from setuptools import setup setup( name="aiokurento", version="0.1.0", author="Yaroslav Sazonov", author_email="delpass@gmail.com", description="KMS driver for AsyncIO", license="MIT", keywords="kms kurento aio asyncio ", url="http://packages.python.org/aiokurento", pac...
32.9375
56
0.602467
a4778d8810c06a8426c694c102a3527a5dbe5e68
2,991
py
Python
multinet/processing/__init__.py
multinet-app/multinet-girder
f34c87849d92c7fe2f8589760f97bebbe04bd4af
[ "Apache-2.0" ]
3
2019-10-22T15:21:10.000Z
2020-02-13T17:40:07.000Z
multinet/processing/__init__.py
multinet-app/multinet
f34c87849d92c7fe2f8589760f97bebbe04bd4af
[ "Apache-2.0" ]
183
2019-08-01T14:27:00.000Z
2020-03-04T17:47:49.000Z
multinet/processing/__init__.py
multinet-app/multinet-girder
f34c87849d92c7fe2f8589760f97bebbe04bd4af
[ "Apache-2.0" ]
2
2020-08-20T11:57:17.000Z
2020-11-10T22:54:19.000Z
"""Functions for processing multinet data.""" from multinet.validation import ValidationFailure, TypeConversionFailure, MissingColumn from multinet.processing.processors import ( process_number_entry, process_boolean_entry, process_date_entry, ) from multinet.types import ColumnMetadata from multinet.proces...
33.606742
87
0.676697
493604932f7991ff7e87c512ff183fd0e1d339ab
609
py
Python
setup.py
atmelaku/TextAdvnetureGameApp
c917863f5c4d6c5147eeb74aa594a915bd939d19
[ "MIT" ]
null
null
null
setup.py
atmelaku/TextAdvnetureGameApp
c917863f5c4d6c5147eeb74aa594a915bd939d19
[ "MIT" ]
1
2020-03-29T20:49:37.000Z
2020-03-29T20:49:37.000Z
setup.py
atmelaku/TextAdvnetureGameApp
c917863f5c4d6c5147eeb74aa594a915bd939d19
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="TextAdventureGameApp" version="0.0.1", author="Alebachew Melaku", author_email="alebachewtegegne2017@yahoo.com", url="https://github.com/yourusername/yourproject", description="simple m...
27.681818
76
0.70936
0ebda6ee99e131aedf6612d9f59cff63242d7eef
17,354
py
Python
mercurial/hgweb/hgweb_mod.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
mercurial/hgweb/hgweb_mod.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
mercurial/hgweb/hgweb_mod.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# hgweb/hgweb_mod.py - Web interface for a repository. # # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import c...
35.781443
80
0.560044
bc0d5847af177216bd7b5995a5c71323ba83a4d6
158
py
Python
yatube/context_processor.py
Venatorr/yatube
87dbb67fc9157994bde2765cc5d42fcf55cea308
[ "BSD-3-Clause" ]
null
null
null
yatube/context_processor.py
Venatorr/yatube
87dbb67fc9157994bde2765cc5d42fcf55cea308
[ "BSD-3-Clause" ]
10
2021-03-19T12:08:00.000Z
2022-03-12T00:48:42.000Z
yatube/context_processor.py
Venatorr/django_blog
87dbb67fc9157994bde2765cc5d42fcf55cea308
[ "BSD-3-Clause" ]
null
null
null
import datetime as dt def year(request): """ Добавляет переменную с текущим годом. """ return { "year": dt.datetime.now().year }
15.8
41
0.575949
c130a51666e905ab0901eb68b649d4c75412567f
742
py
Python
bgmapi/spiders/user.py
wattlebird/Bangumi_Spider
f221614714e9f257c1d667fa5a7f1fcb43587371
[ "BSD-2-Clause" ]
19
2015-01-28T08:09:34.000Z
2021-12-18T05:40:52.000Z
bgmapi/spiders/user.py
wattlebird/Bangumi_Spider
f221614714e9f257c1d667fa5a7f1fcb43587371
[ "BSD-2-Clause" ]
null
null
null
bgmapi/spiders/user.py
wattlebird/Bangumi_Spider
f221614714e9f257c1d667fa5a7f1fcb43587371
[ "BSD-2-Clause" ]
7
2015-06-16T06:32:11.000Z
2021-11-02T11:40:03.000Z
# -*- coding: utf-8 -*- import scrapy import json from bgmapi.items import User class UserSpider(scrapy.Spider): name = 'user-api' allowed_domains = ['http://mirror.api.bgm.rin.cat/user'] def __init__(self, id_min=1, id_max=300000, *args, **kwargs): super(UserSpider, self).__init__(*args, **kwarg...
30.916667
118
0.59434
6eb794984ff17f26b4139ff1812077d9f4ff865e
3,153
py
Python
caldavclientlibrary/admin/xmlaccounts/commands/changepassword.py
skarra/CalDAVClientLibrary
b925efdeee7aba581586a15544af12f399c59c9d
[ "Apache-2.0" ]
1
2015-05-26T04:15:19.000Z
2015-05-26T04:15:19.000Z
caldavclientlibrary/admin/xmlaccounts/commands/changepassword.py
skarra/CalDAVClientLibrary
b925efdeee7aba581586a15544af12f399c59c9d
[ "Apache-2.0" ]
null
null
null
caldavclientlibrary/admin/xmlaccounts/commands/changepassword.py
skarra/CalDAVClientLibrary
b925efdeee7aba581586a15544af12f399c59c9d
[ "Apache-2.0" ]
null
null
null
## # Copyright (c) 2007-2013 Apple 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 required by applicable l...
27.417391
96
0.575325
07e05b5fa761b037859a34127eaac4568589a38b
718
py
Python
fastats/linear_algebra/inv.py
AaronCritchley/fastats
3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe
[ "MIT" ]
26
2017-07-17T09:19:53.000Z
2021-11-30T01:36:56.000Z
fastats/linear_algebra/inv.py
AaronCritchley/fastats
3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe
[ "MIT" ]
320
2017-09-02T16:26:25.000Z
2021-07-28T05:19:49.000Z
fastats/linear_algebra/inv.py
AaronCritchley/fastats
3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe
[ "MIT" ]
13
2017-07-06T19:02:29.000Z
2020-01-22T11:36:34.000Z
import numpy as np from fastats.linear_algebra.det import det from fastats.linear_algebra.matrix_minor import matrix_minor def inv(A): """ Returns the inverse of A using the adjoint method. >>> import numpy as np >>> A = np.array([[4, 3], [3, 2]]) >>> A_inv = inv(A) >>> A_inv array([[-2...
21.117647
61
0.557103
3165e86995f2bbce800bcfcc29862de91d542b20
1,817
py
Python
pages/product_page.py
varulven/selenium_course
63d512ef7fa3a3e152cef8440eddfdc971740df8
[ "Apache-2.0" ]
null
null
null
pages/product_page.py
varulven/selenium_course
63d512ef7fa3a3e152cef8440eddfdc971740df8
[ "Apache-2.0" ]
1
2021-06-02T01:33:42.000Z
2021-06-02T01:33:42.000Z
pages/product_page.py
varulven/selenium_course
63d512ef7fa3a3e152cef8440eddfdc971740df8
[ "Apache-2.0" ]
null
null
null
from .base_page import BasePage from .locators import ProductPageLocators class ProductPage(BasePage): def add_to_cart(self): button = self.browser.find_element(*ProductPageLocators.ADD_TO_BASKET) button.click() def should_be_message_about_add_to_cart(self): assert self.is_element_pre...
51.914286
124
0.690149
7e34b3c91c16c440f12c51415c509400e1f315dc
2,272
py
Python
python/paddle/v2/framework/tests/test_lrn_op.py
shenchaohua/Paddle
9c5942db13308d53cc115708058c1e885f4b57a3
[ "Apache-2.0" ]
null
null
null
python/paddle/v2/framework/tests/test_lrn_op.py
shenchaohua/Paddle
9c5942db13308d53cc115708058c1e885f4b57a3
[ "Apache-2.0" ]
9
2017-09-13T07:39:31.000Z
2017-10-18T05:58:23.000Z
python/paddle/v2/framework/tests/test_lrn_op.py
shenchaohua/Paddle
9c5942db13308d53cc115708058c1e885f4b57a3
[ "Apache-2.0" ]
null
null
null
import unittest import numpy as np from op_test import OpTest class TestLRNOp(OpTest): def get_input(self): ''' TODO(gongweibao): why it's grad diff is so large? x = np.ndarray( shape=(self.N, self.C, self.H, self.W), dtype=float, order='C') for m in range(0, self.N): ...
28.759494
76
0.456866
2c1044d1ee314eee412c9ecaa921ef3a32780029
318
py
Python
examples/load.py
thombashi/appconfigpy
71aaa3110341ede8706a213cb1eb018a654ca8a6
[ "MIT" ]
3
2018-09-16T13:06:48.000Z
2021-02-17T08:51:17.000Z
examples/load.py
thombashi/appconfigpy
71aaa3110341ede8706a213cb1eb018a654ca8a6
[ "MIT" ]
null
null
null
examples/load.py
thombashi/appconfigpy
71aaa3110341ede8706a213cb1eb018a654ca8a6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import json from common import app_config_mgr print("loading configuration file path: {:s}".format(app_config_mgr.config_filepath)) print("configuration values: {}".format(json.dumps(app_config_mgr.load(), indent=4)))
22.714286
85
0.751572
180f123609217ad3ff0c12a789c0142a88780d95
16,874
py
Python
src/dynamic_graph/sot_talos_balance/test/appli_dcmCopControl.py
nim65s/sot-talos-balance
e24b9a3bd4377b0a0ea474dce44295282332661b
[ "BSD-2-Clause" ]
null
null
null
src/dynamic_graph/sot_talos_balance/test/appli_dcmCopControl.py
nim65s/sot-talos-balance
e24b9a3bd4377b0a0ea474dce44295282332661b
[ "BSD-2-Clause" ]
8
2020-03-12T11:03:07.000Z
2021-11-05T14:44:20.000Z
src/dynamic_graph/sot_talos_balance/test/appli_dcmCopControl.py
nim65s/sot-talos-balance
e24b9a3bd4377b0a0ea474dce44295282332661b
[ "BSD-2-Clause" ]
4
2019-05-07T13:12:29.000Z
2020-06-09T17:02:53.000Z
# flake8: noqa from math import sqrt import numpy as np from dynamic_graph import plug from dynamic_graph.sot.core import SOT, Derivator_of_Vector, FeaturePosture, MatrixHomoToPoseQuaternion, Task from dynamic_graph.sot.core.matrix_util import matrixToTuple from dynamic_graph.sot.core.meta_tasks_kine import MetaTaskKi...
40.272076
138
0.764253
1e1a40c9e5dacace1b7468321e89ed0049a68db2
1,099
py
Python
examples/user_interfaces/mpl_with_glade_316.py
yuvallanger/matplotlib
e0020d318a9a9685594c6bff4631f74599321459
[ "MIT", "BSD-3-Clause" ]
8
2017-04-11T08:55:30.000Z
2022-03-25T04:31:26.000Z
examples/user_interfaces/mpl_with_glade_316.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
null
null
null
examples/user_interfaces/mpl_with_glade_316.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
14
2015-10-05T04:15:46.000Z
2020-06-11T18:06:02.000Z
#!/usr/bin/env python3 from gi.repository import Gtk from matplotlib.figure import Figure from matplotlib.axes import Subplot from numpy import arange, sin, pi from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas class Window1Signals(object): def on_window1_destroy(self, widget): ...
25.55814
83
0.700637
76bbd901e81e5640c5a674959359811495c7506d
10,374
py
Python
mandala/storages/kv_impl/sqlite_impl.py
amakelov/mandala
a9ec051ef730ada4eed216c62a07b033126e78d5
[ "Apache-2.0" ]
9
2022-02-22T19:24:01.000Z
2022-03-23T04:46:41.000Z
mandala/storages/kv_impl/sqlite_impl.py
amakelov/mandala
a9ec051ef730ada4eed216c62a07b033126e78d5
[ "Apache-2.0" ]
null
null
null
mandala/storages/kv_impl/sqlite_impl.py
amakelov/mandala
a9ec051ef730ada4eed216c62a07b033126e78d5
[ "Apache-2.0" ]
null
null
null
from ..kv import KVStore, KVIndex from ...common_imports import * class SQLiteStorage(KVStore): UID_COL = '__index__' def __init__(self, root:Path=None, dtype:str='BLOB', serializer:TCallable=None, deserializer:TCallable=None, ...
37.451264
130
0.53904
0b374d14edf70ed2e3019e1657ac399ed9c2ab25
1,526
py
Python
services/movies_ugc/etl/models/models.py
fuodorov/yacinema
43ad869575fbaab7c7056229538638666aa87110
[ "MIT" ]
null
null
null
services/movies_ugc/etl/models/models.py
fuodorov/yacinema
43ad869575fbaab7c7056229538638666aa87110
[ "MIT" ]
null
null
null
services/movies_ugc/etl/models/models.py
fuodorov/yacinema
43ad869575fbaab7c7056229538638666aa87110
[ "MIT" ]
1
2021-09-30T09:49:40.000Z
2021-09-30T09:49:40.000Z
import datetime from pydantic import BaseModel, validator class UserEvent(BaseModel): movie_id: str user_id: str event: str frame: int event_time: datetime.datetime def ch_table_properties(self) -> [str, str]: """ :return: Возвращает названия таблицы (table_n...
22.776119
74
0.626474
64e81ea2f6bd5612b860d89ea42821954a37c62f
281
py
Python
tests/plugins/facebook.py
alfie-max/Publish
0014cc45f2496c44c9171353dc42a58d73dd5490
[ "MIT" ]
1
2016-03-08T07:17:46.000Z
2016-03-08T07:17:46.000Z
tests/plugins/facebook.py
alfie-max/Publish
0014cc45f2496c44c9171353dc42a58d73dd5490
[ "MIT" ]
5
2021-03-18T19:55:25.000Z
2022-03-11T23:11:27.000Z
tests/plugins/facebook.py
alfie-max/Publish
0014cc45f2496c44c9171353dc42a58d73dd5490
[ "MIT" ]
null
null
null
class Facebook(object): def __init__(self): self.__fields__ = ['Message'] def VerifyCredentials(self): return True def VerifyFields(self, fields): return True def SendMsg(self, msg): return 0 __plugin__ = Facebook __cname__ = 'facebook'
17.5625
35
0.651246
e19f2236ca6fe79779878c21cb24085538cf63f8
13,408
py
Python
src/core/datasets.py
spencerpomme/GSPNet
ff165de95ec0f258ba444ff343d18d812a066b8f
[ "MIT" ]
null
null
null
src/core/datasets.py
spencerpomme/GSPNet
ff165de95ec0f258ba444ff343d18d812a066b8f
[ "MIT" ]
null
null
null
src/core/datasets.py
spencerpomme/GSPNet
ff165de95ec0f258ba444ff343d18d812a066b8f
[ "MIT" ]
null
null
null
''' Copyright <2019> <COPYRIGHT Pingcheng Zhang> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
29.211329
145
0.592184
618050544cfb6f83887e7e97bdf5839d9eaba27b
3,847
py
Python
zat/json_log_to_dataframe.py
SuperCowPowers/zat
7f0de8bb052e8c84ab9bd00f195514d957eac9ec
[ "Apache-2.0" ]
146
2019-11-07T20:57:27.000Z
2022-03-24T00:03:55.000Z
zat/json_log_to_dataframe.py
Kitware/BroUtils
fed88c4310cf70c8b01c9a7eb0918b8c4d117e77
[ "Apache-2.0" ]
43
2017-09-18T06:22:35.000Z
2018-09-05T19:59:43.000Z
zat/json_log_to_dataframe.py
Kitware/BroUtils
fed88c4310cf70c8b01c9a7eb0918b8c4d117e77
[ "Apache-2.0" ]
41
2017-09-11T09:59:47.000Z
2018-09-01T18:36:47.000Z
"""JSONLogToDataFrame: Converts a Zeek JSON log to a Pandas DataFrame""" import os # Third Party import pandas as pd # Local Imports class JSONLogToDataFrame(object): """JSONLogToDataFrame: Converts a Zeek JSON log to a Pandas DataFrame Notes: Unlike the regular Zeek logs, when you dump the...
34.348214
100
0.642839
acaa184b5f7113792b8858295793ae6b6caf7031
15,755
py
Python
Lib/distutils/command/bdist_wininst.py
thatneat/cpython
2cd07920bb7d2d319999394092190f37935dc421
[ "CNRI-Python-GPL-Compatible" ]
1
2020-04-07T03:48:28.000Z
2020-04-07T03:48:28.000Z
Lib/distutils/command/bdist_wininst.py
thatneat/cpython
2cd07920bb7d2d319999394092190f37935dc421
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/distutils/command/bdist_wininst.py
thatneat/cpython
2cd07920bb7d2d319999394092190f37935dc421
[ "CNRI-Python-GPL-Compatible" ]
1
2019-11-25T00:28:23.000Z
2019-11-25T00:28:23.000Z
"""distutils.command.bdist_wininst Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" import sys, os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree from distutils.errors import * from distutil...
42.581081
91
0.556776
3f246990ab650bc190f2b8209cb5eae87541d16b
794
py
Python
seq2seq/util/seed.py
suhyeon0123/SplitRegex
b5f2fe890d81d335cda30ddd10414fbc75537d0e
[ "Apache-2.0" ]
null
null
null
seq2seq/util/seed.py
suhyeon0123/SplitRegex
b5f2fe890d81d335cda30ddd10414fbc75537d0e
[ "Apache-2.0" ]
null
null
null
seq2seq/util/seed.py
suhyeon0123/SplitRegex
b5f2fe890d81d335cda30ddd10414fbc75537d0e
[ "Apache-2.0" ]
null
null
null
import os import torch import numpy as np import random def seed_all(seed: int = 3000): print("Using Seed Number {}".format(seed)) os.environ["PYTHONHASHSEED"] = str( seed) # set PYTHONHASHSEED env var at fixed value torch.manual_seed(seed) torch.cuda.manual_seed_all(seed) torch.cuda.manu...
28.357143
76
0.706549
375470ba34364a59575f74f017d9ea51314f6227
1,351
py
Python
source/util/database.py
Remote-Area-Monitoring/Remote-Area-Monitoring
1dc602ed52eed124d3a58215cf025b9204dad426
[ "MIT" ]
null
null
null
source/util/database.py
Remote-Area-Monitoring/Remote-Area-Monitoring
1dc602ed52eed124d3a58215cf025b9204dad426
[ "MIT" ]
null
null
null
source/util/database.py
Remote-Area-Monitoring/Remote-Area-Monitoring
1dc602ed52eed124d3a58215cf025b9204dad426
[ "MIT" ]
null
null
null
from tinydb import TinyDB from tinydb import Query from source.util.timekeeper import Timestamps class Database: def __init__(self, database_file): self.db = TinyDB(database_file) self.ts = Timestamps() def insert(self, dataobj): self.db.insert(dataobj) def insert_multiple(self, ...
31.418605
100
0.626943
acf7598b1354a20394cb15ba6d132ba43b324dce
2,789
py
Python
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/utils.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/utils.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/utils.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2018, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## from __future__ i...
34.8625
74
0.534242
76a9462bb6d0c56839f505166b0deabd2d575bd9
2,441
py
Python
JMRPiFoundations/Skeleton/RPiSparkProvider.py
PowerRocker/rpi_spark_foundation
3373399b72760a17a8cfc5bb4a67494fab8b615c
[ "MIT" ]
2
2018-06-08T04:53:38.000Z
2018-06-08T06:40:04.000Z
JMRPiFoundations/Skeleton/RPiSparkProvider.py
mobinrg/rpi_spark_foundations
3373399b72760a17a8cfc5bb4a67494fab8b615c
[ "MIT" ]
null
null
null
JMRPiFoundations/Skeleton/RPiSparkProvider.py
mobinrg/rpi_spark_foundations
3373399b72760a17a8cfc5bb4a67494fab8b615c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # RPi.Spark Provider # # Author: Kunpeng Zhang # 2018.6.7 # # See LICENSE for details. def initSpark(): """! Create a RPiSpark object instance, it contain OLED, Keybuttons, Audio, Speaker, etc. objects instance @return a RPiSpark object instance """ from JMRPiFounda...
32.546667
105
0.667349
4b1da3e4eb8a2611264cc7f7dc464268b4c2d3b2
13,964
py
Python
tutorials/03-gravity/plot_inv_1a_gravity_anomaly.py
Prithwijit-Chak/simpeg
d93145d768b5512621cdd75566b4a8175fee9ed3
[ "MIT" ]
358
2015-03-11T05:48:41.000Z
2022-03-26T02:04:12.000Z
tutorials/03-gravity/plot_inv_1a_gravity_anomaly.py
thast/simpeg
8021082b8b53f3c08fa87fc085547bdd56437c6b
[ "MIT" ]
885
2015-01-19T09:23:48.000Z
2022-03-29T12:08:34.000Z
tutorials/03-gravity/plot_inv_1a_gravity_anomaly.py
thast/simpeg
8021082b8b53f3c08fa87fc085547bdd56437c6b
[ "MIT" ]
214
2015-03-11T05:48:43.000Z
2022-03-02T01:05:11.000Z
""" Least-Squares Inversion of Gravity Anomaly Data =============================================== Here we invert gravity anomaly data to recover a density contrast model. We formulate the inverse problem as a least-squares optimization problem. For this tutorial, we focus on the following: - Defining the survey...
31.954233
91
0.662489
fe9b434746f06e7aea9a10ec7e7db29e2a08d3fb
270
py
Python
src/splitting.py
IBPA/dairyML
6966a1d17fe06ed4962981e8bcb6e9e63264b705
[ "Apache-2.0" ]
null
null
null
src/splitting.py
IBPA/dairyML
6966a1d17fe06ed4962981e8bcb6e9e63264b705
[ "Apache-2.0" ]
null
null
null
src/splitting.py
IBPA/dairyML
6966a1d17fe06ed4962981e8bcb6e9e63264b705
[ "Apache-2.0" ]
1
2021-12-11T19:16:29.000Z
2021-12-11T19:16:29.000Z
from sklearn.model_selection import KFold, RepeatedKFold ten_fold_5_repeat = RepeatedKFold(n_splits=10,n_repeats=5,random_state=7) ten_fold_no_repeat = KFold(n_splits=10,shuffle=True,random_state=7) five_fold_no_repeat = KFold(n_splits=5,shuffle=True,random_state=7)
33.75
73
0.840741
571d073b77272a837a4f5653f604a128a8f675cd
23,966
py
Python
tests/fixtures/core.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
tests/fixtures/core.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
tests/fixtures/core.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
import datetime import itertools import logging import os import shutil from collections import namedtuple from pathlib import Path import pytest import yaml from meltano.core import bundle from meltano.core.behavior.canonical import Canonical from meltano.core.compiler.project_compiler import ProjectCompiler from me...
31.575758
88
0.58462
3cf38873ed198c3fbd30552a9179ca1fb07f143f
7,209
py
Python
mapmanager.py
BJDev95/gym-vizdoom
e3e64e4fbcb33c79677c3e0eca09f48bfd3f745d
[ "MIT" ]
null
null
null
mapmanager.py
BJDev95/gym-vizdoom
e3e64e4fbcb33c79677c3e0eca09f48bfd3f745d
[ "MIT" ]
1
2018-04-26T11:39:21.000Z
2018-04-26T11:39:21.000Z
mapmanager.py
BJDev95/gym-vizdoom
e3e64e4fbcb33c79677c3e0eca09f48bfd3f745d
[ "MIT" ]
1
2018-04-26T11:30:18.000Z
2018-04-26T11:30:18.000Z
# Copyright 2017 reinforce.io. 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 applicable law or...
38.142857
156
0.654044
e566f4506ecd9c4a6d3279672d953e74c06af03d
279
py
Python
build/android/pylib/utils/timeout_retry.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
27
2016-04-27T01:02:03.000Z
2021-12-13T08:53:19.000Z
build/android/pylib/utils/timeout_retry.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
2
2017-03-09T09:00:50.000Z
2017-09-21T15:48:20.000Z
build/android/pylib/utils/timeout_retry.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
17
2016-04-27T02:06:39.000Z
2019-12-18T08:07:00.000Z
# Copyright 2015 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. # pylint: disable=unused-wildcard-import # pylint: disable=wildcard-import from devil.utils.timeout_retry import *
31
72
0.781362
3bbbde00a46cf57ef869ac9aebba9149e346857f
11,123
py
Python
tmp/test_invariance_on_lfw.py
sonuranjitjacob/facenet
0ae6f9ae443cc8f1c163aaf76fb613e8fa79a0a6
[ "MIT" ]
13,408
2016-02-15T09:05:20.000Z
2022-03-31T14:00:56.000Z
tmp/test_invariance_on_lfw.py
jasonmayes/facenet
846db07945d5edaec41beb691da7c90b49b4e3ab
[ "MIT" ]
1,132
2016-02-12T22:34:40.000Z
2022-03-29T12:02:33.000Z
tmp/test_invariance_on_lfw.py
jasonmayes/facenet
846db07945d5edaec41beb691da7c90b49b4e3ab
[ "MIT" ]
5,366
2016-03-29T09:09:42.000Z
2022-03-30T14:16:42.000Z
"""Test invariance to translation, scaling and rotation on the "Labeled Faces in the Wild" dataset (http://vis-www.cs.umass.edu/lfw/). This requires test images to be cropped a bit wider than the normal to give some room for the transformations. """ # MIT License # # Copyright (c) 2016 David Sandberg # # Permission i...
51.976636
134
0.650094
b91d1b5f3f2862c67514835f9d31c2c17bbb7340
18,942
py
Python
code/manager.py
nuvlabox/peripheral-manager-ethernet
cad56702b2592ce49b2183aa33c0927651969bd3
[ "Apache-2.0" ]
null
null
null
code/manager.py
nuvlabox/peripheral-manager-ethernet
cad56702b2592ce49b2183aa33c0927651969bd3
[ "Apache-2.0" ]
null
null
null
code/manager.py
nuvlabox/peripheral-manager-ethernet
cad56702b2592ce49b2183aa33c0927651969bd3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """NuvlaBox Peripheral Manager Network This service provides network devices discovery. """ import logging import requests import time import json import os import xmltodict import re import base64 from threading import Event # Packages for Service Discovery from ssdpy ...
35.47191
144
0.60738
8487c37cbe2341cf6b4d7c4d698b90b91a434123
8,207
py
Python
flumine/controls/tradingcontrols.py
mberk/flumine
6216bcc233326cf07852fca9c7d39a18cee265ad
[ "MIT" ]
77
2017-12-09T07:10:18.000Z
2022-03-03T09:50:35.000Z
flumine/controls/tradingcontrols.py
mberk/flumine
6216bcc233326cf07852fca9c7d39a18cee265ad
[ "MIT" ]
423
2017-01-21T07:26:51.000Z
2022-03-04T11:13:54.000Z
flumine/controls/tradingcontrols.py
mberk/flumine
6216bcc233326cf07852fca9c7d39a18cee265ad
[ "MIT" ]
47
2017-04-22T17:31:41.000Z
2022-01-11T08:52:37.000Z
import logging from ..clients.clients import ExchangeType from ..order.ordertype import OrderTypes from ..order.orderpackage import OrderPackageType, BaseOrder from . import BaseControl from .. import utils logger = logging.getLogger(__name__) class OrderValidation(BaseControl): """ Validates order price a...
40.428571
122
0.599245
9e6adac0e5c34aa27b823eb1670b00df1aaef7c6
648
py
Python
packages/jet_bridge_base/jet_bridge_base/logger.py
bokal2/jet-bridge
dddc4f55c2d5a28c02ce9515dffc750e3887450f
[ "MIT" ]
2
2021-05-31T19:13:34.000Z
2022-02-03T13:12:35.000Z
packages/jet_bridge_base/jet_bridge_base/logger.py
bokal2/jet-bridge
dddc4f55c2d5a28c02ce9515dffc750e3887450f
[ "MIT" ]
null
null
null
packages/jet_bridge_base/jet_bridge_base/logger.py
bokal2/jet-bridge
dddc4f55c2d5a28c02ce9515dffc750e3887450f
[ "MIT" ]
null
null
null
import logging from jet_bridge_base import settings logger = logging.getLogger('jet_bridge') level = logging.DEBUG if settings.DEBUG else logging.INFO ch = logging.StreamHandler() class Formatter(logging.Formatter): formats = { logging.INFO: '%(message)s' } default_format = '%(levelname)s - %...
22.344828
86
0.708333
c72c3c76373c4d04d6e5b7d42dc30210375a6478
12,782
py
Python
Classes/Mesh.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Classes/Mesh.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Classes/Mesh.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Warning : this file has been generated, you shouldn't edit it""" from os import linesep from pyleecan.Classes.check import check_init_dict, check_var, raise_ from pyleecan.Functions.save import save from pyleecan.Classes.frozen import FrozenClass # Import all class method # Try/catch to rem...
34.268097
95
0.577687
d79a6947adefe791d3ae73eede4a82f15c8793d2
3,692
py
Python
superset/db_engine_specs/pinot.py
amitmiran137/incubator-superset
8593a13f00754973117beb0a95e7aca7fec4b00e
[ "Apache-2.0" ]
1
2021-02-01T00:18:23.000Z
2021-02-01T00:18:23.000Z
superset/db_engine_specs/pinot.py
amitmiran137/incubator-superset
8593a13f00754973117beb0a95e7aca7fec4b00e
[ "Apache-2.0" ]
4
2021-03-02T01:53:30.000Z
2021-10-06T22:56:01.000Z
superset/db_engine_specs/pinot.py
amitmiran137/incubator-superset
8593a13f00754973117beb0a95e7aca7fec4b00e
[ "Apache-2.0" ]
4
2020-09-23T05:48:37.000Z
2020-10-22T09:31:20.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...
36.92
87
0.631636
7b0d12b6b2659304bdc6174401e3d97929ed727d
1,532
py
Python
tests/unit/test_keys/test_enums.py
joeblackwaslike/gpgkeyring
65d595c2db2007eff400f929307fb3a036b7069c
[ "MIT" ]
null
null
null
tests/unit/test_keys/test_enums.py
joeblackwaslike/gpgkeyring
65d595c2db2007eff400f929307fb3a036b7069c
[ "MIT" ]
null
null
null
tests/unit/test_keys/test_enums.py
joeblackwaslike/gpgkeyring
65d595c2db2007eff400f929307fb3a036b7069c
[ "MIT" ]
null
null
null
import itertools import pytest import gpgkeyring from ...helpers.unit import testdata class TestKeyTypes: type_values = gpgkeyring.keys._KEYTYPE_MAP.items() @pytest.fixture(params=testdata.KEY_TYPES) def key_type(self, request): yield request.param def test_key_type_value(self, key_type): ...
29.461538
79
0.719321
064f41ccb03b52314ec61bd9671cb25d6cfb7752
3,375
py
Python
obfsproxy/test/test_aes.py
Samdney/obfsproxy
2bf9d096bb45a4e6c69f1cbdc3d2565f54a44efc
[ "BSD-3-Clause" ]
101
2015-01-24T07:37:03.000Z
2022-01-22T15:38:44.000Z
obfsproxy/test/test_aes.py
david415/obfsproxy
ea0e1b2b62be9113155f25f53baf5fce4392c430
[ "BSD-3-Clause" ]
1
2021-04-07T15:09:54.000Z
2021-12-01T03:23:58.000Z
obfsproxy/test/test_aes.py
david415/obfsproxy
ea0e1b2b62be9113155f25f53baf5fce4392c430
[ "BSD-3-Clause" ]
29
2015-05-11T09:45:43.000Z
2020-02-22T17:50:27.000Z
import unittest from Crypto.Cipher import AES from Crypto.Util import Counter import obfsproxy.common.aes as aes import twisted.trial.unittest class testAES_CTR_128_NIST(twisted.trial.unittest.TestCase): def _helper_test_vector(self, input_block, output_block, plaintext, ciphertext): self.assertEqual(lon...
44.407895
89
0.680889
1799954bd6babf4d72bfe2bf8a2e40f5f9023747
3,664
py
Python
retrain.py
zishansami102/Recommendation-Engine
14bb4c010ea9801b429bd8477b211d0d67bad3f1
[ "Apache-2.0" ]
17
2017-09-08T21:16:19.000Z
2021-01-18T09:50:55.000Z
retrain.py
zishansami102/Recommendation-Engine
14bb4c010ea9801b429bd8477b211d0d67bad3f1
[ "Apache-2.0" ]
null
null
null
retrain.py
zishansami102/Recommendation-Engine
14bb4c010ea9801b429bd8477b211d0d67bad3f1
[ "Apache-2.0" ]
7
2017-11-07T16:01:46.000Z
2020-04-21T13:51:03.000Z
import tensorflow as tf import time import numpy as np import pandas as pd import matplotlib.pyplot as plt from remtime import * from collections import deque from remtime import printTime # from matplotlib import pyplot # from mpl_toolkits.mplot3d import Axes3D # top_param LEARNING_RATE = 0.002 TS_BATCH_SIZE = 1000 N...
32.424779
165
0.727893
3dcc524b72bbf91e1ddda943deb98a736899044e
9,930
py
Python
chainer/links/connection/gru.py
disktnk/chainer
133798db470f6fd95973b882b9ccbd0c9726ac13
[ "MIT" ]
90
2017-02-23T04:04:47.000Z
2020-04-09T12:06:50.000Z
chainer/links/connection/gru.py
disktnk/chainer
133798db470f6fd95973b882b9ccbd0c9726ac13
[ "MIT" ]
7
2017-07-23T13:38:06.000Z
2018-07-10T07:09:03.000Z
chainer/links/connection/gru.py
disktnk/chainer
133798db470f6fd95973b882b9ccbd0c9726ac13
[ "MIT" ]
32
2017-02-28T07:40:38.000Z
2021-02-17T11:33:09.000Z
import numpy from chainer.functions.activation import sigmoid from chainer.functions.activation import tanh from chainer.functions.math import linear_interpolate from chainer import link from chainer.links.connection import linear from chainer import variable class GRUBase(link.Chain): def __init__(self, in_siz...
34.842105
79
0.576032
0878e4e49c50c3dbb198350718a94ae89cb65b3a
1,215
py
Python
scripts/hasher.py
rspeer/exquisite-corpus
3a6201583f40e4f29edb1d913eeb35f164511d78
[ "MIT" ]
28
2017-03-17T02:48:57.000Z
2022-02-09T22:37:22.000Z
scripts/hasher.py
rspeer/exquisite-corpus
3a6201583f40e4f29edb1d913eeb35f164511d78
[ "MIT" ]
17
2018-05-21T16:00:55.000Z
2021-07-01T09:41:31.000Z
scripts/hasher.py
rspeer/exquisite-corpus
3a6201583f40e4f29edb1d913eeb35f164511d78
[ "MIT" ]
4
2019-06-22T14:51:03.000Z
2021-06-19T10:00:15.000Z
""" We would like to ignore a list of subreddits that would be sources of very bad data. So that we don't have to do extensive, subjective research to make the decision of which subreddits are bad, we exclude only the very worst: subreddits that have been banned by the Reddit admins. Comments from these subreddits that...
36.818182
78
0.742387
d027e76e36eb188fa47924c67e86a044d17e281d
3,784
py
Python
setup.py
mattaustin/django-thummer
3eb06fd251a31da983417fefc906d30d0af16844
[ "Apache-2.0" ]
null
null
null
setup.py
mattaustin/django-thummer
3eb06fd251a31da983417fefc906d30d0af16844
[ "Apache-2.0" ]
null
null
null
setup.py
mattaustin/django-thummer
3eb06fd251a31da983417fefc906d30d0af16844
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011-2018 Matt Austin # # 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...
25.395973
75
0.635307
a7c8062fad5c6dae22c36079f3e889bfe77254c3
20,130
py
Python
lib/spack/spack/architecture.py
carlabguillen/spack
7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
lib/spack/spack/architecture.py
carlabguillen/spack
7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
lib/spack/spack/architecture.py
carlabguillen/spack
7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2020 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) """ This module contains all the elements that are required to create an architecture object. These include, the target pr...
35.946429
79
0.652807
9317278ac926c727d170dd1df8f458a6cb513845
4,325
py
Python
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711201101.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711201101.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711201101.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" Closuers Free variables and closures Remember: Functions defined inside another function can access the outer (nonLocal) variables """ def outer(): x = 'python' / this x refers to the one in outer's scope', this nonlocal variable x is called a free varia...
31.34058
132
0.541734
0245cd631110f3c612a7b236b510d335517de249
27,182
py
Python
mihifepe/simulation/simulation.py
cloudbopper/feature-importance-analysis
7f03e4413d1e42e9265d790cb64c41f34dbea5ab
[ "MIT" ]
1
2019-11-01T12:31:45.000Z
2019-11-01T12:31:45.000Z
mihifepe/simulation/simulation.py
cloudbopper/feature-importance-analysis
7f03e4413d1e42e9265d790cb64c41f34dbea5ab
[ "MIT" ]
10
2018-11-14T17:44:39.000Z
2020-01-02T03:25:14.000Z
mihifepe/simulation/simulation.py
cloudbopper/mihifepe
7f03e4413d1e42e9265d790cb64c41f34dbea5ab
[ "MIT" ]
3
2018-11-14T04:17:17.000Z
2020-01-04T20:32:00.000Z
"""Generates simulated data and model to test mihifepe algorithm""" import argparse from collections import namedtuple import csv import functools import itertools import os import pickle import sys from unittest.mock import patch import anytree from anytree.importer import JsonImporter import h5py import numpy as np...
49.51184
132
0.693547
a3a400ae42fa33d588a26adf29f2233f8fc60b36
251
py
Python
languages/default/normalizer.py
borisdayma/wav2vec-toolkit
595500997cc3b71ec05995345fca888ae515b516
[ "Apache-2.0" ]
24
2021-04-02T20:54:45.000Z
2021-11-22T05:37:34.000Z
languages/default/normalizer.py
borisdayma/wav2vec-toolkit
595500997cc3b71ec05995345fca888ae515b516
[ "Apache-2.0" ]
2
2021-04-04T03:45:38.000Z
2021-04-19T12:59:37.000Z
languages/default/normalizer.py
borisdayma/wav2vec-toolkit
595500997cc3b71ec05995345fca888ae515b516
[ "Apache-2.0" ]
10
2021-04-02T20:57:38.000Z
2021-11-17T07:35:59.000Z
from typing import Any from wav2vec_toolkit.text_preprocessing.normalizers import NormalizerOperation class Normalizer(NormalizerOperation): _whitelist = r"[0-9\w]+" _dictionary = {} _do_lowercase = True _text_key_name = "sentence"
22.818182
78
0.756972
8b33736f9d91500ec566cf4d428289caa2f8e832
4,042
py
Python
examples/model_compress/pruning/v2/simulated_anealing_pruning_torch.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
1
2022-02-17T06:12:30.000Z
2022-02-17T06:12:30.000Z
examples/model_compress/pruning/v2/simulated_anealing_pruning_torch.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
null
null
null
examples/model_compress/pruning/v2/simulated_anealing_pruning_torch.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. ''' NNI example for simulated anealing pruning algorithm. In this example, we show the end-to-end iterative pruning process: pre-training -> pruning -> fine-tuning. ''' import sys import argparse from tqdm import tqdm import torch from torchvis...
36.745455
115
0.657595
1571af9f8367b4a680241694cbd3e0e82bc0df2c
26,911
py
Python
keystone/token/providers/fernet/token_formatters.py
trananhkma/keystone
1d34614121cbe694bfd107f1ce7a9c402d6a30b4
[ "Apache-2.0" ]
null
null
null
keystone/token/providers/fernet/token_formatters.py
trananhkma/keystone
1d34614121cbe694bfd107f1ce7a9c402d6a30b4
[ "Apache-2.0" ]
null
null
null
keystone/token/providers/fernet/token_formatters.py
trananhkma/keystone
1d34614121cbe694bfd107f1ce7a9c402d6a30b4
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
39.401171
79
0.673554
1898bf65982781baf51df951598614b614156a8f
12,361
py
Python
tools/unit-test-app/tools/UnitTestParser.py
ulfalizer/esp-idf-1
6835bfc741bf15e98fb7971293913f770df6081f
[ "Apache-2.0" ]
2
2018-06-27T02:28:03.000Z
2020-12-08T19:33:44.000Z
tools/unit-test-app/tools/UnitTestParser.py
ulfalizer/esp-idf-1
6835bfc741bf15e98fb7971293913f770df6081f
[ "Apache-2.0" ]
3
2020-01-15T16:48:07.000Z
2020-12-08T14:51:19.000Z
tools/unit-test-app/tools/UnitTestParser.py
ulfalizer/esp-idf-1
6835bfc741bf15e98fb7971293913f770df6081f
[ "Apache-2.0" ]
7
2019-11-06T01:29:28.000Z
2021-08-21T09:51:21.000Z
import yaml import os import re import shutil import subprocess import hashlib from copy import deepcopy import CreateSectionTable TEST_CASE_PATTERN = { "initial condition": "UTINIT1", "SDK": "ESP32_IDF", "level": "Unit", "execution time": 0, "auto test": "Yes", "category": "Function", "te...
42.624138
118
0.598091
c8ae76757efa1c9501ba2246a331d69dd128077c
103,009
py
Python
google/net/proto2/proto/descriptor_pb2.py
theosp/google_appengine
9ce87a20684dc99cf5968e6f488c060e1530c159
[ "Apache-2.0" ]
3
2019-01-28T03:57:20.000Z
2020-02-20T01:37:33.000Z
google/net/proto2/proto/descriptor_pb2.py
theosp/google_appengine
9ce87a20684dc99cf5968e6f488c060e1530c159
[ "Apache-2.0" ]
null
null
null
google/net/proto2/proto/descriptor_pb2.py
theosp/google_appengine
9ce87a20684dc99cf5968e6f488c060e1530c159
[ "Apache-2.0" ]
3
2019-01-18T11:33:56.000Z
2020-01-05T10:44:05.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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 o...
43.759133
12,863
0.743032
50ec4f2e039ceef742cadaa73777ccd97588517d
6,528
py
Python
tensorflow_probability/python/distributions/chi.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
1
2021-07-21T15:54:17.000Z
2021-07-21T15:54:17.000Z
tensorflow_probability/python/distributions/chi.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/chi.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
1
2020-10-19T11:24:40.000Z
2020-10-19T11:24:40.000Z
# Copyright 2018 The TensorFlow Probability 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 o...
37.302857
81
0.6947
a7b8f0d71bc7b8ea915f8295c3d4d34f9b0ef55b
1,624
py
Python
aliyun-python-sdk-ddoscoo/aliyunsdkddoscoo/request/v20200101/DescribeAutoCcListCountRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-ddoscoo/aliyunsdkddoscoo/request/v20200101/DescribeAutoCcListCountRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-ddoscoo/aliyunsdkddoscoo/request/v20200101/DescribeAutoCcListCountRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.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...
36.909091
80
0.77032
41efd253edde5bc0c2ff08ab9b23c62852edf46d
1,949
py
Python
test.py
vasudevgupta7/tf-lightning
a4ec2f0877f3461acf8a5759b6b3017a81754207
[ "Apache-2.0" ]
null
null
null
test.py
vasudevgupta7/tf-lightning
a4ec2f0877f3461acf8a5759b6b3017a81754207
[ "Apache-2.0" ]
null
null
null
test.py
vasudevgupta7/tf-lightning
a4ec2f0877f3461acf8a5759b6b3017a81754207
[ "Apache-2.0" ]
1
2020-08-29T15:07:57.000Z
2020-08-29T15:07:57.000Z
# __author__ = 'Vasudev Gupta' import tf_lightning as tl import tensorflow as tf class TestModel(tl.LightningModule): # just a random model with random dataset def __init__(self): # simple test model super().__init__() self.model = tf.keras.Sequential([ tf.keras.layers.D...
24.061728
63
0.623397
034d68b341358301e201a56c082815d9b74c0e47
1,932
py
Python
Util.py
jakedoesgithub/prog_langs_project_scheme_interpreter
87bc03ab291abd7691db067ab8d5c72282b13c1a
[ "MIT" ]
null
null
null
Util.py
jakedoesgithub/prog_langs_project_scheme_interpreter
87bc03ab291abd7691db067ab8d5c72282b13c1a
[ "MIT" ]
null
null
null
Util.py
jakedoesgithub/prog_langs_project_scheme_interpreter
87bc03ab291abd7691db067ab8d5c72282b13c1a
[ "MIT" ]
null
null
null
# Util -- Utility functions from Tree import Nil from Tree import Cons from Special import Begin from Special import Cond from Special import Define from Special import If from Special import Lambda from Special import Let from Special import Quote from Special import Set from Special import Regular cl...
29.723077
77
0.520186
a9e14d769dcb8603f06831a3379ca54f07315fe3
1,124
py
Python
tests/test_spatstat_basic_usage.py
For-a-few-DPPs-more/spatstat-interface
cdcaf39c3dcd4d66abdbd78c502109987a8749f8
[ "MIT" ]
2
2021-07-12T16:32:47.000Z
2022-03-01T16:11:40.000Z
tests/test_spatstat_basic_usage.py
For-a-few-DPPs-more/spatstat-interface
cdcaf39c3dcd4d66abdbd78c502109987a8749f8
[ "MIT" ]
1
2021-07-12T21:43:11.000Z
2021-10-06T12:27:37.000Z
tests/test_spatstat_basic_usage.py
For-a-few-DPPs-more/spatstat-interface
cdcaf39c3dcd4d66abdbd78c502109987a8749f8
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import pytest import rpy2.robjects as robjects from spatstat_interface.interface import SpatstatInterface from spatstat_interface.utils import to_pandas_data_frame @pytest.fixture def spatstat(): spatstat = SpatstatInterface(update=True) spatstat.import_package("core", ...
28.820513
63
0.725979
6f99f4cf4c30fd552cbcad8a251609fb4590b38d
1,865
py
Python
setup.py
vituocgia/boxme-users
0e8238b7852e697643a35c8e306d63446f27a6d2
[ "BSD-3-Clause" ]
null
null
null
setup.py
vituocgia/boxme-users
0e8238b7852e697643a35c8e306d63446f27a6d2
[ "BSD-3-Clause" ]
null
null
null
setup.py
vituocgia/boxme-users
0e8238b7852e697643a35c8e306d63446f27a6d2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import find_packages, setup import sys if sys.argv[-1] == 'publish': print("Remember to update the Changelog's version and date in README.rst and stage the changes") input("Press Enter to continue...") os.system("bumpversion --allow-d...
33.909091
143
0.627882
ab8ab0bee7bdc9677450360c5d6c60f646709da6
705
py
Python
taiga/projects/migrations/0048_auto_20160615_1508.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
1
2017-05-29T19:01:06.000Z
2017-05-29T19:01:06.000Z
docker-images/taigav2/taiga-back/taiga/projects/migrations/0048_auto_20160615_1508.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
12
2019-11-25T14:08:32.000Z
2021-06-24T10:35:51.000Z
taiga/projects/migrations/0048_auto_20160615_1508.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-06-15 15:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0047_auto_20160614_1201'), ] operations = [ migrations.AlterMode...
28.2
132
0.624113
479cbaf6cbf98ff6de69c97ee90cde5782536b63
975
py
Python
fire/test_components_py3.py
adamruth/python-fire
6912ccd56f50e0f4bb30a0725d95858ef29f3bde
[ "Apache-2.0" ]
1
2020-02-05T04:43:03.000Z
2020-02-05T04:43:03.000Z
fire/test_components_py3.py
chesnjak/python-fire
72604f40314008e562ba47936dcc183b51166b72
[ "Apache-2.0" ]
null
null
null
fire/test_components_py3.py
chesnjak/python-fire
72604f40314008e562ba47936dcc183b51166b72
[ "Apache-2.0" ]
1
2020-07-15T22:58:25.000Z
2020-07-15T22:58:25.000Z
# Copyright (C) 2017 Google Inc. # # 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, ...
32.5
74
0.708718
f0d3a6260a12fd1226d48ba2da678d55ce1baa5f
4,885
py
Python
tests/queries/test_query.py
beshrkayali/django
84633905273fc916e3d17883810d9969c03f73c2
[ "PSF-2.0", "BSD-3-Clause" ]
7
2020-01-13T18:26:41.000Z
2021-04-20T04:22:26.000Z
tests/queries/test_query.py
beshrkayali/django
84633905273fc916e3d17883810d9969c03f73c2
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/queries/test_query.py
beshrkayali/django
84633905273fc916e3d17883810d9969c03f73c2
[ "PSF-2.0", "BSD-3-Clause" ]
4
2019-11-07T01:22:16.000Z
2020-09-16T22:02:16.000Z
from datetime import datetime from django.core.exceptions import FieldError from django.db.models import CharField, F, Q from django.db.models.expressions import SimpleCol from django.db.models.fields.related_lookups import RelatedIsNull from django.db.models.functions import Lower from django.db.models.lookups import...
42.112069
88
0.697441
5394b2dad4ced26ea593398527c64194440b6e50
16,885
py
Python
venv/lib/python3.6/site-packages/ansible_collections/cisco/aci/plugins/modules/aci_static_binding_to_epg.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/aci/plugins/modules/aci_static_binding_to_epg.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/aci/plugins/modules/aci_static_binding_to_epg.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_...
35.472689
149
0.635475
ab3e073223720ec40f3b539fd81cd54fbda54fcb
3,713
py
Python
src/Lossfunctions/LeastSquares.py
Yutong-Dai/ML-Algorithm-Pytorch
ab0eb8fa0c9c44dbf6847f6c44feaf4f3a18ec2d
[ "MIT" ]
null
null
null
src/Lossfunctions/LeastSquares.py
Yutong-Dai/ML-Algorithm-Pytorch
ab0eb8fa0c9c44dbf6847f6c44feaf4f3a18ec2d
[ "MIT" ]
null
null
null
src/Lossfunctions/LeastSquares.py
Yutong-Dai/ML-Algorithm-Pytorch
ab0eb8fa0c9c44dbf6847f6c44feaf4f3a18ec2d
[ "MIT" ]
null
null
null
''' File: LeastSquares.py Author: Yutong Dai (yutongdai95@gmail.com) File Created: 2021-03-10 00:33 Last Modified: 2021-03-11 15:28 -------------------------------------------- Description: ''' import torch class LeastSquares: def __init__(self, A, b): """ @input: A: torch.tensor of ...
34.06422
132
0.544842
7456f6159e5d7c0a1df336ac038062a02feb678c
918
py
Python
testing/motor_dose.py
cameron-woodard/PiDose
0cbdcac2f22293d810bff4686148766f154e2ab9
[ "MIT" ]
1
2022-02-21T14:17:11.000Z
2022-02-21T14:17:11.000Z
testing/motor_dose.py
cameron-woodard/PiDose
0cbdcac2f22293d810bff4686148766f154e2ab9
[ "MIT" ]
null
null
null
testing/motor_dose.py
cameron-woodard/PiDose
0cbdcac2f22293d810bff4686148766f154e2ab9
[ "MIT" ]
1
2022-02-21T14:17:24.000Z
2022-02-21T14:17:24.000Z
"""Script for dispensing test drop from the syringe pump. Written by Cameron Woodard """ import RPi.GPIO as GPIO from time import sleep PIN_MOTOR_STEP = 12 PIN_MOTOR_DIR = 16 PIN_MOTOR_MS1 = 23 PIN_MOTOR_MS2 = 24 GPIO.setmode(GPIO.BCM) GPIO.setup(PIN_MOTOR_STEP, GPIO.OUT) GPIO.setup(PIN_MOTOR_DIR, GPIO.OUT) GPIO.set...
23.538462
60
0.735294
2be7ab2d078730534f3088c73a51cf40d22e2ea4
273
py
Python
utils/gurl.py
eigenphi/gcommon
bce1ee422874fa904d90afee03fd703a06dc7a4d
[ "MIT" ]
3
2021-11-09T09:43:21.000Z
2021-12-16T18:15:43.000Z
utils/gurl.py
eigenphi/gcommon
bce1ee422874fa904d90afee03fd703a06dc7a4d
[ "MIT" ]
null
null
null
utils/gurl.py
eigenphi/gcommon
bce1ee422874fa904d90afee03fd703a06dc7a4d
[ "MIT" ]
2
2022-03-10T11:24:46.000Z
2022-03-25T06:39:17.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # created: 2015-10-22 def remove_trailing_slash(path): if path.endswith('/'): path = path[:-1] return path def ensure_trailing_slash(path): if path.endswith("/"): return path return path + "/"
15.166667
32
0.586081
6c650cca675bc2d1ef587961ebdc0da77c40f354
2,835
py
Python
instance_segmentation/ADE20K/dataset.py
orestis-z/Mask_RCNN
d590e0f5085f8cbe895a6698e284426fd0116aa4
[ "MIT" ]
13
2021-01-21T23:28:02.000Z
2021-12-16T13:40:01.000Z
instance_segmentation/ADE20K/dataset.py
orestis-z/Mask_RCNN
d590e0f5085f8cbe895a6698e284426fd0116aa4
[ "MIT" ]
4
2021-05-28T00:48:58.000Z
2022-02-10T08:38:28.000Z
instance_segmentation/ADE20K/dataset.py
orestis-z/Mask_RCNN
d590e0f5085f8cbe895a6698e284426fd0116aa4
[ "MIT" ]
3
2021-06-17T08:33:08.000Z
2022-02-23T11:29:07.000Z
import os, sys import numpy as np import scipy from scipy.io import loadmat from PIL import Image # Root directory of the project ROOT_DIR = os.path.abspath("../..") if ROOT_DIR not in sys.path: sys.path.insert(0, ROOT_DIR) from instance_segmentation.objects_config import ObjectsConfig from instance_segmentation....
32.965116
85
0.585538
7587caa89d00e26bd48556f9d820fba27fdb323b
8,767
py
Python
apps/facenet/infer.py
UphillD/edgebench
eae2587ccce4866414304cd1841234625be4817b
[ "MIT" ]
3
2021-06-03T01:26:32.000Z
2021-11-12T14:57:37.000Z
apps/facenet/infer.py
UphillD/edgebench
eae2587ccce4866414304cd1841234625be4817b
[ "MIT" ]
null
null
null
apps/facenet/infer.py
UphillD/edgebench
eae2587ccce4866414304cd1841234625be4817b
[ "MIT" ]
1
2021-06-03T01:26:33.000Z
2021-06-03T01:26:33.000Z
# MIT License # # Copyright (c) 2017 PXL University College # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
42.765854
120
0.610927
26880e6be5d17988a1ba298d5a9eb5426c8e37bc
628
py
Python
2021/day2/part1.py
trongbq/adventofcode
7ab692a91304a00a7843460052238b98c6f44963
[ "MIT" ]
null
null
null
2021/day2/part1.py
trongbq/adventofcode
7ab692a91304a00a7843460052238b98c6f44963
[ "MIT" ]
null
null
null
2021/day2/part1.py
trongbq/adventofcode
7ab692a91304a00a7843460052238b98c6f44963
[ "MIT" ]
null
null
null
# https://adventofcode.com/2021/day/2 # What do you get if you multiply your final horizontal position by your final depth? def solve(commands): horizontal_pos = 0 depth_pos = 0 for command in commands: c, unit = command.split() unit = int(unit) if c == 'forward': horizontal_pos += unit el...
20.933333
85
0.633758
2fb95e220c57747bb80510727e9784a02bd37271
8,337
py
Python
depth/models/decode_heads/decode_head.py
zhyever/Monocular-Depth-Estimation-Toolbox
c591b9711321450387ffa7322ec1db9a340347c2
[ "Apache-2.0" ]
21
2022-03-12T01:42:05.000Z
2022-03-31T17:01:45.000Z
depth/models/decode_heads/decode_head.py
zhyever/Monocular-Depth-Estimation-Toolbox
c591b9711321450387ffa7322ec1db9a340347c2
[ "Apache-2.0" ]
2
2022-03-29T10:50:33.000Z
2022-03-30T10:40:53.000Z
depth/models/decode_heads/decode_head.py
zhyever/Monocular-Depth-Estimation-Toolbox
c591b9711321450387ffa7322ec1db9a340347c2
[ "Apache-2.0" ]
3
2022-03-26T11:52:44.000Z
2022-03-30T21:24:16.000Z
import mmcv import copy import torch import numpy as np import torch.nn as nn from abc import ABCMeta, abstractmethod from mmcv.runner import BaseModule, auto_fp16, force_fp32 from depth.ops import resize from depth.models.builder import build_loss class DepthBaseDecodeHead(BaseModule, metaclass=ABCMeta): """B...
37.895455
119
0.576706
0c47abae1de6896b639ba6cf4f9db767abde3433
22,338
py
Python
salt/states/pkgrepo.py
dmyerscough/salt
d7b19ab64f0695568f78c12b4ba209e033903804
[ "Apache-2.0" ]
null
null
null
salt/states/pkgrepo.py
dmyerscough/salt
d7b19ab64f0695568f78c12b4ba209e033903804
[ "Apache-2.0" ]
null
null
null
salt/states/pkgrepo.py
dmyerscough/salt
d7b19ab64f0695568f78c12b4ba209e033903804
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Management of APT/RPM package repos =================================== Package repositories for APT-based and RPM-based distros(openSUSE/SUSE, CentOS/Fedora/Redhat) can be managed with these states. Here is some example SLS: .. code-block:: yaml base: pkgrepo.managed: -...
35.855538
113
0.587206
c332defb94592349973d1f5758f26a5c40713b66
34,772
py
Python
scrapydd/main.py
zanachka/scrapydd
ba7854a69e756e5d0e6b5f835d8f36fe57f7f7c2
[ "Apache-2.0" ]
5
2017-06-13T05:07:57.000Z
2021-02-26T16:16:49.000Z
scrapydd/main.py
zanachka/scrapydd
ba7854a69e756e5d0e6b5f835d8f36fe57f7f7c2
[ "Apache-2.0" ]
7
2019-04-15T01:34:30.000Z
2020-09-16T02:41:00.000Z
scrapydd/main.py
zanachka/scrapydd
ba7854a69e756e5d0e6b5f835d8f36fe57f7f7c2
[ "Apache-2.0" ]
3
2017-06-28T09:58:28.000Z
2020-07-09T08:57:57.000Z
# -*-coding:utf8-*- """ Main entrypoint of scrapydd server """ # pylint: disable=missing-module-docstring # pylint: disable=missing-class-docstring # pylint: disable=missing-function-docstring import ssl import os.path import sys import logging import subprocess import signal import json # pylint: disable...
40.669006
104
0.629414
bb0dc8e667d2bc81824173fd7a6adf6924a46ead
1,504
py
Python
script/popolamento_database/fill_pubblica_e_contiene1.py
dariocurreri/bdm
04f1bf9e6f100d0952c5d1c5734976158f04cc1f
[ "MIT" ]
1
2022-02-17T20:35:04.000Z
2022-02-17T20:35:04.000Z
script/popolamento_database/fill_pubblica_e_contiene1.py
dariocurreri/bdm
04f1bf9e6f100d0952c5d1c5734976158f04cc1f
[ "MIT" ]
null
null
null
script/popolamento_database/fill_pubblica_e_contiene1.py
dariocurreri/bdm
04f1bf9e6f100d0952c5d1c5734976158f04cc1f
[ "MIT" ]
1
2021-05-31T11:28:47.000Z
2021-05-31T11:28:47.000Z
from database_connection import database_connection import numpy as np def creazione_pubblica(): #"bdm_unipa", "bdm_unina", "bdm_unito"" for db in ["bdm_unimi"]: sql = database_connection(db) personale_ricerca = list(sql.execute_query("SELECT id_personale_ricerca, anagrafica_personale FROM per...
45.575758
130
0.579122
87521c8cbf321163e46d4eef4e947e083956f439
2,591
py
Python
test/core/gen2/local/test_transformer.py
bcdev/xcube
9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3
[ "MIT" ]
97
2018-06-26T13:02:55.000Z
2022-03-26T21:03:13.000Z
test/core/gen2/local/test_transformer.py
bcdev/xcube
9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3
[ "MIT" ]
524
2018-11-09T12:00:08.000Z
2022-03-31T17:00:13.000Z
test/core/gen2/local/test_transformer.py
bcdev/xcube
9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3
[ "MIT" ]
15
2019-07-09T08:46:03.000Z
2022-02-07T18:47:34.000Z
import unittest import xarray as xr from xcube.core.gen2 import CubeConfig from xcube.core.gen2.local.transformer import CubeIdentity from xcube.core.gen2.local.transformer import CubeTransformer from xcube.core.gen2.local.transformer import TransformedCube from xcube.core.gen2.local.transformer import transform_cube...
34.092105
80
0.641837
6387ae9114bd089cc040b1492a4c3a0c74f1045d
1,039
py
Python
{{cookiecutter.project_name}}/config/common/logging.py
pyfs/cc_django
19aa1b8c3d5f5f71c7c676349df42a141330a313
[ "BSD-3-Clause" ]
3
2020-12-07T00:40:53.000Z
2021-01-26T00:46:45.000Z
{{cookiecutter.project_name}}/config/common/logging.py
pyfs/cc_django
19aa1b8c3d5f5f71c7c676349df42a141330a313
[ "BSD-3-Clause" ]
2
2020-12-07T08:41:46.000Z
2020-12-08T03:37:43.000Z
{{cookiecutter.project_name}}/config/common/logging.py
pyfs/cc_django
19aa1b8c3d5f5f71c7c676349df42a141330a313
[ "BSD-3-Clause" ]
null
null
null
""" 推荐容器化运行,所以不建议日志落盘,直接输出到 stdout 即可; 如果有日志落盘要求,可直接取消如下注释即可; """ LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': '%(levelname)s [%(asctime)s] %(pathname)s %(lineno)d %(funcName)s %(process)d %(thread)d \n \t %(message)s \n', ...
24.162791
133
0.419634
bed9af05038405cc2109561be6cf418029df9a97
1,626
py
Python
test/bench_lazy.py
facebookresearch/loop_tool
8ee5a63f21e261a017daa91663db2011d3db4bc9
[ "MIT" ]
57
2021-07-08T17:00:20.000Z
2022-03-18T13:44:31.000Z
test/bench_lazy.py
facebookresearch/loop_tool
8ee5a63f21e261a017daa91663db2011d3db4bc9
[ "MIT" ]
6
2021-07-08T17:43:29.000Z
2022-02-21T17:02:57.000Z
test/bench_lazy.py
facebookresearch/loop_tool
8ee5a63f21e261a017daa91663db2011d3db4bc9
[ "MIT" ]
7
2021-07-09T18:19:09.000Z
2022-03-18T13:39:26.000Z
import loop_tool_py as lt import numpy as np import time L = 1024 if "cuda" in lt.backends(): lt.set_default_hardware("cuda") lt.set_default_backend("cuda") L *= 1024 X = lt.Tensor(L) Y = lt.Tensor(L) X.set(np.random.randn(L)) Y.set(np.random.randn(L)) N = lt.Symbol("N") Z = X.to(N) + Y.to(N) assert np....
22.583333
78
0.603321
33c9d9caa650b1e5957bd0273f25686e75bf6c4b
1,483
py
Python
python/getLog.py
ruz76/lora
264e0fe14beba70e7e8ed4f4a66524f887a182d8
[ "MIT" ]
null
null
null
python/getLog.py
ruz76/lora
264e0fe14beba70e7e8ed4f4a66524f887a182d8
[ "MIT" ]
4
2020-07-19T15:16:33.000Z
2022-02-26T23:57:38.000Z
python/getLog.py
ruz76/lora
264e0fe14beba70e7e8ed4f4a66524f887a182d8
[ "MIT" ]
null
null
null
import math import datetime import sys import mysql.connector import random from config import * import pyproj import ast def getPayload(payload): gtws = ['eui-b827ebfffe998292', 'eui-b827ebfffed3b23f', 'eui-b827ebfffe411ace', 'eui-b827ebfffe13b290', 'eui-b827ebfffe7...
30.265306
221
0.597438
f9da5f75a9dc94dddb55c689e910f51ea361f045
7,537
py
Python
plugins/image.py
FlashTek/data-viewer
f81bec33afae182decbb2b6f083b5551f965ec41
[ "MIT" ]
1
2018-12-19T19:30:36.000Z
2018-12-19T19:30:36.000Z
plugins/image.py
FlashTek/data-viewer
f81bec33afae182decbb2b6f083b5551f965ec41
[ "MIT" ]
null
null
null
plugins/image.py
FlashTek/data-viewer
f81bec33afae182decbb2b6f083b5551f965ec41
[ "MIT" ]
null
null
null
# Copyright (c) 2018 Roland Zimmermann # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, d...
34.893519
125
0.644952
7553d58c82d635c2cf53e6374a8bf9ff4917eff3
814
py
Python
linked_list/0021_merge_two_sorted_lists/0021_merge_two_sorted_lists.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
6
2019-09-16T01:50:44.000Z
2020-09-17T08:52:25.000Z
linked_list/0021_merge_two_sorted_lists/0021_merge_two_sorted_lists.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
null
null
null
linked_list/0021_merge_two_sorted_lists/0021_merge_two_sorted_lists.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
4
2020-02-07T12:43:16.000Z
2021-04-11T06:38:55.000Z
# Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def mergeTwoLists(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ curr = dummy ...
22.611111
39
0.528256
092656c817ac6f79f949ce10695aa8ebe0e47635
3,300
py
Python
kivymd/slidingpanel.py
AndreMiras/KivyMD
dfd69f6da73718e2a596d29c33c9a257e58343c8
[ "MIT" ]
64
2018-09-17T20:14:39.000Z
2022-02-19T21:39:33.000Z
kivymd/slidingpanel.py
AndreMiras/KivyMD
dfd69f6da73718e2a596d29c33c9a257e58343c8
[ "MIT" ]
13
2018-09-22T17:09:22.000Z
2020-09-02T14:11:17.000Z
kivymd/slidingpanel.py
AndreMiras/KivyMD
dfd69f6da73718e2a596d29c33c9a257e58343c8
[ "MIT" ]
34
2018-09-20T20:19:47.000Z
2022-02-20T10:35:18.000Z
# -*- coding: utf-8 -*- from kivy.animation import Animation from kivy.clock import Clock from kivy.core.window import Window from kivy.lang import Builder from kivy.metrics import dp from kivy.properties import (BooleanProperty, ListProperty, NumericProperty, OptionProperty, StringProperty...
35.106383
78
0.590606
09842da799b2c478bb7391002048a0b400f02ea4
731
py
Python
lektor_hidden_attachments.py
nyergler/lektor-hidden-attachments
fa25f7fa443716e084a8d406bdae9574bc2f6be7
[ "MIT" ]
null
null
null
lektor_hidden_attachments.py
nyergler/lektor-hidden-attachments
fa25f7fa443716e084a8d406bdae9574bc2f6be7
[ "MIT" ]
1
2018-05-15T17:00:24.000Z
2018-05-15T17:00:24.000Z
lektor_hidden_attachments.py
nyergler/lektor-hidden-attachments
fa25f7fa443716e084a8d406bdae9574bc2f6be7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os.path from lektor.pluginsystem import Plugin from jinja2 import is_undefined class HiddenAttachmentsPlugin(Plugin): name = u'hidden-attachments' description = u'Hide attachments by default based on file extension.' def on_before_build(self, source, **extra): conf...
31.782609
80
0.649795
79286bbff19853f6a43a7ecd79c07ee5f0a8bdfa
1,974
py
Python
advanced/mathematical_optimization/examples/compare_optimizers_plot.py
negm/scipy-lecture-notes
7a4decc7127471c269ab64340261e22b08ddd226
[ "CC-BY-4.0" ]
419
2016-03-05T08:50:48.000Z
2022-03-24T15:16:46.000Z
advanced/mathematical_optimization/examples/compare_optimizers_plot.py
techeye220/scipy-lecture-notes-zh-CN
cc87204fcc4bd2f4702f7c29c83cb8ed5c94b7d6
[ "CC-BY-4.0" ]
5
2016-05-21T14:21:12.000Z
2017-10-06T11:09:48.000Z
advanced/mathematical_optimization/examples/compare_optimizers_plot.py
techeye220/scipy-lecture-notes-zh-CN
cc87204fcc4bd2f4702f7c29c83cb8ed5c94b7d6
[ "CC-BY-4.0" ]
233
2016-02-13T09:22:57.000Z
2021-11-11T17:58:44.000Z
""" Plotting the comparison of optimizers ====================================== Plots the results from the comparison of optimizers. """ import pickle import numpy as np import pylab as pl results = pickle.load(file('compare_optimizers.pkl')) #results = pickle.load(file('compare_optimizers_gradients.pkl')) n_meth...
29.029412
75
0.638298
5cc32e1a2ffca7764455b51f51914f0b1a05ec7a
2,189
py
Python
tests_tf/test_attack_bundling.py
posenhuang/cleverhans
5ec82b2b7d594258df5cf1915013797f30ed5983
[ "MIT" ]
1
2020-08-10T01:49:45.000Z
2020-08-10T01:49:45.000Z
tests_tf/test_attack_bundling.py
shreyashankar/cleverhans
0eba0d3a226a022aa3b9090fa17ddcf1cb99d105
[ "MIT" ]
null
null
null
tests_tf/test_attack_bundling.py
shreyashankar/cleverhans
0eba0d3a226a022aa3b9090fa17ddcf1cb99d105
[ "MIT" ]
1
2019-02-26T06:30:31.000Z
2019-02-26T06:30:31.000Z
import numpy as np from cleverhans.attack_bundling import AttackConfig from cleverhans.attack_bundling import Misclassify from cleverhans.attack_bundling import unfinished_attack_configs def test_unfinished_attack_configs(): new_work_goal = {} work_before = {} run_counts = {} expected_unfinished = [] expe...
34.746032
76
0.728186
55a7f77b306d1e95ce435ff5c7ca3f15a05e58d8
408
py
Python
backend/product/migrations/0007_alter_product_image.py
Qlas/ztziwb
24d9ec804e93d2137c94d5af1fd6e5a67fa0eb03
[ "MIT" ]
null
null
null
backend/product/migrations/0007_alter_product_image.py
Qlas/ztziwb
24d9ec804e93d2137c94d5af1fd6e5a67fa0eb03
[ "MIT" ]
null
null
null
backend/product/migrations/0007_alter_product_image.py
Qlas/ztziwb
24d9ec804e93d2137c94d5af1fd6e5a67fa0eb03
[ "MIT" ]
null
null
null
# Generated by Django 3.2.11 on 2022-01-17 19:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('product', '0006_alter_product_image'), ] operations = [ migrations.AlterField( model_name='product', name='image', ...
21.473684
70
0.605392
6928363791566af4a6fbd6401688ef3393f21e98
5,777
py
Python
src/main.py
nbsp1221/everytimeless-bot
5c0c0311088362761bb740d3e285751ac41fb266
[ "MIT" ]
3
2020-10-02T17:40:14.000Z
2022-01-08T14:26:40.000Z
src/main.py
nbsp1221/everytimeless-bot
5c0c0311088362761bb740d3e285751ac41fb266
[ "MIT" ]
null
null
null
src/main.py
nbsp1221/everytimeless-bot
5c0c0311088362761bb740d3e285751ac41fb266
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import os import re import settings import threading import time from everytime import Everytime from telegrambot import TelegramBot boards = [] keywords = [] last = {} def load_datas(): global boards global keywords if not os.path.isfile('datas.json'): return...
29.030151
132
0.561191
02bc3c95e6f61632e26ff2dfc3f3cfe94950de9f
7,650
py
Python
memegen/domain/template.py
jacebrowning/memegen-flask
e4e67e76f061fa4e418901031b6086966376b8f3
[ "MIT" ]
3
2020-09-02T13:11:11.000Z
2020-12-24T00:41:56.000Z
memegen/domain/template.py
jacebrowning/memegen-flask
e4e67e76f061fa4e418901031b6086966376b8f3
[ "MIT" ]
13
2020-08-30T21:38:53.000Z
2020-09-05T03:19:17.000Z
memegen/domain/template.py
jacebrowning/memegen-flask
e4e67e76f061fa4e418901031b6086966376b8f3
[ "MIT" ]
null
null
null
import os import hashlib import shutil from pathlib import Path from contextlib import suppress import tempfile import requests from PIL import Image import log from .text import Text DEFAULT_REQUEST_HEADERS = { 'User-Agent': "Googlebot/2.1 (+http://www.googlebot.com/bot.html)", } class Template: """Blank...
27.617329
77
0.564706
e8eea6267b97ba42a45c27e4e411f1b359663ae8
1,575
py
Python
codes/datasets/loader/build_loader.py
dreamerlin/MVFNet
ed336228ad88821ffe407a4355017acb416e4670
[ "Apache-2.0" ]
102
2020-12-16T03:55:21.000Z
2022-03-11T03:46:03.000Z
codes/datasets/loader/build_loader.py
dreamerlin/MVFNet
ed336228ad88821ffe407a4355017acb416e4670
[ "Apache-2.0" ]
4
2021-06-14T18:43:53.000Z
2022-03-28T16:28:51.000Z
codes/datasets/loader/build_loader.py
dreamerlin/MVFNet
ed336228ad88821ffe407a4355017acb416e4670
[ "Apache-2.0" ]
8
2021-03-03T00:18:58.000Z
2022-02-18T07:20:06.000Z
""" https://github.com/pytorch/pytorch/issues/973""" import resource from torch.distributed import get_rank, get_world_size # from mmcv.parallel import collate from torch.utils.data import DataLoader # , DistributedSampler from .sampler import DistributedSampler # from functools import partial rlimit = resource.ge...
29.716981
70
0.616508
8fb70cdf8b460d09db49d848449348fa37cb4b00
2,287
py
Python
watchman/python/pywatchman/load.py
istiak101/watchman
8bede2333411b4cafc43c08ed21866dc100f3bd2
[ "MIT" ]
1
2022-03-04T14:09:05.000Z
2022-03-04T14:09:05.000Z
watchman/python/pywatchman/load.py
Siyabonga-Gregory/watchman
4c2a9ee8bc01f16be5be81c6734c0a00f8548770
[ "MIT" ]
null
null
null
watchman/python/pywatchman/load.py
Siyabonga-Gregory/watchman
4c2a9ee8bc01f16be5be81c6734c0a00f8548770
[ "MIT" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import ctypes try: from . import bser except ImportError: from . import pybser as bser EMPTY_HEADER = b"\x00\x01\x05\x00\x00\x0...
27.554217
84
0.647136
4ab9c1e7010db63e8d58ae45531e56810d40c70a
2,576
py
Python
spacy/tests/parser/test_add_label.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
spacy/tests/parser/test_add_label.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
4
2021-06-02T00:49:27.000Z
2022-01-13T01:59:34.000Z
spacy/tests/parser/test_add_label.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
2
2020-02-15T18:33:35.000Z
2022-02-13T14:11:41.000Z
# coding: utf8 from __future__ import unicode_literals import pytest from thinc.neural.optimizers import Adam from thinc.neural.ops import NumpyOps from spacy.attrs import NORM from spacy.gold import GoldParse from spacy.vocab import Vocab from spacy.tokens import Doc from spacy.pipeline import DependencyParser, Entit...
29.272727
88
0.657609
d8bb8209aafdb2257a903f3b45f0e2f13dcf21a9
107
py
Python
packages/infrastructure/lib/authtest/emailReceiver.py
chessdbai/Hercules
b9edf053f45039b9560e11791b3e19a67023c3b1
[ "MIT" ]
null
null
null
packages/infrastructure/lib/authtest/emailReceiver.py
chessdbai/Hercules
b9edf053f45039b9560e11791b3e19a67023c3b1
[ "MIT" ]
null
null
null
packages/infrastructure/lib/authtest/emailReceiver.py
chessdbai/Hercules
b9edf053f45039b9560e11791b3e19a67023c3b1
[ "MIT" ]
null
null
null
import boto3 import json def handle(event, context): print('Received event:') print(json.dumps(event))
17.833333
27
0.738318
78a355293b8da6b640eb10cdc6de52efcfd3be1d
2,544
py
Python
wrappers/python/wirepas_messaging/gateway/api/status.py
vvalkonen/backend-apis
769a45e6a90a87ab5af78e9a50ebde12f4821b99
[ "Apache-2.0" ]
9
2019-12-20T06:41:37.000Z
2020-09-21T03:34:47.000Z
wrappers/python/wirepas_messaging/gateway/api/status.py
vvalkonen/backend-apis
769a45e6a90a87ab5af78e9a50ebde12f4821b99
[ "Apache-2.0" ]
38
2019-05-09T09:55:01.000Z
2022-01-04T10:52:46.000Z
wrappers/python/wirepas_messaging/gateway/api/status.py
vvalkonen/backend-apis
769a45e6a90a87ab5af78e9a50ebde12f4821b99
[ "Apache-2.0" ]
13
2019-10-29T19:51:08.000Z
2021-11-25T15:08:02.000Z
""" Status ====== .. Copyright: Copyright 2019 Wirepas Ltd under Apache License, Version 2.0. See file LICENSE for full license details. """ import enum import wirepas_messaging from .event import Event from .wirepas_exceptions import GatewayAPIParsingException # This API should never be...
28.266667
83
0.658412