hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
506cb7ce8d5c619c545e6004b56f1f3f9bf3ab6d
1,261
py
Python
app/users/migrations/0004_auto_20210216_2041.py
hossamhsn74/django-PreventiaTech-task
e74cdbac01d96a3cbe076612ea92df5cc62198bd
[ "MIT" ]
null
null
null
app/users/migrations/0004_auto_20210216_2041.py
hossamhsn74/django-PreventiaTech-task
e74cdbac01d96a3cbe076612ea92df5cc62198bd
[ "MIT" ]
null
null
null
app/users/migrations/0004_auto_20210216_2041.py
hossamhsn74/django-PreventiaTech-task
e74cdbac01d96a3cbe076612ea92df5cc62198bd
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-02-16 20:41 import django.db.models.deletion
34.081081
121
0.589215
# Generated by Django 3.1.5 on 2021-02-16 20:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('users', '0003_delete_profile'), ] operations = [ ...
0
0
0
1,052
0
0
0
37
90
07eb67593e2291dd425132ed268a88e9bc883e76
6,185
py
Python
src/network/generator.py
sedrickkeh/high-fidelity-dual-image
9cefd378467826b91596653df38666e469bb23e0
[ "Apache-2.0" ]
266
2020-08-25T00:04:58.000Z
2022-03-31T06:41:03.000Z
src/network/generator.py
sedrickkeh/high-fidelity-dual-image
9cefd378467826b91596653df38666e469bb23e0
[ "Apache-2.0" ]
27
2020-09-01T21:04:27.000Z
2022-03-22T02:24:48.000Z
src/network/generator.py
sedrickkeh/high-fidelity-dual-image
9cefd378467826b91596653df38666e469bb23e0
[ "Apache-2.0" ]
50
2020-08-28T02:11:46.000Z
2022-02-25T02:44:42.000Z
import torch import torch.nn as nn # Custom if __name__ == "__main__": C = 8 y = torch.randn([3,C,16,16]) y_dims = y.size() G = Generator(y_dims[1:], y_dims[0], C=C, n_residual_blocks=3, sample_noise=True) x_hat = G(y) print(x_hat.size())
34.361111
90
0.592563
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np # Custom from src.normalisation import channel, instance class ResidualBlock(nn.Module): def __init__(self, input_dims, kernel_size=3, stride=1, channel_norm=True, activation='relu'): """ input_...
0
0
0
5,772
0
0
0
33
112
b063c54d0244824e5948bd4373cd0b50f7f60491
9,395
py
Python
maindatabase/views.py
dragonman164/Database-for-Covid-19-Vaccination-with-API-support
b34c29414967fcdf2d9fb34ed815f5c2752694b6
[ "MIT" ]
1
2020-12-30T16:31:14.000Z
2020-12-30T16:31:14.000Z
maindatabase/views.py
rishusingh022/Database-for-Covid-19-Vaccination-with-API-support
8d2137f06d10ca620a4fe24ffc34c410b8a78ad6
[ "MIT" ]
null
null
null
maindatabase/views.py
rishusingh022/Database-for-Covid-19-Vaccination-with-API-support
8d2137f06d10ca620a4fe24ffc34c410b8a78ad6
[ "MIT" ]
2
2020-12-19T19:27:08.000Z
2021-01-02T07:43:39.000Z
# Create your views here.
36.274131
112
0.60628
import pandas as pd from django.http import response from django.shortcuts import render,HttpResponse from .models import Person,report,management,Person_without_Aadhar import datetime from django.utils.timezone import utc from rest_framework import serializers, status,viewsets from rest_framework.views import APIView ...
0
0
0
6,822
0
1,634
0
367
538
f854e127d0d6d1aa5573e37894c5b2483aa079c5
2,397
py
Python
storm_analysis/spliner/find_peaks_std.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
storm_analysis/spliner/find_peaks_std.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
storm_analysis/spliner/find_peaks_std.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/env python """ Cubic spline peak finder. Hazen 03/16 """ import storm_analysis.sa_library.analysis_io as analysisIO import storm_analysis.sa_library.fitting as fitting import storm_analysis.spliner.cubic_fit_c as cubicFitC import storm_analysis.spliner.spline_to_psf as splineToPSF def initFitter(finder,...
33.291667
107
0.647059
#!/usr/bin/env python """ Cubic spline peak finder. Hazen 03/16 """ import pickle import numpy import tifffile import storm_analysis.sa_library.analysis_io as analysisIO import storm_analysis.sa_library.fitting as fitting import storm_analysis.sa_library.ia_utilities_c as utilC import storm_analysis.sa_library.matc...
0
0
0
0
0
0
0
58
112
0b462e090ae9ab6563e9477852c0ab03b142391e
1,474
py
Python
code.py
dunfred/Hackathon
459e11deb9fb81a6e29e1b2a42947c13f30b98d5
[ "MIT" ]
1
2021-09-01T17:18:40.000Z
2021-09-01T17:18:40.000Z
code.py
dunfred/Hackathon
459e11deb9fb81a6e29e1b2a42947c13f30b98d5
[ "MIT" ]
null
null
null
code.py
dunfred/Hackathon
459e11deb9fb81a6e29e1b2a42947c13f30b98d5
[ "MIT" ]
null
null
null
import pandas as pd url = "https://en.wikipedia.org/wiki/Road_safety_in_Europe" target_table_name = "European Union Road Safety Facts and Figures" # Fetch all tables on webpage that match # provided table name and return as list df = pd.read_html(url, match=target_table_name) # Grab the first table df = df[0] if le...
34.27907
100
0.652646
import pandas as pd url = "https://en.wikipedia.org/wiki/Road_safety_in_Europe" target_table_name = "European Union Road Safety Facts and Figures" # Fetch all tables on webpage that match # provided table name and return as list df = pd.read_html(url, match=target_table_name) # Grab the first table df = df[0] if le...
0
0
0
0
0
0
0
0
0
0c5067310a9afe1eb619b65f552eeb3afef69daa
679
py
Python
ph-geocoder.py
rukku/ph-geocodes
082a2055610c2af24562842ba36212172d5b1c80
[ "Unlicense" ]
1
2017-09-18T12:01:14.000Z
2017-09-18T12:01:14.000Z
ph-geocoder.py
rukku/ph-geocodes
082a2055610c2af24562842ba36212172d5b1c80
[ "Unlicense" ]
null
null
null
ph-geocoder.py
rukku/ph-geocodes
082a2055610c2af24562842ba36212172d5b1c80
[ "Unlicense" ]
1
2019-09-11T02:28:01.000Z
2019-09-11T02:28:01.000Z
import csv data = loaddata() for k,v in data.iteritems(): print len(k), k + ":" + v #return 0 if not a place #return 1 if it's region #return 2 if it's a province #return 3 if it's a munincipality
16.560976
50
0.581738
import csv def loaddata(): with open('geocodes.province.csv', 'rb') as f: reader = csv.reader(f) next(reader, None) #skip header codelist = dict() #build regional codes for row in reader: codelist[row[1]] = row[0] #print row[1], row[0] return ...
0
0
0
0
0
337
0
0
115
037ae72ac5d9a895629c39fc78a2f46b3bf36fd9
4,139
py
Python
tests/apps/search/test_views_bootstrap_elasticsearch.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
174
2018-04-14T23:36:01.000Z
2022-03-10T09:27:01.000Z
tests/apps/search/test_views_bootstrap_elasticsearch.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
631
2018-04-04T11:28:53.000Z
2022-03-31T11:18:31.000Z
tests/apps/search/test_views_bootstrap_elasticsearch.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
64
2018-06-27T08:35:01.000Z
2022-03-10T09:27:43.000Z
"""Test suite for the bootstrap_elasticsearch view of richie's search app."""
39.798077
94
0.70186
"""Test suite for the bootstrap_elasticsearch view of richie's search app.""" import json from unittest import mock from django.contrib.messages import get_messages from cms.test_utils.testcases import CMSTestCase from richie.apps.core.factories import UserFactory class BootstrapElasticsearchViewTestCase(CMSTestCa...
0
3,572
0
275
0
0
0
77
136
8e9c10efc8a64a3b68b811cec6fdfc09369dc0bc
4,457
py
Python
linuxOperation/app/maillist/models.py
zhouli121018/core
f9700204349ecb22d45e700e9e27e79412829199
[ "MIT" ]
null
null
null
linuxOperation/app/maillist/models.py
zhouli121018/core
f9700204349ecb22d45e700e9e27e79412829199
[ "MIT" ]
1
2021-06-10T20:45:55.000Z
2021-06-10T20:45:55.000Z
linuxOperation/app/maillist/models.py
zhouli121018/core
f9700204349ecb22d45e700e9e27e79412829199
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ EXT_LIST_TYPE = ( ('general', _(u'')), ('dept', _(u'')), ('sys', _(u'')) ) EXT_LIST_PERMISSION = ( ('public', _(u'')), ('private', _(u'')), ('domain', _(u'')), ('domain2',...
36.235772
127
0.627328
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time from django.db import models from django.utils.translation import ugettext_lazy as _ from app.core.models import Domain, Mailbox EXT_LIST_TYPE = ( ('general', _(u'普通邮件列表')), ('dept', _(u'部门邮件列表')), ('sys', _(u'系统邮件列表')) ) EXT_LIST_...
951
492
0
2,622
0
0
0
19
135
3080e96161efccd8686e2439e6afcc0410b9180b
3,078
py
Python
scripts/select_gnomad_snps.py
ucladx/panel-design
d285b95f57027f9e1c7ca298797e0d6aa1b14f8a
[ "Apache-2.0" ]
null
null
null
scripts/select_gnomad_snps.py
ucladx/panel-design
d285b95f57027f9e1c7ca298797e0d6aa1b14f8a
[ "Apache-2.0" ]
null
null
null
scripts/select_gnomad_snps.py
ucladx/panel-design
d285b95f57027f9e1c7ca298797e0d6aa1b14f8a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' @description : Given a gnomAD VCF, shortlist SNPs for a capture-based panel to detect allelic imbalance @created : 09/16/2020 @author : Cyriac Kandoth ''' from __future__ import division, print_function import sys, time if __name__ == "__main__": start_time = time.time() main() ...
50.459016
191
0.639051
#!/usr/bin/env python3 ''' @description : Given a gnomAD VCF, shortlist SNPs for a capture-based panel to detect allelic imbalance @created : 09/16/2020 @author : Cyriac Kandoth ''' from __future__ import division, print_function import os, sys, argparse, time, pysam def main(): parser = argparse.ArgumentParser(...
0
0
0
0
0
2,590
0
21
23
b3165d23370a13ce6d499a7faa888f948c8dc625
6,691
py
Python
server_new.py
parametersky/ServerTest
35884aa7da9e723407b6148a0bd3e1c285bbd58f
[ "MIT" ]
null
null
null
server_new.py
parametersky/ServerTest
35884aa7da9e723407b6148a0bd3e1c285bbd58f
[ "MIT" ]
null
null
null
server_new.py
parametersky/ServerTest
35884aa7da9e723407b6148a0bd3e1c285bbd58f
[ "MIT" ]
null
null
null
import logging logg = logging.getLogger(__name__) logg.setLevel(logging.DEBUG) logg.addHandler(getErrorHandler("/var/log/socket-server/socketserver.log")) try: mySocketServer = MySocketServer() mySocketServer.startWork() mySocketServer.runSocketServer() except Exception as error: logg.exception(er...
32.639024
105
0.576894
import socket import json import os import sys from threading import Thread from multiprocessing import Process from queue import Queue from logging import Formatter,getLogger,FileHandler from logging.handlers import TimedRotatingFileHandler,RotatingFileHandler import logging import time from functools import reduce d...
0
0
0
4,886
0
996
0
61
423
1873360a35ad172b1a4e80205f7933d2a7a47d0e
621
py
Python
je_editor/ui/ui_event/open_file/open_last_edit_file/open_last_edit_file.py
JE-Chen/je_editor
2f18dedb6f0eb27c38668dc53f520739c8d5c6c6
[ "MIT" ]
1
2021-12-10T14:57:15.000Z
2021-12-10T14:57:15.000Z
je_editor/ui/ui_event/open_file/open_last_edit_file/open_last_edit_file.py
JE-Chen/je_editor
2f18dedb6f0eb27c38668dc53f520739c8d5c6c6
[ "MIT" ]
null
null
null
je_editor/ui/ui_event/open_file/open_last_edit_file/open_last_edit_file.py
JE-Chen/je_editor
2f18dedb6f0eb27c38668dc53f520739c8d5c6c6
[ "MIT" ]
null
null
null
from je_editor.utils.file.open.open_file import read_file def open_last_edit_file(file_from_output_content, code_editor): """ :param file_from_output_content: readied file from output content :param code_editor the editor to insert file content :return readied file open last edit file if succe...
34.5
69
0.73752
from je_editor.utils.file.open.open_file import read_file def open_last_edit_file(file_from_output_content, code_editor): """ :param file_from_output_content: readied file from output content :param code_editor the editor to insert file content :return readied file open last edit file if succe...
0
0
0
0
0
0
0
0
0
d9fb745b63e853aa5e221b1f87db67c0723efc2d
394
py
Python
zmq_srv.py
iyedb/boost_asio_zeromq
63110c18540c8303ac29d574f25cba234a00a22d
[ "MIT" ]
4
2015-04-07T06:00:34.000Z
2019-09-10T01:45:41.000Z
zmq_srv.py
iyedb/boost_asio_zeromq
63110c18540c8303ac29d574f25cba234a00a22d
[ "MIT" ]
null
null
null
zmq_srv.py
iyedb/boost_asio_zeromq
63110c18540c8303ac29d574f25cba234a00a22d
[ "MIT" ]
3
2015-06-30T07:37:41.000Z
2019-09-10T01:45:47.000Z
from __future__ import print_function import zmq import time ADDR='tcp://127.0.0.1:11155' ctx = zmq.Context() srv = ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq.RCVTIMEO, 3000); while True: try: msg = srv.recv() except Exception as e: print('zmq socket revc timedout:', e) else: print('cl...
17.130435
41
0.659898
from __future__ import print_function import zmq import time ADDR='tcp://127.0.0.1:11155' ctx = zmq.Context() srv = ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq.RCVTIMEO, 3000); while True: try: msg = srv.recv() except Exception as e: print('zmq socket revc timedout:', e) else: print('cl...
0
0
0
0
0
0
0
0
0
0067d2bd646b029edc7c4eb805ba63043b28667b
1,813
py
Python
structural/adapter/logic/xml_to_json_adapter.py
Kozak24/Patterns
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
[ "MIT" ]
null
null
null
structural/adapter/logic/xml_to_json_adapter.py
Kozak24/Patterns
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
[ "MIT" ]
null
null
null
structural/adapter/logic/xml_to_json_adapter.py
Kozak24/Patterns
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING:
30.728814
82
0.619415
from __future__ import annotations from typing import Dict, Any, List, TYPE_CHECKING if TYPE_CHECKING: from xml.etree.ElementTree import Element class XmlToJsonAdapter: def __init__(self, node: Element) -> None: self.node = node def convert_to_json(self) -> Dict[Any, Any]: converted_to_...
0
150
0
1,488
0
0
0
37
49
a74e3a15f473bb54e6a524be41bcee3ea4fd952a
3,402
py
Python
editor.py
MarioLiebisch/story-o-mat
9ab529d226046c2acab513e6fff6a19da72d6c8a
[ "MIT" ]
null
null
null
editor.py
MarioLiebisch/story-o-mat
9ab529d226046c2acab513e6fff6a19da72d6c8a
[ "MIT" ]
null
null
null
editor.py
MarioLiebisch/story-o-mat
9ab529d226046c2acab513e6fff6a19da72d6c8a
[ "MIT" ]
null
null
null
import os import sys from pathlib import Path from nltk.tokenize.regexp import RegexpTokenizer from make_story import load_data_from_file BUTTONS_PER_COL = 8 DATA_PATH = "./data/" data = None tokenizer = RegexpTokenizer(r'\w+') Path(DATA_PATH).mkdir(parents=True, exist_ok=True) if len(sys.argv) == 1: ...
22.235294
83
0.643739
import os import sys from pathlib import Path from tkinter import * from tkinter import filedialog from os import listdir from os.path import isfile, join from nltk.tokenize.regexp import RegexpTokenizer from make_story import get_next_words, load_data_from_file BUTTONS_PER_COL = 8 DATA_PATH = "./data/" data = None ...
0
0
0
0
0
1,637
0
37
272
7cf71af53bd345c815339c54aae80d464ba8ddd3
1,530
py
Python
tests/test_mxnet.py
ankitshah009/MMdnn
a03d800eb4016765e97f82eb5d2e69f98de3a9cf
[ "MIT" ]
3,442
2017-11-20T08:39:51.000Z
2019-05-06T10:51:19.000Z
tests/test_mxnet.py
ankitshah009/MMdnn
a03d800eb4016765e97f82eb5d2e69f98de3a9cf
[ "MIT" ]
430
2017-11-29T04:21:48.000Z
2019-05-06T05:37:37.000Z
tests/test_mxnet.py
ankitshah009/MMdnn
a03d800eb4016765e97f82eb5d2e69f98de3a9cf
[ "MIT" ]
683
2017-11-20T08:50:34.000Z
2019-05-04T04:25:14.000Z
from __future__ import absolute_import from __future__ import print_function if __name__ == '__main__': test_mxnet()
28.333333
54
0.544444
from __future__ import absolute_import from __future__ import print_function import os import sys import six from conversion_imagenet import TestModels def get_test_table(): return { 'mxnet' : { 'vgg19' : [ TestModels.onnx_emit, TestModels.caffe_emit, T...
0
0
0
0
0
1,283
0
-13
135
402f7023809b25e6416c8803ed8d64999c66be0d
6,424
py
Python
bert/attention.py
chenlongzhen/bert-for-tf2
bcbf85d682faba2326e77b021fd955f9e13d72c2
[ "MIT" ]
806
2019-05-25T08:37:21.000Z
2022-03-25T11:16:13.000Z
bert/attention.py
chenlongzhen/bert-for-tf2
bcbf85d682faba2326e77b021fd955f9e13d72c2
[ "MIT" ]
89
2019-06-05T14:53:25.000Z
2022-03-09T13:42:44.000Z
bert/attention.py
chenlongzhen/bert-for-tf2
bcbf85d682faba2326e77b021fd955f9e13d72c2
[ "MIT" ]
196
2019-06-10T23:53:46.000Z
2022-03-14T02:49:46.000Z
# coding=utf-8 # # created by kpe on 15.Mar.2019 at 12:52 # from __future__ import absolute_import, division, print_function
44
118
0.593244
# coding=utf-8 # # created by kpe on 15.Mar.2019 at 12:52 # from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.python import keras from tensorflow.python.keras import backend as K from bert.layer import Layer class AttentionLayer(Layer): class Params(Layer....
0
562
0
5,571
0
0
0
50
113
4c317b128f71d726a97ef3d1da8952b339f14a3d
9,722
py
Python
venv/Lib/site-packages/sqlalchemy/dialects/postgresql/pg8000.py
YunJaePark3908/BaseAPIServer
17ab922917541406a3c2d75b428614ce97152a16
[ "Apache-2.0" ]
2
2021-02-20T22:43:47.000Z
2021-05-06T03:43:20.000Z
venv/Lib/site-packages/sqlalchemy/dialects/postgresql/pg8000.py
YunJaePark3908/BaseAPIServer
17ab922917541406a3c2d75b428614ce97152a16
[ "Apache-2.0" ]
8
2021-03-26T19:13:07.000Z
2021-04-19T18:34:33.000Z
venv/Lib/site-packages/sqlalchemy/dialects/postgresql/pg8000.py
YunJaePark3908/BaseAPIServer
17ab922917541406a3c2d75b428614ce97152a16
[ "Apache-2.0" ]
3
2021-11-30T11:10:26.000Z
2021-12-08T05:59:31.000Z
# postgresql/pg8000.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors <see AUTHORS # file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php r""" .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :co...
29.195195
95
0.618803
# postgresql/pg8000.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors <see AUTHORS # file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php r""" .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :co...
0
422
0
6,531
0
0
0
73
449
37dab22431929b05ff4e9721da0fcf6fbe7ead60
176
py
Python
backend/home/urls.py
webclinic017/WallStreetBots
f4f73539b080ce7667b52ee8195919ec4e7b79b8
[ "MIT" ]
4
2021-11-12T02:04:30.000Z
2022-01-03T22:56:41.000Z
backend/home/urls.py
webclinic017/WallStreetBots
f4f73539b080ce7667b52ee8195919ec4e7b79b8
[ "MIT" ]
5
2021-11-11T20:48:34.000Z
2022-03-12T18:08:40.000Z
backend/home/urls.py
webclinic017/WallStreetBots
f4f73539b080ce7667b52ee8195919ec4e7b79b8
[ "MIT" ]
2
2021-11-15T14:23:36.000Z
2021-11-27T19:44:38.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('check_db_connection', views.get_time, name="check_db"), ]
19.555556
65
0.6875
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('check_db_connection', views.get_time, name="check_db"), ]
0
0
0
0
0
0
0
0
0
cff48d45df0fba0a30b0c4b0973dffc79f9cf89e
1,264
py
Python
Books.py
rigobertocanseco/bidi-unam-new-books
dc14252bf6cafaeebd66d48067abac9489cac65d
[ "Apache-2.0", "MIT" ]
null
null
null
Books.py
rigobertocanseco/bidi-unam-new-books
dc14252bf6cafaeebd66d48067abac9489cac65d
[ "Apache-2.0", "MIT" ]
null
null
null
Books.py
rigobertocanseco/bidi-unam-new-books
dc14252bf6cafaeebd66d48067abac9489cac65d
[ "Apache-2.0", "MIT" ]
null
null
null
# coding=utf-8 if __name__ == '__main__': print(get())
28.727273
122
0.491297
# coding=utf-8 import re import json import requests from bs4 import BeautifulSoup def get(): page = requests.get("https://www.bidi.unam.mx/mdb/newadq.html") if page is None: return None soup = BeautifulSoup(page.text, 'html.parser') trs = soup.find(id='dtBasicExample').find('tbody').find_all(...
0
0
0
0
0
1,111
0
-20
111
33469cf394e916db12bee4f160f4e41bb1a58c5d
18,188
py
Python
codegen/generate_schema.py
mbarga/commercetools-python-sdk
464b2ea2518bafe4e2694a723550e0041db1f4c9
[ "MIT" ]
null
null
null
codegen/generate_schema.py
mbarga/commercetools-python-sdk
464b2ea2518bafe4e2694a723550e0041db1f4c9
[ "MIT" ]
1
2019-07-15T07:27:06.000Z
2019-07-15T07:27:06.000Z
codegen/generate_schema.py
mbarga/commercetools-python-sdk
464b2ea2518bafe4e2694a723550e0041db1f4c9
[ "MIT" ]
null
null
null
FIELD_TYPES = { "string": "marshmallow.fields.String", "object": "marshmallow.fields.Dict", "float": "marshmallow.fields.Float", "number": "marshmallow.fields.Integer", "integer": "marshmallow.fields.Integer", "boolean": "marshmallow.fields.Bool", "array": "marshmallow.fields.List", "da...
36.015842
96
0.496371
import ast import operator import typing from collections import defaultdict from codegen import raml_types from codegen.generate_abstract import AbstractModuleGenerator from codegen.utils import reorder_class_definitions FIELD_TYPES = { "string": "marshmallow.fields.String", "object": "marshmallow.fields.Dic...
0
0
0
17,474
0
0
0
68
201
9225c806a3472f8efbd06c64d676edf5f14dea8b
381
py
Python
sync_batchnorm/__init__.py
hankeceli/3D-Object-Detection-for-AV
b6c17a4a3ecc9c32418baafa5b82cfd4704ed880
[ "Apache-2.0" ]
null
null
null
sync_batchnorm/__init__.py
hankeceli/3D-Object-Detection-for-AV
b6c17a4a3ecc9c32418baafa5b82cfd4704ed880
[ "Apache-2.0" ]
null
null
null
sync_batchnorm/__init__.py
hankeceli/3D-Object-Detection-for-AV
b6c17a4a3ecc9c32418baafa5b82cfd4704ed880
[ "Apache-2.0" ]
null
null
null
# This file is part of Synchronized-BatchNorm-PyTorch. # https://github.com/vacancy/Synchronized-BatchNorm-PyTorch # Distributed under MIT License.
47.625
96
0.860892
# This file is part of Synchronized-BatchNorm-PyTorch. # https://github.com/vacancy/Synchronized-BatchNorm-PyTorch # Distributed under MIT License. from .batchnorm import SynchronizedBatchNorm1d, SynchronizedBatchNorm2d, SynchronizedBatchNorm3d from .batchnorm import patch_sync_batchnorm, convert_model from .replicate...
0
0
0
0
0
0
0
166
67
e6a92dafea1b739f567be9dfd875597c7f8c747f
3,671
py
Python
riko/bado/io.py
nerevu/riko
4d27102b605b8b4050ba566d5e0895d8d5f8b09a
[ "MIT" ]
1,716
2016-06-06T15:32:28.000Z
2022-03-31T23:34:16.000Z
riko/bado/io.py
nerevu/riko
4d27102b605b8b4050ba566d5e0895d8d5f8b09a
[ "MIT" ]
33
2016-07-20T00:15:19.000Z
2020-07-29T19:58:51.000Z
riko/bado/io.py
nerevu/riko
4d27102b605b8b4050ba566d5e0895d8d5f8b09a
[ "MIT" ]
88
2016-07-21T03:48:06.000Z
2022-02-15T08:45:42.000Z
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.bado.io ~~~~~~~~~~~~ Provides functions for asynchronously reading files and urls Examples: basic usage:: >>> from riko import get_path >>> from riko.bado.io import async_url_open """ import pygogo as gogo try: from twisted.test.prot...
28.457364
78
0.670662
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.bado.io ~~~~~~~~~~~~ Provides functions for asynchronously reading files and urls Examples: basic usage:: >>> from riko import get_path >>> from riko.bado.io import async_url_open """ import pygogo as gogo from io import open from tempfi...
0
995
0
1,372
0
209
0
155
331
5b1fa646253ee176f77c333bc37c30abd48e542d
2,171
py
Python
tools/pv_addpot.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
4
2019-01-02T09:17:54.000Z
2019-12-26T07:15:59.000Z
tools/pv_addpot.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
6
2019-03-06T03:16:12.000Z
2019-03-14T14:36:01.000Z
tools/pv_addpot.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 '''Search or create POTCAR file. The elements can be parsed manually, or read from POSCAR. ''' if __name__ == "__main__": pv_addpot()
35.590164
93
0.625518
#!/usr/bin/env python3 '''Search or create POTCAR file. The elements can be parsed manually, or read from POSCAR. ''' import os import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter from mykit.core.utils import trim_after from mykit.vasp.poscar import Poscar from mykit.vasp.potcar import Potcar...
0
0
0
0
0
1,767
0
74
157
d37508e9a37e8a4b1a358eebc0d313828b179543
1,924
py
Python
rlbot/messages/flat/Vector3Partial.py
danielbairamian/RL-RL
4fc4ac14bd10088e83e7a15c3319370f74d0a756
[ "MIT" ]
3
2020-04-30T14:33:10.000Z
2021-10-11T00:12:35.000Z
BeardBot/venv/Lib/site-packages/rlbot/messages/flat/Vector3Partial.py
Bearedy/BeardBot
cc31ae663bdf9ebf7cc0c41f7d4cff0d33064da0
[ "MIT" ]
null
null
null
BeardBot/venv/Lib/site-packages/rlbot/messages/flat/Vector3Partial.py
Bearedy/BeardBot
cc31ae663bdf9ebf7cc0c41f7d4cff0d33064da0
[ "MIT" ]
null
null
null
# automatically generated by the FlatBuffers compiler, do not modify # namespace: flat
32.610169
118
0.635655
# automatically generated by the FlatBuffers compiler, do not modify # namespace: flat import flatbuffers class Vector3Partial(object): __slots__ = ['_tab'] @classmethod def GetRootAsVector3Partial(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x =...
0
196
0
1,123
0
363
0
-3
157
db48c83cc9dc988f9a581c0fefc3618c90cc8432
40,409
py
Python
fxpt/fx_prefsaver/tests/pyqt_window_test_ui.py
theetcher/fxpt
d40c571885c7c4056f548a60140740c7beb8703d
[ "MIT" ]
18
2015-11-02T08:02:16.000Z
2021-04-08T15:45:29.000Z
fxpt/fx_prefsaver/tests/pyqt_window_test_ui.py
dseeni/fxpt
d40c571885c7c4056f548a60140740c7beb8703d
[ "MIT" ]
4
2017-01-09T08:29:37.000Z
2020-04-15T06:04:33.000Z
fxpt/fx_prefsaver/tests/pyqt_window_test_ui.py
dseeni/fxpt
d40c571885c7c4056f548a60140740c7beb8703d
[ "MIT" ]
7
2016-09-01T08:38:53.000Z
2020-09-04T00:16:52.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_window_test_ui.ui' # # Created: Fri Jan 16 22:18:17 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
71.268078
197
0.739266
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_window_test_ui.ui' # # Created: Fri Jan 16 22:18:17 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exce...
0
0
0
40,018
0
0
0
7
23
e3949c919fea9bb46197d59a4b51bd08dace1cdb
8,005
py
Python
apps/log_databus/utils/bkdata_clean.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
75
2021-07-14T09:32:36.000Z
2022-03-31T15:26:53.000Z
apps/log_databus/utils/bkdata_clean.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
561
2021-07-14T07:45:47.000Z
2022-03-31T11:41:28.000Z
apps/log_databus/utils/bkdata_clean.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
41
2021-07-14T07:39:50.000Z
2022-03-25T09:22:18.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG is licensed under the MIT License. License for BK-LOG : ------------------------------------------------------------------...
48.222892
117
0.677452
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: ------------------------------------------------...
58
4,378
0
1,751
0
0
0
285
222
a4a2be9fe6839170b36880b7184c1a1bfd00dd20
28,493
py
Python
src/human_readable/times.py
staticdev/human-readable
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
[ "MIT" ]
5
2021-03-10T21:22:31.000Z
2022-03-23T04:38:07.000Z
src/human_readable/times.py
staticdev/human-readable
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
[ "MIT" ]
59
2021-02-13T10:08:23.000Z
2022-03-14T19:43:55.000Z
src/human_readable/times.py
staticdev/human-readable
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
[ "MIT" ]
null
null
null
"""Time humanizing functions.""" from __future__ import annotations import datetime as dt import math import human_readable.i18n as i18n _ = i18n.gettext P_ = i18n.pgettext N_ = i18n.ngettext def time_of_day(hour: int) -> str: """Given current hour, returns time of the day.""" if 0 < hour < 12: ...
32.826037
88
0.61036
"""Time humanizing functions.""" from __future__ import annotations import datetime as dt import enum import functools import math from typing import Any import human_readable.i18n as i18n _ = i18n.gettext P_ = i18n.pgettext N_ = i18n.ngettext @functools.total_ordering class Unit(enum.Enum): """Enum for minim...
0
313
0
0
0
2,643
0
-14
181
be7e966b8a67941b46ef35129ca9c6e151196260
2,749
py
Python
DeepSTARR/DeepSTARR_pred_new_sequence.py
bernardo-de-almeida/DeepSTARR
7eca2ef7001f6eb8b0b6a0d4a31e28e73c764bb6
[ "MIT" ]
1
2021-12-09T16:41:21.000Z
2021-12-09T16:41:21.000Z
DeepSTARR/DeepSTARR_pred_new_sequence.py
bernardo-de-almeida/DeepSTARR
7eca2ef7001f6eb8b0b6a0d4a31e28e73c764bb6
[ "MIT" ]
1
2021-10-09T02:21:01.000Z
2021-10-09T02:21:01.000Z
DeepSTARR/DeepSTARR_pred_new_sequence.py
bernardo-de-almeida/DeepSTARR
7eca2ef7001f6eb8b0b6a0d4a31e28e73c764bb6
[ "MIT" ]
3
2021-10-19T09:12:39.000Z
2022-01-20T18:02:33.000Z
### Load arguments import sys if __name__ == "__main__": new_seq, model_ID = main(sys.argv[1:]) ### Load libraries import sys sys.path.append('Neural_Network_DNA_Demo/') from helper import IOHelper, SequenceHelper # from https://github.com/bernardo-de-almeida/Neural_Network_DNA_Demo.git ### Load sequences pri...
32.341176
117
0.715897
### Load arguments import sys, getopt def main(argv): new_seq = '' model_ID = '' try: opts, args = getopt.getopt(argv,"hs:m:",["seq=","model="]) except getopt.GetoptError: print('DeepSTARR_pred_new_sequence.py -s <fasta seq file> -m <CNN model file>') sys.exit(2) for opt, arg in opts...
0
0
0
0
0
1,093
0
190
223
1586fdc938864aa8657885eb20f4ab9d341d045e
101
py
Python
1095.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
3
2020-11-25T19:05:31.000Z
2021-03-29T07:29:36.000Z
1095.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
1095.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
j,i=65,-2 for I in range (1,14): J= j-5 I=i+3 print('I=%d J=%d' %(I,J)) j=J i=I
12.625
29
0.39604
j,i=65,-2 for I in range (1,14): J= j-5 I=i+3 print('I=%d J=%d' %(I,J)) j=J i=I
0
0
0
0
0
0
0
0
0
757ffce3ec17e9d8a63a649af391e5ec129bb57b
5,838
py
Python
evaluation/dogs-vs-cats/train.py
kumasento/gconv-prune
f81c417d3754102c902bd153809130e12607bd7d
[ "MIT" ]
8
2019-08-29T07:43:03.000Z
2021-03-03T14:25:09.000Z
evaluation/dogs-vs-cats/train.py
kumasento/gconv-prune
f81c417d3754102c902bd153809130e12607bd7d
[ "MIT" ]
null
null
null
evaluation/dogs-vs-cats/train.py
kumasento/gconv-prune
f81c417d3754102c902bd153809130e12607bd7d
[ "MIT" ]
2
2019-09-15T03:39:30.000Z
2020-04-30T07:06:46.000Z
#!/usr/bin/env python import copy import logging import time from typing import Dict, List, Tuple import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from utils import get_device fmt = "[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s: %(message)s" logging.basic...
29.785714
87
0.622302
#!/usr/bin/env python import argparse import copy import logging import os import random import time from typing import Dict, List, Tuple import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision from torch.utils.data import DataLoader from torchvision import models from ut...
0
0
0
0
0
2,519
0
-9
249
ea81cc5881e19fdd44f7b09ca06efa22e43d9a5d
6,037
py
Python
test/ASEmotion.py
davircarvalho/ASEmotion
4d274ec49be39982f8f40babde1ba57e9c1cdde5
[ "MIT" ]
2
2021-03-30T02:07:50.000Z
2021-05-03T03:55:20.000Z
test/ASEmotion.py
davircarvalho/ASEmotion
4d274ec49be39982f8f40babde1ba57e9c1cdde5
[ "MIT" ]
null
null
null
test/ASEmotion.py
davircarvalho/ASEmotion
4d274ec49be39982f8f40babde1ba57e9c1cdde5
[ "MIT" ]
1
2021-03-29T18:44:13.000Z
2021-03-29T18:44:13.000Z
""" Real time AEmotion (env: 'torch') """ # %% Import libs # import pickle # import librosa import sys sys.path.append('..') import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' # import matplotlib.pyplot as plt # from IPython.display import clear_output if __name__ == "__main__": process() # %%
32.456989
134
0.602948
""" Real time AEmotion (env: 'torch') """ # %% Import libs import pyaudio import numpy as np # import pickle # import librosa import keract import sys sys.path.append('..') from src.modeling.tcn.tcn import TCN import os import tensorflow as tf os.environ['CUDA_VISIBLE_DEVICES'] = '-1' from tensorflow.keras.models i...
12
0
0
0
0
5,385
0
76
265
1696875137527c62d8fb92f1008c6d0226b41668
12,814
py
Python
Snakemake/analyse-samples/scripts/gettRNAxlsites_v2.py
ulelab/ncawareclip
11b92a6302c5738f1c8c6da1f8b4aeb405082375
[ "MIT" ]
null
null
null
Snakemake/analyse-samples/scripts/gettRNAxlsites_v2.py
ulelab/ncawareclip
11b92a6302c5738f1c8c6da1f8b4aeb405082375
[ "MIT" ]
null
null
null
Snakemake/analyse-samples/scripts/gettRNAxlsites_v2.py
ulelab/ncawareclip
11b92a6302c5738f1c8c6da1f8b4aeb405082375
[ "MIT" ]
null
null
null
# Charlotte Capitanchik # 25.04.18 # Based on fastCLIP tRNA strategy # input is SAM of tRNA mapping # and .fai of what is was mapped to import pysam from collections import defaultdict import operator from collections import Counter import sys import statistics import random import re # input # #trna_fai = sys.argv...
39.919003
359
0.729359
# Charlotte Capitanchik # 25.04.18 # Based on fastCLIP tRNA strategy # input is SAM of tRNA mapping # and .fai of what is was mapped to import pysam from collections import defaultdict import operator from collections import Counter import sys import statistics import random import re # input # #trna_fai = sys.argv...
0
0
0
0
0
0
0
0
0
a5a923e3611c85e653724ac7bf162876c39f8453
2,289
py
Python
Bolivian_Lowlands/Specific_loads_lowlands/health_center.py
CIE-UMSS/VLIR_Energy_Demand
3a9c7a034ac6ff668c7734597daf4696f62ef671
[ "MIT" ]
null
null
null
Bolivian_Lowlands/Specific_loads_lowlands/health_center.py
CIE-UMSS/VLIR_Energy_Demand
3a9c7a034ac6ff668c7734597daf4696f62ef671
[ "MIT" ]
null
null
null
Bolivian_Lowlands/Specific_loads_lowlands/health_center.py
CIE-UMSS/VLIR_Energy_Demand
3a9c7a034ac6ff668c7734597daf4696f62ef671
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 11:10:35 2021 @author: Clau """ ''' Paper: Energy sufficiency, lowlands. User: Health Center ''' from core import User User_list = [] #Definig users HC = User("Health center", 1) User_list.append(HC) HC_indoor_bulb = HC.Appliance(HC,20,7,2,690,...
29.727273
80
0.688947
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 11:10:35 2021 @author: Clau """ ''' Paper: Energy sufficiency, lowlands. User: Health Center ''' from core import User, np User_list = [] #Definig users HC = User("Health center", 1) User_list.append(HC) HC_indoor_bulb = HC.Appliance(HC,20,7,2,...
0
0
0
0
0
0
0
4
0
f03a89170ccf4e3e9ab10141c5574ff7955a07f6
2,004
py
Python
Supervised Learning/LassoElasticNet_SparseSignals.py
mrchipset/sklearn-tutorial
2a5e6500e325f03736fa3c27f7da94851df7802c
[ "MIT" ]
null
null
null
Supervised Learning/LassoElasticNet_SparseSignals.py
mrchipset/sklearn-tutorial
2a5e6500e325f03736fa3c27f7da94851df7802c
[ "MIT" ]
null
null
null
Supervised Learning/LassoElasticNet_SparseSignals.py
mrchipset/sklearn-tutorial
2a5e6500e325f03736fa3c27f7da94851df7802c
[ "MIT" ]
null
null
null
""" Estimate Lasso and Elastic-Net regression models on a manually generated sparse signal corrupted with an additive noise. """ # %% import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import r2_score from sklearn.model_selection import train_test_split np.random.seed(42) n_samples, n_features = 5...
28.225352
79
0.636228
""" Estimate Lasso and Elastic-Net regression models on a manually generated sparse signal corrupted with an additive noise. """ # %% import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import r2_score from sklearn.model_selection import train_test_split np.random.seed(42) n_samples, n_features = 5...
0
0
0
0
0
0
0
0
0
2d8cfcb2b4992dc0a61b80a73c31708a2e8a0c5b
524
py
Python
codewars/src/nthfib.py
wenima/math-series
60aa0b0c845bd859a1bf936c7e200f60ecfce026
[ "MIT" ]
null
null
null
codewars/src/nthfib.py
wenima/math-series
60aa0b0c845bd859a1bf936c7e200f60ecfce026
[ "MIT" ]
null
null
null
codewars/src/nthfib.py
wenima/math-series
60aa0b0c845bd859a1bf936c7e200f60ecfce026
[ "MIT" ]
1
2019-10-03T07:38:06.000Z
2019-10-03T07:38:06.000Z
"""This module solves kata https://www.codewars.com/kata/n-th-fibonacci.""" def original_solution(n): """Return the nth fibonacci number.""" if n == 1: return 0 a, b = 0, 1 for i in range(1, n - 1): a, b = b, (a + b) return b #better solution def nth_fib(n): """Return the nth f...
26.2
76
0.576336
"""This module solves kata https://www.codewars.com/kata/n-th-fibonacci.""" def original_solution(n): """Return the nth fibonacci number.""" if n == 1: return 0 a, b = 0, 1 for i in range(1, n - 1): a, b = b, (a + b) return b #better solution def nth_fib(n): """Return the nth f...
0
0
0
0
0
0
0
0
0
c7e2e215de5909b895886904ae3106daffa4726c
12,315
py
Python
ForensicsTool/ForensicsTool/module5.py
deepak7mahto/ForensicsTool
17ae45a5a12093f38eaeb309745588464b694fa4
[ "MIT" ]
null
null
null
ForensicsTool/ForensicsTool/module5.py
deepak7mahto/ForensicsTool
17ae45a5a12093f38eaeb309745588464b694fa4
[ "MIT" ]
null
null
null
ForensicsTool/ForensicsTool/module5.py
deepak7mahto/ForensicsTool
17ae45a5a12093f38eaeb309745588464b694fa4
[ "MIT" ]
null
null
null
#module 5 - Browser Forensics
42.030717
228
0.579862
import random_functions, colorama, Forensics_tool_redesigned_using_oops import sqlite3, getpass, os #module 5 - Browser Forensics class Browser_forensics_class(random_functions.random_functions_class): def module5(self): try: self.seperator() print "Browser Forensc...
0
0
0
12,157
0
0
0
56
70
7a4c90472f6efd1274fd3d071913a5e18521bd2c
1,863
py
Python
tests/test_issue.py
shibing624/text2vec
ec148815d57e7d6a420aee679a66620a5357b269
[ "Apache-2.0" ]
380
2019-12-12T02:24:05.000Z
2022-03-31T16:08:53.000Z
tests/test_issue.py
shibing624/text2vec
ec148815d57e7d6a420aee679a66620a5357b269
[ "Apache-2.0" ]
32
2019-12-06T05:50:47.000Z
2022-03-29T14:34:29.000Z
tests/test_issue.py
shibing624/text2vec
ec148815d57e7d6a420aee679a66620a5357b269
[ "Apache-2.0" ]
72
2020-01-15T02:40:04.000Z
2022-03-29T09:11:12.000Z
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ import sys import unittest sys.path.append('..') from text2vec import SBert sbert_model = SBert('paraphrase-multilingual-MiniLM-L12-v2') if __name__ == '__main__': unittest.main()
28.661538
82
0.602254
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ import sys import unittest sys.path.append('..') from text2vec import SBert from text2vec import BM25 from sentence_transformers.util import cos_sim sbert_model = SBert('paraphrase-multilingual-MiniLM-L12-v2') def sbert_sim_score(str_a...
780
0
0
1,091
0
122
0
29
90
60b9ae7a5f59803f75974869de5cfb77eb8b527c
1,154
py
Python
snippets/ch07/ngrams.py
kratunko/atap
982b925e10b89ec79df7adc4eae3595622e0945c
[ "Apache-2.0" ]
360
2017-04-26T09:24:22.000Z
2022-03-12T15:26:54.000Z
snippets/ch07/ngrams.py
nguyenhonghaidang/atap
eab89ecc2ac78999aea20bd704d6212f0fb520dd
[ "Apache-2.0" ]
101
2017-04-17T19:12:02.000Z
2020-12-28T22:38:44.000Z
snippets/ch07/ngrams.py
nguyenhonghaidang/atap
eab89ecc2ac78999aea20bd704d6212f0fb520dd
[ "Apache-2.0" ]
297
2017-07-07T04:08:06.000Z
2022-03-18T06:45:33.000Z
#!/usr/bin/env python3 import argparse from nltk import word_tokenize from nltk import ngrams as nltk_ngrams from functools import partial LPAD_SYMBOL = "<s>" RPAD_SYMBOL = "</s>" nltk_ngrams = partial(nltk_ngrams, pad_right=True, pad_left=True, right_pad_symbol=RPAD_SYMBOL, left_pad_symbol=LPAD_SYMBOL ) ...
25.644444
80
0.67851
#!/usr/bin/env python3 import sys import argparse from nltk import sent_tokenize from nltk import word_tokenize from nltk import ngrams as nltk_ngrams from functools import partial LPAD_SYMBOL = "<s>" RPAD_SYMBOL = "</s>" nltk_ngrams = partial(nltk_ngrams, pad_right=True, pad_left=True, right_pad_symbol=RPA...
0
0
0
0
219
0
0
-2
92
906adac84f4a60ef82b34b38b84d0390bbd9027f
1,551
py
Python
small_satrn_inference.py
Nivratti/ocr-vedastr
11b90e94c881883ff65ec2aa248862acf3e33601
[ "Apache-2.0" ]
null
null
null
small_satrn_inference.py
Nivratti/ocr-vedastr
11b90e94c881883ff65ec2aa248862acf3e33601
[ "Apache-2.0" ]
null
null
null
small_satrn_inference.py
Nivratti/ocr-vedastr
11b90e94c881883ff65ec2aa248862acf3e33601
[ "Apache-2.0" ]
null
null
null
""" Usage: python small_satrn_inference.py vedastr/test.jpg """ from pathlib import Path home = str(Path.home()) if __name__ == '__main__': main()
26.288136
91
0.691167
""" Usage: python small_satrn_inference.py vedastr/test.jpg """ import argparse import os import sys import cv2 from vedastr.runners import InferenceRunner from vedastr.utils import Config from pathlib import Path from vedastr.helper import download_drive_file home = str(Path.home()) def load_model(): cfg_pat...
0
0
0
0
0
1,177
0
18
202
6fdea7ea56fc239f001854792c0539ea0c4180e1
2,076
py
Python
src/0016路径总和/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
src/0016路径总和/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
src/0016路径总和/index.py
zzh2036/OneDayOneLeetcode
1198692e68f8f0dbf15555e45969122e1a92840a
[ "MIT" ]
null
null
null
''' : ''' # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
31.454545
84
0.536127
''' 给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 说明: 叶子节点是指没有子节点的节点。 返回值:布尔值 ''' # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None from collections import deque class Solution: def hasPathSu...
255
0
0
1,759
0
0
0
8
45
69f60ca941d912808b279624b40396aa3e245b29
3,227
py
Python
gtsfm/frontend/matcher/twoway_matcher.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
122
2021-02-07T23:01:58.000Z
2022-03-30T13:10:35.000Z
gtsfm/frontend/matcher/twoway_matcher.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
273
2021-01-30T16:45:26.000Z
2022-03-16T15:02:33.000Z
gtsfm/frontend/matcher/twoway_matcher.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
13
2021-03-12T03:01:27.000Z
2022-03-11T03:16:54.000Z
"""Two way (mutual nearest neighbor) matcher. Authors: Ayush Baid """
36.258427
99
0.662225
"""Two way (mutual nearest neighbor) matcher. Authors: Ayush Baid """ from typing import Tuple import cv2 as cv import numpy as np from enum import Enum from gtsfm.common.keypoints import Keypoints from gtsfm.frontend.matcher.matcher_base import MatcherBase class MatchingDistanceType(Enum): """Type of distance...
0
0
0
2,918
0
0
0
56
180
9d1bdce1e84ea9684a0703d1c59967a6b5504000
1,489
py
Python
05_scrapy/mercadolibre/mercadolibre/spiders/spiderTelefono.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
05_scrapy/mercadolibre/mercadolibre/spiders/spiderTelefono.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
05_scrapy/mercadolibre/mercadolibre/spiders/spiderTelefono.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
1
2019-10-21T19:27:12.000Z
2019-10-21T19:27:12.000Z
## #comment_js_7me > div > div > div > div:nth-child(2) > div > div > div > div.UFICommentContent > div._26f8 > div > span
36.317073
122
0.612492
import scrapy from scrapy.loader import ItemLoader from mercadolibre.items import CelularItem def exportar_csv(titulo, precio, link): with open('telefonos.csv', 'a') as lista: lista.write(f'{titulo},{precio},{link}\n') lista.close() ## #comment_js_7me > div > div > div > div:nth-child(...
0
0
0
1,077
0
145
0
28
112
a7811d647b3531db47629ef05b4f782c03e57aed
3,068
py
Python
Competing_Algorithm/utils/sampleZ.py
ZhiQiu976/project-Indian-Buffet-Process
a4817550f2ca1778333066fa03ec6bb5b9cb4240
[ "MIT" ]
null
null
null
Competing_Algorithm/utils/sampleZ.py
ZhiQiu976/project-Indian-Buffet-Process
a4817550f2ca1778333066fa03ec6bb5b9cb4240
[ "MIT" ]
null
null
null
Competing_Algorithm/utils/sampleZ.py
ZhiQiu976/project-Indian-Buffet-Process
a4817550f2ca1778333066fa03ec6bb5b9cb4240
[ "MIT" ]
1
2020-04-30T17:26:26.000Z
2020-04-30T17:26:26.000Z
"""This module will update a binary feature matrix Z.""" import numpy as np import numpy.random as nr from . import logPX from . import logPV from . import sampleV # slice sampler def sampleZ(X, Z, A, sigma_x, sigma_a, alpha, K, N, D, realvaluedZ, proposeNewfeature): """Drawing Z using an uncollapsed Gibbs sampl...
36.963855
88
0.518253
"""This module will update a binary feature matrix Z.""" import numpy as np import numpy.random as nr from . import logPX from . import logPV from . import sampleV # slice sampler def sampleZ(X, Z, A, sigma_x, sigma_a, alpha, K, N, D, realvaluedZ, proposeNewfeature): """Drawing Z using an uncollapsed Gibbs sampl...
0
0
0
0
0
0
0
0
0
a84e390e80d0c49e198a6ba290ce1f9df51df7a9
323
py
Python
code-maker/util/standardlize_lflr.py
happyxianyu/SDML
4a85e47f8e5b0429f135af4e49639538ddb1fe1e
[ "Apache-2.0" ]
null
null
null
code-maker/util/standardlize_lflr.py
happyxianyu/SDML
4a85e47f8e5b0429f135af4e49639538ddb1fe1e
[ "Apache-2.0" ]
null
null
null
code-maker/util/standardlize_lflr.py
happyxianyu/SDML
4a85e47f8e5b0429f135af4e49639538ddb1fe1e
[ "Apache-2.0" ]
null
null
null
for p in source_file_paths + header_file_paths: content = None with p.open('r') as fr: content = fr.read() if content != None and '\r' in content: print(p) with p.open('w', encoding = 'UTF-8') as fw: fw.write(content)
24.846154
51
0.582043
from cbutil import Path from pathinfo import * for p in source_file_paths + header_file_paths: content = None with p.open('r') as fr: content = fr.read() if content != None and '\r' in content: print(p) with p.open('w', encoding = 'UTF-8') as fw: fw.write(content) ...
0
0
0
0
0
0
0
3
44
39ab4d9185087575448232d31b5e410639545354
548
py
Python
sbersignal/migrations/0009_auto_20160410_1018.py
kamirt/fordjango
7ef929facc3f7126de889e76d40441aa7fe620d3
[ "MIT" ]
null
null
null
sbersignal/migrations/0009_auto_20160410_1018.py
kamirt/fordjango
7ef929facc3f7126de889e76d40441aa7fe620d3
[ "MIT" ]
null
null
null
sbersignal/migrations/0009_auto_20160410_1018.py
kamirt/fordjango
7ef929facc3f7126de889e76d40441aa7fe620d3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-04-10 03:18 from __future__ import unicode_literals
26.095238
140
0.624088
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-04-10 03:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sbersignal', '0008_auto_20160410_1008'), ] operations = [ migrations.AlterFi...
40
0
0
350
0
0
0
19
46
71b3dd278d866246c7f7fea87727a4a5e03bd83f
5,318
py
Python
app.py
gSilas/pride-data-downloader
fdb040613bc0f1d75d04160e6fe313530cf5a86f
[ "MIT" ]
null
null
null
app.py
gSilas/pride-data-downloader
fdb040613bc0f1d75d04160e6fe313530cf5a86f
[ "MIT" ]
null
null
null
app.py
gSilas/pride-data-downloader
fdb040613bc0f1d75d04160e6fe313530cf5a86f
[ "MIT" ]
null
null
null
import logging import argparse import sys import os import json import time import datetime from writers import csv_writer from writers import json_writer from utils import memory_limit from accessors.pride_data import get_projectlist, write_archive_file, download_projectlist log = logging.getLogger('PrideData') log...
50.169811
159
0.679015
import logging import argparse import sys import os import json import time import datetime from writers import csv_writer from writers import json_writer from utils import get_memory from utils import memory_limit from accessors.pride_data import get_filelist, get_projectlist, write_archive_file, download_projectli...
0
0
0
0
0
0
0
21
23
7a2ab09598b349ef22788cd20503fbc5b39ae441
6,153
py
Python
tests/test_utils.py
jakub-w/youtube-dl-gui
ff807572f2dd08e51987fdcb351c8ab11cc03b38
[ "Unlicense" ]
null
null
null
tests/test_utils.py
jakub-w/youtube-dl-gui
ff807572f2dd08e51987fdcb351c8ab11cc03b38
[ "Unlicense" ]
null
null
null
tests/test_utils.py
jakub-w/youtube-dl-gui
ff807572f2dd08e51987fdcb351c8ab11cc03b38
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Contains test cases for the utils.py module.""" import sys from pathlib import Path PATH = Path(__file__).parent sys.path.insert(0, str(PATH.parent)) if __name__ == "__main__": main()
32.555556
97
0.672355
#!/usr/bin/env python # -*- coding: utf-8 -*- """Contains test cases for the utils.py module.""" import locale import sys import unittest from pathlib import Path from unittest import mock PATH = Path(__file__).parent sys.path.insert(0, str(PATH.parent)) from youtube_dl_gui import utils class TestUtils(unittest....
0
1,149
0
4,517
0
10
0
1
228
cc7906aa4ac492f7c84ee450ee655dcb15a23c8b
41
py
Python
fastsparse/__init__.py
dcato98/fastsparse
1a21fb95e1032f6578e196866bf8b14c5f4dd5cf
[ "Apache-2.0" ]
8
2020-11-20T14:53:17.000Z
2021-02-03T08:00:56.000Z
fastsparse/__init__.py
dcato98/fastsparse
1a21fb95e1032f6578e196866bf8b14c5f4dd5cf
[ "Apache-2.0" ]
3
2021-09-28T05:41:22.000Z
2022-02-26T10:15:28.000Z
fastsparse/__init__.py
dcato98/fastsparse
1a21fb95e1032f6578e196866bf8b14c5f4dd5cf
[ "Apache-2.0" ]
1
2021-02-03T08:01:03.000Z
2021-02-03T08:01:03.000Z
__version__ = "0.0.6"
20.5
21
0.682927
__version__ = "0.0.6" from .core import *
0
0
0
0
0
0
0
-2
22
ed765b4ce4aa56d61eef209b030265d4eded83b5
2,065
py
Python
bin/render.py
ak15199/smith
932d94f3c045f5344008e5f4c55acf8ba3c93270
[ "Apache-2.0" ]
null
null
null
bin/render.py
ak15199/smith
932d94f3c045f5344008e5f4c55acf8ba3c93270
[ "Apache-2.0" ]
null
null
null
bin/render.py
ak15199/smith
932d94f3c045f5344008e5f4c55acf8ba3c93270
[ "Apache-2.0" ]
null
null
null
BEFORE="""{% extends 'layouts/main.html' %} {% block content %} """ AFTER=""" {% endblock %} """ # add option for substitution if __name__ == '__main__': main()
22.445652
76
0.549637
import os from jinja2 import Environment, FileSystemLoader import pypandoc import click import pathlib import re BEFORE="""{% extends 'layouts/main.html' %} {% block content %} """ AFTER=""" {% endblock %} """ def block(name, string): return f"{{% block {name} %}}{string}{{% endblock {name} %}}" def substituti...
0
1,097
0
0
0
615
0
-19
200
3b73b6f0fb61a5565efb1f2d37f81a60c693b66e
2,372
py
Python
testcases/cloud_admin/3-1/Euca2244.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
testcases/cloud_admin/3-1/Euca2244.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
testcases/cloud_admin/3-1/Euca2244.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
''' Created on Oct 18, 2012 @author: mmunn Unit test : EUCA-2244 Default launch permission for user image (account resource) The fix for this issue changes the database so euca_conf --initialize must have been run with the fix present for this test to pass. setUp ...
42.357143
108
0.645447
''' Created on Oct 18, 2012 @author: mmunn Unit test : EUCA-2244 Default launch permission for user image (account resource) The fix for this issue changes the database so euca_conf --initialize must have been run with the fix present for this test to pass. setUp ...
0
0
0
1,466
0
0
0
38
89
6579a6cd57eff4cc853026147ddae93636d80e36
7,749
py
Python
django_remote_submission/migrations/0001_initial.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/migrations/0001_initial.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/migrations/0001_initial.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-09 19:01 from __future__ import unicode_literals import django.db.models.deletion
71.091743
304
0.657246
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-09 19:01 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import django_remote_submission.models import model_utils.fields impor...
0
0
0
7,398
0
0
0
48
156
12f11a88f3f1c03914d13b1857180f03b7eac300
966
py
Python
test-unit.py
lohhenzo/RAID-Validator
53a881b1d1d53950ed46cce794ed89d4571c5571
[ "MIT" ]
null
null
null
test-unit.py
lohhenzo/RAID-Validator
53a881b1d1d53950ed46cce794ed89d4571c5571
[ "MIT" ]
null
null
null
test-unit.py
lohhenzo/RAID-Validator
53a881b1d1d53950ed46cce794ed89d4571c5571
[ "MIT" ]
null
null
null
path = '/home/lorenzo/projects/assets/GCF_52/' #testMultiple() #testOne('20674984470_1') #testOne('20675014450_1') #testOne('20673569920_1') testWS('20673569920_1')
23
67
0.621118
import os,urllib, urllib2 import raid path = '/home/lorenzo/projects/assets/GCF_52/' def testMultiple(): gcfList = {} for filename in os.listdir(path): gcf = {filename: None} with open(path + filename, 'r') as file: gcf[filename] = file.read() gcfList.update(gcf) prin...
0
0
0
0
0
692
0
-6
113
7f324987106b2c16809b2ce865e5540f8a9b5671
2,203
py
Python
python/logger.py
MikaelBertze/HallonDispServer
0fcd4794a896819eb83192dd54186066e239ca1f
[ "MIT" ]
null
null
null
python/logger.py
MikaelBertze/HallonDispServer
0fcd4794a896819eb83192dd54186066e239ca1f
[ "MIT" ]
null
null
null
python/logger.py
MikaelBertze/HallonDispServer
0fcd4794a896819eb83192dd54186066e239ca1f
[ "MIT" ]
null
null
null
import os import paho.mqtt.client as mqtt import mysql.connector print("Starting up!") sql_host = os.environ['SQL_HOST'] sql_user = os.environ['SQL_USER'] sql_passwd = os.environ['SQL_PASSWD'] sql_database = os.environ['SQL_DATABASE'] mqtt_host = os.environ['MQTT_HOST'] mqtt_user = os.environ['MQTT_USER'] mqtt_...
30.178082
103
0.674989
import os import paho.mqtt.client as mqtt import time import mysql.connector import json def on_message(lient, userdata, message): global cnx query = None data = None if message.topic == "house/water": sensor_data = json.loads(str(message.payload.decode("utf-8"))) query = "INSERT INTO ...
0
0
0
0
0
1,180
0
-20
91
852e86f7ad8d09abceca87e8aa203bbf3768c7d0
303
py
Python
pdf.py
ash-ishh/tweetcompile
771dc4f4343bbab5949c9a9d1518fb757eb7516e
[ "MIT" ]
2
2019-05-28T12:00:03.000Z
2019-06-01T15:25:21.000Z
pdf.py
ash-ishh/tweetcompile
771dc4f4343bbab5949c9a9d1518fb757eb7516e
[ "MIT" ]
1
2019-05-28T12:00:52.000Z
2019-05-28T12:00:52.000Z
pdf.py
ash-ishh/tweetcompile
771dc4f4343bbab5949c9a9d1518fb757eb7516e
[ "MIT" ]
1
2022-01-13T15:34:19.000Z
2022-01-13T15:34:19.000Z
PAGE_SIZE = "A4"
21.642857
66
0.60066
import os import pdfkit PAGE_SIZE = "A4" class PDF: def __init__(self): self.options = { 'page-size': PAGE_SIZE, } def save_pdf(self, html_path, output_file): with open(html_path) as f: pdfkit.from_file(f, output_file, options=self.options)
0
0
0
239
0
0
0
-20
67
9c6105eebc990bfd34be438ec315fcbdf3a0fed8
1,690
py
Python
visualizer/plot_mf_param_opt/plot_fidelity/plot_eval_num_bar.py
buctlab/NIO
094e688dd1cd3def7f31cd16ff927d4324651422
[ "Apache-2.0" ]
4
2020-09-23T09:12:10.000Z
2022-01-17T08:43:32.000Z
visualizer/plot_mf_param_opt/plot_fidelity/plot_eval_num_bar.py
buctlab/NIO
094e688dd1cd3def7f31cd16ff927d4324651422
[ "Apache-2.0" ]
null
null
null
visualizer/plot_mf_param_opt/plot_fidelity/plot_eval_num_bar.py
buctlab/NIO
094e688dd1cd3def7f31cd16ff927d4324651422
[ "Apache-2.0" ]
5
2020-12-02T08:03:55.000Z
2022-03-05T18:04:00.000Z
import pandas as pd import logging logging.basicConfig() logger = logging.getLogger('PlotEvalNumBar') logger.setLevel('INFO') if __name__ == '__main__': csv_path = r"../../../tests/mf_param_opt_tests/output/FidelityLevelTest.csv" bar_path = r"output/PlotEvalNumBar/FidelityLevelEvalNum.png" data = pd.rea...
30.178571
127
0.638462
import matplotlib.pyplot as plt from numpy import arange import pandas as pd import os import logging logging.basicConfig() logger = logging.getLogger('PlotEvalNumBar') logger.setLevel('INFO') class PlotEvalNumBar: def __init__(self, data, path, show=False): self.data = data self.path = path ...
0
0
0
1,135
0
0
0
1
89
9beb3af02e0bfcd3027ca500a5a12142cae0e066
1,762
py
Python
examples/IrisClassification/predict.py
mlflow/mlflow-torchserve
91663b630ef12313da3ad821767faf3fc409345b
[ "Apache-2.0" ]
40
2020-11-13T02:08:10.000Z
2022-03-27T07:41:57.000Z
examples/IrisClassification/predict.py
Ideas2IT/mlflow-torchserve
d6300fb73f16d74ee2c7718c249faf485c4f3b62
[ "Apache-2.0" ]
23
2020-11-16T11:28:01.000Z
2021-09-23T11:28:24.000Z
examples/IrisClassification/predict.py
Ideas2IT/mlflow-torchserve
d6300fb73f16d74ee2c7718c249faf485c4f3b62
[ "Apache-2.0" ]
15
2020-11-13T10:25:25.000Z
2022-02-01T10:13:20.000Z
from argparse import ArgumentParser if __name__ == "__main__": parser = ArgumentParser(description="Iris Classifiation Model") parser.add_argument( "--target", type=str, default="torchserve", help="MLflow target (default: torchserve)", ) parser.add_argument( ...
25.536232
94
0.650397
import os import json import torch import ast from argparse import ArgumentParser from mlflow.deployments import get_deploy_client def convert_input_to_tensor(data): data = json.loads(data).get("data") input_tensor = torch.Tensor(ast.literal_eval(data[0])) return input_tensor def predict(parser_args): ...
0
0
0
0
0
773
0
-15
157
9b4cd6cac2f96c8e33cf4dfbdc876f8d09f61578
2,215
py
Python
maskrcnn.py
DinoHub/maskrcnn-benchmark
1de62203fd4d9857d2e5be355dcb7506bdfe6947
[ "MIT" ]
1
2019-07-17T03:55:03.000Z
2019-07-17T03:55:03.000Z
maskrcnn.py
DinoHub/maskrcnn-benchmark
1de62203fd4d9857d2e5be355dcb7506bdfe6947
[ "MIT" ]
null
null
null
maskrcnn.py
DinoHub/maskrcnn-benchmark
1de62203fd4d9857d2e5be355dcb7506bdfe6947
[ "MIT" ]
null
null
null
COCO_PERSON_INDEX = 1 if __name__ == '__main__': import cv2 # import numpy as np maskrcnn = MaskRCNN() img_path = '/home/dh/Pictures/studio8-30Nov18/DSC03887.JPG' img = cv2.imread(img_path) # masks, bboxes = chipsandmasks = maskrcnn.get_chips_and_masks(img) print(len(chipsandmasks)) ...
31.197183
142
0.57833
import torch from predictor import COCODemo from maskrcnn_benchmark.config import cfg COCO_PERSON_INDEX = 1 class MaskRCNN(object): def __init__(self, confidence_threshold=0.7): cfg.merge_from_file('e2e_mask_rcnn_R_50_FPN_1x_caffe2.yaml') cfg.MODEL.DEVICE cfg.freeze() self.model_wr...
0
0
0
1,633
0
0
0
20
105
f66cbb97c270f0b535ca4ad7e5674286d81a84e8
7,751
py
Python
src/spark/lang/bz.py
jbalint/spark
caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f
[ "CNRI-Jython" ]
1
2015-05-21T20:00:12.000Z
2015-05-21T20:00:12.000Z
src/spark/lang/bz.py
jbalint/spark
caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f
[ "CNRI-Jython" ]
null
null
null
src/spark/lang/bz.py
jbalint/spark
caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f
[ "CNRI-Jython" ]
null
null
null
#*****************************************************************************# #* Copyright (c) 2004-2008, SRI International. *# #* All rights reserved. *# #* ...
47.845679
110
0.631531
#*****************************************************************************# #* Copyright (c) 2004-2008, SRI International. *# #* All rights reserved. *# #* ...
0
0
0
1,278
137
425
0
168
265
b57ac56ea7ca46465f388084cf38f73565bb36b1
891
py
Python
auxiliary/expfit/fexpfit.py
zat1gi/stochastic
24f2b82f7fbe33671d7d6e0c0e8d1417edbe9cad
[ "BSD-3-Clause" ]
null
null
null
auxiliary/expfit/fexpfit.py
zat1gi/stochastic
24f2b82f7fbe33671d7d6e0c0e8d1417edbe9cad
[ "BSD-3-Clause" ]
38
2016-03-14T15:42:17.000Z
2016-05-02T22:15:33.000Z
auxiliary/expfit/fexpfit.py
zat1gi/stochastic
24f2b82f7fbe33671d7d6e0c0e8d1417edbe9cad
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # I read s [slab thickness], a [<sig^2>/<sig^2>], and lamcsig [log-normal lamc], # generate the real log-normal covariance function, and curve fit an exponential # to that data, yielding lamcw [Gaussian lamcw]. This allows use of exponential # covariance with fitted correlation length with only m...
35.64
80
0.736251
#!/usr/bin/env python # I read s [slab thickness], a [<sig^2>/<sig^2>], and lamcsig [log-normal lamc], # generate the real log-normal covariance function, and curve fit an exponential # to that data, yielding lamcw [Gaussian lamcw]. This allows use of exponential # covariance with fitted correlation length with only m...
0
0
0
0
0
171
0
0
46
0fb2223e04136b6d5add50420ab01f13e78cab6f
5,354
py
Python
helpers/gc_file_helpers.py
ibbad/dna-lceb-web
b4c1d4e121dfea992e072979bfdc0f313c781e32
[ "Apache-2.0" ]
null
null
null
helpers/gc_file_helpers.py
ibbad/dna-lceb-web
b4c1d4e121dfea992e072979bfdc0f313c781e32
[ "Apache-2.0" ]
null
null
null
helpers/gc_file_helpers.py
ibbad/dna-lceb-web
b4c1d4e121dfea992e072979bfdc0f313c781e32
[ "Apache-2.0" ]
null
null
null
""" This module contains the helpers functions for reading genetic code table information from json file. """ import json # Read the list of genetic codes and associated files in a dictionary. with open("gc_files/gc_file_associations.json") as gc_directory: gc_file_associations = json.load(gc_directory) def cod...
33.254658
80
0.603661
""" This module contains the helpers functions for reading genetic code table information from json file. """ import json # Read the list of genetic codes and associated files in a dictionary. with open("gc_files/gc_file_associations.json") as gc_directory: gc_file_associations = json.load(gc_directory) def cod...
0
0
0
0
0
0
0
0
0
eb8ec8f0946f2390c366c75fcc2b4a6433a54953
572
py
Python
master/admin.py
g12mcgov/grantmcgovern.com-V2
1fd920c6441dee914585577c5af6f2bc20309586
[ "Unlicense", "MIT" ]
1
2015-07-27T22:07:30.000Z
2015-07-27T22:07:30.000Z
master/admin.py
g12mcgov/grantmcgovern.com-V2
1fd920c6441dee914585577c5af6f2bc20309586
[ "Unlicense", "MIT" ]
10
2020-02-11T22:43:05.000Z
2022-03-11T23:13:08.000Z
master/admin.py
g12mcgov/grantmcgovern.com-V2
1fd920c6441dee914585577c5af6f2bc20309586
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: grantmcgovern # @Date: 2015-07-12 15:42:46 # @Email: me@grantmcgovern.com # @Web: http://grantmcgovern.com # # @Last Modified by: grantmcgovern # @Last Modified time: 2015-07-12 21:20:40 from django.contrib import admin from models import WorkExperi...
23.833333
56
0.730769
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: grantmcgovern # @Date: 2015-07-12 15:42:46 # @Email: me@grantmcgovern.com # @Web: http://grantmcgovern.com # # @Last Modified by: grantmcgovern # @Last Modified time: 2015-07-12 21:20:40 from django.contrib import admin from models import WorkExperi...
0
0
0
54
0
40
0
28
68
1aa29ea8e7e27d2762e41893de73c8e7fd40483c
1,088
py
Python
start-demos/lesson06/scores.py
Andyliwr/PythonStudyLoad
24d78da61740e310c33c3769c93a207bf0e665c8
[ "MIT" ]
1
2018-12-11T07:59:44.000Z
2018-12-11T07:59:44.000Z
start-demos/lesson06/scores.py
Andyliwr/python-learn
24d78da61740e310c33c3769c93a207bf0e665c8
[ "MIT" ]
null
null
null
start-demos/lesson06/scores.py
Andyliwr/python-learn
24d78da61740e310c33c3769c93a207bf0e665c8
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-*-coding:utf-8*- # student_num = int(input(': ')) student_name, physics_score, maths_score, history_score = '', 0, 0, 0 all_scores = [] for i in range(student_num): student_name = input(' {} : '.format(i+1)) physics_score = float(input(' {} : '.format(student_name))) maths_score = float(i...
49.454545
139
0.69761
#!/usr/bin/env python #-*-coding:utf-8*- # 程序实现的功能:计算分数 student_num = int(input('请输入学生数量: ')) student_name, physics_score, maths_score, history_score = '', 0, 0, 0 all_scores = [] for i in range(student_num): student_name = input('请输入第 {} 个学生的姓名: '.format(i+1)) physics_score = float(input('请输入 {} 的物理成绩: '.format(st...
222
0
0
0
0
0
0
0
0
92c5e9962b0c3c515e55547f7215a4ab353c3313
21,832
py
Python
proj/pred/app/run_job.py
ElofssonLab/web_topcons2
52b9a3ef9ca5e5392cf9b310a52f99e9422172ea
[ "MIT" ]
1
2018-11-07T21:16:13.000Z
2018-11-07T21:16:13.000Z
proj/pred/app/run_job.py
NBISweden/predictprotein-webserver-topcons2
78d4cfbf09b51c928639aea67063340ae4cc8c57
[ "MIT" ]
15
2019-03-04T14:22:52.000Z
2022-03-11T14:05:34.000Z
proj/pred/app/run_job.py
NBISweden/predictprotein-webserver-topcons2
78d4cfbf09b51c928639aea67063340ae4cc8c57
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Description: run job # ChangeLog # # ChangeLog 2015-02-12 # submit individual sequences to the workflow, so that the result of each # sequence can be cached and the progress can be shown for a job with many # sequences # ChangeLog 2015-03-26 # the tmpdir is rem...
41.348485
111
0.579883
#!/usr/bin/env python # -*- coding: utf-8 -*- # Description: run job # ChangeLog # # ChangeLog 2015-02-12 # submit individual sequences to the workflow, so that the result of each # sequence can be cached and the progress can be shown for a job with many # sequences # ChangeLog 2015-03-26 # the tmpdir is rem...
0
0
0
0
0
17,530
0
-54
223
541933e5eeb34eaaebb9b988a5367b63684e44d8
3,004
py
Python
src/ezdxf/math/__init__.py
mbway/ezdxf
d0b12ed8ddfa2225d11e61120d1f3ef24e4abb9c
[ "MIT" ]
null
null
null
src/ezdxf/math/__init__.py
mbway/ezdxf
d0b12ed8ddfa2225d11e61120d1f3ef24e4abb9c
[ "MIT" ]
null
null
null
src/ezdxf/math/__init__.py
mbway/ezdxf
d0b12ed8ddfa2225d11e61120d1f3ef24e4abb9c
[ "MIT" ]
null
null
null
# Purpose: math and construction tools # Created: 27.03.2010, 2018 integrated into ezdxf # Copyright (c) 2010-2020, Manfred Moitzi # License: MIT License def xround(value: float, rounding: float = 0.) -> float: """ Extended rounding function, argument `rounding` defines the rounding limit: ======= ======...
43.536232
117
0.750666
# Purpose: math and construction tools # Created: 27.03.2010, 2018 integrated into ezdxf # Copyright (c) 2010-2020, Manfred Moitzi # License: MIT License from .vector import Vector, Vec2, X_AXIS, Y_AXIS, Z_AXIS, NULLVEC from .construct2d import ( is_close_points, closest_point, convex_hull_2d, intersection_line_lin...
0
0
0
0
0
0
0
1,529
484
9ba875b6dfa18a6ce87e0ef2c02764f0a2a5e96d
452
py
Python
pt-1/sem_3/9.sem3_extra1-even-or-odd.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
pt-1/sem_3/9.sem3_extra1-even-or-odd.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
pt-1/sem_3/9.sem3_extra1-even-or-odd.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
main()
28.25
61
0.54646
def main(): print("** Bem-vindo ao separador de pares e impares! **") n1 = float(input("Digite o primeiro número: ")) n2 = float(input("Digite o segundo número: ")) n3 = float(input("Digite o terceiro número ")) n4 = float(input("Digite o quarto número ")) print("4" if n1 % 2 == 0 else "2"...
8
0
0
0
0
413
0
0
22
2ea3f10d0aa5cb8c27294023860fcb0ae3084228
1,969
py
Python
Algorithms_easy/1309. Decrypt String from Alphabet to Integer Mapping.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
4
2020-08-11T20:45:15.000Z
2021-03-12T00:33:34.000Z
Algorithms_easy/1309. Decrypt String from Alphabet to Integer Mapping.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
null
null
null
Algorithms_easy/1309. Decrypt String from Alphabet to Integer Mapping.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
null
null
null
""" 1309. Decrypt String from Alphabet to Integer Mapping Given a string s formed by digits ('0' - '9') and '#' . We want to map s to English lowercase characters as follows: Characters ('a' to 'i') are represented by ('1' to '9') respectively. Characters ('j' to 'z') are represented by ('10#' to '26#') respectively. ...
26.972603
116
0.492128
""" 1309. Decrypt String from Alphabet to Integer Mapping Given a string s formed by digits ('0' - '9') and '#' . We want to map s to English lowercase characters as follows: Characters ('a' to 'i') are represented by ('1' to '9') respectively. Characters ('j' to 'z') are represented by ('10#' to '26#') respectively. ...
0
0
0
1,008
0
0
0
0
46
94d719247220b9c78f22ce9adad4ed0ba748ed29
286
py
Python
example_idr.py
atharva-naik/social_media
520964efe938fb89d3b1caa64b231ab1a63e6c76
[ "BSD-3-Clause" ]
7
2020-12-13T13:31:16.000Z
2020-12-31T12:26:07.000Z
example_idr.py
atharva-naik/social_media
520964efe938fb89d3b1caa64b231ab1a63e6c76
[ "BSD-3-Clause" ]
4
2021-04-06T18:41:34.000Z
2021-09-08T02:52:35.000Z
example_idr.py
atharva-naik/social_media
520964efe938fb89d3b1caa64b231ab1a63e6c76
[ "BSD-3-Clause" ]
null
null
null
# to get instagram dms and reply to them from social_media.instagram.base import InstagramEngine i = InstagramEngine() i.login() profile = i.get_profile('a_the_rva', hard=True) profile.mount() messages = profile.get_messages() for message in messages: message.reply("I love you!")
26
55
0.762238
# to get instagram dms and reply to them from social_media.instagram.base import InstagramEngine i = InstagramEngine() i.login() profile = i.get_profile('a_the_rva', hard=True) profile.mount() messages = profile.get_messages() for message in messages: message.reply("I love you!")
0
0
0
0
0
0
0
0
0
6d0c3c06a47f9c4b82d0857063e25f6e299fa76d
1,620
py
Python
test/test_transient_keras_classifier.py
nswachow/SCST_Python
e1fcad12b5cac2136785c2e5725f9ea1292e8560
[ "MIT" ]
1
2020-11-19T20:59:06.000Z
2020-11-19T20:59:06.000Z
test/test_transient_keras_classifier.py
nswachow/SCST_Python
e1fcad12b5cac2136785c2e5725f9ea1292e8560
[ "MIT" ]
null
null
null
test/test_transient_keras_classifier.py
nswachow/SCST_Python
e1fcad12b5cac2136785c2e5725f9ea1292e8560
[ "MIT" ]
null
null
null
from keras.models import Sequential from keras.layers import Dense from transient_keras.transient_keras_classifier import TransientKerasClassifier from test_tools import getTrainDict, getTestSequence def testKerasSequenceClassifier(): ''' Use randomly generated vector sequences to evaluate the ``TransientKer...
31.153846
99
0.724074
import numpy as np from keras.models import Sequential from keras.layers import Dense from transient_keras.transient_keras_classifier import TransientKerasClassifier from test_tools import getTrainDict, getTestSequence def testKerasSequenceClassifier(): ''' Use randomly generated vector sequences to evaluate...
0
0
0
0
0
0
0
-3
22
e475169a55fac3fd91a7b0a4e2d263cad7216384
13,098
py
Python
vrc_online/session/views.py
IntusFacultas/ERC
b6ac71b6469f1325d5cdbd1761429f33d8a797b1
[ "Apache-2.0" ]
null
null
null
vrc_online/session/views.py
IntusFacultas/ERC
b6ac71b6469f1325d5cdbd1761429f33d8a797b1
[ "Apache-2.0" ]
null
null
null
vrc_online/session/views.py
IntusFacultas/ERC
b6ac71b6469f1325d5cdbd1761429f33d8a797b1
[ "Apache-2.0" ]
null
null
null
# Avoid shadowing the login() and logout() views below. from django.shortcuts import redirect
36.48468
86
0.621393
import warnings from django.conf import settings # Avoid shadowing the login() and logout() views below. from django.contrib import messages from django.contrib.auth import ( get_user_model, update_session_auth_hash ) from django.contrib.auth.forms import ( PasswordResetForm, SetPasswordForm, PasswordChangeFor...
0
5,197
0
3,089
0
2,903
0
863
939
1357e4f8ed42457bb66767fe96aa7f66d28a41de
1,863
py
Python
hass_apps/loader.py
taste66/hass-apps
93f03a823f0ed8b3b32be5da30c5aaf0fcb1d92a
[ "Apache-2.0" ]
null
null
null
hass_apps/loader.py
taste66/hass-apps
93f03a823f0ed8b3b32be5da30c5aaf0fcb1d92a
[ "Apache-2.0" ]
null
null
null
hass_apps/loader.py
taste66/hass-apps
93f03a823f0ed8b3b32be5da30c5aaf0fcb1d92a
[ "Apache-2.0" ]
null
null
null
""" This module contains code that dynamically scans for available apps at module load time. For all apps found, a loader is generated which, when called, imports the particular app and behaves like the app class itself. The loaders are made available as module attributes under the same name the corresponding app class...
33.872727
75
0.70424
""" This module contains code that dynamically scans for available apps at module load time. For all apps found, a loader is generated which, when called, imports the particular app and behaves like the app class itself. The loaders are made available as module attributes under the same name the corresponding app class...
0
0
0
0
603
479
0
-29
159
e6be95fb22b49aa360b1f08fbb9c102ecbfb83e2
40,892
py
Python
src/estimagic/optimization/pygmo_optimizers.py
janosg/estimagic
58e17ff94339076f4b7688b1dbef5685f48157e2
[ "BSD-3-Clause" ]
7
2019-05-11T07:19:46.000Z
2019-05-31T07:03:13.000Z
src/estimagic/optimization/pygmo_optimizers.py
janosg/estimagic
58e17ff94339076f4b7688b1dbef5685f48157e2
[ "BSD-3-Clause" ]
14
2019-05-04T14:15:52.000Z
2019-06-10T11:45:27.000Z
src/estimagic/optimization/pygmo_optimizers.py
janosg/estimagic
58e17ff94339076f4b7688b1dbef5685f48157e2
[ "BSD-3-Clause" ]
1
2019-05-21T08:44:37.000Z
2019-05-21T08:44:37.000Z
"""Implement pygmo optimizers.""" import warnings from estimagic import batch_evaluators from estimagic.config import IS_PYGMO_INSTALLED from estimagic.exceptions import NotInstalledError STOPPING_MAX_ITERATIONS_GENETIC = 250 try: import pygmo as pg except ImportError: pass # ===============...
28.240331
91
0.667955
"""Implement pygmo optimizers.""" import warnings import numpy as np from estimagic import batch_evaluators from estimagic.config import IS_PYGMO_INSTALLED from estimagic.decorators import mark_minimizer from estimagic.exceptions import NotInstalledError from estimagic.optimization.algo_options import CONVERGENCE_RELA...
0
33,347
0
612
0
2,005
0
164
618
aa8e80a11374f536d6f8226228fb4e265fc72598
7,616
py
Python
src/python/site-packages/longbow/DoxygenReport.py
rayyagar/LongBow
0efa9dbf16f8a7f4e71c3f445ce2a68221eaddb2
[ "BSD-2-Clause" ]
null
null
null
src/python/site-packages/longbow/DoxygenReport.py
rayyagar/LongBow
0efa9dbf16f8a7f4e71c3f445ce2a68221eaddb2
[ "BSD-2-Clause" ]
null
null
null
src/python/site-packages/longbow/DoxygenReport.py
rayyagar/LongBow
0efa9dbf16f8a7f4e71c3f445ce2a68221eaddb2
[ "BSD-2-Clause" ]
null
null
null
#! /usr/bin/env python # Copyright (c) 2015, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source cod...
37.70297
113
0.676733
#! /usr/bin/env python # Copyright (c) 2015, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source cod...
0
0
0
0
0
3,489
0
-60
339
fd9284c572bc4169504dc1dff7cc22a2b558e89e
283
py
Python
Python/2021/Class 2/Student Code/Daksh Leekha/ass4.py
aravg12/summer-of-qode
bd9d11cd6ca41e4b19f25a0248ba25a7582b20e6
[ "MIT" ]
14
2021-05-30T08:18:59.000Z
2021-06-08T14:28:18.000Z
Python/2021/Class 2/Student Code/Daksh Leekha/ass4.py
aravg12/summer-of-qode
bd9d11cd6ca41e4b19f25a0248ba25a7582b20e6
[ "MIT" ]
3
2021-06-02T15:26:16.000Z
2021-06-06T10:17:39.000Z
Python/2021/Class 2/Student Code/Daksh Leekha/ass4.py
aravg12/summer-of-qode
bd9d11cd6ca41e4b19f25a0248ba25a7582b20e6
[ "MIT" ]
47
2021-05-26T14:59:12.000Z
2021-06-12T12:01:57.000Z
while True: num = float(input("Please enter a number: ")) if num > 10: print(f"\nYour number, {num}, is more than 10!") elif num < 10: print(f"\nYour number, {num}, is less than 10!") else: print("\nYour number is equal to 10!")
23.583333
57
0.533569
while True: num = float(input("Please enter a number: ")) if num > 10: print(f"\nYour number, {num}, is more than 10!") elif num < 10: print(f"\nYour number, {num}, is less than 10!") else: print("\nYour number is equal to 10!")
0
0
0
0
0
0
0
0
0
03dbd00a43c371b0681fb38c5b89320067150321
572
py
Python
workflow/migrations/0022_auto_20190830_0126.py
tanmayagarwal/Activity-CE
a49c47053b191ffa5aee9a06e66a7c9644804434
[ "Apache-2.0" ]
1
2021-07-07T14:39:23.000Z
2021-07-07T14:39:23.000Z
workflow/migrations/0022_auto_20190830_0126.py
michaelbukachi/Activity
f3d4f4da88ae9539c341ca73cc559b850693d669
[ "Apache-2.0" ]
null
null
null
workflow/migrations/0022_auto_20190830_0126.py
michaelbukachi/Activity
f3d4f4da88ae9539c341ca73cc559b850693d669
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2 on 2019-08-30 01:26
28.6
184
0.685315
# Generated by Django 2.2 on 2019-08-30 01:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('workflow', '0021_auto_20190829_0154'), ] operations = [ migrations.AlterField( model_name='projec...
0
0
0
427
0
0
0
30
68
02e37289e35d88f7b49409315dff85e822b7a9f9
587
py
Python
Problemset/chou-shu-lcof/chou-shu-lcof.py
worldwonderer/algorithm
083178b2d987de7f6020aceca869a353c0b4b1f3
[ "MIT" ]
1
2021-01-30T01:52:46.000Z
2021-01-30T01:52:46.000Z
Problemset/chou-shu-lcof/chou-shu-lcof.py
worldwonderer/algorithm
083178b2d987de7f6020aceca869a353c0b4b1f3
[ "MIT" ]
1
2021-12-15T14:54:06.000Z
2021-12-15T14:54:06.000Z
Problemset/chou-shu-lcof/chou-shu-lcof.py
worldwonderer/algorithm
083178b2d987de7f6020aceca869a353c0b4b1f3
[ "MIT" ]
2
2021-04-19T03:32:18.000Z
2021-06-22T07:06:01.000Z
# @Title: ( LCOF) # @Author: 18015528893 # @Date: 2021-01-26 17:11:46 # @Runtime: 140 ms # @Memory: 14.9 MB if __name__ == '__main__': s = Solution() s.nthUglyNumber(10)
20.964286
50
0.413969
# @Title: 丑数 (丑数 LCOF) # @Author: 18015528893 # @Date: 2021-01-26 17:11:46 # @Runtime: 140 ms # @Memory: 14.9 MB class Solution: def nthUglyNumber(self, n: int) -> int: dp = [1] * n a, b, c = 0, 0, 0 for i in range(1, n): n2, n3, n5 = 2*dp[a], 3*dp[b], 5*dp[c] dp[i]...
12
0
0
377
0
0
0
0
23
cef608a2677b59679950d1207c29fe7e139a9084
125
py
Python
examples/underscored/class_attribute.py
doboy/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
7
2016-09-23T00:44:05.000Z
2021-10-04T21:19:12.000Z
examples/underscored/class_attribute.py
jameswu1991/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
1
2016-09-23T00:45:05.000Z
2019-02-16T19:05:37.000Z
examples/underscored/class_attribute.py
jameswu1991/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
3
2016-09-23T01:13:15.000Z
2018-07-20T21:22:17.000Z
# class Bar: # x = 1 # # print(Bar.x) (___,) = (1,) print _.x (Bar,) = (_,)
8.928571
16
0.384
# class Bar: # x = 1 # # print(Bar.x) (___,) = (1,) class _: __ = ___ (x,) = (__,) print _.x (Bar,) = (_,)
0
0
0
17
0
0
0
0
23
6460f246a4ce450308dee6dd7392b20d8dd71d9e
3,612
py
Python
tainan_scripts/parse_data.py
NCKU-CCS/dengue-fever-website
6b0df1ffc1b1d9d35178c3de4e1b1190fda452e0
[ "MIT" ]
null
null
null
tainan_scripts/parse_data.py
NCKU-CCS/dengue-fever-website
6b0df1ffc1b1d9d35178c3de4e1b1190fda452e0
[ "MIT" ]
null
null
null
tainan_scripts/parse_data.py
NCKU-CCS/dengue-fever-website
6b0df1ffc1b1d9d35178c3de4e1b1190fda452e0
[ "MIT" ]
null
null
null
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import csv from datetime import datetime from geopy.distance import vincenty import json def write_csv(file_name, content): """write csv""" with open(file_name, 'w') as output_file: writer = csv.writer(output_file) writer.writerows(content) def ...
31.684211
72
0.593023
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import requests import csv import sys from datetime import datetime from geopy.distance import vincenty import json def read_csv(file_name): data = [] with open(file_name, 'r') as input_file: reader = csv.reader(input_file) for row in reader: ...
12
0
0
0
0
206
0
-17
66
71843a3646a5e48d45b9b291a93a48dccb1af0e1
13,874
py
Python
copm_spider/sohu/sohu/spiders/bbs_spider.py
tzattack/public_opinion_analysis
ed29e5b53564563ac6233de7d49afdd5ee554920
[ "MIT" ]
null
null
null
copm_spider/sohu/sohu/spiders/bbs_spider.py
tzattack/public_opinion_analysis
ed29e5b53564563ac6233de7d49afdd5ee554920
[ "MIT" ]
null
null
null
copm_spider/sohu/sohu/spiders/bbs_spider.py
tzattack/public_opinion_analysis
ed29e5b53564563ac6233de7d49afdd5ee554920
[ "MIT" ]
null
null
null
bbs_city_url_list = [ "https://bbs.focus.cn/anshan/", "https://bbs.focus.cn/ankang/", "https://bbs.focus.cn/anqing/", "https://bbs.focus.cn/anshun/", "https://bbs.focus.cn/anyang/", "https://bbs.focus.cn/aomen/", "https://bbs.focus.cn/byne/", "https://bbs.focus.cn/bazhong/", "https:...
36.510526
97
0.580006
import re import os import shutil import scrapy from sohu.items import BBSItem bbs_city_url_list = [ "https://bbs.focus.cn/anshan/", "https://bbs.focus.cn/ankang/", "https://bbs.focus.cn/anqing/", "https://bbs.focus.cn/anshun/", "https://bbs.focus.cn/anyang/", "https://bbs.focus.cn/aomen/", ...
15
0
0
3,525
0
0
0
-31
133
7176bc4205f4322db3c5e7e892b53eb4fd2dc19b
639
py
Python
today_problems/211005/2616.py
mangab0159/baekjoon
c5f130d4068ae4a658ddbadf4b1f0cb0a8e00230
[ "MIT" ]
null
null
null
today_problems/211005/2616.py
mangab0159/baekjoon
c5f130d4068ae4a658ddbadf4b1f0cb0a8e00230
[ "MIT" ]
null
null
null
today_problems/211005/2616.py
mangab0159/baekjoon
c5f130d4068ae4a658ddbadf4b1f0cb0a8e00230
[ "MIT" ]
null
null
null
import sys ifunc, g = lambda: [*map(int, sys.stdin.readline().rstrip().split())], range n = ifunc()[0] iList = ifunc() m = ifunc()[0] dp = [[-1]*3 for _ in g(n)] pSum = [0] aSum = 0 for item in iList: aSum += item pSum.append(aSum) for idx in g(n-1, -1, -1): for cnt in g(3): aVal = -1 b...
17.75
76
0.458529
import sys ifunc, g = lambda: [*map(int, sys.stdin.readline().rstrip().split())], range n = ifunc()[0] iList = ifunc() m = ifunc()[0] dp = [[-1]*3 for _ in g(n)] pSum = [0] aSum = 0 for item in iList: aSum += item pSum.append(aSum) for idx in g(n-1, -1, -1): for cnt in g(3): aVal = -1 b...
0
0
0
0
0
0
0
0
0
916117d928266e5c477f46841db96a70176e9178
699
py
Python
nautobot_chatops_ipfabric/context.py
justinjeffery-ipf/nautobot-plugin-chatops-ipfabric
67e58e3d251b41227808cabd6120d78411193863
[ "Apache-2.0" ]
6
2021-11-26T15:50:21.000Z
2022-01-25T18:36:44.000Z
nautobot_chatops_ipfabric/context.py
justinjeffery-ipf/nautobot-plugin-chatops-ipfabric
67e58e3d251b41227808cabd6120d78411193863
[ "Apache-2.0" ]
21
2021-11-30T02:31:40.000Z
2022-02-17T04:17:36.000Z
nautobot_chatops_ipfabric/context.py
justinjeffery-ipf/nautobot-plugin-chatops-ipfabric
67e58e3d251b41227808cabd6120d78411193863
[ "Apache-2.0" ]
2
2022-01-18T17:53:29.000Z
2022-02-16T16:06:15.000Z
"""Functions for caching per-user context.""" import hashlib from django.core.cache import cache from . import IPFabricConfig def _get_cache_key(user: str) -> str: """Key generator for the cache, adding the plugin prefix name.""" key_string = "-".join([IPFabricConfig.name, user]) return hashlib.md5(key_st...
31.772727
82
0.699571
"""Functions for caching per-user context.""" import hashlib from django.core.cache import cache from . import IPFabricConfig def _get_cache_key(user: str) -> str: """Key generator for the cache, adding the plugin prefix name.""" key_string = "-".join([IPFabricConfig.name, user]) return hashlib.md5(key_st...
0
0
0
0
0
0
0
0
0
cbdd353e24127433a693c7b17b59da30a2b8a103
47
py
Python
giant/__init__.py
lixar/giant
fba966e4389b80b38bee1067ad9173adf4eaa5b5
[ "MIT" ]
null
null
null
giant/__init__.py
lixar/giant
fba966e4389b80b38bee1067ad9173adf4eaa5b5
[ "MIT" ]
2
2016-05-26T14:40:07.000Z
2017-04-13T21:07:16.000Z
giant/__init__.py
lixar/giant
fba966e4389b80b38bee1067ad9173adf4eaa5b5
[ "MIT" ]
null
null
null
#!/usr/bin/env python
15.666667
24
0.744681
#!/usr/bin/env python from .giant import giant
0
0
0
0
0
0
0
3
23
48a935e65dd689781f77476b198cac53679ffe77
760
py
Python
SegNet/visualise.py
Edumate696/SemanticSeg
5dc676abd5c19682e4656d71f6ae6e2d13c1ac26
[ "MIT" ]
null
null
null
SegNet/visualise.py
Edumate696/SemanticSeg
5dc676abd5c19682e4656d71f6ae6e2d13c1ac26
[ "MIT" ]
null
null
null
SegNet/visualise.py
Edumate696/SemanticSeg
5dc676abd5c19682e4656d71f6ae6e2d13c1ac26
[ "MIT" ]
null
null
null
from matplotlib import pyplot as plt plt.style.use("ggplot")
31.666667
91
0.669737
import random from matplotlib import pyplot as plt plt.style.use("ggplot") def plot_random_sample(X_train, y_train): # Visualize any random image along with the mask ix = random.randint(0, len(X_train)) has_mask = y_train[ix].max() > 0 # salt indicator fig, (ax1, ax2) = plt.subplots(1, 2, figsize=...
0
0
0
0
0
659
0
-8
45
ece77431e149ca3928831e59116063bf668aa7d5
521
py
Python
setup.py
poemdistance/BingTran
04e097119a574acafc0b28c96941c731aa96f5ad
[ "MIT" ]
1
2020-07-04T03:17:14.000Z
2020-07-04T03:17:14.000Z
setup.py
poemdistance/BingTran
04e097119a574acafc0b28c96941c731aa96f5ad
[ "MIT" ]
null
null
null
setup.py
poemdistance/BingTran
04e097119a574acafc0b28c96941c731aa96f5ad
[ "MIT" ]
1
2021-10-30T15:29:17.000Z
2021-10-30T15:29:17.000Z
#!/usr/bin/python3 from distutils.core import setup #from setuptools import setup setup( name = "Bing Translate", version = "1.0", author = "poemdistance", author_email = "poemdistance@gmail.com", url = "", packages = ['bing'], cmdclass={'install':command} )
22.652174
53
0.650672
#!/usr/bin/python3 from distutils.core import setup #from setuptools import setup from setuptools.command.install import install import os class command(install): def run(self): print('Coping execution file to /usr/bin') os.system("cp -v bing/main.py /usr/bin/bing") install.run(self) setu...
0
0
0
152
0
0
0
13
67
63519207c2622bc4ec107b738c5fc96d7820ea32
3,109
py
Python
ykman/cli/util.py
elukewalker/yubikey-manager
13e5bb323a66aed29f2f865253e6088ac1ec5861
[ "BSD-2-Clause" ]
null
null
null
ykman/cli/util.py
elukewalker/yubikey-manager
13e5bb323a66aed29f2f865253e6088ac1ec5861
[ "BSD-2-Clause" ]
1
2018-05-07T07:34:23.000Z
2018-05-07T13:44:29.000Z
ykman/cli/util.py
elukewalker/yubikey-manager
13e5bb323a66aed29f2f865253e6088ac1ec5861
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2015 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
34.164835
79
0.671277
# Copyright (c) 2015 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
0
600
0
463
0
294
0
-5
182
c5e1bdb2fd50c8a247843a31096a4032aab2cf11
16,587
py
Python
Tephigram/Tephigram_From_Radiosonde_By_Date.py
peterwilletts24/Python-Scripts
975d6b2e2923cbde40d2760eb9574acee2e10388
[ "MIT" ]
4
2017-05-24T09:14:14.000Z
2019-01-02T19:20:38.000Z
Tephigram/Tephigram_From_Radiosonde_By_Date.py
peterwilletts24/Python-Scripts
975d6b2e2923cbde40d2760eb9574acee2e10388
[ "MIT" ]
null
null
null
Tephigram/Tephigram_From_Radiosonde_By_Date.py
peterwilletts24/Python-Scripts
975d6b2e2923cbde40d2760eb9574acee2e10388
[ "MIT" ]
3
2017-05-24T09:14:15.000Z
2020-09-28T08:32:02.000Z
# Now make a simple example using the custom projection. import pdb import sys import os import pkg_resources pkg_resources.require('matplotlib==1.4.0') import datetime from dateutil.relativedelta import relativedelta import re import math from matplotlib.ticker import ScalarFormatter, MultipleLocator from matplotlib...
44.469169
276
0.488696
# Now make a simple example using the custom projection. import pdb import sys import os import pkg_resources pkg_resources.require('matplotlib==1.4.0') import datetime from dateutil.relativedelta import relativedelta import re import math from matplotlib.ticker import ScalarFormatter, MultipleLocator from matplotlib...
0
0
0
0
0
275
0
21
112
28ec7f08b0ef63749cdda909a0cfb1bf3e7ebb8b
3,100
py
Python
torchvision/edgeailite/xnn/utils/weights_utils.py
TexasInstruments/vision
abaf29de0798e8e8d3f996dc272cd3c515562695
[ "BSD-3-Clause" ]
21
2021-10-08T02:47:56.000Z
2022-03-29T14:17:04.000Z
torchvision/xnn/utils/weights_utils.py
leidi1989/edgeai-torchvision
94bd2d8a01fac800e7df82dd710b3cc13f9a24ea
[ "BSD-3-Clause" ]
9
2021-11-15T06:43:54.000Z
2022-03-16T04:47:52.000Z
torchvision/xnn/utils/weights_utils.py
leidi1989/edgeai-torchvision
94bd2d8a01fac800e7df82dd710b3cc13f9a24ea
[ "BSD-3-Clause" ]
9
2021-11-11T11:17:16.000Z
2022-03-08T04:26:10.000Z
################################################################################# # Copyright (c) 2018-2021, Texas Instruments Incorporated - http://www.ti.com # All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditio...
50.819672
125
0.669677
################################################################################# # Copyright (c) 2018-2021, Texas Instruments Incorporated - http://www.ti.com # All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditio...
0
0
0
0
0
1,311
0
-9
46
0208465a5d1ab407c0486c21de6f1e5021a8704e
8,783
py
Python
MachineLearningPyFiles_DataScience/demo19_kfoldclassificationwine.py
mahnooranjum/Programming_DataScience
f7a4215d4615b3f8460c3a1944a585628cf6930d
[ "MIT" ]
null
null
null
MachineLearningPyFiles_DataScience/demo19_kfoldclassificationwine.py
mahnooranjum/Programming_DataScience
f7a4215d4615b3f8460c3a1944a585628cf6930d
[ "MIT" ]
null
null
null
MachineLearningPyFiles_DataScience/demo19_kfoldclassificationwine.py
mahnooranjum/Programming_DataScience
f7a4215d4615b3f8460c3a1944a585628cf6930d
[ "MIT" ]
null
null
null
# Visualising the results """## Get Wine Dataset""" from sklearn.datasets import load_wine data = load_wine() data.keys() X = data.data y = data.target from sklearn.model_selection import KFold kf = KFold(n_splits=4) kf.get_n_splits(X) print(kf) for train_index, test_index in kf.split(X): X_train, X_test = X[t...
38.52193
107
0.748036
import numpy as np import matplotlib.pyplot as plt import pandas as pd def evaluate(y_test, y_pred): from sklearn.metrics import accuracy_score print("===== Accuracy Score =====") print(accuracy_score(y_test, y_pred)) from sklearn.metrics import classification_report print("===== Accuracy Score =====") c...
0
0
0
0
0
5,704
0
5
411
378c076ecb27922a28a5e0f844859a82a4d35191
17,070
py
Python
psl_class.py
shane-kerr/ProSafeLinux
c821a83a036757a52313b93bf7cc9de625a816da
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
psl_class.py
shane-kerr/ProSafeLinux
c821a83a036757a52313b93bf7cc9de625a816da
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
psl_class.py
shane-kerr/ProSafeLinux
c821a83a036757a52313b93bf7cc9de625a816da
[ "BSD-2-Clause-FreeBSD" ]
1
2019-09-28T10:20:26.000Z
2019-09-28T10:20:26.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- "Main Class to communicate with gs108e and gs105e netgear switches" import binascii import struct import socket import fcntl import errno def get_hw_addr(ifname): "gives the hardware (mac) address of an interface (eth0,eth1..)" sock = socket.socket(socket.AF_INET, so...
39.331797
80
0.587522
#!/usr/bin/python # -*- coding: utf-8 -*- "Main Class to communicate with gs108e and gs105e netgear switches" import time import binascii import pprint import random import struct import socket import fcntl import psl_typ import inspect import errno def get_hw_addr(ifname): "gives the hardware (mac) address of a...
0
339
0
14,605
0
0
0
-40
133
6975219d67978b32abca1912305f92e399d8929f
3,596
py
Python
tests/test_parser.py
ousttrue/cpptypeinfo
38b219ec5683dbba380e6f5ca2074c1ea0ccfaa9
[ "MIT" ]
1
2021-03-22T10:19:52.000Z
2021-03-22T10:19:52.000Z
tests/test_parser.py
ousttrue/cpptypeinfo
38b219ec5683dbba380e6f5ca2074c1ea0ccfaa9
[ "MIT" ]
null
null
null
tests/test_parser.py
ousttrue/cpptypeinfo
38b219ec5683dbba380e6f5ca2074c1ea0ccfaa9
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
39.516484
79
0.55228
import unittest from cpptypeinfo import ( TypeParser, Float, Double, Bool, Void, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, ) from cpptypeinfo.usertype import (Pointer, Array, Field, Struct, Param, Func...
0
0
0
3,189
0
0
0
264
71
ad6cb13482b4769b31aa3da89de989f9961164ab
2,631
py
Python
test.py
Jaiswal-ruhil/SmartSchema
47c2b525cfbdd8f00a78329667fb4a4cdcf8377c
[ "MIT" ]
null
null
null
test.py
Jaiswal-ruhil/SmartSchema
47c2b525cfbdd8f00a78329667fb4a4cdcf8377c
[ "MIT" ]
null
null
null
test.py
Jaiswal-ruhil/SmartSchema
47c2b525cfbdd8f00a78329667fb4a4cdcf8377c
[ "MIT" ]
null
null
null
# import sys # sys.path.append("/home/ruhil/Dropbox/projects/python3-SmartSchema/SmartSchema/SmartSchema") from SmartSchema import SmartSchema if __name__ == "__main__": InvoiceSchema = { "type": "object", "required": [ "reciver", "issuer", "inv_date" ...
28.290323
93
0.372102
# import sys # sys.path.append("/home/ruhil/Dropbox/projects/python3-SmartSchema/SmartSchema/SmartSchema") from SmartSchema import SmartSchema def reducedqty(inst): y = 0 for x in inst["qty"]: y = y + x['qty'] return y if __name__ == "__main__": InvoiceSchema = { "type": "object", ...
0
0
0
0
0
74
0
0
23
0bc8b29c196877264a4cd5a0acf5df842f160f5d
16,937
py
Python
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/subscriber/subscribergxinterface.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/subscriber/subscribergxinterface.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/subscriber/subscribergxinterface.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2008-2016 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
41.109223
487
0.752908
# # Copyright (c) 2008-2016 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
0
12,995
0
2,878
0
0
0
292
158
e96950bff16083d411860e5492e2b1dd64d42547
249
py
Python
src/test/resources/org/jenkinsci/plugins/django/simple_test_project/bdd_tests/bdd_settings.py
evili/django-jenkis-plugin
60931ba3e2bbae8918d99a2d2dbd51d1b10fc5a1
[ "Apache-2.0" ]
1
2015-03-10T03:01:44.000Z
2015-03-10T03:01:44.000Z
src/test/resources/org/jenkinsci/plugins/django/simple_test_project/bdd_tests/bdd_settings.py
evili/django-jenkis-plugin
60931ba3e2bbae8918d99a2d2dbd51d1b10fc5a1
[ "Apache-2.0" ]
43
2015-03-03T07:25:05.000Z
2022-03-31T04:14:35.000Z
src/test/resources/org/jenkinsci/plugins/django/simple_test_project/bdd_tests/bdd_settings.py
evili/django-jenkis-plugin
60931ba3e2bbae8918d99a2d2dbd51d1b10fc5a1
[ "Apache-2.0" ]
null
null
null
INSTALLED_APPS += ('bdd_tests',) TEST_RUNNER = 'django_behave.runner.DjangoBehaveTestSuiteRunner' #'django_behave.runner.DjangoBehaveTestSuiteRunner' #'django_behave.runner.DjangoBehaveOnlyTestSuiteRunner'
35.571429
64
0.851406
from django_test_deploy.settings import * INSTALLED_APPS += ('bdd_tests',) TEST_RUNNER = 'django_behave.runner.DjangoBehaveTestSuiteRunner' #'django_behave.runner.DjangoBehaveTestSuiteRunner' #'django_behave.runner.DjangoBehaveOnlyTestSuiteRunner'
0
0
0
0
0
0
0
20
22
5d61c18e96146d4ed0c3a487a99ff5f9121130dd
455
py
Python
addons/datatask/client/datatask/run.py
aixieluo/giftware
51166699cf75e3d6029fab47a65b092ad5c9f658
[ "Apache-2.0" ]
null
null
null
addons/datatask/client/datatask/run.py
aixieluo/giftware
51166699cf75e3d6029fab47a65b092ad5c9f658
[ "Apache-2.0" ]
null
null
null
addons/datatask/client/datatask/run.py
aixieluo/giftware
51166699cf75e3d6029fab47a65b092ad5c9f658
[ "Apache-2.0" ]
null
null
null
import worker import configparser import os import const cfgpath = os.path.join(const.ROOT_PATH, './config.ini') conf = configparser.ConfigParser() conf.read(cfgpath, encoding="utf-8") tasks = conf.get('main', 'task').split(',') for code in tasks: token = conf.get(code, 'token') url = conf.get('...
22.75
56
0.663736
from datetime import datetime import worker import configparser import os import sys import const cfgpath = os.path.join(const.ROOT_PATH, './config.ini') conf = configparser.ConfigParser() conf.read(cfgpath, encoding="utf-8") tasks = conf.get('main', 'task').split(',') for code in tasks: token = co...
0
0
0
0
0
0
0
-3
46
080515e61c43971ada47f3234d130ead2fb49828
929
py
Python
tadpole/template/app/models/auth/relation.py
echoyuanliang/pine
22175e6aea0ca9b02d6542677b27a690c1501c9c
[ "MIT" ]
2
2017-12-02T07:02:31.000Z
2020-10-13T02:20:18.000Z
tadpole/template/app/models/auth/relation.py
echoyuanliang/pine
22175e6aea0ca9b02d6542677b27a690c1501c9c
[ "MIT" ]
null
null
null
tadpole/template/app/models/auth/relation.py
echoyuanliang/pine
22175e6aea0ca9b02d6542677b27a690c1501c9c
[ "MIT" ]
1
2018-04-23T04:59:38.000Z
2018-04-23T04:59:38.000Z
#!/usr/bin/env python # coding: utf-8 """ create at 2017/11/19 by allen """ from datetime import datetime from app.lib.database import db, Column user_role = db.Table('user_role', Column('user_id', db.Integer, db.ForeignKey('user.id')), Column('role_id', db.Integer, db.F...
34.407407
98
0.482239
#!/usr/bin/env python # coding: utf-8 """ create at 2017/11/19 by allen """ from datetime import datetime from app.lib.database import db, Column user_role = db.Table('user_role', Column('user_id', db.Integer, db.ForeignKey('user.id')), Column('role_id', db.Integer, db.F...
0
0
0
0
0
0
0
0
0
90b1da90b1d33f95ba087a027df383f19ea25f89
6,161
py
Python
holidays/countries/south_africa.py
m-ganko/python-holidays
f0d5a91f8bee8661ef3440bde2302332a364877e
[ "MIT" ]
null
null
null
holidays/countries/south_africa.py
m-ganko/python-holidays
f0d5a91f8bee8661ef3440bde2302332a364877e
[ "MIT" ]
2
2021-06-18T11:50:15.000Z
2021-07-13T14:29:46.000Z
holidays/countries/south_africa.py
m-ganko/python-holidays
f0d5a91f8bee8661ef3440bde2302332a364877e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Author: ryanss <ryanssdev@icl...
35.005682
79
0.546665
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Author: ryanss <ryanssdev@icl...
0
0
0
5,293
0
0
0
160
204
55f54c0c1070b2a6f342f324df0835dabe98dfc3
767
py
Python
baitola.py
silvioSCM/Python_estudos-e-arquivos
e1edf24559b8cd0fa7403fd52162d8af37294150
[ "MIT" ]
null
null
null
baitola.py
silvioSCM/Python_estudos-e-arquivos
e1edf24559b8cd0fa7403fd52162d8af37294150
[ "MIT" ]
null
null
null
baitola.py
silvioSCM/Python_estudos-e-arquivos
e1edf24559b8cd0fa7403fd52162d8af37294150
[ "MIT" ]
null
null
null
import time print('Bem vindo!! eu sou Priscila, a assistente A.I..') time.sleep(2) print("Por favor...qual o seu nome?") seu_nome = input() time.sleep(3) print(f"{seu_nome},Voc acha que o Jlio baitola?") baitola = input(f"Responda 'S' ou 'N'..." ) nao_baitola = (baitola) print("Calculando......") time.sleep(3) print(...
27.392857
67
0.674055
import time print('Bem vindo!! eu sou Priscila, a assistente A.I..') time.sleep(2) print("Por favor...qual o seu nome?") seu_nome = input() time.sleep(3) print(f"{seu_nome},Você acha que o Júlio é baitola?") baitola = input(f"Responda 'S' ou 'N'..." ) nao_baitola = (baitola) print("Calculando......") time.sleep(3) pri...
18
0
0
0
0
0
0
0
0
f7cca90e39d1e49138b473e2b3404c20a21d2682
967
py
Python
test/test_self_ref.py
ybrs/mongomodels
0337480589369dba0135245481439bcd161ef6ab
[ "MIT" ]
6
2015-05-05T18:37:08.000Z
2022-03-26T04:18:02.000Z
test/test_self_ref.py
ybrs/mongomodels
0337480589369dba0135245481439bcd161ef6ab
[ "MIT" ]
null
null
null
test/test_self_ref.py
ybrs/mongomodels
0337480589369dba0135245481439bcd161ef6ab
[ "MIT" ]
null
null
null
import unittest import logging logging.basicConfig(level=logging.DEBUG) if __name__ == '__main__': unittest.main()
29.30303
70
0.679421
import unittest import pymongo import logging logging.basicConfig(level=logging.DEBUG) from mongomodels import connections, MongoModel, String, Integer, \ Column, or_, ValidationError, Boolean, belongs_to class Category(MongoModel): name = Column(String, required=True) belongs_to('category', rel_column='...
0
0
0
664
0
0
0
93
91
37b36acd36e98b0d69b09c07782fbb93be932247
6,095
py
Python
agora/graph/__init__.py
oeg-upm/agora-py
0c7e495a8c7023aaf79ed9dc91ef954f4519f60a
[ "Apache-2.0" ]
null
null
null
agora/graph/__init__.py
oeg-upm/agora-py
0c7e495a8c7023aaf79ed9dc91ef954f4519f60a
[ "Apache-2.0" ]
3
2018-02-06T17:44:00.000Z
2021-01-12T06:22:40.000Z
agora/graph/__init__.py
oeg-upm/agora-py
0c7e495a8c7023aaf79ed9dc91ef954f4519f60a
[ "Apache-2.0" ]
1
2018-05-07T07:30:57.000Z
2018-05-07T07:30:57.000Z
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Ontology Engineering Group http://www.oeg-upm.net/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Copyright (C) 2016 Ontology Engineering Group. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-...
36.065089
111
0.590156
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Ontology Engineering Group http://www.oeg-upm.net/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Copyright (C) 2016 Ontology Engineering Group. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-...
0
96
0
3,056
0
859
0
79
277
0b9b6bb87bc907d1141e684668a7a503622eb019
35,191
py
Python
mathics/builtin/string/operations.py
skirpichev/Mathics
318e06dea8f1c70758a50cb2f95c9900150e3a68
[ "Apache-2.0" ]
1,920
2015-01-06T17:56:26.000Z
2022-03-24T14:33:29.000Z
mathics/builtin/string/operations.py
skirpichev/Mathics
318e06dea8f1c70758a50cb2f95c9900150e3a68
[ "Apache-2.0" ]
868
2015-01-04T06:19:40.000Z
2022-03-14T13:39:38.000Z
mathics/builtin/string/operations.py
skirpichev/Mathics
318e06dea8f1c70758a50cb2f95c9900150e3a68
[ "Apache-2.0" ]
240
2015-01-16T13:31:26.000Z
2022-03-12T12:52:46.000Z
# -*- coding: utf-8 -*- """ Operations on Strings """
33.230406
136
0.555682
# -*- coding: utf-8 -*- """ Operations on Strings """ import re from mathics.version import __version__ # noqa used in loading to check consistency. from mathics.builtin.base import ( BinaryOperator, Builtin, ) from mathics.core.expression import ( Expression, Integer, Integer1, String, ...
0
702
0
33,621
0
0
0
368
434
a1b8279c46ab312d0fb0144512fd0fc54c45005b
1,494
py
Python
PythonAPI/examples/TestBench/older_mixed_files/environment_setup.py
Abanoub-G/carla_0.9.11
d7f6188fb745409047edc7151cb97c3d20472867
[ "MIT" ]
null
null
null
PythonAPI/examples/TestBench/older_mixed_files/environment_setup.py
Abanoub-G/carla_0.9.11
d7f6188fb745409047edc7151cb97c3d20472867
[ "MIT" ]
null
null
null
PythonAPI/examples/TestBench/older_mixed_files/environment_setup.py
Abanoub-G/carla_0.9.11
d7f6188fb745409047edc7151cb97c3d20472867
[ "MIT" ]
null
null
null
# from shapely.geometry import Polygon
21.970588
57
0.668005
from shapely.geometry import Polygon import math import numpy as np import random from shapely.geometry import Point # from shapely.geometry import Polygon def Ticking(world,frame): # Tick world.tick() # Get world snapshot world_snapshot = world.get_snapshot() ts = world_snapshot.timestamp if fra...
0
0
0
0
0
1,220
0
7
226