hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f726183b6b3459cd5406c87d8bc7c89200072c21
3,203
py
Python
crnt4sbml/safety_wrap.py
PNNL-Comp-Mass-Spec/CRNT4SBML
20406f452863f35f766b504fe2b3f3ab034b62fe
[ "Apache-2.0" ]
null
null
null
crnt4sbml/safety_wrap.py
PNNL-Comp-Mass-Spec/CRNT4SBML
20406f452863f35f766b504fe2b3f3ab034b62fe
[ "Apache-2.0" ]
1
2019-09-26T21:04:31.000Z
2019-09-26T21:04:31.000Z
crnt4sbml/safety_wrap.py
PNNL-Comp-Mass-Spec/CRNT4SBML
20406f452863f35f766b504fe2b3f3ab034b62fe
[ "Apache-2.0" ]
1
2019-10-29T20:41:34.000Z
2019-10-29T20:41:34.000Z
import os import pickle import numpy import antimony import roadrunner import rrplugins import sys roadrunner.Logger.setLevel(roadrunner.Logger.LOG_ERROR) roadrunner.Logger.disableLogging() roadrunner.Logger.disableConsoleLogging() roadrunner.Logger.disableFileLogging() rrplugins.setLogLevel('error') stderr_fileno = ...
27.612069
71
0.73119
import os import pickle import numpy import antimony import roadrunner import rrplugins import sys roadrunner.Logger.setLevel(roadrunner.Logger.LOG_ERROR) roadrunner.Logger.disableLogging() roadrunner.Logger.disableConsoleLogging() roadrunner.Logger.disableFileLogging() rrplugins.setLogLevel('error') stderr_fileno = ...
true
true
f72619392a6697759ea4f17f8067b0b5a3548221
6,841
py
Python
pdm/resolver/providers.py
linw1995/pdm
f2f67f17efd9cd8593ce06a4933cc2303890dcec
[ "MIT" ]
null
null
null
pdm/resolver/providers.py
linw1995/pdm
f2f67f17efd9cd8593ce06a4933cc2303890dcec
[ "MIT" ]
null
null
null
pdm/resolver/providers.py
linw1995/pdm
f2f67f17efd9cd8593ce06a4933cc2303890dcec
[ "MIT" ]
null
null
null
from typing import Any, Dict, Iterable, List, Optional, Union from resolvelib import AbstractProvider from resolvelib.resolvers import RequirementInformation from pdm.models.candidates import Candidate from pdm.models.repositories import BaseRepository from pdm.models.requirements import Requirement from pdm.models.s...
40.720238
86
0.673586
from typing import Any, Dict, Iterable, List, Optional, Union from resolvelib import AbstractProvider from resolvelib.resolvers import RequirementInformation from pdm.models.candidates import Candidate from pdm.models.repositories import BaseRepository from pdm.models.requirements import Requirement from pdm.models.s...
true
true
f726193a37608aae08e652a88fa96a6e2af5182f
427
py
Python
Python1/python1/word_counter.py
ceeblet/OST_PythonCertificationTrack
042e0ce964bc88b3f4132dcbd7e06c5f504eae34
[ "MIT" ]
null
null
null
Python1/python1/word_counter.py
ceeblet/OST_PythonCertificationTrack
042e0ce964bc88b3f4132dcbd7e06c5f504eae34
[ "MIT" ]
null
null
null
Python1/python1/word_counter.py
ceeblet/OST_PythonCertificationTrack
042e0ce964bc88b3f4132dcbd7e06c5f504eae34
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 """Count the number of different words in a text.""" text = """\ Baa, Baa, Black sheep, Have you any wool? Yes sir, yes sir, Three bags full; One for the master, And one for the dame, And one for the little boy Who lives down the lane.""" for punc in ",?;.": text = text.replace(punc, "") ...
23.722222
61
0.672131
text = """\ Baa, Baa, Black sheep, Have you any wool? Yes sir, yes sir, Three bags full; One for the master, And one for the dame, And one for the little boy Who lives down the lane.""" for punc in ",?;.": text = text.replace(punc, "") print(text) words = set(text.lower().split()) print("There are", len(words), ...
true
true
f72619f4db7804ed8962e86a9e8a707a354a4d0e
32,049
py
Python
ros2interface/test/test_cli.py
craigh92/ros2cli
6c1af39c728145942346b40e998b8a3984f1b6c1
[ "Apache-2.0" ]
null
null
null
ros2interface/test/test_cli.py
craigh92/ros2cli
6c1af39c728145942346b40e998b8a3984f1b6c1
[ "Apache-2.0" ]
null
null
null
ros2interface/test/test_cli.py
craigh92/ros2cli
6c1af39c728145942346b40e998b8a3984f1b6c1
[ "Apache-2.0" ]
1
2021-01-20T03:26:07.000Z
2021-01-20T03:26:07.000Z
# Copyright 2019 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
40.931034
90
0.55568
import contextlib import itertools import re import sys import unittest from launch import LaunchDescription from launch.actions import ExecuteProcess import launch_testing import launch_testing.actions import launch_testing.asserts import launch_testing.markers import launch_testing.tools import pytes...
true
true
f7261a33bda347e1351ccdc5511b79b1e79f4d69
10,223
py
Python
we.py
TimeTraveller-San/FairGAN
526c2937714fc322714db54dc6a3f392f2c88e18
[ "MIT" ]
8
2020-03-06T12:53:53.000Z
2021-08-31T18:11:36.000Z
we.py
TimeTraveller-San/FairGAN
526c2937714fc322714db54dc6a3f392f2c88e18
[ "MIT" ]
null
null
null
we.py
TimeTraveller-San/FairGAN
526c2937714fc322714db54dc6a3f392f2c88e18
[ "MIT" ]
null
null
null
from __future__ import print_function, division import re import sys import numpy as np import scipy.sparse import codecs from sklearn.decomposition import PCA if sys.version_info[0] < 3: import io open = io.open else: unicode = str """ Tools for debiasing word embeddings Man is to Computer Programmer as W...
36.773381
128
0.555806
from __future__ import print_function, division import re import sys import numpy as np import scipy.sparse import codecs from sklearn.decomposition import PCA if sys.version_info[0] < 3: import io open = io.open else: unicode = str DEFAULT_NUM_WORDS = 27000 FILENAMES = {"g_wiki": "glove.6B.300d.small.txt"...
true
true
f7261adeb044fff4db6dbfd9fb7364d1c5977719
2,556
py
Python
PDK_Generator/inverse_design_y_branch/lumopt/geometries/parameterized_geometry.py
seanlam97/PDK_Generator
15c1f4f56575f8e21ea874443d06ef740ccb5aa5
[ "MIT" ]
null
null
null
PDK_Generator/inverse_design_y_branch/lumopt/geometries/parameterized_geometry.py
seanlam97/PDK_Generator
15c1f4f56575f8e21ea874443d06ef740ccb5aa5
[ "MIT" ]
3
2021-08-24T23:31:42.000Z
2021-08-25T16:45:54.000Z
PDK_Generator/inverse_design_y_branch/lumopt/geometries/parameterized_geometry.py
seanlam97/PDK_Generator
15c1f4f56575f8e21ea874443d06ef740ccb5aa5
[ "MIT" ]
null
null
null
import numpy as np import inspect from lumopt.geometries.geometry import Geometry class ParameterizedGeometry(Geometry): """ Defines a parametrized geometry using any of the built-in geometric structures available in the FDTD CAD. Users must provide a Python function with the signature ('params',...
45.642857
122
0.673709
import numpy as np import inspect from lumopt.geometries.geometry import Geometry class ParameterizedGeometry(Geometry): def __init__(self, func, initial_params, bounds, dx, deps_num_threads=1): self.deps_num_threads=deps_num_threads self.func = func self.current_params = np.array(ini...
true
true
f7261d7103b3c953a4264b678c7599501789f591
1,580
py
Python
2020/python/day-15-cleaned.py
tadhg-ohiggins/advent-of-code
d0f113955940e69cbe0953607f62862f8a8bb830
[ "CC0-1.0" ]
1
2021-12-04T18:09:44.000Z
2021-12-04T18:09:44.000Z
2020/python/day-15-cleaned.py
tadhg-ohiggins/advent-of-code
d0f113955940e69cbe0953607f62862f8a8bb830
[ "CC0-1.0" ]
null
null
null
2020/python/day-15-cleaned.py
tadhg-ohiggins/advent-of-code
d0f113955940e69cbe0953607f62862f8a8bb830
[ "CC0-1.0" ]
null
null
null
from functools import partial from itertools import count from typing import List from tutils import lmap, splitstrip, load_and_process_input DAY = "15" INPUT = f"input-{DAY}.txt" ANSWER1 = 240 ANSWER2 = 505 testdata = [ ([0, 3, 6], 2020, 436), ([1, 3, 2], 2020, 1), ([2, 1, 3], 2020, 10), ([1, 2, 3], 2...
26.333333
63
0.621519
from functools import partial from itertools import count from typing import List from tutils import lmap, splitstrip, load_and_process_input DAY = "15" INPUT = f"input-{DAY}.txt" ANSWER1 = 240 ANSWER2 = 505 testdata = [ ([0, 3, 6], 2020, 436), ([1, 3, 2], 2020, 1), ([2, 1, 3], 2020, 10), ([1, 2, 3], 2...
true
true
f7261da738c0c2709539722e8b91f6ba23d28fd1
8,211
py
Python
bridgedb/test/test_smtp.py
jugheadjones10/bridgedb
94d6bca4b22458c156898785d8f6ccedf562d884
[ "BSD-3-Clause-Clear" ]
null
null
null
bridgedb/test/test_smtp.py
jugheadjones10/bridgedb
94d6bca4b22458c156898785d8f6ccedf562d884
[ "BSD-3-Clause-Clear" ]
null
null
null
bridgedb/test/test_smtp.py
jugheadjones10/bridgedb
94d6bca4b22458c156898785d8f6ccedf562d884
[ "BSD-3-Clause-Clear" ]
null
null
null
"""integration tests for BridgeDB .""" from __future__ import print_function import smtplib import asyncore import threading import queue import random import os from smtpd import SMTPServer from twisted.trial import unittest from twisted.trial.unittest import FailTest from twisted.trial.unittest import SkipTest f...
39.666667
82
0.657776
from __future__ import print_function import smtplib import asyncore import threading import queue import random import os from smtpd import SMTPServer from twisted.trial import unittest from twisted.trial.unittest import FailTest from twisted.trial.unittest import SkipTest from bridgedb.test.util import processEx...
true
true
f7261db3cd3b74253335a7d73475dfcccd0a55ec
1,641
py
Python
unpackMFC.py
dare0021/KerasBasedSpeechClassifier
aa507b2a2eb39963bd9ed3279288dbe6c877166c
[ "MIT" ]
1
2016-12-28T07:18:52.000Z
2016-12-28T07:18:52.000Z
unpackMFC.py
dare0021/KerasBasedSpeechClassifier
aa507b2a2eb39963bd9ed3279288dbe6c877166c
[ "MIT" ]
2
2016-09-30T05:41:06.000Z
2017-03-28T11:58:58.000Z
unpackMFC.py
dare0021/KerasBasedSpeechClassifier
aa507b2a2eb39963bd9ed3279288dbe6c877166c
[ "MIT" ]
null
null
null
import numpy as np import struct # CMU Sphinx 4 mfc file opener # takes file path as input # Sphinx uses feature vectors of length 13 by default def run(input, featureVectorSize): file = open(input, 'r') size = struct.unpack('>i', ''.join(file.read(4)))[0] if ((float)(size)) / featureVectorSize - (float)(size // fe...
35.673913
113
0.724558
import numpy as np import struct def run(input, featureVectorSize): file = open(input, 'r') size = struct.unpack('>i', ''.join(file.read(4)))[0] if ((float)(size)) / featureVectorSize - (float)(size // featureVectorSize) != 0: print "ERR: unpackMFC.run().featureVectorSize is inconsistent with the feature count...
false
true
f7261de6c7c541d6de5d6ee3125ac35b2d456e80
7,792
py
Python
test/functional/combine_logs.py
Techcoingithub/techcoin
6914faea0496d16d85f4f11fc1ae2ba05e9143b8
[ "MIT" ]
null
null
null
test/functional/combine_logs.py
Techcoingithub/techcoin
6914faea0496d16d85f4f11fc1ae2ba05e9143b8
[ "MIT" ]
1
2021-11-30T18:41:44.000Z
2022-01-17T17:55:26.000Z
test/functional/combine_logs.py
Techcoingithub/techcoin
6914faea0496d16d85f4f11fc1ae2ba05e9143b8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Combine logs from multiple techcoin nodes as well as the test_framework log. This streams the combined...
38.574257
196
0.617941
import argparse from collections import defaultdict, namedtuple import heapq import itertools import os import pathlib import re import sys import tempfile # without the parent module installed. # Should match same symbol in `test_framework.test_framework`. TMPDIR_PREFIX = "techcoin_func_test_" # Matches on th...
true
true
f7261e37ae3b0a363433aacc10d91805d93f9dcf
391
py
Python
src/create_github_project/commands/versions/__init__.py
nkomiya/create-github-project
e60028a3edf0fdee2f76ffd26296e01588235324
[ "MIT" ]
1
2021-08-20T08:28:45.000Z
2021-08-20T08:28:45.000Z
src/create_github_project/commands/versions/__init__.py
nkomiya/create-github-project
e60028a3edf0fdee2f76ffd26296e01588235324
[ "MIT" ]
37
2021-07-24T11:47:28.000Z
2021-08-08T19:23:24.000Z
src/create_github_project/commands/versions/__init__.py
nkomiya/create-github-project
e60028a3edf0fdee2f76ffd26296e01588235324
[ "MIT" ]
null
null
null
import click from .current import current from .update import update __all__ = [ 'build' ] @click.group(help='Manage tool versions.') def versions() -> None: pass def build(cmd: click.Group) -> None: """親コマンドにサブコマンドを追加する。 Args: cmd (click.Group): 親コマンド """ versions.add_command(cu...
14.481481
42
0.657289
import click from .current import current from .update import update __all__ = [ 'build' ] @click.group(help='Manage tool versions.') def versions() -> None: pass def build(cmd: click.Group) -> None: versions.add_command(current) versions.add_command(update) cmd.add_command(versions)
true
true
f7261ecb34d10b321947c71f2d29ac44db652fb3
20,071
py
Python
vis/visualize_court.py
szhaofelicia/sgan
ead42d4bb3b1278c4c9ffcae8fa9c2dc036a52ff
[ "MIT" ]
3
2022-01-02T16:58:39.000Z
2022-02-07T08:29:48.000Z
vis/visualize_court.py
szhaofelicia/sgan
ead42d4bb3b1278c4c9ffcae8fa9c2dc036a52ff
[ "MIT" ]
null
null
null
vis/visualize_court.py
szhaofelicia/sgan
ead42d4bb3b1278c4c9ffcae8fa9c2dc036a52ff
[ "MIT" ]
null
null
null
import numpy as np # import plotly import plotly.graph_objects as go def draw_plotly_half_court(fig, fig_width=600, margins=10): # From: https://community.plot.ly/t/arc-shape-with-path/7205/5 def ellipse_arc(x_center=0.0, y_center=0.0, a=10.5, b=10.5, start_angle=0.0, end_angle=2 * np.pi, N=200, closed=False...
40.061876
123
0.478202
import numpy as np import plotly.graph_objects as go def draw_plotly_half_court(fig, fig_width=600, margins=10): def ellipse_arc(x_center=0.0, y_center=0.0, a=10.5, b=10.5, start_angle=0.0, end_angle=2 * np.pi, N=200, closed=False): t = np.linspace(start_angle, end_angle, N) x = x_center + ...
true
true
f7261f4f8b69b121e8b4085d991fa58a731f368d
1,412
py
Python
cuestionario/urls.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
null
null
null
cuestionario/urls.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
null
null
null
cuestionario/urls.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
1
2021-09-05T23:29:56.000Z
2021-09-05T23:29:56.000Z
from django.urls import path from .views import ( CategoriasListView, pagina_principal, CuestionarioListView, cuestionario_vista, cuestionario_datos, guardar_resultados, resultado, nuevo_cuestionario, editar_cuestionario, eliminar_cuestionario, nueva_pregunta, nueva_respuesta, agregar_categoria, ) url...
45.548387
150
0.753541
from django.urls import path from .views import ( CategoriasListView, pagina_principal, CuestionarioListView, cuestionario_vista, cuestionario_datos, guardar_resultados, resultado, nuevo_cuestionario, editar_cuestionario, eliminar_cuestionario, nueva_pregunta, nueva_respuesta, agregar_categoria, ) url...
true
true
f7262028bb67932989ce287fc4342964d85098d4
843
py
Python
merak/commands/__init__.py
Yao1993/merak
517b7a8eca82eebbf22bcd3688a79e1e76ed9d42
[ "Apache-2.0" ]
16
2021-01-22T04:09:30.000Z
2022-03-17T10:38:34.000Z
merak/commands/__init__.py
Yao1993/merak
517b7a8eca82eebbf22bcd3688a79e1e76ed9d42
[ "Apache-2.0" ]
6
2021-04-12T10:09:47.000Z
2022-03-24T09:31:13.000Z
merak/commands/__init__.py
Yao1993/merak
517b7a8eca82eebbf22bcd3688a79e1e76ed9d42
[ "Apache-2.0" ]
2
2021-07-14T05:39:17.000Z
2021-07-28T16:27:40.000Z
# Copyright 2021 (David) Siu-Kei Muk. 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 applicable...
42.15
80
0.709371
from __future__ import absolute_import from __future__ import division from __future__ import print_function from merak.commands.cythonize import Cythonize
true
true
f72620bb64981cc53d557d6184ba036e5477d39e
2,690
py
Python
dsp/core/spider.py
gods-view/AdclickIO
ccb73867e568aac5f40bd5890149626ce0be1897
[ "BSD-2-Clause" ]
null
null
null
dsp/core/spider.py
gods-view/AdclickIO
ccb73867e568aac5f40bd5890149626ce0be1897
[ "BSD-2-Clause" ]
null
null
null
dsp/core/spider.py
gods-view/AdclickIO
ccb73867e568aac5f40bd5890149626ce0be1897
[ "BSD-2-Clause" ]
null
null
null
# encoding=utf-8 import sys from imp import reload reload(sys) # sys.setdefaultencoding('utf8') import os, time # from configure import config from datetime import datetime as dt import requests # requests.adapters.DEFAULT_RETRIES = 5 # import chardet class HttpSpider: headers = { # 'User-Agent':'Mozi...
32.409639
89
0.612268
import sys from imp import reload reload(sys) import os, time from datetime import datetime as dt import requests class HttpSpider: headers = { } def __init__(self): pass def show_error(self, error_log, msg): if error_log is None:...
true
true
f72622da8b3fb8fe690f929b9dd25369d65cc062
17,230
py
Python
turing_complete_interface/circuit_builder.py
scottanderson/turing-complete-interface
37d52265a2b7b693c1dc67505bd47622aa0f1e9f
[ "MIT" ]
4
2022-01-23T20:29:16.000Z
2022-03-20T06:10:47.000Z
turing_complete_interface/circuit_builder.py
scottanderson/turing-complete-interface
37d52265a2b7b693c1dc67505bd47622aa0f1e9f
[ "MIT" ]
null
null
null
turing_complete_interface/circuit_builder.py
scottanderson/turing-complete-interface
37d52265a2b7b693c1dc67505bd47622aa0f1e9f
[ "MIT" ]
1
2022-01-28T02:41:25.000Z
2022-01-28T02:41:25.000Z
from __future__ import annotations import json from dataclasses import dataclass, field from math import inf, sqrt from queue import PriorityQueue from typing import Any, Callable, Collection, TYPE_CHECKING, Iterable, Literal from bitarray import bitarray from turing_complete_interface.circuit_parser import Circuit,...
41.121718
116
0.556878
from __future__ import annotations import json from dataclasses import dataclass, field from math import inf, sqrt from queue import PriorityQueue from typing import Any, Callable, Collection, TYPE_CHECKING, Iterable, Literal from bitarray import bitarray from turing_complete_interface.circuit_parser import Circuit,...
true
true
f72623295ea209ba44d041366790eed08ce7ecff
7,709
py
Python
dvc/ignore.py
iksnagreb/dvc
a077135d76bd30205ca6db75bb76c55465be5255
[ "Apache-2.0" ]
1
2020-08-12T22:51:45.000Z
2020-08-12T22:51:45.000Z
dvc/ignore.py
iksnagreb/dvc
a077135d76bd30205ca6db75bb76c55465be5255
[ "Apache-2.0" ]
null
null
null
dvc/ignore.py
iksnagreb/dvc
a077135d76bd30205ca6db75bb76c55465be5255
[ "Apache-2.0" ]
1
2020-11-28T11:47:48.000Z
2020-11-28T11:47:48.000Z
import logging import os import re from itertools import groupby from pathspec.patterns import GitWildMatchPattern from pathspec.util import normalize_file from pygtrie import StringTrie from dvc.path_info import PathInfo from dvc.pathspec_math import merge_patterns from dvc.system import System from dvc.utils import...
30.350394
77
0.609936
import logging import os import re from itertools import groupby from pathspec.patterns import GitWildMatchPattern from pathspec.util import normalize_file from pygtrie import StringTrie from dvc.path_info import PathInfo from dvc.pathspec_math import merge_patterns from dvc.system import System from dvc.utils import...
true
true
f726248f250b43e625a1784113284065ec6f8efa
6,073
py
Python
app/auth/routes.py
Alexsik76/flask_blog
e780469afe246a56c4e5c5744d16cf8cb7da9374
[ "Apache-2.0" ]
null
null
null
app/auth/routes.py
Alexsik76/flask_blog
e780469afe246a56c4e5c5744d16cf8cb7da9374
[ "Apache-2.0" ]
null
null
null
app/auth/routes.py
Alexsik76/flask_blog
e780469afe246a56c4e5c5744d16cf8cb7da9374
[ "Apache-2.0" ]
null
null
null
import os from functools import wraps from flask import flash, redirect, render_template, url_for, current_app, Markup, request from flask_login import login_user, login_required, logout_user, current_user from app.auth import bp from app.auth.forms import SignUpForm, RegistrationForm, LoginForm, ResetPasswordForm, New...
39.953947
115
0.668698
import os from functools import wraps from flask import flash, redirect, render_template, url_for, current_app, Markup, request from flask_login import login_user, login_required, logout_user, current_user from app.auth import bp from app.auth.forms import SignUpForm, RegistrationForm, LoginForm, ResetPasswordForm, New...
true
true
f7262560c667d65265155dbba12d860d64d7e43a
1,450
py
Python
utils/prediction.py
catskillsresearch/xview2-catskills
5671cff323c8121c0ae251e360e454a1e8568f58
[ "BSD-3-Clause" ]
null
null
null
utils/prediction.py
catskillsresearch/xview2-catskills
5671cff323c8121c0ae251e360e454a1e8568f58
[ "BSD-3-Clause" ]
null
null
null
utils/prediction.py
catskillsresearch/xview2-catskills
5671cff323c8121c0ae251e360e454a1e8568f58
[ "BSD-3-Clause" ]
null
null
null
#!/home/catskills/anaconda3/envs/xview2/bin/python import glob, os from shutil import copyfile from tqdm import tqdm from subprocess import call from IPython.utils.path import ensure_dir_exists # os.environ["CUDA_VISIBLE_DEVICES"]="1" # second gpu VERSION=os.getenv('VERSION') PROJECT='xview2-catskills' USERDIR='/home...
37.179487
128
0.743448
import glob, os from shutil import copyfile from tqdm import tqdm from subprocess import call from IPython.utils.path import ensure_dir_exists getenv('VERSION') PROJECT='xview2-catskills' USERDIR='/home/catskills/Desktop' CODEDIR=f'{USERDIR}/{PROJECT}' DATADIR=f'{USERDIR}/dataxv2' TESTDIR=f'{DATADIR}/test/images/' S...
true
true
f726258904982674e78e973db19b6f500c57c842
7,783
py
Python
integration/python/integration_api/models/baas_sub_account_vo.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
integration/python/integration_api/models/baas_sub_account_vo.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
integration/python/integration_api/models/baas_sub_account_vo.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Hydrogen Integration API The Hydrogen Integration API # noqa: E501 OpenAPI spec version: 1.2.1 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class BaasSubAccountVO(...
28.613971
173
0.608634
import pprint import re import six class BaasSubAccountVO(object): swagger_types = { 'account_number': 'str', 'account_status': 'str', 'message': 'str', 'nucleus_portfolio_id': 'str', 'status': 'str', 'vendor_name': 'object', 'vendor_response': 'obje...
true
true
f72627ba2a2e2ffe351a5d1e289253920619cb97
3,942
py
Python
utils.py
ChristophReich1996/Mode_Collapse
937ee8bf96510fbf4070fc7e14b78276ab036b8c
[ "MIT" ]
14
2020-06-22T12:56:10.000Z
2022-03-31T10:23:00.000Z
utils.py
ChristophReich1996/Mode_Collapse
937ee8bf96510fbf4070fc7e14b78276ab036b8c
[ "MIT" ]
null
null
null
utils.py
ChristophReich1996/Mode_Collapse
937ee8bf96510fbf4070fc7e14b78276ab036b8c
[ "MIT" ]
2
2022-01-21T01:22:23.000Z
2022-02-13T18:08:08.000Z
from typing import Optional import torch import torch.nn as nn from torch.nn.utils import spectral_norm import numpy as np def get_generator(latent_size: int, use_spectral_norm: bool) -> nn.Module: """ Returns the generator network. :param latent_size: (int) Size of the latent input vector :param use...
44.292135
114
0.540081
from typing import Optional import torch import torch.nn as nn from torch.nn.utils import spectral_norm import numpy as np def get_generator(latent_size: int, use_spectral_norm: bool) -> nn.Module: if use_spectral_norm: return nn.Sequential(spectral_norm(nn.Linear(latent_size, 256, bias=True)), ...
true
true
f72627c561e2ac89a391788cfaf08f88db3539eb
585
py
Python
rgr/__init__.py
Faxn/rgr
656f4795bfbb5ca6bf7f9dd6c8e043a3242cd331
[ "BSD-2-Clause" ]
null
null
null
rgr/__init__.py
Faxn/rgr
656f4795bfbb5ca6bf7f9dd6c8e043a3242cd331
[ "BSD-2-Clause" ]
null
null
null
rgr/__init__.py
Faxn/rgr
656f4795bfbb5ca6bf7f9dd6c8e043a3242cd331
[ "BSD-2-Clause" ]
null
null
null
from . import lexer from .parseRoll import parser def roll(expression : str): "Runs the dice expression provided and returns long form result" try: tree = parser.parse(expression) result, hist = tree.roll() except Exception as E: return str(E) return result, hist, tree ...
19.5
68
0.642735
from . import lexer from .parseRoll import parser def roll(expression : str): try: tree = parser.parse(expression) result, hist = tree.roll() except Exception as E: return str(E) return result, hist, tree def compile(expression : str): tree = parser.parse(expression) ...
true
true
f726282d7144fcaa8467eabd6470b58a1158a9e7
374
py
Python
projects/intruder_detection/main.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
null
null
null
projects/intruder_detection/main.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
null
null
null
projects/intruder_detection/main.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
null
null
null
from machine import Pin, Timer def check_sensor(timer): global sensor if sensor.value() == 1: gp1.value(1) else: gp1.value(0) #GP4 - 5v output gp4 = Pin(4,Pin.OUT) gp4.value(1) #GP1 - output for LED gp1= Pin(1,Pin.OUT) #GP5 - input from sensor sensor = Pin(5,Pin.IN) tim = Timer() tim.init(...
19.684211
62
0.65508
from machine import Pin, Timer def check_sensor(timer): global sensor if sensor.value() == 1: gp1.value(1) else: gp1.value(0) gp4 = Pin(4,Pin.OUT) gp4.value(1) gp1= Pin(1,Pin.OUT) sensor = Pin(5,Pin.IN) tim = Timer() tim.init(freq=1.5, mode=Timer.PERIODIC, callback=check_sensor)
true
true
f72629c9f8acea66ab3447479454246371b49923
1,440
py
Python
src/view/SqliteKeywords.py
struts2spring/sql-editor
082868dd92cbd8f0f6715f734f9ebe64032cbe4a
[ "MIT" ]
9
2018-10-15T04:57:37.000Z
2021-12-07T07:39:35.000Z
src/view/SqliteKeywords.py
struts2spring/sql-editor
082868dd92cbd8f0f6715f734f9ebe64032cbe4a
[ "MIT" ]
13
2018-10-19T11:52:44.000Z
2021-09-08T00:39:30.000Z
src/view/SqliteKeywords.py
struts2spring/sql-editor
082868dd92cbd8f0f6715f734f9ebe64032cbe4a
[ "MIT" ]
3
2018-10-25T11:08:04.000Z
2021-02-23T08:28:31.000Z
''' Created on 04-Feb-2017 @author: vijay ''' keyword = [ 'ABORT' , 'ACTION' , 'ADD' , 'AFTER' , 'ALL' , 'ALTER' , 'ANALYZE' , 'AND' , 'AS' , 'ASC' , 'ATTACH' , 'AUTOINCREMENT' , 'BEFORE' , 'BEGIN' , 'BETWEEN' , 'BY' , 'CASCADE' , 'CASE' , 'CAST' , 'CHECK' , 'COLLATE' , 'COLUMN' , 'COMMIT' , 'CONFLICT' , 'C...
10.510949
26
0.531944
keyword = [ 'ABORT' , 'ACTION' , 'ADD' , 'AFTER' , 'ALL' , 'ALTER' , 'ANALYZE' , 'AND' , 'AS' , 'ASC' , 'ATTACH' , 'AUTOINCREMENT' , 'BEFORE' , 'BEGIN' , 'BETWEEN' , 'BY' , 'CASCADE' , 'CASE' , 'CAST' , 'CHECK' , 'COLLATE' , 'COLUMN' , 'COMMIT' , 'CONFLICT' , 'CONSTRAINT' , 'CREATE' , 'CROSS' , 'CURRENT_DATE...
true
true
f72629d7ccf97ec969ccabc9f97fbd9dea75c8a0
2,228
py
Python
symbols/symbol_ssdh.py
galad-loth/LearnDescriptor
30552a699597415a13793eb85d21b5e33a296a99
[ "Apache-2.0" ]
100
2018-02-06T10:47:43.000Z
2022-02-16T01:11:30.000Z
symbols/symbol_ssdh.py
JiaxueLi/DeepMatch
30552a699597415a13793eb85d21b5e33a296a99
[ "Apache-2.0" ]
2
2019-07-24T17:22:37.000Z
2020-03-19T04:11:47.000Z
symbols/symbol_ssdh.py
JiaxueLi/DeepMatch
30552a699597415a13793eb85d21b5e33a296a99
[ "Apache-2.0" ]
21
2018-11-11T06:35:43.000Z
2020-11-25T07:52:20.000Z
# -*- coding: utf-8 -*- """ Created on Tue Mar 07 21:00:11 2017 @author: galad-loth """ import numpy as npy import mxnet as mx class HashLossLayer(mx.operator.NumpyOp): def __init__(self, w_bin,w_balance): super(HashLossLayer, self).__init__(False) self.w_bin=w_bin self.w_bala...
33.757576
96
0.612208
import numpy as npy import mxnet as mx class HashLossLayer(mx.operator.NumpyOp): def __init__(self, w_bin,w_balance): super(HashLossLayer, self).__init__(False) self.w_bin=w_bin self.w_balance=w_balance def list_arguments(self): return ['data'] ...
true
true
f72629ddc71a4e57e29e2e43fc86db58df8c4de3
23,900
py
Python
plotly_study/graph_objs/layout/ternary/aaxis/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/graph_objs/layout/ternary/aaxis/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/graph_objs/layout/ternary/aaxis/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
from plotly_study.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): # font # ---- @property def font(self): """ Sets this axis' title font. Note that the title's font used to be customized by th...
34.738372
90
0.567155
from plotly_study.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): @property def font(self): return self["font"] @font.setter def font(self, val): self["font"] = val @property...
true
true
f7262a2f0da63f591723f9cdf91c2bae40d81f7d
19,587
py
Python
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2019-03-08T19:59:05.000Z
2020-09-27T03:18:37.000Z
import os import pytest import numpy as np from pandas.compat import zip from pandas import (Series, isna, to_datetime, DatetimeIndex, Timestamp, Interval, IntervalIndex, Categorical, cut, qcut, date_range) import pandas.util.testing as tm from pandas.api.types import Categoric...
37.026465
78
0.56512
import os import pytest import numpy as np from pandas.compat import zip from pandas import (Series, isna, to_datetime, DatetimeIndex, Timestamp, Interval, IntervalIndex, Categorical, cut, qcut, date_range) import pandas.util.testing as tm from pandas.api.types import Categoric...
true
true
f7262bc097e3f3237af10e09e9f2a090111ba335
639
py
Python
app1/migrations/0029_auto_20200630_0454.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
6
2021-09-16T16:46:56.000Z
2022-02-06T13:00:08.000Z
app1/migrations/0029_auto_20200630_0454.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
null
null
null
app1/migrations/0029_auto_20200630_0454.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
1
2021-09-14T09:26:58.000Z
2021-09-14T09:26:58.000Z
# Generated by Django 3.0.6 on 2020-06-30 04:54 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app1', '0028_resources_resource_date_time'), ] operations = [ migrations.AlterField( model_name='resources', ...
25.56
98
0.613459
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app1', '0028_resources_resource_date_time'), ] operations = [ migrations.AlterField( model_name='resources', name='resource_content', f...
true
true
f7262bf49b112b6af91f95cf730a2d48d81c073f
35
py
Python
tests/components/halohome/__init__.py
nayaverdier/core
7352602e47c2de0e54a20f427559c00bad2cd7b8
[ "Apache-2.0" ]
null
null
null
tests/components/halohome/__init__.py
nayaverdier/core
7352602e47c2de0e54a20f427559c00bad2cd7b8
[ "Apache-2.0" ]
null
null
null
tests/components/halohome/__init__.py
nayaverdier/core
7352602e47c2de0e54a20f427559c00bad2cd7b8
[ "Apache-2.0" ]
null
null
null
"""HALO Home integration tests."""
17.5
34
0.685714
true
true
f7262d295996bb4520eaf83ad3c5682b56392b0c
4,741
py
Python
lapidary/Utils.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
6
2021-01-02T18:29:22.000Z
2021-10-03T18:55:01.000Z
lapidary/Utils.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
2
2021-02-15T15:34:34.000Z
2022-01-30T17:46:00.000Z
lapidary/Utils.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
3
2020-10-23T14:10:39.000Z
2021-11-16T10:00:40.000Z
import json from pathlib import Path from pprint import pprint import re, os from time import sleep class StatsFile: def __init__(self, file_path): self.current_offset = 0 self.file_size = 0 self.file_path = file_path self.cached_stats = {} self.backup_file_path = file_path....
30.986928
78
0.62645
import json from pathlib import Path from pprint import pprint import re, os from time import sleep class StatsFile: def __init__(self, file_path): self.current_offset = 0 self.file_size = 0 self.file_path = file_path self.cached_stats = {} self.backup_file_path = file_path....
true
true
f7262d782adc22a7c34947e4dd8321f0a9a524dc
767
py
Python
src/shop/migrations/0038_auto_20170323_2021.py
flokli/bornhack-website
9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d
[ "BSD-3-Clause" ]
7
2017-04-14T15:28:29.000Z
2021-09-10T09:45:38.000Z
src/shop/migrations/0038_auto_20170323_2021.py
flokli/bornhack-website
9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d
[ "BSD-3-Clause" ]
799
2016-04-28T09:31:50.000Z
2022-03-29T09:05:02.000Z
src/shop/migrations/0038_auto_20170323_2021.py
flokli/bornhack-website
9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d
[ "BSD-3-Clause" ]
35
2016-04-28T09:23:53.000Z
2021-05-02T12:36:01.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-23 19:21 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("shop", "0037_auto_20170319_2204")] operations = [ migrations.AlterField( mod...
26.448276
56
0.494133
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("shop", "0037_auto_20170319_2204")] operations = [ migrations.AlterField( model_name="order", name="payment_method", field=m...
true
true
f7262d80fffdbffc0cf859384e8240918a32ea46
31,714
py
Python
python/rz_linear/impl/RzLinearBackward.py
Jokeren/RzLinear
d318d95254cd5c3dcf814774d22dc71179450aa0
[ "MIT" ]
null
null
null
python/rz_linear/impl/RzLinearBackward.py
Jokeren/RzLinear
d318d95254cd5c3dcf814774d22dc71179450aa0
[ "MIT" ]
null
null
null
python/rz_linear/impl/RzLinearBackward.py
Jokeren/RzLinear
d318d95254cd5c3dcf814774d22dc71179450aa0
[ "MIT" ]
null
null
null
from typing import Tuple import torch import triton import triton.language as tl def rz_linear_backward_tl(input: torch.tensor, hashed_weight: torch.tensor, output_grad: torch.tensor, M: int, K: int, N: int, H: int, R3: int, R2: int, R1: int, R0: int, ...
48.124431
159
0.574037
from typing import Tuple import torch import triton import triton.language as tl def rz_linear_backward_tl(input: torch.tensor, hashed_weight: torch.tensor, output_grad: torch.tensor, M: int, K: int, N: int, H: int, R3: int, R2: int, R1: int, R0: int, ...
true
true
f7262ddf11eb39c0eb95d69c00ccbce7ab819c84
1,604
py
Python
test/lazy/test_added_diag_lazy_tensor.py
cdgreenidge/gpytorch
d4cc610963bd812052e43e3aed84fb8b2ec94aa6
[ "MIT" ]
null
null
null
test/lazy/test_added_diag_lazy_tensor.py
cdgreenidge/gpytorch
d4cc610963bd812052e43e3aed84fb8b2ec94aa6
[ "MIT" ]
null
null
null
test/lazy/test_added_diag_lazy_tensor.py
cdgreenidge/gpytorch
d4cc610963bd812052e43e3aed84fb8b2ec94aa6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import torch import unittest from gpytorch.lazy import NonLazyTensor, DiagLazyTensor, AddedDiagLazyTensor from test.lazy._lazy_tensor_test_case import LazyTensorTestCase class TestAddedDiagLazyTensor(LazyTensorTestCase, unittest.TestCase): seed = 0 should_test_sample = True def cr...
34.12766
113
0.682045
import torch import unittest from gpytorch.lazy import NonLazyTensor, DiagLazyTensor, AddedDiagLazyTensor from test.lazy._lazy_tensor_test_case import LazyTensorTestCase class TestAddedDiagLazyTensor(LazyTensorTestCase, unittest.TestCase): seed = 0 should_test_sample = True def create_lazy_tensor(self)...
true
true
f7262e47ccd52c7b99efed84275928088089c827
1,307
py
Python
rally/plugins/openstack/scenarios/monasca/metrics.py
mail2nsrajesh/rally
d8995226fe75c573d6d64c7ade8a4ceca0758366
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/monasca/metrics.py
mail2nsrajesh/rally
d8995226fe75c573d6d64c7ade8a4ceca0758366
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/monasca/metrics.py
mail2nsrajesh/rally
d8995226fe75c573d6d64c7ade8a4ceca0758366
[ "Apache-2.0" ]
null
null
null
# 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 applicable law or agreed to in...
35.324324
78
0.722265
from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.monasca import utils as monascautils from rally.task import validation @validation.add("required_services", services=[consts.Service.MONASCA]) @validation.add("required_platform...
true
true
f7262f0f2023d57b85b341ec89f31256cc3f6c36
4,563
py
Python
onmt/models/model_saver.py
UKPLab/emnlp2019-dualgraph
da38be675c392af43db436e3b2f0c8ff355c04f9
[ "MIT" ]
25
2019-09-05T07:57:45.000Z
2021-12-08T01:59:57.000Z
onmt/models/model_saver.py
15071347094/emnlp2019-dualgraph
0c58fb7f3ad3b9da3b92b2d2841558807fc79fd0
[ "MIT" ]
2
2020-11-21T00:41:44.000Z
2020-11-25T00:36:19.000Z
onmt/models/model_saver.py
15071347094/emnlp2019-dualgraph
0c58fb7f3ad3b9da3b92b2d2841558807fc79fd0
[ "MIT" ]
6
2020-01-27T22:54:56.000Z
2020-11-24T02:48:05.000Z
import os import torch import torch.nn as nn from collections import deque from onmt.utils.logging import logger from copy import deepcopy def build_model_saver(model_opt, opt, model, fields, optim): model_saver = ModelSaver(opt.save_model, model, model_...
31.040816
79
0.570896
import os import torch import torch.nn as nn from collections import deque from onmt.utils.logging import logger from copy import deepcopy def build_model_saver(model_opt, opt, model, fields, optim): model_saver = ModelSaver(opt.save_model, model, model_...
true
true
f7262f809657c84b116f0216cd007d0f3032680e
393
py
Python
CTForces/wsgi.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
null
null
null
CTForces/wsgi.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
6
2021-10-01T14:18:34.000Z
2021-10-01T14:19:17.000Z
CTForces/wsgi.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
null
null
null
""" WSGI config for CTForces 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.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
23.117647
78
0.78626
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CTForces.settings") application = get_wsgi_application()
true
true
f7262f94e75074ce3f184e5fc532f018ccd981b9
1,224
py
Python
6.0-expresiones-regulares/src/spider.py
zehemz/clases-python-101
633cb5f0cbc85e64e242514f0394754a5bed0513
[ "Apache-2.0" ]
null
null
null
6.0-expresiones-regulares/src/spider.py
zehemz/clases-python-101
633cb5f0cbc85e64e242514f0394754a5bed0513
[ "Apache-2.0" ]
null
null
null
6.0-expresiones-regulares/src/spider.py
zehemz/clases-python-101
633cb5f0cbc85e64e242514f0394754a5bed0513
[ "Apache-2.0" ]
null
null
null
''' Created on Jul 27, 2016 @author: zehemz ''' from lxml import html from lxml import etree from io import StringIO, BytesIO from copy import deepcopy import requests import re import pickle def writeList(list): file = open("websScrapeadas.txt", "wb") for element in list: file.write(element+ '\n') ...
21.473684
58
0.631536
from lxml import html from lxml import etree from io import StringIO, BytesIO from copy import deepcopy import requests import re import pickle def writeList(list): file = open("websScrapeadas.txt", "wb") for element in list: file.write(element+ '\n') file.close() BASE_URL = 'http://www.clarin.com...
true
true
f7263292ff3ace28bdfe5eb80b3b1e74c3e9814c
945
py
Python
commands/help.py
DevStrikerTech/Clash-of-Clans-Band-Bot
472c12feeefe053247458c133ee822b16e7537e1
[ "MIT" ]
19
2021-01-17T02:09:42.000Z
2021-01-27T00:49:42.000Z
commands/help.py
DevStrikerTech/Clash-of-Clans-Band-Bot
472c12feeefe053247458c133ee822b16e7537e1
[ "MIT" ]
null
null
null
commands/help.py
DevStrikerTech/Clash-of-Clans-Band-Bot
472c12feeefe053247458c133ee822b16e7537e1
[ "MIT" ]
20
2021-01-26T19:24:23.000Z
2022-03-10T14:02:49.000Z
from routes.band import write_comment class Help: def __init__(self, get_all_post): self.get_all_post = get_all_post self.help_information() def help_information(self): get_all_post = self.get_all_post post_response_content = get_all_post['result_data']['items'] for i...
39.375
94
0.538624
from routes.band import write_comment class Help: def __init__(self, get_all_post): self.get_all_post = get_all_post self.help_information() def help_information(self): get_all_post = self.get_all_post post_response_content = get_all_post['result_data']['items'] for i...
true
true
f726331ddb1b01708d32c521d8e3e991bbc3909a
2,338
py
Python
kubragen2/build.py
RangelReale/kubragen2
2118f1429a9b9da937582db1f41d4f12b78773e2
[ "MIT" ]
1
2022-02-14T07:31:57.000Z
2022-02-14T07:31:57.000Z
kubragen2/build.py
RangelReale/kubragen2
2118f1429a9b9da937582db1f41d4f12b78773e2
[ "MIT" ]
null
null
null
kubragen2/build.py
RangelReale/kubragen2
2118f1429a9b9da937582db1f41d4f12b78773e2
[ "MIT" ]
null
null
null
import copy from typing import Any, MutableMapping, MutableSequence, Union from .data import DataGetValue, Data, BaseData from .exception import InvalidOperationError class DataBuilder: def build_prop(self, data: Union[MutableMapping, MutableSequence], key: Any) -> None: """ Cleanup instances of ...
37.709677
117
0.60864
import copy from typing import Any, MutableMapping, MutableSequence, Union from .data import DataGetValue, Data, BaseData from .exception import InvalidOperationError class DataBuilder: def build_prop(self, data: Union[MutableMapping, MutableSequence], key: Any) -> None: if isinstance(data[key], BaseData...
true
true
f72633913ec545cd03a516a113ee6f370da07cd3
663
py
Python
blogsrc/manage.py
mesutcifci/personal-blog
11fca60e1dc628617c00bb01d55d2fac71d60603
[ "MIT" ]
1
2020-12-12T01:02:56.000Z
2020-12-12T01:02:56.000Z
blogsrc/manage.py
mesutcifci/personal-blog
11fca60e1dc628617c00bb01d55d2fac71d60603
[ "MIT" ]
null
null
null
blogsrc/manage.py
mesutcifci/personal-blog
11fca60e1dc628617c00bb01d55d2fac71d60603
[ "MIT" ]
1
2020-12-11T08:50:14.000Z
2020-12-11T08:50:14.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogsrc.settings') try: from django.core.management import execute_from_command_line except Impo...
28.826087
73
0.678733
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogsrc.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
f726350f5bcbf20607a3fc3fd9daee81853b87c0
5,551
py
Python
enaml/qt/qt_color_dialog.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
11
2015-03-14T14:30:51.000Z
2022-03-15T13:01:44.000Z
enaml/qt/qt_color_dialog.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
3
2015-01-31T11:12:56.000Z
2022-03-14T00:53:25.000Z
enaml/qt/qt_color_dialog.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
4
2015-01-27T01:56:14.000Z
2021-02-23T07:21:20.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
30.168478
79
0.558278
from atom.api import Int, Typed from enaml.colors import Color from enaml.widgets.color_dialog import ProxyColorDialog from .QtCore import Signal from .QtGui import QColor, QColorDialog from .qt_toolkit_dialog import QtToolkitDialog def color_from_qcolor(q): if not q.isValid(): return None r...
true
true
f726390a2fc316670d945fcf0adc8da8f7980de8
5,007
py
Python
JSONLibrary/JSONLibraryKeywords.py
Rezzas/robotframework-jsonlibrary
d0db2b20f729e69e37364527ae60f7be22dff1d4
[ "Unlicense" ]
null
null
null
JSONLibrary/JSONLibraryKeywords.py
Rezzas/robotframework-jsonlibrary
d0db2b20f729e69e37364527ae60f7be22dff1d4
[ "Unlicense" ]
null
null
null
JSONLibrary/JSONLibraryKeywords.py
Rezzas/robotframework-jsonlibrary
d0db2b20f729e69e37364527ae60f7be22dff1d4
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- import json import os.path from robot.api import logger from robot.api.deco import keyword from jsonpath_rw import Index, Fields #from jsonpath_rw_ext import parse from jsonpath_ng.ext import parse from .version import VERSION __author__ = 'Traitanit Huangsri' __email__ = 'traitanit.hua@gmail.c...
32.512987
113
0.607749
import json import os.path from robot.api import logger from robot.api.deco import keyword from jsonpath_rw import Index, Fields from jsonpath_ng.ext import parse from .version import VERSION __author__ = 'Traitanit Huangsri' __email__ = 'traitanit.hua@gmail.com' __version__ = VERSION class JSONLibraryKeywords(obj...
true
true
f7263995555ef87a94a1d3d6fc18898696a9f9f5
4,522
py
Python
plugin/entity/zettel.py
tbouska/mkdocs-zettelkasten
3638ee8028462e98aa088dd075a929e11f6fe882
[ "MIT" ]
null
null
null
plugin/entity/zettel.py
tbouska/mkdocs-zettelkasten
3638ee8028462e98aa088dd075a929e11f6fe882
[ "MIT" ]
7
2021-11-25T07:59:16.000Z
2021-11-29T18:37:29.000Z
plugin/entity/zettel.py
tbouska/mkdocs-zettelkasten
3638ee8028462e98aa088dd075a929e11f6fe882
[ "MIT" ]
null
null
null
import datetime import os import re import yaml from pathlib import Path from plugin.patterns import WIKI_LINK, MD_LINK from plugin.gitutil import GitUtil class Zettel: def __init__(self, abs_src_path): self.id = 0 self.title = "" self.path = abs_src_path self.backlinks = [] ...
31.84507
88
0.534277
import datetime import os import re import yaml from pathlib import Path from plugin.patterns import WIKI_LINK, MD_LINK from plugin.gitutil import GitUtil class Zettel: def __init__(self, abs_src_path): self.id = 0 self.title = "" self.path = abs_src_path self.backlinks = [] ...
true
true
f72639a5ff51641e1d986f7c27245a78928e246f
4,440
py
Python
src/utils/data_loader.py
TheBlueHawk/RANLP21-70
3d329a6d385fac4e8664cb1bb88a29411befb767
[ "MIT" ]
null
null
null
src/utils/data_loader.py
TheBlueHawk/RANLP21-70
3d329a6d385fac4e8664cb1bb88a29411befb767
[ "MIT" ]
null
null
null
src/utils/data_loader.py
TheBlueHawk/RANLP21-70
3d329a6d385fac4e8664cb1bb88a29411befb767
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author : William # @Project : TextGAN-william # @FileName : data_loader.py # @Time : Created at 2019-05-31 # @Blog : http://zhiweil.ml/ # @Description : # Copyrights (C) 2018. All Rights Reserved. import random from torch.utils.data import Dataset, DataLoader...
33.89313
100
0.611486
import random from torch.utils.data import Dataset, DataLoader from utils.text_process import * class GANDataset(Dataset): def __init__(self, data): self.data = data def __getitem__(self, index): return self.data[index] def __len__(self): return len(self.data) class G...
true
true
f7263b27e2f8e5f7ffa8f4a9687f2edbb569a9d1
598
py
Python
plotly/validators/mesh3d/colorbar/tickfont/_family.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/mesh3d/colorbar/tickfont/_family.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/mesh3d/colorbar/tickfont/_family.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='family', parent_name='mesh3d.colorbar.tickfont', **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_...
28.47619
68
0.602007
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='family', parent_name='mesh3d.colorbar.tickfont', **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_...
true
true
f7263b5df5fb3177603ae56acb9d953605d88e9b
1,670
py
Python
dtypes/radix_sort.py
jay-tyler/data-structures
b4f4bcb091cf4be4c4cc29d8a687af3d063090f5
[ "MIT" ]
2
2015-08-25T02:51:47.000Z
2019-11-03T20:00:16.000Z
dtypes/radix_sort.py
jay-tyler/data-structures
b4f4bcb091cf4be4c4cc29d8a687af3d063090f5
[ "MIT" ]
9
2015-09-19T20:51:14.000Z
2015-09-28T07:06:50.000Z
dtypes/radix_sort.py
jay-tyler/data-structures
b4f4bcb091cf4be4c4cc29d8a687af3d063090f5
[ "MIT" ]
1
2020-04-22T21:24:36.000Z
2020-04-22T21:24:36.000Z
def radsort(unslist): """Returns a sorted list. Accepts only a list containing positive integers.""" # find max for iterative solution maxval = max(unslist) ntimes = len(str(maxval)) slist = unslist[:] for n in range(ntimes): # Making radix bins bins = [[] for _ in range(10...
27.377049
77
0.58982
def radsort(unslist): """Returns a sorted list. Accepts only a list containing positive integers.""" maxval = max(unslist) ntimes = len(str(maxval)) slist = unslist[:] for n in range(ntimes): bins = [[] for _ in range(10)] for i, item in enumerate(slist)...
false
true
f7263ccf5a3a003b21440cf38813ca5d254016b4
15,637
py
Python
meshrcnn/modeling/roi_heads/roi_heads.py
hsk9767/mesh_rcnn_copy
6dd4d9ea8af33c03a084e34c7d16eeaddfe924ae
[ "BSD-3-Clause" ]
7
2020-03-06T20:49:36.000Z
2022-03-09T11:09:31.000Z
meshrcnn/modeling/roi_heads/roi_heads.py
hsk9767/mesh_rcnn_copy
6dd4d9ea8af33c03a084e34c7d16eeaddfe924ae
[ "BSD-3-Clause" ]
null
null
null
meshrcnn/modeling/roi_heads/roi_heads.py
hsk9767/mesh_rcnn_copy
6dd4d9ea8af33c03a084e34c7d16eeaddfe924ae
[ "BSD-3-Clause" ]
2
2020-04-14T02:14:25.000Z
2020-05-06T14:35:41.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Dict import torch from detectron2.layers import ShapeSpec, cat from detectron2.modeling import ROI_HEADS_REGISTRY from detectron2.modeling.poolers import ROIPooler from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutput...
42.841096
105
0.616039
from typing import Dict import torch from detectron2.layers import ShapeSpec, cat from detectron2.modeling import ROI_HEADS_REGISTRY from detectron2.modeling.poolers import ROIPooler from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs from detectron2.modeling.roi_heads.roi_heads i...
true
true
f7263d836807e256e08d31435e58c1ede32bac68
718
py
Python
Class1/ex7_YAML_JSON_read.py
karimjamali/Class-1
64a97e143dd0a9bd0e177481a6a858638bfd3766
[ "Apache-2.0" ]
null
null
null
Class1/ex7_YAML_JSON_read.py
karimjamali/Class-1
64a97e143dd0a9bd0e177481a6a858638bfd3766
[ "Apache-2.0" ]
null
null
null
Class1/ex7_YAML_JSON_read.py
karimjamali/Class-1
64a97e143dd0a9bd0e177481a6a858638bfd3766
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env/python import yaml import json from pprint import pprint def output_format(my_list, my_str): # Make the output format easier to read # ''' print "Converting from " , my_str ,"FORMAT" print "#" * 30 pprint (my_list) def main(): #my_dict={'karim':'32','yasmine':'26','amine'...
17.512195
72
0.650418
import yaml import json from pprint import pprint def output_format(my_list, my_str): print "Converting from " , my_str ,"FORMAT" print "#" * 30 pprint (my_list) def main(): #my_dict={'karim':'32','yasmine':'26','amine':'1','dad':'76','mum':'67'} yaml_output="yaml_output.yml" jso...
false
true
f7263d929de143ba1a7546baa19c897e7ec8745c
18,460
py
Python
cybergis_compute_client/CyberGISCompute.py
alexandermichels/cybergis-compute-python-sdk
6e7790a627368d0031582fe44a58fdb514868950
[ "Apache-2.0" ]
null
null
null
cybergis_compute_client/CyberGISCompute.py
alexandermichels/cybergis-compute-python-sdk
6e7790a627368d0031582fe44a58fdb514868950
[ "Apache-2.0" ]
null
null
null
cybergis_compute_client/CyberGISCompute.py
alexandermichels/cybergis-compute-python-sdk
6e7790a627368d0031582fe44a58fdb514868950
[ "Apache-2.0" ]
null
null
null
""" This module exposes CyberGISCompute class which creates a CyberGISCompute object that serves as an entry point to the CyberGISX environment from a Python/Jupyter notebook. All interactions with the High Performance Computing (HPC) backend are performed using this object. Example: cybergis = CyberGISCompute...
41.483146
224
0.551842
from .Client import * from .Job import * from .UI import * import base64 import os from IPython.display import display, Markdown, Javascript class CyberGISCompute: jupyterhubHost = None job = None def __init__(self, url="cgjobsup.cigi.illinois.edu", port=443, protocol='HTTPS', suffix="", isJupyter...
true
true
f7263dc3cc4e9a52a26c9b3cc1c629cd0270750c
5,184
py
Python
cvat/apps/dataset_manager/tests/test_annotation.py
TOsmanov/cvat
71f94afd769d84c3fb3e3c720e26d927a47bb27b
[ "Intel", "MIT" ]
1
2019-12-09T13:53:36.000Z
2019-12-09T13:53:36.000Z
cvat/apps/dataset_manager/tests/test_annotation.py
TOsmanov/cvat
71f94afd769d84c3fb3e3c720e26d927a47bb27b
[ "Intel", "MIT" ]
null
null
null
cvat/apps/dataset_manager/tests/test_annotation.py
TOsmanov/cvat
71f94afd769d84c3fb3e3c720e26d927a47bb27b
[ "Intel", "MIT" ]
null
null
null
# Copyright (C) 2020 Intel Corporation # # SPDX-License-Identifier: MIT from cvat.apps.dataset_manager.annotation import TrackManager from unittest import TestCase class TrackManagerTest(TestCase): def _check_interpolation(self, track): interpolated = TrackManager.get_interpolated_shapes(track, 0, 7) ...
30.494118
72
0.342593
from cvat.apps.dataset_manager.annotation import TrackManager from unittest import TestCase class TrackManagerTest(TestCase): def _check_interpolation(self, track): interpolated = TrackManager.get_interpolated_shapes(track, 0, 7) self.assertEqual(len(interpolated), 6) self.assertTrue...
true
true
f7263deac95f43b73909d3038f4d4488fa2639d4
997
py
Python
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
3
2021-12-15T04:58:18.000Z
2022-02-06T12:15:37.000Z
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
null
null
null
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
1
2019-01-02T14:38:50.000Z
2019-01-02T14:38:50.000Z
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_modes', '0007_coursemode_bulk_sku'), ('bulk_email', '0005_move_target_data'), ] operations = [ migrations.CreateModel( name='CourseModeTarget', fields...
38.346154
214
0.609829
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_modes', '0007_coursemode_bulk_sku'), ('bulk_email', '0005_move_target_data'), ] operations = [ migrations.CreateModel( name='CourseModeTarget', fields...
true
true
f7263e61252a6c08d784082742fd67b173531d8d
195
py
Python
examples/PythonToDo/models/domain_objects/UserModel.py
PqES/ArchPython
142b02f2c7fff9a3fb375a338af2de2e688f4004
[ "MIT" ]
6
2020-07-13T23:41:49.000Z
2022-02-01T21:02:46.000Z
examples/PythonToDo/models/domain_objects/UserModel.py
LimaEduardo/ArchPython
5a81d0c79d7933f06c26175b1958d604b4c248df
[ "MIT" ]
null
null
null
examples/PythonToDo/models/domain_objects/UserModel.py
LimaEduardo/ArchPython
5a81d0c79d7933f06c26175b1958d604b4c248df
[ "MIT" ]
1
2020-09-07T13:04:25.000Z
2020-09-07T13:04:25.000Z
class UserModel: def __init__(self, name = None, login = None, password = None): self.id = None self.name = name self.login = login self.password = password
21.666667
67
0.584615
class UserModel: def __init__(self, name = None, login = None, password = None): self.id = None self.name = name self.login = login self.password = password
true
true
f7263f6c62c388fe49d7af215f78c0b7c0576dd0
191
py
Python
chatbot_tutorial/urls.py
abdulmuizzf/django-bot-server-tutorial
3f9d69bb848ed70e664503aac2c968416b7a891d
[ "MIT" ]
null
null
null
chatbot_tutorial/urls.py
abdulmuizzf/django-bot-server-tutorial
3f9d69bb848ed70e664503aac2c968416b7a891d
[ "MIT" ]
null
null
null
chatbot_tutorial/urls.py
abdulmuizzf/django-bot-server-tutorial
3f9d69bb848ed70e664503aac2c968416b7a891d
[ "MIT" ]
null
null
null
from django.conf.urls import include from django.urls import path from django.contrib import admin urlpatterns = [ path('', include('chat.urls')), path('admin/', admin.site.urls), ]
21.222222
36
0.706806
from django.conf.urls import include from django.urls import path from django.contrib import admin urlpatterns = [ path('', include('chat.urls')), path('admin/', admin.site.urls), ]
true
true
f7263fda03fe7c55336dc033a79f684a23583ecb
3,647
py
Python
circular_cylinder/figures/plot.py
J-Massey/postproc
4552b0ad79072f5d217cf62632c08617ea3d2d82
[ "MIT" ]
null
null
null
circular_cylinder/figures/plot.py
J-Massey/postproc
4552b0ad79072f5d217cf62632c08617ea3d2d82
[ "MIT" ]
null
null
null
circular_cylinder/figures/plot.py
J-Massey/postproc
4552b0ad79072f5d217cf62632c08617ea3d2d82
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import seaborn as sns import numpy as np from itertools import product import os from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import ticker, cm from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.ticker import FormatStrFormatter from matplot...
34.084112
111
0.619139
import matplotlib.pyplot as plt import seaborn as sns import numpy as np from itertools import product import os from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import ticker, cm from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.ticker import FormatStrFormatter from matplot...
true
true
f7263ff6a3d742c589e550267ff561f470351035
36,853
py
Python
python/istio_api/mesh/v1alpha1/config_pb2.py
selmanj/api
6166b45d34e2ef8915225b2f849855b5d28fc4f9
[ "Apache-2.0" ]
null
null
null
python/istio_api/mesh/v1alpha1/config_pb2.py
selmanj/api
6166b45d34e2ef8915225b2f849855b5d28fc4f9
[ "Apache-2.0" ]
null
null
null
python/istio_api/mesh/v1alpha1/config_pb2.py
selmanj/api
6166b45d34e2ef8915225b2f849855b5d28fc4f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mesh/v1alpha1/config.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from...
52.57204
4,551
0.7674
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobu...
true
true
f72640bdf780be7bf1cfaf80fbf1f6bf7bf0616f
1,758
py
Python
fairseq/modules/fairseq_dropout.py
zhengzx-nlp/REDER
7035e089e4d30b8090a2c3caa937b1e0ba27cedc
[ "MIT" ]
18
2021-11-14T06:34:26.000Z
2022-03-19T07:18:08.000Z
fairseq/modules/fairseq_dropout.py
zhengzx-nlp/REDER
7035e089e4d30b8090a2c3caa937b1e0ba27cedc
[ "MIT" ]
1
2021-12-03T07:23:36.000Z
2021-12-10T08:32:36.000Z
fairseq/modules/fairseq_dropout.py
zhengzx-nlp/REDER
7035e089e4d30b8090a2c3caa937b1e0ba27cedc
[ "MIT" ]
2
2021-12-10T14:20:09.000Z
2022-01-08T09:39:27.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging from typing import List, Optional import torch.nn as nn import torch.nn.functional as F logger = logging.getLogger(__name__)...
31.392857
83
0.600683
import logging from typing import List, Optional import torch.nn as nn import torch.nn.functional as F logger = logging.getLogger(__name__) class FairseqDropout(nn.Module): def __init__(self, p, module_name=None): super().__init__() self.p = p self.module_name = module_name ...
true
true
f726415ccf6a26910901b63bb701354b030b9ab9
4,077
py
Python
qa/rpc-tests/test_script_address2.py
jalcantara1983/atixcoin
d3e941bf1dd911c224bb66a3e82bfecf1a5fefe6
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
jalcantara1983/atixcoin
d3e941bf1dd911c224bb66a3e82bfecf1a5fefe6
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
jalcantara1983/atixcoin
d3e941bf1dd911c224bb66a3e82bfecf1a5fefe6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test new Atixcoin multisig prefix functionality. # from test_framework.test_framework import Bitcoin...
40.366337
93
0.649497
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import decimal class ScriptAddress2Test(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 3 self.setup_clean_chain = False def setup_network(self): ...
true
true
f7264187ecb771c3ebeca5e866aa88ceae28828f
1,923
py
Python
src/tfchain/polyfill/encoding/ipaddr.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
null
null
null
src/tfchain/polyfill/encoding/ipaddr.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
201
2019-05-20T15:06:05.000Z
2019-07-16T12:48:59.000Z
src/tfchain/polyfill/encoding/ipaddr.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
1
2019-12-20T21:45:39.000Z
2019-12-20T21:45:39.000Z
from tfchain.polyfill.encoding.jsmods.ipaddrjs import api as ipaddrjs import tfchain.polyfill.array as jsarr class IPAddress: def __init__(self, value): if isinstance(value, str): v = None err = None __pragma__("js", "{}", """ try { v = ipaddr...
27.869565
110
0.481019
from tfchain.polyfill.encoding.jsmods.ipaddrjs import api as ipaddrjs import tfchain.polyfill.array as jsarr class IPAddress: def __init__(self, value): if isinstance(value, str): v = None err = None __pragma__("js", "{}", """ try { v = ipaddr...
true
true
f7264223ea3b2e4a8450d6eba91beec89e57b290
15,290
py
Python
tensorflow/network.py
EricPedley/FCRN-DepthPrediction
93aaed329e9e071c6d5c5a59e77a73a09684b156
[ "BSD-2-Clause" ]
null
null
null
tensorflow/network.py
EricPedley/FCRN-DepthPrediction
93aaed329e9e071c6d5c5a59e77a73a09684b156
[ "BSD-2-Clause" ]
null
null
null
tensorflow/network.py
EricPedley/FCRN-DepthPrediction
93aaed329e9e071c6d5c5a59e77a73a09684b156
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior() # ---------------------------------------------------------------------------------- # Commonly used layers and operations based on ethereon's implementation # https://github.com/ethereon/caffe-tensorflow # Slight modifications may apply. F...
39.205128
133
0.548136
import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior() # https://github.com/ethereon/caffe-tensorflow # Slight modifications may apply. FCRN-specific operations have also been appended. # ---------------------------------------------------------------------------------- # Thanks to *Helisa Dh...
true
true
f726433b3c15d6223a75c1dacfab5a53d9b7791b
350
py
Python
app/__init__.py
ppyvras/flask_tutorial
2c73d32c33fb80ef59bee8753500220afdd91cee
[ "MIT" ]
null
null
null
app/__init__.py
ppyvras/flask_tutorial
2c73d32c33fb80ef59bee8753500220afdd91cee
[ "MIT" ]
null
null
null
app/__init__.py
ppyvras/flask_tutorial
2c73d32c33fb80ef59bee8753500220afdd91cee
[ "MIT" ]
null
null
null
from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager app = Flask(__name__) app.config.from_object(Config) db = SQLAlchemy(app) migrate = Migrate(app, db) login = LoginManager(app) login.login_view = 'login' f...
20.588235
39
0.805714
from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager app = Flask(__name__) app.config.from_object(Config) db = SQLAlchemy(app) migrate = Migrate(app, db) login = LoginManager(app) login.login_view = 'login' f...
true
true
f7264465fb955d98f2220ac0a57a91bd63fff024
1,331
py
Python
xlsxwriter/test/comparison/test_cond_format06.py
eddiechapman/XlsxWriter
c636117ab30e64e4b7b824c9105595c42887c2c9
[ "BSD-2-Clause-FreeBSD" ]
2,766
2015-01-02T17:36:42.000Z
2022-03-31T09:23:30.000Z
xlsxwriter/test/comparison/test_cond_format06.py
xiaolanmeng86/XlsxWriter
6c3ea23a410e8216eab8f5751e5544ffb444b3da
[ "BSD-2-Clause-FreeBSD" ]
683
2015-01-03T09:55:02.000Z
2022-03-31T07:18:15.000Z
xlsxwriter/test/comparison/test_cond_format06.py
xiaolanmeng86/XlsxWriter
6c3ea23a410e8216eab8f5751e5544ffb444b3da
[ "BSD-2-Clause-FreeBSD" ]
636
2015-01-05T01:57:08.000Z
2022-03-25T18:42:41.000Z
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
26.62
88
0.496619
true
true
f7264528198aeeae3d454c3855027f09c988ee7a
1,793
py
Python
_unittests/ut_special/test_tsp_kohonen.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_unittests/ut_special/test_tsp_kohonen.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_unittests/ut_special/test_tsp_kohonen.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
""" @brief test log(time=10s) """ import os import sys import unittest from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import get_temp_folder, is_travis_or_appveyor try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( ...
28.015625
72
0.591746
import os import sys import unittest from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import get_temp_folder, is_travis_or_appveyor try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], ...
true
true
f7264580ec84ba5145f46f58d0d1265932dadf9b
3,505
py
Python
parler/tests/test_query_count.py
Yiling-J/django-parler
23b8ae3348c05d4dded729389cc8129cd03d8c5d
[ "Apache-2.0" ]
1
2020-01-25T05:23:00.000Z
2020-01-25T05:23:00.000Z
parler/tests/test_query_count.py
Yiling-J/django-parler
23b8ae3348c05d4dded729389cc8129cd03d8c5d
[ "Apache-2.0" ]
3
2019-11-02T05:52:07.000Z
2020-06-05T21:56:17.000Z
parler/tests/test_query_count.py
Yiling-J/django-parler
23b8ae3348c05d4dded729389cc8129cd03d8c5d
[ "Apache-2.0" ]
2
2019-06-10T21:45:05.000Z
2019-07-10T17:16:35.000Z
import datetime as dt from django.core.cache import cache from django.utils import translation from django.utils.timezone import now from parler import appsettings from .utils import AppTestCase, override_parler_settings from .testapp.models import SimpleModel, DateTimeModel class QueryCountTests(AppTestCase): ...
34.029126
107
0.633666
import datetime as dt from django.core.cache import cache from django.utils import translation from django.utils.timezone import now from parler import appsettings from .utils import AppTestCase, override_parler_settings from .testapp.models import SimpleModel, DateTimeModel class QueryCountTests(AppTestCase): ...
true
true
f72645db2eb553529b0393f9bc851543b325fd14
3,880
py
Python
webots_ros2_universal_robot/webots_ros2_universal_robot/follow_joint_trajectory_client.py
TaoYibo1866/webots_ros2
a72c164825663cebbfd27e0649ea51d3abf9bbed
[ "Apache-2.0" ]
null
null
null
webots_ros2_universal_robot/webots_ros2_universal_robot/follow_joint_trajectory_client.py
TaoYibo1866/webots_ros2
a72c164825663cebbfd27e0649ea51d3abf9bbed
[ "Apache-2.0" ]
6
2019-08-09T08:04:37.000Z
2019-08-14T15:05:35.000Z
webots_ros2_universal_robot/webots_ros2_universal_robot/follow_joint_trajectory_client.py
omichel/webots_ros2
5b59d0b1fbeff4c3f75a447bd152c10853f4691b
[ "Apache-2.0" ]
null
null
null
# Copyright 1996-2021 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
40
123
0.698711
from action_msgs.msg import GoalStatus from control_msgs.action import FollowJointTrajectory from control_msgs.msg import JointTrajectoryControllerState from trajectory_msgs.msg import JointTrajectoryPoint from builtin_interfaces.msg import Duration import rclpy from rclpy.action import ActionClient fro...
true
true
f726466b10a38e592d89b680d7031e520070c599
3,697
py
Python
packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py
lego0901/pytea
8ede650def2e68f4610ba816451d8b9e28f09f76
[ "MIT" ]
12
2021-09-13T18:31:09.000Z
2022-03-31T12:10:28.000Z
packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py
lego0901/pytea
8ede650def2e68f4610ba816451d8b9e28f09f76
[ "MIT" ]
5
2021-12-01T04:34:07.000Z
2022-01-28T08:28:18.000Z
packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py
lego0901/pytea
8ede650def2e68f4610ba816451d8b9e28f09f76
[ "MIT" ]
3
2022-01-18T10:56:05.000Z
2022-01-28T01:46:43.000Z
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
32.147826
117
0.712199
import argparse import os import torch from transformers import ( CONFIG_NAME, WEIGHTS_NAME, XLNetConfig, XLNetForQuestionAnswering, XLNetForSequenceClassification, XLNetLMHeadModel, load_tf_weights_in_xlnet, ) from transformers.utils import logging GLUE_TASKS_NUM_LABELS ...
true
true
f72646ac93dd6fd9d9c8c4a8152f818f740a9035
2,689
py
Python
tests/test_parsers.py
tos-kamiya/d2vg
72ce1cb900a219f9d7bc3982e234a4498be52d5a
[ "BSD-2-Clause" ]
3
2021-11-17T08:07:50.000Z
2021-12-19T04:35:15.000Z
tests/test_parsers.py
tos-kamiya/d2vg
72ce1cb900a219f9d7bc3982e234a4498be52d5a
[ "BSD-2-Clause" ]
null
null
null
tests/test_parsers.py
tos-kamiya/d2vg
72ce1cb900a219f9d7bc3982e234a4498be52d5a
[ "BSD-2-Clause" ]
null
null
null
import unittest from pathlib import Path import re import tempfile import d2vg class ParserTest(unittest.TestCase): def test_text_file(self): with tempfile.TemporaryDirectory() as tempdir: p = Path(tempdir) / "a.txt" content = "1st line.\n2nd line.\n" p.write_text(con...
34.474359
149
0.61138
import unittest from pathlib import Path import re import tempfile import d2vg class ParserTest(unittest.TestCase): def test_text_file(self): with tempfile.TemporaryDirectory() as tempdir: p = Path(tempdir) / "a.txt" content = "1st line.\n2nd line.\n" p.write_text(con...
true
true
f72646f0022b7bc1e1b506d20a786c3a402e9a98
422
py
Python
blog/migrations/0008_post_snippet.py
cs130-w21/15
3e0bfd3662e930e5b67416939a976029ddad6436
[ "Apache-2.0" ]
null
null
null
blog/migrations/0008_post_snippet.py
cs130-w21/15
3e0bfd3662e930e5b67416939a976029ddad6436
[ "Apache-2.0" ]
13
2021-01-14T06:09:55.000Z
2021-03-08T08:56:36.000Z
blog/migrations/0008_post_snippet.py
cs130-w21/15
3e0bfd3662e930e5b67416939a976029ddad6436
[ "Apache-2.0" ]
1
2021-04-07T18:20:21.000Z
2021-04-07T18:20:21.000Z
# Generated by Django 3.1.5 on 2021-03-05 05:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0007_auto_20210305_0539'), ] operations = [ migrations.AddField( model_name='post', name='snippet', ...
22.210526
92
0.606635
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0007_auto_20210305_0539'), ] operations = [ migrations.AddField( model_name='post', name='snippet', field=models.CharField(default='Click link ...
true
true
f72646f6d0c53d7d935da1ea9870115892eb14ad
4,209
py
Python
ALGOs/LearningRate_Decay.py
iamharshit/ML_works
b0bb53c5a60312719d15e25b727c54cbab65b4af
[ "MIT" ]
1
2016-11-29T04:28:09.000Z
2016-11-29T04:28:09.000Z
ALGOs/LearningRate_Decay.py
iamharshit/ML_works
b0bb53c5a60312719d15e25b727c54cbab65b4af
[ "MIT" ]
null
null
null
ALGOs/LearningRate_Decay.py
iamharshit/ML_works
b0bb53c5a60312719d15e25b727c54cbab65b4af
[ "MIT" ]
null
null
null
#1. class LR_LinearDecay(): ''' Function : -Learning rate decay linearly(a constant factor) after each epoch -Eg. LR= 5, 5.8, 5.6, 5.4, ........ ''' def __init__(self, min_lr=1e-5, max_lr=1e-2, epochs=None): super().__init__() self.min_lr = min_lr ...
30.280576
128
0.549062
class LR_LinearDecay(): ''' Function : -Learning rate decay linearly(a constant factor) after each epoch -Eg. LR= 5, 5.8, 5.6, 5.4, ........ ''' def __init__(self, min_lr=1e-5, max_lr=1e-2, epochs=None): super().__init__() self.min_lr = min_lr ...
false
true
f7264824f603075011c4ae3509f47ec148f2cec0
12,224
py
Python
tests/test_dates.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
tests/test_dates.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
tests/test_dates.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
# coding: utf-8 import pytest import mock import workdays import datetime import dmutils.dates as dates_package class TestPublishingDates(): def test_get_publishing_dates_formats_time(self): with mock.patch('dmutils.dates.datetime') as mock_date: mock_date.utcnow.return_value = datetime.dateti...
49.489879
115
0.641525
import pytest import mock import workdays import datetime import dmutils.dates as dates_package class TestPublishingDates(): def test_get_publishing_dates_formats_time(self): with mock.patch('dmutils.dates.datetime') as mock_date: mock_date.utcnow.return_value = datetime.datetime(2015, 5, 22,...
true
true
f726488d8cbb6bc2a5748013e73cd7f6e42b06b9
20,570
py
Python
sagemaker-debugger/model_specific_realtime_analysis/bert_attention_head_view/entry_point/data.py
jpmarques19/tensorflwo-test
0ff8b06e0415075c7269820d080284a42595bb2e
[ "Apache-2.0" ]
2,327
2020-03-01T09:47:34.000Z
2021-11-25T12:38:42.000Z
sagemaker-debugger/model_specific_realtime_analysis/bert_attention_head_view/entry_point/data.py
jpmarques19/tensorflwo-test
0ff8b06e0415075c7269820d080284a42595bb2e
[ "Apache-2.0" ]
209
2020-03-01T17:14:12.000Z
2021-11-08T20:35:42.000Z
sagemaker-debugger/model_specific_realtime_analysis/bert_attention_head_view/entry_point/data.py
jpmarques19/tensorflwo-test
0ff8b06e0415075c7269820d080284a42595bb2e
[ "Apache-2.0" ]
686
2020-03-03T17:24:51.000Z
2021-11-25T23:39:12.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and DMLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
38.958333
84
0.597083
import collections import multiprocessing as mp import time from functools import partial from mxnet.gluon.data import SimpleDataset from gluonnlp.data.utils import whitespace_splitter import numpy as np __all__ = ['SQuADTransform', '\rocess_dataset'] class SquadExample: def __init__(self, ...
true
true
f7264918230895dea85690103d818973bdb62a3f
242
py
Python
prefect/aircraftlib/__init__.py
andersy005/brouillons-quotidien
468ebcc3327f96a6eb3a9a26460790c4f34fdc85
[ "MIT" ]
null
null
null
prefect/aircraftlib/__init__.py
andersy005/brouillons-quotidien
468ebcc3327f96a6eb3a9a26460790c4f34fdc85
[ "MIT" ]
null
null
null
prefect/aircraftlib/__init__.py
andersy005/brouillons-quotidien
468ebcc3327f96a6eb3a9a26460790c4f34fdc85
[ "MIT" ]
null
null
null
# flake8: noqa from .analysis import add_airline_info, clean_vector from .database import Database from .openflights import fetch_reference_data from .opensky import fetch_live_aircraft_data from .position import Area, Position, bounding_box
34.571429
52
0.85124
from .analysis import add_airline_info, clean_vector from .database import Database from .openflights import fetch_reference_data from .opensky import fetch_live_aircraft_data from .position import Area, Position, bounding_box
true
true
f726495538536b17d16dcc758c9c8febfb1dc64a
13,874
py
Python
official/vision/beta/configs/retinanet.py
melG81/models
d9ed5232648228ad58b9d50e29d8fe3bb6aa7c4a
[ "Apache-2.0" ]
1
2021-05-12T08:34:32.000Z
2021-05-12T08:34:32.000Z
official/vision/beta/configs/retinanet.py
melG81/models
d9ed5232648228ad58b9d50e29d8fe3bb6aa7c4a
[ "Apache-2.0" ]
null
null
null
official/vision/beta/configs/retinanet.py
melG81/models
d9ed5232648228ad58b9d50e29d8fe3bb6aa7c4a
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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...
35.302799
95
0.605305
import os from typing import List, Optional import dataclasses from official.core import config_definitions as cfg from official.core import exp_factory from official.modeling import hyperparams from official.modeling import optimization from official.vision.beta.configs import backbones from official.v...
true
true
f726499b8d6913a5329f1b82ef19ff7b2b6b251b
1,827
py
Python
Arbitrage_Spot/dquant/entrypoint.py
ronaldzgithub/CryptoArbitrage
b4b7a12b7b11f3dcf950f9d2039dad4f1388530b
[ "MIT" ]
1
2021-11-03T06:16:16.000Z
2021-11-03T06:16:16.000Z
Arbitrage_Spot/dquant/entrypoint.py
benno0810/CryptoArbitrage
b4b7a12b7b11f3dcf950f9d2039dad4f1388530b
[ "MIT" ]
null
null
null
Arbitrage_Spot/dquant/entrypoint.py
benno0810/CryptoArbitrage
b4b7a12b7b11f3dcf950f9d2039dad4f1388530b
[ "MIT" ]
2
2021-05-07T09:11:54.000Z
2021-11-27T16:29:10.000Z
import argparse import logging from logging.handlers import RotatingFileHandler from dquant.datafeed import Datafeed class EntryPoint: datafeed = None def exec_command(self, args ): logging.debug('exec_command:%s' % args) if "feed" in args.command: self.datafeed = Datafeed() ...
31.5
105
0.579639
import argparse import logging from logging.handlers import RotatingFileHandler from dquant.datafeed import Datafeed class EntryPoint: datafeed = None def exec_command(self, args ): logging.debug('exec_command:%s' % args) if "feed" in args.command: self.datafeed = Datafeed() ...
true
true
f7264a51c8db2fd5cc7ad9b2720dd04cb72172fd
5,693
py
Python
noval/python/parser/utils.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
noval/python/parser/utils.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
noval/python/parser/utils.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import functools DATABASE_FILE = "version" def MakeDirs(dirname): dirname = os.path.abspath(dirname) dirname = dirname.replace("\\","/") dirnames = dirname.split("/") destdir = "" destdir = os.path.join(dirnames[0] + "/",dirnames[1]) ...
30.121693
79
0.585456
import os import sys import functools DATABASE_FILE = "version" def MakeDirs(dirname): dirname = os.path.abspath(dirname) dirname = dirname.replace("\\","/") dirnames = dirname.split("/") destdir = "" destdir = os.path.join(dirnames[0] + "/",dirnames[1]) if not os.path.exists(...
true
true
f7264b00ab45f44826da46ff3c5c64fce9f84f82
219
py
Python
nothing/nothing/doctype/customer_status/test_customer_status.py
libracore/nothing
e334c5a534eb3ec11ad8c77a467fae05f5383af5
[ "MIT" ]
1
2022-01-12T11:20:22.000Z
2022-01-12T11:20:22.000Z
nothing/nothing/doctype/customer_status/test_customer_status.py
libracore/nothing
e334c5a534eb3ec11ad8c77a467fae05f5383af5
[ "MIT" ]
null
null
null
nothing/nothing/doctype/customer_status/test_customer_status.py
libracore/nothing
e334c5a534eb3ec11ad8c77a467fae05f5383af5
[ "MIT" ]
2
2021-05-07T08:01:13.000Z
2021-08-14T22:24:33.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021, libracore AG and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestCustomerStatus(unittest.TestCase): pass
19.909091
51
0.767123
from __future__ import unicode_literals import unittest class TestCustomerStatus(unittest.TestCase): pass
true
true
f7264b4fcfd7aafc1c81e31c2b3afdfb0672a9ba
1,144
py
Python
code/nn.py
arjunchandra/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
17
2019-03-29T18:30:36.000Z
2021-10-17T15:38:22.000Z
code/nn.py
arjunchandra/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
1
2019-04-22T22:40:30.000Z
2019-04-24T21:45:07.000Z
code/nn.py
ctallec/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
5
2019-04-29T16:26:18.000Z
2020-01-23T07:17:49.000Z
"""Some nn utilities.""" import torch from abstract import ParametricFunction def copy_buffer(net: ParametricFunction, target_net: ParametricFunction): """Copy all buffers from net to target_net.""" with torch.no_grad(): for target_buf, buf in zip(target_net.buffers(), net.buffers()): # type: ignore ...
40.857143
87
0.701049
import torch from abstract import ParametricFunction def copy_buffer(net: ParametricFunction, target_net: ParametricFunction): with torch.no_grad(): for target_buf, buf in zip(target_net.buffers(), net.buffers()): target_buf.copy_(buf) def soft_update(net: ParametricFunction, target_net: Para...
true
true
f7264b724b3836bde921699ae915f09f3081112e
598
py
Python
driver/forms.py
Mariga123/carpool
f7330634ace2718c2347694b207b9dd49ef6538f
[ "MIT" ]
null
null
null
driver/forms.py
Mariga123/carpool
f7330634ace2718c2347694b207b9dd49ef6538f
[ "MIT" ]
null
null
null
driver/forms.py
Mariga123/carpool
f7330634ace2718c2347694b207b9dd49ef6538f
[ "MIT" ]
null
null
null
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django import forms from .models import * class RegisterForm(UserCreationForm): email = forms.EmailField() class Meta: model = User fields = ['username', 'email', 'password1', 'password2'] ...
26
68
0.667224
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django import forms from .models import * class RegisterForm(UserCreationForm): email = forms.EmailField() class Meta: model = User fields = ['username', 'email', 'password1', 'password2'] ...
true
true
f7264d89247663cd466f161ae8db1fc4b69e2f6a
946
py
Python
cms/admin/dialog/views.py
emiquelito/django-cms-2.0
721d6aa91925ff46aa0de9f8ea967ca93e73741b
[ "BSD-3-Clause" ]
1
2015-09-28T10:08:14.000Z
2015-09-28T10:08:14.000Z
cms/admin/dialog/views.py
gmurewa/django-cms-2.0
6fab9d93ddcea301a844996f5f0db7edc4883953
[ "BSD-3-Clause" ]
1
2019-11-08T02:38:49.000Z
2019-11-08T02:38:49.000Z
cms/admin/dialog/views.py
gmurewa/django-cms-2.0
6fab9d93ddcea301a844996f5f0db7edc4883953
[ "BSD-3-Clause" ]
null
null
null
from cms.admin.dialog.forms import get_copy_dialog_form from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.admin.views.decorators import staff_member_required from django.http import Http404, HttpResponse from django.conf import settings from cms.models import Page @staff_member_req...
36.384615
73
0.738901
from cms.admin.dialog.forms import get_copy_dialog_form from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.admin.views.decorators import staff_member_required from django.http import Http404, HttpResponse from django.conf import settings from cms.models import Page @staff_member_req...
true
true
f7264ec3c56d15f017cede4fca8175d52c1cacc4
2,219
py
Python
tests/test_user_storage.py
Cerzon/gb_chat
b4f8a6bf62b0971a135fbb2083456193f7a816cb
[ "Apache-2.0" ]
null
null
null
tests/test_user_storage.py
Cerzon/gb_chat
b4f8a6bf62b0971a135fbb2083456193f7a816cb
[ "Apache-2.0" ]
null
null
null
tests/test_user_storage.py
Cerzon/gb_chat
b4f8a6bf62b0971a135fbb2083456193f7a816cb
[ "Apache-2.0" ]
null
null
null
from unittest.mock import MagicMock import pytest from gb_chat.db.user_history_storage import UserHistoryStorage from gb_chat.db.user_storage import (InvalidName, InvalidPassword, UserExists, UserNotFound, UserStorage) from conftest import VALID_PASSWORD, VALID_USERNAME @pytest....
32.15942
88
0.775124
from unittest.mock import MagicMock import pytest from gb_chat.db.user_history_storage import UserHistoryStorage from gb_chat.db.user_storage import (InvalidName, InvalidPassword, UserExists, UserNotFound, UserStorage) from conftest import VALID_PASSWORD, VALID_USERNAME @pytest....
true
true
f7264fe3b301f10852827f18dc032e373e7bf3a4
25,966
py
Python
tests/test_commandline.py
marcelm/cutadapt
c63043e0f43970619bb7f8c1242912c236d60545
[ "MIT" ]
375
2015-01-16T14:04:50.000Z
2022-03-16T02:19:43.000Z
tests/test_commandline.py
marcelm/cutadapt
c63043e0f43970619bb7f8c1242912c236d60545
[ "MIT" ]
589
2015-03-05T20:06:03.000Z
2022-03-29T22:49:56.000Z
tests/test_commandline.py
marcelm/cutadapt
c63043e0f43970619bb7f8c1242912c236d60545
[ "MIT" ]
150
2015-02-10T12:19:40.000Z
2022-03-25T05:06:50.000Z
import subprocess import sys import os from io import StringIO, BytesIO import dnaio import pytest from cutadapt.__main__ import main from utils import assert_files_equal, datapath, cutpath # pytest.mark.timeout will not fail even if pytest-timeout is not installed try: import pytest_timeout as _unused except Im...
31.359903
116
0.655973
import subprocess import sys import os from io import StringIO, BytesIO import dnaio import pytest from cutadapt.__main__ import main from utils import assert_files_equal, datapath, cutpath try: import pytest_timeout as _unused except ImportError: raise ImportError("pytest_timeout needs to be installed") ...
true
true
f726506396cd55e3c14fcaaeebe3a90d09e1dcf1
851
py
Python
tests/cupy_tests/core_tests/test_syncdetect.py
svlandeg/cupy
484e007d5bf58a0445af2f6e7aa3fdfe0fcc2363
[ "MIT" ]
6,180
2016-11-01T14:22:30.000Z
2022-03-31T08:39:20.000Z
tests/cupy_tests/core_tests/test_syncdetect.py
svlandeg/cupy
484e007d5bf58a0445af2f6e7aa3fdfe0fcc2363
[ "MIT" ]
6,281
2016-12-22T07:42:31.000Z
2022-03-31T19:57:02.000Z
tests/cupy_tests/core_tests/test_syncdetect.py
svlandeg/cupy
484e007d5bf58a0445af2f6e7aa3fdfe0fcc2363
[ "MIT" ]
829
2017-02-23T05:46:12.000Z
2022-03-27T17:40:03.000Z
import unittest import pytest import cupy import cupyx class TestSyncDetect(unittest.TestCase): def test_disallowed(self): a = cupy.array([2, 3]) with cupyx.allow_synchronize(False): with pytest.raises(cupyx.DeviceSynchronized): a.get() def test_allowed(self): ...
25.029412
61
0.591069
import unittest import pytest import cupy import cupyx class TestSyncDetect(unittest.TestCase): def test_disallowed(self): a = cupy.array([2, 3]) with cupyx.allow_synchronize(False): with pytest.raises(cupyx.DeviceSynchronized): a.get() def test_allowed(self): ...
true
true
f72650f004500bff57f9152bebe02c0607cf7d24
567
py
Python
BOJ14405.py
INYEONGKIM/BOJ
5e83d77a92d18b0d20d26645c7cfe4ba3e2d25bc
[ "MIT" ]
2
2019-03-05T15:42:46.000Z
2019-07-24T15:52:36.000Z
BOJ14405.py
INYEONGKIM/BOJ
5e83d77a92d18b0d20d26645c7cfe4ba3e2d25bc
[ "MIT" ]
null
null
null
BOJ14405.py
INYEONGKIM/BOJ
5e83d77a92d18b0d20d26645c7cfe4ba3e2d25bc
[ "MIT" ]
null
null
null
s=input();f=True try: while s!="": if s[0]=="p": t=s[:2] if t=="pi": s=s[2:] else: f=False; break elif s[0]=="k": t=s[:2] if t=="ka": s=s[2:] else: f=False; break ...
18.9
30
0.294533
s=input();f=True try: while s!="": if s[0]=="p": t=s[:2] if t=="pi": s=s[2:] else: f=False; break elif s[0]=="k": t=s[:2] if t=="ka": s=s[2:] else: f=False; break ...
true
true
f726518fe0feae8b103c50e15118f179206e6821
374
py
Python
build/check_obstacle/catkin_generated/pkg.installspace.context.pc.py
EurobotMDX/eurobot_2020_odroid_cam
ddd9a17d53899f1c615816fd74512c112ecad188
[ "MIT" ]
4
2019-10-26T18:48:51.000Z
2020-02-27T19:31:36.000Z
build/check_obstacle/catkin_generated/pkg.installspace.context.pc.py
EurobotMDX/eurobot_2020_odroid_cam
ddd9a17d53899f1c615816fd74512c112ecad188
[ "MIT" ]
null
null
null
build/check_obstacle/catkin_generated/pkg.installspace.context.pc.py
EurobotMDX/eurobot_2020_odroid_cam
ddd9a17d53899f1c615816fd74512c112ecad188
[ "MIT" ]
1
2019-10-26T18:50:48.000Z
2019-10-26T18:50:48.000Z
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "check_obstacle" PROJECT_SPACE_DIR = "...
41.555556
68
0.705882
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "check_obstacle" PROJECT_SPACE_DIR = "/home/ros/lidar_ws/install" PROJECT_VERSION = "0.0.0"
true
true
f7265193a85ba6ceeb41dc4f556930b01622c5a0
2,456
py
Python
python/paddle/fluid/tests/unittests/ir/inference/test_identity_scale_clean_pass.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
11
2016-08-29T07:43:26.000Z
2016-08-29T07:51:24.000Z
python/paddle/fluid/tests/unittests/ir/inference/test_identity_scale_clean_pass.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/ir/inference/test_identity_scale_clean_pass.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
1
2021-12-09T08:59:17.000Z
2021-12-09T08:59:17.000Z
# Copyright (c) 2022 PaddlePaddle 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 appli...
37.212121
74
0.623779
import numpy as np from auto_scan_test import PassAutoScanTest from program_config import TensorConfig, ProgramConfig, OpConfig import paddle.inference as paddle_infer import unittest import hypothesis.strategies as st class TestIdentityScaleCleanPass(PassAutoScanTest): def sample_predictor_configs...
true
true
f72651d2708561bc7a3f8b8ff37df2a1572eaac2
15,984
py
Python
LSTM for language modeling/Question2_Part_1_To_2.py
sotudian/Natural-Language-Processing
61ba2ac78e440683519d2121ca2b29a17277e46b
[ "Apache-2.0" ]
null
null
null
LSTM for language modeling/Question2_Part_1_To_2.py
sotudian/Natural-Language-Processing
61ba2ac78e440683519d2121ca2b29a17277e46b
[ "Apache-2.0" ]
null
null
null
LSTM for language modeling/Question2_Part_1_To_2.py
sotudian/Natural-Language-Processing
61ba2ac78e440683519d2121ca2b29a17277e46b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Train the language model on texts from the file pride And Prejudice. Before using it to train the language model, you need to first sentence segment, then tokenize, then lower case each line of the file using Spacy. Append start-of-sentence token ’<s>’ and end-of-sent...
29.820896
132
0.603478
import re import pickle import random import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F import nltk from nltk.tokenize import sent_tokenize, word_tokenize from nltk.lm.preprocessing import pad_both_ends from collections import Counter import math ces = [list(p...
true
true
f72654a975ae6f6f07f9c0a9f4ef3e7ceecfc94a
488
py
Python
AssetsApp/migrations/0010_alter_assetscategories_datetime_added.py
Kayarn-Mechatronics/Octello
45f4f73c764ca816918c31ef3ae4889740a68802
[ "Apache-2.0" ]
null
null
null
AssetsApp/migrations/0010_alter_assetscategories_datetime_added.py
Kayarn-Mechatronics/Octello
45f4f73c764ca816918c31ef3ae4889740a68802
[ "Apache-2.0" ]
null
null
null
AssetsApp/migrations/0010_alter_assetscategories_datetime_added.py
Kayarn-Mechatronics/Octello
45f4f73c764ca816918c31ef3ae4889740a68802
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-09-08 01:39 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('AssetsApp', '0009_alter_assetscategories_datetime_added'), ] operations = [ migrations.AlterField( model_name='a...
24.4
97
0.647541
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('AssetsApp', '0009_alter_assetscategories_datetime_added'), ] operations = [ migrations.AlterField( model_name='assetscategories', name='datetime_ad...
true
true
f72656c4b0c210ce9367e4cf253ca9a70c73fd41
5,884
py
Python
Jumpscale/clients/oauth/OauthInstance.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
2
2019-05-09T07:21:25.000Z
2019-08-05T06:37:53.000Z
Jumpscale/clients/oauth/OauthInstance.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
664
2018-12-19T12:43:44.000Z
2019-08-23T04:24:42.000Z
Jumpscale/clients/oauth/OauthInstance.py
threefoldtech/jumpscale10
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
7
2019-05-03T07:14:37.000Z
2019-08-05T12:36:52.000Z
import urllib.request import urllib.parse import urllib.error import string import requests import time import random from Jumpscale import j JSConfigClient = j.application.JSBaseConfigClass class OauthClient(JSConfigClient): _SCHEMATEXT = """ @url = jumpscale.oauth.client name* = "" (S) ...
31.978261
116
0.579708
import urllib.request import urllib.parse import urllib.error import string import requests import time import random from Jumpscale import j JSConfigClient = j.application.JSBaseConfigClass class OauthClient(JSConfigClient): _SCHEMATEXT = """ @url = jumpscale.oauth.client name* = "" (S) ...
true
true
f7265773512670aeae3bd3c088b90f7348f9d8d0
6,363
py
Python
dump_teacher_hiddens.py
ChenRocks/Distill-BERT-Textgen
a3b0b22ce16febc4d3ffdbd8791ea3374110a892
[ "MIT" ]
111
2020-05-05T04:34:10.000Z
2022-02-20T17:04:56.000Z
dump_teacher_hiddens.py
ChenRocks/Distill-BERT-Textgen
a3b0b22ce16febc4d3ffdbd8791ea3374110a892
[ "MIT" ]
5
2020-06-06T12:45:52.000Z
2021-03-16T13:22:37.000Z
dump_teacher_hiddens.py
ChenRocks/Distill-BERT-Textgen
a3b0b22ce16febc4d3ffdbd8791ea3374110a892
[ "MIT" ]
17
2020-05-07T07:43:05.000Z
2022-01-19T11:33:33.000Z
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. precompute hidden states of CMLM teacher to speedup KD training """ import argparse import io import os import shelve import numpy as np import torch from torch.utils.data import Dataset, DataLoader from tqdm import tqdm from pytorch_pretrained_...
35.949153
79
0.636964
import argparse import io import os import shelve import numpy as np import torch from torch.utils.data import Dataset, DataLoader from tqdm import tqdm from pytorch_pretrained_bert import BertTokenizer from toolz.sandbox import unzip from cmlm.model import BertForSeq2seq from cmlm.data import convert_token_to_bert, ...
true
true
f72658a22e37eca598653ef574062e41fecd324c
1,652
py
Python
test/vanilla/Expected/AcceptanceTests/NonStringEnums/nonstringenums/models/_non_string_enums_client_enums.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
test/vanilla/Expected/AcceptanceTests/NonStringEnums/nonstringenums/models/_non_string_enums_client_enums.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
test/vanilla/Expected/AcceptanceTests/NonStringEnums/nonstringenums/models/_non_string_enums_client_enums.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "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 ...
34.416667
94
0.640436
from enum import Enum, EnumMeta from six import with_metaclass class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(self, name): return super().__getitem__(name.upper()) def __getattr__(cls, name): try: return cls._member_map_[name.upper()] except KeyError: ...
true
true
f72658a883e0ec8dce8892d634b7105d4bac6c3d
354
py
Python
algorithm/challenges/geanytest.py
rishabhiitbhu/hackerrank
acc300851c81a29472177f15fd8b56ebebe853ea
[ "MIT" ]
null
null
null
algorithm/challenges/geanytest.py
rishabhiitbhu/hackerrank
acc300851c81a29472177f15fd8b56ebebe853ea
[ "MIT" ]
null
null
null
algorithm/challenges/geanytest.py
rishabhiitbhu/hackerrank
acc300851c81a29472177f15fd8b56ebebe853ea
[ "MIT" ]
1
2020-01-30T06:47:09.000Z
2020-01-30T06:47:09.000Z
t = int(input().strip()) for i in range(t): n,c,m = input().strip().split(' ') n,c,m = [int(n),int(c),int(m)] tot_choc=n//c wrap=tot_choc #print(tot_choc, wrap) while wrap >= m: extra_choc = wrap//m wrap-=m*extra_choc wrap+=extra_choc tot_choc+= extra_c...
25.285714
39
0.516949
t = int(input().strip()) for i in range(t): n,c,m = input().strip().split(' ') n,c,m = [int(n),int(c),int(m)] tot_choc=n//c wrap=tot_choc while wrap >= m: extra_choc = wrap//m wrap-=m*extra_choc wrap+=extra_choc tot_choc+= extra_choc print(tot_choc...
true
true
f72658e3bad5fe570677617b549a92f97f742c6b
8,745
py
Python
selfdrive/car/hyundai/carcontroller.py
janpoo6427/openpilot_xx979xx
189764c2ad1d6610165876a0462ba0eb896ac500
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/carcontroller.py
janpoo6427/openpilot_xx979xx
189764c2ad1d6610165876a0462ba0eb896ac500
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/carcontroller.py
janpoo6427/openpilot_xx979xx
189764c2ad1d6610165876a0462ba0eb896ac500
[ "MIT" ]
2
2020-09-27T20:46:34.000Z
2020-10-15T01:01:57.000Z
from cereal import car from common.numpy_fast import clip from selfdrive.car import apply_std_steer_torque_limits from selfdrive.car.hyundai.hyundaican import create_lkas11, create_clu11, create_lfa_mfa, \ create_scc11, create_scc12, create_mdps12, \ ...
42.658537
122
0.705432
from cereal import car from common.numpy_fast import clip from selfdrive.car import apply_std_steer_torque_limits from selfdrive.car.hyundai.hyundaican import create_lkas11, create_clu11, create_lfa_mfa, \ create_scc11, create_scc12, create_mdps12, \ ...
true
true
f7265a0b69f2307625509d7efc09f1872f2f80c4
8,067
py
Python
trading-with-python/util/trendy.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
trading-with-python/util/trendy.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
2
2019-02-23T18:54:22.000Z
2019-11-09T01:30:32.000Z
trading-with-python/util/trendy.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
import numpy as np from filter import movingaverage def gentrends(x, window=1/3.0, charts=True): """ Returns a Pandas dataframe with support and resistance lines. :param x: One-dimensional data set :param window: How long the trendlines should be. If window < 1, then it will be take...
32.792683
79
0.567497
import numpy as np from filter import movingaverage def gentrends(x, window=1/3.0, charts=True): import numpy as np import pandas.io.data as pd x = np.array(x) if window < 1: window = int(window * len(x)) max1 = np.where(x == max(x))[0][0] min1 = np.where(x == min(x))[0][0] ...
true
true
f7265b61b492e4080f0306586bfd4421f042a4b1
9,483
py
Python
gamestonk_terminal/stocks/insider/openinsider_view.py
jbushago/GamestonkTerminal
73a2b419664bf62bbdc59aa8402c8cd6a913a518
[ "MIT" ]
1
2022-03-15T13:05:40.000Z
2022-03-15T13:05:40.000Z
gamestonk_terminal/stocks/insider/openinsider_view.py
jbushago/GamestonkTerminal
73a2b419664bf62bbdc59aa8402c8cd6a913a518
[ "MIT" ]
null
null
null
gamestonk_terminal/stocks/insider/openinsider_view.py
jbushago/GamestonkTerminal
73a2b419664bf62bbdc59aa8402c8cd6a913a518
[ "MIT" ]
null
null
null
import itertools import logging import os import textwrap from typing import List import numpy as np import pandas as pd import requests from bs4 import BeautifulSoup from gamestonk_terminal.decorators import log_start_end from gamestonk_terminal.helper_funcs import ( export_data, patch_pandas_text_adjustment...
29.178462
119
0.605505
import itertools import logging import os import textwrap from typing import List import numpy as np import pandas as pd import requests from bs4 import BeautifulSoup from gamestonk_terminal.decorators import log_start_end from gamestonk_terminal.helper_funcs import ( export_data, patch_pandas_text_adjustment...
true
true
f7265be4393da76c22754da75898052c8a4b8c71
831
py
Python
src/cpp/qpsolver/cvxopt/examples/doc/chap8/conelp.py
Hap-Hugh/quicksel
10eee90b759638d5c54ba19994ae8e36e90e12b8
[ "Apache-2.0" ]
15
2020-07-07T16:32:53.000Z
2022-03-16T14:23:23.000Z
src/cpp/qpsolver/cvxopt/examples/doc/chap8/conelp.py
Hap-Hugh/quicksel
10eee90b759638d5c54ba19994ae8e36e90e12b8
[ "Apache-2.0" ]
2
2020-09-02T15:25:39.000Z
2020-09-24T08:37:18.000Z
src/cpp/qpsolver/cvxopt/examples/doc/chap8/conelp.py
Hap-Hugh/quicksel
10eee90b759638d5c54ba19994ae8e36e90e12b8
[ "Apache-2.0" ]
6
2020-08-14T22:02:07.000Z
2021-03-31T07:08:29.000Z
# The small linear cone program of section 8.1 (Linear cone programs). from cvxopt import matrix, solvers c = matrix([-6., -4., -5.]) G = matrix([[ 16., 7., 24., -8., 8., -1., 0., -1., 0., 0., 7., -5., 1., -5., 1., -7., 1., -7., -4.], [-14., 2., 7., -13., -18., 3., 0., 0.,...
39.571429
75
0.361011
from cvxopt import matrix, solvers c = matrix([-6., -4., -5.]) G = matrix([[ 16., 7., 24., -8., 8., -1., 0., -1., 0., 0., 7., -5., 1., -5., 1., -7., 1., -7., -4.], [-14., 2., 7., -13., -18., 3., 0., 0., -1., 0., 3., 13., -6., 13., 12., -10., -6., -10., -28.]...
true
true
f7265c3d05c95935872b8f725e78bb38be5404e8
9,800
py
Python
stacker/tests/test_plan.py
DomainGroupOSS/stacker
88b71bc5cfcbbf7957245d821434b95801230425
[ "BSD-2-Clause" ]
1
2018-07-17T11:23:47.000Z
2018-07-17T11:23:47.000Z
stacker/tests/test_plan.py
DomainGroupOSS/stacker
88b71bc5cfcbbf7957245d821434b95801230425
[ "BSD-2-Clause" ]
null
null
null
stacker/tests/test_plan.py
DomainGroupOSS/stacker
88b71bc5cfcbbf7957245d821434b95801230425
[ "BSD-2-Clause" ]
1
2020-02-29T04:49:04.000Z
2020-02-29T04:49:04.000Z
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import range import os import shutil import tempfile import unittest import mock from stacker.context import Context, Config from stacker.dag import walk from stacker.util import stack_template_k...
30.434783
78
0.580408
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import range import os import shutil import tempfile import unittest import mock from stacker.context import Context, Config from stacker.dag import walk from stacker.util import stack_template_k...
true
true
f7265c6925ef94f77153adae115c2e78a7324353
3,058
py
Python
over_roasted/settings.py
xmedinavei/over_roasted_app
c5b9525c6435d5d2285d86961eb8674108f2c88c
[ "MIT" ]
null
null
null
over_roasted/settings.py
xmedinavei/over_roasted_app
c5b9525c6435d5d2285d86961eb8674108f2c88c
[ "MIT" ]
null
null
null
over_roasted/settings.py
xmedinavei/over_roasted_app
c5b9525c6435d5d2285d86961eb8674108f2c88c
[ "MIT" ]
null
null
null
from pathlib import Path import django_heroku # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: ...
24.66129
91
0.692283
from pathlib import Path import django_heroku BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = '3+7ekm6aghztb!h1b@xcvvjid8$o%rb7bb3bha446)d1pk573*' DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ # Django 'django.contrib.admin', 'django.contrib.auth...
true
true
f7265d7477ff3fba1b5e7f80d15d88b7c11ed07e
1,092
py
Python
examples/finalterm-shell-integration.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
2
2020-04-12T01:23:25.000Z
2021-05-22T13:46:00.000Z
examples/finalterm-shell-integration.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
null
null
null
examples/finalterm-shell-integration.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
2
2016-12-30T23:57:44.000Z
2021-05-22T13:50:21.000Z
#!/usr/bin/env python """ Mark the start and end of the prompt with Final term (iterm2) escape sequences. See: https://iterm2.com/finalterm.html """ from __future__ import unicode_literals from prompt_toolkit import prompt from prompt_toolkit.token import Token import sys BEFORE_PROMPT = '\033]133;A\a' AFTER_PROMPT ...
29.513514
92
0.701465
from __future__ import unicode_literals from prompt_toolkit import prompt from prompt_toolkit.token import Token import sys BEFORE_PROMPT = '\033]133;A\a' AFTER_PROMPT = '\033]133;B\a' BEFORE_OUTPUT = '\033]133;C\a' AFTER_OUTPUT = '\033]133;D;{command_status}\a' def get_prompt_tokens(cli): ...
true
true
f7265e08d1ad65a2a3c1ac2d5369c00df1bea063
2,164
py
Python
tests/unit/utils/pyxb_utils.py
MaxTakahashi/hammr
cfe593ccfdddb7f98185e561feed6a40a866b585
[ "Apache-2.0" ]
null
null
null
tests/unit/utils/pyxb_utils.py
MaxTakahashi/hammr
cfe593ccfdddb7f98185e561feed6a40a866b585
[ "Apache-2.0" ]
null
null
null
tests/unit/utils/pyxb_utils.py
MaxTakahashi/hammr
cfe593ccfdddb7f98185e561feed6a40a866b585
[ "Apache-2.0" ]
null
null
null
# Copyright 2007-2017 UShareSoft SAS, 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...
55.487179
121
0.77634
# is slightly modified. # So to avoid that, the type to used is retrieved dynamically using the PyXB internal attributes. # This method returns the type of the element in a list attributes # Example of use: # regionType = get_pyXB_anon_type_for_list(regions.regionEntities) # region = regionType() #...
true
true
f7265e3a53380992aefc3e1f0e5022e3b36f9db4
4,782
py
Python
ADSref.py
SimonJMurphy/ADSref
c144d077d622987c42d5cf8d9d111afa04073af2
[ "MIT" ]
2
2021-01-14T10:13:32.000Z
2021-01-31T23:51:09.000Z
ADSref.py
SimonJMurphy/ADSref
c144d077d622987c42d5cf8d9d111afa04073af2
[ "MIT" ]
null
null
null
ADSref.py
SimonJMurphy/ADSref
c144d077d622987c42d5cf8d9d111afa04073af2
[ "MIT" ]
null
null
null
import ads ads.config.token = 'my token' import numpy as np # Filenames ## Enter the filename for first-author publications here: first_author = "first_author.bib" ## Enter the filename for cd-authored publications here: co_author = "co_author.bib" # Function Declarations def extract_bibcodes(filename): """Tak...
32.97931
367
0.622961
import ads ads.config.token = 'my token' import numpy as np en(filename) full_list = f.readlines() bibcodes = [] exclude = ['arXiv','tmp','yCat','PhDT','AAS','ASPC','BSRSL','conf','EPJWC','IAUFM','IAUGA','IAUS','hst','iue','jwst','spzr','prop'] for line in full_list: if l...
true
true
f7265e57b6d0c1d7e79981da52b990daf420ccab
7,670
py
Python
tests/test_breadcrumbs.py
PavloKapyshin/paka.breadcrumbs
ae57d1a0d609ab39f81c4b0b44d6f7081602b079
[ "BSD-3-Clause" ]
1
2018-10-28T03:02:03.000Z
2018-10-28T03:02:03.000Z
tests/test_breadcrumbs.py
PavloKapyshin/paka.breadcrumbs
ae57d1a0d609ab39f81c4b0b44d6f7081602b079
[ "BSD-3-Clause" ]
null
null
null
tests/test_breadcrumbs.py
PavloKapyshin/paka.breadcrumbs
ae57d1a0d609ab39f81c4b0b44d6f7081602b079
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import unittest try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest from paka.breadcrumbs import Bread, Crumb class BreadcrumbsTest(unittest.TestCase): def setUp(self): self...
36.52381
78
0.619426
from __future__ import unicode_literals import unittest try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest from paka.breadcrumbs import Bread, Crumb class BreadcrumbsTest(unittest.TestCase): def setUp(self): self.site_name = "Some site...
true
true