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
1243bbe5c8b07ce563c0e5bf91f426e6d0292391
65,985
py
Python
nitropyapp/ui/mainwindowtest.py
Nitrokey/nitrokey-app2
ab66bbceb854e1f18987b0331528e86e3e7ff702
[ "Apache-2.0" ]
1
2021-11-23T12:54:35.000Z
2021-11-23T12:54:35.000Z
nitropyapp/ui/mainwindowtest.py
Nitrokey/nitrokey-app2
ab66bbceb854e1f18987b0331528e86e3e7ff702
[ "Apache-2.0" ]
null
null
null
nitropyapp/ui/mainwindowtest.py
Nitrokey/nitrokey-app2
ab66bbceb854e1f18987b0331528e86e3e7ff702
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindowtest.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCor...
65.46131
406
0.736576
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindowtest.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCor...
65,541
7
76
45b79edc02fd781ca28eb52676d72c73c84cd286
452
py
Python
src/worker/__init__.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
1
2019-06-17T17:01:17.000Z
2019-06-17T17:01:17.000Z
src/worker/__init__.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
7
2021-02-08T20:46:15.000Z
2021-09-08T02:12:59.000Z
src/worker/__init__.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
null
null
null
#!/usr/bin/python #-*- coding: utf-8 -*- """.. module:: blueprints """ import json from flask import request, abort, current_app
23.789474
52
0.575221
#!/usr/bin/python #-*- coding: utf-8 -*- """.. module:: blueprints """ import json from flask import request, abort, current_app def auth_required(func): def check_auth(*args, **kwargs): try: token = request.cookies.get('token'), if token != current_app.config['token']: ...
298
0
23
037089f36a7441ea98b0f35ec71d28ad247195e7
917
py
Python
apiview_viewset_with_models/permissions.py
arabindamahato/DjangoREST_API_DRF
5292f47c4f29e64de4b5c15dc254a892b2661639
[ "MIT" ]
null
null
null
apiview_viewset_with_models/permissions.py
arabindamahato/DjangoREST_API_DRF
5292f47c4f29e64de4b5c15dc254a892b2661639
[ "MIT" ]
4
2021-03-19T01:51:07.000Z
2021-09-22T18:52:10.000Z
apiview_viewset_with_models/permissions.py
arabindamahato/DjangoREST_API_DRF
5292f47c4f29e64de4b5c15dc254a892b2661639
[ "MIT" ]
null
null
null
from rest_framework.permissions import BasePermission, SAFE_METHODS ''' If the name is arabinda then allow all methods If the name is not arabinda and the name contains even number of characters then allow only SAFE_METHODS otherwise not allowed to perform any operation. '''
24.131579
88
0.742639
from rest_framework.permissions import BasePermission, SAFE_METHODS class IsReadOnly(BasePermission): def has_permission(self, request, view): if request.method in SAFE_METHODS: return True else: return False class IsGetOrPatch(BasePermission): def has_permission(self, request, view): allowed_methods ...
458
38
137
bad2d5229202ece78e93c204d8d954bec36390b7
552
py
Python
python/nRF2401/__init__.py
natdan/AVR-Bootloaders
f01768fe1b6f3f2ba2602bfaef155a87afae0937
[ "Apache-2.0" ]
3
2018-02-13T21:39:55.000Z
2018-04-26T18:17:39.000Z
python/nRF2401/__init__.py
natdan/AVR-Bootloaders
f01768fe1b6f3f2ba2602bfaef155a87afae0937
[ "Apache-2.0" ]
null
null
null
python/nRF2401/__init__.py
natdan/AVR-Bootloaders
f01768fe1b6f3f2ba2602bfaef155a87afae0937
[ "Apache-2.0" ]
null
null
null
################################################################################# # Copyright (c) 2018 Creative Sphere Limited. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License v2.0 # which accompanies this distribution, and is available at # ...
39.428571
81
0.541667
################################################################################# # Copyright (c) 2018 Creative Sphere Limited. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License v2.0 # which accompanies this distribution, and is available at # ...
0
0
0
6c688764869b16c1adb550bc52167a7ee9753b4b
84
py
Python
scripts/test12.py
spencerparkin/MathTree
4aa286248c2dc6a34ad2ef3e56d48b60838f3b72
[ "MIT" ]
null
null
null
scripts/test12.py
spencerparkin/MathTree
4aa286248c2dc6a34ad2ef3e56d48b60838f3b72
[ "MIT" ]
null
null
null
scripts/test12.py
spencerparkin/MathTree
4aa286248c2dc6a34ad2ef3e56d48b60838f3b72
[ "MIT" ]
null
null
null
# test12.py a = _n('a') b = _n('b') c = _n('c') root = a + a + a^b + b^a + a^(b|c)
12
34
0.392857
# test12.py a = _n('a') b = _n('b') c = _n('c') root = a + a + a^b + b^a + a^(b|c)
0
0
0
8302c64afce11bb6a7c70e83a8cef5c89491def6
16,644
py
Python
adamspy/postprocess/ppt.py
bthornton191/Adams_Modules
e5473c6dc194148353cefb9964ad2081e79741d7
[ "MIT" ]
5
2019-07-01T01:38:44.000Z
2020-05-18T00:56:41.000Z
adamspy/postprocess/ppt.py
bthornton191/Adams_Modules
e5473c6dc194148353cefb9964ad2081e79741d7
[ "MIT" ]
4
2020-03-24T16:55:01.000Z
2021-03-20T00:44:18.000Z
adamspy/postprocess/ppt.py
bthornton191/adamspy
e5473c6dc194148353cefb9964ad2081e79741d7
[ "MIT" ]
null
null
null
"""This module is for sending scripts through Adams/PPT """ import os import subprocess import re import time import platform import jinja2 from numpy import genfromtxt import matplotlib.pyplot as plt from thornpy.signal import manually_clean_sig, remove_data_point, manually_clean_sigs, low_pass from thornpy.signal i...
39.070423
259
0.665765
"""This module is for sending scripts through Adams/PPT """ import os import subprocess import re import time import platform import jinja2 from numpy import genfromtxt import matplotlib.pyplot as plt from thornpy.signal import manually_clean_sig, remove_data_point, manually_clean_sigs, low_pass from thornpy.signal i...
3,928
0
96
1b93c694f6d898cd16deab7c152e24c19de63302
3,375
py
Python
middleware.py
CloudCIX/framework
321b4b953a2b2083c069fff133e538ea1ecca4a7
[ "Apache-2.0" ]
null
null
null
middleware.py
CloudCIX/framework
321b4b953a2b2083c069fff133e538ea1ecca4a7
[ "Apache-2.0" ]
null
null
null
middleware.py
CloudCIX/framework
321b4b953a2b2083c069fff133e538ea1ecca4a7
[ "Apache-2.0" ]
null
null
null
""" Move this to wherever once we establish a setup for the Application Framework """ import re from collections import deque from typing import Callable, Deque from time import perf_counter from cloudcix_metrics import prepare_metrics from django.http.response import HttpResponseBase from rest_framework.request impor...
38.352273
116
0.670519
""" Move this to wherever once we establish a setup for the Application Framework """ import re from collections import deque from typing import Callable, Deque from time import perf_counter from cloudcix_metrics import prepare_metrics from django.http.response import HttpResponseBase from rest_framework.request impor...
0
0
0
5964a3e664b876222f49cd0a42cdf3eea5b32fd9
1,505
py
Python
pyirc.py
Psyrens/pyirc
4a7a8dde72108bf7a9bc181e4da8315ecbb31eac
[ "Apache-2.0" ]
null
null
null
pyirc.py
Psyrens/pyirc
4a7a8dde72108bf7a9bc181e4da8315ecbb31eac
[ "Apache-2.0" ]
null
null
null
pyirc.py
Psyrens/pyirc
4a7a8dde72108bf7a9bc181e4da8315ecbb31eac
[ "Apache-2.0" ]
null
null
null
from socket import * while True: choc = str(input("[1] Host\n[2] Connect\n[0] Exit\n")) if choc == '1': hirc() elif choc == '2': circ() elif choc == '0': exit(0) else: print("wrong input, try again")
25.948276
90
0.568771
from socket import * def hirc(): username = input("username: ") ip = input("ip: ") port = input("port: ") s = socket(2, 1) try: s.bind((str(ip), int(port))) s.listen(10) print("listening on " + str(ip) + " through port " + str(port)) c, addr = s.accept() print("connected to " + str(addr[0]) + " through ...
1,245
0
46
e78c346f257ad43b5df6948913c28611c88332ec
2,345
py
Python
src/inference/__init__.py
DecBayComp/tramway-tour
d0ac3e3fdc2c3a6110941ab6e251e4e4fc0375a3
[ "0BSD" ]
null
null
null
src/inference/__init__.py
DecBayComp/tramway-tour
d0ac3e3fdc2c3a6110941ab6e251e4e4fc0375a3
[ "0BSD" ]
null
null
null
src/inference/__init__.py
DecBayComp/tramway-tour
d0ac3e3fdc2c3a6110941ab6e251e4e4fc0375a3
[ "0BSD" ]
null
null
null
from tramway.analyzer import * import numpy as np import pandas as pd from ..data import project_dir datafile = project_dir / 'data/Image_traj.txt'
26.348315
87
0.637527
from tramway.analyzer import * import numpy as np import pandas as pd from ..data import project_dir datafile = project_dir / 'data/Image_traj.txt' def reset_data(): import os rwa_file = os.path.splitext(str(datafile))[0]+'.rwa' try: os.unlink(rwa_file) except FileNotFoundError: pass ...
2,106
0
92
57abae4fea2a1eb0b1d9a72b06df545edebc3f4e
1,859
py
Python
api/tests/integration/tests/basic/reaction_instrumentation.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
204
2015-11-06T21:34:34.000Z
2022-03-30T16:17:01.000Z
api/tests/integration/tests/basic/reaction_instrumentation.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
509
2015-11-05T13:54:43.000Z
2022-03-30T22:15:30.000Z
api/tests/integration/tests/basic/reaction_instrumentation.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
89
2015-11-17T08:22:54.000Z
2022-03-17T04:26:28.000Z
import os import sys sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common"))) from env_indigo import * indigo = Indigo() indigo.setOption("molfile-saving-skip-date", "1") testReactionInstrumentation()
39.553191
102
0.661646
import os import sys sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common"))) from env_indigo import * indigo = Indigo() indigo.setOption("molfile-saving-skip-date", "1") def testReactionInstrumentation (): rxn = indigo.loadReaction("[PH5].CN>CC>") rxn.addReactant...
1,581
0
23
b69f0ff0899bd61bd2f6bd0ca491ed121c2beea4
325
py
Python
exercicios_pyhton/leia_int_leia_fload/teste.py
wcalazans81/cursoemvideo_de_python
b3f093477407d4936b87907910c85472fea98469
[ "MIT" ]
null
null
null
exercicios_pyhton/leia_int_leia_fload/teste.py
wcalazans81/cursoemvideo_de_python
b3f093477407d4936b87907910c85472fea98469
[ "MIT" ]
null
null
null
exercicios_pyhton/leia_int_leia_fload/teste.py
wcalazans81/cursoemvideo_de_python
b3f093477407d4936b87907910c85472fea98469
[ "MIT" ]
null
null
null
try: a = int(input('digite um valor')) b = int(input('di')) r = a / b except (ValueError, TypeError): print('Houve um problema com dados digitados!') except KeyboardInterrupt: print('preferio não continuar') else: print(f'o resultado é {r:.2f:}') finally: print('Volte sempre! Muito obrigado...
21.666667
51
0.643077
try: a = int(input('digite um valor')) b = int(input('di')) r = a / b except (ValueError, TypeError): print('Houve um problema com dados digitados!') except KeyboardInterrupt: print('preferio não continuar') else: print(f'o resultado é {r:.2f:}') finally: print('Volte sempre! Muito obrigado...
0
0
0
b29906242948a9ff452fe77938a8bdba321cf1c2
3,124
py
Python
Core/bram.py
gabrieloandco/RiscV-Arqui1
6495370d23d3a7e9e1f579a1b4e8c1be799c3913
[ "MIT" ]
null
null
null
Core/bram.py
gabrieloandco/RiscV-Arqui1
6495370d23d3a7e9e1f579a1b4e8c1be799c3913
[ "MIT" ]
null
null
null
Core/bram.py
gabrieloandco/RiscV-Arqui1
6495370d23d3a7e9e1f579a1b4e8c1be799c3913
[ "MIT" ]
null
null
null
from myhdl import * from hex_reader import * @block def BRAM(clk,addr,di,enstore,we,re,do,done, A_WIDTH=5, W_WIDTH=32,B_WIDTH=8): """ """ assert len(addr) == A_WIDTH, "Error: Address width mismatch." if do is not None: assert len(di) == len(do) == W_WIDTH, "Error: Data width mismatch in p...
30.330097
100
0.660691
from myhdl import * from hex_reader import * @block def BRAM(clk,addr,di,enstore,we,re,do,done, A_WIDTH=5, W_WIDTH=32,B_WIDTH=8): """ """ assert len(addr) == A_WIDTH, "Error: Address width mismatch." if do is not None: assert len(di) == len(do) == W_WIDTH, "Error: Data width mismatch in p...
1,846
0
92
2913f9c1c1150f1df6a7a978fb35f0784fed07d3
970
py
Python
mydays/homeinventory-orm/data_models.py
feoh/100daysofcode-with-python-course
35ee1d8181b80e5bcb28af59e8d81e90095ee784
[ "MIT" ]
null
null
null
mydays/homeinventory-orm/data_models.py
feoh/100daysofcode-with-python-course
35ee1d8181b80e5bcb28af59e8d81e90095ee784
[ "MIT" ]
null
null
null
mydays/homeinventory-orm/data_models.py
feoh/100daysofcode-with-python-course
35ee1d8181b80e5bcb28af59e8d81e90095ee784
[ "MIT" ]
null
null
null
from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship ModelBase = declarative_base()
30.3125
77
0.689691
from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship ModelBase = declarative_base() class Room(ModelBase): __tablename__ = "rooms" id = Column(Integer, primary_key=True) name = Column(String, nullable=Fal...
241
495
46
b6697cf64cf136ce5293e73907be72df94015a5a
3,006
py
Python
atomdata.py
fsponciano/HPB_tools
845e3fdf2cc0c1b3b93123ea0ca718c5b8406cf3
[ "MIT" ]
null
null
null
atomdata.py
fsponciano/HPB_tools
845e3fdf2cc0c1b3b93123ea0ca718c5b8406cf3
[ "MIT" ]
null
null
null
atomdata.py
fsponciano/HPB_tools
845e3fdf2cc0c1b3b93123ea0ca718c5b8406cf3
[ "MIT" ]
null
null
null
""" --- Atom data --- Written by D. J. Whiting (2017) ** Modified by F. S. Ponciano Ojeda (2021) ** Quantum Light & Matter Group, Durham University, UK Simple database for housing atomic species data for use in calculations of energy levels. """ def atomic_structure_coefficients(atom,I,L,J): ''' ...
33.032967
78
0.401863
""" --- Atom data --- Written by D. J. Whiting (2017) ** Modified by F. S. Ponciano Ojeda (2021) ** Quantum Light & Matter Group, Durham University, UK Simple database for housing atomic species data for use in calculations of energy levels. """ def atomic_structure_coefficients(atom,I,L,J): ''' ...
0
0
0
d1351fb72c06084c084972a6d94ce10a496fcff1
1,023
py
Python
etc/schema/005-ssh-key-parts.py
mikeboers/Spoon
9fe4a06be7c2c6c307b79e72893e32f2006de4ea
[ "BSD-3-Clause" ]
4
2017-11-05T02:54:39.000Z
2022-03-01T06:01:20.000Z
etc/schema/005-ssh-key-parts.py
mikeboers/Spoon
9fe4a06be7c2c6c307b79e72893e32f2006de4ea
[ "BSD-3-Clause" ]
null
null
null
etc/schema/005-ssh-key-parts.py
mikeboers/Spoon
9fe4a06be7c2c6c307b79e72893e32f2006de4ea
[ "BSD-3-Clause" ]
null
null
null
import sqlalchemy as sa
25.575
90
0.5826
import sqlalchemy as sa def upgrade(engine): meta = sa.MetaData(bind=engine) meta.reflect() existing = [] if 'ssh_keys' in meta.tables: old = meta.tables['ssh_keys'] for row in old.select().execute(): existing.append((row.account_id, row.data)) old.drop() ...
973
0
23
428c88aaaa087a1067808155b7ff19cff4afa1c3
5,440
py
Python
Stephen/mlp_cg.py
garibaldu/multicauseRBM
f64f54435f23d04682ac7c15f895a1cf470c51e8
[ "MIT" ]
null
null
null
Stephen/mlp_cg.py
garibaldu/multicauseRBM
f64f54435f23d04682ac7c15f895a1cf470c51e8
[ "MIT" ]
null
null
null
Stephen/mlp_cg.py
garibaldu/multicauseRBM
f64f54435f23d04682ac7c15f895a1cf470c51e8
[ "MIT" ]
null
null
null
import numpy as np import scipy.optimize as so class mlp_cg: """ A Multi-Layer Perceptron""" def __init__(self,inputs,targets,nhidden,beta=1,momentum=0.9,outtype='logistic'): """ Constructor """ # Set up network size self.nin = np.shape(inputs)[1] self.nout = np.shape(targe...
38.309859
132
0.632169
import numpy as np import scipy.optimize as so class mlp_cg: """ A Multi-Layer Perceptron""" def __init__(self,inputs,targets,nhidden,beta=1,momentum=0.9,outtype='logistic'): """ Constructor """ # Set up network size self.nin = np.shape(inputs)[1] self.nout = np.shape(targe...
2,187
0
81
7ceed2a1f72286660c32d46a8d902c63ac35caf7
2,596
py
Python
solar_system/main.py
0xzhang/taichi-play
f3285f3db235035bf5cff39938e546138317cd70
[ "MIT" ]
4
2021-10-02T07:12:14.000Z
2022-02-17T05:51:12.000Z
solar_system/main.py
0xzhang/taichi-play
f3285f3db235035bf5cff39938e546138317cd70
[ "MIT" ]
null
null
null
solar_system/main.py
0xzhang/taichi-play
f3285f3db235035bf5cff39938e546138317cd70
[ "MIT" ]
1
2022-02-17T05:51:11.000Z
2022-02-17T05:51:11.000Z
import taichi as ti from solar_system import SolarSystem, Sun, Planet from datetime import datetime ti.init(arch=ti.gpu) if __name__ == "__main__": main()
28.844444
77
0.607858
import taichi as ti from solar_system import SolarSystem, Sun, Planet from datetime import datetime ti.init(arch=ti.gpu) def init_solarsystem(): sun = Sun(0.2) ss = SolarSystem(sun) sun.initialize(ti.Vector([1, 0, 0])) # 2018-01-01 ss.date = datetime.strptime("2018-01-01", '%Y-%m-%d').date() ...
2,387
0
46
848dfae50f9748a1ee75a25434d9657abe428eeb
486
py
Python
MTG/controller/ilayercontroller.py
CODE-MTD/OpenMTD
d2a2613260a8eb88d0fb223eebc36d66ea712890
[ "MIT" ]
null
null
null
MTG/controller/ilayercontroller.py
CODE-MTD/OpenMTD
d2a2613260a8eb88d0fb223eebc36d66ea712890
[ "MIT" ]
null
null
null
MTG/controller/ilayercontroller.py
CODE-MTD/OpenMTD
d2a2613260a8eb88d0fb223eebc36d66ea712890
[ "MIT" ]
null
null
null
import abc from controller.itranslator import ITranslator
20.25
50
0.602881
import abc from controller.itranslator import ITranslator class ILayerController(ITranslator): @abc.abstractmethod def process_packet(self, packet): """ Return true if packet should be redirected Return false if packet should be dropped :rtype: Boolean :param packet: I...
0
403
23
ac8875e6ae533305f285688d4d1a5001ebd56ccb
7,234
py
Python
visitors/test_views.py
ASquirrelsTail/serve-up
9533ba82f5b4989434b3b20352d17a8131bb9619
[ "MIT" ]
null
null
null
visitors/test_views.py
ASquirrelsTail/serve-up
9533ba82f5b4989434b3b20352d17a8131bb9619
[ "MIT" ]
10
2021-03-30T14:05:21.000Z
2022-03-12T00:41:15.000Z
visitors/test_views.py
ASquirrelsTail/serve-up
9533ba82f5b4989434b3b20352d17a8131bb9619
[ "MIT" ]
null
null
null
from django.urls import reverse from django.views import View from django.http import HttpResponse from django.contrib.sessions.middleware import SessionMiddleware from django.test import TestCase, RequestFactory from django.core.exceptions import PermissionDenied from datetime import timedelta from tables.models impo...
37.097436
156
0.641554
from django.urls import reverse from django.views import View from django.http import HttpResponse from django.contrib.sessions.middleware import SessionMiddleware from django.test import TestCase, RequestFactory from django.core.exceptions import PermissionDenied from datetime import timedelta from tables.models impo...
2,801
0
297
ff7e81e102507c4497d7b7914010c6b208c9cea5
4,655
py
Python
tests/unit/test_algorithm.py
benjaminkaplanphd/traveling-salesperson
5c788554fe90eeb81b6351aeec96f1d64caa7591
[ "MIT" ]
null
null
null
tests/unit/test_algorithm.py
benjaminkaplanphd/traveling-salesperson
5c788554fe90eeb81b6351aeec96f1d64caa7591
[ "MIT" ]
null
null
null
tests/unit/test_algorithm.py
benjaminkaplanphd/traveling-salesperson
5c788554fe90eeb81b6351aeec96f1d64caa7591
[ "MIT" ]
null
null
null
""" Unit tests for the algorithm.py module """ # pragma pylint: disable=redefined-outer-name import numpy as np import pytest from traveling_salesperson import algorithm @pytest.fixture() def pyramid_distance_matrix_fixture(): r"""A distance matrix, corresponding to a lopsided pyramid, for testing the neares...
42.706422
100
0.612245
""" Unit tests for the algorithm.py module """ # pragma pylint: disable=redefined-outer-name import numpy as np import pytest from traveling_salesperson import algorithm @pytest.fixture() def pyramid_distance_matrix_fixture(): r"""A distance matrix, corresponding to a lopsided pyramid, for testing the neares...
0
0
0
c51bddc364ce33d4504970da44a3ed490f7192ac
6,104
py
Python
ports/esp32/modules/hw_utils.py
tempstabilizer2018group/micropython_esp32
0bc16f1954a65adb9ad01578004744d424ef0c27
[ "MIT" ]
null
null
null
ports/esp32/modules/hw_utils.py
tempstabilizer2018group/micropython_esp32
0bc16f1954a65adb9ad01578004744d424ef0c27
[ "MIT" ]
null
null
null
ports/esp32/modules/hw_utils.py
tempstabilizer2018group/micropython_esp32
0bc16f1954a65adb9ad01578004744d424ef0c27
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import gc import uos import utime import hw_urequests import machine import portable_firmware_constants strMAC = ''.join(['%02X'%i for i in machine.unique_id()]) # # Watchdog # objWdt = None feedWatchdog = lambda: None '''True if power on. False if reboot by software or watchdog.''' bPowerO...
25.647059
176
0.717071
# -*- coding: utf-8 -*- import gc import uos import utime import hw_urequests import machine import portable_firmware_constants strMAC = ''.join(['%02X'%i for i in machine.unique_id()]) # # Watchdog # objWdt = None feedWatchdog = lambda: None '''True if power on. False if reboot by software or watchdog.''' bPowerO...
2,462
-7
491
9e116ca2287be4b26e9927d7c53033ee159c6e05
7,047
py
Python
netapp/santricity/models/symbol/rtr_attributes.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
netapp/santricity/models/symbol/rtr_attributes.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
netapp/santricity/models/symbol/rtr_attributes.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
# coding: utf-8 """ RTRAttributes.py The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: ...
38.298913
844
0.639563
# coding: utf-8 """ RTRAttributes.py The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: ...
0
0
0
e863de41a399ceaed49791d306754ebb714ed1ab
1,353
py
Python
agent_training.py
eym55/power_grid_sim
35822a2d2f09c00a38841e0bf3395bc5ea0ddbaa
[ "MIT" ]
1
2022-01-26T15:19:15.000Z
2022-01-26T15:19:15.000Z
agent_training.py
eym55/power_grid_sim
35822a2d2f09c00a38841e0bf3395bc5ea0ddbaa
[ "MIT" ]
null
null
null
agent_training.py
eym55/power_grid_sim
35822a2d2f09c00a38841e0bf3395bc5ea0ddbaa
[ "MIT" ]
null
null
null
import gym, ray #Import any agents you want to train, list found here: https://docs.ray.io/en/latest/rllib/rllib-algorithms.html from ray.rllib.agents import ppo,dqn,a3c from environments.defender_game import PowerGrid import pypsa import numpy as np from ray.tune.registry import register_env import pickle import time ...
25.055556
112
0.717664
import gym, ray #Import any agents you want to train, list found here: https://docs.ray.io/en/latest/rllib/rllib-algorithms.html from ray.rllib.agents import ppo,dqn,a3c from environments.defender_game import PowerGrid import pypsa import numpy as np from ray.tune.registry import register_env import pickle import time ...
0
0
0
6ac7be1fd3253acff69b48cbe8419a293101969a
467
py
Python
Python/math/mod_sqrt.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
2
2021-09-05T13:17:01.000Z
2021-09-05T13:17:06.000Z
Python/math/mod_sqrt.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
null
null
null
Python/math/mod_sqrt.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
null
null
null
import random # mod-sqrt
21.227273
42
0.423983
import random # mod-sqrt def mod_sqrt(a: int, p: int) -> int: if a == 0: return 0 if p == 2: return 1 k = (p - 1) // 2 if pow(a, k, p) != 1: return -1 while True: n = random.randint(2, p - 1) r = (n ** 2 - a) % p if r == 0: return n if pow(r, k, p) == p - 1: break k += 1 w, x, y, z = n, 1, 1, 0 while k...
420
0
22
138bb55fa6c8950896b53a74ca9ec35fea63f4c4
21,762
py
Python
src/load_cvs/cvload.py
ODM2/ODM2
a474e20718f69cac3214c3fc3cb2eb2a410e22aa
[ "BSD-3-Clause" ]
39
2015-07-13T15:03:32.000Z
2021-12-13T21:17:40.000Z
src/load_cvs/cvload.py
ODM2/ODM2
a474e20718f69cac3214c3fc3cb2eb2a410e22aa
[ "BSD-3-Clause" ]
77
2015-04-27T21:43:20.000Z
2020-08-11T03:03:36.000Z
src/load_cvs/cvload.py
ODM2/ODM2
a474e20718f69cac3214c3fc3cb2eb2a410e22aa
[ "BSD-3-Clause" ]
18
2015-08-11T21:52:21.000Z
2021-05-17T18:23:05.000Z
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker import sys # Supporting Python3 try: import urllib.request as request except ImportError: import urllib as request import xml.etree.ElementTree as ET import argparse import pymysql import pyodbc import psycopg2 # ###...
39.711679
144
0.614006
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker import sys # Supporting Python3 try: import urllib.request as request except ImportError: import urllib as request import xml.etree.ElementTree as ET import argparse import pymysql import pyodbc import psycopg2 # ###...
3,982
10,965
800
4c56c7968b1478675e4c35cdac29eb5ac742a750
3,837
py
Python
pymanopt/autodiff/backends/_pytorch.py
NoemieJaquier/pymanopt
f3ae54b5ebc648a193e64acdb75c97885391c3d7
[ "BSD-3-Clause" ]
null
null
null
pymanopt/autodiff/backends/_pytorch.py
NoemieJaquier/pymanopt
f3ae54b5ebc648a193e64acdb75c97885391c3d7
[ "BSD-3-Clause" ]
null
null
null
pymanopt/autodiff/backends/_pytorch.py
NoemieJaquier/pymanopt
f3ae54b5ebc648a193e64acdb75c97885391c3d7
[ "BSD-3-Clause" ]
null
null
null
""" Module containing functions to differentiate functions using pytorch. """ import functools import warnings import numpy as np try: import torch except ImportError: torch = None else: from torch import autograd from ._backend import Backend from .. import make_tracing_backend_decorator from ...tools im...
35.859813
79
0.63852
""" Module containing functions to differentiate functions using pytorch. """ import functools import warnings import numpy as np try: import torch except ImportError: torch = None else: from torch import autograd from ._backend import Backend from .. import make_tracing_backend_decorator from ...tools im...
2,419
953
23
1c37bc84fb69610331ac21e64650183042302f84
2,438
py
Python
Organise-Files-According-To-Their-Extensions/script_dirs.py
A-kriti/Amazing-Python-Scripts
ebf607fe39e6d9e61f30ec3439fc8d6ab1f736b9
[ "MIT" ]
930
2020-09-05T22:07:28.000Z
2022-03-30T07:56:18.000Z
Organise-Files-According-To-Their-Extensions/script_dirs.py
maheshdbabar9340/Amazing-Python-Scripts
e2272048cbe49b4bda5072bbdd8479739bb6c18d
[ "MIT" ]
893
2020-09-04T07:57:24.000Z
2022-02-08T02:12:26.000Z
Organise-Files-According-To-Their-Extensions/script_dirs.py
maheshdbabar9340/Amazing-Python-Scripts
e2272048cbe49b4bda5072bbdd8479739bb6c18d
[ "MIT" ]
497
2020-09-05T08:16:24.000Z
2022-03-31T00:55:57.000Z
import os from pathlib import Path import sys # Taking input print_string = """ Type Path of the directory OR Press enter for running the script on current directory: OR Type quit """ print(print_string + "\n\n") input_path = input("Input:") print("\n\n") # Script will terminate if input is 'quit' if input_path == "q...
31.25641
118
0.684988
import os from pathlib import Path import sys # Taking input print_string = """ Type Path of the directory OR Press enter for running the script on current directory: OR Type quit """ print(print_string + "\n\n") input_path = input("Input:") print("\n\n") # Script will terminate if input is 'quit' if input_path == "q...
0
0
0
5b238bc281f162f7e937c41dc61c9bf5d6246f5d
7,586
py
Python
main.py
Nebula4869/seu-auto-health-check-in
70d7e8fab352d616e0299a492957b2a17e56fd4f
[ "MIT" ]
null
null
null
main.py
Nebula4869/seu-auto-health-check-in
70d7e8fab352d616e0299a492957b2a17e56fd4f
[ "MIT" ]
1
2021-11-11T06:58:40.000Z
2021-11-11T06:58:40.000Z
main.py
Nebula4869/seu-auto-health-check-in
70d7e8fab352d616e0299a492957b2a17e56fd4f
[ "MIT" ]
null
null
null
import time from selenium import webdriver from selenium import common import func_timeout import datetime import requests import logging import zipfile import winreg import sys import os MAX_RETRIES = 0 def send_massage(content: str): """ 发送短信/邮件 :param content: 邮件内容 :return...
35.615023
184
0.60928
import time from selenium import webdriver from selenium import common import func_timeout import datetime import requests import logging import zipfile import winreg import sys import os MAX_RETRIES = 0 def send_massage(content: str): """ 发送短信/邮件 :param content: 邮件内容 :return...
0
0
0
d29bcdb8b1f78c5c097ab0032be5256583012fd3
392
py
Python
users/migrations/0003_auto_20200803_1949.py
asanka9/Donation-Project
7182ccad58bd6e61ccc29b79bbab28e428ed2a17
[ "Apache-2.0" ]
null
null
null
users/migrations/0003_auto_20200803_1949.py
asanka9/Donation-Project
7182ccad58bd6e61ccc29b79bbab28e428ed2a17
[ "Apache-2.0" ]
null
null
null
users/migrations/0003_auto_20200803_1949.py
asanka9/Donation-Project
7182ccad58bd6e61ccc29b79bbab28e428ed2a17
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.5 on 2020-08-03 14:19 from django.db import migrations, models
20.631579
47
0.59949
# Generated by Django 3.0.5 on 2020-08-03 14:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20200803_0900'), ] operations = [ migrations.AlterField( model_name='profile', name='user_descrip...
0
278
23
a5ae6b2ca16dd14e888d229c983beda49888f2d0
7,950
py
Python
code/socialDistribution/tests/test_models.py
CMPUT404F21TEAM/social-distribution
c6775bfa3bf93025d426bc4601431128a51d4c48
[ "W3C-20150513" ]
null
null
null
code/socialDistribution/tests/test_models.py
CMPUT404F21TEAM/social-distribution
c6775bfa3bf93025d426bc4601431128a51d4c48
[ "W3C-20150513" ]
173
2021-09-30T00:12:03.000Z
2021-12-09T00:32:46.000Z
code/socialDistribution/tests/test_models.py
CMPUT404F21TEAM/social-distribution
c6775bfa3bf93025d426bc4601431128a51d4c48
[ "W3C-20150513" ]
3
2021-12-09T01:27:49.000Z
2022-03-11T06:04:16.000Z
# python manage.py test api.tests.tests.test_models from django.test import TestCase, TransactionTestCase from django.contrib.auth.models import User from django.db.utils import IntegrityError from django.test.testcases import LiveServerTestCase, LiveServerThread from mixer.backend.django import mixer from datetime i...
33.544304
140
0.67522
# python manage.py test api.tests.tests.test_models from django.test import TestCase, TransactionTestCase from django.contrib.auth.models import User from django.db.utils import IntegrityError from django.test.testcases import LiveServerTestCase, LiveServerThread from mixer.backend.django import mixer from datetime i...
1,945
1,738
256
f71fca6c7b717f1271683d16d11ce61370e99869
2,628
py
Python
Apps/phforescoutcounteract/forescoutcounteract_consts.py
ryanbsaunders/phantom-apps
1befda793a08d366fbd443894f993efb1baf9635
[ "Apache-2.0" ]
74
2019-10-22T02:00:53.000Z
2022-03-15T12:56:13.000Z
Apps/phforescoutcounteract/forescoutcounteract_consts.py
ryanbsaunders/phantom-apps
1befda793a08d366fbd443894f993efb1baf9635
[ "Apache-2.0" ]
375
2019-10-22T20:53:50.000Z
2021-11-09T21:28:43.000Z
Apps/phforescoutcounteract/forescoutcounteract_consts.py
ryanbsaunders/phantom-apps
1befda793a08d366fbd443894f993efb1baf9635
[ "Apache-2.0" ]
175
2019-10-23T15:30:42.000Z
2021-11-05T21:33:31.000Z
# File: forescoutcounteract_consts.py # Copyright (c) 2018-2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # # -- # Define your constants here FS_DEX_HOST_ENDPOINT = '/fsapi/niCore/Hosts' FS_DEX_LIST_ENDPOINT = '/fsapi/niCore/Lists' FS_DEX_TEST_CONNECTIVITY = \ """...
36.5
117
0.619102
# File: forescoutcounteract_consts.py # Copyright (c) 2018-2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # # -- # Define your constants here FS_DEX_HOST_ENDPOINT = '/fsapi/niCore/Hosts' FS_DEX_LIST_ENDPOINT = '/fsapi/niCore/Lists' FS_DEX_TEST_CONNECTIVITY = \ """...
0
0
0
9471d4657597db82b5566955e1bcfc934590b4c9
1,006
py
Python
tests/test_parse_digest_host_url.py
ybenitezf/flask-static-digest
f7743dfb9cecd163eb04dec06cdf4303009e296c
[ "MIT" ]
null
null
null
tests/test_parse_digest_host_url.py
ybenitezf/flask-static-digest
f7743dfb9cecd163eb04dec06cdf4303009e296c
[ "MIT" ]
null
null
null
tests/test_parse_digest_host_url.py
ybenitezf/flask-static-digest
f7743dfb9cecd163eb04dec06cdf4303009e296c
[ "MIT" ]
null
null
null
from flask_static_digest import parse_digest_host_url import pytest as pt @pt.mark.parametrize( "digest_host_url, expected", [ ( "https://cdn.example.com", ("https://cdn.example.com", "") ), ( "https://cdn.example.com/", ("https://cdn.exampl...
25.15
61
0.516899
from flask_static_digest import parse_digest_host_url import pytest as pt @pt.mark.parametrize( "digest_host_url, expected", [ ( "https://cdn.example.com", ("https://cdn.example.com", "") ), ( "https://cdn.example.com/", ("https://cdn.exampl...
103
0
45
58ea3a89d749ffe3fc11bef9fbc1ff02d402159e
111
py
Python
pocovidnet/pocovidnet/__init__.py
sbaktha/covid19_pocus_ultrasound
876558a118c7afbe7a520efcc07581af6f8ffbb2
[ "MIT" ]
null
null
null
pocovidnet/pocovidnet/__init__.py
sbaktha/covid19_pocus_ultrasound
876558a118c7afbe7a520efcc07581af6f8ffbb2
[ "MIT" ]
null
null
null
pocovidnet/pocovidnet/__init__.py
sbaktha/covid19_pocus_ultrasound
876558a118c7afbe7a520efcc07581af6f8ffbb2
[ "MIT" ]
null
null
null
from .model import get_cam_model, get_model MODEL_FACTORY = {'vgg_base': get_model, 'vgg_cam': get_cam_model}
27.75
65
0.783784
from .model import get_cam_model, get_model MODEL_FACTORY = {'vgg_base': get_model, 'vgg_cam': get_cam_model}
0
0
0
fb30c68225ff4cb29b410c7a04cb4eb7cd493066
243
py
Python
students/K33421/laboratory_works/Dzhapua_Esnat/laboratory_work_1/task_1/client.py
esnogram/ITMO_ICT_WebDevelopment_2020-2021
22a3d776463d50431a5745facaf7b4d55dd73b55
[ "MIT" ]
null
null
null
students/K33421/laboratory_works/Dzhapua_Esnat/laboratory_work_1/task_1/client.py
esnogram/ITMO_ICT_WebDevelopment_2020-2021
22a3d776463d50431a5745facaf7b4d55dd73b55
[ "MIT" ]
null
null
null
students/K33421/laboratory_works/Dzhapua_Esnat/laboratory_work_1/task_1/client.py
esnogram/ITMO_ICT_WebDevelopment_2020-2021
22a3d776463d50431a5745facaf7b4d55dd73b55
[ "MIT" ]
null
null
null
import socket conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect (("127.0.0.1", 14900)) hels = "Hello, server" conn.send(bytes(hels, "utf-8")) data = conn.recv(16384) udata = data.decode("utf-8") print(udata) conn.close()
20.25
56
0.703704
import socket conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect (("127.0.0.1", 14900)) hels = "Hello, server" conn.send(bytes(hels, "utf-8")) data = conn.recv(16384) udata = data.decode("utf-8") print(udata) conn.close()
0
0
0
262de512c12b00516269ac71506a70c2a6b03971
1,926
py
Python
cpstats/view.py
gye-tgm/cpstats
ab1b3bbabc4fe4dbeaffee23c79333b10b6775ed
[ "MIT" ]
null
null
null
cpstats/view.py
gye-tgm/cpstats
ab1b3bbabc4fe4dbeaffee23c79333b10b6775ed
[ "MIT" ]
null
null
null
cpstats/view.py
gye-tgm/cpstats
ab1b3bbabc4fe4dbeaffee23c79333b10b6775ed
[ "MIT" ]
null
null
null
from cpstats.models.model import VERDICT_AC, Task from flask import render_template from cpstats.models import model from cpstats import app @app.route('/') @app.route('/index') SUBNAV = [ 'general', 'submissions', 'tasks', 'achievements' ] @app.route('/user/<string:username>') @app.route('/user/<s...
32.1
110
0.597092
from cpstats.models.model import VERDICT_AC, Task from flask import render_template from cpstats.models import model from cpstats import app @app.route('/') @app.route('/index') def index(): return render_template('index.html', title='Home') SUBNAV = [ 'general', 'submissions', 'tasks', 'achieveme...
1,424
0
112
f40417cc6ec6b8a597aa679e0a71fc8f641c968f
15,651
py
Python
pineboolib/fllegacy/flreportviewer.py
juanjosepablos/pineboo
f6ce515aec6e0139821bb9c1d62536d9fb50dae4
[ "MIT" ]
null
null
null
pineboolib/fllegacy/flreportviewer.py
juanjosepablos/pineboo
f6ce515aec6e0139821bb9c1d62536d9fb50dae4
[ "MIT" ]
1
2017-10-30T22:00:48.000Z
2017-11-11T19:34:32.000Z
pineboolib/fllegacy/flreportviewer.py
juanjosepablos/pineboo
f6ce515aec6e0139821bb9c1d62536d9fb50dae4
[ "MIT" ]
1
2017-10-30T20:16:38.000Z
2017-10-30T20:16:38.000Z
"""Flreportviewer module.""" from PyQt5 import QtWidgets, QtCore, QtXml from pineboolib.core import decorators from pineboolib.application.qsatypes.sysbasetype import SysBaseType from pineboolib.fllegacy.flutil import FLUtil # from pineboolib.fllegacy.flpicture import FLPicture from .flsqlquery import FLSqlQuery fro...
31.053571
100
0.605776
"""Flreportviewer module.""" from PyQt5 import QtWidgets, QtCore, QtXml from pineboolib.core import decorators from pineboolib.application.qsatypes.sysbasetype import SysBaseType from pineboolib.fllegacy.flutil import FLUtil # from pineboolib.fllegacy.flpicture import FLPicture from .flsqlquery import FLSqlQuery fro...
0
0
0
e155a2ee3108e7539d619edb6c746911caaffb13
4,995
py
Python
text_to_num/lang/english.py
fquirin/text2num
539c8bb70ecb3991e27220e93e0dcc2005cbe9ea
[ "MIT" ]
55
2018-10-10T14:49:16.000Z
2022-03-31T19:45:26.000Z
text_to_num/lang/english.py
fquirin/text2num
539c8bb70ecb3991e27220e93e0dcc2005cbe9ea
[ "MIT" ]
37
2018-10-12T01:04:16.000Z
2022-03-17T09:17:22.000Z
text_to_num/lang/english.py
fquirin/text2num
539c8bb70ecb3991e27220e93e0dcc2005cbe9ea
[ "MIT" ]
27
2018-11-12T17:33:44.000Z
2022-03-15T09:16:48.000Z
# MIT License # Copyright (c) 2018-2019 Groupe Allo-Media # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify...
30.272727
98
0.647047
# MIT License # Copyright (c) 2018-2019 Groupe Allo-Media # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify...
37
1,968
23
275e86f75a011a705356e9c7db8c223789707e62
1,464
py
Python
utils/generators/matrix_multiply.py
sgpthomas/diospyros
27d4e5e5d4e56a6dc5860d7c7d5eefb27de24a5d
[ "MIT" ]
27
2020-02-16T22:26:34.000Z
2022-02-17T04:17:19.000Z
utils/generators/matrix_multiply.py
sgpthomas/diospyros
27d4e5e5d4e56a6dc5860d7c7d5eefb27de24a5d
[ "MIT" ]
77
2020-01-21T15:37:35.000Z
2022-03-11T19:48:43.000Z
utils/generators/matrix_multiply.py
sgpthomas/diospyros
27d4e5e5d4e56a6dc5860d7c7d5eefb27de24a5d
[ "MIT" ]
1
2021-09-27T20:35:15.000Z
2021-09-27T20:35:15.000Z
""" Matrix multiply generator. Generates an Eigen matrix multiply override kernel. """
26.142857
80
0.583333
""" Matrix multiply generator. Generates an Eigen matrix multiply override kernel. """ def generator(kernel_name, params, spec_file): input_rows = params["input_rows"] input_cols = params["input_cols"] output_cols = params["output_cols"] # inject specification template with arguments spec = "...
1,349
0
23
8a516965d3efb4dbcb256edc310602cc80459db0
9,646
py
Python
redash/query_runner/python.py
techscience9/redash
32669b148ccba47b118c8d390031903a18b0253d
[ "BSD-2-Clause" ]
3
2018-06-01T00:05:18.000Z
2019-03-07T14:03:10.000Z
redash/query_runner/python.py
techscience9/redash
32669b148ccba47b118c8d390031903a18b0253d
[ "BSD-2-Clause" ]
6
2021-01-21T16:43:27.000Z
2022-02-27T09:18:00.000Z
redash/query_runner/python.py
tradingfoe/redash-clone
94065b8dce0e27f6f40a7adc2b99e078b03115b3
[ "BSD-2-Clause" ]
5
2018-06-02T11:12:44.000Z
2020-05-13T18:34:33.000Z
import datetime import importlib import logging import sys from redash.query_runner import * from redash.utils import json_dumps, json_loads from redash import models from RestrictedPython import compile_restricted from RestrictedPython.Guards import safe_builtins logger = logging.getLogger(__name__) class CustomP...
34.45
141
0.611445
import datetime import importlib import logging import sys from redash.query_runner import * from redash.utils import json_dumps, json_loads from redash import models from RestrictedPython import compile_restricted from RestrictedPython.Guards import safe_builtins logger = logging.getLogger(__name__) class CustomP...
4,618
4,430
157
71735f8fa3170ee4f1070bc1e7bbea8132fee378
10,138
py
Python
InvalidPassports/InvalidPassports.py
savvakrasava/odi_tools
672cd5fd2bd2c48b7be5d945747edbaff0d1247c
[ "MIT" ]
null
null
null
InvalidPassports/InvalidPassports.py
savvakrasava/odi_tools
672cd5fd2bd2c48b7be5d945747edbaff0d1247c
[ "MIT" ]
null
null
null
InvalidPassports/InvalidPassports.py
savvakrasava/odi_tools
672cd5fd2bd2c48b7be5d945747edbaff0d1247c
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- ''' Created on 21 06 2019 @author: lukhnevsn ''' #import packages ############################################## from java.io import BufferedReader ,FileReader, IOException; from java.sql import PreparedStatement,Connection,DriverManager,SQLException,Statement,Types, ResultSet; from java.n...
38.842912
262
0.650621
#-*- coding: utf-8 -*- ''' Created on 21 06 2019 @author: lukhnevsn ''' #import packages ############################################## from java.io import BufferedReader ,FileReader, IOException; from java.sql import PreparedStatement,Connection,DriverManager,SQLException,Statement,Types, ResultSet; from java.n...
769
0
62
b7fff91cb272ffc6f087516681dde3758d90c6ef
37,524
py
Python
tests/test_tron_tools.py
xcorail/paasta
3f132c73b45fcf0afc31ddb889205ecd9394d4bb
[ "Apache-2.0" ]
null
null
null
tests/test_tron_tools.py
xcorail/paasta
3f132c73b45fcf0afc31ddb889205ecd9394d4bb
[ "Apache-2.0" ]
null
null
null
tests/test_tron_tools.py
xcorail/paasta
3f132c73b45fcf0afc31ddb889205ecd9394d4bb
[ "Apache-2.0" ]
null
null
null
import mock import pytest from paasta_tools import tron_tools from paasta_tools.tron_tools import MASTER_NAMESPACE from paasta_tools.utils import InvalidInstanceConfig from paasta_tools.utils import NoConfigurationForServiceError from paasta_tools.utils import NoDeploymentsAvailable @mock.patch('service_configur...
36.896755
115
0.593167
import mock import pytest from paasta_tools import tron_tools from paasta_tools.tron_tools import MASTER_NAMESPACE from paasta_tools.utils import InvalidInstanceConfig from paasta_tools.utils import NoConfigurationForServiceError from paasta_tools.utils import NoDeploymentsAvailable class TestTronConfig: @pytes...
29,117
7,458
293
165e045e914f6250cb2bec371c5b5d7ec48cd7c9
121
py
Python
my_utilize/my_yield.py
FengJunJian/tutorials_for_demo
36ab749241193aeb17dec14d0c7503d858c84f8e
[ "Apache-2.0" ]
null
null
null
my_utilize/my_yield.py
FengJunJian/tutorials_for_demo
36ab749241193aeb17dec14d0c7503d858c84f8e
[ "Apache-2.0" ]
null
null
null
my_utilize/my_yield.py
FengJunJian/tutorials_for_demo
36ab749241193aeb17dec14d0c7503d858c84f8e
[ "Apache-2.0" ]
null
null
null
fun=generator() fun.__next__()
13.444444
24
0.520661
def generator(): for i in range(5): print('next',i) yield i fun=generator() fun.__next__()
61
0
25
0c5c7fd38a2d0e9f0be6a523befaf9e1f678032f
3,944
py
Python
intprim/util/visualization.py
carlos-cardoso/intprim
cf6d83996e4a1ede3cda19c7906c6166ec5a6f6e
[ "MIT" ]
49
2017-11-23T22:37:36.000Z
2022-03-05T04:39:13.000Z
intprim/util/visualization.py
souljaboy764/intprim
ecf905ce69dc14215230be3b3819d2236223e9ba
[ "MIT" ]
5
2019-03-31T08:47:33.000Z
2021-08-19T23:54:51.000Z
intprim/util/visualization.py
souljaboy764/intprim
ecf905ce69dc14215230be3b3819d2236223e9ba
[ "MIT" ]
20
2018-01-22T20:17:24.000Z
2022-02-18T01:07:54.000Z
import matplotlib.pyplot as plt import numpy as np # Displays the probability that the current trajectory matches the stored trajectores at every instant in time. def plot_distribution(dof_names, mean, upper_bound, lower_bound): """Plots a given probability distribution. """ figures_per_plot = np.min([4, m...
38.666667
132
0.671653
import matplotlib.pyplot as plt import numpy as np # Displays the probability that the current trajectory matches the stored trajectores at every instant in time. def plot_distribution(dof_names, mean, upper_bound, lower_bound): """Plots a given probability distribution. """ figures_per_plot = np.min([4, m...
131
0
23
e677293c96f1e9bdb3625f862f7f5d5efbd3c275
4,620
py
Python
control_de_flujo.py
EUD-curso-python/control_de_flujo-gusadolfo123
6e5ab478c40746383c260f1d6779dfa11bbb80bf
[ "MIT" ]
null
null
null
control_de_flujo.py
EUD-curso-python/control_de_flujo-gusadolfo123
6e5ab478c40746383c260f1d6779dfa11bbb80bf
[ "MIT" ]
null
null
null
control_de_flujo.py
EUD-curso-python/control_de_flujo-gusadolfo123
6e5ab478c40746383c260f1d6779dfa11bbb80bf
[ "MIT" ]
null
null
null
"""Guarde en lista `naturales` los primeros 100 números naturales (desde el 1) usando el bucle while """ naturales = [] i = 1 while i <= 100: naturales.append(i) i += 1 """Guarde en `acumulado` una lista con el siguiente patrón: ['1','1 2','1 2 3','1 2 3 4','1 2 3 4 5',...,'...47 48 49 50'] Hasta el número 5...
24.188482
501
0.613636
"""Guarde en lista `naturales` los primeros 100 números naturales (desde el 1) usando el bucle while """ naturales = [] i = 1 while i <= 100: naturales.append(i) i += 1 """Guarde en `acumulado` una lista con el siguiente patrón: ['1','1 2','1 2 3','1 2 3 4','1 2 3 4 5',...,'...47 48 49 50'] Hasta el número 5...
0
0
0
592db96b8c56319c711829dab38acc1b8d52ef98
3,915
py
Python
tsutils/cog_mixins.py
kary5678/tsutils
ab6ecdcd2f0e10ba19092028909b3f74bf1708a9
[ "MIT" ]
1
2021-07-28T19:41:18.000Z
2021-07-28T19:41:18.000Z
tsutils/cog_mixins.py
kary5678/tsutils
ab6ecdcd2f0e10ba19092028909b3f74bf1708a9
[ "MIT" ]
19
2020-09-14T07:55:14.000Z
2022-03-06T17:23:14.000Z
tsutils/cog_mixins.py
kary5678/tsutils
ab6ecdcd2f0e10ba19092028909b3f74bf1708a9
[ "MIT" ]
3
2020-09-14T07:47:27.000Z
2021-09-14T02:16:33.000Z
from abc import abstractmethod from typing import Callable, List, Optional, Type import redbot.core.commands as commands from redbot.core.commands import Cog, Command from .helper_classes import CogABCMeta
34.043478
115
0.65645
from abc import abstractmethod from typing import Callable, List, Optional, Type import redbot.core.commands as commands from redbot.core.commands import Cog, Command from .helper_classes import CogABCMeta class CogMixin(Cog, metaclass=CogABCMeta): @abstractmethod def setup_self(self: "CogMixin") -> None: ....
3,126
277
298
526cd21f661404a9ec8403fe8815374f2aa99060
1,521
py
Python
AlgorithmsPractice/dynamicProgramming/354_hard_Russian Doll Envelopes.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
58
2019-03-03T04:42:23.000Z
2022-01-13T04:36:31.000Z
AlgorithmsPractice/dynamicProgramming/354_hard_Russian Doll Envelopes.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
null
null
null
AlgorithmsPractice/dynamicProgramming/354_hard_Russian Doll Envelopes.py
YangXiaoo/NoteBook
37056acad7a05b876832f72ac34d3d1a41e0dd22
[ "CNRI-Python", "RSA-MD", "CECILL-B" ]
28
2019-08-11T01:25:00.000Z
2021-08-22T06:46:06.000Z
# coding:utf-8 """ 354. Russian Doll Envelopes Hard You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and height of one envelope is greater than the width and height of the other envelope. What is the maximum num...
28.166667
241
0.588429
# coding:utf-8 """ 354. Russian Doll Envelopes Hard You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and height of one envelope is greater than the width and height of the other envelope. What is the maximum num...
0
684
22
a0d071624a641b8d3d124e0d0dd6d997b8e68270
516
py
Python
airflow/dags/jobs/check_stuff.py
PythonBiellaGroup/ModernDataEngineering
369fcb89d119ccd1d73882e492cf7c5331087d20
[ "MIT" ]
null
null
null
airflow/dags/jobs/check_stuff.py
PythonBiellaGroup/ModernDataEngineering
369fcb89d119ccd1d73882e492cf7c5331087d20
[ "MIT" ]
null
null
null
airflow/dags/jobs/check_stuff.py
PythonBiellaGroup/ModernDataEngineering
369fcb89d119ccd1d73882e492cf7c5331087d20
[ "MIT" ]
null
null
null
from airflow.dags.common import config from airflow.models import Variable # Test variables, state and xcom passing values
30.352941
53
0.718992
from airflow.dags.common import config from airflow.models import Variable # Test variables, state and xcom passing values def check_variables(state, ti): print(f"Airflow folder: {config.AIRFLOW_FOLDER}") print(f"Dag folder: {config.DAGS_FOLDER}") print(f"Data folder: {config.DATA_FOLDER}") TESTONE =...
369
0
22
2a3fa0f4a34e1b4883b372e096011db287c9aaa2
2,215
py
Python
pulumi/infra/queue_driven_lambda.py
msilvey/grapl
142dc8068d7955e3e4d24221aa94c236745d5faa
[ "Apache-2.0" ]
null
null
null
pulumi/infra/queue_driven_lambda.py
msilvey/grapl
142dc8068d7955e3e4d24221aa94c236745d5faa
[ "Apache-2.0" ]
null
null
null
pulumi/infra/queue_driven_lambda.py
msilvey/grapl
142dc8068d7955e3e4d24221aa94c236745d5faa
[ "Apache-2.0" ]
null
null
null
import json from typing import Optional import pulumi_aws as aws from infra.lambda_ import Lambda, LambdaArgs from infra.metric_forwarder import MetricForwarder from infra.network import Network import pulumi class QueueDrivenLambda(pulumi.ComponentResource): """ A lambda function that is triggered by an SQS qu...
31.642857
69
0.481716
import json from typing import Optional import pulumi_aws as aws from infra.lambda_ import Lambda, LambdaArgs from infra.metric_forwarder import MetricForwarder from infra.network import Network import pulumi class QueueDrivenLambda(pulumi.ComponentResource): """ A lambda function that is triggered by an SQS qu...
1,859
0
27
285f8ea576a28e6e2a1f1246936420ea2e1c98aa
3,260
py
Python
bot/guildstatseu.py
Limmek/TibiaDiscordBot
b1c8a6eb34ba4d2d9e2e2e1b1f743d5fd9f9beb8
[ "MIT" ]
null
null
null
bot/guildstatseu.py
Limmek/TibiaDiscordBot
b1c8a6eb34ba4d2d9e2e2e1b1f743d5fd9f9beb8
[ "MIT" ]
null
null
null
bot/guildstatseu.py
Limmek/TibiaDiscordBot
b1c8a6eb34ba4d2d9e2e2e1b1f743d5fd9f9beb8
[ "MIT" ]
null
null
null
import asyncio import re import time import datetime import aiohttp from bs4 import BeautifulSoup
45.277778
108
0.476074
import asyncio import re import time import datetime import aiohttp from bs4 import BeautifulSoup class GuildStats: URL_CHARACTER_ONLINE_TIME = "https://guildstats.eu/character?nick={0}#tab2" URL_CHARACTER_EXPERIENCE_CHANGE = "https://guildstats.eu/character?nick={0}#tab7" async def getTimeOnline(name):...
2,921
217
23
895a04ddca579bcf47014c6d25e4539f067f7d4b
4,305
py
Python
internshala_scraper/scrape_internshala_internships.py
tre3x/awesomeScripts
e70cd64eff7791cfac05f069fb9f7037c1bf05bf
[ "MIT" ]
245
2020-09-24T03:49:20.000Z
2021-01-31T20:09:57.000Z
internshala_scraper/scrape_internshala_internships.py
tre3x/awesomeScripts
e70cd64eff7791cfac05f069fb9f7037c1bf05bf
[ "MIT" ]
252
2020-09-28T02:19:44.000Z
2021-01-23T09:00:34.000Z
internshala_scraper/scrape_internshala_internships.py
tre3x/awesomeScripts
e70cd64eff7791cfac05f069fb9f7037c1bf05bf
[ "MIT" ]
219
2020-09-23T18:51:42.000Z
2021-01-23T09:54:40.000Z
# This script will scrape all the internships with given url # and create a CSV sheet out of it. # Necessary imports import requests from bs4 import BeautifulSoup import pandas as pd # A dictionary that will initially hold all scraped values scraped_data = { 'heading': [], 'company': [], 'stip...
39.136364
80
0.575145
# This script will scrape all the internships with given url # and create a CSV sheet out of it. # Necessary imports import requests from bs4 import BeautifulSoup import pandas as pd # A dictionary that will initially hold all scraped values scraped_data = { 'heading': [], 'company': [], 'stip...
0
0
0
023bd6855609a18ee78ad27b8d91ed72405263aa
2,104
py
Python
examples/EarthMoon_example.py
c-bruce/pysamss
b37206a39391e370da7ab367087ba3c2b29b1d9f
[ "MIT" ]
1
2020-05-02T18:47:50.000Z
2020-05-02T18:47:50.000Z
examples/EarthMoon_example.py
c-bruce/pysamss
b37206a39391e370da7ab367087ba3c2b29b1d9f
[ "MIT" ]
null
null
null
examples/EarthMoon_example.py
c-bruce/pysamss
b37206a39391e370da7ab367087ba3c2b29b1d9f
[ "MIT" ]
null
null
null
# Date: 24/06/2019 # Author: Callum Bruce # Earth, Moon example. # To run, ensure 'de430.bsp' is downloaded to the working directory. See https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/. import numpy as np from mayavi import mlab import datetime from jplephem.spk import SPK import pysamss # Step 1: Set...
41.254902
137
0.761882
# Date: 24/06/2019 # Author: Callum Bruce # Earth, Moon example. # To run, ensure 'de430.bsp' is downloaded to the working directory. See https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/. import numpy as np from mayavi import mlab import datetime from jplephem.spk import SPK import pysamss # Step 1: Set...
0
0
0
b1c2566c53846ce73cab8ad0f9f8c89def74b926
1,331
py
Python
tests/vasya_clerk_test.py
ibotdotout/coe-pairing
1a390ca3d07801c98a53de92722981c9697cd68c
[ "MIT" ]
null
null
null
tests/vasya_clerk_test.py
ibotdotout/coe-pairing
1a390ca3d07801c98a53de92722981c9697cd68c
[ "MIT" ]
null
null
null
tests/vasya_clerk_test.py
ibotdotout/coe-pairing
1a390ca3d07801c98a53de92722981c9697cd68c
[ "MIT" ]
null
null
null
# http://www.codewars.com/kata/vasya-clerk/python import unittest import vasya_clerk
25.596154
52
0.640872
# http://www.codewars.com/kata/vasya-clerk/python import unittest import vasya_clerk class VasyaClerkTest(unittest.TestCase): def _help_assert(self, l, ans): result = vasya_clerk.solve(l) self.assertEqual(result, ans) def test_give_25_should_be_true(self): l = [25] self._hel...
905
19
320
34d48f4d94de429ca01e535a91927728d1c23f24
6,251
py
Python
kbsbot/compose_engine/services.py
astandre/cb-compose-engine-ms
ed4141f57dcb544743fd17fe62001d573ae1efc9
[ "MIT" ]
null
null
null
kbsbot/compose_engine/services.py
astandre/cb-compose-engine-ms
ed4141f57dcb544743fd17fe62001d573ae1efc9
[ "MIT" ]
null
null
null
kbsbot/compose_engine/services.py
astandre/cb-compose-engine-ms
ed4141f57dcb544743fd17fe62001d573ae1efc9
[ "MIT" ]
null
null
null
from requests import Session import requests import os # NLP_ENGINE_URL = "http://127.0.0.1:5001" # INTENTS_MANAGMENT_URL = "http://127.0.0.1:5002" # CONTEXT_MANAGMENT_URL = "http://127.0.0.1:5003" NLP_ENGINE_URL = os.environ.get('NLP_ENGINE_URL') INTENTS_MANAGMENT_URL = os.environ.get('INTENTS_MANAGMENT_URL') CONTEX...
31.099502
123
0.614782
from requests import Session import requests import os # NLP_ENGINE_URL = "http://127.0.0.1:5001" # INTENTS_MANAGMENT_URL = "http://127.0.0.1:5002" # CONTEXT_MANAGMENT_URL = "http://127.0.0.1:5003" NLP_ENGINE_URL = os.environ.get('NLP_ENGINE_URL') INTENTS_MANAGMENT_URL = os.environ.get('INTENTS_MANAGMENT_URL') CONTEX...
0
0
0
5cb5f8aa1715886be25dc44d316e33365e638c31
3,350
py
Python
2019/day12.py
cy2000yadav/AdventOfCode
41bc7df9e2c396883fed78369d9aac961bffb7a2
[ "MIT" ]
2
2019-12-03T20:23:09.000Z
2020-08-28T10:46:18.000Z
2019/day12.py
cy2000yadav/AdventOfCode
41bc7df9e2c396883fed78369d9aac961bffb7a2
[ "MIT" ]
null
null
null
2019/day12.py
cy2000yadav/AdventOfCode
41bc7df9e2c396883fed78369d9aac961bffb7a2
[ "MIT" ]
1
2021-10-30T07:27:54.000Z
2021-10-30T07:27:54.000Z
import re if __name__ == '__main__': main()
24.100719
83
0.453134
import re class moon: def __init__(self, x,y,z): self.x = x self.y = y self.z = z self.v_x = 0 self.v_y = 0 self.v_z = 0 def printMoon(moon, vel = True): p = 'pos=<x='+ str(moon.x) +', y='+ str(moon.y) +', z='+ str(moon.z) +'>, ' v = 'vel=<x...
3,033
-10
262
6044864d1133c9dd0d3f7f6ba4e574fd2ebbb87e
4,721
py
Python
lib/bx/intervals/operations/join.py
lldelisle/bx-python
19ab41e0905221e3fcaaed4b74faf2d7cda0d15a
[ "MIT" ]
122
2015-07-01T12:00:22.000Z
2022-03-02T09:27:35.000Z
lib/bx/intervals/operations/join.py
lldelisle/bx-python
19ab41e0905221e3fcaaed4b74faf2d7cda0d15a
[ "MIT" ]
64
2015-11-06T21:03:18.000Z
2022-03-24T00:55:27.000Z
lib/bx/intervals/operations/join.py
lldelisle/bx-python
19ab41e0905221e3fcaaed4b74faf2d7cda0d15a
[ "MIT" ]
60
2015-10-05T19:19:36.000Z
2021-11-19T20:53:54.000Z
""" Join two sets of intervals using their overlap as the key. The intervals MUST be sorted by chrom(lexicographically), start(arithmetically) and end(arithmetically). This works by simply walking through the inputs in O(n) time. """ import math from bx.intervals.io import GenomicInterval from .quicksect import Int...
34.459854
131
0.577632
""" Join two sets of intervals using their overlap as the key. The intervals MUST be sorted by chrom(lexicographically), start(arithmetically) and end(arithmetically). This works by simply walking through the inputs in O(n) time. """ import math from bx.intervals.io import GenomicInterval from .quicksect import Int...
4,295
0
92
1ac6b2322d59bfa2eb8a3dbb827a17195caeabba
17,176
py
Python
src/agents.py
NeiH2304/ProCon_ver_4
a51604bc8b1510971d981a1d0f06b9d3ff8494aa
[ "MIT" ]
null
null
null
src/agents.py
NeiH2304/ProCon_ver_4
a51604bc8b1510971d981a1d0f06b9d3ff8494aa
[ "MIT" ]
null
null
null
src/agents.py
NeiH2304/ProCon_ver_4
a51604bc8b1510971d981a1d0f06b9d3ff8494aa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 5 09:45:45 2020 @author: hien """ import numpy as np import torch from src.deep_q_network import Critic, Actor from src.replay_memory import ReplayBuffer from random import random, randint, choices, uniform from src import utils from src.utils impo...
39.667436
122
0.566546
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 5 09:45:45 2020 @author: hien """ import numpy as np import torch from src.deep_q_network import Critic, Actor from src.replay_memory import ReplayBuffer from random import random, randint, choices, uniform from src import utils from src.utils impo...
11,870
4,781
23
77918520b9533f590cf62fc821c8eb5d72734baa
3,413
py
Python
deploy/templatetags/myinclusion.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
3
2019-05-06T06:44:43.000Z
2020-06-10T00:54:43.000Z
deploy/templatetags/myinclusion.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
1
2017-07-11T11:36:54.000Z
2017-07-11T11:42:23.000Z
deploy/templatetags/myinclusion.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf8 ''' @author: qitan @contact: qqing_lai@hotmail.com @file: myinclusion.py @time: 2017/3/30 15:32 @desc: ''' from django import template from django.db.models import Q from deploy.models import * from userauth.models import * register = template.Library() def show_single_minions(...
33.460784
111
0.64811
#!/usr/bin/env python # coding: utf8 ''' @author: qitan @contact: qqing_lai@hotmail.com @file: myinclusion.py @time: 2017/3/30 15:32 @desc: ''' from django import template from django.db.models import Q from deploy.models import * from userauth.models import * register = template.Library() def show_single_minions(...
0
0
0
8161a40448432ddb98fa8a8eb4bb1ff893aeeaab
6,208
py
Python
evaluation/old_compare/compare_combined_sift.py
tilman/compositional_elements
45271196ed01d0515357c7abdf35d6b87f2036d5
[ "MIT" ]
2
2021-06-13T16:21:52.000Z
2021-06-13T16:21:53.000Z
evaluation/old_compare/compare_combined_sift.py
tilman/compositional_elements
45271196ed01d0515357c7abdf35d6b87f2036d5
[ "MIT" ]
null
null
null
evaluation/old_compare/compare_combined_sift.py
tilman/compositional_elements
45271196ed01d0515357c7abdf35d6b87f2036d5
[ "MIT" ]
null
null
null
# call this script with `python -m evaluation.evaluate_poselines_globalaction` import numpy as np from numpy.core.fromnumeric import sort import pandas as pd import datetime import torch from torch.functional import norm from tqdm import tqdm from . import eval_utils import cv2 from .compare_deepfeatures import negati...
50.064516
167
0.716173
# call this script with `python -m evaluation.evaluate_poselines_globalaction` import numpy as np from numpy.core.fromnumeric import sort import pandas as pd import datetime import torch from torch.functional import norm from tqdm import tqdm from . import eval_utils import cv2 from .compare_deepfeatures import negati...
5,235
0
206
8ac1f16bfc18ec92e12b019d710e5fda17c7d467
2,487
py
Python
train.py
zhoufengfan/light-weight-network
14b9c4c8f3660a249344837beff80cc573cab167
[ "MIT" ]
null
null
null
train.py
zhoufengfan/light-weight-network
14b9c4c8f3660a249344837beff80cc573cab167
[ "MIT" ]
null
null
null
train.py
zhoufengfan/light-weight-network
14b9c4c8f3660a249344837beff80cc573cab167
[ "MIT" ]
null
null
null
import torch.autograd import torch.nn as nn from dataset import Dataset2 if __name__ == '__main__': num_epoch = 500 data_vector_dim = 20 item_of_single_class = 10 train_dataset = Dataset2(item_of_single_class=item_of_single_class, data_vector_dim=data_vector_dim) test_dataset = Datas...
32.298701
105
0.599115
import torch.autograd import torch.nn as nn from dataset import Dataset2 class Network2(nn.Module): def __init__(self, input_dim=20, output_dim=7): super(Network2, self).__init__() self.dis = nn.Sequential( nn.Linear(input_dim, 256), nn.ReLU(True), nn...
908
5
106
a715ff7e13069bece07342b123a7c161f5c6dfa4
10,950
py
Python
taxonresolver/tree.py
biomadeira/taxonomy-resolver
ce7a264c2b8b552dde6284b4a74821184be8e489
[ "Apache-2.0" ]
null
null
null
taxonresolver/tree.py
biomadeira/taxonomy-resolver
ce7a264c2b8b552dde6284b4a74821184be8e489
[ "Apache-2.0" ]
null
null
null
taxonresolver/tree.py
biomadeira/taxonomy-resolver
ce7a264c2b8b552dde6284b4a74821184be8e489
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 """ Taxonomy Resolver :copyright: (c) 2020-2021. :license: Apache 2.0, see LICENSE for more details. """ import io import zipfile import pandas as pd from taxonresolver.utils import parse_tax_ids from taxonresolver.utils import print_and_exit from taxonresolver.utils import...
38.69258
109
0.652968
#!/usr/bin/env python # -*- coding: utf-8 """ Taxonomy Resolver :copyright: (c) 2020-2021. :license: Apache 2.0, see LICENSE for more details. """ import io import zipfile import pandas as pd from taxonresolver.utils import parse_tax_ids from taxonresolver.utils import print_and_exit from taxonresolver.utils import...
107
1,605
23
5f8bc16102c8897c15c05a69fddf50e1bfd1254d
5,205
py
Python
Code/Server/game/chunkthread.py
Abrasam/Part-II-Project
bf2ac2c8a9a87859ad9fb189405d7ce76e19a8f4
[ "MIT" ]
1
2020-06-16T08:48:26.000Z
2020-06-16T08:48:26.000Z
Code/Server/game/chunkthread.py
Abrasam/Voxel-Populi
bf2ac2c8a9a87859ad9fb189405d7ce76e19a8f4
[ "MIT" ]
null
null
null
Code/Server/game/chunkthread.py
Abrasam/Voxel-Populi
bf2ac2c8a9a87859ad9fb189405d7ce76e19a8f4
[ "MIT" ]
null
null
null
import json import threading import time import datetime import socket import asyncio from collections import deque from queue import Empty, Queue from game.const import * from game.world import Chunk from kademlia.server import DHTServer
33.365385
143
0.559078
import json import threading import time import datetime import socket import asyncio from collections import deque from queue import Empty, Queue from game.const import * from game.world import Chunk from kademlia.server import DHTServer class ChunkThread(threading.Thread): def __init__(self, dht : DHTServer, c...
4,394
-9
574
58c3911c166eeff3145b577b0906f6c294f5e653
2,521
py
Python
Train/diTau_reference.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
null
null
null
Train/diTau_reference.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
null
null
null
Train/diTau_reference.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
null
null
null
import os os.environ['DECORRELATE'] = "False" from DeepJetCore.training.training_base import training_base from Losses import loss_NLL, loss_meansquared from DeepJetCore.modeltools import fixLayersContaining,printLayerInfosAndWeights import subprocess import tensorflow as tf from keras import backend as k config ...
34.534247
102
0.582705
import os os.environ['DECORRELATE'] = "False" from DeepJetCore.training.training_base import training_base from Losses import loss_NLL, loss_meansquared from DeepJetCore.modeltools import fixLayersContaining,printLayerInfosAndWeights import subprocess import tensorflow as tf from keras import backend as k config ...
0
0
0
91afaf07d2c3f534c87bada2ba28c2ee786e9072
583
py
Python
Projects/Face Detection/main.py
tejas4m/Hacktoberfest2021
d90e6bc8d5ba74a9064992fe9b6f73d7cb2c4a10
[ "MIT" ]
18
2021-09-30T07:20:25.000Z
2021-10-19T07:19:56.000Z
Projects/Face Detection/main.py
tejas4m/Hacktoberfest2021
d90e6bc8d5ba74a9064992fe9b6f73d7cb2c4a10
[ "MIT" ]
94
2021-10-01T12:41:41.000Z
2021-11-01T03:31:27.000Z
Projects/Face Detection/main.py
tejas4m/Hacktoberfest2021
d90e6bc8d5ba74a9064992fe9b6f73d7cb2c4a10
[ "MIT" ]
56
2021-09-30T12:03:02.000Z
2021-10-19T09:51:52.000Z
import cv2 cv2.namedWindow("test") cv2.namedWindow("test1") cam = cv2.VideoCapture(0) detector = cv2.CascadeClassifier("haarcascade_frontalface_alt.xml") while True: temp , frame = cam.read() if not temp: break; faces = detector.detectMultiScale(frame) cv2.imshow("test1" , frame) for face in...
26.5
72
0.61578
import cv2 cv2.namedWindow("test") cv2.namedWindow("test1") cam = cv2.VideoCapture(0) detector = cv2.CascadeClassifier("haarcascade_frontalface_alt.xml") while True: temp , frame = cam.read() if not temp: break; faces = detector.detectMultiScale(frame) cv2.imshow("test1" , frame) for face in...
0
0
0
5f5babe057438b85c0ec6c63603d46c40e7910fc
4,608
py
Python
ds_cleaning_funcs.py
AlirezaFallahii/sufficient-forecasting
802a19c7a00c9a60036d8949c65e77a654f371f3
[ "MIT" ]
1
2020-11-28T10:41:42.000Z
2020-11-28T10:41:42.000Z
ds_cleaning_funcs.py
AlirezaFallahii/sufficient-forecasting
802a19c7a00c9a60036d8949c65e77a654f371f3
[ "MIT" ]
null
null
null
ds_cleaning_funcs.py
AlirezaFallahii/sufficient-forecasting
802a19c7a00c9a60036d8949c65e77a654f371f3
[ "MIT" ]
null
null
null
import pandas as pd def assess_NA(data): """ Returns a pandas dataframe denoting the total number of NA values and the percentage of NA values in each column. The column names are noted on the index. Parameters ---------- data: dataframe """ # pandas series denoting f...
42.275229
80
0.588976
import pandas as pd def assess_NA(data): """ Returns a pandas dataframe denoting the total number of NA values and the percentage of NA values in each column. The column names are noted on the index. Parameters ---------- data: dataframe """ # pandas series denoting f...
3,647
0
25
3ed234bdad8a229ef1d7c5b2cc8bcd7c6168eed3
462
py
Python
pyetltools/tools/test.py
aborecki/pyetltools
ff97ed4b1b6d98ab6b73eded9368e3e2aaf65809
[ "MIT" ]
null
null
null
pyetltools/tools/test.py
aborecki/pyetltools
ff97ed4b1b6d98ab6b73eded9368e3e2aaf65809
[ "MIT" ]
null
null
null
pyetltools/tools/test.py
aborecki/pyetltools
ff97ed4b1b6d98ab6b73eded9368e3e2aaf65809
[ "MIT" ]
null
null
null
import colored
46.2
102
0.623377
import colored def test(value, expected_value, message ): if value == expected_value: print(colored.attr("bold") + colored.bg("green") + "TEST OK: "+message+colored.attr(0)) else: print(colored.attr("bold") + colored.bg("red") + "TEST FAILED: "+message+colored.attr(0)) print(colored.at...
426
0
22
b955eece982c8d7627d37e20b41ef5826c9b8edb
102
py
Python
cap9/ex7/main1.py
felipesch92/livroPython
061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307
[ "MIT" ]
null
null
null
cap9/ex7/main1.py
felipesch92/livroPython
061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307
[ "MIT" ]
null
null
null
cap9/ex7/main1.py
felipesch92/livroPython
061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307
[ "MIT" ]
null
null
null
l = [['felipe', 99], ['tamara', 50], ['fernando', 60]] l1 = sorted(l) l = sorted(l) print(l) print(l1)
20.4
54
0.558824
l = [['felipe', 99], ['tamara', 50], ['fernando', 60]] l1 = sorted(l) l = sorted(l) print(l) print(l1)
0
0
0
6092cfc32f268455d15a9ad5964aebd238cb3f73
16,171
py
Python
se/commands/interactive_replace.py
thewchan/tools
bb9ac50c8d48fd43745d04b4c994ab0af5ef3fba
[ "CC0-1.0" ]
1
2021-07-25T03:29:10.000Z
2021-07-25T03:29:10.000Z
se/commands/interactive_replace.py
robinwhittleton/tools
60777eb152e346124ad9646ddd1c3307b7ed7f0c
[ "CC0-1.0" ]
null
null
null
se/commands/interactive_replace.py
robinwhittleton/tools
60777eb152e346124ad9646ddd1c3307b7ed7f0c
[ "CC0-1.0" ]
null
null
null
""" This module implements the `se interactive-replace` command. """ import argparse import curses from pathlib import Path import os from math import floor from typing import Tuple import regex import se TAB_SIZE = 8 def _get_text_dimensions(text: str) -> Tuple[int, int]: """ Get the number of rows and column...
34.776344
524
0.704595
""" This module implements the `se interactive-replace` command. """ import argparse import curses from pathlib import Path import os from math import floor from typing import Tuple import regex import se TAB_SIZE = 8 def _get_text_dimensions(text: str) -> Tuple[int, int]: """ Get the number of rows and column...
0
0
0
4e0426cc0a9642d982176a0f7602c3aeb0fde250
216
py
Python
edge/graphics.py
lucasdavid/edge
c7d9cf7e2803cc8d49abbe3ddb9f16eb130c1b01
[ "MIT" ]
null
null
null
edge/graphics.py
lucasdavid/edge
c7d9cf7e2803cc8d49abbe3ddb9f16eb130c1b01
[ "MIT" ]
null
null
null
edge/graphics.py
lucasdavid/edge
c7d9cf7e2803cc8d49abbe3ddb9f16eb130c1b01
[ "MIT" ]
null
null
null
default_style = { 'alpha': .6, 'width': 1, 'node_size': 100, 'node_color': '#2EB1E6', 'edge_color': '#cccccc', } solution_style = default_style.copy() solution_style.update(node_color='#ff0000')
19.636364
43
0.62963
default_style = { 'alpha': .6, 'width': 1, 'node_size': 100, 'node_color': '#2EB1E6', 'edge_color': '#cccccc', } solution_style = default_style.copy() solution_style.update(node_color='#ff0000')
0
0
0
d9548d88c801008eefb74d6391427687fe7c335b
2,086
py
Python
server2/migrations/versions/bff862ed6870_.py
Terkea/beds-uni-hackathon-4-notes
db351b2053be5e9568d731006fd2af7002a40ca0
[ "MIT" ]
null
null
null
server2/migrations/versions/bff862ed6870_.py
Terkea/beds-uni-hackathon-4-notes
db351b2053be5e9568d731006fd2af7002a40ca0
[ "MIT" ]
1
2019-12-01T13:49:15.000Z
2019-12-01T13:49:15.000Z
server2/migrations/versions/bff862ed6870_.py
Terkea/beds-uni-hackathon-4-notes
db351b2053be5e9568d731006fd2af7002a40ca0
[ "MIT" ]
null
null
null
"""empty message Revision ID: bff862ed6870 Revises: 2ee4f69c4623 Create Date: 2019-11-28 17:42:47.448962 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = 'bff862ed6870' down_revision = '2ee4f69c4623' branch_labels = None depe...
37.25
98
0.691275
"""empty message Revision ID: bff862ed6870 Revises: 2ee4f69c4623 Create Date: 2019-11-28 17:42:47.448962 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = 'bff862ed6870' down_revision = '2ee4f69c4623' branch_labels = None depe...
1,704
0
46
b7d71d0082ed0f850650efd250f61d0670fcc037
19,851
py
Python
python/sklearn/sklearn/metrics/tests/test_metrics.py
seckcoder/lang-learn
1e0d6f412bbd7f89b1af00293fd907ddb3c1b571
[ "Unlicense" ]
1
2017-10-14T04:23:45.000Z
2017-10-14T04:23:45.000Z
python/sklearn/sklearn/metrics/tests/test_metrics.py
seckcoder/lang-learn
1e0d6f412bbd7f89b1af00293fd907ddb3c1b571
[ "Unlicense" ]
null
null
null
python/sklearn/sklearn/metrics/tests/test_metrics.py
seckcoder/lang-learn
1e0d6f412bbd7f89b1af00293fd907ddb3c1b571
[ "Unlicense" ]
null
null
null
import random import warnings import numpy as np from nose.tools import raises, assert_not_equal from nose.tools import assert_true, assert_raises from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_equal from numpy.testing import assert_equal, assert_almost_equal from sklearn i...
35.961957
79
0.660974
import random import warnings import numpy as np from nose.tools import raises, assert_not_equal from nose.tools import assert_true, assert_raises from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_equal from numpy.testing import assert_equal, assert_almost_equal from sklearn i...
5,435
0
299
ea54792c432ac442abc7b1aa8dfe5fd91f8f6a98
148
py
Python
mne/externals/h5io/__init__.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
1,953
2015-01-17T20:33:46.000Z
2022-03-30T04:36:34.000Z
mne/externals/h5io/__init__.py
alexandrebarachant/mne-python
b54e38c9bbac38c6f53747075b5bad2936fbc5b9
[ "BSD-3-Clause" ]
8,490
2015-01-01T13:04:18.000Z
2022-03-31T23:02:08.000Z
mne/externals/h5io/__init__.py
alexandrebarachant/mne-python
b54e38c9bbac38c6f53747075b5bad2936fbc5b9
[ "BSD-3-Clause" ]
1,130
2015-01-08T22:39:27.000Z
2022-03-30T21:44:26.000Z
"""Python Objects Onto HDF5 """ __version__ = '0.1.dev0' from ._h5io import read_hdf5, write_hdf5, _TempDir, object_diff # noqa, analysis:ignore
21.142857
88
0.736486
"""Python Objects Onto HDF5 """ __version__ = '0.1.dev0' from ._h5io import read_hdf5, write_hdf5, _TempDir, object_diff # noqa, analysis:ignore
0
0
0
c5864362375a81a891800b2885457459c5fea69d
85
py
Python
src/dal_select2/__init__.py
pandabuilder/django-autocomplete-light
41f699aadaa6214acd5d947b717394b1237a7223
[ "MIT" ]
null
null
null
src/dal_select2/__init__.py
pandabuilder/django-autocomplete-light
41f699aadaa6214acd5d947b717394b1237a7223
[ "MIT" ]
null
null
null
src/dal_select2/__init__.py
pandabuilder/django-autocomplete-light
41f699aadaa6214acd5d947b717394b1237a7223
[ "MIT" ]
null
null
null
"""Select2 support for DAL.""" # default_app_config = 'dal_select2.apps.DefaultApp'
21.25
52
0.741176
"""Select2 support for DAL.""" # default_app_config = 'dal_select2.apps.DefaultApp'
0
0
0
f3c95dfe7fb1b5c254dd15bc2c564d79d8da83f3
2,207
py
Python
whatisit/apps/wordfish/storage.py
radinformatics/whatisit
9cfc8924b722678d3b2ca7e5ad77b9254fcb93f3
[ "MIT" ]
1
2021-06-08T11:08:09.000Z
2021-06-08T11:08:09.000Z
whatisit/apps/wordfish/storage.py
radinformatics/whatisit
9cfc8924b722678d3b2ca7e5ad77b9254fcb93f3
[ "MIT" ]
24
2016-10-21T00:55:30.000Z
2017-01-05T03:13:57.000Z
whatisit/apps/wordfish/storage.py
radinformatics/whatisit
9cfc8924b722678d3b2ca7e5ad77b9254fcb93f3
[ "MIT" ]
null
null
null
from django.core.files.storage import FileSystemStorage from django.core.files.move import file_move_safe from django.contrib.auth.models import User from django.apps import apps from fnmatch import fnmatch from whatisit.settings import ( MEDIA_ROOT, MEDIA_URL ) import errno import itertools import os import...
33.953846
89
0.599003
from django.core.files.storage import FileSystemStorage from django.core.files.move import file_move_safe from django.contrib.auth.models import User from django.apps import apps from fnmatch import fnmatch from whatisit.settings import ( MEDIA_ROOT, MEDIA_URL ) import errno import itertools import os import...
857
748
99
1b7aec803c3ee90240e793dbd50f96641ada4856
1,511
py
Python
tests/test_season_helper.py
BookWorm0103/the-blue-alliance
39b2f33531308b19218d58c726d51f020ee9d8b5
[ "MIT" ]
null
null
null
tests/test_season_helper.py
BookWorm0103/the-blue-alliance
39b2f33531308b19218d58c726d51f020ee9d8b5
[ "MIT" ]
null
null
null
tests/test_season_helper.py
BookWorm0103/the-blue-alliance
39b2f33531308b19218d58c726d51f020ee9d8b5
[ "MIT" ]
null
null
null
import unittest2 from datetime import date, datetime from helpers.season_helper import SeasonHelper
45.787879
83
0.690933
import unittest2 from datetime import date, datetime from helpers.season_helper import SeasonHelper class TestSeasonHelper(unittest2.TestCase): def test_kickoff_date(self): # 2011 - Saturday the 8th (https://en.wikipedia.org/wiki/Logo_Motion) kickoff_2011 = date(2011, 1, 8) self.assertEq...
1,310
22
77
98cd080ca08dc8b93186bc4314378124fcda069e
94
py
Python
zhduan/youtube/apps.py
duanzhiihao/youtubeAnalyzeProject
41ef276812a87d8d9996c5ba0e30edc67317ccc3
[ "MIT" ]
1
2021-05-11T10:29:37.000Z
2021-05-11T10:29:37.000Z
zhduan/youtube/apps.py
duanzhiihao/youtubeAnalyzeProject
41ef276812a87d8d9996c5ba0e30edc67317ccc3
[ "MIT" ]
5
2018-11-02T19:11:58.000Z
2018-12-13T21:06:18.000Z
zhduan/youtube/apps.py
duanzhiihao/youtubeAnalyzeProject
41ef276812a87d8d9996c5ba0e30edc67317ccc3
[ "MIT" ]
1
2018-11-07T20:38:12.000Z
2018-11-07T20:38:12.000Z
from django.apps import AppConfig
15.666667
34
0.712766
from django.apps import AppConfig class YoutubeConfig(AppConfig): name = 'youtube'
0
32
25
b7fe3b4e17563af35e72803a4899fe6bba2f9b9b
3,572
py
Python
speech-processing/voice-activity-detector/task4/code/VADData.py
Vlados09/machine-learning-projects
10129c33b2a1bbde68f702c434f46cfd49ed6a56
[ "MIT" ]
1
2020-08-29T21:28:49.000Z
2020-08-29T21:28:49.000Z
speech-processing/voice-activity-detector/task4/code/VADData.py
Vlados09/machine-learning-projects
10129c33b2a1bbde68f702c434f46cfd49ed6a56
[ "MIT" ]
null
null
null
speech-processing/voice-activity-detector/task4/code/VADData.py
Vlados09/machine-learning-projects
10129c33b2a1bbde68f702c434f46cfd49ed6a56
[ "MIT" ]
null
null
null
import os import numpy as np from sklearn.utils import shuffle
30.271186
98
0.68785
import os import numpy as np from sklearn.utils import shuffle class VADData: def __init__(self, config, pars, options, scale=True): folders = config['folders'] self.data_folder = folders['data_folder'] self.label_folder = folders['label_folder'] self.data_use = config['general']['data_size'] model...
3,301
185
23
f5840ddd768bf8711a9fb5c49a430be015c29d82
704
py
Python
script/generate_header.py
Liby99/Rotamina
47a588b7e4674d3ab20d9d7afc43b25c7e0fa304
[ "MIT" ]
5
2018-01-30T02:11:12.000Z
2021-08-25T09:01:12.000Z
script/generate_header.py
Liby99/Rotamina
47a588b7e4674d3ab20d9d7afc43b25c7e0fa304
[ "MIT" ]
null
null
null
script/generate_header.py
Liby99/Rotamina
47a588b7e4674d3ab20d9d7afc43b25c7e0fa304
[ "MIT" ]
null
null
null
import os, sys name = sys.argv[1] root_dir = sys.argv[2] header_dir = os.path.join(root_dir, name) if not os.path.exists(header_dir): os.makedirs(header_dir) files = [] dirs = [("", root_dir)] for i in range(4): subdirs = [] for (p, d) in dirs: files = files + [os.path.join(p, item) for item in os.l...
37.052632
134
0.612216
import os, sys name = sys.argv[1] root_dir = sys.argv[2] header_dir = os.path.join(root_dir, name) if not os.path.exists(header_dir): os.makedirs(header_dir) files = [] dirs = [("", root_dir)] for i in range(4): subdirs = [] for (p, d) in dirs: files = files + [os.path.join(p, item) for item in os.l...
0
0
0
717cb0b8bf9357cc97762908fa917f8f585a6a17
2,186
py
Python
cogs/reactions/reactions.py
n303p4/sailor-fox
5c7b1077414916bd3ecacd8089a81a10efe7f43b
[ "MIT" ]
null
null
null
cogs/reactions/reactions.py
n303p4/sailor-fox
5c7b1077414916bd3ecacd8089a81a10efe7f43b
[ "MIT" ]
null
null
null
cogs/reactions/reactions.py
n303p4/sailor-fox
5c7b1077414916bd3ecacd8089a81a10efe7f43b
[ "MIT" ]
null
null
null
"""Generic reaction image commands.""" import json import secrets from sailor import commands from sailor.exceptions import UserInputError def setup(processor): """Set up reaction commands.""" with open("reactions.json") as file_object: reactions = json.load(file_object) last_image_for_command...
37.689655
93
0.631747
"""Generic reaction image commands.""" import json import secrets from sailor import commands from sailor.exceptions import UserInputError def setup(processor): """Set up reaction commands.""" with open("reactions.json") as file_object: reactions = json.load(file_object) last_image_for_command...
0
0
0
4359992c7bf4243dc799de8de7f398d1f743e2a6
9,122
py
Python
moldesign/utils/callsigs.py
Autodesk/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
147
2016-07-15T18:53:55.000Z
2022-01-30T04:36:39.000Z
moldesign/utils/callsigs.py
cherishyli/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
151
2016-07-15T21:35:11.000Z
2019-10-10T08:57:29.000Z
moldesign/utils/callsigs.py
cherishyli/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
33
2016-08-02T00:04:51.000Z
2021-09-02T10:05:04.000Z
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
35.220077
100
0.629358
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
2,599
0
184
e378dff356b7c9a889df6eeb44f8e9b82bcceb8c
3,933
py
Python
phonebox_plugin/views.py
Xeizzeth/phonebox_plugin
b4e2f6ac04203b25e78292ad2bc98a490645ff47
[ "MIT" ]
38
2021-02-07T20:54:12.000Z
2022-02-21T19:18:17.000Z
phonebox_plugin/views.py
Xeizzeth/phonebox_plugin
b4e2f6ac04203b25e78292ad2bc98a490645ff47
[ "MIT" ]
13
2021-04-19T15:25:31.000Z
2022-03-12T18:04:38.000Z
phonebox_plugin/views.py
Xeizzeth/phonebox_plugin
b4e2f6ac04203b25e78292ad2bc98a490645ff47
[ "MIT" ]
15
2021-02-22T11:26:30.000Z
2022-03-23T12:37:27.000Z
#!./venv/bin/python from netbox.views import generic from .models import Number, VoiceCircuit from . import filters from . import forms from . import tables from django.conf import settings from packaging import version NETBOX_CURRENT_VERSION = version.parse(settings.VERSION)
32.775
74
0.764811
#!./venv/bin/python from netbox.views import generic from .models import Number, VoiceCircuit from . import filters from . import forms from . import tables from django.conf import settings from packaging import version NETBOX_CURRENT_VERSION = version.parse(settings.VERSION) class NumberListView(generic.ObjectLi...
0
3,316
322
7067196f7b2063ce74384bb490b01db8a2ee09fd
3,985
py
Python
protogenerator/core/descriptors/enum_descriptor.py
googleinterns/schemaorg-generator
12b7f41856a8b4a3480d310e8c3f2e97e747efac
[ "Apache-2.0" ]
null
null
null
protogenerator/core/descriptors/enum_descriptor.py
googleinterns/schemaorg-generator
12b7f41856a8b4a3480d310e8c3f2e97e747efac
[ "Apache-2.0" ]
null
null
null
protogenerator/core/descriptors/enum_descriptor.py
googleinterns/schemaorg-generator
12b7f41856a8b4a3480d310e8c3f2e97e747efac
[ "Apache-2.0" ]
1
2020-10-29T16:22:43.000Z
2020-10-29T16:22:43.000Z
# Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
36.559633
109
0.635885
# Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
796
0
27
be50cf2d47abb25ac1d35571a413795ba331c594
13,536
py
Python
grow/pods/static.py
matthiasrohmer/grow
88fae5026040ad0f7dd9260ee290cebbe49b39d7
[ "MIT" ]
null
null
null
grow/pods/static.py
matthiasrohmer/grow
88fae5026040ad0f7dd9260ee290cebbe49b39d7
[ "MIT" ]
null
null
null
grow/pods/static.py
matthiasrohmer/grow
88fae5026040ad0f7dd9260ee290cebbe49b39d7
[ "MIT" ]
null
null
null
from . import controllers from . import messages from grow.common import urls from grow.translations import locales from datetime import datetime import fnmatch import hashlib import mimetypes import os import re import time import webob import yaml mimetypes.add_type('application/font-woff', '.woff') mimetypes.add_ty...
42.168224
110
0.594046
from . import controllers from . import messages from grow.common import urls from grow.translations import locales from datetime import datetime import fnmatch import hashlib import mimetypes import os import re import time import webob import yaml mimetypes.add_type('application/font-woff', '.woff') mimetypes.add_ty...
11,948
815
114
ed5dc7fbe5d1853866769daf83a8fd0e7b5abc65
1,893
py
Python
tests/trestle/core/models/write_action_test.py
PritamDutt/compliance-trestle
7edadde2bd2949e73a085bd78ef57995250fc9cb
[ "Apache-2.0" ]
null
null
null
tests/trestle/core/models/write_action_test.py
PritamDutt/compliance-trestle
7edadde2bd2949e73a085bd78ef57995250fc9cb
[ "Apache-2.0" ]
null
null
null
tests/trestle/core/models/write_action_test.py
PritamDutt/compliance-trestle
7edadde2bd2949e73a085bd78ef57995250fc9cb
[ "Apache-2.0" ]
null
null
null
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 IBM Corp. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # ...
33.803571
75
0.743265
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 IBM Corp. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # ...
0
0
0
6a8219fb862a4d1c6fba9135a0bfd9620b4f8a37
1,650
py
Python
ripcord/api/__init__.py
kickstandproject/ripcord
6a9a59df834f08dad001a8439447ed4b699639ed
[ "Apache-2.0" ]
1
2016-03-26T21:30:17.000Z
2016-03-26T21:30:17.000Z
ripcord/api/__init__.py
kickstandproject/ripcord
6a9a59df834f08dad001a8439447ed4b699639ed
[ "Apache-2.0" ]
null
null
null
ripcord/api/__init__.py
kickstandproject/ripcord
6a9a59df834f08dad001a8439447ed4b699639ed
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 PolyBeacon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
35.869565
74
0.631515
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 PolyBeacon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
0
0
0
164cf8647016545d99d548afb98795e57792cae8
1,756
py
Python
noxfile.py
lewoudar/configuror
21cc768ca7548e193c3e585491c2b0fd86b49f3c
[ "Apache-2.0" ]
2
2020-04-24T16:24:19.000Z
2021-12-26T02:28:55.000Z
noxfile.py
lewoudar/configuror
21cc768ca7548e193c3e585491c2b0fd86b49f3c
[ "Apache-2.0" ]
8
2019-11-08T14:12:43.000Z
2020-01-05T16:51:30.000Z
noxfile.py
lewoudar/configuror
21cc768ca7548e193c3e585491c2b0fd86b49f3c
[ "Apache-2.0" ]
null
null
null
import os import shutil import nox nox.options.reuse_existing_virtualenvs = True PYTHON_VERSIONS = ['3.6', '3.7', '3.8'] @nox.session(python=PYTHON_VERSIONS[-1]) def lint(session): """Performs pep8 and security checks.""" source_code = 'configuror' session.install('flake8==3.7.9', 'bandit==1.6.2') ...
27.015385
86
0.665148
import os import shutil import nox nox.options.reuse_existing_virtualenvs = True PYTHON_VERSIONS = ['3.6', '3.7', '3.8'] @nox.session(python=PYTHON_VERSIONS[-1]) def lint(session): """Performs pep8 and security checks.""" source_code = 'configuror' session.install('flake8==3.7.9', 'bandit==1.6.2') ...
0
0
0
a04c09a2067d2cdebbbd76490ba595924d663536
26,488
py
Python
QUANTAXIS_Test/mytest.py
xixigaga/QUANTAXIS
6f8e7aaa976d4e4072c96ede747e07d56618f53e
[ "MIT" ]
null
null
null
QUANTAXIS_Test/mytest.py
xixigaga/QUANTAXIS
6f8e7aaa976d4e4072c96ede747e07d56618f53e
[ "MIT" ]
3
2020-10-24T03:56:06.000Z
2021-10-18T03:48:28.000Z
QUANTAXIS_Test/mytest.py
xixigaga/QUANTAXIS
6f8e7aaa976d4e4072c96ede747e07d56618f53e
[ "MIT" ]
null
null
null
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2018-2020 azai/Rgveda/GolemQuant # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation...
38.83871
169
0.54923
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2018-2020 azai/Rgveda/GolemQuant # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation...
8,016
166
248
2ba1e362c4cb6e5981ed640f2c5843d95fc6059d
155
py
Python
bayesiancoresets/snnls/__init__.py
trevorcampbell/hilbert-coresets
63354127953a432c0f35087cf5b75166f652a5f5
[ "MIT" ]
118
2018-02-10T21:33:57.000Z
2022-03-22T14:20:53.000Z
bayesiancoresets/snnls/__init__.py
trevorcampbell/hilbert-coresets
63354127953a432c0f35087cf5b75166f652a5f5
[ "MIT" ]
3
2018-09-07T16:13:22.000Z
2020-04-11T14:35:47.000Z
bayesiancoresets/snnls/__init__.py
trevorcampbell/hilbert-coresets
63354127953a432c0f35087cf5b75166f652a5f5
[ "MIT" ]
30
2018-03-11T02:37:55.000Z
2022-01-31T14:51:37.000Z
from .frankwolfe import FrankWolfe from .sampling import ImportanceSampling, UniformSampling from .giga import GIGA from .orthopursuit import OrthoPursuit
31
57
0.858065
from .frankwolfe import FrankWolfe from .sampling import ImportanceSampling, UniformSampling from .giga import GIGA from .orthopursuit import OrthoPursuit
0
0
0
5301e5652125c4c5b4a0f5b510162296ac736436
2,667
py
Python
computer_version/meter_pointer/test_color.py
afterloe/opencv-practice
83d76132d004ebbc96d99d34a0fd3fc37a044f9f
[ "MIT" ]
5
2020-03-13T07:34:30.000Z
2021-10-01T03:03:05.000Z
computer_version/meter_pointer/test_color.py
afterloe/Opencv-practice
83d76132d004ebbc96d99d34a0fd3fc37a044f9f
[ "MIT" ]
null
null
null
computer_version/meter_pointer/test_color.py
afterloe/Opencv-practice
83d76132d004ebbc96d99d34a0fd3fc37a044f9f
[ "MIT" ]
1
2020-03-01T12:35:02.000Z
2020-03-01T12:35:02.000Z
#!/usr/bin/env python3 # -*- coding=utf-8 -*- import cv2 as cv import imutils import time import math import numpy as np """ """ if "__main__" == __name__: main() cv.destroyAllWindows()
32.925926
132
0.55643
#!/usr/bin/env python3 # -*- coding=utf-8 -*- import cv2 as cv import imutils import time import math import numpy as np """ """ def calculate_distance(x1, y1, x2, y2): return np.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) def main(): image = cv.imread("G:\\Project\\opencv-ascs-resources\\...
2,459
0
50
2ae688c1e45c4864cee99bc93db6eb2d51954e98
997
py
Python
PythonExe/ex070.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
PythonExe/ex070.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
PythonExe/ex070.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
#crie um programa que leia o nome e o preço de varios produtos #dever perguntar se o usuário quer continuar, no final mostre: #qual é o total gasto nas compras # quantos produtos custam mais de R$ 1000 #qual o nome do produto mais barato? print('-=-'*10) print(' MERCADÂO BARATO ') print('-=-'*10) preco = 0 m...
28.485714
98
0.622869
#crie um programa que leia o nome e o preço de varios produtos #dever perguntar se o usuário quer continuar, no final mostre: #qual é o total gasto nas compras # quantos produtos custam mais de R$ 1000 #qual o nome do produto mais barato? print('-=-'*10) print(' MERCADÂO BARATO ') print('-=-'*10) preco = 0 m...
0
0
0
c4213ad64416e9f2e14aa285b3ee7be94d395889
3,287
py
Python
smt/tests/test_kpls_auto.py
Laurentww/smt
f124c01ffa78c04b80221dded278a20123dac742
[ "BSD-3-Clause" ]
354
2017-08-15T22:12:58.000Z
2022-03-31T08:34:19.000Z
smt/tests/test_kpls_auto.py
enjoyneer87/smt
4a4df255b9259965439120091007f9852f41523e
[ "BSD-3-Clause" ]
258
2017-08-11T15:08:40.000Z
2022-03-30T09:54:26.000Z
smt/tests/test_kpls_auto.py
enjoyneer87/smt
4a4df255b9259965439120091007f9852f41523e
[ "BSD-3-Clause" ]
184
2017-08-11T14:55:17.000Z
2022-03-17T11:22:50.000Z
""" Author: Paul Saves This package is distributed under New BSD license. """ import numpy as np import unittest import inspect from collections import OrderedDict from smt.problems import Sphere, TensorProduct, Rosenbrock, Branin from smt.sampling_methods import LHS from smt.utils.sm_test_case import SMTestCase ...
25.284615
88
0.583207
""" Author: Paul Saves This package is distributed under New BSD license. """ import numpy as np import unittest import inspect from collections import OrderedDict from smt.problems import Sphere, TensorProduct, Rosenbrock, Branin from smt.sampling_methods import LHS from smt.utils.sm_test_case import SMTestCase ...
2,326
2
238
7dee1721ef5108e82bfc4b3a1e5249cfd7753ebc
6,272
py
Python
thonnycontrib/pyboard/api_stubs/pyb.py
thonny/thonny-pyboard
d967ffe653ef3678ae4ab8ed6a58ca696b47b6a6
[ "MIT" ]
2
2019-04-11T08:21:05.000Z
2020-03-30T20:32:07.000Z
thonnycontrib/pyboard/api_stubs/pyb.py
thonny/thonny-pyboard
d967ffe653ef3678ae4ab8ed6a58ca696b47b6a6
[ "MIT" ]
null
null
null
thonnycontrib/pyboard/api_stubs/pyb.py
thonny/thonny-pyboard
d967ffe653ef3678ae4ab8ed6a58ca696b47b6a6
[ "MIT" ]
1
2019-07-14T19:23:32.000Z
2019-07-14T19:23:32.000Z
class ADC: '' class ADCAll: '' class Accel: '' class ExtInt: '' EVT_FALLING = 270663680 EVT_RISING = 269615104 EVT_RISING_FALLING = 271712256 IRQ_FALLING = 270598144 IRQ_RISING = 269549568 IRQ_RISING_FALLING = 271646720 class Flash: '' class I2C: '' MASTER ...
10.851211
34
0.459343
class ADC: '' def read(): pass def read_timed(): pass def read_timed_multi(): pass class ADCAll: '' def read_channel(): pass def read_core_temp(): pass def read_core_vbat(): pass def read_core_vref(): pass def read_...
696
0
3,945
df2419dd964817e42ac855a45dd5c7a9291c652c
2,115
py
Python
index_auth_service/friends/tests/test_managers.py
Silver3310/Index-auth-service
2dcd71f735f2b160fa0056c0bb752fcad7a84ecd
[ "MIT" ]
1
2022-02-09T02:57:10.000Z
2022-02-09T02:57:10.000Z
index_auth_service/friends/tests/test_managers.py
Silver3310/Index-auth-service
2dcd71f735f2b160fa0056c0bb752fcad7a84ecd
[ "MIT" ]
null
null
null
index_auth_service/friends/tests/test_managers.py
Silver3310/Index-auth-service
2dcd71f735f2b160fa0056c0bb752fcad7a84ecd
[ "MIT" ]
1
2022-02-09T03:03:26.000Z
2022-02-09T03:03:26.000Z
import pytest from django.conf import settings from index_auth_service.friends.models import Friendship from index_auth_service.users.tests.factories import UserFactory from .factories import FriendshipFactory pytestmark = pytest.mark.django_db
26.772152
79
0.640189
import pytest from django.conf import settings from index_auth_service.friends.models import Friendship from index_auth_service.users.tests.factories import UserFactory from .factories import FriendshipFactory pytestmark = pytest.mark.django_db class TestFriendshipManager: def test_find_friends( self, ...
1,702
7
157
557cc8a7aa370fe5c8af45f16078aa56b25e405f
674
py
Python
mesh/reconstruction.py
gavin971/pyro2
55c6d98b9c5d9372badc703ad5deb4a9d2cb8b06
[ "BSD-3-Clause" ]
3
2017-05-24T14:16:49.000Z
2019-01-02T19:21:07.000Z
mesh/reconstruction.py
gavin971/pyro2
55c6d98b9c5d9372badc703ad5deb4a9d2cb8b06
[ "BSD-3-Clause" ]
null
null
null
mesh/reconstruction.py
gavin971/pyro2
55c6d98b9c5d9372badc703ad5deb4a9d2cb8b06
[ "BSD-3-Clause" ]
null
null
null
import mesh.patch as patch import mesh.reconstruction_f as reconstruction_f import mesh.array_indexer as ai
33.7
83
0.626113
import mesh.patch as patch import mesh.reconstruction_f as reconstruction_f import mesh.array_indexer as ai def limit(data, myg, idir, limiter): if limiter < 10: if limiter == 0: limit_func = reconstruction_f.nolimit elif limiter == 1: limit_func = reconstruction_f.limit2 ...
543
0
23
0b1927f39978f94cb677ac03ce285573a8b64c21
320
py
Python
src/os_walk_folder_iterator.py
guionardo/python-folder-iteration
6a3d076d1dee93dcd9e712e78975a9cd35013893
[ "MIT" ]
null
null
null
src/os_walk_folder_iterator.py
guionardo/python-folder-iteration
6a3d076d1dee93dcd9e712e78975a9cd35013893
[ "MIT" ]
null
null
null
src/os_walk_folder_iterator.py
guionardo/python-folder-iteration
6a3d076d1dee93dcd9e712e78975a9cd35013893
[ "MIT" ]
null
null
null
import os from typing import Generator from src.abstract_folder_iterator import FolderIterator
24.615385
55
0.69375
import os from typing import Generator from src.abstract_folder_iterator import FolderIterator class OSWalkFolderIterator(FolderIterator): def _get_files(self, folder: str) -> Generator: for root, _, files in os.walk(folder): for file in files: yield os.path.join(root, file)
151
22
50
ce70a32da7a4765cdeef8eec12e8bade1f28ad59
1,848
py
Python
main/mpv/template.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
null
null
null
main/mpv/template.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
null
null
null
main/mpv/template.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
null
null
null
pkgname = "mpv" pkgver = "0.34.1" pkgrel = 0 build_style = "waf" configure_args = [ "--confdir=/etc/mpv", "--docdir=/usr/share/examples/mpv", "--zshdir=/usr/share/zsh/site-functions", "--enable-libmpv-shared", "--enable-cplugins", "--enable-cdda", "--enable-dvbin", "--enable-dvdnav", "--enable-libarchiv...
40.173913
76
0.666126
pkgname = "mpv" pkgver = "0.34.1" pkgrel = 0 build_style = "waf" configure_args = [ "--confdir=/etc/mpv", "--docdir=/usr/share/examples/mpv", "--zshdir=/usr/share/zsh/site-functions", "--enable-libmpv-shared", "--enable-cplugins", "--enable-cdda", "--enable-dvbin", "--enable-dvdnav", "--enable-libarchiv...
88
0
45
f22df4fc15a7c5e6aa2e77a721d485a5dc92c579
804
py
Python
LeetCode/0515. Find Largest Value in Each Tree Row/solution.py
InnoFang/algorithms
01847903f757722b6c877e1631e5413b9376c82e
[ "Apache-2.0" ]
null
null
null
LeetCode/0515. Find Largest Value in Each Tree Row/solution.py
InnoFang/algorithms
01847903f757722b6c877e1631e5413b9376c82e
[ "Apache-2.0" ]
null
null
null
LeetCode/0515. Find Largest Value in Each Tree Row/solution.py
InnoFang/algorithms
01847903f757722b6c877e1631e5413b9376c82e
[ "Apache-2.0" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right """ 78 / 78 test cases passed. Runtime: 52 ms Memory Usage: 17.6 MB """
26.8
67
0.497512
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right """ 78 / 78 test cases passed. Runtime: 52 ms Memory Usage: 17.6 MB """ class Solution: def largestValues(self, root: Optio...
497
-6
48
b0c0f27cf3bfab65350e69a5ce89c56ac4cad14d
5,911
py
Python
examples/pl_getdata.py
sanduanji/reid_platform
daa410acf5ec96bf4e17fceaeaf5e209e3928307
[ "MIT" ]
null
null
null
examples/pl_getdata.py
sanduanji/reid_platform
daa410acf5ec96bf4e17fceaeaf5e209e3928307
[ "MIT" ]
null
null
null
examples/pl_getdata.py
sanduanji/reid_platform
daa410acf5ec96bf4e17fceaeaf5e209e3928307
[ "MIT" ]
null
null
null
from __future__ import print_function, absolute_import import argparse import os.path as osp import numpy as np import sys import torch from torch import nn from torch.backends import cudnn from torch.utils.data import DataLoader import tkinter as tk from tkinter import ttk import tkinter.font as tkFont from reid imp...
32.838889
82
0.682456
from __future__ import print_function, absolute_import import argparse import os.path as osp import numpy as np import sys import torch from torch import nn from torch.backends import cudnn from torch.utils.data import DataLoader import tkinter as tk from tkinter import ttk import tkinter.font as tkFont from reid imp...
4,849
0
69
8e61a50ed948dbcfa3ee82bfe54cebfd85d3d7ea
1,406
py
Python
expressions/numbers.py
frapa/gala
cfaba6dd3966d26715dd84101d451ff96ff37c0a
[ "MIT" ]
1
2018-07-22T16:19:29.000Z
2018-07-22T16:19:29.000Z
expressions/numbers.py
frapa/gala
cfaba6dd3966d26715dd84101d451ff96ff37c0a
[ "MIT" ]
null
null
null
expressions/numbers.py
frapa/gala
cfaba6dd3966d26715dd84101d451ff96ff37c0a
[ "MIT" ]
null
null
null
import expressions
23.830508
52
0.612376
import expressions class Decimal(expressions.Expression): def __init__(self, parent, expr): super(Decimal, self).__init__(parent) self.number = "".join(expr.children) def get_type(self): return self.get_ctx().get('type') def to_c(self): return "{number}".format(number=se...
911
61
412
b9cd0b753d491535080a2df3e0a18d2ddaea4805
223
py
Python
dgmr/__init__.py
johmathe/skillful_nowcasting
e1f74144996f830fcf4997c3a644f7a0c4d13f43
[ "MIT" ]
42
2021-09-09T13:05:18.000Z
2022-03-30T20:44:19.000Z
dgmr/__init__.py
johmathe/skillful_nowcasting
e1f74144996f830fcf4997c3a644f7a0c4d13f43
[ "MIT" ]
17
2021-09-06T13:58:06.000Z
2022-03-23T04:45:09.000Z
dgmr/__init__.py
johmathe/skillful_nowcasting
e1f74144996f830fcf4997c3a644f7a0c4d13f43
[ "MIT" ]
15
2021-09-30T04:50:39.000Z
2022-03-24T07:44:01.000Z
from .dgmr import DGMR from .generators import Sampler, Generator from .discriminators import SpatialDiscriminator, TemporalDiscriminator, Discriminator from .common import LatentConditioningStack, ContextConditioningStack
44.6
86
0.874439
from .dgmr import DGMR from .generators import Sampler, Generator from .discriminators import SpatialDiscriminator, TemporalDiscriminator, Discriminator from .common import LatentConditioningStack, ContextConditioningStack
0
0
0
5837127b4be46697ea9b309d1ac4b6a50ace87b7
1,592
py
Python
pyopenproject/business/services/command/time_entry/update.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
5
2021-02-25T15:54:28.000Z
2021-04-22T15:43:36.000Z
pyopenproject/business/services/command/time_entry/update.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
7
2021-03-15T16:26:23.000Z
2022-03-16T13:45:18.000Z
pyopenproject/business/services/command/time_entry/update.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
6
2021-06-18T18:59:11.000Z
2022-03-27T04:58:52.000Z
from contextlib import suppress from pyopenproject.api_connection.exceptions.request_exception import RequestError from pyopenproject.api_connection.requests.patch_request import PatchRequest from pyopenproject.business.exception.business_error import BusinessError from pyopenproject.business.services.command.time_ent...
46.823529
98
0.711683
from contextlib import suppress from pyopenproject.api_connection.exceptions.request_exception import RequestError from pyopenproject.api_connection.requests.patch_request import PatchRequest from pyopenproject.business.exception.business_error import BusinessError from pyopenproject.business.services.command.time_ent...
1,063
10
104