hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
529f282819a2131b75db1eea0ad03813c7a9c2d6
6,339
py
Python
Classes/import_all.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Classes/import_all.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Classes/import_all.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*-
47.661654
66
0.874586
# -*- coding: utf-8 -*- from pyleecan.Classes.Arc import Arc from pyleecan.Classes.Arc1 import Arc1 from pyleecan.Classes.Arc2 import Arc2 from pyleecan.Classes.Arc3 import Arc3 from pyleecan.Classes.Circle import Circle from pyleecan.Classes.CondType11 import CondType11 from pyleecan.Classes.CondType12 import CondTyp...
0
0
0
0
0
0
0
3,454
2,861
548cfea669e8fb927564f7dc739bc04dbf8d3554
1,258
py
Python
pyday_social_network/urls.py
6desislava6/PyDay
e43d05ac83297a16c12fef6b55c00df2571e3e81
[ "MIT" ]
2
2016-07-09T08:23:51.000Z
2016-07-14T14:50:42.000Z
pyday_social_network/urls.py
6desislava6/PyDay
e43d05ac83297a16c12fef6b55c00df2571e3e81
[ "MIT" ]
null
null
null
pyday_social_network/urls.py
6desislava6/PyDay
e43d05ac83297a16c12fef6b55c00df2571e3e81
[ "MIT" ]
null
null
null
from django.conf.urls import url from pyday_social_network import views app_name = 'pyday_social_network' urlpatterns = [ url(r'^upload_picture/$', views.UploadPictureView.as_view(), name='upload_picture'), url(r'^upload_song/$', views.UploadSongView.as_view(), name='upload_song'), url(r'^register/$', vie...
44.928571
88
0.662162
from django.conf.urls import url from django.conf.urls import patterns from pyday_social_network import views app_name = 'pyday_social_network' urlpatterns = [ url(r'^upload_picture/$', views.UploadPictureView.as_view(), name='upload_picture'), url(r'^upload_song/$', views.UploadSongView.as_view(), name='uplo...
0
0
0
0
0
0
0
16
22
5895a904ec4b8da5fce8dfd9fd8fe6e872d7fac6
24,701
py
Python
examples/xray_scratch_calculations/refraction_map.py
zhouzhouxpyf/CFN-softbio
21e4f4845e7a49c97f4ed2b0aa78a7eb831f6bcc
[ "BSD-3-Clause" ]
13
2018-04-17T06:35:20.000Z
2021-09-22T08:49:47.000Z
examples/xray_scratch_calculations/refraction_map.py
zhouzhouxpyf/CFN-softbio
21e4f4845e7a49c97f4ed2b0aa78a7eb831f6bcc
[ "BSD-3-Clause" ]
14
2018-04-18T01:05:57.000Z
2020-11-05T21:57:09.000Z
examples/xray_scratch_calculations/refraction_map.py
zhouzhouxpyf/CFN-softbio
21e4f4845e7a49c97f4ed2b0aa78a7eb831f6bcc
[ "BSD-3-Clause" ]
9
2017-05-26T14:47:38.000Z
2021-03-24T02:44:59.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Imports ######################################## import sys, os SciAnalysis_PATH='/home/kyager/current/code/SciAnalysis/main/' SciAnalysis_PATH in sys.path or sys.path.append(SciAnalysis_PATH) #from SciAnalysis.XSAnalysis.Data import * #from SciAnalysis.XSAnalysis import P...
35.902616
215
0.573135
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Imports ######################################## import sys, os SciAnalysis_PATH='/home/kyager/current/code/SciAnalysis/main/' SciAnalysis_PATH in sys.path or sys.path.append(SciAnalysis_PATH) import glob from SciAnalysis import tools from SciAnalysis.Data import * #from ...
3
0
0
8,257
0
206
0
7
187
10acd9132720328571c3908ad6b06c43f32bd7a8
963
py
Python
notebook/numpy_image_mask.py
vhn0912/python-snippets
80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038
[ "MIT" ]
174
2018-05-30T21:14:50.000Z
2022-03-25T07:59:37.000Z
notebook/numpy_image_mask.py
vhn0912/python-snippets
80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038
[ "MIT" ]
5
2019-08-10T03:22:02.000Z
2021-07-12T20:31:17.000Z
notebook/numpy_image_mask.py
vhn0912/python-snippets
80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038
[ "MIT" ]
53
2018-04-27T05:26:35.000Z
2022-03-25T07:59:37.000Z
import numpy as np from PIL import Image src = np.array(Image.open('data/src/lena.jpg')) mask = np.array(Image.open('data/src/horse_r.png').resize(src.shape[1::-1], Image.BILINEAR)) print(mask.dtype, mask.min(), mask.max()) # uint8 0 255 mask = mask / 255 print(mask.dtype, mask.min(), mask.max()) # float64 0.0 1.0 ...
22.395349
105
0.686397
import numpy as np from PIL import Image src = np.array(Image.open('data/src/lena.jpg')) mask = np.array(Image.open('data/src/horse_r.png').resize(src.shape[1::-1], Image.BILINEAR)) print(mask.dtype, mask.min(), mask.max()) # uint8 0 255 mask = mask / 255 print(mask.dtype, mask.min(), mask.max()) # float64 0.0 1.0 ...
0
0
0
0
0
0
0
0
0
956ea26d7123131485243c9992b3b8c107a48e43
1,031
py
Python
Python/Py_R_consistency_check.py
am5113/covid19model
27f121d246e7a5b0c06077ea2abd3807539d0ac8
[ "MIT" ]
null
null
null
Python/Py_R_consistency_check.py
am5113/covid19model
27f121d246e7a5b0c06077ea2abd3807539d0ac8
[ "MIT" ]
null
null
null
Python/Py_R_consistency_check.py
am5113/covid19model
27f121d246e7a5b0c06077ea2abd3807539d0ac8
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import dill as pickle import rpy2.robjects as robjects readRDS = robjects.r['readRDS'] r_stan_data = readRDS('r_stan_data.rds') with open('python_stan_data.pkl', 'rb') as file: py_stan_data = pickle.load(file) py_stan_data.keys() for key in py_stan_data.key...
22.911111
67
0.646945
import numpy as np import pandas as pd import matplotlib.pyplot as plt import dill as pickle import rpy2.robjects as robjects readRDS = robjects.r['readRDS'] r_stan_data = readRDS('r_stan_data.rds') with open('python_stan_data.pkl', 'rb') as file: py_stan_data = pickle.load(file) py_stan_data.keys() def mych...
0
0
0
0
0
478
0
-2
45
07a75698e3e7e51d7959fd79517d9197b3673170
7,124
py
Python
nlcpy/testing/condition.py
SX-Aurora/nlcpy
0a53eec8778073bc48b12687b7ce37ab2bf2b7e0
[ "BSD-3-Clause" ]
11
2020-07-31T02:21:55.000Z
2022-03-10T03:12:11.000Z
nlcpy/testing/condition.py
SX-Aurora/nlcpy
0a53eec8778073bc48b12687b7ce37ab2bf2b7e0
[ "BSD-3-Clause" ]
null
null
null
nlcpy/testing/condition.py
SX-Aurora/nlcpy
0a53eec8778073bc48b12687b7ce37ab2bf2b7e0
[ "BSD-3-Clause" ]
null
null
null
# # * The source code in this file is based on the soure code of CuPy. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
40.477273
88
0.641353
# # * The source code in this file is based on the soure code of CuPy. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
0
2,105
0
119
0
69
0
-11
95
5adbc66bc378264f38cf5bb27869daee46704ee5
730
py
Python
nc_programs/training/ens_trainer.py
plin1112/ANI-Tools
76280c918fc79fee8c266b8bc9ab57f86104ec99
[ "MIT" ]
8
2018-10-30T16:48:44.000Z
2021-03-08T01:44:41.000Z
nc_programs/training/ens_trainer.py
plin1112/ANI-Tools
76280c918fc79fee8c266b8bc9ab57f86104ec99
[ "MIT" ]
null
null
null
nc_programs/training/ens_trainer.py
plin1112/ANI-Tools
76280c918fc79fee8c266b8bc9ab57f86104ec99
[ "MIT" ]
5
2018-04-05T15:51:12.000Z
2019-05-23T21:38:31.000Z
import anialtools as alt nwdir = '/home/jsmith48/scratch/ccsd_extrapolation/ccsd_train/tl_train_dhl_7/' h5dir = '/home/jsmith48/scratch/ccsd_extrapolation/h5files/train/cmb/' Nnets = 8 # networks in ensemble Nblock = 16 # Number of blocks in split Nbvald = 2 # number of valid blocks Nbtest = 1 # number of test blocks...
33.181818
84
0.710959
import anialtools as alt nwdir = '/home/jsmith48/scratch/ccsd_extrapolation/ccsd_train/tl_train_dhl_7/' h5dir = '/home/jsmith48/scratch/ccsd_extrapolation/h5files/train/cmb/' Nnets = 8 # networks in ensemble Nblock = 16 # Number of blocks in split Nbvald = 2 # number of valid blocks Nbtest = 1 # number of test blocks...
0
0
0
0
0
0
0
0
0
b2b2feabe5d611666638e0832f0331af26f3942e
1,442
py
Python
libcst/codemod/__init__.py
hoduchieu01/LibCST
23af2cb45e1f7647f1604404df5f6e5e87b2e42b
[ "Apache-2.0" ]
3
2021-03-29T19:21:08.000Z
2021-12-31T09:30:11.000Z
libcst/codemod/__init__.py
hoduchieu01/LibCST
23af2cb45e1f7647f1604404df5f6e5e87b2e42b
[ "Apache-2.0" ]
1
2021-08-20T19:03:09.000Z
2021-08-20T19:03:09.000Z
libcst/codemod/__init__.py
hoduchieu01/LibCST
23af2cb45e1f7647f1604404df5f6e5e87b2e42b
[ "Apache-2.0" ]
1
2020-09-18T06:37:51.000Z
2020-09-18T06:37:51.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # from libcst.codemod._cli import (ParallelTransformResult, diff_code, exec_transform_with_prettyprint, gather_files, parallel_exec_transform_w...
25.298246
80
0.742718
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # from libcst.codemod._cli import ( ParallelTransformResult, diff_code, exec_transform_with_prettyprint, gather_files, para...
0
0
0
0
0
0
0
73
0
0b5491a670a673eeee3886154c592f4304bf6978
396
py
Python
2018/day_15/classes.py
sunjerry019/adventOfCode18
6970ece25e54b9f90c4aadd1a5d8569bd32f403b
[ "MIT" ]
null
null
null
2018/day_15/classes.py
sunjerry019/adventOfCode18
6970ece25e54b9f90c4aadd1a5d8569bd32f403b
[ "MIT" ]
null
null
null
2018/day_15/classes.py
sunjerry019/adventOfCode18
6970ece25e54b9f90c4aadd1a5d8569bd32f403b
[ "MIT" ]
null
null
null
#!/bin/python3
28.285714
92
0.593434
#!/bin/python3 class myPath(): def __init__(self, startCoord, endCoord, distance, path): # path is an array of coordinates to move to self.start = startCoord self.end = endCoord self.distance = distance self.path = path pass def __repr__(self): return "<...
0
0
0
358
0
0
0
0
23
4f08ffd6a51e8d59f2eef0f1e52829d2ee55cc69
1,014
py
Python
filter_errors.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
filter_errors.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
filter_errors.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
import json from pathlib import Path import tarfile PREDICTIONS_DIR = "./data/predictions" folder = Path(PREDICTIONS_DIR) pred_paths = folder.glob("**/*.jsonl") compiled_errors_path = "error_analysis/errors.jsonl" zipped_path = "error_analysis/errors.tar.gz" with open(compiled_errors_path, "w") as file: pass f...
32.709677
120
0.667653
import json from pathlib import Path import tarfile PREDICTIONS_DIR = "./data/predictions" folder = Path(PREDICTIONS_DIR) pred_paths = folder.glob("**/*.jsonl") compiled_errors_path = "error_analysis/errors.jsonl" zipped_path = "error_analysis/errors.tar.gz" with open(compiled_errors_path, "w") as file: pass f...
0
0
0
0
0
0
0
0
0
d0015db79a366c602b4986e19d78fcb3e9386ca6
2,075
py
Python
huey_legacy/importer.py
yipstar/surf_python
60bb52c89de8d00afe9a1e51cc69639344c4c807
[ "Apache-2.0" ]
null
null
null
huey_legacy/importer.py
yipstar/surf_python
60bb52c89de8d00afe9a1e51cc69639344c4c807
[ "Apache-2.0" ]
3
2021-05-20T18:59:03.000Z
2022-02-26T08:44:03.000Z
huey_legacy/importer.py
yipstar/surf_python
60bb52c89de8d00afe9a1e51cc69639344c4c807
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd import os import datetime import requests from huey.models import Buoy, BuoyRealtimeWaveDetail, BuoyRawSpectralWaveData id ).order_by(BuoyRealtimeWaveDetail.ts.desc()).first() realtime_url = f"https://www.ndbc.noaa.gov/data/realtime2/{station_id}.spec" df = pd.read_csv(r...
35.169492
161
0.686265
import numpy as np import pandas as pd import os import datetime import requests from huey.models import Buoy, BuoyRealtimeWaveDetail, BuoyRawSpectralWaveData def import_buoy_realtime_wave_detail(db_session): station_id = "46025" buoy = db_session.query(Buoy).filter(Buoy.station_id == station_id).first() ...
0
0
0
0
0
1,166
0
0
46
33e05356ed0cd880f8649de33c74f42fbb5dc5fa
7,680
py
Python
NLTK/fns.py
etholpalmer/Deep-Learning-homework
c6c341e5b716f24c47d9a8b5179c0d767cabb153
[ "ADSL" ]
null
null
null
NLTK/fns.py
etholpalmer/Deep-Learning-homework
c6c341e5b716f24c47d9a8b5179c0d767cabb153
[ "ADSL" ]
null
null
null
NLTK/fns.py
etholpalmer/Deep-Learning-homework
c6c341e5b716f24c47d9a8b5179c0d767cabb153
[ "ADSL" ]
null
null
null
# Initial imports import nltk import pandas as pd from nltk.sentiment.vader import SentimentIntensityAnalyzer from nltk.tokenize import word_tokenize nltk.download('stopwords') nltk.download('punkt') nltk.download('wordnet') from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer, PorterStemmer from...
34.751131
124
0.661719
# Initial imports from calendar import day_abbr import nltk import pandas as pd from pathlib import Path from nltk.sentiment.vader import SentimentIntensityAnalyzer from nltk.tokenize import word_tokenize, sent_tokenize nltk.download('stopwords') nltk.download('punkt') nltk.download('wordnet') from nltk.corpus import...
0
0
0
0
0
553
0
14
132
7169c5f3fc657450ddc70de2b2c1345f07cc29c7
4,798
py
Python
examples/scripts/04_benchmarking.py
wilsonify/sktime
68395d44bd3f46b0801c506e23e889dd54999d29
[ "BSD-3-Clause" ]
null
null
null
examples/scripts/04_benchmarking.py
wilsonify/sktime
68395d44bd3f46b0801c506e23e889dd54999d29
[ "BSD-3-Clause" ]
null
null
null
examples/scripts/04_benchmarking.py
wilsonify/sktime
68395d44bd3f46b0801c506e23e889dd54999d29
[ "BSD-3-Clause" ]
null
null
null
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.1 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # Benchmarking with sktime # # The benchmarking modu...
36.075188
376
0.758024
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.1 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # Benchmarking with sktime # # The benchmarking modu...
0
0
0
0
0
0
0
11
0
3633436e60503902f2c90eb313bc015a9f19f634
4,588
py
Python
neural_network_visualize.py
ahijevyc/NSC_objects
322728a71ec011b681b0038e9dcd86df1f73b2fd
[ "MIT" ]
null
null
null
neural_network_visualize.py
ahijevyc/NSC_objects
322728a71ec011b681b0038e9dcd86df1f73b2fd
[ "MIT" ]
null
null
null
neural_network_visualize.py
ahijevyc/NSC_objects
322728a71ec011b681b0038e9dcd86df1f73b2fd
[ "MIT" ]
null
null
null
#!/usr/bin/env python import matplotlib matplotlib.use('Agg') import sys from keras.models import load_model ### NEURAL NETWORK PARAMETERS ### nn_params = { 'num_layers': 1, 'num_neurons': [ int(sys.argv[1]) ], 'dropout': float(sys.argv[2]), 'lr': 0.001, 'num_epochs': 10, \ 'report_window_space':[ 120 ...
42.481481
278
0.68374
#!/usr/bin/env python import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.colors import LogNorm, ListedColormap,BoundaryNorm import numpy as np import datetime as dt import sys, os, pickle from scipy.ndimage.filters import gaussian_filter import pandas as pd from mpl_toolkits.basema...
0
0
0
0
0
2,065
0
333
491
6a3c3aacea318ea067ca6fe637ae56e6e52ee5ac
1,041
py
Python
setup.py
indiasnetwork/Fortimanager_API_py
371a1714e6d1c46c6ed3d7b179b8554f0e22eb91
[ "MIT" ]
1
2020-08-17T17:29:51.000Z
2020-08-17T17:29:51.000Z
setup.py
indiasnetwork/Fortimanager_API_py
371a1714e6d1c46c6ed3d7b179b8554f0e22eb91
[ "MIT" ]
null
null
null
setup.py
indiasnetwork/Fortimanager_API_py
371a1714e6d1c46c6ed3d7b179b8554f0e22eb91
[ "MIT" ]
1
2020-08-27T23:51:12.000Z
2020-08-27T23:51:12.000Z
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='pyFortiManagerAPI', description='A Python wrapper for the FortiManager REST API', version='0.1.6', py_modules=["pyFortiManagerAPI"], package_dir={'': 'src'}, keywords=['Fortimanager', ...
35.896552
102
0.646494
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='pyFortiManagerAPI', description='A Python wrapper for the FortiManager REST API', version='0.1.6', py_modules=["pyFortiManagerAPI"], package_dir={'': 'src'}, keywords=['Fortimanager', ...
0
0
0
0
0
0
0
0
0
1e538c0435f863cc98fe4837d5f70861dee01ff5
5,293
py
Python
tests/test_flight_parsing.py
FergM/flight_tables
8d446f9714aa41a5cfd6e720a4696df677522659
[ "MIT" ]
1
2020-02-02T00:50:33.000Z
2020-02-02T00:50:33.000Z
tests/test_flight_parsing.py
FergM/FlightTimes
8d446f9714aa41a5cfd6e720a4696df677522659
[ "MIT" ]
3
2020-07-06T17:15:31.000Z
2020-12-29T12:08:07.000Z
tests/test_flight_parsing.py
FergM/FlightTimes
8d446f9714aa41a5cfd6e720a4696df677522659
[ "MIT" ]
1
2020-07-08T14:27:53.000Z
2020-07-08T14:27:53.000Z
import unittest if __name__ == '__main__': unittest.main()
45.62931
124
0.597393
from datetime import datetime import unittest from flight_tables.flight_parsing import Flight, ParsedFlights class SampleData(object): def __init__(self): self.test_flight_departed_1 = {'actual_datetime': datetime(2020, 1, 30, 15, 15), 'code_share_type': 'mai...
0
0
0
5,067
0
0
0
49
114
25ec21d8f21b42c5e9af9a855d9d5223b791ff35
410
py
Python
resources/migrations/0003_auto_20201022_2010.py
auxfuse/ci-hackathon-app
87d5ad7aae33c15f535ceed28e1657a014159516
[ "MIT" ]
11
2020-10-06T13:50:46.000Z
2021-02-27T20:19:17.000Z
resources/migrations/0003_auto_20201022_2010.py
auxfuse/ci-hackathon-app
87d5ad7aae33c15f535ceed28e1657a014159516
[ "MIT" ]
174
2020-10-13T18:25:34.000Z
2022-01-17T09:49:18.000Z
resources/migrations/0003_auto_20201022_2010.py
auxfuse/ci-hackathon-app
87d5ad7aae33c15f535ceed28e1657a014159516
[ "MIT" ]
46
2020-10-14T11:27:20.000Z
2022-01-31T17:48:12.000Z
# Generated by Django 3.1.1 on 2020-10-22 20:10
21.578947
63
0.609756
# Generated by Django 3.1.1 on 2020-10-22 20:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('resources', '0002_resource_description'), ] operations = [ migrations.AlterField( model_name='resource', name='descr...
0
0
0
296
0
0
0
19
46
e760ccc95f3d2af10148d10396bfac95795a98b1
1,413
py
Python
library/python/pysandesh/util.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
8
2015-01-08T17:36:08.000Z
2019-09-18T01:49:18.000Z
library/python/pysandesh/util.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
4
2015-01-12T21:26:04.000Z
2020-12-22T15:48:55.000Z
library/python/pysandesh/util.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
35
2015-02-26T18:19:18.000Z
2020-02-05T09:49:47.000Z
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # util # import sys import traceback # end UTCTimestampUsec # end UTCTimestampUsecToString # end enum def import_class(import_str): """Returns a class from a string including module and class.""" mod_str, _sep, class_str = import_str.rp...
25.232143
72
0.657466
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # util # import datetime import sys import traceback import collections def UTCTimestampUsec(): epoch = datetime.datetime.utcfromtimestamp(0) now = datetime.datetime.utcnow() delta = now-epoch return (delta.microseconds + ...
0
38
0
170
0
436
0
-9
137
fa176fcdd078f451a56a5679dd274bde5c3bc421
780
py
Python
SW-Academy/leetcode_twosum.py
Luann9711/NDD_study
3ba3a8bf31e1da07531b526e873ec5865d91fda0
[ "Unlicense" ]
null
null
null
SW-Academy/leetcode_twosum.py
Luann9711/NDD_study
3ba3a8bf31e1da07531b526e873ec5865d91fda0
[ "Unlicense" ]
6
2022-01-17T01:58:51.000Z
2022-02-17T06:20:35.000Z
SW-Academy/leetcode_twosum.py
Luann9711/NDD_study
3ba3a8bf31e1da07531b526e873ec5865d91fda0
[ "Unlicense" ]
5
2022-01-16T04:15:14.000Z
2022-01-16T05:22:29.000Z
# -*- coding: utf-8 -*- """leetcode_twosum.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1RPnZuejWl1-nL1k0Q0m7BXYbwQduQJaJ """ # : https://leetcode.com/problems/two-sum/
25.16129
77
0.535897
# -*- coding: utf-8 -*- """leetcode_twosum.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1RPnZuejWl1-nL1k0Q0m7BXYbwQduQJaJ """ # 문제: https://leetcode.com/problems/two-sum/ class Solution(object): from copy import deepcopy def twoS...
6
0
0
510
0
0
0
0
23
f620b14338e61be682d35b0543506d9c7f9a1c6d
905
py
Python
manim/utils/unit.py
PhotonSpheres/manim
7399c24b33095e29633fd75460d13eae5703cba9
[ "MIT" ]
9,497
2020-05-19T04:05:51.000Z
2022-03-31T19:00:02.000Z
manim/utils/unit.py
PhotonSpheres/manim
7399c24b33095e29633fd75460d13eae5703cba9
[ "MIT" ]
2,052
2020-05-19T03:35:26.000Z
2022-03-31T16:18:06.000Z
manim/utils/unit.py
PhotonSpheres/manim
7399c24b33095e29633fd75460d13eae5703cba9
[ "MIT" ]
1,016
2020-05-20T01:16:11.000Z
2022-03-30T16:47:14.000Z
"""Implement the Unit class.""" from .. import config, constants __all__ = ["Pixels", "Degrees", "Munits", "Percent"] Pixels = _PixelUnits() Degrees = constants.PI / 180 Munits = 1
24.459459
70
0.653039
"""Implement the Unit class.""" import numpy as np from .. import config, constants __all__ = ["Pixels", "Degrees", "Munits", "Percent"] class _PixelUnits: def __mul__(self, val): return val * config.frame_width / config.pixel_width def __rmul__(self, val): return val * config.frame_width ...
0
0
0
652
0
0
0
-3
69
bfbb083ccfc3212dd159cce801faf0983417efc0
606
py
Python
main_functional_msci_ric.py
ginkgodango/lgs
ffdd86e87b7859a76f5f0a355161ab63c4cd4f2e
[ "MIT" ]
1
2022-02-15T23:52:19.000Z
2022-02-15T23:52:19.000Z
main_functional_msci_ric.py
ginkgodango/lgs
ffdd86e87b7859a76f5f0a355161ab63c4cd4f2e
[ "MIT" ]
1
2021-02-18T08:44:01.000Z
2021-02-18T08:44:56.000Z
main_functional_msci_ric.py
ginkgodango/lgs
ffdd86e87b7859a76f5f0a355161ab63c4cd4f2e
[ "MIT" ]
null
null
null
import os ric_folders_endswith = ( 'core_dm_daily_c_d_rif', 'core_em_daily_d_rif', 'scap_dm_daily_c_d_rif', 'scap_em_daily_d_rif' ) ric_files_endswith = ( 'CORE_DM_ALL_SECURITY_CODE_DAILY_D_RIF', 'CORE_EM_ALL_SECURITY_CODE_DAILY_D_RIF', 'SCAP_DM_ALL_SECURITY_CODE_DAILY_D_RIF', 'SCAP_E...
25.25
99
0.759076
import os import pandas as pd ric_folders_endswith = ( 'core_dm_daily_c_d_rif', 'core_em_daily_d_rif', 'scap_dm_daily_c_d_rif', 'scap_em_daily_d_rif' ) ric_files_endswith = ( 'CORE_DM_ALL_SECURITY_CODE_DAILY_D_RIF', 'CORE_EM_ALL_SECURITY_CODE_DAILY_D_RIF', 'SCAP_DM_ALL_SECURITY_CODE_DAILY...
0
0
0
0
0
0
0
-2
22
a0980ed51b20ccf2249a4e328db2599201fe3137
7,753
py
Python
pyha/common/complex.py
gasparka/pyha
60d9bbfd6075e7548d670d05317d64bc2a1a19ee
[ "Apache-2.0" ]
6
2017-05-18T18:57:07.000Z
2020-08-06T11:23:34.000Z
pyha/common/complex.py
gasparka/pyha
60d9bbfd6075e7548d670d05317d64bc2a1a19ee
[ "Apache-2.0" ]
607
2017-05-10T12:51:54.000Z
2022-03-31T18:08:15.000Z
pyha/common/complex.py
gasparka/pyha
60d9bbfd6075e7548d670d05317d64bc2a1a19ee
[ "Apache-2.0" ]
1
2019-03-20T13:57:46.000Z
2019-03-20T13:57:46.000Z
import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger('complex') default_complex = Complex(0, 0, -17, overflow_style='saturate', round_style='round')
31.51626
125
0.572811
import logging import math from pyha.common.context_managers import SimPath from pyha.common.fixed_point import Sfix logging.basicConfig(level=logging.INFO) logger = logging.getLogger('complex') class Complex: """ Complex number with ``.real`` and ``.imag`` elements. Default type is ``Complex(left=0, right=-...
0
206
0
7,240
0
0
0
36
90
214e4427d3f84f8525fb64a098839c41a2954226
562
py
Python
proxypool/crawlers/public/cool-proxy.py
youttiao/ProxyPool
d2a22535dd46978a2514ab816d22186217cb2535
[ "MIT" ]
null
null
null
proxypool/crawlers/public/cool-proxy.py
youttiao/ProxyPool
d2a22535dd46978a2514ab816d22186217cb2535
[ "MIT" ]
null
null
null
proxypool/crawlers/public/cool-proxy.py
youttiao/ProxyPool
d2a22535dd46978a2514ab816d22186217cb2535
[ "MIT" ]
null
null
null
BASE_URL = 'https://cool-proxy.net/proxies.json' if __name__ == '__main__': crawler = CoolproxyCrawler() for proxy in crawler.crawl(): print(proxy)
21.615385
48
0.615658
from proxypool.schemas.proxy import Proxy from proxypool.crawlers.base import BaseCrawler import json BASE_URL = 'https://cool-proxy.net/proxies.json' class CoolproxyCrawler(BaseCrawler): """ https://cool-proxy.net/ """ urls = [BASE_URL] def parse(self, html): r = json.loads(html) ...
0
0
0
269
0
0
0
36
89
7be62f43114fb71d4448232010d53f24107f0946
4,255
py
Python
src/svphase/vis/test_pred_accuracy.py
l337x911/inphadel
7d5ad58d90d745ed82226a8b0b983875cbe1d26e
[ "CC-BY-3.0" ]
3
2015-11-20T02:27:23.000Z
2020-04-26T07:19:18.000Z
src/svphase/vis/test_pred_accuracy.py
l337x911/inphadel
7d5ad58d90d745ed82226a8b0b983875cbe1d26e
[ "CC-BY-3.0" ]
null
null
null
src/svphase/vis/test_pred_accuracy.py
l337x911/inphadel
7d5ad58d90d745ed82226a8b0b983875cbe1d26e
[ "CC-BY-3.0" ]
null
null
null
#def _get_model_and_version(model_stat): # fname = os.path.basename(model_stat).split('.') # return fname[0], '.'.join(fname[1:3]) if __name__=='__main__': import argparse parser = argparse.ArgumentParser(description='Plot accuracies for each class from a truth file and a set of predictions') parser.add_argume...
37.654867
170
0.699177
import os import numpy as np import pandas as pd import matplotlib as mpl from matplotlib import pyplot as plt from svphase.utils.config import FONT, COLORS from svphase.learn.evaluation import ClassLabel #def _get_model_and_version(model_stat): # fname = os.path.basename(model_stat).split('.') # return fname[0], '.'....
0
0
0
0
0
3,372
0
51
177
d5bbb33a164b7fd520c2680f749966dd727ec608
1,174
py
Python
Chapter08/Ch08_Code/UnitTestsEnglish.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
2
2021-01-12T03:13:29.000Z
2021-01-12T03:13:31.000Z
Chapter08/Ch08_Code/UnitTestsEnglish.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
null
null
null
Chapter08/Ch08_Code/UnitTestsEnglish.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
1
2022-02-22T02:06:32.000Z
2022-02-22T02:06:32.000Z
''' May 2017 @author: Burkhard ''' import unittest #========================== if __name__ == '__main__': unittest.main()
26.681818
66
0.532368
''' May 2017 @author: Burkhard ''' import unittest from Ch08_Code.LanguageResources import I18N from Ch08_Code.GUI_Refactored import OOP as GUI class GuiUnitTests(unittest.TestCase): def test_TitleIsEnglish(self): i18n = I18N('en') self.assertEqual(i18n.title, "Pytho...
0
0
0
869
0
0
0
49
91
7a33cf1e730e26773f1c2394554a237d49671490
7,388
py
Python
tools/get_probabilites_of_stroke_counts.py
MartinThoma/write-math
ece645f70341431ac7ca14740ce26ad8153a3900
[ "MIT" ]
42
2015-04-27T18:53:08.000Z
2020-09-29T22:53:21.000Z
tools/get_probabilites_of_stroke_counts.py
MartinThoma/write-math
ece645f70341431ac7ca14740ce26ad8153a3900
[ "MIT" ]
22
2015-04-12T13:13:25.000Z
2016-08-05T09:55:25.000Z
tools/get_probabilites_of_stroke_counts.py
MartinThoma/write-math
ece645f70341431ac7ca14740ce26ad8153a3900
[ "MIT" ]
4
2017-03-08T22:29:41.000Z
2018-12-04T02:19:54.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Given a symbol s, what is the probability P(n|s) of a stroke count of n? Download data for each symbol. """ import logging import sys logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO, strea...
33.429864
79
0.527883
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Given a symbol s, what is the probability P(n|s) of a stroke count of n? Download data for each symbol. """ import logging import sys logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO, strea...
0
0
0
0
0
429
0
0
23
62694fcb091d89565d14c87ebe87c15cb649af81
36,008
py
Python
classification/metrics/compute_vessel_metrics.py
rechardchen123/Classification-and-regression-of-vessel-AIS-data
e9d8c7a807cb6e49577739b53832e53becb3251c
[ "Apache-2.0" ]
7
2018-10-14T14:55:10.000Z
2021-01-04T13:42:09.000Z
classification/metrics/compute_vessel_metrics.py
rechardchen123/Classification-and-regression-of-vessel-AIS-data
e9d8c7a807cb6e49577739b53832e53becb3251c
[ "Apache-2.0" ]
null
null
null
classification/metrics/compute_vessel_metrics.py
rechardchen123/Classification-and-regression-of-vessel-AIS-data
e9d8c7a807cb6e49577739b53832e53becb3251c
[ "Apache-2.0" ]
null
null
null
""" Example: python compute_metrics.py --inference-path classification_results.json.gz \ --label-path classification/data/net_training_20161115.csv \ --dest-path fltest.html --fishing-ranges classification/data/combined_fishing_ranges.csv \ ...
33.248384
121
0.593035
""" Example: python compute_metrics.py --inference-path classification_results.json.gz \ --label-path classification/data/net_training_20161115.csv \ --dest-path fltest.html --fishing-ranges classification/data/combined_fishing_ranges.csv \ ...
0
455
0
4,627
0
10,268
0
17
630
d989d18aaa3c816b9eb10aaf8a00c00c70d5a5f3
1,397
py
Python
lightcurve/addDate.py
yerkesobservatory/variousnsundry
c757a628b1c66be08c4ac15fb0dda26af61aebd8
[ "MIT" ]
null
null
null
lightcurve/addDate.py
yerkesobservatory/variousnsundry
c757a628b1c66be08c4ac15fb0dda26af61aebd8
[ "MIT" ]
null
null
null
lightcurve/addDate.py
yerkesobservatory/variousnsundry
c757a628b1c66be08c4ac15fb0dda26af61aebd8
[ "MIT" ]
null
null
null
import os import glob import math import subprocess import re from decimal import Decimal from astropy.io import fits from astropy import wcs #MODIFY THESE FIELDS AS NEEDED! #input path *with* ending forward slash input_path='./' #output path *with* ending forward slash #output_path='./renamed/' output_path='./' #doe...
25.4
77
0.692198
import os import glob import math import subprocess import re from decimal import Decimal from astropy.io import fits from astropy import wcs #MODIFY THESE FIELDS AS NEEDED! #input path *with* ending forward slash input_path='./' #output path *with* ending forward slash #output_path='./renamed/' output_path='./' #doe...
0
0
0
0
0
0
0
0
0
33ca5098c118ac54a2bdc2c45c313c25ad43ddb9
1,747
py
Python
lab6/marketing/evaluation.py
bolecodex/amazon-sagemaker-immersion-day
2894145bb0abd4961cb0e0b7c6d1e89264b76716
[ "MIT-0" ]
null
null
null
lab6/marketing/evaluation.py
bolecodex/amazon-sagemaker-immersion-day
2894145bb0abd4961cb0e0b7c6d1e89264b76716
[ "MIT-0" ]
null
null
null
lab6/marketing/evaluation.py
bolecodex/amazon-sagemaker-immersion-day
2894145bb0abd4961cb0e0b7c6d1e89264b76716
[ "MIT-0" ]
null
null
null
import os import json import pickle import tarfile import pandas as pd import xgboost import pandas as pd import xgboost from sklearn.metrics import accuracy_score, roc_auc_score if __name__ == "__main__": model_path = f"/opt/ml/processing/model/model.tar.gz" with tarfile.open(model_path) as tar: tar...
29.610169
96
0.665713
import os import json import pathlib import pickle import tarfile import pandas as pd import xgboost import joblib import numpy as np import pandas as pd import xgboost from sklearn.metrics import accuracy_score, classification_report, roc_auc_score if __name__ == "__main__": model_path = f"/opt/ml/processing/m...
0
0
0
0
0
0
0
5
67
f9609eebd9ab7d22ba35b722d2ae65f396d89922
7,508
py
Python
bnp_tumorseg/evidence.py
ryanneph/bnp-tumorseg
c5b071405ec7cc4f0aa33a0e3b83b0075ca45276
[ "Apache-2.0" ]
8
2018-09-24T15:37:33.000Z
2021-01-20T06:28:07.000Z
bnp_tumorseg/evidence.py
ryanneph/bnp-tumorseg
c5b071405ec7cc4f0aa33a0e3b83b0075ca45276
[ "Apache-2.0" ]
null
null
null
bnp_tumorseg/evidence.py
ryanneph/bnp-tumorseg
c5b071405ec7cc4f0aa33a0e3b83b0075ca45276
[ "Apache-2.0" ]
5
2018-09-24T16:55:25.000Z
2021-03-30T06:19:44.000Z
import numpy as np import numpy.ma as ma from numpy.linalg import solve import logging logger = logging.getLogger(__name__) def choleskyQuadForm(L, b): """Compute quadratic form: b' * A^(-1) * b using the cholesky inverse to reduce the problem to solving Lx=b where L is the Lower triangular matrix resulting ...
32.502165
133
0.570591
from math import pi, sqrt import numpy as np import numpy.ma as ma from numpy.linalg import cholesky, solve from copy import copy, deepcopy import choldate import logging from . import loggers from .wrappers import exp, log, gammaln logger = logging.getLogger(__name__) def choleskyQuadForm(L, b): """Compute quadr...
0
597
0
5,536
0
0
0
36
133
67efb9509d11d390d942bd02809a166839bc84e4
2,156
py
Python
marsworks/origin/tools.py
anand2312/Marsworks
1a9d837c2da3a03fdf25280c6aaa43deeda40451
[ "MIT" ]
2
2021-07-16T18:07:50.000Z
2021-08-11T09:24:14.000Z
marsworks/origin/tools.py
anand2312/Marsworks
1a9d837c2da3a03fdf25280c6aaa43deeda40451
[ "MIT" ]
7
2021-07-07T09:08:07.000Z
2021-08-07T04:51:29.000Z
marsworks/origin/tools.py
anand2312/Marsworks
1a9d837c2da3a03fdf25280c6aaa43deeda40451
[ "MIT" ]
2
2022-01-23T14:31:57.000Z
2022-02-19T16:45:41.000Z
""" MIT License Copyright (c) 2021 mooncell07 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
30.366197
78
0.67115
""" MIT License Copyright (c) 2021 mooncell07 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
0
0
0
0
0
0
0
0
0
6eb729a873c5f0279e5ee022a6e3c3618e3e3968
2,225
py
Python
bfg/cli.py
fomars/bfg
e007704e02a9bd4f71651b78dba8122e21091951
[ "MIT" ]
14
2018-04-15T06:59:16.000Z
2022-02-05T11:38:25.000Z
bfg/cli.py
fomars/bfg
e007704e02a9bd4f71651b78dba8122e21091951
[ "MIT" ]
null
null
null
bfg/cli.py
fomars/bfg
e007704e02a9bd4f71651b78dba8122e21091951
[ "MIT" ]
4
2017-11-24T12:25:55.000Z
2021-01-14T09:24:14.000Z
''' Entry point. Init logging, initialize component factory, start asyncio event loop, manage components lifecycle ''' import logging import yaml import pytoml import json import sys from .loadtest import LoadTest LOG = logging.getLogger(__name__) def init_logging(debug=False, filename='bfg.log'): ''' Configur...
28.896104
75
0.654831
''' Entry point. Init logging, initialize component factory, start asyncio event loop, manage components lifecycle ''' import logging import yaml import pytoml import json import sys from .loadtest import LoadTest LOG = logging.getLogger(__name__) def init_logging(debug=False, filename='bfg.log'): ''' Configur...
0
0
0
0
0
0
0
0
0
bd225b8ee0b0afe5e5b469c26da938d9887a6b5a
1,841
py
Python
slides/06_expressivity_optimization_generalization/images/make_mini_mlp_loss_figures.py
JLWoodcock/MKL
2d2cdded15aeb8144e08fdbc2b9ae2abfa88216d
[ "MIT" ]
1
2017-11-30T17:25:08.000Z
2017-11-30T17:25:08.000Z
slides/06_expressivity_optimization_generalization/images/make_mini_mlp_loss_figures.py
SebastienBoisard/m2dsupsdlclass-lectures-labs
fdd8ec4f01a28a8bf4e11f297bba889be4fde993
[ "MIT" ]
null
null
null
slides/06_expressivity_optimization_generalization/images/make_mini_mlp_loss_figures.py
SebastienBoisard/m2dsupsdlclass-lectures-labs
fdd8ec4f01a28a8bf4e11f297bba889be4fde993
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import os import shutil # Generate the figures in the same folder os.chdir(os.path.dirname(__file__)) rng = np.random.RandomState(42) # 2D parameter space: n_steps = 200 w1 = np.linspace(-2.5, 2.5, n_steps) w2 = np.linspace(-2.5, 2.5, n_steps) w1, w2 = np.meshgrid(w...
25.219178
68
0.632265
import numpy as np import matplotlib.pyplot as plt import os import shutil # Generate the figures in the same folder os.chdir(os.path.dirname(__file__)) rng = np.random.RandomState(42) # 2D parameter space: n_steps = 200 w1 = np.linspace(-2.5, 2.5, n_steps) w2 = np.linspace(-2.5, 2.5, n_steps) w1, w2 = np.meshgrid(w...
0
0
0
0
0
51
0
0
46
3554041e1d8c5d12612f7250db1a6c29e22c805f
638
py
Python
Library/PackageCache/com.unity.scripting.python@2.0.1-preview.2/Python/site-packages/unity_python/server/settings.py
TranThiThanhHoa/pythonForUnity
cfbc6b1c4d14593a8e9ceb36072b6946efe223e3
[ "MIT" ]
null
null
null
Library/PackageCache/com.unity.scripting.python@2.0.1-preview.2/Python/site-packages/unity_python/server/settings.py
TranThiThanhHoa/pythonForUnity
cfbc6b1c4d14593a8e9ceb36072b6946efe223e3
[ "MIT" ]
null
null
null
Library/PackageCache/com.unity.scripting.python@2.0.1-preview.2/Python/site-packages/unity_python/server/settings.py
TranThiThanhHoa/pythonForUnity
cfbc6b1c4d14593a8e9ceb36072b6946efe223e3
[ "MIT" ]
null
null
null
from __future__ import division, print_function # This file has a bunch of settings that can be set via the Unity project settings. # It also has some hacks for compatibility between versions of Python and Windows. import getpass import os import tempfile # Unix socket support. whoami = getpass.getuser() tempdir = te...
31.9
83
0.777429
from __future__ import division, print_function # This file has a bunch of settings that can be set via the Unity project settings. # It also has some hacks for compatibility between versions of Python and Windows. import getpass import os import tempfile # Unix socket support. whoami = getpass.getuser() tempdir = te...
0
0
0
0
0
0
0
0
0
b483d466467238ad4f4ed508ae43de183ecedaad
3,898
py
Python
kolibri/core/views.py
arceduardvincent/kolibri
26073dda2569bb38bfe1e08ba486e96f650d10ce
[ "MIT" ]
null
null
null
kolibri/core/views.py
arceduardvincent/kolibri
26073dda2569bb38bfe1e08ba486e96f650d10ce
[ "MIT" ]
null
null
null
kolibri/core/views.py
arceduardvincent/kolibri
26073dda2569bb38bfe1e08ba486e96f650d10ce
[ "MIT" ]
null
null
null
from django import http from django.conf import settings from django.core.urlresolvers import translate_url from django.utils.http import is_safe_url from django.utils.translation import check_for_language from django.utils.translation import LANGUAGE_SESSION_KEY from django.views.i18n import LANGUAGE_QUERY_PARAMETER ...
41.468085
111
0.686762
from django import http from django.conf import settings from django.contrib.auth import logout from django.core.urlresolvers import translate_url from django.http import Http404 from django.http import HttpResponseRedirect from django.utils.http import is_safe_url from django.utils.translation import check_for_languag...
0
0
0
1,288
0
274
0
185
269
05bfaf565b5084c98cfd0831dd4d1195d7f48e95
93
py
Python
__init__.py
sampanes/cv_pubsubs
746a9cfab0be742f3b47e8bffe67f46abf4df410
[ "MIT" ]
null
null
null
__init__.py
sampanes/cv_pubsubs
746a9cfab0be742f3b47e8bffe67f46abf4df410
[ "MIT" ]
null
null
null
__init__.py
sampanes/cv_pubsubs
746a9cfab0be742f3b47e8bffe67f46abf4df410
[ "MIT" ]
null
null
null
# redirection, so we can use subtree like pip
31
46
0.806452
# redirection, so we can use subtree like pip from .cv_pubsubs import webcam_pub, window_sub
0
0
0
0
0
0
0
25
22
66425ffb0fa5a2059aae4f8ac48b5cb23bbff19d
13,582
py
Python
symbian/PythonForS60_1.9.6/module-repo/dev-modules/e32calendar/e32calendar.py
pymo/pymo
703ba457fba90635ab61fe4c8ec054e002613283
[ "MIT" ]
69
2015-01-16T13:12:55.000Z
2022-02-14T12:55:27.000Z
symbian/PythonForS60_1.9.6/module-repo/dev-modules/e32calendar/e32calendar.py
pymo/pymo
703ba457fba90635ab61fe4c8ec054e002613283
[ "MIT" ]
3
2019-07-19T18:02:02.000Z
2021-04-25T06:35:42.000Z
symbian/PythonForS60/module-repo/dev-modules/e32calendar/e32calendar.py
pymo/pymo
703ba457fba90635ab61fe4c8ec054e002613283
[ "MIT" ]
17
2015-04-17T13:50:09.000Z
2021-05-13T02:47:56.000Z
# # e32calendar.py # # Copyright (c) 2006-2009 Nokia Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
42.049536
153
0.631718
# # e32calendar.py # # Copyright (c) 2006-2009 Nokia Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
0
0
0
12,235
0
86
0
0
67
8ef3cf727b139eeb72f0311be47936a2a57269be
317
py
Python
Codeforces 1293A.py
Jvillegasd/Codeforces
ffdd2d5db1dabc7ff76f8f92270c79233a77b933
[ "MIT" ]
null
null
null
Codeforces 1293A.py
Jvillegasd/Codeforces
ffdd2d5db1dabc7ff76f8f92270c79233a77b933
[ "MIT" ]
null
null
null
Codeforces 1293A.py
Jvillegasd/Codeforces
ffdd2d5db1dabc7ff76f8f92270c79233a77b933
[ "MIT" ]
null
null
null
from sys import stdin, stdout t = int(stdin.readline()) for i in range(t): n, s, k = map(int, stdin.readline().split()) a = [int(ai) for ai in stdin.readline().split()] for j in range(n + 1): if s + j not in a and s + j <= n or s - j not in a and s - j > 0: stdout.write('{}\n'.format(j)) break
31.7
69
0.567823
from sys import stdin, stdout t = int(stdin.readline()) for i in range(t): n, s, k = map(int, stdin.readline().split()) a = [int(ai) for ai in stdin.readline().split()] for j in range(n + 1): if s + j not in a and s + j <= n or s - j not in a and s - j > 0: stdout.write('{}\n'.format(j)) break
0
0
0
0
0
0
0
0
0
ac456b279a72b8daf1cc3c112a38955fa3ae37c9
1,170
py
Python
tests/test_vnet_bitmap.py
atrens/sonic-swss
ec43b1d647e4329ac5fcdd34afd97648d41600e5
[ "Apache-2.0" ]
null
null
null
tests/test_vnet_bitmap.py
atrens/sonic-swss
ec43b1d647e4329ac5fcdd34afd97648d41600e5
[ "Apache-2.0" ]
null
null
null
tests/test_vnet_bitmap.py
atrens/sonic-swss
ec43b1d647e4329ac5fcdd34afd97648d41600e5
[ "Apache-2.0" ]
null
null
null
# Define fake platform for "DVS" fixture, so it will set "platform" environment variable for "orchagent". # It is needed in order to enable platform specific "orchagent" code for testing "bitmap" VNET implementation. DVS_FAKE_PLATFORM = "mellanox" ''' Provides test cases for the "bitmap" VNET implementation. Test c...
39
129
0.775214
import time import pytest import test_vnet as vnet from swsscommon import swsscommon from flaky import flaky # Define fake platform for "DVS" fixture, so it will set "platform" environment variable for "orchagent". # It is needed in order to enable platform specific "orchagent" code for testing "bitmap" VNET implem...
0
342
0
0
0
0
0
-1
134
0ca3495429ea5809c5bab404862a4da8ea556b6e
30,947
py
Python
merge_machine/gridding.py
entrepreneur-interet-general/the-magical-csv-merge-machine
5941c2ed3db64548ece74311c5055ee298e31ab8
[ "MIT" ]
7
2017-12-14T17:49:01.000Z
2021-06-27T13:08:47.000Z
merge_machine/gridding.py
entrepreneur-interet-general/the-magical-csv-merge-machine
5941c2ed3db64548ece74311c5055ee298e31ab8
[ "MIT" ]
65
2017-11-29T17:01:52.000Z
2018-08-31T15:59:19.000Z
merge_machine/gridding.py
entrepreneur-interet-general/the-magical-csv-merge-machine
5941c2ed3db64548ece74311c5055ee298e31ab8
[ "MIT" ]
3
2017-12-21T10:57:23.000Z
2020-05-25T06:58:39.000Z
import functools, re from collections import defaultdict import enchant DICTS = [ enchant.Dict("en_US") ] SOURCE = 1 REFERENCE = 2 MIN_STRING_SCORE = 20 REQUIRES_SHARED_PROPER_NOUN = True DONT_DISCRIMINATE = False EXCLUDE_ADDRESS_AS_LABEL = False FORBID_DUPE_ACRONYMS = False ADD_VARIANT_WITHOUT_COUNTRY = False ACRO_P...
47.319572
4,153
0.68753
import csv, difflib, functools, logging, re, os, sys, pickle import unicodedata, unidecode from collections import defaultdict, Counter from fuzzywuzzy import fuzz from postal.parser import parse_address import enchant DICTS = [ enchant.Dict("en_US") ] SOURCE = 1 REFERENCE = 2 MIN_STRING_SCORE = 20 REQUIRES_SHARED_PR...
40
0
0
0
984
18,562
0
81
964
8ad0fd86deb21fb958da59cb8088dda8909084e1
5,182
py
Python
mkultra/git_utils.py
jsenellart/mkultra
c43d909e6bd9b9c71c8bec8c656e2d3ea7d695d6
[ "BSD-3-Clause" ]
null
null
null
mkultra/git_utils.py
jsenellart/mkultra
c43d909e6bd9b9c71c8bec8c656e2d3ea7d695d6
[ "BSD-3-Clause" ]
null
null
null
mkultra/git_utils.py
jsenellart/mkultra
c43d909e6bd9b9c71c8bec8c656e2d3ea7d695d6
[ "BSD-3-Clause" ]
1
2021-01-01T12:13:07.000Z
2021-01-01T12:13:07.000Z
# This file is based on the ghp-import package released under # the Tumbolia Public License. # Tumbolia Public License # Copyright 2013, Paul Davis <paul.joseph.davis@gmail.com> # Copying and distribution of this file, with or without modification, are # permitted in any medium without roy...
31.987654
78
0.606137
# This file is based on the ghp-import package released under # the Tumbolia Public License. # Tumbolia Public License # Copyright 2013, Paul Davis <paul.joseph.davis@gmail.com> # Copying and distribution of this file, with or without modification, are # permitted in any medium without roy...
0
0
0
1,761
487
2,057
0
-17
364
629068babafc3dd2307502aa36fd6da3725bb6a2
1,469
py
Python
pyS/Srun.py
nirvguy/pyS
23bfaf9dfbecf7649acef67c5df540239dbdbd5b
[ "MIT" ]
null
null
null
pyS/Srun.py
nirvguy/pyS
23bfaf9dfbecf7649acef67c5df540239dbdbd5b
[ "MIT" ]
null
null
null
pyS/Srun.py
nirvguy/pyS
23bfaf9dfbecf7649acef67c5df540239dbdbd5b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3
26.232143
117
0.536419
#!/usr/bin/env python3 import sys import io import getopt from .S.language import SProgram from .S.interp import StopProgram, SInterp def usage(): print("./Sdump [-h | -v] FILE") print() print(" -h, --help Displays this message") print(" -v, --version Displays the version of pyS") ...
0
0
0
0
0
1,288
0
1
157
4061b0765bba3e1da5d079b1e5c6e3ac9a314eb8
249
py
Python
examples/movies-data-api/app/api/__init__.py
sunyunxian/flask-examples
7ad53ce1d34354c22b7f1728218ab6a64058ccb4
[ "Apache-2.0" ]
null
null
null
examples/movies-data-api/app/api/__init__.py
sunyunxian/flask-examples
7ad53ce1d34354c22b7f1728218ab6a64058ccb4
[ "Apache-2.0" ]
null
null
null
examples/movies-data-api/app/api/__init__.py
sunyunxian/flask-examples
7ad53ce1d34354c22b7f1728218ab6a64058ccb4
[ "Apache-2.0" ]
null
null
null
from flask import Blueprint from app.api.v1 import v1_bp from app.api.v2 import v2_bp api_bp = Blueprint('api', __name__) api_bp.register_blueprint(v1_bp, url_prefix='/v1') api_bp.register_blueprint(v2_bp, url_prefix='/v2')
24.9
50
0.791165
from sys import prefix from flask import Blueprint from app.api.v1 import v1_bp from app.api.v2 import v2_bp api_bp = Blueprint('api', __name__) api_bp.register_blueprint(v1_bp, url_prefix='/v1') api_bp.register_blueprint(v2_bp, url_prefix='/v2')
0
0
0
0
0
0
0
1
22
5cdb8280e8fa6fbcb220bf60f5fbf47a6ef14512
5,891
py
Python
models/module_zoo/ops/tadaconv.py
hardik01shah/TAdaConv
a1174c1c39ee91c6f6fc7a99471160f17d05297e
[ "Apache-2.0" ]
30
2022-01-29T12:39:31.000Z
2022-03-23T05:58:52.000Z
models/module_zoo/ops/tadaconv.py
hardik01shah/TAdaConv
a1174c1c39ee91c6f6fc7a99471160f17d05297e
[ "Apache-2.0" ]
5
2022-02-07T02:09:27.000Z
2022-03-29T10:40:22.000Z
models/module_zoo/ops/tadaconv.py
hardik01shah/TAdaConv
a1174c1c39ee91c6f6fc7a99471160f17d05297e
[ "Apache-2.0" ]
6
2022-01-30T03:22:22.000Z
2022-03-31T07:28:32.000Z
#!/usr/bin/env python3 # Copyright (C) Alibaba Group Holding Limited. """ TAdaConv. """ import torch.nn as nn
37.522293
118
0.568834
#!/usr/bin/env python3 # Copyright (C) Alibaba Group Holding Limited. """ TAdaConv. """ import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _triple class RouteFuncMLP(nn.Module): """ The routing function for generating the calibration weights. ...
0
0
0
5,632
0
0
0
12
135
4db4dbe2d32fb6c3619d533caf10ccca3a968638
3,980
py
Python
src/BiGruSelfattentionWithCheating.py
keigotak/COVID19Tweet
fa11c1be88dda91b70b68a8819715b5d6c1afb33
[ "Unlicense" ]
null
null
null
src/BiGruSelfattentionWithCheating.py
keigotak/COVID19Tweet
fa11c1be88dda91b70b68a8819715b5d6c1afb33
[ "Unlicense" ]
null
null
null
src/BiGruSelfattentionWithCheating.py
keigotak/COVID19Tweet
fa11c1be88dda91b70b68a8819715b5d6c1afb33
[ "Unlicense" ]
null
null
null
import torch.nn as nn ''' '''
39.019608
128
0.65603
from pathlib import Path import torch import torch.nn as nn from AbstractModel import AbstractModel from Attention import Attention from Tokenizer import Tokenizer from StopWords import StopWords class BiGruSelfattentionWithCheating(AbstractModel): def __init__(self, device='cpu', hyper_params=None): s...
0
0
0
3,746
0
0
0
42
158
f6f6b530940bd1afd98152d22f07c0e5ec8d8175
794
py
Python
migrations/versions/707bac2b6bd1_add_notes_field_for_tasks.py
toastwaffle/LiME
7d529d9eaeb9de7a9aebe6aa373e1b3611bfd2ad
[ "MIT" ]
null
null
null
migrations/versions/707bac2b6bd1_add_notes_field_for_tasks.py
toastwaffle/LiME
7d529d9eaeb9de7a9aebe6aa373e1b3611bfd2ad
[ "MIT" ]
69
2018-02-04T15:08:07.000Z
2020-03-19T22:04:16.000Z
migrations/versions/707bac2b6bd1_add_notes_field_for_tasks.py
toastwaffle/LiME
7d529d9eaeb9de7a9aebe6aa373e1b3611bfd2ad
[ "MIT" ]
null
null
null
"""Add notes field for tasks Revision ID: 707bac2b6bd1 Revises: 58ea8596e2db Create Date: 2017-09-10 11:31:03.741908 """ # revision identifiers, used by Alembic. revision = '707bac2b6bd1' down_revision = '58ea8596e2db' branch_labels = None depends_on = None
25.612903
78
0.683879
"""Add notes field for tasks Revision ID: 707bac2b6bd1 Revises: 58ea8596e2db Create Date: 2017-09-10 11:31:03.741908 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '707bac2b6bd1' down_revision = '58ea8596e2db' branch_labels = None depends_on = None def upgra...
0
0
0
0
0
437
0
3
90
dbc199c2cf14db1d4ed1a7f3f9bf0a48e11006c7
1,113
py
Python
setup.py
shinybrar/Comet
4229092fca74c130a7d4ecd4dbd22ae85f7e6308
[ "BSD-2-Clause" ]
null
null
null
setup.py
shinybrar/Comet
4229092fca74c130a7d4ecd4dbd22ae85f7e6308
[ "BSD-2-Clause" ]
null
null
null
setup.py
shinybrar/Comet
4229092fca74c130a7d4ecd4dbd22ae85f7e6308
[ "BSD-2-Clause" ]
null
null
null
from distutils.core import setup import comet with open('requirements.txt') as f: required = f.read().splitlines() setup( name="Comet", description=comet.__description__, author=comet.__author__, author_email=comet.__contact__, version=comet.__version__, url=comet.__url__, packages=[ ...
24.195652
46
0.567835
from distutils.core import setup import sys import comet with open('requirements.txt') as f: required = f.read().splitlines() setup( name="Comet", description=comet.__description__, author=comet.__author__, author_email=comet.__contact__, version=comet.__version__, url=comet.__url__, p...
0
0
0
0
0
0
0
-11
22
dad0e815ca2895c50bd83da39cc9d8936d340fda
338
py
Python
sortsearch/factorymachines.py
ashutoshdumiyan/CSES-Solutions
48ff04f0003c2a1f808412497a22c7c7841bb3db
[ "MIT" ]
null
null
null
sortsearch/factorymachines.py
ashutoshdumiyan/CSES-Solutions
48ff04f0003c2a1f808412497a22c7c7841bb3db
[ "MIT" ]
null
null
null
sortsearch/factorymachines.py
ashutoshdumiyan/CSES-Solutions
48ff04f0003c2a1f808412497a22c7c7841bb3db
[ "MIT" ]
null
null
null
from sys import stdin n, t = map(int, stdin.readline().split()) li = [int(c) for c in stdin.readline().split()] lb = 1 rb = 10 ** 18 while lb < rb: mb = (lb + rb) // 2 s = 0 for i in range(n): s += min(mb // li[i], 10 ** 9) if s >= t: rb = mb else: lb = mb ...
16.9
48
0.440828
from sys import stdin n, t = map(int, stdin.readline().split()) li = [int(c) for c in stdin.readline().split()] lb = 1 rb = 10 ** 18 while lb < rb: mb = (lb + rb) // 2 s = 0 for i in range(n): s += min(mb // li[i], 10 ** 9) if s >= t: rb = mb else: lb = mb ...
0
0
0
0
0
0
0
0
0
ca53461f738ce82a270a0e050a1a743933600908
694
py
Python
TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/functional.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/functional.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/functional.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
""" pygments.lexers.functional ~~~~~~~~~~~~~~~~~~~~~~~~~~ Just export lexer classes previously contained in this module. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ __all__ = []
33.047619
78
0.723343
""" pygments.lexers.functional ~~~~~~~~~~~~~~~~~~~~~~~~~~ Just export lexer classes previously contained in this module. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.lisp import SchemeLexer, CommonLis...
0
0
0
0
0
0
0
298
117
3948b2140aa495bf7faa5ab4388e410cdcef7be2
2,961
py
Python
openstack/object_store/v1/info.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
99
2018-03-28T15:41:45.000Z
2022-01-23T17:22:13.000Z
openstack/object_store/v1/info.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
5
2018-05-25T16:54:23.000Z
2021-11-21T02:27:16.000Z
openstack/object_store/v1/info.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
104
2018-04-06T14:33:54.000Z
2022-03-01T01:58:09.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
38.960526
77
0.657548
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
0
0
0
2,311
0
0
0
12
91
23f2f97ea56f2a7c548bdccb95142732aa0cafae
13,524
py
Python
setup.py
eriknstr/borg
808379921c4a679bb597db42b4412840d66f4fb1
[ "BSD-3-Clause" ]
null
null
null
setup.py
eriknstr/borg
808379921c4a679bb597db42b4412840d66f4fb1
[ "BSD-3-Clause" ]
null
null
null
setup.py
eriknstr/borg
808379921c4a679bb597db42b4412840d66f4fb1
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 *-* import os import sys min_python = (3, 4) my_python = sys.version_info if my_python < min_python: print("Borg requires Python %d.%d or later" % min_python) sys.exit(1) # Are we building on ReadTheDocs? on_rtd = os.environ.get('READTHEDOCS') # msgpack pure python data corruption was ...
37.153846
124
0.612541
# -*- encoding: utf-8 *-* import os import re import sys from glob import glob from distutils.command.build import build from distutils.core import Command import textwrap min_python = (3, 4) my_python = sys.version_info if my_python < min_python: print("Borg requires Python %d.%d or later" % min_python) sy...
0
0
0
5,816
0
538
0
61
305
027d6a6e5672a25892afb0d34d0231f5ff59fd3e
4,028
py
Python
build/lib.macosx-10.9-x86_64-3.9/gators/imputers/_base_imputer.py
Aditya-Kapadiya/gators
d7c9967e3a8e304a601b6a92ad834d03d3e36338
[ "Apache-2.0" ]
4
2021-10-29T18:20:52.000Z
2022-03-31T22:53:03.000Z
build/lib.macosx-10.9-x86_64-3.9/gators/imputers/_base_imputer.py
Aditya-Kapadiya/gators
d7c9967e3a8e304a601b6a92ad834d03d3e36338
[ "Apache-2.0" ]
1
2022-02-21T20:02:16.000Z
2022-02-21T20:02:16.000Z
build/lib.macosx-10.9-x86_64-3.9/gators/imputers/_base_imputer.py
Aditya-Kapadiya/gators
d7c9967e3a8e304a601b6a92ad834d03d3e36338
[ "Apache-2.0" ]
5
2021-11-17T20:16:54.000Z
2022-02-21T18:21:02.000Z
# License: Apache-2.0
34.135593
77
0.572493
# License: Apache-2.0 from ..transformers.transformer import Transformer from typing import List, Dict, Union import numpy as np import pandas as pd import databricks.koalas as ks class _BaseImputer(Transformer): """Base imputer transformer class. Parameters ---------- strategy : str Imputati...
0
1,681
0
2,143
0
0
0
48
133
ffc07d39b2cd320460dde0a0672d8c569fd89f84
841
py
Python
django_db_views/tests/migrations/test_basic_view_creation/0001_initial.py
Skylude/django-db-views
048a1e3ab7465d3e19481de82b3737f780b175c0
[ "MIT" ]
null
null
null
django_db_views/tests/migrations/test_basic_view_creation/0001_initial.py
Skylude/django-db-views
048a1e3ab7465d3e19481de82b3737f780b175c0
[ "MIT" ]
null
null
null
django_db_views/tests/migrations/test_basic_view_creation/0001_initial.py
Skylude/django-db-views
048a1e3ab7465d3e19481de82b3737f780b175c0
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-01-11 19:54 import django_db_views.migration_functions
49.470588
385
0.655172
# Generated by Django 3.1.5 on 2021-01-11 19:54 from django.db import migrations import django_db_views.migration_functions import django_db_views.operations class Migration(migrations.Migration): operations = [ django_db_views.operations.ViewRunPython( code=django_db_views.migration_functio...
0
0
0
658
0
0
0
23
68
bfdd4314a4d27b2832bb5f65f33364bfd98130d8
26,039
py
Python
pero/drawing/layout.py
xxao/pero
a7f0c84fae0b21fe120204e798bd61cdab3a125d
[ "MIT" ]
13
2019-07-15T17:51:21.000Z
2022-03-15T06:13:43.000Z
pero/drawing/layout.py
xxao/pero
a7f0c84fae0b21fe120204e798bd61cdab3a125d
[ "MIT" ]
1
2021-12-29T00:46:44.000Z
2022-01-21T16:18:48.000Z
pero/drawing/layout.py
xxao/pero
a7f0c84fae0b21fe120204e798bd61cdab3a125d
[ "MIT" ]
3
2020-09-27T14:31:45.000Z
2022-01-22T14:28:15.000Z
# Created byMartin.cz # Copyright (c) Martin Strohalm. All rights reserved. from . graphics import Graphics from . frame import Frame, FrameProperty from . path import Path
32.146914
88
0.539191
# Created byMartin.cz # Copyright (c) Martin Strohalm. All rights reserved. from .. enums import * from .. properties import * from . graphics import Graphics from . frame import Frame, FrameProperty from . path import Path class Layout(Graphics): """ Layout represents an experimental simple table-like lay...
0
1,097
0
24,619
0
0
0
7
137
59f171ae690bcdc77b5bcbe155da0e51615ac689
308
py
Python
cdk/lambdacode/dynamodb.py
phanssens1/automating-slack-signups
067b4e917fa43123042d01ebbeb7f5d4670886a3
[ "MIT" ]
null
null
null
cdk/lambdacode/dynamodb.py
phanssens1/automating-slack-signups
067b4e917fa43123042d01ebbeb7f5d4670886a3
[ "MIT" ]
null
null
null
cdk/lambdacode/dynamodb.py
phanssens1/automating-slack-signups
067b4e917fa43123042d01ebbeb7f5d4670886a3
[ "MIT" ]
null
null
null
import boto3 dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('dev-dataeng-meetup-table') print(table.creation_date_time)
17.111111
50
0.662338
import os import boto3 import json dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('dev-dataeng-meetup-table') print(table.creation_date_time) def main(event, context): print(event) data = json.load(event) print(data) # print(i) # table.put_item( # Item=i # )
0
0
0
0
0
128
0
-22
66
e2983c94a04750401fd0d6ef968b1c6b8d6d289f
2,051
py
Python
ch6 slam&navigation/turtlebot/kobuki/kobuki_testsuite/src/kobuki_testsuite/angular_accelerate.py
MINAMISAMA/Castle-X
f6aedc4e67f772b2aed269617ee8a9cac95c7f63
[ "Apache-2.0" ]
3
2021-01-10T10:52:14.000Z
2021-12-31T10:19:25.000Z
ch6 slam&navigation/turtlebot/kobuki/kobuki_testsuite/src/kobuki_testsuite/angular_accelerate.py
MINAMISAMA/Castle-X
f6aedc4e67f772b2aed269617ee8a9cac95c7f63
[ "Apache-2.0" ]
1
2019-01-15T12:37:59.000Z
2019-01-15T12:37:59.000Z
ch6 slam&navigation/turtlebot/kobuki/kobuki_testsuite/src/kobuki_testsuite/angular_accelerate.py
MINAMISAMA/Castle-X
f6aedc4e67f772b2aed269617ee8a9cac95c7f63
[ "Apache-2.0" ]
2
2019-01-14T07:48:42.000Z
2019-01-15T06:32:27.000Z
#!/usr/bin/env python # # License: BSD # https://raw.github.com/yujinrobot/kobuki/hydro-devel/kobuki_testsuite/LICENSE # ############################################################################## # Imports ############################################################################## #####################...
28.887324
93
0.504144
#!/usr/bin/env python # # License: BSD # https://raw.github.com/yujinrobot/kobuki/hydro-devel/kobuki_testsuite/LICENSE # ############################################################################## # Imports ############################################################################## import threading impo...
0
0
0
1,407
0
0
0
0
134
444c91b2a9d8b14519b3136a8e99c65b1cd9cede
2,083
py
Python
cvtest.py
helloparthshah/HackMIT
44413c2982ebff837a2cbb55ecdeacee8dad8390
[ "MIT" ]
1
2020-09-20T12:31:48.000Z
2020-09-20T12:31:48.000Z
cvtest.py
helloparthshah/HackMIT
44413c2982ebff837a2cbb55ecdeacee8dad8390
[ "MIT" ]
null
null
null
cvtest.py
helloparthshah/HackMIT
44413c2982ebff837a2cbb55ecdeacee8dad8390
[ "MIT" ]
null
null
null
import cv2 import numpy as np import tensorflow as tf from keras.models import load_model f = open("./converted_keras/l.txt", "r") labels = f.read().splitlines() f.close() # shape = (224, 224) gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: # Currently, memory growth needs to be ...
27.051948
77
0.6265
import cv2 import numpy as np import tensorflow as tf from keras.models import load_model import os from PIL import Image, ImageOps f = open("./converted_keras/l.txt", "r") labels = f.read().splitlines() f.close() # shape = (224, 224) gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: ...
0
0
0
0
0
0
0
-2
44
eedfbfe7c3b7e28b9819e702eb057716d479d18f
9,173
py
Python
kubernetes/client/models/io_cert_manager_acme_v1_challenge_spec_solver_http01_ingress_pod_template_spec.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/io_cert_manager_acme_v1_challenge_spec_solver_http01_ingress_pod_template_spec.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/io_cert_manager_acme_v1_challenge_spec_solver_http01_ingress_pod_template_spec.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """
39.369099
259
0.693775
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
0
4,755
0
4,018
0
0
0
5
128
d3913a4a48e7cc2024ede77fb00fe65162d515b6
2,513
py
Python
mastermind_api/game/models.py
manuelmamut/mastermind
898b510de19e2affaac5480fbc38e5ba7c6d38ed
[ "MIT" ]
null
null
null
mastermind_api/game/models.py
manuelmamut/mastermind
898b510de19e2affaac5480fbc38e5ba7c6d38ed
[ "MIT" ]
1
2020-06-05T18:29:07.000Z
2020-06-05T18:29:07.000Z
mastermind_api/game/models.py
manuelmamut/mastermind
898b510de19e2affaac5480fbc38e5ba7c6d38ed
[ "MIT" ]
null
null
null
# Create your models here.
42.59322
127
0.535217
from django.db import models from datetime import datetime # Create your models here. class Game(models.Model): EASY = 12 MEDIUM = 10 HARD = 8 PRO = 6 DIFICULTY = ( (EASY, 'Easy'), (MEDIUM, 'Medium'), (HARD, 'Hard'), (PRO, 'Pro'), ) RED = 'R' GREEN = '...
0
0
0
2,402
0
0
0
15
67
9f509b0c3416a20a4416c23aca9f2e3dc96c4189
4,894
py
Python
examples/external_dependencies/vis_contextual_promp_distribution_screws.py
dfki-ric/movement_primitives
ca7be45f13ea8ed4dd796be7e076778b1527cf29
[ "BSD-3-Clause" ]
17
2021-11-17T15:36:16.000Z
2022-03-26T08:49:25.000Z
examples/external_dependencies/vis_contextual_promp_distribution_screws.py
DavidYaonanZhu/movement_primitives
ce355837f06cb5fada24be7259cb0305e8ea5d91
[ "BSD-3-Clause" ]
9
2021-12-01T10:33:04.000Z
2022-03-23T12:41:39.000Z
examples/external_dependencies/vis_contextual_promp_distribution_screws.py
DavidYaonanZhu/movement_primitives
ce355837f06cb5fada24be7259cb0305e8ea5d91
[ "BSD-3-Clause" ]
8
2021-11-25T03:53:40.000Z
2022-03-31T03:19:25.000Z
import numpy as np import pytransform3d.visualizer as pv import pytransform3d.trajectories as ptr from pytransform3d.urdf import UrdfTransformManager from movement_primitives.visualization import plot_pointcloud, ToggleGeometry from movement_primitives.promp import ProMP from gmr import GMM plot_training_data = Fal...
40.446281
126
0.713731
import numpy as np import pytransform3d.visualizer as pv import pytransform3d.trajectories as ptr from pytransform3d.urdf import UrdfTransformManager from mocap.cleaning import smooth_exponential_coordinates, median_filter from mocap.dataset_loader import load_kuka_dataset, transpose_dataset from movement_primitives.v...
0
0
0
0
0
1,140
0
99
67
e0af8eee3c2dd88395474a5d8eb93de2e410ac84
22,461
py
Python
iop_mailer.py
ssteinke/Seaglider_mailer
412fa1d13b76ce980830f830886e87d1ef0dba28
[ "MIT" ]
null
null
null
iop_mailer.py
ssteinke/Seaglider_mailer
412fa1d13b76ce980830f830886e87d1ef0dba28
[ "MIT" ]
null
null
null
iop_mailer.py
ssteinke/Seaglider_mailer
412fa1d13b76ce980830f830886e87d1ef0dba28
[ "MIT" ]
null
null
null
#! /usr/bin/env python """IOP mail extension for Seaglider Basestation Author: Sebastian Steinke, 21.03.2017 """ import sys import os from scipy.io import netcdf import BaseNetCDF import numpy as np import time import BaseOpts import FileMgr from CalibConst import getSGCalibrationConstants import CommLog as CommLog ...
43.783626
204
0.542852
#! /usr/bin/env python """IOP mail extension for Seaglider Basestation Author: Sebastian Steinke, 21.03.2017 """ import sys import os from scipy.io import netcdf import BaseNetCDF import numpy as np import time import BaseOpts from BaseLog import * import FileMgr from CalibConst import getSGCalibrationConstants impo...
0
0
0
18,735
0
0
0
0
45
f875ddb3415d927e8db2727a742f4a1b3f508cd8
33,713
py
Python
LIpipe/makemelucky.py
fedhere/getlucky
1dec967fc6f771060435842b01580bd05fcfcd08
[ "MIT" ]
null
null
null
LIpipe/makemelucky.py
fedhere/getlucky
1dec967fc6f771060435842b01580bd05fcfcd08
[ "MIT" ]
null
null
null
LIpipe/makemelucky.py
fedhere/getlucky
1dec967fc6f771060435842b01580bd05fcfcd08
[ "MIT" ]
null
null
null
################################################################# ###############written by fbb, dkudrow, shillberry######################## #Reads all of the images in a directory, sorts them by Strehl #Ratio or consecutive order, and stacks the specified top percent #either aligned to a guide star, correlating in fou...
34.436159
236
0.529677
################################################################# ###############written by fbb, dkudrow, shillberry######################## #Reads all of the images in a directory, sorts them by Strehl #Ratio or consecutive order, and stacks the specified top percent #either aligned to a guide star, correlating in fou...
0
0
0
3,125
0
23,006
0
0
319
43758600f0805e4b72ab6618d90986a56a45c8cf
108
py
Python
make_queue/views/api/__init__.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
make_queue/views/api/__init__.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
make_queue/views/api/__init__.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
__all__ = ["reservation", "user_info"] for _import in __all__: __import__(__package__ + "." + _import)
21.6
43
0.685185
__all__ = ["reservation", "user_info"] for _import in __all__: __import__(__package__ + "." + _import)
0
0
0
0
0
0
0
0
0
f9778d3fad1c03c5f766e60531c6817fd74b03eb
2,825
py
Python
cwb/tests/comparison/cuturi_solver.py
lingxiaoli94/CWB
96bce8c82a7ec39fe730ef6ac372e52c6fadf70f
[ "MIT" ]
8
2020-11-12T06:17:47.000Z
2021-07-05T21:34:16.000Z
cwb/tests/comparison/cuturi_solver.py
lingxiaoli94/CWB
96bce8c82a7ec39fe730ef6ac372e52c6fadf70f
[ "MIT" ]
null
null
null
cwb/tests/comparison/cuturi_solver.py
lingxiaoli94/CWB
96bce8c82a7ec39fe730ef6ac372e52c6fadf70f
[ "MIT" ]
null
null
null
g_centering_trick = False # doesn't change results much g_sinkhorn_reg = 0.1
32.848837
146
0.657345
from .common import load_source_list import tensorflow as tf import numpy as np import ot import os import pickle import argparse g_centering_trick = False # doesn't change results much g_sinkhorn_reg = 0.1 def free_support_barycenter(measures_locations, measures_weights, X_init, b=None, weights=None, numItermax=100...
0
0
0
0
0
2,568
0
-24
201
4ab8b4cb175d7b08154c39754dcc83a32f5daa8f
1,272
py
Python
Manual/procdocs.py
monkey0506/ags
2f96ddf47e944efea2534386a4004849eb71372b
[ "Artistic-2.0" ]
11
2015-01-25T09:59:17.000Z
2019-07-08T15:06:06.000Z
Manual/procdocs.py
monkey0506/ags
2f96ddf47e944efea2534386a4004849eb71372b
[ "Artistic-2.0" ]
3
2019-05-09T01:24:14.000Z
2019-06-12T12:16:33.000Z
Manual/procdocs.py
monkey0506/ags
2f96ddf47e944efea2534386a4004849eb71372b
[ "Artistic-2.0" ]
1
2019-08-01T20:32:35.000Z
2019-08-01T20:32:35.000Z
#!/usr/bin/env python import re # Format generated .htm to have correct syntax and additional styling. STYLE = """\ <style type=\"text/css\"><!-- body { font-family: Verdana; font-size: 10pt; } td { font-family: Verdana; font-size: 10pt; } a { font-weight: bold } --></style>""" endhea...
21.2
76
0.586478
#!/usr/bin/env python import glob import re import sys # Format generated .htm to have correct syntax and additional styling. STYLE = """\ <style type=\"text/css\"><!-- body { font-family: Verdana; font-size: 10pt; } td { font-family: Verdana; font-size: 10pt; } a { font-weight: bold ...
0
0
0
0
0
772
0
-21
91
a4ba527acb39a9d80fc5c236351945eea8bfa4dd
474
py
Python
04_meter.py
whaleygeek/mb_solar
479a714484ce67d4116ae065da1a9acd83f0bf61
[ "MIT" ]
null
null
null
04_meter.py
whaleygeek/mb_solar
479a714484ce67d4116ae065da1a9acd83f0bf61
[ "MIT" ]
null
null
null
04_meter.py
whaleygeek/mb_solar
479a714484ce67d4116ae065da1a9acd83f0bf61
[ "MIT" ]
1
2021-06-23T08:51:36.000Z
2021-06-23T08:51:36.000Z
P0_MAX = 812 # main program while True: reading = pin0.read_analog() display.clear() barchart(4, reading, P0_MAX) if button_a.was_pressed(): pin2.write_digital(0) # off if button_b.was_pressed(): pin2.write_digital(1) # on sleep(1000) # 1 second
20.608696
36
0.580169
from microbit import * P0_MAX = 812 def barchart(y, v, vmax): v = min(v, vmax) leds = int(v * 5 / vmax) for x in range(leds): display.set_pixel(x, y, 9) # main program while True: reading = pin0.read_analog() display.clear() barchart(4, reading, P0_MAX) if button_a.wa...
0
0
0
0
0
115
0
1
45
b99bc987d5e131f5d27c3e36eff7e9ec578eeb66
3,423
py
Python
pipe/funnel.py
DeepLearning-Tools/TensorPipe
404c5b4aa641d9d96285be04106204d2d66d9a79
[ "Apache-2.0" ]
1
2020-10-14T14:05:59.000Z
2020-10-14T14:05:59.000Z
pipe/funnel.py
DeepLearning-Tools/TensorPipe
404c5b4aa641d9d96285be04106204d2d66d9a79
[ "Apache-2.0" ]
null
null
null
pipe/funnel.py
DeepLearning-Tools/TensorPipe
404c5b4aa641d9d96285be04106204d2d66d9a79
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 Kartik Sharma Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
38.897727
92
0.593631
""" Copyright 2020 Kartik Sharma Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
0
0
0
2,588
0
0
0
11
91
b75cf0d05deda7d29424eae416a6670d052ea06a
11,042
py
Python
tests/test_epics_motor.py
jyotiphy/pcdsdevices
d2bd7ed52311e1fa2d9f97b433059197b3e86387
[ "BSD-3-Clause-LBNL" ]
1
2021-06-15T14:09:42.000Z
2021-06-15T14:09:42.000Z
tests/test_epics_motor.py
jyotiphy/pcdsdevices
d2bd7ed52311e1fa2d9f97b433059197b3e86387
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/test_epics_motor.py
jyotiphy/pcdsdevices
d2bd7ed52311e1fa2d9f97b433059197b3e86387
[ "BSD-3-Clause-LBNL" ]
2
2020-10-30T22:10:46.000Z
2021-01-21T18:51:50.000Z
import logging from ophyd.sim import make_fake_device from pcdsdevices.epics_motor import (IMS, EpicsMotorInterface, PCDSMotorBase) logger = logging.getLogger(__name__) def fake_class_setup(cls): """ Make the fake class and modify if needed """ FakeClass = make_fake_device(cls) return FakeClass ...
30.502762
79
0.665187
import logging import pytest from bluesky import RunEngine from bluesky.plan_stubs import close_run, open_run, stage, unstage from ophyd.sim import make_fake_device from ophyd.status import wait as status_wait from pcdsdevices.epics_motor import (IMS, PMC100, BeckhoffAxis, EpicsMotor, ...
0
1,766
0
0
249
6,849
0
320
549
339020908322b563ac2e0d2448a5293fc5ce7f51
4,796
py
Python
lib/prophetview.py
stepanzh/chatty_sacred_deer
f827517ba295983c7d72639155b402f744300f91
[ "MIT" ]
3
2020-05-27T20:17:13.000Z
2020-07-10T09:47:10.000Z
lib/prophetview.py
stepanzh/chatty_sacred_deer
f827517ba295983c7d72639155b402f744300f91
[ "MIT" ]
null
null
null
lib/prophetview.py
stepanzh/chatty_sacred_deer
f827517ba295983c7d72639155b402f744300f91
[ "MIT" ]
1
2020-06-09T17:51:23.000Z
2020-06-09T17:51:23.000Z
# import sys, time # class TextIntonationDecoder: # color_start = '\u001b' # ansi code start # color_end = 'm' # ansi code end # pause_code = '!pause' # @classmethod # def get_pause_code(cls): # return cls.pause_code # @classmethod # def parse_color(cls, s:str): # ...
32.187919
100
0.485613
# import sys, time # class TextIntonationDecoder: # color_start = '\u001b' # ansi code start # color_end = 'm' # ansi code end # pause_code = '!pause' # @classmethod # def get_pause_code(cls): # return cls.pause_code # @classmethod # def parse_color(cls, s:str): # ...
0
0
0
0
0
0
0
0
0
332d2200ce65f2dedbab6cf4d817d8d4bc45cf5d
9,355
py
Python
custom_components/meross_lan/devices/mts100.py
patrick-blom/meross_lan
dfab3133c6ed00b513cc1500b510e57c8eee58e2
[ "MIT" ]
null
null
null
custom_components/meross_lan/devices/mts100.py
patrick-blom/meross_lan
dfab3133c6ed00b513cc1500b510e57c8eee58e2
[ "MIT" ]
null
null
null
custom_components/meross_lan/devices/mts100.py
patrick-blom/meross_lan
dfab3133c6ed00b513cc1500b510e57c8eee58e2
[ "MIT" ]
null
null
null
from __future__ import annotations from homeassistant.components.climate.const import (PRESET_AWAY, PRESET_COMFORT, PRESET_SLEEP, HVAC_MODE_AUTO, HVAC_MODE_HEAT, HVAC_MODE_OFF) from ..merossclient import const as mc # mEROSS cONST MTS100_MODE_CUSTOM = 0 MTS100_MODE_COMFORT = 1 # aka 'Heat' MTS100_MODE_SLEEP = 2 # ak...
29.511041
109
0.656761
from __future__ import annotations from homeassistant.components.climate import ( DOMAIN as PLATFORM_CLIMATE, ClimateEntity, ) from homeassistant.components.climate.const import ( PRESET_AWAY, PRESET_COMFORT, PRESET_SLEEP, SUPPORT_PRESET_MODE, SUPPORT_TARGET_TEMPERATURE, CURRENT_HVAC_HEAT, CURRENT_HVAC...
0
1,340
3,023
2,548
0
0
0
429
159
d2d2692388424382d7772cf2657b8d5b5b97d4c5
19,041
py
Python
models/learning_sparsegp.py
sebtsh/PBO
e40adbb488fbf848de2ac8fa01de77cf2ca71e7d
[ "MIT" ]
3
2021-01-26T05:19:31.000Z
2022-01-06T19:36:24.000Z
models/learning_sparsegp.py
sebtsh/PBO
e40adbb488fbf848de2ac8fa01de77cf2ca71e7d
[ "MIT" ]
1
2021-01-26T05:27:56.000Z
2021-01-28T05:24:14.000Z
models/learning_sparsegp.py
sebtsh/PBO
e40adbb488fbf848de2ac8fa01de77cf2ca71e7d
[ "MIT" ]
1
2021-12-15T07:30:47.000Z
2021-12-15T07:30:47.000Z
import time import numpy as np import tensorflow as tf import tensorflow_probability as tfp import gpflow from gpflow.utilities import set_trainable def elbo_fullcov(q_mu, q_sqrt_latent, inducing_inputs, D_idxs, max_idxs, kernel, ...
39.66875
156
0.65422
import time import numpy as np import tensorflow as tf import tensorflow_probability as tfp import gpflow from gpflow.utilities import set_trainable def elbo_fullcov(q_mu, q_sqrt_latent, inducing_inputs, D_idxs, max_idxs, kernel, ...
0
0
0
0
0
1,660
0
0
27
f0d4ba7982bf76baf6d8ccab2c0d603da68b5643
148
py
Python
tests/testing_config/custom_components/test_standalone.py
veresspeter/home-assistant
a3c22c6eec2c77a28a8fa859e899984269708666
[ "Apache-2.0" ]
11
2017-09-25T13:11:33.000Z
2020-05-16T21:54:28.000Z
tests/testing_config/custom_components/test_standalone.py
veresspeter/home-assistant
a3c22c6eec2c77a28a8fa859e899984269708666
[ "Apache-2.0" ]
125
2018-12-11T07:31:20.000Z
2021-07-27T08:20:03.000Z
tests/testing_config/custom_components/test_standalone.py
veresspeter/home-assistant
a3c22c6eec2c77a28a8fa859e899984269708666
[ "Apache-2.0" ]
3
2018-05-22T18:52:01.000Z
2019-07-18T21:30:45.000Z
"""Provide a mock standalone component.""" DOMAIN = 'test_standalone' def setup(hass, config): """Mock a successful setup.""" return True
18.5
42
0.675676
"""Provide a mock standalone component.""" DOMAIN = 'test_standalone' def setup(hass, config): """Mock a successful setup.""" return True
0
0
0
0
0
0
0
0
0
3b28f0fd72990fffe005e50f2256e6601c21ef56
13,471
py
Python
apps/keyboard/js/imes/latin/dictionaries/xml2dict.py
lightsofapollo/gaia
c0ac6c7a784da15b30809b9108975c8c7345288d
[ "Apache-2.0" ]
null
null
null
apps/keyboard/js/imes/latin/dictionaries/xml2dict.py
lightsofapollo/gaia
c0ac6c7a784da15b30809b9108975c8c7345288d
[ "Apache-2.0" ]
null
null
null
apps/keyboard/js/imes/latin/dictionaries/xml2dict.py
lightsofapollo/gaia
c0ac6c7a784da15b30809b9108975c8c7345288d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ This script reads a XML-formatted word list and produces a dictionary file used by the FirefoxOS virtual keyboard for word suggestions and auto corrections. The word lists come from the Android source: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/dictio...
32.304556
140
0.629797
# -*- coding: utf-8 -*- """ This script reads a XML-formatted word list and produces a dictionary file used by the FirefoxOS virtual keyboard for word suggestions and auto corrections. The word lists come from the Android source: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/dictio...
0
0
0
4,769
0
4,314
0
-18
294
ad675be89f3dd71f339323b20f1a2ef697ee66ce
1,526
py
Python
BitTorrent-5.2.2/BitTorrent/GUI_wx/StatusLight.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
4
2016-04-26T03:43:54.000Z
2016-11-17T08:09:04.000Z
BitTorrent-5.2.2/BitTorrent/GUI_wx/StatusLight.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
17
2015-01-05T21:06:22.000Z
2015-12-07T20:45:44.000Z
BitTorrent-5.2.2/BitTorrent/GUI_wx/StatusLight.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
7
2015-07-28T09:17:17.000Z
2021-11-07T02:29:41.000Z
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
30.52
77
0.665793
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
0
0
0
825
0
0
0
29
104
8a8a7da767ee0aff5d8f1d6a0b4f8d75563f33f2
5,888
py
Python
kinto/core/testing.py
dreuse/kinto
533037ad421b63419f9883653a428683c67d43b8
[ "Apache-2.0" ]
null
null
null
kinto/core/testing.py
dreuse/kinto
533037ad421b63419f9883653a428683c67d43b8
[ "Apache-2.0" ]
null
null
null
kinto/core/testing.py
dreuse/kinto
533037ad421b63419f9883653a428683c67d43b8
[ "Apache-2.0" ]
null
null
null
import os import unittest from kinto.core import statsd from kinto.core.utils import sqlalchemy, memcache, encode64 skip_if_travis = unittest.skipIf("TRAVIS" in os.environ, "travis") skip_if_no_postgresql = unittest.skipIf(sqlalchemy is None, "postgresql is not installed.") skip_if_no_memcached = unittest.skipIf(memca...
32.351648
91
0.657439
import os import threading import unittest from collections import defaultdict from unittest import mock import webtest from cornice import errors as cornice_errors from pyramid.url import parse_url_overrides from kinto.core import DEFAULT_SETTINGS from kinto.core import statsd from kinto.core.storage import generato...
0
1,694
0
2,895
0
98
0
108
293
06c1cb9b0a70ddef0acfcdc28ee415680220cfb4
3,934
py
Python
flamio/player.py
Jkreid/flamio
c7d98b7e39f0a8e5792a236e9508632d294525b2
[ "MIT" ]
null
null
null
flamio/player.py
Jkreid/flamio
c7d98b7e39f0a8e5792a236e9508632d294525b2
[ "MIT" ]
11
2020-05-29T18:14:58.000Z
2021-07-21T02:41:14.000Z
flamio/player.py
Jkreid/flamio
c7d98b7e39f0a8e5792a236e9508632d294525b2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Jul 17 11:31:40 2021 @author: justi """
24.898734
75
0.609049
# -*- coding: utf-8 -*- """ Created on Sat Jul 17 11:31:40 2021 @author: justi """ import utils import play import spotify import time as t from abc import ABC, abstractmethod class Player(ABC): def __init__(self, *args, **kwargs): super().__init__() def play_track(self, *args, **kwargs): ...
0
1,329
0
2,381
0
0
0
-17
157
52010871575d24c3de36b7385ca8ba57577b8969
10,688
py
Python
typeddfs/_mixins/_ini_like_mixin.py
dmyersturnbull/typed-dfs
57504da6cf2085e96ef62f35afcc2f733a9910e0
[ "Apache-2.0" ]
5
2020-07-14T14:03:35.000Z
2022-01-15T03:34:15.000Z
typeddfs/_mixins/_ini_like_mixin.py
kokellab/typed-dfs
11c80080446a28e618a379569606f1c1ba387062
[ "Apache-2.0" ]
83
2021-01-06T06:19:12.000Z
2022-03-28T03:06:18.000Z
typeddfs/_mixins/_ini_like_mixin.py
kokellab/typed-dfs
11c80080446a28e618a379569606f1c1ba387062
[ "Apache-2.0" ]
null
null
null
""" Mixin for INI, .properties, and TOML. """ from __future__ import annotations __all__ = ["_IniLikeMixin"]
32.785276
101
0.539577
""" Mixin for INI, .properties, and TOML. """ from __future__ import annotations import os from typing import Optional, Sequence, Set, Union import pandas as pd from typeddfs.df_errors import UnsupportedOperationError from typeddfs.utils import IoUtils, ParseUtils, Utils class _IniLikeMixin: def to_properties(...
0
5,268
0
5,091
0
0
0
81
136
d91f2664e77c2b0a606d4e795da17ecfe4662d86
476
py
Python
Tag_03.py
Gravitar64/Advent-of-Code-2016
d998dc28af626061117c6b1cab643292e1baf047
[ "Apache-2.0" ]
null
null
null
Tag_03.py
Gravitar64/Advent-of-Code-2016
d998dc28af626061117c6b1cab643292e1baf047
[ "Apache-2.0" ]
null
null
null
Tag_03.py
Gravitar64/Advent-of-Code-2016
d998dc28af626061117c6b1cab643292e1baf047
[ "Apache-2.0" ]
null
null
null
from time import perf_counter as pfc puzzle = load('Tag_03.txt') start = pfc() print(solve(puzzle), pfc() - start)
23.8
78
0.632353
from time import perf_counter as pfc def load(file): with open(file) as f: return [[int(l) for l in t.split()] for t in f] def is_valid(triangle): a,b,c = sorted(triangle) return a+b > c def solve(p): part1 = sum([is_valid(triangle) for triangle in p]) p, l = [list(t) for t in zip(*p)], len(p) r...
0
0
0
0
0
285
0
0
73
c31aae7f812d53a79501329a5513905db184e3c8
184
py
Python
annoy.py
jlgrady1/annoyotron
4f6de578660accc27d58ed45935671fb116d5638
[ "MIT" ]
null
null
null
annoy.py
jlgrady1/annoyotron
4f6de578660accc27d58ed45935671fb116d5638
[ "MIT" ]
null
null
null
annoy.py
jlgrady1/annoyotron
4f6de578660accc27d58ed45935671fb116d5638
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
12.266667
47
0.603261
import time from datetime import datetime def main(): while True: time.sleep(2) print '{} hello'.format(datetime.now()) if __name__ == '__main__': main()
0
0
0
0
0
76
0
-2
68
a1a9cd8bb95b4cff28581a3e8d98ef0e089e6f08
838
py
Python
pyasst/command.py
NvwaOS/nvwaos-tools
757c72da5f7bef560f48a635d05e88e45e79fd3e
[ "MIT" ]
null
null
null
pyasst/command.py
NvwaOS/nvwaos-tools
757c72da5f7bef560f48a635d05e88e45e79fd3e
[ "MIT" ]
null
null
null
pyasst/command.py
NvwaOS/nvwaos-tools
757c72da5f7bef560f48a635d05e88e45e79fd3e
[ "MIT" ]
null
null
null
PAUSE = { 'windows': 'PAUSE', 'macos': None, 'linux': None, 'unix': None } CLEAR = { 'windows': 'CLS', 'macos': 'clear', 'linux': 'clear', 'unix': 'clear' }
17.829787
43
0.572792
import os from . import env PAUSE = { 'windows': 'PAUSE', 'macos': None, 'linux': None, 'unix': None } CLEAR = { 'windows': 'CLS', 'macos': 'clear', 'linux': 'clear', 'unix': 'clear' } def _select_cmd_(commands: dict) -> str: if env.isWindows(): return commands['windows']...
39
0
0
0
0
510
0
-16
136
4215fb0c184c70f06d0c10bc38e20eb616678168
647
py
Python
fairy/tf/tf_load.py
qilutong/fairy
e4d40c5d3d6d431875a49c4f708ee278ab795901
[ "MIT" ]
null
null
null
fairy/tf/tf_load.py
qilutong/fairy
e4d40c5d3d6d431875a49c4f708ee278ab795901
[ "MIT" ]
null
null
null
fairy/tf/tf_load.py
qilutong/fairy
e4d40c5d3d6d431875a49c4f708ee278ab795901
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @FileName : tf_load.py @Description : tf @Author : @Email : qilutong@yahoo.com @Time : 2019-05-15 19:08 @Modify : None """ from __future__ import absolute_import, division, print_function import tensorflow as tf def load_graph(model_file, name=None): """ ...
20.21875
64
0.627512
# -*- coding: utf-8 -*- """ @FileName : tf_load.py @Description : 加载tf模型 @Author : 齐鲁桐 @Email : qilutong@yahoo.com @Time : 2019-05-15 19:08 @Modify : None """ from __future__ import absolute_import, division, print_function import tensorflow as tf def load_graph(model_file, name=None): ...
69
0
0
0
0
0
0
0
0
5fa2f7f9bc06248f6a52d7d56ea84b451e48777b
45,228
py
Python
StockAndFlowInPython/sfd_canvas/interactive_sfd.py
Rutherford1895/SFD_Canvas
2f8de22e70950807bb6ddd6c5e361722638e0e55
[ "MIT" ]
3
2021-05-29T09:19:09.000Z
2022-03-27T14:30:39.000Z
StockAndFlowInPython/sfd_canvas/interactive_sfd.py
wzh1895/Stock-and-Flow-in-Python
2f8de22e70950807bb6ddd6c5e361722638e0e55
[ "MIT" ]
1
2019-06-13T12:47:12.000Z
2019-06-13T12:47:12.000Z
StockAndFlowInPython/sfd_canvas/interactive_sfd.py
wzh1895/Stock-and-Flow-in-Python
2f8de22e70950807bb6ddd6c5e361722638e0e55
[ "MIT" ]
1
2022-03-27T14:48:20.000Z
2022-03-27T14:48:20.000Z
import sys if __name__ == '__main__': app = QApplication(sys.argv) main_window = QMainWindow() main_window.setWindowTitle("Interactive SFD") main_window.setMinimumWidth(960) main_window.setMinimumHeight(800) interactive_sfd = InteractiveSFD() main_window.setCentralWidget(int...
43.074286
125
0.623375
import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from StockAndFlowInPython.sfd_canvas.interactive_sfd_ui import Ui_widget_interactive_sfd from StockAndFlowInPython.parsing.XMILE_parsing import text_to_equation,...
0
724
0
43,332
0
0
0
290
499
daa5ddffa682a10fd503e8a050698e96c91acd3f
311
py
Python
Decompose_Factors.py
arunbutte/Python_Codes
537ed529fb87f9fc050c5236ffcbde8c2cd93b00
[ "MIT" ]
null
null
null
Decompose_Factors.py
arunbutte/Python_Codes
537ed529fb87f9fc050c5236ffcbde8c2cd93b00
[ "MIT" ]
null
null
null
Decompose_Factors.py
arunbutte/Python_Codes
537ed529fb87f9fc050c5236ffcbde8c2cd93b00
[ "MIT" ]
null
null
null
n = 84
23.923077
41
0.369775
n = 84 def decomposed(n): prime = [2, 3, 5, 7, 11, 13, 17, 19] dict = {s:0 for s in prime} res = "" for p in prime: while (n % p == 0): dict[p] += 1 n = n / p print(p, n, dict) for p in prime: print(p,"^",dict[p])
0
0
0
0
0
281
0
0
23
62d4d854c6d74346169c942ff68bfd4e92e735d1
2,468
py
Python
backend/optimal_v_dbs_value_iteration.py
DerekDick/reinforce-py
95bef3ed2ed7aa33dd5ef177a6cdfd6867298365
[ "Apache-2.0" ]
1
2021-10-19T06:32:13.000Z
2021-10-19T06:32:13.000Z
backend/optimal_v_dbs_value_iteration.py
DerekDick/reinforce-py
95bef3ed2ed7aa33dd5ef177a6cdfd6867298365
[ "Apache-2.0" ]
15
2021-05-11T23:33:10.000Z
2022-02-27T10:57:12.000Z
backend/optimal_v_dbs_value_iteration.py
DerekDick/reinforce-py
95bef3ed2ed7aa33dd5ef177a6cdfd6867298365
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Jianfeng Hou <frankderekdick@gmail.com> # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless req...
33.351351
133
0.76094
# Copyright 2020 Jianfeng Hou <frankderekdick@gmail.com> # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless req...
0
0
0
0
0
0
0
-23
68
cfeadc6235189352f8468ef5082c19f7fd79e3ca
5,895
py
Python
imagenet_training/models/resnet/resnet.py
daniilgaltsev/ImageNet-Training
9ca1d26cde07782398c7f366d5bf510c9e988236
[ "MIT" ]
null
null
null
imagenet_training/models/resnet/resnet.py
daniilgaltsev/ImageNet-Training
9ca1d26cde07782398c7f366d5bf510c9e988236
[ "MIT" ]
null
null
null
imagenet_training/models/resnet/resnet.py
daniilgaltsev/ImageNet-Training
9ca1d26cde07782398c7f366d5bf510c9e988236
[ "MIT" ]
null
null
null
"""Module with resnet like models.""" import torch.nn as nn from .blocks import ResNetBlock, ResNetBottleneck TYPE_TO_ARGS = { "resnet18": ([2, 2, 2, 2], ResNetBlock), "resnet34": ([3, 4, 6, 3], ResNetBlock), "resnet50": ([3, 4, 6, 3], ResNetBottleneck), "resnet101": ([3, 4, 23, 3], ResNetBottleneck...
36.165644
118
0.617812
"""Module with resnet like models.""" import argparse from collections import OrderedDict import importlib from typing import Any, Dict, List, Optional, Type, Union import torch import torch.nn as nn from .blocks import ResNetBlock, ResNetBottleneck, conv1x1 TYPE_TO_ARGS = { "resnet18": ([2, 2, 2, 2], ResNetB...
0
609
0
4,442
0
214
0
39
181
8ce90a8b9109f0cd1d6c28f3238050dc9f224702
236
py
Python
fcsSimpleMooc/forum/forms.py
Franklin-Siqueira/mooc-lab
0a2cd48971a97901f2d50e4013ddda1eaece3430
[ "MIT" ]
null
null
null
fcsSimpleMooc/forum/forms.py
Franklin-Siqueira/mooc-lab
0a2cd48971a97901f2d50e4013ddda1eaece3430
[ "MIT" ]
null
null
null
fcsSimpleMooc/forum/forms.py
Franklin-Siqueira/mooc-lab
0a2cd48971a97901f2d50e4013ddda1eaece3430
[ "MIT" ]
null
null
null
''' forms for the forum's related instances . ReplyForm . Meta: ''' #
13.882353
39
0.618644
''' forms for the forum's related instances . ReplyForm . Meta: ''' from django import forms # from .models import Reply class ReplyForm(forms.ModelForm): class Meta: model = Reply fields = ['reply']
0
0
0
78
0
0
0
7
67
58dfa1669964296505d0705409094ca0297eef0d
5,982
py
Python
SpatialiseTEST.py
Senzt/CNNBSL
9b5dcf4381e4ca4321d0c6bd2472dbe8ec9af810
[ "MIT" ]
2
2021-07-21T14:12:02.000Z
2021-07-21T14:13:19.000Z
SpatialiseTEST.py
Senzt/CNNBSL
9b5dcf4381e4ca4321d0c6bd2472dbe8ec9af810
[ "MIT" ]
null
null
null
SpatialiseTEST.py
Senzt/CNNBSL
9b5dcf4381e4ca4321d0c6bd2472dbe8ec9af810
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Mar 21 18:43:20 2021 @author: Waradon Senzt Phokhinanan """ ############################################################################################ import numpy as np import os #################################################################################...
32.51087
148
0.526747
# -*- coding: utf-8 -*- """ Created on Sun Mar 21 18:43:20 2021 @author: Waradon Senzt Phokhinanan """ ############################################################################################ import math import librosa import scipy.io import matplotlib.pyplot as plt from scipy import signal import ...
0
0
0
0
0
2,985
0
-9
219
8695ab1daa525e73eb68ec88d8c37272c8c11f52
5,072
py
Python
tests/test_dgraph.py
superphy/prairiedog
cc7031dab8a453bdbbd7446c80b4d126ee62f1db
[ "Apache-2.0" ]
null
null
null
tests/test_dgraph.py
superphy/prairiedog
cc7031dab8a453bdbbd7446c80b4d126ee62f1db
[ "Apache-2.0" ]
125
2018-06-29T15:00:31.000Z
2021-11-15T17:48:43.000Z
tests/test_dgraph.py
superphy/prairiedog
cc7031dab8a453bdbbd7446c80b4d126ee62f1db
[ "Apache-2.0" ]
null
null
null
import logging log = logging.getLogger('prairiedog') # TODO: this currently runs too slow for tests # def test_dgraph_preload(dg): # dg.preload() # assert True
27.122995
78
0.619282
import subprocess import logging from prairiedog.node import Node from prairiedog.edge import Edge from prairiedog.dgraph import Dgraph from prairiedog.graph import Graph from prairiedog.errors import GraphException log = logging.getLogger('prairiedog') def test_dgraph_install(): r = subprocess.run( ['d...
0
0
0
0
0
4,388
0
69
432
16d9e3095b7bc0e853b04d38ab2992688abaa009
13,258
py
Python
analyze_prob_attn.py
jiacheng-xu/text-sum-uncertainty
0c0f2ca7719a2086f84ae4797f793b9e5e23b274
[ "MIT" ]
25
2020-10-16T01:43:22.000Z
2021-06-04T00:46:05.000Z
analyze_prob_attn.py
jiacheng-xu/text-sum-uncertainty
0c0f2ca7719a2086f84ae4797f793b9e5e23b274
[ "MIT" ]
1
2020-10-16T02:58:29.000Z
2020-10-16T03:51:38.000Z
analyze_prob_attn.py
jiacheng-xu/text-sum-uncertainty
0c0f2ca7719a2086f84ae4797f793b9e5e23b274
[ "MIT" ]
null
null
null
import os, random, pickle import numpy as np # we are going to show for each timestep, for each layer, what's the majority attention. # majority attention excluding roadmark tokens # majority index_of_bpe = 1 compar_set1 = ['last_inp', 'cur_inp', 'cur_pred', 'next_pred'] compar_set2 = ['top1_most_common', 'top1_d...
34.258398
124
0.604314
import statistics import os, random, pickle import numpy as np # we are going to show for each timestep, for each layer, what's the majority attention. # majority attention excluding roadmark tokens # majority from typing import List import scipy from collections import Counter from util import convert_enc_attn, lo...
0
0
0
0
0
10,804
0
37
502
e20f29720dcb2681e0f29205bf0745dbf1c1cd01
1,979
py
Python
marketplace/marketplace/urls.py
kecs/marketplace
92f882a651f97a2b3134607edd9205202dd830e6
[ "MIT" ]
1
2019-11-11T19:49:37.000Z
2019-11-11T19:49:37.000Z
marketplace/marketplace/urls.py
kecs/marketplace
92f882a651f97a2b3134607edd9205202dd830e6
[ "MIT" ]
1
2020-06-26T07:53:02.000Z
2020-07-08T14:39:20.000Z
marketplace/marketplace/urls.py
kecs/marketplace
92f882a651f97a2b3134607edd9205202dd830e6
[ "MIT" ]
null
null
null
from django.conf.urls.static import static from django.conf import settings """marketplace URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import view...
43.977778
89
0.688732
from django.conf.urls.static import static from django.conf import settings """marketplace URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import view...
0
0
0
0
0
0
0
56
0
825da5bfb8ec69653b0d4b0338aa7c81c3b8cbc5
1,878
py
Python
sound_player/sound.py
Krozark/sound-player
ad592b364d0d8303c499abaa304f8a698e5fbedb
[ "BSD-2-Clause" ]
null
null
null
sound_player/sound.py
Krozark/sound-player
ad592b364d0d8303c499abaa304f8a698e5fbedb
[ "BSD-2-Clause" ]
1
2021-08-24T14:14:03.000Z
2021-08-25T08:06:32.000Z
sound_player/sound.py
Krozark/sound-player
ad592b364d0d8303c499abaa304f8a698e5fbedb
[ "BSD-2-Clause" ]
1
2021-12-27T20:44:25.000Z
2021-12-27T20:44:25.000Z
import logging logger = logging.getLogger(__name__)
25.04
81
0.599574
import logging import os from currentplatform import platform from sound_player.common import StatusObject, STATUS logger = logging.getLogger(__name__) class BaseSound(StatusObject): def __init__(self, filepath, loop=None): super().__init__() self._filepath = filepath self._loop = loop ...
0
0
0
1,700
0
0
0
34
91
0027cee07361c62a69c0d0077181b5576bf40d76
5,488
py
Python
experiments/actors.py
Bellboy-Capstone/System
debf2e06580bf2354cd1aac0a3ca4d2b52a3da6c
[ "MIT" ]
null
null
null
experiments/actors.py
Bellboy-Capstone/System
debf2e06580bf2354cd1aac0a3ca4d2b52a3da6c
[ "MIT" ]
12
2020-10-06T03:22:02.000Z
2020-12-04T01:46:33.000Z
experiments/actors.py
Bellboy-Capstone/System
debf2e06580bf2354cd1aac0a3ca4d2b52a3da6c
[ "MIT" ]
null
null
null
import logging from time import sleep import RPi.GPIO as GPIO from thespian.actors import ActorSystem # Logging logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(__name__) # Sensor trigPin = 16 echoPin = 18 MAX_DISTANCE = 220 timeOut = MAX_DISTANCE * 60 GPIO.setmode(GPIO.BOARD) # use PHYSICAL GPIO ...
33.463415
163
0.646319
import logging import time from datetime import timedelta from time import sleep import RPi.GPIO as GPIO from thespian.actors import Actor, ActorSystem, ActorTypeDispatcher # Logging logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(__name__) # Sensor trigPin = 16 echoPin = 18 MAX_DISTANCE = 220 time...
0
0
0
4,083
0
0
0
27
113
016c6c3725d37f7ecd517f61fbe94cdaf534984a
1,220
py
Python
sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_client_enums.py
Ochirkhuyag/azure-sdk-for-python
cd7236f498f86fb8aeb047a536b83aef5c7160c1
[ "MIT" ]
null
null
null
sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_client_enums.py
Ochirkhuyag/azure-sdk-for-python
cd7236f498f86fb8aeb047a536b83aef5c7160c1
[ "MIT" ]
null
null
null
sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_client_enums.py
Ochirkhuyag/azure-sdk-for-python
cd7236f498f86fb8aeb047a536b83aef5c7160c1
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
21.403509
76
0.596721
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
0
0
0
580
0
0
0
0
161
7f3ed65cdeb4ef21c1249ff30bb0314c140e2b1c
1,386
py
Python
web/main/services.py
Mikhail-Gorelov/django-blog-master
7fd18f228f795773abb8228999d8e331dcfcf619
[ "MIT" ]
null
null
null
web/main/services.py
Mikhail-Gorelov/django-blog-master
7fd18f228f795773abb8228999d8e331dcfcf619
[ "MIT" ]
1
2022-03-28T08:23:26.000Z
2022-03-28T08:23:26.000Z
web/main/services.py
Mikhail-Gorelov/django-blog-master
7fd18f228f795773abb8228999d8e331dcfcf619
[ "MIT" ]
1
2022-01-06T15:14:21.000Z
2022-01-06T15:14:21.000Z
from django.contrib.auth import get_user_model User = get_user_model()
27.72
80
0.662338
from django.contrib.auth import get_user_model from auth_app.utils import get_activate_key from main.decorators import except_shell from src.celery import app from auth_app.tasks import send_information_email from django.conf import settings from microservice_request.services import MicroServiceConnect, ConnectionServ...
0
815
0
50
0
0
0
143
303
b42737d22ed321c0765451444ca355d7fda9e050
704
py
Python
Exams/01. Python Advanced Exam - 23 February 2020/02. Solutions/01. ExpressionEvaluator.py
indieza/Python-Developing
f7b5fa7e9ca5d9e8ad30fc7d2a1a21e2ad4b75a4
[ "MIT" ]
null
null
null
Exams/01. Python Advanced Exam - 23 February 2020/02. Solutions/01. ExpressionEvaluator.py
indieza/Python-Developing
f7b5fa7e9ca5d9e8ad30fc7d2a1a21e2ad4b75a4
[ "MIT" ]
null
null
null
Exams/01. Python Advanced Exam - 23 February 2020/02. Solutions/01. ExpressionEvaluator.py
indieza/Python-Developing
f7b5fa7e9ca5d9e8ad30fc7d2a1a21e2ad4b75a4
[ "MIT" ]
null
null
null
import math inputItems = input().split(' ') sum = 0 numbers = [] operators = [] isFirst = True for item in inputItems: if item == '*' or item == '/' or item == '+' or item == '-': for number in numbers: if isFirst: sum = int(number) isFirst = False e...
24.275862
64
0.411932
import math inputItems = input().split(' ') sum = 0 numbers = [] operators = [] isFirst = True for item in inputItems: if item == '*' or item == '/' or item == '+' or item == '-': for number in numbers: if isFirst: sum = int(number) isFirst = False e...
0
0
0
0
0
0
0
0
0
5f620067b7dd51b70d58550f24215b168300ba68
2,925
py
Python
barbican-8.0.0/barbican/tests/objects/test_ovo_project.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
177
2015-01-02T09:35:53.000Z
2022-02-26T01:43:55.000Z
barbican/tests/objects/test_ovo_project.py
kkutysllb/barbican
7b14d983e0dce6dcffe9781b05c52335b8203fc7
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
barbican/tests/objects/test_ovo_project.py
kkutysllb/barbican
7b14d983e0dce6dcffe9781b05c52335b8203fc7
[ "Apache-2.0" ]
87
2015-01-13T17:33:40.000Z
2021-11-09T05:30:36.000Z
# Copyright 2018 Fujitsu. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
45.703125
78
0.669402
# Copyright 2018 Fujitsu. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
0
0
0
2,182
0
0
0
50
89
15f0edc364933154a2544a8fde7c9ea93ea09e27
5,933
py
Python
ftl/data_manager/federated_data_manager.py
microsoft/OpenMSFTL
0d18ceaf6f9a7859c7f4124ecf41ded5ffe3b03e
[ "MIT" ]
8
2020-09-07T08:20:39.000Z
2022-03-04T21:20:06.000Z
ftl/data_manager/federated_data_manager.py
microsoft/OpenMSFTL
0d18ceaf6f9a7859c7f4124ecf41ded5ffe3b03e
[ "MIT" ]
1
2020-11-06T20:14:37.000Z
2020-11-06T20:14:37.000Z
ftl/data_manager/federated_data_manager.py
microsoft/OpenMSFTL
0d18ceaf6f9a7859c7f4124ecf41ded5ffe3b03e
[ "MIT" ]
3
2020-10-21T01:15:13.000Z
2021-11-10T11:23:47.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License
45.992248
114
0.612169
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License from ftl.agents import Client, Server from ftl.training_utils import cycle from torchvision import datasets from torch.utils.data import DataLoader, Subset import torch import numpy as np from typing import Dict, List class DataManager: """ ...
0
470
0
5,148
0
0
0
64
178
a71252621d3fc9836134cc749733262b3a6efbd5
5,686
py
Python
botlist.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
botlist.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
botlist.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Allows access to the site's bot user list. The function refresh() downloads the current bot user list and saves it to disk. It is run automatically when a bot first tries to get this data. """ # (C) Daniel Herding, 2005 # (C) Dr. Trigon, 2009-2010 # (C) Pywikipedia bot team, 2010-2012 # # ...
31.765363
101
0.563313
# -*- coding: utf-8 -*- """ Allows access to the site's bot user list. The function refresh() downloads the current bot user list and saves it to disk. It is run automatically when a bot first tries to get this data. """ # (C) Daniel Herding, 2005 # (C) Dr. Trigon, 2009-2010 # (C) Pywikipedia bot team, 2010-2012 # # ...
0
0
0
0
0
3,242
0
-16
180
be27dc717f95dfa134a4a0eb6d9557499ae498f7
6,841
py
Python
tx2-setup/slam_front_end/tools/evaluate_communication.py
SnowCarter/DOOR-SLAM
cf56d2b4b7a21ed7c6445f01600408c9dd5235c6
[ "MIT" ]
null
null
null
tx2-setup/slam_front_end/tools/evaluate_communication.py
SnowCarter/DOOR-SLAM
cf56d2b4b7a21ed7c6445f01600408c9dd5235c6
[ "MIT" ]
null
null
null
tx2-setup/slam_front_end/tools/evaluate_communication.py
SnowCarter/DOOR-SLAM
cf56d2b4b7a21ed7c6445f01600408c9dd5235c6
[ "MIT" ]
null
null
null
import numpy as np path = '/Users/benjaminramtoula/Documents/Cours/POLYMTL/MISTLAB/SLAM/decentralized_slam_project/logs/' dir = '2019-08-22_11-43-20_0.13_20/' timestamps_combined = [] nb_kf_used = [] data_exchanged_f_m_q = [] data_exchanged_f_m_a = [] data_exchanged_r_s_q = [] with open(path+dir+'find_matches_query....
41.713415
144
0.701944
import numpy as np path = '/Users/benjaminramtoula/Documents/Cours/POLYMTL/MISTLAB/SLAM/decentralized_slam_project/logs/' dir = '2019-08-22_11-43-20_0.13_20/' timestamps_combined = [] nb_kf_used = [] data_exchanged_f_m_q = [] data_exchanged_f_m_a = [] data_exchanged_r_s_q = [] with open(path+dir+'find_matches_query....
0
0
0
0
0
0
0
-11
22
e031010d543bf826ac8114631a830f1bd61cd022
848
py
Python
django_rq_email_backend/tasks.py
jefftriplett/django-rq-email-backend
674e48ab086d31ea5837fc12dd267c3b20d0fab1
[ "BSD-3-Clause" ]
10
2015-01-25T22:11:51.000Z
2021-01-06T07:07:59.000Z
django_rq_email_backend/tasks.py
jefftriplett/django-rq-email-backend
674e48ab086d31ea5837fc12dd267c3b20d0fab1
[ "BSD-3-Clause" ]
null
null
null
django_rq_email_backend/tasks.py
jefftriplett/django-rq-email-backend
674e48ab086d31ea5837fc12dd267c3b20d0fab1
[ "BSD-3-Clause" ]
4
2015-05-11T16:34:37.000Z
2018-09-26T17:38:39.000Z
import logging from django.conf import settings RQ_EMAIL_DEFAULT_QUEUE = getattr(settings, 'RQ_EMAIL_DEFAULT_QUEUE', 'default') RQ_EMAIL_BACKEND = getattr(settings, 'RQ_EMAIL_BACKEND', 'django.core.mail.backends.smtp.EmailBackend') logger = logging.getLogger(__name__)
32.615385
83
0.695755
import logging from django.conf import settings from django.core.mail import get_connection from django_rq import job RQ_EMAIL_DEFAULT_QUEUE = getattr(settings, 'RQ_EMAIL_DEFAULT_QUEUE', 'default') RQ_EMAIL_BACKEND = getattr(settings, 'RQ_EMAIL_BACKEND', 'django.core.mail.backends.smtp.Ema...
0
455
0
0
0
0
0
26
67