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
f7f41cabd57be3a375096fd256d70cfe5f66f6b2
2,615
py
Python
pyroms_toolbox/pyroms_toolbox/__init__.py
ChuningWang/pyroms
4f3773d39683ce78e76b30d0e41955f47d56edc2
[ "BSD-3-Clause" ]
null
null
null
pyroms_toolbox/pyroms_toolbox/__init__.py
ChuningWang/pyroms
4f3773d39683ce78e76b30d0e41955f47d56edc2
[ "BSD-3-Clause" ]
null
null
null
pyroms_toolbox/pyroms_toolbox/__init__.py
ChuningWang/pyroms
4f3773d39683ce78e76b30d0e41955f47d56edc2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python ''' PYROMS_TOOLBOX is a toolbox for working with ROMS ocean models input/output files based on PYROMS pyroms and pyroms_toolbox are based on the python/numpy/matplotlib scientific python suite. NetCDF I/O is based on the NetCDF4-python package. ''' from .iview import iview from .jview import jv...
33.525641
67
0.848948
from .iview import iview from .jview import jview from .lonview import lonview from .latview import latview from .sview import sview from .zview import zview from .isoview import isoview from .twoDview import twoDview from .transectview import transectview from .quiver import quiver from . import seawater from .N2 i...
true
true
f7f41cc55d3a216279e6c67770f8086fd5003b53
335
py
Python
server/migrations/0073_remove_machine_report_format.py
nathandarnell/sal
464414a2666e39bdf5b4b0033a84d5129c93c053
[ "Apache-2.0" ]
215
2015-05-04T16:57:56.000Z
2022-03-07T12:58:12.000Z
server/migrations/0073_remove_machine_report_format.py
nathandarnell/sal
464414a2666e39bdf5b4b0033a84d5129c93c053
[ "Apache-2.0" ]
243
2015-07-04T18:10:56.000Z
2022-02-27T18:52:40.000Z
server/migrations/0073_remove_machine_report_format.py
nathandarnell/sal
464414a2666e39bdf5b4b0033a84d5129c93c053
[ "Apache-2.0" ]
90
2015-06-29T19:26:58.000Z
2022-02-17T19:03:00.000Z
# Generated by Django 1.11 on 2018-04-30 14:28 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('server', '0072_auto_20180430_0920'), ] operations = [ migrations.RemoveField( model_name='machine', name='report_format', ...
17.631579
46
0.6
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('server', '0072_auto_20180430_0920'), ] operations = [ migrations.RemoveField( model_name='machine', name='report_format', ), ]
true
true
f7f41cdc68cfdb893cbae18dfb73372c8e60c551
3,645
py
Python
HouseSpider/HouseSpider/settings.py
wangzihan424/HouseSpider
a3592d4fe4e8bc04a3972dabdbb1edeca3fee036
[ "MIT" ]
null
null
null
HouseSpider/HouseSpider/settings.py
wangzihan424/HouseSpider
a3592d4fe4e8bc04a3972dabdbb1edeca3fee036
[ "MIT" ]
null
null
null
HouseSpider/HouseSpider/settings.py
wangzihan424/HouseSpider
a3592d4fe4e8bc04a3972dabdbb1edeca3fee036
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for HouseSpider project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/la...
35.048077
109
0.78107
BOT_NAME = 'HouseSpider' SPIDER_MODULES = ['HouseSpider.spiders'] NEWSPIDER_MODULE = 'HouseSpider.spiders' ROBOTSTXT_OBEY = False Y = 0.1 COOKIES_ENABLED = False DOWNLOADER_MIDDLEWARES = { 'scrapy.contrib.downloadermiddleware.useragent.UserAgentMiddleware': None, ...
true
true
f7f41cfdbb038190bb99272991c95bf9a226ed5d
5,358
py
Python
catkin_ws/src/mrta/src/DataGenerator.py
wyyfkim/MRTA
fab515569d3434cae01733c702fc0e1afc73b552
[ "MIT" ]
1
2020-03-10T04:43:48.000Z
2020-03-10T04:43:48.000Z
catkin_ws/src/mrta/src/DataGenerator.py
wyyfkim/MRTA
fab515569d3434cae01733c702fc0e1afc73b552
[ "MIT" ]
1
2020-03-10T05:38:16.000Z
2020-03-10T05:38:16.000Z
catkin_ws/src/mrta/src/DataGenerator.py
wyyfkim/MRTA
fab515569d3434cae01733c702fc0e1afc73b552
[ "MIT" ]
1
2019-04-10T02:49:23.000Z
2019-04-10T02:49:23.000Z
import os, sys import argparse import pickle from numpy import random from Task import Task from PrecedenceGraph import PrecedenceGraph, Node from Robot import Robot from Logger import Logger, LogLevel class DataSet: def __init__(self, p_graphs, robots, beta, bid_alpha, cost_alpha): self.p_graphs = p_grap...
30.443182
120
0.594625
import os, sys import argparse import pickle from numpy import random from Task import Task from PrecedenceGraph import PrecedenceGraph, Node from Robot import Robot from Logger import Logger, LogLevel class DataSet: def __init__(self, p_graphs, robots, beta, bid_alpha, cost_alpha): self.p_graphs = p_grap...
true
true
f7f41d3bfaf7babd616b4330fe7dbdbe20916963
33,661
py
Python
vnpy_optionmaster/ui/manager.py
noranhe/vnpy_optionmaster
180c85f92004d1092bc45032dc31585539de9768
[ "MIT" ]
null
null
null
vnpy_optionmaster/ui/manager.py
noranhe/vnpy_optionmaster
180c85f92004d1092bc45032dc31585539de9768
[ "MIT" ]
null
null
null
vnpy_optionmaster/ui/manager.py
noranhe/vnpy_optionmaster
180c85f92004d1092bc45032dc31585539de9768
[ "MIT" ]
null
null
null
from typing import Dict, List, Tuple, Optional from copy import copy from functools import partial from scipy import interpolate from vnpy.event import Event, EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtWidgets, QtCore, QtGui from vnpy.trader.event import EVENT_TICK, EVENT_TIMER...
33.898288
111
0.600992
from typing import Dict, List, Tuple, Optional from copy import copy from functools import partial from scipy import interpolate from vnpy.event import Event, EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtWidgets, QtCore, QtGui from vnpy.trader.event import EVENT_TICK, EVENT_TIMER...
true
true
f7f41e22289e3b364c15513be0edf12543f5b886
4,040
py
Python
src/lib/phdi-building-blocks/tests/test_linkage.py
CDCgov/prime-data-ingestion
d0eb9c25999a9280a91b11583c3e131783b13c17
[ "Apache-2.0" ]
1
2021-12-20T17:37:52.000Z
2021-12-20T17:37:52.000Z
src/lib/phdi-building-blocks/tests/test_linkage.py
CDCgov/prime-data-ingestion
d0eb9c25999a9280a91b11583c3e131783b13c17
[ "Apache-2.0" ]
7
2022-01-26T17:57:13.000Z
2022-02-02T18:51:58.000Z
src/lib/phdi-building-blocks/tests/test_linkage.py
CDCgov/prime-data-ingestion
d0eb9c25999a9280a91b11583c3e131783b13c17
[ "Apache-2.0" ]
1
2021-12-21T15:55:02.000Z
2021-12-21T15:55:02.000Z
from phdi_building_blocks.linkage import generate_hash_str, add_patient_identifier def test_generate_hash(): salt_str = "super-legit-salt" patient_1 = "John-Shepard-2153/11/07-1234 Silversun Strip Zakera Ward Citadel 99999" patient_2 = "Tali-Zora-Vas-Normandy-2160/05/14-PO Box 1 Rock Rannoch" hash_1...
34.237288
88
0.437624
from phdi_building_blocks.linkage import generate_hash_str, add_patient_identifier def test_generate_hash(): salt_str = "super-legit-salt" patient_1 = "John-Shepard-2153/11/07-1234 Silversun Strip Zakera Ward Citadel 99999" patient_2 = "Tali-Zora-Vas-Normandy-2160/05/14-PO Box 1 Rock Rannoch" hash_1...
true
true
f7f41e78ab51f3fa6a9276832b59ea545804484d
40,353
py
Python
core/domain/topic_domain_test.py
OsamaAdam98/oppia
9c9c3d0fc6710f58394c5e28d414043340ed2a62
[ "Apache-2.0" ]
2
2019-03-31T07:03:32.000Z
2019-04-24T18:12:53.000Z
core/domain/topic_domain_test.py
OsamaAdam98/oppia
9c9c3d0fc6710f58394c5e28d414043340ed2a62
[ "Apache-2.0" ]
3
2019-08-01T18:38:54.000Z
2019-08-12T03:02:59.000Z
core/domain/topic_domain_test.py
RafayGhafoor/oppia
855d02414ca00d0807d841e48be7ce7b94d68c29
[ "Apache-2.0" ]
1
2020-03-15T14:29:55.000Z
2020-03-15T14:29:55.000Z
# coding: utf-8 # # Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
42.25445
80
0.666493
from __future__ import absolute_import from __future__ import unicode_literals import datetime from constants import constants from core.domain import topic_domain from core.domain import user_services from core.tests import test_utils import feconf import utils class TopicDomainUnitTests(test_...
true
true
f7f41edaa8db8511784f4d9a2ac59a50dabbc388
6,491
py
Python
nematus/data_iterator.py
JeffreyJosanne/nematus_tf
582be1eeba2920bfa8cc064fa642c429f5eddd6d
[ "BSD-3-Clause" ]
null
null
null
nematus/data_iterator.py
JeffreyJosanne/nematus_tf
582be1eeba2920bfa8cc064fa642c429f5eddd6d
[ "BSD-3-Clause" ]
null
null
null
nematus/data_iterator.py
JeffreyJosanne/nematus_tf
582be1eeba2920bfa8cc064fa642c429f5eddd6d
[ "BSD-3-Clause" ]
null
null
null
import numpy import gzip import shuffle from util import load_dict def fopen(filename, mode='r'): if filename.endswith('.gz'): return gzip.open(filename, mode) return open(filename, mode) class FileWrapper(object): def __init__(self, fname): self.pos = 0 self.lines = fopen(fname)...
32.61809
126
0.523494
import numpy import gzip import shuffle from util import load_dict def fopen(filename, mode='r'): if filename.endswith('.gz'): return gzip.open(filename, mode) return open(filename, mode) class FileWrapper(object): def __init__(self, fname): self.pos = 0 self.lines = fopen(fname)...
true
true
f7f41f4f5584dc3356a4004f8bef0c63adcd12ef
558
py
Python
Mundo 1/desafios/desafio018-Seno Cosseno Tangente.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
1
2021-11-21T21:04:04.000Z
2021-11-21T21:04:04.000Z
Mundo 1/desafios/desafio018-Seno Cosseno Tangente.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
null
null
null
Mundo 1/desafios/desafio018-Seno Cosseno Tangente.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
null
null
null
# faça um programa que leia um angulo qualquer e mostre na tela o valor do seno, cosseno \ # e tangente desse angulo #minha resposta 1 (as funcoes sin, cos e tan funcionam com radioano from math import sin, cos, tan, radians ang = float(input('Digite o angulo que voce deseja: ')) sin = sin(radians(ang)) cos = cos(radi...
46.5
90
0.691756
from math import sin, cos, tan, radians ang = float(input('Digite o angulo que voce deseja: ')) sin = sin(radians(ang)) cos = cos(radians(ang)) tan = tan(radians(ang)) print('O ângulo de {:.2f} tem o SENO de {:.2f}'.format(ang, sin)) print('O ângulo de {:.2f} tem o COSSENO de {:.2f}'.format(ang, cos)) print('O ângu...
true
true
f7f41fe9e2f27eaacd2434723e96dbcc82fffe85
982
py
Python
behind/users/urls.py
SilverNine/behind
739b866713a2f2cb7154ac8197c256ee14fd1a0d
[ "MIT" ]
null
null
null
behind/users/urls.py
SilverNine/behind
739b866713a2f2cb7154ac8197c256ee14fd1a0d
[ "MIT" ]
6
2020-06-05T18:26:15.000Z
2021-06-10T20:22:47.000Z
behind/users/urls.py
SilverNine/behind
739b866713a2f2cb7154ac8197c256ee14fd1a0d
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views app_name = "users" urlpatterns = [ url( regex=r'^explore/$', view=views.ExploreUsers.as_view(), name='explore_users' ), url( regex=r'^search/$', view=views.Search.as_view(), name='search' ), url( ...
23.380952
49
0.531568
from django.conf.urls import url from . import views app_name = "users" urlpatterns = [ url( regex=r'^explore/$', view=views.ExploreUsers.as_view(), name='explore_users' ), url( regex=r'^search/$', view=views.Search.as_view(), name='search' ), url( ...
true
true
f7f4208ae359bc2e507162385cdc793dbb205419
1,796
py
Python
drimg/functions.py
hojjat-faryabi/drawable_image
3a5f3a2c11a5fc176e035f2306f8077dc9b0277e
[ "MIT" ]
1
2021-09-19T15:23:10.000Z
2021-09-19T15:23:10.000Z
drimg/functions.py
hojjat-faryabi/drawable_image
3a5f3a2c11a5fc176e035f2306f8077dc9b0277e
[ "MIT" ]
null
null
null
drimg/functions.py
hojjat-faryabi/drawable_image
3a5f3a2c11a5fc176e035f2306f8077dc9b0277e
[ "MIT" ]
null
null
null
from PIL import Image import os import pathlib from .constants import * def calcDP(px): index = -1 if px in SIZES_PX: index = SIZES_PX.index(px) else: for item in SIZES_PX: if item > px: index = SIZES_PX.index(item) break if index == -1: ...
22.734177
87
0.589644
from PIL import Image import os import pathlib from .constants import * def calcDP(px): index = -1 if px in SIZES_PX: index = SIZES_PX.index(px) else: for item in SIZES_PX: if item > px: index = SIZES_PX.index(item) break if index == -1: ...
true
true
f7f420cbcc6938382bc7e97572c4600d98244384
1,351
py
Python
setup.py
ErinMorelli/em-slack-tableflip
2450f3a71baa4a43a0f879e644b0847600303380
[ "MIT" ]
51
2015-08-06T19:41:47.000Z
2022-03-11T20:59:19.000Z
setup.py
ErinMorelli/em-slack-tableflip
2450f3a71baa4a43a0f879e644b0847600303380
[ "MIT" ]
5
2016-10-13T18:42:54.000Z
2021-12-02T16:07:02.000Z
setup.py
ErinMorelli/em-slack-tableflip
2450f3a71baa4a43a0f879e644b0847600303380
[ "MIT" ]
9
2016-01-22T22:53:36.000Z
2022-01-12T17:45:45.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Copyright (c) 2015-2021 Erin Morelli. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights...
28.744681
69
0.680977
from setuptools import setup, find_packages setup( name='em-slack-tableflip', version=open('VERSION').read(), author='Erin Morelli', author_email='me@erin.dev', url='https://slack-tableflip.herokuapp.com', license='MIT', platforms='Linux, OSX', description='Flip some tables on Slack...
true
true
f7f420dcd731d6cf8a90325a837e613c53a233d7
5,972
py
Python
sdk/python/pulumi_azure/lb/nat_pool.py
stack72/pulumi-azure
18245b4e74abbd3f768f9eda67adb1df609ff32e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/lb/nat_pool.py
stack72/pulumi-azure
18245b4e74abbd3f768f9eda67adb1df609ff32e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/lb/nat_pool.py
stack72/pulumi-azure
18245b4e74abbd3f768f9eda67adb1df609ff32e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class NatPool(pulumi.CustomResource):...
47.776
278
0.704789
import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class NatPool(pulumi.CustomResource): backend_port: pulumi.Output[float] frontend_ip_configuration_id: pulumi.Output[str] frontend_ip_configuration_name: pulumi.Output[str] frontend_port_end: pulumi.Out...
true
true
f7f4235517be0fb1c8e7c4491ad2825000579759
21,701
py
Python
pokemongo_bot/cell_workers/move_to_map_pokemon.py
timgates42/PokemonGo-Bot
5e80f20760f32478a84a8f0ced7ca24cdf41fe03
[ "MIT" ]
5,362
2016-07-21T02:38:46.000Z
2022-03-23T13:34:51.000Z
pokemongo_bot/cell_workers/move_to_map_pokemon.py
timgates42/PokemonGo-Bot
5e80f20760f32478a84a8f0ced7ca24cdf41fe03
[ "MIT" ]
5,897
2016-07-21T05:05:49.000Z
2022-03-17T09:21:35.000Z
pokemongo_bot/cell_workers/move_to_map_pokemon.py
timgates42/PokemonGo-Bot
5e80f20760f32478a84a8f0ced7ca24cdf41fe03
[ "MIT" ]
3,379
2016-07-21T02:38:48.000Z
2022-03-30T02:46:57.000Z
# -*- coding: utf-8 -*- """ Moves a trainer to a Pokemon. Events: move_to_map_pokemon When a generic message is logged Returns: message: Log message. move_to_map_pokemon_fail When the worker fails. Returns: message: Failure message. move_to_map_poke...
40.791353
194
0.606332
from __future__ import unicode_literals import os import time import json import requests from pokemongo_bot import inventory from pokemongo_bot.base_dir import _base_dir from pokemongo_bot.cell_workers.utils import distance, format_dist, format_time, fort_details from pokemongo_bot.walkers.walker_factory import wa...
true
true
f7f424ccd90f69485342448ad5bf957dcf9b6570
8,591
py
Python
pytorch/utils.py
joeranbosma/ModelsGenesis
24ae94cbc1b2ae15d95771f249d6443369ba0742
[ "MIT" ]
574
2019-10-01T02:30:56.000Z
2022-03-29T07:34:08.000Z
pytorch/utils.py
luisfilipeap/ModelsGenesis
5b18ea88d662e5250523434d02cfdcb6b527e634
[ "MIT" ]
52
2019-10-11T02:43:21.000Z
2022-03-14T03:10:57.000Z
pytorch/utils.py
luisfilipeap/ModelsGenesis
5b18ea88d662e5250523434d02cfdcb6b527e634
[ "MIT" ]
143
2019-10-01T13:38:10.000Z
2022-03-29T02:26:04.000Z
from __future__ import print_function import math import os import random import copy import scipy import imageio import string import numpy as np from skimage.transform import resize try: # SciPy >= 0.19 from scipy.special import comb except ImportError: from scipy.misc import comb def bernstein_poly(i, n, t...
42.112745
129
0.600047
from __future__ import print_function import math import os import random import copy import scipy import imageio import string import numpy as np from skimage.transform import resize try: from scipy.special import comb except ImportError: from scipy.misc import comb def bernstein_poly(i, n, t): return ...
true
true
f7f428befe91cd3b1559cbd4451c77288a712c2a
6,731
py
Python
sdk/python/pulumi_azure_native/apimanagement/v20170301/api_policy.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20170301/api_policy.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20170301/api_policy.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
52.585938
1,409
0.676274
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = ['ApiPolicy'] class ApiPolicy(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi...
true
true
f7f428e72ba7540ca0e54872eae615627aa04762
2,370
py
Python
lib/ingest/tests/test_py_hdfs.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
50
2018-09-27T13:03:45.000Z
2021-04-06T15:36:59.000Z
lib/ingest/tests/test_py_hdfs.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
null
null
null
lib/ingest/tests/test_py_hdfs.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
14
2018-10-03T20:36:15.000Z
2021-05-18T07:08:57.000Z
import unittest from mock import patch from lib.ingest.py_hdfs import PyHDFS BASE_DIR = '/user/dev/data/checks_balances/' class PopenClose(object): def close(self): pass class PopenOut(object): def __init__(self, std_out): self.stdout = std_out self.returncode = 0 def communica...
29.259259
78
0.638819
import unittest from mock import patch from lib.ingest.py_hdfs import PyHDFS BASE_DIR = '/user/dev/data/checks_balances/' class PopenClose(object): def close(self): pass class PopenOut(object): def __init__(self, std_out): self.stdout = std_out self.returncode = 0 def communica...
true
true
f7f42909824e13101e2b6790665ab96a7152e004
1,107
py
Python
app/artworks/urls/user_urls.py
Vadee-art/backend
9b068d6ed11c1ffeccc13c4be67f1bb87a12d6ad
[ "MIT" ]
null
null
null
app/artworks/urls/user_urls.py
Vadee-art/backend
9b068d6ed11c1ffeccc13c4be67f1bb87a12d6ad
[ "MIT" ]
null
null
null
app/artworks/urls/user_urls.py
Vadee-art/backend
9b068d6ed11c1ffeccc13c4be67f1bb87a12d6ad
[ "MIT" ]
null
null
null
from django.urls import path from artworks.views import user_views as views urlpatterns = [ path('login/', views.MyTokenObtainPairView.as_view(), name='token_obtain_pair'), path('register/', views.registerUser, name='register'), path('profile/', views.fetchUserProfile, name='users_profile'), ...
52.714286
98
0.725384
from django.urls import path from artworks.views import user_views as views urlpatterns = [ path('login/', views.MyTokenObtainPairView.as_view(), name='token_obtain_pair'), path('register/', views.registerUser, name='register'), path('profile/', views.fetchUserProfile, name='users_profile'), ...
true
true
f7f4298ed360b057a74c12a0b99ed8d232254930
1,343
py
Python
src/pretix/api/pagination.py
andynd/pretix
edef9f1b23a775b50c0bacacd40a4bbd5d77dcae
[ "Apache-2.0" ]
1,248
2015-04-24T13:32:06.000Z
2022-03-29T07:01:36.000Z
src/pretix/api/pagination.py
andynd/pretix
edef9f1b23a775b50c0bacacd40a4bbd5d77dcae
[ "Apache-2.0" ]
2,113
2015-02-18T18:58:16.000Z
2022-03-31T11:12:32.000Z
src/pretix/api/pagination.py
thegcat/pretix
451d3fce0575d85a0ea93fd64aa0631feaced967
[ "Apache-2.0" ]
453
2015-05-13T09:29:06.000Z
2022-03-24T13:39:16.000Z
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
47.964286
118
0.782576
from rest_framework.pagination import PageNumberPagination class Pagination(PageNumberPagination): page_size_query_param = 'page_size' max_page_size = 50
true
true
f7f429e1b801066b217f93e9623c06124e3c5857
76,086
py
Python
src/transformers/modeling_mobilebert.py
mattiaguerri/transformers
ebc36108dc1c20985905c79f7d6a00f57f3cd3ae
[ "Apache-2.0" ]
647
2020-10-27T01:35:35.000Z
2022-03-29T12:59:11.000Z
src/transformers/modeling_mobilebert.py
mattiaguerri/transformers
ebc36108dc1c20985905c79f7d6a00f57f3cd3ae
[ "Apache-2.0" ]
18
2020-11-01T17:57:59.000Z
2022-03-16T06:33:40.000Z
src/transformers/modeling_mobilebert.py
mattiaguerri/transformers
ebc36108dc1c20985905c79f7d6a00f57f3cd3ae
[ "Apache-2.0" ]
38
2020-10-29T12:35:30.000Z
2022-03-24T20:48:07.000Z
# MIT License # # Copyright (c) 2020 The Google AI Language Team Authors, The HuggingFace Inc. team and github/lonePatient # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restricti...
46.507335
163
0.673724
import logging import math import os import warnings import torch import torch.nn.functional as F from torch import nn from torch.nn import CrossEntropyLoss, MSELoss from transformers.modeling_bert import BertIntermediate from .activations import gelu, gelu_new, swish from .configuration_mobile...
true
true
f7f42aa5cd7079bb3433259255e9267c54538edd
3,300
py
Python
fbpcp/service/mpc_game.py
zehuali/fbpcp
a543ffcdb64eaa20d9b6bcd870b453705cc22993
[ "MIT" ]
null
null
null
fbpcp/service/mpc_game.py
zehuali/fbpcp
a543ffcdb64eaa20d9b6bcd870b453705cc22993
[ "MIT" ]
null
null
null
fbpcp/service/mpc_game.py
zehuali/fbpcp
a543ffcdb64eaa20d9b6bcd870b453705cc22993
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import logging from typing import Any, Dict, Optional, Tuple from fbpcp.entity.mpc_game_config import M...
33.333333
80
0.621818
import logging from typing import Any, Dict, Optional, Tuple from fbpcp.entity.mpc_game_config import MPCGameConfig from fbpcp.entity.mpc_instance import MPCParty from fbpcp.repository.mpc_game_repository import MPCGameRepository from fbpcp.util.arg_builder import build_cmd_args LIFT_GAME_NAME = "lift" LIFT_A...
true
true
f7f42ac48629705b065f589cb94395e189677c57
1,238
py
Python
ensembling/make_submit.py
sergeyshilin/kaggle-statoil-iceberg-classifier-challenge
fa5c7e721297d9e1478593951b4d9cf16a0cd66d
[ "MIT" ]
15
2018-01-24T04:48:38.000Z
2020-08-11T18:53:08.000Z
ensembling/make_submit.py
sergeyshilin/kaggle-statoil-iceberg-classifier-challenge
fa5c7e721297d9e1478593951b4d9cf16a0cd66d
[ "MIT" ]
null
null
null
ensembling/make_submit.py
sergeyshilin/kaggle-statoil-iceberg-classifier-challenge
fa5c7e721297d9e1478593951b4d9cf16a0cd66d
[ "MIT" ]
7
2018-01-24T03:58:08.000Z
2021-02-09T14:56:58.000Z
import sys import pandas as pd import numpy as np from sklearn.metrics import log_loss power = float(sys.argv[1]) def transform(preds): return preds ** power / (preds ** power + (1.0 - preds) ** power) with open('submit_id', 'r') as submit_id: last_submit_id = int(submit_id.read()) last_submit_id = str(last...
33.459459
93
0.738288
import sys import pandas as pd import numpy as np from sklearn.metrics import log_loss power = float(sys.argv[1]) def transform(preds): return preds ** power / (preds ** power + (1.0 - preds) ** power) with open('submit_id', 'r') as submit_id: last_submit_id = int(submit_id.read()) last_submit_id = str(last...
true
true
f7f42b1c16c4d37dcb80e47143ca6327a15119e7
12,129
py
Python
tools/benchmark_tool/openvino/tools/benchmark/parameters.py
chccc1994/openvino
41f7893ae81d186d15c1754b179bf32a66d03bcf
[ "Apache-2.0" ]
1
2020-11-19T15:53:18.000Z
2020-11-19T15:53:18.000Z
tools/benchmark_tool/openvino/tools/benchmark/parameters.py
chccc1994/openvino
41f7893ae81d186d15c1754b179bf32a66d03bcf
[ "Apache-2.0" ]
44
2020-12-09T12:38:22.000Z
2022-03-28T13:18:29.000Z
tools/benchmark_tool/openvino/tools/benchmark/parameters.py
PoliOwl/openvino
27fa64031b4f46fdb05ae64ca0f425072808cdd7
[ "Apache-2.0" ]
4
2021-09-29T20:44:49.000Z
2021-10-20T13:02:12.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import sys,argparse from fnmatch import fnmatch from openvino.tools.benchmark.utils.utils import show_available_devices def str2bool(v): if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no...
81.402685
236
0.615055
import sys,argparse from fnmatch import fnmatch from openvino.tools.benchmark.utils.utils import show_available_devices def str2bool(v): if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argpars...
true
true
f7f42cbd6cfe5e9e47ec198146eb106e73af5d56
4,252
py
Python
descriptastorus/cli/storus.py
sharmavaruns/descriptastorus
7a3e457bc64e480e44f0ce624052da68d2a27bad
[ "BSD-3-Clause" ]
118
2019-01-15T23:04:29.000Z
2022-03-25T01:31:06.000Z
descriptastorus/cli/storus.py
sharmavaruns/descriptastorus
7a3e457bc64e480e44f0ce624052da68d2a27bad
[ "BSD-3-Clause" ]
14
2019-02-15T17:15:46.000Z
2022-03-10T14:18:56.000Z
descriptastorus/cli/storus.py
sharmavaruns/descriptastorus
7a3e457bc64e480e44f0ce624052da68d2a27bad
[ "BSD-3-Clause" ]
40
2018-12-18T11:39:38.000Z
2022-03-23T09:45:45.000Z
# Copyright (c) 2018, Novartis Institutes for BioMedical Research Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright ...
45.72043
108
0.706256
from __future__ import print_function from descriptastorus import append_store, make_store import argparse, logging, os, shutil, time import sys from rdkit import rdBase rdBase.DisableLog("rdApp.*") parser = argparse.ArgumentParser() parser.add_argument("smilesfile", ...
true
true
f7f42d0aa0279672f3a0885035d959ce97fd03eb
2,278
py
Python
main/hw2_1_threads.py
v-v-d/Python_client-server_apps
5741c92dc5324ae8af2c7102d95f63c57e71b4c7
[ "MIT" ]
null
null
null
main/hw2_1_threads.py
v-v-d/Python_client-server_apps
5741c92dc5324ae8af2c7102d95f63c57e71b4c7
[ "MIT" ]
null
null
null
main/hw2_1_threads.py
v-v-d/Python_client-server_apps
5741c92dc5324ae8af2c7102d95f63c57e71b4c7
[ "MIT" ]
1
2020-02-27T08:08:26.000Z
2020-02-27T08:08:26.000Z
import subprocess import threading import ipaddress from tabulate import tabulate class ParallelHostRangePing: def __init__(self, from_ip_addr, to_ip_addr): self.from_ip_addr = from_ip_addr self.to_ip_addr = to_ip_addr self._ping_status_list = [] self._ping_threads = [] def is...
35.59375
110
0.68964
import subprocess import threading import ipaddress from tabulate import tabulate class ParallelHostRangePing: def __init__(self, from_ip_addr, to_ip_addr): self.from_ip_addr = from_ip_addr self.to_ip_addr = to_ip_addr self._ping_status_list = [] self._ping_threads = [] def is...
true
true
f7f42db9b9ea51f742fe8a5eb21c857d1e024694
84
py
Python
app/apps.py
impressai/cloudfront-django-setup
0758fddc6986e999421ea4cb7713ce257cacad26
[ "MIT" ]
1
2020-09-18T16:31:57.000Z
2020-09-18T16:31:57.000Z
app/apps.py
impressai/cloudfront-django-setup
0758fddc6986e999421ea4cb7713ce257cacad26
[ "MIT" ]
10
2019-12-05T04:34:23.000Z
2022-03-11T23:56:27.000Z
app/apps.py
impressai/cloudfront-django-setup
0758fddc6986e999421ea4cb7713ce257cacad26
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ApiAppConfig(AppConfig): name = 'app'
14
33
0.738095
from django.apps import AppConfig class ApiAppConfig(AppConfig): name = 'app'
true
true
f7f42e708e954a7c2ac87a4c357b059c27f8fd08
618
py
Python
rfcomm_client_led.py
chenphilip888/rpi3b-bluetooth
6b149b14f630092ca0abfbb99034b82fafa3a44e
[ "MIT" ]
null
null
null
rfcomm_client_led.py
chenphilip888/rpi3b-bluetooth
6b149b14f630092ca0abfbb99034b82fafa3a44e
[ "MIT" ]
null
null
null
rfcomm_client_led.py
chenphilip888/rpi3b-bluetooth
6b149b14f630092ca0abfbb99034b82fafa3a44e
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import bluetooth import sys import time uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ee" service_matches = bluetooth.find_service( uuid = uuid ) if len(service_matches) == 0: print("couldn't find the FooBar service") sys.exit(0) first_match = service_matches[0] port = first_match["port"] nam...
19.935484
55
0.690939
import bluetooth import sys import time uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ee" service_matches = bluetooth.find_service( uuid = uuid ) if len(service_matches) == 0: print("couldn't find the FooBar service") sys.exit(0) first_match = service_matches[0] port = first_match["port"] name = first_match["n...
true
true
f7f42f0ea5da15bfbe7816400c336946ad55b119
3,153
py
Python
validation/new/bare_model.py
FoVNull/MFDSL
8c6fc99260c1c02f4f45cfb14a111028d2a96ded
[ "MIT" ]
2
2021-12-08T05:45:19.000Z
2022-03-04T01:00:32.000Z
validation/new/bare_model.py
FoVNull/MFDSL
8c6fc99260c1c02f4f45cfb14a111028d2a96ded
[ "MIT" ]
null
null
null
validation/new/bare_model.py
FoVNull/MFDSL
8c6fc99260c1c02f4f45cfb14a111028d2a96ded
[ "MIT" ]
null
null
null
from typing import Dict, Any import tensorflow as tf from tensorflow.keras.utils import plot_model from kashgari_local.abc_feature_model import ABCClassificationModel from kashgari.layers import L class Bare_Model(ABCClassificationModel): def __init__(self, embedding, **params): super().__init__(embeddin...
33.903226
100
0.607358
from typing import Dict, Any import tensorflow as tf from tensorflow.keras.utils import plot_model from kashgari_local.abc_feature_model import ABCClassificationModel from kashgari.layers import L class Bare_Model(ABCClassificationModel): def __init__(self, embedding, **params): super().__init__(embeddin...
true
true
f7f42f4357cda576a0f16c469b9be8109b7b75bf
1,790
py
Python
builder/template_app/build.py
ufopilot/QT-App-Builder
af9c455b4122669d5f200728d467f5afe4f3ee87
[ "MIT" ]
null
null
null
builder/template_app/build.py
ufopilot/QT-App-Builder
af9c455b4122669d5f200728d467f5afe4f3ee87
[ "MIT" ]
null
null
null
builder/template_app/build.py
ufopilot/QT-App-Builder
af9c455b4122669d5f200728d467f5afe4f3ee87
[ "MIT" ]
null
null
null
import json, os import subprocess import locale import shutil locale.setlocale(locale.LC_ALL,'en-US') #copy settings folder to dist #shutil.copytree('gui/settings', 'dist/', dirs_exist_ok=True) if not os.path.exists("dist/settings"): os.makedirs("dist/settings") for __file in ("ui_settings.json", "theme_set...
29.833333
76
0.577095
import json, os import subprocess import locale import shutil locale.setlocale(locale.LC_ALL,'en-US') if not os.path.exists("dist/settings"): os.makedirs("dist/settings") for __file in ("ui_settings.json", "theme_settings.json"): print(f"copy {__file}") shutil.copy(f"gui/settings\\{__file}", f"dis...
true
true
f7f42fe3783833eb76cfe814dc981f8d40edb2da
4,972
py
Python
resources/draw1.py
sandeepsn1997/civilapp
749027e904924575f60883c5d44688101f7e9864
[ "MIT" ]
null
null
null
resources/draw1.py
sandeepsn1997/civilapp
749027e904924575f60883c5d44688101f7e9864
[ "MIT" ]
null
null
null
resources/draw1.py
sandeepsn1997/civilapp
749027e904924575f60883c5d44688101f7e9864
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt def draw_line_x(ox, oy, x, y, length): for i in range(length+1): ox.append(x+i) oy.append(y) return ox, oy def draw_line_y(ox, oy, x, y, length): for i in range(length+1): ox.append(x) oy.append(y+i) return ox, oy def draw_sqr(ox, oy, ...
28.25
68
0.592518
import matplotlib.pyplot as plt def draw_line_x(ox, oy, x, y, length): for i in range(length+1): ox.append(x+i) oy.append(y) return ox, oy def draw_line_y(ox, oy, x, y, length): for i in range(length+1): ox.append(x) oy.append(y+i) return ox, oy def draw_sqr(ox, oy, ...
true
true
f7f430b487c5929488c96ff1e3fae158917d68cc
29
py
Python
asymmetric_uncertainties/__init__.py
muryelgp/asymmetric_uncertainties
7d16e07d46a14603d595778ec6deb509bd11743d
[ "MIT" ]
null
null
null
asymmetric_uncertainties/__init__.py
muryelgp/asymmetric_uncertainties
7d16e07d46a14603d595778ec6deb509bd11743d
[ "MIT" ]
null
null
null
asymmetric_uncertainties/__init__.py
muryelgp/asymmetric_uncertainties
7d16e07d46a14603d595778ec6deb509bd11743d
[ "MIT" ]
null
null
null
from .core import aufloat
9.666667
26
0.724138
from .core import aufloat
true
true
f7f430cf71e1aecb7d9abaadcff32cf7704793f0
454
py
Python
watchmen/raw_data/model_field.py
Insurance-Metrics-Measure-Advisory/watchman-data-connector
8ecab0c5b28174f1611e51deba8d94a42f53d51d
[ "MIT" ]
125
2021-03-13T07:39:46.000Z
2022-02-28T03:14:17.000Z
watchmen/raw_data/model_field.py
Insurance-Metrics-Measure-Advisory/watchman-data-connector
8ecab0c5b28174f1611e51deba8d94a42f53d51d
[ "MIT" ]
null
null
null
watchmen/raw_data/model_field.py
Insurance-Metrics-Measure-Advisory/watchman-data-connector
8ecab0c5b28174f1611e51deba8d94a42f53d51d
[ "MIT" ]
17
2021-03-13T07:31:58.000Z
2021-05-20T09:38:02.000Z
from enum import Enum from typing import Optional from model.model.common.watchmen_model import WatchmenModel class FieldType(str, Enum): NUM = "num" STR = "str" DATE = "date" time = "time" EMAIL = "email" ADDR = "address" PHONE = "phone" IdCard = "IDCard" class ModelField(WatchmenM...
18.916667
59
0.634361
from enum import Enum from typing import Optional from model.model.common.watchmen_model import WatchmenModel class FieldType(str, Enum): NUM = "num" STR = "str" DATE = "date" time = "time" EMAIL = "email" ADDR = "address" PHONE = "phone" IdCard = "IDCard" class ModelField(WatchmenM...
true
true
f7f4323e0853370a98fd843282c7e94c90bf80b5
4,857
py
Python
uuv_control/uuv_control_utils/scripts/start_circular_trajectory.py
jpliquid/testActions2
6f314fa1430f654e5943e47ac278101b9c24f938
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
uuv_control/uuv_control_utils/scripts/start_circular_trajectory.py
jpliquid/testActions2
6f314fa1430f654e5943e47ac278101b9c24f938
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
uuv_control/uuv_control_utils/scripts/start_circular_trajectory.py
jpliquid/testActions2
6f314fa1430f654e5943e47ac278101b9c24f938
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2020 The Plankton Authors. # All rights reserved. # # This source code is derived from UUV Simulator # (https://github.com/uuvsimulator/uuv_simulator) # Copyright (c) 2016-2019 The UUV Simulator Authors # licensed under the Apache license, Version 2.0 # cf. 3rd-party-licenses.txt ...
34.446809
103
0.670167
import rclpy import sys from numpy import pi from uuv_control_msgs.srv import InitCircularTrajectory from geometry_msgs.msg import Point from std_msgs.msg import Time from plankton_utils.time import time_in_float_sec from plankton_utils import float_sec_to_int_sec_nano from plankton_utils.time ...
false
true
f7f4328ed7300513d61a0658b55ff43d4f7c9c03
49
py
Python
envisage/plugins/ipython_shell/view/api.py
robmcmullen/envisage
57338fcb0ea69c75bc3c86de18a5967d8e78c6c1
[ "BSD-3-Clause" ]
null
null
null
envisage/plugins/ipython_shell/view/api.py
robmcmullen/envisage
57338fcb0ea69c75bc3c86de18a5967d8e78c6c1
[ "BSD-3-Clause" ]
1
2017-05-22T21:15:22.000Z
2017-05-22T21:15:22.000Z
envisage/plugins/ipython_shell/view/api.py
robmcmullen/envisage
57338fcb0ea69c75bc3c86de18a5967d8e78c6c1
[ "BSD-3-Clause" ]
1
2019-10-01T07:03:58.000Z
2019-10-01T07:03:58.000Z
from .ipython_shell_view import IPythonShellView
24.5
48
0.897959
from .ipython_shell_view import IPythonShellView
true
true
f7f432e2884c71fa52ceeef4531935fc810b8632
6,083
py
Python
sim_004_complex_001/module/plot.py
dego1985/wave_simulation
05f5119aab158e0958170d90066c2b87b998e658
[ "MIT" ]
1
2022-01-23T14:42:10.000Z
2022-01-23T14:42:10.000Z
sim_004_complex_001/module/plot.py
dego1985/wave_simulation
05f5119aab158e0958170d90066c2b87b998e658
[ "MIT" ]
null
null
null
sim_004_complex_001/module/plot.py
dego1985/wave_simulation
05f5119aab158e0958170d90066c2b87b998e658
[ "MIT" ]
null
null
null
import numpy as np from glumpy import app, gl, glm, gloo import torch import module.gpu_work as gw class mesh(): def __init__(self, motion): # plane self.motion = motion self.N = N = motion.N[:2] self.dx = dx = motion.dx # vertices X = [dx * (np.arange(N[i]) - N[i...
28.558685
112
0.515864
import numpy as np from glumpy import app, gl, glm, gloo import torch import module.gpu_work as gw class mesh(): def __init__(self, motion): self.motion = motion self.N = N = motion.N[:2] self.dx = dx = motion.dx X = [dx * (np.arange(N[i]) - N[i] * 0.5) for i in...
true
true
f7f4338df08dffce7d0e0fd30efc8a72dfde0455
8,031
py
Python
model.py
WeiChengTseng/Basic_Peptides_Model
0b2bb8f157ec4c9752382eca8ffcbaca94fcaa45
[ "MIT" ]
4
2018-03-26T00:14:48.000Z
2022-01-11T06:00:21.000Z
model.py
WeiChengTseng/Basic_Peptides_Model
0b2bb8f157ec4c9752382eca8ffcbaca94fcaa45
[ "MIT" ]
null
null
null
model.py
WeiChengTseng/Basic_Peptides_Model
0b2bb8f157ec4c9752382eca8ffcbaca94fcaa45
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import math import os class Model(): def __init__(self, num_label, word_dim=10, batch_size=32): self.num_label = num_label self.word_dim = word_dim self.batch_size = batch_size return def build(self, x, y, reg, keep_prob): """...
40.766497
112
0.587847
import tensorflow as tf import numpy as np import math import os class Model(): def __init__(self, num_label, word_dim=10, batch_size=32): self.num_label = num_label self.word_dim = word_dim self.batch_size = batch_size return def build(self, x, y, reg, keep_prob): log...
true
true
f7f4363e814bf5134b315da52f9bbcdd6299fc1e
6,210
py
Python
tensorflow/python/kernel_tests/accumulate_n_test.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tensorflow/python/kernel_tests/accumulate_n_test.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tensorflow/python/kernel_tests/accumulate_n_test.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
# Copyright 2015 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...
38.571429
80
0.675201
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import dtypes as dtypes_lib from tensorflow.python.framework import ops from tensorflow.python.framework import test_util from tensorflow.pytho...
true
true
f7f4381783b3ce17d0526956a59b9ffbe4ffe14c
437
py
Python
tensorflowonspark/util.py
jimdowling/tfspark
0efca1001ec21f01b7948ac1518936aeb130eb65
[ "Apache-2.0" ]
null
null
null
tensorflowonspark/util.py
jimdowling/tfspark
0efca1001ec21f01b7948ac1518936aeb130eb65
[ "Apache-2.0" ]
null
null
null
tensorflowonspark/util.py
jimdowling/tfspark
0efca1001ec21f01b7948ac1518936aeb130eb65
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Yahoo Inc. # Licensed under the terms of the Apache 2.0 license. # Please see LICENSE file in the project root for terms. from __future__ import absolute_import from __future__ import division from __future__ import nested_scopes from __future__ import print_function import socket def get_ip_address...
25.705882
56
0.778032
from __future__ import absolute_import from __future__ import division from __future__ import nested_scopes from __future__ import print_function import socket def get_ip_address(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) return s.getsockname()[0]
true
true
f7f4388df0a168d57409b15e2f24a950535c00bd
395
py
Python
backend/inventory/management/commands/initadmin.py
BENBRIKMouad/cid
3f242553771c60a0fe6400e25f80d8bd86f5c6fb
[ "CC0-1.0" ]
1
2021-08-29T12:09:30.000Z
2021-08-29T12:09:30.000Z
backend/inventory/management/commands/initadmin.py
BENBRIKMouad/cid
3f242553771c60a0fe6400e25f80d8bd86f5c6fb
[ "CC0-1.0" ]
null
null
null
backend/inventory/management/commands/initadmin.py
BENBRIKMouad/cid
3f242553771c60a0fe6400e25f80d8bd86f5c6fb
[ "CC0-1.0" ]
null
null
null
from django.conf import settings from django.core.management.base import BaseCommand from django.contrib.auth.models import User class Command(BaseCommand): def handle(self, *args, **options): if User.objects.count() == 0: User.objects.create_superuser('admin', '', 'admin') else: ...
35.909091
80
0.688608
from django.conf import settings from django.core.management.base import BaseCommand from django.contrib.auth.models import User class Command(BaseCommand): def handle(self, *args, **options): if User.objects.count() == 0: User.objects.create_superuser('admin', '', 'admin') else: ...
true
true
f7f438af7706484a61f56a8be5e44874fa559d8b
628
py
Python
colour_detect.py
riddhigupta1318/menu_driven
1a3e4a8d3ff3dbcd9cffaa87ab9fbc66868d9eb6
[ "Apache-2.0" ]
null
null
null
colour_detect.py
riddhigupta1318/menu_driven
1a3e4a8d3ff3dbcd9cffaa87ab9fbc66868d9eb6
[ "Apache-2.0" ]
null
null
null
colour_detect.py
riddhigupta1318/menu_driven
1a3e4a8d3ff3dbcd9cffaa87ab9fbc66868d9eb6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import cv2 # capture camera start cap=cv2.VideoCapture(0) while cap.isOpened(): status,frame=cap.read() #converting to HSV hsvimg=cv2.cvtColor(frame,cv2.COLOR_BGR2HSV) # MASKING IMAGE for green color imgmask=cv2.inRange(hsvimg,(40,50,50),(80,255,255)) # for blue color ...
21.655172
55
0.667197
import cv2 cap=cv2.VideoCapture(0) while cap.isOpened(): status,frame=cap.read() hsvimg=cv2.cvtColor(frame,cv2.COLOR_BGR2HSV) imgmask=cv2.inRange(hsvimg,(40,50,50),(80,255,255)) redpart=cv2.bitwise_and(frame,frame,mask=imgmask) cv2.imshow('original',frame) ...
true
true
f7f438ec0fd6787713af918cb466f5e1b5c8e3bf
375
py
Python
setup.py
Bidski/calc
79cd4eecf4c7dac91d10d0b4d3797500d1230419
[ "MIT" ]
5
2018-05-28T18:55:35.000Z
2021-03-16T01:38:21.000Z
setup.py
Bidski/calc
79cd4eecf4c7dac91d10d0b4d3797500d1230419
[ "MIT" ]
null
null
null
setup.py
Bidski/calc
79cd4eecf4c7dac91d10d0b4d3797500d1230419
[ "MIT" ]
2
2019-09-25T02:16:46.000Z
2021-02-17T06:21:12.000Z
from setuptools import setup setup( name = "CALC", version = "0.1", author = "Bryan Tripp", author_email = "bptripp@uwaterloo.ca", description = ("Convolutional architecture like cortex."), license = "BSD", keywords = "primate vision convolutional network", url = "https://github.com/bpt...
25
62
0.645333
from setuptools import setup setup( name = "CALC", version = "0.1", author = "Bryan Tripp", author_email = "bptripp@uwaterloo.ca", description = ("Convolutional architecture like cortex."), license = "BSD", keywords = "primate vision convolutional network", url = "https://github.com/bpt...
true
true
f7f439235b35cf4ea29c0e1fe315e04017238520
3,127
py
Python
coupons/admin.py
rsalmaso/django-coupons
27e15403b6aa99997a9e5239949b4c462c0ed2c2
[ "BSD-3-Clause" ]
83
2015-03-09T12:42:38.000Z
2022-03-20T10:48:24.000Z
coupons/admin.py
rsalmaso/django-coupons
27e15403b6aa99997a9e5239949b4c462c0ed2c2
[ "BSD-3-Clause" ]
20
2015-03-23T06:06:48.000Z
2020-09-28T13:03:20.000Z
coupons/admin.py
rsalmaso/django-coupons
27e15403b6aa99997a9e5239949b4c462c0ed2c2
[ "BSD-3-Clause" ]
72
2015-03-23T10:13:08.000Z
2022-02-08T06:34:46.000Z
from django.conf.urls import url from django.contrib import admin from django.contrib import messages from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import TemplateView from .forms import CouponGenerationForm from .models import Coupon, CouponUser, Campaign class CouponUserInl...
33.623656
115
0.651103
from django.conf.urls import url from django.contrib import admin from django.contrib import messages from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import TemplateView from .forms import CouponGenerationForm from .models import Coupon, CouponUser, Campaign class CouponUserInl...
true
true
f7f4399010c2aabffddb9bf2c7a97efe2ba59bdb
4,199
py
Python
download_tn_contents_updated.py
kumarks1122/sushi-chef-khan-academy
38a5b41902cda97b70614ecd7412b5ae53b0b026
[ "MIT" ]
null
null
null
download_tn_contents_updated.py
kumarks1122/sushi-chef-khan-academy
38a5b41902cda97b70614ecd7412b5ae53b0b026
[ "MIT" ]
null
null
null
download_tn_contents_updated.py
kumarks1122/sushi-chef-khan-academy
38a5b41902cda97b70614ecd7412b5ae53b0b026
[ "MIT" ]
null
null
null
from __future__ import print_function from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file, client, tools import tempfile import pdb import json import csv import os import youtube_dl import shutil import requests class DownloadTn(): """docstring for DownloadTn read...
37.828829
187
0.67135
from __future__ import print_function from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file, client, tools import tempfile import pdb import json import csv import os import youtube_dl import shutil import requests class DownloadTn(): def __init__(self): self.conten...
true
true
f7f439dc261267394a4fc43e8322ad4ba6ab1561
3,884
py
Python
benchmark/startQiskit_Class2071.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class2071.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class2071.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=26 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
33.773913
140
0.645726
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: l...
true
true
f7f43a0f9454a0ca4303359fb33025fc7f168461
2,709
py
Python
python/setup.py
VoVAllen/tf-dlpack
cac0e981888a7b1ec213ce28985e5cb1ada87f6b
[ "Apache-2.0" ]
39
2019-11-08T18:41:24.000Z
2022-03-27T18:12:50.000Z
python/setup.py
VoVAllen/tf-dlpack
cac0e981888a7b1ec213ce28985e5cb1ada87f6b
[ "Apache-2.0" ]
12
2019-11-08T17:21:50.000Z
2021-09-21T05:39:31.000Z
python/setup.py
VoVAllen/tf-dlpack
cac0e981888a7b1ec213ce28985e5cb1ada87f6b
[ "Apache-2.0" ]
4
2020-01-19T20:22:51.000Z
2020-05-20T18:21:40.000Z
import os import re import sys import shutil import platform import subprocess from setuptools import find_packages from setuptools import setup, Extension from setuptools.dist import Distribution from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion class BinaryDistribution(Di...
29.769231
86
0.696198
import os import re import sys import shutil import platform import subprocess from setuptools import find_packages from setuptools import setup, Extension from setuptools.dist import Distribution from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion class BinaryDistribution(Di...
true
true
f7f43a52d580a244a3c620710d75e82cd89b1f5c
1,730
py
Python
app/routers/forex_router.py
chanmoto/eurusd_pix2pix
956d5d2025aee265f38e0b0ccfe42dcdb9165ca3
[ "MIT" ]
null
null
null
app/routers/forex_router.py
chanmoto/eurusd_pix2pix
956d5d2025aee265f38e0b0ccfe42dcdb9165ca3
[ "MIT" ]
null
null
null
app/routers/forex_router.py
chanmoto/eurusd_pix2pix
956d5d2025aee265f38e0b0ccfe42dcdb9165ca3
[ "MIT" ]
null
null
null
from fastapi import Depends, Body, APIRouter from sqlalchemy.orm import Session from database import get_db from models.forex_model import Forex2_m5,Forex2_m30,Forex2_m240 from datetime import datetime as dt from crud.forex_crud import get_last_time, add_forex from schemas import forex_schema as schema import pdb # モジ...
25.820896
78
0.606936
from fastapi import Depends, Body, APIRouter from sqlalchemy.orm import Session from database import get_db from models.forex_model import Forex2_m5,Forex2_m30,Forex2_m240 from datetime import datetime as dt from crud.forex_crud import get_last_time, add_forex from schemas import forex_schema as schema import pdb rou...
true
true
f7f43a97a86d016a0c710f9c25c5020a733ecd59
44,397
py
Python
opentok/opentok.py
Nyceane/fitstream-jetson-nano
cd4fe9210670669dd683912f1f7ac1539037726d
[ "Apache-2.0" ]
null
null
null
opentok/opentok.py
Nyceane/fitstream-jetson-nano
cd4fe9210670669dd683912f1f7ac1539037726d
[ "Apache-2.0" ]
null
null
null
opentok/opentok.py
Nyceane/fitstream-jetson-nano
cd4fe9210670669dd683912f1f7ac1539037726d
[ "Apache-2.0" ]
null
null
null
from datetime import datetime # generate_token import calendar # generate_token import base64 # generate_token import random # generate_token import time # generate_token import hmac # _sign_string import hashlib # _...
46.782929
222
0.646282
from datetime import datetime import calendar import base64 import random import time import hmac import hashlib import requests import json import platform ...
true
true
f7f43b792511979f542f9828feaef9f068c4990c
1,103
py
Python
src/api/tasks.py
watxaut-alpha/joke-app
da039d1ecb6bb557a8d26b9094bcb047b8cfb249
[ "MIT" ]
null
null
null
src/api/tasks.py
watxaut-alpha/joke-app
da039d1ecb6bb557a8d26b9094bcb047b8cfb249
[ "MIT" ]
13
2020-03-31T10:55:16.000Z
2022-03-29T22:28:16.000Z
src/api/tasks.py
watxaut/joke-app
da039d1ecb6bb557a8d26b9094bcb047b8cfb249
[ "MIT" ]
null
null
null
import argparse import logging import os import src.tasks.send as tasks import src.tasks.validate as validate if __name__ == "__main__": logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO) logger = logging.getLogger(__name__) parser = argparse.ArgumentP...
29.810811
106
0.664551
import argparse import logging import os import src.tasks.send as tasks import src.tasks.validate as validate if __name__ == "__main__": logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO) logger = logging.getLogger(__name__) parser = argparse.ArgumentP...
true
true
f7f43bfb7320b81fc53e2170613bd85f44c5ad34
2,056
py
Python
tests/perf/multiprocessing_write.py
yaal-coop/sheraf
774e3781bc6ff2e16c6cc39f268d475b5e64fcea
[ "MIT" ]
null
null
null
tests/perf/multiprocessing_write.py
yaal-coop/sheraf
774e3781bc6ff2e16c6cc39f268d475b5e64fcea
[ "MIT" ]
null
null
null
tests/perf/multiprocessing_write.py
yaal-coop/sheraf
774e3781bc6ff2e16c6cc39f268d475b5e64fcea
[ "MIT" ]
null
null
null
import multiprocessing import sheraf from BTrees.OOBTree import OOBTree class PerfConcurrentDB: NUM_PROCESS = 55 DATABASE_URI = "zeo://localhost:9999" PROVOKE_CONFLICTS = True @classmethod def concurrent_creation(cls): class Model(sheraf.Model): table = "Model" st...
27.783784
72
0.534533
import multiprocessing import sheraf from BTrees.OOBTree import OOBTree class PerfConcurrentDB: NUM_PROCESS = 55 DATABASE_URI = "zeo://localhost:9999" PROVOKE_CONFLICTS = True @classmethod def concurrent_creation(cls): class Model(sheraf.Model): table = "Model" st...
true
true
f7f43c8f61b06429021e90fb6eb1f90dc2608b12
22,003
py
Python
sympy/polys/tests/test_ring_series.py
kumarkrishna/sympy
a91ba26c6d639980a4b3351a443548c629447cf9
[ "BSD-3-Clause" ]
null
null
null
sympy/polys/tests/test_ring_series.py
kumarkrishna/sympy
a91ba26c6d639980a4b3351a443548c629447cf9
[ "BSD-3-Clause" ]
null
null
null
sympy/polys/tests/test_ring_series.py
kumarkrishna/sympy
a91ba26c6d639980a4b3351a443548c629447cf9
[ "BSD-3-Clause" ]
null
null
null
from sympy.polys.domains import QQ, EX, RR from sympy.polys.rings import ring from sympy.polys.ring_series import (_invert_monoms, rs_integrate, rs_trunc, rs_mul, rs_square, rs_pow, _has_constant_term, rs_hadamard_exp, rs_series_from_list, rs_exp, rs_log, rs_newton, rs_series_inversion, rs_compose_add, rs_a...
37.870912
92
0.440667
from sympy.polys.domains import QQ, EX, RR from sympy.polys.rings import ring from sympy.polys.ring_series import (_invert_monoms, rs_integrate, rs_trunc, rs_mul, rs_square, rs_pow, _has_constant_term, rs_hadamard_exp, rs_series_from_list, rs_exp, rs_log, rs_newton, rs_series_inversion, rs_compose_add, rs_a...
true
true
f7f43d3dbe815e422dee5f434812cd2cbacb19e4
1,255
py
Python
back/fs/subtitler.py
rkohser/gustaf2
b9f4dc0a9b5adca94161f9c59fa9907e1842b091
[ "MIT" ]
null
null
null
back/fs/subtitler.py
rkohser/gustaf2
b9f4dc0a9b5adca94161f9c59fa9907e1842b091
[ "MIT" ]
null
null
null
back/fs/subtitler.py
rkohser/gustaf2
b9f4dc0a9b5adca94161f9c59fa9907e1842b091
[ "MIT" ]
null
null
null
import os from subliminal import download_best_subtitles, save_subtitles from subliminal.video import Episode from subliminal.core import search_external_subtitles from babelfish.language import Language class Subtitler: def __init__(self, languages, providers): self.languages = languages self....
31.375
103
0.701195
import os from subliminal import download_best_subtitles, save_subtitles from subliminal.video import Episode from subliminal.core import search_external_subtitles from babelfish.language import Language class Subtitler: def __init__(self, languages, providers): self.languages = languages self....
true
true
f7f43d801ece20fe1e29343f5116b7a4268dc10d
3,610
py
Python
src/trader/management/commands/ticker.py
edse/bl3ptrader
40c83751f2b854e9a5d0f915dce7fd84dc9d7233
[ "MIT" ]
1
2017-11-19T13:35:34.000Z
2017-11-19T13:35:34.000Z
src/trader/management/commands/ticker.py
edse/bl3ptrader
40c83751f2b854e9a5d0f915dce7fd84dc9d7233
[ "MIT" ]
3
2020-02-11T23:39:00.000Z
2021-06-10T19:12:20.000Z
src/trader/management/commands/ticker.py
edse/bl3ptrader
40c83751f2b854e9a5d0f915dce7fd84dc9d7233
[ "MIT" ]
null
null
null
import ipdb; ipdb.set_trace() from django.core.management.base import BaseCommand from .trader import Trader # import logging # from django.conf import settings # import json # import requests # from time import sleep import websocket # from .storage import Storage from .base import * # noqa websocket.enableTrace...
22.283951
89
0.539335
import ipdb; ipdb.set_trace() from django.core.management.base import BaseCommand from .trader import Trader import websocket from .base import * websocket.enableTrace(True) class Command(BaseCommand): ws = None trade = None def handle(self, *args, **options): self.trader = Trader() ...
true
true
f7f43e2635350e67a54d981786abf7cabfd64847
3,818
py
Python
pysat/instruments/de2_lang.py
scivision/pysat
2916ff7c77ad4201c537acca91b7c0b46b542e82
[ "BSD-3-Clause" ]
null
null
null
pysat/instruments/de2_lang.py
scivision/pysat
2916ff7c77ad4201c537acca91b7c0b46b542e82
[ "BSD-3-Clause" ]
null
null
null
pysat/instruments/de2_lang.py
scivision/pysat
2916ff7c77ad4201c537acca91b7c0b46b542e82
[ "BSD-3-Clause" ]
1
2018-10-26T02:42:50.000Z
2018-10-26T02:42:50.000Z
# -*- coding: utf-8 -*- """Supports the Langmuir Probe (LANG) instrument on Dynamics Explorer 2 (DE2). From CDAWeb: The Langmuir Probe Instrument (LANG) was a cylindrical electrostatic probe that obtained measurements of electron temperature, Te, and electron or ion concentration, Ne or Ni, respectively, and spacecra...
34.089286
79
0.736773
from __future__ import print_function from __future__ import absolute_import import functools import pysat from pysat.instruments.methods import nasa_cdaweb as cdw from pysat.instruments.methods import general as mm_gen platform = 'de2' name = 'lang' tags = {'': '500 ms cadence Langmuir Probe data'} sat_ids = {''...
true
true
f7f43ee4f2308325f1d94bb3259b97233d268597
1,156
py
Python
2016/10/runbots.py
Apreche/advent2016
81e72efe670a62065297d1db4a2eef544bc36cb6
[ "MIT" ]
3
2020-12-12T22:05:06.000Z
2021-12-11T17:05:48.000Z
2016/10/runbots.py
Apreche/advent-of-code
81e72efe670a62065297d1db4a2eef544bc36cb6
[ "MIT" ]
null
null
null
2016/10/runbots.py
Apreche/advent-of-code
81e72efe670a62065297d1db4a2eef544bc36cb6
[ "MIT" ]
null
null
null
#!/usr/bin/env python import re from bots import Factory input_pattern = re.compile(r'^value (\d+) goes to bot (\d+)$') p2 = r'^bot (\d+) gives (low|high) to (bot|output) (\d+) and (high|low) to (bot|output) (\d+)$' instruction_pattern = re.compile(p2) instructions = [] factory = Factory() with open('input.txt', 'r'...
30.421053
95
0.617647
import re from bots import Factory input_pattern = re.compile(r'^value (\d+) goes to bot (\d+)$') p2 = r'^bot (\d+) gives (low|high) to (bot|output) (\d+) and (high|low) to (bot|output) (\d+)$' instruction_pattern = re.compile(p2) instructions = [] factory = Factory() with open('input.txt', 'r') as input_file: ...
false
true
f7f44155bc8ab764412d569a9d816f0921c064ff
5,559
py
Python
tensorflow/python/eager/tape_test.py
DHsLc/test
f286c78b619b81ca95ba9f738cc0de4e14440e44
[ "Apache-2.0" ]
5
2021-01-11T01:51:57.000Z
2021-12-11T17:19:08.000Z
tensorflow/python/eager/tape_test.py
radi2015/tensorflow
4b2fb49fd7578afe7e289936f347af581b5bdab1
[ "Apache-2.0" ]
null
null
null
tensorflow/python/eager/tape_test.py
radi2015/tensorflow
4b2fb49fd7578afe7e289936f347af581b5bdab1
[ "Apache-2.0" ]
3
2020-07-02T13:46:32.000Z
2021-01-11T01:52:01.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.314815
80
0.624573
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.eager import backprop from tensorflow.python.eager import context from tensorflow.python.eager import custom_gradient from tensorflow.python.eager import tensor from tenso...
true
true
f7f441ca738c6897f579eb809505199c66722cbd
8,974
py
Python
indico/modules/attachments/models/folders.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
indico/modules/attachments/models/folders.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
indico/modules/attachments/models/folders.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from collections import defaultdict from flask import g from sql...
38.848485
119
0.662804
from __future__ import unicode_literals from collections import defaultdict from flask import g from sqlalchemy.event import listens_for from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import joinedload from indico.core.db ...
true
true
f7f44278ba1c7f06ac9585ef939552f95caad8e7
189
py
Python
doc/_i18n/en/tutorials/introduction/ef-controller/update_ef_task.py
rohanpsingh/mc_rtc
63918efc54f561650a8e93f449c40ec156a6feb4
[ "BSD-2-Clause" ]
null
null
null
doc/_i18n/en/tutorials/introduction/ef-controller/update_ef_task.py
rohanpsingh/mc_rtc
63918efc54f561650a8e93f449c40ec156a6feb4
[ "BSD-2-Clause" ]
null
null
null
doc/_i18n/en/tutorials/introduction/ef-controller/update_ef_task.py
rohanpsingh/mc_rtc
63918efc54f561650a8e93f449c40ec156a6feb4
[ "BSD-2-Clause" ]
null
null
null
# Get the current objective pt = efTask.get_ef_pose() # Update the rotation and position objective efTask.set_ef_pose(sva.PTransformd(sva.RotY(-math.pi/2), eigen.Vector3d(0.5, -0.5, 1.2)))
37.8
89
0.751323
pt = efTask.get_ef_pose() efTask.set_ef_pose(sva.PTransformd(sva.RotY(-math.pi/2), eigen.Vector3d(0.5, -0.5, 1.2)))
true
true
f7f442ab4f125c2b1ef5939d99eb61204aa66aef
1,926
py
Python
packages/python/plotly/plotly/validators/layout/legend/__init__.py
eisenlohr/plotly.py
3b0e3df45036cf48f772b13bcc10ce347964aefc
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
packages/python/plotly/plotly/validators/layout/legend/__init__.py
jiangrongbo/plotly.py
df19fc702b309586cc24e25373b87e8bdbb3ff60
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
packages/python/plotly/plotly/validators/layout/legend/__init__.py
jiangrongbo/plotly.py
df19fc702b309586cc24e25373b87e8bdbb3ff60
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import sys if sys.version_info < (3, 7): from ._yanchor import YanchorValidator from ._y import YValidator from ._xanchor import XanchorValidator from ._x import XValidator from ._valign import ValignValidator from ._uirevision import UirevisionValidator from ._traceorder import TraceorderV...
37.764706
58
0.687954
import sys if sys.version_info < (3, 7): from ._yanchor import YanchorValidator from ._y import YValidator from ._xanchor import XanchorValidator from ._x import XValidator from ._valign import ValignValidator from ._uirevision import UirevisionValidator from ._traceorder import TraceorderV...
true
true
f7f44464bbf65e99311a2ec55bb21b29e3211d83
713
py
Python
src/utils/hardware_stats.py
LuizPitaAlmeida/image_caption_generator
e368b9f23ef283856a42f78b724d3181245b27de
[ "Apache-2.0" ]
null
null
null
src/utils/hardware_stats.py
LuizPitaAlmeida/image_caption_generator
e368b9f23ef283856a42f78b724d3181245b27de
[ "Apache-2.0" ]
null
null
null
src/utils/hardware_stats.py
LuizPitaAlmeida/image_caption_generator
e368b9f23ef283856a42f78b724d3181245b27de
[ "Apache-2.0" ]
null
null
null
import torch import nvidia_smi import psutil class HardwareStats(): def __init__(self): super().__init__() self.device = torch.device( "cuda:0" if torch.cuda.is_available() else "cpu") nvidia_smi.nvmlInit() self.handle = nvidia_smi.nvmlDeviceGetHandleByIndex(0) def...
31
67
0.591865
import torch import nvidia_smi import psutil class HardwareStats(): def __init__(self): super().__init__() self.device = torch.device( "cuda:0" if torch.cuda.is_available() else "cpu") nvidia_smi.nvmlInit() self.handle = nvidia_smi.nvmlDeviceGetHandleByIndex(0) def...
true
true
f7f44625a306293210abae169174b6e3435d1607
40,419
py
Python
pytorch_lightning/trainer/training_loop.py
javierlorenzod/pytorch-lightning
6dba26666aa564db414eb238d99a4213006d8220
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/training_loop.py
javierlorenzod/pytorch-lightning
6dba26666aa564db414eb238d99a4213006d8220
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/training_loop.py
javierlorenzod/pytorch-lightning
6dba26666aa564db414eb238d99a4213006d8220
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
42.816737
119
0.661718
from contextlib import contextmanager, suppress from copy import copy, deepcopy import numpy as np import torch from pytorch_lightning.callbacks import EarlyStopping from pytorch_lightning.core.memory import ModelSummary from pytorch_lightning.core.optimizer import LightningOptimizer from pytorch_lightn...
true
true
f7f446a45ea9d26f2c54009938dc4d576c808ed1
1,394
py
Python
fiwareglancesync/utils/checkpath.py
telefonicaid/fiware-glancesync
5ad0c80e12b9384473f31bf336015c75cf02a2a2
[ "Apache-2.0" ]
null
null
null
fiwareglancesync/utils/checkpath.py
telefonicaid/fiware-glancesync
5ad0c80e12b9384473f31bf336015c75cf02a2a2
[ "Apache-2.0" ]
88
2015-07-21T22:13:23.000Z
2016-11-15T21:28:56.000Z
fiwareglancesync/utils/checkpath.py
telefonicaid/fiware-glancesync
5ad0c80e12b9384473f31bf336015c75cf02a2a2
[ "Apache-2.0" ]
2
2015-08-12T11:19:55.000Z
2018-05-25T19:04:43.000Z
# -- encoding: utf-8 -- # # Copyright 2015-2016 Telefónica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # 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: # # h...
30.977778
75
0.681492
import os def check_path(url, filename): if url[0] != '/': result = False else: if filename not in url: result = False else: result = True if os.path.isfile(url): result = True else: ...
true
true
f7f446af625168a91ac6fef0fb8e208f2a6cbfd4
16,119
py
Python
efficientdet/keras/infer_lib.py
adrianbouza/automl
46dbd753efc8efc73ced146fe8b3bb694709dcff
[ "Apache-2.0" ]
null
null
null
efficientdet/keras/infer_lib.py
adrianbouza/automl
46dbd753efc8efc73ced146fe8b3bb694709dcff
[ "Apache-2.0" ]
null
null
null
efficientdet/keras/infer_lib.py
adrianbouza/automl
46dbd753efc8efc73ced146fe8b3bb694709dcff
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
37.3125
80
0.674794
import copy import os import time from typing import Text, Dict, Any, Optional from absl import logging import numpy as np import tensorflow as tf from .. import dataloader from .. import hparams_config from .. import utils from . import efficientdet_keras from . import label_util from . import util_kera...
true
true
f7f446ed3801d6e97bbd0823b35c16eb100c1f11
1,530
py
Python
ament_pep257/setup.py
ament/ament_lint
d502e7bc45ba4ed9dc23c198299899f97ebd0d7e
[ "Apache-2.0" ]
23
2015-07-08T05:42:24.000Z
2022-03-14T02:13:01.000Z
ament_pep257/setup.py
ament/ament_lint
d502e7bc45ba4ed9dc23c198299899f97ebd0d7e
[ "Apache-2.0" ]
292
2015-03-06T20:11:45.000Z
2022-03-31T22:30:41.000Z
ament_pep257/setup.py
ament/ament_lint
d502e7bc45ba4ed9dc23c198299899f97ebd0d7e
[ "Apache-2.0" ]
71
2016-05-24T01:24:54.000Z
2022-03-23T07:42:41.000Z
from setuptools import find_packages from setuptools import setup package_name = 'ament_pep257' setup( name=package_name, version='0.11.3', packages=find_packages(exclude=['test']), data_files=[ ('share/' + package_name, ['package.xml']), ('share/ament_index/resource_index/packages', ...
31.875
80
0.647059
from setuptools import find_packages from setuptools import setup package_name = 'ament_pep257' setup( name=package_name, version='0.11.3', packages=find_packages(exclude=['test']), data_files=[ ('share/' + package_name, ['package.xml']), ('share/ament_index/resource_index/packages', ...
true
true
f7f4478acba8b118bbf50b23cfc29c33b1bb0468
979
py
Python
isi_sdk_9_0_0/test/test_cluster_node_drive_firmware.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_9_0_0/test/test_cluster_node_drive_firmware.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_9_0_0/test/test_cluster_node_drive_firmware.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from ...
23.878049
107
0.728294
from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from isi_sdk_9_0_0.models.cluster_node_drive_firmware import ClusterNodeDriveFirmware from isi_sdk_9_0_0.rest import ApiException class TestClusterNodeDriveFirmware(unittest.TestCase): def setUp(self): pass def tearD...
true
true
f7f447ca9355581efd544c13d9ba730d1d3ec9cb
3,957
py
Python
testModes.py
rockset/rockset-load
f093089295ed28fdd0b4aaac2d6dd4b9abce548e
[ "Apache-2.0" ]
null
null
null
testModes.py
rockset/rockset-load
f093089295ed28fdd0b4aaac2d6dd4b9abce548e
[ "Apache-2.0" ]
null
null
null
testModes.py
rockset/rockset-load
f093089295ed28fdd0b4aaac2d6dd4b9abce548e
[ "Apache-2.0" ]
null
null
null
from output import log_qs_summary, log_query_results from display import display_qs_summary, display_qs_results from executors import ParallelQSExecutor, SerialQSExecutor class TestMode(): def __init__(self,config, options): self.config = config self.options = options self.verbose = options...
39.178218
119
0.550164
from output import log_qs_summary, log_query_results from display import display_qs_summary, display_qs_results from executors import ParallelQSExecutor, SerialQSExecutor class TestMode(): def __init__(self,config, options): self.config = config self.options = options self.verbose = options...
true
true
f7f44837819617114e612521998f86b0efe44c0a
2,227
py
Python
magi/instruction.py
bcho/magi
ec5c936ad48c1db1fef042768da728b229b28210
[ "MIT" ]
1
2019-08-24T20:36:41.000Z
2019-08-24T20:36:41.000Z
magi/instruction.py
bcho/magi
ec5c936ad48c1db1fef042768da728b229b28210
[ "MIT" ]
null
null
null
magi/instruction.py
bcho/magi
ec5c936ad48c1db1fef042768da728b229b28210
[ "MIT" ]
null
null
null
# coding: utf-8 ''' magi.instruction ~~~~~~~~~~~~~~~~ CPU instructions. ''' from magi import const class MalformatInstruction(ValueError): '''Unable to decode your instruction.''' class OperationSet(object): # Operations. ops = {} @classmethod def add(cls, opcode, func): ...
24.744444
76
0.591379
from magi import const class MalformatInstruction(ValueError): class OperationSet(object): ops = {} @classmethod def add(cls, opcode, func): cls.ops[opcode] = func return cls @classmethod def has(cls, opcode): return opcode in cls.ops @classmethod def ...
true
true
f7f4486c97b5232a412476415acf4cf39fa304da
2,011
py
Python
nablapps/interactive/migrations/0013_colorchoice.py
Amund211/nablaweb
8105c34615d4b67637e982545fbc6489a131c1f3
[ "MIT" ]
17
2019-10-07T15:10:58.000Z
2022-01-21T14:18:07.000Z
nablapps/interactive/migrations/0013_colorchoice.py
Amund211/nablaweb
8105c34615d4b67637e982545fbc6489a131c1f3
[ "MIT" ]
222
2019-10-07T15:04:51.000Z
2022-03-24T12:14:16.000Z
nablapps/interactive/migrations/0013_colorchoice.py
Amund211/nablaweb
8105c34615d4b67637e982545fbc6489a131c1f3
[ "MIT" ]
7
2019-10-10T18:53:42.000Z
2021-10-18T02:13:09.000Z
# Generated by Django 2.1.13 on 2019-11-07 20:36 import re import django.core.validators import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_...
34.672414
314
0.378916
import re import django.core.validators import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("interactive", "0012_remove_emp...
true
true
f7f4496dd52cd13894061a13b5116481aeac5395
22,793
py
Python
conchat.py
lepers/conchat
c63798426b5ac86707d543cbad07880b0de22351
[ "MIT" ]
1
2022-02-28T14:10:02.000Z
2022-02-28T14:10:02.000Z
conchat.py
lepers/conchat
c63798426b5ac86707d543cbad07880b0de22351
[ "MIT" ]
null
null
null
conchat.py
lepers/conchat
c63798426b5ac86707d543cbad07880b0de22351
[ "MIT" ]
null
null
null
import requests import time import logging from datetime import datetime import _thread import os import sys import configparser import string from cryptography.fernet import Fernet import platform from requests.api import request import torrequest import enchant import re import random import pyttsx3 from builtins imp...
38.051753
649
0.508709
import requests import time import logging from datetime import datetime import _thread import os import sys import configparser import string from cryptography.fernet import Fernet import platform from requests.api import request import torrequest import enchant import re import random import pyttsx3 from builtins imp...
true
true
f7f449717bdd7c8be5f81f65ddd254aa7850f146
2,468
py
Python
juriscraper/opinions/united_states_backscrapers/federal_special/cit_2004.py
umeboshi2/juriscraper
16abceb3747947593841b1c2708de84dcc85c59d
[ "BSD-2-Clause" ]
null
null
null
juriscraper/opinions/united_states_backscrapers/federal_special/cit_2004.py
umeboshi2/juriscraper
16abceb3747947593841b1c2708de84dcc85c59d
[ "BSD-2-Clause" ]
null
null
null
juriscraper/opinions/united_states_backscrapers/federal_special/cit_2004.py
umeboshi2/juriscraper
16abceb3747947593841b1c2708de84dcc85c59d
[ "BSD-2-Clause" ]
1
2021-03-03T00:03:16.000Z
2021-03-03T00:03:16.000Z
# Scraper for the United States Court of International Trade # CourtID: cit # Court Short Name: Ct. Int'l Trade # Neutral Citation Format: Ct. Int'l Trade No. 12-1 from juriscraper.OpinionSite import OpinionSite import re import time from datetime import date from lxml import html class Site(OpinionSite): def __in...
41.830508
115
0.62034
# Neutral Citation Format: Ct. Int'l Trade No. 12-1 from juriscraper.OpinionSite import OpinionSite import re import time from datetime import date from lxml import html class Site(OpinionSite): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.url = 'http://...
true
true
f7f4497f7f244d0627ff3814f0818c0ab826af39
425
py
Python
services/authService/setup.py
anaquin135/modularCPQ
af8575a407813c6ef3e3c0ca3258266f0bc6a4e7
[ "MIT" ]
null
null
null
services/authService/setup.py
anaquin135/modularCPQ
af8575a407813c6ef3e3c0ca3258266f0bc6a4e7
[ "MIT" ]
null
null
null
services/authService/setup.py
anaquin135/modularCPQ
af8575a407813c6ef3e3c0ca3258266f0bc6a4e7
[ "MIT" ]
null
null
null
from app import db, bcrypt from app.models import USER db.drop_all() db.create_all() sampleUser = USER() sampleUser.firstName = "Bob" sampleUser.lastName = "Dylan" sampleUser.jobTitle = "CIO" sampleUser.email = "admin@email.com" sampleUser.password = bcrypt.generate_password_hash('wasspord') sampleUser.isActive = Tru...
22.368421
63
0.781176
from app import db, bcrypt from app.models import USER db.drop_all() db.create_all() sampleUser = USER() sampleUser.firstName = "Bob" sampleUser.lastName = "Dylan" sampleUser.jobTitle = "CIO" sampleUser.email = "admin@email.com" sampleUser.password = bcrypt.generate_password_hash('wasspord') sampleUser.isActive = Tru...
true
true
f7f44a1730d5677097e10a6715951c37e8e5460b
4,305
py
Python
cythonize/difference.py
RubenPants/RobotSimulator2D
334d7b9cab0edb22d4670cfaf39fbed76c351758
[ "MIT" ]
null
null
null
cythonize/difference.py
RubenPants/RobotSimulator2D
334d7b9cab0edb22d4670cfaf39fbed76c351758
[ "MIT" ]
null
null
null
cythonize/difference.py
RubenPants/RobotSimulator2D
334d7b9cab0edb22d4670cfaf39fbed76c351758
[ "MIT" ]
null
null
null
""" difference.py Visualize the difference between the python and the cython file. """ import difflib import os # name, path to python file, path to cython file files = [ ('multi environment', 'environment/env_multi.py', 'environment/cy/env_multi_cy.pyx'), ('game', 'environment/entities/game.py', 'environment...
36.794872
115
0.595122
import difflib import os files = [ ('multi environment', 'environment/env_multi.py', 'environment/cy/env_multi_cy.pyx'), ('game', 'environment/entities/game.py', 'environment/entities/cy/game_cy.pyx'), ('robots', 'environment/entities/robots.py', 'environment/entities/cy/robots_cy.pyx'), ('sensors', '...
true
true
f7f44b24cd750618b84b8aa36ad3b59bbd84b42d
653
py
Python
utils/shuffler.py
Luke-zhang-04/Sorting_Algorithms
dc89ce0f1651252b30509062fddff72d423689a3
[ "Unlicense" ]
1
2020-01-03T10:09:33.000Z
2020-01-03T10:09:33.000Z
utils/shuffler.py
Luke-zhang-04/Sorting_Algorithms
dc89ce0f1651252b30509062fddff72d423689a3
[ "Unlicense" ]
1
2020-06-11T13:46:57.000Z
2020-06-11T13:46:57.000Z
utils/shuffler.py
Luke-zhang-04/Sorting_Algorithms
dc89ce0f1651252b30509062fddff72d423689a3
[ "Unlicense" ]
2
2020-01-03T10:17:39.000Z
2020-06-13T06:15:17.000Z
from random import shuffle from typing import List, Union def randomSequence(*args: Union[List[int], range]) -> List[int]: """Returns a shuffled array\n args can be either stop, start stop, and start stop step, or a range object """ if isinstance(args[0], int): if (len(args)) == 1: ...
29.681818
79
0.57121
from random import shuffle from typing import List, Union def randomSequence(*args: Union[List[int], range]) -> List[int]: if isinstance(args[0], int): if (len(args)) == 1: array = [i for i in range(0, args[0])] elif len(args) == 2: array = [i for i in range(args[0], args[1...
true
true
f7f44cf6afa95c6dd3cb5da02fde0db50f00aa7a
974
py
Python
backend/appengine/routes/andris/categoria.py
andris210296/andris-projeto
41c0af031152d06ef0af4ac8031bbded86533528
[ "MIT" ]
3
2015-05-04T16:04:08.000Z
2018-07-18T17:15:16.000Z
backend/appengine/routes/andris/categoria.py
andris210296/andris-projeto
41c0af031152d06ef0af4ac8031bbded86533528
[ "MIT" ]
null
null
null
backend/appengine/routes/andris/categoria.py
andris210296/andris-projeto
41c0af031152d06ef0af4ac8031bbded86533528
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required from config.template_middleware import TemplateResponse from routes.andris.categoria_produto.categoria_produtoM import Produto,Categoria @logi...
32.466667
120
0.799795
from __future__ import absolute_import, unicode_literals from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required from config.template_middleware import TemplateResponse from routes.andris.categoria_produto.categoria_produtoM import Produto,Categoria @login_not_required @no_csrf...
true
true
f7f44e070df47b8fe2d9439588e1657eee4c7139
708
py
Python
t5-base/model.py
shanayghag/AV-Janatahack-Independence-Day-2020-ML-Hackathon
410c549488b0e2ceece067a9e1581e182a11e885
[ "MIT" ]
6
2020-08-26T13:00:11.000Z
2021-12-28T18:58:43.000Z
t5-base/model.py
shanayghag/AV-Janatahack-Independence-Day-2020-ML-Hackathon
410c549488b0e2ceece067a9e1581e182a11e885
[ "MIT" ]
null
null
null
t5-base/model.py
shanayghag/AV-Janatahack-Independence-Day-2020-ML-Hackathon
410c549488b0e2ceece067a9e1581e182a11e885
[ "MIT" ]
1
2020-08-24T08:34:19.000Z
2020-08-24T08:34:19.000Z
from torch import nn from transformers import T5ForConditionalGeneration from config import config class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.t5_model = T5ForConditionalGeneration.from_pretrained(config.MODEL_PATH) def forward( self, input_...
26.222222
85
0.653955
from torch import nn from transformers import T5ForConditionalGeneration from config import config class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.t5_model = T5ForConditionalGeneration.from_pretrained(config.MODEL_PATH) def forward( self, input_...
true
true
f7f44ffe6e059afe2080c921ca43a2789718a4b3
21,632
py
Python
utils/gen_doc.py
fossabot/onnx-mlir
ed1377c26b1be69b9b0ed6942025197491ca6c7e
[ "Apache-2.0" ]
null
null
null
utils/gen_doc.py
fossabot/onnx-mlir
ed1377c26b1be69b9b0ed6942025197491ca6c7e
[ "Apache-2.0" ]
null
null
null
utils/gen_doc.py
fossabot/onnx-mlir
ed1377c26b1be69b9b0ed6942025197491ca6c7e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict, OrderedDict from io import StringIO import io import os import sys import datetime import argparse import nump...
37.62087
143
0.611964
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict, OrderedDict from io import StringIO import io import os import sys import datetime import argparse import numpy as np from onnx ...
true
true
f7f450171b08146bcb183cf274cedacce9fdca6b
4,907
py
Python
crypten/mpc/primitives/beaver.py
gmuraru/CrypTen
e39a7aaf65436706321fe4e3fc055308c78b6b92
[ "MIT" ]
null
null
null
crypten/mpc/primitives/beaver.py
gmuraru/CrypTen
e39a7aaf65436706321fe4e3fc055308c78b6b92
[ "MIT" ]
null
null
null
crypten/mpc/primitives/beaver.py
gmuraru/CrypTen
e39a7aaf65436706321fe4e3fc055308c78b6b92
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import crypten import crypten.communicator as comm import torch from crypten.common.util import count_wraps def __be...
30.66875
88
0.627879
import crypten import crypten.communicator as comm import torch from crypten.common.util import count_wraps def __beaver_protocol(op, x, y, *args, **kwargs): assert op in { "mul", "matmul", "conv1d", "conv2d", "conv_transpose1d", "conv_transpose2d", } ...
true
true
f7f450fac5b414ab47b05e898dd715a1a2e6704d
8,708
py
Python
sdk/python/pulumi_azure_native/batch/latest/application.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/batch/latest/application.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/batch/latest/application.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
54.086957
1,643
0.681213
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = ['Application'] warnings.warn("""The 'latest' version is deprecated. Please migrate to the resource in the top-level module: 'azure-native:batch:Application'...
true
true
f7f452b8b0bc1e604c5b8c914d90d7fc7184a803
231
py
Python
apps/empresas/urls.py
andreFSilva/gestao_rh
9e0bfce3c594186ed8b9acea12e4dff13337148e
[ "MIT" ]
null
null
null
apps/empresas/urls.py
andreFSilva/gestao_rh
9e0bfce3c594186ed8b9acea12e4dff13337148e
[ "MIT" ]
5
2022-02-18T13:43:34.000Z
2022-03-31T13:38:47.000Z
apps/empresas/urls.py
andreFSilva/gestao_rh
9e0bfce3c594186ed8b9acea12e4dff13337148e
[ "MIT" ]
null
null
null
from django.urls import path from .views import EmpresasView, EmpresasListView urlpatterns = [ path('', EmpresasView.as_view(), name='empresas'), path('empresas_list/', EmpresasListView.as_view(), name='empresas_list'), ]
28.875
77
0.735931
from django.urls import path from .views import EmpresasView, EmpresasListView urlpatterns = [ path('', EmpresasView.as_view(), name='empresas'), path('empresas_list/', EmpresasListView.as_view(), name='empresas_list'), ]
true
true
f7f452edd8d2874e0c8220a022b5689f03907fb2
2,800
py
Python
natural_bm/datasets/fast.py
alexhunterlang/natural_bm
b2a1cb15694f4f3a80a3a1cc6f8423892563806d
[ "MIT" ]
1
2018-06-07T00:54:17.000Z
2018-06-07T00:54:17.000Z
natural_bm/datasets/fast.py
alexhunterlang/natural_bm
b2a1cb15694f4f3a80a3a1cc6f8423892563806d
[ "MIT" ]
null
null
null
natural_bm/datasets/fast.py
alexhunterlang/natural_bm
b2a1cb15694f4f3a80a3a1cc6f8423892563806d
[ "MIT" ]
null
null
null
"""Simplified version of MNIST that is useful for demos and testing """ #%% import numpy as np try: import PIL.Image as Image except ImportError: import Image from natural_bm.datasets.common import Dataset, sample_data, threshold_data, convert2uint8 from natural_bm.datasets import mnist #%% class Fast(Data...
31.111111
90
0.563571
import numpy as np try: import PIL.Image as Image except ImportError: import Image from natural_bm.datasets.common import Dataset, sample_data, threshold_data, convert2uint8 from natural_bm.datasets import mnist class Fast(Dataset): def __init__(self, datatype): super().__init__('fast', datat...
true
true
f7f4535f06fc137c900ae9eaa837bf15c073f00e
49
py
Python
b_hello/hello.py
cclai999/pytest-0706
1707a3b4fefee2d97a1f9fbccda80f859e2933cb
[ "MIT" ]
null
null
null
b_hello/hello.py
cclai999/pytest-0706
1707a3b4fefee2d97a1f9fbccda80f859e2933cb
[ "MIT" ]
null
null
null
b_hello/hello.py
cclai999/pytest-0706
1707a3b4fefee2d97a1f9fbccda80f859e2933cb
[ "MIT" ]
null
null
null
def hello_name(name): return f'Hello {name}'
16.333333
26
0.673469
def hello_name(name): return f'Hello {name}'
true
true
f7f454cba0758d1f05815cdfcffd0cde50042d13
15,504
py
Python
kotti/views/util.py
mete0r/Kotti
e89103cc57d5d2af8d60eb8208ae9d04c068f6e7
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
kotti/views/util.py
mete0r/Kotti
e89103cc57d5d2af8d60eb8208ae9d04c068f6e7
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
kotti/views/util.py
mete0r/Kotti
e89103cc57d5d2af8d60eb8208ae9d04c068f6e7
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
import hashlib import urllib from collections import defaultdict from datetime import datetime from babel.dates import format_date from babel.dates import format_datetime from babel.dates import format_time from babel.numbers import format_currency from pyramid.decorator import reify from pyramid.i18n import get_local...
31.770492
79
0.629063
import hashlib import urllib from collections import defaultdict from datetime import datetime from babel.dates import format_date from babel.dates import format_datetime from babel.dates import format_time from babel.numbers import format_currency from pyramid.decorator import reify from pyramid.i18n import get_local...
true
true
f7f4552c9f0ba9690541b9509c1e0a4e800f22a4
779
py
Python
flask_test_1/__main__.py
huogerac/flask-test-1
31c2629ea2c1eb589710024f5a09cb1892b0fac7
[ "Unlicense" ]
null
null
null
flask_test_1/__main__.py
huogerac/flask-test-1
31c2629ea2c1eb589710024f5a09cb1892b0fac7
[ "Unlicense" ]
null
null
null
flask_test_1/__main__.py
huogerac/flask-test-1
31c2629ea2c1eb589710024f5a09cb1892b0fac7
[ "Unlicense" ]
null
null
null
from . import BaseClass, base_function # pragma: no cover def main() -> None: # pragma: no cover """ The main function executes on commands: `python -m flask_test_1` and `$ flask_test_1 `. This is your program's entry point. You can change this function to do whatever you want. Examples: ...
26.862069
65
0.629012
from . import BaseClass, base_function def main() -> None: print("Executing main function") base = BaseClass() print(base.base_method()) print(base_function()) print("End of main function") if __name__ == "__main__": main()
true
true
f7f4554fe3b5b666a79b50865f586a5637470347
24,313
py
Python
query_designer/models.py
dipapaspyros/bdo_platform
336de07c6ed14290c54f2154117dbf90a187e4ea
[ "MIT" ]
2
2018-02-07T10:26:28.000Z
2018-09-21T09:12:58.000Z
query_designer/models.py
dipapaspyros/bdo_platform
336de07c6ed14290c54f2154117dbf90a187e4ea
[ "MIT" ]
5
2018-09-21T10:40:44.000Z
2019-04-06T10:59:57.000Z
query_designer/models.py
dipapaspyros/bdo_platform
336de07c6ed14290c54f2154117dbf90a187e4ea
[ "MIT" ]
3
2019-06-09T15:42:02.000Z
2022-02-14T19:50:33.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import decimal import datetime import copy import time from collections import OrderedDict import re import sympy from threading import Thread from django.contrib.auth.models import User from django.db.models import * from aggregator.models ...
36.28806
144
0.504545
from __future__ import unicode_literals import json import decimal import datetime import copy import time from collections import OrderedDict import re import sympy from threading import Thread from django.contrib.auth.models import User from django.db.models import * from aggregator.models import * from query_de...
false
true
f7f4569ef8f4fda048d951f63334c09822fb0e1d
982
py
Python
examples/dagster_examples_tests/intro_tutorial_tests/test_repos.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
1
2020-09-19T16:35:59.000Z
2020-09-19T16:35:59.000Z
examples/dagster_examples_tests/intro_tutorial_tests/test_repos.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
examples/dagster_examples_tests/intro_tutorial_tests/test_repos.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
from dagster_examples.intro_tutorial.repos import hello_cereal_repository from dagster_examples.intro_tutorial.scheduler import ( hello_cereal_repository as scheduler_repository, ) from dagster import execute_pipeline from dagster.utils import pushd, script_relative_path def test_define_repo(): repo = hello_...
37.769231
79
0.789206
from dagster_examples.intro_tutorial.repos import hello_cereal_repository from dagster_examples.intro_tutorial.scheduler import ( hello_cereal_repository as scheduler_repository, ) from dagster import execute_pipeline from dagster.utils import pushd, script_relative_path def test_define_repo(): repo = hello_...
true
true
f7f457b4219c8b133fa7aa00f7f9096ba3e5f644
3,491
py
Python
bindings/python/ensmallen/datasets/string/cellulomonastimonensis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/cellulomonastimonensis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/cellulomonastimonensis.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Cellulomonas timonensis. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protei...
33.247619
223
0.679461
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def CellulomonasTimonensis( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/st...
true
true
f7f457d7002ad9997518e7d5ee61bbb60614956a
97,272
py
Python
test/functional/p2p_segwit.py
minblock/Scoutcoin
532aebe3597dbffe4ea7cc3e70d6cbde542614d3
[ "MIT" ]
null
null
null
test/functional/p2p_segwit.py
minblock/Scoutcoin
532aebe3597dbffe4ea7cc3e70d6cbde542614d3
[ "MIT" ]
null
null
null
test/functional/p2p_segwit.py
minblock/Scoutcoin
532aebe3597dbffe4ea7cc3e70d6cbde542614d3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test segwit transactions and blocks on P2P network.""" from binascii import hexlify import math import ...
46.32
295
0.655317
from binascii import hexlify import math import random import struct import time from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment, get_witness_script, WITNESS_COMMITMENT_HEADER from test_framework.key import ECKey from test_framework.messages import ( BIP125_SEQUENCE_...
true
true
f7f457f23a56ee06de1c9669c96b4df8702c5614
18,363
py
Python
pixel_server.py
turboki/pixel-server-pi
1751d6c4d343fd37421291f24d56f10ad9b8ac74
[ "MIT" ]
null
null
null
pixel_server.py
turboki/pixel-server-pi
1751d6c4d343fd37421291f24d56f10ad9b8ac74
[ "MIT" ]
null
null
null
pixel_server.py
turboki/pixel-server-pi
1751d6c4d343fd37421291f24d56f10ad9b8ac74
[ "MIT" ]
null
null
null
import time import re import neopixel import board import tornado.ioloop import tornado.web import signal import pixel_utils import multiprocessing from multiprocessing.managers import BaseManager class MyManager(BaseManager): pass def Manager(): m = MyManager() m.start() return m class PixelConfig(objec...
35.725681
282
0.560475
import time import re import neopixel import board import tornado.ioloop import tornado.web import signal import pixel_utils import multiprocessing from multiprocessing.managers import BaseManager class MyManager(BaseManager): pass def Manager(): m = MyManager() m.start() return m class PixelConfig(objec...
true
true
f7f458b8e6b98656b2c70a5a152a8370cee1b31a
2,093
py
Python
bscetl/jobs/extract_tokens_job.py
XWorldGames/bsc-etl
c4a1ba72381340994ec376e6de860cde6637becc
[ "MIT" ]
null
null
null
bscetl/jobs/extract_tokens_job.py
XWorldGames/bsc-etl
c4a1ba72381340994ec376e6de860cde6637becc
[ "MIT" ]
null
null
null
bscetl/jobs/extract_tokens_job.py
XWorldGames/bsc-etl
c4a1ba72381340994ec376e6de860cde6637becc
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018 Evgeny Medvedev, evge.medvedev@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
46.511111
105
0.764453
from bscetl.jobs.export_tokens_job import ExportTokensJob class ExtractTokensJob(ExportTokensJob): def __init__(self, web3, item_exporter, contracts_iterable, max_workers): super().__init__(web3, item_exporter, [], max_workers) self.contracts_iterable = contracts_iterable ...
true
true
f7f458eb25802cbb5ccbbaad91dc276210c1b6f2
12,482
py
Python
posteriors/fiducial/get_cosmo_posteriors.py
emilleishida/resspect_metric
92f0b5d9de9cd6a031ec67fd76f8d302be0efef8
[ "MIT" ]
1
2021-08-11T13:04:38.000Z
2021-08-11T13:04:38.000Z
posteriors/fiducial/get_cosmo_posteriors.py
emilleishida/resspect_metric
92f0b5d9de9cd6a031ec67fd76f8d302be0efef8
[ "MIT" ]
1
2021-08-16T10:40:45.000Z
2021-08-16T10:40:45.000Z
posteriors/fiducial/get_cosmo_posteriors.py
emilleishida/resspect_metric
92f0b5d9de9cd6a031ec67fd76f8d302be0efef8
[ "MIT" ]
null
null
null
case = 'fiducial' import pandas as pd import numpy as np import pystan import os from resspect.salt3_utils import get_distances import pickle import time from shutil import copyfile fit_lightcurves = False restart_master = True # number of bins for SALT2mu nbins = 70 # rather to re-write fitres file replace_z = T...
34.103825
103
0.580516
case = 'fiducial' import pandas as pd import numpy as np import pystan import os from resspect.salt3_utils import get_distances import pickle import time from shutil import copyfile fit_lightcurves = False restart_master = True nbins = 70 replace_z = True add_lowz = True bias = True
true
true
f7f4594f046dcd50ce2dc1a91fa6cb8f7299dd8b
3,475
py
Python
main.py
xrayian/PhysicsX
5211a43f79a179609144619ecbefa95d69379793
[ "Apache-2.0" ]
2
2019-12-07T09:29:59.000Z
2019-12-27T23:45:54.000Z
main.py
xrayian/PhysicsX
5211a43f79a179609144619ecbefa95d69379793
[ "Apache-2.0" ]
null
null
null
main.py
xrayian/PhysicsX
5211a43f79a179609144619ecbefa95d69379793
[ "Apache-2.0" ]
null
null
null
from os import system as console try: from support import Velocity, Acceleration, Time, Distance except: print("Support Library Missing, Program will terminate") exit() finder = None def intro(): console("title PhysicsX v1.4 Modular") print("\n" + ' ' + "#" * 48) introtext...
32.783019
139
0.513957
from os import system as console try: from support import Velocity, Acceleration, Time, Distance except: print("Support Library Missing, Program will terminate") exit() finder = None def intro(): console("title PhysicsX v1.4 Modular") print("\n" + ' ' + "#" * 48) introtext...
true
true
f7f45ad1101b960ca7a5e5945b3dd0afb1361c85
423
py
Python
gettext_compile.py
SylvainCorlay/spyder
b87bfa08abd53e1c97b59feeb51f665f6a632415
[ "MIT" ]
2
2016-01-23T11:52:24.000Z
2021-04-27T03:52:25.000Z
gettext_compile.py
SylvainCorlay/spyder
b87bfa08abd53e1c97b59feeb51f665f6a632415
[ "MIT" ]
null
null
null
gettext_compile.py
SylvainCorlay/spyder
b87bfa08abd53e1c97b59feeb51f665f6a632415
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) from gettext_helpers import do_compile if __name__ == "__main__": do_compile("spyderlib") do_compile("pylint", "spyplugins/ui/pylint") do_comp...
30.214286
59
0.699764
from gettext_helpers import do_compile if __name__ == "__main__": do_compile("spyderlib") do_compile("pylint", "spyplugins/ui/pylint") do_compile("profiler", "spyplugins/ui/profiler") do_compile("breakpoints", "spyplugins/ui/breakpoints")
true
true
f7f45b296d1c69c1af6be7bdcbdcaa3226d917a6
3,630
py
Python
tests/test_slddb/test_dbcreation.py
bmaranville/orsopy
74083afdce8f8f1ab3866c7f1f5209942c8734db
[ "MIT" ]
null
null
null
tests/test_slddb/test_dbcreation.py
bmaranville/orsopy
74083afdce8f8f1ab3866c7f1f5209942c8734db
[ "MIT" ]
null
null
null
tests/test_slddb/test_dbcreation.py
bmaranville/orsopy
74083afdce8f8f1ab3866c7f1f5209942c8734db
[ "MIT" ]
null
null
null
import sys import unittest from numpy import ndarray, testing from orsopy.slddb import SLDDB, dbconfig, element_table class TestCreateDB(unittest.TestCase): @classmethod def setUpClass(cls): cls.db = SLDDB(":memory:") cls.db.create_database() @classmethod def tearDownClass(cls): ...
34.571429
96
0.57135
import sys import unittest from numpy import ndarray, testing from orsopy.slddb import SLDDB, dbconfig, element_table class TestCreateDB(unittest.TestCase): @classmethod def setUpClass(cls): cls.db = SLDDB(":memory:") cls.db.create_database() @classmethod def tearDownClass(cls): ...
true
true
f7f45d77db07e7cbee4bddde4115b571e24efbcb
6,490
py
Python
integration/airflow/openlineage/airflow/utils.py
kedar-cz/OpenLineage
bd75b53c84fd9655f593c4f161e15c14785eb93e
[ "Apache-2.0" ]
null
null
null
integration/airflow/openlineage/airflow/utils.py
kedar-cz/OpenLineage
bd75b53c84fd9655f593c4f161e15c14785eb93e
[ "Apache-2.0" ]
null
null
null
integration/airflow/openlineage/airflow/utils.py
kedar-cz/OpenLineage
bd75b53c84fd9655f593c4f161e15c14785eb93e
[ "Apache-2.0" ]
null
null
null
# 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, software # distributed under th...
29.5
85
0.659168
import json import logging import os import subprocess from uuid import uuid4 from urllib.parse import urlparse, urlunparse import airflow from airflow.models import Connection from airflow.utils.db import provide_session from openlineage.airflow.facets import AirflowVersionRunFacet, AirflowRunArgsRunFacet...
true
true
f7f45d9028e21d4b9e2961c90ac7c1f05ec52e2a
281
py
Python
docs/examples/custom-resource/resource.py
besbes/formica
94b43a11ed534ee7afa6a4f45848842bb163bbb6
[ "MIT" ]
50
2017-02-14T13:26:04.000Z
2019-02-05T08:02:45.000Z
docs/examples/custom-resource/resource.py
besbes/formica
94b43a11ed534ee7afa6a4f45848842bb163bbb6
[ "MIT" ]
54
2017-02-06T11:06:33.000Z
2019-02-07T16:55:08.000Z
docs/examples/custom-resource/resource.py
besbes/formica
94b43a11ed534ee7afa6a4f45848842bb163bbb6
[ "MIT" ]
7
2017-03-20T10:29:46.000Z
2018-08-02T12:41:31.000Z
import cfnresponse def handler(event, context): print(event) response_data = {} response_data['Data'] = 'DataResponse' response_data['Reason'] = 'SomeTestReason' cfnresponse.send(event, context, cfnresponse.SUCCESS, response_data, "CustomResourcePhysicalID")
28.1
100
0.733096
import cfnresponse def handler(event, context): print(event) response_data = {} response_data['Data'] = 'DataResponse' response_data['Reason'] = 'SomeTestReason' cfnresponse.send(event, context, cfnresponse.SUCCESS, response_data, "CustomResourcePhysicalID")
true
true
f7f45e2e4e2abd9e487829859986d352ed0b8bab
683
py
Python
app/core/migrations/0002_tag.py
EddieRosas/recipe-app-api
956b0985edf0741e2510a7717c87b4f2c9903f73
[ "MIT" ]
null
null
null
app/core/migrations/0002_tag.py
EddieRosas/recipe-app-api
956b0985edf0741e2510a7717c87b4f2c9903f73
[ "MIT" ]
null
null
null
app/core/migrations/0002_tag.py
EddieRosas/recipe-app-api
956b0985edf0741e2510a7717c87b4f2c9903f73
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-07-20 21:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( ...
28.458333
118
0.616398
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name='Tag', fields=[ ...
true
true
f7f45eb0aa2e4b6a55a315d675f1f372136b3f51
1,220
py
Python
examples/VTK/SimpleCone/LocalRendering/app.py
DavidBerger98/py-web-vue
4f4fce83a9fdf447512c69d54727d62fd733ffca
[ "BSD-3-Clause" ]
14
2021-04-30T09:19:05.000Z
2022-03-29T06:47:37.000Z
examples/VTK/SimpleCone/LocalRendering/app.py
DavidBerger98/py-web-vue
4f4fce83a9fdf447512c69d54727d62fd733ffca
[ "BSD-3-Clause" ]
11
2021-06-11T17:54:15.000Z
2022-03-17T19:54:50.000Z
examples/VTK/SimpleCone/LocalRendering/app.py
DavidBerger98/py-web-vue
4f4fce83a9fdf447512c69d54727d62fd733ffca
[ "BSD-3-Clause" ]
5
2021-09-06T11:30:54.000Z
2022-03-11T10:01:24.000Z
from pywebvue import App from pywebvue.modules import VTK from vtkmodules.vtkFiltersSources import vtkConeSource # ----------------------------------------------------------------------------- # Web App setup # ----------------------------------------------------------------------------- app = App("VTK processing wi...
31.282051
79
0.346721
from pywebvue import App from pywebvue.modules import VTK from vtkmodules.vtkFiltersSources import vtkConeSource app = App("VTK processing with local Rendering") app.state = {"resolution": 6} app.enable_module(VTK) cone_generator = vtkConeSource() @app.change("resolution") def update_cone(): cone_g...
true
true
f7f45ff33f23aa60951d3e540f64629b29408698
803
py
Python
myproject/urls.py
MatthieuALLIER/Test_Django_Polls_Mallier
687a0b2ba1c337778e84f7b6f53523a11a834af6
[ "Apache-2.0" ]
null
null
null
myproject/urls.py
MatthieuALLIER/Test_Django_Polls_Mallier
687a0b2ba1c337778e84f7b6f53523a11a834af6
[ "Apache-2.0" ]
null
null
null
myproject/urls.py
MatthieuALLIER/Test_Django_Polls_Mallier
687a0b2ba1c337778e84f7b6f53523a11a834af6
[ "Apache-2.0" ]
null
null
null
"""myproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
34.913043
77
0.703611
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ]
true
true
f7f4607e62fab7d666b1c9695d2b8d03510b4670
1,503
py
Python
src/models/modelclass.py
bowbahdoe/foremast-brain
b8f3994d639ab1150fca04124a096e3e93510ba4
[ "Apache-2.0" ]
null
null
null
src/models/modelclass.py
bowbahdoe/foremast-brain
b8f3994d639ab1150fca04124a096e3e93510ba4
[ "Apache-2.0" ]
null
null
null
src/models/modelclass.py
bowbahdoe/foremast-brain
b8f3994d639ab1150fca04124a096e3e93510ba4
[ "Apache-2.0" ]
null
null
null
from metadata.metadata import METRIC_PERIOD class ModelHolder: def __init__(self, model_name, model_config=None, model_data=None, period=METRIC_PERIOD.HISTORICAL.value, id=''): if model_config is None: model_config = {} if model_data is None: model_data = {} self._...
25.474576
117
0.616101
from metadata.metadata import METRIC_PERIOD class ModelHolder: def __init__(self, model_name, model_config=None, model_data=None, period=METRIC_PERIOD.HISTORICAL.value, id=''): if model_config is None: model_config = {} if model_data is None: model_data = {} self._...
true
true
f7f46089208e58668cc1bf071a2be5f75b9a71bc
406
py
Python
pacote-download/d034 - calc o sal e dar o valor do seu aumento.py
Carlos-DOliveira/cursoemvideo-python3
4546c8a7360155243e2f7ecbbb80c57868f770a2
[ "MIT" ]
null
null
null
pacote-download/d034 - calc o sal e dar o valor do seu aumento.py
Carlos-DOliveira/cursoemvideo-python3
4546c8a7360155243e2f7ecbbb80c57868f770a2
[ "MIT" ]
null
null
null
pacote-download/d034 - calc o sal e dar o valor do seu aumento.py
Carlos-DOliveira/cursoemvideo-python3
4546c8a7360155243e2f7ecbbb80c57868f770a2
[ "MIT" ]
null
null
null
''' 034 Escreva um programa que pergunte o salário de um funcionário e calcule o valor do seu aumento. Para salário superiores a R$ 1.250, calcule um aumento de 10%. Para inferiores ou iguais, o aumento é de 15%.''' sal = float(input('Digite seu salário: R$ ')) if sal > 1250: print(f'Seu aumento é de R$ {sal + (s...
40.6
102
0.669951
sal = float(input('Digite seu salário: R$ ')) if sal > 1250: print(f'Seu aumento é de R$ {sal + (sal * 10/100):.2f}') else: print(f'Seu salário é dev R$ {sal + (sal *15/100):.2f}')
true
true
f7f461061fe067101c1ab679bfcc52f084b83639
2,077
py
Python
venv/Lib/site-packages/openapi_spec_validator-0.2.7-py3.7.egg/openapi_spec_validator/__init__.py
phurinaix/signed_credentials
2757f65a0f8cbcdd9593aa669e155c1b91c863c2
[ "MIT" ]
null
null
null
venv/Lib/site-packages/openapi_spec_validator-0.2.7-py3.7.egg/openapi_spec_validator/__init__.py
phurinaix/signed_credentials
2757f65a0f8cbcdd9593aa669e155c1b91c863c2
[ "MIT" ]
null
null
null
venv/Lib/site-packages/openapi_spec_validator-0.2.7-py3.7.egg/openapi_spec_validator/__init__.py
phurinaix/signed_credentials
2757f65a0f8cbcdd9593aa669e155c1b91c863c2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from openapi_spec_validator.shortcuts import ( validate_spec_factory, validate_spec_url_factory, ) from openapi_spec_validator.handlers import UrlHandler from openapi_spec_validator.schemas import get_openapi_schema from openapi_spec_validator.factories import JSONSpecValidatorFactory from o...
32.968254
76
0.803081
from openapi_spec_validator.shortcuts import ( validate_spec_factory, validate_spec_url_factory, ) from openapi_spec_validator.handlers import UrlHandler from openapi_spec_validator.schemas import get_openapi_schema from openapi_spec_validator.factories import JSONSpecValidatorFactory from openapi_spec_validator.v...
true
true