hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
be205029e1a5e8fcdcab566c0b62e5eadc2bf4fa
4,443
py
Python
tests/unit/packaging/test_init.py
nitinprakash96/warehouse
3d29cacefc41dead6b88fb0882033541626192dd
[ "Apache-2.0" ]
null
null
null
tests/unit/packaging/test_init.py
nitinprakash96/warehouse
3d29cacefc41dead6b88fb0882033541626192dd
[ "Apache-2.0" ]
null
null
null
tests/unit/packaging/test_init.py
nitinprakash96/warehouse
3d29cacefc41dead6b88fb0882033541626192dd
[ "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 the Li...
33.659091
79
0.591717
# 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 the Li...
0
3,518
0
0
0
0
0
159
225
65638fba0096ce4d83325f279622ffd89505702c
1,475
py
Python
AtmlReader/AtmlFile.py
ni-kismet/systemlink-testmodule-atml-uploader
a57b1b9b28049affa95b97151fb8d7da1e765914
[ "MIT" ]
null
null
null
AtmlReader/AtmlFile.py
ni-kismet/systemlink-testmodule-atml-uploader
a57b1b9b28049affa95b97151fb8d7da1e765914
[ "MIT" ]
null
null
null
AtmlReader/AtmlFile.py
ni-kismet/systemlink-testmodule-atml-uploader
a57b1b9b28049affa95b97151fb8d7da1e765914
[ "MIT" ]
null
null
null
import json try: from AtmlReader.AtmlTestResults import AtmlTestResults except: if __name__ == "__main__": atml_file_path = r'C:\repos\battery-tester\Cycle Test\Battery Cycle Test_Report[3 22 37 PM][2 5 2020].xml' atml_file = AtmlFile(atml_file_path) atml_file_string = atml_file.to_js...
35.119048
111
0.632542
import xml.etree.ElementTree as et import json import subprocess import pathlib import os try: from AtmlReader.AtmlTestResults import AtmlTestResults except: from AtmlTestResults import AtmlTestResults class AtmlFile(object): def __init__(self, file_path): file_handle = N...
0
0
0
819
0
0
0
12
155
ce4770ed1c428f7c01462b191930b0e058511863
830
py
Python
setup.py
sebastiankmiec/pyscatwave
15d37d4e7fdd23b0e1435d223d011f9d15d95386
[ "BSD-3-Clause" ]
312
2017-03-29T16:48:24.000Z
2022-02-16T16:45:33.000Z
setup.py
sebastiankmiec/pyscatwave
15d37d4e7fdd23b0e1435d223d011f9d15d95386
[ "BSD-3-Clause" ]
23
2017-03-29T20:52:38.000Z
2021-01-15T15:18:29.000Z
setup.py
sebastiankmiec/pyscatwave
15d37d4e7fdd23b0e1435d223d011f9d15d95386
[ "BSD-3-Clause" ]
63
2017-03-29T23:13:07.000Z
2020-09-19T07:49:22.000Z
#!/usr/bin/env python from setuptools import setup, find_packages VERSION = '0.0.1' long_description = """ Fast CPU/CUDA Scattering implementation CuPy/PyTorch CUDA and NumPy/PyTorch CUDA implementation """ setup_info = dict( # Metadata name='scatwave', version=VERSION, author='Edouard Oyallon, Euge...
21.842105
96
0.708434
#!/usr/bin/env python import os import shutil import sys from setuptools import setup, find_packages VERSION = '0.0.1' long_description = """ Fast CPU/CUDA Scattering implementation CuPy/PyTorch CUDA and NumPy/PyTorch CUDA implementation """ setup_info = dict( # Metadata name='scatwave', version=VERSION...
0
0
0
0
0
0
0
-31
66
de19fb78b94898d1672dec9caa30990affb77632
1,004,321
py
Python
escriptcore/test/python/test_util_unary_no_tagged_data.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
escriptcore/test/python/test_util_unary_no_tagged_data.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
1
2019-01-14T03:07:43.000Z
2019-01-14T03:07:43.000Z
escriptcore/test/python/test_util_unary_no_tagged_data.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
############################################################################## # # Copyright (c) 2003-2018 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
89.241248
165
0.702183
############################################################################## # # Copyright (c) 2003-2018 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
0
0
0
1,002,825
0
0
0
23
156
ccd0c65e59e911aaf427a6114da5d3b93fff8755
2,497
py
Python
src/DataCount/CountText.py
chenshihang/Analysis-of-College-Graduates-Employment-Orientation
5f666130c64d8e87f1ee5760b491a9647240fa76
[ "MIT" ]
null
null
null
src/DataCount/CountText.py
chenshihang/Analysis-of-College-Graduates-Employment-Orientation
5f666130c64d8e87f1ee5760b491a9647240fa76
[ "MIT" ]
null
null
null
src/DataCount/CountText.py
chenshihang/Analysis-of-College-Graduates-Employment-Orientation
5f666130c64d8e87f1ee5760b491a9647240fa76
[ "MIT" ]
1
2019-09-30T03:05:56.000Z
2019-09-30T03:05:56.000Z
import os #by workDir = "F:\data3st" os.chdir(workDir) # # SaveData()
36.188406
103
0.504606
import os import xlwt #by 学波 用于词频统计 class CountData: def __init__(self): self.__CountList = {} self.__fileCount = 0 self.__SumRecode = 0 def Countsub(self,strFile): #print(strFile) with open(strFile,'r',encoding='utf-8') as f: fileData = f.readline() ...
78
0
0
1,921
0
419
0
-10
66
529a57c469ce00ccb081e33f50f7b47c4af0519f
3,882
py
Python
download_cimiss.py
NingAnMe/GFSSI
066ac3dcffe04927aa497ee8b2257bee3ec3789a
[ "MIT" ]
1
2020-08-18T08:05:35.000Z
2020-08-18T08:05:35.000Z
download_cimiss.py
NingAnMe/GFSSI
066ac3dcffe04927aa497ee8b2257bee3ec3789a
[ "MIT" ]
null
null
null
download_cimiss.py
NingAnMe/GFSSI
066ac3dcffe04927aa497ee8b2257bee3ec3789a
[ "MIT" ]
1
2020-08-26T06:50:59.000Z
2020-08-26T06:50:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/12/19 9:27 # @Author : NingAnMe <ninganme@qq.com> import argparse from dateutil.relativedelta import relativedelta from datetime import datetime if __name__ == '__main__': parser = argparse.ArgumentParser(description='Download CIMISS') pars...
34.052632
93
0.592221
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/12/19 9:27 # @Author : NingAnMe <ninganme@qq.com> import argparse from dateutil.relativedelta import relativedelta import time from datetime import datetime import os import requests from lib.lib_cimiss import get_cimiss_ssi_ssh_tem_data from config i...
246
0
0
0
0
2,626
0
15
181
7142af4aac42d9860780ea4c498078ad7d10ad08
1,854
py
Python
github_app/sendmessage.py
yyc0309/watsonwork-github-issues
3377ff0fa87e5323165c7b2db9e9a3fc5da6ca50
[ "Apache-2.0" ]
null
null
null
github_app/sendmessage.py
yyc0309/watsonwork-github-issues
3377ff0fa87e5323165c7b2db9e9a3fc5da6ca50
[ "Apache-2.0" ]
7
2018-03-05T21:14:04.000Z
2018-03-09T23:16:37.000Z
github_app/sendmessage.py
yyc0309/watsonwork-github-issues
3377ff0fa87e5323165c7b2db9e9a3fc5da6ca50
[ "Apache-2.0" ]
null
null
null
from flask import Blueprint # Define blueprint module sendmessage = Blueprint('sendmessage', __name__, url_prefix='/sendmessage') # Expose endpoint for testing the mechanism to send a message to Watson Work Services # Construct a message leveraging the Generic Annotation template andd call send method # Leverage t...
31.965517
94
0.703883
import json import requests from flask import current_app, request, Response, Blueprint from auth import authenticateApp # Define blueprint module sendmessage = Blueprint('sendmessage', __name__, url_prefix='/sendmessage') # Expose endpoint for testing the mechanism to send a message to Watson Work Services @sendme...
0
196
0
0
0
985
0
27
178
13b89204dca35c96304dec62d9598ba1ad8480f9
3,684
py
Python
idaes/surrogate/sampling/data_utils.py
carldlaird/idaes-pse
cc7a32ca9fa788f483fa8ef85f3d1186ef4a596f
[ "RSA-MD" ]
null
null
null
idaes/surrogate/sampling/data_utils.py
carldlaird/idaes-pse
cc7a32ca9fa788f483fa8ef85f3d1186ef4a596f
[ "RSA-MD" ]
1
2021-02-27T00:40:54.000Z
2021-03-01T13:51:55.000Z
idaes/surrogate/sampling/data_utils.py
carldlaird/idaes-pse
cc7a32ca9fa788f483fa8ef85f3d1186ef4a596f
[ "RSA-MD" ]
1
2021-09-10T16:00:58.000Z
2021-09-10T16:00:58.000Z
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
42.837209
100
0.673724
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
0
0
0
0
0
0
0
0
0
f8ad6b481f8d2a08882107446c48c79e4c834c86
4,107
py
Python
krait.py
NiyeT/Krait
6e9d2ec874ea445ac128779425ff7ff0371b105c
[ "Unlicense" ]
null
null
null
krait.py
NiyeT/Krait
6e9d2ec874ea445ac128779425ff7ff0371b105c
[ "Unlicense" ]
null
null
null
krait.py
NiyeT/Krait
6e9d2ec874ea445ac128779425ff7ff0371b105c
[ "Unlicense" ]
null
null
null
# class user: # def __init__(self): # pass # username='Public@Krait: ' # paths='//home/cress/Lucy/bin://home/cress/Lucy/applications' # #takes: # #username # #returns: # #user location # def user_search(self,username): # username=username + '.data' # user_container=os.getcwd() + '/users/' # usern...
22.442623
75
0.683224
from re import findall from json import loads import os from termcolor import colored # class user: # def __init__(self): # pass # username='Public@Krait: ' # paths='//home/cress/Lucy/bin://home/cress/Lucy/applications' # #takes: # #username # #returns: # #use...
0
0
0
2,169
0
0
0
-2
178
c09bfc31d90d12bf2c63f4bbd3757f95df70a46d
11,085
py
Python
app/datapipeline.py
Napam/Stockybocky
e42791687c08a6b138569aacec11fb77b2ee1988
[ "Apache-2.0" ]
2
2020-01-27T08:17:54.000Z
2020-01-27T08:56:25.000Z
app/datapipeline.py
Laohachot/Stockybocky
b5c9937b5eb102f530157d0278ad4897f23a2744
[ "Apache-2.0" ]
3
2020-08-05T15:04:30.000Z
2021-03-31T20:05:07.000Z
app/datapipeline.py
Napam/Stockybocky
e42791687c08a6b138569aacec11fb77b2ee1988
[ "Apache-2.0" ]
null
null
null
''' Run this to get html files This file contains code to obtain html data from oslo bors and yahoo finance ''' import argparse import re import threading import sys import numpy as np import pandas as pd import pypatconsole as ppc from bs4 import BeautifulSoup as bs from pandas import DataFrame, to_numeric from sele...
35.643087
121
0.636626
''' Run this to get html files This file contains code to obtain html data from oslo bors and yahoo finance ''' import argparse import re import threading import time from pprint import pprint from typing import List import sys import pathlib import os import numpy as np import pandas as pd import pypatconsole as ppc...
0
0
0
0
0
151
0
-23
156
3b31929f171c06986d62a9c2bd65a4da2d0334fe
512
py
Python
samples/SQLActivityWithTimeout/setup/Teardown.py
pushpeshg/data-pipeline-samples
3be77bd7ddb0021fc36074718da225f84aac21fd
[ "MIT-0" ]
277
2015-07-17T21:15:16.000Z
2018-01-31T02:40:17.000Z
samples/SQLActivityWithTimeout/setup/Teardown.py
pushpeshg/data-pipeline-samples
3be77bd7ddb0021fc36074718da225f84aac21fd
[ "MIT-0" ]
33
2015-07-18T07:18:05.000Z
2017-11-24T00:19:32.000Z
samples/SQLActivityWithTimeout/setup/Teardown.py
pushpeshg/data-pipeline-samples
3be77bd7ddb0021fc36074718da225f84aac21fd
[ "MIT-0" ]
198
2015-07-17T20:43:55.000Z
2018-01-24T11:25:27.000Z
from SQLActivitySample import SQLActivitySample from Utilities import check_working_directory import argparse if __name__ == '__main__': check_working_directory() parser = argparse.ArgumentParser(description='Teardown for SQLAcivityPipeline pipeline sample') parser.add_argument('--rds-instance-id', acti...
28.444444
99
0.767578
from SQLActivitySample import SQLActivitySample from Utilities import check_working_directory import argparse if __name__ == '__main__': check_working_directory() parser = argparse.ArgumentParser(description='Teardown for SQLAcivityPipeline pipeline sample') parser.add_argument('--rds-instance-id', acti...
0
0
0
0
0
0
0
0
0
87d91f231f23689ab79fdb4f70227c087ffb0d18
1,555
py
Python
utils/network_utils.py
ByungKwanLee/Masking-Adversarial-Damage
30c39f889b320e26685aab418e7e6b2cc1d12e93
[ "MIT" ]
3
2022-03-11T10:29:20.000Z
2022-03-13T07:31:31.000Z
utils/network_utils.py
ByungKwanLee/Masking-Adversarial-Damage
30c39f889b320e26685aab418e7e6b2cc1d12e93
[ "MIT" ]
null
null
null
utils/network_utils.py
ByungKwanLee/Masking-Adversarial-Damage
30c39f889b320e26685aab418e7e6b2cc1d12e93
[ "MIT" ]
null
null
null
def stablize_bn(net, trainloader, device='cuda'): """Iterate over the dataset for stabilizing the BatchNorm statistics. """ net = net.train() for batch, (inputs, _) in enumerate(trainloader): inputs = inputs.to(device) net(inputs)
39.871795
102
0.659807
import torch from models.vgg import VGG from models.resnet import resnet from models.wide import wide_resnet def get_network(network, depth, dataset, device=None): if dataset == 'cifar10': mean = torch.tensor([0.4914, 0.4822, 0.4465]).to(device) std = torch.tensor([0.2023, 0.1994, 0.2010]).to(dev...
0
0
0
0
0
1,154
0
21
111
65726d3da264760d6fd2e6837e9f2cbebd3605a8
2,025
py
Python
src/ns_web_api/web/models.py
steny138/PyNintendoEPrice
def9c95690cf3cf72615ae4216fee8fca2934de1
[ "Apache-2.0" ]
null
null
null
src/ns_web_api/web/models.py
steny138/PyNintendoEPrice
def9c95690cf3cf72615ae4216fee8fca2934de1
[ "Apache-2.0" ]
3
2020-06-22T15:38:18.000Z
2021-11-24T02:01:51.000Z
src/ns_web_api/web/models.py
steny138/PyNintendoEPrice
def9c95690cf3cf72615ae4216fee8fca2934de1
[ "Apache-2.0" ]
1
2018-08-04T08:15:05.000Z
2018-08-04T08:15:05.000Z
# coding: utf-8 from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
36.818182
63
0.684938
# coding: utf-8 from sqlalchemy import Boolean, Column, DateTime, Float, String from sqlalchemy.dialects.postgresql.base import UUID from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() class Game(db.Model): __tablename__ = 'games' id = db.Column(UUID(as_uuid=True), primary_key=True) nsuid = db.Co...
0
0
0
1,808
0
0
0
73
67
a39e043d5c7f6fdd001e260aa5bf45b5c9dc2ebd
2,418
py
Python
src/forms/login.py
Dourv/tornado-mongo
95dbd1151abac2831d98b6d768a86f59b11c273d
[ "MIT" ]
2
2015-04-21T14:49:05.000Z
2015-04-21T15:15:40.000Z
src/forms/login.py
Dourv/tornado-mongo
95dbd1151abac2831d98b6d768a86f59b11c273d
[ "MIT" ]
null
null
null
src/forms/login.py
Dourv/tornado-mongo
95dbd1151abac2831d98b6d768a86f59b11c273d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*-
23.940594
102
0.588503
#!/usr/bin/env python # -*- coding: utf-8 -*- from bson.objectid import ObjectId from pymongo import MongoClient from validate_email import validate_email from views.base import base import config import hashlib class login(): @property def db(self): if config.debug == True: client = MongoClient('localhost', ...
8
219
0
1,949
0
0
0
34
157
6c82a5facdaeab00a4faf40fb2cdbae5e793ddb5
3,637
py
Python
tests/m_btree_input.py
astrorigin/mulib
f1b2b2df02f04ebfc7e5f4f2f45ce337b38a3702
[ "MIT" ]
null
null
null
tests/m_btree_input.py
astrorigin/mulib
f1b2b2df02f04ebfc7e5f4f2f45ce337b38a3702
[ "MIT" ]
null
null
null
tests/m_btree_input.py
astrorigin/mulib
f1b2b2df02f04ebfc7e5f4f2f45ce337b38a3702
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Send input commands to the BTree test app. ins X rem X (etc) """ import random random.seed() # Simple rotations # Double rotations # Simple rotations with weights # Double rotations with weights if __name__ == '__main__': main1() # end.
17.741463
90
0.467143
#!/usr/bin/env python # -*- coding: utf-8 -*- """Send input commands to the BTree test app. ins X rem X (etc) """ import random random.seed() # Simple rotations def test_000(): lst = [10, 20, 30] for x in lst: print('ins %s' % x) # for x in lst: print('rem %s' % x) # def test...
0
0
0
0
0
2,879
0
0
460
f3596fcc83e32b63d5f738015a37dc323c629e46
8,271
py
Python
mytasks/tasks.py
redenter/Mytasks
febbb4e58c3cf0654d14f009500fb974fdf65aee
[ "MIT" ]
null
null
null
mytasks/tasks.py
redenter/Mytasks
febbb4e58c3cf0654d14f009500fb974fdf65aee
[ "MIT" ]
null
null
null
mytasks/tasks.py
redenter/Mytasks
febbb4e58c3cf0654d14f009500fb974fdf65aee
[ "MIT" ]
null
null
null
# A collection of tasks # Instances of this class should be able to add a task # to the collection, delete it, update it and provide a list or a subset of # collection for display #t = Tasks() #t.addTask(10,0,{}) #t.addTask(11,10,{}) #t.updateTask(taskId = 10, prop={'test':1}) #print t.createDict() #t...
34.606695
83
0.547697
from tree import Tree; from tree import deb import datetime from fileDB import FileDB import random; # A collection of tasks # Instances of this class should be able to add a task # to the collection, delete it, update it and provide a list or a subset of # collection for display class Tasks: ROOT_TASK_ID = 0 ...
0
0
0
7,788
0
0
0
-11
135
3841155bd04950ebcfe824abcbc3e80de8f5c46b
12,458
py
Python
welcome.py
snorthov/key-protect-helloworld-python
f0682b76b13c0dd26584956e9539fe77225f3845
[ "Apache-2.0" ]
null
null
null
welcome.py
snorthov/key-protect-helloworld-python
f0682b76b13c0dd26584956e9539fe77225f3845
[ "Apache-2.0" ]
null
null
null
welcome.py
snorthov/key-protect-helloworld-python
f0682b76b13c0dd26584956e9539fe77225f3845
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
34.798883
118
0.640151
# Copyright 2015 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
0
10,005
0
0
0
1,147
0
-12
360
a541cf15befe55e2ef3fe86ca6d7d93b1850756b
2,502
py
Python
server/audiofire.py
behrat/ted
c119847e7fcc01a513e765b1ce7c1e9b68e9cbe1
[ "MIT" ]
null
null
null
server/audiofire.py
behrat/ted
c119847e7fcc01a513e765b1ce7c1e9b68e9cbe1
[ "MIT" ]
null
null
null
server/audiofire.py
behrat/ted
c119847e7fcc01a513e765b1ce7c1e9b68e9cbe1
[ "MIT" ]
null
null
null
import dbus import time import subprocess bus = dbus.SessionBus() dest = 'org.ffado.Control' mixer_object = '/org/ffado/Control/DeviceManager/001486089d5fa7e6/Mixer' discrete_interface='org.ffado.Control.Element.Discrete' continuous_interface='org.ffado.Control.Element.Continuous' mixer_interface='org.ffado.Control.El...
25.272727
77
0.602318
import dbus import time import subprocess bus = dbus.SessionBus() dest = 'org.ffado.Control' mixer_object = '/org/ffado/Control/DeviceManager/001486089d5fa7e6/Mixer' discrete_interface='org.ffado.Control.Element.Discrete' continuous_interface='org.ffado.Control.Element.Continuous' mixer_interface='org.ffado.Control.El...
0
0
0
0
0
1,199
0
0
92
d3b36993ed85e1c4ae79743c450e142bc716b3ce
2,749
py
Python
unasync.py
jborean93/httpcore
ed76a30277529c5687cbdb6e203d6dbd0d56833f
[ "BSD-3-Clause" ]
null
null
null
unasync.py
jborean93/httpcore
ed76a30277529c5687cbdb6e203d6dbd0d56833f
[ "BSD-3-Clause" ]
36
2020-12-01T05:44:12.000Z
2022-03-01T08:01:28.000Z
unasync.py
jborean93/httpcore
ed76a30277529c5687cbdb6e203d6dbd0d56833f
[ "BSD-3-Clause" ]
null
null
null
#!venv/bin/python import re SUBS = [ ('AsyncIteratorByteStream', 'IteratorByteStream'), ('AsyncIterator', 'Iterator'), ('AutoBackend', 'SyncBackend'), ('Async([A-Z][A-Za-z0-9_]*)', r'Sync\2'), ('async def', 'def'), ('async with', 'with'), ('async for', 'for'), ('await ', ''), ('areq...
32.341176
84
0.576573
#!venv/bin/python import re import os import sys SUBS = [ ('AsyncIteratorByteStream', 'IteratorByteStream'), ('AsyncIterator', 'Iterator'), ('AutoBackend', 'SyncBackend'), ('Async([A-Z][A-Za-z0-9_]*)', r'Sync\2'), ('async def', 'def'), ('async with', 'with'), ('async for', 'for'), ('awa...
0
0
0
0
0
1,704
0
-23
159
83f1671f57157574b474d92e9550e8cc98de310b
18,774
py
Python
official/projects/triviaqa/preprocess.py
Nobatgeldi/models
993dbf54da0d9e257f07a49616be7d93292b4a14
[ "Apache-2.0" ]
4
2019-11-02T14:47:46.000Z
2022-01-14T10:43:02.000Z
official/projects/triviaqa/preprocess.py
Nobatgeldi/models
993dbf54da0d9e257f07a49616be7d93292b4a14
[ "Apache-2.0" ]
null
null
null
official/projects/triviaqa/preprocess.py
Nobatgeldi/models
993dbf54da0d9e257f07a49616be7d93292b4a14
[ "Apache-2.0" ]
1
2019-11-04T20:32:02.000Z
2019-11-04T20:32:02.000Z
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.383721
80
0.667732
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38
905
0
6,873
0
449
0
-4
366
4eea2f98b28ac0e6319f7682c8913f1c0a76a52b
5,793
py
Python
src/cmu-16662-robot-ctrl/scripts/tag_estimator.py
karunthewarrior/Stack-d
fb678a9a47298280054ae7df3f2b317e472ac10e
[ "MIT" ]
null
null
null
src/cmu-16662-robot-ctrl/scripts/tag_estimator.py
karunthewarrior/Stack-d
fb678a9a47298280054ae7df3f2b317e472ac10e
[ "MIT" ]
null
null
null
src/cmu-16662-robot-ctrl/scripts/tag_estimator.py
karunthewarrior/Stack-d
fb678a9a47298280054ae7df3f2b317e472ac10e
[ "MIT" ]
1
2022-03-08T02:01:53.000Z
2022-03-08T02:01:53.000Z
import numpy as np import rospy import kinematics as kin import ArmController as ac if __name__ =="__main__": rospy.init_node('marker_publisher', anonymous=True) estimator = tag_estimator() arm_controller = ac.ArmController() tilt_controller = ac.CamController('/tilt/state','/tilt/command') pan_co...
36.20625
189
0.59054
import numpy as np from ar_track_alvar_msgs.msg import AlvarMarkers from std_msgs.msg import Float64MultiArray,Float64 import rospy import math import kinematics as kin import ArmController as ac import transforms3d as tf class tag_estimator: def __init__(self): self.camera_pose_topic = "/ar_pose_marker" ...
0
0
0
2,758
0
582
0
50
157
6bc8c90500525fbcfab1280c8ee5ce55d8b39146
2,111
py
Python
loader_imagenet_like.py
scheckmedia/semi-supervised-learning-pytorch
95858e6fa38bba10ef7dc00cf5fc8411a023e89b
[ "MIT" ]
null
null
null
loader_imagenet_like.py
scheckmedia/semi-supervised-learning-pytorch
95858e6fa38bba10ef7dc00cf5fc8411a023e89b
[ "MIT" ]
null
null
null
loader_imagenet_like.py
scheckmedia/semi-supervised-learning-pytorch
95858e6fa38bba10ef7dc00cf5fc8411a023e89b
[ "MIT" ]
null
null
null
import torch.utils.data as data import os import sys if sys.version_info[0] == 2: import pickle as pickle else:
29.732394
121
0.587399
from torchvision.datasets.utils import download_url, check_integrity import torch.utils.data as data from PIL import Image import os from glob import glob import os.path import errno import numpy as np import sys if sys.version_info[0] == 2: import pickle as pickle else: import pickle class ImagenetLike(data...
0
0
0
1,792
0
0
0
20
182
ba13f34da53c89109c916d4943d63a2f0875e254
118
py
Python
python/testData/intentions/PyInvertIfConditionIntentionTest/conditionAsync.py
Tasemo/intellij-community
50aeaf729b7073e91c7c77487a1f155e0dfe3fcd
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/intentions/PyInvertIfConditionIntentionTest/conditionAsync.py
Tasemo/intellij-community
50aeaf729b7073e91c7c77487a1f155e0dfe3fcd
[ "Apache-2.0" ]
null
null
null
python/testData/intentions/PyInvertIfConditionIntentionTest/conditionAsync.py
Tasemo/intellij-community
50aeaf729b7073e91c7c77487a1f155e0dfe3fcd
[ "Apache-2.0" ]
null
null
null
<caret>if await get_value(): print("Not none") else: print("None")
16.857143
28
0.644068
async def get_value(): return "not-none" <caret>if await get_value(): print("Not none") else: print("None")
0
0
21
0
0
0
0
0
22
2e92a9fd3add54f47f8a81f13004387a3eac4b76
315
py
Python
PBLCoders/password.py
Tyler929/tyler929.github.io-Tyler929
f5f0451c55bc12a668b7ad880995c96bd4c0d5ed
[ "MIT" ]
null
null
null
PBLCoders/password.py
Tyler929/tyler929.github.io-Tyler929
f5f0451c55bc12a668b7ad880995c96bd4c0d5ed
[ "MIT" ]
null
null
null
PBLCoders/password.py
Tyler929/tyler929.github.io-Tyler929
f5f0451c55bc12a668b7ad880995c96bd4c0d5ed
[ "MIT" ]
null
null
null
username = 'Tyler85' password = 'surfing29' userInput = input("What is your username?\n (Hint: Tyler85):") if userInput == username: a=input("Password?\n (Hint: surfing29)") if a == password: print("Welcome Tyler!") else: print("Wrong password.") else: print("Wrong username.")
22.5
62
0.619048
username = 'Tyler85' password = 'surfing29' userInput = input("What is your username?\n (Hint: Tyler85):") if userInput == username: a=input("Password?\n (Hint: surfing29)") if a == password: print("Welcome Tyler!") else: print("Wrong password.") else: print("Wrong username.")
0
0
0
0
0
0
0
0
0
e6db21529f85de560c3b8bf72aca7d5dc1b6fcd4
10,463
py
Python
mlrun/serving/states.py
EdmondIguazio/mlrun
e63b34a610788ebe522ce7a46642e26927e39882
[ "Apache-2.0" ]
null
null
null
mlrun/serving/states.py
EdmondIguazio/mlrun
e63b34a610788ebe522ce7a46642e26927e39882
[ "Apache-2.0" ]
null
null
null
mlrun/serving/states.py
EdmondIguazio/mlrun
e63b34a610788ebe522ce7a46642e26927e39882
[ "Apache-2.0" ]
1
2021-05-05T14:19:46.000Z
2021-05-05T14:19:46.000Z
# Copyright 2018 Iguazio # # 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, softwa...
29.473239
88
0.619708
# Copyright 2018 Iguazio # # 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, softwa...
0
453
0
7,789
0
342
0
7
296
6ab406f41af13be17dfb7b224ad3b37c48a160a4
1,435
py
Python
src/podping_hivewriter/async_wrapper.py
brianoflondon/podping-hivewriter
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
[ "MIT" ]
11
2021-05-28T15:58:31.000Z
2022-03-21T07:08:58.000Z
src/podping_hivewriter/async_wrapper.py
brianoflondon/podping-hivewriter
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
[ "MIT" ]
33
2021-06-12T09:23:47.000Z
2022-02-27T06:34:05.000Z
src/podping_hivewriter/async_wrapper.py
brianoflondon/podping-hivewriter
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
[ "MIT" ]
3
2021-07-30T19:40:04.000Z
2022-01-19T04:14:14.000Z
from concurrent.futures import ThreadPoolExecutor thread_pool = ThreadPoolExecutor() # Async generator wrapper from https://github.com/django/asgiref/issues/142 iter_async = sync_to_async(iter, thread_sensitive=False) next_async = sync_to_async(_next, thread_sensitive=False)
25.175439
75
0.698258
import inspect from concurrent.futures import ThreadPoolExecutor from functools import wraps from asgiref.sync import sync_to_async as _sync_to_async thread_pool = ThreadPoolExecutor() # Async generator wrapper from https://github.com/django/asgiref/issues/142 def sync_to_async(sync_fn, thread_sensitive=True): ...
0
327
212
0
0
441
0
34
135
4c0dcf71d625893233aa350ac90aac91fbe3dcf3
1,835
py
Python
setup.py
shubh-vashisht/Image-Manipulation-Python
95b823e4f0178471ed4943924c770bbf04919116
[ "MIT" ]
null
null
null
setup.py
shubh-vashisht/Image-Manipulation-Python
95b823e4f0178471ed4943924c770bbf04919116
[ "MIT" ]
null
null
null
setup.py
shubh-vashisht/Image-Manipulation-Python
95b823e4f0178471ed4943924c770bbf04919116
[ "MIT" ]
1
2021-05-26T09:28:56.000Z
2021-05-26T09:28:56.000Z
"""A setuptools based setup module. See: https://packaging.python.org/guides/distributing-packages-using-setuptools/ https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages import pathlib here = pathlib.Path(__file__).parent.resolve() # Get the ...
31.101695
143
0.680109
"""A setuptools based setup module. See: https://packaging.python.org/guides/distributing-packages-using-setuptools/ https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages import pathlib here = pathlib.Path(__file__).parent.resolve() # Get the ...
0
0
0
0
0
0
0
0
0
aa5702eb2ecc463e386da6046a7fbbf10f902093
2,950
py
Python
src/constants.py
harrydaihaolin/Stock-Trading-Server
31a97c24717600510c8b930a1778ad137cacc3e1
[ "Apache-2.0" ]
null
null
null
src/constants.py
harrydaihaolin/Stock-Trading-Server
31a97c24717600510c8b930a1778ad137cacc3e1
[ "Apache-2.0" ]
null
null
null
src/constants.py
harrydaihaolin/Stock-Trading-Server
31a97c24717600510c8b930a1778ad137cacc3e1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 #MAILCHIMPAPIAUDIENCES = { # "audience_name" : "ENTER AUDIENCE NAME", # "company" : "ENTER COMPANY NAME", # "address1" : "ENTER ADDRESS", # "city" : "ENTER CITY", # "state" : "ENTER STATE", # EX: Western Province # "zip_code" : "00300", # "country" : "ENTER COUNTRY", # EX: LK ...
35.97561
179
0.742034
#!/usr/bin/python3 #MAILCHIMPAPIAUDIENCES = { # "audience_name" : "ENTER AUDIENCE NAME", # "company" : "ENTER COMPANY NAME", # "address1" : "ENTER ADDRESS", # "city" : "ENTER CITY", # "state" : "ENTER STATE", # EX: Western Province # "zip_code" : "00300", # "country" : "ENTER COUNTRY", # EX: LK ...
18
0
0
0
0
0
0
0
0
4867cbb299e3b2f48636de04cdc0e920b5c81890
3,830
py
Python
djimix/people/departments.py
carthage-college/django-djimix
8febd4ba9934f6830b7ff6d2dbfb6c1faec3eed5
[ "MIT" ]
null
null
null
djimix/people/departments.py
carthage-college/django-djimix
8febd4ba9934f6830b7ff6d2dbfb6c1faec3eed5
[ "MIT" ]
9
2020-03-29T15:01:10.000Z
2021-12-01T21:23:02.000Z
djimix/people/departments.py
carthage-college/django-djimix
8febd4ba9934f6830b7ff6d2dbfb6c1faec3eed5
[ "MIT" ]
null
null
null
from djimix.core.database import xsql from djimix.sql.departments import (ACADEMIC_DEPARTMENTS, ALL_DEPARTMENTS, DEPARTMENT_FACULTY, DEPARTMENT_DIVISION_CHAIRS, FACULTY_DEPTS, PERSON_DEPARTMENTS, STAFF_DEPTS) from collections import OrderedDict def department(code): """Returns the department given the three lett...
27.753623
79
0.594256
from django.conf import settings from django.core.cache import cache from djimix.core.database import get_connection, xsql from djimix.sql.departments import ( ACADEMIC_DEPARTMENTS, ALL_DEPARTMENTS, DEPARTMENT_FACULTY, DEPARTMENT_DIVISION_CHAIRS, FACULTY_DEPTS, PERSON_DEPARTMENTS, STAFF_DEPTS, ) from colle...
0
0
0
0
0
0
0
56
44
021c883c73f720d52955d16a8f5897ad26dea218
1,152
py
Python
secread/tests/test_secread.py
jifox/secret-server-reader
3e308f00d81dc430f456c113fef15515a1f58fb9
[ "MIT" ]
null
null
null
secread/tests/test_secread.py
jifox/secret-server-reader
3e308f00d81dc430f456c113fef15515a1f58fb9
[ "MIT" ]
null
null
null
secread/tests/test_secread.py
jifox/secret-server-reader
3e308f00d81dc430f456c113fef15515a1f58fb9
[ "MIT" ]
null
null
null
"""Tests for module secread"""
29.538462
72
0.749132
"""Tests for module secread""" import os import pytest from secread import __version__, SecretServer def test_version(): assert __version__ == "0.1.4" @pytest.fixture def sec_server(): return SecretServer() def test_default_slugs_is_a_list(sec_server: SecretServer): slugs = sec_server.SECRET_SERVER_DE...
0
38
0
0
0
869
0
4
204
9138e3ddf1e52832ecfc35214ce14970efafd281
252
py
Python
backend/api/routes/index.py
senavs/todo-list
6476805583d0edbb9df85111cfc799a2144e2c54
[ "Apache-2.0" ]
5
2021-09-08T09:08:17.000Z
2022-02-04T07:21:09.000Z
backend/api/routes/index.py
senavs/todo-list
6476805583d0edbb9df85111cfc799a2144e2c54
[ "Apache-2.0" ]
null
null
null
backend/api/routes/index.py
senavs/todo-list
6476805583d0edbb9df85111cfc799a2144e2c54
[ "Apache-2.0" ]
1
2022-01-29T20:46:27.000Z
2022-01-29T20:46:27.000Z
from fastapi import APIRouter router = APIRouter()
25.2
79
0.781746
from fastapi import APIRouter from starlette.responses import RedirectResponse router = APIRouter() @router.get('/', summary='Redirect home page to docs', include_in_schema=False) def router_docs_redirect(): return RedirectResponse(url='/docs')
0
127
0
0
0
0
0
27
45
332e4f50ac5510888fc9ecd43eaa509a35e25d88
2,354
py
Python
src/dev/kecacc/KecAcc.py
Barkhausen-Institut/gem5-TCU
c3c86be12debec937b9b5dd351df13e5ea43ab4a
[ "BSD-3-Clause" ]
null
null
null
src/dev/kecacc/KecAcc.py
Barkhausen-Institut/gem5-TCU
c3c86be12debec937b9b5dd351df13e5ea43ab4a
[ "BSD-3-Clause" ]
null
null
null
src/dev/kecacc/KecAcc.py
Barkhausen-Institut/gem5-TCU
c3c86be12debec937b9b5dd351df13e5ea43ab4a
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021 Stephan Gerhold # 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 conditions and ...
50.085106
81
0.762107
# Copyright (c) 2021 Stephan Gerhold # 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 conditions and ...
0
0
0
710
0
0
0
25
68
a3f5d3bb812f81acaa4cb80abfc26ff9b895d144
4,823
py
Python
digsby/src/gui/linebox.py
ifwe/digsby
f5fe00244744aa131e07f09348d10563f3d8fa99
[ "Python-2.0" ]
35
2015-08-15T14:32:38.000Z
2021-12-09T16:21:26.000Z
digsby/src/gui/linebox.py
niterain/digsby
16a62c7df1018a49eaa8151c0f8b881c7e252949
[ "Python-2.0" ]
4
2015-09-12T10:42:57.000Z
2017-02-27T04:05:51.000Z
digsby/src/gui/linebox.py
niterain/digsby
16a62c7df1018a49eaa8151c0f8b881c7e252949
[ "Python-2.0" ]
15
2015-07-10T23:58:07.000Z
2022-01-23T22:16:33.000Z
''' Surrounds a panel with lines and a label. Use like a wxPanel, specify label in the constructor. >>> f = wx.Frame(None) >>> box = LineBox(f, label = 'My Controls') >>> button = wx.Button(box, -1, 'Push') ''' import wx if __name__ == '__main__': app = wx.PySimpleApp() f = wx.Frame(None, -1, 'Linebox ...
29.588957
92
0.557329
''' Surrounds a panel with lines and a label. Use like a wxPanel, specify label in the constructor. >>> f = wx.Frame(None) >>> box = LineBox(f, label = 'My Controls') >>> button = wx.Button(box, -1, 'Push') ''' import wx, gui class LineBox(wx.Panel): border = 30 def __init__(self, parent, id = -1, label ...
0
0
0
3,396
0
630
0
5
69
05312233a4e1c057dddf2559b4e429220cb78fea
5,295
py
Python
sources/utils.py
dscorbett/duployan-font
966e4e233f56d818bbbcb4548f1cf232cd3fe4a1
[ "Apache-2.0" ]
6
2020-04-06T02:14:07.000Z
2022-03-22T09:13:47.000Z
sources/utils.py
dscorbett/duployan-font
966e4e233f56d818bbbcb4548f1cf232cd3fe4a1
[ "Apache-2.0" ]
2
2021-07-19T10:20:41.000Z
2021-12-16T01:25:02.000Z
sources/utils.py
dscorbett/duployan-font
966e4e233f56d818bbbcb4548f1cf232cd3fe4a1
[ "Apache-2.0" ]
1
2019-08-04T03:40:57.000Z
2019-08-04T03:40:57.000Z
# Copyright 2018-2019 David Corbett # Copyright 2020-2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
26.742424
142
0.610765
# Copyright 2018-2019 David Corbett # Copyright 2020-2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
0
0
0
4,056
0
24
0
-10
115
781c078b21db466b176b72c9b0c982f37e950402
9,434
py
Python
tests.py
benauthor/python-librdkafka
8cf3c91bebfee4b3640735215ba85f22b08c73ec
[ "BSD-2-Clause" ]
null
null
null
tests.py
benauthor/python-librdkafka
8cf3c91bebfee4b3640735215ba85f22b08c73ec
[ "BSD-2-Clause" ]
null
null
null
tests.py
benauthor/python-librdkafka
8cf3c91bebfee4b3640735215ba85f22b08c73ec
[ "BSD-2-Clause" ]
null
null
null
import logging import unittest kafka_docker = "kafka:9092" # TODO make portable (see fig.yml etc) logging.basicConfig(level=logging.DEBUG) if __name__ == "__main__": unittest.main()
34.811808
93
0.626775
from collections import defaultdict import logging import random import time import unittest from rd_kafka import * import rd_kafka.config_handles from rd_kafka.partition_reader import PartitionReaderException, ConsumerPartition import example kafka_docker = "kafka:9092" # TODO make portable (see fig.yml etc) loggin...
0
915
0
7,684
0
239
0
59
339
ecf816cd81e068c5ce292731327fb5f5f8887779
7,456
py
Python
evaluation.py
yanshao9798/segmenter
b65efb1c8d95b6dd983307039fa645e320eb9b27
[ "Apache-2.0" ]
34
2017-10-08T13:37:34.000Z
2021-09-22T14:06:02.000Z
evaluation.py
yanshao9798/segmenter
b65efb1c8d95b6dd983307039fa645e320eb9b27
[ "Apache-2.0" ]
6
2018-01-11T04:05:35.000Z
2019-04-03T07:50:43.000Z
evaluation.py
yanshao9798/segmenter
b65efb1c8d95b6dd983307039fa645e320eb9b27
[ "Apache-2.0" ]
16
2017-06-21T09:14:24.000Z
2021-06-28T14:52:42.000Z
# -*- coding: utf-8 -*- lcs = {}
33.585586
128
0.477334
# -*- coding: utf-8 -*- import copy def eq_tokens(gt, st): if gt.strip() in ["``", "''"] and st.strip() == '"': return True else: return gt == st lcs = {} def score(gtokens, stokens): for i in range(0, len(gtokens) + 1): lcs[(i, 0)] = 0 for j in range(0, len(stokens) + 1): ...
0
0
0
0
0
7,266
0
-10
160
0bd7e83e4d3798ca144a07540f6b8d2cc1825c73
598
py
Python
bio/reverse_v1.1.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
bio/reverse_v1.1.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
bio/reverse_v1.1.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #version 1.1 pyfasta import sys, os from pyfasta import Fasta if len(sys.argv) != 3: print 'Usage: *.py inputFile outputFile' sys.exit(0) inputFile = sys.argv[1] outputFile = sys.argv[2] if os.path.isfile(inputFile): f = Fasta(inputFile) for key in f.keys(): writeF...
23.92
95
0.688963
#!/usr/bin/env python # -*- coding: utf-8 -*- #version 1.1 此版本使用pyfasta实现。 import sys,os from pyfasta import Fasta if len(sys.argv) != 3: print 'Usage: *.py inputFile outputFile' sys.exit(0) inputFile = sys.argv[1] outputFile = sys.argv[2] def writeFile(text,files): with open(files,'a') as f: f.write(text) if ...
54
0
0
0
0
49
0
-1
23
fe7c49632a5cef2818987ea43acb285e3a364097
2,245
py
Python
plenum/test/primary_selection/test_primary_selection_pool_txn.py
steptan/indy-plenum
488bf63c82753a74a92ac6952da784825ffd4a3d
[ "Apache-2.0" ]
null
null
null
plenum/test/primary_selection/test_primary_selection_pool_txn.py
steptan/indy-plenum
488bf63c82753a74a92ac6952da784825ffd4a3d
[ "Apache-2.0" ]
null
null
null
plenum/test/primary_selection/test_primary_selection_pool_txn.py
steptan/indy-plenum
488bf63c82753a74a92ac6952da784825ffd4a3d
[ "Apache-2.0" ]
null
null
null
# TODO: replace this func with sdk_ensure_pool_functional # TODO: Add more tests to make one next primary crashed, malicious, ensure primary # selection happens after catchup
38.706897
82
0.705568
import pytest from plenum.test.helper import send_reqs_batches_and_get_suff_replies from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data from plenum.test.pool_transactions.helper import add_2_nodes from plenum.test.primary_selection.helper import check_newly_added_nodes # TODO: replace this fu...
0
496
0
0
0
1,153
0
184
225
e0820b3b3296a72573891ea2f457d70b8398a32f
8,935
py
Python
players/deep_q_learning.py
pikatyuu/deep-learning-othello
d9f149b01f079f5d021ba9655445cd43a847a628
[ "MIT" ]
null
null
null
players/deep_q_learning.py
pikatyuu/deep-learning-othello
d9f149b01f079f5d021ba9655445cd43a847a628
[ "MIT" ]
null
null
null
players/deep_q_learning.py
pikatyuu/deep-learning-othello
d9f149b01f079f5d021ba9655445cd43a847a628
[ "MIT" ]
null
null
null
import os.path as path
35.59761
150
0.576049
import os.path as path import random import copy import numpy as np from chainer import Variable, optimizers, serializers, Chain import chainer.functions as F import chainer.links as L import chainer.computational_graph as c import matplotlib.pyplot as plt class Model(Chain): def __init__(self): super(Mode...
0
0
0
8,631
0
0
0
58
222
aa7bdc9d678679532d1b49a7ff2c80d5621863ca
4,376
py
Python
dataset/dataloaders.py
IBM/regen
d4c5c8741166dac3f811f8fa501178b4d292c528
[ "Apache-2.0" ]
7
2021-12-11T00:53:38.000Z
2022-03-27T02:40:56.000Z
dataset/dataloaders.py
IBM/regen
d4c5c8741166dac3f811f8fa501178b4d292c528
[ "Apache-2.0" ]
null
null
null
dataset/dataloaders.py
IBM/regen
d4c5c8741166dac3f811f8fa501178b4d292c528
[ "Apache-2.0" ]
3
2021-12-20T10:33:22.000Z
2022-03-14T05:09:53.000Z
import logging from types import SimpleNamespace from torch.utils.data import DataLoader from torch.utils.data import Subset from torch.utils.data.distributed import DistributedSampler from dataset.webnlg_dataset import WebNLGDataset from dataset.tekgen_dataset import TekGenDataset import cfg logger = logging.getLog...
34.730159
123
0.658135
import logging from types import SimpleNamespace from torch.utils.data import DataLoader from torch.utils.data import Subset from torch.utils.data.distributed import DistributedSampler from dataset.webnlg_dataset import WebNLGDataset from dataset.tekgen_dataset import TekGenDataset import cfg logger = logging.getLog...
0
0
0
0
0
0
0
0
0
53cfd9366199dddb8e052a918a5ecaa444ea695c
6,687
py
Python
airflow/providers/amazon/aws/operators/sagemaker_endpoint.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
airflow/providers/amazon/aws/operators/sagemaker_endpoint.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
airflow/providers/amazon/aws/operators/sagemaker_endpoint.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.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...
42.056604
110
0.68207
# # 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...
0
718
0
4,828
0
0
0
196
157
a97d5a0057412ecec9b9d97f3fcbf510580d7186
1,103
py
Python
bin/.backup.py
peterprotwell/dotfiles
2ce851a7eaf7f13167084b39934b6c9352275584
[ "MIT" ]
null
null
null
bin/.backup.py
peterprotwell/dotfiles
2ce851a7eaf7f13167084b39934b6c9352275584
[ "MIT" ]
null
null
null
bin/.backup.py
peterprotwell/dotfiles
2ce851a7eaf7f13167084b39934b6c9352275584
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os drive = find_backup_drive() backup_dir = f'/Volumes/{drive}/home' print(f'Backing up to {backup_dir}...') dirs = ['books', 'code', 'Compositions', 'Documents', 'dotfiles', 'Movies', 'Music', 'Pictures', 'thoughts'] if not os.path.exists(backup_dir): print(f"Please create directo...
27.575
108
0.611061
#!/usr/bin/env python3 import os def find_backup_drive(): for disk in ['home-silver', 'home-gold', 'home-rose', 'SAGAN']: if os.path.exists(f'/Volumes/{disk}'): return disk print('Please insert your backup drive') exit(1) drive = find_backup_drive() backup_dir = f'/Volumes/{drive}/hom...
0
0
0
0
0
199
0
0
23
c55a57495025458bd9b14446d1c70eb4ab56d365
7,734
py
Python
experiments/bssd_combined_td.py
rrbluke/BSSD
206b7af88eabd7707564857e70d525a9e00a89a2
[ "MIT" ]
7
2021-12-10T03:45:07.000Z
2022-03-16T12:36:17.000Z
experiments/bssd_combined_td.py
rrbluke/BSSD
206b7af88eabd7707564857e70d525a9e00a89a2
[ "MIT" ]
null
null
null
experiments/bssd_combined_td.py
rrbluke/BSSD
206b7af88eabd7707564857e70d525a9e00a89a2
[ "MIT" ]
3
2021-06-09T06:57:36.000Z
2022-01-27T08:55:19.000Z
# -*- coding: utf-8 -*- __author__ = "Lukas Pfeifenberger" import numpy as np import argparse import json import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' sys.path.append(os.path.abspath('../')) import tensorflow as tf np.set_printoptions(precision=3, threshold=3, edgeitems=3) tf.compat.v1.logging.set_v...
33.772926
143
0.532325
# -*- coding: utf-8 -*- __author__ = "Lukas Pfeifenberger" import time import numpy as np import argparse import json import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' sys.path.append(os.path.abspath('../')) from keras.models import Sequential, Model from keras.layers import Layer, Dense, Activation, LSTM...
0
0
0
5,576
0
0
0
292
311
615df94c4c5beacdd6fc0eabd2a923dc5e089ddc
17,957
py
Python
main.py
TomHacker/ICM
81218c52e83760f7a0f0b98677be138ccf5f99f1
[ "MIT" ]
1
2021-01-12T13:02:09.000Z
2021-01-12T13:02:09.000Z
main.py
TomHacker/ICM
81218c52e83760f7a0f0b98677be138ccf5f99f1
[ "MIT" ]
null
null
null
main.py
TomHacker/ICM
81218c52e83760f7a0f0b98677be138ccf5f99f1
[ "MIT" ]
null
null
null
match_path='2020_Problem_D_DATA/matches.csv' passings='2020_Problem_D_DATA/passingevents.csv' fullevents='2020_Problem_D_DATA/fullevents.csv' if __name__=='__main__': conduct_degree()
54.746951
146
0.571978
import pandas as pd import networkx as nx import matplotlib.pyplot as plt import tqdm,json,math from collections import defaultdict match_path='2020_Problem_D_DATA/matches.csv' passings='2020_Problem_D_DATA/passingevents.csv' fullevents='2020_Problem_D_DATA/fullevents.csv' def draw_graph(): fp=pd.read_csv(passings)...
240
0
0
0
0
17,466
0
22
201
4b1fbf9b180d4cf51e99c01f4927a5bab041ed82
11,784
py
Python
roro/cli.py
Sunda001/roro-client
2d265a830b7ed2f32e46f9a9687a545a333e254e
[ "Apache-2.0" ]
1
2018-06-27T13:23:17.000Z
2018-06-27T13:23:17.000Z
roro/cli.py
Sunda001/roro-client
2d265a830b7ed2f32e46f9a9687a545a333e254e
[ "Apache-2.0" ]
3
2017-09-18T10:49:00.000Z
2018-09-27T09:06:34.000Z
roro/cli.py
Sunda001/roro-client
2d265a830b7ed2f32e46f9a9687a545a333e254e
[ "Apache-2.0" ]
2
2018-06-27T13:22:19.000Z
2019-07-01T18:12:22.000Z
from __future__ import print_function
28.601942
132
0.639087
from __future__ import print_function import time import itertools import click import datetime import os import sys import logging from tabulate import tabulate from . import config from . import projects from . import helpers as h from .projects import Project from . import auth from .path import Path from . import ...
0
8,491
0
589
840
640
0
5
1,180
5bb67e3d48e75be43858207bd2592cc6da856b26
2,807
py
Python
channel-api/tests/utils/servers/callback.py
xcantera/demo-provide-baseline
985f391973fa6ca0761104b55077fded28f152fc
[ "CC0-1.0" ]
3
2020-11-17T23:19:20.000Z
2021-03-29T15:08:56.000Z
channel-api/tests/utils/servers/callback.py
xcantera/demo-provide-baseline
985f391973fa6ca0761104b55077fded28f152fc
[ "CC0-1.0" ]
null
null
null
channel-api/tests/utils/servers/callback.py
xcantera/demo-provide-baseline
985f391973fa6ca0761104b55077fded28f152fc
[ "CC0-1.0" ]
1
2020-12-11T00:26:33.000Z
2020-12-11T00:26:33.000Z
import os import logging from flask import Flask HUB_CHALLENGE_ATTR_KEY = 'hub.challenge' PORT = os.environ['PORT'] HOST = '0.0.0.0' app = Flask(__name__) app.config['TESTING'] = True app.config['DEBUG'] = True logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('CALLBACK_SERVER') CALLBACKS_RE...
28.938144
80
0.629141
import os import logging from http import HTTPStatus from libtrustbridge.websub.constants import ( TOPIC_ATTR_KEY, MODE_ATTR_KEY, LEASE_SECONDS_ATTR_KEY ) from flask import Flask, request, jsonify HUB_CHALLENGE_ATTR_KEY = 'hub.challenge' PORT = os.environ['PORT'] HOST = '0.0.0.0' app = Flask(__name__)...
0
2,206
0
0
0
0
0
116
90
13aa7f675ea6eb654dde5b833b99f7826d5cc58e
16,156
py
Python
Coverage and Robustness VS. Training Datasets/robustness.py
jiekeshi/CovTesting_Replication
fd647f4f4a455857476366571af6c7afb50ddab0
[ "MIT" ]
1
2022-01-18T06:56:10.000Z
2022-01-18T06:56:10.000Z
Coverage and Robustness VS. Training Datasets/robustness.py
jiekeshi/CovTesting_Replication
fd647f4f4a455857476366571af6c7afb50ddab0
[ "MIT" ]
1
2022-03-14T09:21:07.000Z
2022-03-14T09:32:03.000Z
Coverage and Robustness VS. Training Datasets/robustness.py
jiekeshi/CovTesting_Replication
fd647f4f4a455857476366571af6c7afb50ddab0
[ "MIT" ]
4
2022-01-16T05:14:50.000Z
2022-02-13T16:00:10.000Z
import os import warnings warnings.filterwarnings("ignore") import numpy as np import tensorflow as tf import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" ####for solving some specific problems, don't care config = tf.compat.v1.ConfigProto() config.gpu_options.allow_growth = True sess = tf.compat.v1.Session(config=c...
38.193853
146
0.603429
import argparse import os import random import shutil import warnings import sys warnings.filterwarnings("ignore") from keras import backend as K import numpy as np from PIL import Image, ImageFilter from skimage.measure import compare_ssim as SSIM import keras from util import get_model import tensorflow as tf impo...
0
0
0
8,793
0
2,596
0
12
311
4ec8643da369134aff65a795b53449b3a82642d1
4,196
py
Python
accelbyte_py_sdk/api/iam/models/oauthmodel_error_response.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/models/oauthmodel_error_response.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/models/oauthmodel_error_response.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
# Auto-generated at 2021-09-27T17:12:31.699868+08:00 # from: Justice Iam Service (4.1.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylint: ...
32.78125
109
0.614871
# Auto-generated at 2021-09-27T17:12:31.699868+08:00 # from: Justice Iam Service (4.1.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylint: ...
0
1,393
0
1,882
0
0
0
42
68
084d4aabcd74476a2630d106154a49fa2c5783d8
10,728
py
Python
scheduled_tasks/db_tasks.py
virtUOS/siddata_backend
e2e09fbb51e650ede2e743ad0a1169c71c064494
[ "MIT" ]
null
null
null
scheduled_tasks/db_tasks.py
virtUOS/siddata_backend
e2e09fbb51e650ede2e743ad0a1169c71c064494
[ "MIT" ]
4
2022-03-28T08:10:46.000Z
2022-03-28T09:29:04.000Z
scheduled_tasks/db_tasks.py
virtUOS/siddata_backend
e2e09fbb51e650ede2e743ad0a1169c71c064494
[ "MIT" ]
null
null
null
""" This module contains all db-related tasks which needs to be executed periodically or as a cron job. The main packages used here to schedule these tasks are `django-apscheduler` and `apscheduler` For reference follow below links: - https://apscheduler.readthedocs.io/en/stable/index.html - https://medium.com/...
46.643478
175
0.708706
""" This module contains all db-related tasks which needs to be executed periodically or as a cron job. The main packages used here to schedule these tasks are `django-apscheduler` and `apscheduler` For reference follow below links: - https://apscheduler.readthedocs.io/en/stable/index.html - https://medium.com/...
0
0
0
0
0
1,881
0
64
225
ca9b56057856e7810720deeb9fb66d434294452a
1,084
py
Python
examples/basic_example/main/models.py
VolkerGoeschl/django-inlineedit
c1656e8c647c02a87c077001775bd8e98d564647
[ "MIT" ]
null
null
null
examples/basic_example/main/models.py
VolkerGoeschl/django-inlineedit
c1656e8c647c02a87c077001775bd8e98d564647
[ "MIT" ]
null
null
null
examples/basic_example/main/models.py
VolkerGoeschl/django-inlineedit
c1656e8c647c02a87c077001775bd8e98d564647
[ "MIT" ]
null
null
null
USER_CHOICES = [ ("a", "Admin"), ("b", "User"), ] INTEGER_CHOICES = [ (0, "Zero"), (1, "One"), (2, "Two"), (3, "Three"), ]
27.1
84
0.698339
from django.db import models from ckeditor.fields import RichTextField USER_CHOICES = [ ("a", "Admin"), ("b", "User"), ] INTEGER_CHOICES = [ (0, "Zero"), (1, "One"), (2, "Two"), (3, "Three"), ] class Person(models.Model): name = models.CharField(max_length=30) approved = models.Boole...
0
0
0
816
0
0
0
27
90
5be7df797794abde04ed0ffa2799fd99df3f6188
1,169
py
Python
main.py
aarondwi/CTE-vs-Explicit-Locking
a8552280a0f183a4cc12fe492b75f7272835415f
[ "MIT" ]
null
null
null
main.py
aarondwi/CTE-vs-Explicit-Locking
a8552280a0f183a4cc12fe492b75f7272835415f
[ "MIT" ]
null
null
null
main.py
aarondwi/CTE-vs-Explicit-Locking
a8552280a0f183a4cc12fe492b75f7272835415f
[ "MIT" ]
null
null
null
from queue import Queue from time import time from sys import argv from writablecte import WritableCte from normal_style_for_update import LockingAccess from normal_style_wo_explicit_locking import WithoutLockingAccess from db_util import create_pool, get_connection if __name__ == "__main__": print(argv) ...
29.974359
71
0.661249
from queue import Queue from threading import Thread, current_thread from time import time from sys import argv from writablecte import WritableCte from normal_style_for_update import LockingAccess from normal_style_wo_explicit_locking import WithoutLockingAccess from db_util import create_pool, get_connection...
0
0
0
0
0
0
0
23
23
04add7854619b117786d79fc93c8c153a3b21cee
1,013
py
Python
recipes/Python/580674_many_uses_randomness__Part/recipe-580674.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/580674_many_uses_randomness__Part/recipe-580674.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/580674_many_uses_randomness__Part/recipe-580674.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
from __future__ import print_function # fn_random.py # A program showing various uses of the "random" function # from the "random" module of Python's standard library. # Author: Vasudev Ram - https://vasudevram.github.io # Copyright 2016 Vasudev Ram from random import random print("Ex. 1. Plain calls to random():")...
27.378378
64
0.688055
from __future__ import print_function # fn_random.py # A program showing various uses of the "random" function # from the "random" module of Python's standard library. # Author: Vasudev Ram - https://vasudevram.github.io # Copyright 2016 Vasudev Ram from random import random from random import getstate, setstate pr...
0
0
0
0
0
0
0
16
22
b27b1b0a463e2a3c81584d128c65bdc24c954205
130
py
Python
FaceSwap-master/pytorch_stylegan_encoder/InterFaceGAN/models/stylegan_generator_model.py
CSID-DGU/-2020-1-OSSP1-ninetynine-2
b1824254882eeea0ee44e4e60896b72c51ef1d2c
[ "MIT" ]
1
2020-06-21T13:45:26.000Z
2020-06-21T13:45:26.000Z
FaceSwap-master/pytorch_stylegan_encoder/InterFaceGAN/models/stylegan_generator_model.py
CSID-DGU/-2020-1-OSSP1-ninetynine-2
b1824254882eeea0ee44e4e60896b72c51ef1d2c
[ "MIT" ]
null
null
null
FaceSwap-master/pytorch_stylegan_encoder/InterFaceGAN/models/stylegan_generator_model.py
CSID-DGU/-2020-1-OSSP1-ninetynine-2
b1824254882eeea0ee44e4e60896b72c51ef1d2c
[ "MIT" ]
3
2020-09-02T03:18:45.000Z
2021-01-27T08:24:05.000Z
version https://git-lfs.github.com/spec/v1 oid sha256:24c11001f7936158881bbcbcee78db69c9bf8cf58917db2dcb42b87230b682ce size 35959
32.5
75
0.884615
version https://git-lfs.github.com/spec/v1 oid sha256:24c11001f7936158881bbcbcee78db69c9bf8cf58917db2dcb42b87230b682ce size 35959
0
0
0
0
0
0
0
0
0
41729ca8e9104a06a08bfb6ba5fed4e7b47b3bbc
838
py
Python
app.py
diewland/nlp-rock-th
0702919b54a6368581c4ea8eff0d2fb0783532ee
[ "MIT" ]
1
2019-09-05T09:48:33.000Z
2019-09-05T09:48:33.000Z
app.py
diewland/nlp-rock
0702919b54a6368581c4ea8eff0d2fb0783532ee
[ "MIT" ]
null
null
null
app.py
diewland/nlp-rock
0702919b54a6368581c4ea8eff0d2fb0783532ee
[ "MIT" ]
null
null
null
from flask import Flask app = Flask(__name__) # prepare clients lang_client = language.LanguageServiceClient() tran_client = translate.Client() # front # process # controller if __name__ == '__main__': app.run(host='0.0.0.0', debug=True)
24.647059
69
0.696897
from flask import Flask, render_template, request, jsonify from nlp_rock import * app = Flask(__name__) # prepare clients lang_client = language.LanguageServiceClient() tran_client = translate.Client() # front @app.route('/') def hello(): return render_template('index.html') # process def do_nlp_process(text): ...
0
288
0
0
0
178
0
36
88
2adb3d7191304436ea251b72bbfd8c14832152e6
495
py
Python
test_settings.py
ibm-skills-network/tahoe-lti
53308c947632a63fc343e176b177145ccfaeba8b
[ "MIT" ]
4
2019-05-02T13:31:44.000Z
2021-03-12T23:02:47.000Z
test_settings.py
ibm-skills-network/tahoe-lti
53308c947632a63fc343e176b177145ccfaeba8b
[ "MIT" ]
9
2019-01-29T17:44:11.000Z
2022-03-14T10:42:06.000Z
test_settings.py
ibm-skills-network/tahoe-lti
53308c947632a63fc343e176b177145ccfaeba8b
[ "MIT" ]
6
2020-05-19T14:13:52.000Z
2021-10-29T19:51:45.000Z
""" Settings for the tests. """ from os.path import abspath, dirname, join import sys def root(*args): """ Get the absolute path of the given path relative to the project root. """ return join(abspath(dirname(__file__)), *args) sys.path.append(root('mocks'))
23.571429
114
0.727273
""" Settings for the tests. """ from os.path import abspath, dirname, join import sys from workbench.settings import * # Using the XBlock generic settings for a shorter settings file from django.conf.global_settings import LOGGING # Fix "file not found" with the workbench.settings LOGGING config def root(*args):...
0
0
0
0
0
0
0
37
178
48a3e2dad0a83181e150c5c060f6a7ef01441dca
1,021
py
Python
Sorting_algos/insertion_sort.py
xtianmcd/Coding_Practice
42eb083c9a8ad612db1e16f966ed20c66bb22f1a
[ "Apache-2.0" ]
null
null
null
Sorting_algos/insertion_sort.py
xtianmcd/Coding_Practice
42eb083c9a8ad612db1e16f966ed20c66bb22f1a
[ "Apache-2.0" ]
null
null
null
Sorting_algos/insertion_sort.py
xtianmcd/Coding_Practice
42eb083c9a8ad612db1e16f966ed20c66bb22f1a
[ "Apache-2.0" ]
null
null
null
test_list = [17, 5, 1, 7, 9, 12, 6, 4, 2, 19] sort_test = insertion_sort(test_list)
36.464286
73
0.5857
def insertion_sort(input_list): sorted_list = [] if not sorted_list: sorted_list.append(input_list[0]) del input_list[0] for element in input_list: print("element to be sorted: {}".format(element)) if element < sorted_list[0]: print("placing {} before {}".format(e...
0
0
0
0
0
913
0
0
22
545d844650bd5621bc481c5be2d1dbefa5adf259
388
py
Python
bin/path_util.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
3,027
2019-04-04T18:52:17.000Z
2022-03-30T09:38:34.000Z
bin/path_util.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
4,080
2019-04-04T19:51:11.000Z
2022-03-31T23:45:21.000Z
bin/path_util.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
1,342
2019-04-04T20:50:53.000Z
2022-03-31T15:22:36.000Z
#!/usr/bin/python if "hummingbot-dist" in __file__: # Dist environment. import os import sys sys.path.append(sys.path.pop(0)) sys.path.insert(0, os.getcwd()) import hummingbot hummingbot.set_prefix_path(os.getcwd()) else: # Dev environment. from os.path import join, realpath im...
22.823529
58
0.654639
#!/usr/bin/python if "hummingbot-dist" in __file__: # Dist environment. import os import sys sys.path.append(sys.path.pop(0)) sys.path.insert(0, os.getcwd()) import hummingbot hummingbot.set_prefix_path(os.getcwd()) else: # Dev environment. from os.path import join, realpath im...
0
0
0
0
0
0
0
0
0
0df3210de606fcc1eca7485ece84477affa55f8f
989
py
Python
django/helpdesk/table_api/migrations/0001_initial.py
Netromnik/python
630a9df63b1cade9af38de07bb9cd0c3b8694c93
[ "Apache-2.0" ]
null
null
null
django/helpdesk/table_api/migrations/0001_initial.py
Netromnik/python
630a9df63b1cade9af38de07bb9cd0c3b8694c93
[ "Apache-2.0" ]
null
null
null
django/helpdesk/table_api/migrations/0001_initial.py
Netromnik/python
630a9df63b1cade9af38de07bb9cd0c3b8694c93
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.19 on 2021-03-06 11:34 import django.db.models.deletion
31.903226
118
0.625885
# Generated by Django 2.2.19 on 2021-03-06 11:34 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.db.models.manager class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings...
30
0
0
761
0
0
0
40
90
058615c75ff1f32d7326bf838115b8287c201a4f
659
py
Python
migrations/versions/0351_change_email_address_of_seeded_user.py
TechforgoodCAST/notifications-api
242d2f67ff3a3febbc41cdf6da1e18e14512c0ce
[ "MIT" ]
null
null
null
migrations/versions/0351_change_email_address_of_seeded_user.py
TechforgoodCAST/notifications-api
242d2f67ff3a3febbc41cdf6da1e18e14512c0ce
[ "MIT" ]
3
2021-02-18T10:57:01.000Z
2021-02-26T06:29:24.000Z
migrations/versions/0351_change_email_address_of_seeded_user.py
bitzesty/notifications-api
3e8d02792d19931e0cb5881feb2630b545a1140d
[ "MIT" ]
null
null
null
""" Revision ID: 428551b7cf6f Revises: e17533d246ab Create Date: 2021-03-10 12:45:08.022940 """ revision = '428551b7cf6f' down_revision = 'e17533d246ab'
27.458333
152
0.751138
""" Revision ID: 428551b7cf6f Revises: e17533d246ab Create Date: 2021-03-10 12:45:08.022940 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql import os revision = '428551b7cf6f' down_revision = 'e17533d246ab' def upgrade(): email_address = "support@" + os.environ.get...
0
0
0
0
0
355
0
12
134
5947c9569229f0ccd0f11b336ed179e1df29af3f
233
py
Python
setup.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
null
null
null
setup.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
8
2021-03-30T13:03:11.000Z
2022-03-12T00:20:13.000Z
setup.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
null
null
null
''' Author: Saijal Shakya Development: > LMS: December 20, 2018 > HRM: Febraury 15, 2019 > CRM: March, 2020 > Inventory Sys: April, 2020 > Analytics: ... License: Credited Contact: https://saijalshakya.com.np '''
19.416667
36
0.639485
''' Author: Saijal Shakya Development: > LMS: December 20, 2018 > HRM: Febraury 15, 2019 > CRM: March, 2020 > Inventory Sys: April, 2020 > Analytics: ... License: Credited Contact: https://saijalshakya.com.np '''
0
0
0
0
0
0
0
0
0
a5277e1f97219599f5ec2a7e5e942a7132f2f2e6
1,390
py
Python
wavespectra/core/attributes.py
jorgeperezg/wavespectra-1
ad7d737edf05ae801d5d6e79199f704eb092d95e
[ "MIT" ]
19
2020-01-22T04:06:24.000Z
2022-01-16T17:10:01.000Z
wavespectra/core/attributes.py
jorgeperezg/wavespectra-1
ad7d737edf05ae801d5d6e79199f704eb092d95e
[ "MIT" ]
50
2019-08-31T07:11:54.000Z
2021-11-17T23:20:42.000Z
wavespectra/core/attributes.py
jorgeperezg/wavespectra-1
ad7d737edf05ae801d5d6e79199f704eb092d95e
[ "MIT" ]
13
2020-03-03T16:24:51.000Z
2022-02-23T07:18:08.000Z
"""Standarise SpecArray attributes. attrs (dict): standarised names for spectral variables, standard_names and units """ # from collections import OrderedDict import os import yaml HERE = os.path.dirname(os.path.abspath(__file__)) with open(os.path.join(HERE, "attributes.yml")) as stream: attrs = AttrDict(yaml...
26.730769
80
0.63741
"""Standarise SpecArray attributes. attrs (dict): standarised names for spectral variables, standard_names and units """ # from collections import OrderedDict import os import yaml HERE = os.path.dirname(os.path.abspath(__file__)) class AttrDict(dict): MARKER = object() def __init__(self, value=None): ...
0
0
0
765
0
0
0
0
23
db5d359a6067103587dd31bd4d4a6a9e64bd3c7d
3,013
py
Python
nmap-hsts.py
njfox/nmap-hsts
072adf8e11f96dfc1a33277c557b3416586e628b
[ "MIT" ]
null
null
null
nmap-hsts.py
njfox/nmap-hsts
072adf8e11f96dfc1a33277c557b3416586e628b
[ "MIT" ]
null
null
null
nmap-hsts.py
njfox/nmap-hsts
072adf8e11f96dfc1a33277c557b3416586e628b
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys USAGE = "Usage: ./nmap-hsts.py nmap.xml" proxies = { "http": "http://127.0.0.1:8080", "https": "http://127.0.0.1:8080" } if __name__ == "__main__": if len(sys.argv) != 2: print(USAGE) sys.exit(1) hosts = parse_services(sys.argv[1]) vulnerable_ur...
31.061856
115
0.556588
#!/usr/bin/python3 import sys import requests import xml.etree.ElementTree as et USAGE = "Usage: ./nmap-hsts.py nmap.xml" proxies = { "http": "http://127.0.0.1:8080", "https": "http://127.0.0.1:8080" } class Host(object): def __init__(self): self.address = '' self.hostnames = [] ...
0
0
0
135
0
1,427
0
7
136
ddededeb762d491e7f9888387d233a5112fc3e53
1,630
py
Python
wason_analyse/PSYCOP.py
monthie/cogmods
62af4b8bf2effb77f26a8877d6a89949164d83f0
[ "MIT" ]
null
null
null
wason_analyse/PSYCOP.py
monthie/cogmods
62af4b8bf2effb77f26a8877d6a89949164d83f0
[ "MIT" ]
11
2020-05-04T09:05:29.000Z
2021-04-08T13:22:34.000Z
wason_analyse/PSYCOP.py
monthie/cogmods
62af4b8bf2effb77f26a8877d6a89949164d83f0
[ "MIT" ]
12
2020-05-02T09:36:14.000Z
2021-06-22T08:10:45.000Z
if __name__ == "__main__": main(c="biconditional", i="imagine")
29.636364
92
0.477301
def if_elimination(card, p): if card == p: return True def if_elimination_converse(card, q): if card == q: return True def not_introduction(card, q): q[1] = not q[1] if if_elimination(card, q): q[1] = not q[1] return True else: q[1] = not q[1] retu...
0
0
0
0
0
1,465
0
0
91
14429aa344e279605ec67b87836e7aa5f4563613
1,179
py
Python
setup.py
mrf345/Flask-HTMLmin
676803a9509a3d37c5957b8aa8af07f9a4f38e04
[ "BSD-3-Clause" ]
null
null
null
setup.py
mrf345/Flask-HTMLmin
676803a9509a3d37c5957b8aa8af07f9a4f38e04
[ "BSD-3-Clause" ]
null
null
null
setup.py
mrf345/Flask-HTMLmin
676803a9509a3d37c5957b8aa8af07f9a4f38e04
[ "BSD-3-Clause" ]
null
null
null
""" Flask-HTMLmin ------------- minimize your flask rendered html """ from setuptools import setup setup( name='Flask-HTMLmin', version='1.3.2', url='https://github.com/hamidfzm/Flask-HTMLmin', license='BSD-3-Clause', author='Hamid FzM', author_email='hamidfzm@gmail.com', description='Mi...
26.795455
71
0.610687
""" Flask-HTMLmin ------------- minimize your flask rendered html """ from setuptools import setup setup( name='Flask-HTMLmin', version='1.3.2', url='https://github.com/hamidfzm/Flask-HTMLmin', license='BSD-3-Clause', author='Hamid FzM', author_email='hamidfzm@gmail.com', description='Mi...
0
0
0
0
0
0
0
0
0
b1996ca8bf164f41310b4dd38c5ad20ab00b967f
3,427
py
Python
test/test_census.py
JerrrrryL/BlowfishDB-backend
b3ffb696894a2dec2855704e55e9bf11be583e39
[ "Apache-2.0" ]
2
2020-01-03T08:15:08.000Z
2020-01-07T19:37:03.000Z
test/test_census.py
JerrrrryL/BlowfishDB-backend
b3ffb696894a2dec2855704e55e9bf11be583e39
[ "Apache-2.0" ]
2
2020-01-10T19:39:43.000Z
2020-01-29T15:22:27.000Z
test/test_census.py
JerrrrryL/BlowfishDB-backend
b3ffb696894a2dec2855704e55e9bf11be583e39
[ "Apache-2.0" ]
1
2020-06-14T17:17:08.000Z
2020-06-14T17:17:08.000Z
import sys sys.path.append('../') from query import Type repeat_times = 1 census_card = 32561 default_workload_size = 100 default_icq_c_ratio = 0.1 default_census_icq_c = default_icq_c_ratio * census_card default_topk = 10 alpha_ratio = 0.02 alpha_census = alpha_ratio * census_card global_foo = '...
27.861789
97
0.627954
import sys sys.path.append('../') from query import Query from query import Type from query.Type import mechanism_name_dict, wcq_mechanisms, icq_mechanisms, tcq_mechanisms from privacy import PrivacyEngine from query.query_gen import * repeat_times = 1 census_card = 32561 default_workload_size = 100 ...
0
0
0
0
0
2,393
0
91
144
10abffd57deb1a4efdc92c688f38e868db500bfb
1,335
py
Python
src/lcdoc/mkdocs/lp/plugs/drawio/__init__.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
24
2021-10-04T22:11:59.000Z
2022-02-02T21:51:43.000Z
src/lcdoc/mkdocs/lp/plugs/drawio/__init__.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
2
2021-10-04T21:51:30.000Z
2021-10-05T14:15:31.000Z
src/lcdoc/mkdocs/lp/plugs/drawio/__init__.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
null
null
null
""" ### `drawio` Automatically includes an svg, based on .drawio file changes. """ import json from lcdoc import lp from lcdoc.tools import file_hash, dirname, exists, os, read_file, write_file, os multi_line_to_list = True req_kw = ['fn', 'src'] def run(cmd, kw): """ """ D = lp.page_dir(kw) src ...
25.188679
86
0.595506
""" ### `drawio` Automatically includes an svg, based on .drawio file changes. """ import json import subprocess as sp from lcdoc import lp from lcdoc.tools import file_hash, app, dirname, exists, os, read_file, write_file, os multi_line_to_list = True req_kw = ['fn', 'src'] def run(cmd, kw): """ """ ...
0
0
0
0
0
175
0
7
45
eccc61ff887557bcbd0be03587b22a1d508fe7aa
5,903
py
Python
util/model_srnn_rev7_general.py
huzi96/PS-RNN-HEVC
d00ff341b9b0f5575b822dd68c731c4138a2e765
[ "BSD-3-Clause" ]
10
2020-04-20T15:24:10.000Z
2022-02-23T06:01:44.000Z
util/model_srnn_rev7_general.py
zinsayon/PS-RNN-HEVC
d00ff341b9b0f5575b822dd68c731c4138a2e765
[ "BSD-3-Clause" ]
1
2020-06-13T10:26:09.000Z
2020-06-15T01:34:58.000Z
util/model_srnn_rev7_general.py
zinsayon/PS-RNN-HEVC
d00ff341b9b0f5575b822dd68c731c4138a2e765
[ "BSD-3-Clause" ]
5
2020-05-05T06:21:43.000Z
2020-10-22T08:53:51.000Z
# refined srnn based on rev8 # try stack CUDNN GRU
32.977654
142
0.579197
import tensorflow as tf import numpy as np # refined srnn based on rev8 # try stack CUDNN GRU def stacked_RNN(input_tensor, num, scope, units, batch_size, num_scale): with tf.variable_scope(scope): cells = [tf.contrib.rnn.GRUCell(num_units=units,name='cell_%d'% (i) )for i in range(num)] states = [i...
0
0
0
0
0
5,739
0
-1
113
7b48d2c9ead50b9e221eb78782e64b0723cf36b3
15,786
py
Python
eoxserver/render/browse/generate.py
kalxas/eoxserver
8073447d926f3833923bde7b7061e8a1658dee06
[ "OML" ]
25
2015-08-10T19:34:34.000Z
2021-02-05T08:28:01.000Z
eoxserver/render/browse/generate.py
kalxas/eoxserver
8073447d926f3833923bde7b7061e8a1658dee06
[ "OML" ]
153
2015-01-20T08:35:49.000Z
2022-03-16T11:00:56.000Z
eoxserver/render/browse/generate.py
kalxas/eoxserver
8073447d926f3833923bde7b7061e8a1658dee06
[ "OML" ]
10
2015-01-23T15:48:30.000Z
2021-01-21T15:41:18.000Z
# ------------------------------------------------------------------------------ # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # # ------------------------------------------------------------------------------ # Copyright (C) 2017 EOX IT Services GmbH # # Permission...
32.481481
84
0.626061
# ------------------------------------------------------------------------------ # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # # ------------------------------------------------------------------------------ # Copyright (C) 2017 EOX IT Services GmbH # # Permission...
0
761
0
1,674
220
5,145
0
123
409
59a5fcd115e587163945c9ffe064dcc0aedaa647
6,572
py
Python
AdaBoost/adaboost.py
SunnyLQ/Machine_Learning_In_Action_Algorithms
8753e0798dd47a210f77306558185a54888e532d
[ "Apache-2.0" ]
5
2016-01-24T14:56:42.000Z
2016-12-13T10:21:11.000Z
AdaBoost/adaboost.py
SunnyLQ/Machine_Learning_In_Action_Algorithms
8753e0798dd47a210f77306558185a54888e532d
[ "Apache-2.0" ]
null
null
null
AdaBoost/adaboost.py
SunnyLQ/Machine_Learning_In_Action_Algorithms
8753e0798dd47a210f77306558185a54888e532d
[ "Apache-2.0" ]
1
2016-03-06T06:57:15.000Z
2016-03-06T06:57:15.000Z
#!/usr/bin/python2.7 # _*_ coding: utf-8 _*_ """ @Author: MarkLiu """ import numpy as np def loadSimpData(): """ :return: """ dataMatrix = np.matrix([[1., 2.1], [2., 1.1], [1.3, 1.], [1., 1.], ...
34.408377
83
0.590992
#!/usr/bin/python2.7 # _*_ coding: utf-8 _*_ """ @Author: MarkLiu """ import numpy as np def loadSimpData(): """ 加载基本测试数据 :return: """ dataMatrix = np.matrix([[1., 2.1], [2., 1.1], [1.3, 1.], [1., 1.], ...
2,283
0
0
0
0
0
0
0
0
180aa72b27765aa775d207e8fbb079e7d6e11365
23,904
py
Python
libraries/botbuilder-applicationinsights/django_tests/tests.py
Fl4v/botbuilder-python
4003d713beb8fb986a01cfd11632eabc65858618
[ "MIT" ]
388
2019-05-07T15:53:21.000Z
2022-03-28T20:29:46.000Z
libraries/botbuilder-applicationinsights/django_tests/tests.py
Fl4v/botbuilder-python
4003d713beb8fb986a01cfd11632eabc65858618
[ "MIT" ]
1,286
2019-05-07T23:38:19.000Z
2022-03-31T10:44:16.000Z
libraries/botbuilder-applicationinsights/django_tests/tests.py
Fl4v/botbuilder-python
4003d713beb8fb986a01cfd11632eabc65858618
[ "MIT" ]
168
2019-05-14T20:23:25.000Z
2022-03-16T06:49:14.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os # Note: MIDDLEWARE_CLASSES for django.VERSION <= (1, 10) MIDDLEWARE_NAME = "MIDDLEWARE" TEST_IKEY = "12345678-1234-5678-9012-123456789abc" TEST_ENDPOINT = "https://test.endpoint/v2/track" PROJECT_ROOT = os.path.abs...
40.722317
121
0.622364
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import logging import os import django from applicationinsights.channel import ( AsynchronousSender, NullSender, SenderBase, SynchronousQueue, TelemetryChannel, ) from applicationinsights.channel.SenderBa...
0
21,450
0
1,509
0
0
0
293
294
5b16e9cc0f2d004cafe54b29c20ef43a020d2370
2,192
py
Python
tests/testlibraries/cpu_bound.py
yukihiko-shinoda/asynccpu
1433e9361383241ad319ad888922df96c1f90f6b
[ "MIT" ]
3
2021-03-02T06:03:44.000Z
2021-04-24T21:12:47.000Z
tests/testlibraries/cpu_bound.py
yukihiko-shinoda/asynccpu
1433e9361383241ad319ad888922df96c1f90f6b
[ "MIT" ]
2
2021-02-23T09:32:11.000Z
2021-02-23T09:32:24.000Z
tests/testlibraries/cpu_bound.py
yukihiko-shinoda/asynccpu
1433e9361383241ad319ad888922df96c1f90f6b
[ "MIT" ]
null
null
null
""" Cpu bound. see: https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools """ import os import time from datetime import datetime from logging import getLogger from signal import SIGTERM, signal from typing import Optional from tests.testlibraries import SECOND_SLEEP_FOR_T...
34.793651
105
0.690693
""" Cpu bound. see: https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools """ import os import time from datetime import datetime from logging import getLogger from multiprocessing.connection import Connection from signal import SIGTERM, signal from typing import Any, NoRet...
0
0
123
0
0
487
0
75
144
c48dcd44731e378ea6a8ea21beeea1b86823d54f
9,257
py
Python
google-datacatalog-rdbms-connector/src/google/datacatalog_connectors/rdbms/scrape/metadata_scraper.py
dlminvestments/datacatalog-connectors-rdbms
81a119b1d8d77013faf1c7ffd119da52047278e9
[ "Apache-2.0" ]
null
null
null
google-datacatalog-rdbms-connector/src/google/datacatalog_connectors/rdbms/scrape/metadata_scraper.py
dlminvestments/datacatalog-connectors-rdbms
81a119b1d8d77013faf1c7ffd119da52047278e9
[ "Apache-2.0" ]
5
2020-11-08T21:06:02.000Z
2021-08-13T15:45:17.000Z
google-datacatalog-rdbms-connector/src/google/datacatalog_connectors/rdbms/scrape/metadata_scraper.py
dlminvestments/datacatalog-connectors-rdbms
81a119b1d8d77013faf1c7ffd119da52047278e9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
40.960177
79
0.578049
#!/usr/bin/python # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
75
0
8,445
0
0
0
5
136
ab51ffcf079986eaae3925c67218a69c5a51f65a
2,752
py
Python
mmtbx/wwpdb/tst_rcsb_web_services.py
pcxod/cctbx_project
d43dfb157cd7432292b30c0329b7491d5a356657
[ "BSD-3-Clause-LBNL" ]
null
null
null
mmtbx/wwpdb/tst_rcsb_web_services.py
pcxod/cctbx_project
d43dfb157cd7432292b30c0329b7491d5a356657
[ "BSD-3-Clause-LBNL" ]
1
2020-05-26T17:46:17.000Z
2020-05-26T17:55:19.000Z
mmtbx/wwpdb/tst_rcsb_web_services.py
pcxod/cctbx_project
d43dfb157cd7432292b30c0329b7491d5a356657
[ "BSD-3-Clause-LBNL" ]
1
2022-02-08T10:11:07.000Z
2022-02-08T10:11:07.000Z
from __future__ import absolute_import, division, print_function from mmtbx.wwpdb import rcsb_web_services def thorough_exercise(): """ This exercises all currently available options, so makes 64 requests. Took 20 minutes, therefore disabled from the general testing. """ lysozyme = """KVFGRCELAAAMKRHGLDNYRGY...
43.68254
148
0.654433
from __future__ import absolute_import, division, print_function from mmtbx.wwpdb import rcsb_web_services def thorough_exercise(): """ This exercises all currently available options, so makes 64 requests. Took 20 minutes, therefore disabled from the general testing. """ lysozyme = """KVFGRCELAAAMKRHGLDNYRGY...
0
0
0
0
0
1,467
0
0
46
15699e4b7e8e88fcd45165a977278dc6c4e92e71
730
py
Python
lib/privileged_helper.py
andriykislitsyn/ApplePie
3b57e950356cf387c7adb6425469850bc99ea8b5
[ "MIT" ]
null
null
null
lib/privileged_helper.py
andriykislitsyn/ApplePie
3b57e950356cf387c7adb6425469850bc99ea8b5
[ "MIT" ]
null
null
null
lib/privileged_helper.py
andriykislitsyn/ApplePie
3b57e950356cf387c7adb6425469850bc99ea8b5
[ "MIT" ]
null
null
null
from config import admin_password privileged_helper = PrivilegedHelper(admin_password)
34.761905
117
0.661644
from os import system from config import admin_password class PrivilegedHelper: """ Privileged helper tool. Use carefully! """ def __init__(self, password): self.admin_password = password def execute(self, command: str) -> int: """ Execute shell command with administrator privileges. ...
0
0
0
594
0
0
0
0
45
86080e745b33c9319ea917b360c06c89afd44351
2,582
py
Python
happier/connection.py
Jc2k/happier
6e888c385a4c0f18425a76f13746790bba11a39f
[ "Apache-2.0" ]
1
2020-04-25T12:24:10.000Z
2020-04-25T12:24:10.000Z
happier/connection.py
Jc2k/happier
6e888c385a4c0f18425a76f13746790bba11a39f
[ "Apache-2.0" ]
9
2020-04-23T09:36:16.000Z
2020-04-23T16:44:48.000Z
happier/connection.py
Jc2k/happier
6e888c385a4c0f18425a76f13746790bba11a39f
[ "Apache-2.0" ]
null
null
null
import ssl ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH) ssl_context.check_hostname = False ssl_context.verify_mode = ssl.CERT_NONE
31.108434
78
0.597599
import asyncio import json import ssl import asyncws from .exceptions import AuthenticationError, HomeAssistantError ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH) ssl_context.check_hostname = False ssl_context.verify_mode = ssl.CERT_NONE class Connection: def __init__(self, address, port, a...
0
0
1,866
431
0
0
0
18
113
2a5ce5809322cb281538ae31627fbfe510fe069c
2,073
py
Python
mlb_players_photo_data.py
masuda0327/Scraping
72a472aabe94afb19f7a60715ab48042c162db17
[ "MIT" ]
null
null
null
mlb_players_photo_data.py
masuda0327/Scraping
72a472aabe94afb19f7a60715ab48042c162db17
[ "MIT" ]
null
null
null
mlb_players_photo_data.py
masuda0327/Scraping
72a472aabe94afb19f7a60715ab48042c162db17
[ "MIT" ]
null
null
null
import ssl import time ssl._create_default_https_context = ssl._create_unverified_context url = 'https://www.foxsports.com/mlb/players?teamId=0&season=2019&position=0&page={}&country=0&grouping=0&weightclass=0' # urlhtml # urlurl # url # Half_or_Pure_app for i in range(76, 100): url = 'https://www.foxspor...
30.940299
134
0.694163
import requests from bs4 import BeautifulSoup from urllib.parse import urljoin import urllib.request import os import ssl import time from PIL import Image import bs4 ssl._create_default_https_context = ssl._create_unverified_context url = 'https://www.foxsports.com/mlb/players?teamId=0&season=2019&position=0&page={}&...
285
0
0
0
0
1,257
0
-10
242
a174031a34dcfcdfd9be01ccf70760d46e479920
8,687
py
Python
boolean.py
blkerby/pokerhand
5bff2b54aa24253ab076774f1d2982f6d0c535b3
[ "MIT" ]
null
null
null
boolean.py
blkerby/pokerhand
5bff2b54aa24253ab076774f1d2982f6d0c535b3
[ "MIT" ]
null
null
null
boolean.py
blkerby/pokerhand
5bff2b54aa24253ab076774f1d2982f6d0c535b3
[ "MIT" ]
null
null
null
import torch import logging from tame_pytorch import ManifoldModule, Network, L1Linear from grouped_adam import GroupedAdam num_inputs = 10 all_X, all_Y = adder_train_set(num_inputs) # all_X, all_Y = prime_train_set(num_inputs) # all_X, all_Y = sum_eq_train_set(num_inputs, 5) # all_X, all_Y = xor_train_set(nu...
38.608889
127
0.575112
import torch import logging from tame_pytorch import ManifoldModule, Network, L1Linear from grouped_adam import GroupedAdam import math def all_boolean_vectors(n, dtype=torch.float32): if n == 0: return torch.zeros([1, 0], dtype=dtype) else: A = all_boolean_vectors(n - 1, dtype=dtype) ...
0
0
0
0
0
1,454
0
-10
206
ed92ac801999cb7448a9fbcd09e3bee2ccd9edc0
5,463
py
Python
optimizers/GWO_Binary.py
bhawna-gupta/Evolopy
ef13a1392a4a2923878693725a0e61bb34db6ae9
[ "Apache-2.0" ]
null
null
null
optimizers/GWO_Binary.py
bhawna-gupta/Evolopy
ef13a1392a4a2923878693725a0e61bb34db6ae9
[ "Apache-2.0" ]
null
null
null
optimizers/GWO_Binary.py
bhawna-gupta/Evolopy
ef13a1392a4a2923878693725a0e61bb34db6ae9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon May 16 00:27:50 2016 @author: Hossam Faris """
31.761628
93
0.489292
# -*- coding: utf-8 -*- """ Created on Mon May 16 00:27:50 2016 @author: Hossam Faris """ import random import numpy import math from solution import solution import time def sigmf(x): c=10 b=.5 y = 1 / (1. + numpy.exp(- c * (x - b))) return y def GWO2(objf, lb, ub, dim, SearchAgents_no, Max_i...
0
0
0
0
0
5,242
0
-29
157
0374c6cc6f80a6312de73f4c1627dc7156cee8e1
714
py
Python
Others/dp/dp/k.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
Others/dp/dp/k.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
Others/dp/dp/k.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- if __name__ == '__main__': main()
20.4
57
0.446779
# -*- coding: utf-8 -*- def main(): n, k = map(int, input().split()) a = list(map(int, input().split())) dp = [0 for _ in range(k + 1)] # Firstが到達できるかどうかを管理 # 石を順番に積み上げる(石を取り去る,を言い換え) # See: # https://atcoder.jp/contests/dp/submissions/3956066 for i in range(k): # 既にF...
270
0
0
0
0
528
0
0
25
682ece7a675a9219b517557361e7822d3cefe528
211
py
Python
tests/inv_mgmnt.py
grossmann-group/or-gym
8ebad3bdc84cc7787592d7bf347fdd39eb24d982
[ "MIT" ]
6
2020-12-03T21:08:39.000Z
2021-12-26T08:40:33.000Z
tests/inv_mgmnt.py
grossmann-group/or-gym
8ebad3bdc84cc7787592d7bf347fdd39eb24d982
[ "MIT" ]
9
2020-09-21T19:03:54.000Z
2022-03-07T09:05:56.000Z
tests/inv_mgmnt.py
grossmann-group/or-gym
8ebad3bdc84cc7787592d7bf347fdd39eb24d982
[ "MIT" ]
1
2022-03-12T13:40:50.000Z
2022-03-12T13:40:50.000Z
import or_gym env_name = 'InvManagement-v3' env = or_gym.make(env_name) action = env.action_space.sample() env.step(action) # z = np.ones(env.num_stages-1) # print(env.base_stock_action(z))
19.181818
34
0.748815
import or_gym import numpy as np env_name = 'InvManagement-v3' env = or_gym.make(env_name) action = env.action_space.sample() env.step(action) # z = np.ones(env.num_stages-1) # print(env.base_stock_action(z))
0
0
0
0
0
0
0
-3
22
a692b15258b3f952d7500faa6da3fcb7dff206f5
1,470
py
Python
src/ingestion.py
Aakash-Devadiga/Machine-Learning-Model-Scoring-and-Monitoring
7ab5240a729329f731d7c2588a3eb6f52d486536
[ "MIT" ]
null
null
null
src/ingestion.py
Aakash-Devadiga/Machine-Learning-Model-Scoring-and-Monitoring
7ab5240a729329f731d7c2588a3eb6f52d486536
[ "MIT" ]
null
null
null
src/ingestion.py
Aakash-Devadiga/Machine-Learning-Model-Scoring-and-Monitoring
7ab5240a729329f731d7c2588a3eb6f52d486536
[ "MIT" ]
1
2022-03-12T16:46:52.000Z
2022-03-12T16:46:52.000Z
""" Author: Ibrahim Sherif Date: December, 2021 This script used for ingesting data """ import os import sys import logging import pandas as pd from datetime import datetime from config import DATA_PATH, INPUT_FOLDER_PATH logging.basicConfig(stream=sys.stdout, level=logging.INFO) def merge_multiple_dataframe(): ...
28.269231
80
0.691837
""" Author: Ibrahim Sherif Date: December, 2021 This script used for ingesting data """ import os import sys import logging import pandas as pd from datetime import datetime from config import DATA_PATH, INPUT_FOLDER_PATH logging.basicConfig(stream=sys.stdout, level=logging.INFO) def merge_multiple_dataframe(): ...
0
0
0
0
0
0
0
0
0
ac45a79eaa5038a039fbbfbc677ce312548adef4
2,188
py
Python
misc/serial_tester.py
jeremyherbert/polyglot-turtle-xiao
40118d9236bcb1e2ea35a0d889ee39309f95afa6
[ "MIT" ]
null
null
null
misc/serial_tester.py
jeremyherbert/polyglot-turtle-xiao
40118d9236bcb1e2ea35a0d889ee39309f95afa6
[ "MIT" ]
null
null
null
misc/serial_tester.py
jeremyherbert/polyglot-turtle-xiao
40118d9236bcb1e2ea35a0d889ee39309f95afa6
[ "MIT" ]
null
null
null
import serial if __name__ == "__main__": while True: # for freq in [1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 128000, 230400, 256000, 460800, 500000, 675000, 921600, 1000000]: test_string = b"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ~!@#$%^&*();:'{}[]|,./...
45.583333
139
0.43053
import serial import time if __name__ == "__main__": while True: # for freq in [1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 128000, 230400, 256000, 460800, 500000, 675000, 921600, 1000000]: test_string = b"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ~!@#$%^&*(...
0
0
0
0
0
0
0
-10
22
12b748c975bdec69424c2419c0b247129638f49e
2,067
py
Python
verify_dataset.py
Henrik0808/ikt590-project
75e93dd52d9074c99ee5233176cdc0318d86ea21
[ "Apache-2.0" ]
null
null
null
verify_dataset.py
Henrik0808/ikt590-project
75e93dd52d9074c99ee5233176cdc0318d86ea21
[ "Apache-2.0" ]
2
2022-02-12T23:03:35.000Z
2022-02-12T23:03:40.000Z
verify_dataset.py
Henrik0808/ikt590-project
75e93dd52d9074c99ee5233176cdc0318d86ea21
[ "Apache-2.0" ]
null
null
null
import argparse import config from utils import cwd if __name__ == '__main__': parser = argparse.ArgumentParser('Verify datasets.') parser.add_argument( 'files', nargs='*', default=( config.FILE_TRAINING, config.FILE_VALIDATION, config.FILE_TESTIN...
24.317647
73
0.482342
import argparse import config from utils import cwd def assert_continue(expr: bool, err_msg: str, filename: str, index: int): if not expr: print(f'[!] invalid {err_msg}, {filename}:{index+1}') def verify_single(filename: str) -> int: counter = 0 # Load dataset with open(filename, mode='r', ...
0
0
0
0
0
1,217
0
0
46
0e71322f4e0a64fc61c71a5fa38ca8efd01cb139
571
py
Python
src/compas_igs/utilities/__init__.py
BlockResearchGroup/compas-IGS
b40698466b91c867600b94ae2530b19d336ad1b0
[ "MIT" ]
1
2021-11-03T23:22:37.000Z
2021-11-03T23:22:37.000Z
src/compas_igs/utilities/__init__.py
BlockResearchGroup/compas-IGS
b40698466b91c867600b94ae2530b19d336ad1b0
[ "MIT" ]
1
2021-11-10T03:27:58.000Z
2021-11-17T13:51:17.000Z
src/compas_igs/utilities/__init__.py
BlockResearchGroup/compas-IGS
b40698466b91c867600b94ae2530b19d336ad1b0
[ "MIT" ]
null
null
null
""" ******************************************************************************** compas_igs.utilities ******************************************************************************** .. currentmodule:: compas_igs.utilities .. autosummary:: :toctree: generated/ compute_force_drawingscale compute_forc...
24.826087
80
0.532399
""" ******************************************************************************** compas_igs.utilities ******************************************************************************** .. currentmodule:: compas_igs.utilities .. autosummary:: :toctree: generated/ compute_force_drawingscale compute_forc...
0
0
0
0
0
0
0
14
83
bee25a1644708168426d1065e5a807bb83feab3f
173
py
Python
tests/appapis/apps.py
caputomarcos/django-bmf
0d07a7d3f6a3ecfaca6c9376e764add1715cfd33
[ "BSD-3-Clause" ]
null
null
null
tests/appapis/apps.py
caputomarcos/django-bmf
0d07a7d3f6a3ecfaca6c9376e764add1715cfd33
[ "BSD-3-Clause" ]
null
null
null
tests/appapis/apps.py
caputomarcos/django-bmf
0d07a7d3f6a3ecfaca6c9376e764add1715cfd33
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals
19.222222
42
0.780347
from __future__ import unicode_literals from djangobmf.apps import ContribTemplate class AppApisConfig(ContribTemplate): name = 'tests.appapis' label = "appapis"
0
0
0
65
0
0
0
21
46
16a58548e65e0cd3a05aa7f0af28c8627f478c6a
10,054
py
Python
inventory/resources/aws/__init__.py
scienty/stormation
f19376c791f198fabb0798844b4ddcae9dc86146
[ "Apache-2.0" ]
null
null
null
inventory/resources/aws/__init__.py
scienty/stormation
f19376c791f198fabb0798844b4ddcae9dc86146
[ "Apache-2.0" ]
null
null
null
inventory/resources/aws/__init__.py
scienty/stormation
f19376c791f198fabb0798844b4ddcae9dc86146
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 Scopely, Inc. # Copyright (c) 2015 Mitch Garnaat # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanyin...
39.73913
83
0.606823
# Copyright (c) 2014 Scopely, Inc. # Copyright (c) 2015 Mitch Garnaat # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanyin...
0
2,051
0
7,022
0
0
0
16
113
fa05d0a5162dba573cf7434bc2d436c44ef23e10
1,482
py
Python
movies/views.py
karol83/MovieDataBase
53a06c069fccc478dc8b19114fb332bd68512579
[ "MIT" ]
null
null
null
movies/views.py
karol83/MovieDataBase
53a06c069fccc478dc8b19114fb332bd68512579
[ "MIT" ]
null
null
null
movies/views.py
karol83/MovieDataBase
53a06c069fccc478dc8b19114fb332bd68512579
[ "MIT" ]
null
null
null
MAX_RETRIES = 3
29.64
90
0.734818
from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.views.generic import ListView, DetailView from django.views.generic.edit import FormView from django.contrib.auth.decorators import login_required from .forms import SearchMovieForm, MovieForm from .models import ...
0
193
0
724
0
102
0
171
270
c9259606a410df23751c2c640e355ec50600cda1
7,250
py
Python
Ed/base-naive.py
kevinrussellmoy/aa-228-final-project
657ce398241c2c37fd207c05a102aeabb45edaf6
[ "MIT" ]
5
2021-03-18T03:06:05.000Z
2021-08-02T02:21:53.000Z
Ed/base-naive.py
deep-daya/Grid_Scale_Energy_Storage_Q_Learning
6657674d5ad8b7b9779a52e9da63729d7c76e720
[ "MIT" ]
null
null
null
Ed/base-naive.py
deep-daya/Grid_Scale_Energy_Storage_Q_Learning
6657674d5ad8b7b9779a52e9da63729d7c76e720
[ "MIT" ]
1
2021-11-24T06:50:45.000Z
2021-11-24T06:50:45.000Z
import pandas as pd import matplotlib.pyplot as plt from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() """ Base Case: Generate Cumulative Rewards with no battery use """ """ Naive TOU Case: Generate Cumulative Rewards optimized on peak/non-peak TOU nonpeak: lowest t...
31.11588
122
0.608828
import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import datetime """ Base Case: Generate Cumulative Rewards with no battery use """ def make_base_csv(df): lo...
0
0
0
0
0
4,842
0
3
113
98abf39bc4cd24d90a661193452a7e36fd112275
5,499
py
Python
test/test_rt_utils.py
EdinburghGenomics/illuminatus
c92d6448675fb451f2dc284d67db1711f2974c74
[ "BSD-2-Clause" ]
1
2020-02-15T00:18:51.000Z
2020-02-15T00:18:51.000Z
test/test_rt_utils.py
EdinburghGenomics/illuminatus
c92d6448675fb451f2dc284d67db1711f2974c74
[ "BSD-2-Clause" ]
1
2021-03-30T10:50:38.000Z
2021-03-30T10:50:39.000Z
test/test_rt_utils.py
EdinburghGenomics/illuminatus
c92d6448675fb451f2dc284d67db1711f2974c74
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 import unittest import os RT_SETTINGS = os.path.abspath(os.path.dirname(__file__) + '/rt_settings.ini') if __name__ == '__main__': unittest.main()
38.1875
114
0.606838
#!/usr/bin/env python3 import unittest from unittest.mock import Mock, patch import sys, os from io import StringIO from rt_runticket_manager import RTManager, AuthorizationError, main RT_SETTINGS = os.path.abspath(os.path.dirname(__file__) + '/rt_settings.ini') class T(unittest.TestCase): def setUp(self): ...
0
1,366
0
3,797
0
0
0
70
90
396b4027baf51f91e0a6ec0e0b6dce2334e9556a
779
py
Python
challenges/merge_sort_new/mergesort.py
jayadams011/data-structures-and-algorithms
b9a49c65ca769c82b2a34d840bd1e4dd626be025
[ "MIT" ]
null
null
null
challenges/merge_sort_new/mergesort.py
jayadams011/data-structures-and-algorithms
b9a49c65ca769c82b2a34d840bd1e4dd626be025
[ "MIT" ]
4
2018-03-22T16:56:06.000Z
2018-03-28T23:30:29.000Z
challenges/merge_sort_new/mergesort.py
jayadams011/data-structures-and-algorithms
b9a49c65ca769c82b2a34d840bd1e4dd626be025
[ "MIT" ]
null
null
null
"""Define function to sort and merge an unsorted array.""" def mergesort(arr): """Define merge sort.""" left = arr[:len(arr)//2] right = arr[len(arr)//2:] if len(left) > 1: left = mergesort(left) if len(right) > 1: right = mergesort(right) lst = [] i, j = 0, 0 while i ...
22.911765
58
0.469833
"""Define function to sort and merge an unsorted array.""" def mergesort(arr): """Define merge sort.""" left = arr[:len(arr)//2] right = arr[len(arr)//2:] if len(left) > 1: left = mergesort(left) if len(right) > 1: right = mergesort(right) lst = [] i, j = 0, 0 while i ...
0
0
0
0
0
0
0
0
0
5d49fccd060ba21ca30d588d82b574836cb1e6bd
1,846
py
Python
python_for_deposit_solutions/tutorial_functions.py
osynge/python4DepositSolutions
4eddca0ed94441c84250557bd03a0dca35921367
[ "MIT" ]
null
null
null
python_for_deposit_solutions/tutorial_functions.py
osynge/python4DepositSolutions
4eddca0ed94441c84250557bd03a0dca35921367
[ "MIT" ]
null
null
null
python_for_deposit_solutions/tutorial_functions.py
osynge/python4DepositSolutions
4eddca0ed94441c84250557bd03a0dca35921367
[ "MIT" ]
null
null
null
""" Example of flow control and the case statement """ def flow_control_prime(): """ example of nested loops and break statement """ for n in range(2, 10): for x in range(2, n): if n % x == 0: print(n, 'equals', x, '*', n/x) break else...
15.512605
60
0.52221
""" Example of flow control and the case statement """ def conditional_example(): x = int(input("Please enter an integer: ")) if x < 0: x = 0 print('Negative changed to zero') elif x == 0: print('Zero') elif x == 1: print('Single') else: print('More') def ...
0
0
0
0
0
1,012
0
0
391
13267dc072c8bb394c7be0c7c9e77286355e8b68
7,496
py
Python
Config.py
s123600g/Audio_Speech_Recognition_Demo
fc728b7049c8070d2177ed13ed4219ce0c311fef
[ "MIT" ]
null
null
null
Config.py
s123600g/Audio_Speech_Recognition_Demo
fc728b7049c8070d2177ed13ed4219ce0c311fef
[ "MIT" ]
null
null
null
Config.py
s123600g/Audio_Speech_Recognition_Demo
fc728b7049c8070d2177ed13ed4219ce0c311fef
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- ''' MIT License Copyright (c) 2019 JYUN-YU LI 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 us...
40.518919
166
0.440768
# -*- coding:utf-8 -*- ''' MIT License Copyright (c) 2019 李俊諭 JYUN-YU LI 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...
111
0
0
6,274
0
0
0
-15
73
f65d84967f9407ba9682463e5317ddd3f9a59022
9,768
py
Python
pipeline/python/ion/utils/sigproc.py
konradotto/TS
bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e
[ "Apache-2.0" ]
125
2015-01-22T05:43:23.000Z
2022-03-22T17:15:59.000Z
pipeline/python/ion/utils/sigproc.py
konradotto/TS
bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e
[ "Apache-2.0" ]
59
2015-02-10T09:13:06.000Z
2021-11-11T02:32:38.000Z
pipeline/python/ion/utils/sigproc.py
konradotto/TS
bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e
[ "Apache-2.0" ]
98
2015-01-17T01:25:10.000Z
2022-03-18T17:29:42.000Z
#!/usr/bin/python # Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved """ def mergeRawPeakSignals(dirs): ############################################### # Merge raw_peak_signal files # ############################################### printtime("Merging raw_peak_sig...
33.916667
100
0.605753
#!/usr/bin/python # Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved import os import subprocess import traceback import numpy import ConfigParser from ion.reports import beadDensityPlot, plotKey from ion.utils.blockprocessing import printtime, isbadblock def beadfind_cmd( beadfindArgs, libKey, ...
0
0
0
0
0
8,280
0
33
317
561d236ebb3fffbaa875877171858624a716cf8a
349
py
Python
data_grand/models/__init__.py
ares5221/Question-Answer-Datasets
7067bd7cbdddf1c09c5532e95a9e2d968533ab7f
[ "CC-BY-4.0" ]
9
2020-07-17T03:38:07.000Z
2021-07-15T06:33:08.000Z
data_grand/models/__init__.py
ares5221/Question-Answer-Datasets
7067bd7cbdddf1c09c5532e95a9e2d968533ab7f
[ "CC-BY-4.0" ]
null
null
null
data_grand/models/__init__.py
ares5221/Question-Answer-Datasets
7067bd7cbdddf1c09c5532e95a9e2d968533ab7f
[ "CC-BY-4.0" ]
8
2020-08-24T13:20:29.000Z
2022-01-25T18:34:59.000Z
# -*- coding: utf-8 -*- """ @Author : captain @time : 18-7-10 8:42 @ide : PyCharm """
19.388889
38
0.719198
# -*- coding: utf-8 -*- """ @Author : captain @time : 18-7-10 下午8:42 @ide : PyCharm """ from .TextCNN import TextCNN from .LSTM import LSTM from .FastText import FastText from .RCNN import RCNN from .RCNN1 import RCNN1 from .AttLSTM import AttLSTM from .GRU import GRU from .Inception import InCNN from .bigr...
6
0
0
0
0
0
0
51
199
4e9b844a1f57c176b2fa059055950aa2d5d77f64
3,598
py
Python
config/capture_config.py
Mirevi/face-synthesizer-JVRB
3c5774b1c5c981131df21b299389f568502b8ecf
[ "BSD-3-Clause" ]
null
null
null
config/capture_config.py
Mirevi/face-synthesizer-JVRB
3c5774b1c5c981131df21b299389f568502b8ecf
[ "BSD-3-Clause" ]
null
null
null
config/capture_config.py
Mirevi/face-synthesizer-JVRB
3c5774b1c5c981131df21b299389f568502b8ecf
[ "BSD-3-Clause" ]
null
null
null
if __name__ == '__main__': config = CaptureStandardConfig() config["name"] = 'new_data' config.gather_options() config.print(detailed_package_description=False) print(len(vars(config.options))) args = ['--name', 'new_data'] config = CaptureArgparseConfig(args) config.gather_option...
46.128205
115
0.695942
import os from config import StandardConfig, ArgparseConfig, COPWithModifiableDefaults, ConfigOptionMetadata, \ ConfigDefaultModification, ConfigPackageProvider from config.config_option_packages import NameCOP, SaveDataCOP, OverwriteCOP, VisualizeCOP, ContinueCOP from tracking.face_aabbox_tracking import FaceAABB...
0
2,175
0
344
0
0
0
356
309
23586534957bb70521aed49de9717de0ec5d85dd
3,141
py
Python
tests/data/recreate_test_data.py
LLR-ILD/alldecays
08e51e99385ae7ca96edefddafd715e1d8cac3d3
[ "Apache-2.0" ]
null
null
null
tests/data/recreate_test_data.py
LLR-ILD/alldecays
08e51e99385ae7ca96edefddafd715e1d8cac3d3
[ "Apache-2.0" ]
null
null
null
tests/data/recreate_test_data.py
LLR-ILD/alldecays
08e51e99385ae7ca96edefddafd715e1d8cac3d3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Script that produced the test data. """ if __name__ == "__main__": create_test_data()
37.843373
79
0.551098
#!/usr/bin/env python """Script that produced the test data. """ from pathlib import Path import numpy as np import pandas as pd def create_test_data(): rng = np.random.default_rng(seed=1) test_data = Path(__file__).parent boxes = ["unselected"] + [f"box{i}" for i in range(1, 5)] polarizations = ["...
0
0
0
0
0
2,934
0
-2
90
5304985c1cc33d95b1b8a074106f5be91a64ef30
8,167
py
Python
external/mmsegmentation/segmentation_tasks/apis/segmentation/configuration.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
775
2019-03-01T02:13:33.000Z
2020-09-07T22:49:15.000Z
external/mmsegmentation/segmentation_tasks/apis/segmentation/configuration.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
229
2019-02-28T21:37:08.000Z
2020-09-07T15:11:49.000Z
external/mmsegmentation/segmentation_tasks/apis/segmentation/configuration.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
290
2019-02-28T20:32:11.000Z
2020-09-07T05:51:41.000Z
# Copyright (C) 2021 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 in wri...
40.631841
120
0.624832
# Copyright (C) 2021 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 in wri...
0
6,797
0
0
0
0
0
630
158
9e8454387f32e0eb6abdb5e99a6b610cb648ac6a
3,999
py
Python
models/002_auth.py
dotskapes/dotSkapes
50228926f42a9c3bbc050b08922342a83a974755
[ "MIT" ]
null
null
null
models/002_auth.py
dotskapes/dotSkapes
50228926f42a9c3bbc050b08922342a83a974755
[ "MIT" ]
1
2016-03-11T06:05:39.000Z
2016-03-11T06:05:39.000Z
models/002_auth.py
dotskapes/dotSkapes
50228926f42a9c3bbc050b08922342a83a974755
[ "MIT" ]
null
null
null
from gluon.contrib.login_methods.email_auth import email_auth #from gluon.contrib.login_methods.gae_google_account import GaeGoogleAccount auth = Auth(globals(), db) auth.define_tables() auth.settings.create_user_groups = False auth.settings.actions_disabled = ['request_...
30.295455
107
0.642911
import re from re import match from gluon.contrib.login_methods.email_auth import email_auth #from gluon.contrib.login_methods.gae_google_account import GaeGoogleAccount from gluon.tools import * auth = Auth(globals(), db) auth.define_tables() auth.settings.create_user_...
0
0
0
0
0
2,417
0
-9
462
9308c916b556f94f0a4caa9684e1fe82d3e411db
656
py
Python
src/tests/test_moving.py
Doometnick/MaxiMin-2048
f1d795ec07fffe1aa239c105cf522d2c3bc9b011
[ "MIT" ]
null
null
null
src/tests/test_moving.py
Doometnick/MaxiMin-2048
f1d795ec07fffe1aa239c105cf522d2c3bc9b011
[ "MIT" ]
null
null
null
src/tests/test_moving.py
Doometnick/MaxiMin-2048
f1d795ec07fffe1aa239c105cf522d2c3bc9b011
[ "MIT" ]
null
null
null
import tests.testdata as testdata
34.526316
74
0.597561
import unittest from board import Direction, Board import tests.testdata as testdata class TestMoving(unittest.TestCase): def test_moving(self): for board_in, action, board_expected in testdata.moving_tests: board = Board(board_in) board.move(action) try: ...
0
0
0
548
0
0
0
7
67
541d08faac9ce0a4bf9b63226fbc7c78dcb77005
129
py
Python
tests/tests.py
uguraba/moviepy
d4c9c37bc88261d8ed8b5d9b7c317d13b2cdf62e
[ "MIT" ]
3
2021-03-14T09:33:36.000Z
2021-03-14T09:33:43.000Z
tests/tests.py
uguraba/moviepy
d4c9c37bc88261d8ed8b5d9b7c317d13b2cdf62e
[ "MIT" ]
null
null
null
tests/tests.py
uguraba/moviepy
d4c9c37bc88261d8ed8b5d9b7c317d13b2cdf62e
[ "MIT" ]
null
null
null
""" Tests meant to be run with pytest """
9.923077
33
0.713178
""" Tests meant to be run with pytest """ import pytest from moviepy.editor import * @pytest.fixture def example_video1():
0
16
0
0
0
0
0
-1
69