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
f761081b7bed508272b1bdb04c9cbd49285ce7b3
394
gyp
Python
binding.gyp
jvail/scip-node
302e822ed9c4696805abf2e76893efa5df89eb22
[ "MIT" ]
1
2020-03-20T00:04:08.000Z
2020-03-20T00:04:08.000Z
binding.gyp
jvail/scip-node
302e822ed9c4696805abf2e76893efa5df89eb22
[ "MIT" ]
null
null
null
binding.gyp
jvail/scip-node
302e822ed9c4696805abf2e76893efa5df89eb22
[ "MIT" ]
null
null
null
{ 'targets': [ { 'target_name': 'scip_node_bindings', 'include_dirs': [ '../../scipoptsuite-3.0.1/scip-3.0.1/src/scip', '../../scipoptsuite-3.0.1/scip-3.0.1/src/' ], 'ldflags': [ '-lscipopt-3.0.1.linux.x86_64.gnu.opt', '-L../../scipoptsuite-3.0.1/lib' ...
20.736842
55
0.464467
{ 'targets': [ { 'target_name': 'scip_node_bindings', 'include_dirs': [ '../../scipoptsuite-3.0.1/scip-3.0.1/src/scip', '../../scipoptsuite-3.0.1/scip-3.0.1/src/' ], 'ldflags': [ '-lscipopt-3.0.1.linux.x86_64.gnu.opt', '-L../../scipoptsuite-3.0.1/lib' ...
true
true
f761098ab34b6b54993b442378a73bf5ec248da1
1,326
py
Python
account/urls.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
account/urls.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
account/urls.py
albertmil97/django_AlbertMIliano
9d1c1763e9061083d1cc1e389a77423cfd2e7daf
[ "MIT" ]
null
null
null
from django.urls import path, reverse_lazy from django.contrib.auth import views as auth_views from . import views app_name = 'account' urlpatterns = [ path('login/', auth_views.LoginView.as_view(), name = 'login'), path('logout/', auth_views.LogoutView.as_view(), name = 'logout'), path('', views.dashboar...
66.3
177
0.751885
from django.urls import path, reverse_lazy from django.contrib.auth import views as auth_views from . import views app_name = 'account' urlpatterns = [ path('login/', auth_views.LoginView.as_view(), name = 'login'), path('logout/', auth_views.LogoutView.as_view(), name = 'logout'), path('', views.dashboar...
true
true
f761099fc43e1bcdcd471200a3f86ed992585e84
4,024
py
Python
bsp/wch/arm/ch32f203r-evt/rtconfig.py
BreederBai/rt-thread
53ed0314982556dfa9c5db75d4f3e02485d16ab5
[ "Apache-2.0" ]
null
null
null
bsp/wch/arm/ch32f203r-evt/rtconfig.py
BreederBai/rt-thread
53ed0314982556dfa9c5db75d4f3e02485d16ab5
[ "Apache-2.0" ]
null
null
null
bsp/wch/arm/ch32f203r-evt/rtconfig.py
BreederBai/rt-thread
53ed0314982556dfa9c5db75d4f3e02485d16ab5
[ "Apache-2.0" ]
null
null
null
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='keil' # bsp lib config BSP_LIBRARY_TYPE = None if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execut...
26.649007
117
0.579771
import os ARCH='arm' CPU='cortex-m3' CROSS_TOOL='keil' BSP_LIBRARY_TYPE = None if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = r'C:\Users\XXYYZZ' elif CROSS_TOOL == 'keil': ...
true
true
f76109b2a6f464560a8ffc8f59a315738ba08bc0
11,793
py
Python
python/ranking/loganary/ranking/model.py
codelibs/logana
48b475e9fd5224821bfba7d41e755d8d64806651
[ "Apache-2.0" ]
2
2020-09-30T12:42:28.000Z
2020-11-04T01:34:20.000Z
python/ranking/loganary/ranking/model.py
codelibs/logana
48b475e9fd5224821bfba7d41e755d8d64806651
[ "Apache-2.0" ]
null
null
null
python/ranking/loganary/ranking/model.py
codelibs/logana
48b475e9fd5224821bfba7d41e755d8d64806651
[ "Apache-2.0" ]
null
null
null
import dataclasses import logging from typing import Any, Callable, Dict, List, Optional, Tuple import tensorflow as tf import tensorflow_ranking as tfr from loganary.ranking.common import get_ndcg_metric from tensorflow.python.feature_column.feature_column_v2 import FeatureColumn from tensorflow.python.ops.init_ops i...
37.919614
88
0.637327
import dataclasses import logging from typing import Any, Callable, Dict, List, Optional, Tuple import tensorflow as tf import tensorflow_ranking as tfr from loganary.ranking.common import get_ndcg_metric from tensorflow.python.feature_column.feature_column_v2 import FeatureColumn from tensorflow.python.ops.init_ops i...
true
true
f7610af04c8d919d62a1770835ea7113c18a33d1
872
py
Python
test/test_error_error.py
metacore-io/metacore-api-client-python
37d6127442e7a56deeedb88bf50b83e5d24fa7b0
[ "MIT" ]
null
null
null
test/test_error_error.py
metacore-io/metacore-api-client-python
37d6127442e7a56deeedb88bf50b83e5d24fa7b0
[ "MIT" ]
null
null
null
test/test_error_error.py
metacore-io/metacore-api-client-python
37d6127442e7a56deeedb88bf50b83e5d24fa7b0
[ "MIT" ]
null
null
null
# coding: utf-8 """ Metacore IoT Object Storage API Metacore Object Storage - IOT Core Services # noqa: E501 OpenAPI spec version: 1.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import metacore_api_python_cli fr...
21.8
87
0.699541
from __future__ import absolute_import import unittest import metacore_api_python_cli from models.error_error import ErrorError from metacore_api_python_cli.rest import ApiException class TestErrorError(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testErro...
true
true
f7610b56393ea7b71f869017516668d9003ce4f8
115,075
py
Python
scripts/virtualenv/virtualenv.py
goerz/dissertation
ee8ae29b5da1bc6033260224ae6444fd7f4c4a2f
[ "CC-BY-3.0" ]
2
2016-05-09T03:22:23.000Z
2018-07-11T13:33:43.000Z
scripts/virtualenv/virtualenv.py
goerz/dissertation
ee8ae29b5da1bc6033260224ae6444fd7f4c4a2f
[ "CC-BY-3.0" ]
null
null
null
scripts/virtualenv/virtualenv.py
goerz/dissertation
ee8ae29b5da1bc6033260224ae6444fd7f4c4a2f
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python """Create a "virtual" Python installation """ # If you change the version here, change it in setup.py # and docs/conf.py as well. __version__ = "1.9" # following best practices virtualenv_version = __version__ # legacy, again import base64 import sys import os import codecs import optparse imp...
44.533669
197
0.701768
"""Create a "virtual" Python installation """ __version__ = "1.9" virtualenv_version = __version__ import base64 import sys import os import codecs import optparse import re import shutil import logging import tempfile import zlib import errno import glob import distutils.sysconfig from distutils.util import strtob...
false
true
f7610b612fa0e7cdb152bf7847c1484153314fe8
2,973
py
Python
descarteslabs/common/threading/tests/test_local.py
carderne/descarteslabs-python
757b480efb8d58474a3bf07f1dbd90652b46ed64
[ "Apache-2.0" ]
167
2017-03-23T22:16:58.000Z
2022-03-08T09:19:30.000Z
descarteslabs/common/threading/tests/test_local.py
carderne/descarteslabs-python
757b480efb8d58474a3bf07f1dbd90652b46ed64
[ "Apache-2.0" ]
93
2017-03-23T22:11:40.000Z
2021-12-13T18:38:53.000Z
descarteslabs/common/threading/tests/test_local.py
carderne/descarteslabs-python
757b480efb8d58474a3bf07f1dbd90652b46ed64
[ "Apache-2.0" ]
46
2017-03-25T19:12:14.000Z
2021-08-15T18:04:29.000Z
import multiprocessing import os import sys import unittest import threading from descarteslabs.common.threading.local import ThreadLocalWrapper class ThreadLocalWrapperTest(unittest.TestCase): def setUp(self): self.wrapper = ThreadLocalWrapper( lambda: (os.getpid(), threading.current_thread(...
36.703704
93
0.669694
import multiprocessing import os import sys import unittest import threading from descarteslabs.common.threading.local import ThreadLocalWrapper class ThreadLocalWrapperTest(unittest.TestCase): def setUp(self): self.wrapper = ThreadLocalWrapper( lambda: (os.getpid(), threading.current_thread(...
true
true
f7610bf853766b42b732ffbb9ca5933d1b09dabc
804
py
Python
cleaner.py
HdjjSDIM/21_Fall_project_gabbishSorting
62f996fa339ed5edd01fdf85343b82684b44c7dc
[ "MIT" ]
null
null
null
cleaner.py
HdjjSDIM/21_Fall_project_gabbishSorting
62f996fa339ed5edd01fdf85343b82684b44c7dc
[ "MIT" ]
null
null
null
cleaner.py
HdjjSDIM/21_Fall_project_gabbishSorting
62f996fa339ed5edd01fdf85343b82684b44c7dc
[ "MIT" ]
null
null
null
# 这个程序开始即代表进入清洁模式 class cleaner(object): '''Create this class to give a cleaning mode to the program. Attribute: __is_cleaning: A protected attribute refers to the status of cleaning mode. ''' def __init__(self): self.__is_cleaning = False #定义了一个私有属性 def is_cle...
30.923077
85
0.633085
class cleaner(object): def __init__(self): self.__is_cleaning = False def is_cleanning_work_on(self): return self.__is_cleaning def change_cleaning_status(self): if self.__is_cleaning: self.__is_cleaning = False else: self.__is_cleaning...
true
true
f7610c48b982c798ed895bc73badd3854b56d97c
17,389
py
Python
ost/s1_core/search.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
ost/s1_core/search.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
ost/s1_core/search.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
''' Based on a set of search parameters the script will create a query on www.scihub.copernicus.eu and return the results either as shapefile, sqlite, or write to a PostGreSQL database. ------------------ Usage ------------------ python3 search.py -a /path/to/aoi-shapefile.shp -b 2018-01-01 -e 2018-31-12 ...
39.974713
88
0.503077
import os import sys import logging import datetime from urllib.error import URLError import xml.dom.minidom import dateutil.parser import geopandas as gpd from shapely.wkt import dumps, loads from ost.helpers.db import pgHandler from ost.helpers import scihub from ost.errors import EmptySearchError ...
true
true
f7610cede53dbc3dc053489011b6c970e78ef3d0
9,501
py
Python
dataset.py
vish119/Neural-Network-for-XOR-and-Binary-Image-Classification
10e27cc5618c2c399826af06aae6a2e86b4b3df2
[ "MIT" ]
null
null
null
dataset.py
vish119/Neural-Network-for-XOR-and-Binary-Image-Classification
10e27cc5618c2c399826af06aae6a2e86b4b3df2
[ "MIT" ]
null
null
null
dataset.py
vish119/Neural-Network-for-XOR-and-Binary-Image-Classification
10e27cc5618c2c399826af06aae6a2e86b4b3df2
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import sys sys.path.append('../../core') from imgutils import * class xor(object): """ Class that creates a xor dataset. Note that for the grading of the project, this method might be changed, although it's output format will not be. This implies we migh...
39.753138
107
0.581518
import numpy as np import matplotlib.pyplot as plt import sys sys.path.append('../../core') from imgutils import * class xor(object): def __init__(self): self.dimensions = 2 self.positive_means = [[-1, -1], [1, 1]] self.negative_means = [[-1, 1], [1, -1]] self.covariance = [[0.3...
true
true
f7610d2c4b8748b28e509037dbcaf4f4847a9c15
6,607
py
Python
chemprop/train/cross_validate.py
JLans/chemprop
4907f77d6ad3a316b70744a6b4cb5e290bd98d40
[ "MIT" ]
null
null
null
chemprop/train/cross_validate.py
JLans/chemprop
4907f77d6ad3a316b70744a6b4cb5e290bd98d40
[ "MIT" ]
null
null
null
chemprop/train/cross_validate.py
JLans/chemprop
4907f77d6ad3a316b70744a6b4cb5e290bd98d40
[ "MIT" ]
null
null
null
from collections import defaultdict import csv from logging import Logger import logging import os import sys from typing import Callable, Dict, List, Tuple import numpy as np import pandas as pd from .run_training import run_training from chemprop.args import TrainArgs from chemprop.constants import TEST_SCORES_FILE...
39.562874
108
0.675042
from collections import defaultdict import csv from logging import Logger import logging import os import sys from typing import Callable, Dict, List, Tuple import numpy as np import pandas as pd from .run_training import run_training from chemprop.args import TrainArgs from chemprop.constants import TEST_SCORES_FILE...
true
true
f7610d7903f6debfa48d6f4050fb481ef7dea8c6
12,799
py
Python
dynamix/correlator/dense.py
williamchevremont/dynamix
445a85b331278097a0c997dfecd73c39dc8f1afd
[ "MIT" ]
3
2021-01-12T05:46:51.000Z
2021-04-13T15:05:42.000Z
dynamix/correlator/dense.py
williamchevremont/dynamix
445a85b331278097a0c997dfecd73c39dc8f1afd
[ "MIT" ]
18
2019-08-23T08:42:36.000Z
2021-09-13T15:14:38.000Z
dynamix/correlator/dense.py
williamchevremont/dynamix
445a85b331278097a0c997dfecd73c39dc8f1afd
[ "MIT" ]
6
2019-08-01T12:10:52.000Z
2021-12-09T14:55:02.000Z
from math import sqrt from collections import namedtuple import numpy as np import pyopencl.array as parray from os import path from multiprocessing import cpu_count from ..utils import nextpow2, updiv, get_opencl_srcfile, get_next_power from .common import OpenclCorrelator, BaseCorrelator from silx.math.fft.fftw impo...
32.817949
115
0.588796
from math import sqrt from collections import namedtuple import numpy as np import pyopencl.array as parray from os import path from multiprocessing import cpu_count from ..utils import nextpow2, updiv, get_opencl_srcfile, get_next_power from .common import OpenclCorrelator, BaseCorrelator from silx.math.fft.fftw impo...
true
true
f7610d928e1d6e9ae23752221d7d3d7a7f857321
911
py
Python
me2ushop/migrations/0156_auto_20211018_1409.py
Dogechi/Me2U
0852600983dc1058ee347f4065ee801e16c1249e
[ "MIT" ]
null
null
null
me2ushop/migrations/0156_auto_20211018_1409.py
Dogechi/Me2U
0852600983dc1058ee347f4065ee801e16c1249e
[ "MIT" ]
9
2020-06-06T01:16:25.000Z
2021-06-04T23:20:37.000Z
me2ushop/migrations/0156_auto_20211018_1409.py
Me2U-Afrika/Me2U
aee054afedff1e6c87f87494eaddf044e217aa95
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2021-10-18 12:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('me2ushop', '0155_auto_20211018_1401'), ] operations = [ migrations.AddField( model_name='productcustomizations', nam...
31.413793
110
0.608123
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('me2ushop', '0155_auto_20211018_1401'), ] operations = [ migrations.AddField( model_name='productcustomizations', name='customization_discount_price', fi...
true
true
f7610e1c776a0473514a45190c12838da0856a05
8,880
py
Python
tomso/fgong.py
waltervrossem/tomso
6502bfda598d2b8d13e8e06249c4687fe2bb5f37
[ "MIT" ]
null
null
null
tomso/fgong.py
waltervrossem/tomso
6502bfda598d2b8d13e8e06249c4687fe2bb5f37
[ "MIT" ]
null
null
null
tomso/fgong.py
waltervrossem/tomso
6502bfda598d2b8d13e8e06249c4687fe2bb5f37
[ "MIT" ]
null
null
null
""" Functions for manipulating FGONG files. """ import numpy as np from tomso.common import integrate, DEFAULT_G from tomso.adipls import fgong_to_amdl def load_fgong(filename, N=-1, return_comment=False): """Given an FGONG file, returns NumPy arrays `glob` and `var` that correspond to the scalar and point-w...
32.767528
84
0.53277
import numpy as np from tomso.common import integrate, DEFAULT_G from tomso.adipls import fgong_to_amdl def load_fgong(filename, N=-1, return_comment=False): def replace(s): t = s[:].lower().strip() t = t.replace('d', 'e') t = t.replace('+', 'e+') t = t.replace('-', '...
true
true
f7610e834731a7be665a026f5df9ff77b7bc20ac
712
py
Python
alipay/aop/api/response/AlipaySocialGiftOrderRefundResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipaySocialGiftOrderRefundResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipaySocialGiftOrderRefundResponse.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipaySocialGiftOrderRefundResponse(AlipayResponse): def __init__(self): super(AlipaySocialGiftOrderRefundResponse, self).__init__() self._order_id = None @prope...
27.384615
108
0.713483
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipaySocialGiftOrderRefundResponse(AlipayResponse): def __init__(self): super(AlipaySocialGiftOrderRefundResponse, self).__init__() self._order_id = None @property def order_id(self): return sel...
true
true
f76110a328fc700414dd0948a1f5fe15af7306a2
2,015
py
Python
test/functional/test_framework/siphash.py
syglee7/zenacoin-ver2
90079b95bdf0ea2b7fce644c56d2a9626526e5e4
[ "MIT" ]
null
null
null
test/functional/test_framework/siphash.py
syglee7/zenacoin-ver2
90079b95bdf0ea2b7fce644c56d2a9626526e5e4
[ "MIT" ]
null
null
null
test/functional/test_framework/siphash.py
syglee7/zenacoin-ver2
90079b95bdf0ea2b7fce644c56d2a9626526e5e4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Zenacoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Specialized SipHash-2-4 implementations. This implements SipHash-2-4 for 256-bit integers. """ def r...
31.484375
69
0.533499
def rotl64(n, b): return n >> (64 - b) | (n & ((1 << (64 - b)) - 1)) << b def siphash_round(v0, v1, v2, v3): v0 = (v0 + v1) & ((1 << 64) - 1) v1 = rotl64(v1, 13) v1 ^= v0 v0 = rotl64(v0, 32) v2 = (v2 + v3) & ((1 << 64) - 1) v3 = rotl64(v3, 16) v3 ^= v2 v0 = (v0 + v3) & ((1 << 64) -...
true
true
f7611156469d0aa91f137c983bf0195d894260eb
426
py
Python
pywhatkit/__init__.py
ekapujiw2002/pywhatkit
f530a65d2023fbdd8ee24d11dc325b8ff0a72b5b
[ "MIT" ]
null
null
null
pywhatkit/__init__.py
ekapujiw2002/pywhatkit
f530a65d2023fbdd8ee24d11dc325b8ff0a72b5b
[ "MIT" ]
null
null
null
pywhatkit/__init__.py
ekapujiw2002/pywhatkit
f530a65d2023fbdd8ee24d11dc325b8ff0a72b5b
[ "MIT" ]
1
2020-12-31T08:11:15.000Z
2020-12-31T08:11:15.000Z
"""This piece of software was last updated on 26-August-2020 at 18:52 IST. Pull requests are always welcomed""" from pywhatkit.mainfunctions import watch_tutorial_in_English, watch_tutorial_in_Hindi, developer_contact, showHistory, shutdown, cancelShutdown, prnt_sleeptm, check_window, sendwhatmsg, info, playonyt, i...
71
237
0.830986
from pywhatkit.mainfunctions import watch_tutorial_in_English, watch_tutorial_in_Hindi, developer_contact, showHistory, shutdown, cancelShutdown, prnt_sleeptm, check_window, sendwhatmsg, info, playonyt, image_to_ascii_art, search, help from pywhatkit.chr_to_handwriting import download, text_to_handwriting
true
true
f761116d8731cd17ea8bc3a59875505c4b50799f
1,145
py
Python
web/transiq/notification/admin.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
null
null
null
web/transiq/notification/admin.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
14
2020-06-05T23:06:45.000Z
2022-03-12T00:00:18.000Z
web/transiq/notification/admin.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.contrib import admin from notification.models import MobileDevice class MobileDeviceAdmin(admin.ModelAdmin): list_display = ['id', 'user', 'app', 'token', 'device_id', 'active'] list_filter = ['app', '...
31.805556
90
0.686463
from __future__ import unicode_literals from datetime import datetime from django.contrib import admin from notification.models import MobileDevice class MobileDeviceAdmin(admin.ModelAdmin): list_display = ['id', 'user', 'app', 'token', 'device_id', 'active'] list_filter = ['app', 'device_id', 'active'] ...
true
true
f7611178433f3a0709f464ee3b4e8eeb338c6128
2,546
py
Python
code/exp_cv688180_lgb_refactored_jun23/utils.py
Isakon/Viral_Tweets_Predictions_Challenge_1st_Place_Solution
f4b52748d7b87ad092051c6982553b9550895354
[ "MIT" ]
3
2021-08-25T08:44:10.000Z
2021-08-31T16:49:44.000Z
code/exp_cv688180_lgb_refactored_jun23/utils.py
Isakon/Viral_Tweets_Predictions_Challenge_1st_Place_Solution
f4b52748d7b87ad092051c6982553b9550895354
[ "MIT" ]
null
null
null
code/exp_cv688180_lgb_refactored_jun23/utils.py
Isakon/Viral_Tweets_Predictions_Challenge_1st_Place_Solution
f4b52748d7b87ad092051c6982553b9550895354
[ "MIT" ]
1
2021-08-31T03:42:15.000Z
2021-08-31T03:42:15.000Z
import os import numpy as np import pandas as pd def compare_data(test, compare_path='/home/isakev/challenges/viral_tweets/data/processed/a_test_data_lgb_NoImpute_NoOhe_jun23.csv'): print("preprocessed path:\n", compare_path) # print("cfg.test_preprocessed_path\n:", cfg.test_preprocessed_path)...
45.464286
126
0.692066
import os import numpy as np import pandas as pd def compare_data(test, compare_path='/home/isakev/challenges/viral_tweets/data/processed/a_test_data_lgb_NoImpute_NoOhe_jun23.csv'): print("preprocessed path:\n", compare_path) test_compare = pd.read_csv(compare_path) cols_here_not...
true
true
f7611188b5a2d8d70dab9ed39d766f520770a405
147
py
Python
.template/script.py
ralfholly/pg-microbit
b9f3d6d0b832c1b36aaff439575253f8d34a4d33
[ "Unlicense" ]
null
null
null
.template/script.py
ralfholly/pg-microbit
b9f3d6d0b832c1b36aaff439575253f8d34a4d33
[ "Unlicense" ]
null
null
null
.template/script.py
ralfholly/pg-microbit
b9f3d6d0b832c1b36aaff439575253f8d34a4d33
[ "Unlicense" ]
1
2021-11-18T22:43:45.000Z
2021-11-18T22:43:45.000Z
import microbit as mbit def main(): # TODO: Your code here... mbit.display.show(mbit.Image.HAPPY) if __name__ == '__main__': main()
14.7
39
0.639456
import microbit as mbit def main(): mbit.display.show(mbit.Image.HAPPY) if __name__ == '__main__': main()
true
true
f76113494f4472b9cb4f27f88e510f26d55a32f8
791
py
Python
SBI/saving/migrations/0001_initial.py
RoshaMahalle/sbi
55e7887c880ab048499cf6a73604fd7df15d0180
[ "MIT" ]
null
null
null
SBI/saving/migrations/0001_initial.py
RoshaMahalle/sbi
55e7887c880ab048499cf6a73604fd7df15d0180
[ "MIT" ]
null
null
null
SBI/saving/migrations/0001_initial.py
RoshaMahalle/sbi
55e7887c880ab048499cf6a73604fd7df15d0180
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-21 19:01 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='SavingApplication', fields=[ ('id', models....
29.296296
117
0.563843
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='SavingApplication', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True...
true
true
f761148744a4d5bbad3b6f2747d2612c456a8d3b
26,441
py
Python
baseline.py
nmoran/CosmiQ_SN6_Baseline
063b62605eb9e426ac4407e48c46735ffb420dd5
[ "Apache-2.0" ]
null
null
null
baseline.py
nmoran/CosmiQ_SN6_Baseline
063b62605eb9e426ac4407e48c46735ffb420dd5
[ "Apache-2.0" ]
null
null
null
baseline.py
nmoran/CosmiQ_SN6_Baseline
063b62605eb9e426ac4407e48c46735ffb420dd5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys import glob import math import uuid import shutil import pathlib import argparse import numpy as np import pandas as pd import geopandas as gpd import skimage import torch import tqdm import gdal import solaris as sol import model def makeemptyfolder(path): """ Cre...
33.682803
214
0.637911
import os import sys import glob import math import uuid import shutil import pathlib import argparse import numpy as np import pandas as pd import geopandas as gpd import skimage import torch import tqdm import gdal import solaris as sol import model def makeemptyfolder(path): shutil.rmtree(path, ignore_errors...
true
true
f761153c67f579d619f82006a50846b0b9df1ab7
5,369
py
Python
mpf/tests/test_Rpi.py
Wolfmarsh/mpf
ad71f381ce8a0e65f28958e51cf8a8b38a6154fb
[ "MIT" ]
null
null
null
mpf/tests/test_Rpi.py
Wolfmarsh/mpf
ad71f381ce8a0e65f28958e51cf8a8b38a6154fb
[ "MIT" ]
null
null
null
mpf/tests/test_Rpi.py
Wolfmarsh/mpf
ad71f381ce8a0e65f28958e51cf8a8b38a6154fb
[ "MIT" ]
null
null
null
import asyncio from mpf.platforms.rpi import rpi from mpf.tests.MpfTestCase import MpfTestCase class MockApigpio(): # gpio Pull Up Down PUD_OFF = 0 PUD_DOWN = 1 PUD_UP = 2 # gpio modes INPUT = 0 OUTPUT = 1 # gpio edges RISING_EDGE = 0 FALLING_EDGE = 1 EITHER_EDGE = 2...
29.5
99
0.583721
import asyncio from mpf.platforms.rpi import rpi from mpf.tests.MpfTestCase import MpfTestCase class MockApigpio(): PUD_OFF = 0 PUD_DOWN = 1 PUD_UP = 2 INPUT = 0 OUTPUT = 1 RISING_EDGE = 0 FALLING_EDGE = 1 EITHER_EDGE = 2 class Pi(): def __init__(self, ...
true
true
f76116a1a0e2174a2a990fb2cdd4b61ffdeafa98
42,269
py
Python
swf/export.py
swar/pyswf
f34e3567115fa3c41bc5fda3281ab7adc8b51d67
[ "MIT" ]
null
null
null
swf/export.py
swar/pyswf
f34e3567115fa3c41bc5fda3281ab7adc8b51d67
[ "MIT" ]
null
null
null
swf/export.py
swar/pyswf
f34e3567115fa3c41bc5fda3281ab7adc8b51d67
[ "MIT" ]
1
2021-06-21T18:27:11.000Z
2021-06-21T18:27:11.000Z
""" This module defines exporters for the SWF fileformat. """ from __future__ import absolute_import from __future__ import division from builtins import map from builtins import chr from builtins import str from builtins import range from past.utils import old_div from builtins import object from .consts import * from...
37.143234
143
0.579952
from __future__ import absolute_import from __future__ import division from builtins import map from builtins import chr from builtins import str from builtins import range from past.utils import old_div from builtins import object from .consts import * from .geom import * from .utils import * from .data import * from ...
true
true
f76116eb6a25393a2516a515ae200a320e34a84c
6,827
py
Python
sdk/python/pulumi_aws/lambda_/get_code_signing_config.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
260
2018-06-18T14:57:00.000Z
2022-03-29T11:41:03.000Z
sdk/python/pulumi_aws/lambda_/get_code_signing_config.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
1,154
2018-06-19T20:38:20.000Z
2022-03-31T19:48:16.000Z
sdk/python/pulumi_aws/lambda_/get_code_signing_config.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
115
2018-06-28T03:20:27.000Z
2022-03-29T11:41:06.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
39.235632
238
0.688296
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs __all__ = [ 'GetCodeSigningConfigResult', 'AwaitableGetCodeSigningConfigResult', 'get_code_signing_config', 'get_code_signing_config_...
true
true
f7611734d1ab53495e1f7fff7dc4e719957ce966
729
py
Python
vendor/consul-kv/tests/unit/serializer/test_map_dictionary.py
vdloo/raptiformica
e2807e5e913312034161efcbd74525a4b15b37e7
[ "MIT" ]
21
2016-09-04T11:27:31.000Z
2019-10-30T08:23:14.000Z
tests/unit/serializer/test_map_dictionary.py
briskgopesh/consul-kv
7beb2c1c84f87ff81bb010ebe49b939d639eccfe
[ "MIT" ]
6
2016-12-21T20:08:27.000Z
2019-12-20T14:45:06.000Z
tests/unit/serializer/test_map_dictionary.py
briskgopesh/consul-kv
7beb2c1c84f87ff81bb010ebe49b939d639eccfe
[ "MIT" ]
12
2016-12-21T16:47:47.000Z
2021-08-05T16:22:36.000Z
from consul_kv import map_dictionary from tests.testcase import TestCase class TestMapDictionary(TestCase): def setUp(self): self.dictionary = { 'some': {'key': 'and', 'some': 'values'}, 'with': { 'some': {'other': 'keys'}, 'and': {'some': 'other', '...
28.038462
60
0.521262
from consul_kv import map_dictionary from tests.testcase import TestCase class TestMapDictionary(TestCase): def setUp(self): self.dictionary = { 'some': {'key': 'and', 'some': 'values'}, 'with': { 'some': {'other': 'keys'}, 'and': {'some': 'other', '...
true
true
f76118634ff460e594be8f56a055bf902de9b86a
6,653
py
Python
test/util/bitcoin-util-test.py
barrystyle/Pricecoin
dc30cbc16cbb249a63e8ec3cbc31b04b887d4d58
[ "MIT" ]
4
2018-04-24T20:56:48.000Z
2020-03-01T09:54:29.000Z
test/util/bitcoin-util-test.py
barrystyle/Pricecoin
dc30cbc16cbb249a63e8ec3cbc31b04b887d4d58
[ "MIT" ]
2
2018-05-06T17:37:59.000Z
2018-07-06T11:36:18.000Z
test/util/bitcoin-util-test.py
barrystyle/Pricecoin
dc30cbc16cbb249a63e8ec3cbc31b04b887d4d58
[ "MIT" ]
2
2019-01-20T20:56:15.000Z
2019-02-12T03:47:16.000Z
#!/usr/bin/env python3 # Copyright 2014 BitPay Inc. # Copyright 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test framework for pricecoin utils. Runs automatically during `make check`. ...
36.756906
125
0.637006
from __future__ import division,print_function,unicode_literals import argparse import binascii try: import configparser except ImportError: import ConfigParser as configparser import difflib import json import logging import os import pprint import subprocess import sys def main(): config = configparser...
true
true
f761189aca0682a35be26000e75860e8af3ad096
4,789
py
Python
authentication/views.py
paul-serafimescu/growth-tracker
972dd1de534225a9be2e763045db560f420a844c
[ "MIT" ]
1
2021-07-28T04:21:12.000Z
2021-07-28T04:21:12.000Z
authentication/views.py
paul-serafimescu/growth-tracker
972dd1de534225a9be2e763045db560f420a844c
[ "MIT" ]
null
null
null
authentication/views.py
paul-serafimescu/growth-tracker
972dd1de534225a9be2e763045db560f420a844c
[ "MIT" ]
null
null
null
from django.shortcuts import redirect from django.views import View from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.contrib.auth import login, logout, authenticate from django.utils import timezone from tracker.models import DiscordUser from config.environment import DISCORD_OAUTH_RO...
36.280303
116
0.660472
from django.shortcuts import redirect from django.views import View from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.contrib.auth import login, logout, authenticate from django.utils import timezone from tracker.models import DiscordUser from config.environment import DISCORD_OAUTH_RO...
true
true
f7611a3c1cd9ec357065b348b22f47d4d46686e2
377
py
Python
python-binance/unit10/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
9
2020-10-25T15:13:32.000Z
2022-03-26T11:27:21.000Z
python-binance/unit10/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
null
null
null
python-binance/unit10/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
7
2021-03-01T11:06:45.000Z
2022-03-14T07:06:04.000Z
import ccxt import pprint with open("../api.txt") as f: lines = f.readlines() api_key = lines[0].strip() secret = lines[1].strip() binance = ccxt.binance(config={ 'apiKey': api_key, 'secret': secret, 'enableRateLimit': True, 'options': { 'defaultType': 'future' } }) markets...
17.952381
32
0.599469
import ccxt import pprint with open("../api.txt") as f: lines = f.readlines() api_key = lines[0].strip() secret = lines[1].strip() binance = ccxt.binance(config={ 'apiKey': api_key, 'secret': secret, 'enableRateLimit': True, 'options': { 'defaultType': 'future' } }) markets...
true
true
f7611a96e2b73ce98612cdadf4a1224357aa2a1d
1,126
py
Python
seleniumbase/__init__.py
mdmintz/seleniumspot
f5c225aa4fcd0b4124fc990e3892c36736290ce8
[ "MIT" ]
1
2015-06-17T10:16:26.000Z
2015-06-17T10:16:26.000Z
seleniumbase/__init__.py
mdmintz/seleniumspot
f5c225aa4fcd0b4124fc990e3892c36736290ce8
[ "MIT" ]
null
null
null
seleniumbase/__init__.py
mdmintz/seleniumspot
f5c225aa4fcd0b4124fc990e3892c36736290ce8
[ "MIT" ]
null
null
null
import collections import sys from selenium import webdriver from seleniumbase.__version__ import __version__ from seleniumbase.common import decorators # noqa from seleniumbase.common import encryption # noqa from seleniumbase.core.browser_launcher import get_driver # noqa from seleniumbase.fixtures import js_utils...
45.04
77
0.778863
import collections import sys from selenium import webdriver from seleniumbase.__version__ import __version__ from seleniumbase.common import decorators from seleniumbase.common import encryption from seleniumbase.core.browser_launcher import get_driver from seleniumbase.fixtures import js_utils from seleniumbase.f...
true
true
f7611b386e25dbac5d12b64f87dea966d173d16e
1,032
py
Python
ehmatthes-pcc_2e-078318e/chapter_11/test_survey.py
charliechocho/py-crash-course
b42b8a4c1cb8d76e8316f55c1565ff42d920ee63
[ "Apache-2.0" ]
12
2020-10-22T14:03:27.000Z
2022-03-28T08:14:22.000Z
ehmatthes-pcc_2e-078318e/chapter_11/test_survey.py
charliechocho/py-crash-course
b42b8a4c1cb8d76e8316f55c1565ff42d920ee63
[ "Apache-2.0" ]
4
2020-12-26T15:08:02.000Z
2021-05-16T13:19:33.000Z
ehmatthes-pcc_2e-078318e/chapter_11/test_survey.py
charliechocho/py-crash-course
b42b8a4c1cb8d76e8316f55c1565ff42d920ee63
[ "Apache-2.0" ]
9
2020-12-22T10:22:12.000Z
2022-03-28T08:14:53.000Z
import unittest from survey import AnonymousSurvey class TestAnonymousSurvey(unittest.TestCase): """Tests for the class AnonymousSurvey""" def setUp(self): """ Create a survey and a set of responses for use in all test methods. """ question = "What language did you first le...
35.586207
75
0.675388
import unittest from survey import AnonymousSurvey class TestAnonymousSurvey(unittest.TestCase): def setUp(self): question = "What language did you first learn to speak?" self.my_survey = AnonymousSurvey(question) self.responses = ['English', 'Spanish', 'Mandarin'] def test_store_...
true
true
f7611cb7aabf912cca4fa130fafca165b11e369e
2,268
py
Python
auth-api/migrations/versions/9b3cd480fa3b_update_authorisation_view.py
argush3/sbc-auth
96a4de3a4358b3158540aea8c4d99e06909793f2
[ "Apache-2.0" ]
null
null
null
auth-api/migrations/versions/9b3cd480fa3b_update_authorisation_view.py
argush3/sbc-auth
96a4de3a4358b3158540aea8c4d99e06909793f2
[ "Apache-2.0" ]
null
null
null
auth-api/migrations/versions/9b3cd480fa3b_update_authorisation_view.py
argush3/sbc-auth
96a4de3a4358b3158540aea8c4d99e06909793f2
[ "Apache-2.0" ]
1
2019-07-25T18:20:41.000Z
2019-07-25T18:20:41.000Z
"""update authorisation view Revision ID: 9b3cd480fa3b Revises: a930f64458f6 Create Date: 2020-03-09 19:02:58.716934 """ from alembic import op import sqlalchemy as sa from auth_api.utils.custom_sql import CustomSql # revision identifiers, used by Alembic. revision = '9b3cd480fa3b' down_revision = 'a930f64458f6' bra...
42
86
0.446649
from alembic import op import sqlalchemy as sa from auth_api.utils.custom_sql import CustomSql revision = '9b3cd480fa3b' down_revision = 'a930f64458f6' branch_labels = None depends_on = None authorizations_view = CustomSql('authorizations_view', 'SELECT e.business_identifier, ' ...
true
true
f7611d0ec9b5ae5bd6e4c28b28b3db5f05c1cf16
17,993
py
Python
tools/codegen/dest/lazy_ir.py
nicholasjng/pytorch
77f23d64607142c0cba47f5148ebc1959c9de366
[ "Intel" ]
null
null
null
tools/codegen/dest/lazy_ir.py
nicholasjng/pytorch
77f23d64607142c0cba47f5148ebc1959c9de366
[ "Intel" ]
null
null
null
tools/codegen/dest/lazy_ir.py
nicholasjng/pytorch
77f23d64607142c0cba47f5148ebc1959c9de366
[ "Intel" ]
null
null
null
from abc import ABC from typing import List, Union from dataclasses import dataclass from tools.codegen.context import method_with_native_function from tools.codegen.model import BackendIndex, NativeFunction, NativeFunctionsGroup from tools.codegen.api.types import ( BaseCType, OptionalCType, VectorCType, ...
41.079909
128
0.621853
from abc import ABC from typing import List, Union from dataclasses import dataclass from tools.codegen.context import method_with_native_function from tools.codegen.model import BackendIndex, NativeFunction, NativeFunctionsGroup from tools.codegen.api.types import ( BaseCType, OptionalCType, VectorCType, ...
true
true
f7611d1d984cd531cf7877ecb4107b5d078cdf6a
99
py
Python
main.py
atifovac/blockPyChain
b0e65bad819a65cb771c06eee0f66d994696006c
[ "Unlicense" ]
null
null
null
main.py
atifovac/blockPyChain
b0e65bad819a65cb771c06eee0f66d994696006c
[ "Unlicense" ]
null
null
null
main.py
atifovac/blockPyChain
b0e65bad819a65cb771c06eee0f66d994696006c
[ "Unlicense" ]
null
null
null
from router.bcrouter import app if __name__ == '__main__': app.run(host='0.0.0.0', port=5000)
19.8
38
0.676768
from router.bcrouter import app if __name__ == '__main__': app.run(host='0.0.0.0', port=5000)
true
true
f7611eec08550bc25618bd9f033242d63dfd6be5
3,899
py
Python
maml/apps/pes/tests/test_gap.py
anooptp/maml
fdd95f3d60c9281d871d89b25b073e87b6ba4e52
[ "BSD-3-Clause" ]
161
2020-01-26T08:24:41.000Z
2022-03-29T06:42:42.000Z
maml/apps/pes/tests/test_gap.py
anooptp/maml
fdd95f3d60c9281d871d89b25b073e87b6ba4e52
[ "BSD-3-Clause" ]
195
2020-01-25T19:35:20.000Z
2022-03-28T13:14:30.000Z
maml/apps/pes/tests/test_gap.py
anooptp/maml
fdd95f3d60c9281d871d89b25b073e87b6ba4e52
[ "BSD-3-Clause" ]
46
2020-03-30T12:56:39.000Z
2022-03-27T12:53:23.000Z
# coding: utf-8 # Copyright (c) Materials Virtual Lab # Distributed under the terms of the BSD License. import os import shutil import unittest import tempfile import numpy as np from pymatgen.core import Structure from monty.os.path import which from monty.serialization import loadfn from maml.apps.pes import GAPote...
36.783019
97
0.648628
import os import shutil import unittest import tempfile import numpy as np from pymatgen.core import Structure from monty.os.path import which from monty.serialization import loadfn from maml.apps.pes import GAPotential CWD = os.getcwd() test_datapool = loadfn(os.path.join(os.path.abspath(os.path.dirname(__file__)),...
true
true
f761211768ebec63a837348e98d57dc686796e89
51,877
py
Python
swift/obj/replicator.py
aguirguis/swift
2aaeab6f5ddfdbcd75eeee970287f08f19de19ef
[ "Apache-2.0" ]
null
null
null
swift/obj/replicator.py
aguirguis/swift
2aaeab6f5ddfdbcd75eeee970287f08f19de19ef
[ "Apache-2.0" ]
null
null
null
swift/obj/replicator.py
aguirguis/swift
2aaeab6f5ddfdbcd75eeee970287f08f19de19ef
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
45.189024
79
0.545386
from collections import defaultdict import os import errno from os.path import isdir, isfile, join, dirname import random import shutil import time import itertools from six import viewkeys import six.moves.cPickle as pickle from swift import gettext_ as _ import eventlet from eventlet import GreenPool, queue, tpool,...
true
true
f76121a41b632971c69ccbd0c09617ad8221cec9
757
py
Python
network_util.py
JanCraft/full-body-aruco
bf15e3274fc55d7ea6c51772d138933cdc0e00ac
[ "MIT" ]
2
2021-04-20T09:35:48.000Z
2021-04-20T10:11:22.000Z
network_util.py
JanCraft/full-body-aruco
bf15e3274fc55d7ea6c51772d138933cdc0e00ac
[ "MIT" ]
null
null
null
network_util.py
JanCraft/full-body-aruco
bf15e3274fc55d7ea6c51772d138933cdc0e00ac
[ "MIT" ]
null
null
null
import socket import struct from datetime import timezone, datetime UDP_IP = "127.0.0.1" UDP_PORT = 3869 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Setup the communication using "timestamp = 0" smsg = struct.pack('<Qcffffff', 0, b'h', 0, 0, 0, 0, 0, 0) sock.sendto(smsg, (UDP_IP, UDP_PORT)) smsg = struc...
32.913043
86
0.656539
import socket import struct from datetime import timezone, datetime UDP_IP = "127.0.0.1" UDP_PORT = 3869 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) smsg = struct.pack('<Qcffffff', 0, b'h', 0, 0, 0, 0, 0, 0) sock.sendto(smsg, (UDP_IP, UDP_PORT)) smsg = struct.pack('<Qcffffff', 0, b'l', 0, 0, 0, 0, 0, 0) s...
true
true
f76121ddf33e56d42af40e73ea4c6d6c7e67737d
2,788
py
Python
adspygoogle/dfp/zsi/v201101/NetworkService_services.py
hockeyprincess/google-api-dfp-python
efa82a8d85cbdc90f030db9d168790c55bd8b12a
[ "Apache-2.0" ]
null
null
null
adspygoogle/dfp/zsi/v201101/NetworkService_services.py
hockeyprincess/google-api-dfp-python
efa82a8d85cbdc90f030db9d168790c55bd8b12a
[ "Apache-2.0" ]
null
null
null
adspygoogle/dfp/zsi/v201101/NetworkService_services.py
hockeyprincess/google-api-dfp-python
efa82a8d85cbdc90f030db9d168790c55bd8b12a
[ "Apache-2.0" ]
null
null
null
################################################## # NetworkService_services.py # generated by ZSI.generate.wsdl2python ################################################## from NetworkService_services_types import * import urlparse, types from ZSI.TCcompound import ComplexType, Struct from ZSI import client import Z...
37.675676
112
0.693687
from NetworkService_services_types import * import urlparse, types from ZSI.TCcompound import ComplexType, Struct from ZSI import client import ZSI class NetworkServiceLocator: NetworkServiceInterface_address = "https://www.google.com:443/apis/ads/publisher/v201101/NetworkService" def getNetworkServiceInterf...
false
true
f761225c87b562b37ab9d46d5821bee0c91a74ba
3,059
py
Python
cla-backend/cla/tests/unit/test_event.py
hnexokonkwo/easycla
c163c6697657c6e28e8fa5d71e93dca35afe57ef
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
null
null
null
cla-backend/cla/tests/unit/test_event.py
hnexokonkwo/easycla
c163c6697657c6e28e8fa5d71e93dca35afe57ef
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
null
null
null
cla-backend/cla/tests/unit/test_event.py
hnexokonkwo/easycla
c163c6697657c6e28e8fa5d71e93dca35afe57ef
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
null
null
null
# Copyright The Linux Foundation and each contributor to CommunityBridge. # SPDX-License-Identifier: MIT from cla.models.dynamo_models import Event, User, Project, Company from cla.models import event_types from unittest.mock import patch, Mock import pytest import datetime import cla import time @pytest.fixture() d...
32.2
73
0.730631
from cla.models.dynamo_models import Event, User, Project, Company from cla.models import event_types from unittest.mock import patch, Mock import pytest import datetime import cla import time @pytest.fixture() def mock_event(): event = Event() event.model.save = Mock() yield event def test_event_user_i...
true
true
f76122b2cad13e263fe3514e5474904d83c5cc68
16,892
py
Python
web/aliendb/apps/analytics/tasks.py
xgi/aliendb
fb0b5b88403d425a325c544510a4d062349609ec
[ "BSD-3-Clause" ]
3
2018-01-28T00:13:19.000Z
2020-03-08T08:55:01.000Z
web/aliendb/apps/analytics/tasks.py
xgi/aliendb
fb0b5b88403d425a325c544510a4d062349609ec
[ "BSD-3-Clause" ]
1
2020-06-05T16:41:58.000Z
2020-06-05T16:41:58.000Z
web/aliendb/apps/analytics/tasks.py
xgi/aliendb
fb0b5b88403d425a325c544510a4d062349609ec
[ "BSD-3-Clause" ]
1
2019-03-06T22:16:58.000Z
2019-03-06T22:16:58.000Z
import datetime import os import string from celery import Celery import praw import prawcore from textblob import TextBlob from django.core.cache import cache from .helpers import * from .models import * app = Celery('tasks') app.config_from_object('django.conf:settings') reddit = praw.Reddit(client_id=os.environ['P...
38.390909
118
0.676
import datetime import os import string from celery import Celery import praw import prawcore from textblob import TextBlob from django.core.cache import cache from .helpers import * from .models import * app = Celery('tasks') app.config_from_object('django.conf:settings') reddit = praw.Reddit(client_id=os.environ['P...
true
true
f761231e7c075d98dc5545d24aa6d683360e5c1b
388
py
Python
jobsapp/migrations/0008_job_experience.py
Deepanjalli/job_portal6
2869de5dca16a88f840ce0e4a26fe2edba3e9cae
[ "MIT" ]
null
null
null
jobsapp/migrations/0008_job_experience.py
Deepanjalli/job_portal6
2869de5dca16a88f840ce0e4a26fe2edba3e9cae
[ "MIT" ]
4
2020-06-06T01:42:22.000Z
2021-09-08T01:50:57.000Z
jobsapp/migrations/0008_job_experience.py
Deepanjalli/job_portal6
2869de5dca16a88f840ce0e4a26fe2edba3e9cae
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2020-02-03 18:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('jobsapp', '0007_job_salary'), ] operations = [ migrations.AddField( model_name='job', name='experience', ...
20.421053
61
0.592784
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('jobsapp', '0007_job_salary'), ] operations = [ migrations.AddField( model_name='job', name='experience', field=models.IntegerField(blank=True, default=0...
true
true
f76123e407857b2f128676820a7c5764210fe3fa
7,787
py
Python
conv.py
zheng-da/pyHGT
b654495053c82edcc8a7e1e00b7873ac93e6e59d
[ "MIT" ]
null
null
null
conv.py
zheng-da/pyHGT
b654495053c82edcc8a7e1e00b7873ac93e6e59d
[ "MIT" ]
null
null
null
conv.py
zheng-da/pyHGT
b654495053c82edcc8a7e1e00b7873ac93e6e59d
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch_geometric.nn import GCNConv, GATConv from torch_geometric.nn.conv import MessagePassing from torch_geometric.nn.inits import glorot, uniform from torch_geometric.utils import softmax import math class HGTC...
46.076923
120
0.587132
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch_geometric.nn import GCNConv, GATConv from torch_geometric.nn.conv import MessagePassing from torch_geometric.nn.inits import glorot, uniform from torch_geometric.utils import softmax import math class HGTC...
true
true
f76124086ad9a21df428e93a5ff16d85db859677
379
py
Python
module01/ex/ex028.py
LauroHBrant/python-course
2154181ca4b684b0d1fa635706bcb1647a753bc3
[ "MIT" ]
2
2021-01-07T23:59:36.000Z
2021-01-18T00:23:52.000Z
module01/ex/ex028.py
LauroHBrant/python-course
2154181ca4b684b0d1fa635706bcb1647a753bc3
[ "MIT" ]
null
null
null
module01/ex/ex028.py
LauroHBrant/python-course
2154181ca4b684b0d1fa635706bcb1647a753bc3
[ "MIT" ]
null
null
null
from random import randint from time import sleep print('-=-' * 22) print('-=- I will think in a number between 0 and 5. Try to guess... -=-') print('-=-' * 22) n = int(input('What number I thought? ')) r = randint(0, 5) print('PROCESSING...') sleep(2) if n == r: print('CONGRATULATIONS! You won!') else: pr...
19.947368
74
0.617414
from random import randint from time import sleep print('-=-' * 22) print('-=- I will think in a number between 0 and 5. Try to guess... -=-') print('-=-' * 22) n = int(input('What number I thought? ')) r = randint(0, 5) print('PROCESSING...') sleep(2) if n == r: print('CONGRATULATIONS! You won!') else: pr...
true
true
f761244b76821d3317e946116e2224b21445051d
1,587
py
Python
env/lib/python2.7/site-packages/dal_select2/views.py
NITKOSG/InfoGami
f5ce567d5558a768e58886b3419e378cabb7049d
[ "MIT" ]
2
2017-02-01T09:57:40.000Z
2017-06-03T15:26:55.000Z
env/lib/python2.7/site-packages/dal_select2/views.py
NITKOSG/InfoGami
f5ce567d5558a768e58886b3419e378cabb7049d
[ "MIT" ]
2
2018-05-11T20:10:23.000Z
2019-05-01T21:13:07.000Z
env/lib/python2.7/site-packages/dal_select2/views.py
NITKOSG/InfoGami
f5ce567d5558a768e58886b3419e378cabb7049d
[ "MIT" ]
3
2017-02-11T13:19:28.000Z
2018-08-31T18:51:18.000Z
"""Select2 view implementation.""" import json from dal.views import BaseQuerySetView from django import http from django.utils.translation import ugettext as _ class Select2ViewMixin(object): """View mixin to render a JSON response for Select2.""" def get_results(self, context): """Return data fo...
28.854545
71
0.563327
import json from dal.views import BaseQuerySetView from django import http from django.utils.translation import ugettext as _ class Select2ViewMixin(object): def get_results(self, context): return [ { 'id': self.get_result_value(result), 'text': self.get_res...
true
true
f76124d4bd41d6db34bcca156928e804b57f2c86
11,248
py
Python
nglib/corpora/base.py
DDoublu/narrative_graph_emnlp2020
f564cd1b2abf9a6de4e2f15d8a4b656dc6651899
[ "MIT" ]
5
2020-10-06T06:05:40.000Z
2022-03-20T12:30:13.000Z
nglib/corpora/base.py
DDoublu/narrative_graph_emnlp2020
f564cd1b2abf9a6de4e2f15d8a4b656dc6651899
[ "MIT" ]
null
null
null
nglib/corpora/base.py
DDoublu/narrative_graph_emnlp2020
f564cd1b2abf9a6de4e2f15d8a4b656dc6651899
[ "MIT" ]
3
2021-05-19T13:23:44.000Z
2021-09-04T01:51:05.000Z
import re import logging from lxml import etree import spacy logger = logging.getLogger(__name__) class CorpusBase: def __init__(self): pass class TimeBankBase(CorpusBase): def __init__(self): super(TimeBankBase, self).__init__() self.nlp = None def _get_sent_tok_idx(self, se...
37
163
0.461771
import re import logging from lxml import etree import spacy logger = logging.getLogger(__name__) class CorpusBase: def __init__(self): pass class TimeBankBase(CorpusBase): def __init__(self): super(TimeBankBase, self).__init__() self.nlp = None def _get_sent_tok_idx(self, se...
true
true
f76125e76944adbd69608947153d35f68030fff8
387
py
Python
Solar/wsgi.py
huisezhiyin/Solar
e1c9e548c2e922ef63764ac90b9ee237d005b8fc
[ "Apache-2.0" ]
null
null
null
Solar/wsgi.py
huisezhiyin/Solar
e1c9e548c2e922ef63764ac90b9ee237d005b8fc
[ "Apache-2.0" ]
null
null
null
Solar/wsgi.py
huisezhiyin/Solar
e1c9e548c2e922ef63764ac90b9ee237d005b8fc
[ "Apache-2.0" ]
null
null
null
""" WSGI config for Solar project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTING...
22.764706
78
0.782946
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Solar.settings') application = get_wsgi_application()
true
true
f76126af58a227e1a2873ba94305920667f00363
1,193
py
Python
Python 2/orgdbassignment.py
gabrielwolf/5-python-kurse
cabc2b6706f6f384963c026749fd39eb042736c6
[ "MIT" ]
null
null
null
Python 2/orgdbassignment.py
gabrielwolf/5-python-kurse
cabc2b6706f6f384963c026749fd39eb042736c6
[ "MIT" ]
null
null
null
Python 2/orgdbassignment.py
gabrielwolf/5-python-kurse
cabc2b6706f6f384963c026749fd39eb042736c6
[ "MIT" ]
null
null
null
import sqlite3 import re conn = sqlite3.connect('orgdb.sqlite') cur = conn.cursor() cur.execute(''' DROP TABLE IF EXISTS Counts''') cur.execute(''' CREATE TABLE Counts (org TEXT, count INTEGER)''') fname = raw_input('Enter file name: ') if (len(fname) < 1): fname = 'mbox-short.txt' fh = open(fname) for line in ...
26.511111
69
0.624476
import sqlite3 import re conn = sqlite3.connect('orgdb.sqlite') cur = conn.cursor() cur.execute(''' DROP TABLE IF EXISTS Counts''') cur.execute(''' CREATE TABLE Counts (org TEXT, count INTEGER)''') fname = raw_input('Enter file name: ') if (len(fname) < 1): fname = 'mbox-short.txt' fh = open(fname) for line in ...
false
true
f76126fa6d97eea228f99c402307fb14e658551f
7,829
py
Python
app.py
cparrarojas/epidemic-inference
598e14bc434b846c0fb5f53f70db131d3928122d
[ "MIT" ]
2
2018-07-05T17:55:55.000Z
2020-06-30T17:08:08.000Z
app.py
cparrarojas/ebov-2018
598e14bc434b846c0fb5f53f70db131d3928122d
[ "MIT" ]
null
null
null
app.py
cparrarojas/ebov-2018
598e14bc434b846c0fb5f53f70db131d3928122d
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotly.graph_objs as go import matplotlib from matplotlib import cm import numpy as np linecolours = ['rgba(0,114,178,1.)', 'rgba(230,159,0,1.)'] magma_cmap = cm.get_cmap('magma') magma_rgb = [] norm = mat...
34.950893
209
0.475156
import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotly.graph_objs as go import matplotlib from matplotlib import cm import numpy as np linecolours = ['rgba(0,114,178,1.)', 'rgba(230,159,0,1.)'] magma_cmap = cm.get_cmap('magma') magma_rgb = [] norm = mat...
true
true
f76127ff1d191c7e0294a5eb031591571cf96a98
2,439
py
Python
segint_research_django/segint_api/migrations/0026_auto_20200727_2138.py
VarianAPIs/SegInt-Research
3b7aa71ada46cbb35a428a00eb9f2a5c43f15d51
[ "MIT" ]
3
2021-04-15T14:24:24.000Z
2022-03-23T17:07:06.000Z
segint_research_django/segint_api/migrations/0026_auto_20200727_2138.py
VarianAPIs/SegInt-Research
3b7aa71ada46cbb35a428a00eb9f2a5c43f15d51
[ "MIT" ]
null
null
null
segint_research_django/segint_api/migrations/0026_auto_20200727_2138.py
VarianAPIs/SegInt-Research
3b7aa71ada46cbb35a428a00eb9f2a5c43f15d51
[ "MIT" ]
1
2021-04-21T15:05:09.000Z
2021-04-21T15:05:09.000Z
# Generated by Django 3.0.7 on 2020-07-27 21:38 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('segint_api', '0025_auto_20200727_2125'), ] operations = [ migrations.AddField( model_name='mode...
37.523077
138
0.574826
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('segint_api', '0025_auto_20200727_2125'), ] operations = [ migrations.AddField( model_name='modelversion', name='created_time', ...
true
true
f76128ae606cdffdd1b63eae17d5fe73952db8a8
6,268
py
Python
configs/common/O3_ARM_v7a.py
pnkfb9/gem5_priority
fbf766277df78a470758cf7d798d12fb1e7c51c4
[ "BSD-3-Clause" ]
null
null
null
configs/common/O3_ARM_v7a.py
pnkfb9/gem5_priority
fbf766277df78a470758cf7d798d12fb1e7c51c4
[ "BSD-3-Clause" ]
null
null
null
configs/common/O3_ARM_v7a.py
pnkfb9/gem5_priority
fbf766277df78a470758cf7d798d12fb1e7c51c4
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012 The Regents of The University of Michigan # 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 ...
31.817259
72
0.669592
from m5.objects import * class O3_ARM_v7a_Simple_Int(FUDesc): opList = [ OpDesc(opClass='IntAlu', opLat=1) ] count = 2 class O3_ARM_v7a_Complex_Int(FUDesc): opList = [ OpDesc(opClass='IntMult', opLat=3, issueLat=1), OpDesc(opClass='IntDiv', opLat=12, issueLat=12), OpDesc(op...
true
true
f76128c0df85ae31ded5b4f424c7742604efd409
7,620
py
Python
aalh_iit_industry_001/cleanup-jones-jhs.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_industry_001/cleanup-jones-jhs.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_industry_001/cleanup-jones-jhs.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
from openpyxl import load_workbook import re filename = 'aalh_iit_industry_001.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 2 maximumcol = 2 minimumrow = 7 maximumrow = 472 iterationrow = 7 titlecol = 2 desccol = 8 subcol = 9 placecol = 13 timeperiodcol = 14 dateofor...
54.820144
126
0.523622
from openpyxl import load_workbook import re filename = 'aalh_iit_industry_001.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 2 maximumcol = 2 minimumrow = 7 maximumrow = 472 iterationrow = 7 titlecol = 2 desccol = 8 subcol = 9 placecol = 13 timeperiodcol = 14 dateofor...
true
true
f76128eb2c926f5f6cbea5ec575abae25583d0ab
631
py
Python
10-DataManipulationWithPandas/03-SortingRows.py
Pegasus-01/Data-manipulation-and-merging-with-pandas
5346678d25820d9fe352bd70294484ecd96fccf7
[ "Apache-2.0" ]
1
2020-10-18T16:42:28.000Z
2020-10-18T16:42:28.000Z
10-DataManipulationWithPandas/03-SortingRows.py
Pegasus-01/Data-manipulation-and-merging-with-pandas
5346678d25820d9fe352bd70294484ecd96fccf7
[ "Apache-2.0" ]
null
null
null
10-DataManipulationWithPandas/03-SortingRows.py
Pegasus-01/Data-manipulation-and-merging-with-pandas
5346678d25820d9fe352bd70294484ecd96fccf7
[ "Apache-2.0" ]
null
null
null
#part1 # Sort homelessness by individual homelessness_ind = homelessness.sort_values("individuals") homelessness_ind.head() # Print the top few rows print(homelessness_ind.head()) #part2 # Sort homelessness by descending family members homelessness_fam = homelessness.sort_values("family_members", ascend...
27.434783
103
0.770206
homelessness_ind = homelessness.sort_values("individuals") homelessness_ind.head() print(homelessness_ind.head()) homelessness_fam = homelessness.sort_values("family_members", ascending=False) print(homelessness_fam.head()) homelessness_reg_fam = homelessness.sort_values(["region", "family_members"], a...
true
true
f76129b57290bd93613e211ec78cfbea4e26a68d
791
py
Python
eecs-online-server/question_lib/migrations/0003_auto_20191217_1611.py
luhc228/eecs-online-test
72cbe3d238b26c3ee4d03fbde59c1e34f4fc29cd
[ "MIT" ]
4
2020-01-09T05:10:30.000Z
2020-10-18T07:14:51.000Z
eecs-online-server/question_lib/migrations/0003_auto_20191217_1611.py
luhc228/eecs-online
72cbe3d238b26c3ee4d03fbde59c1e34f4fc29cd
[ "MIT" ]
14
2019-12-02T10:53:06.000Z
2022-03-12T00:09:05.000Z
eecs-online-server/question_lib/migrations/0003_auto_20191217_1611.py
luhc228/eecs-online-test
72cbe3d238b26c3ee4d03fbde59c1e34f4fc29cd
[ "MIT" ]
4
2019-11-02T08:34:45.000Z
2019-12-10T13:10:05.000Z
# Generated by Django 2.2.6 on 2019-12-17 16:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('question_lib', '0002_auto_20191216_2020'), ] operations = [ migrations.AlterField( model_name='questionlib', name='a...
27.275862
107
0.566372
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('question_lib', '0002_auto_20191216_2020'), ] operations = [ migrations.AlterField( model_name='questionlib', name='answer', field=models.CharField(blank...
true
true
f76129eef51376a55af34138d7de985d00eade38
39,311
py
Python
telethon/client/downloads.py
bots-house/Telethon
a63c741987d77217ee02f833f766e97833eca9ec
[ "MIT" ]
2
2021-02-22T13:00:38.000Z
2021-03-26T01:51:01.000Z
telethon/client/downloads.py
bots-house/Telethon
a63c741987d77217ee02f833f766e97833eca9ec
[ "MIT" ]
null
null
null
telethon/client/downloads.py
bots-house/Telethon
a63c741987d77217ee02f833f766e97833eca9ec
[ "MIT" ]
2
2020-01-16T12:21:02.000Z
2021-12-16T01:30:11.000Z
import datetime import io import os import pathlib import typing import inspect import asyncio from ..crypto import AES from .. import utils, helpers, errors, hints from ..requestiter import RequestIter from ..tl import TLObject, types, functions try: import aiohttp except ImportError: aiohttp = None if typ...
37.799038
154
0.565999
import datetime import io import os import pathlib import typing import inspect import asyncio from ..crypto import AES from .. import utils, helpers, errors, hints from ..requestiter import RequestIter from ..tl import TLObject, types, functions try: import aiohttp except ImportError: aiohttp = None if typ...
true
true
f76129faed7504875959c12e8a26bca32eeca352
1,482
py
Python
tests/utils/test_pid.py
goodboy/pulsar
e4b42d94b7e262a165782747d65f8b39fb8d3ba9
[ "BSD-3-Clause" ]
1
2020-11-30T07:36:57.000Z
2020-11-30T07:36:57.000Z
tests/utils/test_pid.py
goodboy/pulsar
e4b42d94b7e262a165782747d65f8b39fb8d3ba9
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_pid.py
goodboy/pulsar
e4b42d94b7e262a165782747d65f8b39fb8d3ba9
[ "BSD-3-Clause" ]
null
null
null
import os import unittest from pulsar import send from pulsar.apps.test import ActorTestMixin from pulsar.utils.tools import Pidfile from pulsar.utils.system import platform @unittest.skipUnless(platform.type != 'win', 'This fails in windows') class TestPidfile(ActorTestMixin, unittest.TestCase): concurrency = '...
29.64
69
0.624831
import os import unittest from pulsar import send from pulsar.apps.test import ActorTestMixin from pulsar.utils.tools import Pidfile from pulsar.utils.system import platform @unittest.skipUnless(platform.type != 'win', 'This fails in windows') class TestPidfile(ActorTestMixin, unittest.TestCase): concurrency = '...
true
true
f7612a261ab38a9498ff6ec0e67a10091bd7793f
4,909
py
Python
kubernetes/client/models/v1beta1_self_subject_access_review_spec.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
1
2019-04-14T23:51:35.000Z
2019-04-14T23:51:35.000Z
kubernetes/client/models/v1beta1_self_subject_access_review_spec.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_self_subject_access_review_spec.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
31.670968
111
0.644938
from pprint import pformat from six import iteritems import re class V1beta1SelfSubjectAccessReviewSpec(object): swagger_types = { 'non_resource_attributes': 'V1beta1NonResourceAttributes', 'resource_attributes': 'V1beta1ResourceAttributes' } attribute_map = { 'non_resource_a...
true
true
f7612a82aeecdc21812fd103db26ae7b588d07b5
9,710
py
Python
python/ray/tune/integration/torch.py
ThomasLecat/ray
eb025ea8cb27583e8ef6287f5654f23d1ab270ef
[ "Apache-2.0" ]
null
null
null
python/ray/tune/integration/torch.py
ThomasLecat/ray
eb025ea8cb27583e8ef6287f5654f23d1ab270ef
[ "Apache-2.0" ]
null
null
null
python/ray/tune/integration/torch.py
ThomasLecat/ray
eb025ea8cb27583e8ef6287f5654f23d1ab270ef
[ "Apache-2.0" ]
null
null
null
# Original Code here: # https://github.com/pytorch/examples/blob/master/mnist/main.py from contextlib import contextmanager import os import logging import shutil import tempfile import torch from datetime import timedelta import ray from ray import tune from ray.tune.result import RESULT_DUPLICATE from ray.tune.logge...
33.367698
79
0.653347
from contextlib import contextmanager import os import logging import shutil import tempfile import torch from datetime import timedelta import ray from ray import tune from ray.tune.result import RESULT_DUPLICATE from ray.tune.logger import NoopLogger from ray.tune.function_runner import wrap_function from ray.tune.r...
true
true
f7612afae1a7db8fac36af98e785464322e25de8
2,884
py
Python
codigo/views.py
elessar93/django-verification-code
7adbf15add459749c6e6a58b19bc226946776275
[ "MIT" ]
null
null
null
codigo/views.py
elessar93/django-verification-code
7adbf15add459749c6e6a58b19bc226946776275
[ "MIT" ]
null
null
null
codigo/views.py
elessar93/django-verification-code
7adbf15add459749c6e6a58b19bc226946776275
[ "MIT" ]
null
null
null
from random import randint from django.conf import settings from django.contrib.auth import get_user_model # Create your views here. from rest_framework import status from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.views import APIView from twilio.rest i...
32.044444
114
0.648058
from random import randint from django.conf import settings from django.contrib.auth import get_user_model from rest_framework import status from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.views import APIView from twilio.rest import Client from codigo....
true
true
f7612b42ac6473ad2c3c417f20a381672234f0c7
2,295
py
Python
plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/config.py
pseeth/hydra
36d2451428b589532ccb11e908fbff3b687d6c79
[ "MIT" ]
null
null
null
plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/config.py
pseeth/hydra
36d2451428b589532ccb11e908fbff3b687d6c79
[ "MIT" ]
null
null
null
plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/config.py
pseeth/hydra
36d2451428b589532ccb11e908fbff3b687d6c79
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from dataclasses import dataclass from typing import Optional from hydra.core.config_store import ConfigStore from hydra.types import ObjectConf from omegaconf import II @dataclass class RedisConf: # host address via REDIS_HOST environment va...
35.307692
86
0.729412
from dataclasses import dataclass from typing import Optional from hydra.core.config_store import ConfigStore from hydra.types import ObjectConf from omegaconf import II @dataclass class RedisConf: host: str = II("env:REDIS_HOST,localhost") port: int = II("env:REDIS_PORT,6379") db: Optional[s...
true
true
f7612b60d7eb30e1381c328fde17ef23da21298c
7,017
py
Python
result.py
DPBayes/DP-HMC-Neurips2021
ff8b828e8fc150ee59a3a271ef33dd75dd17bfe5
[ "MIT" ]
1
2021-06-29T01:08:12.000Z
2021-06-29T01:08:12.000Z
result.py
DPBayes/DP-HMC-Neurips2021
ff8b828e8fc150ee59a3a271ef33dd75dd17bfe5
[ "MIT" ]
null
null
null
result.py
DPBayes/DP-HMC-Neurips2021
ff8b828e8fc150ee59a3a271ef33dd75dd17bfe5
[ "MIT" ]
1
2021-06-29T01:08:20.000Z
2021-06-29T01:08:20.000Z
import metrics import jax.numpy as np import pandas as pd class MCMCMetrics: def __init__(self, result, true_posterior): chains = result.get_final_chain() self.samples, self.dim, self.num_chains = chains.shape self.epsilon = result.epsilon self.delta = result.delta self.ind...
37.92973
101
0.631894
import metrics import jax.numpy as np import pandas as pd class MCMCMetrics: def __init__(self, result, true_posterior): chains = result.get_final_chain() self.samples, self.dim, self.num_chains = chains.shape self.epsilon = result.epsilon self.delta = result.delta self.ind...
true
true
f7612c3c8fc730aa6a31d72442e8dac975b8cfc0
3,295
py
Python
hello_app/app.py
thang080920/flask
897406b559b6503056ed32bb88d88d94b9590342
[ "MIT" ]
null
null
null
hello_app/app.py
thang080920/flask
897406b559b6503056ed32bb88d88d94b9590342
[ "MIT" ]
null
null
null
hello_app/app.py
thang080920/flask
897406b559b6503056ed32bb88d88d94b9590342
[ "MIT" ]
null
null
null
from flask import Flask, request, render_template, flash, redirect, url_for, session, logging from wtforms import Form, StringField, TextAreaField, PasswordField, validators from passlib.hash import sha256_crypt from flask_mysqldb import MySQL from functools import wraps app = Flask(__name__) # MySQL Configuration a...
29.954545
113
0.636419
from flask import Flask, request, render_template, flash, redirect, url_for, session, logging from wtforms import Form, StringField, TextAreaField, PasswordField, validators from passlib.hash import sha256_crypt from flask_mysqldb import MySQL from functools import wraps app = Flask(__name__) app.config['MYSQL_HOST'...
true
true
f7612c614cf9651e0942d3cd7692983fc0b28ea4
17,697
py
Python
Thesis@3.9.1/Lib/site-packages/pip/_internal/req/req_file.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/pip/_internal/req/req_file.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/pip/_internal/req/req_file.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
""" Requirements file parsing """ import optparse import os import re import shlex import urllib.parse from pip._internal.cli import cmdoptions from pip._internal.exceptions import InstallationError, RequirementsFileParseError from pip._internal.models.search_scope import SearchScope from pip._internal.network.utils ...
32.711645
85
0.634571
import optparse import os import re import shlex import urllib.parse from pip._internal.cli import cmdoptions from pip._internal.exceptions import InstallationError, RequirementsFileParseError from pip._internal.models.search_scope import SearchScope from pip._internal.network.utils import raise_for_status from pip._...
true
true
f7612ca2e7d7f9fa1bce53411ed582b32bfdf44a
5,325
py
Python
gs_chunked_io/reader.py
xbrianh/gs-chunked-io
126cbf04c7a21bce7b601c15c7288b63b3fa0a18
[ "MIT" ]
8
2020-03-02T16:24:36.000Z
2020-12-30T04:44:25.000Z
gs_chunked_io/reader.py
xbrianh/gs-chunked-io
126cbf04c7a21bce7b601c15c7288b63b3fa0a18
[ "MIT" ]
27
2020-02-14T19:48:10.000Z
2020-10-21T18:21:43.000Z
gs_chunked_io/reader.py
xbrianh/gs-chunked-io
126cbf04c7a21bce7b601c15c7288b63b3fa0a18
[ "MIT" ]
1
2020-03-13T18:17:09.000Z
2020-03-13T18:17:09.000Z
import io from math import ceil from typing import Optional from google.cloud.storage.blob import Blob from gs_chunked_io.config import default_chunk_size, reader_retries from gs_chunked_io.async_collections import AsyncSet, AsyncQueue _BLOB_CHUNK_SIZE_UNIT = 262144 class Reader(io.IOBase): """ Readable st...
39.738806
119
0.658592
import io from math import ceil from typing import Optional from google.cloud.storage.blob import Blob from gs_chunked_io.config import default_chunk_size, reader_retries from gs_chunked_io.async_collections import AsyncSet, AsyncQueue _BLOB_CHUNK_SIZE_UNIT = 262144 class Reader(io.IOBase): def __init__(self, ...
true
true
f7612cd2744e72390cd2f3fba512f7f901e33831
8,795
py
Python
sdk/python/pulumi_azure_native/apimanagement/v20170301/api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20170301/api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20170301/api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
46.289474
1,390
0.648437
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from ._enums import * __all__ = ['ApiIssue'] class ApiIssue(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts...
true
true
f7612d2879a37501fe828b30e6b4dd627bbc4987
4,601
py
Python
slackapi.py
Kaniyama-t/IMAP_Slack_transfer
752501ba2b079d5a78d499be0987f71caf9bc7b4
[ "MIT" ]
null
null
null
slackapi.py
Kaniyama-t/IMAP_Slack_transfer
752501ba2b079d5a78d499be0987f71caf9bc7b4
[ "MIT" ]
null
null
null
slackapi.py
Kaniyama-t/IMAP_Slack_transfer
752501ba2b079d5a78d499be0987f71caf9bc7b4
[ "MIT" ]
null
null
null
import configparser import requests import imap_errors import json class SlackPoster(): def __init__(self): # Hueee config = configparser.ConfigParser() config.read('../slacknotify_envsettings.ini') self.config = config def post(self, channelId, iconURL=None, username=None, ts...
38.663866
158
0.519018
import configparser import requests import imap_errors import json class SlackPoster(): def __init__(self): config = configparser.ConfigParser() config.read('../slacknotify_envsettings.ini') self.config = config def post(self, channelId, iconURL=None, username=None, ts=None, t...
true
true
f7612e1cc6a6fc84d87b09c5bd7323fa867a1509
5,238
py
Python
data_processor.py
BFLB/COVID19-FOPH
54ae4c191cae128da90d366c1ee39a81570d0056
[ "MIT" ]
null
null
null
data_processor.py
BFLB/COVID19-FOPH
54ae4c191cae128da90d366c1ee39a81570d0056
[ "MIT" ]
null
null
null
data_processor.py
BFLB/COVID19-FOPH
54ae4c191cae128da90d366c1ee39a81570d0056
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ##################################################################################################################### # # Copyright (c) 2020 Bernhard Flühmann. All rights reserved. # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses...
34.235294
201
0.693394
from datetime import date from datetime import datetime import sys import time import json import os import logging import argparse import pytz from scrappers.cases import CaseScrapper from converters.cases import CaseConverter from pusher import Pusher import requests parser = argparse.ArgumentParser(description...
true
true
f7612e93222711970e727c2fd62eb60ce6b39da4
60,899
py
Python
scilog/scilog.py
soerenwolfers/scilog
ca66a6a7b8d267c8f2998b2a935b35b8f95b7558
[ "MIT" ]
null
null
null
scilog/scilog.py
soerenwolfers/scilog
ca66a6a7b8d267c8f2998b2a935b35b8f95b7558
[ "MIT" ]
null
null
null
scilog/scilog.py
soerenwolfers/scilog
ca66a6a7b8d267c8f2998b2a935b35b8f95b7558
[ "MIT" ]
null
null
null
import timeit import pickle import os import errno import datetime import shutil import warnings import traceback import pstats import io import sys import gc import inspect import importlib import re import pathlib import types import operator import subprocess import shlex import json import contextlib import stat im...
52.005978
685
0.643032
import timeit import pickle import os import errno import datetime import shutil import warnings import traceback import pstats import io import sys import gc import inspect import importlib import re import pathlib import types import operator import subprocess import shlex import json import contextlib import stat im...
true
true
f7612ed41da5d9ce0d4aabf34ec5e4d30a5d6e41
429
py
Python
UpdatedSyntheticDataset/SyntheticDataset2/ImageOperations/__init__.py
liyu711/SUAS
2f6592fc2ab316475eeabe2f4828e5ba5c1a4b0b
[ "MIT" ]
null
null
null
UpdatedSyntheticDataset/SyntheticDataset2/ImageOperations/__init__.py
liyu711/SUAS
2f6592fc2ab316475eeabe2f4828e5ba5c1a4b0b
[ "MIT" ]
null
null
null
UpdatedSyntheticDataset/SyntheticDataset2/ImageOperations/__init__.py
liyu711/SUAS
2f6592fc2ab316475eeabe2f4828e5ba5c1a4b0b
[ "MIT" ]
null
null
null
from .bounded_image_cropper import BoundedImageCropper from .image_masker import ImageMasker from .gaussian_noise_generator import GaussianNoiseGenerator from .image_extender import ImageExtender from .shape_orientator import ShapeOrientator from .image_paster import ImagePaster from .shape_rotator import ShapeRotator ...
42.9
68
0.895105
from .bounded_image_cropper import BoundedImageCropper from .image_masker import ImageMasker from .gaussian_noise_generator import GaussianNoiseGenerator from .image_extender import ImageExtender from .shape_orientator import ShapeOrientator from .image_paster import ImagePaster from .shape_rotator import ShapeRotator ...
true
true
f7612eed1c63b8e76af5b3754993c4097b6d2a43
14,540
py
Python
mcdm/tests/test_correlate.py
goncaloperes/mcdm
2316d06adee76c4d82aef43522d31505d0f431e6
[ "MIT" ]
null
null
null
mcdm/tests/test_correlate.py
goncaloperes/mcdm
2316d06adee76c4d82aef43522d31505d0f431e6
[ "MIT" ]
null
null
null
mcdm/tests/test_correlate.py
goncaloperes/mcdm
2316d06adee76c4d82aef43522d31505d0f431e6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2020 Dimitrios-Georgios Akestoridis # # 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...
38.263158
77
0.499312
import mcdm import numpy as np import unittest class TestCorrelate(unittest.TestCase): def test_pearson_linear(self): z_matrix = np.array( [[0.0, 0.0, 1.0], [0.1, 0.2, 0.8], [0.2, 0.4, 0.6], [0.3, 0.7, 0.3], [0.6, 0.8, 0.2], [0...
true
true
f7612f80a91e2581e86e13edbc627e79b67c496c
1,845
py
Python
spyder/plugins/statusbar/widgets/tests/test_status.py
ximion/spyder
50911555cefd95947c887f8a412a58ad96ff8d9e
[ "MIT" ]
1
2021-03-13T04:36:43.000Z
2021-03-13T04:36:43.000Z
spyder/plugins/statusbar/widgets/tests/test_status.py
ximion/spyder
50911555cefd95947c887f8a412a58ad96ff8d9e
[ "MIT" ]
null
null
null
spyder/plugins/statusbar/widgets/tests/test_status.py
ximion/spyder
50911555cefd95947c887f8a412a58ad96ff8d9e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """Tests for status bar widgets.""" # Standard library imports from unittest.mock import Mock # Thrid party imports from qtpy.QtCore import Qt from qtpy.QtWidgets...
22.777778
57
0.707859
from unittest.mock import Mock from qtpy.QtCore import Qt from qtpy.QtWidgets import QMainWindow import pytest from spyder.api.widgets.status import StatusBarWidget from spyder.config.manager import CONF from spyder.plugins.statusbar.plugin import StatusBar class MainWindowMock(QMainWindow): def __init__(self...
true
true
f76130579ac726ca53f2c57766b56556528f2d70
1,139
py
Python
easy/dado.py
pedrorosa-hrb/Python-First-Projects
5354bef666df272c76fae00c62e2bc85c1b666f1
[ "MIT" ]
null
null
null
easy/dado.py
pedrorosa-hrb/Python-First-Projects
5354bef666df272c76fae00c62e2bc85c1b666f1
[ "MIT" ]
null
null
null
easy/dado.py
pedrorosa-hrb/Python-First-Projects
5354bef666df272c76fae00c62e2bc85c1b666f1
[ "MIT" ]
null
null
null
import random import time from funcoes import divisoria,printsp def dado_mostrar(dado): divisoria() print(f"\033[1;32;40mO número que você tirou foi \033[m\033[1;97;40m{dado}\033[m") divisoria() while True: divisoria() printsp("Olá , escolha um valor de dado para rodar:") printsp("(6) (8) (16)...
24.76087
86
0.565408
import random import time from funcoes import divisoria,printsp def dado_mostrar(dado): divisoria() print(f"\033[1;32;40mO número que você tirou foi \033[m\033[1;97;40m{dado}\033[m") divisoria() while True: divisoria() printsp("Olá , escolha um valor de dado para rodar:") printsp("(6) (8) (16)...
true
true
f7613181afb21114b4dc727d269f7429841e2a9d
13,560
py
Python
allink_core/apps/people/migrations/0001_initial.py
allink/allink-core
cf2727f26192d8dee89d76feb262bc4760f36f5e
[ "BSD-3-Clause" ]
5
2017-03-13T08:49:45.000Z
2022-03-05T20:05:56.000Z
allink_core/apps/people/migrations/0001_initial.py
allink/allink-core
cf2727f26192d8dee89d76feb262bc4760f36f5e
[ "BSD-3-Clause" ]
28
2019-10-21T08:32:18.000Z
2022-02-10T13:16:38.000Z
allink_core/apps/people/migrations/0001_initial.py
allink/allink-core
cf2727f26192d8dee89d76feb262bc4760f36f5e
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.1.8 on 2019-07-03 09:57 import allink_core.core.models.fields import aldryn_translation_tools.models import allink_core.core.models.fields import allink_core.core.models.mixins import cms.models.fields from django.conf import settings import django.contrib.postgres.fields from django.db import ...
113.94958
566
0.704794
import allink_core.core.models.fields import aldryn_translation_tools.models import allink_core.core.models.fields import allink_core.core.models.mixins import cms.models.fields from django.conf import settings import django.contrib.postgres.fields from django.db import migrations, models import django.db.models.delet...
true
true
f76132741c9272b8cd781e2cb8a147a4cfe95d6d
7,465
py
Python
libnamebench/base_ui.py
claudioandre-br/namebench
5bb5df4b4996be6a0947810b800177481f4e7299
[ "Apache-2.0" ]
5
2015-08-19T13:22:38.000Z
2022-02-07T00:22:44.000Z
libnamebench/base_ui.py
claudioandre/namebench
5bb5df4b4996be6a0947810b800177481f4e7299
[ "Apache-2.0" ]
null
null
null
libnamebench/base_ui.py
claudioandre/namebench
5bb5df4b4996be6a0947810b800177481f4e7299
[ "Apache-2.0" ]
2
2021-02-09T15:15:47.000Z
2021-08-28T08:53:52.000Z
# Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
35.379147
95
0.685332
"""A base user-interface workflow, to be inherited by UI modules.""" import tempfile import benchmark import better_webbrowser import config import data_sources import geoip import nameserver_list import reporter import site_connector import util __author__ = 'tstromberg@google.com (Thomas Stromberg)' class Base...
false
true
f761327df9164085cfb06bb1a24f600136548c7e
1,188
py
Python
doc/kendo/src/ch1/tools.py
axiros/transcrypt_material
2fdffe0331ea6c368fc1dde3bd1102135c082fa9
[ "BSD-3-Clause" ]
3
2016-07-25T11:39:11.000Z
2016-11-29T23:54:30.000Z
doc/kendo/src/ch1/tools.py
axiros/transcrypt_material
2fdffe0331ea6c368fc1dde3bd1102135c082fa9
[ "BSD-3-Clause" ]
null
null
null
doc/kendo/src/ch1/tools.py
axiros/transcrypt_material
2fdffe0331ea6c368fc1dde3bd1102135c082fa9
[ "BSD-3-Clause" ]
null
null
null
import time def jstype(obj, typ): __pragma__('js', '{}', ''' var t = typeof(obj)''') if t == typ: return True return False class PyDate: ''' Descendants get a self.value property, which is always in sync with an internal self.ts = unixtime''' _value = ts = None def get_value(sel...
28.285714
66
0.530303
import time def jstype(obj, typ): __pragma__('js', '{}', ''' var t = typeof(obj)''') if t == typ: return True return False class PyDate: _value = ts = None def get_value(self): if self._value: t = self._value.getTime() / 1000 if t == self.ts: ...
true
true
f76132c109be87d7947103e8b225297b9843229c
993
py
Python
Module 1/Chapter 3/prog1.py
PacktPublishing/Raspberry-Pi-Making-Amazing-Projects-Right-from-Scratch-
49fd30ca8e1e30e7d85cf14e9dcb6e1d24d4a445
[ "MIT" ]
3
2016-11-15T02:27:27.000Z
2017-12-28T20:14:21.000Z
Module 1/Chapter 3/prog1.py
PacktPublishing/Raspberry-Pi-Making-Amazing-Projects-Right-from-Scratch-
49fd30ca8e1e30e7d85cf14e9dcb6e1d24d4a445
[ "MIT" ]
null
null
null
Module 1/Chapter 3/prog1.py
PacktPublishing/Raspberry-Pi-Making-Amazing-Projects-Right-from-Scratch-
49fd30ca8e1e30e7d85cf14e9dcb6e1d24d4a445
[ "MIT" ]
5
2017-12-28T20:16:05.000Z
2021-04-22T17:30:05.000Z
import pygame import math import random import time width = 900 height = 700 pygame.init() window = pygame.display.set_mode((width, height)) pygame.display.set_caption("Fractal Tree") screen = pygame.display.get_surface() def Fractal_Tree(x1, y1, theta, depth): if depth: rand_length=random.randint(1,10) rand_a...
27.583333
74
0.638469
import pygame import math import random import time width = 900 height = 700 pygame.init() window = pygame.display.set_mode((width, height)) pygame.display.set_caption("Fractal Tree") screen = pygame.display.get_surface() def Fractal_Tree(x1, y1, theta, depth): if depth: rand_length=random.randint(1,10) rand_a...
false
true
f76134336c7ea2019b608fbffd54cccfb76240f0
6,048
py
Python
yiff.py
Blobadoodle/e621-wrapper
b84a96d8d5a794ffb5940eda3fc16fd1a07e9af5
[ "MIT" ]
null
null
null
yiff.py
Blobadoodle/e621-wrapper
b84a96d8d5a794ffb5940eda3fc16fd1a07e9af5
[ "MIT" ]
null
null
null
yiff.py
Blobadoodle/e621-wrapper
b84a96d8d5a794ffb5940eda3fc16fd1a07e9af5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import requests from requests.auth import HTTPBasicAuth import json from ratelimit import limits, sleep_and_retry CALLS = 2 RATE_LIMIT = 1 @sleep_and_retry @limits(calls=CALLS, period=RATE_LIMIT) def check_limit(): # Empty function just to check for calls to API return global codes cod...
34.959538
103
0.586475
import requests from requests.auth import HTTPBasicAuth import json from ratelimit import limits, sleep_and_retry CALLS = 2 RATE_LIMIT = 1 @sleep_and_retry @limits(calls=CALLS, period=RATE_LIMIT) def check_limit(): return global codes codes = { "200":"OK", "204":"No Content", "403":"Forbidden", ...
true
true
f761357135978aa30f3e9c6be336e2da3055e925
4,471
py
Python
olsq/olsq_cirq/solve.py
sitaochen/OLSQ
59ef01ec184e05f866cabea7178c68cdda6bee3c
[ "BSD-3-Clause" ]
13
2020-07-30T17:36:58.000Z
2022-03-28T07:14:25.000Z
olsq/olsq_cirq/solve.py
sitaochen/OLSQ
59ef01ec184e05f866cabea7178c68cdda6bee3c
[ "BSD-3-Clause" ]
2
2021-01-11T02:55:02.000Z
2021-07-20T05:38:14.000Z
olsq/olsq_cirq/solve.py
sitaochen/OLSQ
59ef01ec184e05f866cabea7178c68cdda6bee3c
[ "BSD-3-Clause" ]
7
2020-07-30T17:37:03.000Z
2021-05-31T20:51:29.000Z
from cirq import Circuit, Moment, GateOperation, SWAP, CNOT import networkx as nx from olsq.solve import OLSQ from olsq.device import qcdevice from olsq.olsq_cirq.input import input_cirq class OLSQ_cirq(OLSQ): def __init__(self, objective_name, if_transition_based): """Set the objective of OLSQ_cirq, and...
41.398148
79
0.583091
from cirq import Circuit, Moment, GateOperation, SWAP, CNOT import networkx as nx from olsq.solve import OLSQ from olsq.device import qcdevice from olsq.olsq_cirq.input import input_cirq class OLSQ_cirq(OLSQ): def __init__(self, objective_name, if_transition_based): super().__init__(objective_name, if_t...
true
true
f761363bcd5533d39fd3efdc87f71f6399c065c0
15,669
py
Python
intersight/model/storage_pure_array_utilization.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/storage_pure_array_utilization.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/storage_pure_array_utilization.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
54.978947
1,678
0.642798
import re import sys from intersight.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
f76136816fc7523870c8014a947b88423505a4c7
5,650
py
Python
app.py
grkrama/DashboardTrial
b1534bfd7b6053b1ce7917dc34c77df5e447bd9e
[ "MIT" ]
null
null
null
app.py
grkrama/DashboardTrial
b1534bfd7b6053b1ce7917dc34c77df5e447bd9e
[ "MIT" ]
null
null
null
app.py
grkrama/DashboardTrial
b1534bfd7b6053b1ce7917dc34c77df5e447bd9e
[ "MIT" ]
null
null
null
# Run this app with `python app.py` and # visit http://127.0.0.1:8050/ in your web browser. import dash import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc import pandas as pd import yfinance as yf import datetime from datetime import date #external_styleshee...
33.040936
176
0.558053
import dash import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc import pandas as pd import yfinance as yf import datetime from datetime import date external_stylesheets = ['https://stackpath.bootstrapcdn.com/bootswatch/4.5.2/sketchy/bootstrap.min.css'] app = ...
true
true
f76136a28735e2d42b2ae7179e81ab0d8497c001
16,011
py
Python
python/examples/depthwise_conv/definitions.py
chelini/iree-llvm-sandbox
28978acb424bbac552f04856b28eb6c87478c289
[ "Apache-2.0" ]
29
2021-06-18T17:25:09.000Z
2022-03-18T23:20:24.000Z
python/examples/depthwise_conv/definitions.py
chelini/iree-llvm-sandbox
28978acb424bbac552f04856b28eb6c87478c289
[ "Apache-2.0" ]
151
2021-06-11T18:45:52.000Z
2022-03-31T23:13:23.000Z
python/examples/depthwise_conv/definitions.py
chelini/iree-llvm-sandbox
28978acb424bbac552f04856b28eb6c87478c289
[ "Apache-2.0" ]
25
2021-03-24T14:33:12.000Z
2022-03-29T13:42:57.000Z
import itertools from typing import Any, List, Mapping, Optional, Sequence, Tuple, Union import numpy as np from mlir.ir import * from mlir.dialects import arith, builtin, linalg, scf, std, tensor from ..core.compilation import attach_inplaceable_attributes, attach_passthrough from ..core.problem_definition import ...
39.146699
97
0.646431
import itertools from typing import Any, List, Mapping, Optional, Sequence, Tuple, Union import numpy as np from mlir.ir import * from mlir.dialects import arith, builtin, linalg, scf, std, tensor from ..core.compilation import attach_inplaceable_attributes, attach_passthrough from ..core.problem_definition import ...
true
true
f76136aeff92c82a6e64a7ce1573b90f0978340e
273
py
Python
lang/py/rfc/theme/yield/generators-uk/recvcount.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/theme/yield/generators-uk/recvcount.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/theme/yield/generators-uk/recvcount.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
1
2018-04-08T13:24:39.000Z
2018-04-08T13:24:39.000Z
# recvcount.py # # Example of a co-routine def recv_count(): try: while True: n = (yield) print "T-minus", n except GeneratorExit: print "Kaboom!" r = recv_count() r.next() for i in range(5,0,-1): r.send(i) r.close()
13.65
30
0.531136
def recv_count(): try: while True: n = (yield) print "T-minus", n except GeneratorExit: print "Kaboom!" r = recv_count() r.next() for i in range(5,0,-1): r.send(i) r.close()
false
true
f761375ec4094f49c1673095af9b0b53c3f5f265
8,621
py
Python
scrapy_project/subtitle_scraper/spiders/subtitles_spider.py
NarnePranay/Movie-genre-prediction-model
1780e24c88495b4c653a7b75c219b06c134e06c6
[ "MIT" ]
2
2018-12-01T19:53:43.000Z
2018-12-01T19:53:49.000Z
scrapy_project/subtitle_scraper/spiders/subtitles_spider.py
goutham-kalikrishna/Movie-genre-prediction-model
ac3d119e89534500a42ca92b53c41d5e7e2dbe12
[ "MIT" ]
null
null
null
scrapy_project/subtitle_scraper/spiders/subtitles_spider.py
goutham-kalikrishna/Movie-genre-prediction-model
ac3d119e89534500a42ca92b53c41d5e7e2dbe12
[ "MIT" ]
null
null
null
import json import scrapy import os import xmlrpc.client as xrpc import sys #subtitles_path = "/Users/mesutgurlek/Documents/Machine Learning/project/Movie-Category-Classification-from-Subtitles/Subtitles" # subtitles_path = "/Users/aeakdogan/hooop/Movie-Category-Classification-from-Subtitles/Subtitles" subtitles_path...
49.262857
214
0.621506
import json import scrapy import os import xmlrpc.client as xrpc import sys subtitles_path = "/home/burak/Documents/Courses-2016f/CS464/Project/Subtitles" url_template = "http://www.imdb.com/search/title?genres=%s&explore=genres&sort=num_votes,desc&view=simple" imdb_page_limit = 10 server = xrpc.ServerProxy("http://...
true
true
f76137f230da38f29517ed0d511f7786a0a2f6ec
8,391
py
Python
pytorch/pytorch_utils.py
tontsam/audioset_tagging_cnn
223f0a92fb753a34ac145a64c6713ee497fbda0c
[ "MIT" ]
null
null
null
pytorch/pytorch_utils.py
tontsam/audioset_tagging_cnn
223f0a92fb753a34ac145a64c6713ee497fbda0c
[ "MIT" ]
null
null
null
pytorch/pytorch_utils.py
tontsam/audioset_tagging_cnn
223f0a92fb753a34ac145a64c6713ee497fbda0c
[ "MIT" ]
null
null
null
import numpy as np import time import torch import torch.nn as nn def move_data_to_device(x, device): if 'float' in str(x.dtype): x = torch.Tensor(x) elif 'int' in str(x.dtype): x = torch.LongTensor(x) else: return x return x.to(device) def do_mixup(x, mixup_lambda): """...
33.035433
127
0.631033
import numpy as np import time import torch import torch.nn as nn def move_data_to_device(x, device): if 'float' in str(x.dtype): x = torch.Tensor(x) elif 'int' in str(x.dtype): x = torch.LongTensor(x) else: return x return x.to(device) def do_mixup(x, mixup_lambda): out...
true
true
f761380e647d45544e8f540ee052135313c38655
666
py
Python
back-end/app/__init__.py
naruto890809/flask-vuejs-hmblog
4324dd4eb6d26ba4de041ffced6f546476c25b1f
[ "MIT" ]
null
null
null
back-end/app/__init__.py
naruto890809/flask-vuejs-hmblog
4324dd4eb6d26ba4de041ffced6f546476c25b1f
[ "MIT" ]
5
2021-03-10T06:11:49.000Z
2022-02-26T23:08:00.000Z
back-end/app/__init__.py
naruto890809/flask-vuejs-hmblog
4324dd4eb6d26ba4de041ffced6f546476c25b1f
[ "MIT" ]
null
null
null
from flask import Flask from flask import Flask from flask_cors import CORS from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from config import Config # Flask-SQLAlchemy plugin db = SQLAlchemy() # Flask-Migrate plugin migrate = Migrate() def creat_app(config_class=Config): ap...
22.2
54
0.711712
from flask import Flask from flask import Flask from flask_cors import CORS from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from config import Config db = SQLAlchemy() migrate = Migrate() def creat_app(config_class=Config): app = Flask(__name__) app.config.from_object(con...
true
true
f761387257e9a03b814d53719990f1677ad54bdb
5,185
py
Python
pdb2sql/align.py
DTRademaker/pdb2sql
e4ddb4bd554b5623ca7101ebc4f4cd9acc0a422a
[ "Apache-2.0" ]
13
2017-10-26T08:32:48.000Z
2022-03-12T18:12:30.000Z
pdb2sql/align.py
DTRademaker/pdb2sql
e4ddb4bd554b5623ca7101ebc4f4cd9acc0a422a
[ "Apache-2.0" ]
44
2018-07-23T08:49:40.000Z
2022-01-23T13:25:51.000Z
pdb2sql/align.py
DTRademaker/pdb2sql
e4ddb4bd554b5623ca7101ebc4f4cd9acc0a422a
[ "Apache-2.0" ]
13
2017-10-26T08:32:57.000Z
2022-03-30T11:35:07.000Z
import numpy as np from .pdb2sqlcore import pdb2sql from .interface import interface from .transform import rot_xyz_around_axis def align(pdb, axis='x', export=True, **kwargs): """Align the max principal component of a structure along one of the cartesian axis Arguments: pdb {str, pdb2sql} -- the pdb...
24.342723
87
0.602893
import numpy as np from .pdb2sqlcore import pdb2sql from .interface import interface from .transform import rot_xyz_around_axis def align(pdb, axis='x', export=True, **kwargs): if not isinstance(pdb, pdb2sql): sql = pdb2sql(pdb) else: sql = pdb xyz = np.array(sql.get('x,y,z', **kwarg...
true
true
f76138dbde7d507a539a5d89c8f96eb1a37842f6
41,132
py
Python
XOalign/XOconv.py
jsburg/xdsme
3fc9ed185ab78e1a42306edf24e681981eacd221
[ "BSD-3-Clause" ]
11
2016-09-21T01:44:04.000Z
2021-11-15T04:11:29.000Z
XOalign/XOconv.py
jsburg/xdsme
3fc9ed185ab78e1a42306edf24e681981eacd221
[ "BSD-3-Clause" ]
11
2016-09-09T15:00:15.000Z
2021-05-07T15:02:10.000Z
XOalign/XOconv.py
jsburg/xdsme
3fc9ed185ab78e1a42306edf24e681981eacd221
[ "BSD-3-Clause" ]
8
2016-05-13T14:37:58.000Z
2019-09-10T12:38:31.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (C) 2005, Pierre Legrand # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any la...
40.246575
114
0.565496
""" 19/10/05 First version Uses the mat3 and vec3 classes from Python Computer Graphics Kit v1.2.0 module by Matthias Baas (see http://cgkit.sourceforge.net). TODO: - """ __author__ = "Pierre Legrand (pierre legrand \at synchrotron-soleil fr)" __date__ = "21-11-2009" __copyright__ = "Copyrig...
false
true
f7613a00c2ed00e4ed902bc9c88dd28a7bad4222
1,368
py
Python
crafters/image/ImageReader/tests/test_imagereader.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
106
2020-04-28T10:24:08.000Z
2022-03-15T02:30:27.000Z
crafters/image/ImageReader/tests/test_imagereader.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
6,808
2020-05-01T04:13:43.000Z
2021-06-23T08:04:02.000Z
crafters/image/ImageReader/tests/test_imagereader.py
strawberrypie/jina-hub
8b2356d58687694d817881c840745214f12e94c4
[ "Apache-2.0" ]
86
2020-04-29T09:50:29.000Z
2022-01-25T05:42:44.000Z
import io import numpy as np from PIL import Image from .. import ImageReader def create_test_image(output_fn, size_width=50, size_height=50): from PIL import Image image = Image.new('RGB', size=(size_width, size_height), color=(155, 0, 0)) with open(output_fn, "wb") as f: image.save(f, 'jpeg') ...
33.365854
105
0.693713
import io import numpy as np from PIL import Image from .. import ImageReader def create_test_image(output_fn, size_width=50, size_height=50): from PIL import Image image = Image.new('RGB', size=(size_width, size_height), color=(155, 0, 0)) with open(output_fn, "wb") as f: image.save(f, 'jpeg') ...
true
true
f7613cf653e8f5702954066b87a3924565c43120
1,771
py
Python
rlberry/utils/check_bandit_agent.py
riccardodv/rlberry
8bb03772cda1e13c57de0e1da7bc7356a3014cfb
[ "MIT" ]
null
null
null
rlberry/utils/check_bandit_agent.py
riccardodv/rlberry
8bb03772cda1e13c57de0e1da7bc7356a3014cfb
[ "MIT" ]
2
2021-11-17T02:18:58.000Z
2022-02-01T14:51:48.000Z
rlberry/utils/check_bandit_agent.py
riccardodv/rlberry
8bb03772cda1e13c57de0e1da7bc7356a3014cfb
[ "MIT" ]
null
null
null
from rlberry.envs.bandits import BernoulliBandit from rlberry.manager import AgentManager def check_bandit_agent(Agent, environment=BernoulliBandit, seed=42): """ Function used to check a bandit agent in rlberry on a Gaussian bandit problem. Parameters ---------- Agent: rlberry agent module ...
28.111111
82
0.620553
from rlberry.envs.bandits import BernoulliBandit from rlberry.manager import AgentManager def check_bandit_agent(Agent, environment=BernoulliBandit, seed=42): env_ctor = environment env_kwargs = {} agent1 = AgentManager( Agent, (env_ctor, env_kwargs), fit_budget=10, n_fit=1, seed=seed ) a...
true
true
f7613d74dfbbab385bb66d3cf0e6d2112a813664
1,766
py
Python
homeassistant/components/binary_sensor/tesla.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
4
2019-01-10T14:47:54.000Z
2021-04-22T02:06:27.000Z
homeassistant/components/binary_sensor/tesla.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
6
2021-02-08T21:02:40.000Z
2022-03-12T00:52:16.000Z
homeassistant/components/binary_sensor/tesla.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
3
2018-09-14T07:34:09.000Z
2018-09-29T12:57:10.000Z
""" Support for Tesla binary sensor. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.tesla/ """ import logging from homeassistant.components.binary_sensor import ( BinarySensorDevice, ENTITY_ID_FORMAT) from homeassistant.components.tesl...
30.982456
78
0.69026
import logging from homeassistant.components.binary_sensor import ( BinarySensorDevice, ENTITY_ID_FORMAT) from homeassistant.components.tesla import DOMAIN as TESLA_DOMAIN, TeslaDevice _LOGGER = logging.getLogger(__name__) DEPENDENCIES = ['tesla'] def setup_platform(hass, config, add_entities, discovery_info=N...
true
true
f7613daa35d5f84f94f732e96acd41c901e68140
146
py
Python
stu/apps.py
shisi1010/MiniDjango
e45aa3e39c93c128ceb96c3c8fb221c615c1fb2d
[ "MIT" ]
null
null
null
stu/apps.py
shisi1010/MiniDjango
e45aa3e39c93c128ceb96c3c8fb221c615c1fb2d
[ "MIT" ]
null
null
null
stu/apps.py
shisi1010/MiniDjango
e45aa3e39c93c128ceb96c3c8fb221c615c1fb2d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class StuConfig(AppConfig): name = 'stu'
16.222222
39
0.719178
from __future__ import unicode_literals from django.apps import AppConfig class StuConfig(AppConfig): name = 'stu'
true
true
f7613f0d28ac618ffd9d7370b9bd709701669d0b
3,458
py
Python
tests/pyre.pkg/components/component_inheritance_multi.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/pyre.pkg/components/component_inheritance_multi.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/pyre.pkg/components/component_inheritance_multi.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2022 all rights reserved # """ Verify that multiple inheritance is treated properly """ def test(): import pyre # declare a couple of components class base(pyre.component): """the base component""" ...
31.153153
93
0.645749
def test(): import pyre class base(pyre.component): common = pyre.property() a1 = pyre.property() a2 = pyre.property() class a1(base): a1 = pyre.property() class a2(base): a2 = pyre.property() class derived(a1, a2): common = pyre.property()...
true
true
f7614062720b48892d38caff418b75c43e7161e6
4,354
py
Python
koku/reporting/migrations/0094_auto_20200211_1449.py
Vasyka/koku
b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614
[ "Apache-2.0" ]
2
2022-01-12T03:42:39.000Z
2022-01-12T03:42:40.000Z
koku/reporting/migrations/0094_auto_20200211_1449.py
Vasyka/koku
b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614
[ "Apache-2.0" ]
null
null
null
koku/reporting/migrations/0094_auto_20200211_1449.py
Vasyka/koku
b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614
[ "Apache-2.0" ]
1
2021-07-21T09:33:59.000Z
2021-07-21T09:33:59.000Z
# Generated by Django 2.2.10 on 2020-02-11 14:49 import django.contrib.postgres.fields import django.db.models.deletion from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [("reporting", "0093_auto_20200210_1920")] operations = [ migrat...
41.075472
118
0.514469
import django.contrib.postgres.fields import django.db.models.deletion from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [("reporting", "0093_auto_20200210_1920")] operations = [ migrations.CreateModel( name="OCPUsagePodLa...
true
true
f76140bc9f7dcc0e6760ba3578dedab63899d80c
6,587
py
Python
src/arch/arm/ArmSystem.py
DRyan1995/gem5
dc762e4f197ae0b47c748bed0111b3811c8df825
[ "BSD-3-Clause" ]
null
null
null
src/arch/arm/ArmSystem.py
DRyan1995/gem5
dc762e4f197ae0b47c748bed0111b3811c8df825
[ "BSD-3-Clause" ]
null
null
null
src/arch/arm/ArmSystem.py
DRyan1995/gem5
dc762e4f197ae0b47c748bed0111b3811c8df825
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2009, 2012-2013, 2015-2017 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation...
43.622517
119
0.692728
from m5.params import * from m5.SimObject import * from m5.util.fdthelper import * from System import System class ArmMachineType(Enum): map = { 'RealViewEB' : 827, 'RealViewPBX' : 1901, 'VExpress_EMM' : 2272, 'VExpress_EMM64' : 2272, 'DTOnly' : -1, } class ArmSystem(...
true
true
f76141650f851bd53f5e59e9fc3f761d40a0e15d
3,515
py
Python
sahara/plugins/vanilla/v1_2_1/scaling.py
esikachev/sahara-backup
a470fa6aec5f1009d41d82fabc1e5d64874aa213
[ "Apache-2.0" ]
null
null
null
sahara/plugins/vanilla/v1_2_1/scaling.py
esikachev/sahara-backup
a470fa6aec5f1009d41d82fabc1e5d64874aa213
[ "Apache-2.0" ]
null
null
null
sahara/plugins/vanilla/v1_2_1/scaling.py
esikachev/sahara-backup
a470fa6aec5f1009d41d82fabc1e5d64874aa213
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
35.505051
74
0.636984
import os import six from sahara import context from sahara.i18n import _ from sahara.plugins import utils from sahara.plugins.vanilla.v1_2_1 import config_helper from sahara.plugins.vanilla.v1_2_1 import run_scripts as run from sahara.utils import cluster_progress_ops as cpo from sahara.utils import poll_utils from...
true
true
f76141e5ef5934704fb5fbe4367a5ea528c39efc
2,021
py
Python
apps/TCPB_-_Text_Blob/text_blob/text_blob.py
cvahid/threatconnect-playbooks
2a862a1739750104785aedd1af29de868363140a
[ "Apache-2.0" ]
null
null
null
apps/TCPB_-_Text_Blob/text_blob/text_blob.py
cvahid/threatconnect-playbooks
2a862a1739750104785aedd1af29de868363140a
[ "Apache-2.0" ]
null
null
null
apps/TCPB_-_Text_Blob/text_blob/text_blob.py
cvahid/threatconnect-playbooks
2a862a1739750104785aedd1af29de868363140a
[ "Apache-2.0" ]
2
2021-09-23T01:47:03.000Z
2022-03-10T04:25:43.000Z
# -*- coding: utf-8 -*- """Playbook app wrapper for TextBlob (https://github.com/sloria/TextBlob).""" import traceback from tcex import TcEx from textblob import TextBlob def parse_arguments(): """Parse arguments coming into the app.""" tcex.parser.add_argument('--string', help='String', required=True) ...
33.683333
99
0.680851
import traceback from tcex import TcEx from textblob import TextBlob def parse_arguments(): tcex.parser.add_argument('--string', help='String', required=True) tcex.parser.add_argument('--n_gram', help='n-gram length', required=False, default="3") return tcex.args def main(): args = parse_arguments...
true
true
f761421639857dfeb04d2164afe2bfddc52b99a8
17,996
py
Python
webpyapp/venv/lib/python3.9/site-packages/web/webapi.py
waqarakbar/complete-python-3-udemy
d066f9cbcb220314f857ad6918dc4dd920c65c5a
[ "MIT" ]
null
null
null
webpyapp/venv/lib/python3.9/site-packages/web/webapi.py
waqarakbar/complete-python-3-udemy
d066f9cbcb220314f857ad6918dc4dd920c65c5a
[ "MIT" ]
null
null
null
webpyapp/venv/lib/python3.9/site-packages/web/webapi.py
waqarakbar/complete-python-3-udemy
d066f9cbcb220314f857ad6918dc4dd920c65c5a
[ "MIT" ]
null
null
null
""" Web API (wrapper around WSGI) (from web.py) """ import cgi import pprint import sys import tempfile from io import BytesIO from urllib.parse import urljoin from .utils import dictadd, intget, safestr, storage, storify, threadeddict try: from urllib.parse import unquote, quote from http.cookies import Coo...
26.700297
103
0.616526
import cgi import pprint import sys import tempfile from io import BytesIO from urllib.parse import urljoin from .utils import dictadd, intget, safestr, storage, storify, threadeddict try: from urllib.parse import unquote, quote from http.cookies import CookieError, Morsel, SimpleCookie except ImportError: ...
true
true
f7614449a88fb1f8a56c87a5f65ad1e156a09c85
877
py
Python
demoslogic/blockobjects/tests/test_timestamps.py
amstart/demoslogic
059575b502c21f8f27c66a26abee9a42fcb788b7
[ "MIT" ]
null
null
null
demoslogic/blockobjects/tests/test_timestamps.py
amstart/demoslogic
059575b502c21f8f27c66a26abee9a42fcb788b7
[ "MIT" ]
3
2021-06-08T20:04:58.000Z
2022-03-11T23:26:36.000Z
demoslogic/blockobjects/tests/test_timestamps.py
amstart/demoslogic
059575b502c21f8f27c66a26abee9a42fcb788b7
[ "MIT" ]
null
null
null
import datetime from django.utils import timezone from .base import BlockObjectsTests class ObjectTimeStampMethodsTests(BlockObjectsTests): def test_old_object_was_not_published_recently(self): time = timezone.now() - datetime.timedelta(days = 30) old_object = self.create_object() setat...
38.130435
67
0.716078
import datetime from django.utils import timezone from .base import BlockObjectsTests class ObjectTimeStampMethodsTests(BlockObjectsTests): def test_old_object_was_not_published_recently(self): time = timezone.now() - datetime.timedelta(days = 30) old_object = self.create_object() setat...
true
true
f761449f347f5af066605e34230e2f9464c00153
87
py
Python
colors.py
patxxi/sort-algorithm-visualizer
16c5c65063263d3dee5f949d2284750e7f305655
[ "MIT" ]
null
null
null
colors.py
patxxi/sort-algorithm-visualizer
16c5c65063263d3dee5f949d2284750e7f305655
[ "MIT" ]
null
null
null
colors.py
patxxi/sort-algorithm-visualizer
16c5c65063263d3dee5f949d2284750e7f305655
[ "MIT" ]
null
null
null
BLUE = "#1017e6" GREEN = "#31e319" CYAN = "#03fccf" RED = "#fc0335" YELLOW = "#f2f205"
14.5
18
0.597701
BLUE = "#1017e6" GREEN = "#31e319" CYAN = "#03fccf" RED = "#fc0335" YELLOW = "#f2f205"
true
true
f76144b620a11dbd5df71ea86f8983d4e85a9469
4,982
py
Python
examples/client/append.py
syaiful6/aerospike-client-python
59fa0d36aa899a164282643fe49b27d12aaf323f
[ "Apache-2.0" ]
105
2015-01-07T09:51:13.000Z
2022-03-24T04:23:54.000Z
examples/client/append.py
syaiful6/aerospike-client-python
59fa0d36aa899a164282643fe49b27d12aaf323f
[ "Apache-2.0" ]
180
2015-01-01T19:29:50.000Z
2022-03-19T14:14:06.000Z
examples/client/append.py
syaiful6/aerospike-client-python
59fa0d36aa899a164282643fe49b27d12aaf323f
[ "Apache-2.0" ]
94
2015-01-21T19:17:48.000Z
2022-01-31T07:17:47.000Z
# -*- coding: utf-8 -*- ########################################################################## # Copyright 2013-2021 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
30.753086
100
0.476315
from __future__ import print_function import aerospike import sys from optparse import OptionParser usage = "usage: %prog [options] key" optparser = OptionParser(usage=usage, add_help_option=False) optparser.add_option( "--help", dest="help", action="store_true", help="Displays this message.") optparser...
true
true
f7614617a4d0939c6bace06fcb3ec627bdb84df5
5,040
py
Python
platformer/views/view_character_select.py
pythonarcade/community-platformer
81e8983358504b9a33249373f646f3ad89c5ab82
[ "MIT" ]
1
2021-08-18T04:04:23.000Z
2021-08-18T04:04:23.000Z
platformer/views/view_character_select.py
pythonarcade/community-platformer
81e8983358504b9a33249373f646f3ad89c5ab82
[ "MIT" ]
null
null
null
platformer/views/view_character_select.py
pythonarcade/community-platformer
81e8983358504b9a33249373f646f3ad89c5ab82
[ "MIT" ]
2
2022-01-21T10:19:32.000Z
2022-01-26T18:35:50.000Z
""" Main Menu """ import arcade import arcade.gui from platformer.views.view import View from platformer.views.view_game import GameView from platformer.views.view_game_over import GameOverView from platformer.views.view_pause import PauseView class CharacterSelectView(View): def __init__(self): super()....
34.054054
117
0.64504
import arcade import arcade.gui from platformer.views.view import View from platformer.views.view_game import GameView from platformer.views.view_game_over import GameOverView from platformer.views.view_pause import PauseView class CharacterSelectView(View): def __init__(self): super().__init__() ...
true
true