hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72062f74e3d658e22fe2cb10addd4d8ad13e2b0
399
py
Python
thefuck/rules/brew_uninstall.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
1
2021-12-13T18:41:46.000Z
2021-12-13T18:41:46.000Z
thefuck/rules/brew_uninstall.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
4
2020-12-23T15:44:08.000Z
2020-12-23T16:48:59.000Z
thefuck/rules/brew_uninstall.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
1
2020-12-23T14:46:54.000Z
2020-12-23T14:46:54.000Z
from thefuck.utils import for_app @for_app('brew', at_least=2) def match(command): return (command.script_parts[1] in ['uninstall', 'rm', 'remove'] and "brew uninstall --force" in command.stdout) def get_new_command(command): command_parts = command.script_parts[:] command_parts[1] = 'uninst...
26.6
68
0.684211
from thefuck.utils import for_app @for_app('brew', at_least=2) def match(command): return (command.script_parts[1] in ['uninstall', 'rm', 'remove'] and "brew uninstall --force" in command.stdout) def get_new_command(command): command_parts = command.script_parts[:] command_parts[1] = 'uninst...
true
true
f720630f134225e35a47baee79036aa6afb6bbf5
2,354
py
Python
aliyun-python-sdk-sddp/aliyunsdksddp/request/v20190103/DescribeDataAssetsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-sddp/aliyunsdksddp/request/v20190103/DescribeDataAssetsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-sddp/aliyunsdksddp/request/v20190103/DescribeDataAssetsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.810811
74
0.752336
from aliyunsdkcore.request import RpcRequest from aliyunsdksddp.endpoint import endpoint_data class DescribeDataAssetsRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Sddp', '2019-01-03', 'DescribeDataAssets') self.set_method('POST') if hasattr(self, "endpoint_map"): s...
true
true
f720645e9f330d987e8a854268bf2c20aad7c1fa
13,423
py
Python
JChipSetup.py
mbuckaway/CrossMgr
4c64e429eb3215fda1b685c5e684c56f5d0c02cf
[ "MIT" ]
1
2020-02-05T11:22:03.000Z
2020-02-05T11:22:03.000Z
JChipSetup.py
mbuckaway/CrossMgr
4c64e429eb3215fda1b685c5e684c56f5d0c02cf
[ "MIT" ]
null
null
null
JChipSetup.py
mbuckaway/CrossMgr
4c64e429eb3215fda1b685c5e684c56f5d0c02cf
[ "MIT" ]
null
null
null
import wx import wx.lib.intctrl import wx.lib.rcsizer as rcs import socket import sys import re import six import datetime import Model import Utils import JChip import ChipReader from JChip import EVT_CHIP_READER import RaceResult import Ultra import HelpSearch from ReadSignOnSheet import GetTagNums HOST, PORT = JCh...
33.896465
149
0.662147
import wx import wx.lib.intctrl import wx.lib.rcsizer as rcs import socket import sys import re import six import datetime import Model import Utils import JChip import ChipReader from JChip import EVT_CHIP_READER import RaceResult import Ultra import HelpSearch from ReadSignOnSheet import GetTagNums HOST, PORT = JCh...
true
true
f72064b70b67fb3499b7878938b50a98033a491b
845
py
Python
examples/upload_video.py
nullwriter/ig-actor
a089107657ccdf11ba213160c4cc5d3690cecd76
[ "MIT" ]
null
null
null
examples/upload_video.py
nullwriter/ig-actor
a089107657ccdf11ba213160c4cc5d3690cecd76
[ "MIT" ]
null
null
null
examples/upload_video.py
nullwriter/ig-actor
a089107657ccdf11ba213160c4cc5d3690cecd76
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Use text editor to edit the script and type in valid Instagram username/password import urllib from bot.lib.InstagramAPI import InstagramAPI video_url = 'https://instagram.fmad3-2.fna.fbcdn.net/t50.2886-16/17157217_1660580944235536_866261046376005632_n.mp4' #a valid ...
36.73913
141
0.802367
import urllib from bot.lib.InstagramAPI import InstagramAPI video_url = 'https://instagram.fmad3-2.fna.fbcdn.net/t50.2886-16/17157217_1660580944235536_866261046376005632_n.mp4' video_local_path = video_url.split("/")[-1] thumbnail_url = "https://instagram.fmad3-2.fna.fbcdn.net/t51.2885-15/e15/17075853_175941039...
true
true
f72065bfefeeb5caf657c46e57376538c3455609
4,517
py
Python
lib/3rdparty/common/pyqode/core/modes/autocomplete.py
tommo/gii
03624a57cf74a07e38bfdc7f53c50bd926b7b5a7
[ "MIT" ]
7
2016-02-13T18:47:23.000Z
2020-07-03T13:47:49.000Z
lib/3rdparty/common/pyqode/core/modes/autocomplete.py
tommo/gii
03624a57cf74a07e38bfdc7f53c50bd926b7b5a7
[ "MIT" ]
1
2018-06-13T04:55:27.000Z
2021-11-05T05:52:51.000Z
lib/3rdparty/common/pyqode/core/modes/autocomplete.py
tommo/gii
03624a57cf74a07e38bfdc7f53c50bd926b7b5a7
[ "MIT" ]
4
2016-02-15T13:32:46.000Z
2019-12-12T17:22:31.000Z
# -*- coding: utf-8 -*- """ Contains the AutoCompleteMode """ import logging from pyqode.qt import QtCore, QtGui from pyqode.core.api import TextHelper from pyqode.core.api.mode import Mode class AutoCompleteMode(Mode): """ Automatically complete quotes and parentheses Generic auto complete mode that automat...
41.440367
79
0.570511
import logging from pyqode.qt import QtCore, QtGui from pyqode.core.api import TextHelper from pyqode.core.api.mode import Mode class AutoCompleteMode(Mode): MAPPING = {'"': '"', "'": "'", "(": ")", "{": "}", "[": "]"} SELECTED_QUOTES_FORMATS = {key: '%s%s%s' for key in MAPPING.keys()} QUO...
true
true
f720669f2683fff61a73382464913841475adbc5
18,762
py
Python
mslib/mswms/dataaccess.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/mswms/dataaccess.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/mswms/dataaccess.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ mslib.mswms.dataaccess ~~~~~~~~~~~~~~~~~~~~~~ This module provides functions to access data This file is part of mss. :copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. :copyright: Copyright 2011-2014 Marc Rautenhaus (mr) :copyrigh...
43.531323
114
0.600149
from abc import ABCMeta, abstractmethod import itertools import os import logging import netCDF4 import numpy as np import pint from mslib import netCDF4tools from mslib.utils import UR class NWPDataAccess(metaclass=ABCMeta): def __init__(self, rootpath, uses_init_time=True, uses_valid_time=True): sel...
true
true
f7206716b828e3c1c1ab325cae68cae705a72727
9,010
py
Python
scalability/experiments/run_mainnet.py
Deland-Labs/ic
047172b01e0afc0e61448669d4ec98b2425c6853
[ "Apache-2.0" ]
1
2021-12-01T03:48:42.000Z
2021-12-01T03:48:42.000Z
scalability/experiments/run_mainnet.py
Deland-Labs/ic
047172b01e0afc0e61448669d4ec98b2425c6853
[ "Apache-2.0" ]
null
null
null
scalability/experiments/run_mainnet.py
Deland-Labs/ic
047172b01e0afc0e61448669d4ec98b2425c6853
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import subprocess import sys import time from typing import List import gflags FLAGS = gflags.FLAGS gflags.DEFINE_bool("use_updates", False, "Issue update calls instead of query calls") class Mainnet: """Wrapper to run against subnetworks in mainnet concurrently.""" def __init__(self...
38.836207
111
0.568036
import subprocess import sys import time from typing import List import gflags FLAGS = gflags.FLAGS gflags.DEFINE_bool("use_updates", False, "Issue update calls instead of query calls") class Mainnet: def __init__(self): if FLAGS.testnet == "mercury" and FLAGS.target_subnet_id is None: rai...
true
true
f72067b03fcce0e8fbe2579787be36a9398c361c
627
py
Python
transform_file.py
BXuan694/universalAdversarialPerturbation
ebca90f76b5d45715c98a1ff0b6f11df753b51c6
[ "BSD-2-Clause" ]
38
2019-01-19T09:43:13.000Z
2022-01-05T09:47:02.000Z
transform_file.py
BXuan694/universalAdversarialPerturbation
ebca90f76b5d45715c98a1ff0b6f11df753b51c6
[ "BSD-2-Clause" ]
3
2020-02-24T05:56:35.000Z
2022-01-07T12:08:33.000Z
transform_file.py
BXuan694/universalAdversarialPerturbation
ebca90f76b5d45715c98a1ff0b6f11df753b51c6
[ "BSD-2-Clause" ]
10
2019-02-19T10:05:57.000Z
2021-06-07T08:02:36.000Z
from torchvision import transforms transform1 = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean = [0.485,0.456,0.406], std = [0.229,0.224,0.225]), ]) cut = transforms.Compose([ transforms.Resize(256), transforms.Cent...
24.115385
80
0.657097
from torchvision import transforms transform1 = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean = [0.485,0.456,0.406], std = [0.229,0.224,0.225]), ]) cut = transforms.Compose([ transforms.Resize(256), transforms.Cent...
true
true
f7206874eea5462451a2197d6ce51ff97b87f248
7,039
py
Python
pypi_tools/main.py
xnuinside/pypi_tools_bot
2ae408e510dcc30c39475af1f9cba8af866c54ee
[ "MIT" ]
2
2021-03-04T07:37:38.000Z
2021-04-01T16:57:10.000Z
pypi_tools/main.py
xnuinside/pypi_tools_bot
2ae408e510dcc30c39475af1f9cba8af866c54ee
[ "MIT" ]
null
null
null
pypi_tools/main.py
xnuinside/pypi_tools_bot
2ae408e510dcc30c39475af1f9cba8af866c54ee
[ "MIT" ]
null
null
null
import os import logging import sentry_sdk from aiogram import Bot, Dispatcher, executor, types from datetime import datetime, timedelta from pypi_tools.logic import remove_track_for_package import pypi_tools.data as d from pypi_tools.helpers import validate_input import pypi_tools.vizualizer as v import pypi_...
40.687861
107
0.624378
import os import logging import sentry_sdk from aiogram import Bot, Dispatcher, executor, types from datetime import datetime, timedelta from pypi_tools.logic import remove_track_for_package import pypi_tools.data as d from pypi_tools.helpers import validate_input import pypi_tools.vizualizer as v import pypi_...
true
true
f720698516b3281db66e46d699cb433d69aa86c5
473
py
Python
4_factory/simple_factory/veggie_pizza.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
4_factory/simple_factory/veggie_pizza.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
4_factory/simple_factory/veggie_pizza.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
from pizza import Pizza class VeggiePizza(Pizza): def __init__(self): self.name = 'Veggie Pizza' self.dough = 'Crust' self.sauce = 'Marinara sauce' self.toppings.append('Shredded mozzarella') self.toppings.append('Grated parmesan') self.toppings.append('Diced onion'...
31.533333
51
0.651163
from pizza import Pizza class VeggiePizza(Pizza): def __init__(self): self.name = 'Veggie Pizza' self.dough = 'Crust' self.sauce = 'Marinara sauce' self.toppings.append('Shredded mozzarella') self.toppings.append('Grated parmesan') self.toppings.append('Diced onion'...
true
true
f7206acbc129c68b6043e8dd105bdfbbd6738ace
240
py
Python
python/homeflux/utils/timer.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
python/homeflux/utils/timer.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
python/homeflux/utils/timer.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
import time class Timer: """Simple Timer""" def __init__(self): self.start = time.perf_counter() def end(self, precision: int = 3) -> str: return '%.{}f'.format(precision) % (time.perf_counter() - self.start)
21.818182
77
0.6
import time class Timer: def __init__(self): self.start = time.perf_counter() def end(self, precision: int = 3) -> str: return '%.{}f'.format(precision) % (time.perf_counter() - self.start)
true
true
f7206b1325541721ae9f9158f32fc2ad213a5369
16,774
py
Python
pw_tokenizer/py/pw_tokenizer/tokens.py
LuDuda/pigweed
dcd7230895a234156bc7b6e5061e6936627c5fbb
[ "Apache-2.0" ]
null
null
null
pw_tokenizer/py/pw_tokenizer/tokens.py
LuDuda/pigweed
dcd7230895a234156bc7b6e5061e6936627c5fbb
[ "Apache-2.0" ]
null
null
null
pw_tokenizer/py/pw_tokenizer/tokens.py
LuDuda/pigweed
dcd7230895a234156bc7b6e5061e6936627c5fbb
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
35.84188
80
0.63205
import collections import csv from dataclasses import dataclass from datetime import datetime import io import logging from pathlib import Path import re import struct from typing import (BinaryIO, Callable, Dict, Iterable, Iterator, List, NamedTuple, Optional, Pattern, Tuple, Union, V...
true
true
f7206b36e5a22338c09290307a5bbcd5356c269a
366
py
Python
chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py
dieterwarson/ChatterBot
69c674218be274bca1f47c105b09995373e09f47
[ "BSD-3-Clause" ]
null
null
null
chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py
dieterwarson/ChatterBot
69c674218be274bca1f47c105b09995373e09f47
[ "BSD-3-Clause" ]
null
null
null
chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py
dieterwarson/ChatterBot
69c674218be274bca1f47c105b09995373e09f47
[ "BSD-3-Clause" ]
null
null
null
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_chatterbot', '0015_statement_persona'), ] operations = [ migrations.AddField( model_name='statement', name='stemmed_text', field=models.CharField(...
21.529412
63
0.60929
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_chatterbot', '0015_statement_persona'), ] operations = [ migrations.AddField( model_name='statement', name='stemmed_text', field=models.CharField(...
true
true
f7206bcb4173f335d34eb68cdae8a22c3c3c3a67
1,928
py
Python
docs_src/sql_databases/sql_app/alt_main.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
53,007
2018-12-08T10:05:29.000Z
2022-03-31T23:30:02.000Z
docs_src/sql_databases/sql_app/alt_main.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
4,155
2019-01-05T05:07:49.000Z
2022-03-31T21:25:38.000Z
docs_src/sql_databases/sql_app/alt_main.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
4,092
2018-12-09T16:21:00.000Z
2022-03-31T07:59:45.000Z
from typing import List from fastapi import Depends, FastAPI, HTTPException, Request, Response from sqlalchemy.orm import Session from . import crud, models, schemas from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() @app.middleware("http") async def db_session...
30.603175
79
0.721992
from typing import List from fastapi import Depends, FastAPI, HTTPException, Request, Response from sqlalchemy.orm import Session from . import crud, models, schemas from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() @app.middleware("http") async def db_session...
true
true
f7206d083d469a643b9a783b3a819077f502c23e
450
py
Python
Lib/fontTools/ttLib/tables/T_S_I__2.py
anntzer/fonttools
726cd67549956b985bbbe83e26fb0af9da59ddf7
[ "MIT", "BSD-3-Clause" ]
2
2021-04-07T16:47:04.000Z
2022-01-15T04:01:01.000Z
Lib/fontTools/ttLib/tables/T_S_I__2.py
anntzer/fonttools
726cd67549956b985bbbe83e26fb0af9da59ddf7
[ "MIT", "BSD-3-Clause" ]
74
2020-01-30T07:27:54.000Z
2021-08-03T05:47:17.000Z
Lib/fontTools/ttLib/tables/T_S_I__2.py
anntzer/fonttools
726cd67549956b985bbbe83e26fb0af9da59ddf7
[ "MIT", "BSD-3-Clause" ]
1
2020-01-22T20:06:09.000Z
2020-01-22T20:06:09.000Z
""" TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT) tool to store its hinting source data. TSI2 is the index table containing the lengths and offsets for the glyph programs that are contained in the TSI3 table. It uses the same format as the TSI0 table. """ from fontTools.misc.py23 import * f...
28.125
77
0.768889
from fontTools.misc.py23 import * from fontTools import ttLib superclass = ttLib.getTableClass("TSI0") class table_T_S_I__2(superclass): dependencies = ["TSI3"]
true
true
f7206d8f4f866ba92ed05ffaf316f027c8f23f04
405
py
Python
psqlflow/printers/graph_printer.py
liuhenry/psqlflow
a4d39794d437a16fbf89582d3f7b8e7425bdfca5
[ "MIT" ]
3
2016-12-11T19:50:44.000Z
2018-05-24T13:52:09.000Z
psqlflow/printers/graph_printer.py
liuhenry/psqlflow
a4d39794d437a16fbf89582d3f7b8e7425bdfca5
[ "MIT" ]
null
null
null
psqlflow/printers/graph_printer.py
liuhenry/psqlflow
a4d39794d437a16fbf89582d3f7b8e7425bdfca5
[ "MIT" ]
null
null
null
import pygraphviz as pgv from .printer import Printer class GraphPrinter(Printer): """ Exports flows to graphviz """ def __init__(self, *args, **kwargs): super(GraphPrinter, self).__init__(*args, **kwargs) def new_obj(self): return pgv.AGraph(strict=False, directed=True, rankdir='...
21.315789
68
0.644444
import pygraphviz as pgv from .printer import Printer class GraphPrinter(Printer): def __init__(self, *args, **kwargs): super(GraphPrinter, self).__init__(*args, **kwargs) def new_obj(self): return pgv.AGraph(strict=False, directed=True, rankdir='LR') @staticmethod def add_edge(graph...
true
true
f7206e62311f2ae8bf498980b4772f3ea02b5efc
6,337
py
Python
apps/alerts/main.py
Cal-CS-61A-Staff/examtool-web
c31b8596fde75c54fe6436400bb6d2889d7b1283
[ "MIT" ]
1
2020-05-06T22:34:44.000Z
2020-05-06T22:34:44.000Z
apps/alerts/main.py
Cal-CS-61A-Staff/examtool-web
c31b8596fde75c54fe6436400bb6d2889d7b1283
[ "MIT" ]
5
2020-07-13T09:29:01.000Z
2020-10-18T06:33:30.000Z
apps/alerts/main.py
Cal-CS-61A-Staff/examtool-web
c31b8596fde75c54fe6436400bb6d2889d7b1283
[ "MIT" ]
5
2020-05-13T16:10:24.000Z
2020-09-23T18:41:06.000Z
import time from os import getenv from flask import jsonify, abort from google.cloud import firestore from google.oauth2 import id_token from google.auth.transport import requests as g_requests from api import ( process_ok_exam_upload, is_admin, clear_collection, get_announcements, get_email_from_...
31.844221
88
0.504024
import time from os import getenv from flask import jsonify, abort from google.cloud import firestore from google.oauth2 import id_token from google.auth.transport import requests as g_requests from api import ( process_ok_exam_upload, is_admin, clear_collection, get_announcements, get_email_from_...
true
true
f7206ebe8fad56aa6688ff5f36b4dc7a3840b16f
413
py
Python
backend/app/models/user.py
Infam852/IoT-project
673d8a96676e046331550b9c16c0610de5733f73
[ "MIT" ]
null
null
null
backend/app/models/user.py
Infam852/IoT-project
673d8a96676e046331550b9c16c0610de5733f73
[ "MIT" ]
null
null
null
backend/app/models/user.py
Infam852/IoT-project
673d8a96676e046331550b9c16c0610de5733f73
[ "MIT" ]
1
2021-12-18T19:33:01.000Z
2021-12-18T19:33:01.000Z
from sqlalchemy import Column, Integer, ForeignKey, DateTime from sqlalchemy.sql.sqltypes import Boolean, String from app.db.database import Base class UserModel(Base): __tablename__ = "users" id = Column(Integer, primary_key=True, index=True) username = Column(String, nullable=False, index=True) di...
29.5
60
0.755448
from sqlalchemy import Column, Integer, ForeignKey, DateTime from sqlalchemy.sql.sqltypes import Boolean, String from app.db.database import Base class UserModel(Base): __tablename__ = "users" id = Column(Integer, primary_key=True, index=True) username = Column(String, nullable=False, index=True) di...
true
true
f7206ec0c3d11ce24235924a1f5bf4631efd543f
1,715
py
Python
tools/generate_taint_models/tests/get_exit_nodes_test.py
rvantonder/pyre-check-1
600ec9656ece5fff21598f4248c55089714bf590
[ "MIT" ]
null
null
null
tools/generate_taint_models/tests/get_exit_nodes_test.py
rvantonder/pyre-check-1
600ec9656ece5fff21598f4248c55089714bf590
[ "MIT" ]
null
null
null
tools/generate_taint_models/tests/get_exit_nodes_test.py
rvantonder/pyre-check-1
600ec9656ece5fff21598f4248c55089714bf590
[ "MIT" ]
null
null
null
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import unittest from typing import Callable from ..get_exit_nodes import ExitNodeGenerator from ..model_generator import Configuration from .test_f...
41.829268
81
0.549271
import unittest from typing import Callable from ..get_exit_nodes import ExitNodeGenerator from ..model_generator import Configuration from .test_functions import __name__ as qualifier, all_functions class GetExitNodesTest(unittest.TestCase): def test_compute_models(self): sink = "TaintSink[Returned...
true
true
f7206f20aeb3af06e52189f7a1589c4376b4e9c4
1,677
py
Python
09.py
Michanix/Algorithms-Intro-Course
c81fa38b05199a42eaeb48567447ee3f6b1e535e
[ "MIT" ]
null
null
null
09.py
Michanix/Algorithms-Intro-Course
c81fa38b05199a42eaeb48567447ee3f6b1e535e
[ "MIT" ]
null
null
null
09.py
Michanix/Algorithms-Intro-Course
c81fa38b05199a42eaeb48567447ee3f6b1e535e
[ "MIT" ]
null
null
null
from random import randrange from time import time def bubble_sort(arr): for i in range(len(arr)): for j in range(len(arr)-1, i, -1): if arr[j] < arr[j-1]: # меняем элементы местами arr[j], arr[j-1] = arr[j-1], arr[j] return arr def opt_bubble_sort(arr): ...
26.203125
117
0.603459
from random import randrange from time import time def bubble_sort(arr): for i in range(len(arr)): for j in range(len(arr)-1, i, -1): if arr[j] < arr[j-1]: arr[j], arr[j-1] = arr[j-1], arr[j] return arr def opt_bubble_sort(arr): while True: sw...
true
true
f72071c15f22bdfc2b6d13e6fb45864f32d756e1
5,175
py
Python
nay/scrape_nominate_movie.py
kondounagi/japanese_movies_dataset
349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e
[ "MIT" ]
1
2019-08-05T21:43:09.000Z
2019-08-05T21:43:09.000Z
nay/scrape_nominate_movie.py
kondounagi/japanese_movies_dataset
349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e
[ "MIT" ]
3
2020-03-31T05:53:37.000Z
2021-12-13T20:07:39.000Z
nay/scrape_nominate_movie.py
kondounagi/japanese_movies_dataset
349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e
[ "MIT" ]
null
null
null
import re import sys import json import requests from bs4 import BeautifulSoup def scrape_nominate_movie(year): film_index = "https://eiga.com/movie/" re_time = re.compile(r"/\d*分/") re_production_studio = re.compile(r"配給:[^<]*") re_title = re.compile(r"映画「[^」]*」") re_date = re.compile(r"\d*年\d*月...
32.753165
104
0.465507
import re import sys import json import requests from bs4 import BeautifulSoup def scrape_nominate_movie(year): film_index = "https://eiga.com/movie/" re_time = re.compile(r"/\d*分/") re_production_studio = re.compile(r"配給:[^<]*") re_title = re.compile(r"映画「[^」]*」") re_date = re.compile(r"\d*年\d*月...
true
true
f72073fa7cc1e6f079942989602618bed6ed1f0a
9,216
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_available_private_endpoint_types_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_available_private_endpoint_types_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_available_private_endpoint_types_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.761905
210
0.659397
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
f72076a759856b30a8e2638c441c193c5f2894fe
3,023
py
Python
rally_openstack/scenarios/gnocchi/archive_policy.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
null
null
null
rally_openstack/scenarios/gnocchi/archive_policy.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
null
null
null
rally_openstack/scenarios/gnocchi/archive_policy.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
1
2018-12-10T12:31:27.000Z
2018-12-10T12:31:27.000Z
# Copyright 2017 Red Hat, Inc. <http://www.redhat.com> # # 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 b...
38.75641
78
0.7261
from rally.task import validation from rally_openstack import consts from rally_openstack import scenario from rally_openstack.scenarios.gnocchi import utils as gnocchiutils @validation.add("required_services", services=[consts.Service.GNOCCHI]) @validation.add("required_platform", platform="openstac...
true
true
f720771fafd95ebfe23bca7f24afc2f571e9f07b
51,158
py
Python
tests/test_dataset.py
jenhaoyang/datumaro
add81ddb59502362fa65fa07e5bc4d8c9f61afde
[ "MIT" ]
null
null
null
tests/test_dataset.py
jenhaoyang/datumaro
add81ddb59502362fa65fa07e5bc4d8c9f61afde
[ "MIT" ]
null
null
null
tests/test_dataset.py
jenhaoyang/datumaro
add81ddb59502362fa65fa07e5bc4d8c9f61afde
[ "MIT" ]
1
2021-12-15T22:15:59.000Z
2021-12-15T22:15:59.000Z
from unittest import TestCase import os import os.path as osp import numpy as np from datumaro.components.annotation import ( AnnotationType, Bbox, Caption, Label, LabelCategories, Mask, Points, Polygon, PolyLine, ) from datumaro.components.converter import Converter from datumaro.components.dataset import ( ...
33.371168
81
0.572403
from unittest import TestCase import os import os.path as osp import numpy as np from datumaro.components.annotation import ( AnnotationType, Bbox, Caption, Label, LabelCategories, Mask, Points, Polygon, PolyLine, ) from datumaro.components.converter import Converter from datumaro.components.dataset import ( ...
true
true
f720773382e2af71b9b530986df7d022a800c635
4,874
py
Python
protoseg/report.py
chriamue/protoseg
4ddc7d613aadcb9d25b5773eff688214349ab23f
[ "MIT" ]
null
null
null
protoseg/report.py
chriamue/protoseg
4ddc7d613aadcb9d25b5773eff688214349ab23f
[ "MIT" ]
null
null
null
protoseg/report.py
chriamue/protoseg
4ddc7d613aadcb9d25b5773eff688214349ab23f
[ "MIT" ]
1
2020-03-30T07:10:54.000Z
2020-03-30T07:10:54.000Z
import os import numpy as np import cv2 import json import pandas as pd import tensorflow as tf from tensorboard.backend.event_processing import event_accumulator as ea from matplotlib import pyplot as plt from matplotlib import colors as colors from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCan...
35.318841
90
0.560936
import os import numpy as np import cv2 import json import pandas as pd import tensorflow as tf from tensorboard.backend.event_processing import event_accumulator as ea from matplotlib import pyplot as plt from matplotlib import colors as colors from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCan...
true
true
f72077cdf636f62c3c764ed25b75858a0cc4d91d
434
py
Python
data/scripts/templates/object/mobile/shared_giant_veermok.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/mobile/shared_giant_veermok.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/mobile/shared_giant_veermok.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_giant_veermok.iff" result.attribute_template_id = 9 result.st...
25.529412
59
0.723502
true
true
f72077d78671f48577f3268c91b0668f5686d755
214
py
Python
Linguagens/Python/Exercicios/cursos_em_video/aulas-01_a_21/012.py
rafaelvizu/Estudos
eef5e3e3706ff99959226c51b9907b6af4377bfe
[ "MIT" ]
null
null
null
Linguagens/Python/Exercicios/cursos_em_video/aulas-01_a_21/012.py
rafaelvizu/Estudos
eef5e3e3706ff99959226c51b9907b6af4377bfe
[ "MIT" ]
null
null
null
Linguagens/Python/Exercicios/cursos_em_video/aulas-01_a_21/012.py
rafaelvizu/Estudos
eef5e3e3706ff99959226c51b9907b6af4377bfe
[ "MIT" ]
null
null
null
print('Exercício Python #012 - Calculando Descontos') a6 = float(input('Preço: ')) b6 = int(input('Desconto:')) c6 = a6 * b6 / 100 d6 = a6 - c6 print(' O valor com o desconto de {} % é de {} Reais '.format(b6, d6))
35.666667
70
0.630841
print('Exercício Python #012 - Calculando Descontos') a6 = float(input('Preço: ')) b6 = int(input('Desconto:')) c6 = a6 * b6 / 100 d6 = a6 - c6 print(' O valor com o desconto de {} % é de {} Reais '.format(b6, d6))
true
true
f720787fc556e48c6de48c95c2046dbcd33827a9
26,887
py
Python
dask_kubernetes/classic/kubecluster.py
Matt711/dask-kubernetes
8190529fc140b6ea2c345bde02aa1c647272eb98
[ "BSD-3-Clause" ]
1
2022-01-20T12:38:27.000Z
2022-01-20T12:38:27.000Z
dask_kubernetes/classic/kubecluster.py
Matt711/dask-kubernetes
8190529fc140b6ea2c345bde02aa1c647272eb98
[ "BSD-3-Clause" ]
null
null
null
dask_kubernetes/classic/kubecluster.py
Matt711/dask-kubernetes
8190529fc140b6ea2c345bde02aa1c647272eb98
[ "BSD-3-Clause" ]
null
null
null
import asyncio import copy import getpass import logging import os import time import uuid import warnings import yaml import dask import dask.distributed import distributed.security from distributed.deploy import SpecCluster, ProcessInterface from distributed.utils import Log, Logs import kubernetes_asyncio as kubern...
36.481682
115
0.609886
import asyncio import copy import getpass import logging import os import time import uuid import warnings import yaml import dask import dask.distributed import distributed.security from distributed.deploy import SpecCluster, ProcessInterface from distributed.utils import Log, Logs import kubernetes_asyncio as kubern...
true
true
f720789c8c15c24400e6e5290d6e30a895646242
7,694
py
Python
rfmizer/tests_views.py
JunglistMNSQ/rfm
f42fa1424edbc9c57c9cd27d8183574f72acbf5c
[ "BSD-3-Clause" ]
null
null
null
rfmizer/tests_views.py
JunglistMNSQ/rfm
f42fa1424edbc9c57c9cd27d8183574f72acbf5c
[ "BSD-3-Clause" ]
4
2021-06-04T23:58:19.000Z
2021-09-22T19:38:00.000Z
rfmizer/tests_views.py
JunglistMNSQ/rfm
f42fa1424edbc9c57c9cd27d8183574f72acbf5c
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django.urls import reverse from unittest import mock from .fixtures import FixturesMixin from .models import Person, Tab, User import hashlib # Create your tests here. class TestRegister(FixturesMixin, TestCase): def test_create_and_login(self): self.client.post('/r...
38.089109
71
0.525214
from django.test import TestCase from django.urls import reverse from unittest import mock from .fixtures import FixturesMixin from .models import Person, Tab, User import hashlib class TestRegister(FixturesMixin, TestCase): def test_create_and_login(self): self.client.post('/register/', ...
true
true
f72078f20b5cc5766f8c851d62a5d4fcbc04c993
13
py
Python
python/testData/inspections/PyUnresolvedReferencesInspection/ImportToContainingFileInPackage/p1/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/ImportToContainingFileInPackage/p1/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/ImportToContainingFileInPackage/p1/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
import p1.m1
6.5
12
0.769231
import p1.m1
true
true
f72079009d9d6b4d0c1dd53f8c56f7204272da9b
1,527
py
Python
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/st7735r_minitft_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/st7735r_minitft_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/st7735r_minitft_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
""" This test will initialize the display using displayio and draw a solid green background, a smaller purple rectangle, and some yellow text. """ import board import terminalio import displayio from adafruit_display_text import label from adafruit_st7735r import ST7735R # Release any resources currently i...
28.277778
86
0.749836
import board import terminalio import displayio from adafruit_display_text import label from adafruit_st7735r import ST7735R displayio.release_displays() spi = board.SPI() tft_cs = board.D5 tft_dc = board.D6 display_bus = displayio.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=board.D9...
true
true
f7207935c2b023e55a08f2a1a9a84c47dc130d71
16,613
py
Python
model/model.py
sahara2001/editsql
d4325ac996d1ed0069def6d349e43e2a1914e761
[ "MIT" ]
null
null
null
model/model.py
sahara2001/editsql
d4325ac996d1ed0069def6d349e43e2a1914e761
[ "MIT" ]
null
null
null
model/model.py
sahara2001/editsql
d4325ac996d1ed0069def6d349e43e2a1914e761
[ "MIT" ]
null
null
null
""" Class for the Sequence to sequence model for ATIS.""" import os import torch import torch.nn.functional as F from . import torch_utils from . import utils_bert from data_util.vocabulary import DEL_TOK, UNK_TOK from .encoder import Encoder, Encoder_Gnn from .embedder import Embedder from .token_predictor import ...
41.325871
226
0.618612
import os import torch import torch.nn.functional as F from . import torch_utils from . import utils_bert from data_util.vocabulary import DEL_TOK, UNK_TOK from .encoder import Encoder, Encoder_Gnn from .embedder import Embedder from .token_predictor import construct_token_predictor import numpy as np from data_u...
true
true
f7207971f79f86b58e5d4a4b9ee3f1c8c602689e
1,890
py
Python
MNISTT.py
ankit9437/MNIST
bf620e7779a5383c2ad87cf89cd11651963bd7c5
[ "MIT" ]
null
null
null
MNISTT.py
ankit9437/MNIST
bf620e7779a5383c2ad87cf89cd11651963bd7c5
[ "MIT" ]
null
null
null
MNISTT.py
ankit9437/MNIST
bf620e7779a5383c2ad87cf89cd11651963bd7c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Dec 15 10:58:44 2019 @author: DELL """ from __future__ import print_function, division import numpy as np import pandas as pd import matplotlib.pyplot as plt def d(u, v): diff = u - v return diff.dot(diff) def get_data(limit=None): prin...
21.976744
77
0.539153
from __future__ import print_function, division import numpy as np import pandas as pd import matplotlib.pyplot as plt def d(u, v): diff = u - v return diff.dot(diff) def get_data(limit=None): print("Reading in and transforming data...") df = pd.read_csv('train.csv') data = ...
true
true
f72079f7da23aae91f56118b998102076ab9cb85
5,205
py
Python
email-finder.py
shivangraikar/Twitter-Data-Mining-For-Targeted-Marketing
d12fe807187d438041b4497cbb82ad9ef14d4dbf
[ "MIT" ]
5
2021-02-25T12:10:02.000Z
2021-11-13T04:03:42.000Z
email-finder.py
shivangraikar/Twitter-Data-Mining-For-Targeted-Marketing
d12fe807187d438041b4497cbb82ad9ef14d4dbf
[ "MIT" ]
null
null
null
email-finder.py
shivangraikar/Twitter-Data-Mining-For-Targeted-Marketing
d12fe807187d438041b4497cbb82ad9ef14d4dbf
[ "MIT" ]
3
2021-02-25T12:10:06.000Z
2021-03-21T20:26:15.000Z
import string import time import threading import urllib import re import io import sys from time import sleep import pickle import pandas as pd import psycopg2 def formats(first, middle, last, domain): """ Create a list of 30 possible email formats combining: - First name: [empty] | Full | Init...
36.65493
136
0.529491
import string import time import threading import urllib import re import io import sys from time import sleep import pickle import pandas as pd import psycopg2 def formats(first, middle, last, domain): list = [] if len(last)==0: list.append(first + '@' + domain) else: ...
true
true
f7207a2b951aa4caf689bd23c876ef2c79f64116
22,958
py
Python
lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
Boring-Mind/DjangoGirls1
54ac8f01d12785470fd5a4ece759206639997122
[ "Apache-2.0" ]
304
2015-01-06T18:02:49.000Z
2021-12-11T18:08:37.000Z
lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
Boring-Mind/DjangoGirls1
54ac8f01d12785470fd5a4ece759206639997122
[ "Apache-2.0" ]
123
2019-09-10T14:48:01.000Z
2019-11-28T21:24:06.000Z
virtual/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py
Krasivaya/Tracks
c18d1c9222dff39e4678d44495a8a7d9434339ff
[ "MIT" ]
41
2015-04-11T14:58:02.000Z
2021-11-13T20:47:58.000Z
""" SQLite backend for the sqlite3 module in the standard library. """ import datetime import decimal import functools import math import operator import re import statistics import warnings from itertools import chain from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyCon...
40.923351
115
0.619828
import datetime import decimal import functools import math import operator import re import statistics import warnings from itertools import chain from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyConfigured from django.db import utils from django.db.backends import util...
true
true
f7207bb8de11f352cd6af90099062c5d0ac72db3
2,345
py
Python
tests/ccapi/test__attr__.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
9
2020-05-12T08:16:35.000Z
2022-01-06T03:22:18.000Z
tests/ccapi/test__attr__.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
3
2020-10-14T16:29:24.000Z
2021-10-04T07:24:34.000Z
tests/ccapi/test__attr__.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
1
2019-12-30T23:13:46.000Z
2019-12-30T23:13:46.000Z
# imports - standard imports import os.path as osp import subprocess # imports - test imports import pytest # imports - module imports from ccapi.__attr__ import ( read, pardir, strip, safe_decode, sequence_filter, get_revision ) def call(*args, **kwargs): subprocess.call(args, **kwargs) ...
26.055556
99
0.620469
import os.path as osp import subprocess import pytest from ccapi.__attr__ import ( read, pardir, strip, safe_decode, sequence_filter, get_revision ) def call(*args, **kwargs): subprocess.call(args, **kwargs) def test_read(tmpdir): directory = tmpdir.mkdir("tmp") tempfile = di...
true
true
f7207db9c00de82d099854acdd08b0a2728247b5
1,679
py
Python
genderPredictScript.py
ganesh2583/Python-Data_Science
233586491d3863176a008b938b0946c472940a6d
[ "MIT" ]
null
null
null
genderPredictScript.py
ganesh2583/Python-Data_Science
233586491d3863176a008b938b0946c472940a6d
[ "MIT" ]
null
null
null
genderPredictScript.py
ganesh2583/Python-Data_Science
233586491d3863176a008b938b0946c472940a6d
[ "MIT" ]
null
null
null
from sklearn import tree from sklearn import neighbors from sklearn import gaussian_process #[height, weight, shoe size] X = [[181,80,10],[161,70,6],[171,66,7],[176,88,7],[189,100,8],[141,80,5],[156,78,6],[161,50,6],[171,60,7],[151,78,7],[171,40,7]] #Gender Y = ['male','male','male','male','male','female','female','fe...
29.45614
128
0.805837
from sklearn import tree from sklearn import neighbors from sklearn import gaussian_process X = [[181,80,10],[161,70,6],[171,66,7],[176,88,7],[189,100,8],[141,80,5],[156,78,6],[161,50,6],[171,60,7],[151,78,7],[171,40,7]] Y = ['male','male','male','male','male','female','female','female','female','female','female'] ...
true
true
f7207ef7a8d650d8bd9ead304e0f30c6f37038f4
366
py
Python
main.py
zruss11/Nike-InboxCheck
5e3be689797a8d861e4894b1df4bd6ed8f1066e8
[ "MIT" ]
11
2017-09-09T03:47:18.000Z
2019-11-15T14:12:51.000Z
main.py
zruss11/Nike-InboxCheck
5e3be689797a8d861e4894b1df4bd6ed8f1066e8
[ "MIT" ]
null
null
null
main.py
zruss11/Nike-InboxCheck
5e3be689797a8d861e4894b1df4bd6ed8f1066e8
[ "MIT" ]
5
2017-09-09T03:48:07.000Z
2020-07-04T00:59:01.000Z
import requests from classes.login import Login from classes.logger import logger log = logger().log with open('config/accounts.txt') as accounts_file: accounts = accounts_file.read().splitlines() def run(x): req = requests.Session() log("{} Attempting Login".format(x.split(':')[0])) l = Login(req)...
19.263158
54
0.674863
import requests from classes.login import Login from classes.logger import logger log = logger().log with open('config/accounts.txt') as accounts_file: accounts = accounts_file.read().splitlines() def run(x): req = requests.Session() log("{} Attempting Login".format(x.split(':')[0])) l = Login(req)...
true
true
f7207f32e150c7bc0ac42fe89ad3f6575a482a24
2,502
py
Python
google/cloud/bigquery/_http.py
msuozzo/python-bigquery
dcb8728c12f5ab0d7809a1b6cf72755dff973772
[ "Apache-2.0" ]
384
2020-02-07T06:39:26.000Z
2022-03-30T18:25:50.000Z
google/cloud/bigquery/_http.py
msuozzo/python-bigquery
dcb8728c12f5ab0d7809a1b6cf72755dff973772
[ "Apache-2.0" ]
770
2020-02-04T10:46:40.000Z
2022-03-31T15:12:19.000Z
google/cloud/bigquery/_http.py
msuozzo/python-bigquery
dcb8728c12f5ab0d7809a1b6cf72755dff973772
[ "Apache-2.0" ]
177
2020-02-06T05:24:31.000Z
2022-03-25T18:51:36.000Z
# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
41.7
109
0.742606
import os import pkg_resources from google.cloud import _http port __version__ if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE") == "true": release = pkg_resources.get_distribution("google-cloud-core").parsed_version if release < pkg_resources.parse_version("1.6.0"): raise Import...
true
true
f720804843b0cf052334ea5fd31c198aa77f5bcf
51,935
py
Python
tests/test_catalina_10_15_7.py
RhetTbull/osxphotos
0e9b9d625190b94c1dd68276e3b0e5367002d87c
[ "MIT" ]
656
2019-08-14T14:10:44.000Z
2022-03-28T15:25:42.000Z
tests/test_catalina_10_15_7.py
RhetTbull/osxphotos
0e9b9d625190b94c1dd68276e3b0e5367002d87c
[ "MIT" ]
557
2019-10-14T19:00:02.000Z
2022-03-28T00:48:30.000Z
tests/test_catalina_10_15_7.py
RhetTbull/osxphotos
0e9b9d625190b94c1dd68276e3b0e5367002d87c
[ "MIT" ]
58
2019-12-27T01:39:33.000Z
2022-02-26T22:18:49.000Z
""" Basic tests for Photos 5 on MacOS 10.15.7 """ import datetime import os import os.path import pathlib import sqlite3 import tempfile import time from collections import Counter, namedtuple import pytest import osxphotos from osxphotos._constants import _UNKNOWN_PERSON from osxphotos.utils import _get_os_version ...
35.596299
7,228
0.694772
import datetime import os import os.path import pathlib import sqlite3 import tempfile import time from collections import Counter, namedtuple import pytest import osxphotos from osxphotos._constants import _UNKNOWN_PERSON from osxphotos.utils import _get_os_version OS_VERSION = _get_os_version() SKIP_TEST = "OSXPH...
true
true
f720807430145448da0dda4234ceca5a1f6435e7
255
py
Python
problems/013.py
JoshKarpel/Euler
9c4a89cfe4b0114d84a82e2b2894c7b8af815e93
[ "MIT" ]
1
2017-09-20T22:26:24.000Z
2017-09-20T22:26:24.000Z
problems/013.py
JoshKarpel/euler-python
9c4a89cfe4b0114d84a82e2b2894c7b8af815e93
[ "MIT" ]
null
null
null
problems/013.py
JoshKarpel/euler-python
9c4a89cfe4b0114d84a82e2b2894c7b8af815e93
[ "MIT" ]
null
null
null
import os def solve(): filepath = os.path.join(os.path.dirname(__file__), '013_numbers.txt') with open(filepath) as f: numbers = [int(x) for x in f] return int(str(sum(numbers))[:10]) if __name__ == '__main__': print(solve())
18.214286
73
0.619608
import os def solve(): filepath = os.path.join(os.path.dirname(__file__), '013_numbers.txt') with open(filepath) as f: numbers = [int(x) for x in f] return int(str(sum(numbers))[:10]) if __name__ == '__main__': print(solve())
true
true
f7208121384b71d9a38bf011097a42030c385a61
798
py
Python
app/ngrok.py
nnsnodnb/line-bot-django-handle
27d0e29b674831eac8068124f6445d0698968f40
[ "Apache-2.0" ]
null
null
null
app/ngrok.py
nnsnodnb/line-bot-django-handle
27d0e29b674831eac8068124f6445d0698968f40
[ "Apache-2.0" ]
1
2020-06-05T18:48:36.000Z
2020-06-05T18:48:36.000Z
app/ngrok.py
nnsnodnb/line-bot-django-handle
27d0e29b674831eac8068124f6445d0698968f40
[ "Apache-2.0" ]
null
null
null
from django.conf import settings import requests import socket BASE_HOST = '127.0.0.1' PORT = 4040 class Ngrok(object): def __init__(self, port=PORT, *args, **kwargs): super(Ngrok, self).__init__(*args, **kwargs) self.port = port self._check_launch_ngrok() def _check_launch_ngrok(s...
24.9375
85
0.630326
from django.conf import settings import requests import socket BASE_HOST = '127.0.0.1' PORT = 4040 class Ngrok(object): def __init__(self, port=PORT, *args, **kwargs): super(Ngrok, self).__init__(*args, **kwargs) self.port = port self._check_launch_ngrok() def _check_launch_ngrok(s...
true
true
f720816e82bbc8f3addb15db8bbee82d4cadc5e1
811
py
Python
scipy/sparse/data.py
lorentzenchr/scipy
393a05ee927883ad6316b7092c851afea8f16816
[ "BSD-3-Clause" ]
9,095
2015-01-02T18:24:23.000Z
2022-03-31T20:35:31.000Z
scipy/sparse/data.py
lorentzenchr/scipy
393a05ee927883ad6316b7092c851afea8f16816
[ "BSD-3-Clause" ]
11,500
2015-01-01T01:15:30.000Z
2022-03-31T23:07:35.000Z
scipy/sparse/data.py
lorentzenchr/scipy
393a05ee927883ad6316b7092c851afea8f16816
[ "BSD-3-Clause" ]
5,838
2015-01-05T11:56:42.000Z
2022-03-31T23:21:19.000Z
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.sparse` namespace for importing the functions # included below. import warnings from . import _data __all__ = [ # noqa: F822 'isscalarlike', 'matrix', 'name', 'npfunc', 'spmatrix', 'validateaxis', ]...
23.852941
76
0.641184
import warnings from . import _data __all__ = [ 'isscalarlike', 'matrix', 'name', 'npfunc', 'spmatrix', 'validateaxis', ] def __dir__(): return __all__ def __getattr__(name): if name not in __all__: raise AttributeError( "scipy.sparse.data is deprecated an...
true
true
f72081ae67b5d48042132e9f4744873649364661
5,831
py
Python
idatasets/datasets/util.py
rahul1990gupta/indic-nlp-datasets
4d0935b194263579b9653cf8c3d4ecdd17af687d
[ "MIT" ]
1
2020-08-16T11:44:37.000Z
2020-08-16T11:44:37.000Z
idatasets/datasets/util.py
rahul1990gupta/indic-nlp-datasets
4d0935b194263579b9653cf8c3d4ecdd17af687d
[ "MIT" ]
2
2020-08-16T05:23:43.000Z
2020-10-21T06:59:15.000Z
idatasets/datasets/util.py
rahul1990gupta/indic-nlp-datasets
4d0935b194263579b9653cf8c3d4ecdd17af687d
[ "MIT" ]
2
2021-06-13T05:40:26.000Z
2022-02-05T15:53:23.000Z
import os from urllib.error import URLError, HTTPError from urllib.request import urlretrieve import tqdm import tarfile import zipfile import shutil import ssl ssl._create_default_https_context = ssl._create_unverified_context def download_file( origin: str, cache_subdir: str = "datasets") -> str: fn...
31.690217
87
0.575373
import os from urllib.error import URLError, HTTPError from urllib.request import urlretrieve import tqdm import tarfile import zipfile import shutil import ssl ssl._create_default_https_context = ssl._create_unverified_context def download_file( origin: str, cache_subdir: str = "datasets") -> str: fn...
true
true
f72082ade0aa616c87208ff39d48373868d15c94
1,030
py
Python
api/client/test/test_api_list_pipelines_response.py
krishnakumar27/mlx
dce67d58dffa24ca7a6a4d6b5fd8d4eb94e35215
[ "Apache-2.0" ]
98
2021-05-03T23:27:53.000Z
2022-03-13T02:29:12.000Z
api/client/test/test_api_list_pipelines_response.py
krishnakumar27/mlx
dce67d58dffa24ca7a6a4d6b5fd8d4eb94e35215
[ "Apache-2.0" ]
296
2021-05-03T22:44:26.000Z
2022-03-31T11:50:16.000Z
api/client/test/test_api_list_pipelines_response.py
krishnakumar27/mlx
dce67d58dffa24ca7a6a4d6b5fd8d4eb94e35215
[ "Apache-2.0" ]
38
2021-05-03T22:52:59.000Z
2022-03-31T03:58:34.000Z
# Copyright 2021 The MLX Contributors # # SPDX-License-Identifier: Apache-2.0 # coding: utf-8 """ MLX API MLX API Extension for Kubeflow Pipelines # noqa: E501 OpenAPI spec version: 0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_impo...
23.409091
108
0.729126
from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.api_list_pipelines_response import ApiListPipelinesResponse from swagger_client.rest import ApiException class TestApiListPipelinesResponse(unittest.TestCase): def setUp(self): pass def...
true
true
f72082bda44b211831ca8f51067e919a7b88a005
29,302
py
Python
stable_baselines/trpo_mpi/trpo_mpi.py
Ow-woo/stable-baselines
ece376f62b0eaa3b58e90593b7db5fb9de3d82c5
[ "MIT" ]
3
2020-04-14T15:28:02.000Z
2020-09-23T00:55:48.000Z
stable_baselines/trpo_mpi/trpo_mpi.py
Ow-woo/stable-baselines
ece376f62b0eaa3b58e90593b7db5fb9de3d82c5
[ "MIT" ]
1
2019-10-30T07:31:52.000Z
2019-10-30T07:31:52.000Z
stable_baselines/trpo_mpi/trpo_mpi.py
Ow-woo/stable-baselines
ece376f62b0eaa3b58e90593b7db5fb9de3d82c5
[ "MIT" ]
7
2019-10-01T05:49:22.000Z
2021-12-24T07:11:55.000Z
import time from contextlib import contextmanager from collections import deque import gym from mpi4py import MPI import tensorflow as tf import numpy as np import stable_baselines.common.tf_util as tf_util from stable_baselines.common.tf_util import total_episode_reward_logger from stable_baselines.common import exp...
54.162662
121
0.524742
import time from contextlib import contextmanager from collections import deque import gym from mpi4py import MPI import tensorflow as tf import numpy as np import stable_baselines.common.tf_util as tf_util from stable_baselines.common.tf_util import total_episode_reward_logger from stable_baselines.common import exp...
true
true
f720830ef2390c7f939ff23286a68aa2ce3b6879
6,591
py
Python
mslib/msui/qt5/ui_topview_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/msui/qt5/ui_topview_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/msui/qt5/ui_topview_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mslib/msui/ui/ui_topview_window.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_TopViewWindow(object): def setupUi(self, Top...
58.327434
122
0.739645
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_TopViewWindow(object): def setupUi(self, TopViewWindow): TopViewWindow.setObjectName("TopViewWindow") TopViewWindow.resize(952, 782) self.centralwidget = QtWidgets.QWidget(TopViewWindow) self.centralwidget.setObjectName("ce...
true
true
f720841a7564a5f85416ab65a54983fa155787e0
282
py
Python
Seguranca/Ping/pingmultiplo.py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
1
2022-03-24T21:30:53.000Z
2022-03-24T21:30:53.000Z
Seguranca-com-python/Ping/pingmultiplo.py
Luis12368/Bootcamp-Cognizant-Cloud-Data-Engineer
789216a6fa76e4cb1336a73ed861bcf2e9d03751
[ "MIT" ]
null
null
null
Seguranca-com-python/Ping/pingmultiplo.py
Luis12368/Bootcamp-Cognizant-Cloud-Data-Engineer
789216a6fa76e4cb1336a73ed861bcf2e9d03751
[ "MIT" ]
null
null
null
import os import time with open('hosts.txt') as file: dump = file.read() dump = dump.splitlines() for ip in dump: print("Verificando o IP", ip) print("-" * 60) os.system('ping -n 2 {}'.format(ip)) print("-" * 60) time.sleep(5)
18.8
44
0.524823
import os import time with open('hosts.txt') as file: dump = file.read() dump = dump.splitlines() for ip in dump: print("Verificando o IP", ip) print("-" * 60) os.system('ping -n 2 {}'.format(ip)) print("-" * 60) time.sleep(5)
true
true
f72084785a53b5effc7e214a1463c10da25fda6e
58,018
py
Python
salt/utils/schema.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
2
2018-11-08T02:59:24.000Z
2021-01-04T00:30:50.000Z
salt/utils/schema.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
4
2020-09-04T10:19:34.000Z
2020-11-09T12:55:59.000Z
salt/utils/schema.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
5
2017-06-16T23:48:13.000Z
2021-04-08T17:43:48.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Pedro Algarvio (pedro@algarvio.me) :codeauthor: Alexandru Bleotu (alexandru.bleotu@morganstanley.com) salt.utils.schema ~~~~~~~~~~~~~~~~~ Object Oriented Configuration - JSON Schema compatible generator This code was inspired by `jsl`__, "A Python DSL...
36.466373
122
0.561688
from __future__ import absolute_import, print_function, unicode_literals import sys import inspect import textwrap import functools import salt.utils.args from salt.utils.odict import OrderedDict from salt.ext import six BASE_SCHEMA_URL = 'https://non-existing.saltstack.com/schemas' RENDER_COMMENT_YAML_MAX_LINE...
true
true
f720868bb7566cf137aaa7665b5dbd671fef24fb
2,738
py
Python
skfem/element/element_tet/element_tet_p2.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element_tet/element_tet_p2.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element_tet/element_tet_p2.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from ..element_h1 import ElementH1 class ElementTetP2(ElementH1): nodal_dofs = 1 edge_dofs = 1 dim = 3 maxdeg = 2 dofnames = ['u', 'u'] doflocs = np.array([[0., 0., 0.], [1., 0., 0.], [0., 1., 0.], [0., ...
27.38
62
0.233382
import numpy as np from ..element_h1 import ElementH1 class ElementTetP2(ElementH1): nodal_dofs = 1 edge_dofs = 1 dim = 3 maxdeg = 2 dofnames = ['u', 'u'] doflocs = np.array([[0., 0., 0.], [1., 0., 0.], [0., 1., 0.], [0., ...
true
true
f720884f949f265d08ef7c4e59ff5312172239dc
5,043
py
Python
back/Hera/utils.py
pingPoltergeist/Hera
519336cebbcf14ff3da6299e946407788121a0b7
[ "MIT" ]
1
2021-12-09T11:37:20.000Z
2021-12-09T11:37:20.000Z
back/Hera/utils.py
pingPoltergeist/Hera
519336cebbcf14ff3da6299e946407788121a0b7
[ "MIT" ]
1
2021-11-05T09:14:50.000Z
2021-11-05T09:14:50.000Z
back/Hera/utils.py
pingPoltergeist/Hera
519336cebbcf14ff3da6299e946407788121a0b7
[ "MIT" ]
2
2022-01-13T15:12:36.000Z
2022-03-10T01:35:25.000Z
import traceback from pathlib import Path import hashlib import yaml def get_media_dirs(media_dir_stream): result = dict() movie_dir_map = dict() for media_location in media_dir_stream[0].replace('\n', '').replace('\r', '').split(','): movie_dir_map[hashlib.md5(media_location.encode('utf-8')).hexd...
39.398438
112
0.584969
import traceback from pathlib import Path import hashlib import yaml def get_media_dirs(media_dir_stream): result = dict() movie_dir_map = dict() for media_location in media_dir_stream[0].replace('\n', '').replace('\r', '').split(','): movie_dir_map[hashlib.md5(media_location.encode('utf-8')).hexd...
true
true
f7208878a3eceaf4d90f7cc71177db7ce94487d3
6,366
py
Python
son.py
nathanmartins/Son-Of-Anton
d45eec2b9263dbd981f468219c9d0fb049bd481d
[ "MIT" ]
null
null
null
son.py
nathanmartins/Son-Of-Anton
d45eec2b9263dbd981f468219c9d0fb049bd481d
[ "MIT" ]
null
null
null
son.py
nathanmartins/Son-Of-Anton
d45eec2b9263dbd981f468219c9d0fb049bd481d
[ "MIT" ]
null
null
null
import logging import math import os import pickle import re import PIL.Image import numpy as np from mtcnn import MTCNN from numpy import expand_dims from sklearn import preprocessing, neighbors from tensorflow_core.python.keras.models import load_model BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATASET_D...
30.028302
112
0.600377
import logging import math import os import pickle import re import PIL.Image import numpy as np from mtcnn import MTCNN from numpy import expand_dims from sklearn import preprocessing, neighbors from tensorflow_core.python.keras.models import load_model BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATASET_D...
true
true
f72088a05bdf713d0b6f36ecd12b25eb950976d1
12,785
py
Python
raiden/exceptions.py
luehrsFred/raiden
a1b118ebe14badb1acd0744b2d7f2b39f8ba5313
[ "MIT" ]
null
null
null
raiden/exceptions.py
luehrsFred/raiden
a1b118ebe14badb1acd0744b2d7f2b39f8ba5313
[ "MIT" ]
69
2020-07-21T05:49:21.000Z
2022-03-08T18:09:44.000Z
raiden/exceptions.py
luehrsFred/raiden
a1b118ebe14badb1acd0744b2d7f2b39f8ba5313
[ "MIT" ]
null
null
null
""" What do you want from this file? 1. I need to look up when to raise what. Then read on the docstrings. 2. I have to add a new exception. Make sure you catch it somewhere. Sometimes you'll realize you cannot catch it. Especially, if your new exception indicates bug in the Raiden codebase, you are no...
31.882793
97
0.732264
import enum from typing import Any, Dict, List @enum.unique class PFSError(enum.IntEnum): INVALID_REQUEST = 2000 INVALID_SIGNATURE = 2001 REQUEST_OUTDATED = 2002 BAD_IOU = 2100 MISSING_IOU = 2101 WRONG_IOU_RECIPIENT = 2102 IOU_EXPIRED_TOO_EARLY = 2103 INSUFFICIENT_SER...
true
true
f7208908dd0f530934afcd736f133ab23168b854
1,172
py
Python
setup.py
njdanielsen/aws-data-wrangler
5cdb316224370e952dfb3a701825e1b1ab331105
[ "Apache-2.0" ]
null
null
null
setup.py
njdanielsen/aws-data-wrangler
5cdb316224370e952dfb3a701825e1b1ab331105
[ "Apache-2.0" ]
null
null
null
setup.py
njdanielsen/aws-data-wrangler
5cdb316224370e952dfb3a701825e1b1ab331105
[ "Apache-2.0" ]
null
null
null
import os from io import open from typing import Dict from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) about: Dict[str, str] = {} path = os.path.join(here, "awswrangler", "__metadata__.py") with open(file=path, mode="r", encoding="utf-8") as f: exec(f.read(), about) w...
31.675676
73
0.664676
import os from io import open from typing import Dict from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) about: Dict[str, str] = {} path = os.path.join(here, "awswrangler", "__metadata__.py") with open(file=path, mode="r", encoding="utf-8") as f: exec(f.read(), about) w...
true
true
f72089bdffb1bfe66db8bea55840dc0bef158c5f
18,291
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_web_application_firewall_policies_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-05-12T23:29:15.000Z
2020-05-12T23:29:15.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_web_application_firewall_policies_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_web_application_firewall_policies_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
46.780051
199
0.668526
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class WebApplicationFirewallPoliciesOperations(object): models = m...
true
true
f7208a0bce6ed5a17f46fdcb513416605ec0135f
3,249
py
Python
cfgov/v1/models/browse_page.py
atuggle/cfgov-refresh
5a9cfd92b460b9be7befb39f5845abf56857aeac
[ "CC0-1.0" ]
null
null
null
cfgov/v1/models/browse_page.py
atuggle/cfgov-refresh
5a9cfd92b460b9be7befb39f5845abf56857aeac
[ "CC0-1.0" ]
1
2016-09-14T21:11:19.000Z
2016-09-14T21:11:19.000Z
cfgov/v1/models/browse_page.py
atuggle/cfgov-refresh
5a9cfd92b460b9be7befb39f5845abf56857aeac
[ "CC0-1.0" ]
null
null
null
from django.db import models from wagtail.wagtailadmin.edit_handlers import ( FieldPanel, ObjectList, StreamFieldPanel, TabbedInterface ) from wagtail.wagtailcore import blocks from wagtail.wagtailcore.fields import StreamField from wagtail.wagtailcore.models import PageManager from data_research.blocks import ( ...
37.77907
79
0.6996
from django.db import models from wagtail.wagtailadmin.edit_handlers import ( FieldPanel, ObjectList, StreamFieldPanel, TabbedInterface ) from wagtail.wagtailcore import blocks from wagtail.wagtailcore.fields import StreamField from wagtail.wagtailcore.models import PageManager from data_research.blocks import ( ...
true
true
f7208bc906110bb2c8cae40a156edcf4c7547c8c
7,727
py
Python
plugins/opencv/src/opencv/__init__.py
IGx89/scrypted
577b00a090393f31aaa81de67f5fd4555995921a
[ "MIT" ]
null
null
null
plugins/opencv/src/opencv/__init__.py
IGx89/scrypted
577b00a090393f31aaa81de67f5fd4555995921a
[ "MIT" ]
null
null
null
plugins/opencv/src/opencv/__init__.py
IGx89/scrypted
577b00a090393f31aaa81de67f5fd4555995921a
[ "MIT" ]
null
null
null
from __future__ import annotations from time import sleep from detect import DetectionSession, DetectPlugin from typing import Any, List import numpy as np import cv2 import imutils from gi.repository import GLib, Gst from scrypted_sdk.types import ObjectDetectionModel, ObjectDetectionResult, ObjectsDetected class Ope...
38.442786
184
0.608645
from __future__ import annotations from time import sleep from detect import DetectionSession, DetectPlugin from typing import Any, List import numpy as np import cv2 import imutils from gi.repository import GLib, Gst from scrypted_sdk.types import ObjectDetectionModel, ObjectDetectionResult, ObjectsDetected class Ope...
true
true
f7208be42fc87aa1346f3bb00981d1c67e5429aa
1,457
py
Python
manager.py
Hugh-wong/hydra
5f2c4770e655d41d3c535f6e3c29ec4848d5d60e
[ "MIT" ]
3
2017-02-03T01:44:30.000Z
2019-02-27T12:00:00.000Z
manager.py
Hugh-wong/hydra
5f2c4770e655d41d3c535f6e3c29ec4848d5d60e
[ "MIT" ]
null
null
null
manager.py
Hugh-wong/hydra
5f2c4770e655d41d3c535f6e3c29ec4848d5d60e
[ "MIT" ]
1
2021-07-12T07:41:07.000Z
2021-07-12T07:41:07.000Z
# coding=utf-8 import sys import signal import time from multiprocessing import Process from allocator import Allocator, Event class Manager(object): """A manager manage multi allocators, when told to stop, manager would tell the allocator to stop.""" def __init__(self, cfg_list): self.allocator_li...
28.019231
105
0.617021
import sys import signal import time from multiprocessing import Process from allocator import Allocator, Event class Manager(object): def __init__(self, cfg_list): self.allocator_list = [] self.event_list = [] for cfg in cfg_list: event = Event() cfg.update({'p...
true
true
f7208c7f6012bde16b47b8b7a1531f00d2196076
1,084
py
Python
tests/test_creational/test_prototype.py
smartlegionlab/python-patterns
be898272e4358fa2e60ed9f61ce5ed10aa367e77
[ "BSD-3-Clause" ]
2
2021-11-17T21:35:49.000Z
2022-02-09T16:47:20.000Z
tests/test_creational/test_prototype.py
smartlegionlab/python-patterns
be898272e4358fa2e60ed9f61ce5ed10aa367e77
[ "BSD-3-Clause" ]
null
null
null
tests/test_creational/test_prototype.py
smartlegionlab/python-patterns
be898272e4358fa2e60ed9f61ce5ed10aa367e77
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # -------------------------------------------------------- # Licensed under the terms of the BSD 3-Clause License # (see LICENSE for details). # Copyright © 2018-2021, A.A Suvorov # All rights reserved. # -------------------------------------------------------- """Tests prototype.py""" from patt...
33.875
58
0.580258
from patterns.creational.prototype import Bird class TestPrototype: def test_register(self, prototype, bird): prototype.register('Bird', bird) assert 'Bird' in prototype._objects def test_unregister(self, prototype, bird): prototype.register('Bird', bird) prototype.unre...
true
true
f7208ce7bbb8661f4bd13d02bdc81b7510d9775a
195
py
Python
Demo/log/example_log_error_file.py
quecpython/EC100Y-SDK
712c7eb7b54a3971009d94f6d6b21a6011d56f68
[ "MIT" ]
4
2021-01-28T01:30:59.000Z
2021-06-15T07:13:41.000Z
Demo/log/example_log_error_file.py
QuePython/EC100Y-SDK
712c7eb7b54a3971009d94f6d6b21a6011d56f68
[ "MIT" ]
null
null
null
Demo/log/example_log_error_file.py
QuePython/EC100Y-SDK
712c7eb7b54a3971009d94f6d6b21a6011d56f68
[ "MIT" ]
3
2021-04-07T09:55:59.000Z
2022-01-08T15:15:23.000Z
import log log.basicConfig(level=log.ERROR) # 设置日志输出级别 # 获取logger对象,如果不指定name则返回root对象,多次使用相同的name调用getLogger方法返回同一个logger对象 log = log.getLogger("error") log.error("Test error message!!")
21.666667
69
0.784615
import log log.basicConfig(level=log.ERROR) log = log.getLogger("error") log.error("Test error message!!")
true
true
f7208d45b1bd9c79cf4bba8f873334a67415881d
2,026
py
Python
Python3_Data_Structure/32_Python_Amortized_Analysis/00_Python_PAA.py
jmmedel/Python3-Data-Structure-References
3a607da2b67b5b80810d7084339e0602288c4f6b
[ "MIT" ]
null
null
null
Python3_Data_Structure/32_Python_Amortized_Analysis/00_Python_PAA.py
jmmedel/Python3-Data-Structure-References
3a607da2b67b5b80810d7084339e0602288c4f6b
[ "MIT" ]
null
null
null
Python3_Data_Structure/32_Python_Amortized_Analysis/00_Python_PAA.py
jmmedel/Python3-Data-Structure-References
3a607da2b67b5b80810d7084339e0602288c4f6b
[ "MIT" ]
null
null
null
""" Python - Amortized Analysis Amortized analysis involves estimating the run time for the sequence of operations in a program without taking into consideration the span of the data distribution in the input values. A simple example is finding a value in a sorted list is quicker than in an unsorted list. If the l...
106.631579
595
0.80306
true
true
f7208d73df1d4b1e754b10c36ce77d84bdc0b130
7,009
py
Python
loadgen/generate_load.py
hythloda/ecommerce-demo
83d23475677d546db59879452f3e388581ab88de
[ "Apache-2.0" ]
null
null
null
loadgen/generate_load.py
hythloda/ecommerce-demo
83d23475677d546db59879452f3e388581ab88de
[ "Apache-2.0" ]
null
null
null
loadgen/generate_load.py
hythloda/ecommerce-demo
83d23475677d546db59879452f3e388581ab88de
[ "Apache-2.0" ]
null
null
null
import barnum, random, time, json, requests, math, os from mysql.connector import connect, Error from kafka import KafkaProducer # CONFIG userSeedCount = 10000 itemSeedCount = 1000 purchaseGenCount = 500000 purchaseGenEveryMS = 100 pageviewMultiplier = 75 # Translates to 75x purchases, currently 750/...
40.75
171
0.541304
import barnum, random, time, json, requests, math, os from mysql.connector import connect, Error from kafka import KafkaProducer userSeedCount = 10000 itemSeedCount = 1000 purchaseGenCount = 500000 purchaseGenEveryMS = 100 pageviewMultiplier = 75 itemInventoryMin = 1000 itemInventoryMax = 5000 ...
true
true
f7208e835090cc50acccc601a70a34153f65abaf
549
py
Python
gcn/lp.py
liqimai/GraphConvForSSL
ef94a897292275680b1058685f2de9d4a8a6449c
[ "MIT" ]
74
2019-04-09T11:53:27.000Z
2022-03-24T09:22:30.000Z
gcn/lp.py
liqimai/GraphConvForSSL
ef94a897292275680b1058685f2de9d4a8a6449c
[ "MIT" ]
4
2019-07-11T08:47:29.000Z
2020-06-15T03:19:31.000Z
gcn/lp.py
liqimai/GraphConvForSSL
ef94a897292275680b1058685f2de9d4a8a6449c
[ "MIT" ]
16
2019-04-15T16:20:07.000Z
2022-03-07T08:42:26.000Z
import numpy as np from gcn.graphconv import ap_approximate def Model17(adj, alpha, y_train, y_test): k = int(np.ceil(4 * alpha)) prediction, time = ap_approximate(adj, y_train, alpha, k) predicted_labels = np.argmax(prediction, axis=1) prediction = np.zeros(prediction.shape) prediction[np.arange(...
36.6
84
0.717668
import numpy as np from gcn.graphconv import ap_approximate def Model17(adj, alpha, y_train, y_test): k = int(np.ceil(4 * alpha)) prediction, time = ap_approximate(adj, y_train, alpha, k) predicted_labels = np.argmax(prediction, axis=1) prediction = np.zeros(prediction.shape) prediction[np.arange(...
true
true
f7208e8a4a26e682a31e9e84d47b5e97601f74d8
173
py
Python
learning_greek/signals.py
lucafavatella/learning-greek
b29a96668992823e2ec89547b6c82fbbbb9af9f3
[ "MIT" ]
10
2015-04-10T06:35:01.000Z
2021-07-19T01:40:22.000Z
learning_greek/signals.py
lucafavatella/learning-greek
b29a96668992823e2ec89547b6c82fbbbb9af9f3
[ "MIT" ]
16
2015-02-08T16:39:01.000Z
2018-06-10T16:14:44.000Z
learning_greek/signals.py
lucafavatella/learning-greek
b29a96668992823e2ec89547b6c82fbbbb9af9f3
[ "MIT" ]
6
2015-02-12T18:56:40.000Z
2020-10-11T18:59:37.000Z
import django.dispatch adoption_level_change = django.dispatch.Signal(providing_args=["level", "request"]) blurb_read = django.dispatch.Signal(providing_args=["request"])
28.833333
83
0.797688
import django.dispatch adoption_level_change = django.dispatch.Signal(providing_args=["level", "request"]) blurb_read = django.dispatch.Signal(providing_args=["request"])
true
true
f7208edc797411262aa09c8538bfe7878909fc92
1,273
py
Python
test/test_sync_reports_rotate.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_sync_reports_rotate.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_sync_reports_rotate.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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 l...
25.979592
77
0.735271
from __future__ import absolute_import import os import sys import unittest import swagger_client from swagger_client.rest import ApiException from swagger_client.models.sync_reports_rotate import SyncReportsRotate class TestSyncReportsRotate(unittest.TestCase): def setUp(self): pass def tearDo...
true
true
f7208fe4ecb7d3a8e41c130280425906b33dd803
47,072
py
Python
BioSTEAM 2.x.x/biorefineries/TAL/system_TAL_glucose.py
yoelcortes/Bioindustrial-Complex
d39edfec88e443ef7a62218ca0215e3b105f4b96
[ "MIT" ]
2
2020-01-03T21:04:41.000Z
2020-01-09T01:15:48.000Z
BioSTEAM 2.x.x/biorefineries/TAL/system_TAL_glucose.py
yoelcortes/Bioindustrial-Complex
d39edfec88e443ef7a62218ca0215e3b105f4b96
[ "MIT" ]
6
2020-01-03T21:31:27.000Z
2020-02-28T13:53:56.000Z
BioSTEAM 2.x.x/biorefineries/TAL/system_TAL_glucose.py
yoelcortes/Bioindustrial-Complex
d39edfec88e443ef7a62218ca0215e3b105f4b96
[ "MIT" ]
2
2020-01-07T14:04:06.000Z
2020-01-08T23:05:25.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Bioindustrial-Park: BioSTEAM's Premier Biorefinery Models and Results # Copyright (C) 2022-2023, Sarang Bhagwat <sarangb2@illinois.edu> (this biorefinery) # # This module is under the UIUC open-source license. See # github.com/BioSTEAMDevelopmentGroup/biosteam/blob/mas...
42.560579
252
0.574312
# Copyright (C) 2022-2023, Sarang Bhagwat <sarangb2@illinois.edu> (this biorefinery) # # This module is under the UIUC open-source license. See # github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt # for license details. # %% Setup import biosteam as bst import thermosteam as tmo import flexso...
true
true
f72090137ed4a55b46aada64a6912f716757178f
11,993
py
Python
qusp/target.py
dmargala/qusp
3b08e8bea321f7083f00756f558c1d0af0eddd07
[ "MIT" ]
null
null
null
qusp/target.py
dmargala/qusp
3b08e8bea321f7083f00756f558c1d0af0eddd07
[ "MIT" ]
null
null
null
qusp/target.py
dmargala/qusp
3b08e8bea321f7083f00756f558c1d0af0eddd07
[ "MIT" ]
null
null
null
""" Provides support for working with BOSS targets. In qusp, a target is identified by a unique plate-mjd-fiber. They are implemented as dictionaries and must have at least 'plate', 'mjd', and 'fiber' keys specified. The Target model is designed to be flexible, in that other attributes can be added to targets as neede...
35.482249
118
0.636455
""" Provides support for working with BOSS targets. In qusp, a target is identified by a unique plate-mjd-fiber. They are implemented as dictionaries and must have at least 'plate', 'mjd', and 'fiber' keys specified. The Target model is designed to be flexible, in that other attributes can be added to targets as neede...
false
true
f720915b2ad6e84b10d393f7c627605ab0f69c7f
2,018
py
Python
tools/Polygraphy/polygraphy/config.py
spradius/TensorRT
eb5de99b523c76c2f3ae997855ad86d3a1e86a31
[ "Apache-2.0" ]
1
2021-08-23T01:15:16.000Z
2021-08-23T01:15:16.000Z
tools/Polygraphy/polygraphy/config.py
spradius/TensorRT
eb5de99b523c76c2f3ae997855ad86d3a1e86a31
[ "Apache-2.0" ]
null
null
null
tools/Polygraphy/polygraphy/config.py
spradius/TensorRT
eb5de99b523c76c2f3ae997855ad86d3a1e86a31
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021, NVIDIA CORPORATION. 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 appl...
43.869565
109
0.77552
import os import sys INTERNAL_CORRECTNESS_CHECKS = bool(os.environ.get("POLYGRAPHY_INTERNAL_CORRECTNESS_CHECKS", "0") != "0") AUTOINSTALL_DEPS = bool(os.environ.get("POLYGRAPHY_AUTOINSTALL_DEPS", "0") != "0") INSTALL_CMD = os.environ.get("POLYGRAPHY_INSTALL_CMD", "{:} -m pip install".format(sys.execut...
true
true
f720930247112fff9273c3101072dae9279f6fa7
4,606
py
Python
tasks/trace_agent.py
charyveer75/datadog-agent
fdf4d2028b0dccd485eb280f4fefda84931927bc
[ "Apache-2.0" ]
2
2020-02-11T16:05:23.000Z
2022-03-30T19:50:28.000Z
tasks/trace_agent.py
charyveer75/datadog-agent
fdf4d2028b0dccd485eb280f4fefda84931927bc
[ "Apache-2.0" ]
2
2021-08-11T15:24:27.000Z
2021-08-23T22:13:05.000Z
tasks/trace_agent.py
charyveer75/datadog-agent
fdf4d2028b0dccd485eb280f4fefda84931927bc
[ "Apache-2.0" ]
null
null
null
import os import sys import shutil import invoke from invoke import task from .utils import bin_name, get_build_flags, get_version_numeric_only, load_release_versions from .utils import REPO_PATH from .build_tags import get_build_tags, get_default_build_tags, LINUX_ONLY_TAGS, REDHAT_AND_DEBIAN_ONLY_TAGS, REDHAT_AND_D...
35.430769
230
0.650673
import os import sys import shutil import invoke from invoke import task from .utils import bin_name, get_build_flags, get_version_numeric_only, load_release_versions from .utils import REPO_PATH from .build_tags import get_build_tags, get_default_build_tags, LINUX_ONLY_TAGS, REDHAT_AND_DEBIAN_ONLY_TAGS, REDHAT_AND_D...
true
true
f7209497e72c208305cb4e1cce93a790ea4e4114
328
py
Python
emoji_chengyu/main.py
alingse/emoji-chengyu
2d4436212c1d2899dfc12a1c965ea2ddce9a4aab
[ "MIT" ]
3
2020-04-28T03:25:36.000Z
2022-01-24T04:52:01.000Z
emoji_chengyu/main.py
alingse/emoji-chengyu
2d4436212c1d2899dfc12a1c965ea2ddce9a4aab
[ "MIT" ]
null
null
null
emoji_chengyu/main.py
alingse/emoji-chengyu
2d4436212c1d2899dfc12a1c965ea2ddce9a4aab
[ "MIT" ]
1
2020-04-28T03:25:49.000Z
2020-04-28T03:25:49.000Z
import itertools from emoji_chengyu.puzzle import gen_puzzle def emoji_chengyu(): N = 100 pg = gen_puzzle() puzzles = list(itertools.islice(pg, N)) puzzles.sort(key=lambda p: sum(p.mask), reverse=True) M = 20 for puzzle in puzzles[:M]: print(''.join(puzzle.puzzle), puzzle.chengyu_ite...
21.866667
63
0.670732
import itertools from emoji_chengyu.puzzle import gen_puzzle def emoji_chengyu(): N = 100 pg = gen_puzzle() puzzles = list(itertools.islice(pg, N)) puzzles.sort(key=lambda p: sum(p.mask), reverse=True) M = 20 for puzzle in puzzles[:M]: print(''.join(puzzle.puzzle), puzzle.chengyu_ite...
true
true
f72094b30996c32bb9a24f3c3252221bebecd3fa
2,378
py
Python
tests/technical_ratio_test.py
bopo/mooquant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
21
2017-09-07T16:08:21.000Z
2020-10-15T13:42:21.000Z
tests/technical_ratio_test.py
bopo/MooQuant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
209
2018-10-09T11:57:39.000Z
2021-03-25T21:40:30.000Z
tests/technical_ratio_test.py
bopo/MooQuant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
15
2018-11-17T20:14:37.000Z
2022-02-04T23:55:29.000Z
# -*- coding: utf-8 -*- # MooQuant # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
30.883117
79
0.647603
from mooquant import dataseries from mooquant.technical import ratio from . import common class TestCase(common.TestCase): def __buildRatio(self, values, ratioMaxLen=None): seqDS = dataseries.SequenceDataSeries() ret = ratio.Ratio(seqDS, ratioMaxLen) for value in values...
true
true
f72094fcc0eabe24153127ed8f8cfab3259c6ceb
1,247
py
Python
IRIS_data_download/IRIS_download_support/obspy/io/segy/util.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-03-05T01:03:01.000Z
2020-12-17T05:04:07.000Z
IRIS_data_download/IRIS_download_support/obspy/io/segy/util.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
4
2021-03-31T19:25:55.000Z
2021-12-13T20:32:46.000Z
IRIS_data_download/IRIS_download_support/obspy/io/segy/util.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-09-08T19:33:40.000Z
2021-04-05T09:47:50.000Z
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * # NOQA from struct import unpack from obspy.core.util.libnames import _load_cdll # Import shared libsegy clibsegy = _load_cdll("segy") def unpack_head...
31.974359
75
0.652767
from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * from struct import unpack from obspy.core.util.libnames import _load_cdll clibsegy = _load_cdll("segy") def unpack_header_value(endian, packed_value, length, special_forma...
true
true
f72095d4a18d4936ed6471f607ee84100d63dad6
2,845
py
Python
MMLanScan/Data/build_port_services_list.py
cyb3rc/MMLanScan
60cf1cb9476bad8ee522780ce4df5513a139f47d
[ "MIT" ]
null
null
null
MMLanScan/Data/build_port_services_list.py
cyb3rc/MMLanScan
60cf1cb9476bad8ee522780ce4df5513a139f47d
[ "MIT" ]
null
null
null
MMLanScan/Data/build_port_services_list.py
cyb3rc/MMLanScan
60cf1cb9476bad8ee522780ce4df5513a139f47d
[ "MIT" ]
null
null
null
#!/usr/bin/python import urllib2 import xml.etree.ElementTree as ElementTree import re def refine_table(table): result = table result = re.sub(r"<td.*?>", "<td>", result) result = re.sub(r"<tr.*?>", "<tr>", result) result = re.sub(r"<a.*?>(.*?)</a>", "\\1", result) result = re.sub(r"<span.*?>(.*?)...
31.611111
115
0.518102
import urllib2 import xml.etree.ElementTree as ElementTree import re def refine_table(table): result = table result = re.sub(r"<td.*?>", "<td>", result) result = re.sub(r"<tr.*?>", "<tr>", result) result = re.sub(r"<a.*?>(.*?)</a>", "\\1", result) result = re.sub(r"<span.*?>(.*?)</span>", "\\1", ...
true
true
f72095f560d4de6eaf24da310f2f00ce19300c51
4,718
py
Python
API/content/views.py
kasimbozdag/SWE_573
4bce24f98fe6980b1f2c83196b8454b56118186b
[ "MIT" ]
null
null
null
API/content/views.py
kasimbozdag/SWE_573
4bce24f98fe6980b1f2c83196b8454b56118186b
[ "MIT" ]
52
2019-02-19T10:43:11.000Z
2022-02-10T10:36:37.000Z
API/content/views.py
kasimbozdag/SWE_573
4bce24f98fe6980b1f2c83196b8454b56118186b
[ "MIT" ]
null
null
null
import datetime from django.shortcuts import render, get_object_or_404 # Create your views here. from rest_framework.generics import ListAPIView from rest_framework.response import Response from rest_framework.status import HTTP_200_OK from rest_framework.views import APIView from content.models import Content from ...
35.473684
116
0.652183
import datetime from django.shortcuts import render, get_object_or_404 from rest_framework.generics import ListAPIView from rest_framework.response import Response from rest_framework.status import HTTP_200_OK from rest_framework.views import APIView from content.models import Content from content.serializers impor...
true
true
f72095f7242e0943bddfcfc8d4c0d806cf6d4b17
1,274
py
Python
build/lib/elang/plot/utils/embedding.py
onlyphantom/elangdev
bdb80e10e98f98ef6510c313cda55daf9464d5c4
[ "CC0-1.0" ]
5
2020-02-26T15:05:47.000Z
2022-01-25T01:15:27.000Z
build/lib/elang/plot/utils/embedding.py
onlyphantom/elangdev
bdb80e10e98f98ef6510c313cda55daf9464d5c4
[ "CC0-1.0" ]
null
null
null
build/lib/elang/plot/utils/embedding.py
onlyphantom/elangdev
bdb80e10e98f98ef6510c313cda55daf9464d5c4
[ "CC0-1.0" ]
1
2020-02-13T08:14:11.000Z
2020-02-13T08:14:11.000Z
import sys, os.path import gensim from gensim.models import Word2Vec import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA def plot2d_demo(model, words=None): assert ( model.vector_size >= 2 ), "This function expects a model of size 2 (2-dimension word vectors) or h...
28.311111
86
0.625589
import sys, os.path import gensim from gensim.models import Word2Vec import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA def plot2d_demo(model, words=None): assert ( model.vector_size >= 2 ), "This function expects a model of size 2 (2-dimension word vectors) or h...
true
true
f720966df99b4facf9ee616398c70c34a8e38598
49,071
py
Python
tensorflow/python/data/experimental/kernel_tests/snapshot_test.py
weikhor/tensorflow
ce047fc05c7b5ff54868ba53d724d9c171c4adbb
[ "Apache-2.0" ]
10
2021-05-25T17:43:04.000Z
2022-03-08T10:46:09.000Z
tensorflow/python/data/experimental/kernel_tests/snapshot_test.py
weikhor/tensorflow
ce047fc05c7b5ff54868ba53d724d9c171c4adbb
[ "Apache-2.0" ]
1,056
2019-12-15T01:20:31.000Z
2022-02-10T02:06:28.000Z
tensorflow/python/data/experimental/kernel_tests/snapshot_test.py
weikhor/tensorflow
ce047fc05c7b5ff54868ba53d724d9c171c4adbb
[ "Apache-2.0" ]
6
2016-09-07T04:00:15.000Z
2022-01-12T01:47:38.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.834233
82
0.708259
from __future__ import absolute_import from __future__ import division from __future__ import print_function import multiprocessing import os import shutil import time from absl.testing import parameterized import numpy as np from tensorflow.python.data.experimental.ops import snapshot from tensorflow....
true
true
f720977f63fc56cdf8a97938eefdecd9ebe62107
651
py
Python
src/prereq/exercise8.py
kradical/cluster-analysis-udemy
e2101bdb08ae3b9ed0ed8c4c1c488e3a75a1b7c5
[ "MIT" ]
null
null
null
src/prereq/exercise8.py
kradical/cluster-analysis-udemy
e2101bdb08ae3b9ed0ed8c4c1c488e3a75a1b7c5
[ "MIT" ]
null
null
null
src/prereq/exercise8.py
kradical/cluster-analysis-udemy
e2101bdb08ae3b9ed0ed8c4c1c488e3a75a1b7c5
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt # Plot a spiral dataset def generateArm(rotation, step): theta = np.random.rand(500) * step r = np.exp(theta) - 1 x = r * np.cos(theta) + (np.random.rand(500) - 0.5) / 7 y = r * np.sin(theta) + (np.random.rand(500) - 0.5) / 7 x, y = x * np.cos(r...
20.34375
99
0.563748
import numpy as np import matplotlib.pyplot as plt def generateArm(rotation, step): theta = np.random.rand(500) * step r = np.exp(theta) - 1 x = r * np.cos(theta) + (np.random.rand(500) - 0.5) / 7 y = r * np.sin(theta) + (np.random.rand(500) - 0.5) / 7 x, y = x * np.cos(rotation) - y * np.sin(r...
true
true
f7209acf0f181cb1058d455de2841e729f3c8cd5
3,798
py
Python
mlops/parallelm/mlops/stats/health/categorical_hist_stat.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
7
2019-04-08T02:31:55.000Z
2021-11-15T14:40:49.000Z
mlops/parallelm/mlops/stats/health/categorical_hist_stat.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
31
2019-02-22T22:23:26.000Z
2021-08-02T17:17:06.000Z
mlops/parallelm/mlops/stats/health/categorical_hist_stat.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
8
2019-03-15T23:46:08.000Z
2020-02-06T09:16:02.000Z
""" The Code contains functions to calculate univariate statistics for categorical features, given a dataset. """ import numpy as np from parallelm.mlops.stats.health.histogram_data_objects import CategoricalHistogramDataObject class CategoricalHistogram(object): """ Class is responsible for providing fit ...
42.2
145
0.645076
import numpy as np from parallelm.mlops.stats.health.histogram_data_objects import CategoricalHistogramDataObject class CategoricalHistogram(object): def __init__(self): self._prob_dist_categorical = [] self._features = [] def fit(self, training_feature_values, training_feature_n...
true
true
f7209b17100218a42c80c8e984c08597d630b188
47
py
Python
odoo-13.0/myaddons/SCM/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
181
2016-11-11T04:39:43.000Z
2022-03-14T21:17:19.000Z
odoo-13.0/myaddons/SCM/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
899
2016-11-14T02:42:56.000Z
2022-03-29T20:47:39.000Z
odoo-13.0/myaddons/SCM/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
227
2016-11-10T17:16:59.000Z
2022-03-26T16:46:38.000Z
from . import models from . import controllers
15.666667
25
0.787234
from . import models from . import controllers
true
true
f7209b3cfc5d5bd59dca31198344266661bee81a
94
py
Python
vaccine_card/api/apps.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
vaccine_card/api/apps.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
vaccine_card/api/apps.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'vaccine_card.api'
15.666667
33
0.755319
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'vaccine_card.api'
true
true
f7209bc8e13eb725ec7ffbe1187a20a64ae43a57
3,850
py
Python
EWR/ab6_v2/Sort.py
Koopakiller/Edu
575c43dae24a4432e8c8fb2eda96e948cc33ec32
[ "MIT" ]
null
null
null
EWR/ab6_v2/Sort.py
Koopakiller/Edu
575c43dae24a4432e8c8fb2eda96e948cc33ec32
[ "MIT" ]
null
null
null
EWR/ab6_v2/Sort.py
Koopakiller/Edu
575c43dae24a4432e8c8fb2eda96e948cc33ec32
[ "MIT" ]
null
null
null
# coding=utf-8 # Author: Tom Lambert # Content: Implementierung der Sort-Klasse für ab6. class Sort(object): """Implementiert Sortier-Algorithmen mit der Möglichkeit einer statistischen Auswertung""" def __init__(self): self.counter_swap = 0 # entspricht ca 2 Elementabrufen und 2 Elementzuweisungen ...
38.118812
103
0.562857
class Sort(object): def __init__(self): self.counter_swap = 0 self.counter_list_item_assignment = 0 self.counter_item_compare = 0 self.counter_get_item_from_list = 0 self.counter_add_item_to_result_list = 0 self.counter_recursive_call = 0 self.counter_...
true
true
f7209bcc24d3c78f312379c3537a4b94dc7b13db
436
py
Python
packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickangle.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickangle.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickangle.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="icicle.marker.colorbar", **kwargs ): super(TickangleValidator, self).__init__( plotly_name=plotly_name, p...
31.142857
85
0.665138
import _plotly_utils.basevalidators class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="icicle.marker.colorbar", **kwargs ): super(TickangleValidator, self).__init__( plotly_name=plotly_name, p...
true
true
f7209c409ce293886a6af24bf96c863400e8931e
4,791
py
Python
luminoth/utils/bbox_transform_tf.py
jsdussanc/luminoth
7637c52cc01d2826a231fef43746aa10951f99f0
[ "BSD-3-Clause" ]
2,584
2017-08-16T20:31:52.000Z
2022-03-16T07:53:54.000Z
luminoth/utils/bbox_transform_tf.py
dun933/Tabulo
dc1c1203a40e1ecf2aaca9647f3008ab72b41438
[ "BSD-3-Clause" ]
197
2017-08-17T14:49:18.000Z
2022-02-10T01:50:50.000Z
luminoth/utils/bbox_transform_tf.py
dun933/Tabulo
dc1c1203a40e1ecf2aaca9647f3008ab72b41438
[ "BSD-3-Clause" ]
462
2017-08-16T22:00:23.000Z
2022-03-08T19:14:00.000Z
import tensorflow as tf def get_width_upright(bboxes): with tf.name_scope('BoundingBoxTransform/get_width_upright'): bboxes = tf.cast(bboxes, tf.float32) x1, y1, x2, y2 = tf.split(bboxes, 4, axis=1) width = x2 - x1 + 1. height = y2 - y1 + 1. # Calculate up right point of b...
31.313725
79
0.622626
import tensorflow as tf def get_width_upright(bboxes): with tf.name_scope('BoundingBoxTransform/get_width_upright'): bboxes = tf.cast(bboxes, tf.float32) x1, y1, x2, y2 = tf.split(bboxes, 4, axis=1) width = x2 - x1 + 1. height = y2 - y1 + 1. urx = x1 + .5 * width ...
true
true
f7209df8e01166c38a64b49337433ccac2442afc
2,808
py
Python
5-MaksimovKA/code/submit.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
38
2021-02-18T07:04:54.000Z
2022-03-22T15:31:06.000Z
5-MaksimovKA/code/submit.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
2
2021-02-22T18:53:19.000Z
2021-06-22T20:28:06.000Z
5-MaksimovKA/code/submit.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
15
2021-02-25T17:25:40.000Z
2022-01-31T16:59:32.000Z
import os import tqdm import glob import fiona import geopandas as gpd from fire import Fire def sn7_convert_geojsons_to_csv(json_dirs, output_csv_path, population='proposal'): ''' Convert jsons to csv Population is either "ground" or "proposal" ''' first_file = True # switch that will be turned...
35.1
94
0.551994
import os import tqdm import glob import fiona import geopandas as gpd from fire import Fire def sn7_convert_geojsons_to_csv(json_dirs, output_csv_path, population='proposal'): first_file = True for json_dir in tqdm.tqdm(json_dirs[:]): json_files = sorted(glob.glob(os.path.join(json_dir, '*.geojson...
true
true
f7209e86a2976584564066d1289e7d7d2268a733
2,401
py
Python
tests/commands/test_modifyoncondition.py
lpd-patrick/oaxmlapi
1e73881c290ca3181c2d33a7b5fa74fb5f86e62c
[ "MIT" ]
25
2015-05-20T01:23:39.000Z
2021-03-01T17:13:59.000Z
tests/commands/test_modifyoncondition.py
lpd-patrick/oaxmlapi
1e73881c290ca3181c2d33a7b5fa74fb5f86e62c
[ "MIT" ]
16
2015-03-03T00:59:29.000Z
2021-11-30T16:45:15.000Z
tests/commands/test_modifyoncondition.py
lpd-patrick/oaxmlapi
1e73881c290ca3181c2d33a7b5fa74fb5f86e62c
[ "MIT" ]
12
2016-01-04T20:06:44.000Z
2020-09-27T20:15:27.000Z
# -*- coding: utf-8 from __future__ import absolute_import import unittest from oaxmlapi import commands, datatypes try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET class TestModifyOnConditionClass(unittest.TestCase): def test_str(self): slip = data...
27.918605
79
0.493544
from __future__ import absolute_import import unittest from oaxmlapi import commands, datatypes try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET class TestModifyOnConditionClass(unittest.TestCase): def test_str(self): slip = datatypes.Datatype( ...
true
true
f7209ed2b871197ee55089411c3d1ab6b323fbba
3,956
py
Python
docs/user_guides/tools/elastic_ctr/elastic_ctr/dist_train_demo.py
shiyutang/docs
b05612213a08daf9f225abce08fc42f924ef51ad
[ "Apache-2.0" ]
104
2018-09-04T08:16:05.000Z
2021-05-06T20:45:26.000Z
docs/user_guides/tools/elastic_ctr/elastic_ctr/dist_train_demo.py
shiyutang/docs
b05612213a08daf9f225abce08fc42f924ef51ad
[ "Apache-2.0" ]
1,582
2018-06-25T06:14:11.000Z
2021-05-14T16:00:43.000Z
docs/user_guides/tools/elastic_ctr/elastic_ctr/dist_train_demo.py
shiyutang/docs
b05612213a08daf9f225abce08fc42f924ef51ad
[ "Apache-2.0" ]
387
2018-06-20T07:42:32.000Z
2021-05-14T08:35:28.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
35.321429
82
0.65091
from __future__ import print_function import paddle.fluid.core as core import math import os import sys import numpy import paddle import paddle.fluid as fluid BATCH_SIZE = 64 PASS_NUM = 1 def loss_net(hidden, label): prediction = fluid.layers.fc(input=hidden, size=10, act='softmax') loss = ...
true
true
f7209f8d535077c8af62477c05e769c4ef76e2d5
9,895
py
Python
mazda3_joystick.py
moralrecordings/elm327_joystick
edebae95f24913f7c6caed98751fb54477743169
[ "BSD-3-Clause" ]
7
2017-12-18T13:11:18.000Z
2022-01-08T21:13:26.000Z
mazda3_joystick.py
moralrecordings/elm327_joystick
edebae95f24913f7c6caed98751fb54477743169
[ "BSD-3-Clause" ]
null
null
null
mazda3_joystick.py
moralrecordings/elm327_joystick
edebae95f24913f7c6caed98751fb54477743169
[ "BSD-3-Clause" ]
3
2018-10-27T21:37:01.000Z
2022-01-08T21:13:24.000Z
#!/usr/bin/env python3 import uinput from elm327 import ELM327, PROTOCOLS from mrcrowbar import models as mrc import math import time from optparse import OptionParser class OptParser( OptionParser ): def format_epilog( self, formatter ): return '\n{}\n'.format( '\n'.join( [formatter._format_text( x ) fo...
30.167683
141
0.597979
import uinput from elm327 import ELM327, PROTOCOLS from mrcrowbar import models as mrc import math import time from optparse import OptionParser class OptParser( OptionParser ): def format_epilog( self, formatter ): return '\n{}\n'.format( '\n'.join( [formatter._format_text( x ) for x in self.epilog.spl...
true
true
f720a09f334fcd690a947282fa271733c27fe7d4
218
py
Python
WriteaFunction.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
WriteaFunction.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
WriteaFunction.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
def is_leap(year): leap = False if year>=1900: if year%4 == 0: leap = True if year%100 == 0 and year%400 != 0: leap = False return leap year = int(input())
18.166667
47
0.463303
def is_leap(year): leap = False if year>=1900: if year%4 == 0: leap = True if year%100 == 0 and year%400 != 0: leap = False return leap year = int(input())
true
true
f720a191c0da487593b1eee10de1b8b4af27c2df
2,276
py
Python
pyecharts/charts/basic_charts/scatter.py
myqf555/pyecharts
050309ee3d2016142df3e2265a091e27aa58a027
[ "MIT" ]
1
2020-02-13T14:48:20.000Z
2020-02-13T14:48:20.000Z
pyecharts/charts/basic_charts/scatter.py
eclipse2007/pyecharts
651731a1a5220420a9a03808d2f5eb38ffe18e09
[ "MIT" ]
null
null
null
pyecharts/charts/basic_charts/scatter.py
eclipse2007/pyecharts
651731a1a5220420a9a03808d2f5eb38ffe18e09
[ "MIT" ]
1
2020-09-12T05:55:48.000Z
2020-09-12T05:55:48.000Z
import itertools from ... import options as opts from ... import types from ...charts.chart import RectChart from ...globals import ChartType class Scatter(RectChart): """ <<< Scatter >>> The scatter diagram on the rectangular coordinate system can be used to show the relationship betwe...
35.5625
76
0.560193
import itertools from ... import options as opts from ... import types from ...charts.chart import RectChart from ...globals import ChartType class Scatter(RectChart): def add_yaxis( self, series_name: str, y_axis: types.Sequence, *, is_selected: bool = Tru...
true
true
f720a2030d77959bb04a88ba16fda69fd042f960
8,410
py
Python
LichessBotMain.py
nfeddersen/lichess-bot
6457b5f66104b59b91316ba3a944b55710ca64e5
[ "MIT" ]
null
null
null
LichessBotMain.py
nfeddersen/lichess-bot
6457b5f66104b59b91316ba3a944b55710ca64e5
[ "MIT" ]
null
null
null
LichessBotMain.py
nfeddersen/lichess-bot
6457b5f66104b59b91316ba3a944b55710ca64e5
[ "MIT" ]
1
2021-07-12T14:11:04.000Z
2021-07-12T14:11:04.000Z
import requests import json from stockfish import Stockfish stockfish = Stockfish('stockfish_20090216_x64_bmi2.exe', parameters={"Threads": 8, "Minimum Thinking Time": 300}) stockfish.set_depth(15) stockfish.set_skill_level(25) api_key = 'REPLACE_WITH_API_KEY' headers = {'Authorization': f'Bearer {api_key}...
46.464088
114
0.437574
import requests import json from stockfish import Stockfish stockfish = Stockfish('stockfish_20090216_x64_bmi2.exe', parameters={"Threads": 8, "Minimum Thinking Time": 300}) stockfish.set_depth(15) stockfish.set_skill_level(25) api_key = 'REPLACE_WITH_API_KEY' headers = {'Authorization': f'Bearer {api_key}...
true
true
f720a21b297857bd9d0f8b0c056695ecb84a54fe
1,510
py
Python
pyArango/index.py
jarvisav/pyArango
dc054e2258c9fccbc54443afc244b74ad0abb8b0
[ "Apache-2.0" ]
null
null
null
pyArango/index.py
jarvisav/pyArango
dc054e2258c9fccbc54443afc244b74ad0abb8b0
[ "Apache-2.0" ]
null
null
null
pyArango/index.py
jarvisav/pyArango
dc054e2258c9fccbc54443afc244b74ad0abb8b0
[ "Apache-2.0" ]
null
null
null
import json from .theExceptions import (CreationError, DeletionError, UpdateError) class Index(object) : """An index on a collection's fields. Indexes are meant to de created by ensureXXX functions of Collections. Indexes have a .infos dictionary that stores all the infos about the index""" def __init__(self...
40.810811
151
0.625828
import json from .theExceptions import (CreationError, DeletionError, UpdateError) class Index(object) : def __init__(self, collection, infos = None, creationData = None) : self.collection = collection self.connection = self.collection.database.connection self.indexesURL = "%s/index" % se...
true
true
f720a26b353f6b3ddd1548566f5b0a972c16828a
584
py
Python
soleka.py
jshenaop/eko
bb8e96ee9e460ed10505c8046a444a24fdcfcd06
[ "Apache-2.0" ]
null
null
null
soleka.py
jshenaop/eko
bb8e96ee9e460ed10505c8046a444a24fdcfcd06
[ "Apache-2.0" ]
null
null
null
soleka.py
jshenaop/eko
bb8e96ee9e460ed10505c8046a444a24fdcfcd06
[ "Apache-2.0" ]
null
null
null
# coding=utf8 from flask import Flask, render_template from flask_restful.utils import cors from flask_cors import CORS, cross_origin import config import models from resources_v1.predictions import predictions_api_v1 from templates.templates import home app = Flask(__name__) CORS(app) app.register_bl...
22.461538
65
0.738014
from flask import Flask, render_template from flask_restful.utils import cors from flask_cors import CORS, cross_origin import config import models from resources_v1.predictions import predictions_api_v1 from templates.templates import home app = Flask(__name__) CORS(app) app.register_blueprint(predic...
true
true
f720a3476873e92b2ed94d5e14b117589ae55b83
23,418
py
Python
index.py
201723050210/17wanxiaoCheckin-Actions
666a2c8473f876a607011021a8be1ee876ce6c34
[ "MIT" ]
null
null
null
index.py
201723050210/17wanxiaoCheckin-Actions
666a2c8473f876a607011021a8be1ee876ce6c34
[ "MIT" ]
null
null
null
index.py
201723050210/17wanxiaoCheckin-Actions
666a2c8473f876a607011021a8be1ee876ce6c34
[ "MIT" ]
null
null
null
import time import os import datetime import json import logging import requests from utils.server_chan import server_push from utils.qq_email import qq_email_push from utils.qmsg import qmsg_push from login import CampusLogin def initLogging(): logging.getLogger().setLevel(logging.INFO) logging.basicConfig(...
32.211829
130
0.530575
import time import os import datetime import json import logging import requests from utils.server_chan import server_push from utils.qq_email import qq_email_push from utils.qmsg import qmsg_push from login import CampusLogin def initLogging(): logging.getLogger().setLevel(logging.INFO) logging.basicConfig(...
true
true
f720a3b2937b6b9bd9e76101573c229ffea21101
913
py
Python
tabu/package_info.py
wbernoudy/dwave-tabu
793e76405ba60d2da87bc15634adeda821d82564
[ "Apache-2.0" ]
null
null
null
tabu/package_info.py
wbernoudy/dwave-tabu
793e76405ba60d2da87bc15634adeda821d82564
[ "Apache-2.0" ]
null
null
null
tabu/package_info.py
wbernoudy/dwave-tabu
793e76405ba60d2da87bc15634adeda821d82564
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 D-Wave Systems 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 wri...
38.041667
74
0.756846
__packagename__ = 'dwave-tabu' __title__ = 'D-Wave Tabu' __version__ = '0.1.3' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'tools@dwavesys.com' __description__ = 'Optimized Tabu solver for QUBOs' __url__ = 'https://github.com/dwavesystems/dwave-tabu' __license__ = 'Apache 2.0' __copyright__ = '20...
true
true
f720a3be847c19fa4b9c7affc33b5d31a4209713
276
py
Python
EyeTracker/display.py
PoweredByME/SSVEP_FYP
6839be6a4aeddfa1b29c587b23d64c95a90810f8
[ "MIT" ]
null
null
null
EyeTracker/display.py
PoweredByME/SSVEP_FYP
6839be6a4aeddfa1b29c587b23d64c95a90810f8
[ "MIT" ]
null
null
null
EyeTracker/display.py
PoweredByME/SSVEP_FYP
6839be6a4aeddfa1b29c587b23d64c95a90810f8
[ "MIT" ]
null
null
null
import cv2; class Display(object): def __init__(self): pass; def showFrame(self, frame, windowName = "frame"): cv2.namedWindow(windowName, cv2.WINDOW_NORMAL); cv2.imshow(windowName, frame); def end(self): cv2.destroyAllWindows();
23
55
0.637681
import cv2; class Display(object): def __init__(self): pass; def showFrame(self, frame, windowName = "frame"): cv2.namedWindow(windowName, cv2.WINDOW_NORMAL); cv2.imshow(windowName, frame); def end(self): cv2.destroyAllWindows();
true
true
f720a3c8713f607158450310ae4112fcb026294a
6,344
py
Python
simple_history/manager.py
felixschloesser/django-simple-history
28abacb8a776fbaffcf0a42432a6a88be3561a86
[ "BSD-3-Clause" ]
2
2021-03-26T09:20:05.000Z
2021-05-26T13:46:48.000Z
simple_history/manager.py
felixschloesser/django-simple-history
28abacb8a776fbaffcf0a42432a6a88be3561a86
[ "BSD-3-Clause" ]
42
2021-03-30T11:12:23.000Z
2022-03-28T09:20:13.000Z
simple_history/manager.py
hramezani/django-simple-history
32645206749a1cc68539d9ad6499f1a938b2c9f4
[ "BSD-3-Clause" ]
1
2021-10-05T10:25:35.000Z
2021-10-05T10:25:35.000Z
from django.db import connection, models from django.db.models import OuterRef, Subquery from django.utils import timezone from simple_history.utils import get_change_reason_from_object class HistoryDescriptor: def __init__(self, model): self.model = model def __get__(self, instance, owner): ...
36.67052
87
0.585908
from django.db import connection, models from django.db.models import OuterRef, Subquery from django.utils import timezone from simple_history.utils import get_change_reason_from_object class HistoryDescriptor: def __init__(self, model): self.model = model def __get__(self, instance, owner): ...
true
true
f720a3de70f0386fe46cbec6ae3539699c8d83d8
5,653
py
Python
sdk/python/pulumi_azure_native/botservice/v20171201/get_bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20171201/get_bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20171201/get_bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "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, overload from ... import _utilities fro...
32.488506
144
0.618433
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetBotConnectionResult', 'AwaitableGetBotConnectionResult', 'get_bot_connection', ] @pulumi.output_type class GetBotCon...
true
true
f720a41fe1294d6a6a4f0a5fcf613dac72c9f8da
9,425
py
Python
pulsar-functions/instance/src/main/python/function_stats.py
bruth/pulsar
fe2c8ee4d37e2a45dfb528592915746827416e18
[ "Apache-2.0" ]
null
null
null
pulsar-functions/instance/src/main/python/function_stats.py
bruth/pulsar
fe2c8ee4d37e2a45dfb528592915746827416e18
[ "Apache-2.0" ]
null
null
null
pulsar-functions/instance/src/main/python/function_stats.py
bruth/pulsar
fe2c8ee4d37e2a45dfb528592915746827416e18
[ "Apache-2.0" ]
1
2019-03-15T09:34:50.000Z
2019-03-15T09:34:50.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
49.088542
158
0.766154
import traceback import time import util from prometheus_client import Counter, Summary, Gauge class Stats(object): metrics_label_names = ['tenant', 'namespace', 'function', 'instance_id', 'cluster'] PULSAR_FUNCTION_METRICS_PREFIX = "pulsar_function_" USER_METRIC_PREFIX = "user_metric_"; ...
true
true
f720a49b1ccb9afbd2e211fb293d03f55301e147
2,226
py
Python
Numpy/code.py
JayeshSukhija/ga-learner-dsmp-repo
4c05d980462dde423b6be41cca1218d6d98e8e48
[ "MIT" ]
null
null
null
Numpy/code.py
JayeshSukhija/ga-learner-dsmp-repo
4c05d980462dde423b6be41cca1218d6d98e8e48
[ "MIT" ]
null
null
null
Numpy/code.py
JayeshSukhija/ga-learner-dsmp-repo
4c05d980462dde423b6be41cca1218d6d98e8e48
[ "MIT" ]
null
null
null
# -------------- # Importing header files import numpy as np #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #Code starts here #Loading data file and saving it into a new numpy array data = np.genfromtxt(path, delimiter=",", skip_header=1) print(data.shape) #Concatenating the new record to ...
20.611111
61
0.676101
import numpy as np new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] data = np.genfromtxt(path, delimiter=",", skip_header=1) print(data.shape) census=np.concatenate((data, new_record),axis = 0) print(census.shape) import numpy as np age=census[:,0] print (age) print ('='*50) max_age=np...
true
true
f720a7182cc9382555831934ef834b1a0aab840c
473
py
Python
enaml/qt/__init__.py
dandycheung/enaml
1a7d9c95717a359bb2a8435c597eda36c9235fab
[ "BSD-3-Clause-Clear" ]
null
null
null
enaml/qt/__init__.py
dandycheung/enaml
1a7d9c95717a359bb2a8435c597eda36c9235fab
[ "BSD-3-Clause-Clear" ]
null
null
null
enaml/qt/__init__.py
dandycheung/enaml
1a7d9c95717a359bb2a8435c597eda36c9235fab
[ "BSD-3-Clause-Clear" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) 2013-2022, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ----------------------------------------------...
29.5625
80
0.46723
from qtpy import ( API as QT_API, PYQT5_API, PYSIDE2_API, PYQT6_API, PYSIDE6_API, QT_VERSION, )
true
true