hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
fd14235a97115d0da605df7efd9315bb578a44f1
101
py
Python
run_kbstopwatch.py
mwiens91/kb-stopwatch
0eec6bd942ca1e9786f36d8e577ce304b58d77a3
[ "MIT" ]
null
null
null
run_kbstopwatch.py
mwiens91/kb-stopwatch
0eec6bd942ca1e9786f36d8e577ce304b58d77a3
[ "MIT" ]
null
null
null
run_kbstopwatch.py
mwiens91/kb-stopwatch
0eec6bd942ca1e9786f36d8e577ce304b58d77a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Runs kb-stopwatch.""" from kbstopwatch.main import main # Run it main()
11.222222
33
0.683168
#!/usr/bin/env python3 """Runs kb-stopwatch.""" from kbstopwatch.main import main # Run it main()
0
0
0
a20c02cbb720f1bb48ec57842efc94d26eab867b
4,527
py
Python
transduction_based/laplacian_tags.py
vohoaiviet/tag-image-retrieval
0a257560581f702cd394f3f28c9e0f6202827ce8
[ "MIT" ]
50
2015-11-04T15:53:09.000Z
2022-01-03T14:46:17.000Z
transduction_based/laplacian_tags.py
vohoaiviet/tag-image-retrieval
0a257560581f702cd394f3f28c9e0f6202827ce8
[ "MIT" ]
2
2018-03-07T09:51:50.000Z
2018-10-13T11:05:13.000Z
transduction_based/laplacian_tags.py
vohoaiviet/tag-image-retrieval
0a257560581f702cd394f3f28c9e0f6202827ce8
[ "MIT" ]
17
2015-10-26T03:41:49.000Z
2021-08-23T08:11:05.000Z
#!/usr/bin/env python # encoding: utf-8 import sys, os import numpy as np import bisect import scipy.io import bisect import math import h5py from nltk.corpus import wordnet as wn from nltk.corpus import wordnet_ic from basic.constant import ROOT_PATH from basic.common import makedirsforfile, checkToSkip, printStatus...
34.295455
181
0.662249
#!/usr/bin/env python # encoding: utf-8 import sys, os import numpy as np import bisect import scipy.io import bisect import math import h5py from nltk.corpus import wordnet as wn from nltk.corpus import wordnet_ic from basic.constant import ROOT_PATH from basic.common import makedirsforfile, checkToSkip, printStatus...
3,858
0
69
f7b24a3ed38cb3ed9682bfcbcf9843f1d5c4f3d8
11,103
py
Python
layers/qlib.py
astonzhang/Parameterization-of-Hypercomplex-Multiplications
0e3f1ceebccce9f14ce629356733c07602eb351c
[ "Apache-2.0" ]
10
2021-12-24T17:13:59.000Z
2022-03-22T10:15:00.000Z
layers/qlib.py
astonzhang/Parameterization-of-Hypercomplex-Multiplications
0e3f1ceebccce9f14ce629356733c07602eb351c
[ "Apache-2.0" ]
null
null
null
layers/qlib.py
astonzhang/Parameterization-of-Hypercomplex-Multiplications
0e3f1ceebccce9f14ce629356733c07602eb351c
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np from numpy.random import RandomState from tensorflow.python.framework import dtypes from tensorflow.python.ops import random_ops import random """ Quarternion layers ...
30.841667
154
0.665766
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np from numpy.random import RandomState from tensorflow.python.framework import dtypes from tensorflow.python.ops import random_ops import random """ Quarternion layers ...
1,561
1,275
253
71ef1c0962702fc6f2da6abacd53906df9d377f8
42,856
py
Python
hfc/protos/token/prover_pb2.py
hyperledger-gerrit-archive/fabric-sdk-py
0432d0ebce06a053d55febf7ed793dd163fcb68c
[ "Apache-2.0" ]
null
null
null
hfc/protos/token/prover_pb2.py
hyperledger-gerrit-archive/fabric-sdk-py
0432d0ebce06a053d55febf7ed793dd163fcb68c
[ "Apache-2.0" ]
1
2019-12-09T05:05:41.000Z
2019-12-09T05:05:41.000Z
hfc/protos/token/prover_pb2.py
hyperledger-gerrit-archive/fabric-sdk-py
0432d0ebce06a053d55febf7ed793dd163fcb68c
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: hfc/protos/token/prover.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import refl...
40.430189
3,733
0.757584
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: hfc/protos/token/prover.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import refl...
0
0
0
98227190b48433b30a13ee88906b852b86929253
2,899
py
Python
instagram_scraper/auth/authentication.py
davidargylethacker/instagram-scraper
b58760d90aa492f8d7795da572e822d7047a52a5
[ "Unlicense" ]
null
null
null
instagram_scraper/auth/authentication.py
davidargylethacker/instagram-scraper
b58760d90aa492f8d7795da572e822d7047a52a5
[ "Unlicense" ]
null
null
null
instagram_scraper/auth/authentication.py
davidargylethacker/instagram-scraper
b58760d90aa492f8d7795da572e822d7047a52a5
[ "Unlicense" ]
null
null
null
import json import requests from instagram_scraper.constants import BASE_URL, STORIES_UA, LOGIN_URL, LOGOUT_URL CHROME_WIN_UA = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36'
38.653333
127
0.617799
import json import requests from instagram_scraper.constants import BASE_URL, STORIES_UA, LOGIN_URL, LOGOUT_URL CHROME_WIN_UA = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36' class Authentication(object): def __init__(self): self.logged_...
137
2,495
23
76e2b89bed1f1e5e61c69927513e3fe46864ced5
2,051
py
Python
assessor_mark2.py
piyushsingariya/assessor-series
263b5852b83689f25e03fb2efb174b1aa13c7cf2
[ "MIT" ]
1
2019-06-16T17:15:41.000Z
2019-06-16T17:15:41.000Z
assessor_mark2.py
piyushsingariya/assessor-series
263b5852b83689f25e03fb2efb174b1aa13c7cf2
[ "MIT" ]
null
null
null
assessor_mark2.py
piyushsingariya/assessor-series
263b5852b83689f25e03fb2efb174b1aa13c7cf2
[ "MIT" ]
null
null
null
# Determining interface details with netfaces library # This script uses a number of functions to accomplish specific tasks # including get_networks, get_addresses, get_gateways and get_interfaces import netifaces import sys try: import netifaces except: sys.exit("[!] Install the netifaces library: pip install...
33.080645
121
0.714286
# Determining interface details with netfaces library # This script uses a number of functions to accomplish specific tasks # including get_networks, get_addresses, get_gateways and get_interfaces import netifaces import sys try: import netifaces except: sys.exit("[!] Install the netifaces library: pip install...
1,216
0
93
1e458847a7ea5ac7e0e6b7cd0b13973ccc014c9c
1,180
py
Python
controllers/user.py
brianpesy/DevCamp
48576ef93a1a33d2ea0f2d3901bee77c158d8767
[ "BSD-3-Clause" ]
null
null
null
controllers/user.py
brianpesy/DevCamp
48576ef93a1a33d2ea0f2d3901bee77c158d8767
[ "BSD-3-Clause" ]
null
null
null
controllers/user.py
brianpesy/DevCamp
48576ef93a1a33d2ea0f2d3901bee77c158d8767
[ "BSD-3-Clause" ]
null
null
null
from helpers import functions from flask import Flask, request, session, url_for, redirect, \ render_template, abort, g, flash, _app_ctx_stack from werkzeug import check_password_hash, generate_password_hash def login(): """Logs the user in.""" if g.user: return redirect(functions.url_for('/')) ...
32.777778
66
0.611864
from helpers import functions from flask import Flask, request, session, url_for, redirect, \ render_template, abort, g, flash, _app_ctx_stack from werkzeug import check_password_hash, generate_password_hash def login(): """Logs the user in.""" if g.user: return redirect(functions.url_for('/')) ...
0
0
0
e706ff590d0748c75f079ded5d16403c7851b34f
42,001
py
Python
src/nanoSessionKontrol/ChannelStripController.py
lmarie23/nanoSessionKontrol
4a307464556734f03d4d073c377cebe1587d9316
[ "Apache-2.0" ]
1
2021-06-06T07:20:18.000Z
2021-06-06T07:20:18.000Z
src/nanoSessionKontrol/ChannelStripController.py
lmarie23/nanoSessionKontrol
4a307464556734f03d4d073c377cebe1587d9316
[ "Apache-2.0" ]
null
null
null
src/nanoSessionKontrol/ChannelStripController.py
lmarie23/nanoSessionKontrol
4a307464556734f03d4d073c377cebe1587d9316
[ "Apache-2.0" ]
null
null
null
#Embedded file name: /Users/versonator/Hudson/live/Projects/AppLive/Resources/MIDI Remote Scripts/MackieControl/ChannelStripController.py from itertools import chain from .MHControlComponent import * from _Generic.Devices import * class ChannelStripController(MHControlComponent): """ Controls all channel-...
48.725058
188
0.649794
#Embedded file name: /Users/versonator/Hudson/live/Projects/AppLive/Resources/MIDI Remote Scripts/MackieControl/ChannelStripController.py from itertools import chain from .MHControlComponent import * from _Generic.Devices import * class ChannelStripController(MHControlComponent): """ Controls all channel-...
13,355
0
459
ab774b27049c59a7c1608f2fef3901d45566ef6f
81
py
Python
Aula09/ex14.py
danicon/Curso_Python
18fb4aad975bdc3b96cb5320331dbc7d3c3a459d
[ "MIT" ]
null
null
null
Aula09/ex14.py
danicon/Curso_Python
18fb4aad975bdc3b96cb5320331dbc7d3c3a459d
[ "MIT" ]
null
null
null
Aula09/ex14.py
danicon/Curso_Python
18fb4aad975bdc3b96cb5320331dbc7d3c3a459d
[ "MIT" ]
null
null
null
nome = str(input('Digite o seu nome: ')) nom = nome.title() print('Silva' in nom)
27
40
0.654321
nome = str(input('Digite o seu nome: ')) nom = nome.title() print('Silva' in nom)
0
0
0
4c05ba9565f2cbca21d16be983c81c5b28beccd3
402
py
Python
09 Sorting/3 insertionSort.py
harshrajm/Python-Algo-DS
02437fa923b2b6264b29bd7ba84ccbb7feb9c8f0
[ "MIT" ]
null
null
null
09 Sorting/3 insertionSort.py
harshrajm/Python-Algo-DS
02437fa923b2b6264b29bd7ba84ccbb7feb9c8f0
[ "MIT" ]
null
null
null
09 Sorting/3 insertionSort.py
harshrajm/Python-Algo-DS
02437fa923b2b6264b29bd7ba84ccbb7feb9c8f0
[ "MIT" ]
null
null
null
print(insertionSort([55,3,2,5,6,75,4]))
21.157895
61
0.487562
def insertionSort(arr): for i in range(1,len(arr)): currentVal = arr[i] position = i while position > 0 and arr[position-1] > currentVal: arr[position] = arr[position-1] position = position - 1 arr[p...
332
0
25
e1877cfa1bdf9f6a3b42eb79a4b5b0362841a6c8
350
py
Python
PyMOTW/source/argparse/argparse_mutually_exclusive.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2019-01-04T05:47:50.000Z
2019-01-04T05:47:50.000Z
PyMOTW/source/argparse/argparse_mutually_exclusive.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2020-07-18T03:52:03.000Z
2020-07-18T04:18:01.000Z
PyMOTW/source/argparse/argparse_mutually_exclusive.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
2
2021-03-06T04:28:32.000Z
2021-03-06T04:59:17.000Z
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """ """ #end_pymotw_header import argparse parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() group.add_argument('-a', action='store_true') group.add_argument('-b', action='store_true'...
18.421053
57
0.737143
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """ """ #end_pymotw_header import argparse parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() group.add_argument('-a', action='store_true') group.add_argument('-b', action='store_true'...
0
0
0
3fbb83487a465a1a51cc8203d043aefa5f77fea9
2,306
py
Python
example/server.py
inovonics/cloud-oauth
951124100dd45204c3325b975084fa9690d16147
[ "MIT" ]
1
2017-10-19T19:23:38.000Z
2017-10-19T19:23:38.000Z
example/server.py
inovonics/cloud-oauth
951124100dd45204c3325b975084fa9690d16147
[ "MIT" ]
3
2017-12-04T18:11:31.000Z
2018-04-10T23:58:59.000Z
example/server.py
inovonics/cloud-oauth
951124100dd45204c3325b975084fa9690d16147
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # === IMPORTS === import logging import os from flask import Flask from inovonics.cloud.datastore import InoRedis from inovonics.cloud.oauth import InoOAuth2Provider, oauth_register_handlers from inovonics.cloud.oauth import OAuthClients, OAuthClient, OAuthUsers, OAuthUser # === GLOBALS === ...
27.452381
114
0.669124
#!/usr/bin/env python3 # === IMPORTS === import logging import os from flask import Flask from inovonics.cloud.datastore import InoRedis from inovonics.cloud.oauth import InoOAuth2Provider, oauth_register_handlers from inovonics.cloud.oauth import OAuthClients, OAuthClient, OAuthUsers, OAuthUser # === GLOBALS === ...
1,349
0
88
efbb55992e67f2574dbed2a58dbe02993a8fd9cc
8,122
py
Python
social_exclusion/tests.py
AWI-Lab/otree
6815c38a92cd93540f6e9c7ebdaecf90627ca865
[ "MIT" ]
3
2017-03-10T18:56:57.000Z
2019-03-07T18:18:37.000Z
social_exclusion/tests.py
AWI-Lab/otree
6815c38a92cd93540f6e9c7ebdaecf90627ca865
[ "MIT" ]
null
null
null
social_exclusion/tests.py
AWI-Lab/otree
6815c38a92cd93540f6e9c7ebdaecf90627ca865
[ "MIT" ]
null
null
null
from otree.api import Currency as c, currency_range from . import views from ._builtin import Bot from .models import Constants from otree.api import SubmissionMustFail
44.626374
123
0.573381
from otree.api import Currency as c, currency_range from . import views from ._builtin import Bot from .models import Constants from otree.api import SubmissionMustFail class PlayerBot(Bot): # in allplay_1 all players invite # in allplay_2 some not invite but no majority # in notallplay there is a maj...
7,290
635
23
6586336720ee9e57187421d19fc6336e7ecc0c4a
707
py
Python
tests/test_sftp.py
somenzz/transferfile
0b718ee43a5ea4e728e23bf2bf7d92ca0f2aa413
[ "MIT" ]
1
2021-06-08T06:20:45.000Z
2021-06-08T06:20:45.000Z
tests/test_sftp.py
somenzz/transferfile
0b718ee43a5ea4e728e23bf2bf7d92ca0f2aa413
[ "MIT" ]
null
null
null
tests/test_sftp.py
somenzz/transferfile
0b718ee43a5ea4e728e23bf2bf7d92ca0f2aa413
[ "MIT" ]
null
null
null
from transferfile import TransferFactory from pathlib import Path
33.666667
88
0.62942
from transferfile import TransferFactory from pathlib import Path class TestTransfer: def test_sftp_put(self): sftp = TransferFactory.create( type="sftp", host="172.17.0.2", username="admin", load_system_host_keys=True ) sftp.put("testsftp.txt", "/home/admin/testsftp.txt") ...
566
-2
76
bdf6fc45c72e4cc335707fd6de0a5dd2d2ecb997
1,256
py
Python
sandbox/server.py
tacosync/quote-socket
e65b79968663d9d5a0d991166e791e0ee1029a91
[ "MIT" ]
null
null
null
sandbox/server.py
tacosync/quote-socket
e65b79968663d9d5a0d991166e791e0ee1029a91
[ "MIT" ]
1
2020-06-17T08:55:54.000Z
2020-06-17T08:55:54.000Z
sandbox/server.py
tacosync/quote-socket
e65b79968663d9d5a0d991166e791e0ee1029a91
[ "MIT" ]
null
null
null
''' Socket.IO server for testing CLI: python -m watchgod server.main [aiohttp|sanic|tornado|asgi] Test results: | connect | disconnect | event | background_task | Ctrl+C ---------+---------+------------+-------+-----------------|-------- aiohttp | O | O | O | X ...
27.911111
70
0.494427
''' Socket.IO server for testing CLI: python -m watchgod server.main [aiohttp|sanic|tornado|asgi] Test results: | connect | disconnect | event | background_task | Ctrl+C ---------+---------+------------+-------+-----------------|-------- aiohttp | O | O | O | X ...
416
0
25
5d135caa4532bcc7d1789591afc459bd38d60010
323
py
Python
1/video2frames.py
AnushK-Fro/ASCII-Video-Discord-Bot
c18e2278075e254f91492abb844713b7e5367542
[ "MIT" ]
null
null
null
1/video2frames.py
AnushK-Fro/ASCII-Video-Discord-Bot
c18e2278075e254f91492abb844713b7e5367542
[ "MIT" ]
null
null
null
1/video2frames.py
AnushK-Fro/ASCII-Video-Discord-Bot
c18e2278075e254f91492abb844713b7e5367542
[ "MIT" ]
null
null
null
import cv2 video_file_name = "" if __name__ == '__main__': FrameCapture(video_file_name)
20.1875
49
0.606811
import cv2 video_file_name = "" def FrameCapture(path): vidObj = cv2.VideoCapture(path) count = 0 success = 1 while success: success, image = vidObj.read() cv2.imwrite("frame%d.jpg" % count, image) count += 1 if __name__ == '__main__': FrameCapture(video_file_nam...
199
0
25
8a1fa51fea4d1f0796cf567794820f1f43be633e
14,907
py
Python
vpv/model/model.py
mpi2/vpv
3d0445fa36a8916dfbeed07f50e702b1ffe0973a
[ "Apache-2.0" ]
2
2016-08-15T22:06:28.000Z
2016-11-15T14:23:37.000Z
vpv/model/model.py
mpi2/vpv
3d0445fa36a8916dfbeed07f50e702b1ffe0973a
[ "Apache-2.0" ]
1
2018-07-30T22:47:37.000Z
2018-07-30T22:47:37.000Z
vpv/model/model.py
mpi2/vpv
3d0445fa36a8916dfbeed07f50e702b1ffe0973a
[ "Apache-2.0" ]
1
2020-08-05T03:54:02.000Z
2020-08-05T03:54:02.000Z
# Copyright 2016 Medical Research Council Harwell. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
37.08209
146
0.581673
# Copyright 2016 Medical Research Council Harwell. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
3,090
179
320
7f31bb9213a5312eb7c272816e3ae00023c5e887
16,836
py
Python
python2.7/site-packages/twisted/trial/test/test_reporter.py
84KaliPleXon3/sslstrip-hsts-openwrt
f875ded48078a3ed84bffef1e69dcbeaf2e77ae3
[ "MIT" ]
4
2020-10-31T19:52:05.000Z
2021-09-22T11:39:27.000Z
python2.7/site-packages/twisted/trial/test/test_reporter.py
84KaliPleXon3/sslstrip-hsts-openwrt
f875ded48078a3ed84bffef1e69dcbeaf2e77ae3
[ "MIT" ]
null
null
null
python2.7/site-packages/twisted/trial/test/test_reporter.py
84KaliPleXon3/sslstrip-hsts-openwrt
f875ded48078a3ed84bffef1e69dcbeaf2e77ae3
[ "MIT" ]
2
2020-02-27T08:28:35.000Z
2020-09-13T12:39:26.000Z
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # # Maintainer: Jonathan Lange <jml@twistedmatrix.com> import errno, sys, os, re, StringIO from twisted.internet.utils import suppressWarnings from twisted.python import failure from twisted.trial import unittest, runner, reporter, util...
35.897655
79
0.622238
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # # Maintainer: Jonathan Lange <jml@twistedmatrix.com> import errno, sys, os, re, StringIO from twisted.internet.utils import suppressWarnings from twisted.python import failure from twisted.trial import unittest, runner, reporter, util...
11,697
3,167
1,209
beb3e066fe6e8c920e49769ce5fec01b8e52d337
218
py
Python
run.py
lowell-dev-club/live-flask-workshop
a57a3db79fd772a6676ad3bce1ff45e1a5c1c06d
[ "MIT" ]
null
null
null
run.py
lowell-dev-club/live-flask-workshop
a57a3db79fd772a6676ad3bce1ff45e1a5c1c06d
[ "MIT" ]
null
null
null
run.py
lowell-dev-club/live-flask-workshop
a57a3db79fd772a6676ad3bce1ff45e1a5c1c06d
[ "MIT" ]
null
null
null
# Import Flask app object from project folder (For python this means from the __init__.py file) from project import app # Run flask app with debug on and listening on port 8000 app.run( debug=True, port=8000 )
27.25
95
0.747706
# Import Flask app object from project folder (For python this means from the __init__.py file) from project import app # Run flask app with debug on and listening on port 8000 app.run( debug=True, port=8000 )
0
0
0
acb8f38d1fce7e807bb197cfdc155940d8636b58
704
py
Python
Section 4 - Lists/prediction exercise.py
gitjot/python-for-lccs
a8a4ae8847abbc33361f80183c06d57b20523382
[ "CC0-1.0" ]
10
2020-02-14T14:28:15.000Z
2022-02-02T18:44:11.000Z
Section 4 - Lists/prediction exercise.py
gitjot/python-for-lccs
a8a4ae8847abbc33361f80183c06d57b20523382
[ "CC0-1.0" ]
null
null
null
Section 4 - Lists/prediction exercise.py
gitjot/python-for-lccs
a8a4ae8847abbc33361f80183c06d57b20523382
[ "CC0-1.0" ]
8
2020-03-25T09:27:42.000Z
2021-11-03T15:24:38.000Z
# Event: LCCS Python Fundamental Skills Workshop # Date: May 2018 # Author: Joe English, PDST # eMail: computerscience@pdst.ie # Purpose: Prediction exercise fruits = ['Strawberry', 'Lemon', 'Orange', 'Raspberry', 'Cherry'] print(fruits[0]) print(fruits[3]) print(fruits[2]) print(fruits[len(fruits)-1]) pr...
23.466667
66
0.693182
# Event: LCCS Python Fundamental Skills Workshop # Date: May 2018 # Author: Joe English, PDST # eMail: computerscience@pdst.ie # Purpose: Prediction exercise fruits = ['Strawberry', 'Lemon', 'Orange', 'Raspberry', 'Cherry'] print(fruits[0]) print(fruits[3]) print(fruits[2]) print(fruits[len(fruits)-1]) pr...
0
0
0
b5797a6e0b5ac972df8e6cf74d6538070b12831e
762
py
Python
src/Overload.py
LukeMcCulloch/PyCFD
6720e6575e25f8c274ef591d6c215de90a740935
[ "MIT" ]
1
2020-07-04T15:42:15.000Z
2020-07-04T15:42:15.000Z
src/Overload.py
LukeMcCulloch/PyCFD
6720e6575e25f8c274ef591d6c215de90a740935
[ "MIT" ]
null
null
null
src/Overload.py
LukeMcCulloch/PyCFD
6720e6575e25f8c274ef591d6c215de90a740935
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Jan 4 07:43:40 2020 @author: lukemcculloch """ import numpy as np
21.771429
45
0.566929
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Jan 4 07:43:40 2020 @author: lukemcculloch """ import numpy as np class Overload(object): def __init__(self, vector): self.vector = vector self.parentcell = [] def __add__(self, other): if isinstance(...
430
2
178
8f049df44809d1fe48e8f05eb98329ff0b64f235
126
py
Python
clu/__init__.py
basameera/CLI-Utils
7f52ffa3fee29ee7a7d864a497e4f947f94c40e0
[ "MIT" ]
null
null
null
clu/__init__.py
basameera/CLI-Utils
7f52ffa3fee29ee7a7d864a497e4f947f94c40e0
[ "MIT" ]
1
2020-05-06T20:37:48.000Z
2020-05-06T20:37:48.000Z
clu/__init__.py
basameera/CLI-Utils
7f52ffa3fee29ee7a7d864a497e4f947f94c40e0
[ "MIT" ]
null
null
null
from .vsr import VERSION __version__ = VERSION __author__ = 'Sameera Sandaruwan' __author_email__ = 'basameera@protonmail.com'
31.5
45
0.81746
from .vsr import VERSION __version__ = VERSION __author__ = 'Sameera Sandaruwan' __author_email__ = 'basameera@protonmail.com'
0
0
0
44af19045c58f933bd90128459e09cb4e7656830
3,295
py
Python
simpleblog/tests/test_functional_tests.py
blacktower2016/simpleblog
e0a7e79de7daf3774518a21f6e3c808e2fc79ec5
[ "MIT" ]
null
null
null
simpleblog/tests/test_functional_tests.py
blacktower2016/simpleblog
e0a7e79de7daf3774518a21f6e3c808e2fc79ec5
[ "MIT" ]
null
null
null
simpleblog/tests/test_functional_tests.py
blacktower2016/simpleblog
e0a7e79de7daf3774518a21f6e3c808e2fc79ec5
[ "MIT" ]
null
null
null
from django.test import LiveServerTestCase from selenium import webdriver from django.urls import reverse from django.utils.translation import activate, gettext_lazy as _ from .creation_utils import create_user, create_post from simpleblog.models import Post if __name__ == '__main__': unittest.main()
37.022472
84
0.692261
from django.test import LiveServerTestCase from selenium import webdriver from django.urls import reverse from django.utils.translation import activate, gettext_lazy as _ from .creation_utils import create_user, create_post from simpleblog.models import Post class TestPostCreate(LiveServerTestCase): def setUp(sel...
2,793
40
208
877a288b95e328f85cddeb7a00bdc71a41bafbba
498
py
Python
arrays/first_duplicate_value.py
maanavshah/coding-interview
4c842cdbc6870da79684635f379966d1caec2162
[ "MIT" ]
null
null
null
arrays/first_duplicate_value.py
maanavshah/coding-interview
4c842cdbc6870da79684635f379966d1caec2162
[ "MIT" ]
null
null
null
arrays/first_duplicate_value.py
maanavshah/coding-interview
4c842cdbc6870da79684635f379966d1caec2162
[ "MIT" ]
null
null
null
# O(n) time | O(n) space # O(n) time | O(1) space
24.9
41
0.566265
# O(n) time | O(n) space def firstDuplicateValue(array): seenElements = {} for idx, element in enumerate(array): if element in seenElements: return element else: seenElements[element] = idx return -1 # O(n) time | O(1) space def firstDuplicateValue(array): for el...
403
0
44
0aaae7be3b0ace41a6421efe879e353e865df314
4,063
py
Python
Sources/Workflows/Shanbay_Alfred2_Workflow/shanbay.py
yagosys/AlfredWorkflow.com
9e5087e61fb89640a7a6ca89ba554303aec0b037
[ "MIT" ]
2,177
2015-01-02T09:56:51.000Z
2022-03-27T01:48:37.000Z
Sources/Workflows/Shanbay_Alfred2_Workflow/shanbay.py
yagosys/AlfredWorkflow.com
9e5087e61fb89640a7a6ca89ba554303aec0b037
[ "MIT" ]
24
2015-01-02T19:11:51.000Z
2021-01-27T07:20:33.000Z
Sources/Workflows/Shanbay_Alfred2_Workflow/shanbay.py
yagosys/AlfredWorkflow.com
9e5087e61fb89640a7a6ca89ba554303aec0b037
[ "MIT" ]
516
2015-01-02T18:48:29.000Z
2022-01-26T07:12:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- #! 强制默认编码为utf-8 import sys reload(sys) sys.setdefaultencoding('utf8') import urllib, urllib2, json, time from pprint import pprint from pdb import set_trace import requests from lxml import html from alfred.feedback import Feedback from config import service, addword, ...
31.992126
123
0.535811
#!/usr/bin/env python # -*- coding: utf-8 -*- #! 强制默认编码为utf-8 import sys reload(sys) sys.setdefaultencoding('utf8') import urllib, urllib2, json, time from pprint import pprint from pdb import set_trace import requests from lxml import html from alfred.feedback import Feedback from config import service, addword, ...
3,419
-1
237
8dcef86aa8287856e10a453698de6d0f45be68cd
78
py
Python
odl_details.py
vaibhgupta157/PathCompute
44109176dc3770f7742e4e70225083ffe8eccad7
[ "MIT" ]
5
2019-08-05T20:00:03.000Z
2021-11-24T07:39:06.000Z
odl_details.py
vaibhgupta157/PathCompute
44109176dc3770f7742e4e70225083ffe8eccad7
[ "MIT" ]
1
2019-07-15T13:04:45.000Z
2019-10-10T02:21:51.000Z
odl_details.py
vaibhgupta157/PathCompute
44109176dc3770f7742e4e70225083ffe8eccad7
[ "MIT" ]
2
2019-08-01T21:17:15.000Z
2020-09-30T20:19:49.000Z
ODL_IP = "127.0.0.1" ODL_PORT = "8181" ODL_USER = "admin" ODL_PASS = "admin"
13
20
0.641026
ODL_IP = "127.0.0.1" ODL_PORT = "8181" ODL_USER = "admin" ODL_PASS = "admin"
0
0
0
174da0292817370750a98ca1b863b2c249ba736f
574
py
Python
nova_dveri_ru/html_work/html_code.py
Aleksey-Voko/nova_dveri_ru
7657c81e12f4486100385b9f181895f7688a8106
[ "MIT" ]
null
null
null
nova_dveri_ru/html_work/html_code.py
Aleksey-Voko/nova_dveri_ru
7657c81e12f4486100385b9f181895f7688a8106
[ "MIT" ]
null
null
null
nova_dveri_ru/html_work/html_code.py
Aleksey-Voko/nova_dveri_ru
7657c81e12f4486100385b9f181895f7688a8106
[ "MIT" ]
null
null
null
import requests from nova_dveri_ru.data import USER_AGENT if __name__ == '__main__': url = 'https://nova-dveri.ru/mezhkomnatnye-dveri/ehkoshpon/il%20doors/dver-galleya-07-chern-yasen-svetlyj' out_html_file = 'galleya-07-chern-yasen-svetlyj.html' save_html_code(url, out_html_file)
27.333333
110
0.705575
import requests from nova_dveri_ru.data import USER_AGENT def save_html_code(input_url: str, out_file: str): headers = { 'User-Agent': USER_AGENT, } response = requests.get(input_url, headers=headers) html_code = response.text with open(out_file, 'w', encoding='utf-8') as fl: fl....
254
0
23
3fd50a97d477c6606a8e1d7b5ef666f3120603de
6,976
py
Python
src/mutiny/_internal/models/user.py
jack1142/Mutiny
586dc7131c0d9eba98a271601a446e00792e8cde
[ "ECL-2.0", "Apache-2.0" ]
20
2021-08-18T20:46:16.000Z
2022-01-06T22:53:25.000Z
src/mutiny/_internal/models/user.py
jack1142/Mutiny
586dc7131c0d9eba98a271601a446e00792e8cde
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/mutiny/_internal/models/user.py
jack1142/Mutiny
586dc7131c0d9eba98a271601a446e00792e8cde
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2021 Jakub Kuczys (https://github.com/jack1142) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
32.446512
88
0.673595
# Copyright 2021 Jakub Kuczys (https://github.com/jack1142) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
2,605
0
376
ffafc0fccda94ffbed91a8280654703587dbde9e
355
py
Python
profit/types/blockchain_format/pool_target.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
7
2022-03-15T01:33:35.000Z
2022-03-26T21:29:45.000Z
profit/types/blockchain_format/pool_target.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
3
2022-03-19T23:02:18.000Z
2022-03-19T23:02:19.000Z
profit/types/blockchain_format/pool_target.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from profit.types.blockchain_format.sized_bytes import bytes32 from profit.util.ints import uint32 from profit.util.streamable import Streamable, streamable @dataclass(frozen=True) @streamable
27.307692
69
0.811268
from dataclasses import dataclass from profit.types.blockchain_format.sized_bytes import bytes32 from profit.util.ints import uint32 from profit.util.streamable import Streamable, streamable @dataclass(frozen=True) @streamable class PoolTarget(Streamable): puzzle_hash: bytes32 max_height: uint32 # A max hei...
0
103
22
0addda13f42195fa3b166c4628f48102cc4fb485
33,961
py
Python
Lib/site-packages/win32/lib/winnt.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/win32/lib/winnt.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/win32/lib/winnt.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
# Generated by h2py from \mssdk\include\winnt.h APPLICATION_ERROR_MASK = 536870912 ERROR_SEVERITY_SUCCESS = 0 ERROR_SEVERITY_INFORMATIONAL = 1073741824 ERROR_SEVERITY_WARNING = -2147483648 ERROR_SEVERITY_ERROR = -1073741824 MINCHAR = 128 MAXCHAR = 127 MINSHORT = 32768 MAXSHORT = 32767 MINLONG = -2147483648 ...
30.901729
103
0.76317
# Generated by h2py from \mssdk\include\winnt.h APPLICATION_ERROR_MASK = 536870912 ERROR_SEVERITY_SUCCESS = 0 ERROR_SEVERITY_INFORMATIONAL = 1073741824 ERROR_SEVERITY_WARNING = -2147483648 ERROR_SEVERITY_ERROR = -1073741824 MINCHAR = 128 MAXCHAR = 127 MINSHORT = 32768 MAXSHORT = 32767 MINLONG = -2147483648 ...
699
0
448
e22e54a9a99a8dec899f21dc34205db0365bd080
775
py
Python
esipy/exceptions.py
klinger/EsiPy
f51863034f933c15ec4c506a466576b1b966d5ef
[ "BSD-3-Clause" ]
null
null
null
esipy/exceptions.py
klinger/EsiPy
f51863034f933c15ec4c506a466576b1b966d5ef
[ "BSD-3-Clause" ]
null
null
null
esipy/exceptions.py
klinger/EsiPy
f51863034f933c15ec4c506a466576b1b966d5ef
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- """ Exceptions for EsiPy related errors """ class APIException(Exception): """ Exception for SSO related errors """
35.227273
68
0.532903
# -*- encoding: utf-8 -*- """ Exceptions for EsiPy related errors """ class APIException(Exception): """ Exception for SSO related errors """ def __init__(self, url, code, json_response): self.url = url self.status_code = code self.response = json_response super(API...
563
0
58
9ea5d5434ac2b3e087de3f3f4a234d09730d9a32
594
py
Python
problems/599.Minimum_Index_Sum_of_Two_Lists/li_counter.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/599.Minimum_Index_Sum_of_Two_Lists/li_counter.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/599.Minimum_Index_Sum_of_Two_Lists/li_counter.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
# coding=utf-8 # Author: Jianghan LI # Question: 599.Minimum_Index_Sum_of_Two_Lists # Date: 2017-05-30, 0 wrong try from collections import Counter s = Solution() print s.findRestaurant(["Shogun", "Tapioca Express", "Burger King", "KFC"], ["KFC", "Shogun", "Burger King"])
28.285714
109
0.606061
# coding=utf-8 # Author: Jianghan LI # Question: 599.Minimum_Index_Sum_of_Two_Lists # Date: 2017-05-30, 0 wrong try from collections import Counter class Solution(object): def findRestaurant(self, l1, l2): d = set(l1) & set(l2) c = Counter({v: i + 1 for i, v in enumerate(l1) if v in d}) + \ ...
265
2
50
1eb5869afdf8053c80b5e34a7e2f20873044f9ab
3,666
py
Python
tests/test_awesomeversion.py
agners/awesomeversion
4d03a0a3fb35e35e4eab984423c903cf50137510
[ "MIT" ]
null
null
null
tests/test_awesomeversion.py
agners/awesomeversion
4d03a0a3fb35e35e4eab984423c903cf50137510
[ "MIT" ]
null
null
null
tests/test_awesomeversion.py
agners/awesomeversion
4d03a0a3fb35e35e4eab984423c903cf50137510
[ "MIT" ]
null
null
null
"""Test awesomeversion.""" import json import pytest from awesomeversion import ( AwesomeVersion, AwesomeVersionStrategy, AwesomeVersionStrategyException, ) def test_awesomeversion(): """Test awesomeversion.""" version = AwesomeVersion("2020.12.1") assert not version.beta version = Awes...
27.358209
85
0.665576
"""Test awesomeversion.""" import json import pytest from awesomeversion import ( AwesomeVersion, AwesomeVersionStrategy, AwesomeVersionStrategyException, ) def test_awesomeversion(): """Test awesomeversion.""" version = AwesomeVersion("2020.12.1") assert not version.beta version = Awes...
0
0
0
543dafa81620a4ef6fd62bec3b7da69e65bb0a52
2,934
py
Python
user/migrations/0001_initial.py
Hrsn2861/pysat-server
72224bb0e6af8ef825eaf3259587698b5639b8a5
[ "MIT" ]
null
null
null
user/migrations/0001_initial.py
Hrsn2861/pysat-server
72224bb0e6af8ef825eaf3259587698b5639b8a5
[ "MIT" ]
7
2020-06-06T01:55:39.000Z
2022-02-10T11:46:31.000Z
user/migrations/0001_initial.py
Hrsnnnn/pysat-server
72224bb0e6af8ef825eaf3259587698b5639b8a5
[ "MIT" ]
null
null
null
# Generated by Django 2.2.5 on 2019-11-02 11:35 from django.db import migrations, models
37.615385
114
0.504431
# Generated by Django 2.2.5 on 2019-11-02 11:35 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='EntryLog', fields=[ ('id', models.AutoField...
0
2,820
23
ca346a4bb1f71cd9d7868ca9808795b7f0dc484d
1,983
py
Python
portfolio/Python/scrapy/swedishtruckparts/parts4scania.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/swedishtruckparts/parts4scania.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/swedishtruckparts/parts4scania.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
5
2016-03-22T07:40:46.000Z
2021-05-30T16:12:21.000Z
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc import csv from product_spiders.items import Product, ProductLoader
31.47619
96
0.630862
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc import csv from product_spiders.items import Product, ProductLoader class Part...
1,420
231
23
857923f165523a228611c35189dcf54fa43aa704
5,837
py
Python
examples/extension/fruitproperty/pyproperty.py
usnistgov/OOF3D
4fd423a48aea9c5dc207520f02de53ae184be74c
[ "X11" ]
31
2015-04-01T15:59:36.000Z
2022-03-18T20:21:47.000Z
examples/extension/fruitproperty/pyproperty.py
usnistgov/OOF3D
4fd423a48aea9c5dc207520f02de53ae184be74c
[ "X11" ]
3
2015-02-06T19:30:24.000Z
2017-05-25T14:14:31.000Z
examples/extension/fruitproperty/pyproperty.py
usnistgov/OOF3D
4fd423a48aea9c5dc207520f02de53ae184be74c
[ "X11" ]
7
2015-01-23T15:19:22.000Z
2021-06-09T09:03:59.000Z
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
47.455285
79
0.587802
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
3,513
31
198
64b5a2cb8929ad161a1ee1dc4b0d356c36e7cf8d
2,930
py
Python
distributed_dp/dme_utils.py
AbdulmoneamAli/federated
c54a9f5053d6316f81aa6f6d1eba61068927a33d
[ "Apache-2.0" ]
1
2021-07-29T16:35:21.000Z
2021-07-29T16:35:21.000Z
distributed_dp/dme_utils.py
AbdulmoneamAli/federated
c54a9f5053d6316f81aa6f6d1eba61068927a33d
[ "Apache-2.0" ]
null
null
null
distributed_dp/dme_utils.py
AbdulmoneamAli/federated
c54a9f5053d6316f81aa6f6d1eba61068927a33d
[ "Apache-2.0" ]
null
null
null
# Copyright 2021, Google LLC. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
37.088608
74
0.743686
# Copyright 2021, Google LLC. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
0
0
0
d4c2ee1d2c14dcb31de7addfc1b457de42691515
3,199
py
Python
p2ner/components/plugin/overlayviz2/overlayviz/xmlinterface.py
schristakidis/p2ner
46694a41e8c1ebdc28f520b58c126da8785f3eed
[ "Apache-2.0" ]
2
2015-06-01T22:04:34.000Z
2017-07-06T09:35:00.000Z
p2ner/components/plugin/overlayviz2/overlayviz/xmlinterface.py
schristakidis/p2ner
46694a41e8c1ebdc28f520b58c126da8785f3eed
[ "Apache-2.0" ]
null
null
null
p2ner/components/plugin/overlayviz2/overlayviz/xmlinterface.py
schristakidis/p2ner
46694a41e8c1ebdc28f520b58c126da8785f3eed
[ "Apache-2.0" ]
1
2019-11-26T10:22:35.000Z
2019-11-26T10:22:35.000Z
# -*- coding: utf-8 -*- # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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 # # U...
33.673684
91
0.524539
# -*- coding: utf-8 -*- # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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 # # U...
2,286
12
184
c4847d72a088620fab5a7b96015b61f8285613d4
1,858
py
Python
migrations/versions/8580b5c0888c_initial_migrate.py
alchermd/client_payroll
fefb434cb3a4af768a1d01d0e88a4f22f88a2e6c
[ "MIT" ]
2
2018-12-02T01:36:57.000Z
2019-11-23T01:01:49.000Z
migrations/versions/8580b5c0888c_initial_migrate.py
alchermd/client_payroll
fefb434cb3a4af768a1d01d0e88a4f22f88a2e6c
[ "MIT" ]
4
2017-11-03T11:47:05.000Z
2017-11-05T15:20:00.000Z
migrations/versions/8580b5c0888c_initial_migrate.py
alchermd/client_payroll
fefb434cb3a4af768a1d01d0e88a4f22f88a2e6c
[ "MIT" ]
5
2018-04-02T13:52:43.000Z
2022-01-25T06:38:44.000Z
"""Initial migrate Revision ID: 8580b5c0888c Revises: Create Date: 2017-11-02 23:42:58.243681 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '8580b5c0888c' down_revision = None branch_labels = None depends_on = None
30.966667
65
0.669537
"""Initial migrate Revision ID: 8580b5c0888c Revises: Create Date: 2017-11-02 23:42:58.243681 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '8580b5c0888c' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto ge...
1,533
0
46
2d6073c49b3cd04526985cca2603a8dd633458fa
108
py
Python
src/model/__init__.py
celsomilne/soccer
b3b164b6610ebd88b13601970d2d4e65423d0a57
[ "MIT" ]
null
null
null
src/model/__init__.py
celsomilne/soccer
b3b164b6610ebd88b13601970d2d4e65423d0a57
[ "MIT" ]
2
2021-06-08T20:34:37.000Z
2022-02-10T01:12:59.000Z
src/model/__init__.py
celsomilne/soccer
b3b164b6610ebd88b13601970d2d4e65423d0a57
[ "MIT" ]
null
null
null
from ._base import * from .soccer import SoccerModel from .soccerObjectDetector import SoccerObjectDetector
27
54
0.851852
from ._base import * from .soccer import SoccerModel from .soccerObjectDetector import SoccerObjectDetector
0
0
0
d219082334961cda51c1bcbec9e557f2b3ee25de
884
py
Python
examples/uni_arviz_rhat.py
kushagragpt99/kanga
1f2343d15965148ae7c1dea95168c31a87b27c4f
[ "MIT" ]
1
2022-02-03T08:50:35.000Z
2022-02-03T08:50:35.000Z
examples/uni_arviz_rhat.py
kushagragpt99/kanga
1f2343d15965148ae7c1dea95168c31a87b27c4f
[ "MIT" ]
null
null
null
examples/uni_arviz_rhat.py
kushagragpt99/kanga
1f2343d15965148ae7c1dea95168c31a87b27c4f
[ "MIT" ]
null
null
null
# Compute potential scale reduction factor (Rhat) using rhat function of kanga, which is rhat of arviz # %% Load packages import arviz as az import numpy as np # %% Define function for computing univariate Rhat based on arviz # x is a numpy array of 3 dimensions, (chain, MC iteration, parameter) # %% Read chains ...
34
121
0.726244
# Compute potential scale reduction factor (Rhat) using rhat function of kanga, which is rhat of arviz # %% Load packages import arviz as az import numpy as np # %% Define function for computing univariate Rhat based on arviz # x is a numpy array of 3 dimensions, (chain, MC iteration, parameter) def uni_arviz_rhat(...
167
0
22
c4d06705bc583b21e2502fb5ef2e395b64121841
971
py
Python
tests/helpers/information/test_read_hacs_manifest.py
bdraco/integration
b30e799bb27fdd978bd68f21909c82005d0dd3ea
[ "MIT" ]
2
2019-06-18T11:30:53.000Z
2019-10-03T21:34:11.000Z
tests/helpers/information/test_read_hacs_manifest.py
bdraco/integration
b30e799bb27fdd978bd68f21909c82005d0dd3ea
[ "MIT" ]
341
2019-06-18T11:30:55.000Z
2021-07-15T05:38:46.000Z
tests/helpers/information/test_read_hacs_manifest.py
bdraco/integration
b30e799bb27fdd978bd68f21909c82005d0dd3ea
[ "MIT" ]
null
null
null
"""Helpers: Information: read_hacs_manifest.""" import json # pylint: disable=missing-docstring import os from custom_components.hacs.helpers.functions.information import read_hacs_manifest from custom_components.hacs.share import get_hacs
27.742857
83
0.727085
"""Helpers: Information: read_hacs_manifest.""" import json # pylint: disable=missing-docstring import os from custom_components.hacs.helpers.functions.information import read_hacs_manifest from custom_components.hacs.share import get_hacs def temp_cleanup(tmpdir): hacsdir = f"{tmpdir.dirname}/custom_components...
681
0
46
a28a414297ec2f20a9b5a310b17760682c11db49
1,573
py
Python
ctf/pieces.py
documentedai/capture-the-flag
4dbfba094f2a56a6b581098b603fe49a4515efb6
[ "BSD-3-Clause" ]
null
null
null
ctf/pieces.py
documentedai/capture-the-flag
4dbfba094f2a56a6b581098b603fe49a4515efb6
[ "BSD-3-Clause" ]
3
2020-04-22T01:12:06.000Z
2020-04-26T17:59:11.000Z
ctf/pieces.py
documentedai/capture-the-flag
4dbfba094f2a56a6b581098b603fe49a4515efb6
[ "BSD-3-Clause" ]
null
null
null
"""Pieces used in Capture The Flag (Ctf) game."""
32.770833
77
0.583598
"""Pieces used in Capture The Flag (Ctf) game.""" class Piece(object): def __init__(self, idx, team, position): """This class initializes the storage of standard attributes, shared amongst the other pieces. Args: idx (:obj:`int`): Index of Piece. team (:obj:`int`): ...
0
1,452
69
2c368ee1137bb051389f24bf90f066aacb7f7eb3
6,202
py
Python
black_box/cem.py
domluna/deep-rl-gym-tutorials
7e6f53fac0cd4eb22f73916f477d43e3b6ef8715
[ "MIT" ]
17
2016-05-29T21:47:22.000Z
2021-02-05T07:51:24.000Z
black_box/cem.py
domluna/deep-rl-gym-tutorials
7e6f53fac0cd4eb22f73916f477d43e3b6ef8715
[ "MIT" ]
null
null
null
black_box/cem.py
domluna/deep-rl-gym-tutorials
7e6f53fac0cd4eb22f73916f477d43e3b6ef8715
[ "MIT" ]
5
2016-05-29T21:46:58.000Z
2019-05-15T07:00:01.000Z
"""The main idea of CE (Cross Entropy) is to maintain a distribution of possible solution, and update this distribution accordingly. Preliminary investigation showed that applicability of CE to RL problems is restricted severly by the phenomenon that the distribution concentrates to a single point too fast. To preven...
37.587879
150
0.666075
"""The main idea of CE (Cross Entropy) is to maintain a distribution of possible solution, and update this distribution accordingly. Preliminary investigation showed that applicability of CE to RL problems is restricted severly by the phenomenon that the distribution concentrates to a single point too fast. To preven...
2,028
18
142
6a1dc6b0666aee9e976d0587cbda3b6fe02edfd5
851
py
Python
avwx_api/views.py
flyinactor91/AVWX-API
2c56cb4c82b0fc6d1644fbd68693476254928d68
[ "MIT" ]
30
2016-12-16T07:26:13.000Z
2019-03-01T07:57:07.000Z
avwx_api/views.py
flyinactor91/AVWX-API
2c56cb4c82b0fc6d1644fbd68693476254928d68
[ "MIT" ]
12
2018-02-18T20:41:39.000Z
2019-04-13T06:10:54.000Z
avwx_api/views.py
flyinactor91/AVWX-API
2c56cb4c82b0fc6d1644fbd68693476254928d68
[ "MIT" ]
12
2018-02-14T08:53:06.000Z
2019-03-31T19:27:58.000Z
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # library from quart import Response, jsonify # module from avwx_api import app # Static Web Pages @app.route("/") @app.route("/home") async def home() -> Response: """Returns stati...
19.340909
59
0.66745
""" Michael duPont - michael@mdupont.com avwx_api.views - Routes and views for the Quart application """ # pylint: disable=W0702 # library from quart import Response, jsonify # module from avwx_api import app # Static Web Pages @app.route("/") @app.route("/home") async def home() -> Response: """Returns stati...
0
0
0
d7ef2a582472d8a5f158d57e9f43f8fbb6fa2f14
27,036
py
Python
third_party/ite/cost/base_i.py
gdikov/adversarial-variational-bayes
ebd692c70349f34bcb3a2086269bd814cafce96f
[ "MIT" ]
11
2017-09-25T07:46:43.000Z
2019-12-04T12:02:49.000Z
Foundations_of_Private_Computation/Split_Learning/concepts-definitions-code/ite-repo/ite/cost/base_i.py
gonzalo-munillag/Private_AI_OpenMined
c23da9cc1c914d10646a0c0bc1a2497fe2cbaaca
[ "MIT" ]
null
null
null
Foundations_of_Private_Computation/Split_Learning/concepts-definitions-code/ite-repo/ite/cost/base_i.py
gonzalo-munillag/Private_AI_OpenMined
c23da9cc1c914d10646a0c0bc1a2497fe2cbaaca
[ "MIT" ]
4
2018-04-26T15:08:37.000Z
2019-07-02T14:15:08.000Z
""" Base mutual information estimators. """ from numpy import sum, sqrt, isnan, exp, mean, eye, ones, dot, cumsum, \ hstack, newaxis, maximum, prod, abs, arange, log from numpy.linalg import norm from scipy.spatial.distance import pdist, squareform from scipy.special import factorial from scipy.linal...
33.543424
79
0.544755
""" Base mutual information estimators. """ from numpy import sum, sqrt, isnan, exp, mean, eye, ones, dot, cumsum, \ hstack, newaxis, maximum, prod, abs, arange, log from numpy.linalg import norm from scipy.spatial.distance import pdist, squareform from scipy.special import factorial from scipy.linal...
0
0
0
289665ab30341dbcc3ad6785d5d631ee488b154e
2,268
py
Python
Chapter 17/17.3.py
adrian88szymanski/Python_Crash_Course_Eric_Matthes
74e9a627e3e044ea30e4a8579843d95fe8e4fc14
[ "MIT" ]
8
2021-07-21T02:52:49.000Z
2022-02-08T20:47:09.000Z
Chapter 17/17.3.py
barbarian47/Python_Crash_Course_Eric_Matthes
74e9a627e3e044ea30e4a8579843d95fe8e4fc14
[ "MIT" ]
null
null
null
Chapter 17/17.3.py
barbarian47/Python_Crash_Course_Eric_Matthes
74e9a627e3e044ea30e4a8579843d95fe8e4fc14
[ "MIT" ]
7
2021-06-10T12:27:56.000Z
2022-01-29T13:53:15.000Z
#! python3 print("Task 17.3") import requests from plotly.graph_objs import Bar from plotly import offline def get_response(): """Make an api call, and return the response.""" url = 'https://api.github.com/search/repositories?q=language:python&sort=stars' headers = {'Accept': 'application/vnd.github.v3+...
29.076923
83
0.588183
#! python3 print("Task 17.3") import requests from plotly.graph_objs import Bar from plotly import offline def get_response(): """Make an api call, and return the response.""" url = 'https://api.github.com/search/repositories?q=language:python&sort=stars' headers = {'Accept': 'application/vnd.github.v3+...
0
0
0
89ed7f78af8281098bbc29e8127e532af7a1d748
124
py
Python
nj/exceptions.py
trstringer/jersey
08daaf84b7367c56a4c86893878cd16ed690ab08
[ "MIT" ]
7
2018-04-15T18:46:30.000Z
2020-10-03T10:50:31.000Z
nj/exceptions.py
trstringer/jersey
08daaf84b7367c56a4c86893878cd16ed690ab08
[ "MIT" ]
3
2018-01-23T13:44:45.000Z
2020-01-03T20:43:22.000Z
nj/exceptions.py
trstringer/jersey
08daaf84b7367c56a4c86893878cd16ed690ab08
[ "MIT" ]
5
2018-04-15T18:57:49.000Z
2021-06-27T11:44:13.000Z
"""Custom exceptions for this package""" class JerseyError(Exception): """Basic exception for this package""" pass
20.666667
42
0.701613
"""Custom exceptions for this package""" class JerseyError(Exception): """Basic exception for this package""" pass
0
0
0
def9b3d01bc3f769f677336481708ac65bc8dffd
1,579
py
Python
Day1-9/6.py
bcongdon/advent_of_code_2018
8f35d93401055d82b305f2887b3a85a67f70c468
[ "MIT" ]
null
null
null
Day1-9/6.py
bcongdon/advent_of_code_2018
8f35d93401055d82b305f2887b3a85a67f70c468
[ "MIT" ]
null
null
null
Day1-9/6.py
bcongdon/advent_of_code_2018
8f35d93401055d82b305f2887b3a85a67f70c468
[ "MIT" ]
null
null
null
# influenced by https://www.reddit.com/r/adventofcode/comments/a3kr4r/2018_day_6_solutions/eb7385m/ import itertools from collections import defaultdict, Counter if __name__ == "__main__": with open("6.txt") as f: points = f.readlines() points = [tuple(int(i) for i in l.split(",")) for l in points...
30.960784
99
0.580747
# influenced by https://www.reddit.com/r/adventofcode/comments/a3kr4r/2018_day_6_solutions/eb7385m/ import itertools from collections import defaultdict, Counter def part1(points): max_x, max_y = max(x[0] for x in points), max(x[1] for x in points) grid = defaultdict(lambda: -1) for x, y in itertools.pr...
1,119
0
46
fe26a724953a0c5baec9d22e630995498eeb16db
16,332
py
Python
pybnf/parse.py
arakkkkk/PyBNF
2f4cee1dd0b7467f82ca2fd859a10de2ed61df92
[ "BSD-3-Clause" ]
null
null
null
pybnf/parse.py
arakkkkk/PyBNF
2f4cee1dd0b7467f82ca2fd859a10de2ed61df92
[ "BSD-3-Clause" ]
null
null
null
pybnf/parse.py
arakkkkk/PyBNF
2f4cee1dd0b7467f82ca2fd859a10de2ed61df92
[ "BSD-3-Clause" ]
null
null
null
"""Grammar and methods for parsing the configuration file""" from .printing import PybnfError, print1 from .config import Configuration from string import punctuation import logging import pyparsing as pp import re logger = logging.getLogger(__name__) numkeys_int = ['verbosity', 'parallel_count', 'delete_old_fi...
47.476744
125
0.541207
"""Grammar and methods for parsing the configuration file""" from .printing import PybnfError, print1 from .config import Configuration from string import punctuation import logging import pyparsing as pp import re logger = logging.getLogger(__name__) numkeys_int = ['verbosity', 'parallel_count', 'delete_old_fi...
11,893
0
92
6e81d1c3a57eefd7fdf314c858a807162d6f994a
1,339
py
Python
dl/callbacks/train.py
timoninn/pide-pipe
2eec6c918cf1edbfa22ba6cfe3af57c9abb53ac6
[ "MIT" ]
1
2019-11-21T07:26:46.000Z
2019-11-21T07:26:46.000Z
dl/callbacks/train.py
timoninn/pide-pipe
2eec6c918cf1edbfa22ba6cfe3af57c9abb53ac6
[ "MIT" ]
null
null
null
dl/callbacks/train.py
timoninn/pide-pipe
2eec6c918cf1edbfa22ba6cfe3af57c9abb53ac6
[ "MIT" ]
null
null
null
from typing import Dict, Any import torch from torch import nn from torch.utils.data import DataLoader from torch import optim from torch.optim.lr_scheduler import _LRScheduler from ..core.callback import Callback from ..core.state import State from ..utils.torch import get_available_device
29.108696
77
0.613144
from typing import Dict, Any import torch from torch import nn from torch.utils.data import DataLoader from torch import optim from torch.optim.lr_scheduler import _LRScheduler from ..core.callback import Callback from ..core.state import State from ..utils.torch import get_available_device class TrainCallback(Call...
931
9
104
771da24f5050ff10192faea4365fa098041b5d2b
8,358
py
Python
baseball.py
jason-sa/baseball_lin_regression
936535693f00b28d17b2b901144dcba8bce45ab9
[ "MIT" ]
null
null
null
baseball.py
jason-sa/baseball_lin_regression
936535693f00b28d17b2b901144dcba8bce45ab9
[ "MIT" ]
null
null
null
baseball.py
jason-sa/baseball_lin_regression
936535693f00b28d17b2b901144dcba8bce45ab9
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.keys import Keys import requests import time import os from selenium.webdriver.common.by import By import re import time from sklearn.linear_model import LinearRegression from sklearn.model...
37.3125
157
0.686169
import numpy as np import pandas as pd from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.keys import Keys import requests import time import os from selenium.webdriver.common.by import By import re import time from sklearn.linear_model import LinearRegression from sklearn.model...
0
0
0
9fd68fa00d2ede88bbdff5ff4167ef2f9ac066c1
4,387
py
Python
utils/feature_desc.py
Hzfinfdu/DataLab
0da0226866f59ed2e535c346833f0797499b5174
[ "Apache-2.0" ]
null
null
null
utils/feature_desc.py
Hzfinfdu/DataLab
0da0226866f59ed2e535c346833f0797499b5174
[ "Apache-2.0" ]
null
null
null
utils/feature_desc.py
Hzfinfdu/DataLab
0da0226866f59ed2e535c346833f0797499b5174
[ "Apache-2.0" ]
null
null
null
import sys feature_map_basic = { "avg_length":"the average length", "avg_basic_words":"the ratio of basic words (pre-defied by a dictionary)", "avg_lexical_richness":"the lexical diversity", "avg_gender_bias_word_male":"the average ratio of male words", "avg_gender_bias_word_female":"the average ...
49.292135
175
0.714611
import sys feature_map_basic = { "avg_length":"the average length", "avg_basic_words":"the ratio of basic words (pre-defied by a dictionary)", "avg_lexical_richness":"the lexical diversity", "avg_gender_bias_word_male":"the average ratio of male words", "avg_gender_bias_word_female":"the average ...
1,717
0
23
043864d58961f211e064016975098e833c2fe172
317
py
Python
api/src/wt/fields/links/_model.py
sedlar/work-tracking
78917ff8200829eb674142ce43b503d8e892d7eb
[ "BSD-2-Clause" ]
null
null
null
api/src/wt/fields/links/_model.py
sedlar/work-tracking
78917ff8200829eb674142ce43b503d8e892d7eb
[ "BSD-2-Clause" ]
null
null
null
api/src/wt/fields/links/_model.py
sedlar/work-tracking
78917ff8200829eb674142ce43b503d8e892d7eb
[ "BSD-2-Clause" ]
null
null
null
from typing import List from wt.ids import BaseId from wt.fields.links._obj import Link
24.384615
69
0.731861
from typing import List from wt.ids import BaseId from wt.fields.links._obj import Link class LinksModel: def set_entity_links(self, entity_id: BaseId, links: List[Link]): raise NotImplementedError() def get_entity_links(self, entity_id: BaseId) -> List[Link]: raise NotImplementedError()
155
-4
76
f533df67d3a04bbd440edb67989f011161b292e5
584
py
Python
filedemo.py
evertmulder/Aan-de-slag-met-Python
414bc12e5bca56d99ffedc46ada81bd44bc75ac5
[ "MIT" ]
null
null
null
filedemo.py
evertmulder/Aan-de-slag-met-Python
414bc12e5bca56d99ffedc46ada81bd44bc75ac5
[ "MIT" ]
null
null
null
filedemo.py
evertmulder/Aan-de-slag-met-Python
414bc12e5bca56d99ffedc46ada81bd44bc75ac5
[ "MIT" ]
null
null
null
fileName = 'test.txt' linebreak = '\n' items = [['a,99,22'], ['b,34,dd'], ['c,5,21']] writeItemsToFile(items) items = getItemsFromFile() print(items)
18.83871
57
0.642123
fileName = 'test.txt' linebreak = '\n' def getItemsFromFile(): try: file = open(fileName,"r") except: return [] listOfItems = [] for item in file: listOfItems.append(item.strip(linebreak).split(', ')) file.close() return listOfItems def writeItemsToFile(listOfItems): try: file = open(fi...
387
0
46
20fa375c6b7669cc69f05dbc68d39a9201f664f4
2,045
py
Python
Python3/450.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
854
2018-11-09T08:06:16.000Z
2022-03-31T06:05:53.000Z
Python3/450.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
29
2019-06-02T05:02:25.000Z
2021-11-15T04:09:37.000Z
Python3/450.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
347
2018-12-23T01:57:37.000Z
2022-03-12T14:51:21.000Z
__________________________________________________________________________________________________ sample 56 ms submission # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None ___________________________________...
32.460317
98
0.577995
__________________________________________________________________________________________________ sample 56 ms submission # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def deleteNode...
1,287
-12
98
e1782d29f219364bea2d656d4bc1f58100d7018c
5,689
py
Python
IEX_29id/devices/slits.py
ravescovi/macros_29id
c569d4af29644f622a882162b2aa1ca03fb5454c
[ "MIT" ]
null
null
null
IEX_29id/devices/slits.py
ravescovi/macros_29id
c569d4af29644f622a882162b2aa1ca03fb5454c
[ "MIT" ]
null
null
null
IEX_29id/devices/slits.py
ravescovi/macros_29id
c569d4af29644f622a882162b2aa1ca03fb5454c
[ "MIT" ]
1
2021-09-20T21:26:26.000Z
2021-09-20T21:26:26.000Z
from epics import caput, caget from math import inf, nan from IEX_29id.utils.exp import CheckBranch from IEX_29id.utils.misc import read_dict from bluesky import plan_stubs as bps import logging from ophyd import EpicsMotor, EpicsSignal, PVPositionerPC, EpicsSignalRO, Signal from ophyd import Component, Device f...
29.942105
120
0.587449
from epics import caput, caget from math import inf, nan from IEX_29id.utils.exp import CheckBranch from IEX_29id.utils.misc import read_dict from bluesky import plan_stubs as bps import logging from ophyd import EpicsMotor, EpicsSignal, PVPositionerPC, EpicsSignalRO, Signal from ophyd import Component, Device f...
0
817
69
3a37727f98514ee7c9bc433d59a81158bc9871f0
2,292
py
Python
tests/getnet/services/customers/test_integration.py
rafagonc/getnet-py
d2a5278b497408b5245d5d0fecd2e424f4ddb0d5
[ "MIT" ]
null
null
null
tests/getnet/services/customers/test_integration.py
rafagonc/getnet-py
d2a5278b497408b5245d5d0fecd2e424f4ddb0d5
[ "MIT" ]
null
null
null
tests/getnet/services/customers/test_integration.py
rafagonc/getnet-py
d2a5278b497408b5245d5d0fecd2e424f4ddb0d5
[ "MIT" ]
null
null
null
import os import unittest from vcr_unittest import VCRTestCase import getnet from getnet import NotFound from getnet.services.base import ResponseList from getnet.services.customers import Service, Customer from tests.getnet.services.customers.test_customer import sample if __name__ == "__main__": unittest.mai...
32.742857
76
0.687609
import os import unittest from vcr_unittest import VCRTestCase import getnet from getnet import NotFound from getnet.services.base import ResponseList from getnet.services.customers import Service, Customer from tests.getnet.services.customers.test_customer import sample class CustomersIntegrationTest(VCRTestCase):...
1,734
23
211
c197af5016a465d3ef80877ff635bb66841b6040
116
py
Python
src/Metrics/tobetested/memory_total.py
coolmay/hpcpack-acm
8c367148e8e9655a497b9589e9d1050faba02382
[ "MIT" ]
null
null
null
src/Metrics/tobetested/memory_total.py
coolmay/hpcpack-acm
8c367148e8e9655a497b9589e9d1050faba02382
[ "MIT" ]
null
null
null
src/Metrics/tobetested/memory_total.py
coolmay/hpcpack-acm
8c367148e8e9655a497b9589e9d1050faba02382
[ "MIT" ]
null
null
null
import psutil import json mem = psutil.virtual_memory() result = { "_Total": mem.total } print(json.dumps(result))
16.571429
32
0.732759
import psutil import json mem = psutil.virtual_memory() result = { "_Total": mem.total } print(json.dumps(result))
0
0
0
5d843f8c623b2cc6623f676f601598f6e245f5fa
3,962
py
Python
pixelsort/interval.py
HexCodeFFF/pixelsort
2b90d8e1cc937a332cea5b0a59c690e986d58e82
[ "MIT" ]
null
null
null
pixelsort/interval.py
HexCodeFFF/pixelsort
2b90d8e1cc937a332cea5b0a59c690e986d58e82
[ "MIT" ]
null
null
null
pixelsort/interval.py
HexCodeFFF/pixelsort
2b90d8e1cc937a332cea5b0a59c690e986d58e82
[ "MIT" ]
null
null
null
import typing from random import randint, random as random_range from PIL import ImageFilter, Image from pixelsort.sorting import lightness def edge(image: Image.Image, lower_threshold: float, **_) -> typing.List[typing.List[int]]: """Performs an edge detection, which is used to define intervals. Tweak threshol...
31.19685
120
0.595154
import typing from random import randint, random as random_range from PIL import ImageFilter, Image from pixelsort.sorting import lightness def edge(image: Image.Image, lower_threshold: float, **_) -> typing.List[typing.List[int]]: """Performs an edge detection, which is used to define intervals. Tweak threshol...
0
0
0
39675b4eae9bd0f8017c2c07deb058b60fae1c72
8,960
py
Python
popup_field/views.py
spcrxj/django-popup-field
0b9284c039a7c6453a3e0bb877010d67cc3d83dd
[ "BSD-3-Clause" ]
10
2018-09-14T09:49:41.000Z
2021-03-12T19:12:10.000Z
popup_field/views.py
spcrxj/django-popup-field
0b9284c039a7c6453a3e0bb877010d67cc3d83dd
[ "BSD-3-Clause" ]
1
2019-03-11T00:53:24.000Z
2019-03-11T00:53:24.000Z
popup_field/views.py
yinkh/django-popup-field
0b9284c039a7c6453a3e0bb877010d67cc3d83dd
[ "BSD-3-Clause" ]
7
2019-05-02T19:44:51.000Z
2021-06-28T23:31:32.000Z
import django from django.conf import settings from django.utils.decorators import classonlymethod from django.views.generic import CreateView, UpdateView, DeleteView from django.contrib.auth.mixins import PermissionRequiredMixin from django.http.response import JsonResponse from django.template.response import Templat...
37.805907
119
0.642076
import django from django.conf import settings from django.utils.decorators import classonlymethod from django.views.generic import CreateView, UpdateView, DeleteView from django.contrib.auth.mixins import PermissionRequiredMixin from django.http.response import JsonResponse from django.template.response import Templat...
3,161
5,144
92
7297dac8ad7e2a204b1900de986dabdeacbb7cbb
458
py
Python
chapter10/10-7.py
alberthao/Python-Crash-Course-Homework
105ffb3075db075425d6cf0d08d9837ef0548866
[ "MIT" ]
138
2019-07-26T13:42:31.000Z
2021-04-13T23:51:49.000Z
chapter10/10-7.py
alberthao/Python-Crash-Course-Homework
105ffb3075db075425d6cf0d08d9837ef0548866
[ "MIT" ]
6
2019-07-20T13:47:47.000Z
2019-08-04T06:49:06.000Z
chapter10/10-7.py
alberthao/Python-Crash-Course-Homework
105ffb3075db075425d6cf0d08d9837ef0548866
[ "MIT" ]
51
2019-07-26T09:46:28.000Z
2021-03-29T07:58:16.000Z
print("Enter 'q' at any time to quit.\n") while True: try: x = input("\nGive me a number: ") if x == 'q': break x = int(x) y = input("Give me another number: ") if y == 'q': break y = int(y) except ValueError: print("Sorry, I r...
20.818182
82
0.434498
print("Enter 'q' at any time to quit.\n") while True: try: x = input("\nGive me a number: ") if x == 'q': break x = int(x) y = input("Give me another number: ") if y == 'q': break y = int(y) except ValueError: print("Sorry, I r...
0
0
0
199819f81209ebbe29e58acb795f12caf099835a
1,402
py
Python
bin/cds-efas.py
fmidev/harvesterseasons-smartmet
2a0538f1d7f95f8085273d4ff93d39066780c2a7
[ "MIT" ]
1
2021-04-09T16:48:26.000Z
2021-04-09T16:48:26.000Z
bin/cds-efas.py
fmidev/harvesterseasons-smartmet
2a0538f1d7f95f8085273d4ff93d39066780c2a7
[ "MIT" ]
null
null
null
bin/cds-efas.py
fmidev/harvesterseasons-smartmet
2a0538f1d7f95f8085273d4ff93d39066780c2a7
[ "MIT" ]
1
2021-07-21T11:27:02.000Z
2021-07-21T11:27:02.000Z
#!/usr/bin/env python3 import sys import cdsapi year= sys.argv[1] month= sys.argv[2] c = cdsapi.Client() c.retrieve( 'efas-historical', { 'format': 'grib', 'origin': 'ecmwf', 'simulation_version': 'version_3_5', 'variable'...
35.948718
77
0.245364
#!/usr/bin/env python3 import sys import cdsapi year= sys.argv[1] month= sys.argv[2] c = cdsapi.Client() c.retrieve( 'efas-historical', { 'format': 'grib', 'origin': 'ecmwf', 'simulation_version': 'version_3_5', 'variable'...
0
0
0
9aeb8240c4110e464b0d04ac28750b16f3b40727
8,197
py
Python
mcpipy/mcpi/block.py
sprintingkiwi/pycraft_mod
a1ce8817ccff3e701aa787a2e531df5a6cc8f887
[ "MIT" ]
15
2017-08-27T15:33:19.000Z
2021-05-05T07:30:57.000Z
pycraft_minetest-0.7/pycraft_minetest/blocklist.py
Lopastudio/complete-builder-for-minetest
23f1bca1f2aa87146c759ad3e8e5b8d62aec57a4
[ "MIT" ]
2
2018-11-30T19:56:02.000Z
2021-09-24T05:20:39.000Z
pycraft_minetest-0.7/pycraft_minetest/blocklist.py
Lopastudio/complete-builder-for-minetest
23f1bca1f2aa87146c759ad3e8e5b8d62aec57a4
[ "MIT" ]
4
2018-05-10T19:37:06.000Z
2019-09-02T19:28:14.000Z
from . import settings class Block: """Minecraft PI block description. Can be sent to Minecraft.setBlock/s""" def __iter__(self): """Allows a Block to be sent whenever id [and data] is needed""" if self.nbt is not None: return iter((self.id, self.data, self.nbt)) else: ...
34.012448
86
0.665487
from . import settings class Block: """Minecraft PI block description. Can be sent to Minecraft.setBlock/s""" def __init__(self, id, data=0, nbt=None): self.id = id self.data = data if nbt is not None and len(nbt)==0: self.nbt = None else: self.nbt = nbt ...
722
0
161
52878d327589645b14ad5e2436d611def2a25388
2,280
py
Python
docs/code/wk8b.py
bond-lab/Language-and-the-Computer
58d808cdbe6873256f1d0fa091ebc5d909f211bb
[ "CC-BY-4.0" ]
null
null
null
docs/code/wk8b.py
bond-lab/Language-and-the-Computer
58d808cdbe6873256f1d0fa091ebc5d909f211bb
[ "CC-BY-4.0" ]
null
null
null
docs/code/wk8b.py
bond-lab/Language-and-the-Computer
58d808cdbe6873256f1d0fa091ebc5d909f211bb
[ "CC-BY-4.0" ]
null
null
null
#Write a function shorten(text, n) to process a text, # omitting the n most frequently occurring words of the text. # How readable is it? import nltk def shorten(text, n): """Delete the most frequent n words from a text (list of words)""" assert isinstance(text, list), "The text should be a list of words" ...
35.076923
80
0.713596
#Write a function shorten(text, n) to process a text, # omitting the n most frequently occurring words of the text. # How readable is it? import nltk def shorten(text, n): """Delete the most frequent n words from a text (list of words)""" assert isinstance(text, list), "The text should be a list of words" ...
0
0
0
9d85cfeb79dfeff38bfba2d9825cce4992fdc056
8,208
py
Python
database/backends/elastic_database.py
zhouhongf/loader_database
85e3d606d0bd2316eb5ae2c645766b3e5f4a7832
[ "MIT" ]
1
2021-11-27T06:40:43.000Z
2021-11-27T06:40:43.000Z
database/backends/elastic_database.py
zhouhongf/loader_database
85e3d606d0bd2316eb5ae2c645766b3e5f4a7832
[ "MIT" ]
null
null
null
database/backends/elastic_database.py
zhouhongf/loader_database
85e3d606d0bd2316eb5ae2c645766b3e5f4a7832
[ "MIT" ]
null
null
null
import time from config import singleton, Logger from elasticsearch import Elasticsearch from elasticsearch.helpers import bulk from datetime import datetime from numpy import long log = Logger().logger @singleton
37.309091
119
0.510599
import time from config import singleton, Logger from elasticsearch import Elasticsearch from elasticsearch.helpers import bulk from datetime import datetime from numpy import long log = Logger().logger @singleton class ElasticDatabase: def __init__(self): # 无用户名密码状态 # self.es = E...
6,601
1,394
73
82dd314634453ecfc01231902539794f306a6122
1,742
py
Python
arctic/project_template/app/views.py
sanoma/django-arctic
18edd63e46b31ce0492b5991d036df896bd14bc6
[ "MIT" ]
73
2016-08-15T11:37:08.000Z
2020-04-11T14:12:19.000Z
arctic/project_template/app/views.py
sanoma/django-arctic
18edd63e46b31ce0492b5991d036df896bd14bc6
[ "MIT" ]
331
2016-08-16T12:05:04.000Z
2020-04-16T18:39:46.000Z
arctic/project_template/app/views.py
sanoma/django-arctic
18edd63e46b31ce0492b5991d036df896bd14bc6
[ "MIT" ]
26
2016-08-17T12:58:30.000Z
2019-10-16T08:07:41.000Z
from django.urls import reverse, reverse_lazy from django.utils.translation import gettext_lazy as _ from arctic.generics import ( CreateView, DeleteView, ListView, UpdateView, ) from .forms import {{ camel_case_app_name }}Form from .models import {{ camel_case_app_name }} class {{ camel_case_app_na...
28.096774
73
0.639495
from django.urls import reverse, reverse_lazy from django.utils.translation import gettext_lazy as _ from arctic.generics import ( CreateView, DeleteView, ListView, UpdateView, ) from .forms import {{ camel_case_app_name }}Form from .models import {{ camel_case_app_name }} class {{ camel_case_app_na...
75
0
27
5c02859d29c36b1595a05d5d8893582c61cb71b7
5,112
py
Python
tests/model/test_model.py
agdsn/sipa
a733bce0a54ad3a79732de82e7f32b35bd87d4e2
[ "MIT" ]
22
2015-04-17T15:58:30.000Z
2021-04-19T08:26:32.000Z
tests/model/test_model.py
agdsn/sipa
a733bce0a54ad3a79732de82e7f32b35bd87d4e2
[ "MIT" ]
329
2015-04-14T23:34:31.000Z
2022-01-21T03:02:46.000Z
tests/model/test_model.py
agdsn/sipa
a733bce0a54ad3a79732de82e7f32b35bd87d4e2
[ "MIT" ]
18
2015-04-17T13:57:56.000Z
2018-05-30T14:20:59.000Z
import re from base64 import urlsafe_b64encode from os import urandom from typing import cast from unittest import TestCase from unittest.mock import MagicMock from ipaddress import IPv4Network from flask import Flask from sipa.backends import Backends, DataSource, Dormitory, InitContextCallable
33.631579
78
0.632433
import re from base64 import urlsafe_b64encode from os import urandom from typing import cast from unittest import TestCase from unittest.mock import MagicMock from ipaddress import IPv4Network from flask import Flask from sipa.backends import Backends, DataSource, Dormitory, InitContextCallable class TestBackendIn...
4,002
658
153
9d3749347780f434f22f67fb2805945ba774561c
1,707
py
Python
src/dep/cndict/gen_simp_trad.py
abrookins/RediSearch
773a04106e4f0cfbad3a75a84ce69f3a36fd16e1
[ "Apache-2.0", "Ruby", "BSD-3-Clause", "MIT" ]
2,098
2019-05-13T09:11:54.000Z
2022-03-31T06:24:50.000Z
src/dep/cndict/gen_simp_trad.py
abrookins/RediSearch
773a04106e4f0cfbad3a75a84ce69f3a36fd16e1
[ "Apache-2.0", "Ruby", "BSD-3-Clause", "MIT" ]
1,659
2019-05-13T07:55:29.000Z
2022-03-31T02:42:57.000Z
src/dep/cndict/gen_simp_trad.py
abrookins/RediSearch
773a04106e4f0cfbad3a75a84ce69f3a36fd16e1
[ "Apache-2.0", "Ruby", "BSD-3-Clause", "MIT" ]
227
2019-05-17T07:54:49.000Z
2022-03-28T03:50:19.000Z
#!/usr/bin/env python """ This script takes a JSON dictionary containing traditional chinese characters as keys, and the simplified equivalents as values. It then outputs a header file appropriate for inclusion. The header output file contains an array, `Cn_T2S` which can be used as ``` simpChr = Cn_T2S[tradChr];...
21.3375
80
0.657879
#!/usr/bin/env python """ This script takes a JSON dictionary containing traditional chinese characters as keys, and the simplified equivalents as values. It then outputs a header file appropriate for inclusion. The header output file contains an array, `Cn_T2S` which can be used as ``` simpChr = Cn_T2S[tradChr];...
0
0
0
0a9aafed602e4e30f7389bd6554aa255f58a62e3
5,001
py
Python
src/cm/models/public_ip.py
cc1-cloud/cc1
8113673fa13b6fe195cea99dedab9616aeca3ae8
[ "Apache-2.0" ]
11
2015-05-06T14:16:54.000Z
2022-02-08T23:21:31.000Z
src/cm/models/public_ip.py
fortress-shell/cc1
8113673fa13b6fe195cea99dedab9616aeca3ae8
[ "Apache-2.0" ]
1
2015-10-30T21:08:11.000Z
2015-10-30T21:08:11.000Z
src/cm/models/public_ip.py
fortress-shell/cc1
8113673fa13b6fe195cea99dedab9616aeca3ae8
[ "Apache-2.0" ]
5
2016-02-12T22:01:38.000Z
2021-12-06T16:56:54.000Z
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
38.175573
170
0.530494
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
2,587
1,284
23
fe60666df6a3b848589becd47d6491e0d26078cb
8,013
py
Python
blog/views.py
nixrajput/nixlab-blog-api-django
9934ee9055e919f101fc53061aa7e297c812d80d
[ "BSD-3-Clause" ]
1
2020-09-04T19:23:42.000Z
2020-09-04T19:23:42.000Z
blog/views.py
nixrajput/nixlab-blog-api-django
9934ee9055e919f101fc53061aa7e297c812d80d
[ "BSD-3-Clause" ]
null
null
null
blog/views.py
nixrajput/nixlab-blog-api-django
9934ee9055e919f101fc53061aa7e297c812d80d
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import status from rest_framework.authentication import TokenAuthentication from rest_framework.decorators import api_view, permission_classes, authentication_classes from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.generics import ListAPIView from rest_framework.p...
33.95339
98
0.672782
from rest_framework import status from rest_framework.authentication import TokenAuthentication from rest_framework.decorators import api_view, permission_classes, authentication_classes from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.generics import ListAPIView from rest_framework.p...
6,080
687
178
1dccb3f4def3185980f12c8a2b142b665864fb7f
555
py
Python
external_libs/cryptopy/crypto/cipher/aes_cbc.py
rgrr/smartmeshsdk
a95f3e4d9e2254d59d326428fef8c77319cd4373
[ "BSD-3-Clause" ]
29
2015-02-17T14:22:14.000Z
2021-02-19T06:01:10.000Z
external_libs/cryptopy/crypto/cipher/aes_cbc.py
rgrr/smartmeshsdk
a95f3e4d9e2254d59d326428fef8c77319cd4373
[ "BSD-3-Clause" ]
104
2016-04-10T19:22:20.000Z
2018-11-20T15:47:14.000Z
external_libs/cryptopy/crypto/cipher/aes_cbc.py
rgrr/smartmeshsdk
a95f3e4d9e2254d59d326428fef8c77319cd4373
[ "BSD-3-Clause" ]
35
2015-07-10T18:58:15.000Z
2022-03-20T08:56:25.000Z
""" crypto.cipher.aes_cbc AES_CBC Encryption Algorithm Copyright (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. 2002-06-14 """ from crypto.cipher.aes import AES from crypto.cipher.cbc import CBC from crypto.cipher.base import BlockCipher, padWithPadLen, noPadding class AES_...
26.428571
70
0.695495
""" crypto.cipher.aes_cbc AES_CBC Encryption Algorithm Copyright (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. 2002-06-14 """ from crypto.cipher.aes import AES from crypto.cipher.cbc import CBC from crypto.cipher.base import BlockCipher, padWithPadLen, noPadding class AES_...
150
0
26
12f659110ffd6cf2190c795f1dc4cd027e955400
569
py
Python
fpakman/util/memory.py
vinifmor/fpakman
a719991b8f7ecf366d44fdf074f5950767bdf121
[ "Zlib" ]
39
2019-06-15T08:27:12.000Z
2021-11-08T03:33:01.000Z
fpakman/util/memory.py
vinifmor/fpakman
a719991b8f7ecf366d44fdf074f5950767bdf121
[ "Zlib" ]
10
2019-06-16T12:16:19.000Z
2020-06-21T18:49:05.000Z
fpakman/util/memory.py
vinifmor/fpakman
a719991b8f7ecf366d44fdf074f5950767bdf121
[ "Zlib" ]
3
2019-08-01T12:38:46.000Z
2020-04-30T20:40:23.000Z
import time from threading import Thread from typing import List from fpakman.util.cache import Cache
23.708333
70
0.634446
import time from threading import Thread from typing import List from fpakman.util.cache import Cache class CacheCleaner(Thread): def __init__(self, caches: List[Cache], check_interval: int = 15): super(CacheCleaner, self).__init__(daemon=True) self.caches = [c for c in caches if c.is_enabled()]...
381
6
77
e6e8efd159bb1ab67df8cb926bb72fb6a4a0b0e5
2,484
py
Python
2021/18.py
pubkraal/Advent
286517fe7911490a817adceefc8a84a1032e7bcc
[ "MIT" ]
null
null
null
2021/18.py
pubkraal/Advent
286517fe7911490a817adceefc8a84a1032e7bcc
[ "MIT" ]
null
null
null
2021/18.py
pubkraal/Advent
286517fe7911490a817adceefc8a84a1032e7bcc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import json from util.aoc import file_to_day from util.input import load_data if __name__ == "__main__": test = len(sys.argv) > 1 and sys.argv[1] == "test" main(test)
22.178571
79
0.457327
#!/usr/bin/env python3 import sys import json from util.aoc import file_to_day from util.input import load_data def main(test=False): numbers = [ json.loads(line) for line in load_data(file_to_day(__file__), test) ] p1_res = numbers[0] for num in numbers[1:]: p1_res = add(p1_res, nu...
2,127
0
138
493b41243d9efaa3cac240165261296652fea502
3,649
py
Python
src/darknet/py/util.py
zeroae/darknet.py
c234fb4d986adb8b0534f938c2408622b8d3aa3f
[ "MIT" ]
null
null
null
src/darknet/py/util.py
zeroae/darknet.py
c234fb4d986adb8b0534f938c2408622b8d3aa3f
[ "MIT" ]
3
2020-07-23T20:52:28.000Z
2020-11-19T22:26:26.000Z
src/darknet/py/util.py
zeroae/darknet.py
c234fb4d986adb8b0534f938c2408622b8d3aa3f
[ "MIT" ]
null
null
null
import os import fsspec import numpy as np from PIL import Image from PIL import ImageDraw
33.477064
97
0.620444
import os import fsspec import numpy as np from PIL import Image from PIL import ImageDraw def fsspec_cache_open( urlpath: str, mode="rb", compression=None, encoding="utf8", errors=None, protocol=None, newline=None, **kwargs, ) -> fsspec.core.OpenFile: chain = urlpath.split("::") ...
3,437
0
115
903af003069ad52f30b885bf744257637efbd592
227
py
Python
liveedit/urls.py
jonny5532/wagtail-liveedit
c44d46070891a1c9a4959bc120bf1b74e8f153b6
[ "MIT" ]
null
null
null
liveedit/urls.py
jonny5532/wagtail-liveedit
c44d46070891a1c9a4959bc120bf1b74e8f153b6
[ "MIT" ]
null
null
null
liveedit/urls.py
jonny5532/wagtail-liveedit
c44d46070891a1c9a4959bc120bf1b74e8f153b6
[ "MIT" ]
null
null
null
from django.urls import re_path from . import views urlpatterns = [ re_path(r'^action/', views.action_view), re_path(r'^append-block/', views.append_block_view), re_path(r'^edit-block/', views.edit_block_view), ]
22.7
56
0.709251
from django.urls import re_path from . import views urlpatterns = [ re_path(r'^action/', views.action_view), re_path(r'^append-block/', views.append_block_view), re_path(r'^edit-block/', views.edit_block_view), ]
0
0
0
bc4ad2574746fcb990fe2f5613171952429a286e
9,063
py
Python
src/libtakiyasha/ncm.py
nukemiko/takiyasha
d0e2ebab2a476646313a1fd412f55b9d1300ea87
[ "MIT" ]
15
2022-01-16T16:13:20.000Z
2022-03-27T15:30:51.000Z
src/libtakiyasha/ncm.py
nukemiko/takiyasha
d0e2ebab2a476646313a1fd412f55b9d1300ea87
[ "MIT" ]
null
null
null
src/libtakiyasha/ncm.py
nukemiko/takiyasha
d0e2ebab2a476646313a1fd412f55b9d1300ea87
[ "MIT" ]
2
2022-01-20T18:59:07.000Z
2022-01-26T08:09:15.000Z
from __future__ import annotations import json from base64 import b64decode, b64encode from copy import deepcopy as dp from io import BytesIO from random import randrange from string import digits as strdigits from typing import Generator, IO from . import utils from .common import Cipher, Crypter from .exceptions im...
32.956364
138
0.589871
from __future__ import annotations import json from base64 import b64decode, b64encode from copy import deepcopy as dp from io import BytesIO from random import randrange from string import digits as strdigits from typing import Generator, IO from . import utils from .common import Cipher, Crypter from .exceptions im...
1,288
131
127
c5c8b58f25c93553d4b99dc4493692bf12596e3d
153
py
Python
unstable_baselines/lib/__init__.py
Ending2015a/unstable_baselines
1d304115406f6e29186cedb0160811d4139e2733
[ "MIT" ]
10
2021-04-26T17:48:27.000Z
2022-03-10T14:32:26.000Z
unstable_baselines/lib/__init__.py
Ending2015a/unstable_baselines
1d304115406f6e29186cedb0160811d4139e2733
[ "MIT" ]
null
null
null
unstable_baselines/lib/__init__.py
Ending2015a/unstable_baselines
1d304115406f6e29186cedb0160811d4139e2733
[ "MIT" ]
null
null
null
from . import base from . import data from . import envs from . import nets from . import prob from . import sche from . import patch from . import utils
19.125
19
0.745098
from . import base from . import data from . import envs from . import nets from . import prob from . import sche from . import patch from . import utils
0
0
0
ead8825c7772e8fc261d2f1de80ea3eefc760d6d
759
py
Python
application/configs.py
Jasbeauty/mine_blog
22899be4db20a92ad40cf35f84a3123dd0ebeee6
[ "Apache-2.0" ]
null
null
null
application/configs.py
Jasbeauty/mine_blog
22899be4db20a92ad40cf35f84a3123dd0ebeee6
[ "Apache-2.0" ]
null
null
null
application/configs.py
Jasbeauty/mine_blog
22899be4db20a92ad40cf35f84a3123dd0ebeee6
[ "Apache-2.0" ]
null
null
null
from datetime import timedelta SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:root@127.0.0.1:3306/mine_blog" SQLALCHEMY_TRACK_MODIFICATIONS = True JWT_SECRET_KEY = 'jwt_secret' JWT_AUTH_URL_RULE = '/api/v1/auth' JWT_EXPIRATION_DELTA = timedelta(seconds=12000) SYS_UPLOAD_PATH = '/home/laowang/gitwarehouse/mine_blog/ap...
36.142857
80
0.73386
from datetime import timedelta SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:root@127.0.0.1:3306/mine_blog" SQLALCHEMY_TRACK_MODIFICATIONS = True JWT_SECRET_KEY = 'jwt_secret' JWT_AUTH_URL_RULE = '/api/v1/auth' JWT_EXPIRATION_DELTA = timedelta(seconds=12000) SYS_UPLOAD_PATH = '/home/laowang/gitwarehouse/mine_blog/ap...
0
0
0
4f293f13da8b2b212878611a5435d18eee9f1452
387
py
Python
user/migrations/0002_customuser_address.py
Zomba4okk/MailApp
2d5cb4f26e3abe2b8e70f15ead888c502741c90b
[ "MIT" ]
null
null
null
user/migrations/0002_customuser_address.py
Zomba4okk/MailApp
2d5cb4f26e3abe2b8e70f15ead888c502741c90b
[ "MIT" ]
null
null
null
user/migrations/0002_customuser_address.py
Zomba4okk/MailApp
2d5cb4f26e3abe2b8e70f15ead888c502741c90b
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2020-12-17 12:05 from django.db import migrations, models
20.368421
62
0.591731
# Generated by Django 3.1.4 on 2020-12-17 12:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0001_initial'), ] operations = [ migrations.AddField( model_name='customuser', name='address', f...
0
273
23
ff0709071d96c95956e90d661b9d512c8f75af12
712
py
Python
Intro CS/Py4e/sum_comments.py
willian-pessoa/My-codes-in-CS-learning-journey
21970780b42435c6be5d5c240b033ff469eaddc5
[ "MIT" ]
null
null
null
Intro CS/Py4e/sum_comments.py
willian-pessoa/My-codes-in-CS-learning-journey
21970780b42435c6be5d5c240b033ff469eaddc5
[ "MIT" ]
null
null
null
Intro CS/Py4e/sum_comments.py
willian-pessoa/My-codes-in-CS-learning-journey
21970780b42435c6be5d5c240b033ff469eaddc5
[ "MIT" ]
null
null
null
# To run this, download the BeautifulSoup zip file # http://www.py4e.com/code3/bs4.zip # and unzip it in the same directory as this file from urllib.request import urlopen from bs4 import BeautifulSoup import ssl # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = False ...
24.551724
51
0.685393
# To run this, download the BeautifulSoup zip file # http://www.py4e.com/code3/bs4.zip # and unzip it in the same directory as this file from urllib.request import urlopen from bs4 import BeautifulSoup import ssl # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = False ...
0
0
0
af2dccf910778c1f8687b312a34eabc6f703bd55
328
py
Python
app/config.py
Mehranalam/Emoji
2f6fbc554589f05e599239b48a4ee0ab445071da
[ "MIT" ]
3
2022-01-16T05:08:25.000Z
2022-02-17T07:39:12.000Z
app/config.py
Mehranalam/Emoji
2f6fbc554589f05e599239b48a4ee0ab445071da
[ "MIT" ]
null
null
null
app/config.py
Mehranalam/Emoji
2f6fbc554589f05e599239b48a4ee0ab445071da
[ "MIT" ]
1
2022-01-22T13:17:33.000Z
2022-01-22T13:17:33.000Z
""" Donate to Createor : { just follow me on github and star to this project } """ # complement this fields
16.4
48
0.704268
""" Donate to Createor : { just follow me on github and star to this project } """ class configBot(): GROUP_NAME = "YOUR_GROUP_NAME" SESSION_NAME = "YOUR_SESSION_NAME" API_ID = "YOUR_API_ID" API_HASH = "YOUR_API_HASH" BOT_TOKEN = "BOT_TOKEN" WELCOMING_PASSED = "PASSED_MASSEAGE" # complement this fiel...
0
180
23
b22343d97b25c2391d780a533d3c31468e2929e7
1,973
py
Python
PizzaHat/bot.py
alexyy802/PizzaHat
ab544c9928bebcb3d6fe418c2753edd1d4f4dfc6
[ "Apache-2.0" ]
1
2021-12-06T23:38:26.000Z
2021-12-06T23:38:26.000Z
PizzaHat/bot.py
alexyy802/PizzaHat
ab544c9928bebcb3d6fe418c2753edd1d4f4dfc6
[ "Apache-2.0" ]
null
null
null
PizzaHat/bot.py
alexyy802/PizzaHat
ab544c9928bebcb3d6fe418c2753edd1d4f4dfc6
[ "Apache-2.0" ]
null
null
null
import discord from discord.ext import commands import asyncpg import datetime from dotenv import load_dotenv import os load_dotenv('.env') INITIAL_EXTENSIONS = [ 'cogs.dev', 'cogs.events', 'cogs.fun', 'cogs.games', 'cogs.help', 'cogs.image', 'cogs.mod', 'cogs.utility'...
31.31746
124
0.603649
import discord from discord.ext import commands import asyncpg import datetime from dotenv import load_dotenv import os load_dotenv('.env') INITIAL_EXTENSIONS = [ 'cogs.dev', 'cogs.events', 'cogs.fun', 'cogs.games', 'cogs.help', 'cogs.image', 'cogs.mod', 'cogs.utility'...
1,405
8
172
b8fa7a10579f9d489fdc7c485b64a1be798e2fae
6,671
py
Python
WaveBlocksND/HagedornBasisEvaluationPhi.py
raoulbq/WaveBlocksND
225b5dd9b1af1998bd40b5f6467ee959292b6a83
[ "BSD-3-Clause" ]
3
2016-09-01T21:13:54.000Z
2020-03-23T15:45:32.000Z
WaveBlocksND/HagedornBasisEvaluationPhi.py
raoulbq/WaveBlocksND
225b5dd9b1af1998bd40b5f6467ee959292b6a83
[ "BSD-3-Clause" ]
null
null
null
WaveBlocksND/HagedornBasisEvaluationPhi.py
raoulbq/WaveBlocksND
225b5dd9b1af1998bd40b5f6467ee959292b6a83
[ "BSD-3-Clause" ]
6
2016-03-16T15:22:01.000Z
2021-03-13T14:06:54.000Z
"""The WaveBlocks Project The basic common algorithms for evaluation Hagedorn basis functions of the old kind. @author: R. Bourquin @copyright: Copyright (C) 2016 R. Bourquin @license: Modified BSD License """ from numpy import complexfloating, dot, vstack, zeros, conjugate from scipy import sqrt from scipy.linalg i...
35.296296
106
0.546695
"""The WaveBlocks Project The basic common algorithms for evaluation Hagedorn basis functions of the old kind. @author: R. Bourquin @copyright: Copyright (C) 2016 R. Bourquin @license: Modified BSD License """ from numpy import complexfloating, dot, vstack, zeros, conjugate from scipy import sqrt from scipy.linalg i...
0
0
0
45da6e5c720cded5d5fb12ac3b7741e6077ab544
981
py
Python
server/gestion/models/orderRando.py
JetLightStudio/Jet-Gest-stock-management
333cbc3dd1b379f53f67250fbd581cbce8e20ca8
[ "MIT" ]
1
2021-08-18T18:53:02.000Z
2021-08-18T18:53:02.000Z
server/gestion/models/orderRando.py
JetLightStudio/Jet-Gest-stock-management
333cbc3dd1b379f53f67250fbd581cbce8e20ca8
[ "MIT" ]
null
null
null
server/gestion/models/orderRando.py
JetLightStudio/Jet-Gest-stock-management
333cbc3dd1b379f53f67250fbd581cbce8e20ca8
[ "MIT" ]
1
2021-08-04T23:53:52.000Z
2021-08-04T23:53:52.000Z
from datetime import datetime from django.db import models from django.conf import settings from django.core.validators import MaxValueValidator, MinValueValidator from django.db.models.signals import post_save from django.dispatch import receiver from serverConfig.models.gestionParams import GestionParam ...
35.035714
94
0.769623
from datetime import datetime from django.db import models from django.conf import settings from django.core.validators import MaxValueValidator, MinValueValidator from django.db.models.signals import post_save from django.dispatch import receiver from serverConfig.models.gestionParams import GestionParam ...
166
362
24
5dfbc25fa139beaf44702988ff3b331c046b4a4f
2,913
py
Python
Pong/pong.py
Grantlee11/PyPong
af5c2cf41b361a9f91b5f3b43fbb5eec9e6a771b
[ "MIT" ]
null
null
null
Pong/pong.py
Grantlee11/PyPong
af5c2cf41b361a9f91b5f3b43fbb5eec9e6a771b
[ "MIT" ]
null
null
null
Pong/pong.py
Grantlee11/PyPong
af5c2cf41b361a9f91b5f3b43fbb5eec9e6a771b
[ "MIT" ]
null
null
null
# Simple PyPong in Python 3 import turtle window = turtle.Screen() window.title("PyPong by Grantlee11") window.bgcolor("black") window.setup(width = 800, height = 600) window.tracer(0) # Score scoreA = 0 scoreB = 0 # Paddle A paddleA = turtle.Turtle() paddleA.speed(0) paddleA.shape("square") paddleA.color("white"...
20.370629
141
0.599725
# Simple PyPong in Python 3 import turtle window = turtle.Screen() window.title("PyPong by Grantlee11") window.bgcolor("black") window.setup(width = 800, height = 600) window.tracer(0) # Score scoreA = 0 scoreB = 0 # Paddle A paddleA = turtle.Turtle() paddleA.speed(0) paddleA.shape("square") paddleA.color("white"...
338
0
91
ac3d3e180986a17fca6dc21810f6f92611cd25d5
3,317
py
Python
tests/test_types.py
alexcrichton/wasmtime-py
90ba6da0a0c5e8a13bdc28c019330f71067823df
[ "Apache-2.0" ]
4
2020-03-25T20:55:29.000Z
2020-03-26T08:57:43.000Z
tests/test_types.py
alexcrichton/wasmtime-py
90ba6da0a0c5e8a13bdc28c019330f71067823df
[ "Apache-2.0" ]
null
null
null
tests/test_types.py
alexcrichton/wasmtime-py
90ba6da0a0c5e8a13bdc28c019330f71067823df
[ "Apache-2.0" ]
null
null
null
import unittest from wasmtime import *
33.505051
65
0.59391
import unittest from wasmtime import * class TestTypes(unittest.TestCase): def test_valtype(self): i32 = ValType.i32() i64 = ValType.i64() f32 = ValType.f32() f64 = ValType.f64() anyref = ValType.anyref() funcref = ValType.funcref() self.assertEqual(i32, i3...
3,078
14
184
929bb8c6c049704512bd15ad70f453b83423c37d
2,075
py
Python
examples/moderate/moderate.py
dneural/python-nullnude
1035d1a23d9d6a7a93b9efac4bdc99c13a8b92f4
[ "X11" ]
1
2016-05-31T09:05:38.000Z
2016-05-31T09:05:38.000Z
examples/moderate/moderate.py
dneural/python-nullnude
1035d1a23d9d6a7a93b9efac4bdc99c13a8b92f4
[ "X11" ]
null
null
null
examples/moderate/moderate.py
dneural/python-nullnude
1035d1a23d9d6a7a93b9efac4bdc99c13a8b92f4
[ "X11" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) 2015, dNeural.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rig...
42.346939
98
0.758554
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) 2015, dNeural.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rig...
0
0
0
8c012d95d514c2b11377fbe82f7ae8f1e7c9c04c
15,265
py
Python
DQMOffline/Trigger/python/SusyMonitoring_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
DQMOffline/Trigger/python/SusyMonitoring_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
DQMOffline/Trigger/python/SusyMonitoring_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from DQMOffline.Trigger.RazorMonitor_cff import * from DQMOffline.Trigger.VBFSUSYMonitor_cff import * from DQMOffline.Trigger.LepHTMonitor_cff import * from DQMOffline.Trigger.susyHLTEleCaloJets_cff import * from DQMOffline.Trigger.SoftMuHardJetMETSUSYMonitor_cff import * from ...
57.387218
468
0.797707
import FWCore.ParameterSet.Config as cms from DQMOffline.Trigger.RazorMonitor_cff import * from DQMOffline.Trigger.VBFSUSYMonitor_cff import * from DQMOffline.Trigger.LepHTMonitor_cff import * from DQMOffline.Trigger.susyHLTEleCaloJets_cff import * from DQMOffline.Trigger.SoftMuHardJetMETSUSYMonitor_cff import * from ...
0
0
0
71bd3b77d216fb6bd6e19a6e951bade7f6e13e2c
7,401
py
Python
prototype/src/frontend/app.py
nmilovanovic/rep
70a7853f54250d26eb14be86643c3b3d5ed233c4
[ "MIT" ]
null
null
null
prototype/src/frontend/app.py
nmilovanovic/rep
70a7853f54250d26eb14be86643c3b3d5ed233c4
[ "MIT" ]
null
null
null
prototype/src/frontend/app.py
nmilovanovic/rep
70a7853f54250d26eb14be86643c3b3d5ed233c4
[ "MIT" ]
null
null
null
from flask import Flask, redirect, url_for, request, render_template, make_response, session, send_from_directory, send_file import uuid import datetime import io import grpc import prototype_pb2_grpc import prototype_pb2 import base64 import json from prometheus_client import Counter, start_http_server import os app ...
38.149485
124
0.706391
from flask import Flask, redirect, url_for, request, render_template, make_response, session, send_from_directory, send_file import uuid import datetime import io import grpc import prototype_pb2_grpc import prototype_pb2 import base64 import json from prometheus_client import Counter, start_http_server import os app ...
5,885
0
243
dc56af512a538f9b748aec086cc85450f71fbc47
794
py
Python
modules/help.py
cernymichal/go2
82869e12a4fed4f9a61b55b81b3453a14fa42d5d
[ "Unlicense" ]
null
null
null
modules/help.py
cernymichal/go2
82869e12a4fed4f9a61b55b81b3453a14fa42d5d
[ "Unlicense" ]
null
null
null
modules/help.py
cernymichal/go2
82869e12a4fed4f9a61b55b81b3453a14fa42d5d
[ "Unlicense" ]
null
null
null
import asyncio import json import os from threading import Timer name = "Help" description = """ Module for displaying help modules: prints all modules help *module*: prints help for a Module """ metadata = {} functions = { "modules": Modules, "help": Help }
20.358974
87
0.671285
import asyncio import json import os from threading import Timer name = "Help" description = """ Module for displaying help modules: prints all modules help *module*: prints help for a Module """ metadata = {} async def OnReady(client, modules): global metadata for module in modules: key = module.n...
450
0
69
31ff2f7c4e2d996eca1f2ec08a6bd9a3b13e6416
152
py
Python
fiaas_deploy_daemon/fake_consumer/fake_consumer.py
j-boivie/fiaas-deploy-daemon
3bba04b3b329f4c9c1418d80a9a007e8ed22f804
[ "Apache-2.0" ]
null
null
null
fiaas_deploy_daemon/fake_consumer/fake_consumer.py
j-boivie/fiaas-deploy-daemon
3bba04b3b329f4c9c1418d80a9a007e8ed22f804
[ "Apache-2.0" ]
null
null
null
fiaas_deploy_daemon/fake_consumer/fake_consumer.py
j-boivie/fiaas-deploy-daemon
3bba04b3b329f4c9c1418d80a9a007e8ed22f804
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8
12.666667
27
0.585526
#!/usr/bin/env python # -*- coding: utf-8 class FakeConsumer(object): def start(self): pass def is_alive(self): return True
26
6
77
1d298b1988affcb7a833af9bfcb9056a30c05653
1,795
py
Python
windy_gridworld.py
CurtisChris7/GridwoRLd
17e718314074e28ed87820056099b0060b191b7b
[ "MIT" ]
null
null
null
windy_gridworld.py
CurtisChris7/GridwoRLd
17e718314074e28ed87820056099b0060b191b7b
[ "MIT" ]
null
null
null
windy_gridworld.py
CurtisChris7/GridwoRLd
17e718314074e28ed87820056099b0060b191b7b
[ "MIT" ]
null
null
null
from absgridworld import AbsGridworld class WindyGridworld(AbsGridworld): """Class representing a windy girdworld""" def __init__(self, schema: list, actions: list, stepPenalty: float, columnToWindMap: dict) -> None: """ Description ---------- Constructor used for processing t...
29.42623
103
0.585515
from absgridworld import AbsGridworld class WindyGridworld(AbsGridworld): """Class representing a windy girdworld""" def __init__(self, schema: list, actions: list, stepPenalty: float, columnToWindMap: dict) -> None: """ Description ---------- Constructor used for processing t...
737
0
108
eec6bebfa984569eb78f8114c1b0fb5d42b088c0
485
py
Python
MahaPolApp/models.py
safir72347/AngularJs-Django-Form-Validation
b86caa4b27e20e3ded90481a9bf256fcdce82a9b
[ "MIT" ]
null
null
null
MahaPolApp/models.py
safir72347/AngularJs-Django-Form-Validation
b86caa4b27e20e3ded90481a9bf256fcdce82a9b
[ "MIT" ]
null
null
null
MahaPolApp/models.py
safir72347/AngularJs-Django-Form-Validation
b86caa4b27e20e3ded90481a9bf256fcdce82a9b
[ "MIT" ]
1
2021-07-29T17:03:35.000Z
2021-07-29T17:03:35.000Z
from django.db import models # Create your models here.
34.642857
45
0.793814
from django.db import models # Create your models here. class register_data(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) dob = models.CharField(max_length=30) mobile = models.CharField(max_length=20) address = models.CharField(max_length=150) user_name ...
0
406
23
6e013e327003dbb74a3af18c948acf50a8373ca5
7,215
py
Python
src/api/datahub/access/tests/modules/access/conftest.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/datahub/access/tests/modules/access/conftest.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/datahub/access/tests/modules/access/conftest.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ------------------------------------------...
29.44898
111
0.585031
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ------------------------------------------...
5,325
0
177
184cf49ab5aa52ae09e6f247d56792442b3ec425
1,423
py
Python
GUI Application/main.py
vladBaciu/PPG-EduKit
2959ca884a2df84ea0d9993658c89d7fdc3452e7
[ "BSD-2-Clause" ]
1
2022-03-21T12:53:51.000Z
2022-03-21T12:53:51.000Z
GUI Application/main.py
vladBaciu/PPG-EduKit
2959ca884a2df84ea0d9993658c89d7fdc3452e7
[ "BSD-2-Clause" ]
null
null
null
GUI Application/main.py
vladBaciu/PPG-EduKit
2959ca884a2df84ea0d9993658c89d7fdc3452e7
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Nov 11 17:47:46 2021 @author: vlad-eusebiu.baciu@vub.be """ import pyqtgraph as pg import sys import logo_qrc import ctypes from PyQt5 import QtWidgets, uic from pyqtgraph import PlotWidget from application1 import App1_Gui from application2 import App2_Gui if __name__ ==...
25.410714
106
0.64863
# -*- coding: utf-8 -*- """ Created on Thu Nov 11 17:47:46 2021 @author: vlad-eusebiu.baciu@vub.be """ import pyqtgraph as pg import sys import logo_qrc import ctypes from PyQt5 import QtWidgets, uic from pyqtgraph import PlotWidget from application1 import App1_Gui from application2 import App2_Gui class MainWind...
852
19
209
fedd4ce27f3dfcab21b697c24ca2b7461be665eb
1,968
py
Python
bin_packing.py
kappapidelta/Apress-AI
6faf15f18c840c95eafce8f3ee5a41065c590019
[ "MIT" ]
66
2018-03-26T15:08:28.000Z
2022-03-17T13:07:13.000Z
bin_packing.py
kappapidelta/Apress-AI
6faf15f18c840c95eafce8f3ee5a41065c590019
[ "MIT" ]
1
2022-01-13T06:06:17.000Z
2022-01-13T06:06:17.000Z
bin_packing.py
kappapidelta/Apress-AI
6faf15f18c840c95eafce8f3ee5a41065c590019
[ "MIT" ]
63
2018-03-06T08:47:11.000Z
2022-03-25T16:35:26.000Z
from random import randint,uniform from math import ceil from my_or_tools import newSolver, ObjVal, SolVal
31.741935
65
0.524898
from random import randint,uniform from math import ceil def gen_data(n): R,T=[],0 for i in range(n): RR=[randint(6,10),randint(200,500)] T+=RR[0]*RR[1] R.append(RR) return R,randint(1200, 1500) from my_or_tools import newSolver, ObjVal, SolVal def solve_model(D,W,symmetry_break=False,knapsack=True...
1,791
0
68
c0e909dbb046be66edd190e071e7dd8efbfcda7a
858
py
Python
solutions/problem23.py
wy/ProjectEuler
842d45994fe76ef0ea70dbe6b6f2a559078f45f3
[ "Apache-1.1" ]
null
null
null
solutions/problem23.py
wy/ProjectEuler
842d45994fe76ef0ea70dbe6b6f2a559078f45f3
[ "Apache-1.1" ]
null
null
null
solutions/problem23.py
wy/ProjectEuler
842d45994fe76ef0ea70dbe6b6f2a559078f45f3
[ "Apache-1.1" ]
null
null
null
# coding: utf8 # Author: Wing Yung Chan (~wy) # Date: 2017 #non-abundant sums # N is non-abundant if the sum of its proper divisors is <= N # prop(N) = Set{1 <= i < N | N % i == 0} print(problem23())
16.823529
61
0.536131
# coding: utf8 # Author: Wing Yung Chan (~wy) # Date: 2017 #non-abundant sums # N is non-abundant if the sum of its proper divisors is <= N # prop(N) = Set{1 <= i < N | N % i == 0} def properdivisors(N): acc = 0 for i in range(1,N): if N % i == 0: acc = acc + i return acc def abun...
537
0
115
1c7029d58f3d83ba1ff6470775aed8811fcd0cda
1,618
py
Python
examples/docs_snippets/docs_snippets/intro_tutorial/advanced/scheduling/scheduler.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2021-01-31T19:16:29.000Z
2021-01-31T19:16:29.000Z
examples/docs_snippets/docs_snippets/intro_tutorial/advanced/scheduling/scheduler.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets/intro_tutorial/advanced/scheduling/scheduler.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2021-12-08T18:13:19.000Z
2021-12-08T18:13:19.000Z
# start_scheduler_marker_0 import csv from datetime import datetime import requests from dagster import get_dagster_logger, job, op, repository, schedule @op @job # end_scheduler_marker_0 # start_scheduler_marker_1 @schedule( cron_schedule="45 6 * * *", job=hello_cereal_job, execution_timezone="US/C...
23.114286
75
0.721261
# start_scheduler_marker_0 import csv from datetime import datetime import requests from dagster import get_dagster_logger, job, op, repository, schedule @op def hello_cereal(context): response = requests.get("https://docs.dagster.io/assets/cereal.csv") lines = response.text.split("\n") cereals = [row fo...
808
0
132
b3fcb197fa56808b5ac3439e00e1aac34437d381
6,613
py
Python
counterfit/targets/movie_reviews/movie_reviews.py
ScriptBox99/azure-counterfit
757a51e082f47d446cf9cc0c93011c3a4953be52
[ "MIT" ]
495
2021-05-03T17:11:52.000Z
2022-03-31T19:22:40.000Z
counterfit/targets/movie_reviews/movie_reviews.py
ScriptBox99/azure-counterfit
757a51e082f47d446cf9cc0c93011c3a4953be52
[ "MIT" ]
25
2021-05-06T00:07:19.000Z
2022-03-31T12:16:25.000Z
counterfit/targets/movie_reviews/movie_reviews.py
ScriptBox99/azure-counterfit
757a51e082f47d446cf9cc0c93011c3a4953be52
[ "MIT" ]
79
2021-05-03T21:31:44.000Z
2022-03-13T14:42:08.000Z
import pickle import re import copy import numpy as np import pandas as pd from torch import nn import torch from counterfit.core.targets import Target class MovieReviewsSentimentLSTM(nn.Module): """pre-trained LSTM model on 25 epochs for building sentiment analysis model on IMDB movies review dataset. """...
34.442708
138
0.613337
import pickle import re import copy import numpy as np import pandas as pd from torch import nn import torch from counterfit.core.targets import Target class MovieReviewsSentimentLSTM(nn.Module): """pre-trained LSTM model on 25 epochs for building sentiment analysis model on IMDB movies review dataset. """...
1,867
0
81