hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
90d366d7d62303d721bfefc32a77ff21dbd44010
8,998
py
Python
externals/director/src/python/ddapp/robotplanlistener.py
ericmanzi/double_pendulum_lqr
76bba3091295abb7d412c4a3156258918f280c96
[ "BSD-3-Clause" ]
null
null
null
externals/director/src/python/ddapp/robotplanlistener.py
ericmanzi/double_pendulum_lqr
76bba3091295abb7d412c4a3156258918f280c96
[ "BSD-3-Clause" ]
null
null
null
externals/director/src/python/ddapp/robotplanlistener.py
ericmanzi/double_pendulum_lqr
76bba3091295abb7d412c4a3156258918f280c96
[ "BSD-3-Clause" ]
null
null
null
import os import vtkAll as vtk import math import time import numpy as np from ddapp import callbacks from ddapp import transformUtils from ddapp import lcmUtils from ddapp import objectmodel as om from ddapp.utime import getUtime from ddapp import robotstate import drc as lcmdrc
40.349776
137
0.653812
import os import vtkAll as vtk import math import time import numpy as np from ddapp import callbacks from ddapp import transformUtils from ddapp import lcmUtils from ddapp import objectmodel as om from ddapp.utime import getUtime from ddapp import robotstate import drc as lcmdrc class ManipulationPlanItem(om.Obje...
8,041
624
46
b75cc4ea5a6b8f7e847bb915419478dbff4c9779
753
py
Python
jrpc/jrpcServer/SimpleTCPServer.py
umairghani/py-jrpc
467ba1e1765f7f3a0ad2eabf8c17c98fc9baa11e
[ "MIT" ]
null
null
null
jrpc/jrpcServer/SimpleTCPServer.py
umairghani/py-jrpc
467ba1e1765f7f3a0ad2eabf8c17c98fc9baa11e
[ "MIT" ]
null
null
null
jrpc/jrpcServer/SimpleTCPServer.py
umairghani/py-jrpc
467ba1e1765f7f3a0ad2eabf8c17c98fc9baa11e
[ "MIT" ]
null
null
null
import SocketServer from SimpleTCPDispatcher import SimpleTCPDispatcher from SimpleTCPRequestHandler import SimpleTCPRequestHandler __author__ = 'umairghani' class SimpleTCPServer(SocketServer.TCPServer, SimpleTCPDispatcher): """ Simple TCP Server """ allow_reuse_address = True def __init__(se...
27.888889
90
0.709163
import SocketServer from SimpleTCPDispatcher import SimpleTCPDispatcher from SimpleTCPRequestHandler import SimpleTCPRequestHandler __author__ = 'umairghani' class SimpleTCPServer(SocketServer.TCPServer, SimpleTCPDispatcher): """ Simple TCP Server """ allow_reuse_address = True def __init__(se...
0
0
0
873ba397197df8d40f067a79f337b1ce25c36d5a
6,525
py
Python
pipeline/corpus_pipeline.py
CambridgeSemiticsLab/nena_pipeline
127e3ffee38996f3c7a98bc31dae1915ebbf4840
[ "MIT" ]
null
null
null
pipeline/corpus_pipeline.py
CambridgeSemiticsLab/nena_pipeline
127e3ffee38996f3c7a98bc31dae1915ebbf4840
[ "MIT" ]
null
null
null
pipeline/corpus_pipeline.py
CambridgeSemiticsLab/nena_pipeline
127e3ffee38996f3c7a98bc31dae1915ebbf4840
[ "MIT" ]
null
null
null
import re import json import collections import traceback from pathlib import Path import unicodedata as ucd from tf.client.make.build import makeSearchClients from .nena_parser import NenaLexerParser from .build_tf import NenaTfBuilder from .build_docs import DocsBuilder
33.290816
87
0.575632
import re import json import collections import traceback from pathlib import Path import unicodedata as ucd from tf.client.make.build import makeSearchClients from .nena_parser import NenaLexerParser from .build_tf import NenaTfBuilder from .build_docs import DocsBuilder class CorpusPipeline: def __init__(self, ...
0
6,229
23
82c5a2802476fe974c1760c021394ca4a8463df9
1,099
py
Python
chapters/chapter5/chapter5.py
nazariinyzhnyk/Nikolenko_Deeplearning
79cec9b188a5725b96e9a9f3e2fc059dfa251295
[ "MIT" ]
null
null
null
chapters/chapter5/chapter5.py
nazariinyzhnyk/Nikolenko_Deeplearning
79cec9b188a5725b96e9a9f3e2fc059dfa251295
[ "MIT" ]
null
null
null
chapters/chapter5/chapter5.py
nazariinyzhnyk/Nikolenko_Deeplearning
79cec9b188a5725b96e9a9f3e2fc059dfa251295
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np x_inp = tf.placeholder(tf.float32, [5, 5]) w_inp = tf.placeholder(tf.float32, [3, 3]) x = tf.reshape(x_inp, [1, 5, 5, 1]) w = tf.reshape(w_inp, [3, 3, 1, 1]) x_valid = tf.nn.conv2d(x, w, strides=[1, 1, 1, 1], padding='VALID') x_same = tf.nn.conv2d(x, w, strides=[1, 1, 1, 1...
32.323529
85
0.544131
import tensorflow as tf import numpy as np x_inp = tf.placeholder(tf.float32, [5, 5]) w_inp = tf.placeholder(tf.float32, [3, 3]) x = tf.reshape(x_inp, [1, 5, 5, 1]) w = tf.reshape(w_inp, [3, 3, 1, 1]) x_valid = tf.nn.conv2d(x, w, strides=[1, 1, 1, 1], padding='VALID') x_same = tf.nn.conv2d(x, w, strides=[1, 1, 1, 1...
0
0
0
bfb702cf9e8fc109e875d1b73c23c65cead97667
2,870
py
Python
fastpitch/alignment.py
eugenemfu/TTS_HW
34b3a32da2904578ddbd86bfd9529798cc3a1e9f
[ "BSD-3-Clause" ]
null
null
null
fastpitch/alignment.py
eugenemfu/TTS_HW
34b3a32da2904578ddbd86bfd9529798cc3a1e9f
[ "BSD-3-Clause" ]
null
null
null
fastpitch/alignment.py
eugenemfu/TTS_HW
34b3a32da2904578ddbd86bfd9529798cc3a1e9f
[ "BSD-3-Clause" ]
24
2021-11-30T14:56:07.000Z
2021-12-15T22:31:45.000Z
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.372093
78
0.629617
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
1,147
0
44
fe0b417df27010b76c4970b2ff1fa33fed55a2d1
2,119
py
Python
aioftx/options/quotes/api.py
metta-team/aioftx
f5bd028e8bf40c55c1d4632802b792be113e0978
[ "MIT" ]
null
null
null
aioftx/options/quotes/api.py
metta-team/aioftx
f5bd028e8bf40c55c1d4632802b792be113e0978
[ "MIT" ]
null
null
null
aioftx/options/quotes/api.py
metta-team/aioftx
f5bd028e8bf40c55c1d4632802b792be113e0978
[ "MIT" ]
null
null
null
from aioftx.session import FTXClientSession from .schemas import ( AcceptQuoteRequest, AcceptQuoteResponse, CancelQuoteRequest, CancelQuoteResponse, CreateQuoteRequest, CreateQuoteResponse, GetMyQuotesReponse, GetMyQuotesRequest, GetQuotesRequest, GetQuotesResponse, Quote, )...
24.929412
74
0.66588
from aioftx.session import FTXClientSession from .schemas import ( AcceptQuoteRequest, AcceptQuoteResponse, CancelQuoteRequest, CancelQuoteResponse, CreateQuoteRequest, CreateQuoteResponse, GetMyQuotesReponse, GetMyQuotesRequest, GetQuotesRequest, GetQuotesResponse, Quote, )...
0
0
0
718695487c2319110d26f96f69b9bdff8a22059b
41,870
py
Python
hapi/rudder/rudder_pb2.py
guoweikuang/python-helm
0d11ef169f3f10484029037a3668b36ddb7b71c0
[ "Apache-2.0" ]
12
2018-08-21T09:00:13.000Z
2020-02-20T02:07:33.000Z
hapi/rudder/rudder_pb2.py
guoweikuang/python-helm
0d11ef169f3f10484029037a3668b36ddb7b71c0
[ "Apache-2.0" ]
4
2018-10-31T05:42:26.000Z
2019-02-23T05:28:38.000Z
hapi/rudder/rudder_pb2.py
guoweikuang/python-helm
0d11ef169f3f10484029037a3668b36ddb7b71c0
[ "Apache-2.0" ]
7
2018-09-20T03:05:33.000Z
2020-02-06T15:10:56.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: hapi/rudder/rudder.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflectio...
43.209494
3,074
0.759064
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: hapi/rudder/rudder.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflectio...
2,123
3,202
127
7b6a3ceef09fe9902d70809f173c7cc94d45a79b
415
py
Python
unsorted/pythonsnippets_0012.py
fiddlerwoaroof/sandbox
652acaf710a8b60f005769bde317e7bbf548cc2b
[ "BSD-3-Clause" ]
null
null
null
unsorted/pythonsnippets_0012.py
fiddlerwoaroof/sandbox
652acaf710a8b60f005769bde317e7bbf548cc2b
[ "BSD-3-Clause" ]
null
null
null
unsorted/pythonsnippets_0012.py
fiddlerwoaroof/sandbox
652acaf710a8b60f005769bde317e7bbf548cc2b
[ "BSD-3-Clause" ]
null
null
null
from twisted.spread import pb from twisted.internet import reactor from twisted.python import util factory = pb.PBClientFactory() reactor.connectTCP("localhost", 8789, factory) d = factory.getRootObject() a = [] d.addCallback(lambda object: object.callRemote("nextQuote")) d.addCallback(lambda echo: a.append(echo)) d.a...
31.923077
60
0.780723
from twisted.spread import pb from twisted.internet import reactor from twisted.python import util factory = pb.PBClientFactory() reactor.connectTCP("localhost", 8789, factory) d = factory.getRootObject() a = [] d.addCallback(lambda object: object.callRemote("nextQuote")) d.addCallback(lambda echo: a.append(echo)) d.a...
0
0
0
5038591d7c6f0dc92e376cf1921d98d2617769f2
349
py
Python
builder/git_utils.py
djlihner/simple_builder_for_gogs
aac9fffdc84bc858f11398c2494d0d98421de3e2
[ "Apache-2.0" ]
null
null
null
builder/git_utils.py
djlihner/simple_builder_for_gogs
aac9fffdc84bc858f11398c2494d0d98421de3e2
[ "Apache-2.0" ]
null
null
null
builder/git_utils.py
djlihner/simple_builder_for_gogs
aac9fffdc84bc858f11398c2494d0d98421de3e2
[ "Apache-2.0" ]
null
null
null
from subprocess import check_output
24.928571
82
0.679083
from subprocess import check_output def get_branches(repo): remote_branches = [] for ref in repo.git.branch('-r').split('\n origin/'): remote_branches.append(ref) remote_branches.pop(0) return remote_branches def get_last_commit_hash(): return check_output("git log -1 --pretty=format:'%...
265
0
46
00e606cc1e5c05e868edff946b6420b304d71581
8,962
py
Python
yolo_opencv_fun.py
samsu2018/yolov5_6.0_opencvdnn_python
6d2d350026cd82528820ae4f3a150f53db3ca04d
[ "Apache-2.0" ]
null
null
null
yolo_opencv_fun.py
samsu2018/yolov5_6.0_opencvdnn_python
6d2d350026cd82528820ae4f3a150f53db3ca04d
[ "Apache-2.0" ]
null
null
null
yolo_opencv_fun.py
samsu2018/yolov5_6.0_opencvdnn_python
6d2d350026cd82528820ae4f3a150f53db3ca04d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################### # Object detection - YOLOv5_6.0 - OpenCV dnn # From : https://github.com/samsu2018/yolov5_6.0_opencvdnn_python # Modify : Sam Su (1, 11, 2022) ################################################################## import cv2 import ...
47.417989
148
0.556237
# -*- coding: utf-8 -*- ################################################################### # Object detection - YOLOv5_6.0 - OpenCV dnn # From : https://github.com/samsu2018/yolov5_6.0_opencvdnn_python # Modify : Sam Su (1, 11, 2022) ################################################################## import cv2 import ...
7,689
-6
234
86dbc2c50c990389c3b7493c68c070657ec59ea2
5,597
py
Python
test_single.py
hsuan197/generative-inpainting-pytorch
2fa379f5e10ee72b64b4820f1f7ac7160da16e69
[ "MIT" ]
null
null
null
test_single.py
hsuan197/generative-inpainting-pytorch
2fa379f5e10ee72b64b4820f1f7ac7160da16e69
[ "MIT" ]
null
null
null
test_single.py
hsuan197/generative-inpainting-pytorch
2fa379f5e10ee72b64b4820f1f7ac7160da16e69
[ "MIT" ]
null
null
null
import os import random from PIL import Image from argparse import ArgumentParser import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision.transforms as transforms import torchvision.utils as vutils from model.networks import Generator from utils.tools import get_config, is_image_fil...
41.154412
105
0.597999
import os import random from PIL import Image from argparse import ArgumentParser import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision.transforms as transforms import torchvision.utils as vutils from model.networks import Generator from utils.tools import get_config, is_image_fil...
4,547
0
23
67073ac34608f3b47fb20c3d4e67d249fa43fa50
845
py
Python
src/connection.py
rodrigofaccioli/drugdesignCassandra
de84590fd781fcea8b9a55d58cf8edcc654a879c
[ "Apache-2.0" ]
null
null
null
src/connection.py
rodrigofaccioli/drugdesignCassandra
de84590fd781fcea8b9a55d58cf8edcc654a879c
[ "Apache-2.0" ]
null
null
null
src/connection.py
rodrigofaccioli/drugdesignCassandra
de84590fd781fcea8b9a55d58cf8edcc654a879c
[ "Apache-2.0" ]
null
null
null
from cassandra.cluster import Cluster """ Function to create a connection object """
21.125
52
0.71716
from cassandra.cluster import Cluster """ Function to create a connection object """ def create_connection(nodeIP, keyspaceName): client = Connection() client.connect([nodeIP]) client.set_keyspace(keyspaceName) return client class Connection: session = None keyspace = "" def connect(sel...
540
171
45
1486a360dd7f4b817b63959172531787c4bc5dff
1,663
py
Python
python/mystuff/prime_number_generator.py
DrGaud/Python
6b9570b78ef5c073d91be17d6ea140f641eb1e30
[ "MIT" ]
null
null
null
python/mystuff/prime_number_generator.py
DrGaud/Python
6b9570b78ef5c073d91be17d6ea140f641eb1e30
[ "MIT" ]
null
null
null
python/mystuff/prime_number_generator.py
DrGaud/Python
6b9570b78ef5c073d91be17d6ea140f641eb1e30
[ "MIT" ]
null
null
null
""" This is a script to generate prime numbers from a range of numbers. Or by checking to see if the input number is prime. """ #Calculate the prime numbers between two numbers #Allow the user to enter in a range of numbers #Secondly be able to have the user enter a number to check to see if it is prime #thirdly have ...
29.696429
94
0.706554
""" This is a script to generate prime numbers from a range of numbers. Or by checking to see if the input number is prime. """ #Calculate the prime numbers between two numbers #Allow the user to enter in a range of numbers #Secondly be able to have the user enter a number to check to see if it is prime #thirdly have ...
611
0
48
69c5c21cd7a3be4bffb1c4180c13a738a27343c9
245
py
Python
CCC/ccc16j4.py
crackersamdjam/DMOJ-Solutions
97992566595e2c7bf41b5da9217d8ef61bdd1d71
[ "MIT" ]
null
null
null
CCC/ccc16j4.py
crackersamdjam/DMOJ-Solutions
97992566595e2c7bf41b5da9217d8ef61bdd1d71
[ "MIT" ]
null
null
null
CCC/ccc16j4.py
crackersamdjam/DMOJ-Solutions
97992566595e2c7bf41b5da9217d8ef61bdd1d71
[ "MIT" ]
null
null
null
h, m = map(int, input().split(':')) t = h*60+m for i in range(120): if (t >= 7*60 and t < 10*60) or (t >= 15*60 and t < 19*60): t += 2 else: t += 1 h = t//60%24 m = t%60 # print(f'{h:02d}:{m:02d}') print('%02d:%02d' % (h, m))
18.846154
61
0.453061
h, m = map(int, input().split(':')) t = h*60+m for i in range(120): if (t >= 7*60 and t < 10*60) or (t >= 15*60 and t < 19*60): t += 2 else: t += 1 h = t//60%24 m = t%60 # print(f'{h:02d}:{m:02d}') print('%02d:%02d' % (h, m))
0
0
0
c695d019724841cad936320efcbe9ffea1a65010
1,064
py
Python
qiskit-runtime/qiskit_runtime/test_server/worker.py
Avhijit-codeboy/Portfolio-Diversification
b71abd4365a21e4c9939bd8c52cbeb83fd496583
[ "Apache-2.0" ]
null
null
null
qiskit-runtime/qiskit_runtime/test_server/worker.py
Avhijit-codeboy/Portfolio-Diversification
b71abd4365a21e4c9939bd8c52cbeb83fd496583
[ "Apache-2.0" ]
null
null
null
qiskit-runtime/qiskit_runtime/test_server/worker.py
Avhijit-codeboy/Portfolio-Diversification
b71abd4365a21e4c9939bd8c52cbeb83fd496583
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # This code is part of qiskit-runtime. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0....
28
78
0.716165
#!/usr/bin/env python # This code is part of qiskit-runtime. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0....
0
0
0
62d9574514433ddf368376bfbf58107fe55041eb
20,631
py
Python
Tools/wapiti/wapitiCore/net/web.py
Anaswae/ITWSV
a8c3944aa0b44b6c4b520afef15f4a1a2ebe98ce
[ "MIT" ]
39
2019-10-25T07:05:36.000Z
2022-03-31T23:26:51.000Z
Tools/wapiti/wapitiCore/net/web.py
Anaswae/ITWSV
a8c3944aa0b44b6c4b520afef15f4a1a2ebe98ce
[ "MIT" ]
1
2021-05-27T16:39:21.000Z
2021-05-27T16:39:21.000Z
Tools/wapiti/wapitiCore/net/web.py
Anaswae/ITWSV
a8c3944aa0b44b6c4b520afef15f4a1a2ebe98ce
[ "MIT" ]
17
2019-10-26T08:03:20.000Z
2022-02-04T04:11:14.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of the Wapiti project (http://wapiti.sourceforge.net) # Copyright (C) 2008-2018 Nicolas Surribas # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
33.491883
117
0.585672
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of the Wapiti project (http://wapiti.sourceforge.net) # Copyright (C) 2008-2018 Nicolas Surribas # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
8,401
7,127
46
b0e84764307dd9c920385521aed967480906e937
823
py
Python
server/ai/src/test_learn.py
doneva593/wifisystem
209c3ca8783f967221fe821993e0368ab96f4398
[ "MIT" ]
4,349
2018-02-16T04:33:06.000Z
2022-03-31T07:29:37.000Z
server/ai/src/test_learn.py
doneva593/wifisystem
209c3ca8783f967221fe821993e0368ab96f4398
[ "MIT" ]
203
2018-03-01T19:06:56.000Z
2022-02-18T21:20:35.000Z
server/ai/src/test_learn.py
doneva593/wifisystem
209c3ca8783f967221fe821993e0368ab96f4398
[ "MIT" ]
359
2018-03-06T10:10:33.000Z
2022-03-09T13:17:39.000Z
from learn import * from server import *
23.514286
61
0.6452
from learn import * from server import * def test_to_base58(): assert to_base58("testdb") == "zxo1qZZb" def basic_learning(): ai = AI() ai.learn('../testing/testdb.csv') ai.save('dGVzdGRi.find3.ai') def test_basic_learning(benchmark): result = benchmark(basic_learning) def basic_clas...
599
0
175
5ab5761d771db55dcc763ea544a1ad011e68bbe8
2,094
py
Python
laundryPosSystem/laundryApp/forms.py
desmond75/luandry-point-of-sales-
623a927b7366393886bbbce902c2d4a585d9c3dd
[ "bzip2-1.0.6" ]
1
2019-04-28T05:04:39.000Z
2019-04-28T05:04:39.000Z
laundryPosSystem/laundryApp/forms.py
desmond75/luandry-point-of-sales-
623a927b7366393886bbbce902c2d4a585d9c3dd
[ "bzip2-1.0.6" ]
2
2019-04-11T13:25:39.000Z
2019-05-05T12:53:05.000Z
laundryPosSystem/laundryApp/forms.py
desmond75/luandry-point-of-sales-
623a927b7366393886bbbce902c2d4a585d9c3dd
[ "bzip2-1.0.6" ]
null
null
null
from django import forms
59.828571
175
0.715855
from django import forms class LoginForm(forms.Form): email = forms.CharField(max_length=50, widget=forms.EmailInput(attrs={'placeholder':"Enter your email", 'class':'browser-default'})) password = forms.CharField(max_length=50, widget=forms.PasswordInput(attrs={'placeholder':"...
0
1,973
92
81349bca698b9d986373c64599065f41ed8657f2
1,370
py
Python
y2020/vision/tools/python_code/image_capture.py
AustinSchuh/971-Robot-Code
99abc66fd2d899c0bdab338dc6f57dc5def9be8d
[ "Apache-2.0" ]
39
2021-06-18T03:22:30.000Z
2022-03-21T15:23:43.000Z
y2020/vision/tools/python_code/image_capture.py
AustinSchuh/971-Robot-Code
99abc66fd2d899c0bdab338dc6f57dc5def9be8d
[ "Apache-2.0" ]
10
2021-06-18T03:22:19.000Z
2022-03-18T22:14:15.000Z
y2020/vision/tools/python_code/image_capture.py
AustinSchuh/971-Robot-Code
99abc66fd2d899c0bdab338dc6f57dc5def9be8d
[ "Apache-2.0" ]
4
2021-08-19T19:20:04.000Z
2022-03-08T07:33:18.000Z
#!/usr/bin/python3 import cv2 import datetime import sys import gflags import glog FLAGS = gflags.FLAGS if __name__ == '__main__': argv = FLAGS(sys.argv) sys.exit(main(argv))
25.849057
72
0.618978
#!/usr/bin/python3 import cv2 import datetime import sys import gflags import glog FLAGS = gflags.FLAGS def main(argv): # Open the device at the ID X for /dev/videoX # NOTE: if camera_reader is running, it will need to be stopped # since it will have control of the camera. CAMERA_INDEX = 0 cap ...
1,158
0
23
b44e90e4abe9789aee680d00a9dcb60ab43e4349
700
py
Python
model_demo/home/views.py
n3k0fi5t/Django_Tutorial
e3953335ca88fe22c68268fd76afb7c4f9bbb55f
[ "MIT" ]
null
null
null
model_demo/home/views.py
n3k0fi5t/Django_Tutorial
e3953335ca88fe22c68268fd76afb7c4f9bbb55f
[ "MIT" ]
null
null
null
model_demo/home/views.py
n3k0fi5t/Django_Tutorial
e3953335ca88fe22c68268fd76afb7c4f9bbb55f
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.contrib.auth.models import User from django.http import HttpResponse from .models import RestaurantReview, Restaurant from random import randint # Create your views here.
26.923077
86
0.707143
from django.shortcuts import render from django.contrib.auth.models import User from django.http import HttpResponse from .models import RestaurantReview, Restaurant from random import randint def create_comment(): comment = '' for _ in range(randint(20, 100)): comment += chr(randint(0, ord('z')-ord...
433
0
45
a176d4ff9de017217a4fc8ab125d87d84a5df5ef
556
py
Python
algorithms/binary_search.py
chiqj/grokking-algorithms
4681a4ea806a441d3511c8fb9d91a218b3fc89de
[ "MIT" ]
1
2019-05-04T10:35:08.000Z
2019-05-04T10:35:08.000Z
algorithms/binary_search.py
chiqj/grokking-algorithms
4681a4ea806a441d3511c8fb9d91a218b3fc89de
[ "MIT" ]
null
null
null
algorithms/binary_search.py
chiqj/grokking-algorithms
4681a4ea806a441d3511c8fb9d91a218b3fc89de
[ "MIT" ]
null
null
null
# coding=utf-8 from typing import Union
27.8
73
0.573741
# coding=utf-8 from typing import Union class BinarySearch: def search(self, search_list: list, search_item) -> Union[int, None]: low_idx = 0 high_idx = len(search_list) - 1 while low_idx <= high_idx: current_idx = (low_idx + high_idx) // 2 if search_list[current_...
467
-2
49
9133a43ebceebfb5193e9b5b90b7edd5a9df7846
117
py
Python
goodman_pipeline/broadcaster/__init__.py
simontorres/goodman-pipeline-live
0ed20db75b69f973dfa63f94f18d1c6a5e826ea8
[ "BSD-3-Clause" ]
null
null
null
goodman_pipeline/broadcaster/__init__.py
simontorres/goodman-pipeline-live
0ed20db75b69f973dfa63f94f18d1c6a5e826ea8
[ "BSD-3-Clause" ]
1
2018-08-17T17:13:32.000Z
2018-08-17T17:13:32.000Z
goodman_pipeline/broadcaster/__init__.py
simontorres/goodman-pipeline-live
0ed20db75b69f973dfa63f94f18d1c6a5e826ea8
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from .core import (ZmqSubscriber, ZmqPublisher) from .core import load_config
29.25
47
0.846154
from __future__ import absolute_import from .core import (ZmqSubscriber, ZmqPublisher) from .core import load_config
0
0
0
1e947714fcb73785ed1259737b90361f50f376ab
3,073
py
Python
tests/test_s3.py
daleroberts/nrt-predict
4df580fdc77450f416279893579445d99e0784c6
[ "Apache-2.0" ]
2
2021-06-23T21:41:08.000Z
2022-02-15T06:16:40.000Z
tests/test_s3.py
daleroberts/nrt-predict
4df580fdc77450f416279893579445d99e0784c6
[ "Apache-2.0" ]
10
2021-04-07T05:05:02.000Z
2021-06-23T21:49:29.000Z
tests/test_s3.py
GeoscienceAustralia/nrt-predict
4df580fdc77450f416279893579445d99e0784c6
[ "Apache-2.0" ]
2
2021-04-07T00:56:32.000Z
2021-06-23T01:18:02.000Z
import subprocess import textwrap import pytest import signal import socket import time import os PORT = 9000 HOST = 'localhost' KEY = "testtesttest" @pytest.fixture(scope="session") #def test_ancillary_on_s3(minio, tmp_path): # f = tmp_path / "test.yaml" # g = tmp_path / "clip.geojson" # f.write_text(textw...
27.936364
139
0.656036
import subprocess import textwrap import pytest import signal import socket import time import os PORT = 9000 HOST = 'localhost' KEY = "testtesttest" @pytest.fixture(scope="session") def minio(): # Setup os.environ['MINIO_ACCESS_KEY'] = KEY os.environ['MINIO_SECRET_KEY'] = KEY os.environ['MINT_MO...
2,299
0
91
53c358cb93f6af7ae7a45bcd58015707530ef36a
3,148
py
Python
coloring_models.py
Not-aDr/Coloring_Using_CNN
e0a030defb7f03f67cff250ba5b858b864f9a02a
[ "MIT" ]
1
2021-12-14T19:02:33.000Z
2021-12-14T19:02:33.000Z
coloring_models.py
vis1511/Coloring_Using_CNN
e0a030defb7f03f67cff250ba5b858b864f9a02a
[ "MIT" ]
null
null
null
coloring_models.py
vis1511/Coloring_Using_CNN
e0a030defb7f03f67cff250ba5b858b864f9a02a
[ "MIT" ]
1
2021-12-14T19:05:29.000Z
2021-12-14T19:05:29.000Z
import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models as models pretrained_model_path = 'pretrained/resnet_gray_weights.pth.tar'
46.985075
123
0.653748
import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models as models pretrained_model_path = 'pretrained/resnet_gray_weights.pth.tar' class Fusion_Upsample_Net(nn.Module): def __init__(self,midlevel_input_size=128, global_input_size=512): super(Fusion_Upsample_Ne...
2,755
28
182
a83e7bdb3f3a2f8a900e41d3128f09a1bb8e3085
10,397
py
Python
pysph/examples/rigid_body/ellipsoid.py
nilsmeyerkit/pysph
65c90f63e41e5adf79585e8f479d7fc80a384462
[ "BSD-3-Clause" ]
null
null
null
pysph/examples/rigid_body/ellipsoid.py
nilsmeyerkit/pysph
65c90f63e41e5adf79585e8f479d7fc80a384462
[ "BSD-3-Clause" ]
null
null
null
pysph/examples/rigid_body/ellipsoid.py
nilsmeyerkit/pysph
65c90f63e41e5adf79585e8f479d7fc80a384462
[ "BSD-3-Clause" ]
3
2022-03-04T16:07:29.000Z
2022-03-16T19:28:32.000Z
"""Ellipsoid suspended in shear flow (2 hours). An example to illustrate 3d pysph rigid_body framework """ from __future__ import print_function import numpy as np from scipy.integrate import odeint from pysph.base.nnps import DomainManager from pysph.base.utils import (get_particle_array_wcsph, ...
37
78
0.52544
"""Ellipsoid suspended in shear flow (2 hours). An example to illustrate 3d pysph rigid_body framework """ from __future__ import print_function import numpy as np from scipy.integrate import odeint from pysph.base.nnps import DomainManager from pysph.base.utils import (get_particle_array_wcsph, ...
0
0
0
28acc1dd5efff34ef4fa5a4bc4d77e11276846b1
4,622
py
Python
faster-rcnn-base-model/code/tuning.py
shuyiii/A-Hybrid-of-Fast-rcnn-and-Bayesian-Model-for-Object-Detection
20834a658b416507c7a78d5d0f09b15f9370a802
[ "Apache-2.0" ]
null
null
null
faster-rcnn-base-model/code/tuning.py
shuyiii/A-Hybrid-of-Fast-rcnn-and-Bayesian-Model-for-Object-Detection
20834a658b416507c7a78d5d0f09b15f9370a802
[ "Apache-2.0" ]
null
null
null
faster-rcnn-base-model/code/tuning.py
shuyiii/A-Hybrid-of-Fast-rcnn-and-Bayesian-Model-for-Object-Detection
20834a658b416507c7a78d5d0f09b15f9370a802
[ "Apache-2.0" ]
null
null
null
#tuning Parameter import numpy as np import glob import os import pandas as pd import scipy import matplotlib.pyplot as plt from sklearn import datasets, linear_model from scipy.stats import norm from sklearn.neighbors import KernelDensity from scipy.stats import poisson import math from itertools import permutations i...
41.267857
94
0.53743
#tuning Parameter import numpy as np import glob import os import pandas as pd import scipy import matplotlib.pyplot as plt from sklearn import datasets, linear_model from scipy.stats import norm from sklearn.neighbors import KernelDensity from scipy.stats import poisson import math from itertools import permutations i...
773
0
22
2abd871b1394f270e1a5fb98b33a235e20422cde
5,032
py
Python
kommu/livetuner/livetune_conf.py
kommuai/bukapilot
616df41ff5fdf745f975ef9b796826393cc71434
[ "MIT" ]
13
2021-10-31T13:49:45.000Z
2022-03-17T10:35:03.000Z
kommu/livetuner/livetune_conf.py
kommuai/bukapilot
616df41ff5fdf745f975ef9b796826393cc71434
[ "MIT" ]
15
2021-09-03T10:11:55.000Z
2022-03-24T14:19:50.000Z
kommu/livetuner/livetune_conf.py
kommuai/bukapilot
616df41ff5fdf745f975ef9b796826393cc71434
[ "MIT" ]
1
2022-03-14T12:53:10.000Z
2022-03-14T12:53:10.000Z
import json import os
36.729927
121
0.574722
import json import os class livetune_conf(): def __init__(self, CP=None): self.conf = self.read_config() if CP is not None: self.init_config(CP) def init_config(self, CP): write_conf = False if self.conf['tuneGernby'] != "1": self.conf['tuneGernby'] = str(1) write_conf = True ...
4,887
1
122
be07a8071fd470a009ae8cabcdaaf7bbcb9d626a
45,500
py
Python
src/larksuiteoapi/service/bitable/v1/api.py
VXenomac/oapi-sdk-python
156b789b3d20653802f64842c9a26229dd9252d7
[ "Apache-2.0" ]
50
2021-04-11T05:24:10.000Z
2022-03-29T10:14:13.000Z
src/larksuiteoapi/service/bitable/v1/api.py
larksuite/oapi-sdk-python
70fda5b1ccf765938bf207dff0117c0c03a93605
[ "Apache-2.0" ]
20
2021-04-07T15:17:44.000Z
2022-03-23T06:27:12.000Z
src/larksuiteoapi/service/bitable/v1/api.py
VXenomac/oapi-sdk-python
156b789b3d20653802f64842c9a26229dd9252d7
[ "Apache-2.0" ]
8
2021-04-25T15:02:17.000Z
2022-03-13T15:00:59.000Z
# -*- coding: UTF-8 -*- # Code generated by lark suite oapi sdk gen from typing import * from ....api import Request as APIRequest, Response as APIResponse, set_timeout, set_tenant_key, set_user_access_token, set_path_params, \ set_query_params, set_response_stream, set_is_response_stream, FormData, FormDataFile ...
35.939968
163
0.646901
# -*- coding: UTF-8 -*- # Code generated by lark suite oapi sdk gen from typing import * from ....api import Request as APIRequest, Response as APIResponse, set_timeout, set_tenant_key, set_user_access_token, set_path_params, \ set_query_params, set_response_stream, set_is_response_stream, FormData, FormDataFile ...
40,326
457
4,212
6a29d5ef693f251cd2c38e20548c2b51080069c5
1,323
py
Python
detect_blur.py
Gustafferson/particleVirtualization
358fc8d9cb8c2e14b2d63b69518ee2d8c009cabf
[ "MIT" ]
null
null
null
detect_blur.py
Gustafferson/particleVirtualization
358fc8d9cb8c2e14b2d63b69518ee2d8c009cabf
[ "MIT" ]
null
null
null
detect_blur.py
Gustafferson/particleVirtualization
358fc8d9cb8c2e14b2d63b69518ee2d8c009cabf
[ "MIT" ]
null
null
null
# import the necessary packages from imutils import paths import argparse import cv2 # construct the argument parse and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--images", required=True, help="path to input directory of images") ap.add_argument("-t", "--threshold", type=float, defau...
33.923077
78
0.733182
# import the necessary packages from imutils import paths import argparse import cv2 def variance_of_laplacian(image): # compute the Laplacian of the image and then return the focus # measure, which is simply the variance of the Laplacian return cv2.Laplacian(image, cv2.CV_64F).var() # construct the argument par...
181
0
23
1d602a456d89499d971636ab1b97383c6a7aee76
162
py
Python
src/tfchain/tests/encoding/__init__.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
null
null
null
src/tfchain/tests/encoding/__init__.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
201
2019-05-20T15:06:05.000Z
2019-07-16T12:48:59.000Z
src/tfchain/tests/encoding/__init__.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
1
2019-06-19T14:39:20.000Z
2019-06-19T14:39:20.000Z
import tfchain.tests.encoding.rivbin as testrivbin import tfchain.tests.encoding.siabin as testsiabin
23.142857
50
0.777778
import tfchain.tests.encoding.rivbin as testrivbin import tfchain.tests.encoding.siabin as testsiabin def tests(): testrivbin.tests() testsiabin.tests()
37
0
23
2163afcdee49f8bc07fb291bbca8bfb98c3a035d
195
py
Python
examples/controlled/inverted_pendulum/controller.py
brutzl/pymbs
fb7c91435f56b5c4d460f82f081d5d1960fea886
[ "MIT" ]
null
null
null
examples/controlled/inverted_pendulum/controller.py
brutzl/pymbs
fb7c91435f56b5c4d460f82f081d5d1960fea886
[ "MIT" ]
null
null
null
examples/controlled/inverted_pendulum/controller.py
brutzl/pymbs
fb7c91435f56b5c4d460f82f081d5d1960fea886
[ "MIT" ]
null
null
null
import numpy as np
24.375
60
0.584615
import numpy as np def controlForce(t, y, sensors): k = [ 25.4841998, 83.5330999, 20.38735984, 18.19367992] y0 = np.r_[0, np.pi, 0 ,0] F = np.dot(y-y0, k) return np.r_[F, 0, 0]
153
0
23
37369dcd8aed45b290f9bc7ddf36c6da2b70629e
5,549
py
Python
img2dataset/writer.py
rom1504/img2dataset
227ab8a5c2dbb54c702c195b094576a86feec15f
[ "MIT" ]
482
2021-08-12T07:33:03.000Z
2022-03-31T18:28:01.000Z
img2dataset/writer.py
rom1504/img2dataset
227ab8a5c2dbb54c702c195b094576a86feec15f
[ "MIT" ]
118
2021-08-12T07:02:37.000Z
2022-03-31T20:20:18.000Z
img2dataset/writer.py
rom1504/img2dataset
227ab8a5c2dbb54c702c195b094576a86feec15f
[ "MIT" ]
39
2021-08-21T20:31:46.000Z
2022-03-30T12:16:49.000Z
""""writer module handle writing the images to disk""" import webdataset as wds import json import pandas as pd import pyarrow.parquet as pq import pyarrow as pa import fsspec class BufferedParquetWriter: """Write samples to parquet files incrementally with a buffer""" def flush(self, force=False): ...
39.635714
112
0.63597
""""writer module handle writing the images to disk""" import webdataset as wds import json import pandas as pd import pyarrow.parquet as pq import pyarrow as pa import fsspec class BufferedParquetWriter: """Write samples to parquet files incrementally with a buffer""" def __init__(self, output_file, buffer...
2,664
0
270
c0b0fb4d1624444e28055b2958d5af3f3ae657f9
2,356
py
Python
tests/test_extension.py
quodrumglas/mopidy-gmusic
c65ee9b910f7d845363ec0354261f13e431d1401
[ "Apache-2.0" ]
null
null
null
tests/test_extension.py
quodrumglas/mopidy-gmusic
c65ee9b910f7d845363ec0354261f13e431d1401
[ "Apache-2.0" ]
null
null
null
tests/test_extension.py
quodrumglas/mopidy-gmusic
c65ee9b910f7d845363ec0354261f13e431d1401
[ "Apache-2.0" ]
1
2019-05-02T21:59:05.000Z
2019-05-02T21:59:05.000Z
import unittest import mock from mopidy_gmusic import ( GMusicExtension, backend as backend_lib, scrobbler_frontend)
32.273973
78
0.648557
import unittest import mock from mopidy_gmusic import ( GMusicExtension, backend as backend_lib, scrobbler_frontend) class ExtensionTest(unittest.TestCase): @staticmethod def get_config(): config = {} config['username'] = 'testuser@gmail.com' config['password'] = 'secret_passwor...
2,038
171
23
7748d8fdfd4062ded5084bacdf90b2cfc6c20d75
4,738
py
Python
project/infoWindow.py
yaxzo/electronic_library
4385d9d1acc8174ad50ef2f2ff06d2806c361dca
[ "MIT" ]
null
null
null
project/infoWindow.py
yaxzo/electronic_library
4385d9d1acc8174ad50ef2f2ff06d2806c361dca
[ "MIT" ]
null
null
null
project/infoWindow.py
yaxzo/electronic_library
4385d9d1acc8174ad50ef2f2ff06d2806c361dca
[ "MIT" ]
null
null
null
from PyQt6 import QtCore, QtWidgets import sys # ф-ция с основными настройками окна if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) InfoWindow = QtWidgets.QMainWindow() ui = UiInfoWindow() ui.setup_ui(InfoWindow) InfoWindow.show() sys.exit(app.exec())
43.87037
89
0.689954
from PyQt6 import QtCore, QtWidgets import sys class UiInfoWindow(object): # ф-ция с основными настройками окна def setup_ui(self, info_window): # название объекта и размер окна info_window.setObjectName("InfoWindow") info_window.resize(380, 590) # создание виджет...
4,456
6
81
d0444306a9aed3c85300a33a47a81feb575f0061
28,509
py
Python
spearmint/visualizations/progress_curve.py
fernandezdaniel/Spearmint
3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84
[ "RSA-MD" ]
6
2021-06-29T11:26:49.000Z
2022-01-20T18:12:47.000Z
spearmint/visualizations/progress_curve.py
fernandezdaniel/Spearmint
3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84
[ "RSA-MD" ]
null
null
null
spearmint/visualizations/progress_curve.py
fernandezdaniel/Spearmint
3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84
[ "RSA-MD" ]
9
2018-06-28T13:06:35.000Z
2021-06-20T18:21:58.000Z
# -*- coding: utf-8 -*- # spearmint # # Academic and Non-Commercial Research Use Software License and Terms # of Use # # Spearmint is a software package to perform Bayesian optimization # according to specific algorithms (the “Software”). The Software is # designed to automatically run experiments (thus the code name ...
45.324324
133
0.639482
# -*- coding: utf-8 -*- # spearmint # # Academic and Non-Commercial Research Use Software License and Terms # of Use # # Spearmint is a software package to perform Bayesian optimization # according to specific algorithms (the “Software”). The Software is # designed to automatically run experiments (thus the code name ...
14,071
0
89
0a6f71338c1e185a263af467ec3bf1b85d46b602
5,167
py
Python
robustness_DGI.py
JonnoB/Spring_Embeddings_paper
fe36b1212d533b4b79074d338d945fa6af3b1079
[ "Apache-2.0" ]
null
null
null
robustness_DGI.py
JonnoB/Spring_Embeddings_paper
fe36b1212d533b4b79074d338d945fa6af3b1079
[ "Apache-2.0" ]
null
null
null
robustness_DGI.py
JonnoB/Spring_Embeddings_paper
fe36b1212d533b4b79074d338d945fa6af3b1079
[ "Apache-2.0" ]
null
null
null
import os import networkx as nx import pandas as pd import numpy as np from stellargraph.mapper import ( CorruptedGenerator, FullBatchNodeGenerator, ) from stellargraph import StellarGraph from stellargraph.layer import GCN, DeepGraphInfomax from tensorflow.keras.optimizers import Adam from tensorflow.keras.cal...
38.849624
111
0.73234
import os import networkx as nx import pandas as pd import numpy as np from stellargraph.mapper import ( CorruptedGenerator, FullBatchNodeGenerator, ) from stellargraph import StellarGraph from stellargraph.layer import GCN, DeepGraphInfomax from tensorflow.keras.optimizers import Adam from tensorflow.keras.cal...
0
0
0
36052ea0bda433e5f850b65f759153390b7fb85f
489
py
Python
scripts/settings.py
mastercoder82/FlickrIndex
6710da1bf57a1210b3f4a12a6659f2e2090ae894
[ "MIT" ]
null
null
null
scripts/settings.py
mastercoder82/FlickrIndex
6710da1bf57a1210b3f4a12a6659f2e2090ae894
[ "MIT" ]
2
2021-02-08T20:17:07.000Z
2021-06-01T21:46:37.000Z
scripts/settings.py
mastercoder82/FlickrIndex
6710da1bf57a1210b3f4a12a6659f2e2090ae894
[ "MIT" ]
null
null
null
# Ignore pictures where the tagged concept has a probability below the threshold THRESHOLD = 0.9 # Number of pictures to index MAX_MEDIA = 1000 # Clarifai API details - http://www.clarifai.com/api CLARIFAI_APP_ID = 'xxx' CLARIFAI_APP_SECRET = 'xxx' # Algolia API details = http://www.clarifai.com/api ALGOLIA_APP_ID = ...
28.764706
80
0.758691
# Ignore pictures where the tagged concept has a probability below the threshold THRESHOLD = 0.9 # Number of pictures to index MAX_MEDIA = 1000 # Clarifai API details - http://www.clarifai.com/api CLARIFAI_APP_ID = 'xxx' CLARIFAI_APP_SECRET = 'xxx' # Algolia API details = http://www.clarifai.com/api ALGOLIA_APP_ID = ...
0
0
0
54c95a2238e8553d9f71144b350cb90ccde1aaa1
1,254
py
Python
MagniPy/Analysis/Statistics/summary_statistics.py
dangilman/MagniPy
820b82ea0f6559c895f11c92d93de475a92d38b0
[ "MIT" ]
2
2020-02-20T02:27:16.000Z
2020-02-20T08:38:23.000Z
MagniPy/Analysis/Statistics/summary_statistics.py
dangilman/MagniPy
820b82ea0f6559c895f11c92d93de475a92d38b0
[ "MIT" ]
1
2021-11-15T17:50:20.000Z
2021-11-15T17:50:20.000Z
MagniPy/Analysis/Statistics/summary_statistics.py
dangilman/MagniPy
820b82ea0f6559c895f11c92d93de475a92d38b0
[ "MIT" ]
null
null
null
import numpy as np
34.833333
150
0.562998
import numpy as np def quadrature_piecewise(model,observed): residuals = model - observed residuals = np.sqrt(np.sum(residuals**2,axis=1)) return residuals def R(model,observed,config,img_order): R = [] if config == 'cusp': R_obs = (observed[0] - observed[1] - observed[2])*(observed[0...
1,187
0
46
c7206ee64590a6c9b26e5925643c77cfd32b66e1
469
py
Python
Mundo 2 Estruturas de Controle/ex067.py
costa53/curso_em_video_python3
4f859641324f8b35be56d807f40457d7dddc451f
[ "MIT" ]
1
2022-02-17T16:23:52.000Z
2022-02-17T16:23:52.000Z
Mundo 2 Estruturas de Controle/ex067.py
costa53/curso_em_video_python3
4f859641324f8b35be56d807f40457d7dddc451f
[ "MIT" ]
null
null
null
Mundo 2 Estruturas de Controle/ex067.py
costa53/curso_em_video_python3
4f859641324f8b35be56d807f40457d7dddc451f
[ "MIT" ]
null
null
null
# DESAFIO 067 # Faça um programa que mostre a tabuada de vários números, um de cada vez, para cada valor digitado # pelo usuário. O programa será interrompido quando o número solicitado for negativo. while True: num = int(input('Digite um número para ver sua tabuada: ')) print('-' * 30) if num < 0: ...
33.5
99
0.648188
# DESAFIO 067 # Faça um programa que mostre a tabuada de vários números, um de cada vez, para cada valor digitado # pelo usuário. O programa será interrompido quando o número solicitado for negativo. while True: num = int(input('Digite um número para ver sua tabuada: ')) print('-' * 30) if num < 0: ...
0
0
0
da16458bed5ea8d008d9aa06d2e8df73a85426b6
37,910
py
Python
ubertool/beerex/beerex_exe.py
qed-uber/ubertool
472a143e110f634afdfe03d503e5f442b1e57b86
[ "Unlicense" ]
2
2018-01-02T12:58:00.000Z
2018-04-03T15:40:59.000Z
ubertool/beerex/beerex_exe.py
qed-uber/ubertool
472a143e110f634afdfe03d503e5f442b1e57b86
[ "Unlicense" ]
21
2017-08-02T18:00:16.000Z
2019-08-20T15:57:09.000Z
ubertool/beerex/beerex_exe.py
quanted/ubertool
472a143e110f634afdfe03d503e5f442b1e57b86
[ "Unlicense" ]
null
null
null
from __future__ import division #brings in Python 3.0 mixed type calculations import numpy as np import os import pandas as pd import sys #find parent directory and import model parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) sys.path.append(parentddir) from base.uber_model impo...
45.564904
178
0.634714
from __future__ import division #brings in Python 3.0 mixed type calculations import numpy as np import os import pandas as pd import sys #find parent directory and import model parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) sys.path.append(parentddir) from base.uber_model impo...
3,204
0
27
506cb7ce8d5c619c545e6004b56f1f3f9bf3ab6d
1,261
py
Python
app/users/migrations/0004_auto_20210216_2041.py
hossamhsn74/django-PreventiaTech-task
e74cdbac01d96a3cbe076612ea92df5cc62198bd
[ "MIT" ]
null
null
null
app/users/migrations/0004_auto_20210216_2041.py
hossamhsn74/django-PreventiaTech-task
e74cdbac01d96a3cbe076612ea92df5cc62198bd
[ "MIT" ]
null
null
null
app/users/migrations/0004_auto_20210216_2041.py
hossamhsn74/django-PreventiaTech-task
e74cdbac01d96a3cbe076612ea92df5cc62198bd
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-02-16 20:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
34.081081
121
0.589215
# Generated by Django 3.1.5 on 2021-02-16 20:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('users', '0003_delete_profile'), ] operations = [ ...
0
1,052
23
07eb67593e2291dd425132ed268a88e9bc883e76
6,185
py
Python
src/network/generator.py
sedrickkeh/high-fidelity-dual-image
9cefd378467826b91596653df38666e469bb23e0
[ "Apache-2.0" ]
266
2020-08-25T00:04:58.000Z
2022-03-31T06:41:03.000Z
src/network/generator.py
sedrickkeh/high-fidelity-dual-image
9cefd378467826b91596653df38666e469bb23e0
[ "Apache-2.0" ]
27
2020-09-01T21:04:27.000Z
2022-03-22T02:24:48.000Z
src/network/generator.py
sedrickkeh/high-fidelity-dual-image
9cefd378467826b91596653df38666e469bb23e0
[ "Apache-2.0" ]
50
2020-08-28T02:11:46.000Z
2022-02-25T02:44:42.000Z
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np # Custom from src.normalisation import channel, instance if __name__ == "__main__": C = 8 y = torch.randn([3,C,16,16]) y_dims = y.size() G = Generator(y_dims[1:], y_dims[0], C=C, n_residual_blocks=3, sample_noise=...
34.361111
90
0.592563
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np # Custom from src.normalisation import channel, instance class ResidualBlock(nn.Module): def __init__(self, input_dims, kernel_size=3, stride=1, channel_norm=True, activation='relu'): """ input_...
964
4,808
46
b063c54d0244824e5948bd4373cd0b50f7f60491
9,395
py
Python
maindatabase/views.py
dragonman164/Database-for-Covid-19-Vaccination-with-API-support
b34c29414967fcdf2d9fb34ed815f5c2752694b6
[ "MIT" ]
1
2020-12-30T16:31:14.000Z
2020-12-30T16:31:14.000Z
maindatabase/views.py
rishusingh022/Database-for-Covid-19-Vaccination-with-API-support
8d2137f06d10ca620a4fe24ffc34c410b8a78ad6
[ "MIT" ]
null
null
null
maindatabase/views.py
rishusingh022/Database-for-Covid-19-Vaccination-with-API-support
8d2137f06d10ca620a4fe24ffc34c410b8a78ad6
[ "MIT" ]
2
2020-12-19T19:27:08.000Z
2021-01-02T07:43:39.000Z
import pandas as pd from django.http import response from django.shortcuts import render,HttpResponse from .models import Person,report,management,Person_without_Aadhar import datetime from django.utils.timezone import utc from rest_framework import serializers, status,viewsets from rest_framework.views import APIView ...
36.274131
112
0.60628
import pandas as pd from django.http import response from django.shortcuts import render,HttpResponse from .models import Person,report,management,Person_without_Aadhar import datetime from django.utils.timezone import utc from rest_framework import serializers, status,viewsets from rest_framework.views import APIView ...
8,025
253
364
0505bcee9080473604a64742fd6d032640526f71
3,622
py
Python
handlers/post_hander.py
RuiCoreSci/Flask-Restful
03f98a17487d407b69b853a9bf0ed20d2c5b003b
[ "MIT" ]
7
2020-05-24T02:15:46.000Z
2020-11-26T07:14:44.000Z
handlers/post_hander.py
RuiCoreSci/Flask-Restful
03f98a17487d407b69b853a9bf0ed20d2c5b003b
[ "MIT" ]
12
2020-05-17T10:46:29.000Z
2021-05-06T20:08:37.000Z
handlers/post_hander.py
RuiCoreSci/Flask-Restful
03f98a17487d407b69b853a9bf0ed20d2c5b003b
[ "MIT" ]
4
2020-05-09T07:26:09.000Z
2021-10-31T07:09:10.000Z
from exceptions.exceptions import ArgumentInvalid, ObjectsNotExist from typing import Generator, Optional from sqlalchemy import and_ from configures.const import POST_MINIMUM_WORDS from handlers import BaseHandler from models.database_models import Comment from models.database_models.post_model import Post from mode...
35.861386
90
0.686637
from exceptions.exceptions import ArgumentInvalid, ObjectsNotExist from typing import Generator, Optional from sqlalchemy import and_ from configures.const import POST_MINIMUM_WORDS from handlers import BaseHandler from models.database_models import Comment from models.database_models.post_model import Post from mode...
2,810
361
23
f854e127d0d6d1aa5573e37894c5b2483aa079c5
2,397
py
Python
storm_analysis/spliner/find_peaks_std.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
storm_analysis/spliner/find_peaks_std.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
storm_analysis/spliner/find_peaks_std.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/env python """ Cubic spline peak finder. Hazen 03/16 """ import pickle import numpy import tifffile import storm_analysis.sa_library.analysis_io as analysisIO import storm_analysis.sa_library.fitting as fitting import storm_analysis.sa_library.ia_utilities_c as utilC import storm_analysis.sa_library.matc...
33.291667
107
0.647059
#!/usr/bin/env python """ Cubic spline peak finder. Hazen 03/16 """ import pickle import numpy import tifffile import storm_analysis.sa_library.analysis_io as analysisIO import storm_analysis.sa_library.fitting as fitting import storm_analysis.sa_library.ia_utilities_c as utilC import storm_analysis.sa_library.matc...
0
0
0
0b462e090ae9ab6563e9477852c0ab03b142391e
1,474
py
Python
code.py
dunfred/Hackathon
459e11deb9fb81a6e29e1b2a42947c13f30b98d5
[ "MIT" ]
1
2021-09-01T17:18:40.000Z
2021-09-01T17:18:40.000Z
code.py
dunfred/Hackathon
459e11deb9fb81a6e29e1b2a42947c13f30b98d5
[ "MIT" ]
null
null
null
code.py
dunfred/Hackathon
459e11deb9fb81a6e29e1b2a42947c13f30b98d5
[ "MIT" ]
null
null
null
import pandas as pd url = "https://en.wikipedia.org/wiki/Road_safety_in_Europe" target_table_name = "European Union Road Safety Facts and Figures" # Fetch all tables on webpage that match # provided table name and return as list df = pd.read_html(url, match=target_table_name) # Grab the first table df = df[0] if le...
34.27907
100
0.652646
import pandas as pd url = "https://en.wikipedia.org/wiki/Road_safety_in_Europe" target_table_name = "European Union Road Safety Facts and Figures" # Fetch all tables on webpage that match # provided table name and return as list df = pd.read_html(url, match=target_table_name) # Grab the first table df = df[0] if le...
0
0
0
0c5067310a9afe1eb619b65f552eeb3afef69daa
679
py
Python
ph-geocoder.py
rukku/ph-geocodes
082a2055610c2af24562842ba36212172d5b1c80
[ "Unlicense" ]
1
2017-09-18T12:01:14.000Z
2017-09-18T12:01:14.000Z
ph-geocoder.py
rukku/ph-geocodes
082a2055610c2af24562842ba36212172d5b1c80
[ "Unlicense" ]
null
null
null
ph-geocoder.py
rukku/ph-geocodes
082a2055610c2af24562842ba36212172d5b1c80
[ "Unlicense" ]
1
2019-09-11T02:28:01.000Z
2019-09-11T02:28:01.000Z
import csv data = loaddata() for k,v in data.iteritems(): print len(k), k + ":" + v #return 0 if not a place #return 1 if it's region #return 2 if it's a province #return 3 if it's a munincipality
16.560976
50
0.581738
import csv def loaddata(): with open('geocodes.province.csv', 'rb') as f: reader = csv.reader(f) next(reader, None) #skip header codelist = dict() #build regional codes for row in reader: codelist[row[1]] = row[0] #print row[1], row[0] return ...
337
0
115
037ae72ac5d9a895629c39fc78a2f46b3bf36fd9
4,139
py
Python
tests/apps/search/test_views_bootstrap_elasticsearch.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
174
2018-04-14T23:36:01.000Z
2022-03-10T09:27:01.000Z
tests/apps/search/test_views_bootstrap_elasticsearch.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
631
2018-04-04T11:28:53.000Z
2022-03-31T11:18:31.000Z
tests/apps/search/test_views_bootstrap_elasticsearch.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
64
2018-06-27T08:35:01.000Z
2022-03-10T09:27:43.000Z
"""Test suite for the bootstrap_elasticsearch view of richie's search app.""" import json from unittest import mock from django.contrib.messages import get_messages from cms.test_utils.testcases import CMSTestCase from richie.apps.core.factories import UserFactory class BootstrapElasticsearchViewTestCase(CMSTestCa...
39.798077
94
0.70186
"""Test suite for the bootstrap_elasticsearch view of richie's search app.""" import json from unittest import mock from django.contrib.messages import get_messages from cms.test_utils.testcases import CMSTestCase from richie.apps.core.factories import UserFactory class BootstrapElasticsearchViewTestCase(CMSTestCa...
0
0
0
8e9c10efc8a64a3b68b811cec6fdfc09369dc0bc
4,457
py
Python
linuxOperation/app/maillist/models.py
zhouli121018/core
f9700204349ecb22d45e700e9e27e79412829199
[ "MIT" ]
null
null
null
linuxOperation/app/maillist/models.py
zhouli121018/core
f9700204349ecb22d45e700e9e27e79412829199
[ "MIT" ]
1
2021-06-10T20:45:55.000Z
2021-06-10T20:45:55.000Z
linuxOperation/app/maillist/models.py
zhouli121018/core
f9700204349ecb22d45e700e9e27e79412829199
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time from django.db import models from django.utils.translation import ugettext_lazy as _ from app.core.models import Domain, Mailbox EXT_LIST_TYPE = ( ('general', _(u'普通邮件列表')), ('dept', _(u'部门邮件列表')), ('sys', _(u'系统邮件列表')) ) EXT_LIST_...
36.235772
127
0.627328
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time from django.db import models from django.utils.translation import ugettext_lazy as _ from app.core.models import Domain, Mailbox EXT_LIST_TYPE = ( ('general', _(u'普通邮件列表')), ('dept', _(u'部门邮件列表')), ('sys', _(u'系统邮件列表')) ) EXT_LIST_...
517
3,368
69
3080e96161efccd8686e2439e6afcc0410b9180b
3,078
py
Python
scripts/select_gnomad_snps.py
ucladx/panel-design
d285b95f57027f9e1c7ca298797e0d6aa1b14f8a
[ "Apache-2.0" ]
null
null
null
scripts/select_gnomad_snps.py
ucladx/panel-design
d285b95f57027f9e1c7ca298797e0d6aa1b14f8a
[ "Apache-2.0" ]
null
null
null
scripts/select_gnomad_snps.py
ucladx/panel-design
d285b95f57027f9e1c7ca298797e0d6aa1b14f8a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' @description : Given a gnomAD VCF, shortlist SNPs for a capture-based panel to detect allelic imbalance @created : 09/16/2020 @author : Cyriac Kandoth ''' from __future__ import division, print_function import os, sys, argparse, time, pysam if __name__ == "__main__": start_time = time.t...
50.459016
191
0.639051
#!/usr/bin/env python3 ''' @description : Given a gnomAD VCF, shortlist SNPs for a capture-based panel to detect allelic imbalance @created : 09/16/2020 @author : Cyriac Kandoth ''' from __future__ import division, print_function import os, sys, argparse, time, pysam def main(): parser = argparse.ArgumentParser(...
2,590
0
23
b3165d23370a13ce6d499a7faa888f948c8dc625
6,691
py
Python
server_new.py
parametersky/ServerTest
35884aa7da9e723407b6148a0bd3e1c285bbd58f
[ "MIT" ]
null
null
null
server_new.py
parametersky/ServerTest
35884aa7da9e723407b6148a0bd3e1c285bbd58f
[ "MIT" ]
null
null
null
server_new.py
parametersky/ServerTest
35884aa7da9e723407b6148a0bd3e1c285bbd58f
[ "MIT" ]
null
null
null
import socket import json import os import sys from threading import Thread from multiprocessing import Process from queue import Queue from logging import Formatter,getLogger,FileHandler from logging.handlers import TimedRotatingFileHandler,RotatingFileHandler import logging import time from functools import reduce l...
32.639024
105
0.576894
import socket import json import os import sys from threading import Thread from multiprocessing import Process from queue import Queue from logging import Formatter,getLogger,FileHandler from logging.handlers import TimedRotatingFileHandler,RotatingFileHandler import logging import time from functools import reduce d...
5,336
435
287
1873360a35ad172b1a4e80205f7933d2a7a47d0e
621
py
Python
je_editor/ui/ui_event/open_file/open_last_edit_file/open_last_edit_file.py
JE-Chen/je_editor
2f18dedb6f0eb27c38668dc53f520739c8d5c6c6
[ "MIT" ]
1
2021-12-10T14:57:15.000Z
2021-12-10T14:57:15.000Z
je_editor/ui/ui_event/open_file/open_last_edit_file/open_last_edit_file.py
JE-Chen/je_editor
2f18dedb6f0eb27c38668dc53f520739c8d5c6c6
[ "MIT" ]
null
null
null
je_editor/ui/ui_event/open_file/open_last_edit_file/open_last_edit_file.py
JE-Chen/je_editor
2f18dedb6f0eb27c38668dc53f520739c8d5c6c6
[ "MIT" ]
null
null
null
from je_editor.utils.file.open.open_file import read_file def open_last_edit_file(file_from_output_content, code_editor): """ :param file_from_output_content: readied file from output content :param code_editor the editor to insert file content :return readied file open last edit file if succe...
34.5
69
0.73752
from je_editor.utils.file.open.open_file import read_file def open_last_edit_file(file_from_output_content, code_editor): """ :param file_from_output_content: readied file from output content :param code_editor the editor to insert file content :return readied file open last edit file if succe...
0
0
0
d9fb745b63e853aa5e221b1f87db67c0723efc2d
394
py
Python
zmq_srv.py
iyedb/boost_asio_zeromq
63110c18540c8303ac29d574f25cba234a00a22d
[ "MIT" ]
4
2015-04-07T06:00:34.000Z
2019-09-10T01:45:41.000Z
zmq_srv.py
iyedb/boost_asio_zeromq
63110c18540c8303ac29d574f25cba234a00a22d
[ "MIT" ]
null
null
null
zmq_srv.py
iyedb/boost_asio_zeromq
63110c18540c8303ac29d574f25cba234a00a22d
[ "MIT" ]
3
2015-06-30T07:37:41.000Z
2019-09-10T01:45:47.000Z
from __future__ import print_function import zmq import time ADDR='tcp://127.0.0.1:11155' ctx = zmq.Context() srv = ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq.RCVTIMEO, 3000); while True: try: msg = srv.recv() except Exception as e: print('zmq socket revc timedout:', e) else: print('cl...
17.130435
41
0.659898
from __future__ import print_function import zmq import time ADDR='tcp://127.0.0.1:11155' ctx = zmq.Context() srv = ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq.RCVTIMEO, 3000); while True: try: msg = srv.recv() except Exception as e: print('zmq socket revc timedout:', e) else: print('cl...
0
0
0
0067d2bd646b029edc7c4eb805ba63043b28667b
1,813
py
Python
structural/adapter/logic/xml_to_json_adapter.py
Kozak24/Patterns
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
[ "MIT" ]
null
null
null
structural/adapter/logic/xml_to_json_adapter.py
Kozak24/Patterns
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
[ "MIT" ]
null
null
null
structural/adapter/logic/xml_to_json_adapter.py
Kozak24/Patterns
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Dict, Any, List, TYPE_CHECKING if TYPE_CHECKING: from xml.etree.ElementTree import Element
30.728814
82
0.619415
from __future__ import annotations from typing import Dict, Any, List, TYPE_CHECKING if TYPE_CHECKING: from xml.etree.ElementTree import Element class XmlToJsonAdapter: def __init__(self, node: Element) -> None: self.node = node def convert_to_json(self) -> Dict[Any, Any]: converted_to_...
1,484
154
23
a74e3a15f473bb54e6a524be41bcee3ea4fd952a
3,402
py
Python
editor.py
MarioLiebisch/story-o-mat
9ab529d226046c2acab513e6fff6a19da72d6c8a
[ "MIT" ]
null
null
null
editor.py
MarioLiebisch/story-o-mat
9ab529d226046c2acab513e6fff6a19da72d6c8a
[ "MIT" ]
null
null
null
editor.py
MarioLiebisch/story-o-mat
9ab529d226046c2acab513e6fff6a19da72d6c8a
[ "MIT" ]
null
null
null
import os import sys from pathlib import Path from tkinter import * from tkinter import filedialog from os import listdir from os.path import isfile, join from nltk.tokenize.regexp import RegexpTokenizer from make_story import get_next_words, load_data_from_file BUTTONS_PER_COL = 8 DATA_PATH = "./data/" data = None ...
22.235294
83
0.643739
import os import sys from pathlib import Path from tkinter import * from tkinter import filedialog from os import listdir from os.path import isfile, join from nltk.tokenize.regexp import RegexpTokenizer from make_story import get_next_words, load_data_from_file BUTTONS_PER_COL = 8 DATA_PATH = "./data/" data = None ...
1,637
0
184
7cf71af53bd345c815339c54aae80d464ba8ddd3
1,530
py
Python
tests/test_mxnet.py
ankitshah009/MMdnn
a03d800eb4016765e97f82eb5d2e69f98de3a9cf
[ "MIT" ]
3,442
2017-11-20T08:39:51.000Z
2019-05-06T10:51:19.000Z
tests/test_mxnet.py
ankitshah009/MMdnn
a03d800eb4016765e97f82eb5d2e69f98de3a9cf
[ "MIT" ]
430
2017-11-29T04:21:48.000Z
2019-05-06T05:37:37.000Z
tests/test_mxnet.py
ankitshah009/MMdnn
a03d800eb4016765e97f82eb5d2e69f98de3a9cf
[ "MIT" ]
683
2017-11-20T08:50:34.000Z
2019-05-04T04:25:14.000Z
from __future__ import absolute_import from __future__ import print_function import os import sys import six from conversion_imagenet import TestModels if __name__ == '__main__': test_mxnet()
28.333333
54
0.544444
from __future__ import absolute_import from __future__ import print_function import os import sys import six from conversion_imagenet import TestModels def get_test_table(): return { 'mxnet' : { 'vgg19' : [ TestModels.onnx_emit, TestModels.caffe_emit, T...
1,283
0
46
402f7023809b25e6416c8803ed8d64999c66be0d
6,424
py
Python
bert/attention.py
chenlongzhen/bert-for-tf2
bcbf85d682faba2326e77b021fd955f9e13d72c2
[ "MIT" ]
806
2019-05-25T08:37:21.000Z
2022-03-25T11:16:13.000Z
bert/attention.py
chenlongzhen/bert-for-tf2
bcbf85d682faba2326e77b021fd955f9e13d72c2
[ "MIT" ]
89
2019-06-05T14:53:25.000Z
2022-03-09T13:42:44.000Z
bert/attention.py
chenlongzhen/bert-for-tf2
bcbf85d682faba2326e77b021fd955f9e13d72c2
[ "MIT" ]
196
2019-06-10T23:53:46.000Z
2022-03-14T02:49:46.000Z
# coding=utf-8 # # created by kpe on 15.Mar.2019 at 12:52 # from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.python import keras from tensorflow.python.keras import backend as K from bert.layer import Layer
44
118
0.593244
# coding=utf-8 # # created by kpe on 15.Mar.2019 at 12:52 # from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.python import keras from tensorflow.python.keras import backend as K from bert.layer import Layer class AttentionLayer(Layer): class Params(Layer....
4,951
1,182
23
4c317b128f71d726a97ef3d1da8952b339f14a3d
9,722
py
Python
venv/Lib/site-packages/sqlalchemy/dialects/postgresql/pg8000.py
YunJaePark3908/BaseAPIServer
17ab922917541406a3c2d75b428614ce97152a16
[ "Apache-2.0" ]
2
2021-02-20T22:43:47.000Z
2021-05-06T03:43:20.000Z
venv/Lib/site-packages/sqlalchemy/dialects/postgresql/pg8000.py
YunJaePark3908/BaseAPIServer
17ab922917541406a3c2d75b428614ce97152a16
[ "Apache-2.0" ]
8
2021-03-26T19:13:07.000Z
2021-04-19T18:34:33.000Z
venv/Lib/site-packages/sqlalchemy/dialects/postgresql/pg8000.py
YunJaePark3908/BaseAPIServer
17ab922917541406a3c2d75b428614ce97152a16
[ "Apache-2.0" ]
3
2021-11-30T11:10:26.000Z
2021-12-08T05:59:31.000Z
# postgresql/pg8000.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors <see AUTHORS # file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php r""" .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :co...
29.195195
95
0.618803
# postgresql/pg8000.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors <see AUTHORS # file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php r""" .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :co...
5,574
1,169
394
3c99ab4d6e524661d0da3e419f3222e93a3628af
5,994
py
Python
cbmail/tests/test_base.py
Panamus/django-cbmail
cb77a5c463ce6f0e59932226931edc4737fdc73f
[ "MIT" ]
3
2017-12-13T12:43:30.000Z
2020-11-25T06:04:56.000Z
cbmail/tests/test_base.py
dipcode-software/django-maillings
cb77a5c463ce6f0e59932226931edc4737fdc73f
[ "MIT" ]
9
2017-03-30T11:06:29.000Z
2017-09-11T15:34:17.000Z
cbmail/tests/test_base.py
dipcode-software/django-mailings
cb77a5c463ce6f0e59932226931edc4737fdc73f
[ "MIT" ]
1
2021-06-08T10:58:21.000Z
2021-06-08T10:58:21.000Z
from tempfile import NamedTemporaryFile from cbmail.base import Attachment, BaseMail from cbmail.mixins import MailingListMixin from django.test import SimpleTestCase from mock import patch
33.3
75
0.635469
from tempfile import NamedTemporaryFile from cbmail.base import Attachment, BaseMail from cbmail.mixins import MailingListMixin from django.test import SimpleTestCase from mock import patch class TestBaseObject(BaseMail): template_name = 'cbmail/base.html' mail_to = [('dev', 'dev@unit.com')] mail_cc = ['...
4,282
1,320
196
37dab22431929b05ff4e9721da0fcf6fbe7ead60
176
py
Python
backend/home/urls.py
webclinic017/WallStreetBots
f4f73539b080ce7667b52ee8195919ec4e7b79b8
[ "MIT" ]
4
2021-11-12T02:04:30.000Z
2022-01-03T22:56:41.000Z
backend/home/urls.py
webclinic017/WallStreetBots
f4f73539b080ce7667b52ee8195919ec4e7b79b8
[ "MIT" ]
5
2021-11-11T20:48:34.000Z
2022-03-12T18:08:40.000Z
backend/home/urls.py
webclinic017/WallStreetBots
f4f73539b080ce7667b52ee8195919ec4e7b79b8
[ "MIT" ]
2
2021-11-15T14:23:36.000Z
2021-11-27T19:44:38.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('check_db_connection', views.get_time, name="check_db"), ]
19.555556
65
0.6875
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('check_db_connection', views.get_time, name="check_db"), ]
0
0
0
cff48d45df0fba0a30b0c4b0973dffc79f9cf89e
1,264
py
Python
Books.py
rigobertocanseco/bidi-unam-new-books
dc14252bf6cafaeebd66d48067abac9489cac65d
[ "Apache-2.0", "MIT" ]
null
null
null
Books.py
rigobertocanseco/bidi-unam-new-books
dc14252bf6cafaeebd66d48067abac9489cac65d
[ "Apache-2.0", "MIT" ]
null
null
null
Books.py
rigobertocanseco/bidi-unam-new-books
dc14252bf6cafaeebd66d48067abac9489cac65d
[ "Apache-2.0", "MIT" ]
null
null
null
# coding=utf-8 import re import json import requests from bs4 import BeautifulSoup if __name__ == '__main__': print(get())
28.727273
122
0.491297
# coding=utf-8 import re import json import requests from bs4 import BeautifulSoup def get(): page = requests.get("https://www.bidi.unam.mx/mdb/newadq.html") if page is None: return None soup = BeautifulSoup(page.text, 'html.parser') trs = soup.find(id='dtBasicExample').find('tbody').find_all(...
1,111
0
23
33469cf394e916db12bee4f160f4e41bb1a58c5d
18,188
py
Python
codegen/generate_schema.py
mbarga/commercetools-python-sdk
464b2ea2518bafe4e2694a723550e0041db1f4c9
[ "MIT" ]
null
null
null
codegen/generate_schema.py
mbarga/commercetools-python-sdk
464b2ea2518bafe4e2694a723550e0041db1f4c9
[ "MIT" ]
1
2019-07-15T07:27:06.000Z
2019-07-15T07:27:06.000Z
codegen/generate_schema.py
mbarga/commercetools-python-sdk
464b2ea2518bafe4e2694a723550e0041db1f4c9
[ "MIT" ]
null
null
null
import ast import operator import typing from collections import defaultdict from codegen import raml_types from codegen.generate_abstract import AbstractModuleGenerator from codegen.utils import reorder_class_definitions FIELD_TYPES = { "string": "marshmallow.fields.String", "object": "marshmallow.fields.Dic...
36.015842
96
0.496371
import ast import operator import typing from collections import defaultdict from codegen import raml_types from codegen.generate_abstract import AbstractModuleGenerator from codegen.utils import reorder_class_definitions FIELD_TYPES = { "string": "marshmallow.fields.String", "object": "marshmallow.fields.Dic...
14,334
0
297
9225c806a3472f8efbd06c64d676edf5f14dea8b
381
py
Python
sync_batchnorm/__init__.py
hankeceli/3D-Object-Detection-for-AV
b6c17a4a3ecc9c32418baafa5b82cfd4704ed880
[ "Apache-2.0" ]
null
null
null
sync_batchnorm/__init__.py
hankeceli/3D-Object-Detection-for-AV
b6c17a4a3ecc9c32418baafa5b82cfd4704ed880
[ "Apache-2.0" ]
null
null
null
sync_batchnorm/__init__.py
hankeceli/3D-Object-Detection-for-AV
b6c17a4a3ecc9c32418baafa5b82cfd4704ed880
[ "Apache-2.0" ]
null
null
null
# This file is part of Synchronized-BatchNorm-PyTorch. # https://github.com/vacancy/Synchronized-BatchNorm-PyTorch # Distributed under MIT License. from .batchnorm import SynchronizedBatchNorm1d, SynchronizedBatchNorm2d, SynchronizedBatchNorm3d from .batchnorm import patch_sync_batchnorm, convert_model from .replicate...
47.625
96
0.860892
# This file is part of Synchronized-BatchNorm-PyTorch. # https://github.com/vacancy/Synchronized-BatchNorm-PyTorch # Distributed under MIT License. from .batchnorm import SynchronizedBatchNorm1d, SynchronizedBatchNorm2d, SynchronizedBatchNorm3d from .batchnorm import patch_sync_batchnorm, convert_model from .replicate...
0
0
0
e6a92dafea1b739f567be9dfd875597c7f8c747f
3,671
py
Python
riko/bado/io.py
nerevu/riko
4d27102b605b8b4050ba566d5e0895d8d5f8b09a
[ "MIT" ]
1,716
2016-06-06T15:32:28.000Z
2022-03-31T23:34:16.000Z
riko/bado/io.py
nerevu/riko
4d27102b605b8b4050ba566d5e0895d8d5f8b09a
[ "MIT" ]
33
2016-07-20T00:15:19.000Z
2020-07-29T19:58:51.000Z
riko/bado/io.py
nerevu/riko
4d27102b605b8b4050ba566d5e0895d8d5f8b09a
[ "MIT" ]
88
2016-07-21T03:48:06.000Z
2022-02-15T08:45:42.000Z
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.bado.io ~~~~~~~~~~~~ Provides functions for asynchronously reading files and urls Examples: basic usage:: >>> from riko import get_path >>> from riko.bado.io import async_url_open """ import pygogo as gogo from io import open from tempfi...
28.457364
78
0.670662
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.bado.io ~~~~~~~~~~~~ Provides functions for asynchronously reading files and urls Examples: basic usage:: >>> from riko import get_path >>> from riko.bado.io import async_url_open """ import pygogo as gogo from io import open from tempfi...
2,391
18
245
5b1fa646253ee176f77c333bc37c30abd48e542d
2,171
py
Python
tools/pv_addpot.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
4
2019-01-02T09:17:54.000Z
2019-12-26T07:15:59.000Z
tools/pv_addpot.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
6
2019-03-06T03:16:12.000Z
2019-03-14T14:36:01.000Z
tools/pv_addpot.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 '''Search or create POTCAR file. The elements can be parsed manually, or read from POSCAR. ''' import os import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter from mykit.core.utils import trim_after from mykit.vasp.poscar import Poscar from mykit.vasp.potcar import Potcar...
35.590164
93
0.625518
#!/usr/bin/env python3 '''Search or create POTCAR file. The elements can be parsed manually, or read from POSCAR. ''' import os import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter from mykit.core.utils import trim_after from mykit.vasp.poscar import Poscar from mykit.vasp.potcar import Potcar...
1,767
0
23
2780c032ea24b344b259cc2c820f8c79b9814027
1,847
py
Python
cloudrail/knowledge/context/aws/lambda_/lambda_policy_statements.py
my-devops-info/cloudrail-knowledge
b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e
[ "MIT" ]
null
null
null
cloudrail/knowledge/context/aws/lambda_/lambda_policy_statements.py
my-devops-info/cloudrail-knowledge
b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e
[ "MIT" ]
null
null
null
cloudrail/knowledge/context/aws/lambda_/lambda_policy_statements.py
my-devops-info/cloudrail-knowledge
b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e
[ "MIT" ]
null
null
null
from typing import List, Optional from cloudrail.knowledge.context.aws.lambda_.lambda_alias import create_lambda_function_arn from cloudrail.knowledge.context.aws.iam.policy_statement import PolicyStatement from cloudrail.knowledge.context.aws.iam.policy import Policy from cloudrail.knowledge.context.aws.service_name ...
41.044444
105
0.697888
from typing import List, Optional from cloudrail.knowledge.context.aws.lambda_.lambda_alias import create_lambda_function_arn from cloudrail.knowledge.context.aws.iam.policy_statement import PolicyStatement from cloudrail.knowledge.context.aws.iam.policy import Policy from cloudrail.knowledge.context.aws.service_name ...
840
0
160
d37508e9a37e8a4b1a358eebc0d313828b179543
1,924
py
Python
rlbot/messages/flat/Vector3Partial.py
danielbairamian/RL-RL
4fc4ac14bd10088e83e7a15c3319370f74d0a756
[ "MIT" ]
3
2020-04-30T14:33:10.000Z
2021-10-11T00:12:35.000Z
BeardBot/venv/Lib/site-packages/rlbot/messages/flat/Vector3Partial.py
Bearedy/BeardBot
cc31ae663bdf9ebf7cc0c41f7d4cff0d33064da0
[ "MIT" ]
null
null
null
BeardBot/venv/Lib/site-packages/rlbot/messages/flat/Vector3Partial.py
Bearedy/BeardBot
cc31ae663bdf9ebf7cc0c41f7d4cff0d33064da0
[ "MIT" ]
null
null
null
# automatically generated by the FlatBuffers compiler, do not modify # namespace: flat import flatbuffers
32.610169
118
0.635655
# automatically generated by the FlatBuffers compiler, do not modify # namespace: flat import flatbuffers class Vector3Partial(object): __slots__ = ['_tab'] @classmethod def GetRootAsVector3Partial(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x =...
1,413
269
134
db48c83cc9dc988f9a581c0fefc3618c90cc8432
40,409
py
Python
fxpt/fx_prefsaver/tests/pyqt_window_test_ui.py
theetcher/fxpt
d40c571885c7c4056f548a60140740c7beb8703d
[ "MIT" ]
18
2015-11-02T08:02:16.000Z
2021-04-08T15:45:29.000Z
fxpt/fx_prefsaver/tests/pyqt_window_test_ui.py
dseeni/fxpt
d40c571885c7c4056f548a60140740c7beb8703d
[ "MIT" ]
4
2017-01-09T08:29:37.000Z
2020-04-15T06:04:33.000Z
fxpt/fx_prefsaver/tests/pyqt_window_test_ui.py
dseeni/fxpt
d40c571885c7c4056f548a60140740c7beb8703d
[ "MIT" ]
7
2016-09-01T08:38:53.000Z
2020-09-04T00:16:52.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_window_test_ui.ui' # # Created: Fri Jan 16 22:18:17 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exce...
71.268078
197
0.739266
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_window_test_ui.ui' # # Created: Fri Jan 16 22:18:17 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exce...
39,958
7
76
e3949c919fea9bb46197d59a4b51bd08dace1cdb
8,005
py
Python
apps/log_databus/utils/bkdata_clean.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
75
2021-07-14T09:32:36.000Z
2022-03-31T15:26:53.000Z
apps/log_databus/utils/bkdata_clean.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
561
2021-07-14T07:45:47.000Z
2022-03-31T11:41:28.000Z
apps/log_databus/utils/bkdata_clean.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
41
2021-07-14T07:39:50.000Z
2022-03-25T09:22:18.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: ------------------------------------------------...
48.222892
117
0.677452
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: ------------------------------------------------...
5,534
0
315
a4a2be9fe6839170b36880b7184c1a1bfd00dd20
28,493
py
Python
src/human_readable/times.py
staticdev/human-readable
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
[ "MIT" ]
5
2021-03-10T21:22:31.000Z
2022-03-23T04:38:07.000Z
src/human_readable/times.py
staticdev/human-readable
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
[ "MIT" ]
59
2021-02-13T10:08:23.000Z
2022-03-14T19:43:55.000Z
src/human_readable/times.py
staticdev/human-readable
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
[ "MIT" ]
null
null
null
"""Time humanizing functions.""" from __future__ import annotations import datetime as dt import enum import functools import math from typing import Any import human_readable.i18n as i18n _ = i18n.gettext P_ = i18n.pgettext N_ = i18n.ngettext @functools.total_ordering class Unit(enum.Enum): """Enum for minim...
32.826037
88
0.61036
"""Time humanizing functions.""" from __future__ import annotations import datetime as dt import enum import functools import math from typing import Any import human_readable.i18n as i18n _ = i18n.gettext P_ = i18n.pgettext N_ = i18n.ngettext @functools.total_ordering class Unit(enum.Enum): """Enum for minim...
2,643
0
92
81688ccf1f40d061fcdaf940aaf5a59f89c33bcd
5,291
py
Python
datahub/search/serializers.py
uktrade/data-hub-api-actions-test
a72439dfeb34e4179491db42fea290b9c2afadb1
[ "MIT" ]
null
null
null
datahub/search/serializers.py
uktrade/data-hub-api-actions-test
a72439dfeb34e4179491db42fea290b9c2afadb1
[ "MIT" ]
16
2020-04-01T15:25:35.000Z
2020-04-14T14:07:30.000Z
datahub/search/serializers.py
uktrade/data-hub-api-actions-test
a72439dfeb34e4179491db42fea290b9c2afadb1
[ "MIT" ]
null
null
null
from django.utils.translation import gettext_lazy from rest_framework import serializers from rest_framework.settings import api_settings from datahub.search.apps import get_global_search_apps_as_mapping from datahub.search.query_builder import MAX_RESULTS from datahub.search.utils import SearchOrdering, SortDirection...
34.357143
96
0.689662
from django.utils.translation import gettext_lazy from rest_framework import serializers from rest_framework.settings import api_settings from datahub.search.apps import get_global_search_apps_as_mapping from datahub.search.query_builder import MAX_RESULTS from datahub.search.utils import SearchOrdering, SortDirection...
0
0
0
be7e966b8a67941b46ef35129ca9c6e151196260
2,749
py
Python
DeepSTARR/DeepSTARR_pred_new_sequence.py
bernardo-de-almeida/DeepSTARR
7eca2ef7001f6eb8b0b6a0d4a31e28e73c764bb6
[ "MIT" ]
1
2021-12-09T16:41:21.000Z
2021-12-09T16:41:21.000Z
DeepSTARR/DeepSTARR_pred_new_sequence.py
bernardo-de-almeida/DeepSTARR
7eca2ef7001f6eb8b0b6a0d4a31e28e73c764bb6
[ "MIT" ]
1
2021-10-09T02:21:01.000Z
2021-10-09T02:21:01.000Z
DeepSTARR/DeepSTARR_pred_new_sequence.py
bernardo-de-almeida/DeepSTARR
7eca2ef7001f6eb8b0b6a0d4a31e28e73c764bb6
[ "MIT" ]
3
2021-10-19T09:12:39.000Z
2022-01-20T18:02:33.000Z
### Load arguments import sys, getopt if __name__ == "__main__": new_seq, model_ID = main(sys.argv[1:]) ### Load libraries from keras.layers.convolutional import Conv1D, MaxPooling1D from keras.layers.core import Dropout, Reshape, Dense, Activation, Flatten from keras.layers import BatchNormalization, InputLay...
32.341176
117
0.715897
### Load arguments import sys, getopt def main(argv): new_seq = '' model_ID = '' try: opts, args = getopt.getopt(argv,"hs:m:",["seq=","model="]) except getopt.GetoptError: print('DeepSTARR_pred_new_sequence.py -s <fasta seq file> -m <CNN model file>') sys.exit(2) for opt, arg in opts...
1,093
0
45
1586fdc938864aa8657885eb20f4ab9d341d045e
101
py
Python
1095.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
3
2020-11-25T19:05:31.000Z
2021-03-29T07:29:36.000Z
1095.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
1095.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
j,i=65,-2 for I in range (1,14): J= j-5 I=i+3 print('I=%d J=%d' %(I,J)) j=J i=I
12.625
29
0.39604
j,i=65,-2 for I in range (1,14): J= j-5 I=i+3 print('I=%d J=%d' %(I,J)) j=J i=I
0
0
0
757ffce3ec17e9d8a63a649af391e5ec129bb57b
5,838
py
Python
evaluation/dogs-vs-cats/train.py
kumasento/gconv-prune
f81c417d3754102c902bd153809130e12607bd7d
[ "MIT" ]
8
2019-08-29T07:43:03.000Z
2021-03-03T14:25:09.000Z
evaluation/dogs-vs-cats/train.py
kumasento/gconv-prune
f81c417d3754102c902bd153809130e12607bd7d
[ "MIT" ]
null
null
null
evaluation/dogs-vs-cats/train.py
kumasento/gconv-prune
f81c417d3754102c902bd153809130e12607bd7d
[ "MIT" ]
2
2019-09-15T03:39:30.000Z
2020-04-30T07:06:46.000Z
#!/usr/bin/env python import argparse import copy import logging import os import random import time from typing import Dict, List, Tuple import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision from torch.utils.data import DataLoader from torchvision import models from ut...
29.785714
87
0.622302
#!/usr/bin/env python import argparse import copy import logging import os import random import time from typing import Dict, List, Tuple import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision from torch.utils.data import DataLoader from torchvision import models from ut...
2,519
0
115
ea81cc5881e19fdd44f7b09ca06efa22e43d9a5d
6,037
py
Python
test/ASEmotion.py
davircarvalho/ASEmotion
4d274ec49be39982f8f40babde1ba57e9c1cdde5
[ "MIT" ]
2
2021-03-30T02:07:50.000Z
2021-05-03T03:55:20.000Z
test/ASEmotion.py
davircarvalho/ASEmotion
4d274ec49be39982f8f40babde1ba57e9c1cdde5
[ "MIT" ]
null
null
null
test/ASEmotion.py
davircarvalho/ASEmotion
4d274ec49be39982f8f40babde1ba57e9c1cdde5
[ "MIT" ]
1
2021-03-29T18:44:13.000Z
2021-03-29T18:44:13.000Z
""" Real time AEmotion (env: 'torch') """ # %% Import libs import pyaudio import numpy as np # import pickle # import librosa import keract import sys sys.path.append('..') from src.modeling.tcn.tcn import TCN import os import tensorflow as tf os.environ['CUDA_VISIBLE_DEVICES'] = '-1' from tensorflow.keras.models i...
32.456989
134
0.602948
""" Real time AEmotion (env: 'torch') """ # %% Import libs import pyaudio import numpy as np # import pickle # import librosa import keract import sys sys.path.append('..') from src.modeling.tcn.tcn import TCN import os import tensorflow as tf os.environ['CUDA_VISIBLE_DEVICES'] = '-1' from tensorflow.keras.models i...
5,397
0
23
1696875137527c62d8fb92f1008c6d0226b41668
12,814
py
Python
Snakemake/analyse-samples/scripts/gettRNAxlsites_v2.py
ulelab/ncawareclip
11b92a6302c5738f1c8c6da1f8b4aeb405082375
[ "MIT" ]
null
null
null
Snakemake/analyse-samples/scripts/gettRNAxlsites_v2.py
ulelab/ncawareclip
11b92a6302c5738f1c8c6da1f8b4aeb405082375
[ "MIT" ]
null
null
null
Snakemake/analyse-samples/scripts/gettRNAxlsites_v2.py
ulelab/ncawareclip
11b92a6302c5738f1c8c6da1f8b4aeb405082375
[ "MIT" ]
null
null
null
# Charlotte Capitanchik # 25.04.18 # Based on fastCLIP tRNA strategy # input is SAM of tRNA mapping # and .fai of what is was mapped to import pysam from collections import defaultdict import operator from collections import Counter import sys import statistics import random import re # input # #trna_fai = sys.argv...
39.919003
359
0.729359
# Charlotte Capitanchik # 25.04.18 # Based on fastCLIP tRNA strategy # input is SAM of tRNA mapping # and .fai of what is was mapped to import pysam from collections import defaultdict import operator from collections import Counter import sys import statistics import random import re # input # #trna_fai = sys.argv...
0
0
0
a5a923e3611c85e653724ac7bf162876c39f8453
2,289
py
Python
Bolivian_Lowlands/Specific_loads_lowlands/health_center.py
CIE-UMSS/VLIR_Energy_Demand
3a9c7a034ac6ff668c7734597daf4696f62ef671
[ "MIT" ]
null
null
null
Bolivian_Lowlands/Specific_loads_lowlands/health_center.py
CIE-UMSS/VLIR_Energy_Demand
3a9c7a034ac6ff668c7734597daf4696f62ef671
[ "MIT" ]
null
null
null
Bolivian_Lowlands/Specific_loads_lowlands/health_center.py
CIE-UMSS/VLIR_Energy_Demand
3a9c7a034ac6ff668c7734597daf4696f62ef671
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 11:10:35 2021 @author: Clau """ ''' Paper: Energy sufficiency, lowlands. User: Health Center ''' from core import User, np User_list = [] #Definig users HC = User("Health center", 1) User_list.append(HC) HC_indoor_bulb = HC.Appliance(HC,20,7,2,...
29.727273
80
0.688947
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 11:10:35 2021 @author: Clau """ ''' Paper: Energy sufficiency, lowlands. User: Health Center ''' from core import User, np User_list = [] #Definig users HC = User("Health center", 1) User_list.append(HC) HC_indoor_bulb = HC.Appliance(HC,20,7,2,...
0
0
0
f03a89170ccf4e3e9ab10141c5574ff7955a07f6
2,004
py
Python
Supervised Learning/LassoElasticNet_SparseSignals.py
mrchipset/sklearn-tutorial
2a5e6500e325f03736fa3c27f7da94851df7802c
[ "MIT" ]
null
null
null
Supervised Learning/LassoElasticNet_SparseSignals.py
mrchipset/sklearn-tutorial
2a5e6500e325f03736fa3c27f7da94851df7802c
[ "MIT" ]
null
null
null
Supervised Learning/LassoElasticNet_SparseSignals.py
mrchipset/sklearn-tutorial
2a5e6500e325f03736fa3c27f7da94851df7802c
[ "MIT" ]
null
null
null
""" Estimate Lasso and Elastic-Net regression models on a manually generated sparse signal corrupted with an additive noise. """ # %% import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import r2_score from sklearn.model_selection import train_test_split np.random.seed(42) n_samples, n_features = 5...
28.225352
79
0.636228
""" Estimate Lasso and Elastic-Net regression models on a manually generated sparse signal corrupted with an additive noise. """ # %% import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import r2_score from sklearn.model_selection import train_test_split np.random.seed(42) n_samples, n_features = 5...
0
0
0
2d8cfcb2b4992dc0a61b80a73c31708a2e8a0c5b
524
py
Python
codewars/src/nthfib.py
wenima/math-series
60aa0b0c845bd859a1bf936c7e200f60ecfce026
[ "MIT" ]
null
null
null
codewars/src/nthfib.py
wenima/math-series
60aa0b0c845bd859a1bf936c7e200f60ecfce026
[ "MIT" ]
null
null
null
codewars/src/nthfib.py
wenima/math-series
60aa0b0c845bd859a1bf936c7e200f60ecfce026
[ "MIT" ]
1
2019-10-03T07:38:06.000Z
2019-10-03T07:38:06.000Z
"""This module solves kata https://www.codewars.com/kata/n-th-fibonacci.""" def original_solution(n): """Return the nth fibonacci number.""" if n == 1: return 0 a, b = 0, 1 for i in range(1, n - 1): a, b = b, (a + b) return b #better solution def nth_fib(n): """Return the nth f...
26.2
76
0.576336
"""This module solves kata https://www.codewars.com/kata/n-th-fibonacci.""" def original_solution(n): """Return the nth fibonacci number.""" if n == 1: return 0 a, b = 0, 1 for i in range(1, n - 1): a, b = b, (a + b) return b #better solution def nth_fib(n): """Return the nth f...
0
0
0
c7e2e215de5909b895886904ae3106daffa4726c
12,315
py
Python
ForensicsTool/ForensicsTool/module5.py
deepak7mahto/ForensicsTool
17ae45a5a12093f38eaeb309745588464b694fa4
[ "MIT" ]
null
null
null
ForensicsTool/ForensicsTool/module5.py
deepak7mahto/ForensicsTool
17ae45a5a12093f38eaeb309745588464b694fa4
[ "MIT" ]
null
null
null
ForensicsTool/ForensicsTool/module5.py
deepak7mahto/ForensicsTool
17ae45a5a12093f38eaeb309745588464b694fa4
[ "MIT" ]
null
null
null
import random_functions, colorama, Forensics_tool_redesigned_using_oops import sqlite3, getpass, os #module 5 - Browser Forensics #chrome_tool_start #chrome_tool_end #mozilla_tool_start #mozilla_tool_end
42.030717
228
0.579862
import random_functions, colorama, Forensics_tool_redesigned_using_oops import sqlite3, getpass, os #module 5 - Browser Forensics class Browser_forensics_class(random_functions.random_functions_class): def module5(self): try: self.seperator() print "Browser Forensc...
11,467
50
551
7a4c90472f6efd1274fd3d071913a5e18521bd2c
1,863
py
Python
tests/test_issue.py
shibing624/text2vec
ec148815d57e7d6a420aee679a66620a5357b269
[ "Apache-2.0" ]
380
2019-12-12T02:24:05.000Z
2022-03-31T16:08:53.000Z
tests/test_issue.py
shibing624/text2vec
ec148815d57e7d6a420aee679a66620a5357b269
[ "Apache-2.0" ]
32
2019-12-06T05:50:47.000Z
2022-03-29T14:34:29.000Z
tests/test_issue.py
shibing624/text2vec
ec148815d57e7d6a420aee679a66620a5357b269
[ "Apache-2.0" ]
72
2020-01-15T02:40:04.000Z
2022-03-29T09:11:12.000Z
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ import sys import unittest sys.path.append('..') from text2vec import SBert from text2vec import BM25 from sentence_transformers.util import cos_sim sbert_model = SBert('paraphrase-multilingual-MiniLM-L12-v2') if __name__ == '__main_...
28.661538
82
0.602254
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ import sys import unittest sys.path.append('..') from text2vec import SBert from text2vec import BM25 from sentence_transformers.util import cos_sim sbert_model = SBert('paraphrase-multilingual-MiniLM-L12-v2') def sbert_sim_score(str_a...
1,894
18
127
60b9ae7a5f59803f75974869de5cfb77eb8b527c
1,154
py
Python
snippets/ch07/ngrams.py
kratunko/atap
982b925e10b89ec79df7adc4eae3595622e0945c
[ "Apache-2.0" ]
360
2017-04-26T09:24:22.000Z
2022-03-12T15:26:54.000Z
snippets/ch07/ngrams.py
nguyenhonghaidang/atap
eab89ecc2ac78999aea20bd704d6212f0fb520dd
[ "Apache-2.0" ]
101
2017-04-17T19:12:02.000Z
2020-12-28T22:38:44.000Z
snippets/ch07/ngrams.py
nguyenhonghaidang/atap
eab89ecc2ac78999aea20bd704d6212f0fb520dd
[ "Apache-2.0" ]
297
2017-07-07T04:08:06.000Z
2022-03-18T06:45:33.000Z
#!/usr/bin/env python3 import sys import argparse from nltk import sent_tokenize from nltk import word_tokenize from nltk import ngrams as nltk_ngrams from functools import partial LPAD_SYMBOL = "<s>" RPAD_SYMBOL = "</s>" nltk_ngrams = partial(nltk_ngrams, pad_right=True, pad_left=True, right_pad_symbol=RPA...
25.644444
80
0.67851
#!/usr/bin/env python3 import sys import argparse from nltk import sent_tokenize from nltk import word_tokenize from nltk import ngrams as nltk_ngrams from functools import partial LPAD_SYMBOL = "<s>" RPAD_SYMBOL = "</s>" nltk_ngrams = partial(nltk_ngrams, pad_right=True, pad_left=True, right_pad_symbol=RPA...
219
0
46
906adac84f4a60ef82b34b38b84d0390bbd9027f
1,551
py
Python
small_satrn_inference.py
Nivratti/ocr-vedastr
11b90e94c881883ff65ec2aa248862acf3e33601
[ "Apache-2.0" ]
null
null
null
small_satrn_inference.py
Nivratti/ocr-vedastr
11b90e94c881883ff65ec2aa248862acf3e33601
[ "Apache-2.0" ]
null
null
null
small_satrn_inference.py
Nivratti/ocr-vedastr
11b90e94c881883ff65ec2aa248862acf3e33601
[ "Apache-2.0" ]
null
null
null
""" Usage: python small_satrn_inference.py vedastr/test.jpg """ import argparse import os import sys import cv2 from vedastr.runners import InferenceRunner from vedastr.utils import Config from pathlib import Path from vedastr.helper import download_drive_file home = str(Path.home()) if __name__ == '__main__': ...
26.288136
91
0.691167
""" Usage: python small_satrn_inference.py vedastr/test.jpg """ import argparse import os import sys import cv2 from vedastr.runners import InferenceRunner from vedastr.utils import Config from pathlib import Path from vedastr.helper import download_drive_file home = str(Path.home()) def load_model(): cfg_pat...
1,177
0
46
6fdea7ea56fc239f001854792c0539ea0c4180e1
2,076
py
Python
src/0016路径总和/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
src/0016路径总和/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
src/0016路径总和/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
''' 给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 说明: 叶子节点是指没有子节点的节点。 返回值:布尔值 ''' # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None from collections import deque
31.454545
84
0.536127
''' 给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 说明: 叶子节点是指没有子节点的节点。 返回值:布尔值 ''' # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None from collections import deque class Solution: def hasPathSu...
1,682
-6
130
69f60ca941d912808b279624b40396aa3e245b29
3,227
py
Python
gtsfm/frontend/matcher/twoway_matcher.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
122
2021-02-07T23:01:58.000Z
2022-03-30T13:10:35.000Z
gtsfm/frontend/matcher/twoway_matcher.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
273
2021-01-30T16:45:26.000Z
2022-03-16T15:02:33.000Z
gtsfm/frontend/matcher/twoway_matcher.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
13
2021-03-12T03:01:27.000Z
2022-03-11T03:16:54.000Z
"""Two way (mutual nearest neighbor) matcher. Authors: Ayush Baid """ from typing import Tuple import cv2 as cv import numpy as np from enum import Enum from gtsfm.common.keypoints import Keypoints from gtsfm.frontend.matcher.matcher_base import MatcherBase class MatchingDistanceType(Enum): """Type of distance...
36.258427
99
0.662225
"""Two way (mutual nearest neighbor) matcher. Authors: Ayush Baid """ from typing import Tuple import cv2 as cv import numpy as np from enum import Enum from gtsfm.common.keypoints import Keypoints from gtsfm.frontend.matcher.matcher_base import MatcherBase class MatchingDistanceType(Enum): """Type of distance...
139
0
27
9d1bdce1e84ea9684a0703d1c59967a6b5504000
1,489
py
Python
05_scrapy/mercadolibre/mercadolibre/spiders/spiderTelefono.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
05_scrapy/mercadolibre/mercadolibre/spiders/spiderTelefono.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
05_scrapy/mercadolibre/mercadolibre/spiders/spiderTelefono.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
1
2019-10-21T19:27:12.000Z
2019-10-21T19:27:12.000Z
import scrapy from scrapy.loader import ItemLoader from mercadolibre.items import CelularItem ## #comment_js_7me > div > div > div > div:nth-child(2) > div > div > div > div.UFICommentContent > div._26f8 > div > span
36.317073
122
0.612492
import scrapy from scrapy.loader import ItemLoader from mercadolibre.items import CelularItem def exportar_csv(titulo, precio, link): with open('telefonos.csv', 'a') as lista: lista.write(f'{titulo},{precio},{link}\n') lista.close() ## #comment_js_7me > div > div > div > div:nth-child(...
1,058
164
45
7e57903b84574b7e5e2117a6c766dc7dd006e98a
374
py
Python
wbb/utils/nekobin.py
mptelepro/William-
d0a516a73e500977e8b84c7db3966c4ae96e7508
[ "MIT" ]
null
null
null
wbb/utils/nekobin.py
mptelepro/William-
d0a516a73e500977e8b84c7db3966c4ae96e7508
[ "MIT" ]
null
null
null
wbb/utils/nekobin.py
mptelepro/William-
d0a516a73e500977e8b84c7db3966c4ae96e7508
[ "MIT" ]
null
null
null
import aiohttp
28.769231
74
0.590909
import aiohttp async def neko(data): base_url = "https://nekobin.com" async with aiohttp.ClientSession() as session: async with session.post( f"{base_url}/api/documents", json={"content": data}, timeout=3 ) as response: key = (await response.json())["result"]["key"] ...
335
0
23
a7811d647b3531db47629ef05b4f782c03e57aed
3,068
py
Python
Competing_Algorithm/utils/sampleZ.py
ZhiQiu976/project-Indian-Buffet-Process
a4817550f2ca1778333066fa03ec6bb5b9cb4240
[ "MIT" ]
null
null
null
Competing_Algorithm/utils/sampleZ.py
ZhiQiu976/project-Indian-Buffet-Process
a4817550f2ca1778333066fa03ec6bb5b9cb4240
[ "MIT" ]
null
null
null
Competing_Algorithm/utils/sampleZ.py
ZhiQiu976/project-Indian-Buffet-Process
a4817550f2ca1778333066fa03ec6bb5b9cb4240
[ "MIT" ]
1
2020-04-30T17:26:26.000Z
2020-04-30T17:26:26.000Z
"""This module will update a binary feature matrix Z.""" import numpy as np import numpy.random as nr from . import logPX from . import logPV from . import sampleV # slice sampler def sampleZ(X, Z, A, sigma_x, sigma_a, alpha, K, N, D, realvaluedZ, proposeNewfeature): """Drawing Z using an uncollapsed Gibbs sampl...
36.963855
88
0.518253
"""This module will update a binary feature matrix Z.""" import numpy as np import numpy.random as nr from . import logPX from . import logPV from . import sampleV # slice sampler def sampleZ(X, Z, A, sigma_x, sigma_a, alpha, K, N, D, realvaluedZ, proposeNewfeature): """Drawing Z using an uncollapsed Gibbs sampl...
0
0
0
a84e390e80d0c49e198a6ba290ce1f9df51df7a9
323
py
Python
code-maker/util/standardlize_lflr.py
happyxianyu/SDML
4a85e47f8e5b0429f135af4e49639538ddb1fe1e
[ "Apache-2.0" ]
null
null
null
code-maker/util/standardlize_lflr.py
happyxianyu/SDML
4a85e47f8e5b0429f135af4e49639538ddb1fe1e
[ "Apache-2.0" ]
null
null
null
code-maker/util/standardlize_lflr.py
happyxianyu/SDML
4a85e47f8e5b0429f135af4e49639538ddb1fe1e
[ "Apache-2.0" ]
null
null
null
from cbutil import Path from pathinfo import * for p in source_file_paths + header_file_paths: content = None with p.open('r') as fr: content = fr.read() if content != None and '\r' in content: print(p) with p.open('w', encoding = 'UTF-8') as fw: fw.write(content) ...
24.846154
51
0.582043
from cbutil import Path from pathinfo import * for p in source_file_paths + header_file_paths: content = None with p.open('r') as fr: content = fr.read() if content != None and '\r' in content: print(p) with p.open('w', encoding = 'UTF-8') as fw: fw.write(content) ...
0
0
0
39ab4d9185087575448232d31b5e410639545354
548
py
Python
sbersignal/migrations/0009_auto_20160410_1018.py
kamirt/fordjango
7ef929facc3f7126de889e76d40441aa7fe620d3
[ "MIT" ]
null
null
null
sbersignal/migrations/0009_auto_20160410_1018.py
kamirt/fordjango
7ef929facc3f7126de889e76d40441aa7fe620d3
[ "MIT" ]
null
null
null
sbersignal/migrations/0009_auto_20160410_1018.py
kamirt/fordjango
7ef929facc3f7126de889e76d40441aa7fe620d3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-04-10 03:18 from __future__ import unicode_literals from django.db import migrations, models
26.095238
140
0.624088
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-04-10 03:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sbersignal', '0008_auto_20160410_1008'), ] operations = [ migrations.AlterFi...
0
390
23
71b3dd278d866246c7f7fea87727a4a5e03bd83f
5,318
py
Python
app.py
gSilas/pride-data-downloader
fdb040613bc0f1d75d04160e6fe313530cf5a86f
[ "MIT" ]
null
null
null
app.py
gSilas/pride-data-downloader
fdb040613bc0f1d75d04160e6fe313530cf5a86f
[ "MIT" ]
null
null
null
app.py
gSilas/pride-data-downloader
fdb040613bc0f1d75d04160e6fe313530cf5a86f
[ "MIT" ]
null
null
null
import logging import argparse import sys import os import json import time import datetime from writers import csv_writer from writers import json_writer from utils import get_memory from utils import memory_limit from accessors.pride_data import get_filelist, get_projectlist, write_archive_file, download_projectli...
50.169811
159
0.679015
import logging import argparse import sys import os import json import time import datetime from writers import csv_writer from writers import json_writer from utils import get_memory from utils import memory_limit from accessors.pride_data import get_filelist, get_projectlist, write_archive_file, download_projectli...
0
0
0
7a2ab09598b349ef22788cd20503fbc5b39ae441
6,153
py
Python
tests/test_utils.py
jakub-w/youtube-dl-gui
ff807572f2dd08e51987fdcb351c8ab11cc03b38
[ "Unlicense" ]
null
null
null
tests/test_utils.py
jakub-w/youtube-dl-gui
ff807572f2dd08e51987fdcb351c8ab11cc03b38
[ "Unlicense" ]
null
null
null
tests/test_utils.py
jakub-w/youtube-dl-gui
ff807572f2dd08e51987fdcb351c8ab11cc03b38
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Contains test cases for the utils.py module.""" import locale import sys import unittest from pathlib import Path from unittest import mock PATH = Path(__file__).parent sys.path.insert(0, str(PATH.parent)) from youtube_dl_gui import utils class TestUtils(unittest....
32.555556
97
0.672355
#!/usr/bin/env python # -*- coding: utf-8 -*- """Contains test cases for the utils.py module.""" import locale import sys import unittest from pathlib import Path from unittest import mock PATH = Path(__file__).parent sys.path.insert(0, str(PATH.parent)) from youtube_dl_gui import utils class TestUtils(unittest....
3,541
0
696
cc7906aa4ac492f7c84ee450ee655dcb15a23c8b
41
py
Python
fastsparse/__init__.py
dcato98/fastsparse
1a21fb95e1032f6578e196866bf8b14c5f4dd5cf
[ "Apache-2.0" ]
8
2020-11-20T14:53:17.000Z
2021-02-03T08:00:56.000Z
fastsparse/__init__.py
dcato98/fastsparse
1a21fb95e1032f6578e196866bf8b14c5f4dd5cf
[ "Apache-2.0" ]
3
2021-09-28T05:41:22.000Z
2022-02-26T10:15:28.000Z
fastsparse/__init__.py
dcato98/fastsparse
1a21fb95e1032f6578e196866bf8b14c5f4dd5cf
[ "Apache-2.0" ]
1
2021-02-03T08:01:03.000Z
2021-02-03T08:01:03.000Z
__version__ = "0.0.6" from .core import *
20.5
21
0.682927
__version__ = "0.0.6" from .core import *
0
0
0
ed765b4ce4aa56d61eef209b030265d4eded83b5
2,065
py
Python
bin/render.py
ak15199/smith
932d94f3c045f5344008e5f4c55acf8ba3c93270
[ "Apache-2.0" ]
null
null
null
bin/render.py
ak15199/smith
932d94f3c045f5344008e5f4c55acf8ba3c93270
[ "Apache-2.0" ]
null
null
null
bin/render.py
ak15199/smith
932d94f3c045f5344008e5f4c55acf8ba3c93270
[ "Apache-2.0" ]
null
null
null
import os from jinja2 import Environment, FileSystemLoader import pypandoc import click import pathlib import re BEFORE="""{% extends 'layouts/main.html' %} {% block content %} """ AFTER=""" {% endblock %} """ # add option for substitution @click.command() @click.option('--var', '-v', multiple=True) @click.argumen...
22.445652
76
0.549637
import os from jinja2 import Environment, FileSystemLoader import pypandoc import click import pathlib import re BEFORE="""{% extends 'layouts/main.html' %} {% block content %} """ AFTER=""" {% endblock %} """ def block(name, string): return f"{{% block {name} %}}{string}{{% endblock {name} %}}" def substituti...
615
0
46
3b73b6f0fb61a5565efb1f2d37f81a60c693b66e
2,372
py
Python
testcases/cloud_admin/3-1/Euca2244.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
testcases/cloud_admin/3-1/Euca2244.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
testcases/cloud_admin/3-1/Euca2244.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
''' Created on Oct 18, 2012 @author: mmunn Unit test : EUCA-2244 Default launch permission for user image (account resource) The fix for this issue changes the database so euca_conf --initialize must have been run with the fix present for this test to pass. setUp ...
42.357143
108
0.645447
''' Created on Oct 18, 2012 @author: mmunn Unit test : EUCA-2244 Default launch permission for user image (account resource) The fix for this issue changes the database so euca_conf --initialize must have been run with the fix present for this test to pass. setUp ...
1,339
13
137
6579a6cd57eff4cc853026147ddae93636d80e36
7,749
py
Python
django_remote_submission/migrations/0001_initial.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/migrations/0001_initial.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/migrations/0001_initial.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-09 19:01 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import django_remote_submission.models import model_utils.fields impor...
71.091743
304
0.657246
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-09 19:01 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import django_remote_submission.models import model_utils.fields impor...
0
7,398
23
12f11a88f3f1c03914d13b1857180f03b7eac300
966
py
Python
test-unit.py
lohhenzo/RAID-Validator
53a881b1d1d53950ed46cce794ed89d4571c5571
[ "MIT" ]
null
null
null
test-unit.py
lohhenzo/RAID-Validator
53a881b1d1d53950ed46cce794ed89d4571c5571
[ "MIT" ]
null
null
null
test-unit.py
lohhenzo/RAID-Validator
53a881b1d1d53950ed46cce794ed89d4571c5571
[ "MIT" ]
null
null
null
import os,urllib, urllib2 import raid path = '/home/lorenzo/projects/assets/GCF_52/' #testMultiple() #testOne('20674984470_1') #testOne('20675014450_1') #testOne('20673569920_1') testWS('20673569920_1')
23
67
0.621118
import os,urllib, urllib2 import raid path = '/home/lorenzo/projects/assets/GCF_52/' def testMultiple(): gcfList = {} for filename in os.listdir(path): gcf = {filename: None} with open(path + filename, 'r') as file: gcf[filename] = file.read() gcfList.update(gcf) prin...
692
0
69
7f324987106b2c16809b2ce865e5540f8a9b5671
2,203
py
Python
python/logger.py
MikaelBertze/HallonDispServer
0fcd4794a896819eb83192dd54186066e239ca1f
[ "MIT" ]
null
null
null
python/logger.py
MikaelBertze/HallonDispServer
0fcd4794a896819eb83192dd54186066e239ca1f
[ "MIT" ]
null
null
null
python/logger.py
MikaelBertze/HallonDispServer
0fcd4794a896819eb83192dd54186066e239ca1f
[ "MIT" ]
null
null
null
import os import paho.mqtt.client as mqtt import time import mysql.connector import json print("Starting up!") sql_host = os.environ['SQL_HOST'] sql_user = os.environ['SQL_USER'] sql_passwd = os.environ['SQL_PASSWD'] sql_database = os.environ['SQL_DATABASE'] mqtt_host = os.environ['MQTT_HOST'] mqtt_user = os.en...
30.178082
103
0.674989
import os import paho.mqtt.client as mqtt import time import mysql.connector import json def on_message(lient, userdata, message): global cnx query = None data = None if message.topic == "house/water": sensor_data = json.loads(str(message.payload.decode("utf-8"))) query = "INSERT INTO ...
1,180
0
47
852e86f7ad8d09abceca87e8aa203bbf3768c7d0
303
py
Python
pdf.py
ash-ishh/tweetcompile
771dc4f4343bbab5949c9a9d1518fb757eb7516e
[ "MIT" ]
2
2019-05-28T12:00:03.000Z
2019-06-01T15:25:21.000Z
pdf.py
ash-ishh/tweetcompile
771dc4f4343bbab5949c9a9d1518fb757eb7516e
[ "MIT" ]
1
2019-05-28T12:00:52.000Z
2019-05-28T12:00:52.000Z
pdf.py
ash-ishh/tweetcompile
771dc4f4343bbab5949c9a9d1518fb757eb7516e
[ "MIT" ]
1
2022-01-13T15:34:19.000Z
2022-01-13T15:34:19.000Z
import os import pdfkit PAGE_SIZE = "A4"
21.642857
66
0.60066
import os import pdfkit PAGE_SIZE = "A4" class PDF: def __init__(self): self.options = { 'page-size': PAGE_SIZE, } def save_pdf(self, html_path, output_file): with open(html_path) as f: pdfkit.from_file(f, output_file, options=self.options)
193
-11
80
9c6105eebc990bfd34be438ec315fcbdf3a0fed8
1,690
py
Python
visualizer/plot_mf_param_opt/plot_fidelity/plot_eval_num_bar.py
buctlab/NIO
094e688dd1cd3def7f31cd16ff927d4324651422
[ "Apache-2.0" ]
4
2020-09-23T09:12:10.000Z
2022-01-17T08:43:32.000Z
visualizer/plot_mf_param_opt/plot_fidelity/plot_eval_num_bar.py
buctlab/NIO
094e688dd1cd3def7f31cd16ff927d4324651422
[ "Apache-2.0" ]
null
null
null
visualizer/plot_mf_param_opt/plot_fidelity/plot_eval_num_bar.py
buctlab/NIO
094e688dd1cd3def7f31cd16ff927d4324651422
[ "Apache-2.0" ]
5
2020-12-02T08:03:55.000Z
2022-03-05T18:04:00.000Z
import matplotlib.pyplot as plt from numpy import arange import pandas as pd import os import logging logging.basicConfig() logger = logging.getLogger('PlotEvalNumBar') logger.setLevel('INFO') if __name__ == '__main__': csv_path = r"../../../tests/mf_param_opt_tests/output/FidelityLevelTest.csv" bar_path = ...
30.178571
127
0.638462
import matplotlib.pyplot as plt from numpy import arange import pandas as pd import os import logging logging.basicConfig() logger = logging.getLogger('PlotEvalNumBar') logger.setLevel('INFO') class PlotEvalNumBar: def __init__(self, data, path, show=False): self.data = data self.path = path ...
1,081
0
77