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
f74a2a58a72c7a0f0cdbd67149cb489f5354bee8
33,677
py
Python
instruction_env/Lib/site-packages/numpydoc/tests/test_docscrape.py
lfunderburk/Effective-Instructions
ce40f890fb8623ff1ec9c3e9e1190505cbd1e6db
[ "MIT" ]
1
2021-03-15T03:59:34.000Z
2021-03-15T03:59:34.000Z
instruction_env/Lib/site-packages/numpydoc/tests/test_docscrape.py
lfunderburk/Effective-Instructions
ce40f890fb8623ff1ec9c3e9e1190505cbd1e6db
[ "MIT" ]
7
2020-12-04T04:10:42.000Z
2021-03-16T00:53:09.000Z
instruction_env/Lib/site-packages/numpydoc/tests/test_docscrape.py
lfunderburk/Effective-Instructions
ce40f890fb8623ff1ec9c3e9e1190505cbd1e6db
[ "MIT" ]
1
2021-01-20T01:58:53.000Z
2021-01-20T01:58:53.000Z
# -*- encoding:utf-8 -*- from collections import namedtuple from copy import deepcopy import re import textwrap import warnings import jinja2 from numpydoc.numpydoc import update_config from numpydoc.xref import DEFAULT_LINKS from numpydoc.docscrape import ( NumpyDocString, FunctionDoc, ClassDoc, Pars...
22.602013
124
0.582445
from collections import namedtuple from copy import deepcopy import re import textwrap import warnings import jinja2 from numpydoc.numpydoc import update_config from numpydoc.xref import DEFAULT_LINKS from numpydoc.docscrape import ( NumpyDocString, FunctionDoc, ClassDoc, ParseError ) from numpydoc.d...
true
true
f74a2af4ce237ddb6487884558fc07be88db3296
4,456
py
Python
qiskit/chemistry/drivers/fcidumpd/fcidumpdriver.py
sorin-bolos/qiskit-aqua
ce73337878e5c1fc1cf5e13efaf3e33b231789e4
[ "Apache-2.0" ]
2
2020-06-29T16:08:12.000Z
2020-08-07T22:42:13.000Z
qiskit/chemistry/drivers/fcidumpd/fcidumpdriver.py
sorin-bolos/qiskit-aqua
ce73337878e5c1fc1cf5e13efaf3e33b231789e4
[ "Apache-2.0" ]
null
null
null
qiskit/chemistry/drivers/fcidumpd/fcidumpdriver.py
sorin-bolos/qiskit-aqua
ce73337878e5c1fc1cf5e13efaf3e33b231789e4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
41.64486
100
0.652154
from typing import List, Optional from qiskit.chemistry.drivers import BaseDriver from qiskit.chemistry import QiskitChemistryError, QMolecule from .dumper import dump from .parser import parse class FCIDumpDriver(BaseDriver): def __init__(self, fcidump_input: str, atoms: Optional[List[str]] = Non...
true
true
f74a2c02757d56d4e71b63b64ba38781b6ff5ae8
966
py
Python
tests/test_irl.py
sethmlarson/irl
f28cc40faa8ef7991a4116fa38d1ea2be21ec081
[ "MIT" ]
7
2019-07-10T10:21:33.000Z
2020-09-22T09:05:09.000Z
tests/test_irl.py
python-http/yaul
f28cc40faa8ef7991a4116fa38d1ea2be21ec081
[ "MIT" ]
2
2019-09-25T17:26:03.000Z
2019-11-15T06:18:18.000Z
tests/test_irl.py
python-http/yaul
f28cc40faa8ef7991a4116fa38d1ea2be21ec081
[ "MIT" ]
null
null
null
import pytest import irl def test_equality_on_normalize(): url1 = irl.URL.parse("http://ヒ.example.com/abc%af?ヒq%CC#%dE") url2 = irl.URL.parse("HTTP://xn--pdk.eXaMpLe.CoM/abc%AF?%E3%83%92q%cc#%De") assert url1 == url2 @pytest.mark.parametrize( ["url", "addr"], [ ("http://example.com", ("...
28.411765
86
0.582816
import pytest import irl def test_equality_on_normalize(): url1 = irl.URL.parse("http://ヒ.example.com/abc%af?ヒq%CC#%dE") url2 = irl.URL.parse("HTTP://xn--pdk.eXaMpLe.CoM/abc%AF?%E3%83%92q%cc#%De") assert url1 == url2 @pytest.mark.parametrize( ["url", "addr"], [ ("http://example.com", ("...
true
true
f74a2c65a8a24df6641e3afb5b13ce0ed24a3320
10,774
py
Python
train.py
shun60s/BipedalWalkerHardcore-Weights-Choice
76a3df3585a13881f1754274b8ded73a054d551d
[ "Apache-2.0" ]
1
2021-09-21T11:28:02.000Z
2021-09-21T11:28:02.000Z
train.py
shun60s/BipedalWalkerHardcore-Weights-Choice
76a3df3585a13881f1754274b8ded73a054d551d
[ "Apache-2.0" ]
null
null
null
train.py
shun60s/BipedalWalkerHardcore-Weights-Choice
76a3df3585a13881f1754274b8ded73a054d551d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ----------------------------------------------------------------------------- Copyright 2017 David Griffis 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 ...
41.75969
153
0.528216
from __future__ import division from setproctitle import setproctitle as ptitle import numpy as np import torch import torch.optim as optim from environment import create_env from utils import ensure_shared_grads from model import * from player_util import Agent from torch.autograd import Variable import gym def ...
true
true
f74a2e33001b7c5e76e7c3036c7082fa0ab178fb
2,808
py
Python
pyapp/pyapp.py
devanshbatham/CLI-Project-Generator
617ca3662eb18f6134a521b78c933e07206d3b83
[ "Apache-2.0" ]
3
2021-12-18T08:49:19.000Z
2021-12-31T10:28:38.000Z
pyapp/pyapp.py
devanshbatham/CLI-Project-Generator
617ca3662eb18f6134a521b78c933e07206d3b83
[ "Apache-2.0" ]
null
null
null
pyapp/pyapp.py
devanshbatham/CLI-Project-Generator
617ca3662eb18f6134a521b78c933e07206d3b83
[ "Apache-2.0" ]
null
null
null
import os import argparse PROJECT_FILE = """ import argparse def main(): parser = argparse.ArgumentParser(description='CLI for PROJECT_NAME') parser.add_argument('-v', '--version', action='store_true') args = parser.parse_args() print('CLI for PROJECT_NAME') """ SETUP_TEMPLATE = ""...
27.80198
109
0.639957
import os import argparse PROJECT_FILE = """ import argparse def main(): parser = argparse.ArgumentParser(description='CLI for PROJECT_NAME') parser.add_argument('-v', '--version', action='store_true') args = parser.parse_args() print('CLI for PROJECT_NAME') """ SETUP_TEMPLATE = ""...
true
true
f74a2e37020b9b9e0702331ff6e7a49c2a6f4eb8
3,222
py
Python
data/process_data.py
shahad-bit/Disaster-Response-Pipeline
76a86db14845c8d8ba8d87c81112580c96b2b0d4
[ "CNRI-Python" ]
null
null
null
data/process_data.py
shahad-bit/Disaster-Response-Pipeline
76a86db14845c8d8ba8d87c81112580c96b2b0d4
[ "CNRI-Python" ]
14
2020-01-10T22:26:06.000Z
2022-02-10T01:16:49.000Z
data/process_data.py
shahad-bit/Disaster-Response-Pipeline
76a86db14845c8d8ba8d87c81112580c96b2b0d4
[ "CNRI-Python" ]
null
null
null
import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): """Load disaster messages and categories from csv files. Arguments: messages_filepath {String} -- disaster message file path categories_filepath {String} -- disaster c...
32.877551
80
0.658287
import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): messages = pd.read_csv(messages_filepath) categories = pd.read_csv(categories_filepath) df = messages.merge(categories, on='id') return df def clean_data(df): categorie...
true
true
f74a2e95c8b21aba2ead7f5e493799e8da67155e
1,610
py
Python
makeadditions/transform/llvm/rm.py
hutoTUM/MakeAdditions
85fbe80c16d24abdddeee2d737f046a5bd1a9604
[ "Apache-2.0" ]
null
null
null
makeadditions/transform/llvm/rm.py
hutoTUM/MakeAdditions
85fbe80c16d24abdddeee2d737f046a5bd1a9604
[ "Apache-2.0" ]
null
null
null
makeadditions/transform/llvm/rm.py
hutoTUM/MakeAdditions
85fbe80c16d24abdddeee2d737f046a5bd1a9604
[ "Apache-2.0" ]
null
null
null
""" rm - remove files or directories """ from os import path from ..Transformer import TransformerLlvm from ...constants import EXECFILEEXTENSION class TransformAr(TransformerLlvm): """ transform ar commands """ @staticmethod def can_be_applied_on(cmd): return (cmd.bashcmd.startswith("rm -f ") a...
30.961538
73
0.51677
from os import path from ..Transformer import TransformerLlvm from ...constants import EXECFILEEXTENSION class TransformAr(TransformerLlvm): @staticmethod def can_be_applied_on(cmd): return (cmd.bashcmd.startswith("rm -f ") and not cmd.bashcmd.startswith("rm -f -r")) @staticmeth...
true
true
f74a2fd6fef024d173e0aebd5445515342ca63fa
1,314
py
Python
src/hacker-prank.py
YTAngryFox/OsenOS
9cea7ec9e6b7f2f52ed1bb5eccb2337071a182a6
[ "MIT" ]
null
null
null
src/hacker-prank.py
YTAngryFox/OsenOS
9cea7ec9e6b7f2f52ed1bb5eccb2337071a182a6
[ "MIT" ]
null
null
null
src/hacker-prank.py
YTAngryFox/OsenOS
9cea7ec9e6b7f2f52ed1bb5eccb2337071a182a6
[ "MIT" ]
null
null
null
import time def wait(sec): time.sleep(sec) wait(1) print("") print("Granting information") print("") wait(1) print("") print("Running nmap on target 54.32.43.1") print("") wait(1) print("nmap -sS 54.32.43.1") print("Nmap Copyright 2022") print("port/tcp 8080 open. http-proxy") print("Done with scan") wait(1) prin...
19.043478
123
0.671233
import time def wait(sec): time.sleep(sec) wait(1) print("") print("Granting information") print("") wait(1) print("") print("Running nmap on target 54.32.43.1") print("") wait(1) print("nmap -sS 54.32.43.1") print("Nmap Copyright 2022") print("port/tcp 8080 open. http-proxy") print("Done with scan") wait(1) prin...
true
true
f74a3107cde5bf9550ab1e547bd6323b6e8fcde9
44,883
py
Python
icarus/models/strategy/hashrouting.py
Chrisys93/IcarusRepoSEND
f670b8e178c6e6e63cdabb71434eee8ac33c28e9
[ "MIT" ]
4
2021-04-29T10:16:04.000Z
2022-03-02T08:14:53.000Z
icarus/models/strategy/hashrouting.py
Chrisys93/IcarusRepoSEND
f670b8e178c6e6e63cdabb71434eee8ac33c28e9
[ "MIT" ]
1
2021-12-13T07:40:46.000Z
2021-12-20T16:59:08.000Z
icarus/models/strategy/hashrouting.py
Chrisys93/IcarusRepoSEND
f670b8e178c6e6e63cdabb71434eee8ac33c28e9
[ "MIT" ]
1
2021-11-25T05:42:20.000Z
2021-11-25T05:42:20.000Z
# -*- coding: utf-8 -*- """Implementations of all hash-routing strategies""" from __future__ import division import networkx as nx from collections import Counter from icarus.registry import register_strategy from icarus.util import inheritdoc, multicast_tree, path_links from icarus.scenarios.algorithms import extrac...
46.850731
120
0.613863
from __future__ import division import networkx as nx from collections import Counter from icarus.registry import register_strategy from icarus.util import inheritdoc, multicast_tree, path_links from icarus.scenarios.algorithms import extract_cluster_level_topology from .base import Strategy __all__ = [ ...
true
true
f74a331896cb628409d81194ee1057a5108d3e70
16,555
py
Python
yolov3/yolo_detection/yolo_files/Utils/yolo3/model.py
adesgautam/objdet
7154bd5035dd51de8a49b7ae59b65277a1727263
[ "MIT" ]
null
null
null
yolov3/yolo_detection/yolo_files/Utils/yolo3/model.py
adesgautam/objdet
7154bd5035dd51de8a49b7ae59b65277a1727263
[ "MIT" ]
14
2020-09-25T22:42:09.000Z
2022-03-12T00:39:57.000Z
yolov3/yolo_training/Utils/keras_yolo3/yolo3/model.py
adesgautam/objdet
7154bd5035dd51de8a49b7ae59b65277a1727263
[ "MIT" ]
null
null
null
"""YOLO_v3 Model Defined in Keras.""" from functools import wraps import numpy as np import tensorflow as tf from tensorflow.python.ops import control_flow_ops import keras from keras import backend as K from keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate, MaxPooling2D from keras.layers.adv...
39.891566
126
0.629236
from functools import wraps import numpy as np import tensorflow as tf from tensorflow.python.ops import control_flow_ops import keras from keras import backend as K from keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate, MaxPooling2D from keras.layers.advanced_activations import LeakyReLU fro...
true
true
f74a3357ba8c0decc78566e00f6f85b55ca255c6
914
py
Python
src/sima/sima/blueprints/librarypathitem.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/sima/blueprints/librarypathitem.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/sima/blueprints/librarypathitem.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# # Generated with LibraryPathItemBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from .moao import MOAOBlueprint class LibraryPathItemBlueprint(MOA...
48.105263
121
0.741794
from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from .moao import MOAOBlueprint class LibraryPathItemBlueprint(MOAOBlueprint): def __init__(self, name="...
true
true
f74a349355a4b58a40a00e1d8542de585bb467da
117
py
Python
django_datawatch/defaults.py
kseniyapotter/django-datawatch
b42648219940b85ecb5d7fd6f4d84686ecd272e7
[ "MIT" ]
null
null
null
django_datawatch/defaults.py
kseniyapotter/django-datawatch
b42648219940b85ecb5d7fd6f4d84686ecd272e7
[ "MIT" ]
null
null
null
django_datawatch/defaults.py
kseniyapotter/django-datawatch
b42648219940b85ecb5d7fd6f4d84686ecd272e7
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- defaults = dict( BACKEND='django_datawatch.backends.synchronous', RUN_SIGNALS=True)
19.5
52
0.675214
defaults = dict( BACKEND='django_datawatch.backends.synchronous', RUN_SIGNALS=True)
true
true
f74a360b35c9cc8faebc5186732c8c141b79faf3
4,356
py
Python
src/ds4_driver/controller.py
sss22213/ros2_dashing_ds4_driver
84c52f90b01e4c8d44b5cf8a0e35ed64567b1789
[ "MIT" ]
1
2020-02-03T17:03:20.000Z
2020-02-03T17:03:20.000Z
src/ds4_driver/controller.py
sss22213/ros2_dashing_ds4_driver
84c52f90b01e4c8d44b5cf8a0e35ed64567b1789
[ "MIT" ]
null
null
null
src/ds4_driver/controller.py
sss22213/ros2_dashing_ds4_driver
84c52f90b01e4c8d44b5cf8a0e35ed64567b1789
[ "MIT" ]
null
null
null
import ds4drv from ds4drv.eventloop import EventLoop from threading import Thread from distutils.version import StrictVersion # Based on DS4Controller class in __main__.py of ds4drv class Controller(Thread): # Reference: https://www.psdevwiki.com/ps4/DualShock_4#Specifications MAX_VOLTAGE = 3.65 # Refere...
31.565217
83
0.539945
import ds4drv from ds4drv.eventloop import EventLoop from threading import Thread from distutils.version import StrictVersion class Controller(Thread): E = 3.65 D_MAX_X = 1919 TOUCHPAD_MAX_Y = 942 BATTERY_FULL_CHARGING = 11 BATTERY_MAX = 8 def __init__(self): super(Controller, self)...
true
true
f74a36301fef62dfd4ce680f8e90de2b4f6c5d6e
740
py
Python
params.py
Shanka123/RL-Sudoku
3edb55c608336fcfb1f43cece73b9aac4e22f964
[ "MIT" ]
null
null
null
params.py
Shanka123/RL-Sudoku
3edb55c608336fcfb1f43cece73b9aac4e22f964
[ "MIT" ]
null
null
null
params.py
Shanka123/RL-Sudoku
3edb55c608336fcfb1f43cece73b9aac4e22f964
[ "MIT" ]
null
null
null
class Params: def __init__(self): self.state_width =4**3 self.state_len = 1 #height of state self.episode_max_length = 100 # max time for which a apisode last self.num_actions=64 self.num_frames = 1 self.lr_rate = 0.001 # learning rate self.rms_rho = 0.9 # for rms prop self.r...
29.6
67
0.690541
class Params: def __init__(self): self.state_width =4**3 self.state_len = 1 self.episode_max_length = 100 self.num_actions=64 self.num_frames = 1 self.lr_rate = 0.001 self.rms_rho = 0.9 self.rms_eps = 1e-9 self.num_epochs= 2000 self.num_ex=160 self.num_t...
true
true
f74a365009bf5e4f18b6d3cb2ddb874f4d0e92f1
124
py
Python
demands/admin.py
joatuapp/joatu-django
5626d03ba89c55650ff5bff2e706ca0883ae3b9c
[ "MIT" ]
10
2018-05-13T18:01:57.000Z
2018-12-23T17:11:14.000Z
demands/admin.py
moileretour/joatu
9d18cb58b4280235688e269be6fd2d34b77ccead
[ "MIT" ]
88
2018-05-04T15:33:46.000Z
2022-03-08T21:09:21.000Z
demands/admin.py
joatuapp/joatu-django
5626d03ba89c55650ff5bff2e706ca0883ae3b9c
[ "MIT" ]
7
2018-05-08T16:05:06.000Z
2018-09-13T05:49:05.000Z
from django.contrib import admin from demands.models import Demand # Register your models here. admin.site.register(Demand)
24.8
33
0.822581
from django.contrib import admin from demands.models import Demand admin.site.register(Demand)
true
true
f74a376f2443dd976197a1e22d4057b40d23e90a
4,681
py
Python
gen_tacotron.py
dipjyoti92/WaveRNN
43c170dac7f6f27697fa4f04d44731f744c27fb4
[ "MIT" ]
5
2020-08-13T17:10:12.000Z
2020-12-02T12:28:10.000Z
gen_tacotron.py
dipjyoti92/WaveRNN
43c170dac7f6f27697fa4f04d44731f744c27fb4
[ "MIT" ]
null
null
null
gen_tacotron.py
dipjyoti92/WaveRNN
43c170dac7f6f27697fa4f04d44731f744c27fb4
[ "MIT" ]
2
2020-09-24T14:38:42.000Z
2020-09-30T13:51:10.000Z
import torch from models.fatchord_version import WaveRNN import hparams as hp from utils.text.symbols import symbols from utils.paths import Paths from models.tacotron import Tacotron import argparse from utils.text import text_to_sequence from utils.display import save_attention, simple_table if __name__ == "__main__...
42.171171
121
0.622089
import torch from models.fatchord_version import WaveRNN import hparams as hp from utils.text.symbols import symbols from utils.paths import Paths from models.tacotron import Tacotron import argparse from utils.text import text_to_sequence from utils.display import save_attention, simple_table if __name__ == "__main__...
true
true
f74a3892bb31fb8773cd1516ccddd8bef0e6b260
773
py
Python
examples/config/antsafe/0.py
anyboby/ConstrainedMBPO
036f4ffefc464e676a287c35c92cc5c0b8925fcf
[ "MIT" ]
5
2020-02-12T17:09:09.000Z
2021-09-29T16:06:40.000Z
examples/config/antsafe/0.py
anyboby/ConstrainedMBPO
036f4ffefc464e676a287c35c92cc5c0b8925fcf
[ "MIT" ]
10
2020-08-31T02:50:02.000Z
2022-02-09T23:36:43.000Z
examples/config/antsafe/0.py
anyboby/ConstrainedMBPO
036f4ffefc464e676a287c35c92cc5c0b8925fcf
[ "MIT" ]
2
2022-03-15T01:45:26.000Z
2022-03-15T06:46:47.000Z
params = { 'type': 'MBPO', 'universe': 'gym', 'domain': 'AntSafe', 'task': 'v2', 'log_dir': '~/ray_mbpo/', 'exp_name': 'defaults', 'kwargs': { 'epoch_length': 10000, 'train_every_n_steps': 3, 'n_train_repeat': 20, 'eval_render_mode': None, 'eval_n_ep...
22.735294
44
0.507115
params = { 'type': 'MBPO', 'universe': 'gym', 'domain': 'AntSafe', 'task': 'v2', 'log_dir': '~/ray_mbpo/', 'exp_name': 'defaults', 'kwargs': { 'epoch_length': 10000, 'train_every_n_steps': 3, 'n_train_repeat': 20, 'eval_render_mode': None, 'eval_n_ep...
true
true
f74a3936d5f8878b829e41411529f6a50526567e
399
py
Python
djworkplace/wsgi.py
callmewind/djworkplace
c0acd386ce7ecc43312b1c18e57b90414013ce8e
[ "MIT" ]
null
null
null
djworkplace/wsgi.py
callmewind/djworkplace
c0acd386ce7ecc43312b1c18e57b90414013ce8e
[ "MIT" ]
null
null
null
djworkplace/wsgi.py
callmewind/djworkplace
c0acd386ce7ecc43312b1c18e57b90414013ce8e
[ "MIT" ]
null
null
null
""" WSGI config for djworkplace 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.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_S...
23.470588
78
0.789474
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djworkplace.settings') application = get_wsgi_application()
true
true
f74a393a56708e79868432bf328d5a53125654e1
389
py
Python
Organi/Organi/asgi.py
romainledru/OrganiApp-deploy
1bb208430d1d6bda6e9c548af7d50482f33f0278
[ "MIT" ]
null
null
null
Organi/Organi/asgi.py
romainledru/OrganiApp-deploy
1bb208430d1d6bda6e9c548af7d50482f33f0278
[ "MIT" ]
null
null
null
Organi/Organi/asgi.py
romainledru/OrganiApp-deploy
1bb208430d1d6bda6e9c548af7d50482f33f0278
[ "MIT" ]
null
null
null
""" ASGI config for Organi project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTIN...
22.882353
78
0.784062
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Organi.settings') application = get_asgi_application()
true
true
f74a39902b122891f54ef6f6ed5261ed9f423cdf
443
py
Python
Storage.py
sardarlaltu/UnattendedWSN
db9b650bc887f07a4e40ed24d37ba101877997a3
[ "MIT" ]
2
2021-01-22T12:35:10.000Z
2021-04-11T09:28:14.000Z
Storage.py
sardarlaltu/UnattendedWSN
db9b650bc887f07a4e40ed24d37ba101877997a3
[ "MIT" ]
null
null
null
Storage.py
sardarlaltu/UnattendedWSN
db9b650bc887f07a4e40ed24d37ba101877997a3
[ "MIT" ]
null
null
null
class Storage: _ID = 0 def __init__(self, node_id = -1 , round =-1): self.id = self.__class__._ID self.__class__._ID += 1 self.round = round self.node_id = node_id self.XK = [] self.XC = [] self.SKA = [] self.CA = [] se...
18.458333
50
0.437923
class Storage: _ID = 0 def __init__(self, node_id = -1 , round =-1): self.id = self.__class__._ID self.__class__._ID += 1 self.round = round self.node_id = node_id self.XK = [] self.XC = [] self.SKA = [] self.CA = [] se...
true
true
f74a3a52538de19b45a792e73a9b79de1e6f816a
209
py
Python
Day-5-Poisson-Distribution-II.py
LOGON17/10-Days-of-Statistics-HackerRank
a346a1cb97e0c218548ccefaf3aee90b45ba7f30
[ "MIT" ]
null
null
null
Day-5-Poisson-Distribution-II.py
LOGON17/10-Days-of-Statistics-HackerRank
a346a1cb97e0c218548ccefaf3aee90b45ba7f30
[ "MIT" ]
null
null
null
Day-5-Poisson-Distribution-II.py
LOGON17/10-Days-of-Statistics-HackerRank
a346a1cb97e0c218548ccefaf3aee90b45ba7f30
[ "MIT" ]
null
null
null
averageX, averageY = [float(num) for num in input().split(" ")] # Cost CostX = 160 + 40*(averageX + averageX**2) CostY = 128 + 40*(averageY + averageY**2) print(round(CostX, 3)) print(round(CostY, 3))
26.125
64
0.631579
averageX, averageY = [float(num) for num in input().split(" ")] CostX = 160 + 40*(averageX + averageX**2) CostY = 128 + 40*(averageY + averageY**2) print(round(CostX, 3)) print(round(CostY, 3))
true
true
f74a3b4bfb41cb1e1a7a2dd2561566e607537c05
767
py
Python
cms/migrations/0004_rename_klass_to_bootcamp_run.py
umarmughal824/bootcamp-ecommerce
681bcc788a66867b8f240790c0ed33680b73932b
[ "BSD-3-Clause" ]
2
2018-06-20T19:37:03.000Z
2021-01-06T09:51:40.000Z
cms/migrations/0004_rename_klass_to_bootcamp_run.py
mitodl/bootcamp-ecommerce
ba7d6aefe56c6481ae2a5afc84cdd644538b6d50
[ "BSD-3-Clause" ]
1,226
2017-02-23T14:52:28.000Z
2022-03-29T13:19:54.000Z
cms/migrations/0004_rename_klass_to_bootcamp_run.py
umarmughal824/bootcamp-ecommerce
681bcc788a66867b8f240790c0ed33680b73932b
[ "BSD-3-Clause" ]
3
2017-03-20T03:51:27.000Z
2021-03-19T15:54:31.000Z
# Generated by Django 2.2.10 on 2020-05-05 19:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("klasses", "0015_rename_klass_to_bootcamp_run"), ("cms", "0003_bootcamp_product_run_page"), ] operations = ...
28.407407
77
0.607562
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("klasses", "0015_rename_klass_to_bootcamp_run"), ("cms", "0003_bootcamp_product_run_page"), ] operations = [ migrations.RemoveField(model_name="boo...
true
true
f74a3c1f5256632cbb1081043cc00823161dd3cd
12,338
py
Python
lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_lang.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_lang.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_lang.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014, Jens Depuydt <http://www.jensd.be> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: postgresql_lan...
33.895604
115
0.677176
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: postgresql_lang short_description: Adds, removes or changes procedural languages with a PostgreSQL database description: - Adds, removes or changes procedural languages with a PostgreSQL databa...
true
true
f74a3caa8a189a59145c6d6a82e829fcf5aeb8e2
6,153
py
Python
tests/test_poetry.py
mgasner/poetry
44221689e05feb0cc93c231096334f8eefbf86fc
[ "MIT" ]
null
null
null
tests/test_poetry.py
mgasner/poetry
44221689e05feb0cc93c231096334f8eefbf86fc
[ "MIT" ]
null
null
null
tests/test_poetry.py
mgasner/poetry
44221689e05feb0cc93c231096334f8eefbf86fc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import pytest from poetry.poetry import Poetry from poetry.utils._compat import PY2 from poetry.utils._compat import Path from poetry.utils.toml_file import TomlFile fixtures_dir = Path(__file__).parent / "fixture...
30.919598
95
0.65594
from __future__ import absolute_import from __future__ import unicode_literals import pytest from poetry.poetry import Poetry from poetry.utils._compat import PY2 from poetry.utils._compat import Path from poetry.utils.toml_file import TomlFile fixtures_dir = Path(__file__).parent / "fixtures" def test_poetry():...
true
true
f74a3d22e8e138f6e722ba8dce22eca1f4ccbaf9
25,841
py
Python
gateway/discarded/gateway_graph.py
trinity-project/trinity
081eba1d4294a3bed33ba18c3f7b862b8803ee22
[ "MIT" ]
60
2018-01-12T07:33:15.000Z
2021-12-28T23:06:28.000Z
gateway/discarded/gateway_graph.py
trinity-project/trinity
081eba1d4294a3bed33ba18c3f7b862b8803ee22
[ "MIT" ]
13
2018-01-23T00:14:35.000Z
2020-04-23T00:03:31.000Z
gateway/discarded/gateway_graph.py
trinity-project/trinity
081eba1d4294a3bed33ba18c3f7b862b8803ee22
[ "MIT" ]
13
2018-01-05T07:27:29.000Z
2021-01-06T16:45:05.000Z
# coding: utf-8 import pprint import os import json import utils import time import datetime from routertree import RouteTree, SPVHashTable from routergraph import RouterGraph from tcp import create_server_coro, send_tcp_msg_coro, find_connection from wsocket import WsocketService from jsonrpc import AsyncJsonRpc from ...
43.724196
133
0.528385
import pprint import os import json import utils import time import datetime from routertree import RouteTree, SPVHashTable from routergraph import RouterGraph from tcp import create_server_coro, send_tcp_msg_coro, find_connection from wsocket import WsocketService from jsonrpc import AsyncJsonRpc from asyncio import ...
true
true
f74a3e434d4a4eeee08f73c91e97ad93bb83c07a
250
py
Python
API/urls.py
gdssouza/clear-corretora-api
4c4c442111b090e694e52757849cb9c69beaa2c8
[ "MIT" ]
1
2021-11-10T14:02:37.000Z
2021-11-10T14:02:37.000Z
API/urls.py
gdssouza/clear-corretora-api
4c4c442111b090e694e52757849cb9c69beaa2c8
[ "MIT" ]
null
null
null
API/urls.py
gdssouza/clear-corretora-api
4c4c442111b090e694e52757849cb9c69beaa2c8
[ "MIT" ]
1
2021-03-21T18:49:28.000Z
2021-03-21T18:49:28.000Z
URL_LOGIN = 'https://login.clear.com.br/pit/login/' URL_TOKEN = 'https://login.clear.com.br/pit/login/api/token' USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'
62.5
136
0.74
URL_LOGIN = 'https://login.clear.com.br/pit/login/' URL_TOKEN = 'https://login.clear.com.br/pit/login/api/token' USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'
true
true
f74a3f375ea6bf2420e5a983f086c207272abffb
7,162
py
Python
flask/wrappers.py
guyoun/flask
f6618c76381c38f7e692500c4e3e0dc7fe56e02d
[ "BSD-3-Clause" ]
25
2015-01-31T15:18:10.000Z
2021-11-14T20:09:43.000Z
flask/wrappers.py
barrybonds/flask
da1c1f0d7f8e2df19eb320b176021511b7d05b76
[ "BSD-3-Clause" ]
1
2015-08-26T16:25:48.000Z
2015-08-26T16:25:48.000Z
flask/wrappers.py
barrybonds/flask
da1c1f0d7f8e2df19eb320b176021511b7d05b76
[ "BSD-3-Clause" ]
4
2015-03-06T01:14:03.000Z
2020-12-23T00:27:56.000Z
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.exce...
35.81
79
0.637671
from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.exceptions import BadRequest from .debughelpers import attach_enctype_error_multidict from . import json from .globals import _request_ctx_stack _missing = object() def _get_data(req, cache): getter = getattr(req, 'g...
true
true
f74a3ff9f940a8cc4442e0f38b7c8ac96c06423a
68,824
py
Python
core/domain/platform_parameter_domain_test.py
jian-en/oppia
2558c96bb7e61530d1d3b91d0fa5bfe1f020cfe3
[ "Apache-2.0" ]
2
2020-10-13T12:59:08.000Z
2020-10-13T17:10:26.000Z
core/domain/platform_parameter_domain_test.py
jian-en/oppia
2558c96bb7e61530d1d3b91d0fa5bfe1f020cfe3
[ "Apache-2.0" ]
null
null
null
core/domain/platform_parameter_domain_test.py
jian-en/oppia
2558c96bb7e61530d1d3b91d0fa5bfe1f020cfe3
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2020 The Oppia 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 # # Unless requi...
38.171936
80
0.583619
from __future__ import absolute_import from __future__ import unicode_literals from core.domain import platform_parameter_domain as parameter_domain from core.tests import test_utils import feconf import utils class PlatformParameterChangeTests(test_utils.GenericTestBase): CMD_EDIT_RULES = ...
true
true
f74a40a4997d95de5c8353998a74ff32158fe7ad
2,107
py
Python
research/attention_ocr/python/datasets/unittest_utils.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
3,326
2018-01-26T22:42:25.000Z
2022-02-16T13:16:39.000Z
research/attention_ocr/python/datasets/unittest_utils.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
150
2017-08-28T14:59:36.000Z
2022-03-11T23:21:35.000Z
research/attention_ocr/python/datasets/unittest_utils.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
1,474
2018-02-01T04:33:18.000Z
2022-03-08T07:02:20.000Z
# Copyright 2017 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 # # Unless required by applicab...
32.415385
80
0.701946
import StringIO import numpy as np from PIL import Image as PILImage import tensorflow as tf def create_random_image(image_format, shape): image = np.random.randint(low=0, high=255, size=shape, dtype='uint8') io = StringIO.StringIO() image_pil = PILImage.fromarray(image) image_pil.save(io, ima...
true
true
f74a41905b3243de5ec433b7e225281774cf7d89
8,757
py
Python
intensitydatawrapper.py
gfzriesgos/deus
afa2b64d85a2da61025c9c7bfd253ea9572cfaed
[ "Apache-2.0" ]
1
2019-08-13T05:19:07.000Z
2019-08-13T05:19:07.000Z
intensitydatawrapper.py
gfzriesgos/deus
afa2b64d85a2da61025c9c7bfd253ea9572cfaed
[ "Apache-2.0" ]
19
2019-10-16T12:50:57.000Z
2022-03-11T23:58:20.000Z
intensitydatawrapper.py
gfzriesgos/deus
afa2b64d85a2da61025c9c7bfd253ea9572cfaed
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright © 2021 Helmholtz Centre Potsdam GFZ German Research Centre for Geosciences, Potsdam, Germany # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at # # https://www.ap...
31.163701
307
0.648167
import re import geopandas as gpd class GeopandasDataFrameWrapper: def __init__(self, gdf, prefix_value_columns="value_", prefix_unit_columns="unit_"): self._gdf = gdf self._prefix_value_columns = prefix_value_columns self._prefix_unit_columns = prefix_unit_columns def get...
true
true
f74a4248feb0064374bb076238a84afc09bb3b51
104,432
py
Python
tests/track/params_test.py
vardaan-raj/rally
ec04919d3b44c1e694ae5bc2c9a7901cf31b8e89
[ "Apache-2.0" ]
null
null
null
tests/track/params_test.py
vardaan-raj/rally
ec04919d3b44c1e694ae5bc2c9a7901cf31b8e89
[ "Apache-2.0" ]
null
null
null
tests/track/params_test.py
vardaan-raj/rally
ec04919d3b44c1e694ae5bc2c9a7901cf31b8e89
[ "Apache-2.0" ]
null
null
null
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
37.673882
140
0.529359
import random from unittest import TestCase from esrally import exceptions from esrally.track import params, track from esrally.utils import io class StaticBulkReader: def __init__(self, index_name, type_name, bulks): self.index_name = index_name self.type_name = type_name ...
true
true
f74a42e7da81518e1dcadeacbe3ff3a5f0714165
67,741
py
Python
results/forms/forms105.py
VladimirovAleksandr/l2
e297ccdd8ee1756f4807c43a4c0d104d3712ef38
[ "MIT" ]
null
null
null
results/forms/forms105.py
VladimirovAleksandr/l2
e297ccdd8ee1756f4807c43a4c0d104d3712ef38
[ "MIT" ]
null
null
null
results/forms/forms105.py
VladimirovAleksandr/l2
e297ccdd8ee1756f4807c43a4c0d104d3712ef38
[ "MIT" ]
null
null
null
from reportlab.platypus import Paragraph, Spacer, Table, TableStyle, PageBreak from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib import colors from reportlab.lib.units import mm from copy import deepcopy from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY from directions.models import N...
42.31168
190
0.566437
from reportlab.platypus import Paragraph, Spacer, Table, TableStyle, PageBreak from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib import colors from reportlab.lib.units import mm from copy import deepcopy from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY from directions.models import N...
true
true
f74a4314c0f565ba539fe0499866f4f48b757342
472
py
Python
blog/admin.py
miclemabasie/jobizar
1dde7aab4ba02de75517a5cf91d54b43ac41e3cb
[ "MIT" ]
null
null
null
blog/admin.py
miclemabasie/jobizar
1dde7aab4ba02de75517a5cf91d54b43ac41e3cb
[ "MIT" ]
null
null
null
blog/admin.py
miclemabasie/jobizar
1dde7aab4ba02de75517a5cf91d54b43ac41e3cb
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Post, Comment @admin.register(Post) class PostAdmin(admin.ModelAdmin): list_display = ['title', 'slug', 'author', 'publish', 'status'] list_filter = ['status', 'created', 'publish', 'updated'] search_fields = ('title', 'body') prepopulated_fields = ...
29.5
67
0.665254
from django.contrib import admin from .models import Post, Comment @admin.register(Post) class PostAdmin(admin.ModelAdmin): list_display = ['title', 'slug', 'author', 'publish', 'status'] list_filter = ['status', 'created', 'publish', 'updated'] search_fields = ('title', 'body') prepopulated_fields = ...
true
true
f74a43435b487e1ba6c3f06513b12eb19c5e95d8
1,753
py
Python
InversionCount.py
vinayakasg18/algorithms
a30008a7fa8ba15ee241bd7fc5df94cd68c80003
[ "MIT" ]
null
null
null
InversionCount.py
vinayakasg18/algorithms
a30008a7fa8ba15ee241bd7fc5df94cd68c80003
[ "MIT" ]
null
null
null
InversionCount.py
vinayakasg18/algorithms
a30008a7fa8ba15ee241bd7fc5df94cd68c80003
[ "MIT" ]
null
null
null
""" Class to count the inversion count using merge sort""" class InversionCount: def count(self, A: [int]) -> [int]: """ Count and return the array containing the count of each element """ index_array = [] rc_arr = [] for ind in range(0, len(A)): index_array.append(ind...
27.390625
114
0.450086
class InversionCount: def count(self, A: [int]) -> [int]: index_array = [] rc_arr = [] for ind in range(0, len(A)): index_array.append(ind) rc_arr.append(0) self.sort(A, index_array, 0, len(index_array) - 1, rc_arr) return rc_arr def merge(self...
true
true
f74a463255153cd35bb6e8589bb797ff6f90031f
3,487
py
Python
src/anomaly_detection/knn/predict.py
roycezhou/Anomaly-detection-and-classification-with-deep-learning
12b26f7c6f97a0a5305c653ab36b5272f94696fa
[ "MIT" ]
null
null
null
src/anomaly_detection/knn/predict.py
roycezhou/Anomaly-detection-and-classification-with-deep-learning
12b26f7c6f97a0a5305c653ab36b5272f94696fa
[ "MIT" ]
null
null
null
src/anomaly_detection/knn/predict.py
roycezhou/Anomaly-detection-and-classification-with-deep-learning
12b26f7c6f97a0a5305c653ab36b5272f94696fa
[ "MIT" ]
null
null
null
import sys import numpy as np from itertools import product import torchvision.transforms as transforms from sklearn.metrics.pairwise import cosine_similarity from Utils.transform import * from Utils.pillowhelper import * def rowcolumn2coor(row, col, patch_size): """ Map row column number to pillow imag...
42.52439
151
0.641526
import sys import numpy as np from itertools import product import torchvision.transforms as transforms from sklearn.metrics.pairwise import cosine_similarity from Utils.transform import * from Utils.pillowhelper import * def rowcolumn2coor(row, col, patch_size): left = col * patch_size upper = row...
true
true
f74a46f107373336f8d4f25db0439b68675b275e
76
py
Python
j3a-key-generator/setup.py
PraserX/j3a
f98f0cf9f940d9ae9af22cdb6b9e8ec4a8f02367
[ "MIT" ]
1
2020-04-23T12:09:58.000Z
2020-04-23T12:09:58.000Z
j3a-key-generator/setup.py
PraserX/j3a
f98f0cf9f940d9ae9af22cdb6b9e8ec4a8f02367
[ "MIT" ]
null
null
null
j3a-key-generator/setup.py
PraserX/j3a
f98f0cf9f940d9ae9af22cdb6b9e8ec4a8f02367
[ "MIT" ]
null
null
null
import zipapp import io zipapp.create_archive('src', 'dist/j3a-keygen.pyz')
19
51
0.776316
import zipapp import io zipapp.create_archive('src', 'dist/j3a-keygen.pyz')
true
true
f74a47dd7d2ce62688d06fbe2b151abd3626051b
2,229
py
Python
backend/root_africa_28472/urls.py
crowdbotics-apps/root-africa-28472
064646a7808a2884f970c57243789148929f163c
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/root_africa_28472/urls.py
crowdbotics-apps/root-africa-28472
064646a7808a2884f970c57243789148929f163c
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/root_africa_28472/urls.py
crowdbotics-apps/root-africa-28472
064646a7808a2884f970c57243789148929f163c
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""root_africa_28472 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
35.380952
87
0.712427
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from allauth.account.views import confirm_email from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi urlpatterns = [ path("",...
true
true
f74a48221329c4e01a7be4fb1ce745499ac5c971
749
py
Python
userbot/plugins/alive.py
indianbhaiya/Indianbot
3d0bdac190429c21f86e28540278084cbe455bb0
[ "MIT" ]
59
2020-04-02T07:16:01.000Z
2021-10-10T04:42:37.000Z
userbot/plugins/alive.py
indianbhaiya/Indianbot
3d0bdac190429c21f86e28540278084cbe455bb0
[ "MIT" ]
20
2020-03-23T15:39:42.000Z
2020-12-08T17:57:47.000Z
userbot/plugins/alive.py
indianbhaiya/Indianbot
3d0bdac190429c21f86e28540278084cbe455bb0
[ "MIT" ]
323
2020-03-28T13:11:38.000Z
2022-03-12T14:06:37.000Z
from userbot import ALIVE_NAME from userbot.utils import admin_cmd name = str(ALIVE_NAME) INDIANBOT_IS_ALIVE = ( "**Apun Zinda He Sarr ^.^** \n`🇮🇳BOT Status : ` **☣Hot**\n\n" f"`My peru owner`: {name}\n\n" "`Indian Bot Version:` **3.8.7**\n`Python:` **3.8.5**\n" "`Database Status:` **😀ALL OK**\n\n`A...
35.666667
81
0.646195
from userbot import ALIVE_NAME from userbot.utils import admin_cmd name = str(ALIVE_NAME) INDIANBOT_IS_ALIVE = ( "**Apun Zinda He Sarr ^.^** \n`🇮🇳BOT Status : ` **☣Hot**\n\n" f"`My peru owner`: {name}\n\n" "`Indian Bot Version:` **3.8.7**\n`Python:` **3.8.5**\n" "`Database Status:` **😀ALL OK**\n\n`A...
true
true
f74a4a22199b0a7953e3a125fa3171eaef779d69
3,180
py
Python
base/key_manager.py
tobiasw225/python-aes
26cf52da4e4c82cc417b21730792ef5d692d245d
[ "MIT" ]
1
2020-01-13T22:01:22.000Z
2020-01-13T22:01:22.000Z
base/key_manager.py
tobiasw225/python-aes
26cf52da4e4c82cc417b21730792ef5d692d245d
[ "MIT" ]
1
2021-09-18T10:19:12.000Z
2021-09-18T10:19:12.000Z
base/key_manager.py
tobiasw225/python-aes
26cf52da4e4c82cc417b21730792ef5d692d245d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: iso-8859-15 -*- # # __filename__: key_manager.py # # __description__: # # __remark__: # # __todos__: # # Created by Tobias Wenzel in December 2015 # Copyright (c) 2015 Tobias Wenzel from typing import List from base.tables import rcon, sbox from base.utils import xor_blocks EXTEND...
39.75
1,079
0.590566
from typing import List from base.tables import rcon, sbox from base.utils import xor_blocks EXTENDED_KEY_SIZE = 240 WORD_LEN = 4 def key_schedule_core(word: List[int], iteration: int) -> List[int]: word.append(word.pop(0)) word = apply_sbox(word) word[0] ^= rcon[it...
true
true
f74a4a8d5fd2fa61174a62d609a73067759ecd1f
7,480
py
Python
mesos_viewer/config.py
alimaken/mesos-viewer
1e6170cf7222b93e37d910477c735daf7f081bb9
[ "MIT" ]
2
2019-05-01T08:20:23.000Z
2020-05-12T04:27:39.000Z
mesos_viewer/config.py
alimaken/mesos-viewer
1e6170cf7222b93e37d910477c735daf7f081bb9
[ "MIT" ]
1
2019-04-23T11:56:17.000Z
2019-04-23T11:56:17.000Z
mesos_viewer/config.py
alimaken/mesos-viewer
1e6170cf7222b93e37d910477c735daf7f081bb9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os from configparser import ConfigParser class Config(object): def __init__(self, config_dir=None, config_file=None): self.config_dir = config_dir self.config_file = config_file if config_dir is None: self.config_dir = os.path.join( ...
47.643312
97
0.597727
import os from configparser import ConfigParser class Config(object): def __init__(self, config_dir=None, config_file=None): self.config_dir = config_dir self.config_file = config_file if config_dir is None: self.config_dir = os.path.join( os.environ.get(...
true
true
f74a4b01486a970def359a85ddf89de4b9f7b4ab
9,804
py
Python
GFMM/agglo_onlgfmm.py
thanhtung09t2/Hyperbox-classifier
4b4cf9dfae68902bd9a742db421cacce8daf37a4
[ "BSD-3-Clause" ]
null
null
null
GFMM/agglo_onlgfmm.py
thanhtung09t2/Hyperbox-classifier
4b4cf9dfae68902bd9a742db421cacce8daf37a4
[ "BSD-3-Clause" ]
1
2018-09-05T11:39:56.000Z
2018-09-09T03:28:14.000Z
GFMM/agglo_onlgfmm.py
thanhtung09t2/Hyperbox-classifier
4b4cf9dfae68902bd9a742db421cacce8daf37a4
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Sep 28 15:41:27 2018 @author: Thanh Tung Khuat Another method for serial combination of online learning and agglomerative learning gfmm Using Agglomerative learning to train a base model, then deploy the trained model for online learning with different training data ...
41.367089
298
0.634333
import sys, os sys.path.insert(0, os.path.pardir) import ast import numpy as np import time import matplotlib try: matplotlib.use('TkAgg') except: pass from functionhelper.preprocessinghelper import loadDataset, string_to_boolean, splitDatasetRndClassBasedTo2Part, splitDatasetRndTo2Part from GFMM.basebatchl...
true
true
f74a4bd95a514023cd9e77febc2d3c02d45e4b37
971
py
Python
mcache/tests/test_check.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
2
2019-05-28T03:48:29.000Z
2019-07-05T07:05:58.000Z
mcache/tests/test_check.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
4
2019-07-03T02:53:19.000Z
2019-07-10T14:52:14.000Z
mcache/tests/test_check.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
1
2019-12-23T13:35:17.000Z
2019-12-23T13:35:17.000Z
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import pytest from datadog_checks.base import ConfigurationError from datadog_checks.mcache.mcache import InvalidConfigError from .common import HOST, PORT, SERVICE_CHECK def test_bad_config(check): """ ...
31.322581
82
0.700309
import pytest from datadog_checks.base import ConfigurationError from datadog_checks.mcache.mcache import InvalidConfigError from .common import HOST, PORT, SERVICE_CHECK def test_bad_config(check): with pytest.raises(InvalidConfigError): check.check({}) def test_service_ko(check, aggregator): ...
true
true
f74a4e0e253e95f9c690d7cec093a817cbba1f5e
24,765
py
Python
crosshair/simplestructs.py
Rik-de-Kort/CrossHair
e0a06969d571aebcc582359afdedf25f38630c0d
[ "MIT" ]
null
null
null
crosshair/simplestructs.py
Rik-de-Kort/CrossHair
e0a06969d571aebcc582359afdedf25f38630c0d
[ "MIT" ]
null
null
null
crosshair/simplestructs.py
Rik-de-Kort/CrossHair
e0a06969d571aebcc582359afdedf25f38630c0d
[ "MIT" ]
null
null
null
import collections.abc import dataclasses import functools import itertools import numbers import operator import sys from typing import * from crosshair.util import is_iterable from crosshair.util import is_hashable from crosshair.util import name_of_type class MapBase(collections.abc.MutableMapping): def __eq_...
28.696408
107
0.574399
import collections.abc import dataclasses import functools import itertools import numbers import operator import sys from typing import * from crosshair.util import is_iterable from crosshair.util import is_hashable from crosshair.util import name_of_type class MapBase(collections.abc.MutableMapping): def __eq_...
true
true
f74a4e9d782b72779e8dbcecf5e745a08e407385
695
py
Python
problem-solving/Birthday Cake Candles/Solution.py
Abedp/hackerrank-solutions
3dde344c5ef0cb08eca5b34cd0775050d92fd673
[ "MIT" ]
null
null
null
problem-solving/Birthday Cake Candles/Solution.py
Abedp/hackerrank-solutions
3dde344c5ef0cb08eca5b34cd0775050d92fd673
[ "MIT" ]
null
null
null
problem-solving/Birthday Cake Candles/Solution.py
Abedp/hackerrank-solutions
3dde344c5ef0cb08eca5b34cd0775050d92fd673
[ "MIT" ]
1
2021-10-05T13:02:32.000Z
2021-10-05T13:02:32.000Z
#!/bin/python3 import math import os import random import re import sys # # Complete the 'birthdayCakeCandles' function below. # # The function is expected to return an INTEGER. # The function accepts INTEGER_ARRAY candles as parameter. # def birthdayCakeCandles(candles): # Write your code here count = 0 ...
18.289474
58
0.65036
import math import os import random import re import sys def birthdayCakeCandles(candles): count = 0 pt = max(candles) for i in candles: if i == pt: count+=1 return count if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') candles_coun...
true
true
f74a4f61210ba8b977a0c5a14656fa5f0c38f0e8
11,851
py
Python
samples/testing/broadcom/build/zephyr/tocgen_sim.py
hixio-mh/citadel_sdk_2.1.1
bd15f6ae6c4b39c069d5beefa30c820e351d3b52
[ "Apache-2.0" ]
null
null
null
samples/testing/broadcom/build/zephyr/tocgen_sim.py
hixio-mh/citadel_sdk_2.1.1
bd15f6ae6c4b39c069d5beefa30c820e351d3b52
[ "Apache-2.0" ]
null
null
null
samples/testing/broadcom/build/zephyr/tocgen_sim.py
hixio-mh/citadel_sdk_2.1.1
bd15f6ae6c4b39c069d5beefa30c820e351d3b52
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys, getopt, array import os import collections from collections import defaultdict, OrderedDict, namedtuple import subprocess #exec mode values: 0xFFFE:XIP, 0xFFFD:LE 0xFFFB:LAE 0x0:Invalid 0xFFFF:End def usage(): print print("Construct Toc binary from a group of SBIs. All entrie...
32.02973
179
0.637077
import sys, getopt, array import os import collections from collections import defaultdict, OrderedDict, namedtuple import subprocess def usage(): print print("Construct Toc binary from a group of SBIs. All entries are NONE") print("Usage: togen.py -hv -b <bin dir> -o <output file name> -e <binary file>...
true
true
f74a502567cae5e45306b1e10b5804bd183d170e
626
py
Python
manage.py
towicode/DElite
5f8812d6dee9ff147feb2709c4adc4fe3cb3ea7e
[ "Unlicense" ]
2
2019-10-29T09:29:01.000Z
2019-11-20T09:43:50.000Z
manage.py
towicode/DElite
5f8812d6dee9ff147feb2709c4adc4fe3cb3ea7e
[ "Unlicense" ]
7
2020-06-05T23:07:38.000Z
2022-02-10T12:55:10.000Z
manage.py
towicode/DElite
5f8812d6dee9ff147feb2709c4adc4fe3cb3ea7e
[ "Unlicense" ]
1
2019-11-22T08:16:31.000Z
2019-11-22T08:16:31.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportE...
25.04
73
0.677316
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f74a502f25e934b38e54b34281561091a476327c
33,726
py
Python
dps/hyper/parallel_session.py
alcinos/dps
5467db1216e9f9089376d2c71f524ced2382e4f6
[ "Apache-2.0" ]
null
null
null
dps/hyper/parallel_session.py
alcinos/dps
5467db1216e9f9089376d2c71f524ced2382e4f6
[ "Apache-2.0" ]
null
null
null
dps/hyper/parallel_session.py
alcinos/dps
5467db1216e9f9089376d2c71f524ced2382e4f6
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os import datetime import subprocess from future.utils import raise_with_traceback import numpy as np import time import progressbar import shutil from collections import defaultdict import sys import dill from zipfile import ZipFile from contextlib import ExitStack import j...
40.197855
127
0.57552
from __future__ import print_function import os import datetime import subprocess from future.utils import raise_with_traceback import numpy as np import time import progressbar import shutil from collections import defaultdict import sys import dill from zipfile import ZipFile from contextlib import ExitStack import j...
true
true
f74a503b08ce205ac72d4cbffb00622bac3c93d6
3,996
py
Python
st2api/st2api/controllers/v1/sensors.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
1
2021-04-08T03:21:49.000Z
2021-04-08T03:21:49.000Z
st2api/st2api/controllers/v1/sensors.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
null
null
null
st2api/st2api/controllers/v1/sensors.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
null
null
null
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
39.176471
90
0.725475
import six from pecan import abort from mongoengine import ValidationError from st2common import log as logging from st2common.models.api.base import jsexpose from st2common.persistence.sensor import SensorType from st2common.models.api.sensor import SensorTypeAPI from st2common.exceptions.apivalidation...
true
true
f74a5051d42ac8208045cab5cd20e06e16d702b4
289
py
Python
tests/regressiontests/localflavor/models.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
1
2015-11-05T02:46:03.000Z
2015-11-05T02:46:03.000Z
tests/regressiontests/localflavor/models.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
null
null
null
tests/regressiontests/localflavor/models.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
1
2021-08-21T17:42:01.000Z
2021-08-21T17:42:01.000Z
from django.db import models from django.contrib.localflavor.us.models import USStateField class Place(models.Model): state = USStateField(blank=True) state_req = USStateField() state_default = USStateField(default="CA", blank=True) name = models.CharField(max_length=20)
32.111111
61
0.761246
from django.db import models from django.contrib.localflavor.us.models import USStateField class Place(models.Model): state = USStateField(blank=True) state_req = USStateField() state_default = USStateField(default="CA", blank=True) name = models.CharField(max_length=20)
true
true
f74a50df39e2c7ce52f4632c805c4916a953c764
265
py
Python
ExibirqtsIdadeseExibaMaior.py
erikaklein/algoritmo---programas-em-Python
cb7e058cf617a2779667c94ac4a982c7fbb102a7
[ "MIT" ]
null
null
null
ExibirqtsIdadeseExibaMaior.py
erikaklein/algoritmo---programas-em-Python
cb7e058cf617a2779667c94ac4a982c7fbb102a7
[ "MIT" ]
null
null
null
ExibirqtsIdadeseExibaMaior.py
erikaklein/algoritmo---programas-em-Python
cb7e058cf617a2779667c94ac4a982c7fbb102a7
[ "MIT" ]
null
null
null
#Faça um algoritmo que o usuário infomre quantas idades serão informadas e exiba a maior. a=int(input("Digite quantas vezes vc quer informar a idade")) i=0 m=0 for i in range (a): n=int(input("Digite uma idade")) if (n>m): m=n print(m)
22.083333
90
0.645283
a=int(input("Digite quantas vezes vc quer informar a idade")) i=0 m=0 for i in range (a): n=int(input("Digite uma idade")) if (n>m): m=n print(m)
true
true
f74a50feafe091d7235ade5940cff07dbc808553
25,306
py
Python
sqlmodel/main.py
deknowny/sqlmodel
15f6dde223e13eba37fc7e2ee4a925e06c1c7d03
[ "MIT" ]
null
null
null
sqlmodel/main.py
deknowny/sqlmodel
15f6dde223e13eba37fc7e2ee4a925e06c1c7d03
[ "MIT" ]
null
null
null
sqlmodel/main.py
deknowny/sqlmodel
15f6dde223e13eba37fc7e2ee4a925e06c1c7d03
[ "MIT" ]
null
null
null
import ipaddress import uuid import weakref import enum from datetime import date, datetime, time, timedelta from decimal import Decimal from pathlib import Path from typing import ( TYPE_CHECKING, AbstractSet, Any, Callable, ClassVar, Dict, List, Mapping, Optional, Sequence, ...
38.812883
89
0.629416
import ipaddress import uuid import weakref import enum from datetime import date, datetime, time, timedelta from decimal import Decimal from pathlib import Path from typing import ( TYPE_CHECKING, AbstractSet, Any, Callable, ClassVar, Dict, List, Mapping, Optional, Sequence, ...
true
true
f74a51d031886c4cc10209b40bc9c799d56687be
406
py
Python
more-python-for-beginners/06 - Managing the file system/paths.py
vijayraavi/c9-python-getting-started
345c81fb210601836d3618ff7bd491256ae62fa9
[ "MIT" ]
8,041
2019-09-17T17:25:51.000Z
2022-03-31T11:38:07.000Z
more-python-for-beginners/06 - Managing the file system/paths.py
magicsolmyr/c9-python-getting-started
a74d0ea8451a9709dcebbb29ae931a9cb82fc695
[ "MIT" ]
43
2019-09-20T15:47:26.000Z
2022-01-23T20:33:28.000Z
more-python-for-beginners/06 - Managing the file system/paths.py
magicsolmyr/c9-python-getting-started
a74d0ea8451a9709dcebbb29ae931a9cb82fc695
[ "MIT" ]
2,377
2019-09-17T18:16:53.000Z
2022-03-30T15:38:07.000Z
# Python 3.6 or higher # Grab the library from pathlib import Path # What is the current working directory? cwd = Path.cwd() print('\nCurrent working directory:\n' + str(cwd)) # Create full path name by joining path and filename new_file = Path.joinpath(cwd, 'new_file.txt') print('\nFull path:\n' + str(new_file)) # ...
29
65
0.711823
from pathlib import Path cwd = Path.cwd() print('\nCurrent working directory:\n' + str(cwd)) new_file = Path.joinpath(cwd, 'new_file.txt') print('\nFull path:\n' + str(new_file)) print('\nDoes that file exist? ' + str(new_file.exists()) + '\n')
true
true
f74a52644f5427aa42abdf9ffa6b03706c78bddc
480
py
Python
setup.py
BenWoodford/Robonect-Python
33da952c1e9af54e6444d76b751a2b129211cef6
[ "MIT" ]
null
null
null
setup.py
BenWoodford/Robonect-Python
33da952c1e9af54e6444d76b751a2b129211cef6
[ "MIT" ]
null
null
null
setup.py
BenWoodford/Robonect-Python
33da952c1e9af54e6444d76b751a2b129211cef6
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name = 'robonect', packages = ['robonect'], version = '0.1', # Ideally should be same as your GitHub release tag varsion description = 'Python Package for interacting with the Robonect JSON API', author = 'Ben Woodford', author_email = 'me@benwoodford.co...
32
81
0.664583
from distutils.core import setup setup( name = 'robonect', packages = ['robonect'], version = '0.1', description = 'Python Package for interacting with the Robonect JSON API', author = 'Ben Woodford', author_email = 'me@benwoodford.co.uk', url = 'https://github.com/BenWoodford/Robonect-Py...
true
true
f74a535604c96d47911835a3540b77c91b7d2827
589
py
Python
src/resource_inventory/migrations/0008_host_remote_management.py
opnfv/laas
35b9f39178cc502a5283a1b37a65f7dd0838ae05
[ "Apache-2.0" ]
2
2020-10-31T15:03:20.000Z
2021-03-22T16:29:15.000Z
src/resource_inventory/migrations/0008_host_remote_management.py
opnfv/laas
35b9f39178cc502a5283a1b37a65f7dd0838ae05
[ "Apache-2.0" ]
13
2019-12-04T23:29:42.000Z
2022-03-02T04:53:53.000Z
src/resource_inventory/migrations/0008_host_remote_management.py
opnfv/laas
35b9f39178cc502a5283a1b37a65f7dd0838ae05
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1 on 2019-03-06 16:42 from django.db import migrations, models import resource_inventory.models class Migration(migrations.Migration): dependencies = [ ('resource_inventory', '0007_auto_20190306_1616'), ] operations = [ migrations.AddField( model_name...
29.45
204
0.706282
from django.db import migrations, models import resource_inventory.models class Migration(migrations.Migration): dependencies = [ ('resource_inventory', '0007_auto_20190306_1616'), ] operations = [ migrations.AddField( model_name='host', name='remote_management'...
true
true
f74a538b7c38ce89d14f6d0292da91ad4f810c7d
6,061
py
Python
tests/test_classification.py
jiduque/scikit-fda
5ea71e78854801b259aa3a01eb6b154aa63bf54b
[ "BSD-3-Clause" ]
null
null
null
tests/test_classification.py
jiduque/scikit-fda
5ea71e78854801b259aa3a01eb6b154aa63bf54b
[ "BSD-3-Clause" ]
null
null
null
tests/test_classification.py
jiduque/scikit-fda
5ea71e78854801b259aa3a01eb6b154aa63bf54b
[ "BSD-3-Clause" ]
null
null
null
"""Tests of classification methods.""" import unittest import numpy as np from sklearn.base import clone from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier as _KNeighborsClassifier from skfda.datasets import fetch_growth from skfda.misc.metrics import l2_distance ...
32.411765
75
0.574658
import unittest import numpy as np from sklearn.base import clone from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier as _KNeighborsClassifier from skfda.datasets import fetch_growth from skfda.misc.metrics import l2_distance from skfda.ml.classification import ( ...
true
true
f74a5452568d536005262e82964f39b6148228e3
1,833
py
Python
scripts/deploy/fabfile.py
DivanteLtd/pwa-book
5ffb6f82b1f529381ff674128b8803a8e1039c1e
[ "MIT" ]
4
2019-10-09T06:24:45.000Z
2021-09-11T23:49:42.000Z
scripts/deploy/fabfile.py
DivanteLtd/pwa-book
5ffb6f82b1f529381ff674128b8803a8e1039c1e
[ "MIT" ]
8
2021-03-01T20:53:02.000Z
2022-02-26T01:44:31.000Z
scripts/deploy/fabfile.py
DivanteLtd/pwa-book
5ffb6f82b1f529381ff674128b8803a8e1039c1e
[ "MIT" ]
1
2019-10-27T00:51:28.000Z
2019-10-27T00:51:28.000Z
from fabric.api import * from fabric import colors from fabric.contrib.files import exists from fabric.operations import _prefix_commands, _prefix_env_vars, require import os import slack PROJECT_NAME = "Divante.com PWA Book" STAGES = { "test": { "name": "Test", "hosts": [os.environ['TEST_HOST']],...
23.805195
81
0.61102
from fabric.api import * from fabric import colors from fabric.contrib.files import exists from fabric.operations import _prefix_commands, _prefix_env_vars, require import os import slack PROJECT_NAME = "Divante.com PWA Book" STAGES = { "test": { "name": "Test", "hosts": [os.environ['TEST_HOST']],...
true
true
f74a548ff1f1d4e5bef9d03b6ab495238007dbfd
154
py
Python
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_Lag1Trend_Seasonal_Hour_AR.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_Lag1Trend_Seasonal_Hour_AR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_Lag1Trend_Seasonal_Hour_AR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['Lag1Trend'] , ['Seasonal_Hour'] , ['AR'] );
38.5
81
0.746753
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['Lag1Trend'] , ['Seasonal_Hour'] , ['AR'] );
true
true
f74a54e6d87fee0a951f4fe50ad58e695bb1ae7e
1,611
py
Python
tests/tensortrade/unit/oms/orders/criteria/test_limit.py
zeeshanalipanhwar/tensortrade
7c294293cb65d0e31cae47402145dffe2e7bc75f
[ "Apache-2.0" ]
3,081
2020-01-12T13:42:13.000Z
2022-03-27T18:09:31.000Z
tests/tensortrade/unit/oms/orders/criteria/test_limit.py
zeeshanalipanhwar/tensortrade
7c294293cb65d0e31cae47402145dffe2e7bc75f
[ "Apache-2.0" ]
257
2020-01-15T03:14:29.000Z
2022-03-31T04:19:14.000Z
tests/tensortrade/unit/oms/orders/criteria/test_limit.py
zeeshanalipanhwar/tensortrade
7c294293cb65d0e31cae47402145dffe2e7bc75f
[ "Apache-2.0" ]
804
2020-01-12T12:22:22.000Z
2022-03-28T13:41:59.000Z
import unittest.mock as mock from tensortrade.oms.orders.criteria import Limit from tensortrade.oms.instruments import USD, BTC from tensortrade.oms.orders import TradeSide def test_init(): criteria = Limit(limit_price=7000.00) assert criteria.limit_price == 7000.00 @mock.patch('tensortrade.exchanges.Exch...
27.305085
69
0.750466
import unittest.mock as mock from tensortrade.oms.orders.criteria import Limit from tensortrade.oms.instruments import USD, BTC from tensortrade.oms.orders import TradeSide def test_init(): criteria = Limit(limit_price=7000.00) assert criteria.limit_price == 7000.00 @mock.patch('tensortrade.exchanges.Exch...
true
true
f74a574d0b73b0bb6ea246e8f6a2f4c2c61e1da0
8,204
py
Python
src/noisebridge.pyclass/noisebridge/pyclass/todo/migrations/0002_auto__add_field_todoitem_completed_by__add_field_todoitem_completion_d.py
noisebridge/pyclass-project
f39b63d5cb86d98bffa1ffdcf97786843a28fbd7
[ "Apache-2.0" ]
1
2018-04-06T12:36:27.000Z
2018-04-06T12:36:27.000Z
src/noisebridge.pyclass/noisebridge/pyclass/todo/migrations/0002_auto__add_field_todoitem_completed_by__add_field_todoitem_completion_d.py
noisebridge/pyclass-project
f39b63d5cb86d98bffa1ffdcf97786843a28fbd7
[ "Apache-2.0" ]
null
null
null
src/noisebridge.pyclass/noisebridge/pyclass/todo/migrations/0002_auto__add_field_todoitem_completed_by__add_field_todoitem_completion_d.py
noisebridge/pyclass-project
f39b63d5cb86d98bffa1ffdcf97786843a28fbd7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ToDoItem.completed_by' db.add_column('todo_todoitem', 'completed_by', ...
70.119658
188
0.562287
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('todo_todoitem', 'completed_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=T...
true
true
f74a57527d557e22f5f91b947a66a8df6959de13
939
py
Python
azure-batch/azure/batch/models/recent_job.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure/batch/models/recent_job.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
2
2016-09-30T21:40:24.000Z
2017-11-10T18:16:18.000Z
azure/batch/models/recent_job.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.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 ...
29.34375
76
0.538871
from msrest.serialization import Model class RecentJob(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, } def __init__(self, id=None, url=None): self.id = id self.url = url
true
true
f74a5778f8a418d59908c2d3f14e21d36c9f055b
4,902
py
Python
sdk/python/pulumi_azure_nextgen/web/v20181101/get_web_app_swift_virtual_network_connection.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/web/v20181101/get_web_app_swift_virtual_network_connection.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/web/v20181101/get_web_app_swift_virtual_network_connection.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
37.419847
182
0.662179
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetWebAppSwiftVirtualNetworkConnectionResult', 'AwaitableGetWebAppSwiftVirtualNetworkConnectionResult', 'get_web_app_swift_virtual_network_conn...
true
true
f74a58cd775b7d58f9354d634aa1c7ae6b5f6977
3,853
py
Python
built-in/ACL_TensorFlow/Official/recommendation/KGAT_for_ACL/Model/offline_inference/xacl_inference.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/ACL_TensorFlow/Official/recommendation/KGAT_for_ACL/Model/offline_inference/xacl_inference.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
1
2022-01-20T03:11:05.000Z
2022-01-20T06:53:39.000Z
built-in/ACL_TensorFlow/Official/recommendation/KGAT_for_ACL/Model/offline_inference/xacl_inference.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# Copyright 2017 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 # # Unless required by applica...
37.407767
101
0.663379
import os import numpy as np import multiprocessing import sys sys.path.append('./') from utility.batch_test import cores, Ks, BATCH_SIZE, ITEM_NUM, data_generator, test_one_user from utility.parser import parse_args def xaclPath(output_path, inference_path, model_path): if os.path.isd...
true
true
f74a5a4fd26087157afac0be4b412f33524541ee
10,412
py
Python
pyalgotrade/barfeed/csvfeed.py
wilsonwang371/pyalgotrade
b6ecd88c06e5ad44ab66cbe03c1a91105343c64d
[ "Apache-2.0" ]
6
2018-12-29T05:32:49.000Z
2021-11-10T10:56:55.000Z
pyalgotrade/barfeed/csvfeed.py
wilsonwang371/pyalgotrade
b6ecd88c06e5ad44ab66cbe03c1a91105343c64d
[ "Apache-2.0" ]
null
null
null
pyalgotrade/barfeed/csvfeed.py
wilsonwang371/pyalgotrade
b6ecd88c06e5ad44ab66cbe03c1a91105343c64d
[ "Apache-2.0" ]
1
2019-07-17T15:16:57.000Z
2019-07-17T15:16:57.000Z
# PyAlgoTrade # # Copyright 2011-2018 Gabriel Martin Becedillas Ruiz # # 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 ap...
34.591362
131
0.654437
import datetime import pytz import six from pyalgotrade.utils import dt from pyalgotrade.utils import csvutils from pyalgotrade.barfeed import membf from pyalgotrade import bar class RowParser(object): def parseBar(self, csvRowDict): raise NotImplementedError() def getFieldNames(s...
true
true
f74a5a912804a6d310a6bb6424e01e5ee082b71e
970
py
Python
winter/web/exceptions/throws.py
DmitryKhursevich/winter
9f3bf462f963059bab1f1bbb309ca57f8a43b46f
[ "MIT" ]
1
2020-10-26T09:48:05.000Z
2020-10-26T09:48:05.000Z
winter/web/exceptions/throws.py
mikhaillazko/winter
cd4f11aaf28d500aabb59cec369817bfdb5c2fc1
[ "MIT" ]
null
null
null
winter/web/exceptions/throws.py
mikhaillazko/winter
cd4f11aaf28d500aabb59cec369817bfdb5c2fc1
[ "MIT" ]
null
null
null
from typing import Dict from typing import Optional from typing import TYPE_CHECKING from typing import Type import dataclasses from winter.core import ComponentMethod from winter.core import annotate if TYPE_CHECKING: from .handlers import ExceptionHandler # noqa: F401 @dataclasses.dataclass class ExceptionA...
28.529412
99
0.765979
from typing import Dict from typing import Optional from typing import TYPE_CHECKING from typing import Type import dataclasses from winter.core import ComponentMethod from winter.core import annotate if TYPE_CHECKING: from .handlers import ExceptionHandler @dataclasses.dataclass class ExceptionAnnotation: ...
true
true
f74a5b19449e6902ca97f3170ccc13f94bbb84ea
10,454
gyp
Python
common_audio/common_audio.gyp
yuxw75/temp
ab2fd478821e6c98ff10f2976ce43f617250cff6
[ "DOC", "BSD-3-Clause" ]
null
null
null
common_audio/common_audio.gyp
yuxw75/temp
ab2fd478821e6c98ff10f2976ce43f617250cff6
[ "DOC", "BSD-3-Clause" ]
null
null
null
common_audio/common_audio.gyp
yuxw75/temp
ab2fd478821e6c98ff10f2976ce43f617250cff6
[ "DOC", "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
34.163399
92
0.546968
{ 'includes': [ '../build/common.gypi', ], 'targets': [ { 'target_name': 'common_audio', 'type': 'static_library', 'dependencies': [ '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', ], 'include_dirs': [ 'resampler/include', ...
true
true
f74a5d119758827df94815bd8ee2516d34d07996
21,067
py
Python
src/test/scenarios/synapse/output/extnoflatten/src/synapse/azext_synapse/vendored_sdks/synapse/aio/operations_async/_private_endpoint_connections_operations_async.py
colawwj/autorest.az
3606c06491830a3b78443d08f1757314c90128af
[ "MIT" ]
null
null
null
src/test/scenarios/synapse/output/extnoflatten/src/synapse/azext_synapse/vendored_sdks/synapse/aio/operations_async/_private_endpoint_connections_operations_async.py
colawwj/autorest.az
3606c06491830a3b78443d08f1757314c90128af
[ "MIT" ]
null
null
null
src/test/scenarios/synapse/output/extnoflatten/src/synapse/azext_synapse/vendored_sdks/synapse/aio/operations_async/_private_endpoint_connections_operations_async.py
colawwj/autorest.az
3606c06491830a3b78443d08f1757314c90128af
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.761671
238
0.683344
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union 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 Pipeli...
true
true
f74a5d5f703f2ea57ebe17574df8ee1a330dd9c7
3,389
py
Python
minesweeper.py
theglossy1/Minesweeper
9c641310e82e470a4c4e74bf91239f70b9dc7caa
[ "MIT" ]
null
null
null
minesweeper.py
theglossy1/Minesweeper
9c641310e82e470a4c4e74bf91239f70b9dc7caa
[ "MIT" ]
null
null
null
minesweeper.py
theglossy1/Minesweeper
9c641310e82e470a4c4e74bf91239f70b9dc7caa
[ "MIT" ]
null
null
null
import math import random import numpy as np MINE_BIT = 0b01 FLAG_BIT = 0b10 EMPTY_SLOT = 0xFF FLAG_SLOT = 0xFE SURROUNDING = [ (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1), ] class Minesweeper: def __init__(self, *shape, seed=None): if len(shape...
30.809091
109
0.535261
import math import random import numpy as np MINE_BIT = 0b01 FLAG_BIT = 0b10 EMPTY_SLOT = 0xFF FLAG_SLOT = 0xFE SURROUNDING = [ (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1), ] class Minesweeper: def __init__(self, *shape, seed=None): if len(shape...
true
true
f74a5da408fb2f5503e49049209b991506fe5f49
5,816
py
Python
certbot-ci/certbot_integration_tests/utils/dns_server.py
xiaohuilam/certbot
e4d92b3fec3b66258d2434bbc0de14b7975efd7c
[ "Apache-2.0" ]
16,789
2016-05-06T19:49:59.000Z
2022-03-31T20:01:47.000Z
certbot-ci/certbot_integration_tests/utils/dns_server.py
xiaohuilam/certbot
e4d92b3fec3b66258d2434bbc0de14b7975efd7c
[ "Apache-2.0" ]
5,737
2016-05-06T19:26:43.000Z
2022-03-31T20:27:38.000Z
certbot-ci/certbot_integration_tests/utils/dns_server.py
xiaohuilam/certbot
e4d92b3fec3b66258d2434bbc0de14b7975efd7c
[ "Apache-2.0" ]
2,974
2016-05-06T19:51:23.000Z
2022-03-31T21:01:36.000Z
#!/usr/bin/env python """Module to setup an RFC2136-capable DNS server""" import os import os.path import shutil import socket import subprocess import sys import tempfile import time from types import TracebackType from typing import Any, Sequence from typing import Dict from typing import Optional from typing import ...
35.463415
95
0.599725
import os import os.path import shutil import socket import subprocess import sys import tempfile import time from types import TracebackType from typing import Any, Sequence from typing import Dict from typing import Optional from typing import Type from pkg_resources import resource_filename BIND_DOCKER_IMAGE = "i...
true
true
f74a5e1d173d62bf21d0fb8405b6d301419cc916
280
py
Python
automation/tincrepo/main/pxf/features/hbase/errors/lookupTable/runTest.py
lchx1010/pxf
f6e11f91fb8c01ed27fc829beb3800f3b253c209
[ "Apache-2.0" ]
46
2018-10-22T23:34:03.000Z
2022-03-31T09:31:34.000Z
automation/tincrepo/main/pxf/features/hbase/errors/lookupTable/runTest.py
lchx1010/pxf
f6e11f91fb8c01ed27fc829beb3800f3b253c209
[ "Apache-2.0" ]
317
2018-10-05T23:51:48.000Z
2022-03-22T17:38:52.000Z
automation/tincrepo/main/pxf/features/hbase/errors/lookupTable/runTest.py
lchx1010/pxf
f6e11f91fb8c01ed27fc829beb3800f3b253c209
[ "Apache-2.0" ]
46
2018-10-10T18:55:00.000Z
2022-03-28T07:27:04.000Z
from mpp.models import SQLTestCase from mpp.models import SQLConcurrencyTestCase class PxfHBaseLookupError(SQLConcurrencyTestCase): """ @db_name pxfautomation @concurrency 1 @gpdiff True """ sql_dir = 'sql' ans_dir = 'expected' out_dir = 'output'
21.538462
50
0.703571
from mpp.models import SQLTestCase from mpp.models import SQLConcurrencyTestCase class PxfHBaseLookupError(SQLConcurrencyTestCase): sql_dir = 'sql' ans_dir = 'expected' out_dir = 'output'
true
true
f74a5fac1a1bcb6a3baafc457ad22a298fbb9657
2,781
py
Python
tests/test_visitors/test_ast/test_classes/test_class_attributes/test_slots_syntax.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
1
2020-02-21T18:58:44.000Z
2020-02-21T18:58:44.000Z
tests/test_visitors/test_ast/test_classes/test_class_attributes/test_slots_syntax.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
15
2020-02-22T11:09:46.000Z
2020-02-27T16:36:54.000Z
tests/test_visitors/test_ast/test_classes/test_class_attributes/test_slots_syntax.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
1
2019-12-12T19:18:58.000Z
2019-12-12T19:18:58.000Z
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.oop import WrongSlotsViolation from wemake_python_styleguide.visitors.ast.classes import WrongSlotsVisitor class_body_template = """ class ClassWithSlots(object): __slots__ = {0} """ class_body_typed_template = """ class ClassWithSlo...
20.909774
75
0.606257
import pytest from wemake_python_styleguide.violations.oop import WrongSlotsViolation from wemake_python_styleguide.visitors.ast.classes import WrongSlotsVisitor class_body_template = """ class ClassWithSlots(object): __slots__ = {0} """ class_body_typed_template = """ class ClassWithSlots(object): __slots...
true
true
f74a608073754322ad8ddd2a6062b7707db47a79
619
py
Python
src/app/utility/logger.py
acatalfano/chord-dht
c98f66073b12beb1c3a7cf17197820865936a444
[ "MIT" ]
null
null
null
src/app/utility/logger.py
acatalfano/chord-dht
c98f66073b12beb1c3a7cf17197820865936a444
[ "MIT" ]
null
null
null
src/app/utility/logger.py
acatalfano/chord-dht
c98f66073b12beb1c3a7cf17197820865936a444
[ "MIT" ]
null
null
null
import logging from typing import Union import verboselogs class Logger: __instance: verboselogs.VerboseLogger = None @staticmethod def logger() -> verboselogs.VerboseLogger: if Logger.__instance is None: Logger() assert(Logger.__instance is not None) return Logger.__i...
28.136364
75
0.676898
import logging from typing import Union import verboselogs class Logger: __instance: verboselogs.VerboseLogger = None @staticmethod def logger() -> verboselogs.VerboseLogger: if Logger.__instance is None: Logger() assert(Logger.__instance is not None) return Logger.__i...
true
true
f74a621e082a2f2c4973eec823c00d6975ef521c
305
py
Python
testzie/price_cnn_test.py
amozie/amozie
fb7c16ce537bc5567f9c87cfc22c564a4dffc4ef
[ "Apache-2.0" ]
null
null
null
testzie/price_cnn_test.py
amozie/amozie
fb7c16ce537bc5567f9c87cfc22c564a4dffc4ef
[ "Apache-2.0" ]
null
null
null
testzie/price_cnn_test.py
amozie/amozie
fb7c16ce537bc5567f9c87cfc22c564a4dffc4ef
[ "Apache-2.0" ]
null
null
null
import numpy as np import tushare as ts code = '002771' data_5 = ts.get_k_data(code, ktype='5') data_15 = ts.get_k_data(code, ktype='15') data_30 = ts.get_k_data(code, ktype='30') data_60 = ts.get_k_data(code, ktype='60') data_d = ts.get_k_data(code, ktype='D') data_w = ts.get_k_data(code, ktype='W')
23.461538
41
0.708197
import numpy as np import tushare as ts code = '002771' data_5 = ts.get_k_data(code, ktype='5') data_15 = ts.get_k_data(code, ktype='15') data_30 = ts.get_k_data(code, ktype='30') data_60 = ts.get_k_data(code, ktype='60') data_d = ts.get_k_data(code, ktype='D') data_w = ts.get_k_data(code, ktype='W')
true
true
f74a6227e0d42ece87ddefc3fe918f57f19239d8
2,992
py
Python
ceilometer/openstack/common/fileutils.py
bclau/ceilometer
90ad86c08494596dfa03c8cbfcea2c2be58fc8dc
[ "Apache-2.0" ]
null
null
null
ceilometer/openstack/common/fileutils.py
bclau/ceilometer
90ad86c08494596dfa03c8cbfcea2c2be58fc8dc
[ "Apache-2.0" ]
null
null
null
ceilometer/openstack/common/fileutils.py
bclau/ceilometer
90ad86c08494596dfa03c8cbfcea2c2be58fc8dc
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
26.954955
78
0.667112
import contextlib import errno import os from ceilometer.openstack.common import excutils from ceilometer.openstack.common.gettextutils import _ from ceilometer.openstack.common import log as logging LOG = logging.getLogger(__name__) _FILE_CACHE = {} def ensure_tree(path): try: os.m...
true
true
f74a62635e21fa8da8fc4c9d4790503f1f579fbd
2,765
py
Python
thriftpy2/transport/__init__.py
truebit/thriftpy2
c8f3aa9e309554b5c674e54e6ba9674257856b3f
[ "MIT" ]
1
2020-03-07T18:50:46.000Z
2020-03-07T18:50:46.000Z
thriftpy2/transport/__init__.py
truebit/thriftpy2
c8f3aa9e309554b5c674e54e6ba9674257856b3f
[ "MIT" ]
null
null
null
thriftpy2/transport/__init__.py
truebit/thriftpy2
c8f3aa9e309554b5c674e54e6ba9674257856b3f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from thriftpy2._compat import CYTHON from ..thrift import TType, TException def readall(read_fn, sz): buff = b'' have = 0 while have < sz: chunk = read_fn(sz - have) have += len(chunk) buff += chunk if len(c...
30.384615
75
0.713201
from __future__ import absolute_import from thriftpy2._compat import CYTHON from ..thrift import TType, TException def readall(read_fn, sz): buff = b'' have = 0 while have < sz: chunk = read_fn(sz - have) have += len(chunk) buff += chunk if len(chunk) == 0: ...
true
true
f74a62918a406b0fa5934d275f459c64c33c3548
4,643
py
Python
tools/clang/scripts/upload_revision.py
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
575
2015-06-18T23:58:20.000Z
2022-03-23T09:32:39.000Z
tools/clang/scripts/upload_revision.py
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
tools/clang/scripts/upload_revision.py
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
52
2015-07-14T10:40:50.000Z
2022-03-15T01:11:49.000Z
#!/usr/bin/env python # Copyright (c) 2016 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. """This script takes a Clang git revision as an argument, it then creates a feature branch, puts this revision into update.py, uplo...
36.849206
80
0.704286
from __future__ import print_function import argparse import fnmatch import itertools import os import re import shutil import subprocess import sys from build import CheckoutLLVM, GetCommitDescription, LLVM_DIR from update import CHROMIUM_DIR THIS_DIR = os.path.dirname(__file__) UPDATE_PY_PATH = os.path.join...
true
true
f74a62e382cdcb47309d2dc3e018141c1a8fb9d5
7,670
py
Python
data_utils/widerface2kitti.py
suryavamsi6/face-mask-detection
c24e879b41c3828c3f8dfda10262c85962e6b031
[ "MIT" ]
1
2021-01-22T11:07:00.000Z
2021-01-22T11:07:00.000Z
data_utils/widerface2kitti.py
JN513/face-mask-detection
f62edc0f20c633e0a2945ad028d961e490274716
[ "MIT" ]
null
null
null
data_utils/widerface2kitti.py
JN513/face-mask-detection
f62edc0f20c633e0a2945ad028d961e490274716
[ "MIT" ]
null
null
null
import scipy.io import os from PIL import Image, ImageDraw class widerFace2kitti(): def __init__(self, annotation_file, widerFace_base_dir, kitti_base_dir, kitti_resize_dims, category_limit, train): self.annotation_file = annotation_file self.data = scipy.io.loadmat(self.annotation_file) se...
52.896552
120
0.576923
import scipy.io import os from PIL import Image, ImageDraw class widerFace2kitti(): def __init__(self, annotation_file, widerFace_base_dir, kitti_base_dir, kitti_resize_dims, category_limit, train): self.annotation_file = annotation_file self.data = scipy.io.loadmat(self.annotation_file) se...
true
true
f74a63828ceedda845b30d95cc6687889e0430b1
8,201
py
Python
src/LDPC/pyldpc/ldpcmatrices.py
Horacehxw/Multi-label
76095c72327e9aa379eaa653dbbb775ca638e6db
[ "MIT" ]
1
2019-04-24T15:24:48.000Z
2019-04-24T15:24:48.000Z
src/LDPC/pyldpc/ldpcmatrices.py
Horacehxw/Multi-label
76095c72327e9aa379eaa653dbbb775ca638e6db
[ "MIT" ]
null
null
null
src/LDPC/pyldpc/ldpcmatrices.py
Horacehxw/Multi-label
76095c72327e9aa379eaa653dbbb775ca638e6db
[ "MIT" ]
null
null
null
import numpy as np from scipy.sparse import csr_matrix from .ldpcalgebra import* __all__ = ['BinaryProduct', 'InCode', 'BinaryRank','RegularH','CodingMatrix','CodingMatrix_systematic','HtG'] def RegularH(n,d_v,d_c): """ ------------------------------------------------------------------------------ Builds a...
27.428094
129
0.559932
import numpy as np from scipy.sparse import csr_matrix from .ldpcalgebra import* __all__ = ['BinaryProduct', 'InCode', 'BinaryRank','RegularH','CodingMatrix','CodingMatrix_systematic','HtG'] def RegularH(n,d_v,d_c): if n%d_c: raise ValueError('d_c must divide n. Help(RegularH) for more info.') i...
true
true
f74a63a0b826af6652992f97075ee7f51865814b
1,181
py
Python
bot/models/Indicators/Pullbacks.py
estebanthi/BinanceTradingBotV4
93ccac86db9bc8612248bf5cd1bc9e359749e383
[ "MIT" ]
4
2021-11-22T13:59:11.000Z
2022-02-10T08:27:25.000Z
bot/models/Indicators/Pullbacks.py
estebanthi/BinanceTradingBotV4
93ccac86db9bc8612248bf5cd1bc9e359749e383
[ "MIT" ]
null
null
null
bot/models/Indicators/Pullbacks.py
estebanthi/BinanceTradingBotV4
93ccac86db9bc8612248bf5cd1bc9e359749e383
[ "MIT" ]
3
2021-11-15T18:49:20.000Z
2022-02-06T19:46:29.000Z
import backtrader as bt from backtrader.indicators import ExponentialMovingAverage as EMA class Pullbacks(bt.Indicator): """ An indicator to detect pullbacks to EMA Params : - ema_period : int EMA period, default is 50 - period : int Period for pullbacks calcula...
24.102041
66
0.541067
import backtrader as bt from backtrader.indicators import ExponentialMovingAverage as EMA class Pullbacks(bt.Indicator): params = (('ema_period', 50),('period',3)) lines = ('pullbacks',) def __init__(self): self.high = self.datas[0].high self.low = self.datas[0].low self.ema = ...
true
true
f74a640c2f1d1319abb37f0674d94b34a945466c
4,797
py
Python
achilles/terminal/train/commands.py
np-core/druid
ae483db67eeace4dabdb15e1401e9fc01e2c7d07
[ "MIT" ]
5
2019-09-04T21:02:36.000Z
2021-11-05T01:14:56.000Z
achilles/terminal/train/commands.py
np-core/druid
ae483db67eeace4dabdb15e1401e9fc01e2c7d07
[ "MIT" ]
7
2019-03-14T05:42:11.000Z
2019-03-15T01:49:20.000Z
achilles/terminal/train/commands.py
np-core/druid
ae483db67eeace4dabdb15e1401e9fc01e2c7d07
[ "MIT" ]
2
2021-03-01T06:53:35.000Z
2021-11-05T01:18:43.000Z
import click from achilles.model import AchillesModel from achilles.utils import get_dataset_dim @click.option( "--gpu", "-g", metavar="", default=None, required=False, show_default=True, help="SET CUDA_VISIBLE_DEVICES to train model on specific" " GPU (e.g. 0 or 0,1)", ) @click.option( ...
20.587983
88
0.614759
import click from achilles.model import AchillesModel from achilles.utils import get_dataset_dim @click.option( "--gpu", "-g", metavar="", default=None, required=False, show_default=True, help="SET CUDA_VISIBLE_DEVICES to train model on specific" " GPU (e.g. 0 or 0,1)", ) @click.option( ...
true
true
f74a644da85a3b3c348477edbd74cdf64317da38
4,196
py
Python
crowd_cfg/ddod_crowd_1x.py
Irvingao/DDOD
7417772ba6e2b4dbedfc9b233d5a487d17a20e95
[ "Apache-2.0" ]
41
2021-07-05T05:45:28.000Z
2022-03-30T00:36:20.000Z
crowd_cfg/ddod_crowd_1x.py
Irvingao/DDOD
7417772ba6e2b4dbedfc9b233d5a487d17a20e95
[ "Apache-2.0" ]
8
2021-07-05T10:33:03.000Z
2022-02-11T01:21:16.000Z
crowd_cfg/ddod_crowd_1x.py
Irvingao/DDOD
7417772ba6e2b4dbedfc9b233d5a487d17a20e95
[ "Apache-2.0" ]
6
2021-07-08T02:14:24.000Z
2022-02-11T04:50:22.000Z
model = dict( type='ATSS', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pytorch', init_cfg=dict(type='Pretrained', che...
31.081481
99
0.604147
model = dict( type='ATSS', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pytorch', init_cfg=dict(type='Pretrained', che...
true
true
f74a6478ee21035ca3b012ed42baf0850d956e61
524
py
Python
linked_list/challenges/partition.py
maransowthri/data-structures-algorithms
7558d85573df7f5eeea2b4fd8d6570eada539cdf
[ "Apache-2.0" ]
null
null
null
linked_list/challenges/partition.py
maransowthri/data-structures-algorithms
7558d85573df7f5eeea2b4fd8d6570eada539cdf
[ "Apache-2.0" ]
null
null
null
linked_list/challenges/partition.py
maransowthri/data-structures-algorithms
7558d85573df7f5eeea2b4fd8d6570eada539cdf
[ "Apache-2.0" ]
null
null
null
from base import LinkedList def partition(ll, val): cur = ll.head ll.tail = ll.head while cur: next_node = cur.next cur.next = None if cur.val < val: cur.next = ll.head ll.head = cur else: ll.tail.next = cur ll.tail = cur...
18.068966
31
0.570611
from base import LinkedList def partition(ll, val): cur = ll.head ll.tail = ll.head while cur: next_node = cur.next cur.next = None if cur.val < val: cur.next = ll.head ll.head = cur else: ll.tail.next = cur ll.tail = cur...
true
true
f74a6497cd5dbed9e83aeeb268f7178610c8d9c9
106
py
Python
stable_baselines3/a2c/__init__.py
koulakis/stable-baselines3
08e7519381e800edc6bbd09577f14381b7341873
[ "MIT" ]
null
null
null
stable_baselines3/a2c/__init__.py
koulakis/stable-baselines3
08e7519381e800edc6bbd09577f14381b7341873
[ "MIT" ]
null
null
null
stable_baselines3/a2c/__init__.py
koulakis/stable-baselines3
08e7519381e800edc6bbd09577f14381b7341873
[ "MIT" ]
null
null
null
from stable_baselines3.a2c.a2c import A2C from stable_baselines3.a2c.policies import MlpPolicy, CnnPolicy
35.333333
63
0.867925
from stable_baselines3.a2c.a2c import A2C from stable_baselines3.a2c.policies import MlpPolicy, CnnPolicy
true
true
f74a64d9bcf0a7539333f5b5224b5f0ca0340dcf
3,211
py
Python
Shouter/app/models.py
gabrieldsumabat/shouter
df2eadca5c25e18dde6757d8dae1be12ad344a8f
[ "MIT" ]
null
null
null
Shouter/app/models.py
gabrieldsumabat/shouter
df2eadca5c25e18dde6757d8dae1be12ad344a8f
[ "MIT" ]
null
null
null
Shouter/app/models.py
gabrieldsumabat/shouter
df2eadca5c25e18dde6757d8dae1be12ad344a8f
[ "MIT" ]
null
null
null
from datetime import datetime from hashlib import md5 from time import time from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash import jwt from app import app, db, login followers = db.Table( 'followers', db.Column('follower_id', db.Integer, d...
34.902174
77
0.634693
from datetime import datetime from hashlib import md5 from time import time from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash import jwt from app import app, db, login followers = db.Table( 'followers', db.Column('follower_id', db.Integer, d...
true
true
f74a65c40096b728bb375b489f65e23e80e992f1
3,083
py
Python
sa/profiles/DLink/DGS3100/profile.py
sbworth/getnoc
a9a5647df31822062db3db7afe7ae1c005d166f7
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/DLink/DGS3100/profile.py
sbworth/getnoc
a9a5647df31822062db3db7afe7ae1c005d166f7
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/DLink/DGS3100/profile.py
sbworth/getnoc
a9a5647df31822062db3db7afe7ae1c005d166f7
[ "BSD-3-Clause" ]
null
null
null
# --------------------------------------------------------------------- # Vendor: D-Link # OS: DGS3100 # Compatible: # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------...
32.452632
87
0.512163
import re from noc.core.profile.base import BaseProfile class Profile(BaseProfile): name = "DLink.DGS3100" pattern_more = [ (rb"CTRL\+C.+?a All", b"a"), (rb"CTRL\+C.+?a ALL ", b"a"), (rb"\[Yes/press any key for no\]", b"Y"), (rb"^---MORE---", b"a"), ] patter...
true
true
f74a66298710aefba92b92c45c1cfabc135644f7
3,387
py
Python
courses/management/commands/defer_enrollment.py
mitodl/mit-xpro
981d6c87d963837f0b9ccdd996067fe81394dba4
[ "BSD-3-Clause" ]
10
2019-02-20T18:41:32.000Z
2021-07-26T10:39:58.000Z
courses/management/commands/defer_enrollment.py
mitodl/mit-xpro
981d6c87d963837f0b9ccdd996067fe81394dba4
[ "BSD-3-Clause" ]
2,226
2019-02-20T20:03:57.000Z
2022-03-31T11:18:56.000Z
courses/management/commands/defer_enrollment.py
mitodl/mit-xpro
981d6c87d963837f0b9ccdd996067fe81394dba4
[ "BSD-3-Clause" ]
4
2020-08-26T19:26:02.000Z
2021-03-09T17:46:47.000Z
"""Management command to change enrollment status""" from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.core.management.base import CommandError from django.contrib.auth import get_user_model from courses.api import defer_enrollment from courses.management.utils import EnrollmentChangeC...
36.815217
104
0.58134
from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.core.management.base import CommandError from django.contrib.auth import get_user_model from courses.api import defer_enrollment from courses.management.utils import EnrollmentChangeCommand, enrollment_summary from courses.models import...
true
true
f74a682f71e006f699110ab74b8589b436bd82e5
97,531
py
Python
chanop.py
js3263854/python_unrealircd_services
9d185511654720cba766becd7b326a8bd501e26e
[ "MIT", "Unlicense" ]
1
2021-06-15T09:43:33.000Z
2021-06-15T09:43:33.000Z
chanop.py
js3263854/python_unrealircd_services
9d185511654720cba766becd7b326a8bd501e26e
[ "MIT", "Unlicense" ]
null
null
null
chanop.py
js3263854/python_unrealircd_services
9d185511654720cba766becd7b326a8bd501e26e
[ "MIT", "Unlicense" ]
null
null
null
''' ChanOP commands ''' from db import * from shared import * import re def process_chanop_halfopdehalfop(self, prefix, command, params): conn = create_connection("users.db") channel = params[0].strip() nick = prefix[1:] lvlhalfop = 0 lvldehalfop = 0 with conn: results...
55.891691
201
0.346515
from db import * from shared import * import re def process_chanop_halfopdehalfop(self, prefix, command, params): conn = create_connection("users.db") channel = params[0].strip() nick = prefix[1:] lvlhalfop = 0 lvldehalfop = 0 with conn: results = check_nickname_exists(...
true
true
f74a68f21ed6c805772531515704e9f6cb6aa4b3
34,188
py
Python
notebooks/c07_Recurrent_Neural_Networks/RNN_Depthseries.py
lixuekai2001/ml_for_log_data
1e01c4c6c9a3ee6e20c5cfe8db44029c0aeaedd8
[ "Apache-2.0" ]
9
2020-09-24T06:34:03.000Z
2021-08-18T14:43:11.000Z
notebooks/c07_Recurrent_Neural_Networks/RNN_Depthseries.py
lixuekai2001/ml_for_log_data
1e01c4c6c9a3ee6e20c5cfe8db44029c0aeaedd8
[ "Apache-2.0" ]
null
null
null
notebooks/c07_Recurrent_Neural_Networks/RNN_Depthseries.py
lixuekai2001/ml_for_log_data
1e01c4c6c9a3ee6e20c5cfe8db44029c0aeaedd8
[ "Apache-2.0" ]
6
2020-10-14T07:13:20.000Z
2021-12-23T01:59:41.000Z
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.6.0 # kernelspec: # display_name: deep_ml_curriculum # language: python # name: deep_m...
32.841499
483
0.702118
inputs as isolated instances. But there are many cases were datapoints are not isolated instances and have connection to each other. *Sequential data* are the type of data where each instance is related to the instances came before. # # A good example for this type of data is time series data. At each...
true
true
f74a697a9737d188887f3ec808b3cf7f8bd94004
12,747
py
Python
raven/processes/wpsio.py
davidcaron/raven
c8dd818e42b81120acf57cef0a340f42785074cf
[ "MIT" ]
null
null
null
raven/processes/wpsio.py
davidcaron/raven
c8dd818e42b81120acf57cef0a340f42785074cf
[ "MIT" ]
null
null
null
raven/processes/wpsio.py
davidcaron/raven
c8dd818e42b81120acf57cef0a340f42785074cf
[ "MIT" ]
null
null
null
""" This module contains the WPS inputs and outputs that are reused across multiple WPS processes. """ from pywps import LiteralInput, LiteralOutput, ComplexInput, ComplexOutput from pywps import FORMATS, Format # ---------------------------------------- # # ---------------- Inputs ---------------- # # ------------...
54.708155
119
0.519024
from pywps import LiteralInput, LiteralOutput, ComplexInput, ComplexOutput from pywps import FORMATS, Format ts = ComplexInput('ts', 'Input time series files', abstract='Files (text or netCDF) storing' 'daily liquid precipitation (pr), ' 'solid...
true
true
f74a6a08b26e778a4c474757caec254612c7a2d7
33,600
py
Python
tests/forms_tests/tests/test_extra.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
1
2015-05-16T13:13:06.000Z
2015-05-16T13:13:06.000Z
tests/forms_tests/tests/test_extra.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
null
null
null
tests/forms_tests/tests/test_extra.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import warnings from django.forms import ( CharField, DateField, EmailField, FileField, Form, GenericIPAddressField, HiddenInput, ImageField, IPAddressField, MultipleChoiceField, MultiValueField, MultiWidget, PasswordInput, Se...
41.843088
175
0.633958
from __future__ import unicode_literals import datetime import warnings from django.forms import ( CharField, DateField, EmailField, FileField, Form, GenericIPAddressField, HiddenInput, ImageField, IPAddressField, MultipleChoiceField, MultiValueField, MultiWidget, PasswordInput, SelectMultiple, SlugField...
true
true
f74a6a1024b398e63965433141e2060f461b54b5
28,981
py
Python
madminer/utils/ml/trainer.py
siyuchen95/madminer
dfcbd7ee26c47dd294610c195fafce15f74c10eb
[ "MIT" ]
2
2020-09-09T20:58:31.000Z
2020-09-10T01:35:35.000Z
madminer/utils/ml/trainer.py
siyuchen95/madminer
dfcbd7ee26c47dd294610c195fafce15f74c10eb
[ "MIT" ]
null
null
null
madminer/utils/ml/trainer.py
siyuchen95/madminer
dfcbd7ee26c47dd294610c195fafce15f74c10eb
[ "MIT" ]
1
2020-03-09T10:22:53.000Z
2020-03-09T10:22:53.000Z
from __future__ import absolute_import, division, print_function, unicode_literals import six import logging from collections import OrderedDict import numpy as np import time import torch import torch.optim as optim from torch.utils.data import Dataset, DataLoader from torch.utils.data.sampler import SubsetRandomSamp...
39.918733
120
0.617577
from __future__ import absolute_import, division, print_function, unicode_literals import six import logging from collections import OrderedDict import numpy as np import time import torch import torch.optim as optim from torch.utils.data import Dataset, DataLoader from torch.utils.data.sampler import SubsetRandomSamp...
true
true
f74a6a204c5ed3a217c3fe4742db27ade9995a8e
36,273
py
Python
tensorflow/contrib/learn/python/learn/graph_actions.py
steven0820/tensorflow
36ebbf1ddc3ed820b7a5572ff4ed8e9bc707b8e5
[ "Apache-2.0" ]
1
2016-10-09T06:15:19.000Z
2016-10-09T06:15:19.000Z
tensorflow/contrib/learn/python/learn/graph_actions.py
srivatsan-ramesh/tensorflow
36ebbf1ddc3ed820b7a5572ff4ed8e9bc707b8e5
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/learn/python/learn/graph_actions.py
srivatsan-ramesh/tensorflow
36ebbf1ddc3ed820b7a5572ff4ed8e9bc707b8e5
[ "Apache-2.0" ]
5
2018-02-27T00:34:23.000Z
2022-02-28T16:38:08.000Z
# Copyright 2016 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 # # Unless required by applica...
40.619261
82
0.682408
from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import sys import threading import time import numpy as np from six import reraise from tensorflow.contrib.framework.python.ops import ops as contrib_ops from tensorflow.cont...
true
true
f74a6b4664209f868487f45babe11b6c7eea166a
6,723
py
Python
Converter.py
Ilade-s/testMD
ffedc8203440d9c77f65d18a0ccdef9b5f7abc1c
[ "MIT" ]
1
2021-12-24T16:03:59.000Z
2021-12-24T16:03:59.000Z
Converter.py
Ilade-s/testMD
ffedc8203440d9c77f65d18a0ccdef9b5f7abc1c
[ "MIT" ]
null
null
null
Converter.py
Ilade-s/testMD
ffedc8203440d9c77f65d18a0ccdef9b5f7abc1c
[ "MIT" ]
null
null
null
""" Script to use if you want to convert between the 2 file systems (in one way or another) : - {vol}/{chap}/{page}.* : easier to browse, harder to read - {vol}/{chap}-{page}.* : easier to read, harder to browse - automatically remove old system and pass existant files if already in place """ import os # I...
50.548872
207
0.555109
import os import json from rich import print from rich.progress import * from Globals import __AUTHOR__, __VERSION__, FOLDER_PATH, format_title print("============================================") print("File system converter :") print("\t- This converter uses the infos.json file to gather infos about the settin...
true
true
f74a6be17d44b1c99d379a8d7d7f5df13ddd7afb
106
py
Python
src/djangoSrc/dropbox_listener/apps.py
dighr/nethope_audio
8571bd6f621920f3fea085be3879cab15ccfc1e6
[ "MIT" ]
null
null
null
src/djangoSrc/dropbox_listener/apps.py
dighr/nethope_audio
8571bd6f621920f3fea085be3879cab15ccfc1e6
[ "MIT" ]
9
2021-03-09T21:01:14.000Z
2022-03-02T06:01:00.000Z
src/djangoSrc/dropbox_listener/apps.py
nethopeorg/nethope_audio
8571bd6f621920f3fea085be3879cab15ccfc1e6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class DropboxListenerConfig(AppConfig): name = 'dropbox_listener'
17.666667
39
0.792453
from django.apps import AppConfig class DropboxListenerConfig(AppConfig): name = 'dropbox_listener'
true
true
f74a6c9607fd85359256d5121a0ca3a92bccfff8
292
py
Python
encapsulation/wild_cat_zoo_exe/tiger.py
PetkoAndreev/Python-OOP
2cc3094940cdf078f0ee60be938e883f843766e4
[ "MIT" ]
1
2021-05-27T07:59:17.000Z
2021-05-27T07:59:17.000Z
encapsulation/wild_cat_zoo_exe/tiger.py
PetkoAndreev/Python-OOP
2cc3094940cdf078f0ee60be938e883f843766e4
[ "MIT" ]
null
null
null
encapsulation/wild_cat_zoo_exe/tiger.py
PetkoAndreev/Python-OOP
2cc3094940cdf078f0ee60be938e883f843766e4
[ "MIT" ]
null
null
null
class Tiger: def __init__(self, name, gender, age): self.name = name self.gender = gender self.age = age def __repr__(self): return f"Name: {self.name}, Age: {self.age}, Gender: {self.gender}" @staticmethod def get_needs(): return 45
22.461538
75
0.575342
class Tiger: def __init__(self, name, gender, age): self.name = name self.gender = gender self.age = age def __repr__(self): return f"Name: {self.name}, Age: {self.age}, Gender: {self.gender}" @staticmethod def get_needs(): return 45
true
true
f74a6ce9f7399e82d7cc29d1ac6d70462dffa553
1,422
py
Python
ssseg/cfgs/psanet/cfgs_voc_resnet50os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
2
2021-10-31T21:52:30.000Z
2021-12-21T12:35:37.000Z
ssseg/cfgs/psanet/cfgs_voc_resnet50os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
null
null
null
ssseg/cfgs/psanet/cfgs_voc_resnet50os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
null
null
null
'''define the config file for voc and resnet50os16''' import os from .base_cfg import * # modify dataset config DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'voc', 'rootdir': os.path.join(os.getcwd(), 'VOCdevkit/VOC2012'), }) DATASET_CFG['train']['set'] = 'trainaug' # modify dataloader config...
25.854545
92
0.654008
import os from .base_cfg import * DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'voc', 'rootdir': os.path.join(os.getcwd(), 'VOCdevkit/VOC2012'), }) DATASET_CFG['train']['set'] = 'trainaug' DATALOADER_CFG = DATALOADER_CFG.copy() OPTIMIZER_CFG = OPTIMIZER_CFG.copy() OPTIMIZER_CFG.update( ...
true
true
f74a6d3b504f220fa01a747f06e5f770554718cb
541
py
Python
src/copper/config/database.py
Leonardofreua/copper
248f34125dba316c8a55d15f286c415a1fc4592b
[ "MIT" ]
null
null
null
src/copper/config/database.py
Leonardofreua/copper
248f34125dba316c8a55d15f286c415a1fc4592b
[ "MIT" ]
null
null
null
src/copper/config/database.py
Leonardofreua/copper
248f34125dba316c8a55d15f286c415a1fc4592b
[ "MIT" ]
null
null
null
from scrapy.utils import project from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker settings = project.get_project_settings() database_path = settings.attributes["SQLALCHEMY_DATABASE_URI"].value is_echo = settings.attributes["SQLALCHEM...
27.05
68
0.820702
from scrapy.utils import project from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker settings = project.get_project_settings() database_path = settings.attributes["SQLALCHEMY_DATABASE_URI"].value is_echo = settings.attributes["SQLALCHEM...
true
true
f74a6d441d0aefcfa4b442c0678e0aadf6dbdb07
7,480
py
Python
hail/python/hailtop/batch/resource.py
LIN-Yu-Ting/hail
2d9a7cefc8f3914232494d5248b1aad2ee586f5a
[ "MIT" ]
null
null
null
hail/python/hailtop/batch/resource.py
LIN-Yu-Ting/hail
2d9a7cefc8f3914232494d5248b1aad2ee586f5a
[ "MIT" ]
null
null
null
hail/python/hailtop/batch/resource.py
LIN-Yu-Ting/hail
2d9a7cefc8f3914232494d5248b1aad2ee586f5a
[ "MIT" ]
null
null
null
import abc from shlex import quote as shq from .utils import BatchException class Resource: """ Abstract class for resources. """ _uid: str @abc.abstractmethod def _get_path(self, directory) -> str: pass @abc.abstractmethod def _add_output_path(self, path): pass ...
27.5
112
0.595588
import abc from shlex import quote as shq from .utils import BatchException class Resource: _uid: str @abc.abstractmethod def _get_path(self, directory) -> str: pass @abc.abstractmethod def _add_output_path(self, path): pass def _declare(self, directory): return f...
true
true
f74a6d65d7eddaaa64a2013f569d2db12c10d4c8
109,642
py
Python
numpy/distutils/system_info.py
OakCityLabs/numpy
09f5c5a64eb019b3e058c7183ca1ead6190bdbc8
[ "BSD-3-Clause" ]
1
2021-12-14T18:48:58.000Z
2021-12-14T18:48:58.000Z
numpy/distutils/system_info.py
OakCityLabs/numpy
09f5c5a64eb019b3e058c7183ca1ead6190bdbc8
[ "BSD-3-Clause" ]
null
null
null
numpy/distutils/system_info.py
OakCityLabs/numpy
09f5c5a64eb019b3e058c7183ca1ead6190bdbc8
[ "BSD-3-Clause" ]
1
2022-02-09T22:48:38.000Z
2022-02-09T22:48:38.000Z
#!/usr/bin/env python3 """ This file defines a set of system_info classes for getting information about various resources (libraries, library directories, include directories, etc.) in the system. Usage: info_dict = get_info(<name>) where <name> is a string 'atlas','x11','fftw','lapack','blas', 'lapack_src', 'b...
35.119154
120
0.578018
import sys import os import re import copy import warnings import subprocess import textwrap from glob import glob from functools import reduce from configparser import NoOptionError from configparser import RawConfigParser as ConfigParser from distutils.errors import DistutilsError from distutils.dist import Di...
true
true
f74a6f949cb089b326f18d64c308afa5b6d30578
16,265
py
Python
src/m3_more_nested_loops_in_sequences.py
NicholasPSnow/19-MoreLoopsWithinLoops
2f89bf816d9d723510f4ea7b572a69a82580f4d5
[ "MIT" ]
null
null
null
src/m3_more_nested_loops_in_sequences.py
NicholasPSnow/19-MoreLoopsWithinLoops
2f89bf816d9d723510f4ea7b572a69a82580f4d5
[ "MIT" ]
null
null
null
src/m3_more_nested_loops_in_sequences.py
NicholasPSnow/19-MoreLoopsWithinLoops
2f89bf816d9d723510f4ea7b572a69a82580f4d5
[ "MIT" ]
null
null
null
""" This project demonstrates NESTED LOOPS (i.e., loops within loops) in the context of SEQUENCES OF SUB-SEQUENCES. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Nicholas Snow. """ # Done: 1. PUT YOUR NAME IN THE ABO...
38.091335
113
0.533292
def main(): run_test_largest_number() run_test_largest_negative_number() run_test_first_is_elsewhere_too() def run_test_largest_number(): print() print('-------------------------------------') print('Testing the LARGEST_NUMBER function:') print('-------------...
true
true
f74a6fcb5acbcde859d8bc1fd522733652df83fb
67,235
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations_async/_application_gateways_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations_async/_application_gateways_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations_async/_application_gateways_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 ...
49.184345
240
0.676389
from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union 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 ...
true
true