hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f75eee6ab6c471c4fedbdb6456a5d5c69a9f76d9
21,490
py
Python
forsteri/interface/data.py
achawkins/Forsteri
882d684d22d1f1d23ab03fde0b513ec95ac78251
[ "MIT" ]
1
2016-02-16T04:31:38.000Z
2016-02-16T04:31:38.000Z
forsteri/interface/data.py
achawkins/forsteri
882d684d22d1f1d23ab03fde0b513ec95ac78251
[ "MIT" ]
null
null
null
forsteri/interface/data.py
achawkins/forsteri
882d684d22d1f1d23ab03fde0b513ec95ac78251
[ "MIT" ]
null
null
null
#!/usr/bin/python """ SQLite Database Interface for Data Copyright (c) 2014, 2015 Andrew Hawkins Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation...
27.065491
79
0.63006
import datetime as dt import os import sqlite3 import sys import wx if os.name == "nt": DATA = "J:\\" elif os.name == "posix": DATA = "/mnt/forecastdb/" MASTER = ''.join([DATA, "data.db"]) def addVariable(variable, connection=None): flag = False if connection is None: connection = sqlit...
true
true
f75eeef03f1da11bb27db06ddd91f117f634db86
13,659
py
Python
dace/optimization/subgraph_fusion_tuner.py
meshtag/dace
e6751ee6a4f6356b47b93065d43cefb3fd54ebaa
[ "BSD-3-Clause" ]
null
null
null
dace/optimization/subgraph_fusion_tuner.py
meshtag/dace
e6751ee6a4f6356b47b93065d43cefb3fd54ebaa
[ "BSD-3-Clause" ]
null
null
null
dace/optimization/subgraph_fusion_tuner.py
meshtag/dace
e6751ee6a4f6356b47b93065d43cefb3fd54ebaa
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019-2022 ETH Zurich and the DaCe authors. All rights reserved. import dace import pickle import math import copy from typing import Generator, Dict, List, Tuple from collections import Counter from dace import SDFG, dtypes from dace.optimization import cutout_tuner from dace.sdfg.analysis import cutout a...
43.088328
149
0.541035
import dace import pickle import math import copy from typing import Generator, Dict, List, Tuple from collections import Counter from dace import SDFG, dtypes from dace.optimization import cutout_tuner from dace.sdfg.analysis import cutout as cutter from dace.transformation import subgraph as sg from dace.transform...
true
true
f75eef3ff65bf34b3187a9254a79986fb7541c8a
196
py
Python
ankor/shortener_test.py
kolybasov/ankor
0b1aac9d00adf55906293c46c6c2101a5b3f2da7
[ "MIT" ]
null
null
null
ankor/shortener_test.py
kolybasov/ankor
0b1aac9d00adf55906293c46c6c2101a5b3f2da7
[ "MIT" ]
null
null
null
ankor/shortener_test.py
kolybasov/ankor
0b1aac9d00adf55906293c46c6c2101a5b3f2da7
[ "MIT" ]
null
null
null
from .shortener import Shortener class TestShortener: def test_short(self): shortener = Shortener('https://mbasov.me') assert shortener.short().startswith('https://goo.gl')
21.777778
61
0.683673
from .shortener import Shortener class TestShortener: def test_short(self): shortener = Shortener('https://mbasov.me') assert shortener.short().startswith('https://goo.gl')
true
true
f75eef80b779428a16131f4553ae4d332f48ab30
356
py
Python
pyleecan/Methods/Mesh/SolutionMat/get_axes_list.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Mesh/SolutionMat/get_axes_list.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Mesh/SolutionMat/get_axes_list.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np def get_axes_list(self): """Get the value of variables stored in Solution. Parameters ---------- self : SolutionMat an SolutionMat object Returns ------- axis_dict: list a list of axis names containing axis sizes """ re...
16.952381
53
0.601124
import numpy as np def get_axes_list(self): return self.axis_name, self.axis_size
true
true
f75eefa8be2f06360f683cad35212bc091d2c1b6
17,264
py
Python
pg8000/converters.py
hugovk/pg8000
6dae73131c3a676d29a54ed027e917834a4e7cba
[ "BSD-3-Clause" ]
337
2019-01-24T18:35:53.000Z
2022-03-29T12:06:36.000Z
pg8000/converters.py
hugovk/pg8000
6dae73131c3a676d29a54ed027e917834a4e7cba
[ "BSD-3-Clause" ]
94
2016-03-03T21:20:38.000Z
2022-03-02T19:37:04.000Z
pg8000/converters.py
hugovk/pg8000
6dae73131c3a676d29a54ed027e917834a4e7cba
[ "BSD-3-Clause" ]
27
2019-02-03T01:14:43.000Z
2021-11-14T12:19:35.000Z
from datetime import ( date as Date, datetime as Datetime, time as Time, timedelta as Timedelta, timezone as Timezone, ) from decimal import Decimal from enum import Enum from ipaddress import ( IPv4Address, IPv4Network, IPv6Address, IPv6Network, ip_address, ip_network, ) fro...
23.361299
87
0.563137
from datetime import ( date as Date, datetime as Datetime, time as Time, timedelta as Timedelta, timezone as Timezone, ) from decimal import Decimal from enum import Enum from ipaddress import ( IPv4Address, IPv4Network, IPv6Address, IPv6Network, ip_address, ip_network, ) fro...
true
true
f75ef07b582e66f1de9d279f43f90400b7df2144
1,086
py
Python
var/spack/repos/builtin/packages/py-cheroot/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/py-cheroot/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/py-cheroot/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyCheroot(PythonPackage): """ Highly-optimized, pure-python HTTP server """ homepage...
40.222222
95
0.694291
from spack import * class PyCheroot(PythonPackage): homepage = "https://cheroot.cherrypy.org/" url = "https://pypi.io/packages/source/c/cheroot/cheroot-6.5.5.tar.gz" version('8.3.0', sha256='a0577e1f28661727d472671a7cc4e0c12ea0cbc5220265e70f00a8b8cb628931') version('6.5.5', sha256='f6a85e005adb5bc...
true
true
f75ef0f277ecb9b494ee886783f794355d752331
4,520
py
Python
tests/test_config.py
gryf/slack-backup
2c51568e67662ef189f5ab24df922dd235fa3539
[ "BSD-3-Clause" ]
15
2018-05-03T20:30:47.000Z
2021-01-28T07:00:53.000Z
tests/test_config.py
gryf/slack-backup
2c51568e67662ef189f5ab24df922dd235fa3539
[ "BSD-3-Clause" ]
12
2017-08-05T11:45:01.000Z
2021-01-09T07:27:46.000Z
tests/test_config.py
gryf/slack-backup
2c51568e67662ef189f5ab24df922dd235fa3539
[ "BSD-3-Clause" ]
11
2017-09-21T06:37:46.000Z
2022-03-26T12:18:27.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import tempfile import os import unittest from slack_backup import config CONF = """\ [common] channels=["one","two", "three"] database=dbfname.sqlite quiet=1 verbose=2 [generate] output=logs format=text theme=plain [fetch] user=someuser@address.com p...
33.731343
79
0.411062
import argparse import tempfile import os import unittest from slack_backup import config CONF = """\ [common] channels=["one","two", "three"] database=dbfname.sqlite quiet=1 verbose=2 [generate] output=logs format=text theme=plain [fetch] user=someuser@address.com password=secret team=myteam token=xxxx-111111111...
true
true
f75ef2996ed9ab224e1a0960b93119c584a4e5c4
3,327
py
Python
wechat_service/wechat_api.py
qq525492738/movecar
4c565c4438cfd25e89f84ce58ef8f85ac4b09703
[ "Apache-2.0" ]
null
null
null
wechat_service/wechat_api.py
qq525492738/movecar
4c565c4438cfd25e89f84ce58ef8f85ac4b09703
[ "Apache-2.0" ]
null
null
null
wechat_service/wechat_api.py
qq525492738/movecar
4c565c4438cfd25e89f84ce58ef8f85ac4b09703
[ "Apache-2.0" ]
null
null
null
from django.core.mail import send_mail import requests import simplejson class APIError: def __init__(self, code, msg): self.code = code self.msg = msg def wx_log_error(APIError): send_mail('movecar err', 'wechat api error: [%s], %s' % (APIError.code, APIError.msg)) class WechatBaseApi: ...
29.442478
99
0.601443
from django.core.mail import send_mail import requests import simplejson class APIError: def __init__(self, code, msg): self.code = code self.msg = msg def wx_log_error(APIError): send_mail('movecar err', 'wechat api error: [%s], %s' % (APIError.code, APIError.msg)) class WechatBaseApi: ...
true
true
f75ef2cfc08b860d6aa57d88d9cef5593b10330d
24,791
py
Python
plugins/trezor/qt.py
zakurai/electrum-xsh3
cec82adcfa3acacc1af806f5eec8aeb97592e919
[ "MIT" ]
1
2021-05-29T02:35:02.000Z
2021-05-29T02:35:02.000Z
plugins/trezor/qt.py
zakurai/electrum-xsh3
cec82adcfa3acacc1af806f5eec8aeb97592e919
[ "MIT" ]
1
2021-11-15T17:48:00.000Z
2021-11-15T17:48:00.000Z
plugins/trezor/qt.py
zakurai/electrum-xsh3
cec82adcfa3acacc1af806f5eec8aeb97592e919
[ "MIT" ]
1
2019-02-27T20:56:22.000Z
2019-02-27T20:56:22.000Z
from functools import partial import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel from electrum_xsh_gui.qt.util import * from electrum_xsh.i18n import _ from electrum_xsh.plugins import hook, DeviceMgr from electrum_xsh.util imp...
40.376221
115
0.608971
from functools import partial import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel from electrum_xsh_gui.qt.util import * from electrum_xsh.i18n import _ from electrum_xsh.plugins import hook, DeviceMgr from electrum_xsh.util imp...
true
true
f75ef3e663afd71e19007b2516dd999bcf32e518
12,223
py
Python
Python Project Filter-Detect-GUI/mne/io/bti/tests/test_bti.py
JulienL3vesque/Hexoskin_RnD_OSM
b524430d6f4b2b300d119b6a1586141e6c2d14a3
[ "MIT" ]
null
null
null
Python Project Filter-Detect-GUI/mne/io/bti/tests/test_bti.py
JulienL3vesque/Hexoskin_RnD_OSM
b524430d6f4b2b300d119b6a1586141e6c2d14a3
[ "MIT" ]
1
2020-10-29T19:53:46.000Z
2020-10-29T19:53:46.000Z
Python Project Filter-Detect-GUI/mne/io/bti/tests/test_bti.py
JulienL3vesque/Hexoskin_RnD_OSM
b524430d6f4b2b300d119b6a1586141e6c2d14a3
[ "MIT" ]
1
2020-12-15T09:16:29.000Z
2020-12-15T09:16:29.000Z
from __future__ import print_function # Authors: Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import os import os.path as op from functools import reduce, partial import warnings import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, ...
40.47351
79
0.60198
from __future__ import print_function import os import os.path as op from functools import reduce, partial import warnings import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_allclose) from nose.tools import assert_true, assert_raises, assert_...
true
true
f75ef4b5d4b8b33b80e871f552a7e6342ab2b51e
810
py
Python
attendance-system-example/mark.py
sky-2002/weaviate-examples
34bb73f8d2096e04aaf19455f2f8da743f21b8d5
[ "MIT" ]
null
null
null
attendance-system-example/mark.py
sky-2002/weaviate-examples
34bb73f8d2096e04aaf19455f2f8da743f21b8d5
[ "MIT" ]
null
null
null
attendance-system-example/mark.py
sky-2002/weaviate-examples
34bb73f8d2096e04aaf19455f2f8da743f21b8d5
[ "MIT" ]
null
null
null
import weaviate import cv2 import os,sys import pandas as pd from student_test import getFaces, testImage, testit def markAttendance(faces,own=False): ''' This function takes in a list of image paths (paths of face images) and then uses weaviate's image2vec-neural module to classify each image dependin...
32.4
88
0.658025
import weaviate import cv2 import os,sys import pandas as pd from student_test import getFaces, testImage, testit def markAttendance(faces,own=False): data = pd.DataFrame(columns=['Name','Present']) for img in faces: if own: name = testit(img) else: name = testImage...
true
true
f75ef4ddb9985e667f5b738f1a27cb0e79fa9221
2,637
py
Python
final_homework/aplicacaoKohonen_nDeTecnologias.py
ufpa-organization-repositories/artificial-neural-networks
bfd3e62f9f8c353a1d3ca798928a7db5a6aabc50
[ "MIT" ]
1
2021-07-22T14:47:30.000Z
2021-07-22T14:47:30.000Z
final_homework/aplicacaoKohonen_nDeTecnologias.py
ufpa-organization-repositories/artificial-neural-networks
bfd3e62f9f8c353a1d3ca798928a7db5a6aabc50
[ "MIT" ]
null
null
null
final_homework/aplicacaoKohonen_nDeTecnologias.py
ufpa-organization-repositories/artificial-neural-networks
bfd3e62f9f8c353a1d3ca798928a7db5a6aabc50
[ "MIT" ]
null
null
null
from openpyxl import load_workbook import numpy as np import matplotlib.pyplot as plt # book = load_workbook('results_teste.xlsx') book = load_workbook('results_pleno_completo.xlsx') sheet = book.active from trabalho_final.kohonen import kohonen i = 2 end = False jobs_dict = dict() while not end: if not sheet['...
28.663043
122
0.642776
from openpyxl import load_workbook import numpy as np import matplotlib.pyplot as plt book = load_workbook('results_pleno_completo.xlsx') sheet = book.active from trabalho_final.kohonen import kohonen i = 2 end = False jobs_dict = dict() while not end: if not sheet['A' + str(i)].value == None: j...
true
true
f75ef50e084e2836cfb42ab3f739f77194f5913d
16,512
py
Python
check.py
phated/binaryen
50e66800dc28d67ea1cc88172f459df1ca96507d
[ "Apache-2.0" ]
5,871
2015-11-13T19:06:43.000Z
2022-03-31T17:40:21.000Z
check.py
sthagen/binaryen
ce592cbdc8e58f36e7f39a3bd24b403f43adae34
[ "Apache-2.0" ]
2,743
2015-11-13T03:46:49.000Z
2022-03-31T20:27:05.000Z
check.py
sthagen/binaryen
ce592cbdc8e58f36e7f39a3bd24b403f43adae34
[ "Apache-2.0" ]
626
2015-11-23T08:00:11.000Z
2022-03-17T01:58:18.000Z
#!/usr/bin/env python3 # # Copyright 2015 WebAssembly Community Group participants # # 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 # # Unles...
41.908629
183
0.621185
import glob import os import subprocess import sys import unittest from collections import OrderedDict from scripts.test import binaryenjs from scripts.test import lld from scripts.test import shared from scripts.test import support from scripts.test import wasm2js from scripts.test import wasm_opt def get_changelo...
true
true
f75ef592ee062f145b1eb55877bd1a2cba9237be
2,408
py
Python
supar/cmds/biaffine_semantic_dependency.py
ashim95/parser
61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
[ "MIT" ]
1
2021-07-04T13:09:55.000Z
2021-07-04T13:09:55.000Z
supar/cmds/biaffine_semantic_dependency.py
ashim95/parser
61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
[ "MIT" ]
null
null
null
supar/cmds/biaffine_semantic_dependency.py
ashim95/parser
61e9cd6bf16dcf1aa2b9d51b3a6c04ed048b3199
[ "MIT" ]
1
2021-09-10T14:58:02.000Z
2021-09-10T14:58:02.000Z
# -*- coding: utf-8 -*- import argparse from supar import BiaffineSemanticDependencyParser from supar.cmds.cmd import parse def main(): parser = argparse.ArgumentParser(description='Create Biaffine Semantic Dependency Parser.') parser.set_defaults(Parser=BiaffineSemanticDependencyParser) subparsers = pa...
58.731707
124
0.718439
import argparse from supar import BiaffineSemanticDependencyParser from supar.cmds.cmd import parse def main(): parser = argparse.ArgumentParser(description='Create Biaffine Semantic Dependency Parser.') parser.set_defaults(Parser=BiaffineSemanticDependencyParser) subparsers = parser.add_subparsers(titl...
true
true
f75ef6549dd60e6cab09072ee78af03d64256376
2,234
py
Python
saminda/cipres-airavata/sdk/scripts/CipresSubmit/src/CipresSubmit/SubmitLogger.py
SciGaP/DEPRECATED-Cipres-Airavata-POC
a2f3dce75ce6c8e23c8cdde14ece708b5a0ad4ab
[ "Apache-2.0" ]
null
null
null
saminda/cipres-airavata/sdk/scripts/CipresSubmit/src/CipresSubmit/SubmitLogger.py
SciGaP/DEPRECATED-Cipres-Airavata-POC
a2f3dce75ce6c8e23c8cdde14ece708b5a0ad4ab
[ "Apache-2.0" ]
null
null
null
saminda/cipres-airavata/sdk/scripts/CipresSubmit/src/CipresSubmit/SubmitLogger.py
SciGaP/DEPRECATED-Cipres-Airavata-POC
a2f3dce75ce6c8e23c8cdde14ece708b5a0ad4ab
[ "Apache-2.0" ]
null
null
null
""" THis should be modified to be a python "logging" logger. """ import os import urllib import json import pkgutil import pystache from math import ceil class SubmitLogger(object): """ This class does double duty as both a storage container for environment, and a logging/notification system. Perhaps this isn't ...
25.101124
163
0.688899
""" THis should be modified to be a python "logging" logger. """ import os import urllib import json import pkgutil import pystache from math import ceil class SubmitLogger(object): """ This class does double duty as both a storage container for environment, and a logging/notification system. Perhaps this isn't ...
false
true
f75ef68b2e041a5bee120825ecfa745086852749
1,188
py
Python
contests/20210306/abc194/c/main.py
yamap55/atcoder_python
eb000b8df3037a2bba3d3527014bc12770018cb6
[ "MIT" ]
null
null
null
contests/20210306/abc194/c/main.py
yamap55/atcoder_python
eb000b8df3037a2bba3d3527014bc12770018cb6
[ "MIT" ]
7
2021-01-23T06:51:03.000Z
2021-07-26T15:05:44.000Z
contests/20210306/abc194/c/main.py
yamap55/atcoder_python
eb000b8df3037a2bba3d3527014bc12770018cb6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right # type: ignore from collections import Counter, defaultdict, deque # type: ignore from fractions import gcd # type: ignore from heapq import heapify, heappop, heappush, heappushpop, heapreplace, ...
32.108108
103
0.666667
import sys from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right from collections import Counter, defaultdict, deque from fractions import gcd from heapq import heapify, heappop, heappush, heappushpop, heapreplace, merge from itertools import accumulate, combinations, permutations,...
true
true
f75ef6e1d40ac46f6e5e86661fa3826a2699d107
3,421
py
Python
flask/nbaage/lib/python3.9/site-packages/boto3/__init__.py
michaelmarzec/NBA-Age-Analysis
44a2077d00f7eedeff6a03b0009480119cbc2933
[ "MIT" ]
2
2022-01-07T17:14:38.000Z
2022-01-14T22:39:27.000Z
boto3/__init__.py
shepazon/boto3
9b2220fcbc50c5d566ab2a6b5d71b45c66494888
[ "Apache-2.0" ]
null
null
null
boto3/__init__.py
shepazon/boto3
9b2220fcbc50c5d566ab2a6b5d71b45c66494888
[ "Apache-2.0" ]
2
2021-05-07T20:27:06.000Z
2022-03-01T19:40:56.000Z
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # https://aws.amazon.com/apache2.0/ # # or in the "license" file accomp...
30.274336
82
0.707103
import logging from boto3.session import Session from boto3.compat import _warn_deprecated_python __author__ = 'Amazon Web Services' __version__ = '1.20.26' DEFAULT_SESSION = None def setup_default_session(**kwargs): global DEFAULT_SESSION DEFAULT_SESSION = Session(**kwargs) def set_stream_logger(name...
true
true
f75ef883226a2ebf36dce84e5aae3aa3fffc696a
8,741
py
Python
nlpsandbox/model/annotation_set.py
Sage-Bionetworks/nlp-sandbox-client
e51720b35ca3413ccee71b9cdc223ce3578fe0fd
[ "Apache-2.0" ]
3
2021-06-15T16:36:10.000Z
2021-11-15T01:44:46.000Z
nlpsandbox/model/annotation_set.py
nlpsandbox/nlpsandbox-client
8cba4f65ff2c06cbef7dc50f45b0aec9b8ee0476
[ "Apache-2.0" ]
165
2020-11-23T00:36:40.000Z
2022-03-24T00:53:59.000Z
nlpsandbox/model/annotation_set.py
data2health/nlp-sandbox-evaluation
e51720b35ca3413ccee71b9cdc223ce3578fe0fd
[ "Apache-2.0" ]
3
2020-12-11T00:04:13.000Z
2022-01-03T16:59:10.000Z
""" NLP Sandbox API NLP Sandbox REST API # noqa: E501 The version of the OpenAPI document: 1.2.0 Contact: team@nlpsandbox.io Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from nlpsandbox.model_utils import ( # noqa: F401 ApiTypeError, ...
43.705
181
0.630935
import re import sys from nlpsandbox.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f75ef9ee2556629a8991fbf4b49cc52baf61ac48
132
py
Python
solutions/codeforces/200B.py
forxhunter/ComputingIntro
50fa2ac030748626c694ec5c884c5ac32f0b42a8
[ "Apache-2.0" ]
1
2021-01-02T04:31:34.000Z
2021-01-02T04:31:34.000Z
solutions/codeforces/200B.py
forxhunter/ComputingIntro
50fa2ac030748626c694ec5c884c5ac32f0b42a8
[ "Apache-2.0" ]
null
null
null
solutions/codeforces/200B.py
forxhunter/ComputingIntro
50fa2ac030748626c694ec5c884c5ac32f0b42a8
[ "Apache-2.0" ]
null
null
null
''' Drinks ''' n = int(input()) arrays = list(map(int, input().split(' '))) result = sum(arrays) print('{:.12f}'.format(result/n))
14.666667
43
0.583333
n = int(input()) arrays = list(map(int, input().split(' '))) result = sum(arrays) print('{:.12f}'.format(result/n))
true
true
f75efa58f3a0a63b462e4315d87d079cd6f75ae2
389
py
Python
teste5/asgi.py
bruno-dash/teste-5
484cc065673fe859cda571b208be79d82368eeae
[ "MIT" ]
null
null
null
teste5/asgi.py
bruno-dash/teste-5
484cc065673fe859cda571b208be79d82368eeae
[ "MIT" ]
null
null
null
teste5/asgi.py
bruno-dash/teste-5
484cc065673fe859cda571b208be79d82368eeae
[ "MIT" ]
null
null
null
""" ASGI config for teste5 project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTIN...
22.882353
78
0.784062
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'teste5.settings') application = get_asgi_application()
true
true
f75efaabcc0b5ecb2fc4ff6af95b1c8115521e3e
894
py
Python
tests/acquisition/flusurv/test_flusurv.py
chinandrew/delphi-epidata
135e73296fae2ffc782d6654cc7adcb243274262
[ "MIT" ]
1
2021-12-29T04:00:21.000Z
2021-12-29T04:00:21.000Z
tests/acquisition/flusurv/test_flusurv.py
chinandrew/delphi-epidata
135e73296fae2ffc782d6654cc7adcb243274262
[ "MIT" ]
1
2020-07-14T15:35:15.000Z
2020-07-16T17:56:30.000Z
tests/acquisition/flusurv/test_flusurv.py
chinandrew/delphi-epidata
135e73296fae2ffc782d6654cc7adcb243274262
[ "MIT" ]
4
2020-09-17T13:47:02.000Z
2020-10-27T19:40:11.000Z
"""Unit tests for flusurv.py.""" # standard library import unittest from unittest.mock import MagicMock from unittest.mock import sentinel from delphi.epidata.acquisition.flusurv.flusurv import fetch_json # py3tester coverage target __test_target__ = 'delphi.epidata.acquisition.flusurv.flusurv' class FunctionTests...
26.294118
67
0.757271
import unittest from unittest.mock import MagicMock from unittest.mock import sentinel from delphi.epidata.acquisition.flusurv.flusurv import fetch_json __test_target__ = 'delphi.epidata.acquisition.flusurv.flusurv' class FunctionTests(unittest.TestCase): def test_fetch_json(self): path = 'path' payloa...
true
true
f75efb73113d6b57e709920b4e014c1b6d08d5a1
1,518
py
Python
pyquerybuilder/web/profiler.py
vkuznet/PyQueryBuilder
9802ea725b4da727db1d2076ca747f7e0806dadb
[ "BSD-3-Clause" ]
1
2019-12-01T13:27:23.000Z
2019-12-01T13:27:23.000Z
pyquerybuilder/web/profiler.py
vkuznet/PyQueryBuilder
9802ea725b4da727db1d2076ca747f7e0806dadb
[ "BSD-3-Clause" ]
null
null
null
pyquerybuilder/web/profiler.py
vkuznet/PyQueryBuilder
9802ea725b4da727db1d2076ca747f7e0806dadb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python #-*- coding: ISO-8859-1 -*- """ Profiler for Cherrpy web framework. Each api call will trigger a new profile stats dump """ import os import cProfile import cherrypy class CachegrindHandler(cherrypy.dispatch.LateParamPageHandler): """Callable which profiles the subsequent handlers and outpu...
31.625
87
0.615283
""" Profiler for Cherrpy web framework. Each api call will trigger a new profile stats dump """ import os import cProfile import cherrypy class CachegrindHandler(cherrypy.dispatch.LateParamPageHandler): """Callable which profiles the subsequent handlers and outputs cachegrind files.""" def __init__(self, ne...
false
true
f75efbecd7b5be59dc15e46745ea75552f4f7cbc
176
py
Python
tests/signals.py
goalplan/django-model-utils
d3d0881de02b1b7d16d1ca5d2dc3674bcc098b57
[ "BSD-3-Clause" ]
null
null
null
tests/signals.py
goalplan/django-model-utils
d3d0881de02b1b7d16d1ca5d2dc3674bcc098b57
[ "BSD-3-Clause" ]
1
2019-08-07T14:32:26.000Z
2019-08-07T14:32:26.000Z
tests/signals.py
goalplan/django-model-utils
d3d0881de02b1b7d16d1ca5d2dc3674bcc098b57
[ "BSD-3-Clause" ]
null
null
null
def pre_save_test(instance, *args, **kwargs): instance.pre_save_runned = True def post_save_test(instance, created, *args, **kwargs): instance.post_save_runned = True
29.333333
55
0.744318
def pre_save_test(instance, *args, **kwargs): instance.pre_save_runned = True def post_save_test(instance, created, *args, **kwargs): instance.post_save_runned = True
true
true
f75efc90f3648bb74848bdc635c5e5bfcaadeea4
5,795
py
Python
design/cosim/configs/example/ppu/simple_ppu.py
chisuhua/gem5
74694255d90e0892d5f5c4d13f6077cdb9b9cb95
[ "BSD-3-Clause" ]
null
null
null
design/cosim/configs/example/ppu/simple_ppu.py
chisuhua/gem5
74694255d90e0892d5f5c4d13f6077cdb9b9cb95
[ "BSD-3-Clause" ]
null
null
null
design/cosim/configs/example/ppu/simple_ppu.py
chisuhua/gem5
74694255d90e0892d5f5c4d13f6077cdb9b9cb95
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2018 TU Dresden # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of conditions and the following...
38.633333
98
0.681795
from m5.objects import * import pdb use_tlm = False class PPUFUPool(PpuMinorFUPool): funcUnits = [PpuMinorDefaultIntFU(), PpuMinorDefaultIntFU(), PpuMinorDefaultIntMulFU(), PpuMinorDefaultIntDivFU(), PpuMinorDefaultFloatSimdFU(), PpuMinorDefaultMemFU(), PpuMino...
true
true
f75efcfa915f727e8264d2ac06d16fd4e44c38e4
20,464
py
Python
src/lib/proposal_lib.py
Adeeshaj/Digital-Tranformation-Project
0c08c65ed00b7e69f135393552d42328cf31e96e
[ "Apache-2.0" ]
null
null
null
src/lib/proposal_lib.py
Adeeshaj/Digital-Tranformation-Project
0c08c65ed00b7e69f135393552d42328cf31e96e
[ "Apache-2.0" ]
null
null
null
src/lib/proposal_lib.py
Adeeshaj/Digital-Tranformation-Project
0c08c65ed00b7e69f135393552d42328cf31e96e
[ "Apache-2.0" ]
null
null
null
from lib.ml_lib import is_selected from config.proposal import PROPOSAL BOX_TYPES = {"type": "TYPE", "office_use": "OFFICE_USE", "personal_inf": "PERSONAL_INF", "employment_inf": "EMPLOYMENT_INF", "business_inf": "BUSINESS_INF", "causes_of_insolvency": "CAUSES_OF_INSOLVENCY", "transfer_assets": "TRANSFER_ASSETS", "asse...
52.878553
525
0.563038
from lib.ml_lib import is_selected from config.proposal import PROPOSAL BOX_TYPES = {"type": "TYPE", "office_use": "OFFICE_USE", "personal_inf": "PERSONAL_INF", "employment_inf": "EMPLOYMENT_INF", "business_inf": "BUSINESS_INF", "causes_of_insolvency": "CAUSES_OF_INSOLVENCY", "transfer_assets": "TRANSFER_ASSETS", "asse...
true
true
f75efd63503aeacd53469975d288399e399cf562
2,441
py
Python
zywsgi/http_parsed.py
caoziyao/pywframe
96a044134e9887453fa0ca499288ca87c03852d6
[ "MIT" ]
1
2019-05-20T07:36:17.000Z
2019-05-20T07:36:17.000Z
zywsgi/http_parsed.py
caoziyao/pywframe
96a044134e9887453fa0ca499288ca87c03852d6
[ "MIT" ]
null
null
null
zywsgi/http_parsed.py
caoziyao/pywframe
96a044134e9887453fa0ca499288ca87c03852d6
[ "MIT" ]
1
2019-05-20T09:02:30.000Z
2019-05-20T09:02:30.000Z
# coding: utf-8 """ @author: csy @license: (C) Copyright 2017-2018 @contact: wyzycao@gmail.com @time: 2018/11/26 @desc: """ class BaseRequest(object): """ base request class """ def __init__(self, request): self.request = request self._parsed_request() def _parsed_request(self):...
22.394495
72
0.465383
class BaseRequest(object): def __init__(self, request): self.request = request self._parsed_request() def _parsed_request(self): self._parsed_header() self._parsed_body() def _parsed_header(self): headers = self.request.split('\r\n\r\n', 1)[0].split('\r\n')[1:] ...
true
true
f75efdbe060222c27ae08735abb3d1c9c9c32f7b
837
py
Python
sample/deletetopic.py
jasonz93/python-toralimns
95a0bb1699db6518d7285818b5022703f80784f5
[ "MIT" ]
null
null
null
sample/deletetopic.py
jasonz93/python-toralimns
95a0bb1699db6518d7285818b5022703f80784f5
[ "MIT" ]
null
null
null
sample/deletetopic.py
jasonz93/python-toralimns
95a0bb1699db6518d7285818b5022703f80784f5
[ "MIT" ]
null
null
null
#!/usr/bin/env python #coding=utf8 import sys import os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/..") import time from .sample_common import MNSSampleCommon from toralimns.account import Account from toralimns.topic import * #从sample.cfg中读取基本配置信息 ## WARNING: Please do not hard code your acce...
29.892857
133
0.759857
import sys import os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/..") import time from .sample_common import MNSSampleCommon from toralimns.account import Account from toralimns.topic import * accid,acckey,endpoint,token = MNSSampleCommon.LoadConfig() my_account = Account(endpoint, accid, acck...
true
true
f75efdf0ffaf521f513ab032f27afc95875ebe9b
1,626
py
Python
tests/test_style.py
xvzcf/liboqs
a7de77c5042e6c94c1ee94a7c94d0f0477ccd995
[ "MIT" ]
null
null
null
tests/test_style.py
xvzcf/liboqs
a7de77c5042e6c94c1ee94a7c94d0f0477ccd995
[ "MIT" ]
null
null
null
tests/test_style.py
xvzcf/liboqs
a7de77c5042e6c94c1ee94a7c94d0f0477ccd995
[ "MIT" ]
1
2020-10-12T13:30:00.000Z
2020-10-12T13:30:00.000Z
import helpers import pytest import sys @helpers.filtered_test @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not needed on Windows") def test_style(): modified_files = helpers.run_subprocess( ['git', 'status', '-s'] ) if (modified_files != ""): print(modified_files) a...
31.269231
190
0.634686
import helpers import pytest import sys @helpers.filtered_test @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not needed on Windows") def test_style(): modified_files = helpers.run_subprocess( ['git', 'status', '-s'] ) if (modified_files != ""): print(modified_files) a...
true
true
f75efe55e0752308a88d8a370ac20d517a61aa6c
3,481
py
Python
You-Can.py
suliman3177/kingusa123
6cd83198f6c42184c584bdf1a96a3167ddf2a71d
[ "MIT" ]
null
null
null
You-Can.py
suliman3177/kingusa123
6cd83198f6c42184c584bdf1a96a3167ddf2a71d
[ "MIT" ]
null
null
null
You-Can.py
suliman3177/kingusa123
6cd83198f6c42184c584bdf1a96a3167ddf2a71d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 -B #coded By :VIGITMHS #iam not Hacker import marshal as m data = m.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x00\x00@\x00\x00\x00s\xc0\x00\x00\x00d\x00d\x01l\x00Z\x00d\x00d\x01l\x01Z\x01d\x00d\x02l\x02m\x03Z\x03\x01\x00d\x03Z\x04d\x04Z\x05d\x05Z\x06d\x06Z\x0...
580.166667
3,390
0.559322
import marshal as m data = m.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x00\x00@\x00\x00\x00s\xc0\x00\x00\x00d\x00d\x01l\x00Z\x00d\x00d\x01l\x01Z\x01d\x00d\x02l\x02m\x03Z\x03\x01\x00d\x03Z\x04d\x04Z\x05d\x05Z\x06d\x06Z\x07d\x07Z\x08e\x03Z\te\tj\nd\x08d\td\nd\x0bd\x0cd\rd\x0ed\x0f...
true
true
f75efe87c3636f87294096b99cad1c77eb2e8f5b
1,270
py
Python
app/VKSession.py
Ellanity/VK-Utils
104dfe562789dc4d9460e215a70b6fa38a41fb51
[ "Apache-2.0" ]
null
null
null
app/VKSession.py
Ellanity/VK-Utils
104dfe562789dc4d9460e215a70b6fa38a41fb51
[ "Apache-2.0" ]
null
null
null
app/VKSession.py
Ellanity/VK-Utils
104dfe562789dc4d9460e215a70b6fa38a41fb51
[ "Apache-2.0" ]
null
null
null
import vk_api # import requests import os import io from PIL import Image class VKSessionClass: def __init__(self, login, password): try: # session = requests.Session() vk_session = vk_api.VkApi(login, password, captcha_handler=captcha_handler) try: # O...
26.458333
87
0.589764
import vk_api import os import io from PIL import Image class VKSessionClass: def __init__(self, login, password): try: vk_session = vk_api.VkApi(login, password, captcha_handler=captcha_handler) try: vk_session.auth(token_only=True) ...
true
true
f75eff93f54b5d68816941bda0e5bfe951ee62f4
2,768
py
Python
bin/bin_onePT/mvir-0-gather-measurements.py
JohanComparat/nbody-npt-functions
a034db4e5a9b2f87dc42eeb6059c4dd280589e4a
[ "CC0-1.0" ]
4
2017-11-07T02:15:46.000Z
2022-03-03T01:35:53.000Z
bin/bin_onePT/mvir-0-gather-measurements.py
JohanComparat/nbody-npt-functions
a034db4e5a9b2f87dc42eeb6059c4dd280589e4a
[ "CC0-1.0" ]
null
null
null
bin/bin_onePT/mvir-0-gather-measurements.py
JohanComparat/nbody-npt-functions
a034db4e5a9b2f87dc42eeb6059c4dd280589e4a
[ "CC0-1.0" ]
2
2020-08-12T14:26:38.000Z
2021-09-14T06:08:58.000Z
import glob from os.path import join import numpy as n import astropy.io.fits as fits import lib_functions_1pt as lib import os import sys #Quantity studied version = 'v4' qty = "mvir" # one point function lists fileC = n.array(glob.glob( join(os.environ['MD_DIR'], "MD_*Gpc*", version, qty,"out_*_Central_JKresampli...
26.361905
117
0.681358
import glob from os.path import join import numpy as n import astropy.io.fits as fits import lib_functions_1pt as lib import os import sys version = 'v4' qty = "mvir" fileC = n.array(glob.glob( join(os.environ['MD_DIR'], "MD_*Gpc*", version, qty,"out_*_Central_JKresampling.pkl"))) fileB = n.array(glob.glob( join( o...
false
true
f75f003abb6db979f6cd4136612d44abdb25c04e
771
py
Python
configs/HTRPO_FetchReachv1.py
ZhangHanbo/Deep-Reinforcement-Learning-Package
10ab418fcb4807747ebe162920f3df1e80b80a2a
[ "MIT" ]
4
2019-04-20T08:04:46.000Z
2021-12-28T01:55:20.000Z
configs/HTRPO_FetchReachv1.py
ZhangHanbo/Deep-Reinforcement-Learning-Package
10ab418fcb4807747ebe162920f3df1e80b80a2a
[ "MIT" ]
null
null
null
configs/HTRPO_FetchReachv1.py
ZhangHanbo/Deep-Reinforcement-Learning-Package
10ab418fcb4807747ebe162920f3df1e80b80a2a
[ "MIT" ]
1
2020-04-11T13:08:23.000Z
2020-04-11T13:08:23.000Z
from torch.nn import functional as F HTRPOconfig = { 'cg_damping': 1e-3, 'reward_decay': 0.98, 'GAE_lambda': 0., 'max_kl_divergence': 2e-5, 'entropy_weight': 0, 'per_decision': True, 'weighted_is': True, 'using_active_goals' : True, 'hidden_layers': [256, 256, 256], ...
26.586207
59
0.601816
from torch.nn import functional as F HTRPOconfig = { 'cg_damping': 1e-3, 'reward_decay': 0.98, 'GAE_lambda': 0., 'max_kl_divergence': 2e-5, 'entropy_weight': 0, 'per_decision': True, 'weighted_is': True, 'using_active_goals' : True, 'hidden_layers': [256, 256, 256], ...
true
true
f75f00a3ef13c1368eff735c35674841919d7195
17,669
py
Python
pacman.py
hope111799/KMTVarcade
3f5f6e968116f602320125818d76e42d8a0dcb8e
[ "MIT" ]
null
null
null
pacman.py
hope111799/KMTVarcade
3f5f6e968116f602320125818d76e42d8a0dcb8e
[ "MIT" ]
null
null
null
pacman.py
hope111799/KMTVarcade
3f5f6e968116f602320125818d76e42d8a0dcb8e
[ "MIT" ]
null
null
null
# ----------------------Attribution Started--------------------------- # Code created by hbokmann # Uploaded from Pacman Repository: http://hbokmann.github.com/Pacman/ # # Minor changes made to images used # -----------------------Attribution Closed-------------------------- #Pacman in Python with PyGame #https://git...
29.846284
121
0.51231
import pygame def main(): black = (0,0,0) white = (255,255,255) blue = (0,0,255) green = (0,255,0) red = (255,0,0) purple = (255,0,255) yellow = ( 255, 255, 0) pacman=pygame.image.load('pacman_icon.png') pygame.display.set_icon(pacman) pygame.mixer.init() pygam...
true
true
f75f010610ca014aa79dbeb0cdb225368ed98d0c
8,056
py
Python
md2html/md2html.py
woggioni/md2html
270767c3cd8b13b8260f709f45bb2fea1870735a
[ "MIT" ]
null
null
null
md2html/md2html.py
woggioni/md2html
270767c3cd8b13b8260f709f45bb2fea1870735a
[ "MIT" ]
null
null
null
md2html/md2html.py
woggioni/md2html
270767c3cd8b13b8260f709f45bb2fea1870735a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import hashlib import sys import threading from http.server import BaseHTTPRequestHandler, socketserver, HTTPServer from os.path import basename, dirname, abspath, join from urllib.parse import urlparse import markdown STATIC_CACHE = {} def load_from_cache(path): global S...
37.64486
115
0.589747
import argparse import hashlib import sys import threading from http.server import BaseHTTPRequestHandler, socketserver, HTTPServer from os.path import basename, dirname, abspath, join from urllib.parse import urlparse import markdown STATIC_CACHE = {} def load_from_cache(path): global STATIC_CACHE if path...
true
true
f75f0137fbd3b17f5fa1e3f0147543b310f14823
27,502
py
Python
ichnaea/api/locate/tests/base.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2019-05-12T05:51:19.000Z
2019-05-12T05:51:19.000Z
ichnaea/api/locate/tests/base.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
null
null
null
ichnaea/api/locate/tests/base.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
null
null
null
import operator import requests_mock import simplejson as json from ichnaea.api.exceptions import ( DailyLimitExceeded, InvalidAPIKey, LocationNotFound, ParseError, ) from ichnaea.api.locate.constants import ( BLUE_MIN_ACCURACY, BLUE_MAX_ACCURACY, CELL_MIN_ACCURACY, CELL_MAX_ACCURACY, ...
38.735211
79
0.553232
import operator import requests_mock import simplejson as json from ichnaea.api.exceptions import ( DailyLimitExceeded, InvalidAPIKey, LocationNotFound, ParseError, ) from ichnaea.api.locate.constants import ( BLUE_MIN_ACCURACY, BLUE_MAX_ACCURACY, CELL_MIN_ACCURACY, CELL_MAX_ACCURACY, ...
true
true
f75f047d38ecf4636d44140c2e270592384fd413
924
py
Python
exploracao_espacial/urls.py
DanielPBL/cefet-web-space-django
e592e1183eac3d888269d6670aad72792705c521
[ "MIT" ]
null
null
null
exploracao_espacial/urls.py
DanielPBL/cefet-web-space-django
e592e1183eac3d888269d6670aad72792705c521
[ "MIT" ]
null
null
null
exploracao_espacial/urls.py
DanielPBL/cefet-web-space-django
e592e1183eac3d888269d6670aad72792705c521
[ "MIT" ]
null
null
null
"""exploracao_espacial URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name=...
36.96
78
0.686147
from django.contrib import admin from django.urls import path from space.views import Home, Philae urlpatterns = [ path('admin/', admin.site.urls), path('', Home.as_view(), name='home'), path('sobre-philae', Philae.as_view(), name='philae'), ]
true
true
f75f04ebbf0ddbbfe56c552cf1e688b5e3351eab
366
py
Python
examples/async/scripts/async_example.py
thisjeremiah/td-resources
ce0a566cb0da191a100c987a1fd70dbf2100bfe4
[ "MIT" ]
4
2018-10-14T16:06:14.000Z
2022-02-13T13:23:48.000Z
examples/async/scripts/async_example.py
thisjeremiah/td-resources
ce0a566cb0da191a100c987a1fd70dbf2100bfe4
[ "MIT" ]
null
null
null
examples/async/scripts/async_example.py
thisjeremiah/td-resources
ce0a566cb0da191a100c987a1fd70dbf2100bfe4
[ "MIT" ]
1
2018-10-12T16:57:28.000Z
2018-10-12T16:57:28.000Z
def deferRun(fn, delayFrames=0): run('args[0]()', fn, fromOP=me, delayFrames=delayFrames) class Async: def __init__(self, name): self.name = name def sayHello(self): print('Hello ' + self.name) deferRun(self.sayGoodbye, delayFrames=me.time.rate * 1) def sayGoodbye(s...
26.142857
64
0.601093
def deferRun(fn, delayFrames=0): run('args[0]()', fn, fromOP=me, delayFrames=delayFrames) class Async: def __init__(self, name): self.name = name def sayHello(self): print('Hello ' + self.name) deferRun(self.sayGoodbye, delayFrames=me.time.rate * 1) def sayGoodbye(s...
true
true
f75f04fffe8946b5812c13ec777c4749c2ccae8f
95
py
Python
CSC-308/Python/Loop.py
FrancesCoronel/cs-hu
ecd103a525fd312146d3b6c69ee7c1452548c5e2
[ "MIT" ]
2
2016-12-05T06:15:34.000Z
2016-12-15T10:56:50.000Z
CSC-308/Python/Loop.py
fvcproductions/CS-HU
ecd103a525fd312146d3b6c69ee7c1452548c5e2
[ "MIT" ]
null
null
null
CSC-308/Python/Loop.py
fvcproductions/CS-HU
ecd103a525fd312146d3b6c69ee7c1452548c5e2
[ "MIT" ]
3
2019-04-06T01:45:54.000Z
2020-04-24T16:55:32.000Z
# # Loop # for i in range(1,11): print(i) input('Press any key to continue . . .')
11.875
41
0.526316
for i in range(1,11): print(i) input('Press any key to continue . . .')
true
true
f75f057fe2444b7f9fd7817730ddffc803326a3f
1,576
py
Python
Week6/Paddle.py
johnlev/coderdojo-curriculum
3ad81d810d22e3bff57e9de627f9f61c35a4cf86
[ "MIT" ]
1
2018-01-25T21:45:07.000Z
2018-01-25T21:45:07.000Z
Week6/Paddle.py
johnlev/coderdojo-curriculum
3ad81d810d22e3bff57e9de627f9f61c35a4cf86
[ "MIT" ]
null
null
null
Week6/Paddle.py
johnlev/coderdojo-curriculum
3ad81d810d22e3bff57e9de627f9f61c35a4cf86
[ "MIT" ]
null
null
null
""" Week 6 - Paddle Class --------- AUTHOR: Edward Camp """ from cs1lib import * class Paddle: def __init__(self, x, y, width, height, r, g, b, paddleName, game): self.game = game self.x = x self.y = y self.width = width self.height = height self.r ...
27.172414
104
0.534264
from cs1lib import * class Paddle: def __init__(self, x, y, width, height, r, g, b, paddleName, game): self.game = game self.x = x self.y = y self.width = width self.height = height self.r = r self.g = g self.b = b self.paddl...
true
true
f75f059153acf33d836c7d6795bf50abef76d94b
2,487
py
Python
scrapy/fang_data/fang_price/fang_price/pipelines.py
noogel/xyzStudyPython
521cee4dc033e2ab1032b561a3229eed75d8067a
[ "Apache-2.0" ]
2
2016-07-19T09:23:27.000Z
2016-09-27T17:21:24.000Z
scrapy/fang_data/fang_price/fang_price/pipelines.py
noogel/xyzStudyPython
521cee4dc033e2ab1032b561a3229eed75d8067a
[ "Apache-2.0" ]
null
null
null
scrapy/fang_data/fang_price/fang_price/pipelines.py
noogel/xyzStudyPython
521cee4dc033e2ab1032b561a3229eed75d8067a
[ "Apache-2.0" ]
1
2020-07-23T17:09:19.000Z
2020-07-23T17:09:19.000Z
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import os import sys import datetime import logging import subprocess import MySQLdb.cursors from twisted.enterprise import adba...
34.541667
94
0.507439
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import os import sys import datetime import logging import subprocess import MySQLdb.cursors from twisted.enterprise import adbapi from fang_price.lib import utils class FangPricePipeline(object): def __init__(self): self.dbpool = adbapi.C...
true
true
f75f06a9eddd5df87962c88192c34419f60078d6
1,514
py
Python
tests/test_client.py
bahalbach/pbpstats
6a9f602764edb7a3ee0e880fffbb5aa34990d6e9
[ "MIT" ]
54
2019-10-16T00:10:51.000Z
2022-03-19T21:21:05.000Z
tests/test_client.py
bahalbach/pbpstats
6a9f602764edb7a3ee0e880fffbb5aa34990d6e9
[ "MIT" ]
15
2019-11-19T01:20:52.000Z
2022-02-04T13:38:37.000Z
tests/test_client.py
bahalbach/pbpstats
6a9f602764edb7a3ee0e880fffbb5aa34990d6e9
[ "MIT" ]
15
2019-11-19T11:54:51.000Z
2022-03-21T05:08:53.000Z
import pytest from pbpstats.client import Client from pbpstats.data_loader.stats_nba.boxscore.file import StatsNbaBoxscoreFileLoader from pbpstats.data_loader.stats_nba.boxscore.loader import StatsNbaBoxscoreLoader from pbpstats.resources.boxscore.boxscore import Boxscore def test_client_sets_object_attrs(): set...
28.566038
83
0.694188
import pytest from pbpstats.client import Client from pbpstats.data_loader.stats_nba.boxscore.file import StatsNbaBoxscoreFileLoader from pbpstats.data_loader.stats_nba.boxscore.loader import StatsNbaBoxscoreLoader from pbpstats.resources.boxscore.boxscore import Boxscore def test_client_sets_object_attrs(): set...
true
true
f75f06f55381244640bb3cff05daf48839875cbf
393
py
Python
altuntas/altuntas/wsgi.py
altuntasmuhammet/eksisozluk-scraper
fe000834abf40aeb370e10e65ec61d87dff78d7f
[ "MIT" ]
5
2021-07-10T19:32:18.000Z
2021-12-09T18:44:23.000Z
altuntas/altuntas/wsgi.py
altuntasmuhammet/eksisozluk-scraper
fe000834abf40aeb370e10e65ec61d87dff78d7f
[ "MIT" ]
null
null
null
altuntas/altuntas/wsgi.py
altuntasmuhammet/eksisozluk-scraper
fe000834abf40aeb370e10e65ec61d87dff78d7f
[ "MIT" ]
null
null
null
""" WSGI config for altuntas 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/3.2/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', 'altuntas.settings') application = get_wsgi_application()
true
true
f75f07ef243b150d48d6546e93e7d35a9b5a9894
490
py
Python
test/mitmproxy/tools/test_main.py
illera88/mitmproxy
4f464001841e5119bf57ef620a3257892ded2ded
[ "MIT" ]
74
2016-03-20T17:39:26.000Z
2020-05-12T13:53:23.000Z
test/mitmproxy/tools/test_main.py
illera88/mitmproxy
4f464001841e5119bf57ef620a3257892ded2ded
[ "MIT" ]
18
2020-12-28T20:12:26.000Z
2022-03-15T20:44:40.000Z
test/mitmproxy/tools/test_main.py
illera88/mitmproxy
4f464001841e5119bf57ef620a3257892ded2ded
[ "MIT" ]
5
2016-12-14T14:56:57.000Z
2020-03-08T20:58:31.000Z
import asyncio from mitmproxy.tools import main shutdown_script = "mitmproxy/data/addonscripts/shutdown.py" def test_mitmweb(event_loop, tdata): asyncio.set_event_loop(event_loop) main.mitmweb([ "--no-web-open-browser", "-s", tdata.path(shutdown_script), "-q", "-p", "0", ]) de...
20.416667
59
0.630612
import asyncio from mitmproxy.tools import main shutdown_script = "mitmproxy/data/addonscripts/shutdown.py" def test_mitmweb(event_loop, tdata): asyncio.set_event_loop(event_loop) main.mitmweb([ "--no-web-open-browser", "-s", tdata.path(shutdown_script), "-q", "-p", "0", ]) de...
true
true
f75f085d572f685be331b8b8bad9c0d0e569939f
712
py
Python
catkin_ws/build/srrg2_solver_calib_addons/catkin_generated/pkg.develspace.context.pc.py
laaners/progetto-labiagi_pick_e_delivery
3453bfbc1dd7562c78ba06c0f79b069b0a952c0e
[ "MIT" ]
null
null
null
catkin_ws/build/srrg2_solver_calib_addons/catkin_generated/pkg.develspace.context.pc.py
laaners/progetto-labiagi_pick_e_delivery
3453bfbc1dd7562c78ba06c0f79b069b0a952c0e
[ "MIT" ]
null
null
null
catkin_ws/build/srrg2_solver_calib_addons/catkin_generated/pkg.develspace.context.pc.py
laaners/progetto-labiagi_pick_e_delivery
3453bfbc1dd7562c78ba06c0f79b069b0a952c0e
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/alessiohu/Desktop/progetto-labiagi/catkin_ws/src/srrg2_solver/srrg2_solver_calib_addons/src".split(';') if "/home/alessiohu/Desktop/progetto-labiagi/catkin_ws/src/srrg2_solver/srrg2_solver_calib_...
79.111111
261
0.80618
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/alessiohu/Desktop/progetto-labiagi/catkin_ws/src/srrg2_solver/srrg2_solver_calib_addons/src".split(';') if "/home/alessiohu/Desktop/progetto-labiagi/catkin_ws/src/srrg2_solver/srrg2_solver_calib_addons/src" != "" else [] PROJECT_CATKIN_DEPENDS = "".rep...
true
true
f75f08d8bc08af6ae97b9dc737f3e6576289aee6
3,045
py
Python
python/dev/cpp/basic/src/tcp.py
MomsFriendlyRobotCompany/gecko
f340381113bdb423a39d47aaee61e013bb9e002a
[ "MIT" ]
3
2019-06-13T07:52:12.000Z
2020-07-05T13:28:43.000Z
python/dev/cpp/basic/src/tcp.py
MomsFriendlyRobotCompany/gecko
f340381113bdb423a39d47aaee61e013bb9e002a
[ "MIT" ]
23
2017-07-07T01:29:33.000Z
2018-11-23T18:41:08.000Z
python/dev/cpp/basic/src/tcp.py
MomsFriendlyRobotCompany/gecko
f340381113bdb423a39d47aaee61e013bb9e002a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################## # The MIT License (MIT) # Copyright (c) 2018 Kevin Walchko # see LICENSE for full details ############################################## from pygecko.multiprocessing import geckopy from pygecko.multiprocessing import GeckoSim...
26.946903
78
0.582266
from pygecko.multiprocessing import geckopy from pygecko.multiprocessing import GeckoSimpleProcess import time def chew_up_cpu(interval): start = time.time() while (time.time() - start) < interval: 5*5 def publisher(**kwargs): geckopy.init_node(**kwargs) rate = geckopy.Rate(2) topic = kwa...
true
true
f75f0960b3f9a6e6e05f1edfcd20c2b6db57dda7
1,111
py
Python
job/zp58/zp58/pipelines.py
iznilul/Recruitment-spider
6d24981a681278075a47696dc4e23928e94792f4
[ "Apache-2.0" ]
1
2021-12-02T07:31:08.000Z
2021-12-02T07:31:08.000Z
job/zp58/zp58/pipelines.py
iznilul/Recruitment-spider
6d24981a681278075a47696dc4e23928e94792f4
[ "Apache-2.0" ]
1
2021-12-27T07:23:13.000Z
2021-12-27T07:23:13.000Z
job/zp58/zp58/pipelines.py
iznilul/Recruitment-spider
6d24981a681278075a47696dc4e23928e94792f4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import pymysql import logging from zp58.settings import * class AbroadwebsitePipeline(object): def __init__(self): ...
34.71875
127
0.659766
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import pymysql import logging from zp58.settings import * class AbroadwebsitePipeline(object): def __init__(self): self.connect=pymysql.connect(MYSQL_HOST,MYSQL_ROOT,MYSQL_PASSWORD,MYSQL_DATABASE) self.cursor=self.connect.cursor() ...
true
true
f75f0978add41d15240096e3a148e65e9de141ab
26,660
py
Python
tiled/client/context.py
jmaruland/tiled
75e76e6b4ed5a93b965625652a23bd5b8590808f
[ "BSD-3-Clause" ]
15
2021-03-31T18:46:05.000Z
2022-03-31T16:25:13.000Z
tiled/client/context.py
jmaruland/tiled
75e76e6b4ed5a93b965625652a23bd5b8590808f
[ "BSD-3-Clause" ]
125
2021-03-15T13:11:42.000Z
2022-03-31T16:03:30.000Z
tiled/client/context.py
jmaruland/tiled
75e76e6b4ed5a93b965625652a23bd5b8590808f
[ "BSD-3-Clause" ]
17
2021-04-29T20:21:20.000Z
2022-03-25T12:59:15.000Z
import contextlib import enum import getpass import os import secrets import threading import urllib.parse from pathlib import Path, PurePosixPath import appdirs import httpx import msgpack from ..utils import DictView from .cache import Revalidate from .utils import ( ASYNC_EVENT_HOOKS, DEFAULT_ACCEPTED_ENCO...
36.470588
140
0.596849
import contextlib import enum import getpass import os import secrets import threading import urllib.parse from pathlib import Path, PurePosixPath import appdirs import httpx import msgpack from ..utils import DictView from .cache import Revalidate from .utils import ( ASYNC_EVENT_HOOKS, DEFAULT_ACCEPTED_ENCO...
true
true
f75f0a6af75f24a11607701db742c4ae9eb53718
4
py
Python
my_classes/.history/ModulesPackages_PackageNamespaces/example3b/module1_source_20210726185641.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/ModulesPackages_PackageNamespaces/example3b/module1_source_20210726185641.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/ModulesPackages_PackageNamespaces/example3b/module1_source_20210726185641.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
pr
1.333333
2
0.5
pr
true
true
f75f0c8eb84a138e0127ddc6e1c9dcd41a6178c4
263
py
Python
Python_for_Everybody-Coursera/CHAPTER_3/stuff.py
andresdelarosa1887/Public-Projects
db8d8e0c0f5f0f7326346462fcdfe21ce8142a12
[ "Unlicense" ]
1
2020-09-29T17:29:34.000Z
2020-09-29T17:29:34.000Z
Python_for_Everybody-Coursera/CHAPTER_3/stuff.py
andresdelarosa1887/Public-Projects
db8d8e0c0f5f0f7326346462fcdfe21ce8142a12
[ "Unlicense" ]
null
null
null
Python_for_Everybody-Coursera/CHAPTER_3/stuff.py
andresdelarosa1887/Public-Projects
db8d8e0c0f5f0f7326346462fcdfe21ce8142a12
[ "Unlicense" ]
null
null
null
x= 93 y= input("Please enter your age") age= int(y) if age > 3 and age < 12: print("You are a child") elif age >= 12 and age < 21: print("You are a teenager") else: print("You are very old") x="cheater be like" y= " other piece" print("hello", x+y)
17.533333
33
0.612167
x= 93 y= input("Please enter your age") age= int(y) if age > 3 and age < 12: print("You are a child") elif age >= 12 and age < 21: print("You are a teenager") else: print("You are very old") x="cheater be like" y= " other piece" print("hello", x+y)
true
true
f75f0d74b4718bb469da1fcf63fc4574a27bc3e7
2,180
py
Python
test/test-metrics.py
PhilSk/ann-jaccard
89b5cb0125d111663a1894996c07c4a7505d1918
[ "MIT" ]
7
2016-04-22T15:40:56.000Z
2018-09-11T21:13:27.000Z
test/test-metrics.py
PhilSk/ann-jaccard
89b5cb0125d111663a1894996c07c4a7505d1918
[ "MIT" ]
19
2020-11-04T13:18:15.000Z
2021-01-01T12:59:23.000Z
test/test-metrics.py
PhilSk/ann-jaccard
89b5cb0125d111663a1894996c07c4a7505d1918
[ "MIT" ]
1
2019-07-21T14:40:12.000Z
2019-07-21T14:40:12.000Z
import unittest from ann_benchmarks.plotting.metrics import knn, queries_per_second,\ index_size, build_time, candidates, epsilon, rel class TestMetrics(unittest.TestCase): def setUp(self): pass def test_recall(self): exact_queries = [[0.1, 0.25]] run1 = [[]] run2 = [[...
34.0625
83
0.597706
import unittest from ann_benchmarks.plotting.metrics import knn, queries_per_second,\ index_size, build_time, candidates, epsilon, rel class TestMetrics(unittest.TestCase): def setUp(self): pass def test_recall(self): exact_queries = [[0.1, 0.25]] run1 = [[]] run2 = [[...
true
true
f75f0d92dd8ff9e3ace91a45313550a7fb1e8c49
64,721
py
Python
pyodata/v2/service.py
allan-cedric/python-pyodata
7d406a64e863f1f7da941ba53a535fa08e4c2c05
[ "Apache-2.0" ]
null
null
null
pyodata/v2/service.py
allan-cedric/python-pyodata
7d406a64e863f1f7da941ba53a535fa08e4c2c05
[ "Apache-2.0" ]
null
null
null
pyodata/v2/service.py
allan-cedric/python-pyodata
7d406a64e863f1f7da941ba53a535fa08e4c2c05
[ "Apache-2.0" ]
1
2022-03-08T16:58:53.000Z
2022-03-08T16:58:53.000Z
"""OData service implementation Details regarding batch requests and changesets: http://www.odata.org/documentation/odata-version-2-0/batch-processing/ """ # pylint: disable=too-many-lines import logging from functools import partial import json import random from email.parser import Parser from http.client im...
35.212731
120
0.619752
import logging from functools import partial import json import random from email.parser import Parser from http.client import HTTPResponse from io import BytesIO from urllib.parse import urlencode from pyodata.exceptions import HttpError, PyODataException, ExpressionError, ProgramError from . import model LOGGER_...
true
true
f75f0eba72d4348f303d5bc76d3c8029d51db2d4
374
py
Python
Strings/formatMethod.py
poojavaibhavsahu/Pooja_Python
58122bfa8586883145042b11fe1cc013c803ab4f
[ "bzip2-1.0.6" ]
null
null
null
Strings/formatMethod.py
poojavaibhavsahu/Pooja_Python
58122bfa8586883145042b11fe1cc013c803ab4f
[ "bzip2-1.0.6" ]
null
null
null
Strings/formatMethod.py
poojavaibhavsahu/Pooja_Python
58122bfa8586883145042b11fe1cc013c803ab4f
[ "bzip2-1.0.6" ]
null
null
null
# format is a function for represenatation of your strings only # using format option in a simple string print("{} How are you".format("Hello")) # using format option for a value stored in a variable str = "This code is written in {}" print(str.format("Python")) # formatting a string using a numeric co...
14.384615
63
0.697861
print("{} How are you".format("Hello")) str = "This code is written in {}" print(str.format("Python")) print("Hello, I am {} years old !".format(18))
true
true
f75f0f4d126b36e54769f88c4f18b67dbd0afe77
4,519
py
Python
cosmosis/postprocessing/reruns.py
annis/cosmosis
55efc1bc2260ca39298c584ae809fa2a8e72a38e
[ "BSD-2-Clause" ]
2
2021-06-18T14:11:59.000Z
2022-02-23T19:19:36.000Z
cosmosis/postprocessing/reruns.py
annis/cosmosis
55efc1bc2260ca39298c584ae809fa2a8e72a38e
[ "BSD-2-Clause" ]
2
2021-11-02T12:44:24.000Z
2022-03-30T15:09:48.000Z
cosmosis/postprocessing/reruns.py
annis/cosmosis
55efc1bc2260ca39298c584ae809fa2a8e72a38e
[ "BSD-2-Clause" ]
2
2022-03-25T21:26:27.000Z
2022-03-29T06:37:46.000Z
from .elements import PostProcessorElement from cosmosis.runtime.config import Inifile import os import tempfile import sys from collections import defaultdict def ini_from_header(header_text): """ Parse a cosmosis-format set of header comments that encode the parameters and values used in a run. These lines use ...
27.222892
99
0.673379
from .elements import PostProcessorElement from cosmosis.runtime.config import Inifile import os import tempfile import sys from collections import defaultdict def ini_from_header(header_text): state=None param_lines = [] value_lines = [] prior_lines = [] for line in header_text: line=line.strip() if line=='S...
true
true
f75f0f6db9a97c9c9d8b8aff71cfec1cec585535
2,529
py
Python
research/morph_net/framework/concat_and_slice_regularizers_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
1
2021-05-17T01:42:29.000Z
2021-05-17T01:42:29.000Z
research/morph_net/framework/concat_and_slice_regularizers_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
research/morph_net/framework/concat_and_slice_regularizers_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
42.15
80
0.642151
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from research.morph_net.framework import concat_and_slice_regularizers from research.morph_net.testing import op_regularizer_stub class ConcatAndSliceRegularizersTest(tf.test.TestCas...
true
true
f75f10b73659b2a0b1773878cea57701dc7c283f
18,509
py
Python
tests/layers/test_layers_convolution.py
OliverZijia/tensorlayer2
01113b53e84a3bbb298b9c35ebd53254e487350f
[ "Apache-2.0" ]
null
null
null
tests/layers/test_layers_convolution.py
OliverZijia/tensorlayer2
01113b53e84a3bbb298b9c35ebd53254e487350f
[ "Apache-2.0" ]
null
null
null
tests/layers/test_layers_convolution.py
OliverZijia/tensorlayer2
01113b53e84a3bbb298b9c35ebd53254e487350f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf import tensorlayer as tl from tensorlayer.layers import * from tensorlayer.models import * from tests.utils import CustomTestCase class Layer_Convolution_1D_Test(CustomTestCase)...
38.084362
134
0.607164
import os import unittest os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf import tensorlayer as tl from tensorlayer.layers import * from tensorlayer.models import * from tests.utils import CustomTestCase class Layer_Convolution_1D_Test(CustomTestCase): @classmethod def setUpClass(cls): ...
true
true
f75f10c15a3a1b66c63c1c7d2058ccab8d7c13eb
1,231
py
Python
data/musicbrainz/cover_art/covers.py
johndimm/headliners-and-sidemen
aaa5fdc854029f5289b0bebce90c8d5810ad9d53
[ "MIT" ]
1
2021-10-11T18:00:36.000Z
2021-10-11T18:00:36.000Z
data/musicbrainz/cover_art/covers.py
johndimm/headliners-and-sidemen
aaa5fdc854029f5289b0bebce90c8d5810ad9d53
[ "MIT" ]
null
null
null
data/musicbrainz/cover_art/covers.py
johndimm/headliners-and-sidemen
aaa5fdc854029f5289b0bebce90c8d5810ad9d53
[ "MIT" ]
null
null
null
:import urllib.request, json import time def download_image_info (gid, output): cover_url = 'https://coverartarchive.org/release-group/%s?fmt=json' % gid print (gid, cover_url) try: with urllib.request.urlopen(cover_url) as url: try: data = json.loads(url.read().decode()) ...
26.191489
87
0.549959
:import urllib.request, json import time def download_image_info (gid, output): cover_url = 'https://coverartarchive.org/release-group/%s?fmt=json' % gid print (gid, cover_url) try: with urllib.request.urlopen(cover_url) as url: try: data = json.loads(url.read().decode()) ...
false
true
f75f111331e6e28bdc4ef291111a42041cfd5cdf
6,820
py
Python
models/head/rotary_base.py
Mirmik/zippo
50097d9b33c165d8f6a8ec65b22db4b1c4e1f61c
[ "MIT" ]
null
null
null
models/head/rotary_base.py
Mirmik/zippo
50097d9b33c165d8f6a8ec65b22db4b1c4e1f61c
[ "MIT" ]
null
null
null
models/head/rotary_base.py
Mirmik/zippo
50097d9b33c165d8f6a8ec65b22db4b1c4e1f61c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from zencad import * from globals import * from room import Room from rotplate import RotationPlate #zencad.lazy.fastdo=True class Fork(zencad.assemble.unit): def __init__(self): super().__init__() def fork(self): h = 15 hear_x = 95/2 hear_z = 44 hear_R = 28/2 hear_h = 15 yk...
26.434109
125
0.627126
from zencad import * from globals import * from room import Room from rotplate import RotationPlate class Fork(zencad.assemble.unit): def __init__(self): super().__init__() def fork(self): h = 15 hear_x = 95/2 hear_z = 44 hear_R = 28/2 hear_h = 15 yk = hear_R * 3 / 4 R = ROOF_R iR = ROOF_R - T...
true
true
f75f11558928c6b962f61524cfe46fda904acb6a
524
py
Python
FileModified.py
userforbidden/Python-Samples
95c4cd12d59ff2f974744c335597ca3e3dcb9f2d
[ "MIT" ]
1
2019-11-08T21:06:00.000Z
2019-11-08T21:06:00.000Z
FileModified.py
userforbidden/Python-Samples
95c4cd12d59ff2f974744c335597ca3e3dcb9f2d
[ "MIT" ]
null
null
null
FileModified.py
userforbidden/Python-Samples
95c4cd12d59ff2f974744c335597ca3e3dcb9f2d
[ "MIT" ]
null
null
null
import pathlib from datetime import datetime fname = pathlib.Path('thenewFile.txt') if fname.exists(): mtime = datetime.fromtimestamp(fname.stat().st_mtime) mtimeString = datetime.strftime(mtime,'%Y-%m-%d') nowtimeString = datetime.strftime(datetime.now(),'%Y-%m-%d') if mtimeString != nowtimeString:...
27.578947
64
0.688931
import pathlib from datetime import datetime fname = pathlib.Path('thenewFile.txt') if fname.exists(): mtime = datetime.fromtimestamp(fname.stat().st_mtime) mtimeString = datetime.strftime(mtime,'%Y-%m-%d') nowtimeString = datetime.strftime(datetime.now(),'%Y-%m-%d') if mtimeString != nowtimeString:...
true
true
f75f125cc6c7634ba52c09bbe472276b184622ca
7,060
py
Python
FlappyBird/FlappyBird.py
AbelRapha/pythonGames
905375162ede2c759f24a75efa6506f8305975be
[ "MIT" ]
null
null
null
FlappyBird/FlappyBird.py
AbelRapha/pythonGames
905375162ede2c759f24a75efa6506f8305975be
[ "MIT" ]
null
null
null
FlappyBird/FlappyBird.py
AbelRapha/pythonGames
905375162ede2c759f24a75efa6506f8305975be
[ "MIT" ]
null
null
null
import pygame import os import random TELA_LARGURA = 500 TELA_ALTURA = 800 IMAGEM_CANO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'pipe.png'))) IMAGEM_CHAO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'base.png'))) IMAGEM_BACKGROUND = pygame.transform.scale2x(pygame.image.l...
30.431034
95
0.597734
import pygame import os import random TELA_LARGURA = 500 TELA_ALTURA = 800 IMAGEM_CANO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'pipe.png'))) IMAGEM_CHAO = pygame.transform.scale2x(pygame.image.load(os.path.join('imgs', 'base.png'))) IMAGEM_BACKGROUND = pygame.transform.scale2x(pygame.image.l...
true
true
f75f128582f0a200bd878096a4419bc8f288bfd2
4,897
py
Python
tests/scanner/audit/lien_rules_engine_test.py
BrunoReboul/forseti-security
9d4a61b3e5a5d22a4330d15ddf61063fc9079071
[ "Apache-2.0" ]
1
2018-10-06T23:16:59.000Z
2018-10-06T23:16:59.000Z
tests/scanner/audit/lien_rules_engine_test.py
BrunoReboul/forseti-security
9d4a61b3e5a5d22a4330d15ddf61063fc9079071
[ "Apache-2.0" ]
null
null
null
tests/scanner/audit/lien_rules_engine_test.py
BrunoReboul/forseti-security
9d4a61b3e5a5d22a4330d15ddf61063fc9079071
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security 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 ap...
35.230216
80
0.700837
import copy import itertools import json import mock import tempfile import unittest import yaml from tests.unittest_utils import ForsetiTestCase from google.cloud.forseti.common.gcp_type import lien from google.cloud.forseti.common.gcp_type import resource from google.cloud.forseti.common.util import file_loader fr...
true
true
f75f149bc1f3080173be2899d2791fbfa4211876
1,075
py
Python
setup.py
mylokin/schematec
b965afe44cd71d50367b7a9648aa41d6a6c31d21
[ "MIT" ]
null
null
null
setup.py
mylokin/schematec
b965afe44cd71d50367b7a9648aa41d6a6c31d21
[ "MIT" ]
null
null
null
setup.py
mylokin/schematec
b965afe44cd71d50367b7a9648aa41d6a6c31d21
[ "MIT" ]
null
null
null
import re try: from setuptools import setup except ImportError: from distutils.core import setup version = '' with open('schematec/__init__.py', 'r') as fd: regex = re.compile(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]') for line in fd: m = regex.match(line) if m: version = m....
27.564103
71
0.589767
import re try: from setuptools import setup except ImportError: from distutils.core import setup version = '' with open('schematec/__init__.py', 'r') as fd: regex = re.compile(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]') for line in fd: m = regex.match(line) if m: version = m....
true
true
f75f17c0386e7de81898603b09c562513185f3ad
12,927
py
Python
gcp_hpo/search_utils.py
afifa125/Automated-Feature-Synthesis
8e49db6108b859d5f7eedd6331e6c7a2c4effd91
[ "BSD-3-Clause" ]
null
null
null
gcp_hpo/search_utils.py
afifa125/Automated-Feature-Synthesis
8e49db6108b859d5f7eedd6331e6c7a2c4effd91
[ "BSD-3-Clause" ]
null
null
null
gcp_hpo/search_utils.py
afifa125/Automated-Feature-Synthesis
8e49db6108b859d5f7eedd6331e6c7a2c4effd91
[ "BSD-3-Clause" ]
null
null
null
""" Utilities for the SmartSearch class. """ # Author: Sebastien Dubois # for ALFA Group, CSAIL, MIT # The MIT License (MIT) # Copyright (c) 2015 Sebastien Dubois # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"),...
36.008357
140
0.729713
""" Utilities for the SmartSearch class. """ import numpy as np from random import randint, randrange from sklearn.gaussian_process import GaussianProcess from scipy import integrate from scipy.stats import norm from gcp_hpo.gcp.gcp import GaussianCopulaProcess max_f_value = 1. def find_best_candidate(model, X...
false
true
f75f185e2bace4cabb8e6a468be650690f0bd712
4,731
py
Python
django_compose/management/commands/compose.py
pawnhearts/django_compose
e07d5cae866cee6d125e14fb7952c4f4cd41f840
[ "MIT" ]
null
null
null
django_compose/management/commands/compose.py
pawnhearts/django_compose
e07d5cae866cee6d125e14fb7952c4f4cd41f840
[ "MIT" ]
null
null
null
django_compose/management/commands/compose.py
pawnhearts/django_compose
e07d5cae866cee6d125e14fb7952c4f4cd41f840
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field, asdict from django.core.management.base import BaseCommand, CommandError from django.conf import settings @dataclass class ComposeFile: version: str = "3.9" services: dict[str, dict] = field(default_factory=dict) volumes: dict[str, None] = field(default_factory=d...
37.251969
126
0.467766
from dataclasses import dataclass, field, asdict from django.core.management.base import BaseCommand, CommandError from django.conf import settings @dataclass class ComposeFile: version: str = "3.9" services: dict[str, dict] = field(default_factory=dict) volumes: dict[str, None] = field(default_factory=d...
true
true
f75f190a25c7180d506f92e660bd825b1e6e51c4
4,235
py
Python
2d/hydraulicStructures/sharp_crested_weir/deprecated/sharp_crested_weir_VM_V2/twp_navier_stokes_p.py
AntoninoScala/air-water-vv
06b6579cc308795dc56acfd30873747f74231589
[ "MIT" ]
5
2017-11-15T16:18:47.000Z
2021-07-18T02:32:48.000Z
2d/hydraulicStructures/sharp_crested_weir/deprecated/sharp_crested_weir_VM_V2/twp_navier_stokes_p.py
AntoninoScala/air-water-vv
06b6579cc308795dc56acfd30873747f74231589
[ "MIT" ]
41
2015-06-03T17:53:17.000Z
2017-07-26T09:15:07.000Z
2d/hydraulicStructures/sharp_crested_weir/deprecated/sharp_crested_weir_VM_V2/twp_navier_stokes_p.py
AntoninoScala/air-water-vv
06b6579cc308795dc56acfd30873747f74231589
[ "MIT" ]
21
2017-10-27T14:37:54.000Z
2020-02-10T10:31:36.000Z
from proteus import * from proteus.default_p import * from sharp_crested_weir import * from proteus.mprans import RANS2P LevelModelType = RANS2P.LevelModel if useOnlyVF: LS_model = None else: LS_model = 2 if useRANS >= 1: Closure_0_model = 5; Closure_1_model=6 if useOnlyVF: Closure_0_model=2; C...
31.37037
93
0.51098
from proteus import * from proteus.default_p import * from sharp_crested_weir import * from proteus.mprans import RANS2P LevelModelType = RANS2P.LevelModel if useOnlyVF: LS_model = None else: LS_model = 2 if useRANS >= 1: Closure_0_model = 5; Closure_1_model=6 if useOnlyVF: Closure_0_model=2; C...
true
true
f75f19c7a30623fb95c21db44ee6886a7f3b5542
5,650
py
Python
app/src/thirdparty/telemetry/internal/results/chart_json_output_formatter_unittest.py
ta2edchimp/big-rig
d08ffaa34b1496ca6c8e69a8797d280583472156
[ "Apache-2.0" ]
925
2015-11-06T03:04:46.000Z
2017-09-16T19:08:43.000Z
app/src/thirdparty/telemetry/internal/results/chart_json_output_formatter_unittest.py
ta2edchimp/big-rig
d08ffaa34b1496ca6c8e69a8797d280583472156
[ "Apache-2.0" ]
29
2015-11-09T17:37:28.000Z
2017-08-16T17:50:11.000Z
app/src/thirdparty/telemetry/internal/results/chart_json_output_formatter_unittest.py
ta2edchimp/big-rig
d08ffaa34b1496ca6c8e69a8797d280583472156
[ "Apache-2.0" ]
51
2015-11-08T07:06:38.000Z
2017-08-21T07:27:19.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import StringIO import unittest from telemetry import benchmark from telemetry import story from telemetry.internal.results import cha...
33.832335
80
0.708319
import json import os import StringIO import unittest from telemetry import benchmark from telemetry import story from telemetry.internal.results import chart_json_output_formatter from telemetry.internal.results import page_test_results from telemetry import page as page_module from telemetry.value import list_of_sc...
true
true
f75f1a94b77765589112fb00094d6b333e622e5c
1,566
py
Python
Embeddings/Char-CNN-RNN/generate_cnn_features.py
RajanPatel97/FYP
81ca4a6782c1205e1313da280ee5f5cdeb4f19f7
[ "MIT" ]
1
2020-02-09T09:00:46.000Z
2020-02-09T09:00:46.000Z
Embeddings/Char-CNN-RNN/generate_cnn_features.py
RajanPatel97/FYP
81ca4a6782c1205e1313da280ee5f5cdeb4f19f7
[ "MIT" ]
null
null
null
Embeddings/Char-CNN-RNN/generate_cnn_features.py
RajanPatel97/FYP
81ca4a6782c1205e1313da280ee5f5cdeb4f19f7
[ "MIT" ]
null
null
null
import os import csv import torchvision import torchvision.transforms as transforms import torch import torch.nn as nn from PIL import Image from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True import pickle import numpy as np data_folder = '/media/user/DATA/ArtImages' net = torchvision.models.resnet50(p...
30.115385
107
0.696679
import os import csv import torchvision import torchvision.transforms as transforms import torch import torch.nn as nn from PIL import Image from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True import pickle import numpy as np data_folder = '/media/user/DATA/ArtImages' net = torchvision.models.resnet50(p...
true
true
f75f1b5808421334ed9936aa38784fd5670da73e
4,604
py
Python
scripts/ai2-internal/run_with_beaker.py
siddsach/allennlp
17eaf449020d7307fca7aec901043dc43a16ff59
[ "Apache-2.0" ]
null
null
null
scripts/ai2-internal/run_with_beaker.py
siddsach/allennlp
17eaf449020d7307fca7aec901043dc43a16ff59
[ "Apache-2.0" ]
null
null
null
scripts/ai2-internal/run_with_beaker.py
siddsach/allennlp
17eaf449020d7307fca7aec901043dc43a16ff59
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # Script to launch AllenNLP Beaker jobs. import argparse import os import random import subprocess import sys from typing import List # This has to happen before we import spacy (even indirectly), because for some crazy reason spacy # thought it was a good idea to set the random seed on import...
40.034783
139
0.657255
import argparse import os import random import subprocess import sys from typing import List random_int = random.randint(0, 2**32) sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.join(os.path.join(__file__, os.pardir), os.pardir)))) from allennlp.commands.train import Train from allennlp.common.params i...
true
true
f75f1b7d19706fe480fe63e4ac6c86b0dfdf40f9
2,546
py
Python
git2zip.py
urielmann/git2zip
3fc65b9391b4f272bd1a102e2335818b8d39fc3e
[ "MIT" ]
null
null
null
git2zip.py
urielmann/git2zip
3fc65b9391b4f272bd1a102e2335818b8d39fc3e
[ "MIT" ]
null
null
null
git2zip.py
urielmann/git2zip
3fc65b9391b4f272bd1a102e2335818b8d39fc3e
[ "MIT" ]
null
null
null
######################################################################### # Copyright 2022 (c), Uri Mann. All rights reserved. # # mailto:abba.mann@gmail.com # # # # This program is free s...
49.921569
103
0.540848
import os import git import click import zipfile @click.command() @click.option('-r', '--repository', default='.', help='Repository path', prompt=True) @click.option('-b', '--branch', default='main', help='Branch name', prompt=True) @click.option('-c', '--commits', default=1, help='Number of commits to archiive', pro...
true
true
f75f1c47436452e5256c2c0e61c892d99b157ab2
6,362
py
Python
client/python/ovmsclient/lib/ovmsclient/tfs_compat/base/serving_client.py
IntelAI/OpenVINO-model-server
281cffcc358013afcec0d810331acc66c18297f7
[ "Apache-2.0" ]
305
2018-10-01T12:41:28.000Z
2020-04-24T10:36:08.000Z
client/python/ovmsclient/lib/ovmsclient/tfs_compat/base/serving_client.py
IntelAI/OpenVINO-model-server
281cffcc358013afcec0d810331acc66c18297f7
[ "Apache-2.0" ]
61
2018-11-15T09:23:01.000Z
2020-04-23T09:29:56.000Z
client/python/ovmsclient/lib/ovmsclient/tfs_compat/base/serving_client.py
IntelAI/OpenVINO-model-server
281cffcc358013afcec0d810331acc66c18297f7
[ "Apache-2.0" ]
67
2018-10-13T14:33:48.000Z
2020-04-22T19:01:32.000Z
# # Copyright (c) 2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
37.64497
89
0.642251
import os from abc import ABC, abstractmethod class ServingClient(ABC): @abstractmethod def predict(self, inputs, model_name, model_version=0, timeout=10.0): pass @abstractmethod def get_model_metadata(self, model_name, model_version=0, timeout=10.0): pass @abstractmethod ...
true
true
f75f1cc3d68e48d4ce8c9227d6692e3d4ba90a13
1,081
py
Python
lib/JumpScale/baselib/remote/cuisine/Cuisine.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
1
2015-10-26T10:38:13.000Z
2015-10-26T10:38:13.000Z
lib/JumpScale/baselib/remote/cuisine/Cuisine.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
null
null
null
lib/JumpScale/baselib/remote/cuisine/Cuisine.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
null
null
null
from JumpScale import j import JumpScale.baselib.remote.fabric j.system.platform.ubuntu.check() import cuisine from fabric.api import * class OurCuisine(): def __init__(self): self.api = cuisine self.fabric = j.remote.fabric.api j.remote.fabric.setHost() def connect(self,addr,port,...
26.365854
118
0.618871
from JumpScale import j import JumpScale.baselib.remote.fabric j.system.platform.ubuntu.check() import cuisine from fabric.api import * class OurCuisine(): def __init__(self): self.api = cuisine self.fabric = j.remote.fabric.api j.remote.fabric.setHost() def connect(self,addr,port,...
false
true
f75f1dcf4fd1847dd980f442158d6e7f4acd3470
473
py
Python
setup.py
atemon/sms-api
dd24c63f9b3dc26e4aab0479805ddcda97242136
[ "MIT" ]
1
2019-06-14T18:08:06.000Z
2019-06-14T18:08:06.000Z
setup.py
atemon/python-sms-api
dd24c63f9b3dc26e4aab0479805ddcda97242136
[ "MIT" ]
null
null
null
setup.py
atemon/python-sms-api
dd24c63f9b3dc26e4aab0479805ddcda97242136
[ "MIT" ]
null
null
null
"""Setup.py file for Atemon.SMS package.""" from distutils.core import setup setup( name='Atemon-SMSAPI', version='0.1.1.4', packages=['atemon', 'atemon.SMS', 'atemon.SMS.GAG'], long_description="Connect to SMS API with Python", author="Varghese Chacko", author_email="varghese@atemon.com", ...
29.5625
56
0.663848
from distutils.core import setup setup( name='Atemon-SMSAPI', version='0.1.1.4', packages=['atemon', 'atemon.SMS', 'atemon.SMS.GAG'], long_description="Connect to SMS API with Python", author="Varghese Chacko", author_email="varghese@atemon.com", url="https://github.com/atemon/python-sms-ap...
true
true
f75f1e5d117082d69b62c342f4b461ede7d11402
5,073
py
Python
benchmark/startQiskit_QC1883.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_QC1883.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_QC1883.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=69 import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from ma...
34.04698
165
0.618766
import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi impo...
true
true
f75f1fd9e6ae59a6c51f3e823190cf7783a2768e
4,112
py
Python
Practica06_Clustering/codigoFuente/Algorithms/RBF.py
CodeRevenge/practicas_ia_2
b81e3b68680b61785918b19360cb0afc5b14c26e
[ "MIT" ]
null
null
null
Practica06_Clustering/codigoFuente/Algorithms/RBF.py
CodeRevenge/practicas_ia_2
b81e3b68680b61785918b19360cb0afc5b14c26e
[ "MIT" ]
null
null
null
Practica06_Clustering/codigoFuente/Algorithms/RBF.py
CodeRevenge/practicas_ia_2
b81e3b68680b61785918b19360cb0afc5b14c26e
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt class RBF(object): """Implementation of a Radial Basis Function Network""" def __init__(self, hidden_neurons=2, learning_rate=0.01, max_ephochs=100, min_error = 0.01): self.hidden_neurons = hidden_neurons self.learning_rate = learning_rate ...
34.554622
114
0.575146
import numpy as np import matplotlib.pyplot as plt class RBF(object): def __init__(self, hidden_neurons=2, learning_rate=0.01, max_ephochs=100, min_error = 0.01): self.hidden_neurons = hidden_neurons self.learning_rate = learning_rate self.max_ephochs = max_ephochs self.min_eror = ...
true
true
f75f1fea8bde73f515bf465b7edcb0568883c1db
3,206
py
Python
example/django_example/settings.py
millerf/django-channels-websockets
b71bc9eb7571be11b08aa99d5008c6f3f6ae1866
[ "MIT" ]
27
2017-01-31T05:59:22.000Z
2021-01-11T10:21:42.000Z
example/django_example/settings.py
millerf/django-channels-websockets
b71bc9eb7571be11b08aa99d5008c6f3f6ae1866
[ "MIT" ]
13
2017-02-13T18:02:38.000Z
2021-03-19T15:25:03.000Z
example/django_example/settings.py
millerf/django-channels-websockets
b71bc9eb7571be11b08aa99d5008c6f3f6ae1866
[ "MIT" ]
8
2017-01-27T14:50:12.000Z
2021-09-14T09:57:23.000Z
""" Django settings for django_channels_jsonrpc project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings...
25.854839
91
0.697442
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '19qsynss^p#tkqnkej3vp99%+uy9xx9h8l=^2sk59()xw20@fa' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessio...
true
true
f75f1ffa4d5dc8ed1a49460fe6d03167a19f8690
10,602
py
Python
nanpack/mesh.py
vxsharma-14/project-NAnPack
fad644ec9a614605f84562745a317e5512db1d58
[ "MIT" ]
14
2021-01-28T06:52:15.000Z
2021-03-05T01:34:30.000Z
nanpack/mesh.py
vxsharma-14/project-NAnPack
fad644ec9a614605f84562745a317e5512db1d58
[ "MIT" ]
2
2021-01-22T22:55:08.000Z
2021-01-22T22:56:13.000Z
nanpack/mesh.py
vxsharma-14/NAnPack
fad644ec9a614605f84562745a317e5512db1d58
[ "MIT" ]
2
2021-01-28T06:52:17.000Z
2021-01-30T12:35:52.000Z
"""A module consisting of various meshing functions.""" # *********************************************************************** # # FILE mesh.py # # AUTHOR Dr. Vishal Sharma # # VERSION 1.0.0-alpha4 # # WEBSITE https://github.com/vxsharma-14/project-NAnPack # # NAnPack L...
29.126374
76
0.60017
# # Copyright (c) 2020 Vishal Sharma # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, mer...
true
true
f75f205ede4707ee2667e2c3eaffc8ebbd6d1b2f
2,511
py
Python
tools/generate_taint_models/inspect_parser.py
terrorizer1980/pyre-check
16659c7f6f19f3c364ba3a56e6c582371a8ff348
[ "MIT" ]
1
2020-08-08T16:01:55.000Z
2020-08-08T16:01:55.000Z
tools/generate_taint_models/inspect_parser.py
terrorizer1980/pyre-check
16659c7f6f19f3c364ba3a56e6c582371a8ff348
[ "MIT" ]
4
2022-02-15T02:42:33.000Z
2022-02-28T01:30:07.000Z
tools/generate_taint_models/inspect_parser.py
terrorizer1980/pyre-check
16659c7f6f19f3c364ba3a56e6c582371a8ff348
[ "MIT" ]
1
2020-11-22T12:08:51.000Z
2020-11-22T12:08:51.000Z
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import inspect import types from typing import Callable, List, Mapping, Optional from .parameter import Parameter def extract_qua...
33.039474
84
0.684986
import inspect import types from typing import Callable, List, Mapping, Optional from .parameter import Parameter def extract_qualified_name(callable_object: Callable[..., object]) -> Optional[str]: if inspect.ismethod(callable_object): return extract_qualified_name(callable_object.__func__) ...
true
true
f75f20793952c03fe3ace0c33593df8f7435de90
1,895
py
Python
torcharrow/test/test_numerical_column_cpu.py
bhuang3/torcharrow
6ba606b34bc1cd7801745519a396742056a96c2d
[ "BSD-3-Clause" ]
null
null
null
torcharrow/test/test_numerical_column_cpu.py
bhuang3/torcharrow
6ba606b34bc1cd7801745519a396742056a96c2d
[ "BSD-3-Clause" ]
null
null
null
torcharrow/test/test_numerical_column_cpu.py
bhuang3/torcharrow
6ba606b34bc1cd7801745519a396742056a96c2d
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. import unittest import torcharrow.dtypes as dt from torcharrow import INumericalColumn from torcharrow import Scope from .test_numerical_column import TestNumericalColumn class TestNumericalColumnCpu(TestNumericalColumn): def setUp(self): self.device = ...
25.958904
62
0.698153
import unittest import torcharrow.dtypes as dt from torcharrow import INumericalColumn from torcharrow import Scope from .test_numerical_column import TestNumericalColumn class TestNumericalColumnCpu(TestNumericalColumn): def setUp(self): self.device = "cpu" def test_internal_empty(self): c...
true
true
f75f218ce02c43906c2917bd28a08febfab60c91
832
py
Python
tests/integration/test_frequency.py
ambader/hcrystalball
713636e698d9a260fab982764fce4a13699be1a8
[ "MIT" ]
139
2020-06-29T16:36:16.000Z
2022-01-25T21:49:10.000Z
tests/integration/test_frequency.py
ambader/hcrystalball
713636e698d9a260fab982764fce4a13699be1a8
[ "MIT" ]
34
2020-06-29T12:31:26.000Z
2022-03-18T13:56:21.000Z
tests/integration/test_frequency.py
ambader/hcrystalball
713636e698d9a260fab982764fce4a13699be1a8
[ "MIT" ]
28
2020-06-30T06:00:39.000Z
2022-03-18T13:27:58.000Z
import pandas as pd import pytest @pytest.mark.parametrize( "X_y_with_freq, freq", [ ("series_with_freq_D", "D"), ("series_with_freq_M", "M"), ("series_with_freq_Q", "Q-DEC"), ("series_with_freq_Y", "A-DEC"), ], indirect=["X_y_with_freq"], ) @pytest.mark.parametrize( ...
24.470588
83
0.591346
import pandas as pd import pytest @pytest.mark.parametrize( "X_y_with_freq, freq", [ ("series_with_freq_D", "D"), ("series_with_freq_M", "M"), ("series_with_freq_Q", "Q-DEC"), ("series_with_freq_Y", "A-DEC"), ], indirect=["X_y_with_freq"], ) @pytest.mark.parametrize( ...
true
true
f75f21dc57ffe5091ec28fdc4ebd08c165b24e2b
11,456
py
Python
homeassistant/components/tuya/number.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
homeassistant/components/tuya/number.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/tuya/number.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Support for Tuya number.""" from __future__ import annotations from typing import cast from tuya_iot import TuyaDevice, TuyaDeviceManager from tuya_iot.device import TuyaDeviceStatusRange from homeassistant.components.number import NumberEntity, NumberEntityDescription from homeassistant.config_entries import Con...
34.926829
86
0.609113
from __future__ import annotations from typing import cast from tuya_iot import TuyaDevice, TuyaDeviceManager from tuya_iot.device import TuyaDeviceStatusRange from homeassistant.components.number import NumberEntity, NumberEntityDescription from homeassistant.config_entries import ConfigEntry from homeassistant.cor...
true
true
f75f224201655fd57b807a829483aa8623c3321a
5,117
py
Python
scripts/preprocess/create_nq_reader.py
mjeensung/DensePhrases
742accbd68584d97140c7e11fa6c5f7f16f592e6
[ "Apache-2.0" ]
331
2021-03-31T11:14:55.000Z
2022-03-28T04:18:52.000Z
scripts/preprocess/create_nq_reader.py
mjeensung/DensePhrases
742accbd68584d97140c7e11fa6c5f7f16f592e6
[ "Apache-2.0" ]
17
2021-06-04T19:14:53.000Z
2021-12-22T06:10:15.000Z
scripts/preprocess/create_nq_reader.py
mjeensung/DensePhrases
742accbd68584d97140c7e11fa6c5f7f16f592e6
[ "Apache-2.0" ]
40
2021-04-12T09:53:00.000Z
2022-03-23T10:56:54.000Z
import json import argparse import pdb import glob from nq_utils import load_examples def convert_tokens_to_answer(paragraph_tokens, answer_tokens): answer_token_indexes = [] for answer_token in answer_tokens: answer_token_index = paragraph_tokens.index(answer_token) answer_token_indexes.append...
33.887417
104
0.557749
import json import argparse import pdb import glob from nq_utils import load_examples def convert_tokens_to_answer(paragraph_tokens, answer_tokens): answer_token_indexes = [] for answer_token in answer_tokens: answer_token_index = paragraph_tokens.index(answer_token) answer_token_indexes.append...
true
true
f75f23a212d3666db4df3f117a9f96726ac309d2
44,123
py
Python
tools/npy_tempita/__init__.py
larrybradley/numpy
c592bf2210567ea58bc52f8e15a5f0de582f889b
[ "BSD-3-Clause" ]
2
2019-11-12T07:52:12.000Z
2019-12-27T11:50:57.000Z
tools/npy_tempita/__init__.py
larrybradley/numpy
c592bf2210567ea58bc52f8e15a5f0de582f889b
[ "BSD-3-Clause" ]
4
2018-09-20T09:51:51.000Z
2019-02-15T13:31:35.000Z
tools/npy_tempita/__init__.py
pentschev/numpy
4e11da37bf94a0f496f236e9706205ac81683058
[ "BSD-3-Clause" ]
2
2020-01-20T21:17:37.000Z
2020-09-08T17:56:40.000Z
""" A small templating language This implements a small templating language. This language implements if/elif/else, for/continue/break, expressions, and blocks of Python code. The syntax is:: {{any expression (function calls etc)}} {{any expression | filter}} {{for x in y}}...{{endfor}} {{if x}}x{{elif y}}y...
33.681679
78
0.528296
from __future__ import absolute_import, division, print_function import re import sys try: from urllib.parse import quote as url_quote from io import StringIO from html import escape as html_escape except ImportError: from urllib import quote as url_quote from cStringIO import StringIO from cgi...
true
true
f75f23fd2dac8a076341895f5a44a057881b68a6
8,198
py
Python
cove/lib/converters.py
zimmerman-zimmerman/cove
4ec326e4bbdc46f086cd3c214c793f80d10bac36
[ "MIT" ]
null
null
null
cove/lib/converters.py
zimmerman-zimmerman/cove
4ec326e4bbdc46f086cd3c214c793f80d10bac36
[ "MIT" ]
1
2018-12-10T15:21:30.000Z
2018-12-10T15:21:30.000Z
cove/lib/converters.py
zimmerman-zimmerman/cove
4ec326e4bbdc46f086cd3c214c793f80d10bac36
[ "MIT" ]
1
2019-02-11T10:53:10.000Z
2019-02-11T10:53:10.000Z
import json import logging import os import shutil import warnings import flattentool import flattentool.exceptions from django.conf import settings from django.utils.translation import ugettext_lazy as _ from flattentool.json_input import BadlyFormedJSONError from cove.lib.exceptions import CoveInputDataError, cove_...
41.19598
136
0.650768
import json import logging import os import shutil import warnings import flattentool import flattentool.exceptions from django.conf import settings from django.utils.translation import ugettext_lazy as _ from flattentool.json_input import BadlyFormedJSONError from cove.lib.exceptions import CoveInputDataError, cove_...
true
true
f75f24b70858f398a5be3908ae2432e2736ed3f9
12,866
py
Python
tests/platform_tests/mellanox/check_sysfs.py
vincent201881/sonic-mgmt
4f02bb5f91600ae5180ace1620a718caf02c63a1
[ "Apache-2.0" ]
null
null
null
tests/platform_tests/mellanox/check_sysfs.py
vincent201881/sonic-mgmt
4f02bb5f91600ae5180ace1620a718caf02c63a1
[ "Apache-2.0" ]
null
null
null
tests/platform_tests/mellanox/check_sysfs.py
vincent201881/sonic-mgmt
4f02bb5f91600ae5180ace1620a718caf02c63a1
[ "Apache-2.0" ]
null
null
null
""" Helper script for checking status of sysfs. This script contains re-usable functions for checking status of hw-management related sysfs. """ import logging from tests.common.utilities import wait_until def check_sysfs(dut): """ @summary: Check various hw-management related sysfs under /var/run/hw-managem...
53.832636
116
0.656459
import logging from tests.common.utilities import wait_until def check_sysfs(dut): logging.info("Check broken symbolinks") broken_symbolinks = dut.command("find /var/run/hw-management -xtype l") assert len(broken_symbolinks["stdout_lines"]) == 0, \ "Found some broken symbolinks: %s" % str(broken_s...
true
true
f75f24d115fc2f3437835beb72da4a0c57c956b3
31,197
py
Python
tools/refguide_check.py
avivajpeyi/scipy
dbfe06e6618232b26c241cbe8861e2ea1489b535
[ "BSD-3-Clause" ]
null
null
null
tools/refguide_check.py
avivajpeyi/scipy
dbfe06e6618232b26c241cbe8861e2ea1489b535
[ "BSD-3-Clause" ]
4
2015-07-29T00:40:22.000Z
2020-06-25T13:33:26.000Z
tools/refguide_check.py
avivajpeyi/scipy
dbfe06e6618232b26c241cbe8861e2ea1489b535
[ "BSD-3-Clause" ]
1
2015-08-27T02:56:27.000Z
2015-08-27T02:56:27.000Z
#!/usr/bin/env python """ refguide_check.py [OPTIONS] [-- ARGS] Check for a Scipy submodule whether the objects in its __all__ dict correspond to the objects included in the reference guide. Example of usage:: $ python refguide_check.py optimize Note that this is a helper script to be able to check if things ar...
32.530761
101
0.580024
import copy import doctest import glob import inspect import io import os import re import shutil import sys import tempfile import warnings from argparse import ArgumentParser from contextlib import contextmanager, redirect_stderr from doctest import NORMALIZE_WHITESPACE, ELLIPSIS, IGNORE_EXCEPTION_DETAIL import docu...
true
true
f75f250a07ac525754d51853f9dbe3eb0ad709f8
12,455
py
Python
tensorpack/train/base.py
asanakoy/tensorpack
13723a917de5992a671417c7c73249643fc8b1d7
[ "Apache-2.0" ]
null
null
null
tensorpack/train/base.py
asanakoy/tensorpack
13723a917de5992a671417c7c73249643fc8b1d7
[ "Apache-2.0" ]
null
null
null
tensorpack/train/base.py
asanakoy/tensorpack
13723a917de5992a671417c7c73249643fc8b1d7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File: base.py import tensorflow as tf import weakref import time from six.moves import range import six import copy from ..callbacks import ( Callback, Callbacks, Monitors, TrainingMonitor) from ..utils import logger from ..utils.utils import humanize_time_delta from ..utils.argtools imp...
35.687679
115
0.624167
import tensorflow as tf import weakref import time from six.moves import range import six import copy from ..callbacks import ( Callback, Callbacks, Monitors, TrainingMonitor) from ..utils import logger from ..utils.utils import humanize_time_delta from ..utils.argtools import call_only_once from ..tfutils import...
true
true
f75f2600f659d4c9a561e1768d92e5dae58655de
2,847
py
Python
src/researchhub_case/migrations/0002_auto_20210518_2117.py
ResearchHub/ResearchHub-Backend-Open
d36dca33afae2d442690694bb2ab17180d84bcd3
[ "MIT" ]
18
2021-05-20T13:20:16.000Z
2022-02-11T02:40:18.000Z
src/researchhub_case/migrations/0002_auto_20210518_2117.py
ResearchHub/ResearchHub-Backend-Open
d36dca33afae2d442690694bb2ab17180d84bcd3
[ "MIT" ]
109
2021-05-21T20:14:23.000Z
2022-03-31T20:56:10.000Z
src/researchhub_case/migrations/0002_auto_20210518_2117.py
ResearchHub/ResearchHub-Backend-Open
d36dca33afae2d442690694bb2ab17180d84bcd3
[ "MIT" ]
4
2021-05-17T13:47:53.000Z
2022-02-12T10:48:21.000Z
# Generated by Django 2.2 on 2021-05-18 21:17 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('user', '0059_auto_20210326_0027'), ('researchhub_case', '0001_initial'), ] op...
45.190476
199
0.645592
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('user', '0059_auto_20210326_0027'), ('researchhub_case', '0001_initial'), ] operations = [ migrations.AddField( ...
true
true
f75f263d25490976ad0fd2eef7d07e48209c1d88
7,875
py
Python
molmolpy/moldock/vina_utils/prepare_receptor4.py
hovo1990/molmolpy
30a825f0142ca0bd549896fb88fe908af47ad4de
[ "BSD-3-Clause" ]
1
2020-10-19T19:35:15.000Z
2020-10-19T19:35:15.000Z
molmolpy/moldock/vina_utils/prepare_receptor4.py
hovo1990/molmolpy
30a825f0142ca0bd549896fb88fe908af47ad4de
[ "BSD-3-Clause" ]
null
null
null
molmolpy/moldock/vina_utils/prepare_receptor4.py
hovo1990/molmolpy
30a825f0142ca0bd549896fb88fe908af47ad4de
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env /home/john1990/MGLTools-1.5.6/bin/pythonsh # # # # $Header: /opt/cvs/python/packages/share1.5/AutoDockTools/Utilities24/prepare_receptor4.py,v 1.13 2010/01/25 23:37:14 rhuey Exp $ # import os from MolKit import Read import MolKit.molecule import MolKit.protein from AutoDockTools.MoleculePreparation im...
41.230366
130
0.566349
import os from MolKit import Read import MolKit.molecule import MolKit.protein from AutoDockTools.MoleculePreparation import AD4ReceptorPreparation if __name__ == '__main__': import sys import getopt def usage(): "Print helpful, accurate usage statement to stdout." print "Usage: prepar...
false
true
f75f26dbe0ab8c696b4d189e0dcb8fb0b44e37b3
2,977
py
Python
npe2/manifest/menus.py
ppwadhwa/npe2
a76c3d72fec5e6e0559a72fc3ab12bc20f19dfce
[ "BSD-3-Clause" ]
null
null
null
npe2/manifest/menus.py
ppwadhwa/npe2
a76c3d72fec5e6e0559a72fc3ab12bc20f19dfce
[ "BSD-3-Clause" ]
null
null
null
npe2/manifest/menus.py
ppwadhwa/npe2
a76c3d72fec5e6e0559a72fc3ab12bc20f19dfce
[ "BSD-3-Clause" ]
null
null
null
from typing import List, Optional, Union from pydantic import BaseModel, Field, ValidationError, root_validator # # napari provides these # class Menu(BaseModel): # key: str # id: int # description: str # supports_submenus: bool = True # deprecation_message: Optional[str] # napari_menus = [ # ...
32.010753
88
0.645952
from typing import List, Optional, Union from pydantic import BaseModel, Field, ValidationError, root_validator class _MenuItem(BaseModel): when: Optional[str] = Field( description="Condition which must be true to show this item" ) group: Optional[str] = Field(description="Group into which thi...
true
true
f75f27aea02bb91f7eabacc022b4f00240d31706
1,695
py
Python
frontend/migrations/0001_initial.py
jamesreinhold/vigolend
151f92cd1883093e7d0ca5faf8e08cc54786cb6a
[ "MIT" ]
1
2021-05-22T20:10:56.000Z
2021-05-22T20:10:56.000Z
frontend/migrations/0001_initial.py
jamesreinhold/vigolend
151f92cd1883093e7d0ca5faf8e08cc54786cb6a
[ "MIT" ]
1
2022-03-30T21:15:01.000Z
2022-03-30T21:15:01.000Z
frontend/migrations/0001_initial.py
jamesreinhold/vigolend
151f92cd1883093e7d0ca5faf8e08cc54786cb6a
[ "MIT" ]
1
2021-06-02T19:39:50.000Z
2021-06-02T19:39:50.000Z
# Generated by Django 3.1.8 on 2021-05-28 13:03 from django.db import migrations, models import django.utils.timezone import uuid class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='TeamMember', field...
49.852941
190
0.646608
from django.db import migrations, models import django.utils.timezone import uuid class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='TeamMember', fields=[ ('id', models.UUIDField(defa...
true
true
f75f288029728534d40fb3aacb669ef87ce71bce
4,018
py
Python
my_packages/FlowProjection/networks/FlowNetSD.py
PlanNoa/video_super_resolution
534e6e6b55d652c61306df4bc11e83a456855dd4
[ "MIT" ]
6
2020-05-25T08:17:34.000Z
2021-08-17T20:22:12.000Z
my_packages/FlowProjection/networks/FlowNetSD.py
PlanNoa/video_super_resolution
534e6e6b55d652c61306df4bc11e83a456855dd4
[ "MIT" ]
null
null
null
my_packages/FlowProjection/networks/FlowNetSD.py
PlanNoa/video_super_resolution
534e6e6b55d652c61306df4bc11e83a456855dd4
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.nn import init from .submodules import conv, deconv, i_conv, predict_flow class FlowNetSD(nn.Module): def __init__(self, batchNorm=True): super(FlowNetSD, self).__init__() self.batchNorm = batchNorm self.conv0 = conv(self.batchNorm, 6, 64) ...
39.782178
69
0.641115
import torch import torch.nn as nn from torch.nn import init from .submodules import conv, deconv, i_conv, predict_flow class FlowNetSD(nn.Module): def __init__(self, batchNorm=True): super(FlowNetSD, self).__init__() self.batchNorm = batchNorm self.conv0 = conv(self.batchNorm, 6, 64) ...
true
true
f75f2a4b7c6c6d90a49ddaa0be832b283034f1e1
488
py
Python
projetos/aula/operators/bitwise-operators.py
GiuseppeMP/udacity-fundamentos-ia-machine-learning
7a19e33eced412d3bfa7462a00d1bca89a3c77ee
[ "MIT" ]
null
null
null
projetos/aula/operators/bitwise-operators.py
GiuseppeMP/udacity-fundamentos-ia-machine-learning
7a19e33eced412d3bfa7462a00d1bca89a3c77ee
[ "MIT" ]
null
null
null
projetos/aula/operators/bitwise-operators.py
GiuseppeMP/udacity-fundamentos-ia-machine-learning
7a19e33eced412d3bfa7462a00d1bca89a3c77ee
[ "MIT" ]
null
null
null
'''Bitwise operators act on operands as if they were string of binary digits. It operates bit by bit, hence the name. For example, 2 is 10 in binary and 7 is 111. In the table below: Let x = 10 (0000 1010 in binary) and y = 4 (0000 0100 in binary)''' & Bitwise AND x& y = 0 (0000 0000) | Bitwise OR x | y = 14 (0000 ...
34.857143
117
0.659836
'''Bitwise operators act on operands as if they were string of binary digits. It operates bit by bit, hence the name. For example, 2 is 10 in binary and 7 is 111. In the table below: Let x = 10 (0000 1010 in binary) and y = 4 (0000 0100 in binary)''' & Bitwise AND x& y = 0 (0000 0000) | Bitwise OR x | y = 14 (0000 ...
false
true
f75f2a5786705f8554a18a53d31fab7efef6c946
740
py
Python
profiles_api/permissions.py
JonathanOzsvath/profile-rest-ap
81c6fb772172bbcb678ac32d57582a680f59830a
[ "MIT" ]
null
null
null
profiles_api/permissions.py
JonathanOzsvath/profile-rest-ap
81c6fb772172bbcb678ac32d57582a680f59830a
[ "MIT" ]
null
null
null
profiles_api/permissions.py
JonathanOzsvath/profile-rest-ap
81c6fb772172bbcb678ac32d57582a680f59830a
[ "MIT" ]
null
null
null
from rest_framework import permissions class UpdateOwnProfile(permissions.BasePermission): """Allow user to edit their own profile""" def has_object_permission(self, request, view, obj): """Check user is trying to edit their own profile""" if request.method in permissions.SAFE_METHODS: ...
29.6
65
0.690541
from rest_framework import permissions class UpdateOwnProfile(permissions.BasePermission): def has_object_permission(self, request, view, obj): if request.method in permissions.SAFE_METHODS: return True return obj.id == request.user.id class UpdateOwnStatus(permissions.BasePermissi...
true
true
f75f2a83808f17ffe5aae5a5e2a3c198a109a189
1,802
py
Python
tutorials/preprocessing/plot_60_maxwell_filtering_sss.py
hql1234/mne-python
14fe4fa5e92884dcf665fd96a71ec5bb49e4da96
[ "BSD-3-Clause" ]
null
null
null
tutorials/preprocessing/plot_60_maxwell_filtering_sss.py
hql1234/mne-python
14fe4fa5e92884dcf665fd96a71ec5bb49e4da96
[ "BSD-3-Clause" ]
null
null
null
tutorials/preprocessing/plot_60_maxwell_filtering_sss.py
hql1234/mne-python
14fe4fa5e92884dcf665fd96a71ec5bb49e4da96
[ "BSD-3-Clause" ]
1
2019-12-10T02:59:18.000Z
2019-12-10T02:59:18.000Z
""" .. _tut-artifact-sss: ======================================= Artifact correction with Maxwell filter ======================================= This tutorial shows how to clean MEG data with Maxwell filtering. Maxwell filtering in MNE can be used to suppress sources of external interference and compensate for subj...
39.173913
79
0.564928
import mne from mne.preprocessing import maxwell_filter data_path = mne.datasets.sample.data_path() raw_fname = data_path + '/MEG/sample/sample_audvis_raw.fif' ctc_fname = data_path + '/SSS/ct_sparse_mgh.fif' fine_cal_fname = data_path + '/SSS/sss_cal_mgh.dat' raw = mne.io.read_raw_fif(raw_fname) raw.info['bads'] =...
true
true
f75f2aab9f34874c7480cd0b88bf7871540f70f9
1,796
py
Python
ocpeasy/utils_test.py
ocpeasy/ocpeasy
19eab407416768f122b2f4678475893cd9769862
[ "MIT" ]
2
2021-03-04T13:57:14.000Z
2021-03-05T13:56:58.000Z
ocpeasy/utils_test.py
ocpeasy/ocpeasy
19eab407416768f122b2f4678475893cd9769862
[ "MIT" ]
null
null
null
ocpeasy/utils_test.py
ocpeasy/ocpeasy
19eab407416768f122b2f4678475893cd9769862
[ "MIT" ]
1
2021-03-05T13:57:03.000Z
2021-03-05T13:57:03.000Z
from .utils import ( buildMenuOptions, getPrompt, removeTrailSlash, createNewSessionId, cloneStrategyRepository, cleanWorkspace, replaceAll, prepareWorkspace, isBinAvailableInPath, ) from os import path def test_prepareWorkspace(): sessionUuid = createNewSessionId() prepar...
27.630769
87
0.716036
from .utils import ( buildMenuOptions, getPrompt, removeTrailSlash, createNewSessionId, cloneStrategyRepository, cleanWorkspace, replaceAll, prepareWorkspace, isBinAvailableInPath, ) from os import path def test_prepareWorkspace(): sessionUuid = createNewSessionId() prepar...
true
true
f75f2ac9fd31ac0160d26dbebcdae9bf2f83bca8
152,675
py
Python
lib/sqlalchemy/orm/session.py
abrookins/sqlalchemy
7cc6b26d31769c15ad972ebf204f6bf52d5175cf
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/session.py
abrookins/sqlalchemy
7cc6b26d31769c15ad972ebf204f6bf52d5175cf
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/session.py
abrookins/sqlalchemy
7cc6b26d31769c15ad972ebf204f6bf52d5175cf
[ "MIT" ]
null
null
null
# orm/session.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """Provides the Session class and related utilities.""" import contextlib import ite...
36.282082
84
0.610316
import contextlib import itertools import sys import weakref from . import attributes from . import context from . import exc from . import identity from . import loading from . import persistence from . import query from . import state as statelib from .base import _class_to_mapper from .base import _none_set from ....
true
true
f75f2c2de98528d036a1031e1e1ab83370ded7e5
141
py
Python
.history/my_classes/ScopesClosuresAndDecorators/GlobalLocalScopes_20210709202804.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/GlobalLocalScopes_20210709202804.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/GlobalLocalScopes_20210709202804.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" Global and local Scopes Scopes and Namespaces When an object is assigned to a variable a = 10 """
15.666667
50
0.531915
true
true
f75f2ca752b29a8456f3c7b3dda4a80c2c2b1ac6
4,172
py
Python
mdsobjects/python/widgets/mdsplusrangewidget.py
consorzio-rfx/mdsplus
81cdbfc759d92b101d84328e6eb7b3a6e6e22103
[ "BSD-2-Clause" ]
null
null
null
mdsobjects/python/widgets/mdsplusrangewidget.py
consorzio-rfx/mdsplus
81cdbfc759d92b101d84328e6eb7b3a6e6e22103
[ "BSD-2-Clause" ]
null
null
null
mdsobjects/python/widgets/mdsplusrangewidget.py
consorzio-rfx/mdsplus
81cdbfc759d92b101d84328e6eb7b3a6e6e22103
[ "BSD-2-Clause" ]
null
null
null
# # Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list ...
38.275229
83
0.622723
from gtk import HBox,Entry,Label,Table,EXPAND,FILL,SHRINK import sys from mdspluserrormsg import MDSplusErrorMsg from MDSplus import Data,Range class MDSplusRangeWidget(Table): def __init__(self,value=None): super(MDSplusRangeWidget,self).__init__(rows=3,columns=2,homogeneous=False) self.begin=En...
true
true
f75f2cc30a9bed23699d783af3c66f745c0e106e
528
py
Python
ilmbase/2.2.0/package.py
Colorbleed/rez-packages
c8e8012e5327dc97573de65207eaa76fd1cf179f
[ "MIT" ]
25
2019-11-11T16:29:27.000Z
2022-03-16T06:16:10.000Z
ilmbase/2.2.0/package.py
Colorbleed/rez-packages
c8e8012e5327dc97573de65207eaa76fd1cf179f
[ "MIT" ]
1
2019-11-26T20:55:00.000Z
2019-11-26T20:55:00.000Z
ilmbase/2.2.0/package.py
Colorbleed/rez-packages
c8e8012e5327dc97573de65207eaa76fd1cf179f
[ "MIT" ]
4
2020-02-07T16:37:50.000Z
2022-01-10T23:29:18.000Z
# -*- coding: utf-8 -*- name = 'ilmbase' version = '2.2.0' variants = [['platform-windows', 'arch==AMD64']] # This is important, otherwise the build scripts fail # on == in the build folder names. hashed_variants = True build_command = "python {root}/rezbuild.py {install}" build_requires = ['python', ...
21.12
55
0.636364
name = 'ilmbase' version = '2.2.0' variants = [['platform-windows', 'arch==AMD64']] hashed_variants = True build_command = "python {root}/rezbuild.py {install}" build_requires = ['python', 'cmake-3.2+'] def commands(): env.ILMBASE_ROOT = '{root}' env.PATH.append('{root}/lib/') env.L...
true
true
f75f2ee44adf951951284e3f17cffa201eeb0b47
1,053
py
Python
ticket_selling/events/views.py
noxITRS/ticket_selling
389b01151f9a06edb718aabf090a73dd024ae21f
[ "MIT" ]
null
null
null
ticket_selling/events/views.py
noxITRS/ticket_selling
389b01151f9a06edb718aabf090a73dd024ae21f
[ "MIT" ]
null
null
null
ticket_selling/events/views.py
noxITRS/ticket_selling
389b01151f9a06edb718aabf090a73dd024ae21f
[ "MIT" ]
null
null
null
from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.decorators import action from rest_framework.response import Response from events.models import Event from events.serializers import EventSerializer from tickets.serializers import TicketAvailabilitySerializer clas...
35.1
78
0.754036
from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.decorators import action from rest_framework.response import Response from events.models import Event from events.serializers import EventSerializer from tickets.serializers import TicketAvailabilitySerializer clas...
true
true
f75f2ee68101664d8645de3eef2b32b5f55d3a41
2,552
py
Python
configs/transmission_line_detection2/retinanet_r50_fpn_1x_transmission_custom_lr0.01_bigimgscale2_loadfromepoch20.py
Dopamine0717/mmdetection
40a6fddae20978de98a335cbb45e227db782f72b
[ "Apache-2.0" ]
1
2022-03-20T09:13:30.000Z
2022-03-20T09:13:30.000Z
configs/transmission_line_detection2/retinanet_r50_fpn_1x_transmission_custom_lr0.01_bigimgscale2_loadfromepoch20.py
Dopamine0717/mmdetection
40a6fddae20978de98a335cbb45e227db782f72b
[ "Apache-2.0" ]
null
null
null
configs/transmission_line_detection2/retinanet_r50_fpn_1x_transmission_custom_lr0.01_bigimgscale2_loadfromepoch20.py
Dopamine0717/mmdetection
40a6fddae20978de98a335cbb45e227db782f72b
[ "Apache-2.0" ]
1
2022-01-13T12:38:44.000Z
2022-01-13T12:38:44.000Z
# --coding=utf-8-- _base_ = '../retinanet/retinanet_r50_fpn_1x_coco.py' model = dict( bbox_head=dict( num_classes=5, anchor_generator=dict(ratios=[0.2, 0.5, 1.0, 2.0, 5.0]) ) ) load_from = 'work_dirs2/lr0.01_custom_bigimgscale2/epoch_20.pth' optimizer = dict(t...
30.746988
77
0.62931
_base_ = '../retinanet/retinanet_r50_fpn_1x_coco.py' model = dict( bbox_head=dict( num_classes=5, anchor_generator=dict(ratios=[0.2, 0.5, 1.0, 2.0, 5.0]) ) ) load_from = 'work_dirs2/lr0.01_custom_bigimgscale2/epoch_20.pth' optimizer = dict(type='SGD', lr=0.000...
true
true