hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
26529381c9bc11a892e3213d940993c4f1d4dd75
1,640
py
Python
src/feature vector creation/step8_cohort_info.py
arjun-parthi/SSRI-Project
62f610a594e5849ccf0f3c25cd6adcd63888ec2a
[ "MIT" ]
2
2019-02-12T00:37:37.000Z
2021-03-25T05:40:06.000Z
src/feature vector creation/step8_cohort_info.py
arjun-parthi/SSRI-Project
62f610a594e5849ccf0f3c25cd6adcd63888ec2a
[ "MIT" ]
null
null
null
src/feature vector creation/step8_cohort_info.py
arjun-parthi/SSRI-Project
62f610a594e5849ccf0f3c25cd6adcd63888ec2a
[ "MIT" ]
1
2021-03-25T05:40:17.000Z
2021-03-25T05:40:17.000Z
import pandas as pd import numpy as np file1 = '../data/FV2.xlsx' x1 = pd.ExcelFile(file1) feature = x1.parse('Sheet1') print(feature.shape) file2 = '../data/AP_SSRI_PD_PAIN.xlsx' x2 = pd.ExcelFile(file2) cohort1 = x2.parse('Sheet1') print(cohort1.shape) cohort1 = cohort1.drop(['CLASSIFICATION'], axis=1) cohort1 = coh...
30.37037
65
0.739024
import pandas as pd import numpy as np file1 = '../data/FV2.xlsx' x1 = pd.ExcelFile(file1) feature = x1.parse('Sheet1') print(feature.shape) file2 = '../data/AP_SSRI_PD_PAIN.xlsx' x2 = pd.ExcelFile(file2) cohort1 = x2.parse('Sheet1') print(cohort1.shape) cohort1 = cohort1.drop(['CLASSIFICATION'], axis=1) cohort1 = coh...
0
0
0
6c9016cbcaafc84499d7de226e600a95500dc5c0
1,343
py
Python
fleetai-training/fleetai/ppo/AgentBase.py
abhaybd/Fleet-AI
325d7c54dae7744b4a74d2da32a43454c993d71f
[ "MIT" ]
3
2021-09-06T15:08:53.000Z
2021-09-13T01:05:53.000Z
fleetai-training/fleetai/ppo/AgentBase.py
abhaybd/Fleet-AI
325d7c54dae7744b4a74d2da32a43454c993d71f
[ "MIT" ]
null
null
null
fleetai-training/fleetai/ppo/AgentBase.py
abhaybd/Fleet-AI
325d7c54dae7744b4a74d2da32a43454c993d71f
[ "MIT" ]
null
null
null
import torch
23.561404
61
0.61653
import torch class AgentBase(object): def __init__(self, *args): self.init_args = args self._total_it = torch.tensor([0], dtype=torch.int64) self._shared_memory = [self._total_it] @property def total_it(self): return self._total_it.item() @total_it.setter def tota...
891
415
23
d5caa76a6b5772b51a51975e3431c014ec00ddc5
7,568
py
Python
modularity/GirvanNewman.py
peterwinter/boxcluster
079452dd029a45390f0347e22df3fce048210389
[ "MIT" ]
1
2016-11-14T22:23:25.000Z
2016-11-14T22:23:25.000Z
modularity/GirvanNewman.py
peterwinter/boxcluster
079452dd029a45390f0347e22df3fce048210389
[ "MIT" ]
null
null
null
modularity/GirvanNewman.py
peterwinter/boxcluster
079452dd029a45390f0347e22df3fce048210389
[ "MIT" ]
null
null
null
#! /usr/bin/env python """ Implementation of the GirvanNewman algorithm for finding the best modularity in a network """ import copy import random import networkx as nx from .base import modularity from .base import largest_connected # def get_protected_edges(G, similar_sets): # protected_edges = [] # for ...
32.62069
80
0.637817
#! /usr/bin/env python """ Implementation of the GirvanNewman algorithm for finding the best modularity in a network """ import copy import random import networkx as nx from .base import modularity from .base import largest_connected def get_graph(filename): G = nx.Graph() f = open(filename) data = f.read...
6,802
0
207
cb56e2e991646f35151e36f241cb42b711fa8f72
1,314
py
Python
backend/company/migrations/0004_auto_20211128_2356.py
mahanfarzaneh2000/ProjeTor
bf21d2cfcd64552c8be5d97eb4ac1c7c3f7d9ca9
[ "Apache-2.0" ]
null
null
null
backend/company/migrations/0004_auto_20211128_2356.py
mahanfarzaneh2000/ProjeTor
bf21d2cfcd64552c8be5d97eb4ac1c7c3f7d9ca9
[ "Apache-2.0" ]
null
null
null
backend/company/migrations/0004_auto_20211128_2356.py
mahanfarzaneh2000/ProjeTor
bf21d2cfcd64552c8be5d97eb4ac1c7c3f7d9ca9
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-28 20:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
39.818182
140
0.644597
# Generated by Django 3.2.8 on 2021-11-28 20:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('company', '0003_alter_co...
0
1,134
23
5b6e7549de71ac68ee52bffa15a9c142ec30e9af
314
py
Python
src/imhist.py
Mamdasn/imhist
21ce6a420cb920801675032916ec8139d525a1f1
[ "MIT" ]
null
null
null
src/imhist.py
Mamdasn/imhist
21ce6a420cb920801675032916ec8139d525a1f1
[ "MIT" ]
null
null
null
src/imhist.py
Mamdasn/imhist
21ce6a420cb920801675032916ec8139d525a1f1
[ "MIT" ]
null
null
null
import numpy as np
24.153846
78
0.611465
import numpy as np def imhist(image, PMF=False): hist, _ = np.histogram(image.copy().reshape(-1), bins=256, range=(0, 255)) if PMF: size = np.prod(image.shape) hist = hist / size return hist def imcdf(image): hist = imhist(image, PMF=True) cdf = np.cumsum(hist) return cdf
250
0
45
d522918719c848e139191400a0e4af080f69264b
18,084
py
Python
messageslog/messageslog.py
skylarr1227/Fixator10-Cogs
cef6b2e51d8c400b0462cfcf44b637275d3780d3
[ "MIT" ]
null
null
null
messageslog/messageslog.py
skylarr1227/Fixator10-Cogs
cef6b2e51d8c400b0462cfcf44b637275d3780d3
[ "MIT" ]
null
null
null
messageslog/messageslog.py
skylarr1227/Fixator10-Cogs
cef6b2e51d8c400b0462cfcf44b637275d3780d3
[ "MIT" ]
null
null
null
import logging from datetime import datetime, timezone from pprint import pformat from typing import Union import discord from redbot.core import checks, commands from redbot.core.config import Config from redbot.core.i18n import Translator, cog_i18n, set_contextual_locales_from_guild from redbot.core.utils import Asy...
42.055814
99
0.599536
import logging from datetime import datetime, timezone from pprint import pformat from typing import Union import discord from redbot.core import checks, commands from redbot.core.config import Config from redbot.core.i18n import Translator, cog_i18n, set_contextual_locales_from_guild from redbot.core.utils import Asy...
8,943
0
184
430402a570807a7c410cc233e4c607900b4c2399
10,499
py
Python
T181/test.py
krish232002/Hackathon_5.0
78006c04aa902297649487d351c1ae33bac88b00
[ "MIT" ]
null
null
null
T181/test.py
krish232002/Hackathon_5.0
78006c04aa902297649487d351c1ae33bac88b00
[ "MIT" ]
null
null
null
T181/test.py
krish232002/Hackathon_5.0
78006c04aa902297649487d351c1ae33bac88b00
[ "MIT" ]
null
null
null
try: import tkinter as tk # for Python 3 except: import Tkinter as tk # for Python 2.7 import time # Initializing some global variables # Initial time range for work time (standard 25 min) workingTime = 10 # 25 * 60 # Short break time (5 min) shortBreakTime = 5 # 5 * 60 # Long break time (15 m...
44.676596
124
0.534527
try: import tkinter as tk # for Python 3 except: import Tkinter as tk # for Python 2.7 import time # Initializing some global variables # Initial time range for work time (standard 25 min) workingTime = 10 # 25 * 60 # Short break time (5 min) shortBreakTime = 5 # 5 * 60 # Long break time (15 m...
7,758
2,017
209
14d2486479743fd8379a4b54ab6f4033569b7793
1,138
py
Python
tools/graph_bag/scripts/multiprocessing_helpers.py
jdekarske/astrobee
c882f9f39719487770bbe7c7322d2ca7f71a1272
[ "Apache-2.0" ]
1
2021-11-11T17:13:32.000Z
2021-11-11T17:13:32.000Z
tools/graph_bag/scripts/multiprocessing_helpers.py
LesterCovax/astrobee
608f6688c6f6088f1357fed9e68b45d68bc9ee2d
[ "Apache-2.0" ]
4
2021-08-01T17:13:15.000Z
2022-03-31T14:23:03.000Z
tools/graph_bag/scripts/multiprocessing_helpers.py
LesterCovax/astrobee
608f6688c6f6088f1357fed9e68b45d68bc9ee2d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # # All rights reserved. # # The Astrobee platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with the # Li...
34.484848
75
0.740773
# Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # # All rights reserved. # # The Astrobee platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with the # Li...
272
0
22
00b3efd32e94b4f267f1d0ba766d277c8f7a9e68
543
py
Python
apps/account/forms.py
CesarAugusto88/confidence_chronogram
9676dbefa8b742e1ef192292c71e7d00e044cbbe
[ "MIT" ]
null
null
null
apps/account/forms.py
CesarAugusto88/confidence_chronogram
9676dbefa8b742e1ef192292c71e7d00e044cbbe
[ "MIT" ]
6
2020-06-05T22:03:12.000Z
2022-03-12T00:49:29.000Z
apps/account/forms.py
CesarAugusto88/confidence_chronogram
9676dbefa8b742e1ef192292c71e7d00e044cbbe
[ "MIT" ]
1
2020-09-08T20:24:29.000Z
2020-09-08T20:24:29.000Z
from django import forms from apps.confidencechronograms.models import Cliente, Funcionario
28.578947
83
0.585635
from django import forms from apps.confidencechronograms.models import Cliente, Funcionario class ClienteForm(forms.ModelForm): class Meta: model = Cliente fields = ( 'nome', 'endereco', 'razao_social', 'tipo_pessoa', 'cpf_cnpj', 'rg_ie', 'cep', 'uf', 'email', 'fone1', 'us...
0
404
46
d2c1b0c330dc27d3e9aa1253fefc2da3e7af32cb
7,284
py
Python
ikibardin/cresi-spacenet/cresi/02_eval.py
SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions
3fbc215de6b05904a5b54b2c7cde7e61074ae38d
[ "Apache-2.0" ]
27
2020-03-04T05:54:48.000Z
2022-01-05T07:07:44.000Z
ikibardin/cresi-spacenet/cresi/02_eval.py
CosmiQ/SpaceNet_Optimized_Routing_Solutions
3fbc215de6b05904a5b54b2c7cde7e61074ae38d
[ "Apache-2.0" ]
1
2020-07-14T10:35:50.000Z
2020-07-14T10:35:50.000Z
ikibardin/cresi-spacenet/cresi/02_eval.py
SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions
3fbc215de6b05904a5b54b2c7cde7e61074ae38d
[ "Apache-2.0" ]
7
2020-03-07T21:42:57.000Z
2022-01-07T10:49:50.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat May 5 02:18:38 2018 @author: avanetten Adapted from: https://github.com/SpaceNetChallenge/RoadDetector/tree/master/albu-solution """ import time import cv2 cv2.setNumThreads(0) cv2.ocl.setUseOpenCL(False) import os import numpy as np #import shutil...
40.021978
112
0.613811
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat May 5 02:18:38 2018 @author: avanetten Adapted from: https://github.com/SpaceNetChallenge/RoadDetector/tree/master/albu-solution """ import time import cv2 cv2.setNumThreads(0) cv2.ocl.setUseOpenCL(False) import os import numpy as np #import shutil...
1,345
59
44
4adeaa7f9a655d60c1fc9882a76d70fd7208fcae
15,516
py
Python
trainmvs.py
zhangyu233/mvscode
883b2ba1a2ed61198a331f83d5ec7813b7204ef3
[ "MIT" ]
null
null
null
trainmvs.py
zhangyu233/mvscode
883b2ba1a2ed61198a331f83d5ec7813b7204ef3
[ "MIT" ]
null
null
null
trainmvs.py
zhangyu233/mvscode
883b2ba1a2ed61198a331f83d5ec7813b7204ef3
[ "MIT" ]
null
null
null
import sys import os import torch import torch.distributed as dist import torch.nn as nn import warnings import torch.distributed import numpy as np import random import faulthandler import torch.multiprocessing as mp import time import scipy.misc from models.networks import MvsFlow from torch import optim import argpa...
45.905325
143
0.637084
import sys import os import torch import torch.distributed as dist import torch.nn as nn import warnings import torch.distributed import numpy as np import random import faulthandler import torch.multiprocessing as mp import time import scipy.misc from models.networks import MvsFlow from torch import optim import argpa...
11,286
0
46
4273c20c831a3850f90bd3d69c5069140d64b31d
1,793
py
Python
saleor/checkout/calculations.py
StnxCld/core
6919155bf59f24497cf1feafc52713400f408e1b
[ "CC-BY-4.0" ]
2
2022-01-15T12:31:49.000Z
2022-02-05T19:28:52.000Z
saleor/checkout/calculations.py
StnxCld/core
6919155bf59f24497cf1feafc52713400f408e1b
[ "CC-BY-4.0" ]
13
2021-03-19T02:54:47.000Z
2022-03-12T00:36:26.000Z
saleor/checkout/calculations.py
StnxCld/core
6919155bf59f24497cf1feafc52713400f408e1b
[ "CC-BY-4.0" ]
1
2021-04-09T10:26:49.000Z
2021-04-09T10:26:49.000Z
from typing import TYPE_CHECKING, Iterable, Optional from ..discount import DiscountInfo from ..plugins.manager import get_plugins_manager if TYPE_CHECKING: from prices import TaxedMoney from .models import Checkout, CheckoutLine def checkout_shipping_price( *, checkout: "Checkout", lines: Itera...
26.761194
85
0.696598
from typing import TYPE_CHECKING, Iterable, Optional from ..discount import DiscountInfo from ..plugins.manager import get_plugins_manager if TYPE_CHECKING: from prices import TaxedMoney from .models import Checkout, CheckoutLine def checkout_shipping_price( *, checkout: "Checkout", lines: Itera...
0
0
0
5fe405427aa22434c16f4d29bb95e78fb670f42e
187
py
Python
__init__.py
brandentimm/pydagman
5b1045652fc9fdb059dd3504a68636d1a8562cb2
[ "MIT" ]
5
2016-01-04T18:12:18.000Z
2021-09-01T05:15:04.000Z
__init__.py
brandentimm/pydagman
5b1045652fc9fdb059dd3504a68636d1a8562cb2
[ "MIT" ]
null
null
null
__init__.py
brandentimm/pydagman
5b1045652fc9fdb059dd3504a68636d1a8562cb2
[ "MIT" ]
3
2016-01-04T18:18:10.000Z
2017-07-13T12:55:34.000Z
""" pydagman: A package for creating DAGman files ..moduleauthor:: Branden Timm <branden.timm@gmail.com> Classes: Dagfile: Represents a DAGman file Job: Represents a DAGman Condor job """
26.714286
54
0.770053
""" pydagman: A package for creating DAGman files ..moduleauthor:: Branden Timm <branden.timm@gmail.com> Classes: Dagfile: Represents a DAGman file Job: Represents a DAGman Condor job """
0
0
0
161b9a71e5cfca5b991e48e0da4bcd5f97d6fe48
3,197
py
Python
core/libdeno/build/chromeos/create_test_runner_script.py
shadowkun/denotf
76d8cb8a66ca533c08939fd53c98fb63247129f0
[ "MIT" ]
null
null
null
core/libdeno/build/chromeos/create_test_runner_script.py
shadowkun/denotf
76d8cb8a66ca533c08939fd53c98fb63247129f0
[ "MIT" ]
null
null
null
core/libdeno/build/chromeos/create_test_runner_script.py
shadowkun/denotf
76d8cb8a66ca533c08939fd53c98fb63247129f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates a script that runs a CrOS VM test by delegating to build/chromeos/test_runner.py. """ import argparse import os import sy...
26.641667
80
0.682828
#!/usr/bin/env python # # Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates a script that runs a CrOS VM test by delegating to build/chromeos/test_runner.py. """ import argparse import os import sy...
2,132
0
23
1ef8f3125ab60319d8d191a58d8cce721097f71f
2,169
py
Python
hendrics/rebin.py
StingraySoftware/HENDRICS
551a77fc42b16055da5bfd37701521655394b80b
[ "BSD-3-Clause" ]
18
2017-08-15T17:20:31.000Z
2021-12-24T13:33:10.000Z
hendrics/rebin.py
StingraySoftware/HENDRICS
551a77fc42b16055da5bfd37701521655394b80b
[ "BSD-3-Clause" ]
118
2017-08-11T13:48:32.000Z
2022-03-31T12:30:03.000Z
hendrics/rebin.py
StingraySoftware/HENDRICS
551a77fc42b16055da5bfd37701521655394b80b
[ "BSD-3-Clause" ]
11
2017-08-11T13:43:12.000Z
2021-09-18T07:34:10.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions to rebin light curves and frequency spectra.""" import numpy as np from astropy import log from .io import get_file_type from .io import save_lcurve, save_pds from .io import HEN_FILE_EXTENSION, get_file_extension def rebin_file(filename, r...
30.549296
77
0.651913
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions to rebin light curves and frequency spectra.""" import numpy as np from astropy import log from .io import get_file_type from .io import save_lcurve, save_pds from .io import HEN_FILE_EXTENSION, get_file_extension def rebin_file(filename, r...
0
0
0
d33a8ecab964f942f6337193b62268a7984935fa
850
py
Python
examples/basic/carcrash.py
jtpils/vtkplotter
fbed73d6ed3f049dca3421c64e2e82ac1eef69a8
[ "MIT" ]
7
2020-11-21T14:23:27.000Z
2022-03-03T02:01:35.000Z
examples/basic/carcrash.py
jtpils/vtkplotter
fbed73d6ed3f049dca3421c64e2e82ac1eef69a8
[ "MIT" ]
null
null
null
examples/basic/carcrash.py
jtpils/vtkplotter
fbed73d6ed3f049dca3421c64e2e82ac1eef69a8
[ "MIT" ]
2
2021-11-06T10:40:31.000Z
2022-03-03T02:01:34.000Z
""" Make a textured floor, a lamp post, and load a mesh of a car make copies of the car, rotate and move them in a loop. """ from __future__ import division, print_function from vtkplotter import Plotter, Plane, Text, datadir vp = Plotter(interactive=0, axes=0) vp += Plane(pos=(4, 0, -0.45), sx=12).texture("metalfloo...
31.481481
62
0.655294
""" Make a textured floor, a lamp post, and load a mesh of a car make copies of the car, rotate and move them in a loop. """ from __future__ import division, print_function from vtkplotter import Plotter, Plane, Text, datadir vp = Plotter(interactive=0, axes=0) vp += Plane(pos=(4, 0, -0.45), sx=12).texture("metalfloo...
0
0
0
e5a63df630f124f73e1814be430aedd4d1d212c7
841
py
Python
validation/sage_gain_compare.py
ArgoCanada/BGC-QC
c058f3e1a1992fc961ce2c4d5862d426725c1e43
[ "MIT" ]
3
2020-11-30T14:49:43.000Z
2022-02-08T17:23:36.000Z
validation/sage_gain_compare.py
ArgoCanada/bgcArgoDMQC
513b05729e605eed2cd9dafe9aef6260f577a0b5
[ "MIT" ]
32
2020-11-11T16:00:04.000Z
2022-02-23T18:59:48.000Z
validation/sage_gain_compare.py
ArgoCanada/bgcArgoDMQC
513b05729e605eed2cd9dafe9aef6260f577a0b5
[ "MIT" ]
1
2020-08-30T02:40:33.000Z
2020-08-30T02:40:33.000Z
#!/usr/bin/python from pathlib import Path import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from bgcArgo import sprof, profiles sns.set(context='paper', style='whitegrid', palette='colorblind') sage_path = Path('/Users/gordonc/Documents/data/Argo/sage/') sage_files = lis...
28.033333
108
0.681332
#!/usr/bin/python from pathlib import Path import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from bgcArgo import sprof, profiles sns.set(context='paper', style='whitegrid', palette='colorblind') sage_path = Path('/Users/gordonc/Documents/data/Argo/sage/') sage_files = lis...
0
0
0
18b7db44a1943e2dda8dd2866a2e464ed4098900
3,363
py
Python
Algorithms/Search/Medium/003_Intersections_in_a_Maze.py
o-silva-1/HackerRank
be5241c1439e7ed54fe4a1847984a9ac79c6e2a9
[ "MIT" ]
null
null
null
Algorithms/Search/Medium/003_Intersections_in_a_Maze.py
o-silva-1/HackerRank
be5241c1439e7ed54fe4a1847984a9ac79c6e2a9
[ "MIT" ]
null
null
null
Algorithms/Search/Medium/003_Intersections_in_a_Maze.py
o-silva-1/HackerRank
be5241c1439e7ed54fe4a1847984a9ac79c6e2a9
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/count-luck/problem # Count the number of intersections in the correct path of a maze countLuck(['.X.X......X', '.X*.X.XXX.X', '.XX.X.XM...', '......XXXX.'], 3)
37.366667
125
0.529289
# https://www.hackerrank.com/challenges/count-luck/problem # Count the number of intersections in the correct path of a maze def countLuck(matrix, k): # Get the start and the end coordinates for y, row in enumerate(matrix): if row.__contains__('M'): start = (row.index('M'), y) if r...
3,138
0
22
53f575257a973520706b11622d48b5073691457c
1,752
py
Python
sax.py
MeNsaaH/movie-player-pyqt5
d156af176caeb31a9196709e69f67bd357048e78
[ "MIT" ]
null
null
null
sax.py
MeNsaaH/movie-player-pyqt5
d156af176caeb31a9196709e69f67bd357048e78
[ "MIT" ]
null
null
null
sax.py
MeNsaaH/movie-player-pyqt5
d156af176caeb31a9196709e69f67bd357048e78
[ "MIT" ]
null
null
null
from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtXml import * from moviedata import * class SaxMovieHandler(QXmlDefaultHandler): """docstring for SaxMovieHandler"""
30.206897
134
0.696347
from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtXml import * from moviedata import * class SaxMovieHandler(QXmlDefaultHandler): """docstring for SaxMovieHandler""" def __init__(self, movies): super(SaxMovieHandler, self).__init__() self.movies = movies self.text...
1,392
0
143
918797d59403b359bd9b973927b61a95adf55ed2
2,216
py
Python
examples/adspygoogle/dfp/v201204/deactivate_labels.py
krux/adspygoogle
6505a71122f45fe3e675f27f2c29f67a1768069b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
examples/adspygoogle/dfp/v201204/deactivate_labels.py
krux/adspygoogle
6505a71122f45fe3e675f27f2c29f67a1768069b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
examples/adspygoogle/dfp/v201204/deactivate_labels.py
krux/adspygoogle
6505a71122f45fe3e675f27f2c29f67a1768069b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
33.074627
80
0.698556
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
0
0
0
0311e5780176808905b69011071b7823d9be4b79
509
py
Python
moviebase/movielist/migrations/0002_auto_20190303_0918.py
Gordi91/moviebase
748969b6a8a2eda131eb17cf73fd6469e49d6c79
[ "MIT" ]
null
null
null
moviebase/movielist/migrations/0002_auto_20190303_0918.py
Gordi91/moviebase
748969b6a8a2eda131eb17cf73fd6469e49d6c79
[ "MIT" ]
null
null
null
moviebase/movielist/migrations/0002_auto_20190303_0918.py
Gordi91/moviebase
748969b6a8a2eda131eb17cf73fd6469e49d6c79
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-03-03 09:18 from django.db import migrations, models import django.db.models.deletion
25.45
148
0.650295
# Generated by Django 2.1.7 on 2019-03-03 09:18 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('movielist', '0001_initial'), ] operations = [ migrations.AlterField( model_name='movie', ...
0
362
23
52c7fdb2a95ac1bc630c1e52e5ce442a905c0c27
306
py
Python
tests/test_methods/test_views.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
2
2020-09-24T00:07:13.000Z
2020-09-27T19:27:06.000Z
tests/test_methods/test_views.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
null
null
null
tests/test_methods/test_views.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*-
17
35
0.75817
# -*- coding: utf-8 -*- def test_views_open(slack_time): assert slack_time.views.open def test_views_publish(slack_time): assert slack_time.views.publish def test_views_push(slack_time): assert slack_time.views.push def test_views_update(slack_time): assert slack_time.views.update
186
0
92
920702d54e9dab9595b95edcb02c841583a72e78
5,471
py
Python
test/test_sentry.py
etcher-be/elib
d964e683dcea1b3e55e7860a99f7913f248e6dc0
[ "MIT" ]
null
null
null
test/test_sentry.py
etcher-be/elib
d964e683dcea1b3e55e7860a99f7913f248e6dc0
[ "MIT" ]
32
2020-03-24T16:22:49.000Z
2021-01-04T12:25:27.000Z
test/test_sentry.py
theendsofinvention/elib
d964e683dcea1b3e55e7860a99f7913f248e6dc0
[ "MIT" ]
null
null
null
# coding=utf-8 import sys import raven import raven.breadcrumbs from mockito import ANY, mock, verify, verifyStubbedInvocationsAreUsed, when from elib.sentry import Sentry, SentryContext class DummyContext(SentryContext): """ Dummy testing context """ string = 'string' integer = 1
31.624277
94
0.694023
# coding=utf-8 import sys import raven import raven.breadcrumbs from mockito import ANY, mock, verify, verifyStubbedInvocationsAreUsed, when from elib.sentry import Sentry, SentryContext class DummyContext(SentryContext): """ Dummy testing context """ string = 'string' integer = 1 def test_in...
4,852
0
299
5d14067311d9031ec0d3e07a3ebeece7425a1dc2
1,111
py
Python
whistlepy/client/api/post.py
atuple/whistlepy
53343c2350601804ef5241829b14d7b35693cc91
[ "MIT" ]
2
2018-01-20T15:07:36.000Z
2018-03-05T09:36:12.000Z
whistlepy/client/api/post.py
atuple/whistlepy
53343c2350601804ef5241829b14d7b35693cc91
[ "MIT" ]
null
null
null
whistlepy/client/api/post.py
atuple/whistlepy
53343c2350601804ef5241829b14d7b35693cc91
[ "MIT" ]
null
null
null
from whistlepy.client.api.base import BaseWhistleAPI
23.145833
82
0.560756
from whistlepy.client.api.base import BaseWhistleAPI class WhistlePostApi(BaseWhistleAPI): API_PATH_URL = "api/v2/index.php/post/" def get_list(self): """ 岗位列表 第三方应用服务器通过本方法获取学校的岗位列表。 详情请参考 http://open.weishao.com.cn/doc/api#zzs :return: 返回的 JSON 数据包 ...
0
1,230
23
d578a335ede20642ceed73d42d5701928b1e5ba2
1,371
py
Python
vtkplotter_examples/basic/closewindow.py
ismarou/vtkplotter-examples
1eefcc026be169ab7a77a5bce6dec8044c33b554
[ "MIT" ]
4
2020-07-30T02:38:29.000Z
2021-09-12T14:30:18.000Z
vtkplotter_examples/basic/closewindow.py
ismarou/vtkplotter-examples
1eefcc026be169ab7a77a5bce6dec8044c33b554
[ "MIT" ]
null
null
null
vtkplotter_examples/basic/closewindow.py
ismarou/vtkplotter-examples
1eefcc026be169ab7a77a5bce6dec8044c33b554
[ "MIT" ]
null
null
null
"""Closing the Rendering Window Press q: Control returns to terminal, window will not close but become unresponsive""" from vtkplotter import Text, Paraboloid, Hyperboloid, Plotter, show mesh = Paraboloid() vp1 = show(mesh, Text2D(__doc__), title='First Plotter instance') # Now press 'q' to exit the window interact...
29.804348
88
0.681984
"""Closing the Rendering Window Press q: Control returns to terminal, window will not close but become unresponsive""" from vtkplotter import Text, Paraboloid, Hyperboloid, Plotter, show mesh = Paraboloid() vp1 = show(mesh, Text2D(__doc__), title='First Plotter instance') # Now press 'q' to exit the window interact...
0
0
0
729174aec9741dcacc897522f1b1a23923fe0bd7
38,928
py
Python
apps/xformmanager/storageutility.py
commtrack/commtrack-old-to-del
cc9c22754ac192a45483cef609bdcf09aa990340
[ "BSD-3-Clause" ]
1
2017-05-19T07:23:00.000Z
2017-05-19T07:23:00.000Z
apps/xformmanager/storageutility.py
commtrack/commtrack-old-to-del
cc9c22754ac192a45483cef609bdcf09aa990340
[ "BSD-3-Clause" ]
null
null
null
apps/xformmanager/storageutility.py
commtrack/commtrack-old-to-del
cc9c22754ac192a45483cef609bdcf09aa990340
[ "BSD-3-Clause" ]
null
null
null
""" Given an xform definition, storageutility generates dynamic data tables. Given an xml instance, storeagutility populates the data tables. Basically, storageutility abstracts away all interaction with the database, and it only knows about the data structures in xformdef.py """ import re import os import sys impor...
46.177936
225
0.60802
""" Given an xform definition, storageutility generates dynamic data tables. Given an xml instance, storeagutility populates the data tables. Basically, storageutility abstracts away all interaction with the database, and it only knows about the data structures in xformdef.py """ import re import os import sys impor...
19,342
0
964
1cd21d1f5fcde5c759532d312f7a6fc47b4b9e3d
683
py
Python
1684_num_consistent_strings.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
1
2020-07-15T14:16:23.000Z
2020-07-15T14:16:23.000Z
1684_num_consistent_strings.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
null
null
null
1684_num_consistent_strings.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
null
null
null
# # 1684. Count the Number of Consistent Strings # # Q: https://leetcode.com/problems/count-the-number-of-consistent-strings/ # A: https://leetcode.com/problems/count-the-number-of-consistent-strings/discuss/969513/Kt-Js-Py3-Cpp-1-Liners # from typing import List # 1-liner # verbose
29.695652
111
0.647145
# # 1684. Count the Number of Consistent Strings # # Q: https://leetcode.com/problems/count-the-number-of-consistent-strings/ # A: https://leetcode.com/problems/count-the-number-of-consistent-strings/discuss/969513/Kt-Js-Py3-Cpp-1-Liners # from typing import List # 1-liner class Solution: def countConsistentStrin...
312
-12
96
0d97eb0fcacd709533ab71a5192a0cc5c8592d98
2,749
py
Python
app/webapp.py
smuggy/webapp
4fa62af5788157be171bf457a8e1a9b617057c78
[ "MIT" ]
null
null
null
app/webapp.py
smuggy/webapp
4fa62af5788157be171bf457a8e1a9b617057c78
[ "MIT" ]
1
2021-06-02T00:37:38.000Z
2021-06-02T00:37:38.000Z
app/webapp.py
smuggy/webapp
4fa62af5788157be171bf457a8e1a9b617057c78
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # import os import time from redis import Redis from flask import Flask from flask import make_response from flask import render_template from flask import request from flask import Response from datetime import datetime import requests appcontainer = Flask(__name__) vals = gen() app_versi...
23.29661
99
0.628956
#!/usr/bin/env python3 # # import os import time from redis import Redis from flask import Flask from flask import make_response from flask import render_template from flask import request from flask import Response from datetime import datetime import requests def gen(): start_val = 100 inc = 1 curr = 1...
1,809
0
222
ad55ded943d4be3f70056d74688818fa7a00800e
1,915
py
Python
DrugBot/line/intent/Loki_color.py
Lanlanluuu/LokiHub
aae3efb566d2383e78eaa8dc1e8b3f1bb097f2a6
[ "MIT" ]
17
2020-11-25T07:40:18.000Z
2022-03-07T03:29:18.000Z
DrugBot/line/intent/Loki_color.py
Lanlanluuu/LokiHub
aae3efb566d2383e78eaa8dc1e8b3f1bb097f2a6
[ "MIT" ]
8
2020-12-18T13:23:59.000Z
2021-10-03T21:41:50.000Z
DrugBot/line/intent/Loki_color.py
Lanlanluuu/LokiHub
aae3efb566d2383e78eaa8dc1e8b3f1bb097f2a6
[ "MIT" ]
43
2020-12-02T09:03:57.000Z
2021-12-23T03:30:25.000Z
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ Loki module for color Input: inputSTR str, utterance str, args str[], resultDICT dict Output: resultDICT dict """ DEBUG_color = True userDefinedDICT = {"粉": ["藥粉", "粉末", "粉狀"], "液體": ["液狀物",...
25.533333
92
0.509138
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ Loki module for color Input: inputSTR str, utterance str, args str[], resultDICT dict Output: resultDICT dict """ DEBUG_color = True userDefinedDICT = {"粉": ["藥粉", "粉末", "粉狀"], "液體": ["液狀物",...
1,675
0
45
5d3c9bd08335748f115c481827f7aa7bf986de20
2,702
py
Python
test/units/LambdaApiUserBlocked_test.py
praktikos/praktikos-template-python
324c7640ee05469fba87a7ec64d6ac61675b259e
[ "MIT" ]
null
null
null
test/units/LambdaApiUserBlocked_test.py
praktikos/praktikos-template-python
324c7640ee05469fba87a7ec64d6ac61675b259e
[ "MIT" ]
null
null
null
test/units/LambdaApiUserBlocked_test.py
praktikos/praktikos-template-python
324c7640ee05469fba87a7ec64d6ac61675b259e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import boto3 import requests from api.rdb.config import is_test, is_production from api.rdb.utils.apigateway import get_api_url from api.rdb.utils.service_framework import STATUS_OK, STATUS_NOT_FOUND from ..conftest import get_secure_event from ..utilities import invoke # noinsp...
40.328358
102
0.643597
# -*- coding: utf-8 -*- import json import boto3 import requests from api.rdb.config import is_test, is_production from api.rdb.utils.apigateway import get_api_url from api.rdb.utils.service_framework import STATUS_OK, STATUS_NOT_FOUND from ..conftest import get_secure_event from ..utilities import invoke # noinsp...
2,339
0
22
e2ad50fc65e897c7bb58531e3c8ee48552582d5e
1,525
py
Python
benchmark/graphs.py
Francesco2304/pygfa
9bf6fb5f0a959685300ab863a0e716a2268109f7
[ "MIT" ]
3
2020-06-25T22:47:02.000Z
2022-02-27T15:16:02.000Z
benchmark/graphs.py
Francesco2304/pygfa
9bf6fb5f0a959685300ab863a0e716a2268109f7
[ "MIT" ]
3
2017-08-08T12:24:23.000Z
2022-02-27T15:17:25.000Z
benchmark/graphs.py
Francesco2304/pygfa
9bf6fb5f0a959685300ab863a0e716a2268109f7
[ "MIT" ]
4
2019-02-04T20:54:53.000Z
2020-05-14T19:52:24.000Z
""" Python script to create graphs of the benchmark """ from collections import OrderedDict import matplotlib.pyplot as plt BENCHMARK_NODE = OrderedDict() with open('results/cmp_nodes.txt') as node_method_file: ROWS = node_method_file.readlines() i = 0 for ROW in ROWS: i += 1 ROW = ROW.spl...
26.754386
87
0.665574
""" Python script to create graphs of the benchmark """ from collections import OrderedDict import matplotlib.pyplot as plt BENCHMARK_NODE = OrderedDict() with open('results/cmp_nodes.txt') as node_method_file: ROWS = node_method_file.readlines() i = 0 for ROW in ROWS: i += 1 ROW = ROW.spl...
0
0
0
212584c32f734b89417ac516b4cdfa3f2fb6d987
456
py
Python
src/ext/restapi/__init__.py
kackey0-1/project_ai
8b309eb1e0cbc46e4a9b134adcd0b44e5657f709
[ "MIT" ]
1
2022-02-24T16:24:56.000Z
2022-02-24T16:24:56.000Z
src/ext/restapi/__init__.py
kackey0-1/project_ai
8b309eb1e0cbc46e4a9b134adcd0b44e5657f709
[ "MIT" ]
2
2021-12-27T15:12:09.000Z
2022-02-06T14:14:36.000Z
src/ext/restapi/__init__.py
kackey0-1/project_ai
8b309eb1e0cbc46e4a9b134adcd0b44e5657f709
[ "MIT" ]
null
null
null
from flask import Blueprint from flask_restful import Api from .resources import ImageAiResource from .sentences import SentenceResource, SentenceItemResource bp = Blueprint("restapi", __name__, url_prefix="/api/v1") api = Api(bp)
28.5
67
0.769737
from flask import Blueprint from flask_restful import Api from .resources import ImageAiResource from .sentences import SentenceResource, SentenceItemResource bp = Blueprint("restapi", __name__, url_prefix="/api/v1") api = Api(bp) def init_app(app): api.add_resource(ImageAiResource, "/upload/") api.add_reso...
199
0
23
b06d16aa392bf4194d5e1fa117633f6ddd18d174
508
py
Python
lain_cli/test.py
kaiix/lain-cli
a2e3359355560d3e8cac13a52805618d3b81886a
[ "MIT" ]
null
null
null
lain_cli/test.py
kaiix/lain-cli
a2e3359355560d3e8cac13a52805618d3b81886a
[ "MIT" ]
null
null
null
lain_cli/test.py
kaiix/lain-cli
a2e3359355560d3e8cac13a52805618d3b81886a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys from argh.decorators import arg from lain_cli.utils import lain_yaml from lain_sdk.mydocker import copy_files_from_image @arg('-r', '--results', nargs='*', type=str) def test(results=[]): """ Build test image and run test scripts defined in lain.yaml """ passed, t...
22.086957
62
0.661417
# -*- coding: utf-8 -*- import sys from argh.decorators import arg from lain_cli.utils import lain_yaml from lain_sdk.mydocker import copy_files_from_image @arg('-r', '--results', nargs='*', type=str) def test(results=[]): """ Build test image and run test scripts defined in lain.yaml """ passed, t...
0
0
0
3f493c5eb4f53e158206c7a64d03d1befff2554e
3,189
py
Python
airflow/plugins/operators/code_analyzer/utils/analysis/context.py
teiresias-personal-data-discovery/teiresias-system
50e9d08d6924480f120d2d4f9fbebdc6035a5c5b
[ "MIT" ]
2
2021-09-06T17:32:48.000Z
2022-02-24T19:58:41.000Z
airflow/plugins/operators/code_analyzer/utils/analysis/context.py
teiresias-personal-data-discovery/teiresias-system
50e9d08d6924480f120d2d4f9fbebdc6035a5c5b
[ "MIT" ]
null
null
null
airflow/plugins/operators/code_analyzer/utils/analysis/context.py
teiresias-personal-data-discovery/teiresias-system
50e9d08d6924480f120d2d4f9fbebdc6035a5c5b
[ "MIT" ]
null
null
null
import glob, os from operators.code_analyzer.constants.context import CONTEXT_MAP from operators.code_analyzer.utils.common import get_intersection, flatten, unpack, findall_regex
36.655172
97
0.59423
import glob, os from operators.code_analyzer.constants.context import CONTEXT_MAP from operators.code_analyzer.utils.common import get_intersection, flatten, unpack, findall_regex def get_tool_and_common_context_map(tools, context_type: str) -> dict: context_map: dict = {} for tool in tools: context_...
2,912
0
92
b40103c2847dde6c46b47ffdc81c65586e984815
6,812
py
Python
lib/adversary.py
liuruoze/HierNet-SC2
7abfde0088e90416f11922d67c0f09659c7ecf81
[ "Apache-2.0" ]
2
2022-02-28T08:39:43.000Z
2022-03-03T02:28:23.000Z
lib/adversary.py
liuruoze/HierNet-SC2
7abfde0088e90416f11922d67c0f09659c7ecf81
[ "Apache-2.0" ]
1
2021-08-10T13:38:19.000Z
2021-08-10T13:38:19.000Z
lib/adversary.py
liuruoze/HierNet-SC2
7abfde0088e90416f11922d67c0f09659c7ecf81
[ "Apache-2.0" ]
1
2021-08-12T01:48:08.000Z
2021-08-12T01:48:08.000Z
# https://github.com/andrewliao11/gail-tf # import lib.tf_util as U import tensorflow as tf import numpy as np import lib.layer as layer # ================================================================ # Flat vectors # ================================================================ # ==========================...
45.413333
129
0.611715
# https://github.com/andrewliao11/gail-tf # import lib.tf_util as U import tensorflow as tf import numpy as np import lib.layer as layer # ================================================================ # Flat vectors # ================================================================ def var_shape(x): out = x.g...
5,795
14
300
113c36043092fb3ed7bb4566130cb4880a35f421
5,682
py
Python
life_log/views.py
thelanman/justinlanahan.com
6ff29eb223b042111d9a19a3ac9c80c80b85885e
[ "MIT" ]
null
null
null
life_log/views.py
thelanman/justinlanahan.com
6ff29eb223b042111d9a19a3ac9c80c80b85885e
[ "MIT" ]
null
null
null
life_log/views.py
thelanman/justinlanahan.com
6ff29eb223b042111d9a19a3ac9c80c80b85885e
[ "MIT" ]
null
null
null
import json import math import datetime from django.shortcuts import render, redirect, render_to_response, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import HttpResponse, JsonResponse, Http404 from django.template import RequestContext from django.utils import timezone...
36.658065
114
0.625484
import json import math import datetime from django.shortcuts import render, redirect, render_to_response, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import HttpResponse, JsonResponse, Http404 from django.template import RequestContext from django.utils import timezone...
4,007
855
159
c31eaea490a1bb33cdfb112a35f95721e070cdbc
329
py
Python
unbrake-api/configuration/migrations/0003_remove_config_testing.py
fga-eps-mds/2019.1-Simulador-de-Frenagem
a7452511fa7059121cd9035a7b21f3cd8fec1548
[ "MIT" ]
9
2019-03-23T02:56:08.000Z
2019-08-29T21:32:00.000Z
unbrake-api/configuration/migrations/0003_remove_config_testing.py
fga-eps-mds/2019.1-Simulador-de-Frenagem
a7452511fa7059121cd9035a7b21f3cd8fec1548
[ "MIT" ]
260
2019-03-23T01:07:29.000Z
2022-03-29T16:31:48.000Z
unbrake-api/configuration/migrations/0003_remove_config_testing.py
fga-eps-mds/2019.1-Simulador-de-Frenagem
a7452511fa7059121cd9035a7b21f3cd8fec1548
[ "MIT" ]
2
2019-05-07T03:39:58.000Z
2019-09-09T07:02:11.000Z
# Generated by Django 2.2 on 2019-06-11 02:04 from django.db import migrations
18.277778
49
0.595745
# Generated by Django 2.2 on 2019-06-11 02:04 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('configuration', '0002_config_testing'), ] operations = [ migrations.RemoveField( model_name='config', name='testing', ...
0
225
23
aa87961178260a8cd9ca3af14c7a0617910a4028
3,016
py
Python
examples/plotting/plot_rectangle.py
RhnSharma/sunpy
03700193d287156ca1922eb27c4c2ad50040e53f
[ "BSD-2-Clause" ]
628
2015-01-14T17:34:10.000Z
2022-03-29T06:07:50.000Z
examples/plotting/plot_rectangle.py
RhnSharma/sunpy
03700193d287156ca1922eb27c4c2ad50040e53f
[ "BSD-2-Clause" ]
3,983
2015-01-03T11:16:21.000Z
2022-03-31T16:55:38.000Z
examples/plotting/plot_rectangle.py
RhnSharma/sunpy
03700193d287156ca1922eb27c4c2ad50040e53f
[ "BSD-2-Clause" ]
582
2015-01-14T10:09:24.000Z
2022-03-29T06:07:12.000Z
""" ============================ Drawing a rectangle on a map ============================ This example will demonstrate how to draw a rectangle on a map using :meth:`~sunpy.map.GenericMap.draw_quadrangle`. """ import matplotlib.pyplot as plt import astropy.units as u from astropy.coordinates import SkyCoord import ...
29.568627
115
0.602785
""" ============================ Drawing a rectangle on a map ============================ This example will demonstrate how to draw a rectangle on a map using :meth:`~sunpy.map.GenericMap.draw_quadrangle`. """ import matplotlib.pyplot as plt import astropy.units as u from astropy.coordinates import SkyCoord import ...
0
0
0
dc79ff20b7bcec73de52ab183a390972df980cb2
712
py
Python
scripts/load_keys.py
mrFlick72/vauthenticator
c8cdcdd2335ab239ada5f9aa504e2ed537396953
[ "Apache-2.0" ]
6
2019-06-21T22:24:57.000Z
2022-01-15T14:39:55.000Z
scripts/load_keys.py
mrFlick72/vauthenticator
c8cdcdd2335ab239ada5f9aa504e2ed537396953
[ "Apache-2.0" ]
18
2020-04-26T12:42:29.000Z
2022-03-04T21:06:06.000Z
scripts/load_keys.py
mrFlick72/vauthenticator
c8cdcdd2335ab239ada5f9aa504e2ed537396953
[ "Apache-2.0" ]
1
2020-05-09T05:56:19.000Z
2020-05-09T05:56:19.000Z
import boto3 import base64 import uuid import sys if __name__ == '__main__': master_key = sys.argv[1] tableName = sys.argv[2] kms_client = boto3.client("kms") dynamodb = boto3.resource('dynamodb') table = dynamodb.Table(tableName) store_key(table, master_key)
29.666667
103
0.682584
import boto3 import base64 import uuid import sys def store_key(table, key): key_pair = kms_client.generate_data_key_pair(KeyId=key, KeyPairSpec='RSA_2048') table.put_item(Item={ "master_key_id": key_pair["KeyId"], "key_id": str(uuid.uuid4()), "private_key_ciphertext_blob": base64.b64en...
403
0
23
983a56e6a7886f7b07b3a4367e82cd86581c1a8f
921
py
Python
core/src/zeit/content/cp/browser/tests/test_storystream.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
5
2019-05-16T09:51:29.000Z
2021-05-31T09:30:03.000Z
core/src/zeit/content/cp/browser/tests/test_storystream.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
107
2019-05-24T12:19:02.000Z
2022-03-23T15:05:56.000Z
core/src/zeit/content/cp/browser/tests/test_storystream.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
3
2020-08-14T11:01:17.000Z
2022-01-08T17:32:19.000Z
import zeit.cms.interfaces import zeit.content.cp.interfaces import zeit.content.cp.testing
38.375
73
0.665581
import zeit.cms.interfaces import zeit.content.cp.interfaces import zeit.content.cp.testing class StoryStreamAddTest(zeit.content.cp.testing.BrowserTestCase): def test_storystream_can_be_added(self): b = self.browser b.open('http://localhost/++skin++vivi/repository') menu = b.getControl(n...
733
45
50
3a17ac8d4b5e349a64b4f1588b4cd808e3b267c6
7,075
py
Python
avalanche/logging/strategy_logger.py
lrzpellegrini/avalanche_pre_public
522019a55ce08b92c1ec74b508a8ea6ae8751dfd
[ "MIT" ]
12
2021-04-16T15:49:59.000Z
2022-02-27T18:04:58.000Z
avalanche/logging/strategy_logger.py
lrzpellegrini/avalanche_pre_public
522019a55ce08b92c1ec74b508a8ea6ae8751dfd
[ "MIT" ]
null
null
null
avalanche/logging/strategy_logger.py
lrzpellegrini/avalanche_pre_public
522019a55ce08b92c1ec74b508a8ea6ae8751dfd
[ "MIT" ]
2
2021-06-22T04:11:52.000Z
2021-11-12T03:27:18.000Z
from abc import ABC from typing import List from avalanche.evaluation.metric_results import MetricValue from avalanche.training.plugins import PluggableStrategy from avalanche.training.strategy_callbacks import StrategyCallbacks class StrategyLogger(StrategyCallbacks[None], ABC): """ The base class for the ...
41.133721
79
0.640141
from abc import ABC from typing import List from avalanche.evaluation.metric_results import MetricValue from avalanche.training.plugins import PluggableStrategy from avalanche.training.strategy_callbacks import StrategyCallbacks class StrategyLogger(StrategyCallbacks[None], ABC): """ The base class for the ...
4,745
0
675
989077143f026081d00a51fd9ceecb5af2ffadb0
222
py
Python
src/pretalx/submission/forms/resource.py
hnzlmnn/pretalx
fcdf1a03c9428c1207ee4f4228694b2ed8e7495b
[ "Apache-2.0" ]
1
2018-12-09T12:35:10.000Z
2018-12-09T12:35:10.000Z
src/pretalx/submission/forms/resource.py
hnzlmnn/pretalx
fcdf1a03c9428c1207ee4f4228694b2ed8e7495b
[ "Apache-2.0" ]
null
null
null
src/pretalx/submission/forms/resource.py
hnzlmnn/pretalx
fcdf1a03c9428c1207ee4f4228694b2ed8e7495b
[ "Apache-2.0" ]
null
null
null
from django import forms from pretalx.submission.models import Resource
17.076923
46
0.630631
from django import forms from pretalx.submission.models import Resource class ResourceForm(forms.ModelForm): class Meta: model = Resource fields = [ 'resource', 'description', ]
0
125
23
6b39290d79b9ccc902cbc6b765cafe04171b9062
974
py
Python
src/saturnv_ui/saturnv/ui/managers/filemanager.py
epkaz93/saturnv
b8a2c61bb0e833f2e31698050113038bab3ca5a4
[ "MIT" ]
1
2022-03-12T07:38:09.000Z
2022-03-12T07:38:09.000Z
src/saturnv_ui/saturnv/ui/managers/filemanager.py
epkaz93/saturnv
b8a2c61bb0e833f2e31698050113038bab3ca5a4
[ "MIT" ]
null
null
null
src/saturnv_ui/saturnv/ui/managers/filemanager.py
epkaz93/saturnv
b8a2c61bb0e833f2e31698050113038bab3ca5a4
[ "MIT" ]
null
null
null
from glob import glob from pathlib import Path from saturnv.ui.managers import AbstractBaseManager
26.324324
70
0.647844
from glob import glob from pathlib import Path from saturnv.ui.managers import AbstractBaseManager class FileBasedManager(AbstractBaseManager): def __init__(self, path: Path, extension: str = '*'): super().__init__() self.path = path self.extension = extension @property def name...
625
174
73
96a2aca29089a5ff88ca7f6681bc35e7880db032
5,640
py
Python
src/convert.py
ICTU/Kwaliteitsaanpak
4dc5d1d080614999ff3ad00b56f9e17475878a24
[ "Apache-2.0" ]
4
2018-03-30T07:31:39.000Z
2022-01-03T20:12:14.000Z
src/convert.py
ICTU/Kwaliteitsaanpak
4dc5d1d080614999ff3ad00b56f9e17475878a24
[ "Apache-2.0" ]
186
2018-01-23T15:16:55.000Z
2022-02-25T16:21:38.000Z
src/convert.py
ICTU/Kwaliteitsaanpak
4dc5d1d080614999ff3ad00b56f9e17475878a24
[ "Apache-2.0" ]
1
2022-01-31T11:43:03.000Z
2022-01-31T11:43:03.000Z
#!/bin/env python """Main program to convert Markdown files to different possible output formats.""" import datetime import json import logging import os import pathlib import pprint from typing import cast, List from xml.etree.ElementTree import ElementTree from cli import parse_cli_arguments from converter import ...
45.483871
118
0.731383
#!/bin/env python """Main program to convert Markdown files to different possible output formats.""" import datetime import json import logging import os import pathlib import pprint from typing import cast, List from xml.etree.ElementTree import ElementTree from cli import parse_cli_arguments from converter import ...
0
0
0
7754a368af5838ab83dfea57dcf98fdd46972d56
172
py
Python
katas/kyu_6/duplicate_encoder.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/kyu_6/duplicate_encoder.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/kyu_6/duplicate_encoder.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
from collections import Counter
21.5
61
0.633721
from collections import Counter def duplicate_encode(word): word = word.lower() cnt = Counter(word) return ''.join('(' if cnt[a] == 1 else ')' for a in word)
116
0
23
9ab824550c424d3eac02cf5c52dc5331127978e5
1,417
py
Python
examples/nfft/test_nfsoft.py
graefm/lorm
864a25d5c8785fb446b3d5dd414560a1baa7bf3a
[ "MIT" ]
null
null
null
examples/nfft/test_nfsoft.py
graefm/lorm
864a25d5c8785fb446b3d5dd414560a1baa7bf3a
[ "MIT" ]
null
null
null
examples/nfft/test_nfsoft.py
graefm/lorm
864a25d5c8785fb446b3d5dd414560a1baa7bf3a
[ "MIT" ]
null
null
null
import nfft import numpy as np import pylab as pl %matplotlib inline Mp1, Mt, Mp2 = 20, 21, 20 N = 3 nfsoft_plan = nfft.nfsoft.plan(Mp1*Mt*Mp2, N) p1 = 2*np.pi*np.linspace(-0.5,0.5,Mp1,endpoint=False) t = 2*np.pi*np.linspace(0+0.00001,0.5-0.00001,Mt,endpoint=True) p2 = 2*np.pi*np.linspace(-0.5,0.5,Mp2,endpoint=False...
29.520833
68
0.687368
import nfft import numpy as np import pylab as pl %matplotlib inline Mp1, Mt, Mp2 = 20, 21, 20 N = 3 nfsoft_plan = nfft.nfsoft.plan(Mp1*Mt*Mp2, N) p1 = 2*np.pi*np.linspace(-0.5,0.5,Mp1,endpoint=False) t = 2*np.pi*np.linspace(0+0.00001,0.5-0.00001,Mt,endpoint=True) p2 = 2*np.pi*np.linspace(-0.5,0.5,Mp2,endpoint=False...
0
0
0
fde64e183445031ec8a22dc64b76860d63812d75
4,019
py
Python
run_batch_embed.py
skanav/cst_transform
361a23293cf0359af7a7d17cf465483ffe4e7545
[ "Apache-2.0" ]
null
null
null
run_batch_embed.py
skanav/cst_transform
361a23293cf0359af7a7d17cf465483ffe4e7545
[ "Apache-2.0" ]
null
null
null
run_batch_embed.py
skanav/cst_transform
361a23293cf0359af7a7d17cf465483ffe4e7545
[ "Apache-2.0" ]
1
2021-07-02T16:04:14.000Z
2021-07-02T16:04:14.000Z
import argparse import os import json import yaml import traceback from tqdm import tqdm from glob import glob import run_predict as rt from cst_transform.data.vocab_utils import MultiIndexer # Handling file index for SVComp -------------------------------- # ---------------------------------------------------...
26.973154
112
0.596168
import argparse import os import json import yaml import traceback from tqdm import tqdm from glob import glob import run_predict as rt from cst_transform.data.vocab_utils import MultiIndexer def _substitute(org_files, sub_files): index = {} for f in org_files: base, _ = os.path.splitext(f) ...
1,744
0
138
6a749d4af9336636bd2de6c3964a2df66e9cec37
2,677
py
Python
youpy/concurrency.py
youpy-org/youpy
0b3b31043d0c517615c99eaf02d3464c50d59cb4
[ "BSD-3-Clause" ]
null
null
null
youpy/concurrency.py
youpy-org/youpy
0b3b31043d0c517615c99eaf02d3464c50d59cb4
[ "BSD-3-Clause" ]
null
null
null
youpy/concurrency.py
youpy-org/youpy
0b3b31043d0c517615c99eaf02d3464c50d59cb4
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- """Group all concurrency objects and routines we use. Intended to easy a potential future change in the concurrency model (i.e. threads VS processes) """ # TODO(Nicolas Despres): Completely wrap the Queue and Task classes for proper # abstraction. import threading as _concurrency import q...
26.245098
90
0.646246
# -*- encoding: utf-8 -*- """Group all concurrency objects and routines we use. Intended to easy a potential future change in the concurrency model (i.e. threads VS processes) """ # TODO(Nicolas Despres): Completely wrap the Queue and Task classes for proper # abstraction. import threading as _concurrency import q...
700
35
235
735210ed990e30496f7d7b0aaf4c2dc2620e7efa
11,292
py
Python
plot/hyperparam/plot_curve.py
architsakhadeo/Offline-Hyperparameter-Tuning-for-RL
94b8f205b12f0cc59ae8e19b2e6099f34be929d6
[ "MIT" ]
null
null
null
plot/hyperparam/plot_curve.py
architsakhadeo/Offline-Hyperparameter-Tuning-for-RL
94b8f205b12f0cc59ae8e19b2e6099f34be929d6
[ "MIT" ]
null
null
null
plot/hyperparam/plot_curve.py
architsakhadeo/Offline-Hyperparameter-Tuning-for-RL
94b8f205b12f0cc59ae8e19b2e6099f34be929d6
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt # Loads the episode lengths from the csv files into a dictionary and return the dictionary # def exponential_avg(rewardsList, alpha): # AverageRewardsList = [rewardsList[0]] # o_n_minus_1 = 0 # for i in range(1, len(rewardsL...
45.349398
123
0.656217
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt # Loads the episode lengths from the csv files into a dictionary and return the dictionary def load_data(algpath, name='episodes'): Data = [] dirFiles = os.listdir(algpath) # Files = np.array([i for i in dirFiles if 'episodes'...
6,675
0
297
9e68e5206e6f9256a46ad0829b679c929bebacaa
978
py
Python
p_030_039/problem33.py
ericgreveson/projecteuler
1844bf383fca871b82d88ef1eb3a9b1a0e363054
[ "Apache-2.0" ]
null
null
null
p_030_039/problem33.py
ericgreveson/projecteuler
1844bf383fca871b82d88ef1eb3a9b1a0e363054
[ "Apache-2.0" ]
null
null
null
p_030_039/problem33.py
ericgreveson/projecteuler
1844bf383fca871b82d88ef1eb3a9b1a0e363054
[ "Apache-2.0" ]
null
null
null
from fractions import Fraction from functools import reduce def main(): """ Entry point """ # We consider fractions with two digits in num and denom, less than one curious = [] for numerator in range(10, 100): for denominator in range(numerator + 1, 100): nums = numerator //...
31.548387
82
0.564417
from fractions import Fraction from functools import reduce def main(): """ Entry point """ # We consider fractions with two digits in num and denom, less than one curious = [] for numerator in range(10, 100): for denominator in range(numerator + 1, 100): nums = numerator //...
0
0
0
0033f85c49c6f4fde63982bc3bfa700ca51837b9
16,817
py
Python
src/heuristics.py
brmprnk/fasttree
a614fa2f3d26c6051dee67618ee5639e6115f85f
[ "RSA-MD" ]
null
null
null
src/heuristics.py
brmprnk/fasttree
a614fa2f3d26c6051dee67618ee5639e6115f85f
[ "RSA-MD" ]
null
null
null
src/heuristics.py
brmprnk/fasttree
a614fa2f3d26c6051dee67618ee5639e6115f85f
[ "RSA-MD" ]
null
null
null
""" File representing the FastNJ, Local Hill-Climbing and Top-hits heuristics. All relevant classes or functions will be defined here, with possible references to utility functions i.e. distances. References to page numbers in this code are referring to the paper or its supplementary material: [1] Price at al. FastTre...
42.467172
120
0.619076
""" File representing the FastNJ, Local Hill-Climbing and Top-hits heuristics. All relevant classes or functions will be defined here, with possible references to utility functions i.e. distances. References to page numbers in this code are referring to the paper or its supplementary material: [1] Price at al. FastTre...
270
0
27
676056aadf6e0394e3592a53d5ebdcb7664f3bfe
15,968
py
Python
dnac_apis.py
zapodeanu/multidomain_provisioning
19478f0d30ea2247eeb131df28fe4a96c864ce7c
[ "BSD-Source-Code" ]
2
2019-10-16T22:09:05.000Z
2019-11-20T15:44:21.000Z
dnac_apis.py
zapodeanu/multidomain_provisioning
19478f0d30ea2247eeb131df28fe4a96c864ce7c
[ "BSD-Source-Code" ]
1
2021-06-02T00:31:33.000Z
2021-06-02T00:31:33.000Z
dnac_apis.py
zapodeanu/multidomain_provisioning
19478f0d30ea2247eeb131df28fe4a96c864ce7c
[ "BSD-Source-Code" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2019 Cisco and/or its affiliates. This software is licensed to you under the terms of the Cisco Sample Code License, Version 1.1 (the "License"). You may obtain a copy of the License at https://developer.cisco.com/docs/licenses All use...
38.109785
130
0.680235
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2019 Cisco and/or its affiliates. This software is licensed to you under the terms of the Cisco Sample Code License, Version 1.1 (the "License"). You may obtain a copy of the License at https://developer.cisco.com/docs/licenses All use...
0
0
0
e20e3569604fb6297e99d0ff0d7e5ddc9754638b
1,336
py
Python
src/admin_panel/migrations/0020_auto_20210704_0655.py
Rey092/myhouse24_django
b2b31873006ec4917c2ed043350f2841745fadfb
[ "MIT" ]
null
null
null
src/admin_panel/migrations/0020_auto_20210704_0655.py
Rey092/myhouse24_django
b2b31873006ec4917c2ed043350f2841745fadfb
[ "MIT" ]
null
null
null
src/admin_panel/migrations/0020_auto_20210704_0655.py
Rey092/myhouse24_django
b2b31873006ec4917c2ed043350f2841745fadfb
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-07-04 06:55 from django.db import migrations, models import django.db.models.deletion
28.425532
67
0.473802
# Generated by Django 3.2.4 on 2021-07-04 06:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("admin_panel", "0019_auto_20210703_1119"), ] operations = [ migrations.CreateModel( name="Tariff...
0
1,189
23
8e3cfb0cb5f3007da0bcf2e6291c98c17ca0bbe4
1,560
py
Python
test_convert.py
atlas-calo-ml/GraphNets4Pions_LLNL
fb25259124711526cc4110461f09db1d03a669f9
[ "Apache-2.0" ]
1
2021-11-02T00:40:19.000Z
2021-11-02T00:40:19.000Z
test_convert.py
atlas-calo-ml/GraphNets4Pions_LLNL
fb25259124711526cc4110461f09db1d03a669f9
[ "Apache-2.0" ]
null
null
null
test_convert.py
atlas-calo-ml/GraphNets4Pions_LLNL
fb25259124711526cc4110461f09db1d03a669f9
[ "Apache-2.0" ]
null
null
null
import numpy as np import os import sys import glob import uproot as ur import matplotlib.pyplot as plt import time import seaborn as sns import tensorflow as tf from graph_nets import utils_np from graph_nets import utils_tf from graph_nets.graphs import GraphsTuple import sonnet as snt import argparse import yaml imp...
26.440678
63
0.661538
import numpy as np import os import sys import glob import uproot as ur import matplotlib.pyplot as plt import time import seaborn as sns import tensorflow as tf from graph_nets import utils_np from graph_nets import utils_tf from graph_nets.graphs import GraphsTuple import sonnet as snt import argparse import yaml imp...
1,181
0
23
212fbb35f96ab14421400eaa39c09839088dd347
156
py
Python
bubbob/cheat.py
fpiesche/bub-n-bros
29f6b77a125aa4ac071f470607c268fcd210a6fb
[ "MIT" ]
1
2021-01-16T22:00:06.000Z
2021-01-16T22:00:06.000Z
bubbob/cheat.py
fpiesche/bub-n-bros
29f6b77a125aa4ac071f470607c268fcd210a6fb
[ "MIT" ]
2
2022-03-18T09:46:12.000Z
2022-03-25T09:36:42.000Z
bubbob/cheat.py
fpiesche/bub-n-bros
29f6b77a125aa4ac071f470607c268fcd210a6fb
[ "MIT" ]
null
null
null
#! /usr/bin/env python import sys, os url = 'http://127.0.0.1:8000/?cheat=%s' % sys.argv[1] g = os.popen('lynx -source %r' % url, 'r') g.read() g.close()
17.333333
53
0.583333
#! /usr/bin/env python import sys, os url = 'http://127.0.0.1:8000/?cheat=%s' % sys.argv[1] g = os.popen('lynx -source %r' % url, 'r') g.read() g.close()
0
0
0
5d1c3e604b2c5fef4de0964d910367fd22483ce0
1,686
py
Python
Lib/blackrenderer/backends/__init__.py
ctrlcctrlv/black-renderer
39f1d1f91e1ea3d68ee09f0ab1d5bebb94b760da
[ "Apache-2.0" ]
21
2021-04-29T09:04:59.000Z
2022-02-09T22:18:21.000Z
Lib/blackrenderer/backends/__init__.py
ctrlcctrlv/black-renderer
39f1d1f91e1ea3d68ee09f0ab1d5bebb94b760da
[ "Apache-2.0" ]
47
2021-04-28T12:32:10.000Z
2022-03-29T18:06:12.000Z
Lib/blackrenderer/backends/__init__.py
ctrlcctrlv/black-renderer
39f1d1f91e1ea3d68ee09f0ab1d5bebb94b760da
[ "Apache-2.0" ]
1
2022-02-09T12:32:13.000Z
2022-02-09T12:32:13.000Z
from collections import defaultdict import importlib _surfaces = { None: { "cairo": "blackrenderer.backends.cairo.CairoPixelSurface", "coregraphics": "blackrenderer.backends.coregraphics.CoreGraphicsPixelSurface", "skia": "blackrenderer.backends.skia.SkiaPixelSurface", "svg": "blac...
33.72
87
0.679122
from collections import defaultdict import importlib _surfaces = { None: { "cairo": "blackrenderer.backends.cairo.CairoPixelSurface", "coregraphics": "blackrenderer.backends.coregraphics.CoreGraphicsPixelSurface", "skia": "blackrenderer.backends.skia.SkiaPixelSurface", "svg": "blac...
595
0
46
748e26da767fac285c2fa982aa0426f2d98fcbd4
6,203
py
Python
Python/sum-of-subarray-minimums.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2022-01-30T06:55:28.000Z
2022-01-30T06:55:28.000Z
Python/sum-of-subarray-minimums.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
null
null
null
Python/sum-of-subarray-minimums.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2021-12-31T03:56:39.000Z
2021-12-31T03:56:39.000Z
# -*- encoding=utf-8 -*- # Time: O(n) # Space: O(n) # 907 # Given an array of integers A, find the sum of min(B), # where B ranges over every (contiguous) subarray of A. # # Since the answer may be large, return the answer modulo 10^9 + 7. # # Example 1: # # Input: [3,1,2,4] # Output: 17 # Explanation: Subarrays are ...
38.290123
141
0.553442
# -*- encoding=utf-8 -*- # Time: O(n) # Space: O(n) # 907 # Given an array of integers A, find the sum of min(B), # where B ranges over every (contiguous) subarray of A. # # Since the answer may be large, return the answer modulo 10^9 + 7. # # Example 1: # # Input: [3,1,2,4] # Output: 17 # Explanation: Subarrays are ...
1,497
949
49
77c8378df48b90162c81aa38f2a172d99bb1ac28
1,315
py
Python
case 2/case2v2.py
itchono/Electric-Atoms
6f72cc5c400f9a73b641cb21f317cdb4e98e7838
[ "MIT" ]
null
null
null
case 2/case2v2.py
itchono/Electric-Atoms
6f72cc5c400f9a73b641cb21f317cdb4e98e7838
[ "MIT" ]
null
null
null
case 2/case2v2.py
itchono/Electric-Atoms
6f72cc5c400f9a73b641cb21f317cdb4e98e7838
[ "MIT" ]
null
null
null
import numpy as np def hamiltonian(ang_freq, B_0, end_time, num_steps): ''' Generates hamiltonian at all time steps ''' H_0 = np.zeros((num_steps, 2, 2)) H_0[:, 1, 1].fill(2*np.pi*177*10**6) H_int = np.zeros((num_steps, 2, 2)) H_int[:, 0, 1] = B_0*2*np.pi*10**6*np.cos(2*np.pi*ang_freq*np....
25.784314
99
0.596198
import numpy as np def hamiltonian(ang_freq, B_0, end_time, num_steps): ''' Generates hamiltonian at all time steps ''' H_0 = np.zeros((num_steps, 2, 2)) H_0[:, 1, 1].fill(2*np.pi*177*10**6) H_int = np.zeros((num_steps, 2, 2)) H_int[:, 0, 1] = B_0*2*np.pi*10**6*np.cos(2*np.pi*ang_freq*np....
0
0
0
bd02c1b97a61296c22b7370f6fc5c56cb1c44d19
1,557
py
Python
neal_clock.py
FlightDev/YSPA
5226712ebf305e7a3c686c43c996517a617f748b
[ "MIT" ]
null
null
null
neal_clock.py
FlightDev/YSPA
5226712ebf305e7a3c686c43c996517a617f748b
[ "MIT" ]
null
null
null
neal_clock.py
FlightDev/YSPA
5226712ebf305e7a3c686c43c996517a617f748b
[ "MIT" ]
null
null
null
from visual import * from datetime import datetime #ring #arrow #sphere original_hour = vector(0, 5, 0) original_minute = vector(0, 8, 0) original_second = vector(0, 10, 0) clock_face = ring(pos = (0, 0, 0), axis = (0, 0, 1), thickness = 0.5, radius = 10, color = color.white) top_label = label(pos = (0, 10, 0), text =...
33.12766
103
0.605652
from visual import * from datetime import datetime #ring #arrow #sphere original_hour = vector(0, 5, 0) original_minute = vector(0, 8, 0) original_second = vector(0, 10, 0) clock_face = ring(pos = (0, 0, 0), axis = (0, 0, 1), thickness = 0.5, radius = 10, color = color.white) top_label = label(pos = (0, 10, 0), text =...
480
0
23
9e2c933caa5110a8430b8e70c53a51c6a5f61c48
9,383
py
Python
tests/commons/big_query/copy_job_async/result_check/test_result_check.py
Morgenz/bbq
f0fd3f626841c610aee80ad08a61123b7cccb775
[ "Apache-2.0" ]
41
2018-05-08T11:54:37.000Z
2022-02-09T21:19:17.000Z
tests/commons/big_query/copy_job_async/result_check/test_result_check.py
Morgenz/bbq
f0fd3f626841c610aee80ad08a61123b7cccb775
[ "Apache-2.0" ]
139
2018-06-07T13:45:21.000Z
2021-04-30T20:44:06.000Z
tests/commons/big_query/copy_job_async/result_check/test_result_check.py
Morgenz/bbq
f0fd3f626841c610aee80ad08a61123b7cccb775
[ "Apache-2.0" ]
5
2019-09-11T12:28:24.000Z
2022-02-04T21:38:29.000Z
import unittest from google.appengine.ext import testbed, ndb from mock import patch from src.commons.big_query.copy_job_async.copy_job.copy_job_request \ import CopyJobRequest from src.commons.big_query.copy_job_async.copy_job_result \ import CopyJobResult from src.commons.big_query.copy_job_async.result_che...
40.619048
114
0.651391
import unittest from google.appengine.ext import testbed, ndb from mock import patch from src.commons.big_query.copy_job_async.copy_job.copy_job_request \ import CopyJobRequest from src.commons.big_query.copy_job_async.copy_job_result \ import CopyJobResult from src.commons.big_query.copy_job_async.result_che...
7,041
1,429
23
3e1fbaec338fd20e42ba44a24b5bee7695bce871
3,070
py
Python
aliquotmaf/annotators/gnomad_vcf.py
NCI-GDC/aliquot-maf-tools
6aec9490ab7194ec605bf02c4c8e7c1cfca53973
[ "Apache-2.0" ]
1
2020-09-18T17:52:37.000Z
2020-09-18T17:52:37.000Z
aliquotmaf/annotators/gnomad_vcf.py
NCI-GDC/aliquot-maf-tools
6aec9490ab7194ec605bf02c4c8e7c1cfca53973
[ "Apache-2.0" ]
null
null
null
aliquotmaf/annotators/gnomad_vcf.py
NCI-GDC/aliquot-maf-tools
6aec9490ab7194ec605bf02c4c8e7c1cfca53973
[ "Apache-2.0" ]
1
2020-08-14T08:49:39.000Z
2020-08-14T08:49:39.000Z
""" Implements the gnomAD annotation using the gnomAD VCF. """ from __future__ import absolute_import from collections import OrderedDict import pysam from aliquotmaf.converters.builder import get_builder from .annotator import Annotator GNOMAD_SRC_TO_MAF = OrderedDict( AF_non_cancer_eas="gnomAD_non_cancer_EA...
32.315789
88
0.623779
""" Implements the gnomAD annotation using the gnomAD VCF. """ from __future__ import absolute_import from collections import OrderedDict import pysam from aliquotmaf.converters.builder import get_builder from .annotator import Annotator GNOMAD_SRC_TO_MAF = OrderedDict( AF_non_cancer_eas="gnomAD_non_cancer_EA...
106
1,900
23
928bff163a9c28010dac3e96f467a861b8f12154
1,375
py
Python
main/views.py
felipeue/SmartBuilding
57d904c6166c87f836bc8fada9eb5a2bc82069b8
[ "MIT" ]
null
null
null
main/views.py
felipeue/SmartBuilding
57d904c6166c87f836bc8fada9eb5a2bc82069b8
[ "MIT" ]
null
null
null
main/views.py
felipeue/SmartBuilding
57d904c6166c87f836bc8fada9eb5a2bc82069b8
[ "MIT" ]
null
null
null
from django.views.generic import TemplateView, RedirectView from django.contrib.auth import login, logout, authenticate from django.shortcuts import render from main.permissions import *
31.25
72
0.612364
from django.views.generic import TemplateView, RedirectView from django.contrib.auth import login, logout, authenticate from django.shortcuts import render from main.permissions import * class IndexView(TemplateView): template_name = "home.html" def login_resident(request): if request.method == 'POST': ...
1,008
105
69
a1584998f4a814ad7dbadce3d789a6dae81a348b
1,339
py
Python
exercicios/exe098/exe098.py
tiagolsouza/exercicios-Curso-em-video-PYTHON
e4e6975fac7e4883aeab58b970c6ca72895564e4
[ "MIT" ]
null
null
null
exercicios/exe098/exe098.py
tiagolsouza/exercicios-Curso-em-video-PYTHON
e4e6975fac7e4883aeab58b970c6ca72895564e4
[ "MIT" ]
null
null
null
exercicios/exe098/exe098.py
tiagolsouza/exercicios-Curso-em-video-PYTHON
e4e6975fac7e4883aeab58b970c6ca72895564e4
[ "MIT" ]
null
null
null
a = 50 print('\033[32m_\033[m' * a) print(f'\033[1;32m{"SISTEMA DE CONTAGEM ADAPTAVEL":=^{a}}\033[m') print('\033[32m-\033[m' * a) from time import sleep '''print('-='*16) print('\033[1;34mContagem de 1 ate 10 de 1 em 1:\033[m') for c in range(1, 11): print(f'\033[35m{c}', end=' ') #sleep(0.5) print('\033[3...
24.345455
76
0.521285
a = 50 print('\033[32m_\033[m' * a) print(f'\033[1;32m{"SISTEMA DE CONTAGEM ADAPTAVEL":=^{a}}\033[m') print('\033[32m-\033[m' * a) from time import sleep def cont(a, b, c): if c == 0: passo = 1 else: passo = abs(c) print('\033[34m-=\033[m' * 20) print(f'\033[1;34mContagem de {a} ate {...
551
0
23
9737e03f7a2ab59c949b8d081ae673ebcc858977
2,646
py
Python
proyectofinal/main.py
RobelisRuiz/Programacion-4
8c979ad862430801dd2608298a0369ec8457bde9
[ "Apache-2.0" ]
null
null
null
proyectofinal/main.py
RobelisRuiz/Programacion-4
8c979ad862430801dd2608298a0369ec8457bde9
[ "Apache-2.0" ]
null
null
null
proyectofinal/main.py
RobelisRuiz/Programacion-4
8c979ad862430801dd2608298a0369ec8457bde9
[ "Apache-2.0" ]
null
null
null
from flask import Flask, render_template, request from flask_restful import Resource, Api, reqparse import pandas as pd import ast import requests app = Flask(__name__) api = Api(app) api.add_resource(Citas, '/citas') # usar method tipo DELETE @app.route('/', methods=['GET', 'POST']) @app.route('/mostrarcitas...
31.5
227
0.60771
from flask import Flask, render_template, request from flask_restful import Resource, Api, reqparse import pandas as pd import ast import requests app = Flask(__name__) api = Api(app) class Citas(Resource): def get(self): data = pd.read_csv('citasdb.csv') data = data.to_dict() return {'c...
2,097
92
67
5fc28a8abfd025be23ab1851f4f01b6e0b04e40f
459
py
Python
SPOJ/FIBOSUM.py
cquark7/competitive_programming
c90754d91628b273703c74e373356394732f0cd3
[ "MIT" ]
1
2019-06-16T08:21:56.000Z
2019-06-16T08:21:56.000Z
SPOJ/FIBOSUM.py
cquark7/competitive_programming
c90754d91628b273703c74e373356394732f0cd3
[ "MIT" ]
null
null
null
SPOJ/FIBOSUM.py
cquark7/competitive_programming
c90754d91628b273703c74e373356394732f0cd3
[ "MIT" ]
null
null
null
from sys import stdout, stdin m = 1000000007 dic = {0: (0, 1)} t = int(stdin.readline()) for tc in range(t): L, R = map(int, stdin.readline().split()) stdout.write("%d\n" % ((fib(R + 2)[0] - fib(L + 1)[0]) % m))
19.125
64
0.437908
from sys import stdout, stdin m = 1000000007 dic = {0: (0, 1)} def fib(n): if n in dic: return dic[n] a, b = fib(n >> 1) c = (a * (2 * b - a)) % m d = (a * a + b * b) % m if n & 1: dic[n] = (d, c + d) return d, c + d dic[n] = (c, d) return c, d t = int(stdin.read...
212
0
23
89b8b9f88bc652ff40a37ffc207bfed349edc46f
1,993
py
Python
Prog2/modulo_letra.py
firedomito/Atividades-Python
9d90dbc82368dd2088b1283c63f6afbab3466382
[ "MIT" ]
null
null
null
Prog2/modulo_letra.py
firedomito/Atividades-Python
9d90dbc82368dd2088b1283c63f6afbab3466382
[ "MIT" ]
null
null
null
Prog2/modulo_letra.py
firedomito/Atividades-Python
9d90dbc82368dd2088b1283c63f6afbab3466382
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # modulo_letra.py # # Copyright 2021 # Autor: Guilherme Silveira Mendes # ############################ # Código fonte em Python 3 ############################ #Todas funções abaixo fazem e retornam os padrões pedidos
22.393258
91
0.574511
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # modulo_letra.py # # Copyright 2021 # Autor: Guilherme Silveira Mendes # ############################ # Código fonte em Python 3 ############################ #Todas funções abaixo fazem e retornam os padrões pedidos def opc_a(caracter): #declaracao de variavel ...
1,574
0
141
9c51711f73278768328415d62a566eef3080c3ee
7,464
py
Python
xpp/Spatial_Overlap_Scan_Annotated_Tested.py
ZryletTC/xpp
e3dee02bf0fa05289dd1ad27776cabe593ffd46c
[ "BSD-3-Clause-LBNL" ]
null
null
null
xpp/Spatial_Overlap_Scan_Annotated_Tested.py
ZryletTC/xpp
e3dee02bf0fa05289dd1ad27776cabe593ffd46c
[ "BSD-3-Clause-LBNL" ]
1
2020-04-07T20:31:58.000Z
2020-04-07T20:31:58.000Z
xpp/Spatial_Overlap_Scan_Annotated_Tested.py
ZryletTC/xpp
e3dee02bf0fa05289dd1ad27776cabe593ffd46c
[ "BSD-3-Clause-LBNL" ]
2
2018-10-30T23:16:03.000Z
2020-04-07T20:04:51.000Z
""" General Setup and Imports """ get_ipython().run_line_magic('matplotlib', 'tk') import matplotlib.pyplot as plt from bluesky import RunEngine from bluesky.callbacks.best_effort import BestEffortCallback from bluesky.plans import * from bluesky.preprocessors import run_wrapper from bluesky.utils import install_nb_kic...
40.565217
299
0.673633
""" General Setup and Imports """ get_ipython().run_line_magic('matplotlib', 'tk') import matplotlib.pyplot as plt from bluesky import RunEngine from bluesky.callbacks.best_effort import BestEffortCallback from bluesky.plans import * from bluesky.preprocessors import run_wrapper from bluesky.utils import install_nb_kic...
0
0
0
d70845570bd36e699b61ef538f2f7fc77163a245
1,804
pyw
Python
ARDUINO.pyw
ProfessorCristiano/Python-com-Arduino
6141d02a14eb9fd3aafb35c3db78c7474913a739
[ "Apache-2.0" ]
null
null
null
ARDUINO.pyw
ProfessorCristiano/Python-com-Arduino
6141d02a14eb9fd3aafb35c3db78c7474913a739
[ "Apache-2.0" ]
null
null
null
ARDUINO.pyw
ProfessorCristiano/Python-com-Arduino
6141d02a14eb9fd3aafb35c3db78c7474913a739
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Feb 28 20:36:35 2019 @author: cristiano_001325 """ '''Interessa isso aqui para o arduino''' import serial from tkinter import * from tkinter import messagebox window = Tk() window.title("Programa pa...
29.096774
114
0.544346
# -*- coding: utf-8 -*- """ Created on Thu Feb 28 20:36:35 2019 @author: cristiano_001325 """ '''Interessa isso aqui para o arduino''' import serial from tkinter import * from tkinter import messagebox window = Tk() window.title("Programa pa...
0
0
0
881d7f6433ebdd9c3dccdc3f0e493549b1f43eb1
4,058
py
Python
goticket/tickets/migrations/0001_initial.py
pmburu/GoTicketV2
97ca68a9ca5e1c5793c03c6983c5b343f59dc4d2
[ "MIT" ]
null
null
null
goticket/tickets/migrations/0001_initial.py
pmburu/GoTicketV2
97ca68a9ca5e1c5793c03c6983c5b343f59dc4d2
[ "MIT" ]
7
2022-02-14T23:32:37.000Z
2022-03-31T23:29:05.000Z
goticket/tickets/migrations/0001_initial.py
pmburu/GoTicketV2
97ca68a9ca5e1c5793c03c6983c5b343f59dc4d2
[ "MIT" ]
null
null
null
# Generated by Django 3.2.11 on 2022-02-01 20:57 from django.conf import settings import django.contrib.postgres.fields from django.db import migrations, models import django.db.models.deletion import uuid
47.186047
160
0.598817
# Generated by Django 3.2.11 on 2022-02-01 20:57 from django.conf import settings import django.contrib.postgres.fields from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('events', '0001_initi...
0
3,827
23
4e6fdd1ac2b66a61b01b6bcfde3d15838dbc5f34
4,486
py
Python
tablarray/np2ta/bin_op.py
chriscannon9001/tablarray
f07530f84a8c86abe996cdb999233ed9bb8edf7e
[ "BSD-3-Clause" ]
null
null
null
tablarray/np2ta/bin_op.py
chriscannon9001/tablarray
f07530f84a8c86abe996cdb999233ed9bb8edf7e
[ "BSD-3-Clause" ]
null
null
null
tablarray/np2ta/bin_op.py
chriscannon9001/tablarray
f07530f84a8c86abe996cdb999233ed9bb8edf7e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ My idea is to have a comparable lib to numpy.add, .sum, etc. But it will work regardless of whether the x1, x2, ... are numpy or TablArray. Created on Sun May 17 18:17:59 2020 @author: chris """ import functools import numpy as np from .. import misc def _cast_ot...
39.008696
79
0.707089
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ My idea is to have a comparable lib to numpy.add, .sum, etc. But it will work regardless of whether the x1, x2, ... are numpy or TablArray. Created on Sun May 17 18:17:59 2020 @author: chris """ import functools import numpy as np from .. import misc def _cast_ot...
0
0
0
17dcbe1cc0608653907846726ef988f363f27f7d
14,889
py
Python
trace_nums.py
buckbaskin/data-1
a9d9dd62778c1c0568cea572cb97cbf16e76a1b2
[ "MIT" ]
null
null
null
trace_nums.py
buckbaskin/data-1
a9d9dd62778c1c0568cea572cb97cbf16e76a1b2
[ "MIT" ]
17
2015-10-28T17:34:24.000Z
2016-07-06T06:26:55.000Z
trace_nums.py
buckbaskin/data-1
a9d9dd62778c1c0568cea572cb97cbf16e76a1b2
[ "MIT" ]
null
null
null
import hashlib import time import weakref # use the math_data decorator to take any function and convert its output to # traced data # def math_data # decorator # convert any data to trace data with the data function # TODO def __coerce__(self, y) # TODO(buckbaskin): implement coerce with more data types ...
34.706294
121
0.623615
import hashlib import time import weakref # use the math_data decorator to take any function and convert its output to # traced data # def math_data # decorator # convert any data to trace data with the data function def Data(info, user_id=None): print 'Data called with info type: '+str(type(info)) if isinst...
11,495
9
1,922
384759e0ecaf428a3fc69d900bf758b54899c2c9
1,081
py
Python
rust_check_coverage.py
opencinemac/azure-pipelines-scripts
e90b7839eb52bc0ae7c29182fc8c7c9c292817c9
[ "MIT" ]
1
2021-05-03T06:23:30.000Z
2021-05-03T06:23:30.000Z
rust_check_coverage.py
opencinemac/azure-pipelines-scripts
e90b7839eb52bc0ae7c29182fc8c7c9c292817c9
[ "MIT" ]
null
null
null
rust_check_coverage.py
opencinemac/azure-pipelines-scripts
e90b7839eb52bc0ae7c29182fc8c7c9c292817c9
[ "MIT" ]
null
null
null
import pathlib import sys from configparser import ConfigParser from xml.etree import ElementTree as et CONFIG_PATH: pathlib.Path = pathlib.Path(__file__).parent.parent.parent / "setup.cfg" COVERAGE_XML = pathlib.Path("./zdevelop/tests/_reports/cobertura.xml") def load_cfg() -> ConfigParser: """ loads libra...
28.447368
85
0.683626
import pathlib import sys from configparser import ConfigParser from xml.etree import ElementTree as et CONFIG_PATH: pathlib.Path = pathlib.Path(__file__).parent.parent.parent / "setup.cfg" COVERAGE_XML = pathlib.Path("./zdevelop/tests/_reports/cobertura.xml") def load_cfg() -> ConfigParser: """ loads libra...
0
0
0
57ff595b47e2d9b1807064946c6c967710842861
116
py
Python
subdir1/intermediate_2_from_subdir1.py
cramraj8/RamPyPackage
6f4e046e63860a5894bdbe3b4a3059a4f835a8da
[ "Apache-2.0" ]
null
null
null
subdir1/intermediate_2_from_subdir1.py
cramraj8/RamPyPackage
6f4e046e63860a5894bdbe3b4a3059a4f835a8da
[ "Apache-2.0" ]
null
null
null
subdir1/intermediate_2_from_subdir1.py
cramraj8/RamPyPackage
6f4e046e63860a5894bdbe3b4a3059a4f835a8da
[ "Apache-2.0" ]
null
null
null
import sys print(2)
14.5
57
0.784483
import sys print(2) class intermediate_2_from_subdir1: print('Hi, this is intermediate_2_from_subdir1 FILE')
0
72
23
89760f6c224e8222efaefb6034eae0c1e699efae
4,208
py
Python
go_containers/go_application_containers/irrigation/eto/ref/eto_code/eto_monitoring_py3.py
NanoDataCenter/NanoDataCenter-embedded_kubernets-docker_images
025b5b0b15a0e11bb4cef7ea3b28d48613e574c1
[ "MIT" ]
null
null
null
go_containers/go_application_containers/irrigation/eto/ref/eto_code/eto_monitoring_py3.py
NanoDataCenter/NanoDataCenter-embedded_kubernets-docker_images
025b5b0b15a0e11bb4cef7ea3b28d48613e574c1
[ "MIT" ]
18
2021-07-26T03:18:11.000Z
2022-02-28T21:17:29.000Z
go_containers/go_application_containers/irrigation/eto/ref/eto_code/eto_monitoring_py3.py
NanoDataCenter/NanoDataCenter-embedded_kubernets-docker_images
025b5b0b15a0e11bb4cef7ea3b28d48613e574c1
[ "MIT" ]
1
2020-07-23T21:56:18.000Z
2020-07-23T21:56:18.000Z
# # # File: eto.py # # import datetime from common_tools.redis_support_py3.construct_data_handlers_py3 import Generate_Handlers from common_tools.system_error_log_py3 import System_Error_Logging from common_tools.Pattern_tools_py3.builders.common_directors_py3 import construct_all_handlers from common_tools.file_ser...
23.909091
100
0.636644
# # # File: eto.py # # import datetime from common_tools.redis_support_py3.construct_data_handlers_py3 import Generate_Handlers from common_tools.system_error_log_py3 import System_Error_Logging from common_tools.Pattern_tools_py3.builders.common_directors_py3 import construct_all_handlers from common_tools.file_ser...
2,623
8
159
8376477c27168358ef70e9b6873ef1e56cc1ea51
10,950
py
Python
android/python/uplinks.py
jlivingstonsg/Cellbots-2019
2e4635beab0cabef7a75e9d863d588b51db0e74d
[ "Apache-2.0" ]
2
2018-10-11T16:11:11.000Z
2018-10-11T16:15:53.000Z
android/python/uplinks.py
jlivingstonsg/Cellbots-2019
2e4635beab0cabef7a75e9d863d588b51db0e74d
[ "Apache-2.0" ]
38
2015-03-03T22:32:20.000Z
2015-03-03T22:32:47.000Z
android/python/uplinks.py
jlivingstonsg/Cellbots-2019
2e4635beab0cabef7a75e9d863d588b51db0e74d
[ "Apache-2.0" ]
null
null
null
# 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 the Li...
31.107955
77
0.664566
# 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 the Li...
5,168
0
773
ae85e86dc935d92ac7d639c59daa54428e9e3086
1,779
py
Python
examples/developer/test_get_input.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
91
2015-01-28T10:18:48.000Z
2022-02-09T16:37:32.000Z
examples/developer/test_get_input.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
166
2015-01-21T17:30:58.000Z
2022-01-31T19:42:24.000Z
examples/developer/test_get_input.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
34
2015-08-25T01:04:23.000Z
2021-11-05T19:35:59.000Z
"""Usage example for the function `abstract.get_input`. To be run after `continuous.py`, in same session. For example, within an `ipython` interactive session in this directory: run ../continuous.py run -i test_get_input.py """ from __future__ import print_function from tulip.abstract import get_input, find_discrete...
24.708333
57
0.660483
"""Usage example for the function `abstract.get_input`. To be run after `continuous.py`, in same session. For example, within an `ipython` interactive session in this directory: run ../continuous.py run -i test_get_input.py """ from __future__ import print_function from tulip.abstract import get_input, find_discrete...
629
0
23
e4787bcced6a6d43aadc72b20003c00b3fbe65f8
1,532
py
Python
KipyServer.py
Xana8U/Kipy
f4f55fb4bc4c1df7ad2fda14e779ce3d860ce17f
[ "MIT" ]
null
null
null
KipyServer.py
Xana8U/Kipy
f4f55fb4bc4c1df7ad2fda14e779ce3d860ce17f
[ "MIT" ]
null
null
null
KipyServer.py
Xana8U/Kipy
f4f55fb4bc4c1df7ad2fda14e779ce3d860ce17f
[ "MIT" ]
null
null
null
import socketserver import sqlite3 import time conn = sqlite3.connect("Messages.db") c = conn.cursor() '''Handles connections and returns a data to clients.''' if __name__ == "__main__": host, port = "192.168.100.10", 5479 with socketserver.TCPServer((host, port), TCPhandler) as server: server.serv...
40.315789
113
0.546345
import socketserver import sqlite3 import time conn = sqlite3.connect("Messages.db") c = conn.cursor() '''Handles connections and returns a data to clients.''' class TCPhandler(socketserver.BaseRequestHandler): def handle(self): self.data = self.request.recv(1024).strip() if str(self.data).strip("...
1,126
29
48
f6a86d14e08ecedfbe75dfaa84c2f975a99d6c43
8,316
py
Python
john_doe/cities/us/nebraska.py
xioren/JohnDoe
4bd16f394709cac246438c8ffd650b4b301cb2b7
[ "MIT" ]
null
null
null
john_doe/cities/us/nebraska.py
xioren/JohnDoe
4bd16f394709cac246438c8ffd650b4b301cb2b7
[ "MIT" ]
null
null
null
john_doe/cities/us/nebraska.py
xioren/JohnDoe
4bd16f394709cac246438c8ffd650b4b301cb2b7
[ "MIT" ]
null
null
null
cities = [ 'Abie', 'Adams', 'Ainsworth', 'Albion', 'Alda', 'Alexandria', 'Allen', 'Alliance', 'Alma', 'Alvo', 'Amelia', 'Ames', 'Amherst', 'Angora', 'Anselmo', 'Ansley', 'Arapahoe', 'Arcadia', 'Archer', 'Arlington', 'Arnold', 'Arthu...
15.314917
23
0.472102
cities = [ 'Abie', 'Adams', 'Ainsworth', 'Albion', 'Alda', 'Alexandria', 'Allen', 'Alliance', 'Alma', 'Alvo', 'Amelia', 'Ames', 'Amherst', 'Angora', 'Anselmo', 'Ansley', 'Arapahoe', 'Arcadia', 'Archer', 'Arlington', 'Arnold', 'Arthu...
0
0
0
55961b9767cfe905b9506a2619d3e5f71d0c162e
9,676
py
Python
src/unitmeasure/measurement.py
gabock/unitmeasure
440ee256d91794317345b9aff102e3e7416363d9
[ "MIT" ]
null
null
null
src/unitmeasure/measurement.py
gabock/unitmeasure
440ee256d91794317345b9aff102e3e7416363d9
[ "MIT" ]
null
null
null
src/unitmeasure/measurement.py
gabock/unitmeasure
440ee256d91794317345b9aff102e3e7416363d9
[ "MIT" ]
null
null
null
import collections import json import numbers from unitmeasure import dimension from unitmeasure.unit import Unit
41.527897
106
0.593117
import collections import json import numbers from unitmeasure import dimension from unitmeasure.unit import Unit class Measurement(object): __slots__ = ["unit", "value"] def __init__(self, value, unit): super().__setattr__("value", value) super().__setattr__("unit", unit) def __setatt...
6,227
3,310
23
2f0325816ccd88c400ce6e98c96695cf36f96e7b
5,741
py
Python
pytest-embedded/pytest_embedded/dut.py
hmalpani/pytest-embedded
da0d5a67d086bcf93d39b30412bf8843c7bbf1a6
[ "MIT" ]
null
null
null
pytest-embedded/pytest_embedded/dut.py
hmalpani/pytest-embedded
da0d5a67d086bcf93d39b30412bf8843c7bbf1a6
[ "MIT" ]
null
null
null
pytest-embedded/pytest_embedded/dut.py
hmalpani/pytest-embedded
da0d5a67d086bcf93d39b30412bf8843c7bbf1a6
[ "MIT" ]
null
null
null
import functools import logging import os.path import re import textwrap from typing import AnyStr, Callable, List, Match, Optional, Union import pexpect from .app import App from .log import PexpectProcess from .unity import UNITY_SUMMARY_LINE_REGEX, TestSuite from .utils import to_bytes, to_list, to_str class Dut...
34.377246
108
0.569413
import functools import logging import os.path import re import textwrap from typing import AnyStr, Callable, List, Match, Optional, Union import pexpect from .app import App from .log import PexpectProcess from .unity import UNITY_SUMMARY_LINE_REGEX, TestSuite from .utils import to_bytes, to_list, to_str class Dut...
1,841
0
54
6b649ee41adea2e9078325b52837cac23d53a5a9
431
py
Python
torch_metrics/logcosh.py
Vijayabhaskar96/torch-metrics
f65ecd785ee0415da91f691596e5f4ba7f55f9be
[ "MIT" ]
null
null
null
torch_metrics/logcosh.py
Vijayabhaskar96/torch-metrics
f65ecd785ee0415da91f691596e5f4ba7f55f9be
[ "MIT" ]
null
null
null
torch_metrics/logcosh.py
Vijayabhaskar96/torch-metrics
f65ecd785ee0415da91f691596e5f4ba7f55f9be
[ "MIT" ]
null
null
null
import torch class LogCoshError: """ Computes Logarithm of the hyperbolic cosine of the prediction error. Args: y_true: Tensor of Ground truth values. y_pred: Tensor of Predicted values. Returns: Tensor of Logcosh error """
22.684211
86
0.62877
import torch class LogCoshError: """ Computes Logarithm of the hyperbolic cosine of the prediction error. Args: y_true: Tensor of Ground truth values. y_pred: Tensor of Predicted values. Returns: Tensor of Logcosh error """ def __call__(self, y_pred, y_true): ...
132
0
27
6f993d04def6e44a04a5dd8169dac5ed56c6448a
1,312
py
Python
fabfile.py
MinnPost/minnpost-heroku-cron
bc956ae8d8de90ce303cf6797c257b79954f7537
[ "MIT" ]
null
null
null
fabfile.py
MinnPost/minnpost-heroku-cron
bc956ae8d8de90ce303cf6797c257b79954f7537
[ "MIT" ]
null
null
null
fabfile.py
MinnPost/minnpost-heroku-cron
bc956ae8d8de90ce303cf6797c257b79954f7537
[ "MIT" ]
null
null
null
from __future__ import with_statement from fabric.api import * import requests import pprint import boto import json """ Some defaults """ env.s3_bucket = 'minnpost.data' env.project_name = 'minnpost-cron' def s3_bucket(bucket): """ Select bucket """ env.s3_bucket = bucket def cache_google_spreadsheet_t...
21.508197
107
0.714177
from __future__ import with_statement from fabric.api import * import requests import pprint import boto import json """ Some defaults """ env.s3_bucket = 'minnpost.data' env.project_name = 'minnpost-cron' def s3_bucket(bucket): """ Select bucket """ env.s3_bucket = bucket def cache_google_spreadsheet_t...
0
0
0
e6927d4ece95b86ceada7c692940a82d2c51bda0
263
py
Python
AtCoder/AGC025/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
1
2018-11-25T04:15:45.000Z
2018-11-25T04:15:45.000Z
AtCoder/AGC025/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
null
null
null
AtCoder/AGC025/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
2
2018-08-08T13:01:14.000Z
2018-11-25T12:38:36.000Z
N = int(input()) r = float("inf") for i in range(1, N): A = i B = N - i a = 0 b = 0 while A >= 1: a += A % 10 A /= 10 while B >= 1: b += B % 10 B /= 10 if a + b <= r: r = a + b print(int(r))
12.52381
21
0.323194
N = int(input()) r = float("inf") for i in range(1, N): A = i B = N - i a = 0 b = 0 while A >= 1: a += A % 10 A /= 10 while B >= 1: b += B % 10 B /= 10 if a + b <= r: r = a + b print(int(r))
0
0
0
354d23bb275cf064e3dedcbac4e544b3f0972f63
150
py
Python
django/social_network/feed/urls.py
sixfwa/django-examples
4da7f9d255e622482a8562f0eeb0417d623c9385
[ "MIT" ]
null
null
null
django/social_network/feed/urls.py
sixfwa/django-examples
4da7f9d255e622482a8562f0eeb0417d623c9385
[ "MIT" ]
24
2021-03-19T12:01:04.000Z
2022-02-10T12:21:49.000Z
django/social_network/feed/urls.py
sixfwa/django-examples
4da7f9d255e622482a8562f0eeb0417d623c9385
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path("", views.feed, name="feed"), path("post", views.post, name="post") ]
16.666667
41
0.64
from django.urls import path from . import views urlpatterns = [ path("", views.feed, name="feed"), path("post", views.post, name="post") ]
0
0
0
f27c0861338650a811b0a9e143bf2b344f299a1e
392
py
Python
tamanhostring.py
MatheusSouza70/Exerc-cios-Python
f8878a0c9d62e49db61dcbce0ee10a161e12a894
[ "MIT" ]
1
2022-03-14T01:35:09.000Z
2022-03-14T01:35:09.000Z
tamanhostring.py
MatheusSouza70/Exerc-cios-Python
f8878a0c9d62e49db61dcbce0ee10a161e12a894
[ "MIT" ]
null
null
null
tamanhostring.py
MatheusSouza70/Exerc-cios-Python
f8878a0c9d62e49db61dcbce0ee10a161e12a894
[ "MIT" ]
null
null
null
frase = str(input("Informe algo entre 1 a 10 caracteres: ")) print(fraseprincipal())
28
61
0.602041
frase = str(input("Informe algo entre 1 a 10 caracteres: ")) def fraseprincipal(): if len(frase) > 10: print("Acima do limite de caracteres.") return False elif len(frase) < 1: print("Abaixo do número necessário de caracteres.") return False else: print("Es...
283
0
25
d9a4e095632ea55a1d83eaa1417e34f04e2f2325
2,219
py
Python
Python/teste2/src/main.py
RodrigoGCorrea/estagioIntuitiveCare
4c82ff9842c7270c9d65a6d31c70b2e2f38c4303
[ "MIT" ]
null
null
null
Python/teste2/src/main.py
RodrigoGCorrea/estagioIntuitiveCare
4c82ff9842c7270c9d65a6d31c70b2e2f38c4303
[ "MIT" ]
null
null
null
Python/teste2/src/main.py
RodrigoGCorrea/estagioIntuitiveCare
4c82ff9842c7270c9d65a6d31c70b2e2f38c4303
[ "MIT" ]
null
null
null
# encoding: utf-8 from parse import * from tabula import read_pdf from pdfrw import PdfReader, PdfWriter from pandas import to_numeric, concat from zipfile import ZipFile, ZIP_DEFLATED import os main()
32.632353
108
0.649392
# encoding: utf-8 from parse import * from tabula import read_pdf from pdfrw import PdfReader, PdfWriter from pandas import to_numeric, concat from zipfile import ZipFile, ZIP_DEFLATED import os def main(): # Cortei o pdf para conter somente a parte em que queremos tirar os dados para facilitar o processamento ...
1,997
0
23
0be991d39f906017164e29dde0f547d5ec81b7bf
1,424
py
Python
bayes/challenge-1/data_gen.py
4lrz/ml-newbie
64bbf77fb3b5bf4fe7479eb75ea6182714de36f3
[ "MIT" ]
7
2019-04-18T12:12:50.000Z
2019-04-30T05:47:30.000Z
bayes/challenge-1/data_gen.py
4lrz/ml-newbie
64bbf77fb3b5bf4fe7479eb75ea6182714de36f3
[ "MIT" ]
null
null
null
bayes/challenge-1/data_gen.py
4lrz/ml-newbie
64bbf77fb3b5bf4fe7479eb75ea6182714de36f3
[ "MIT" ]
1
2020-05-31T09:18:07.000Z
2020-05-31T09:18:07.000Z
import bayes.NB as nb import numpy as np import random nb = nb.GaussNB() data = generate_dataset(1000) train_list, test_list = nb.split_data(data, weight=0.8) # print("Using %s rows for training and %s rows for testing" % (len(train_list), len(test_list))) group = nb.group_by_class(data, -1) # designating the last...
26.867925
97
0.609551
import bayes.NB as nb import numpy as np import random def data_generator(mean, cov, count): np.random.seed(1) x, y = np.random.multivariate_normal(mean, cov, count).T # plt.plot(x, y, 'x') # plt.axis('equal') # plt.show() return [x, y] def generate_dataset(count): # class 1 mean1 = ...
803
0
46
d0462abd5a3ad50b073f98d830c1dcb8d789cb4f
18,663
py
Python
WechatBot.py
ChengxiX/WechatEnhanceBot
438254bc0c44b43197cc3b90e843032af393e343
[ "Apache-2.0" ]
2
2021-02-17T04:11:08.000Z
2021-11-19T14:40:19.000Z
WechatBot.py
ChengxiX/WechatEnhanceBot
438254bc0c44b43197cc3b90e843032af393e343
[ "Apache-2.0" ]
null
null
null
WechatBot.py
ChengxiX/WechatEnhanceBot
438254bc0c44b43197cc3b90e843032af393e343
[ "Apache-2.0" ]
null
null
null
from PyWeChatSpy import WeChatSpy from PyWeChatSpy.command import * from PyWeChatSpy.proto import spy_pb2 from lxml import etree import time import logging import os import shutil from queue import Queue import json import random from apscheduler.schedulers.background import BackgroundScheduler import re import uuid ...
48.224806
133
0.455339
from PyWeChatSpy import WeChatSpy from PyWeChatSpy.command import * from PyWeChatSpy.proto import spy_pb2 from lxml import etree import time import logging import os import shutil from queue import Queue import json import random from apscheduler.schedulers.background import BackgroundScheduler import re import uuid ...
18,257
0
46
f3c17fbbdbf185127806baf6be4b9912d78cee9f
637
py
Python
fdk_client/platform/models/Quantities.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/Quantities.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/Quantities.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema from .NotAvailable import NotAvailable from .Sellable import Sellable from .OrderCommitted import OrderCommitted from .Damaged import Damaged
21.233333
67
0.751962
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema from .NotAvailable import NotAvailable from .Sellable import Sellable from .OrderCommitted import OrderCommitted from .Damaged import Damaged class...
0
294
23
e4efbc4844e349e36cf78d83d53369230e7ec9c5
4,387
py
Python
others/fw-verif/8051secureboot/sha/atomic/ila/sim.py
tinochinamora/iw_imdb
89964024bee7f8eaaa25530a8d40155251345be0
[ "MIT" ]
3
2021-09-10T08:14:45.000Z
2022-02-25T04:53:12.000Z
others/fw-verif/8051secureboot/sha/atomic/ila/sim.py
PrincetonUniversity/ILA-Modeling-Verification
88964aad8c465c9da82f1ec66425da9f16fc8d29
[ "MIT" ]
1
2018-06-25T08:49:22.000Z
2018-06-25T08:49:22.000Z
others/fw-verif/8051secureboot/sha/atomic/ila/sim.py
PrincetonUniversity/ILA-Modeling-Verification
88964aad8c465c9da82f1ec66425da9f16fc8d29
[ "MIT" ]
3
2018-06-26T11:31:40.000Z
2021-12-01T20:16:21.000Z
# simulator for synthesizing SHA ILA without child-instructions. from mmio import mmiodev, NOP, RD, WR import sha as SHAFunc
34.007752
101
0.489856
# simulator for synthesizing SHA ILA without child-instructions. from mmio import mmiodev, NOP, RD, WR import sha as SHAFunc def as_chars (s, n): b = [] for i in xrange (n): byte = s & 0xff s >>= 8 b.append (byte) return [chr(i) for i in b] def to_num (s, n): num = 0 for i...
3,599
592
69
8274044b161d333e3d02c5a1a8c4aadb43beed77
11,821
py
Python
Python/airflow/custom_airflow_dag/dags_customer_invoice/postgresql-collect.py
lveagithub/misc_python
1f6b8ca4cbb9f22954a9adb999791a97b522b33a
[ "MIT" ]
null
null
null
Python/airflow/custom_airflow_dag/dags_customer_invoice/postgresql-collect.py
lveagithub/misc_python
1f6b8ca4cbb9f22954a9adb999791a97b522b33a
[ "MIT" ]
null
null
null
Python/airflow/custom_airflow_dag/dags_customer_invoice/postgresql-collect.py
lveagithub/misc_python
1f6b8ca4cbb9f22954a9adb999791a97b522b33a
[ "MIT" ]
null
null
null
from airflow import DAG from datetime import datetime, timedelta from airflow.providers.postgres.operators.postgres import PostgresOperator from airflow.providers.mysql.operators.mysql import MySqlOperator from airflow.providers.postgres.hooks.postgres import PostgresHook from airflow.providers.mysql.hooks.mysql import...
35.605422
308
0.700787
from airflow import DAG from datetime import datetime, timedelta from airflow.providers.postgres.operators.postgres import PostgresOperator from airflow.providers.mysql.operators.mysql import MySqlOperator from airflow.providers.postgres.hooks.postgres import PostgresHook from airflow.providers.mysql.hooks.mysql import...
464
0
23
eb01afe25b9a46e07d51f6148516bcfce352957d
2,993
py
Python
tests/test_run_remote.py
RedisLabsModules/redisbench-admin
d8573d3414e5e846411d2875555deca5c8a7d0f1
[ "Apache-2.0" ]
5
2021-08-03T12:38:30.000Z
2022-03-23T07:35:38.000Z
tests/test_run_remote.py
RedisLabsModules/redisbench-admin
d8573d3414e5e846411d2875555deca5c8a7d0f1
[ "Apache-2.0" ]
91
2021-03-17T12:05:35.000Z
2022-03-29T22:20:00.000Z
tests/test_run_remote.py
RedisLabsModules/redisbench-admin
d8573d3414e5e846411d2875555deca5c8a7d0f1
[ "Apache-2.0" ]
2
2021-06-07T14:06:58.000Z
2021-07-27T10:37:15.000Z
# BSD 3-Clause License # # Copyright (c) 2021., Redis Labs Modules # All rights reserved. # import os import redis from redisbench_admin.run.metrics import collect_redis_metrics from redistimeseries.client import Client from redisbench_admin.run_remote.run_remote import export_redis_metrics
29.343137
84
0.598396
# BSD 3-Clause License # # Copyright (c) 2021., Redis Labs Modules # All rights reserved. # import os import redis from redisbench_admin.run.metrics import collect_redis_metrics from redistimeseries.client import Client from redisbench_admin.run_remote.run_remote import export_redis_metrics def test_export_redis...
2,672
0
23
f91828dda204b8ab4d040a8352b496d3ad165980
2,093
py
Python
volvox-share.py
krylofficiall/volvox-share
8d5493fc87d3e351a8075826494117bde17d6b0d
[ "Apache-2.0" ]
null
null
null
volvox-share.py
krylofficiall/volvox-share
8d5493fc87d3e351a8075826494117bde17d6b0d
[ "Apache-2.0" ]
null
null
null
volvox-share.py
krylofficiall/volvox-share
8d5493fc87d3e351a8075826494117bde17d6b0d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf8 -*- import telebot import os print("Coded and designed by Krylov Vladimir") bot = telebot.TeleBot('your token here') keyboard1 = telebot.types.ReplyKeyboardMarkup() keyboard1.row('Загрузить файл', 'О проекте', 'Просмотр файлов', 'О компьютере') @bot.message_handler(commands=['start']) @bo...
43.604167
123
0.62924
# -*- coding: utf8 -*- import telebot import os print("Coded and designed by Krylov Vladimir") bot = telebot.TeleBot('your token here') keyboard1 = telebot.types.ReplyKeyboardMarkup() keyboard1.row('Загрузить файл', 'О проекте', 'Просмотр файлов', 'О компьютере') @bot.message_handler(commands=['start']) def...
1,931
0
46
00f7cedbcdb513696a3fb6ba02173de127be5efe
52
py
Python
src/models/__init__.py
danieljsmarda/caliskan-embeddingtest-extension
81dcaec71a6db5cbc35a2307da606a308f625a26
[ "MIT" ]
null
null
null
src/models/__init__.py
danieljsmarda/caliskan-embeddingtest-extension
81dcaec71a6db5cbc35a2307da606a308f625a26
[ "MIT" ]
null
null
null
src/models/__init__.py
danieljsmarda/caliskan-embeddingtest-extension
81dcaec71a6db5cbc35a2307da606a308f625a26
[ "MIT" ]
null
null
null
from .bias_calculation import * from .utils import *
26
31
0.788462
from .bias_calculation import * from .utils import *
0
0
0
3f4b25b92bfb2d655012bf2c7736c0bc8ea1068d
6,488
py
Python
model/updating/drn.py
jiaming-wang/N_SR
75eb04647ba0e778476fb0714fa20c8226e968b2
[ "Apache-2.0" ]
9
2020-05-13T14:02:37.000Z
2021-12-06T06:54:47.000Z
model/updating/drn.py
jiaming-wang/N_SR
75eb04647ba0e778476fb0714fa20c8226e968b2
[ "Apache-2.0" ]
1
2021-05-09T13:13:23.000Z
2021-05-11T12:58:32.000Z
model/updating/drn.py
jiaming-wang/N_SR
75eb04647ba0e778476fb0714fa20c8226e968b2
[ "Apache-2.0" ]
6
2020-11-13T08:15:41.000Z
2021-09-15T17:56:58.000Z
#!/usr/bin/env python # coding=utf-8 ''' @Author: wjm @Date: 2020-06-05 11:36:25 @LastEditTime: 2020-06-07 09:23:40 @Description: path_size = 96, batch_size = 32, epoch = 1000, L1, the RCAB block is the same as RCAN. ''' import os import torch.nn as nn import torch.optim as optim from model.base_net import * from torch...
34.328042
140
0.56119
#!/usr/bin/env python # coding=utf-8 ''' @Author: wjm @Date: 2020-06-05 11:36:25 @LastEditTime: 2020-06-07 09:23:40 @Description: path_size = 96, batch_size = 32, epoch = 1000, L1, the RCAB block is the same as RCAN. ''' import os import torch.nn as nn import torch.optim as optim from model.base_net import * from torch...
5,707
15
310
437b0f8276d62c4cb120b15f5d49ca6d23779384
3,732
py
Python
test/resources/boston/single_machine_customer_script.py
Chick-star/sagemaker-xgboost-container
e06e278b3a34515f79fa73ab770b574b9aafe5f0
[ "Apache-2.0" ]
null
null
null
test/resources/boston/single_machine_customer_script.py
Chick-star/sagemaker-xgboost-container
e06e278b3a34515f79fa73ab770b574b9aafe5f0
[ "Apache-2.0" ]
null
null
null
test/resources/boston/single_machine_customer_script.py
Chick-star/sagemaker-xgboost-container
e06e278b3a34515f79fa73ab770b574b9aafe5f0
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
43.395349
120
0.71865
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
0
0
0
07a063645356e44a17a4853cb1bbae9dae1c7966
751
py
Python
legacy/scripts/lookingglasscyber.py
rubidev/wordpress-scraper
c4762b7366c1d17c02e05579d4237823ca0d8056
[ "MIT" ]
13
2021-01-27T10:52:12.000Z
2021-11-29T09:10:25.000Z
legacy/scripts/lookingglasscyber.py
rubidev/wordpress-scraper
c4762b7366c1d17c02e05579d4237823ca0d8056
[ "MIT" ]
1
2021-09-07T14:11:57.000Z
2021-09-07T14:11:57.000Z
legacy/scripts/lookingglasscyber.py
rubidev/wordpress-scraper
c4762b7366c1d17c02e05579d4237823ca0d8056
[ "MIT" ]
2
2021-06-29T06:41:21.000Z
2022-02-16T14:07:23.000Z
from legacy.crawler import crawler import os url = "https://www.lookingglasscyber.com" output_dir = os.path.join('.', 'data', 'lookingglasscyber') headers = { 'Accept':'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding':'*', 'Accept-Language':'zh-CN,zh;q=0.8', 'Connectio...
37.55
139
0.664447
from legacy.crawler import crawler import os url = "https://www.lookingglasscyber.com" output_dir = os.path.join('.', 'data', 'lookingglasscyber') headers = { 'Accept':'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding':'*', 'Accept-Language':'zh-CN,zh;q=0.8', 'Connectio...
0
0
0
432c8afdb731bda4f3c427a3229d3d58f32e0943
79
py
Python
jam/__init__.py
jam-py/jam-py
0c7f359e7a6a6522828da75dc986f87acc072333
[ "BSD-3-Clause" ]
384
2015-01-06T15:09:23.000Z
2022-02-25T19:56:44.000Z
jam/__init__.py
jam-py/jam-py
0c7f359e7a6a6522828da75dc986f87acc072333
[ "BSD-3-Clause" ]
222
2015-01-06T19:11:08.000Z
2022-02-16T06:46:39.000Z
jam/__init__.py
jam-py/jam-py
0c7f359e7a6a6522828da75dc986f87acc072333
[ "BSD-3-Clause" ]
86
2015-01-16T09:50:31.000Z
2022-02-25T13:27:14.000Z
__version__ = (5, 4, 114)
13.166667
35
0.582278
__version__ = (5, 4, 114) def version(): return '%s.%s.%s' % __version__
29
0
23
dfdf22c43986bcf211d199266a97dcedfd2baab5
1,220
py
Python
mwevents/types/tests/test_protection.py
mediawiki-utilities/python-mwevents
cf53334b54b8abae6e5d345b200e5944aff9e5ba
[ "MIT" ]
1
2015-10-14T18:28:41.000Z
2015-10-14T18:28:41.000Z
mwevents/types/tests/test_protection.py
halfak/MediaWiki-events
cf53334b54b8abae6e5d345b200e5944aff9e5ba
[ "MIT" ]
null
null
null
mwevents/types/tests/test_protection.py
halfak/MediaWiki-events
cf53334b54b8abae6e5d345b200e5944aff9e5ba
[ "MIT" ]
1
2018-09-19T11:14:51.000Z
2018-09-19T11:14:51.000Z
from nose.tools import eq_ from ..protection import Protection from ..timestamp import Timestamp from ..unavailable import Unavailable
24.4
73
0.647541
from nose.tools import eq_ from ..protection import Protection from ..timestamp import Timestamp from ..unavailable import Unavailable def test_construction_and_values(): action = "edit" group = "sysop" expiration = None protection = Protection(action, group, expiration) eq_(protection....
1,008
0
69
878049db92ed754df59f3bbdcf43bfcbc1636b4b
99
py
Python
pykin/models/__init__.py
jdj2261/pykin
da952b8ec023382b8a324d1095b0cfd675c7452b
[ "MIT" ]
14
2021-08-09T06:59:10.000Z
2022-03-09T13:05:46.000Z
pykin/models/__init__.py
jdj2261/pykin
da952b8ec023382b8a324d1095b0cfd675c7452b
[ "MIT" ]
null
null
null
pykin/models/__init__.py
jdj2261/pykin
da952b8ec023382b8a324d1095b0cfd675c7452b
[ "MIT" ]
4
2021-12-13T03:23:36.000Z
2022-03-09T11:34:29.000Z
from . import robot_model from . import urdf_model from . import urdf_joint from . import urdf_link
24.75
25
0.808081
from . import robot_model from . import urdf_model from . import urdf_joint from . import urdf_link
0
0
0