hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7081f73c9aff0c80634d1d71479fed9e3fe62cf
2,275
py
Python
AppPkg/Applications/Python/Python-2.7.2/Lib/email/iterators.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/email/iterators.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/email/iterators.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Various types of useful iterators and generators.""" __all__ = [ 'body_line_iterator', 'typed_subpart_iterator', 'walk', # Do not include _structure() since it's part of the debuggi...
30.743243
76
0.634286
__all__ = [ 'body_line_iterator', 'typed_subpart_iterator', 'walk', ] import sys from cStringIO import StringIO # This function will become a method of the Message class def walk(self): yield self if self.is_multipart(): for subpart in self.get_payload(): ...
true
true
f7081fa18c16e5bb9c85414fdde284ae2f611859
766
py
Python
docs/components_page/components/popover/popover.py
imrehg/dash-bootstrap-components
7cf43168808bb88b243e414168dc3bf196fefd84
[ "Apache-2.0" ]
1
2022-01-12T12:36:20.000Z
2022-01-12T12:36:20.000Z
docs/components_page/components/popover/popover.py
imrehg/dash-bootstrap-components
7cf43168808bb88b243e414168dc3bf196fefd84
[ "Apache-2.0" ]
null
null
null
docs/components_page/components/popover/popover.py
imrehg/dash-bootstrap-components
7cf43168808bb88b243e414168dc3bf196fefd84
[ "Apache-2.0" ]
null
null
null
import dash_bootstrap_components as dbc import dash_html_components as html from dash.dependencies import Input, Output, State popover = html.Div( [ dbc.Button( "Click to toggle popover", id="popover-target", color="danger" ), dbc.Popover( [ dbc.Popov...
23.9375
74
0.567885
import dash_bootstrap_components as dbc import dash_html_components as html from dash.dependencies import Input, Output, State popover = html.Div( [ dbc.Button( "Click to toggle popover", id="popover-target", color="danger" ), dbc.Popover( [ dbc.Popov...
true
true
f708206218289bf8000412c8894fb2157df7e624
1,891
py
Python
count.py
romain-fontugne/roa-counter
35413f036a0a75088ae318dfa3df58b3cbce6095
[ "Apache-2.0" ]
1
2022-01-24T03:09:00.000Z
2022-01-24T03:09:00.000Z
count.py
romain-fontugne/roa-counter
35413f036a0a75088ae318dfa3df58b3cbce6095
[ "Apache-2.0" ]
null
null
null
count.py
romain-fontugne/roa-counter
35413f036a0a75088ae318dfa3df58b3cbce6095
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from matplotlib import pylab as plt from requests_cache import CachedSession CACHE_EXPIRATION_SECS = 3600*24*356 YEAR_RANGE = range(2018, 2022) MARKERS = ["o", "s", "d", "+", "*"] RIRS = { 'AFRINIC': { 'url': 'https://ftp.ripe.net/ripe/rpki/afrinic.tal/', ...
28.223881
76
0.523533
from datetime import datetime from matplotlib import pylab as plt from requests_cache import CachedSession CACHE_EXPIRATION_SECS = 3600*24*356 YEAR_RANGE = range(2018, 2022) MARKERS = ["o", "s", "d", "+", "*"] RIRS = { 'AFRINIC': { 'url': 'https://ftp.ripe.net/ripe/rpki/afrinic.tal/', ...
true
true
f7082128eda5b64f709d36b4c5d806504c82228c
11,398
py
Python
python_poc/adapters/modbus_generic_adapter.py
pervcomp/Procem
6cefbf6c81b51af948feb9510d39820f8e6f113e
[ "MIT" ]
1
2019-01-09T14:38:44.000Z
2019-01-09T14:38:44.000Z
python_poc/adapters/modbus_generic_adapter.py
pervcomp/Procem
6cefbf6c81b51af948feb9510d39820f8e6f113e
[ "MIT" ]
4
2021-03-09T00:03:21.000Z
2022-02-12T05:33:21.000Z
python_poc/adapters/modbus_generic_adapter.py
pervcomp/Procem
6cefbf6c81b51af948feb9510d39820f8e6f113e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """This module contains an adapter for reading Modbus data and sending it to Procem RTL worker.""" # Copyright (c) TUT Tampere University of Technology 2015-2018. # This software has been developed in Procem-project funded by Business Finland. # This code is licensed under the MIT license. # Se...
43.503817
113
0.650465
from pymodbus.client.sync import ModbusTcpClient as ModbusClient import datetime import queue import socket import threading import time import sys try: import adapters.common_utils as common_utils import adapters.modbus_generic_model as modbus_generic_model import adapters.modbus_utils as modbus...
true
true
f70821c9013bef20bbd4b8e6e4c8fe921bf44021
1,306
py
Python
ooobuild/lo/embed/hatch_window_factory.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/embed/hatch_window_factory.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/embed/hatch_window_factory.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
30.372093
138
0.742726
from .x_hatch_window_factory import XHatchWindowFactory as XHatchWindowFactory_167d0e95 class HatchWindowFactory(XHatchWindowFactory_167d0e95): __ooo_ns__: str = 'com.sun.star.embed' __ooo_full_ns__: str = 'com.sun.star.embed.HatchWindowFactory' __ooo_type_name__: str = 'service' __a...
true
true
f7082209033fa16bf0b05b5db5d4f2960b3c91f8
4,412
py
Python
hotsos/core/host_helpers/config.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
6
2021-10-01T19:46:14.000Z
2022-03-31T17:05:08.000Z
hotsos/core/host_helpers/config.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
hotsos/core/host_helpers/config.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
10
2021-09-29T14:47:54.000Z
2022-03-18T14:52:16.000Z
import os import re class ConfigBase(object): def __init__(self, path): self.path = path @classmethod def squash_int_range(cls, ilist): """Takes a list of integers and squashes consecutive values into a string range. Returned list contains mix of strings and ints. """ ...
28.836601
78
0.487307
import os import re class ConfigBase(object): def __init__(self, path): self.path = path @classmethod def squash_int_range(cls, ilist): irange = [] rstart = None rprev = None sorted(ilist) for i, value in enumerate(ilist): if rstart is None: ...
true
true
f708227bdf1894da2e5054f9584b6866a12bb72f
37,497
py
Python
google/cloud/monitoring_v3/services/alert_policy_service/client.py
nicain/python-monitoring
bda4852bbe6eb28b1c93b4a785eac167b57cb7d8
[ "Apache-2.0" ]
null
null
null
google/cloud/monitoring_v3/services/alert_policy_service/client.py
nicain/python-monitoring
bda4852bbe6eb28b1c93b4a785eac167b57cb7d8
[ "Apache-2.0" ]
null
null
null
google/cloud/monitoring_v3/services/alert_policy_service/client.py
nicain/python-monitoring
bda4852bbe6eb28b1c93b4a785eac167b57cb7d8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
43.85614
109
0.628317
from collections import OrderedDict from distutils import util import os import re from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions ...
true
true
f708235276521e1055a17f1e583e94359571464b
407
py
Python
malib/algorithm/ddpg/__init__.py
zbzhu99/malib
5be07ac00761a34fb095adb2b3018a798ceea256
[ "MIT" ]
null
null
null
malib/algorithm/ddpg/__init__.py
zbzhu99/malib
5be07ac00761a34fb095adb2b3018a798ceea256
[ "MIT" ]
null
null
null
malib/algorithm/ddpg/__init__.py
zbzhu99/malib
5be07ac00761a34fb095adb2b3018a798ceea256
[ "MIT" ]
null
null
null
from .policy import DDPG from .trainer import DDPGTrainer from .loss import DDPGLoss NAME = "DDPG" LOSS = DDPGLoss TRAINER = DDPGTrainer POLICY = DDPG CONFIG = { "training": { "update_interval": 1, "batch_size": 1024, "tau": 0.01, "optimizer": "Adam", "actor_lr": 1e-2, ...
16.958333
34
0.565111
from .policy import DDPG from .trainer import DDPGTrainer from .loss import DDPGLoss NAME = "DDPG" LOSS = DDPGLoss TRAINER = DDPGTrainer POLICY = DDPG CONFIG = { "training": { "update_interval": 1, "batch_size": 1024, "tau": 0.01, "optimizer": "Adam", "actor_lr": 1e-2, ...
true
true
f708236a902da8255569087afbd1a500653aa211
7,208
py
Python
modules/android.py
inzanez/pdfium-lib
f4e6fbb3b29c100ff3f291944944fd7e38fafbcd
[ "MIT" ]
69
2021-01-27T18:53:22.000Z
2022-02-25T00:41:41.000Z
modules/android.py
inzanez/pdfium-lib
f4e6fbb3b29c100ff3f291944944fd7e38fafbcd
[ "MIT" ]
31
2021-01-23T17:14:46.000Z
2022-03-04T18:06:23.000Z
modules/android.py
inzanez/pdfium-lib
f4e6fbb3b29c100ff3f291944944fd7e38fafbcd
[ "MIT" ]
19
2021-01-27T18:57:07.000Z
2022-01-04T02:56:03.000Z
import glob import os import tarfile from subprocess import check_call import modules.config as c import modules.functions as f def run_task_build_pdfium(): f.debug("Building PDFium...") target = "android" build_dir = os.path.join("build", target) f.create_dir(build_dir) target_dir = os.path.jo...
29.182186
88
0.517064
import glob import os import tarfile from subprocess import check_call import modules.config as c import modules.functions as f def run_task_build_pdfium(): f.debug("Building PDFium...") target = "android" build_dir = os.path.join("build", target) f.create_dir(build_dir) target_dir = os.path.jo...
true
true
f708236d0f78899c556252304ef35f5ad77e4c31
16,269
py
Python
rlkit/torch/networks.py
NagisaZj/ProMP
539739ae2b7d5fdcad00855da695f643b23df4b3
[ "MIT" ]
null
null
null
rlkit/torch/networks.py
NagisaZj/ProMP
539739ae2b7d5fdcad00855da695f643b23df4b3
[ "MIT" ]
null
null
null
rlkit/torch/networks.py
NagisaZj/ProMP
539739ae2b7d5fdcad00855da695f643b23df4b3
[ "MIT" ]
null
null
null
""" General networks for pytorch. Algorithm-specific networks should go else-where. """ import torch from torch import nn as nn from torch.nn import functional as F from rlkit.policies.base import Policy from rlkit.torch import pytorch_util as ptu from rlkit.torch.core import PyTorchModule from rlkit.torch.data_manag...
32.933198
101
0.605262
import torch from torch import nn as nn from torch.nn import functional as F from rlkit.policies.base import Policy from rlkit.torch import pytorch_util as ptu from rlkit.torch.core import PyTorchModule from rlkit.torch.data_management.normalizer import TorchFixedNormalizer from rlkit.torch.modules import LayerNorm im...
true
true
f70824aa75c16cfcf7a1046989c882d7009972df
1,551
py
Python
src/gists-gihub/9ba0c82b846dba2566fbf72d06be0b65/test01.py
MrPivato/arquivos-de-procedencia-duvidosa
62ee2cdef0d1b3a25566671411575db1916706f9
[ "MIT" ]
null
null
null
src/gists-gihub/9ba0c82b846dba2566fbf72d06be0b65/test01.py
MrPivato/arquivos-de-procedencia-duvidosa
62ee2cdef0d1b3a25566671411575db1916706f9
[ "MIT" ]
null
null
null
src/gists-gihub/9ba0c82b846dba2566fbf72d06be0b65/test01.py
MrPivato/arquivos-de-procedencia-duvidosa
62ee2cdef0d1b3a25566671411575db1916706f9
[ "MIT" ]
null
null
null
''' multilinha comentario aqui ''' a = 10 b = 2 val1 = 123456 val2 = "sopa de ....." val3 = 123.123 print("\n") # operadores logicos print(a == b) # vc ja sabe oq eh print(a != b) # vc ja sabe oq eh print(a < b) # vc ja sabe oq eh print(a >= b) # vc ja sabe oq eh print(a <= b) # vc ja sabe oq eh print("\n") # m...
24.619048
68
0.643456
a = 10 b = 2 val1 = 123456 val2 = "sopa de ....." val3 = 123.123 print("\n") print(a == b) print(a != b) print(a < b) print(a >= b) print(a <= b) print("\n") print(a**b) print(a**(a + b)) print(a**(a + b) % 7) print("\n") print(type(val1)) print(type(val2)) print(type(val3)) print(ty...
true
true
f70824ffe664a17d8bdf048e954d141fb89d84df
832
py
Python
setup.py
gruentee/fever-api
58811ef7527482b77b28d291993afa2c63aa60c0
[ "Apache-2.0" ]
null
null
null
setup.py
gruentee/fever-api
58811ef7527482b77b28d291993afa2c63aa60c0
[ "Apache-2.0" ]
null
null
null
setup.py
gruentee/fever-api
58811ef7527482b77b28d291993afa2c63aa60c0
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages import sys with open('requirements.txt') as f: reqs = f.read() reqs = reqs.strip().split('\n') install = [req for req in reqs if not req.startswith("git+git://")] depends = [req.replace("git+git://", "git+http://") for req in reqs if req.startswith("git+git://")] setu...
26.83871
100
0.620192
from setuptools import setup, find_packages import sys with open('requirements.txt') as f: reqs = f.read() reqs = reqs.strip().split('\n') install = [req for req in reqs if not req.startswith("git+git://")] depends = [req.replace("git+git://", "git+http://") for req in reqs if req.startswith("git+git://")] setu...
true
true
f708250955cabd36d394352f565efdbc6e091c63
2,213
py
Python
tests/text/test_sentsplit.py
evendrow/ifcc
ae6ea6f19028ba5d367c086fe94cfe4237829059
[ "Apache-2.0" ]
43
2020-10-21T03:25:21.000Z
2022-03-26T08:13:06.000Z
tests/text/test_sentsplit.py
evendrow/ifcc
ae6ea6f19028ba5d367c086fe94cfe4237829059
[ "Apache-2.0" ]
8
2020-12-04T15:06:45.000Z
2022-03-28T12:18:14.000Z
tests/text/test_sentsplit.py
evendrow/ifcc
ae6ea6f19028ba5d367c086fe94cfe4237829059
[ "Apache-2.0" ]
10
2020-11-13T03:46:09.000Z
2022-02-05T21:39:52.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from clinicgen.text.sentsplit import LineBreakSplitter, NLTKSentenceSplitter, SpaCySentenceSplitter, StanzaSentenceSplitter class TestLineBreakSplitter(unittest.TestCase): def test_split(self): splitter = LineBreakSplitter() text = 'He...
43.392157
123
0.694984
import unittest from clinicgen.text.sentsplit import LineBreakSplitter, NLTKSentenceSplitter, SpaCySentenceSplitter, StanzaSentenceSplitter class TestLineBreakSplitter(unittest.TestCase): def test_split(self): splitter = LineBreakSplitter() text = 'Hello NLP! Running a test\nof sentence splitti...
true
true
f70825c17a7334392f3af2030a67a375fb7d0b26
5,698
py
Python
cruft/_commands/utils/generate.py
lkubb/cruft
0c6de85d974197969c0e65913857eaa36b788e5e
[ "MIT" ]
293
2020-08-18T05:52:45.000Z
2022-03-31T20:39:43.000Z
cruft/_commands/utils/generate.py
lkubb/cruft
0c6de85d974197969c0e65913857eaa36b788e5e
[ "MIT" ]
102
2020-08-28T16:38:34.000Z
2022-03-31T11:01:41.000Z
cruft/_commands/utils/generate.py
lkubb/cruft
0c6de85d974197969c0e65913857eaa36b788e5e
[ "MIT" ]
36
2020-08-28T16:34:10.000Z
2022-03-31T21:55:53.000Z
import os import stat from pathlib import Path from shutil import move, rmtree from typing import Optional, Set, Union from warnings import warn from cookiecutter.generate import generate_files from git import Repo from .cookiecutter import CookiecutterContext, generate_cookiecutter_context from .cruft import CruftSt...
35.836478
99
0.68252
import os import stat from pathlib import Path from shutil import move, rmtree from typing import Optional, Set, Union from warnings import warn from cookiecutter.generate import generate_files from git import Repo from .cookiecutter import CookiecutterContext, generate_cookiecutter_context from .cruft import CruftSt...
true
true
f70827e38991a94ce5912d7f8da1ac9aef505f01
316
py
Python
ML_CW1/assgn_1_part_1/2_multiple_variables/plot_cost.py
ShellySrivastava/Machine-Learning
bfdea30c06abe4228c103ae525adcf990015983f
[ "MIT" ]
null
null
null
ML_CW1/assgn_1_part_1/2_multiple_variables/plot_cost.py
ShellySrivastava/Machine-Learning
bfdea30c06abe4228c103ae525adcf990015983f
[ "MIT" ]
null
null
null
ML_CW1/assgn_1_part_1/2_multiple_variables/plot_cost.py
ShellySrivastava/Machine-Learning
bfdea30c06abe4228c103ae525adcf990015983f
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import os def plot_cost(cost): fig, ax1 = plt.subplots() ax1.set_xlabel('Iterations') ax1.set_ylabel('Cost') plt.plot(cost) fig.tight_layout() plot_filename = os.path.join(os.getcwd(), 'figures', 'cost.png') plt.savefig(plot_filename) plt.show()
22.571429
68
0.661392
import matplotlib.pyplot as plt import os def plot_cost(cost): fig, ax1 = plt.subplots() ax1.set_xlabel('Iterations') ax1.set_ylabel('Cost') plt.plot(cost) fig.tight_layout() plot_filename = os.path.join(os.getcwd(), 'figures', 'cost.png') plt.savefig(plot_filename) plt.show()
true
true
f7082804270c08c354dbffdcaf9e8d5dc7390978
34
py
Python
settable_generator/__init__.py
markusschmaus/map_structure
f1417230cff2657b28dcb44f70ef38ed02d7ba7d
[ "MIT" ]
null
null
null
settable_generator/__init__.py
markusschmaus/map_structure
f1417230cff2657b28dcb44f70ef38ed02d7ba7d
[ "MIT" ]
null
null
null
settable_generator/__init__.py
markusschmaus/map_structure
f1417230cff2657b28dcb44f70ef38ed02d7ba7d
[ "MIT" ]
null
null
null
from .settable_generator import *
17
33
0.823529
from .settable_generator import *
true
true
f70828b88a42c74567ef99b3f01c0cad6c366906
2,053
py
Python
tensorflow_datasets/image/__init__.py
ubershmekel/datasets
555220a3bf048a1bed6aed5db97696fb83088b83
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/image/__init__.py
ubershmekel/datasets
555220a3bf048a1bed6aed5db97696fb83088b83
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/image/__init__.py
ubershmekel/datasets
555220a3bf048a1bed6aed5db97696fb83088b83
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
50.073171
97
0.857282
from tensorflow_datasets.image.cats_vs_dogs import CatsVsDogs from tensorflow_datasets.image.celeba import CelebA from tensorflow_datasets.image.celebahq import CelebAHq from tensorflow_datasets.image.chexpert import Chexpert from tensorflow_datasets.image.cifar import Cifar10 from tensorflow_datasets.i...
true
true
f708296b42266a152e2db50c2035ba466629cfe8
4,729
py
Python
src/TOU.py
e2thenegpii/EnergyCalc
6036b08d01eafae33e80e8754c0e0215c78db6fe
[ "MIT" ]
null
null
null
src/TOU.py
e2thenegpii/EnergyCalc
6036b08d01eafae33e80e8754c0e0215c78db6fe
[ "MIT" ]
null
null
null
src/TOU.py
e2thenegpii/EnergyCalc
6036b08d01eafae33e80e8754c0e0215c78db6fe
[ "MIT" ]
null
null
null
from enum import Enum from datetime import datetime, date from dateutil.relativedelta import relativedelta, MO import argparse import holidays import pandas as pd class BGEHolidays(holidays.HolidayBase): def _populate(self, year): holidays.UnitedStates._populate(self, year) # Remove Martin Luther...
34.021583
137
0.554663
from enum import Enum from datetime import datetime, date from dateutil.relativedelta import relativedelta, MO import argparse import holidays import pandas as pd class BGEHolidays(holidays.HolidayBase): def _populate(self, year): holidays.UnitedStates._populate(self, year) self.pop(date...
true
true
f7082a6f9e21d7c86d50e21ff2f273fcab648c48
110
py
Python
oppurtunity/admin.py
ParasBotadra/djangocrm
aeb5f6af35e74c4509ef5731549ce4ed445263d7
[ "MIT" ]
2
2018-02-15T15:33:00.000Z
2018-02-15T16:29:12.000Z
oppurtunity/admin.py
ParasBotadra/djangocrm
aeb5f6af35e74c4509ef5731549ce4ed445263d7
[ "MIT" ]
1
2018-08-31T08:54:22.000Z
2018-08-31T08:54:22.000Z
oppurtunity/admin.py
ParasBotadra/djangocrm
aeb5f6af35e74c4509ef5731549ce4ed445263d7
[ "MIT" ]
12
2017-11-02T22:32:32.000Z
2018-04-12T05:13:25.000Z
from django.contrib import admin from oppurtunity.models import Opportunity admin.site.register(Opportunity)
22
42
0.854545
from django.contrib import admin from oppurtunity.models import Opportunity admin.site.register(Opportunity)
true
true
f7082ad992bcca14397fb0a69109b4b7dd0df0b1
6,541
py
Python
FRAMS_STUDENT.py
AshwinRameshP/AttendanceSystem_FaceRecognition
23c590c10ac296816d7cff23445d28c3863d0138
[ "MIT" ]
1
2021-02-17T19:36:20.000Z
2021-02-17T19:36:20.000Z
FRAMS_STUDENT.py
AshwinRameshP/AttendanceSystem_FaceRecognition
23c590c10ac296816d7cff23445d28c3863d0138
[ "MIT" ]
null
null
null
FRAMS_STUDENT.py
AshwinRameshP/AttendanceSystem_FaceRecognition
23c590c10ac296816d7cff23445d28c3863d0138
[ "MIT" ]
null
null
null
import tkinter as tk from tkinter import * import cv2 import csv import os import numpy as np from PIL import Image,ImageTk import pandas as pd import datetime import time ##Error screen2 def del_sc2(): sc2.destroy() def err_screen1(): global sc2 sc2 = tk.Tk() sc2.geometry('300x100') sc2.iconbitma...
41.138365
165
0.504663
import tkinter as tk from tkinter import * import cv2 import csv import os import numpy as np from PIL import Image,ImageTk import pandas as pd import datetime import time : sc2.destroy() def err_screen1(): global sc2 sc2 = tk.Tk() sc2.geometry('300x100') sc2.iconbitmap('FRAMS.ico') sc2.title(...
true
true
f7082d5845fd1efee69baec36ac43ffaecac25f9
9,352
py
Python
tensorflow_text/python/ops/bert_tokenizer.py
hanneshapke/text
8bebbbe28749de5509be474bc475cef83490f013
[ "Apache-2.0" ]
null
null
null
tensorflow_text/python/ops/bert_tokenizer.py
hanneshapke/text
8bebbbe28749de5509be474bc475cef83490f013
[ "Apache-2.0" ]
null
null
null
tensorflow_text/python/ops/bert_tokenizer.py
hanneshapke/text
8bebbbe28749de5509be474bc475cef83490f013
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 TF.Text Authors. # # 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 ag...
41.017544
80
0.70648
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import lookup_ops fr...
true
true
f7082efb53a2eda2c514e37d2265b58567d794a1
29,415
py
Python
python/ccxt/bithumb.py
DanPmkr/ccxt
0a6cc2b805323b5ec226feff2347f07194104364
[ "MIT" ]
null
null
null
python/ccxt/bithumb.py
DanPmkr/ccxt
0a6cc2b805323b5ec226feff2347f07194104364
[ "MIT" ]
null
null
null
python/ccxt/bithumb.py
DanPmkr/ccxt
0a6cc2b805323b5ec226feff2347f07194104364
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import base64 import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors impor...
39.115691
292
0.478599
ge import Exchange import base64 import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors import InvalidAddress ...
true
true
f7082effdfcc3ae6724076920b4094deda3a13b3
5,123
py
Python
btc/ecpoint.py
DagonR/simplebtclib
63ad331902433cc8c357463eea2fe73bb8831c73
[ "MIT" ]
null
null
null
btc/ecpoint.py
DagonR/simplebtclib
63ad331902433cc8c357463eea2fe73bb8831c73
[ "MIT" ]
null
null
null
btc/ecpoint.py
DagonR/simplebtclib
63ad331902433cc8c357463eea2fe73bb8831c73
[ "MIT" ]
null
null
null
from btc.utils import mod_inverse, int2hex # Parameters for SECP256k1 elliptic curve (used by Bitcoin) SECP256K1_A = 0 SECP256K1_B = 7 SECP256K1_GX = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 SECP256K1_GY = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 SECP256K1_P = 2**25...
27.543011
84
0.519813
from btc.utils import mod_inverse, int2hex SECP256K1_A = 0 SECP256K1_B = 7 SECP256K1_GX = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 SECP256K1_GY = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 SECP256K1_P = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 - 1 SECP256K1_...
true
true
f708301dab84462cdc546c456f38ab6d6b2e0329
10,506
py
Python
addons/mixer/blender_data/struct_proxy.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
null
null
null
addons/mixer/blender_data/struct_proxy.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
null
null
null
addons/mixer/blender_data/struct_proxy.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
null
null
null
# GPLv3 License # # Copyright (C) 2020 Ubisoft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is dis...
38.625
119
0.642395
from __future__ import annotations from functools import lru_cache import logging from typing import Optional, Tuple, TYPE_CHECKING, Union import bpy.types as T from mixer.blender_data import specifics from mixer.blender_data.attributes import apply_attribute, diff_attribute, read_attribute, write...
true
true
f70830a1dfe16d9acb4b0fb3104b724a08d7490c
2,893
py
Python
inference.py
riotu-lab/tf2trt_with_onnx
f9828ed99af5530836bf6ee608e631502dfb0f02
[ "MIT" ]
12
2020-10-08T21:59:28.000Z
2022-02-05T00:13:41.000Z
inference.py
riotu-lab/tf2trt_with_onnx
f9828ed99af5530836bf6ee608e631502dfb0f02
[ "MIT" ]
3
2020-11-19T15:13:17.000Z
2022-03-07T06:54:45.000Z
inference.py
riotu-lab/tf2trt_with_onnx
f9828ed99af5530836bf6ee608e631502dfb0f02
[ "MIT" ]
7
2020-10-08T21:59:13.000Z
2022-01-20T06:37:15.000Z
import tensorrt as trt import pycuda.driver as cuda import numpy as np import pycuda.autoinit def allocate_buffers(engine, batch_size, data_type): """ This is the function to allocate buffers for input and output in the device Args: engine : The path to the TensorRT engine. batch_size : The bat...
36.1625
125
0.696854
import tensorrt as trt import pycuda.driver as cuda import numpy as np import pycuda.autoinit def allocate_buffers(engine, batch_size, data_type): h_input_1 = cuda.pagelocked_empty(batch_size * trt.volume(engine.get_binding_shape(0)), dtype=trt.nptype(data_type)) h_output = cuda.pagelocked_empty(batch_siz...
true
true
f70831b92f771b21149a5234b61179e970fa0c1c
2,406
py
Python
parquet/__main__.py
snowch/parquet-python
e2caab7aceca91a3075998d0113e186f8ba2ca37
[ "Apache-2.0" ]
1
2019-03-23T15:15:49.000Z
2019-03-23T15:15:49.000Z
parquet/__main__.py
snowch/parquet-python
e2caab7aceca91a3075998d0113e186f8ba2ca37
[ "Apache-2.0" ]
null
null
null
parquet/__main__.py
snowch/parquet-python
e2caab7aceca91a3075998d0113e186f8ba2ca37
[ "Apache-2.0" ]
null
null
null
"""parquet - tool for inspecting parquet files.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import logging import sys def setup_logging(options=None): """Configure logging based on options...
36.454545
79
0.621363
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import logging import sys def setup_logging(options=None): level = logging.DEBUG if options is not None and options.debug \ else logging.WA...
true
true
f70831d31c18c271d339fcd121ce8405c9acc39f
1,722
py
Python
tests/test_assembler.py
proksee-project/proksee-cmd
c8a3eaaf1b0f46a0842972f54f805bbf6a2936ab
[ "Apache-2.0" ]
null
null
null
tests/test_assembler.py
proksee-project/proksee-cmd
c8a3eaaf1b0f46a0842972f54f805bbf6a2936ab
[ "Apache-2.0" ]
2
2021-10-21T16:55:04.000Z
2021-12-10T17:25:38.000Z
tests/test_assembler.py
proksee-project/proksee-cmd
c8a3eaaf1b0f46a0842972f54f805bbf6a2936ab
[ "Apache-2.0" ]
null
null
null
""" Copyright Government of Canada 2021 Written by: Eric Marinier, National Microbiology Laboratory, Public Health Agency of Canada Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License at: htt...
35.142857
79
0.75784
import os from pathlib import Path from proksee.assembler import Assembler from proksee.reads import Reads from proksee.skesa_assembler import SkesaAssembler from proksee.resource_specification import ResourceSpecification INPUT_DIR = os.path.join(Path(__file__).parent.absolute(), "data") OUTPUT_DIR = os.path.join(P...
true
true
f70832591120e472b3249e3d56d542f352f77c6e
2,011
py
Python
2021/day15.py
tcbegley/advent-of-code
e293d06e9cd994b26c0d10619672a6d8d2d65377
[ "MIT" ]
6
2021-12-05T11:21:17.000Z
2021-12-07T03:04:24.000Z
2021/day15.py
tcbegley/advent-of-code
e293d06e9cd994b26c0d10619672a6d8d2d65377
[ "MIT" ]
null
null
null
2021/day15.py
tcbegley/advent-of-code
e293d06e9cd994b26c0d10619672a6d8d2d65377
[ "MIT" ]
null
null
null
import heapq import sys from itertools import product def load_data(path): with open(path) as f: return { (i, j): int(value) for i, line in enumerate(f.readlines()) for j, value in enumerate(line.strip()) } def get_neighbours(loc, n_rows, n_cols): neighbou...
24.52439
79
0.526604
import heapq import sys from itertools import product def load_data(path): with open(path) as f: return { (i, j): int(value) for i, line in enumerate(f.readlines()) for j, value in enumerate(line.strip()) } def get_neighbours(loc, n_rows, n_cols): neighbou...
true
true
f708346fbf06081c549ed239fbba07d0ba8a6bb1
2,176
py
Python
mediathekDownloader/vsMetaInfoGenerator.py
TomMeHo/mediathekDownloader
645f76b5df6710ee7cd8c761c44e6e61c026d849
[ "MIT" ]
1
2022-01-26T19:09:56.000Z
2022-01-26T19:09:56.000Z
mediathekDownloader/vsMetaInfoGenerator.py
TomMeHo/mediathekDownloader
645f76b5df6710ee7cd8c761c44e6e61c026d849
[ "MIT" ]
null
null
null
mediathekDownloader/vsMetaInfoGenerator.py
TomMeHo/mediathekDownloader
645f76b5df6710ee7cd8c761c44e6e61c026d849
[ "MIT" ]
null
null
null
import re from vsmetaEncoder import vsmetaInfo from datetime import datetime, date class VsMetaInfoGenerator(vsmetaInfo.VsMetaInfo): def __init__(self, feedItem): super(VsMetaInfoGenerator, self).__init__() self.feedItem = feedItem self.download_url = '' # parse feedItem ...
43.52
146
0.613511
import re from vsmetaEncoder import vsmetaInfo from datetime import datetime, date class VsMetaInfoGenerator(vsmetaInfo.VsMetaInfo): def __init__(self, feedItem): super(VsMetaInfoGenerator, self).__init__() self.feedItem = feedItem self.download_url = '' if hasattr(fee...
true
true
f7083472e4dfe4d2a370ff6e2b3b22f4880c3fc2
3,213
py
Python
lingvo/tasks/car/pointnet_test.py
argideritzalpea/lingvo
0b13f9b02f8cf2167a1b80a43222257f2140e1e8
[ "Apache-2.0" ]
null
null
null
lingvo/tasks/car/pointnet_test.py
argideritzalpea/lingvo
0b13f9b02f8cf2167a1b80a43222257f2140e1e8
[ "Apache-2.0" ]
null
null
null
lingvo/tasks/car/pointnet_test.py
argideritzalpea/lingvo
0b13f9b02f8cf2167a1b80a43222257f2140e1e8
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. 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 # ...
40.1625
80
0.691566
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized from lingvo import compat as tf from lingvo.core import py_utils from lingvo.core import test_utils from lingvo.tasks.car import pointnet class PointNetT...
true
true
f70834ecb56114e1accacc671d423b1fb09b1f29
894
py
Python
migrations/versions/f025f89b250b_.py
Misschl/flask-fresh
df17fd377b9e27aaad9fe0c5582c56098d09068c
[ "Apache-2.0" ]
null
null
null
migrations/versions/f025f89b250b_.py
Misschl/flask-fresh
df17fd377b9e27aaad9fe0c5582c56098d09068c
[ "Apache-2.0" ]
null
null
null
migrations/versions/f025f89b250b_.py
Misschl/flask-fresh
df17fd377b9e27aaad9fe0c5582c56098d09068c
[ "Apache-2.0" ]
1
2020-12-21T14:01:53.000Z
2020-12-21T14:01:53.000Z
"""empty message Revision ID: f025f89b250b Revises: 37eabcbbb8fb Create Date: 2019-10-19 18:12:48.976655 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f025f89b250b' down_revision = '37eabcbbb8fb' branch_labels = None depends_on = None def upgrade(): # ...
25.542857
70
0.684564
from alembic import op import sqlalchemy as sa revision = 'f025f89b250b' down_revision = '37eabcbbb8fb' branch_labels = None depends_on = None def upgrade(): e', sa.String(length=255), nullable=True), sa.ForeignKeyConstraint(['sku'], ['df_goods_sku.id'], ), sa.PrimaryKeyConstraint('id') )
true
true
f708357a9d0245994baa7acb8be387d0dcb38cf4
2,347
py
Python
databuilder/extractor/dashboard/mode_analytics/mode_dashboard_usage_extractor.py
lynrayjumo/amundsendatabuilder
f1e7e246f8f4f72ad0ef5df3ef52e0e379e078f8
[ "Apache-2.0" ]
null
null
null
databuilder/extractor/dashboard/mode_analytics/mode_dashboard_usage_extractor.py
lynrayjumo/amundsendatabuilder
f1e7e246f8f4f72ad0ef5df3ef52e0e379e078f8
[ "Apache-2.0" ]
1
2020-07-07T08:44:33.000Z
2020-07-07T08:44:33.000Z
databuilder/extractor/dashboard/mode_analytics/mode_dashboard_usage_extractor.py
lynrayjumo/amundsendatabuilder
f1e7e246f8f4f72ad0ef5df3ef52e0e379e078f8
[ "Apache-2.0" ]
1
2020-08-12T09:51:58.000Z
2020-08-12T09:51:58.000Z
import logging from pyhocon import ConfigTree # noqa: F401 from typing import Any # noqa: F401 from databuilder.extractor.base_extractor import Extractor from databuilder.extractor.dashboard.mode_analytics.mode_dashboard_utils import ModeDashboardUtils from databuilder.rest_api.mode_analytics.mode_paginated_rest_ap...
39.116667
118
0.688539
import logging from pyhocon import ConfigTree from typing import Any from databuilder.extractor.base_extractor import Extractor from databuilder.extractor.dashboard.mode_analytics.mode_dashboard_utils import ModeDashboardUtils from databuilder.rest_api.mode_analytics.mode_paginated_rest_api_query import ModePagin...
true
true
f70835b4ce9ae1fc5c692777609f137cc7b8f0ac
536
py
Python
vehicle/signals.py
COS301-SE-2020/ctrlintelligencecapstone
ddfc92408ed296c6bf64b2dd071b948a1446ede8
[ "MIT" ]
null
null
null
vehicle/signals.py
COS301-SE-2020/ctrlintelligencecapstone
ddfc92408ed296c6bf64b2dd071b948a1446ede8
[ "MIT" ]
null
null
null
vehicle/signals.py
COS301-SE-2020/ctrlintelligencecapstone
ddfc92408ed296c6bf64b2dd071b948a1446ede8
[ "MIT" ]
1
2021-05-18T02:53:10.000Z
2021-05-18T02:53:10.000Z
from django.db.models.signals import post_save from django.dispatch import receiver from .models import Vehicle, ImageSpacec from darknet_dmg import detect @receiver(post_save, sender=Vehicle) def damage_detection(sender, instance, **kwargs): image = ImageSpace.objects.filter(vehicle=instance.id).last() path =...
38.285714
145
0.774254
from django.db.models.signals import post_save from django.dispatch import receiver from .models import Vehicle, ImageSpacec from darknet_dmg import detect @receiver(post_save, sender=Vehicle) def damage_detection(sender, instance, **kwargs): image = ImageSpace.objects.filter(vehicle=instance.id).last() path =...
true
true
f708362f3738f4d4e8d3a496b9a1cf7f11134174
1,981
py
Python
src/webapp/pages/about.py
christianbernasconi96/ProductNetworkAnalysis
4d7a003cc81471f43a918a761c941e2effb7d2a3
[ "MIT" ]
null
null
null
src/webapp/pages/about.py
christianbernasconi96/ProductNetworkAnalysis
4d7a003cc81471f43a918a761c941e2effb7d2a3
[ "MIT" ]
null
null
null
src/webapp/pages/about.py
christianbernasconi96/ProductNetworkAnalysis
4d7a003cc81471f43a918a761c941e2effb7d2a3
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html about_layout = [html.Div(children=[ html.Img(src='/assets/logo.png', className='logo-big', style={'marginTop': 'auto', 'marginBottom': 'auto'}), html.Div(children='Network and Sentiment Anlysis on Amazon Dataset', className="tex...
60.030303
196
0.597173
import dash import dash_core_components as dcc import dash_html_components as html about_layout = [html.Div(children=[ html.Img(src='/assets/logo.png', className='logo-big', style={'marginTop': 'auto', 'marginBottom': 'auto'}), html.Div(children='Network and Sentiment Anlysis on Amazon Dataset', className="tex...
true
true
f708366b7c8d41d94e7efbd36318e9496e569d45
427
py
Python
backend/athena_dream_stodio_33748/wsgi.py
crowdbotics-apps/athena-dream-stodio-33748
fee18065c2a4f93c88a9c8f951966d443cd1f6a7
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/athena_dream_stodio_33748/wsgi.py
crowdbotics-apps/athena-dream-stodio-33748
fee18065c2a4f93c88a9c8f951966d443cd1f6a7
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/athena_dream_stodio_33748/wsgi.py
crowdbotics-apps/athena-dream-stodio-33748
fee18065c2a4f93c88a9c8f951966d443cd1f6a7
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" WSGI config for athena_dream_stodio_33748 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdef...
25.117647
85
0.803279
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'athena_dream_stodio_33748.settings') application = get_wsgi_application()
true
true
f70836887d9943e7d1cb1ae6d5c8c439f35b9265
31,586
py
Python
electrum/interface.py
samedamci/LBRY-Vault
b37b37ce1bc25f8e4b753021978ab9916556137e
[ "MIT" ]
7
2020-03-20T10:20:29.000Z
2021-04-21T12:46:25.000Z
electrum/interface.py
samedamci/LBRY-Vault
b37b37ce1bc25f8e4b753021978ab9916556137e
[ "MIT" ]
2
2021-08-08T03:28:58.000Z
2021-08-23T08:42:37.000Z
electrum/interface.py
samedamci/LBRY-Vault
b37b37ce1bc25f8e4b753021978ab9916556137e
[ "MIT" ]
3
2020-12-16T02:14:54.000Z
2021-04-21T18:35:25.000Z
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
40.914508
119
0.62151
import os import re import ssl import sys import traceback import asyncio import socket from typing import Tuple, Union, List, TYPE_CHECKING, Optional, Set from collections import defaultdict from ipaddress import IPv4Network, IPv6Network, ip_address, IPv6Address import itertools import logging ...
true
true
f708384c5609521d4be0fae187e770797ca48abf
7,973
py
Python
sharpy/managers/extensions/memory_manager.py
DuncanDHall/sharpy-sc2
7a47a7538ad99214e3f0288b6213cac882551180
[ "MIT" ]
null
null
null
sharpy/managers/extensions/memory_manager.py
DuncanDHall/sharpy-sc2
7a47a7538ad99214e3f0288b6213cac882551180
[ "MIT" ]
null
null
null
sharpy/managers/extensions/memory_manager.py
DuncanDHall/sharpy-sc2
7a47a7538ad99214e3f0288b6213cac882551180
[ "MIT" ]
null
null
null
from collections import deque from typing import Dict, Set, Deque, List, Optional from sc2.data import Race from sc2.position import Point2 from sharpy.events import UnitDestroyedEvent from sharpy.interfaces import IMemoryManager from sharpy.managers.core import ManagerBase from sc2.ids.unit_typeid import UnitTypeId f...
38.331731
121
0.660103
from collections import deque from typing import Dict, Set, Deque, List, Optional from sc2.data import Race from sc2.position import Point2 from sharpy.events import UnitDestroyedEvent from sharpy.interfaces import IMemoryManager from sharpy.managers.core import ManagerBase from sc2.ids.unit_typeid import UnitTypeId f...
true
true
f708393c18e2c977b6debb3a1a165eba6ac0e37d
18,133
py
Python
tests/unit/states/test_zpool.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
19
2016-01-29T14:37:52.000Z
2022-03-30T18:08:01.000Z
tests/unit/states/test_zpool.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
223
2016-03-02T16:39:41.000Z
2022-03-03T12:26:35.000Z
tests/unit/states/test_zpool.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
64
2016-02-04T19:45:26.000Z
2021-12-15T02:02:31.000Z
""" Tests for salt.states.zpool :codeauthor: Jorge Schrauwen <sjorge@blackdot.be> :maintainer: Jorge Schrauwen <sjorge@blackdot.be> :maturity: new :depends: salt.utils.zfs, salt.modules.zpool :platform: illumos,freebsd,linux """ import salt.loader import salt.states.zpool as zpool import salt.ut...
35.346979
105
0.456295
import salt.loader import salt.states.zpool as zpool import salt.utils.zfs from salt.utils.odict import OrderedDict from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.unit import TestCase from tests.support.zfs import ZFSMockData class ZpoolTestC...
true
true
f7083a24574c3c411dcabf8ccf101df2fc7fb4a6
826
py
Python
adl_lrs/urls.py
Sembian/ADL_LRS
3535dad6371af3f9f5b67f7eabfd0f4a393e0d62
[ "Apache-2.0" ]
null
null
null
adl_lrs/urls.py
Sembian/ADL_LRS
3535dad6371af3f9f5b67f7eabfd0f4a393e0d62
[ "Apache-2.0" ]
null
null
null
adl_lrs/urls.py
Sembian/ADL_LRS
3535dad6371af3f9f5b67f7eabfd0f4a393e0d62
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import patterns, include, url from django.views.generic import RedirectView # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', RedirectView.as_view(url='/xAPI/')), url(r'^XAPI/', include('lrs.urls')...
34.416667
77
0.68523
from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', RedirectView.as_view(url='/xAPI/')), url(r'^XAPI/', include('lrs.urls')), url(r'^xapi/', include('lrs.urls')), url...
true
true
f7083ab5c7e7774c6fca62fde92fc3109732189f
2,171
py
Python
app/eventFrameTemplateViews/forms.py
DeschutesBrewery/brewerypi
5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f
[ "MIT" ]
27
2017-11-27T05:01:05.000Z
2020-11-14T19:52:26.000Z
app/eventFrameTemplateViews/forms.py
DeschutesBrewery/brewerypi
5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f
[ "MIT" ]
259
2017-11-23T00:43:26.000Z
2020-11-03T01:07:30.000Z
app/eventFrameTemplateViews/forms.py
DeschutesBrewery/brewerypi
5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f
[ "MIT" ]
8
2018-10-29T04:39:29.000Z
2020-10-01T22:18:12.000Z
from flask_wtf import FlaskForm from wtforms import BooleanField, HiddenField, StringField, SubmitField, ValidationError from wtforms.validators import Length, Required from .. models import EventFrameTemplateView class CopyEventFrameTemplateViewForm(FlaskForm): name = StringField("Name", validators = [Required(), Le...
45.229167
147
0.773376
from flask_wtf import FlaskForm from wtforms import BooleanField, HiddenField, StringField, SubmitField, ValidationError from wtforms.validators import Length, Required from .. models import EventFrameTemplateView class CopyEventFrameTemplateViewForm(FlaskForm): name = StringField("Name", validators = [Required(), Le...
true
true
f7083b910d5d6d417596ef3c8b9fb8bfaf516c59
411
py
Python
hackerankteste.py
DMGAP/Python-Hackerrank
891fa7365d9acf71cc5827c248f10880c0f9d1a6
[ "MIT" ]
2
2021-09-12T14:56:14.000Z
2021-10-15T16:33:14.000Z
hackerankteste.py
DMGAP/Python-Hackerrank
891fa7365d9acf71cc5827c248f10880c0f9d1a6
[ "MIT" ]
null
null
null
hackerankteste.py
DMGAP/Python-Hackerrank
891fa7365d9acf71cc5827c248f10880c0f9d1a6
[ "MIT" ]
null
null
null
import math import os import random import re import sys n = int(input("")) number = int(n) number= n%2 if n ==1: print("Weird") else: if (number==0) and (n >= 2) or ((number==0) and (n <= 5)): print("Not Weird") elif (number ==0) and (n>=6) and ((number==0) and (n<=20)): print ("Weird") ...
18.681818
63
0.532847
import math import os import random import re import sys n = int(input("")) number = int(n) number= n%2 if n ==1: print("Weird") else: if (number==0) and (n >= 2) or ((number==0) and (n <= 5)): print("Not Weird") elif (number ==0) and (n>=6) and ((number==0) and (n<=20)): print ("Weird") ...
true
true
f7083c004337c3ce960bf0d789441131c57bd225
2,082
py
Python
src/transformers4/models/convbert/convert_convbert_original_tf1_checkpoint_to_pytorch_and_tf2.py
yangkevin2/transformers4
4d841db3effaa42aef9ac5babdc50f5233394358
[ "Apache-2.0" ]
null
null
null
src/transformers4/models/convbert/convert_convbert_original_tf1_checkpoint_to_pytorch_and_tf2.py
yangkevin2/transformers4
4d841db3effaa42aef9ac5babdc50f5233394358
[ "Apache-2.0" ]
null
null
null
src/transformers4/models/convbert/convert_convbert_original_tf1_checkpoint_to_pytorch_and_tf2.py
yangkevin2/transformers4
4d841db3effaa42aef9ac5babdc50f5233394358
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # 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...
37.178571
118
0.756484
import argparse from transformers4 import ConvBertConfig, ConvBertModel, TFConvBertModel, load_tf_weights_in_convbert from transformers4.utils import logging logging.set_verbosity_info() def convert_orig_tf1_checkpoint_to_pytorch(tf_checkpoint_path, convbert_config_file, pytorch_dump_path): conf...
true
true
f7083cb528dfbc4c395fa961f63b0a8b00653ae7
6,620
py
Python
Pi1/DevBatchControlv0.1.py
jakehyvonen/BTSPython
9580a04622226a30fea4d5cbd036c7f88a9b732d
[ "MIT" ]
null
null
null
Pi1/DevBatchControlv0.1.py
jakehyvonen/BTSPython
9580a04622226a30fea4d5cbd036c7f88a9b732d
[ "MIT" ]
null
null
null
Pi1/DevBatchControlv0.1.py
jakehyvonen/BTSPython
9580a04622226a30fea4d5cbd036c7f88a9b732d
[ "MIT" ]
null
null
null
from gpiozero import LED from time import sleep import socket import serial #low level IC control pins led1 = LED(13) #A0 pin led2 = LED(6) #A1 pin led3 = LED(5) #A2 pin led4 = LED(27) #led4+5 = device rest plate led5 = LED(22) ###setup communication with C# host software ##TCP_IP = '169.254.130.182' ##TCP_PORT = 500...
25.960784
55
0.60287
from gpiozero import LED from time import sleep import socket import serial led1 = LED(13) led2 = LED(6) led3 = LED(5) led4 = LED(27) led5 = LED(22) led2.off() led3.off() def SwitchMUXtoB(): led1.on() led2.off() led3.off() def SwitchMUXtoC(): led1.off() led2.on() led3.off...
true
true
f7083ce629eebc31d6d0fe4a790c5a32b6ec69ca
1,020
py
Python
imagepy/menus/File/Import/roi_plg.py
adines/imagepy
d7cdf3273d25e06046626ef2ef9200b1846ea49a
[ "BSD-4-Clause" ]
1
2019-02-22T03:09:24.000Z
2019-02-22T03:09:24.000Z
imagepy/menus/File/Import/roi_plg.py
adines/imagepy
d7cdf3273d25e06046626ef2ef9200b1846ea49a
[ "BSD-4-Clause" ]
null
null
null
imagepy/menus/File/Import/roi_plg.py
adines/imagepy
d7cdf3273d25e06046626ef2ef9200b1846ea49a
[ "BSD-4-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on 12/21/2018 @author: BioinfoTongLI """ import numpy as np import read_roi from imagepy.core.engine import Free from imagepy import IPy from skimage.draw import polygon class Plugin(Free): """load_ij_roi: use read_roi and th pass to shapely objects""" title = 'Import Rois f...
31.875
86
0.558824
import numpy as np import read_roi from imagepy.core.engine import Free from imagepy import IPy from skimage.draw import polygon class Plugin(Free): title = 'Import Rois from IJ' para = {'path': '', 'name': 'Undefined', 'width': 512, 'height': 512} view = [(str, 'name', 'name', ''), (int, 'w...
true
true
f7083d021a8246eb35e98c07308c8cc6808d8bec
9,979
py
Python
ertk/stats.py
bagustris/emotion
5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36
[ "MIT" ]
3
2020-11-03T14:54:22.000Z
2021-04-12T12:23:10.000Z
ertk/stats.py
bagustris/emotion
5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36
[ "MIT" ]
null
null
null
ertk/stats.py
bagustris/emotion
5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36
[ "MIT" ]
2
2020-12-03T06:21:59.000Z
2021-01-16T04:47:12.000Z
from functools import partial from typing import Callable, List, Union import numpy as np import pandas as pd from scipy.stats import friedmanchisquare, rankdata from sklearn.metrics.pairwise import pairwise_distances from statsmodels.stats.libqsturng import qsturng Matrix = List[List[float]] def friedman_nemenyi(t...
30.990683
88
0.585029
from functools import partial from typing import Callable, List, Union import numpy as np import pandas as pd from scipy.stats import friedmanchisquare, rankdata from sklearn.metrics.pairwise import pairwise_distances from statsmodels.stats.libqsturng import qsturng Matrix = List[List[float]] def friedman_nemenyi(t...
true
true
f7083e7be8c43bd2e80217c44c86601be9add0cd
12,053
py
Python
rdkit/Chem/Pharm2D/Utils.py
docking-org/rdk
6eb710254f027b348a8e3089e6a92c3d40de0949
[ "PostgreSQL" ]
1
2019-01-23T06:02:24.000Z
2019-01-23T06:02:24.000Z
rdkit/Chem/Pharm2D/Utils.py
Mike575/rdkit
373a89021e478f878c6011a201e3fb8f4a122093
[ "PostgreSQL" ]
null
null
null
rdkit/Chem/Pharm2D/Utils.py
Mike575/rdkit
373a89021e478f878c6011a201e3fb8f4a122093
[ "PostgreSQL" ]
1
2022-03-30T03:22:10.000Z
2022-03-30T03:22:10.000Z
# # Copyright (C) 2002-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ utility functionality for ...
25.590234
96
0.578611
from __future__ import print_function, division import itertools nPointDistDict = { 2: ((0, 1), ), 3: ((0, 1), (0, 2), (1, 2)), 4: ((0, 1), (0, 2), (0, 3), (1, 2), (2, 3)), 5: ((0, 1), (0, 2), (0, 3), (0, 4), (1, 2), (2, 3), (3, 4)), 6: ((0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 2), (2, 3), (...
true
true
f7083e93a60d9d63b08a9b5da38bc8c394ece1f9
3,342
py
Python
tickvaultpythonapi/parsing/predicate.py
TickSmith/tickvault-python-api
712a8a27bbc1815414009a60c92344471f36b81f
[ "MIT" ]
4
2018-02-12T14:05:46.000Z
2019-08-14T15:48:16.000Z
tickvaultpythonapi/parsing/predicate.py
TickSmith/tickvault-python-api
712a8a27bbc1815414009a60c92344471f36b81f
[ "MIT" ]
null
null
null
tickvaultpythonapi/parsing/predicate.py
TickSmith/tickvault-python-api
712a8a27bbc1815414009a60c92344471f36b81f
[ "MIT" ]
1
2020-01-14T11:12:02.000Z
2020-01-14T11:12:02.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 TickSmith Corp. # # Licensed under the MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, ...
31.528302
80
0.640036
import sys from tickvaultpythonapi.parsing.operation import Operation, BaseOperation class Predicate(object): key = "" operation = "" value = "" opClass = Operation() def __init__(self, key, op, val): self.key = key self.operation = self.get_valid_op(o...
true
true
f7083ffe9154fa0150d4edfa7cf36e104d7b7b0f
117,025
py
Python
FINE/expansionModules/robustPipelineSizing.py
sdickler/FINE
3114fd009e80a7eadacffe26bf5ff8e6a126ac61
[ "MIT" ]
34
2018-07-02T16:20:39.000Z
2022-03-30T09:46:44.000Z
FINE/expansionModules/robustPipelineSizing.py
sdickler/FINE
3114fd009e80a7eadacffe26bf5ff8e6a126ac61
[ "MIT" ]
19
2018-11-09T07:56:20.000Z
2022-02-15T10:54:21.000Z
FINE/expansionModules/robustPipelineSizing.py
sdickler/FINE
3114fd009e80a7eadacffe26bf5ff8e6a126ac61
[ "MIT" ]
42
2018-09-24T15:07:20.000Z
2022-02-25T18:41:52.000Z
""" Last edited: January 20 2020 |br| @author: FINE Developer Team (FZJ IEK-3) \n\n The approaches used are described in Robinius et. al. (2019) "Robust Optimal Discrete Arc Sizing for Tree-Shaped Potential Networks" and they are further developed with the help of Theorem 10 of Labbé et. al. (2019) "Bookings in the Eu...
49.356811
131
0.666678
import pandas as pd from FINE import utils import networkx as nx import math import pyomo.environ as py import warnings from pyomo.opt import SolverFactory, SolverStatus, TerminationCondition import numpy as np import copy from scipy.optimize import fsolve import matplotlib.pyplot as plt import matplotlib as mpl import...
true
true
f70842c6f7480d694d52953c9c6749a115190f85
9,830
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations_async/_subscriptions_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations_async/_subscriptions_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations_async/_subscriptions_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
44.279279
133
0.653713
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineRespo...
true
true
f70843497fc4ba407966c513c0e2afaa1534c821
1,544
py
Python
python/array.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
1
2019-07-05T04:27:05.000Z
2019-07-05T04:27:05.000Z
python/array.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
null
null
null
python/array.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
null
null
null
from array import* # in array all the value have to be in same type # array in python , dont have fixed size means they are flexible vls = array('i',[5,34,54,23,26,32,2]) ## i = unsigned int # copying array newArr = array(vls.typecode,(a for a in vls)) # fetch one value form vls and assigned...
15.59596
98
0.612047
from array import* vls = array('i',[5,34,54,23,26,32,2]) (vls.typecode,(a for a in vls)) for e in newArr: print(e,end=" ") print() print(vls.buffer_info() ) for i in vls: print(i) print(vls[1]) while i<len(newArr): print(newArr[i]) i+=1 print(vls.typecode) ...
true
true
f70843ebb0ecba18f71fe77e21d8117ca9a4ba19
3,809
py
Python
drrn/drrn.py
ydai94/tdqn
83c66263cb47016414dbe47ad3b252bb9e681ca8
[ "MIT" ]
22
2019-10-29T22:39:57.000Z
2021-08-12T06:43:11.000Z
drrn/drrn.py
ydai94/tdqn
83c66263cb47016414dbe47ad3b252bb9e681ca8
[ "MIT" ]
1
2021-04-13T13:57:00.000Z
2021-04-13T13:57:00.000Z
drrn/drrn.py
ydai94/tdqn
83c66263cb47016414dbe47ad3b252bb9e681ca8
[ "MIT" ]
11
2019-10-31T19:58:13.000Z
2021-09-13T12:49:45.000Z
import pickle import torch import torch.nn as nn import torch.nn.functional as F from os.path import join as pjoin from memory import ReplayMemory, Transition, State from model import DRRN from util import * import logger import sentencepiece as spm device = torch.device("cuda" if torch.cuda.is_available() else "cpu"...
37.712871
104
0.637438
import pickle import torch import torch.nn as nn import torch.nn.functional as F from os.path import join as pjoin from memory import ReplayMemory, Transition, State from model import DRRN from util import * import logger import sentencepiece as spm device = torch.device("cuda" if torch.cuda.is_available() else "cpu"...
true
true
f7084436e83db9a4637aafc8f104c1b71803c8ce
93
py
Python
ai_utils/knowledge/__init__.py
daniel-waruo/ai-utils
6a32239b8eb9b611d3b693454e00aa5626d51e82
[ "MIT" ]
null
null
null
ai_utils/knowledge/__init__.py
daniel-waruo/ai-utils
6a32239b8eb9b611d3b693454e00aa5626d51e82
[ "MIT" ]
null
null
null
ai_utils/knowledge/__init__.py
daniel-waruo/ai-utils
6a32239b8eb9b611d3b693454e00aa5626d51e82
[ "MIT" ]
null
null
null
""" This module has all the tools necessary for me to handle a knowledge logic problem """
31
84
0.731183
true
true
f70844978e398bc63fd41438f8070d8885c10a06
9,790
py
Python
lib/spack/spack/test/llnl/util/filesystem.py
rtohid/spack
6df57bb2d0619a22b0bb0a5028b7caef7f31e722
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
lib/spack/spack/test/llnl/util/filesystem.py
rtohid/spack
6df57bb2d0619a22b0bb0a5028b7caef7f31e722
[ "ECL-2.0", "Apache-2.0", "MIT" ]
17
2018-09-20T18:32:50.000Z
2019-12-04T16:58:12.000Z
lib/spack/spack/test/llnl/util/filesystem.py
rtohid/spack
6df57bb2d0619a22b0bb0a5028b7caef7f31e722
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Tests for ``llnl/util/filesystem.py``""" import llnl.util.filesystem as fs import os import stat import pytest @pyte...
32.742475
79
0.631359
import llnl.util.filesystem as fs import os import stat import pytest @pytest.fixture() def stage(tmpdir_factory): s = tmpdir_factory.mktemp('filesystem_test') with s.as_cwd(): fs.touchp('source/1') fs.touchp('source/a/b/2') fs.touchp('source/a/b/3') fs.touchp(...
true
true
f70844acde7c3e99d4f4ea1b217c618aa5a8b698
9,285
py
Python
mnogoznal/wsd.py
dustalov/mnogoznal
bacea1576d31e0d2ad5456159a57950899a116f6
[ "MIT" ]
10
2017-08-11T08:47:25.000Z
2018-04-07T15:13:37.000Z
mnogoznal/wsd.py
dustalov/mnogoznal
bacea1576d31e0d2ad5456159a57950899a116f6
[ "MIT" ]
1
2019-10-31T17:59:49.000Z
2019-10-31T17:59:49.000Z
mnogoznal/wsd.py
nlpub/watasense
bacea1576d31e0d2ad5456159a57950899a116f6
[ "MIT" ]
1
2018-02-18T15:03:24.000Z
2018-02-18T15:03:24.000Z
import abc import csv from collections import namedtuple, defaultdict, OrderedDict, Counter import numpy as np from sklearn.feature_extraction import DictVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.metrics.pairwise import cosine_similarity as sim from sklearn.pipeline import Pi...
30.146104
116
0.596446
import abc import csv from collections import namedtuple, defaultdict, OrderedDict, Counter import numpy as np from sklearn.feature_extraction import DictVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.metrics.pairwise import cosine_similarity as sim from sklearn.pipeline import Pi...
true
true
f708476a2cc43393cd5ba3aa180c3286fe8d674e
2,712
py
Python
run.py
nyamzy/Password_Manager
6f109b2ace6eef23148ae42be0b62124c9fb5e37
[ "Unlicense" ]
null
null
null
run.py
nyamzy/Password_Manager
6f109b2ace6eef23148ae42be0b62124c9fb5e37
[ "Unlicense" ]
null
null
null
run.py
nyamzy/Password_Manager
6f109b2ace6eef23148ae42be0b62124c9fb5e37
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 from password_manager import User, Credentials def create_user(fname, lname, uname, email, password): ''' Function that creates a new user ''' new_user = User(fname, lname, uname, email, password) return new_user def save_users(user): ''' Function that saves a new user ''' use...
23.179487
142
0.620575
from password_manager import User, Credentials def create_user(fname, lname, uname, email, password): new_user = User(fname, lname, uname, email, password) return new_user def save_users(user): user.save_user() def del_user(user): user.delete_contact() def find_user(username): return User.find_by_usernam...
true
true
f708481f6e02fece16961a60a2c795ef64ec141f
10,933
py
Python
project/systems/ecgresnet_ensemble_auxout.py
HabibMrad/uncertainty
1646a9b07d1179045dd0375149250d5ac7501004
[ "Apache-2.0" ]
1
2022-01-04T23:25:06.000Z
2022-01-04T23:25:06.000Z
project/systems/ecgresnet_ensemble_auxout.py
HabibMrad/uncertainty
1646a9b07d1179045dd0375149250d5ac7501004
[ "Apache-2.0" ]
null
null
null
project/systems/ecgresnet_ensemble_auxout.py
HabibMrad/uncertainty
1646a9b07d1179045dd0375149250d5ac7501004
[ "Apache-2.0" ]
null
null
null
import sys import os import torch import pandas as pd import datetime from argparse import ArgumentParser import numpy as np from torch import nn, optim import torch.nn.functional as F from torch.utils.data import DataLoader, random_split from icecream import ic import pytorch_lightning as pl from pytorch_lightning.me...
44.084677
156
0.668892
import sys import os import torch import pandas as pd import datetime from argparse import ArgumentParser import numpy as np from torch import nn, optim import torch.nn.functional as F from torch.utils.data import DataLoader, random_split from icecream import ic import pytorch_lightning as pl from pytorch_lightning.me...
true
true
f70848729c6f81574d502884536d2da9fba9af60
7,069
py
Python
hubploy/auth.py
tjcrone/hubploy
1767689c5277400a473b9f239a851f75051d8240
[ "BSD-3-Clause" ]
null
null
null
hubploy/auth.py
tjcrone/hubploy
1767689c5277400a473b9f239a851f75051d8240
[ "BSD-3-Clause" ]
null
null
null
hubploy/auth.py
tjcrone/hubploy
1767689c5277400a473b9f239a851f75051d8240
[ "BSD-3-Clause" ]
null
null
null
""" Setup authentication from various providers """ import json import os import subprocess import shutil from hubploy.config import get_config from ruamel.yaml import YAML yaml = YAML(typ='rt') def registry_auth(deployment): """ Do appropriate registry authentication for given deployment """ config...
28.735772
82
0.625407
import json import os import subprocess import shutil from hubploy.config import get_config from ruamel.yaml import YAML yaml = YAML(typ='rt') def registry_auth(deployment): config = get_config(deployment) if 'images' in config and 'registry' in config['images']: registry = config['images']['regist...
true
true
f708492421111894a9ec36490aef33347ccb2b29
2,055
py
Python
examples/simple/app.py
cdpath/fastapi_login
4e9cde923b60a6852a24b34292e2a10f4333ced3
[ "MIT" ]
null
null
null
examples/simple/app.py
cdpath/fastapi_login
4e9cde923b60a6852a24b34292e2a10f4333ced3
[ "MIT" ]
null
null
null
examples/simple/app.py
cdpath/fastapi_login
4e9cde923b60a6852a24b34292e2a10f4333ced3
[ "MIT" ]
null
null
null
import uuid from fastapi import Depends, FastAPI, HTTPException from fastapi.responses import HTMLResponse from fastapi.security import OAuth2PasswordRequestForm from pydantic import BaseSettings, BaseModel, UUID4 from fastapi_login import LoginManager from fastapi_login.exceptions import InvalidCredentialsException ...
24.759036
92
0.709976
import uuid from fastapi import Depends, FastAPI, HTTPException from fastapi.responses import HTMLResponse from fastapi.security import OAuth2PasswordRequestForm from pydantic import BaseSettings, BaseModel, UUID4 from fastapi_login import LoginManager from fastapi_login.exceptions import InvalidCredentialsException ...
true
true
f7084a1fac2c524a1eab21ba916d5d53938c4ebb
20,361
py
Python
python/ray/tune/tests/test_function_api.py
jacobhjkim/ray
936cb5929c455102d5638ff5d59c80c4ae94770f
[ "Apache-2.0" ]
null
null
null
python/ray/tune/tests/test_function_api.py
jacobhjkim/ray
936cb5929c455102d5638ff5d59c80c4ae94770f
[ "Apache-2.0" ]
43
2021-02-27T08:02:40.000Z
2022-03-26T07:02:23.000Z
python/ray/tune/tests/test_function_api.py
jacobhjkim/ray
936cb5929c455102d5638ff5d59c80c4ae94770f
[ "Apache-2.0" ]
null
null
null
import json import os import sys import shutil import tempfile import unittest import ray import ray.cloudpickle as cloudpickle from ray.rllib import _register_all from ray import tune from ray.tune.logger import NoopLogger from ray.tune.utils.trainable import TrainableUtil from ray.tune.function_runner import with_p...
37.916201
79
0.602475
import json import os import sys import shutil import tempfile import unittest import ray import ray.cloudpickle as cloudpickle from ray.rllib import _register_all from ray import tune from ray.tune.logger import NoopLogger from ray.tune.utils.trainable import TrainableUtil from ray.tune.function_runner import with_p...
true
true
f7084adeb4e464e80a35a46eed5e75ed2ec77fdd
12,350
py
Python
cinder/api/v2/volumes.py
traghavendra/cinder-train
49af592c61da3216c04f5771b8ebf0927c5ce1c8
[ "Apache-2.0" ]
null
null
null
cinder/api/v2/volumes.py
traghavendra/cinder-train
49af592c61da3216c04f5771b8ebf0927c5ce1c8
[ "Apache-2.0" ]
28
2017-08-17T14:46:05.000Z
2022-03-29T12:42:12.000Z
cinder/api/v2/volumes.py
traghavendra/cinder-train
49af592c61da3216c04f5771b8ebf0927c5ce1c8
[ "Apache-2.0" ]
3
2017-04-27T16:11:40.000Z
2020-02-12T21:27:00.000Z
# Copyright 2011 Justin Santa Barbara # 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 requ...
38.235294
79
0.629393
from oslo_config import cfg from oslo_log import log as logging from oslo_log import versionutils from oslo_utils import uuidutils from six.moves import http_client import webob from webob import exc from cinder.api import api_utils from cinder.api import common from cinder.api.contrib import schedule...
true
true
f7084c889dba9a7baf5467baf350f88f62040e86
3,180
py
Python
pyscript/torch/utils.py
takuto0831/Competition-utils
c738e199c6a771a0c58b9cd237660bb76b4be4fb
[ "MIT" ]
null
null
null
pyscript/torch/utils.py
takuto0831/Competition-utils
c738e199c6a771a0c58b9cd237660bb76b4be4fb
[ "MIT" ]
null
null
null
pyscript/torch/utils.py
takuto0831/Competition-utils
c738e199c6a771a0c58b9cd237660bb76b4be4fb
[ "MIT" ]
null
null
null
import os import random import subprocess import numpy as np import torch import time try: import torch_xla import torch_xla.core.xla_model as xm XLA = True except ModuleNotFoundError: XLA = False def freeze_module(module): for i, param in enumerate(module.parameters()): param.requires_gra...
28.909091
81
0.60283
import os import random import subprocess import numpy as np import torch import time try: import torch_xla import torch_xla.core.xla_model as xm XLA = True except ModuleNotFoundError: XLA = False def freeze_module(module): for i, param in enumerate(module.parameters()): param.requires_gra...
true
true
f7084ca79cb058035b4d0b6e1c6f2ddb82b38e82
1,272
py
Python
resources_portal/__init__.py
AlexsLemonade/python-flask-demo
247780aa5ecfd6ce9b876514f96b2048549857d2
[ "BSD-3-Clause" ]
null
null
null
resources_portal/__init__.py
AlexsLemonade/python-flask-demo
247780aa5ecfd6ce9b876514f96b2048549857d2
[ "BSD-3-Clause" ]
null
null
null
resources_portal/__init__.py
AlexsLemonade/python-flask-demo
247780aa5ecfd6ce9b876514f96b2048549857d2
[ "BSD-3-Clause" ]
null
null
null
import os import resources_portal.models # noqa from flask import Flask from flask_migrate import Migrate from flask_restful import Api from resources_portal.db import db from resources_portal.views import user migrate = Migrate() def initialize_routes(api: Api): api.add_resource(user.UsersApi, "/users") a...
24.461538
96
0.706761
import os import resources_portal.models from flask import Flask from flask_migrate import Migrate from flask_restful import Api from resources_portal.db import db from resources_portal.views import user migrate = Migrate() def initialize_routes(api: Api): api.add_resource(user.UsersApi, "/users") api.add...
true
true
f7084d77def231fe4c7eb0e32eecd4fdc2733e9a
37,936
py
Python
Packs/IntSight/Integrations/IntSight/IntSight.py
AVAILOTECH/x2o-demisto-content
b5d4c182833fd7314592c9984d078b2df170cf77
[ "MIT" ]
null
null
null
Packs/IntSight/Integrations/IntSight/IntSight.py
AVAILOTECH/x2o-demisto-content
b5d4c182833fd7314592c9984d078b2df170cf77
[ "MIT" ]
null
null
null
Packs/IntSight/Integrations/IntSight/IntSight.py
AVAILOTECH/x2o-demisto-content
b5d4c182833fd7314592c9984d078b2df170cf77
[ "MIT" ]
null
null
null
from CommonServerPython import * reload(sys) sys.setdefaultencoding('utf-8') # pylint: disable=E1101 requests.packages.urllib3.disable_warnings() URL = demisto.getParam('server') if URL[-1] != '/': URL += '/' if not demisto.getParam('proxy'): del os.environ['HTTP_PROXY'] del os.environ['HTTPS_PROXY'] ...
38.319192
120
0.62297
from CommonServerPython import * reload(sys) sys.setdefaultencoding('utf-8') requests.packages.urllib3.disable_warnings() URL = demisto.getParam('server') if URL[-1] != '/': URL += '/' if not demisto.getParam('proxy'): del os.environ['HTTP_PROXY'] del os.environ['HTTPS_PROXY'] del os.environ['http...
true
true
f7084dda96df5fbdb4c6f4b4ce402acbfe593566
851
py
Python
SupportLibraries/base_helpers.py
Abhilash04/SeleniumPythonHybridFramework
277db41afed6b24ec2c8e9b579925ad3da75e937
[ "MIT" ]
9
2018-11-14T09:19:22.000Z
2021-05-18T15:18:45.000Z
SupportLibraries/base_helpers.py
Abhilash04/SeleniumPythonHybridFramework
277db41afed6b24ec2c8e9b579925ad3da75e937
[ "MIT" ]
null
null
null
SupportLibraries/base_helpers.py
Abhilash04/SeleniumPythonHybridFramework
277db41afed6b24ec2c8e9b579925ad3da75e937
[ "MIT" ]
4
2018-09-18T16:56:37.000Z
2020-07-02T11:57:21.000Z
""" This module contains common reusable functions. """ from traceback import print_stack from configparser import ConfigParser from SupportLibraries.ui_helpers import UIHelpers class BaseHelpers(UIHelpers): """ This class includes basic reusable base_helpers. """ def __init__(self, driver): ...
23.638889
69
0.633373
from traceback import print_stack from configparser import ConfigParser from SupportLibraries.ui_helpers import UIHelpers class BaseHelpers(UIHelpers): def __init__(self, driver): super().__init__(driver) self.driver = driver def load_properties_file(self): config = None tr...
true
true
f7084ecbce9cfc66335bac95d0a736f1ac69da7d
6,856
py
Python
airflow-service-mpack/common-services/AIRFLOW/1.10.0/package/scripts/airflow_setup.py
hapadong/ambari-airflow-mpack
92d0345c18e0a345cc9e9493d926ec0e4cc98980
[ "Apache-2.0" ]
null
null
null
airflow-service-mpack/common-services/AIRFLOW/1.10.0/package/scripts/airflow_setup.py
hapadong/ambari-airflow-mpack
92d0345c18e0a345cc9e9493d926ec0e4cc98980
[ "Apache-2.0" ]
null
null
null
airflow-service-mpack/common-services/AIRFLOW/1.10.0/package/scripts/airflow_setup.py
hapadong/ambari-airflow-mpack
92d0345c18e0a345cc9e9493d926ec0e4cc98980
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys, os, pwd, grp, signal, time, base64 from resource_management import * from resource_management.core.exceptions import Fail from resource_management.core.logger import Logger from resource_management.core.resources.system import Execute, Directory, File from resource_management.core.shel...
37.67033
240
0.777275
import sys, os, pwd, grp, signal, time, base64 from resource_management import * from resource_management.core.exceptions import Fail from resource_management.core.logger import Logger from resource_management.core.resources.system import Execute, Directory, File from resource_management.core.shell import call from re...
true
true
f7084ee37b0683bda4a3495022074260d110fd35
2,715
py
Python
closure_linter/testutil.py
Announcement/closure-linter
de66a7ca6ca0ca248d55d567aad96b7e0657be85
[ "Apache-2.0" ]
123
2015-07-03T08:39:12.000Z
2021-11-14T09:28:14.000Z
tools/closure_linter/closure_linter/testutil.py
flyover/node
8e743a77e48256444c3637f8282e4cad35da508c
[ "Artistic-2.0" ]
25
2015-06-22T10:40:55.000Z
2019-05-06T12:01:53.000Z
tools/closure_linter/closure_linter/testutil.py
flyover/node
8e743a77e48256444c3637f8282e4cad35da508c
[ "Artistic-2.0" ]
36
2015-07-03T15:17:13.000Z
2020-10-13T16:34:28.000Z
#!/usr/bin/env python # # Copyright 2012 The Closure Linter Authors. 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 #...
28.578947
75
0.755064
__author__ = ('nnaze@google.com (Nathan Naze)') import StringIO from closure_linter import ecmametadatapass from closure_linter import javascriptstatetracker from closure_linter import javascripttokenizer def TokenizeSource(source): if isinstance(source, basestring): source = StringIO.Str...
true
true
f7084f20a1b8eee1a82a652ae308751180897d7a
55
py
Python
ma_gym/envs/traffic_junction_hard/__init__.py
joosephook/ma-gym
535df389326a5b7b389d652e775b7b8bd2e5d778
[ "Apache-2.0" ]
null
null
null
ma_gym/envs/traffic_junction_hard/__init__.py
joosephook/ma-gym
535df389326a5b7b389d652e775b7b8bd2e5d778
[ "Apache-2.0" ]
null
null
null
ma_gym/envs/traffic_junction_hard/__init__.py
joosephook/ma-gym
535df389326a5b7b389d652e775b7b8bd2e5d778
[ "Apache-2.0" ]
null
null
null
from .traffic_junction_hard import TrafficJunctionHard
27.5
54
0.909091
from .traffic_junction_hard import TrafficJunctionHard
true
true
f708501fdbd0f30992b089b0874da1cba328ec3c
3,596
py
Python
server/settings/environments/development.py
Islast/AutSPACEs
2392e4ee731c44661059b35cc205613697c782d6
[ "MIT" ]
null
null
null
server/settings/environments/development.py
Islast/AutSPACEs
2392e4ee731c44661059b35cc205613697c782d6
[ "MIT" ]
null
null
null
server/settings/environments/development.py
Islast/AutSPACEs
2392e4ee731c44661059b35cc205613697c782d6
[ "MIT" ]
null
null
null
""" This file contains all the settings that defines the development server. SECURITY WARNING: don't run with debug turned on in production! """ import logging from typing import List from server.settings.components import config from server.settings.components.common import INSTALLED_APPS, MIDDLEWARE # Setting the...
27.450382
82
0.691324
import logging from typing import List from server.settings.components import config from server.settings.components.common import INSTALLED_APPS, MIDDLEWARE DEBUG = True ALLOWED_HOSTS = [ config('DOMAIN_NAME'), 'localhost', '0.0.0.0', '127.0.0.1', '[::1]', ] INSTALLED_APPS += ( 'deb...
true
true
f7085056f732870808a5fc11c2c6e7523990d5b1
594
py
Python
tools/generate_taint_models/parameter.py
sthagen/facebook-pyre-check
cea188088c9632b10e0d0a658a8f1954f19413cd
[ "MIT" ]
null
null
null
tools/generate_taint_models/parameter.py
sthagen/facebook-pyre-check
cea188088c9632b10e0d0a658a8f1954f19413cd
[ "MIT" ]
null
null
null
tools/generate_taint_models/parameter.py
sthagen/facebook-pyre-check
cea188088c9632b10e0d0a658a8f1954f19413cd
[ "MIT" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from enum import auto, Enum from typing import NamedTuple, Optional class Parameter(NamedTuple): class Kind(Enum): ARG = auto(...
24.75
65
0.654882
from enum import auto, Enum from typing import NamedTuple, Optional class Parameter(NamedTuple): class Kind(Enum): ARG = auto() VARARG = auto() KWARG = auto() name: str annotation: Optional[str] kind: Kind def __eq__(self, other: "Parameter") -> bool: if not ...
true
true
f70850b2252c5eeef4ef80bf3767acdfeb2562eb
481
py
Python
tests/test_app/models.py
enderlabs/django-encrypted-json
148dae03001e1731b40e12bb9cac749c7edf1caa
[ "MIT" ]
null
null
null
tests/test_app/models.py
enderlabs/django-encrypted-json
148dae03001e1731b40e12bb9cac749c7edf1caa
[ "MIT" ]
null
null
null
tests/test_app/models.py
enderlabs/django-encrypted-json
148dae03001e1731b40e12bb9cac749c7edf1caa
[ "MIT" ]
1
2019-03-07T10:01:47.000Z
2019-03-07T10:01:47.000Z
from django.db import models from django_encrypted_json.fields import EncryptedValueJsonField # Create your models here. class TestModel(models.Model): json = EncryptedValueJsonField(default={}) optional_json = EncryptedValueJsonField(blank=True, null=True) partial_encrypt = EncryptedValueJsonField( ...
32.066667
66
0.75052
from django.db import models from django_encrypted_json.fields import EncryptedValueJsonField class TestModel(models.Model): json = EncryptedValueJsonField(default={}) optional_json = EncryptedValueJsonField(blank=True, null=True) partial_encrypt = EncryptedValueJsonField( blank=True, null=True...
true
true
f70850ca483a2cf7d2e8eca3f7141764aebd44b9
6,705
py
Python
demo/runners/aerlingusold.py
MySupersuit/DecentralisedIdentityVaxPassport
9dd2168c56335f821a38048559b56726718660ce
[ "Apache-2.0" ]
null
null
null
demo/runners/aerlingusold.py
MySupersuit/DecentralisedIdentityVaxPassport
9dd2168c56335f821a38048559b56726718660ce
[ "Apache-2.0" ]
null
null
null
demo/runners/aerlingusold.py
MySupersuit/DecentralisedIdentityVaxPassport
9dd2168c56335f821a38048559b56726718660ce
[ "Apache-2.0" ]
null
null
null
import asyncio import json import logging import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # noqa from runners.support.agent import DemoAgent, default_genesis_txns from runners.support.utils import ( log_json, log_msg, log_status, log_timer, prompt...
30.616438
88
0.567338
import asyncio import json import logging import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from runners.support.agent import DemoAgent, default_genesis_txns from runners.support.utils import ( log_json, log_msg, log_status, log_timer, prompt, ...
true
true
f70850e2708d1f5805cad2a1aec3a5796e69da47
1,636
py
Python
src/moduels/gui/Combo_EngineList.py
HaujetZhao/Caps_Writer
f2b2038a2c0984a1d356f024cbac421fe594601a
[ "MIT" ]
234
2020-07-10T11:23:09.000Z
2022-03-31T09:41:40.000Z
src/moduels/gui/Combo_EngineList.py
HaujetZhao/Caps_Writer
f2b2038a2c0984a1d356f024cbac421fe594601a
[ "MIT" ]
9
2020-07-11T08:31:11.000Z
2022-03-01T04:30:08.000Z
src/moduels/gui/Combo_EngineList.py
HaujetZhao/Caps_Writer
f2b2038a2c0984a1d356f024cbac421fe594601a
[ "MIT" ]
23
2020-07-14T08:58:44.000Z
2022-03-17T06:38:10.000Z
# -*- coding: UTF-8 -*- import os, sqlite3 from PySide2.QtWidgets import QComboBox from moduels.component.NormalValue import 常量 # 添加预设对话框 class Combo_EngineList(QComboBox): def __init__(self): super().__init__() self.initElements() # 先初始化各个控件 self.initSlots() # 再将各个控件连接到信号槽 self....
26.819672
93
0.556235
import os, sqlite3 from PySide2.QtWidgets import QComboBox from moduels.component.NormalValue import 常量 class Combo_EngineList(QComboBox): def __init__(self): super().__init__() self.initElements() self.initSlots() self.initLayouts() self.initValues() def ini...
true
true
f7085159f268f42e1dab4ca0c38dc0a46286f7cd
4,538
py
Python
app/eg003_list_envelopes.py
AaronWDS/eg-03-python-auth-code-grant
6cb1694cbbb8cdbf166fda282e81886fd8380e5e
[ "MIT" ]
null
null
null
app/eg003_list_envelopes.py
AaronWDS/eg-03-python-auth-code-grant
6cb1694cbbb8cdbf166fda282e81886fd8380e5e
[ "MIT" ]
null
null
null
app/eg003_list_envelopes.py
AaronWDS/eg-03-python-auth-code-grant
6cb1694cbbb8cdbf166fda282e81886fd8380e5e
[ "MIT" ]
null
null
null
"""Example 003: List envelopes in the user's account""" from flask import render_template, url_for, redirect, session, flash, request from os import path import json from app import app, ds_config, views from datetime import datetime, timedelta from docusign_esign import * from docusign_esign.rest import ApiException ...
40.159292
110
0.617232
from flask import render_template, url_for, redirect, session, flash, request from os import path import json from app import app, ds_config, views from datetime import datetime, timedelta from docusign_esign import * from docusign_esign.rest import ApiException eg = "eg003" def controller(): if request.method...
true
true
f70851cea744e28815e15729e639c2a5608b56a3
6,283
py
Python
prov_vo/migrations/0006_add_useddescription_wasgeneratedbydescription.py
kristinriebe/django-prov-vo
5bd86eb58833fe591004e6ef431b2b3deae7a62c
[ "Apache-2.0" ]
1
2018-12-11T05:53:55.000Z
2018-12-11T05:53:55.000Z
prov_vo/migrations/0006_add_useddescription_wasgeneratedbydescription.py
kristinriebe/django-prov-vo
5bd86eb58833fe591004e6ef431b2b3deae7a62c
[ "Apache-2.0" ]
null
null
null
prov_vo/migrations/0006_add_useddescription_wasgeneratedbydescription.py
kristinriebe/django-prov-vo
5bd86eb58833fe591004e6ef431b2b3deae7a62c
[ "Apache-2.0" ]
1
2021-06-23T13:09:05.000Z
2021-06-23T13:09:05.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-01-22 12:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('prov_vo', '0005_add_activitydescription_entitydescription')...
48.330769
202
0.629954
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('prov_vo', '0005_add_activitydescription_entitydescription'), ] operations = [ migrations.CreateModel( ...
true
true
f7085209ff1d42f87982b89f116312cf7f730323
3,399
py
Python
findfine/trip/models.py
muchu1983/findfine
b2255db6327324e89b914fd93a81f7ea5eac6f64
[ "BSD-3-Clause" ]
1
2017-05-25T20:25:20.000Z
2017-05-25T20:25:20.000Z
findfine/trip/models.py
muchu1983/104_findfine
b2255db6327324e89b914fd93a81f7ea5eac6f64
[ "BSD-3-Clause" ]
null
null
null
findfine/trip/models.py
muchu1983/104_findfine
b2255db6327324e89b914fd93a81f7ea5eac6f64
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (C) 2016, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ from django.db import models from account.models import UserAccount # 行程資料 class Trip(models.Model): #來源網站 strSource = mo...
31.766355
102
0.714034
from django.db import models from account.models import UserAccount class Trip(models.Model): strSource = models.CharField(max_length=255, null=False) strOriginUrl = models.CharField(db_index=True, max_length=255, null=False) strImageUrl = models.TextField(null=False) strUpdateSta...
true
true
f70852dd2aefe681a6e4b9449b993aa22610a832
5,612
py
Python
test/modules/http2/env.py
tititiou36/httpd
1348607c00ba58ce371f2f8ecb08abf610227043
[ "Apache-2.0" ]
2,529
2015-01-02T11:52:53.000Z
2022-03-30T19:54:27.000Z
test/modules/http2/env.py
tititiou36/httpd
1348607c00ba58ce371f2f8ecb08abf610227043
[ "Apache-2.0" ]
133
2015-04-21T05:50:45.000Z
2022-03-30T14:23:40.000Z
test/modules/http2/env.py
tititiou36/httpd
1348607c00ba58ce371f2f8ecb08abf610227043
[ "Apache-2.0" ]
1,113
2015-01-01T14:47:02.000Z
2022-03-29T16:47:18.000Z
import inspect import logging import os import re import subprocess from typing import Dict, Any from pyhttpd.certs import CertificateSpec from pyhttpd.conf import HttpdConf from pyhttpd.env import HttpdTestEnv, HttpdTestSetup log = logging.getLogger(__name__) class H2TestSetup(HttpdTestSetup): def __init__(se...
39.521127
107
0.586066
import inspect import logging import os import re import subprocess from typing import Dict, Any from pyhttpd.certs import CertificateSpec from pyhttpd.conf import HttpdConf from pyhttpd.env import HttpdTestEnv, HttpdTestSetup log = logging.getLogger(__name__) class H2TestSetup(HttpdTestSetup): def __init__(se...
true
true
f70858bd78db6d504be4468aaef1b4b5b49cd875
6,392
py
Python
models/GNN/GIN.py
mwcvitkovic/Supervised-Learning-on-Relational-Databases-with-GNNs
57195ccab62d23dcbcac1a317f8a9811a9fd6cb5
[ "MIT" ]
44
2020-02-07T12:44:25.000Z
2022-03-31T21:57:08.000Z
models/GNN/GIN.py
mwcvitkovic/Supervised-Learning-on-Relational-Databases-with-GNNs
57195ccab62d23dcbcac1a317f8a9811a9fd6cb5
[ "MIT" ]
2
2020-02-07T03:54:15.000Z
2020-05-07T13:21:29.000Z
models/GNN/GIN.py
mwcvitkovic/Supervised-Learning-on-Relational-Databases-with-GNNs
57195ccab62d23dcbcac1a317f8a9811a9fd6cb5
[ "MIT" ]
10
2020-02-23T07:34:55.000Z
2021-07-25T18:34:40.000Z
from dgl import BatchedDGLGraph from dgl.nn.pytorch.conv import GINConv from torch import nn from models.GNN.GNNModelBase import GNNModelBase from models.utils import TypeConditionalLinear class GIN(GNNModelBase): """ Graph Isomorphism Network as described in https://arxiv.org/pdf/1810.00826.pdf """ ...
44.082759
117
0.532697
from dgl import BatchedDGLGraph from dgl.nn.pytorch.conv import GINConv from torch import nn from models.GNN.GNNModelBase import GNNModelBase from models.utils import TypeConditionalLinear class GIN(GNNModelBase): def __init__(self, n_apply_func_layers, aggregator_type, init_eps, learn_eps, **kwargs): s...
true
true
f7085a1fe5b988f68095a3af873e89d664908629
1,553
py
Python
chainerui/views/log.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
185
2017-12-15T09:24:07.000Z
2022-01-20T11:20:13.000Z
chainerui/views/log.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
191
2017-12-15T09:14:52.000Z
2022-02-17T14:09:19.000Z
chainerui/views/log.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
29
2017-12-15T09:40:45.000Z
2022-03-13T11:21:11.000Z
import datetime from flask import jsonify from flask import request from flask.views import MethodView from chainerui.database import db from chainerui.models.log import Log from chainerui.models.project import Project from chainerui.models.result import Result class LogAPI(MethodView): def post(self, project_...
30.45098
76
0.582743
import datetime from flask import jsonify from flask import request from flask.views import MethodView from chainerui.database import db from chainerui.models.log import Log from chainerui.models.project import Project from chainerui.models.result import Result class LogAPI(MethodView): def post(self, project_...
true
true
f7085abad3d73b13460022c34a237ccc00a67785
5,529
py
Python
unblob/handlers/compression/lz4.py
IoT-Inspector/unblob
4a6c871dae6805a922e55d30a7925910dc6a4eda
[ "MIT" ]
17
2021-11-23T10:05:24.000Z
2022-03-10T15:40:41.000Z
unblob/handlers/compression/lz4.py
IoT-Inspector/unblob
4a6c871dae6805a922e55d30a7925910dc6a4eda
[ "MIT" ]
184
2021-11-22T12:25:05.000Z
2022-03-31T16:27:41.000Z
unblob/handlers/compression/lz4.py
IoT-Inspector/unblob
4a6c871dae6805a922e55d30a7925910dc6a4eda
[ "MIT" ]
2
2021-11-25T09:34:01.000Z
2022-02-18T00:14:23.000Z
""" LZ4 frame format definition: https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md """ import io from typing import Optional from lz4.block import decompress from structlog import get_logger from unblob.extractors import Command from ...file_utils import Endian, convert_int8, convert_int32 from ...models i...
32.910714
138
0.657985
import io from typing import Optional from lz4.block import decompress from structlog import get_logger from unblob.extractors import Command from ...file_utils import Endian, convert_int8, convert_int32 from ...models import File, Handler, HexString, ValidChunk logger = get_logger() SKIPPABLE_FRAMES_MAGIC = [0x18...
true
true
f7085c13fbffd806d01c4d4dbad4ef478c69338d
901
py
Python
utils/image_converter.py
ml-research/Learning-to-Break-Deep-Perceptual-Hashing
12148e8ecd47faa1f816f52f56662c47cd240cc1
[ "MIT" ]
3
2021-11-28T06:18:58.000Z
2022-01-27T08:14:43.000Z
utils/image_converter.py
ml-research/Learning-to-Break-Deep-Perceptual-Hashing
12148e8ecd47faa1f816f52f56662c47cd240cc1
[ "MIT" ]
null
null
null
utils/image_converter.py
ml-research/Learning-to-Break-Deep-Perceptual-Hashing
12148e8ecd47faa1f816f52f56662c47cd240cc1
[ "MIT" ]
1
2021-12-25T10:51:21.000Z
2021-12-25T10:51:21.000Z
from PIL import Image import os import sys from os import listdir from os.path import isfile, join def main(): folder_path = sys.argv[1] output_folder_path = folder_path + '_png' try: os.mkdir(output_folder_path) except: if not os.listdir(output_folder_path): print('Folder...
27.30303
79
0.644839
from PIL import Image import os import sys from os import listdir from os.path import isfile, join def main(): folder_path = sys.argv[1] output_folder_path = folder_path + '_png' try: os.mkdir(output_folder_path) except: if not os.listdir(output_folder_path): print('Folder...
true
true
f7085e10c8d2e0b60f50b9c127218e92539ccc62
6,456
py
Python
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinn_front_end_common/interface/interface_functions/front_end_common_edge_to_n_keys_mapper.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
2
2020-11-01T13:22:11.000Z
2020-11-01T13:22:20.000Z
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinn_front_end_common/interface/interface_functions/front_end_common_edge_to_n_keys_mapper.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
null
null
null
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinn_front_end_common/interface/interface_functions/front_end_common_edge_to_n_keys_mapper.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
null
null
null
# pacman imports from pacman.model.routing_info.\ dict_based_partitioned_partition_n_keys_map import \ DictBasedPartitionedPartitionNKeysMap # spinnMachine imports from spinn_machine.utilities.progress_bar import ProgressBar # front end common imports from spinn_front_end_common.abstract_models.\ abstract...
41.121019
79
0.632125
from pacman.model.routing_info.\ dict_based_partitioned_partition_n_keys_map import \ DictBasedPartitionedPartitionNKeysMap from spinn_machine.utilities.progress_bar import ProgressBar from spinn_front_end_common.abstract_models.\ abstract_provides_incoming_partition_constraints import \ AbstractPr...
true
true
f7086129b7bd3d12551eac468949f7252bcec980
6,286
py
Python
pdf_maker.py
jlvdb/the-wizz
21e88888472d2598a0db861aef31076078628b8e
[ "Apache-2.0" ]
null
null
null
pdf_maker.py
jlvdb/the-wizz
21e88888472d2598a0db861aef31076078628b8e
[ "Apache-2.0" ]
null
null
null
pdf_maker.py
jlvdb/the-wizz
21e88888472d2598a0db861aef31076078628b8e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """This code is the main access point for the majority of users of The-wiZZ. It takes an input subselection of a survey catalog, a The-wiZZ HDF5 data file, and matches the two together to create a resultant clustering redshift estimate that can then be turned into a redshift PDF. This code also ...
54.66087
79
0.715399
import numpy as np from the_wizz import core_utils from the_wizz import pdf_maker_utils from the_wizz import input_flags if __name__ == "__main__": print("") print("The-wiZZ has begun conjuring: running pdf maker...") args = input_flags.parse_input_pdf_args() input_flags.print_args(args)...
true
true
f708620cad5142402febfbc989ae3b8a7258b902
2,648
py
Python
apps/shop/models.py
Nicolaad/onlineweb4
5942eaf907d6824d5384147627def9edefdb9946
[ "MIT" ]
null
null
null
apps/shop/models.py
Nicolaad/onlineweb4
5942eaf907d6824d5384147627def9edefdb9946
[ "MIT" ]
null
null
null
apps/shop/models.py
Nicolaad/onlineweb4
5942eaf907d6824d5384147627def9edefdb9946
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import uuid from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.validators import MinValueValidator from django.db import models from rest_framework.exceptions import NotAcceptable from apps.authentication...
31.152941
80
0.687689
import uuid from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.validators import MinValueValidator from django.db import models from rest_framework.exceptions import NotAcceptable from apps.authentication.models import OnlineUs...
true
true
f7086304767140feaa75fdfd87ef314fb7e3e72f
2,300
py
Python
isotope/run_tests.py
daixiang0/tools
06ec9d04b426e9620eebfe04d265b0ba16c16f2f
[ "Apache-2.0" ]
264
2018-02-19T05:29:09.000Z
2022-03-31T18:25:15.000Z
isotope/run_tests.py
daixiang0/tools
06ec9d04b426e9620eebfe04d265b0ba16c16f2f
[ "Apache-2.0" ]
976
2018-04-26T18:44:43.000Z
2022-03-31T21:46:37.000Z
isotope/run_tests.py
daixiang0/tools
06ec9d04b426e9620eebfe04d265b0ba16c16f2f
[ "Apache-2.0" ]
243
2018-01-22T21:06:17.000Z
2022-03-28T13:14:26.000Z
#!/usr/bin/env python3 # Copyright Istio Authors # # 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 ag...
37.096774
79
0.705217
import argparse import logging from runner import cluster, config as cfg, consts, entrypoint, mesh, pipeline def main(args: argparse.Namespace) -> None: log_level = getattr(logging, args.log_level) logging.basicConfig(level=log_level, format='%(levelname)s\t> %(message)s') config = cfg.f...
true
true
f70863342fef175da268d31958ec978288c8b856
4,119
py
Python
django/contrib/sitemaps/__init__.py
egenerat/gae-django
f12379483cf3917ed3cb46ca5ff0b94daf89fc50
[ "MIT" ]
3
2016-07-08T23:49:32.000Z
2018-04-15T22:55:01.000Z
django/contrib/sitemaps/__init__.py
egenerat/gae-django
f12379483cf3917ed3cb46ca5ff0b94daf89fc50
[ "MIT" ]
27
2017-02-05T15:57:04.000Z
2018-04-15T22:57:26.000Z
django/contrib/sitemaps/__init__.py
egenerat/gae-django
f12379483cf3917ed3cb46ca5ff0b94daf89fc50
[ "MIT" ]
null
null
null
from django.contrib.sites.models import Site, get_current_site from django.core import urlresolvers, paginator from django.core.exceptions import ImproperlyConfigured import urllib PING_URL = "http://www.google.com/webmasters/tools/ping" class SitemapNotFound(Exception): pass def ping_google(sitemap_ur...
37.445455
170
0.616655
from django.contrib.sites.models import Site, get_current_site from django.core import urlresolvers, paginator from django.core.exceptions import ImproperlyConfigured import urllib PING_URL = "http://www.google.com/webmasters/tools/ping" class SitemapNotFound(Exception): pass def ping_google(sitemap_ur...
true
true
f70863889847fb1a163c7bc0a443fdebd98b7b02
10,304
py
Python
src/tools/autoware_auto_avp_demo/launch/ms3_core.launch.py
rubis-lab/autoware_rubis
498ec5ff4c448d456fa0c6fe2f17e02fbd13ddb9
[ "Apache-2.0" ]
null
null
null
src/tools/autoware_auto_avp_demo/launch/ms3_core.launch.py
rubis-lab/autoware_rubis
498ec5ff4c448d456fa0c6fe2f17e02fbd13ddb9
[ "Apache-2.0" ]
null
null
null
src/tools/autoware_auto_avp_demo/launch/ms3_core.launch.py
rubis-lab/autoware_rubis
498ec5ff4c448d456fa0c6fe2f17e02fbd13ddb9
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-2021, The Autoware Foundation # # 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 agre...
40.566929
97
0.712151
from ament_index_python import get_package_share_directory from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.actions import IncludeLaunchDescription from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.conditions import If...
true
true
f70866c7894b122e47ce5ce5260f234fc330a584
3,141
py
Python
tools/telemetry/telemetry/page/gtest_test_results.py
iplo/Chain
8bc8943d66285d5258fffc41bed7c840516c4422
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
tools/telemetry/telemetry/page/gtest_test_results.py
xiaoyuyanran/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2017-02-14T21:55:58.000Z
2017-02-14T21:55:58.000Z
tools/telemetry/telemetry/page/gtest_test_results.py
xiaoyuyanran/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# Copyright (c) 2013 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. import logging import sys import time import unittest from telemetry.page import page_test_results class GTestTestResults(page_test_results.PageTestRes...
34.516484
74
0.65425
import logging import sys import time import unittest from telemetry.page import page_test_results class GTestTestResults(page_test_results.PageTestResults): def __init__(self, output_stream): super(GTestTestResults, self).__init__(output_stream) self._timestamp = None def _GetMs(self): return (t...
true
true
f70866f021973b2bbbd78644a63222e38c0f66c0
2,804
py
Python
cleaning/cleaner.py
antonpaquin/IsItAnime
72c2c15ae9bf3907a25b40378831ca4efd85cc5b
[ "MIT" ]
11
2018-06-21T08:15:31.000Z
2021-08-11T06:03:40.000Z
cleaning/cleaner.py
antonpaquin/IsItAnime
72c2c15ae9bf3907a25b40378831ca4efd85cc5b
[ "MIT" ]
null
null
null
cleaning/cleaner.py
antonpaquin/IsItAnime
72c2c15ae9bf3907a25b40378831ca4efd85cc5b
[ "MIT" ]
1
2020-01-24T20:21:48.000Z
2020-01-24T20:21:48.000Z
#! /usr/bin/python from flask import Flask, request, jsonify import boto3 import os from queue import Queue from threading import Thread import time s3 = boto3.client('s3') s3_raw = boto3.resource('s3').Bucket('isitanime-data-raw') s3_dest = boto3.resource('s3').Bucket('isitanime-data-clean') app = Flask(__name__) @...
23.762712
66
0.566334
from flask import Flask, request, jsonify import boto3 import os from queue import Queue from threading import Thread import time s3 = boto3.client('s3') s3_raw = boto3.resource('s3').Bucket('isitanime-data-raw') s3_dest = boto3.resource('s3').Bucket('isitanime-data-clean') app = Flask(__name__) @app.route('/') def...
true
true
f70867e30ba8f552834af7092af1c7537adc3095
1,198
py
Python
tbx/people/blocks.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
103
2015-02-24T17:58:21.000Z
2022-03-23T08:08:58.000Z
tbx/people/blocks.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
145
2015-01-13T17:13:43.000Z
2022-03-29T12:56:20.000Z
tbx/people/blocks.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
57
2015-01-03T12:00:37.000Z
2022-02-09T13:11:30.000Z
from wagtail.core import blocks from wagtail.images.blocks import ImageChooserBlock class StandoutItemsBlock(blocks.StructBlock): class LinkBlock(blocks.StreamBlock): internal = blocks.PageChooserBlock() external = blocks.URLBlock() class Meta: required = False max...
25.489362
121
0.600167
from wagtail.core import blocks from wagtail.images.blocks import ImageChooserBlock class StandoutItemsBlock(blocks.StructBlock): class LinkBlock(blocks.StreamBlock): internal = blocks.PageChooserBlock() external = blocks.URLBlock() class Meta: required = False max...
true
true
f708682576c4e7833b45e1bc645efeeecf96c324
1,289
py
Python
tests/test_nodes.py
commarla/python-nomad
37df37e4de21e6f8ac41c6154e7f1f44f1800020
[ "MIT" ]
109
2016-06-06T09:18:02.000Z
2022-03-17T17:41:20.000Z
tests/test_nodes.py
commarla/python-nomad
37df37e4de21e6f8ac41c6154e7f1f44f1800020
[ "MIT" ]
104
2016-06-04T23:06:06.000Z
2021-12-08T04:49:43.000Z
tests/test_nodes.py
commarla/python-nomad
37df37e4de21e6f8ac41c6154e7f1f44f1800020
[ "MIT" ]
80
2016-06-05T00:33:23.000Z
2021-11-20T15:17:38.000Z
import pytest # integration tests requires nomad Vagrant VM or Binary running def test_get_nodes(nomad_setup): assert isinstance(nomad_setup.nodes.get_nodes(), list) == True def test_get_nodes_prefix(nomad_setup): nodes = nomad_setup.nodes.get_nodes() prefix = nodes[0]["ID"][:4] nomad_setup.nodes.ge...
23.017857
66
0.753297
import pytest def test_get_nodes(nomad_setup): assert isinstance(nomad_setup.nodes.get_nodes(), list) == True def test_get_nodes_prefix(nomad_setup): nodes = nomad_setup.nodes.get_nodes() prefix = nodes[0]["ID"][:4] nomad_setup.nodes.get_nodes(prefix=prefix) def test_dunder_getitem_exist(nomad_se...
true
true
f7086a22a8b6cbc948ed244b0ec6f73cdc2f4cd2
2,987
py
Python
newsroom/evaluate/run.py
peter-xbs/newsroom_chinese
7fcae68b2ea5584d08d0c48faee34a0734237e6b
[ "Apache-2.0" ]
null
null
null
newsroom/evaluate/run.py
peter-xbs/newsroom_chinese
7fcae68b2ea5584d08d0c48faee34a0734237e6b
[ "Apache-2.0" ]
null
null
null
newsroom/evaluate/run.py
peter-xbs/newsroom_chinese
7fcae68b2ea5584d08d0c48faee34a0734237e6b
[ "Apache-2.0" ]
null
null
null
################################################################################ from subprocess import Popen, PIPE, STDOUT from threading import Thread import bz2, json, click from newsroom import jsonl from . import readiter from tqdm import tqdm ###################################################################...
22.628788
80
0.494811
true
true
f7086a4801ba30d289dac1b201115bb48bcbdc1f
3,196
py
Python
app/models.py
OmegaM/story
421c457bc121d6ca418468199108da7bd9f96435
[ "BSD-3-Clause" ]
null
null
null
app/models.py
OmegaM/story
421c457bc121d6ca418468199108da7bd9f96435
[ "BSD-3-Clause" ]
null
null
null
app/models.py
OmegaM/story
421c457bc121d6ca418468199108da7bd9f96435
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- """Created with Pycharm IDEA @Create on 2015/9/12 16:31 @my_story models.py @author : OmegaMiao""" from app import db, loginManager from datetime import datetime from werkzeug.security import generate_password_hash, check_password_hash from flask.ext.login import User...
29.592593
94
0.661139
from app import db, loginManager from datetime import datetime from werkzeug.security import generate_password_hash, check_password_hash from flask.ext.login import UserMixin class Story(db.Model): __tablename__ = 'story' id = db.Column(db.Integer, primary_key=True, autoincrement=True) title = db.Co...
true
true
f7086a73213296163f142ee1d848a32e72f49d62
7,182
py
Python
ckan/lib/app_globals.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
2
2015-07-17T19:09:52.000Z
2017-08-30T20:23:44.000Z
ckan/lib/app_globals.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
12
2015-01-19T18:03:56.000Z
2016-04-11T16:40:33.000Z
ckan/lib/app_globals.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
3
2015-03-31T06:19:42.000Z
2016-06-27T15:32:28.000Z
''' The application's Globals object ''' import logging import time from threading import Lock import re from paste.deploy.converters import asbool from pylons import config import ckan import ckan.model as model import ckan.logic as logic log = logging.getLogger(__name__) # mappings translate between config set...
31.778761
82
0.623225
import logging import time from threading import Lock import re from paste.deploy.converters import asbool from pylons import config import ckan import ckan.model as model import ckan.logic as logic log = logging.getLogger(__name__) mappings = { } app_globals_from_config_details = { 'ckan.site_title':...
true
true
f7086ab559a469398539456d57d72ca300a38868
2,328
py
Python
bot_config.py
enemchy/rpi-transmission-telegram-bot
71ad3f9ed1c9c2111ac3cd416cd203ff661b67b0
[ "MIT" ]
null
null
null
bot_config.py
enemchy/rpi-transmission-telegram-bot
71ad3f9ed1c9c2111ac3cd416cd203ff661b67b0
[ "MIT" ]
null
null
null
bot_config.py
enemchy/rpi-transmission-telegram-bot
71ad3f9ed1c9c2111ac3cd416cd203ff661b67b0
[ "MIT" ]
null
null
null
import configparser class BotConfig: def __init__(self, path): parser = configparser.ConfigParser() # open the file implicitly because parser.read() will not fail if file is not readable file = open(path) parser.read_file(file) file.close() if 'Bot' not in parser...
29.846154
94
0.554553
import configparser class BotConfig: def __init__(self, path): parser = configparser.ConfigParser() file = open(path) parser.read_file(file) file.close() if 'Bot' not in parser.sections(): raise Exception('All parameters must reside in section ''Bot'...
true
true
f7086ba816e8596d2d810b8a0cd6ad6a963370bb
1,309
py
Python
setup.py
qingzma/DBEst_MDN
3a3e26bede308b70abfad07032dc16a07a170f34
[ "BSD-2-Clause" ]
1
2022-02-23T08:01:08.000Z
2022-02-23T08:01:08.000Z
setup.py
qingzma/DBEst_MDN
3a3e26bede308b70abfad07032dc16a07a170f34
[ "BSD-2-Clause" ]
null
null
null
setup.py
qingzma/DBEst_MDN
3a3e26bede308b70abfad07032dc16a07a170f34
[ "BSD-2-Clause" ]
2
2020-09-28T15:39:12.000Z
2021-05-11T11:07:54.000Z
# -*- coding: utf-8 -*- import os from setuptools import find_packages, setup with open('README.rst') as f: readme = f.read() # with open('LICENSE.txt') as f: # licenses = f.read() setup( name='dbestclient', version='2.0', description='Model-based Approximate Query Processing (AQP) engine.', ...
30.44186
152
0.638655
import os from setuptools import find_packages, setup with open('README.rst') as f: readme = f.read() setup( name='dbestclient', version='2.0', description='Model-based Approximate Query Processing (AQP) engine.', classifiers=[ 'Development Status :: 2.0', 'License :: OSI A...
true
true
f7086c4726768d3708f3740cbbb11df2243f6488
2,081
py
Python
cyllene/m_user_cmd.py
28left/psumathnotebooks
ec948216304e5f234a2f4d0f6bdcfaa1a10c435d
[ "MIT" ]
1
2021-05-04T14:09:51.000Z
2021-05-04T14:09:51.000Z
cyllene/m_user_cmd.py
28left/psumathnotebooks
ec948216304e5f234a2f4d0f6bdcfaa1a10c435d
[ "MIT" ]
null
null
null
cyllene/m_user_cmd.py
28left/psumathnotebooks
ec948216304e5f234a2f4d0f6bdcfaa1a10c435d
[ "MIT" ]
null
null
null
import sympy as sp import cyllene.f_aux as fa import cyllene.f_functionclass as ff import cyllene.f_compare as fc def function(expr): """ Defines a function based on a syntax check and a Function object, using lambda operator. Returns a pure function. """ func = ff.Function(expr) if fun...
24.77381
77
0.596348
import sympy as sp import cyllene.f_aux as fa import cyllene.f_functionclass as ff import cyllene.f_compare as fc def function(expr): func = ff.Function(expr) if func.is_defined: return lambda x: func.eval_at(x) else: issues_report=''.join(['\t' + str(i+1) + '. ' + func.issues[i]+'\n' ...
true
true
f7086cc203e842715757a439d19fd452474498b5
106
py
Python
src/windshape/__init__.py
Adrien4193/windshape
4c73a4a85409f04518029f0ddb8bd7e3c60e4905
[ "BSD-2-Clause" ]
null
null
null
src/windshape/__init__.py
Adrien4193/windshape
4c73a4a85409f04518029f0ddb8bd7e3c60e4905
[ "BSD-2-Clause" ]
null
null
null
src/windshape/__init__.py
Adrien4193/windshape
4c73a4a85409f04518029f0ddb8bd7e3c60e4905
[ "BSD-2-Clause" ]
null
null
null
from Commander import Commander from gui.UserInterface import UserInterface from log.Replay import Replay
26.5
43
0.867925
from Commander import Commander from gui.UserInterface import UserInterface from log.Replay import Replay
true
true
f7086d6fd660e481fbc60dbc73e3939ebde70e73
2,070
py
Python
bluesky/tests/test_bec.py
danielballan/bluesky
868c42f6b6be33f320bb3b5100d59c5378d2b5af
[ "BSD-3-Clause" ]
null
null
null
bluesky/tests/test_bec.py
danielballan/bluesky
868c42f6b6be33f320bb3b5100d59c5378d2b5af
[ "BSD-3-Clause" ]
44
2015-06-30T21:04:52.000Z
2019-09-19T11:11:52.000Z
bluesky/tests/test_bec.py
danielballan/bluesky
868c42f6b6be33f320bb3b5100d59c5378d2b5af
[ "BSD-3-Clause" ]
2
2015-07-01T00:30:41.000Z
2016-10-03T16:26:32.000Z
import ast from bluesky.plans import scan, grid_scan import bluesky.preprocessors as bpp import bluesky.plan_stubs as bps from bluesky.preprocessors import SupplementalData from bluesky.callbacks.best_effort import BestEffortCallback def test_hints(RE, hw): motor = hw.motor expected_hint = {'fields': [motor.n...
23.258427
74
0.658454
import ast from bluesky.plans import scan, grid_scan import bluesky.preprocessors as bpp import bluesky.plan_stubs as bps from bluesky.preprocessors import SupplementalData from bluesky.callbacks.best_effort import BestEffortCallback def test_hints(RE, hw): motor = hw.motor expected_hint = {'fields': [motor.n...
true
true
f7086dc9522222ece382e172353cf23a6d069ea8
2,160
py
Python
rllib/algorithms/ac.py
4kubo/rllib
4f9f5f49916c7681675305b6c9a276b9e88c5e22
[ "MIT" ]
null
null
null
rllib/algorithms/ac.py
4kubo/rllib
4f9f5f49916c7681675305b6c9a276b9e88c5e22
[ "MIT" ]
null
null
null
rllib/algorithms/ac.py
4kubo/rllib
4f9f5f49916c7681675305b6c9a276b9e88c5e22
[ "MIT" ]
null
null
null
"""Actor-Critic Algorithm.""" from rllib.util.neural_networks.utilities import broadcast_to_tensor from .abstract_algorithm import AbstractAlgorithm class ActorCritic(AbstractAlgorithm): r"""Implementation of Policy Gradient algorithm. Policy-Gradient is an on-policy model-free control algorithm. Policy...
34.285714
87
0.683333
from rllib.util.neural_networks.utilities import broadcast_to_tensor from .abstract_algorithm import AbstractAlgorithm class ActorCritic(AbstractAlgorithm): def __init__( self, num_policy_samples=15, standardize_returns=True, *args, **kwargs ): super().__init__(num_policy_samples=num_policy_...
true
true
f7086df80423a19c718962ed1d7dcca8367671f9
24,024
py
Python
build/android/gyp/compile_resources.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
build/android/gyp/compile_resources.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
build/android/gyp/compile_resources.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # # Copyright (c) 2012 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. """Compile Android resources into an intermediate APK. This can also generate an R.txt, and an .srcjar file containing the prope...
35.538462
80
0.700716
import argparse import collections import multiprocessing.pool import os import re import shutil import subprocess import sys import zipfile from xml.etree import ElementTree from util import build_utils from util import resource_utils _SOURCE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dir...
true
true