hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70ecb6c0cf51dc2a65ebc399f0d6b7793c3420a
5,755
py
Python
dumper.py
juliuswwj/wchprog
8cab50d60fb224a4a526d3cbddc5512a7a315c0c
[ "Unlicense" ]
24
2018-02-05T08:18:04.000Z
2021-06-09T07:48:18.000Z
dumper.py
juliuswwj/wchprog
8cab50d60fb224a4a526d3cbddc5512a7a315c0c
[ "Unlicense" ]
null
null
null
dumper.py
juliuswwj/wchprog
8cab50d60fb224a4a526d3cbddc5512a7a315c0c
[ "Unlicense" ]
4
2018-10-22T11:51:47.000Z
2022-01-03T18:31:17.000Z
#!/usr/bin/python from __future__ import print_function import struct import sys import usb.core import usb.util from intelhex import IntelHex scrambleCode = (0x29, 0x52, 0x8C, 0x70) stats = [0xff, 0x02, 0x00, 0xf5, 0xe5, 0x75, 0x03, 0x04, 0x80, 0x05, 0xd2, 0x01, 0xe4, 0xef, 0x82, 0x83, 0x08, 0x24,...
36.194969
150
0.541095
from __future__ import print_function import struct import sys import usb.core import usb.util from intelhex import IntelHex scrambleCode = (0x29, 0x52, 0x8C, 0x70) stats = [0xff, 0x02, 0x00, 0xf5, 0xe5, 0x75, 0x03, 0x04, 0x80, 0x05, 0xd2, 0x01, 0xe4, 0xef, 0x82, 0x83, 0x08, 0x24, 0xc2, 0x60, 0xe0,...
true
true
f70eccdf3d70966d6d64d44596755eb21c6d962f
2,833
py
Python
plugins/Limiter/test.py
jlu5/Limnoria
0e1e37a5a2bd5b717e11320b20773644b44502dd
[ "BSD-3-Clause" ]
40
2015-01-28T22:16:36.000Z
2021-12-15T02:22:56.000Z
plugins/Limiter/test.py
jlu5/Limnoria
0e1e37a5a2bd5b717e11320b20773644b44502dd
[ "BSD-3-Clause" ]
17
2015-01-05T21:06:22.000Z
2015-12-07T20:45:44.000Z
plugins/Limiter/test.py
jlu5/Limnoria
0e1e37a5a2bd5b717e11320b20773644b44502dd
[ "BSD-3-Clause" ]
28
2015-01-03T23:53:58.000Z
2021-06-01T05:27:20.000Z
### # Copyright (c) 2004-2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of co...
49.701754
79
0.715849
from supybot.test import * class LimiterTestCase(ChannelPluginTestCase): plugins = ('Limiter',) config = {'supybot.plugins.Limiter.enable': True} def testEnforceLimit(self): origMin = conf.supybot.plugins.Limiter.minimumExcess() origMax = conf.supybot.plugins.Limiter.maximumExcess() ...
true
true
f70ecd4ecdb9ab2866986a996b957e57d611e42c
1,547
py
Python
aiostripe/http_client.py
cypreess/aiostripe
8453a377b95373192c2e1598b9a951e8437d2bc9
[ "MIT" ]
null
null
null
aiostripe/http_client.py
cypreess/aiostripe
8453a377b95373192c2e1598b9a951e8437d2bc9
[ "MIT" ]
1
2018-08-18T16:14:50.000Z
2018-08-18T16:14:50.000Z
aiostripe/http_client.py
cypreess/aiostripe
8453a377b95373192c2e1598b9a951e8437d2bc9
[ "MIT" ]
null
null
null
import textwrap import aiohttp from aiostripe import error def new_default_http_client(*args, **kwargs): return AsyncioClient(*args, **kwargs) class HTTPClient(object): def __init__(self, verify_ssl_certs=True): self._verify_ssl_certs = verify_ssl_certs def request(self, method, url, headers,...
32.914894
112
0.625081
import textwrap import aiohttp from aiostripe import error def new_default_http_client(*args, **kwargs): return AsyncioClient(*args, **kwargs) class HTTPClient(object): def __init__(self, verify_ssl_certs=True): self._verify_ssl_certs = verify_ssl_certs def request(self, method, url, headers,...
true
true
f70ecd852b59e53b25f1ade391a6eaf6cb8f5d9e
9,513
py
Python
config/settings/base.py
JuvasArray/algerian-library
3e19fe23799198b0e0218148a692bcdd5df812b7
[ "MIT" ]
null
null
null
config/settings/base.py
JuvasArray/algerian-library
3e19fe23799198b0e0218148a692bcdd5df812b7
[ "MIT" ]
null
null
null
config/settings/base.py
JuvasArray/algerian-library
3e19fe23799198b0e0218148a692bcdd5df812b7
[ "MIT" ]
null
null
null
""" Base settings to build other settings files upon. """ import environ ROOT_DIR = environ.Path(__file__) - 3 # (algerian_library/config/settings/base.py - 3 = algerian_library/) APPS_DIR = ROOT_DIR.path('algerian_library') env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False...
39.473029
107
0.63019
import environ ROOT_DIR = environ.Path(__file__) - 3 APPS_DIR = ROOT_DIR.path('algerian_library') env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: env.read_env(str(ROOT_DIR.path('.env'))) DEBUG = env.bool('DJANGO_DEBUG', False) TIME_ZONE = '...
true
true
f70ece528875d32f06dc3c54bf04e158f1a2d255
1,041
py
Python
Colloquiums/2015-2016/Colloquium_2/Exercise_3.py
Szymon-Budziak/ASD_exercises_solutions
36ccbdae03a6c7e4ad141a2b7b01bef9353574ee
[ "MIT" ]
7
2021-12-28T23:38:42.000Z
2022-03-29T16:36:16.000Z
Colloquiums/2015-2016/Colloquium_2/Exercise_3.py
Szymon-Budziak/ASD_exercises_solutions
36ccbdae03a6c7e4ad141a2b7b01bef9353574ee
[ "MIT" ]
null
null
null
Colloquiums/2015-2016/Colloquium_2/Exercise_3.py
Szymon-Budziak/ASD_exercises_solutions
36ccbdae03a6c7e4ad141a2b7b01bef9353574ee
[ "MIT" ]
4
2021-06-29T20:21:52.000Z
2022-03-12T10:04:17.000Z
# Zbiór przedziałów [(a[1], b[1]), ..., (a[n], b[n])], każdy przedział należy do [0, 1]. Opisać algorytm # który sprawdzi czy jest możliwy taki wybór przedziałów, aby cały przedział [0, 1] zawierał się # w wybranych odcinkach. Przedział ma składać się z jak najmniejszej ilości odcinków. def minimum_intervals(T): ...
33.580645
104
0.511047
def minimum_intervals(T): T.sort(key=lambda x: x[0]) i = 0 end = 0 result = [] while i < len(T) and end != 1: actual_start = T[i][0] actual_end = T[i][1] flag = True while i != len(T) and T[i][0] <= end: if actual_end < T[i][1]: actual_st...
true
true
f70ecf74f79d361841d4e6df6243e83e7cf59479
3,423
py
Python
fuelweb_test/tests/tests_strength/test_master_node_failover.py
Fiware/ops.Fuel-main-dev
779ffdcc9630d780777c60270fdc2f8baf87750a
[ "Apache-2.0" ]
null
null
null
fuelweb_test/tests/tests_strength/test_master_node_failover.py
Fiware/ops.Fuel-main-dev
779ffdcc9630d780777c60270fdc2f8baf87750a
[ "Apache-2.0" ]
null
null
null
fuelweb_test/tests/tests_strength/test_master_node_failover.py
Fiware/ops.Fuel-main-dev
779ffdcc9630d780777c60270fdc2f8baf87750a
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
35.28866
79
0.665498
from proboscis.asserts import assert_equal from proboscis import test from fuelweb_test.helpers import common from fuelweb_test.helpers import os_actions from fuelweb_test import settings from fuelweb_test import logger from fuelweb_test.tests import base_test_case @test(groups=["thread_non_func_1"]) class DeployHA...
true
true
f70ed06f593fd1a20fc7b1ab5ee37ec4ed1cbc04
6,980
py
Python
denonavr/denon_receiver_xml.py
scarface-4711/misc_python_tools
66ce06f2f77d2e49bdbac7fd11e6fa7cbb6e56c9
[ "MIT" ]
null
null
null
denonavr/denon_receiver_xml.py
scarface-4711/misc_python_tools
66ce06f2f77d2e49bdbac7fd11e6fa7cbb6e56c9
[ "MIT" ]
null
null
null
denonavr/denon_receiver_xml.py
scarface-4711/misc_python_tools
66ce06f2f77d2e49bdbac7fd11e6fa7cbb6e56c9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This python program saves test XMLs from denon receiver to current directory. Usage: python denon_receiver_xml.py --host 192.168.0.250 --prefix AVR-X4100W :copyright: (c) 2017 by Oliver Goetz. :license: MIT, see LICENSE for more details. """ import argparse from io im...
40.581395
78
0.557593
import argparse from io import BytesIO import requests import xml.etree.ElementTree as ET from collections import namedtuple XML = namedtuple("XML", ["port", "type", "path", "tags", "filename"]) SAVED_XML = [XML("80", "post", "/goform/AppCommand.xml", ["GetFriendlyName"], "AppCommand...
true
true
f70ed079519d07f15d65e53bdf79fb821a1b32ee
572
py
Python
pajbot/models/roulette.py
sadlyfell/bullbot
b6ef96f61678fab4a245d8ccddf9d1ae7aae9fee
[ "MIT" ]
null
null
null
pajbot/models/roulette.py
sadlyfell/bullbot
b6ef96f61678fab4a245d8ccddf9d1ae7aae9fee
[ "MIT" ]
null
null
null
pajbot/models/roulette.py
sadlyfell/bullbot
b6ef96f61678fab4a245d8ccddf9d1ae7aae9fee
[ "MIT" ]
null
null
null
import logging from sqlalchemy import Column, INT from sqlalchemy_utc import UtcDateTime from pajbot import utils from pajbot.managers.db import Base log = logging.getLogger(__name__) class Roulette(Base): __tablename__ = "roulette" id = Column(INT, primary_key=True) user_id = Column(INT, index=True, ...
23.833333
54
0.715035
import logging from sqlalchemy import Column, INT from sqlalchemy_utc import UtcDateTime from pajbot import utils from pajbot.managers.db import Base log = logging.getLogger(__name__) class Roulette(Base): __tablename__ = "roulette" id = Column(INT, primary_key=True) user_id = Column(INT, index=True, ...
true
true
f70ed2aba5dd366ab069ddd450e6381cb10d7545
1,620
py
Python
course1/fibonacci.py
ropable/algorithmic_toolbox
b4dcf4fda19c394da2baa6eced0732bf50585237
[ "MIT" ]
1
2017-11-21T08:08:55.000Z
2017-11-21T08:08:55.000Z
course1/fibonacci.py
ropable/algorithmic_toolbox
b4dcf4fda19c394da2baa6eced0732bf50585237
[ "MIT" ]
null
null
null
course1/fibonacci.py
ropable/algorithmic_toolbox
b4dcf4fda19c394da2baa6eced0732bf50585237
[ "MIT" ]
null
null
null
# python3 import sys def fib_slow(n): '''Dumb (slow) example solution. ''' if (n <= 1): return n return fib_slow(n - 1) + fib_slow(n - 2) def fib_countup(n): '''Less-dumb 'count up as you go' solution. ''' if (n <= 1): return n x, y = 0, 1 for i in range(n): ...
21.315789
68
0.5
import sys def fib_slow(n): if (n <= 1): return n return fib_slow(n - 1) + fib_slow(n - 2) def fib_countup(n): if (n <= 1): return n x, y = 0, 1 for i in range(n): x, y = y, x + y return x def fib_memoize(n, saved={0: 0, 1: 1}): if (n <= 1): return n ...
true
true
f70ed379460fc7865b9be45f22f1afeb631c5ba3
4,077
py
Python
stream_alert/rule_processor/config.py
serhatcan/streamalert
0549bb05163b7b54c30365312948caa21e44be98
[ "Apache-2.0" ]
1
2020-03-10T16:20:31.000Z
2020-03-10T16:20:31.000Z
stream_alert/rule_processor/config.py
serhatcan/streamalert
0549bb05163b7b54c30365312948caa21e44be98
[ "Apache-2.0" ]
null
null
null
stream_alert/rule_processor/config.py
serhatcan/streamalert
0549bb05163b7b54c30365312948caa21e44be98
[ "Apache-2.0" ]
null
null
null
''' Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
36.079646
89
0.646063
import json import os from collections import OrderedDict class ConfigError(Exception): pass def load_config(conf_dir='conf/'): conf_files = { 'sources': 'sources.json', 'logs': 'logs.json' } config = {} for desc, filename in conf_files.iteritems(): with open(os.path.join...
true
true
f70ed39ecc8bdbd9e8238a2309e2bc5cdca95fb6
5,838
py
Python
openstack_dashboard/test/integration_tests/helpers.py
izadorozhna/dashboard_integration_tests
c1ee45b98832cf3a4bb01aa37410afc3a96fd2a3
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/integration_tests/helpers.py
izadorozhna/dashboard_integration_tests
c1ee45b98832cf3a4bb01aa37410afc3a96fd2a3
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/integration_tests/helpers.py
izadorozhna/dashboard_integration_tests
c1ee45b98832cf3a4bb01aa37410afc3a96fd2a3
[ "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 the Li...
36.4875
86
0.658787
import datetime import os import sys import time import traceback import uuid import testtools import xvfbwrapper from openstack_dashboard.test.integration_tests import config from openstack_dashboard.test.integration_tests.pages import loginpage from openstack_dashboard.test.integration_tests import webdriver ROOT...
true
true
f70ed42cc612bcaad5c20d49c4025518f3b003ee
753
py
Python
issues/migrations/0006_auto_20200501_0352.py
QizaiMing/ergo-project-manager
2b02b2ab6d9e48bfccbbca8c05180b07177dcb77
[ "MIT" ]
null
null
null
issues/migrations/0006_auto_20200501_0352.py
QizaiMing/ergo-project-manager
2b02b2ab6d9e48bfccbbca8c05180b07177dcb77
[ "MIT" ]
3
2020-11-01T22:08:38.000Z
2022-03-12T00:49:00.000Z
issues/migrations/0006_auto_20200501_0352.py
QizaiMing/ergo-project-manager
2b02b2ab6d9e48bfccbbca8c05180b07177dcb77
[ "MIT" ]
2
2021-01-03T07:17:16.000Z
2021-05-29T17:27:11.000Z
# Generated by Django 2.2.12 on 2020-05-01 03:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('issues', '0005_auto_20200501_0350'), ] operations = [ migrations.AlterFie...
28.961538
138
0.648074
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('issues', '0005_auto_20200501_0350'), ] operations = [ migrations.AlterField( model_name='issue', n...
true
true
f70ed45272dbd6f48258226d6075604286c262fa
1,308
py
Python
tests/test_xml_bibs.py
Mfgloger/overload
b34f88750d9272db268324807f7e8ba308940d1e
[ "MIT" ]
null
null
null
tests/test_xml_bibs.py
Mfgloger/overload
b34f88750d9272db268324807f7e8ba308940d1e
[ "MIT" ]
58
2017-10-16T13:09:33.000Z
2022-01-10T15:35:58.000Z
tests/test_xml_bibs.py
Mfgloger/overload
b34f88750d9272db268324807f7e8ba308940d1e
[ "MIT" ]
2
2019-04-15T16:04:38.000Z
2020-11-03T17:58:33.000Z
# -*- coding: utf-8 -*- import xml.etree.ElementTree as ET import unittest from context import xml_bibs as xb class TestGetSubjectFields(unittest.TestCase): """Tests parsing of subjects from marcxml""" def setUp(self): tree = ET.parse("sample_marcxml.xml") self.data1 = tree.getroot() ...
25.153846
84
0.666667
import xml.etree.ElementTree as ET import unittest from context import xml_bibs as xb class TestGetSubjectFields(unittest.TestCase): def setUp(self): tree = ET.parse("sample_marcxml.xml") self.data1 = tree.getroot() tree = ET.parse("missing_tags_sample_marcxml.xml") self.data2...
true
true
f70ed4a6ff4da8d2043098a40b6f32d51fb96cb8
8,719
py
Python
run_preprocessing.py
ehwa009/Eye_Motion_Dataset
42a1c897dc4209c6bb2de94c915ab36995855202
[ "MIT" ]
null
null
null
run_preprocessing.py
ehwa009/Eye_Motion_Dataset
42a1c897dc4209c6bb2de94c915ab36995855202
[ "MIT" ]
null
null
null
run_preprocessing.py
ehwa009/Eye_Motion_Dataset
42a1c897dc4209c6bb2de94c915ab36995855202
[ "MIT" ]
1
2020-03-11T02:14:14.000Z
2020-03-11T02:14:14.000Z
import pickle import argparse import pandas as pd import numpy as np import math from tqdm import tqdm from sklearn import decomposition CENTER_X = int(960 / 3 / 2) CENTER_Y = int(540 / 3 / 2) # CENTER_X = 0 # CENTER_Y = 0 def load_data(path, data_size=None): with open(path, 'rb') as f: data = pickle.l...
40.553488
141
0.592384
import pickle import argparse import pandas as pd import numpy as np import math from tqdm import tqdm from sklearn import decomposition CENTER_X = int(960 / 3 / 2) CENTER_Y = int(540 / 3 / 2) def load_data(path, data_size=None): with open(path, 'rb') as f: data = pickle.load(f) if data_size != -1:...
true
true
f70ed57a100157333fff98601e50b3e635feeceb
1,144
py
Python
summarize_clstr_table.py
FischbachLab/hCom_variable_regions
6f1108c461a7e31964d1d81a83c03b9f4dad4c76
[ "MIT" ]
null
null
null
summarize_clstr_table.py
FischbachLab/hCom_variable_regions
6f1108c461a7e31964d1d81a83c03b9f4dad4c76
[ "MIT" ]
null
null
null
summarize_clstr_table.py
FischbachLab/hCom_variable_regions
6f1108c461a7e31964d1d81a83c03b9f4dad4c76
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ## How many clusters have more than one organisms as it's members import sys import pandas as pd import logging def main(): clstr_table = sys.argv[1] output = sys.argv[2] clstr_df = pd.read_table(clstr_table, header=0) clstr_df["organism"] = clstr_df["id"].apply(lambda x: x.spl...
28.6
129
0.664336
import sys import pandas as pd import logging def main(): clstr_table = sys.argv[1] output = sys.argv[2] clstr_df = pd.read_table(clstr_table, header=0) clstr_df["organism"] = clstr_df["id"].apply(lambda x: x.split(":")[2].split("_")[0]) summ_df = clstr_df.groupby("clstr").agg( num_organ...
true
true
f70ed5fc8d9dec798cc962a5f3c011a61fe76693
2,444
py
Python
scraper/views.py
ziibii88/The_Doe_Agency
2545aeae71c779166bef78941cac36551498ca76
[ "MIT" ]
2
2021-07-16T10:25:15.000Z
2021-08-07T04:44:08.000Z
scraper/views.py
ziibii88/The_Doe_Agency
2545aeae71c779166bef78941cac36551498ca76
[ "MIT" ]
null
null
null
scraper/views.py
ziibii88/The_Doe_Agency
2545aeae71c779166bef78941cac36551498ca76
[ "MIT" ]
null
null
null
from http import HTTPStatus from rest_framework import views, viewsets from rest_framework.exceptions import ParseError from rest_framework.request import Request from rest_framework.response import Response from scraper import models, serializers, tasks from scraper.utils import get_random_working_proxy class Webs...
33.944444
77
0.673486
from http import HTTPStatus from rest_framework import views, viewsets from rest_framework.exceptions import ParseError from rest_framework.request import Request from rest_framework.response import Response from scraper import models, serializers, tasks from scraper.utils import get_random_working_proxy class Webs...
true
true
f70ed613214d53ae4a2ef2bfdd73ff060ad133c9
1,723
py
Python
rainforest/resources/generator.py
apibitsco/rainforestapp-python
426245fdb93748d4c2a6f3f12bcce3af20320137
[ "MIT" ]
1
2016-10-25T18:47:55.000Z
2016-10-25T18:47:55.000Z
rainforest/resources/generator.py
apibitsco/rainforestapp-python
426245fdb93748d4c2a6f3f12bcce3af20320137
[ "MIT" ]
6
2015-10-15T11:27:42.000Z
2019-01-31T10:12:42.000Z
rainforest/resources/generator.py
rainforestapp/rainforest-python
c0e5c5dba55c000ee6f92ae5fc9db5f90e415500
[ "MIT" ]
null
null
null
from ..apibits import * from ..endpoints import GeneratorsEndpoint from ..endpoints import GeneratorRowsEndpoint class Generator(ApiResource): @classmethod def all(cls, params={}, headers={}): res = cls.default_client().generators().all(params, headers) return res @classmethod def ret...
31.907407
87
0.623331
from ..apibits import * from ..endpoints import GeneratorsEndpoint from ..endpoints import GeneratorRowsEndpoint class Generator(ApiResource): @classmethod def all(cls, params={}, headers={}): res = cls.default_client().generators().all(params, headers) return res @classmethod def ret...
true
true
f70ed6226b4c9cac885acb0f851cfe76cf8b5c36
2,526
py
Python
plugins/Relay/__init__.py
mogad0n/Limnoria
f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c
[ "BSD-3-Clause" ]
476
2015-01-04T17:42:59.000Z
2021-08-13T07:40:54.000Z
plugins/Relay/__init__.py
mogad0n/Limnoria
f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c
[ "BSD-3-Clause" ]
491
2015-01-01T04:12:23.000Z
2021-08-12T19:24:47.000Z
plugins/Relay/__init__.py
mogad0n/Limnoria
f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c
[ "BSD-3-Clause" ]
203
2015-01-02T18:29:43.000Z
2021-08-15T12:52:22.000Z
### # Copyright (c) 2005, Jeremiah Fincher # Copyright (c) 2010-2021, The Limnoria Contributors # 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 t...
39.46875
79
0.770388
import supybot import supybot.world as world __version__ = "%%VERSION%%" __author__ = supybot.authors.jemfinch __maintainer__ = supybot.authors.limnoria_core # This is a dictionary mapping supybot.Author instances to lists of # contributions. __contributors__ = {} from . import config from . import plugin from im...
true
true
f70ed72ef52e88cf5e169ee95f60603d4184a74c
10,110
py
Python
jina/__init__.py
DeepikaGupta09/jina
2fc328d10f2fbc79d943064a90dd3170cb83f979
[ "Apache-2.0" ]
1
2021-01-30T11:59:27.000Z
2021-01-30T11:59:27.000Z
jina/__init__.py
DeepikaGupta09/jina
2fc328d10f2fbc79d943064a90dd3170cb83f979
[ "Apache-2.0" ]
null
null
null
jina/__init__.py
DeepikaGupta09/jina
2fc328d10f2fbc79d943064a90dd3170cb83f979
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" # do not change this line manually # this is managed by git tag and updated on every release __version__ = '0.6.8' # do not change this line manually # this is managed by proto/build-proto.sh and updated on every exe...
37.583643
123
0.608902
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" __version__ = '0.6.8' __proto_version__ = '0.0.65' import platform import sys if sys.version_info < (3, 7, 0): raise OSError('Jina requires Python 3.7 and above, but yours is %s' % sys.version_info) if sys.ve...
true
true
f70ed7a3904e97fcc423d33699a21383a00fac2d
1,141
py
Python
starthinker/task/dcm_api/schema/contentCategory.py
quan/starthinker
4e392415d77affd4a3d91165d1141ab38efd3b8b
[ "Apache-2.0" ]
null
null
null
starthinker/task/dcm_api/schema/contentCategory.py
quan/starthinker
4e392415d77affd4a3d91165d1141ab38efd3b8b
[ "Apache-2.0" ]
null
null
null
starthinker/task/dcm_api/schema/contentCategory.py
quan/starthinker
4e392415d77affd4a3d91165d1141ab38efd3b8b
[ "Apache-2.0" ]
null
null
null
########################################################################### # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...
28.525
75
0.548642
contentCategory_Schema = [{ 'description': '', 'name': 'accountId', 'type': 'INT64', 'mode': 'NULLABLE' }, { 'description': '', 'name': 'id', 'type': 'INT64', 'mode': 'NULLABLE' }, { 'description': '', 'name': 'kind', 'type': 'STRING', 'mode': 'NULLABLE' }, { 'descri...
true
true
f70ed86c28d0cafaa9d770eaabf664fc7e463062
24,589
py
Python
federatedml/ftl/hetero_ftl/hetero_ftl_host.py
ZZIQIN/FATE
cc6783927564cbb15c067d5010f1cdf82a5de20a
[ "Apache-2.0" ]
1
2019-07-29T13:22:36.000Z
2019-07-29T13:22:36.000Z
federatedml/ftl/hetero_ftl/hetero_ftl_host.py
ZZIQIN/FATE
cc6783927564cbb15c067d5010f1cdf82a5de20a
[ "Apache-2.0" ]
null
null
null
federatedml/ftl/hetero_ftl/hetero_ftl_host.py
ZZIQIN/FATE
cc6783927564cbb15c067d5010f1cdf82a5de20a
[ "Apache-2.0" ]
null
null
null
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
52.87957
163
0.65086
import time import numpy as np from arch.api.utils import log_utils from federatedml.evaluation import Evaluation from federatedml.ftl.data_util.common_data_util import overlapping_samples_converter, load_model_parameters, \ save_model_parameters, create_table, convert_instance_table_to_dict, convert_instance_ta...
true
true
f70ed94f13b9a9e2b5858fd0c87188c4b200f45e
12,025
py
Python
h5pyViewer/FrmPyFAI.py
warlock8hz/h5pyViewer
4955aa6fdd66255738bd86d7b8947282133c5b82
[ "BSD-2-Clause" ]
null
null
null
h5pyViewer/FrmPyFAI.py
warlock8hz/h5pyViewer
4955aa6fdd66255738bd86d7b8947282133c5b82
[ "BSD-2-Clause" ]
null
null
null
h5pyViewer/FrmPyFAI.py
warlock8hz/h5pyViewer
4955aa6fdd66255738bd86d7b8947282133c5b82
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python #*-----------------------------------------------------------------------* #| | #| Copyright (c) 2013 by Paul Scherrer Institute (http://www.psi.ch) | #| ...
33.495822
139
0.66079
if __name__ == '__main__': import wxversion wxversion.ensureMinimal('2.8') import wx import matplotlib as mpl if __name__ == '__main__': mpl.use('WXAgg') import os,h5py import numpy as np import utilities as ut from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas import os,h5py ...
true
true
f70eda35866cba2084e688dbeedbd967c56a9f44
548
py
Python
my_agents/evaluate.py
ramirezalbert3/my_agents
fd8ffc8c2f157292b4d309ab1899326007aea726
[ "MIT" ]
null
null
null
my_agents/evaluate.py
ramirezalbert3/my_agents
fd8ffc8c2f157292b4d309ab1899326007aea726
[ "MIT" ]
null
null
null
my_agents/evaluate.py
ramirezalbert3/my_agents
fd8ffc8c2f157292b4d309ab1899326007aea726
[ "MIT" ]
null
null
null
import gym from gym import logger from core.states import StateSerializer from core.runner import Runner from agents.dqn_agent import DQNAgent logger.set_level(logger.INFO) env_name = 'CartPole-v0' env = gym.make(env_name) env._max_episode_steps = 500 serializer = StateSerializer(env.observation_space.shape) agent ...
22.833333
57
0.751825
import gym from gym import logger from core.states import StateSerializer from core.runner import Runner from agents.dqn_agent import DQNAgent logger.set_level(logger.INFO) env_name = 'CartPole-v0' env = gym.make(env_name) env._max_episode_steps = 500 serializer = StateSerializer(env.observation_space.shape) agent ...
true
true
f70eda886905b05d99fcfd52ab749c90f86d04df
2,185
py
Python
budweiser/budweiser.py
lukebeer/budweiser
8e77377c5952375f74371229d1d770cb1efe176f
[ "MIT" ]
null
null
null
budweiser/budweiser.py
lukebeer/budweiser
8e77377c5952375f74371229d1d770cb1efe176f
[ "MIT" ]
null
null
null
budweiser/budweiser.py
lukebeer/budweiser
8e77377c5952375f74371229d1d770cb1efe176f
[ "MIT" ]
null
null
null
__author__ = 'luke.beer' import subprocess import threading import logging import socket import time import questions import states class Executor(threading.Thread): def __init__(self, r, channel): threading.Thread.__init__(self) self.redis = r self.channel = channel self.pubsub =...
32.132353
113
0.585812
__author__ = 'luke.beer' import subprocess import threading import logging import socket import time import questions import states class Executor(threading.Thread): def __init__(self, r, channel): threading.Thread.__init__(self) self.redis = r self.channel = channel self.pubsub =...
true
true
f70edb0bd9f3d76f8d1b1327fa9458f595a64ab3
3,738
py
Python
rule1to6_words.py
e96031413/proofread
f4fc798d3b57c6f7a55f4e18de68f2272eb9fc44
[ "MIT" ]
null
null
null
rule1to6_words.py
e96031413/proofread
f4fc798d3b57c6f7a55f4e18de68f2272eb9fc44
[ "MIT" ]
null
null
null
rule1to6_words.py
e96031413/proofread
f4fc798d3b57c6f7a55f4e18de68f2272eb9fc44
[ "MIT" ]
null
null
null
import re import json from color_print import * # read rules from json file with open("rules.json", "r", encoding="utf-8") as json_data: rules = json.load(json_data) # create new rules by replacing 'is' to 'was', 'has been', ... def augment(sentence): """change 'is' in the sentence to was, has been,...
41.076923
98
0.593098
import re import json from color_print import * with open("rules.json", "r", encoding="utf-8") as json_data: rules = json.load(json_data) def augment(sentence): pad_sentence = " " + sentence + " " augmented_str = [pad_sentence] if 'is' in pad_sentence: index = pad_sentence.find("is"...
true
true
f70edd2a8408b41deb049f6068375e7a834dd31f
17,816
py
Python
examples/optics/pyoptic.py
abbasegbeyemi/pyqtgraph
6aeafce477d1d7eebb9d2fe824d4c5573ef9ceed
[ "MIT" ]
1
2021-04-28T05:16:24.000Z
2021-04-28T05:16:24.000Z
examples/optics/pyoptic.py
abbasegbeyemi/pyqtgraph
6aeafce477d1d7eebb9d2fe824d4c5573ef9ceed
[ "MIT" ]
1
2021-04-04T15:05:47.000Z
2021-05-15T23:56:42.000Z
examples/optics/pyoptic.py
abbasegbeyemi/pyqtgraph
6aeafce477d1d7eebb9d2fe824d4c5573ef9ceed
[ "MIT" ]
1
2021-05-19T10:11:17.000Z
2021-05-19T10:11:17.000Z
# -*- coding: utf-8 -*- import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore import numpy as np import csv, gzip, os from pyqtgraph import Point class GlassDB: """ Database of dispersion coefficients for Schott glasses + Corning 7980 """ def __init__(self, fileName='schott_glasses.csv'): ...
31.701068
119
0.516446
import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore import numpy as np import csv, gzip, os from pyqtgraph import Point class GlassDB: def __init__(self, fileName='schott_glasses.csv'): path = os.path.dirname(__file__) fh = gzip.open(os.path.join(path, 'schott_glasses.csv.gz'), 'rb') ...
true
true
f70eddb35e62f56ceb999ef8f00c042b5f03b8cb
22,177
py
Python
src/app_server/tasks/proto/task_pb2.py
ArneGudermann/app_server
f28179861dd96766610ddc3867dbe1285eb8fcbc
[ "MIT" ]
null
null
null
src/app_server/tasks/proto/task_pb2.py
ArneGudermann/app_server
f28179861dd96766610ddc3867dbe1285eb8fcbc
[ "MIT" ]
null
null
null
src/app_server/tasks/proto/task_pb2.py
ArneGudermann/app_server
f28179861dd96766610ddc3867dbe1285eb8fcbc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/tasks_v2/proto/task.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _...
37.909402
1,822
0.632908
import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym...
true
true
f70eddcaeb1d3f78ffc1a296a080675447ca2f91
1,215
py
Python
game/plugins/amblight/amblight.py
danieldugas/naith
04c85412c93ea1572f3146ddadae39af3dc9e9f7
[ "Apache-2.0" ]
5
2015-07-12T04:26:10.000Z
2021-03-23T19:56:45.000Z
game/plugins/amblight/amblight.py
danieldugas/naith
04c85412c93ea1572f3146ddadae39af3dc9e9f7
[ "Apache-2.0" ]
1
2015-04-11T07:03:04.000Z
2018-07-18T11:12:38.000Z
game/plugins/amblight/amblight.py
danieldugas/naith
04c85412c93ea1572f3146ddadae39af3dc9e9f7
[ "Apache-2.0" ]
3
2016-01-12T13:58:29.000Z
2021-05-26T12:55:07.000Z
# Copyright Tom SF Haines, Reinier de Blois, Aaron Snoswell # # 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...
31.153846
107
0.730864
from panda3d.core import VBase4 from panda3d.core import AmbientLight as PAmbientLight class AmbLight: def __init__(self,manager,xml): self.light = PAmbientLight('alight') self.lightNode = render.attachNewNode(self.light) self.reload(manager,xml) def reload(self,manager,xml): color = xml.find(...
true
true
f70edf1a09050130a9565a23e6e442da972cb095
3,196
py
Python
machine_learning/tf_notMNIST_Training_Gradient_Descent.py
XinyueZ/some-python-codes
2d7296a4deebb0cd086be34ad7d66f5042cdf6e6
[ "Unlicense" ]
null
null
null
machine_learning/tf_notMNIST_Training_Gradient_Descent.py
XinyueZ/some-python-codes
2d7296a4deebb0cd086be34ad7d66f5042cdf6e6
[ "Unlicense" ]
null
null
null
machine_learning/tf_notMNIST_Training_Gradient_Descent.py
XinyueZ/some-python-codes
2d7296a4deebb0cd086be34ad7d66f5042cdf6e6
[ "Unlicense" ]
null
null
null
# # Run NN, multinomial logistic regression using simple gradient descent. # import config import numpy as np import tensorflow as tf from tensorflow import (Variable, constant, global_variables_initializer, truncated_normal, zeros) from tf_training_helper import TrainingHelper class TF_notMN...
40.974359
186
0.682728
import config import numpy as np import tensorflow as tf from tensorflow import (Variable, constant, global_variables_initializer, truncated_normal, zeros) from tf_training_helper import TrainingHelper class TF_notMNIST_Training_Gradient_Descent: def __init__(self, each_object_size_width=...
true
true
f70edfed142a1adff7c6e18b38c7bde60881368c
35,539
py
Python
peprint/peprint.py
tommikaikkonen/peprint
7248ae6f92f1b05b2c9089ce69280120ad4fcd69
[ "MIT" ]
3
2017-10-24T08:35:18.000Z
2017-12-18T03:23:19.000Z
peprint/peprint.py
tommikaikkonen/peprint
7248ae6f92f1b05b2c9089ce69280120ad4fcd69
[ "MIT" ]
null
null
null
peprint/peprint.py
tommikaikkonen/peprint
7248ae6f92f1b05b2c9089ce69280120ad4fcd69
[ "MIT" ]
null
null
null
import inspect import math import re from functools import singledispatch, partial from itertools import chain, cycle from .api import ( always_break, annotate, concat, contextual, flat_choice, fill, group, nest, NIL, LINE, SOFTLINE, HARDLINE ) from .doc import ( Ann...
26.305699
88
0.552886
import inspect import math import re from functools import singledispatch, partial from itertools import chain, cycle from .api import ( always_break, annotate, concat, contextual, flat_choice, fill, group, nest, NIL, LINE, SOFTLINE, HARDLINE ) from .doc import ( Ann...
true
true
f70ee0285769d992a8e060449a2f8403b9f45ac8
248
py
Python
python/learn/base/function/l1/lambda.py
qrsforever/workspace
53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f
[ "MIT" ]
2
2017-06-07T03:20:42.000Z
2020-01-07T09:14:26.000Z
python/learn/base/function/l1/lambda.py
qrsforever/workspace
53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f
[ "MIT" ]
null
null
null
python/learn/base/function/l1/lambda.py
qrsforever/workspace
53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f
[ "MIT" ]
null
null
null
#!/usr/bin/python2.7 #coding:utf-8 def getFunc(n): return lambda x, y: x**n + y**n f = getFunc(2) print '1**2 + 2**2 = ', f(1,2) print '2**2 + 3**2 = ', f(2,3) f = getFunc(3) print '1**3 + 2**3 = ', f(1,2) print '2**3 + 3**3 = ', f(2,3)
17.714286
35
0.479839
def getFunc(n): return lambda x, y: x**n + y**n f = getFunc(2) print '1**2 + 2**2 = ', f(1,2) print '2**2 + 3**2 = ', f(2,3) f = getFunc(3) print '1**3 + 2**3 = ', f(1,2) print '2**3 + 3**3 = ', f(2,3)
false
true
f70ee17398871ce80a6a796f7ad57bf07638ed4a
2,933
py
Python
fastai/callback/tensorboard.py
mone27/fastai
af8dfc07ca3f333f8c1bdbea1803af669a53738f
[ "Apache-2.0" ]
5
2020-08-27T00:52:27.000Z
2022-03-31T02:46:05.000Z
fastai/callback/tensorboard.py
mone27/fastai
af8dfc07ca3f333f8c1bdbea1803af669a53738f
[ "Apache-2.0" ]
22
2021-01-07T23:35:00.000Z
2022-03-20T00:16:40.000Z
fastai/callback/tensorboard.py
mone27/fastai
af8dfc07ca3f333f8c1bdbea1803af669a53738f
[ "Apache-2.0" ]
2
2021-04-17T03:33:21.000Z
2022-02-25T19:32:34.000Z
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/71_callback.tensorboard.ipynb (unless otherwise specified). __all__ = ['TensorBoardCallback'] # Cell from ..basics import * # Cell import tensorboard from torch.utils.tensorboard import SummaryWriter from .fp16 import ModelToHalf # Cell class TensorBoardCallback(Callb...
41.309859
116
0.663484
__all__ = ['TensorBoardCallback'] from ..basics import * import tensorboard from torch.utils.tensorboard import SummaryWriter from .fp16 import ModelToHalf class TensorBoardCallback(Callback): def __init__(self, log_dir=None, trace_model=True, log_preds=True, n_preds=9): store_attr(self, 'log_dir,trace_...
true
true
f70ee1a5cbe2ca7f5dad96cb3fc51ffba04714a7
4,057
py
Python
plugins/action/session_service_node_info.py
steinzi/ansible-ise
0add9c8858ed8e0e5e7219fbaf0c936b6d7cc6c0
[ "MIT" ]
null
null
null
plugins/action/session_service_node_info.py
steinzi/ansible-ise
0add9c8858ed8e0e5e7219fbaf0c936b6d7cc6c0
[ "MIT" ]
null
null
null
plugins/action/session_service_node_info.py
steinzi/ansible-ise
0add9c8858ed8e0e5e7219fbaf0c936b6d7cc6c0
[ "MIT" ]
null
null
null
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.plugins.action import ActionBase try: from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_validate import ( AnsibleArgSpecValidator, ) except ImportError: ANSIBLE_UTILS_IS_INST...
35.902655
128
0.627064
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.plugins.action import ActionBase try: from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_validate import ( AnsibleArgSpecValidator, ) except ImportError: ANSIBLE_UTILS_IS_INST...
true
true
f70ee1ba459f4fe70e554fa936e19ebdb676d822
10,877
py
Python
azure-batch/azure/batch/models/cloud_pool.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-batch/azure/batch/models/cloud_pool.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-batch/azure/batch/models/cloud_pool.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. 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 ...
56.651042
695
0.717753
from msrest.serialization import Model class CloudPool(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'e_tag': {'key': 'eTag', 'type': 'str'}, 'last_modified': {'k...
true
true
f70ee258c4ab57190cefb9567f8aebd2ad94bf85
8,509
py
Python
utils/inout.py
alarca94/senti-transfer
da83a072c8d471bc74aa25b237b5e301502db869
[ "MIT" ]
null
null
null
utils/inout.py
alarca94/senti-transfer
da83a072c8d471bc74aa25b237b5e301502db869
[ "MIT" ]
null
null
null
utils/inout.py
alarca94/senti-transfer
da83a072c8d471bc74aa25b237b5e301502db869
[ "MIT" ]
null
null
null
import os import yaml import pandas as pd import xml.etree.ElementTree as ET from types import SimpleNamespace from sklearn.model_selection import train_test_split from utils.experiment_utils import create_linspace from utils.preprocess import * SOURCE_PATH = './source_data' DATA_PATH = './data' CONFIG_PATH = './c...
41.916256
120
0.616289
import os import yaml import pandas as pd import xml.etree.ElementTree as ET from types import SimpleNamespace from sklearn.model_selection import train_test_split from utils.experiment_utils import create_linspace from utils.preprocess import * SOURCE_PATH = './source_data' DATA_PATH = './data' CONFIG_PATH = './c...
true
true
f70ee2731d6b20084634923bada7c3aa114f534c
2,124
py
Python
django/contrib/admin/templatetags/log.py
tomleo/django
ebfb71c64a786620947c9d598fd1ebae2958acff
[ "BSD-3-Clause" ]
1
2017-12-01T06:26:57.000Z
2017-12-01T06:26:57.000Z
django/contrib/admin/templatetags/log.py
liuliang2015/django
86d3079d5797811c1e118cfd600a913685212165
[ "BSD-3-Clause" ]
null
null
null
django/contrib/admin/templatetags/log.py
liuliang2015/django
86d3079d5797811c1e118cfd600a913685212165
[ "BSD-3-Clause" ]
1
2020-04-12T19:00:12.000Z
2020-04-12T19:00:12.000Z
from django import template from django.contrib.admin.models import LogEntry register = template.Library() class AdminLogNode(template.Node): def __init__(self, limit, varname, user): self.limit, self.varname, self.user = limit, varname, user def __repr__(self): return "<GetAdminLog Node>" ...
37.263158
141
0.653955
from django import template from django.contrib.admin.models import LogEntry register = template.Library() class AdminLogNode(template.Node): def __init__(self, limit, varname, user): self.limit, self.varname, self.user = limit, varname, user def __repr__(self): return "<GetAdminLog Node>" ...
true
true
f70ee2ccfbf232fca633a434e05e913a78eb9412
19,418
py
Python
LTAR_Flux_QC.py
cafltar/CAF_EC_Column_Rename
7375678081d8931f34e7ab8b4a6e02eca112e721
[ "MIT" ]
null
null
null
LTAR_Flux_QC.py
cafltar/CAF_EC_Column_Rename
7375678081d8931f34e7ab8b4a6e02eca112e721
[ "MIT" ]
null
null
null
LTAR_Flux_QC.py
cafltar/CAF_EC_Column_Rename
7375678081d8931f34e7ab8b4a6e02eca112e721
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Aug 21 15:53:46 2018 @author: Eric S. Russell Laboratory for Atmospheric Research Dept. of Civil and Environmental Engineering Washington State University eric.s.russell@wsu.edu Not all of these functions are used in the column rename script; these are potentially to be used...
50.832461
177
0.575136
import numpy as np import pandas as pd import datetime def Grade_cs(df,info, Site, site=False): if site == True: grade = int(info['grade'][Site]) LE_B = [float(info['LEL'][Site]),float(info['LEU'][Site])] H_B = [float(info['HL'][Site]),float(info['HU'][Site])] F_B = [float(inf...
true
true
f70ee2f8b953fcf7d3eace5aa1239816e97a391b
102
py
Python
ch_05/if.py
berchev/python_learning
5b99065cade53c64b4ede3d0e583c58573ca654c
[ "MIT" ]
null
null
null
ch_05/if.py
berchev/python_learning
5b99065cade53c64b4ede3d0e583c58573ca654c
[ "MIT" ]
null
null
null
ch_05/if.py
berchev/python_learning
5b99065cade53c64b4ede3d0e583c58573ca654c
[ "MIT" ]
null
null
null
#!/usr/bin/env python ph = float(input('enter pH level: ')) if ph < 7.0: print(ph, "is acidic")
14.571429
37
0.588235
ph = float(input('enter pH level: ')) if ph < 7.0: print(ph, "is acidic")
true
true
f70ee3ce2302cf60a5ab6d4a9e15b021694ced9e
1,791
py
Python
tests/cli_tests/test_command_input.py
itamarhaber/iredis
61208aab34c731f88232abd2cacdf0e075e701f2
[ "BSD-3-Clause" ]
1,857
2019-08-09T02:36:13.000Z
2022-03-31T05:53:09.000Z
tests/cli_tests/test_command_input.py
itamarhaber/iredis
61208aab34c731f88232abd2cacdf0e075e701f2
[ "BSD-3-Clause" ]
281
2019-08-08T16:00:59.000Z
2022-03-07T14:05:36.000Z
tests/cli_tests/test_command_input.py
itamarhaber/iredis
61208aab34c731f88232abd2cacdf0e075e701f2
[ "BSD-3-Clause" ]
105
2019-08-09T04:36:12.000Z
2022-02-03T13:27:29.000Z
import os import pytest def test_wrong_select_db_index(cli): cli.sendline("select 1") cli.expect(["OK", "127.0.0.1"]) cli.sendline("select 128") cli.expect(["DB index is out of range", "127.0.0.1:6379[1]>"]) if int(os.environ["REDIS_VERSION"]) > 5: text = "value is not an integer or out ...
23.88
82
0.647125
import os import pytest def test_wrong_select_db_index(cli): cli.sendline("select 1") cli.expect(["OK", "127.0.0.1"]) cli.sendline("select 128") cli.expect(["DB index is out of range", "127.0.0.1:6379[1]>"]) if int(os.environ["REDIS_VERSION"]) > 5: text = "value is not an integer or out ...
true
true
f70ee48502d9ed246520453354000d57c64db59a
1,103
py
Python
src/check_setup.py
imagexdsearch/imagesearch
7f4d18906d6ebd9f5d7b4e0db4bc6c7e675fbb1d
[ "BSD-2-Clause" ]
4
2018-05-15T10:57:49.000Z
2019-11-18T23:00:42.000Z
src/check_setup.py
imagexdsearch/imagesearch
7f4d18906d6ebd9f5d7b4e0db4bc6c7e675fbb1d
[ "BSD-2-Clause" ]
null
null
null
src/check_setup.py
imagexdsearch/imagesearch
7f4d18906d6ebd9f5d7b4e0db4bc6c7e675fbb1d
[ "BSD-2-Clause" ]
2
2018-05-16T20:20:02.000Z
2021-11-24T16:14:38.000Z
import sys from distutils.version import LooseVersion if sys.version_info.major < 3: print('[!] You are running an old version of Python. ' 'This tutorial requires Python 3.') sys.exit(1) with open('requirements.txt') as f: reqs = f.readlines() reqs = [(pkg, ver) for (pkg, _, ver) in (...
25.651163
74
0.579329
import sys from distutils.version import LooseVersion if sys.version_info.major < 3: print('[!] You are running an old version of Python. ' 'This tutorial requires Python 3.') sys.exit(1) with open('requirements.txt') as f: reqs = f.readlines() reqs = [(pkg, ver) for (pkg, _, ver) in (...
true
true
f70ee59ad2fff7af06efafd5608c2cdd3cb0a977
299
py
Python
contests/2020.1/rinha_de_calouros/pacotes/M/solver/solver.py
bkpedrosuper/brute_class
fa41e9206d74de394e2dd69f0afa556d1630a39d
[ "MIT" ]
null
null
null
contests/2020.1/rinha_de_calouros/pacotes/M/solver/solver.py
bkpedrosuper/brute_class
fa41e9206d74de394e2dd69f0afa556d1630a39d
[ "MIT" ]
null
null
null
contests/2020.1/rinha_de_calouros/pacotes/M/solver/solver.py
bkpedrosuper/brute_class
fa41e9206d74de394e2dd69f0afa556d1630a39d
[ "MIT" ]
null
null
null
from math import ceil S, D = [int(i) for i in input().split()] cont = [0 for i in range(S)] for d in range(D): t = [int(i) for i in input().split()] for i in range(S): cont[i] += t[i] media = ceil(sum(cont) / D) pref = cont.index(max(cont)) print(str(media)) print(str(pref + 1))
19.933333
41
0.575251
from math import ceil S, D = [int(i) for i in input().split()] cont = [0 for i in range(S)] for d in range(D): t = [int(i) for i in input().split()] for i in range(S): cont[i] += t[i] media = ceil(sum(cont) / D) pref = cont.index(max(cont)) print(str(media)) print(str(pref + 1))
true
true
f70ee767186d8fcd993c43b14c72310227172b6e
2,246
py
Python
voxelgrid/tsdf/run_tsdf_fusion.py
n1ckfg/RoutedFusion
1733911c7fe025b461b75e48461658709996e39c
[ "BSD-3-Clause" ]
null
null
null
voxelgrid/tsdf/run_tsdf_fusion.py
n1ckfg/RoutedFusion
1733911c7fe025b461b75e48461658709996e39c
[ "BSD-3-Clause" ]
null
null
null
voxelgrid/tsdf/run_tsdf_fusion.py
n1ckfg/RoutedFusion
1733911c7fe025b461b75e48461658709996e39c
[ "BSD-3-Clause" ]
null
null
null
#!/scratch_net/nudel/esandstroem/venvs/tsdf_fusion_env/bin/python import os app_path = '/scratch_net/nudel/esandstroem/venvs/tsdf_fusion_env/bin' os.environ["PATH"] = app_path + os.pathsep + os.environ["PATH"] from TSDFHandle import * import numpy as np import cv2 from utils import extract_mesh_marching_cubes from vis...
39.403509
113
0.714604
import os app_path = '/scratch_net/nudel/esandstroem/venvs/tsdf_fusion_env/bin' os.environ["PATH"] = app_path + os.pathsep + os.environ["PATH"] from TSDFHandle import * import numpy as np import cv2 from utils import extract_mesh_marching_cubes from visualization import plot_mesh import plyfile from sys import argv im...
true
true
f70eeb1401e62bd3111357c64c244f771eb9cb7d
55,338
py
Python
azure-devops/azext_devops/devops_sdk/v5_1/work_item_tracking_process/models.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
1
2019-09-08T11:15:03.000Z
2019-09-08T11:15:03.000Z
azure-devops/azext_devops/devops_sdk/v5_1/work_item_tracking_process/models.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
null
null
null
azure-devops/azext_devops/devops_sdk/v5_1/work_item_tracking_process/models.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------...
37.189516
847
0.636163
 from msrest.serialization import Model class AddProcessWorkItemTypeFieldRequest(Model): """AddProcessWorkItemTypeFieldRequest. :param allow_groups: Allow setting field value to a group identity. Only applies to identity fields. :type allow_groups: bool :param default_value: The default value of the...
false
true
f70eeb6bd74cdee12b83b651d78589e6981087b7
3,266
py
Python
tests/util/test_get_descendants.py
xiangze/edward
6419751d1d849c84c502e5ff3f7249b9bbc7b3aa
[ "Apache-2.0" ]
5,200
2016-05-03T04:59:01.000Z
2022-03-31T03:32:26.000Z
tests/util/test_get_descendants.py
xiangze/edward
6419751d1d849c84c502e5ff3f7249b9bbc7b3aa
[ "Apache-2.0" ]
724
2016-05-04T09:04:37.000Z
2022-02-28T02:41:12.000Z
tests/util/test_get_descendants.py
xiangze/edward
6419751d1d849c84c502e5ff3f7249b9bbc7b3aa
[ "Apache-2.0" ]
1,004
2016-05-03T22:45:14.000Z
2022-03-25T00:08:08.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from edward.models import Bernoulli, Normal from edward.util import get_descendants class test_get_descendants_class(tf.test.TestCase): def test_v_structure(self): """a -> b ->...
33.326531
66
0.600122
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from edward.models import Bernoulli, Normal from edward.util import get_descendants class test_get_descendants_class(tf.test.TestCase): def test_v_structure(self): with self.te...
true
true
f70eed1e1375e4432d0c54f717dd6b0c81d354b9
2,024
py
Python
deepvariant/core/proto_utils.py
ishandutta2007/deepvariant
f1684281b3ded6c68a1d4bc89f7848b7cedac548
[ "BSD-3-Clause" ]
1
2019-05-09T21:56:48.000Z
2019-05-09T21:56:48.000Z
deepvariant/core/proto_utils.py
Joyvalley/deepvariant
b3a5bced5720f8a27080a5330e64295f16bbd46c
[ "BSD-3-Clause" ]
null
null
null
deepvariant/core/proto_utils.py
Joyvalley/deepvariant
b3a5bced5720f8a27080a5330e64295f16bbd46c
[ "BSD-3-Clause" ]
1
2017-12-23T04:27:06.000Z
2017-12-23T04:27:06.000Z
# Copyright 2017 Google Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
47.069767
80
0.764822
from __future__ import absolute_import from __future__ import division from __future__ import print_function from google.protobuf.internal import api_implementation def uses_fast_cpp_protos_or_die(): if api_implementation.Type() != 'cpp': raise ValueError('Expected to be using C++ protobuf implementation ' ...
true
true
f70eedf59fe8f614e603477963743fd9b0c5b712
1,764
py
Python
libweasyl/libweasyl/conftest.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
1
2019-02-15T04:21:48.000Z
2019-02-15T04:21:48.000Z
libweasyl/libweasyl/conftest.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
254
2017-12-23T19:36:43.000Z
2020-04-14T21:46:13.000Z
libweasyl/libweasyl/conftest.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
1
2017-12-23T18:42:16.000Z
2017-12-23T18:42:16.000Z
import os import pytest import sqlalchemy as sa from libweasyl.configuration import configure_libweasyl from libweasyl.models.meta import registry from libweasyl.models.tables import metadata from libweasyl.test.common import NotFound from libweasyl.test.common import media_link_formatter from libweasyl import cache ...
28.451613
113
0.713719
import os import pytest import sqlalchemy as sa from libweasyl.configuration import configure_libweasyl from libweasyl.models.meta import registry from libweasyl.models.tables import metadata from libweasyl.test.common import NotFound from libweasyl.test.common import media_link_formatter from libweasyl import cache ...
true
true
f70eee367e175b617f0f5ce115780567e62dbda0
2,081
py
Python
device.py
seank-com/iot-device-python
f862a2b4bf5a6e2eee0546c287fc0ffdfbd08945
[ "MIT" ]
null
null
null
device.py
seank-com/iot-device-python
f862a2b4bf5a6e2eee0546c287fc0ffdfbd08945
[ "MIT" ]
null
null
null
device.py
seank-com/iot-device-python
f862a2b4bf5a6e2eee0546c287fc0ffdfbd08945
[ "MIT" ]
null
null
null
#!/usr/bin/env python import time import sys import iothub_client from iothub_client import IoTHubClient, IoTHubClientError, IoTHubTransportProvider, IoTHubClientResult from iothub_client import IoTHubMessage, IoTHubMessageDispositionResult, IoTHubError # String containing Hostname, Device Id & Device Key in the form...
34.114754
104
0.713119
import time import sys import iothub_client from iothub_client import IoTHubClient, IoTHubClientError, IoTHubTransportProvider, IoTHubClientResult from iothub_client import IoTHubMessage, IoTHubMessageDispositionResult, IoTHubError CONNECTION_STRING = "[Device Connection String]" MSG_TXT = "{\"msg\": \"%s\"}" RECEI...
true
true
f70eee72ebaef7bb1e9932648eb79dff211b82c2
390
py
Python
algo/implementation/easy/time.py
rivergillis/hackerrank-practice
16b1d448c011f22b202b1ccadac09c71f646aa5e
[ "MIT" ]
null
null
null
algo/implementation/easy/time.py
rivergillis/hackerrank-practice
16b1d448c011f22b202b1ccadac09c71f646aa5e
[ "MIT" ]
null
null
null
algo/implementation/easy/time.py
rivergillis/hackerrank-practice
16b1d448c011f22b202b1ccadac09c71f646aa5e
[ "MIT" ]
null
null
null
import sys time = input().strip() splitted = time.split(':') hours_12 = int(splitted[0]) mins = splitted[1] secs = splitted[2][:2] is_pm = splitted[2].endswith("PM") if (is_pm): if (hours_12 >= 1 and hours_12 < 12): # between 1pm and 11:59pm hours_12 += 12 else: if (hours_12 == 12): hours_...
18.571429
68
0.602564
import sys time = input().strip() splitted = time.split(':') hours_12 = int(splitted[0]) mins = splitted[1] secs = splitted[2][:2] is_pm = splitted[2].endswith("PM") if (is_pm): if (hours_12 >= 1 and hours_12 < 12): hours_12 += 12 else: if (hours_12 == 12): hours_12 -= 12 print(':'.join(l...
true
true
f70eee888121e826b1cf61043dd51e162531928d
5,498
py
Python
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/hooks/before-START/scripts/shared_initialization.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
1
2015-05-04T12:19:05.000Z
2015-05-04T12:19:05.000Z
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/hooks/before-START/scripts/shared_initialization.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/hooks/before-START/scripts/shared_initialization.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
1
2021-01-07T08:55:01.000Z
2021-01-07T08:55:01.000Z
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
30.88764
93
0.6757
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
false
true
f70eefb7329c2c9517976ab1418f9cdd7cacbee9
14,654
py
Python
parlai/agents/transformer/mixer.py
dongfangyixi/ParlAI
424a2b3c7086593f699c76612dffd1d925986177
[ "MIT" ]
null
null
null
parlai/agents/transformer/mixer.py
dongfangyixi/ParlAI
424a2b3c7086593f699c76612dffd1d925986177
[ "MIT" ]
null
null
null
parlai/agents/transformer/mixer.py
dongfangyixi/ParlAI
424a2b3c7086593f699c76612dffd1d925986177
[ "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. """ Transformer Agents. """ from typing import Optional from parlai.core.params import ParlaiParser from parlai.core.opt i...
32.348786
88
0.602702
from typing import Optional from parlai.core.params import ParlaiParser from parlai.core.opt import Opt from parlai.core.agents import Agent from parlai.utils.torch import padded_3d from parlai.core.torch_classifier_agent import TorchClassifierAgent from parlai.core.torch_ranker_agent import TorchRankerAgent from parla...
true
true
f70ef0ac0372c717352edce2b5da38e908ee6060
31,508
py
Python
Keras_tensorflow/source/tensorflow/core/protobuf/config_pb2.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
60
2017-08-05T21:47:56.000Z
2022-03-08T21:46:29.000Z
Keras_tensorflow/source/tensorflow/core/protobuf/config_pb2.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
1
2017-08-22T07:17:47.000Z
2017-09-24T22:04:19.000Z
Keras_tensorflow/source/tensorflow/core/protobuf/config_pb2.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
11
2017-09-10T16:22:21.000Z
2021-08-09T09:24:50.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/protobuf/config.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf imp...
43.161644
3,662
0.758601
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
f70ef0f412e5276c5b8da11a1ad63834bedea5f9
593
py
Python
venv/lib/python3.6/site-packages/gensim/__init__.py
bopopescu/wired_cli
844b5c2bf32c95ad2974663f0501a85ff6134bd4
[ "MIT" ]
2
2021-06-09T20:55:17.000Z
2021-11-03T03:07:37.000Z
venv/lib/python3.6/site-packages/gensim/__init__.py
bopopescu/wired_cli
844b5c2bf32c95ad2974663f0501a85ff6134bd4
[ "MIT" ]
4
2020-07-26T02:10:42.000Z
2021-03-31T18:48:58.000Z
venv/lib/python3.6/site-packages/gensim/__init__.py
bopopescu/wired_cli
844b5c2bf32c95ad2974663f0501a85ff6134bd4
[ "MIT" ]
1
2020-07-25T23:57:23.000Z
2020-07-25T23:57:23.000Z
"""This package contains interfaces and functionality to compute pair-wise document similarities within a corpus of documents. """ from gensim import parsing, corpora, matutils, interfaces, models, similarities, summarization, utils # noqa:F401 import logging __version__ = '3.5.0' class NullHandler(logging.Handler...
28.238095
114
0.726813
from gensim import parsing, corpora, matutils, interfaces, models, similarities, summarization, utils import logging __version__ = '3.5.0' class NullHandler(logging.Handler): def emit(self, record): pass logger = logging.getLogger('gensim') if len(logger.handlers) == 0: logger.addHandler(NullHa...
true
true
f70ef1c1fcfaa212ff2a8e28ee9bafc3b2b10d8d
3,514
py
Python
intersight/models/boot_san_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/boot_san_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/boot_san_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Intersight REST API This is Intersight REST API OpenAPI spec version: 1.0.9-262 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class BootSanRef(object): """ NOTE: This class is a...
23.426667
77
0.529027
from pprint import pformat from six import iteritems import re class BootSanRef(object): swagger_types = { 'moid': 'str', 'object_type': 'str' } attribute_map = { 'moid': 'Moid', 'object_type': 'ObjectType' } def __init__(self, moid=None, object_type=None): ...
true
true
f70ef231f97b1c04885674e7f2bc0a4b3632a20f
1,296
py
Python
modules/file_utils.py
Efemache/Mercenaries-Hearthstone-game-bot
a243275dddc484f09fd87272277e9d9baca5f3ee
[ "Apache-2.0" ]
6
2022-03-03T03:41:00.000Z
2022-03-25T23:08:12.000Z
modules/file_utils.py
Efemache/Mercenaries-Farm-bot
0eb6bdb10e282606570456f33c071b488eaf02cf
[ "Apache-2.0" ]
37
2021-11-25T16:14:20.000Z
2022-03-30T21:12:05.000Z
modules/file_utils.py
Efemache/Mercenaries-Hearthstone-game-bot
a243275dddc484f09fd87272277e9d9baca5f3ee
[ "Apache-2.0" ]
3
2022-02-18T03:41:22.000Z
2022-03-22T02:11:41.000Z
import json import configparser import re import logging from modules.exceptions import SettingsError log = logging.getLogger(__name__) def readjson(jfile): """... just for reading json file and return data :)""" with open(jfile) as descriptor: data = json.load(descriptor) return data def read...
25.411765
81
0.611111
import json import configparser import re import logging from modules.exceptions import SettingsError log = logging.getLogger(__name__) def readjson(jfile): with open(jfile) as descriptor: data = json.load(descriptor) return data def read_ini_to_dict(inifile): log.debug("Reading %s", inifile) ...
true
true
f70ef372c774d66de4efbfa2589caab790ff166a
156
py
Python
python/pictures/base64_to_pic.py
livejq/AutoScripts
b801e68515c6cdb6ddadc9c499a21276774d3d74
[ "MIT" ]
11
2021-05-21T16:12:21.000Z
2022-02-03T10:21:13.000Z
python/pictures/base64_to_pic.py
livejq/AutoScripts
b801e68515c6cdb6ddadc9c499a21276774d3d74
[ "MIT" ]
null
null
null
python/pictures/base64_to_pic.py
livejq/AutoScripts
b801e68515c6cdb6ddadc9c499a21276774d3d74
[ "MIT" ]
5
2021-05-21T16:30:19.000Z
2022-01-06T16:15:08.000Z
# -*- coding:utf-8 -*- import base64 bs='iVBORw0KGgoAAAANSUhEUg....' imgdata=base64.b64decode(bs) file=open('2.jpg','wb') file.write(imgdata) file.close()
17.333333
31
0.698718
import base64 bs='iVBORw0KGgoAAAANSUhEUg....' imgdata=base64.b64decode(bs) file=open('2.jpg','wb') file.write(imgdata) file.close()
true
true
f70ef3994d20c14340d01f4ee1f72727c196fd1b
233,632
py
Python
sdk/python/pulumi_azure_native/network/v20160901/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/network/v20160901/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/network/v20160901/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
40.674095
368
0.647077
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * __all__ = [ 'AddressSpaceResponse', 'ApplicationGatewayAuthenticationCertificateResponse', 'ApplicationGatewayBacke...
true
true
f70ef43cb2465a8a7aace46d8fa63d92a517dfb1
591
py
Python
webware/MiddleKit/Core/StringAttr.py
PeaceWorksTechnologySolutions/w4py3-middlekit
a9554e20c47010e7b0c0deee63e1786482c59a1c
[ "MIT" ]
2
2020-10-31T09:12:58.000Z
2021-02-20T13:52:14.000Z
webware/MiddleKit/Core/StringAttr.py
WebwareForPython/w4py3-middlekit
f740e2d2d3a5c225d6b8f9eb27ac08f8deed47e6
[ "MIT" ]
2
2020-01-07T15:24:09.000Z
2020-01-08T15:39:57.000Z
webware/MiddleKit/Core/StringAttr.py
PeaceWorksTechnologySolutions/w4py3-middlekit
a9554e20c47010e7b0c0deee63e1786482c59a1c
[ "MIT" ]
1
2021-09-27T21:04:18.000Z
2021-09-27T21:04:18.000Z
from .BasicTypeAttr import BasicTypeAttr class StringAttr(BasicTypeAttr): def __init__(self, attr): BasicTypeAttr.__init__(self, attr) if self.get('Max') is not None: self['Max'] = int(self['Max']) if self.get('Min') is not None: self['Min'] = int(self['Min']) ...
34.764706
97
0.57868
from .BasicTypeAttr import BasicTypeAttr class StringAttr(BasicTypeAttr): def __init__(self, attr): BasicTypeAttr.__init__(self, attr) if self.get('Max') is not None: self['Max'] = int(self['Max']) if self.get('Min') is not None: self['Min'] = int(self['Min']) ...
true
true
f70ef50533ee8d4971bed0974f6e721864cf49fd
12,731
py
Python
equipment/views.py
pbx/school-base
0ad237bb07ad66e1e70c67fa634641d5eb424822
[ "MIT" ]
4
2016-10-24T15:03:50.000Z
2019-08-25T05:21:26.000Z
equipment/views.py
pbx/school-base
0ad237bb07ad66e1e70c67fa634641d5eb424822
[ "MIT" ]
null
null
null
equipment/views.py
pbx/school-base
0ad237bb07ad66e1e70c67fa634641d5eb424822
[ "MIT" ]
2
2019-12-10T14:17:21.000Z
2020-06-16T12:53:15.000Z
import datetime from django.conf import settings from django.contrib.auth.decorators import user_passes_test from django.http import HttpResponse, Http404, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import loader, Context from equipment.models import ItemType, Item, ItemEr...
41.740984
134
0.652109
import datetime from django.conf import settings from django.contrib.auth.decorators import user_passes_test from django.http import HttpResponse, Http404, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import loader, Context from equipment.models import ItemType, Item, ItemEr...
false
true
f70ef508b4fa96a799589b3ae368486bd1d19c73
184
py
Python
src/naive/Python/Numba/fib.py
juliancoffee/fib
c337ccc570dfb692d015ff4f1155d44925f8f47f
[ "MIT" ]
4
2019-07-29T22:19:23.000Z
2021-01-22T05:27:39.000Z
src/naive/Python/Numba/fib.py
juliancoffee/fib
c337ccc570dfb692d015ff4f1155d44925f8f47f
[ "MIT" ]
2
2019-06-13T18:14:53.000Z
2019-06-14T17:24:37.000Z
src/naive/Python/Numba/fib.py
juliancoffee/fib
c337ccc570dfb692d015ff4f1155d44925f8f47f
[ "MIT" ]
8
2019-06-10T09:37:25.000Z
2019-06-30T07:55:02.000Z
from numba import jit import sys @jit def fib(n): return 1 if n < 3 else fib(n-1) + fib(n-2) if __name__ == "__main__": n = int(sys.argv[1]) print("{}".format(fib(n)))
14.153846
46
0.581522
from numba import jit import sys @jit def fib(n): return 1 if n < 3 else fib(n-1) + fib(n-2) if __name__ == "__main__": n = int(sys.argv[1]) print("{}".format(fib(n)))
true
true
f70ef56c468100d0c372ae156de34620904d237e
12,703
py
Python
tests/generate_go_ethereum_fixture.py
happyuc-project/webu.py
5a01124fc84d74df09a33d9dabe88b704cd5b6c6
[ "MIT" ]
null
null
null
tests/generate_go_ethereum_fixture.py
happyuc-project/webu.py
5a01124fc84d74df09a33d9dabe88b704cd5b6c6
[ "MIT" ]
null
null
null
tests/generate_go_ethereum_fixture.py
happyuc-project/webu.py
5a01124fc84d74df09a33d9dabe88b704cd5b6c6
[ "MIT" ]
null
null
null
import contextlib import json import os import pprint import shutil import signal import socket import subprocess import sys import tempfile import time from cytoolz import ( merge, valmap, ) from eth_utils.curried import ( apply_formatter_if, is_bytes, is_checksum_address, is_dict, is_same...
30.389952
522
0.664646
import contextlib import json import os import pprint import shutil import signal import socket import subprocess import sys import tempfile import time from cytoolz import ( merge, valmap, ) from eth_utils.curried import ( apply_formatter_if, is_bytes, is_checksum_address, is_dict, is_same...
true
true
f70ef5c61dda827100835b501bf9c0da123c3708
4,333
py
Python
bayesopt/graph_features.py
xingchenwan/nasbowl
0abaa91b6ce436655a7488f75ed5aeca8df71246
[ "MIT" ]
18
2020-12-29T13:00:19.000Z
2022-03-30T08:34:47.000Z
bayesopt/graph_features.py
xingchenwan/nasbowl
0abaa91b6ce436655a7488f75ed5aeca8df71246
[ "MIT" ]
1
2021-07-16T18:03:26.000Z
2021-08-30T09:20:29.000Z
bayesopt/graph_features.py
xingchenwan/nasbowl
0abaa91b6ce436655a7488f75ed5aeca8df71246
[ "MIT" ]
4
2021-03-22T06:18:34.000Z
2022-03-11T16:00:03.000Z
import networkx as nx class FeatureExtractor: """ Extracting some hand-crafted x1_features for the x1_graphs - Number of (effective nodes) - Average """ def __init__(self, g: nx.Graph, node_attr_name='op_name', s='input', t='output'): """ g: a valid networkx graph node...
38.6875
121
0.596354
import networkx as nx class FeatureExtractor: def __init__(self, g: nx.Graph, node_attr_name='op_name', s='input', t='output'): self.g = g self.input_index = [] self.output_index = None for n in range(g.number_of_nodes()): assert node_attr_name in list(dict(g.nodes[n])...
true
true
f70ef64b5fe5985fc2fd93a3b677151ca2461f5b
3,423
py
Python
src/datasets/hits_dataset.py
ReyesDeJong/Deep-SVDD-PyTorch
1fc7eae1474556f869d5c5422da74fd4fe2f1aed
[ "MIT" ]
null
null
null
src/datasets/hits_dataset.py
ReyesDeJong/Deep-SVDD-PyTorch
1fc7eae1474556f869d5c5422da74fd4fe2f1aed
[ "MIT" ]
null
null
null
src/datasets/hits_dataset.py
ReyesDeJong/Deep-SVDD-PyTorch
1fc7eae1474556f869d5c5422da74fd4fe2f1aed
[ "MIT" ]
null
null
null
import os import sys import numpy as np import pandas as pd from torch.utils.data import Subset from torch.utils.data.dataset import Dataset # For custom datasets from torchvision import transforms PROJECT_PATH = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..')) sys.path.append(PROJECT_PATH) ...
34.928571
76
0.71078
import os import sys import numpy as np import pandas as pd from torch.utils.data import Subset from torch.utils.data.dataset import Dataset from torchvision import transforms PROJECT_PATH = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..')) sys.path.append(PROJECT_PATH) from src.base.torchvi...
true
true
f70ef760aea72079f6af72ed3c3cacc7a63ab723
8,321
py
Python
sdk/python/pulumi_mongodbatlas/teams.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
9
2020-04-28T19:12:30.000Z
2022-03-22T23:04:46.000Z
sdk/python/pulumi_mongodbatlas/teams.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
59
2020-06-12T12:12:52.000Z
2022-03-28T18:14:50.000Z
sdk/python/pulumi_mongodbatlas/teams.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
2
2020-09-25T21:22:08.000Z
2021-08-30T20:06:18.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
37.313901
134
0.619277
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TeamsArgs', 'Teams'] @pulumi.input_type class TeamsArgs: def __init__(__self__, *, org_id: pulumi.Input[str], usernames: ...
true
true
f70ef76b75487b358e5b02d032d6a1bf46a704d9
3,741
py
Python
faker/providers/lorem/hy_AM/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
1
2022-02-16T23:14:19.000Z
2022-02-16T23:14:19.000Z
faker/providers/lorem/hy_AM/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
33
2020-12-09T16:49:15.000Z
2022-01-04T22:03:10.000Z
faker/providers/lorem/hy_AM/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
3
2022-02-07T18:18:54.000Z
2022-03-11T22:09:01.000Z
from .. import Provider as LoremProvider class Provider(LoremProvider): """Implement lorem provider for ``hy_AM`` locale. Sources: - https://www.101languages.net/armenian/armenian-word-list """ word_list = ( "ես", "դու", "նա", "մենք", "դուք", "նրա...
16.480176
62
0.295108
from .. import Provider as LoremProvider class Provider(LoremProvider): word_list = ( "ես", "դու", "նա", "մենք", "դուք", "նրանք", "այս", "այն", "այստեղ", "այնտեղ", "ով", "ինչ", "որտեղ", "ուր", ...
true
true
f70ef7f591cfdde370c54c465c9581237183a58d
6,238
py
Python
src/_pytest/skipping.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
3
2019-11-26T02:30:12.000Z
2020-04-15T17:49:07.000Z
src/_pytest/skipping.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
59
2019-10-22T04:34:22.000Z
2021-11-27T18:23:11.000Z
src/_pytest/skipping.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
17
2019-11-21T14:11:29.000Z
2019-11-21T15:26:23.000Z
""" support for skip/xfail functions and markers. """ from _pytest.config import hookimpl from _pytest.mark.evaluate import MarkEvaluator from _pytest.outcomes import fail from _pytest.outcomes import skip from _pytest.outcomes import xfail def pytest_addoption(parser): group = parser.getgroup("general") grou...
35.044944
87
0.639147
from _pytest.config import hookimpl from _pytest.mark.evaluate import MarkEvaluator from _pytest.outcomes import fail from _pytest.outcomes import skip from _pytest.outcomes import xfail def pytest_addoption(parser): group = parser.getgroup("general") group.addoption( "--runxfail", action="sto...
true
true
f70ef8dc5d4a4a748215573850421d4fa74c60d1
3,661
py
Python
generate_embeddings.py
Amitdedhia6/DrugDiscovery
c70dec96cee4d0d643a8b9de30530b6871fdf05e
[ "Apache-2.0" ]
null
null
null
generate_embeddings.py
Amitdedhia6/DrugDiscovery
c70dec96cee4d0d643a8b9de30530b6871fdf05e
[ "Apache-2.0" ]
null
null
null
generate_embeddings.py
Amitdedhia6/DrugDiscovery
c70dec96cee4d0d643a8b9de30530b6871fdf05e
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import os from common import base_data_path from typing import List import pandas as pd CONTEXT_SIZE = 1 # 1 words to the left, 1 to the right EMDEDDING_DIM = 3 word_to_ix = {} ix_to_word = {} def make_context_vector(context, word_to_ix): idxs = [word_to_ix[w] for w in contex...
29.055556
111
0.659383
import torch import torch.nn as nn import os from common import base_data_path from typing import List import pandas as pd CONTEXT_SIZE = 1 EMDEDDING_DIM = 3 word_to_ix = {} ix_to_word = {} def make_context_vector(context, word_to_ix): idxs = [word_to_ix[w] for w in context] return torch.tensor(idxs, dtype...
true
true
f70ef90f5e9f2e939fd227f2c3e143a931c5319a
5,947
py
Python
scripts/functionality/solarsystem.py
Whykiller/Final_Project-Python_Class
29cb388883e19476efe6d96803075b72b79a5aff
[ "MIT" ]
null
null
null
scripts/functionality/solarsystem.py
Whykiller/Final_Project-Python_Class
29cb388883e19476efe6d96803075b72b79a5aff
[ "MIT" ]
8
2020-06-20T16:53:26.000Z
2020-06-26T13:08:53.000Z
scripts/functionality/solarsystem.py
Whykiller/Fortgeschrittener_Python_Kurs
29cb388883e19476efe6d96803075b72b79a5aff
[ "MIT" ]
1
2021-07-19T17:40:11.000Z
2021-07-19T17:40:11.000Z
import functionality.planets as planets import assets.tools as tools from assets.variables import * # TODO: Also add logger to code and display errors correctly # TODO: Make one pixel correspond to 1/10 au so that acceleration works more realistic class SolarSystem(metaclass=tools.Singleton): """This creates the...
28.868932
114
0.599798
import functionality.planets as planets import assets.tools as tools from assets.variables import * class SolarSystem(metaclass=tools.Singleton): def __init__(self) -> None: self.planets_list = [] self.max_objects = 10 self.system_time = 0 self.error = False def ad...
true
true
f70efa147c6f9c7ee90e557fe0740d068a1ce522
213
py
Python
tests/test_ai.py
divanorama/katrain
dc22aa88526fb6446f908259f06020d649a2d0a9
[ "MIT" ]
null
null
null
tests/test_ai.py
divanorama/katrain
dc22aa88526fb6446f908259f06020d649a2d0a9
[ "MIT" ]
null
null
null
tests/test_ai.py
divanorama/katrain
dc22aa88526fb6446f908259f06020d649a2d0a9
[ "MIT" ]
null
null
null
import pytest from katrain.core.constants import AI_STRATEGIES_RECOMMENDED_ORDER, AI_STRATEGIES class TestAI: def test_order(self): assert set(AI_STRATEGIES_RECOMMENDED_ORDER) == set(AI_STRATEGIES)
23.666667
81
0.798122
import pytest from katrain.core.constants import AI_STRATEGIES_RECOMMENDED_ORDER, AI_STRATEGIES class TestAI: def test_order(self): assert set(AI_STRATEGIES_RECOMMENDED_ORDER) == set(AI_STRATEGIES)
true
true
f70efd874fd49a156b8dd23f6d6d90fc73d34d8f
1,341
py
Python
matterapi/enums.py
gmerz/MatterApi
b116da58d3a4ca77739970a28e30672e0e611705
[ "MIT" ]
3
2022-01-26T23:31:01.000Z
2022-03-01T13:07:26.000Z
matterapi/enums.py
gmerz/MatterApi
b116da58d3a4ca77739970a28e30672e0e611705
[ "MIT" ]
null
null
null
matterapi/enums.py
gmerz/MatterApi
b116da58d3a4ca77739970a28e30672e0e611705
[ "MIT" ]
null
null
null
""" Enums used in different API endpoints """ from enum import Enum class PluginStatusState(str, Enum): """State of the plugin""" NOTRUNNING = "NotRunning" STARTING = "Starting" RUNNING = "Running" FAILEDTOSTART = "FailedToStart" FAILEDTOSTAYRUNNING = "FailedToStayRunning" STOPPING = "Sto...
21.285714
61
0.645041
from enum import Enum class PluginStatusState(str, Enum): NOTRUNNING = "NotRunning" STARTING = "Starting" RUNNING = "Running" FAILEDTOSTART = "FailedToStart" FAILEDTOSTAYRUNNING = "FailedToStayRunning" STOPPING = "Stopping" def __str__(self) -> str: return str(self.value) class...
true
true
f70efda32ce2d0e30af7d589d3a939cff26d40b4
5,492
py
Python
heuristic/train/nn/train-nn.py
ehsanul/brick
291c0783f3b062cf73887cb3581dd92342891165
[ "MIT" ]
5
2018-06-08T01:32:26.000Z
2019-05-14T15:30:02.000Z
heuristic/train/nn/train-nn.py
ehsanul/brick
291c0783f3b062cf73887cb3581dd92342891165
[ "MIT" ]
1
2018-07-16T11:52:30.000Z
2018-07-25T06:51:10.000Z
heuristic/train/nn/train-nn.py
ehsanul/brick
291c0783f3b062cf73887cb3581dd92342891165
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import sys import pathlib import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers EPOCHS = 1000 # The patience parameter is the amount of epoch...
33.901235
151
0.682629
from __future__ import absolute_import, division, print_function import sys import pathlib import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers EPOCHS = 1000 EARLY_STOP = keras.callbacks.EarlyStopping(moni...
true
true
f70efeb1edf8afda9c8ef1c5b5a73e8cf2c23017
1,514
py
Python
pirate_control/python-rtmidi-0.3.1a/tests/test_probe_ports.py
bopopescu/pco-pirate
b8836870254992b4cb316fe29805e914a6e9910f
[ "MIT" ]
1
2019-12-27T11:45:11.000Z
2019-12-27T11:45:11.000Z
pirate_control/python-rtmidi-0.3.1a/tests/test_probe_ports.py
bopopescu/pco-pirate
b8836870254992b4cb316fe29805e914a6e9910f
[ "MIT" ]
1
2020-07-24T15:59:56.000Z
2020-07-24T15:59:56.000Z
pirate_control/python-rtmidi-0.3.1a/tests/test_probe_ports.py
bopopescu/pco-pirate
b8836870254992b4cb316fe29805e914a6e9910f
[ "MIT" ]
1
2020-07-24T12:54:33.000Z
2020-07-24T12:54:33.000Z
#!/usr/bin/env python # # test_probe_ports.py # """Shows how to probe for available MIDI input and output ports.""" import sys from rtmidi import * try: raw_input except NameError: # Python 3 raw_input = input apis = { API_MACOSX_CORE: "OS X CoreMIDI", API_LINUX_ALSA: "Linux ALSA", API_UNIX_JAC...
26.561404
80
0.543593
import sys from rtmidi import * try: raw_input except NameError: raw_input = input apis = { API_MACOSX_CORE: "OS X CoreMIDI", API_LINUX_ALSA: "Linux ALSA", API_UNIX_JACK: "Jack Client", API_WINDOWS_MM: "Windows MultiMedia", API_WINDOWS_KS: "Windows Kernel Streaming", API_RTMIDI_DUM...
true
true
f70efeb4da2370747b33339e64298642db71d8b6
2,353
py
Python
cheribsd/trunk/simboot/tests/output.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
36
2015-05-29T16:47:19.000Z
2022-02-08T21:16:26.000Z
cheribsd/trunk/simboot/tests/output.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
1
2015-10-14T13:05:21.000Z
2015-10-19T20:34:03.000Z
cheribsd/trunk/simboot/tests/output.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
15
2015-06-11T07:10:58.000Z
2021-06-18T05:14:54.000Z
#- # Copyright (c) 2015 Khilan Gudka # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # Licensed to BE...
39.881356
77
0.764981
f = open('test-output.txt', 'r') print f.read()
false
true
f70eff5e37149022cec92c5d324368e5cbb343fc
4,569
py
Python
web3tools/web3wallet.py
LinuxIsCool/tokenspice2
aeca439b4beb1462e1f988f5d8eac60c2c5e8cbf
[ "Apache-2.0" ]
null
null
null
web3tools/web3wallet.py
LinuxIsCool/tokenspice2
aeca439b4beb1462e1f988f5d8eac60c2c5e8cbf
[ "Apache-2.0" ]
null
null
null
web3tools/web3wallet.py
LinuxIsCool/tokenspice2
aeca439b4beb1462e1f988f5d8eac60c2c5e8cbf
[ "Apache-2.0" ]
1
2021-09-05T22:34:29.000Z
2021-09-05T22:34:29.000Z
import logging import typing import web3 from util import constants from web3tools import web3util, account logger = logging.getLogger(__name__) def randomWeb3Wallet(): private_key = account.randomPrivateKey() return Web3Wallet(private_key=private_key) class Web3Wallet: """Signs txs and msgs with an acc...
33.595588
93
0.663821
import logging import typing import web3 from util import constants from web3tools import web3util, account logger = logging.getLogger(__name__) def randomWeb3Wallet(): private_key = account.randomPrivateKey() return Web3Wallet(private_key=private_key) class Web3Wallet: _last_tx_count = dict() MIN_G...
true
true
f70efff899fc1223c7b3fa5193ad0a13d4e23777
34,673
py
Python
aiohttp/client_reqrep.py
loven-doo/aiohttp
01ef966b261bc6a8934b3c53c79c92f019b404a7
[ "Apache-2.0" ]
2
2021-02-04T10:49:55.000Z
2021-02-04T10:50:31.000Z
aiohttp/client_reqrep.py
loven-doo/aiohttp
01ef966b261bc6a8934b3c53c79c92f019b404a7
[ "Apache-2.0" ]
228
2020-10-17T22:31:34.000Z
2022-03-28T18:13:31.000Z
aiohttp/client_reqrep.py
loven-doo/aiohttp
01ef966b261bc6a8934b3c53c79c92f019b404a7
[ "Apache-2.0" ]
1
2021-07-22T04:21:08.000Z
2021-07-22T04:21:08.000Z
import asyncio import codecs import dataclasses import functools import io import re import sys import traceback import warnings from hashlib import md5, sha1, sha256 from http.cookies import CookieError, Morsel, SimpleCookie from types import MappingProxyType, TracebackType from typing import ( TYPE_CHECKING, ...
32.618062
88
0.582124
import asyncio import codecs import dataclasses import functools import io import re import sys import traceback import warnings from hashlib import md5, sha1, sha256 from http.cookies import CookieError, Morsel, SimpleCookie from types import MappingProxyType, TracebackType from typing import ( TYPE_CHECKING, ...
true
true
f70f0001824e96892d2caeddbb3fede6f0d4c87a
95
py
Python
file/admin.py
simonprast/bestconnect-backend
fa19998e72941454c8f99246e37ba3d1810f3010
[ "BSD-Source-Code" ]
null
null
null
file/admin.py
simonprast/bestconnect-backend
fa19998e72941454c8f99246e37ba3d1810f3010
[ "BSD-Source-Code" ]
2
2022-01-07T07:27:21.000Z
2022-01-07T08:34:54.000Z
file/admin.py
simonprast/django-entrypoint
b32377dea0f367be598bc851bc0fdacc2b74a496
[ "CNRI-Python" ]
null
null
null
from django.contrib import admin from .models import Document admin.site.register(Document)
13.571429
32
0.810526
from django.contrib import admin from .models import Document admin.site.register(Document)
true
true
f70f000a0c7c5ab0c91dcb60e9125ca81979a3b3
112
py
Python
python/reportlab/rml2pdf.py
trammell/test
ccac5e1dac947032e64d813e53cb961417a58d05
[ "Artistic-2.0" ]
null
null
null
python/reportlab/rml2pdf.py
trammell/test
ccac5e1dac947032e64d813e53cb961417a58d05
[ "Artistic-2.0" ]
null
null
null
python/reportlab/rml2pdf.py
trammell/test
ccac5e1dac947032e64d813e53cb961417a58d05
[ "Artistic-2.0" ]
null
null
null
#!/usr/bin/env python2.4 import sys from z3c.rml import rml2pdf for arg in sys.argv[1:]: rml2pdf.go(arg)
12.444444
27
0.6875
import sys from z3c.rml import rml2pdf for arg in sys.argv[1:]: rml2pdf.go(arg)
true
true
f70f001340f4fac68545626ee014b6ff5aef8fbd
228
py
Python
backend/cost_claimer/admin.py
Trevor-Mansfield/WalmartReceiptSplitter
db85eef9210f177eaa298969ba64ff916d4a9b27
[ "MIT" ]
null
null
null
backend/cost_claimer/admin.py
Trevor-Mansfield/WalmartReceiptSplitter
db85eef9210f177eaa298969ba64ff916d4a9b27
[ "MIT" ]
1
2020-11-01T01:54:42.000Z
2020-11-01T01:54:42.000Z
backend/cost_claimer/admin.py
Trevor-Mansfield/WalmartReceiptSplitter
db85eef9210f177eaa298969ba64ff916d4a9b27
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Receipt, Item, User, Cover, Payment admin.site.register(Receipt) admin.site.register(Item) admin.site.register(User) admin.site.register(Cover) admin.site.register(Payment)
22.8
55
0.802632
from django.contrib import admin from .models import Receipt, Item, User, Cover, Payment admin.site.register(Receipt) admin.site.register(Item) admin.site.register(User) admin.site.register(Cover) admin.site.register(Payment)
true
true
f70f00182433c7a822fe1637de1c29153c5dcf36
820
py
Python
docs/conf.py
hat-open/hat-stc
8edf9e23f9f2d8e581f844f96e7a38d02ef4f403
[ "Apache-2.0" ]
1
2022-02-01T13:42:25.000Z
2022-02-01T13:42:25.000Z
docs/conf.py
hat-open/hat-stc
8edf9e23f9f2d8e581f844f96e7a38d02ef4f403
[ "Apache-2.0" ]
null
null
null
docs/conf.py
hat-open/hat-stc
8edf9e23f9f2d8e581f844f96e7a38d02ef4f403
[ "Apache-2.0" ]
null
null
null
from pathlib import Path import subprocess root_path = Path(__file__).parent.parent.resolve() extensions = [ 'sphinx.ext.todo', 'sphinxcontrib.drawio', ] version = (root_path / 'VERSION').read_text().strip() project = 'hat-stc' copyright = '2020-2021, Hat Open AUTHORS' master_doc = 'index' html_theme = 'fu...
25.625
72
0.664634
from pathlib import Path import subprocess root_path = Path(__file__).parent.parent.resolve() extensions = [ 'sphinx.ext.todo', 'sphinxcontrib.drawio', ] version = (root_path / 'VERSION').read_text().strip() project = 'hat-stc' copyright = '2020-2021, Hat Open AUTHORS' master_doc = 'index' html_theme = 'fu...
true
true
f70f010c765e7d5b11c81cbf2a8a5f6563f97562
1,657
py
Python
pyrasterframes/python/geomesa_pyspark/types.py
jdenisgiguere/rasterframes
4226cde5223e67ab0e9f27c98bc1053d0a4b7a4e
[ "Apache-2.0" ]
null
null
null
pyrasterframes/python/geomesa_pyspark/types.py
jdenisgiguere/rasterframes
4226cde5223e67ab0e9f27c98bc1053d0a4b7a4e
[ "Apache-2.0" ]
null
null
null
pyrasterframes/python/geomesa_pyspark/types.py
jdenisgiguere/rasterframes
4226cde5223e67ab0e9f27c98bc1053d0a4b7a4e
[ "Apache-2.0" ]
null
null
null
"""*********************************************************************** This file was created by Astraea, Inc., 2018 from an excerpt of the original: Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. All rights reserved. This program and the accompanying materials are made available under ...
24.014493
77
0.652384
from pyspark.sql.types import UserDefinedType from pyspark.sql import Row from pyspark.sql.types import * from pyrasterframes.context import RFContext class GeometryUDT(UserDefinedType): @classmethod def sqlType(self): return StructType([StructField("wkb", BinaryType(), True)]) @classmeth...
true
true
f70f016add7378486fc5701457b5b6ce3da7e9e2
3,181
py
Python
moog/action_spaces/joystick.py
juanpablordz/moog.github.io
d7995d3563492378d0877ce8d16f5ca9a8031794
[ "Apache-2.0", "MIT" ]
22
2021-02-26T18:19:35.000Z
2022-03-05T19:01:00.000Z
moog/action_spaces/joystick.py
juanpablordz/moog.github.io
d7995d3563492378d0877ce8d16f5ca9a8031794
[ "Apache-2.0", "MIT" ]
1
2021-04-01T06:15:02.000Z
2021-04-23T13:14:12.000Z
moog/action_spaces/joystick.py
juanpablordz/moog.github.io
d7995d3563492378d0877ce8d16f5ca9a8031794
[ "Apache-2.0", "MIT" ]
2
2021-05-02T02:20:39.000Z
2021-05-06T16:24:35.000Z
"""Joystick action space for controlling agent avatars.""" from . import abstract_action_space from dm_env import specs import numpy as np class Joystick(abstract_action_space.AbstractActionSpace): """Joystick action space.""" def __init__(self, scaling_factor=1., action_layers='agent', con...
40.782051
80
0.617102
from . import abstract_action_space from dm_env import specs import numpy as np class Joystick(abstract_action_space.AbstractActionSpace): def __init__(self, scaling_factor=1., action_layers='agent', constrained_lr=False, control_velocity=False, momentum=0.): self._scaling_factor = scal...
true
true
f70f0196bf302980bb4ad2f3eb39b8628d0c4555
5,380
py
Python
tests/test_data.py
pedromachados/pygeocodio
5ff11edd46e749a9236078f9a207cdf501b08b58
[ "BSD-3-Clause" ]
null
null
null
tests/test_data.py
pedromachados/pygeocodio
5ff11edd46e749a9236078f9a207cdf501b08b58
[ "BSD-3-Clause" ]
null
null
null
tests/test_data.py
pedromachados/pygeocodio
5ff11edd46e749a9236078f9a207cdf501b08b58
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_geocodio ---------------------------------- Tests for `geocodio.data` module. """ import json import os import unittest from geocodio.data import Address from geocodio.data import Location from geocodio.data import LocationCollection class TestDataTypes(unitt...
37.361111
88
0.631227
import json import os import unittest from geocodio.data import Address from geocodio.data import Location from geocodio.data import LocationCollection class TestDataTypes(unittest.TestCase): def setUp(self): fixtures = os.path.join(os.path.dirname(os.path.abspath(__file__)), "response/") with...
true
true
f70f020b7929b4915c2fffab4ea28ab2f15b1866
11,795
py
Python
docs/source/conf.py
nkeilbart/aiida-nwchem
d5199b8a94fc2ec8ed30d3370ceac3826312b757
[ "MIT" ]
1
2019-12-12T15:54:58.000Z
2019-12-12T15:54:58.000Z
docs/source/conf.py
nkeilbart/aiida-nwchem
d5199b8a94fc2ec8ed30d3370ceac3826312b757
[ "MIT" ]
10
2017-11-16T15:53:39.000Z
2021-12-07T16:34:18.000Z
docs/source/conf.py
nkeilbart/aiida-nwchem
d5199b8a94fc2ec8ed30d3370ceac3826312b757
[ "MIT" ]
6
2018-08-14T13:26:30.000Z
2021-12-31T14:37:31.000Z
# -*- coding: utf-8 -*- # # Sphinx configuration # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show t...
33.039216
116
0.701145
import os import sys import time import aiida_nwchem from aiida.manage.configuration import load_documentation_profile load_documentation_profile() if not os.environ.get('READTHEDOCS', None): import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path...
true
true
f70f028521e5de5b0a466d4f2b82c44f85164074
769
py
Python
final_project/server.py
jozuk/xzceb-flask_eng_fr
c5c89f9662c112698582a798560a97efec98993b
[ "Apache-2.0" ]
null
null
null
final_project/server.py
jozuk/xzceb-flask_eng_fr
c5c89f9662c112698582a798560a97efec98993b
[ "Apache-2.0" ]
null
null
null
final_project/server.py
jozuk/xzceb-flask_eng_fr
c5c89f9662c112698582a798560a97efec98993b
[ "Apache-2.0" ]
null
null
null
from machinetranslation import translator from flask import Flask, render_template, request import json app = Flask("Web Translator") @app.route("/englishToFrench") def englishToFrench(): textToTranslate = request.args.get('textToTranslate') translation = translator.englishToFrench(englishText=textToTranslate...
30.76
73
0.755527
from machinetranslation import translator from flask import Flask, render_template, request import json app = Flask("Web Translator") @app.route("/englishToFrench") def englishToFrench(): textToTranslate = request.args.get('textToTranslate') translation = translator.englishToFrench(englishText=textToTranslate...
true
true
f70f03101eb33aaa6d53e7284608e1a134f8d03b
1,779
py
Python
dqn/model/model.py
kanokkorn/RL-bot
554888668bd08fc18a81b549fb750e0cb5dff22c
[ "BSD-3-Clause" ]
2
2020-01-29T00:35:22.000Z
2020-03-20T09:05:52.000Z
dqn/model/model.py
kanokkorn/RL-bot
554888668bd08fc18a81b549fb750e0cb5dff22c
[ "BSD-3-Clause" ]
9
2019-07-05T18:52:33.000Z
2020-05-19T11:57:32.000Z
dqn/model/model.py
kanokkorn/RL-bot
554888668bd08fc18a81b549fb750e0cb5dff22c
[ "BSD-3-Clause" ]
null
null
null
import os import pprint import inspect import tensorflow as tf pp = pprint.PrettyPrinter().pprint def class_vars(obj): return (k:v for k, v in inspect.getmembers(obj)) if not k.startswith("__") and not callable() class base_model(object): def __init__(self, config): self._saver = None self.config...
27.369231
70
0.663294
import os import pprint import inspect import tensorflow as tf pp = pprint.PrettyPrinter().pprint def class_vars(obj): return (k:v for k, v in inspect.getmembers(obj)) if not k.startswith("__") and not callable() class base_model(object): def __init__(self, config): self._saver = None self.config...
false
true
f70f035e63d0185dcc7a6309281b612f988cd503
3,602
py
Python
bindings/python/ensmallen/datasets/string/lachnospiraceaebacteriumnk4a144.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/lachnospiraceaebacteriumnk4a144.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/lachnospiraceaebacteriumnk4a144.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 Lachnospiraceae bacterium NK4A144. 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: prote...
33.351852
223
0.681566
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def LachnospiraceaeBacteriumNk4a144( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "g...
true
true
f70f03937dd486d609695c5a1f3d24ea0a9fafa6
2,141
py
Python
tools/Vitis-AI-Library/xmodel_image/models/efficientNet-edgetpu-S/efficientNet-edgetpu-S.py
bluetiger9/Vitis-AI
a7728733bbcfc292ff3afa46b9c8b03e94b740b3
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tools/Vitis-AI-Library/xmodel_image/models/efficientNet-edgetpu-S/efficientNet-edgetpu-S.py
wangyifan778/Vitis-AI
f61061eef7550d98bf02a171604c9a9f283a7c47
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tools/Vitis-AI-Library/xmodel_image/models/efficientNet-edgetpu-S/efficientNet-edgetpu-S.py
wangyifan778/Vitis-AI
f61061eef7550d98bf02a171604c9a9f283a7c47
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
# # Copyright 2019 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
46.543478
117
0.685194
import os import xir_extra_ops def jit(graph): graph.set_attr("xmodel_preprocessor", "libxmodel_preprocessor_efficientnet.so.1") graph.set_attr("need_preprocess", True) graph.set_attr("mean", [127.0, 127.0, 127.0]) graph.set_attr("scale", [0.0078125, 0.0078125, 0.0078125]) graph.set_attr("is_rgb_i...
true
true
f70f040ea176c1df0334a1bc712c28b2bf4eae04
845
py
Python
plugins/recreations/plugins/nonebot_plugin_picsearcher/formdata.py
liangzimiao/miyubot
c2788712255e39348c8980c8ace2f6f75fb6621c
[ "Apache-2.0" ]
null
null
null
plugins/recreations/plugins/nonebot_plugin_picsearcher/formdata.py
liangzimiao/miyubot
c2788712255e39348c8980c8ace2f6f75fb6621c
[ "Apache-2.0" ]
null
null
null
plugins/recreations/plugins/nonebot_plugin_picsearcher/formdata.py
liangzimiao/miyubot
c2788712255e39348c8980c8ace2f6f75fb6621c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from typing import Any, Iterable, List, Optional from aiohttp import FormData as _FormData import aiohttp.multipart as multipart class FormData(_FormData): def __init__( self, fields: Iterable[Any] = (), quote_fields: bool = True, charset: Optional[str] = N...
30.178571
80
0.616568
from typing import Any, Iterable, List, Optional from aiohttp import FormData as _FormData import aiohttp.multipart as multipart class FormData(_FormData): def __init__( self, fields: Iterable[Any] = (), quote_fields: bool = True, charset: Optional[str] = None, boundary: O...
true
true
f70f053b6cba750dfb3d76ebc766809958971f63
10,714
py
Python
site_scons/podd_util.py
leadmocha/analyzer
ab26d755dbe816975e4165479c9fbefc4c4ca069
[ "BSD-3-Clause" ]
null
null
null
site_scons/podd_util.py
leadmocha/analyzer
ab26d755dbe816975e4165479c9fbefc4c4ca069
[ "BSD-3-Clause" ]
null
null
null
site_scons/podd_util.py
leadmocha/analyzer
ab26d755dbe816975e4165479c9fbefc4c4ca069
[ "BSD-3-Clause" ]
null
null
null
# podd_utils.py # Utility functions for Podd SCons build import os from SCons.Action import ActionFactory from SCons.Script.SConscript import SConsEnvironment SConsEnvironment.OSCommand = ActionFactory(os.system, lambda command : 'os.system("%s")' % command) import SCons.Util def list_to_path(lst): ...
39.389706
91
0.612936
import os from SCons.Action import ActionFactory from SCons.Script.SConscript import SConsEnvironment SConsEnvironment.OSCommand = ActionFactory(os.system, lambda command : 'os.system("%s")' % command) import SCons.Util def list_to_path(lst): result = '' if SCons.Util.is_List(lst): for e...
true
true
f70f0585c7ebf9f69ae33d24a7e5ee609fe1149b
7,087
py
Python
Code/VnetLA/validate.py
yyliu01/TraCoCo
eecbc92c961d393deaa31726739a94b7f495d893
[ "MIT" ]
4
2022-03-29T04:19:02.000Z
2022-03-31T07:48:24.000Z
Code/VnetLA/validate.py
yyliu01/TraCoCo
eecbc92c961d393deaa31726739a94b7f495d893
[ "MIT" ]
null
null
null
Code/VnetLA/validate.py
yyliu01/TraCoCo
eecbc92c961d393deaa31726739a94b7f495d893
[ "MIT" ]
null
null
null
import os import math import torch import argparse import numpy as np from tqdm import tqdm from medpy import metric import torch.nn.functional as F from Configs.config import config from Model.Vnet import VNet as Vnet from cc3d import connected_components from Dataloader.dataset import LAHeartDataset """ # https://gi...
39.372222
107
0.597291
import os import math import torch import argparse import numpy as np from tqdm import tqdm from medpy import metric import torch.nn.functional as F from Configs.config import config from Model.Vnet import VNet as Vnet from cc3d import connected_components from Dataloader.dataset import LAHeartDataset def cct(pseudo...
true
true
f70f05ab41aae7df827738907b865086531ef156
15,255
py
Python
sdk/python/pulumi_azure_nextgen/network/v20170301/load_balancer.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20170301/load_balancer.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20170301/load_balancer.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
63.5625
2,495
0.708686
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['LoadBalancer'] class LoadBalancer(pulumi.CustomResource): def __init__(__self__, ...
true
true
f70f06341c00091fa3e07ab8cacd2d2f5aa1ebc3
19,241
py
Python
airmozilla/search/views.py
mozilla/airmozilla
fa6acbbbacc1e22553457807bcea7ce7a9ef6fe3
[ "BSD-3-Clause" ]
115
2015-01-06T18:45:39.000Z
2022-02-07T10:56:49.000Z
airmozilla/search/views.py
april/airmozilla
ee357f5396cdcb50147c72ff1e81a610f9cb292c
[ "BSD-3-Clause" ]
321
2015-01-02T15:19:25.000Z
2018-07-05T14:58:50.000Z
airmozilla/search/views.py
april/airmozilla
ee357f5396cdcb50147c72ff1e81a610f9cb292c
[ "BSD-3-Clause" ]
101
2015-01-13T17:59:15.000Z
2020-12-15T02:58:38.000Z
import re import urllib import time from django.shortcuts import render, redirect, get_object_or_404 from django import http from django.db.utils import DatabaseError from django.db import transaction from django.db.models import Count from django.conf import settings from django.core.urlresolvers import reverse from ...
32.611864
78
0.551427
import re import urllib import time from django.shortcuts import render, redirect, get_object_or_404 from django import http from django.db.utils import DatabaseError from django.db import transaction from django.db.models import Count from django.conf import settings from django.core.urlresolvers import reverse from ...
true
true
f70f069823fd5ef6630117d9dc3a0f6b3c733dac
6,184
py
Python
aspect_sentiment.py
dcstrandberg/aspect-sentiment
0177888d4fe96d49b78e44f5bd24be619c93bf00
[ "MIT" ]
null
null
null
aspect_sentiment.py
dcstrandberg/aspect-sentiment
0177888d4fe96d49b78e44f5bd24be619c93bf00
[ "MIT" ]
null
null
null
aspect_sentiment.py
dcstrandberg/aspect-sentiment
0177888d4fe96d49b78e44f5bd24be619c93bf00
[ "MIT" ]
null
null
null
import spacy from textblob import TextBlob import pandas as pd # Import functions from other files from tweet_handlers import pullTweetsFromCSV, tweetPulls ### Declare functions to standardize, identify, and analyze input text # Will ultimately take in a list of tweets and return: # - Word counts # - Split of positiv...
35.54023
159
0.656856
import spacy from textblob import TextBlob import pandas as pd from tweet_handlers import pullTweetsFromCSV, tweetPulls def visualizeText(nlp, txt, writeFilename): doc = nlp(txt) html = spacy.displacy.render(doc, style='dep') filePath = './' + writeFilename + '.html' with open(filePath, 'w') as f: ...
true
true
f70f06d145ebf33a522d7807ef5a9e07fbe9c20f
2,396
py
Python
app/lpd/tests/udp_10g/udp_rx_pkt_mon_trl.py
stfc-aeg/lpd-detector
7bc0d9700a3d3992a4541f05e1434aba0d056dcc
[ "Apache-2.0" ]
null
null
null
app/lpd/tests/udp_10g/udp_rx_pkt_mon_trl.py
stfc-aeg/lpd-detector
7bc0d9700a3d3992a4541f05e1434aba0d056dcc
[ "Apache-2.0" ]
20
2018-10-04T07:36:22.000Z
2020-05-18T13:10:42.000Z
app/lpd/tests/udp_10g/udp_rx_pkt_mon_trl.py
stfc-aeg/lpd-detector
7bc0d9700a3d3992a4541f05e1434aba0d056dcc
[ "Apache-2.0" ]
null
null
null
# X10G Development code # UDP Receive with Trailer Recognition # Rob Halsall 23-11-2011 import sys, socket #from msvcrt import * if len(sys.argv) == 3: ip = sys.argv[1] port = int(sys.argv[2]) else: print "use: python udp_rx_ll_mon_trl.py 192.168.9.2 61650" exit(0) sock = socket.socket(socket.AF_INET, socket....
28.86747
124
0.588898
import sys, socket if len(sys.argv) == 3: ip = sys.argv[1] port = int(sys.argv[2]) else: print "use: python udp_rx_ll_mon_trl.py 192.168.9.2 61650" exit(0) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 80388608) print "Receiving on ",ip,":",port ...
false
true
f70f0787a0e23d8cb0acd7856c1396ee2bb4208f
61,694
py
Python
utils.py
williamhowardsnyder/OnClass
07b2917dbdf01a1de54771de3383bbaa4bb2f283
[ "MIT" ]
33
2019-10-22T17:46:21.000Z
2022-01-31T15:38:54.000Z
utils.py
williamhowardsnyder/OnClass
07b2917dbdf01a1de54771de3383bbaa4bb2f283
[ "MIT" ]
9
2019-11-20T21:58:49.000Z
2022-03-24T17:32:18.000Z
utils.py
williamhowardsnyder/OnClass
07b2917dbdf01a1de54771de3383bbaa4bb2f283
[ "MIT" ]
11
2019-10-30T22:42:53.000Z
2022-03-16T06:35:37.000Z
from anndata import read_h5ad import sys from time import time from scipy import stats, sparse import numpy as np import collections import pickle from sklearn.preprocessing import normalize import os from collections import Counter import pandas as pd from sklearn.model_selection import train_test_split from sklearn.m...
34.64009
336
0.705903
from anndata import read_h5ad import sys from time import time from scipy import stats, sparse import numpy as np import collections import pickle from sklearn.preprocessing import normalize import os from collections import Counter import pandas as pd from sklearn.model_selection import train_test_split from sklearn.m...
true
true
f70f08cee80ad850cef012b0fba50cffe9ba06a4
934
py
Python
utils.py
code-rush/BattleshipGame
ffe1c4073218efcea941236f04dc3dea14271be6
[ "MIT" ]
null
null
null
utils.py
code-rush/BattleshipGame
ffe1c4073218efcea941236f04dc3dea14271be6
[ "MIT" ]
9
2016-07-16T04:03:15.000Z
2016-07-20T20:35:42.000Z
utils.py
code-rush/BattleshipGame
ffe1c4073218efcea941236f04dc3dea14271be6
[ "MIT" ]
null
null
null
import endpoints from google.appengine.ext import ndb def get_by_urlsafe(urlsafe, model): try: key = ndb.Key(urlsafe=urlsafe) except TypeError: raise endpoints.BadRequestException('Invalid Key') except Exception, e: if e.__class__.__name__ == 'ProtocolBufferDecodeError': ...
28.30303
63
0.656317
import endpoints from google.appengine.ext import ndb def get_by_urlsafe(urlsafe, model): try: key = ndb.Key(urlsafe=urlsafe) except TypeError: raise endpoints.BadRequestException('Invalid Key') except Exception, e: if e.__class__.__name__ == 'ProtocolBufferDecodeError': ...
false
true
f70f08db465afe069cfaa7e1cf2eaa71195adbb9
8,661
py
Python
Offline/dataset.py
HongLabTHU/dual-mVEPs
f387584865a45a7257d8203fcb9522820e1311de
[ "Apache-2.0" ]
7
2019-11-29T07:16:55.000Z
2021-12-21T02:13:26.000Z
Offline/dataset.py
HongLabTHU/dual-mVEPs
f387584865a45a7257d8203fcb9522820e1311de
[ "Apache-2.0" ]
null
null
null
Offline/dataset.py
HongLabTHU/dual-mVEPs
f387584865a45a7257d8203fcb9522820e1311de
[ "Apache-2.0" ]
4
2020-04-28T08:02:44.000Z
2021-12-21T02:13:27.000Z
import glob import os import warnings from datetime import datetime from copy import deepcopy import numpy as np import pyedflib import scipy.io as sio from config import cfg from thirdparty.cerebus import NsxFile, NevFile from thirdparty.nex import Reader as NexReader from .utils import find_nearest_time def _load...
32.317164
120
0.607551
import glob import os import warnings from datetime import datetime from copy import deepcopy import numpy as np import pyedflib import scipy.io as sio from config import cfg from thirdparty.cerebus import NsxFile, NevFile from thirdparty.nex import Reader as NexReader from .utils import find_nearest_time def _load...
true
true
f70f091487d65dd2f5ff52861bbd8b9a57e1dcd8
1,719
py
Python
tools/bitesize.py
jerr/bcc
f3fc87aab83ce3e4f1ca227e33853df21147255a
[ "Apache-2.0" ]
5
2018-11-01T12:17:32.000Z
2021-06-14T10:56:53.000Z
tools/bitesize.py
gdankel/bcc
2cc96a8c17b9b7059883627ea211f30a77061b2b
[ "ECL-2.0", "Apache-2.0" ]
13
2018-02-09T22:24:29.000Z
2018-06-18T22:33:29.000Z
tools/bitesize.py
gdankel/bcc
2cc96a8c17b9b7059883627ea211f30a77061b2b
[ "ECL-2.0", "Apache-2.0" ]
5
2018-01-31T05:04:19.000Z
2018-06-12T00:45:21.000Z
#!/usr/bin/python # # bitehist.py Block I/O size histogram. # For Linux, uses BCC, eBPF. See .c file. # # USAGE: bitesize # # Ctrl-C will print the partially gathered histogram then exit. # # Copyright (c) 2016 Allan McAleavy # Licensed under the Apache License, Version 2.0 (the "License") # # 05-Feb-20...
22.324675
76
0.670157
from bcc import BPF from time import sleep bpf_text = """ #include <uapi/linux/ptrace.h> #include <linux/blkdev.h> struct proc_key_t { char name[TASK_COMM_LEN]; u64 slot; }; struct val_t { char name[TASK_COMM_LEN]; }; BPF_HISTOGRAM(dist, struct proc_key_t); BPF_HASH(commbyreq, struct request *, struct ...
true
true
f70f0b4b935ab084e2e02ffe3c58b6c6932fdad3
1,115
py
Python
train/model_stack.py
pabloserna/SentimentAnalysisinAWS
d94572665442ef6f49deb07ed78f8104654fefc3
[ "MIT" ]
null
null
null
train/model_stack.py
pabloserna/SentimentAnalysisinAWS
d94572665442ef6f49deb07ed78f8104654fefc3
[ "MIT" ]
null
null
null
train/model_stack.py
pabloserna/SentimentAnalysisinAWS
d94572665442ef6f49deb07ed78f8104654fefc3
[ "MIT" ]
null
null
null
import torch.nn as nn class LSTMClassifier(nn.Module): """ This is the simple RNN model we will be using to perform Sentiment Analysis. """ def __init__(self, embedding_dim, hidden_dim, vocab_size): """ Initialize the model by settingg up the various layers. """ super(L...
32.794118
80
0.603587
import torch.nn as nn class LSTMClassifier(nn.Module): def __init__(self, embedding_dim, hidden_dim, vocab_size): super(LSTMClassifier, self).__init__() self.embedding = nn.Embedding(vocab_size, embedding_dim, padding_idx=0) self.lstmA = nn.LSTM(embedding_dim, hidden_dim) self.lst...
true
true
f70f0bc03e2af0f6fa2ecb979b20813cc105e3d8
4,419
py
Python
applications/RomApplication/python_scripts/structural_mechanics_analysis_rom.py
KlausBSautter/Kratos
245b30e38497a242bbdf999278e9c1b6175a573a
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/RomApplication/python_scripts/structural_mechanics_analysis_rom.py
KlausBSautter/Kratos
245b30e38497a242bbdf999278e9c1b6175a573a
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/RomApplication/python_scripts/structural_mechanics_analysis_rom.py
philbucher/Kratos
1ceb900dbacfab344e27e32285250eafc52093ec
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
import KratosMultiphysics import KratosMultiphysics.RomApplication as romapp import KratosMultiphysics.StructuralMechanicsApplication from KratosMultiphysics.RomApplication.empirical_cubature_method import EmpiricalCubatureMethod from KratosMultiphysics.RomApplication import python_solvers_wrapper_rom as solver_wrapper...
53.890244
215
0.699253
import KratosMultiphysics import KratosMultiphysics.RomApplication as romapp import KratosMultiphysics.StructuralMechanicsApplication from KratosMultiphysics.RomApplication.empirical_cubature_method import EmpiricalCubatureMethod from KratosMultiphysics.RomApplication import python_solvers_wrapper_rom as solver_wrapper...
true
true
f70f0bd663cf1f4669ac616148ad30bc07b5bb89
1,491
py
Python
examples/JoystickButton.py
rwarren/pyqtgraph
e5d28ad79d0fe1c335e7f98a5d9e7ac0b22f0a2b
[ "MIT" ]
null
null
null
examples/JoystickButton.py
rwarren/pyqtgraph
e5d28ad79d0fe1c335e7f98a5d9e7ac0b22f0a2b
[ "MIT" ]
null
null
null
examples/JoystickButton.py
rwarren/pyqtgraph
e5d28ad79d0fe1c335e7f98a5d9e7ac0b22f0a2b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ JoystickButton is a button with x/y values. When the button is depressed and the mouse dragged, the x/y values change to follow the mouse. When the mouse button is released, the x/y values change to 0,0 (rather like letting go of the joystick). """ import initExample ## Add path to library...
25.706897
83
0.701543
import initExample from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg app = QtGui.QApplication([]) mw = QtGui.QMainWindow() mw.resize(300,50) mw.setWindowTitle('pyqtgraph example: JoystickButton') cw = QtGui.QWidget() mw.setCentralWidget(cw) layout = QtGui.QGridLayout() cw.setLayout(layout) l1 = pg.Valu...
true
true