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
f7455e660767e2c4eff42a54cfd70432bff850eb
8,965
py
Python
jarviscli/PluginManager.py
akhil-dh1/Jarvis
dc8ef7b278500575a31bad2f645bbed7cd601022
[ "MIT" ]
1
2021-08-28T17:00:56.000Z
2021-08-28T17:00:56.000Z
jarviscli/PluginManager.py
akhil-dh1/Jarvis
dc8ef7b278500575a31bad2f645bbed7cd601022
[ "MIT" ]
4
2019-09-25T14:20:32.000Z
2019-09-25T19:04:50.000Z
jarviscli/PluginManager.py
akhil-dh1/Jarvis
dc8ef7b278500575a31bad2f645bbed7cd601022
[ "MIT" ]
48
2019-09-25T09:08:38.000Z
2019-10-04T17:35:46.000Z
import sys from functools import partial import pluginmanager import six import plugin from utilities.GeneralUtilities import warning, error, executable_exists class PluginManager(object): """ Frontend for pluginmanager https://github.com/benhoff/pluginmanager Also handles plugin.PluginComposed ...
31.678445
81
0.602789
import sys from functools import partial import pluginmanager import six import plugin from utilities.GeneralUtilities import warning, error, executable_exists class PluginManager(object): def __init__(self): self._backend = pluginmanager.PluginInterface() self._plugin_dependency = PluginDepend...
true
true
f7455f548ec9bf9d57e40734c0f9f418b44cfd44
4,891
py
Python
bin/functions/execute_with_log.py
thrill/HiBench
3cf694b107924040754b87ddfb51648c97632eb7
[ "Apache-2.0" ]
4
2016-03-13T23:56:08.000Z
2017-08-28T19:49:58.000Z
bin/functions/execute_with_log.py
thrill/HiBench
3cf694b107924040754b87ddfb51648c97632eb7
[ "Apache-2.0" ]
null
null
null
bin/functions/execute_with_log.py
thrill/HiBench
3cf694b107924040754b87ddfb51648c97632eb7
[ "Apache-2.0" ]
2
2019-09-03T06:41:25.000Z
2020-07-26T00:59:55.000Z
#!/usr/bin/env python2.7 # 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 "Li...
36.774436
170
0.612554
import sys, os, subprocess from terminalsize import get_terminal_size from time import time, sleep import re def load_colors(): color_script_fn = os.path.join(os.path.dirname(__file__), "color.enabled.sh") with open(color_script_fn) as f: return dict([(k,v.split("'")[1].replace('\e[...
true
true
f7455f96c67b4fa806b7f2d249e59c84c992f28a
24,136
py
Python
CountingByDetection_FasterRCNNs/cocoeval.py
huskermiao/MaizeLeafCounting
68d3d8e8bebf2dc74f2aa79a3fc62aca67de1dbb
[ "BSD-2-Clause" ]
5
2021-02-07T14:36:10.000Z
2022-03-29T04:14:11.000Z
CountingByDetection_FasterRCNNs/cocoeval.py
freemao/MaizeLeafCounting
68d3d8e8bebf2dc74f2aa79a3fc62aca67de1dbb
[ "BSD-2-Clause" ]
7
2021-04-06T18:26:38.000Z
2022-03-12T00:53:15.000Z
CountingByDetection_FasterRCNNs/cocoeval.py
freemao/MaizeLeafCounting
68d3d8e8bebf2dc74f2aa79a3fc62aca67de1dbb
[ "BSD-2-Clause" ]
3
2019-08-21T02:52:27.000Z
2020-05-22T07:36:24.000Z
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict import mask as maskUtils import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoGt=..., cocoDt=... ...
45.114019
131
0.51388
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict import mask as maskUtils import copy class COCOeval: def __init__(self, cocoGt=None, cocoDt=None, iouType='segm'): if not iouTy...
true
true
f7456036fe16e05952f63c682fc9af9b990e77e1
1,744
py
Python
app/auth/views.py
ChegeDaniella/Pitches
40b6bea69fe8774ca39e6199e9e80f32429503fd
[ "MIT" ]
null
null
null
app/auth/views.py
ChegeDaniella/Pitches
40b6bea69fe8774ca39e6199e9e80f32429503fd
[ "MIT" ]
null
null
null
app/auth/views.py
ChegeDaniella/Pitches
40b6bea69fe8774ca39e6199e9e80f32429503fd
[ "MIT" ]
null
null
null
from flask import render_template,redirect,url_for,flash,request from app.models import User from .forms import SignUpForm, LoginForm, validate_email from .. import db from . import auth from flask_login import login_user,logout_user,login_required from ..email import mail_message from wtforms import ValidationError ...
32.90566
106
0.675459
from flask import render_template,redirect,url_for,flash,request from app.models import User from .forms import SignUpForm, LoginForm, validate_email from .. import db from . import auth from flask_login import login_user,logout_user,login_required from ..email import mail_message from wtforms import ValidationError ...
true
true
f74561c2bd471d63f2b1093c646029902c3d6958
10,304
py
Python
5/download.py
yalov4uk/ML-labs
ca944610614c182259783449d9ec6e9135d6aaf1
[ "MIT" ]
null
null
null
5/download.py
yalov4uk/ML-labs
ca944610614c182259783449d9ec6e9135d6aaf1
[ "MIT" ]
null
null
null
5/download.py
yalov4uk/ML-labs
ca944610614c182259783449d9ec6e9135d6aaf1
[ "MIT" ]
null
null
null
import os import tarfile import email import re import nltk import urlextract import numpy as np import scipy.io as sio from sklearn.base import BaseEstimator, TransformerMixin from nltk.stem import PorterStemmer from html import unescape from email import parser from email.policy import default from six.moves import u...
30.575668
104
0.628591
import os import tarfile import email import re import nltk import urlextract import numpy as np import scipy.io as sio from sklearn.base import BaseEstimator, TransformerMixin from nltk.stem import PorterStemmer from html import unescape from email import parser from email.policy import default from six.moves import u...
true
true
f74561f3bdf18057fe696b27c85f993e9512190f
860
py
Python
adapters/gira/light_link.py
cocooma/domoticz-zigbee2mqtt-plugin
97b025beaff6b68f4f92dd434c6dda63f53efdd8
[ "MIT" ]
null
null
null
adapters/gira/light_link.py
cocooma/domoticz-zigbee2mqtt-plugin
97b025beaff6b68f4f92dd434c6dda63f53efdd8
[ "MIT" ]
null
null
null
adapters/gira/light_link.py
cocooma/domoticz-zigbee2mqtt-plugin
97b025beaff6b68f4f92dd434c6dda63f53efdd8
[ "MIT" ]
null
null
null
from adapters.base_adapter import Adapter from devices.switch.selector_switch import SelectorSwitch class GiraLightLink(Adapter): def __init__(self, devices): super().__init__(devices) self.switch = SelectorSwitch(devices, 'switch', 'action') self.switch.add_level('Off', 'off') se...
37.391304
79
0.693023
from adapters.base_adapter import Adapter from devices.switch.selector_switch import SelectorSwitch class GiraLightLink(Adapter): def __init__(self, devices): super().__init__(devices) self.switch = SelectorSwitch(devices, 'switch', 'action') self.switch.add_level('Off', 'off') se...
true
true
f74563914d59097c041780e14dbb3322cd07f17f
2,427
py
Python
azure/mgmt/compute/compute/v2017_03_30/models/additional_unattend_content.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
2
2020-07-29T14:22:17.000Z
2020-11-06T18:47:40.000Z
azure/mgmt/compute/compute/v2017_03_30/models/additional_unattend_content.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2016-08-01T07:37:04.000Z
2016-08-01T07:37:04.000Z
azure/mgmt/compute/compute/v2017_03_30/models/additional_unattend_content.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2020-12-12T21:04:41.000Z
2020-12-12T21:04:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
45.792453
93
0.672847
from msrest.serialization import Model class AdditionalUnattendContent(Model): _attribute_map = { 'pass_name': {'key': 'passName', 'type': 'PassNames'}, 'component_name': {'key': 'componentName', 'type': 'ComponentNames'}, 'setting_name': {'key': 'settingName', 'type': 'Setting...
true
true
f745640d2faf2605cbffcfc26185a67a461f493f
1,419
py
Python
src/main.py
artem-smotrakov/esp32-ldr
d8c6a02c8cee2a0eb632c62f92c4f65ca0cbc548
[ "MIT" ]
null
null
null
src/main.py
artem-smotrakov/esp32-ldr
d8c6a02c8cee2a0eb632c62f92c4f65ca0cbc548
[ "MIT" ]
null
null
null
src/main.py
artem-smotrakov/esp32-ldr
d8c6a02c8cee2a0eb632c62f92c4f65ca0cbc548
[ "MIT" ]
1
2021-01-05T09:01:23.000Z
2021-01-05T09:01:23.000Z
from machine import ADC, Pin import time class LDR: """This class read a value from a light dependent resistor (LDR)""" def __init__(self, pin, min_value=0, max_value=100): """ Initializes a new instance. :parameter pin A pin that's connected to an LDR. :parameter min_value A ...
26.773585
80
0.604651
from machine import ADC, Pin import time class LDR: def __init__(self, pin, min_value=0, max_value=100): if min_value >= max_value: raise Exception('Min value is greater or equal to max value') self.adc = ADC(Pin(pin)) self.adc.atten(ADC.ATTN_11DB) ...
true
true
f74564319f0d46d6a370c777f442b78c73e6217c
62,012
py
Python
python/ccxt/async_support/hitbtc.py
sandutsar/ccxt
f27c187fa1626a6c261c6fa5caaae89cb657461d
[ "MIT" ]
null
null
null
python/ccxt/async_support/hitbtc.py
sandutsar/ccxt
f27c187fa1626a6c261c6fa5caaae89cb657461d
[ "MIT" ]
null
null
null
python/ccxt/async_support/hitbtc.py
sandutsar/ccxt
f27c187fa1626a6c261c6fa5caaae89cb657461d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import A...
43.63969
189
0.530736
rt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import BadSymbol from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from c...
true
true
f7456466c21aa88e2bbb735d8c9d016e80e576bb
1,280
py
Python
makeLib/makeLib.py
brzx/pydataloader
005c347b8fd9aca0a35ecf8eccce0a35e7e6da52
[ "BSD-2-Clause" ]
null
null
null
makeLib/makeLib.py
brzx/pydataloader
005c347b8fd9aca0a35ecf8eccce0a35e7e6da52
[ "BSD-2-Clause" ]
null
null
null
makeLib/makeLib.py
brzx/pydataloader
005c347b8fd9aca0a35ecf8eccce0a35e7e6da52
[ "BSD-2-Clause" ]
null
null
null
import shutil, zipfile, os, time def delFile(path): for root, dirs, files in os.walk(path, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) for root, dirs, files in os.walk(path, topdown...
29.090909
64
0.586719
import shutil, zipfile, os, time def delFile(path): for root, dirs, files in os.walk(path, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) for root, dirs, files in os.walk(path, topdown...
true
true
f74565801fb603bf55fb4dfe9ae48bc82279a0a7
1,330
py
Python
conans/test/server/crypto/jwt_test.py
datalogics-kam/conan
7bf230cd5f8ef68eb804908777ebaad75e951b16
[ "MIT" ]
29
2016-01-27T09:43:44.000Z
2020-03-12T04:16:02.000Z
conans/test/server/crypto/jwt_test.py
datalogics-kam/conan
7bf230cd5f8ef68eb804908777ebaad75e951b16
[ "MIT" ]
20
2016-01-22T15:59:33.000Z
2016-10-28T10:22:45.000Z
conans/test/server/crypto/jwt_test.py
datalogics-kam/conan
7bf230cd5f8ef68eb804908777ebaad75e951b16
[ "MIT" ]
6
2016-02-11T14:09:04.000Z
2018-03-17T00:18:35.000Z
import unittest from conans.server.crypto.jwt.jwt_credentials_manager import JWTCredentialsManager from conans.server.crypto.jwt.jwt_manager import JWTManager from datetime import timedelta import time import jwt from jwt import DecodeError class JwtTest(unittest.TestCase): def setUp(self): unittest.Test...
34.102564
82
0.718045
import unittest from conans.server.crypto.jwt.jwt_credentials_manager import JWTCredentialsManager from conans.server.crypto.jwt.jwt_manager import JWTManager from datetime import timedelta import time import jwt from jwt import DecodeError class JwtTest(unittest.TestCase): def setUp(self): unittest.Test...
true
true
f74565a41e5333fd88905d25cd775c525fa7b7a2
14,186
py
Python
vue_backend/api/migrations/0001_initial.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
1
2021-03-18T17:04:52.000Z
2021-03-18T17:04:52.000Z
vue_backend/api/migrations/0001_initial.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
11
2020-04-03T04:16:24.000Z
2022-03-26T10:36:49.000Z
vue_backend/api/migrations/0001_initial.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-09-24 09:38 import api.models import datetime from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('user', '0002_customer'), ] opera...
64.190045
190
0.592063
import api.models import datetime from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('user', '0002_customer'), ] operations = [ migrations.CreateModel( ...
true
true
f74565b49e62703eff840a9ccb87fc5864fe885b
8,383
py
Python
packages/python/plotly/plotly/graph_objs/layout/annotation/_font.py
eranws/plotly.py
5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/layout/annotation/_font.py
eranws/plotly.py
5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/layout/annotation/_font.py
eranws/plotly.py
5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.annotation" _path_str = "layout.annotation.font" _valid_props = {"color", "family", ...
36.929515
84
0.564118
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): _parent_path_str = "layout.annotation" _path_str = "layout.annotation.font" _valid_props = {"color", "family", "size"} @property def...
true
true
f7456619d0c4a002342719eed546dbd2300bd608
2,034
py
Python
docs/source/conf.py
casparschwa/beaconrunner
d5430e08b120462beea19f65a4cf335ec9eb9134
[ "MIT" ]
11
2020-07-06T12:36:17.000Z
2021-04-22T11:00:18.000Z
docs/source/conf.py
casparschwa/beaconrunner
d5430e08b120462beea19f65a4cf335ec9eb9134
[ "MIT" ]
3
2021-09-12T07:31:21.000Z
2022-03-12T01:03:03.000Z
docs/source/conf.py
casparschwa/beaconrunner
d5430e08b120462beea19f65a4cf335ec9eb9134
[ "MIT" ]
12
2021-05-24T15:21:04.000Z
2022-03-28T17:50:37.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.9
79
0.664208
import os import sys print(os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('../..')) sys.setrecursionlimit(1500) project = 'beaconrunner' copyright = '2020, Barnabé Monnot' author = 'Barnabé Monnot' release = '0.1.2' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon'...
true
true
f74566e480520f4e835c07fb77bb586112be532e
3,197
py
Python
tests/ml/test_overfit.py
ZhaoJY1/nussl
57aabeabca3b2e75849e1659a522e3c2f77e9172
[ "MIT" ]
259
2016-10-04T19:21:25.000Z
2020-04-15T14:39:54.000Z
tests/ml/test_overfit.py
titocaco/nussl
af7d0c50e01d107f4ef3305b89eb130d95d0a7cd
[ "MIT" ]
115
2016-10-26T01:58:04.000Z
2020-04-15T07:53:00.000Z
tests/ml/test_overfit.py
titocaco/nussl
af7d0c50e01d107f4ef3305b89eb130d95d0a7cd
[ "MIT" ]
64
2017-04-11T04:10:35.000Z
2020-04-08T11:23:48.000Z
from nussl import ml, datasets, evaluation import tempfile from torch import optim import numpy as np import logging import os import torch from matplotlib import pyplot as plt logging.basicConfig( format='%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s', datefmt='%Y-%m-%d:%H:%M:%S'...
32.958763
89
0.657491
from nussl import ml, datasets, evaluation import tempfile from torch import optim import numpy as np import logging import os import torch from matplotlib import pyplot as plt logging.basicConfig( format='%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s', datefmt='%Y-%m-%d:%H:%M:%S'...
true
true
f7456a8275699b260ad5cef2486c9d9f08fcac23
1,580
py
Python
script.py
Wason1/Rows-to-columns-consolidator
21ee991ba907ba61708d24acfc6d5b3a3e754677
[ "MIT" ]
null
null
null
script.py
Wason1/Rows-to-columns-consolidator
21ee991ba907ba61708d24acfc6d5b3a3e754677
[ "MIT" ]
null
null
null
script.py
Wason1/Rows-to-columns-consolidator
21ee991ba907ba61708d24acfc6d5b3a3e754677
[ "MIT" ]
null
null
null
#Import Libs import pandas as pd # Inputs #col_name = input('What is the name of the column to convert to columns?: ') #keyz = input('what are the names of the columns that uniquely identify a row? (seperate these with pipes "|"):') #keyz.split('|') file_dir = r'data.xlsx' output_dir = r'data-out.xlsx' list_key_cols =...
27.719298
123
0.691139
import pandas as pd file_dir = r'data.xlsx' output_dir = r'data-out.xlsx' list_key_cols = ['Person - Medical Record Number', 'CE-Verified DT/TM'] split_col = 'Clinical Event' filler_col = 'Clinical Event Result' df = pd.read_excel( file_dir ) df = df.applymap(str) series_primary_key = df[list_key_c...
true
true
f7456a8c452cd8bfb29a481ebe5e4a3da3f3a6fa
126
py
Python
components/micropython/core/ports/esp32/modules/umqtt/simple.py
bincc123/MaixPy_Test
7eaccbf0fbd67447e47106166f1d7b0431abdad0
[ "Apache-2.0" ]
null
null
null
components/micropython/core/ports/esp32/modules/umqtt/simple.py
bincc123/MaixPy_Test
7eaccbf0fbd67447e47106166f1d7b0431abdad0
[ "Apache-2.0" ]
null
null
null
components/micropython/core/ports/esp32/modules/umqtt/simple.py
bincc123/MaixPy_Test
7eaccbf0fbd67447e47106166f1d7b0431abdad0
[ "Apache-2.0" ]
null
null
null
IntxLNK../../../../../micropython-lib/umqtt.simple/umqtt/simple.py
126
126
0.357143
IntxLNK../../../../../micropython-lib/umqtt.simple/umqtt/simple.py
false
true
f7456ac413952982825553507030f09d07587863
6,205
py
Python
extensions/vflib/NetworkGraph/Graph.py
UnixJunkie/frowns
427e4c11a8a4dbe865828d18221899478497795e
[ "BSD-3-Clause" ]
null
null
null
extensions/vflib/NetworkGraph/Graph.py
UnixJunkie/frowns
427e4c11a8a4dbe865828d18221899478497795e
[ "BSD-3-Clause" ]
null
null
null
extensions/vflib/NetworkGraph/Graph.py
UnixJunkie/frowns
427e4c11a8a4dbe865828d18221899478497795e
[ "BSD-3-Clause" ]
null
null
null
"""Graph a class for graph manipulation """ import vflib from Matcher import Matcher # for now these molecules will be immutable def is_remove(list, object): """remove objects from a list using is equivalence instead of comparison equivalence""" result = [] for e in list: if object is not e...
33.005319
77
0.580016
"""Graph a class for graph manipulation """ import vflib from Matcher import Matcher def is_remove(list, object): """remove objects from a list using is equivalence instead of comparison equivalence""" result = [] for e in list: if object is not e: result.append(e) return r...
false
true
f7456b0f1e7e2bed054c8101b5c14f38a4ebafc5
10,374
py
Python
registration/views.py
AVS18/Hospital-Management-System
cfe31cd20eb1986ddee27a39733e28cec4a8d82d
[ "Apache-2.0" ]
null
null
null
registration/views.py
AVS18/Hospital-Management-System
cfe31cd20eb1986ddee27a39733e28cec4a8d82d
[ "Apache-2.0" ]
null
null
null
registration/views.py
AVS18/Hospital-Management-System
cfe31cd20eb1986ddee27a39733e28cec4a8d82d
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render,redirect from django.db import connection from django.core.files.storage import FileSystemStorage from django.contrib.auth import get_user_model,authenticate from django.contrib import messages,auth from django.conf import settings from .models import Profile, Appointments, Prescript...
46.72973
289
0.675535
from django.shortcuts import render,redirect from django.db import connection from django.core.files.storage import FileSystemStorage from django.contrib.auth import get_user_model,authenticate from django.contrib import messages,auth from django.conf import settings from .models import Profile, Appointments, Prescript...
true
true
f7456b631e584c09bc42847974b184ecd49a71cf
740
py
Python
setup.py
sam-james-harding/CombiParser
6abd378ecbd1e27ddc341ac6316b5f505393a7c5
[ "MIT" ]
null
null
null
setup.py
sam-james-harding/CombiParser
6abd378ecbd1e27ddc341ac6316b5f505393a7c5
[ "MIT" ]
null
null
null
setup.py
sam-james-harding/CombiParser
6abd378ecbd1e27ddc341ac6316b5f505393a7c5
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name = 'CombiParser', packages = ['CombiParser'], version = '0.4', license='MIT', description = 'A simple combinator parser.', author = 'Sam Harding', author_email = 'samueljames.harding@icloud.com', url = 'https://github.com/sam-james-harding/CombiParser', dow...
33.636364
98
0.675676
from distutils.core import setup setup( name = 'CombiParser', packages = ['CombiParser'], version = '0.4', license='MIT', description = 'A simple combinator parser.', author = 'Sam Harding', author_email = 'samueljames.harding@icloud.com', url = 'https://github.com/sam-james-harding/CombiParser', dow...
true
true
f7456b74b404522474c8da8fc154f1b8bdee1947
1,044
py
Python
setup.py
kampikd/python-i18n
ac72baca8d44193aa39a062c67f583d01c3f060a
[ "MIT" ]
104
2018-09-27T07:43:38.000Z
2022-03-30T04:16:38.000Z
setup.py
kampikd/python-i18n
ac72baca8d44193aa39a062c67f583d01c3f060a
[ "MIT" ]
23
2018-10-22T11:48:08.000Z
2022-03-09T21:25:57.000Z
setup.py
kampikd/python-i18n
ac72baca8d44193aa39a062c67f583d01c3f060a
[ "MIT" ]
17
2018-10-20T17:50:34.000Z
2021-11-06T07:23:12.000Z
from setuptools import setup setup( name='python-i18n', version='0.3.9', description='Translation library for Python', long_description=open('README.md').read(), long_description_content_type='text/markdown', author='Daniel Perez', author_email='tuvistavie@gmail.com', url='https://githu...
32.625
80
0.6341
from setuptools import setup setup( name='python-i18n', version='0.3.9', description='Translation library for Python', long_description=open('README.md').read(), long_description_content_type='text/markdown', author='Daniel Perez', author_email='tuvistavie@gmail.com', url='https://githu...
true
true
f7456b7b5b9ee4011fabc497b4803cf6451dd114
15,987
py
Python
sws.py
ltqusst/lpc_vocoder
baf29d40dcf9f4b80a73146dca939c7841045441
[ "MIT" ]
6
2019-10-29T02:26:47.000Z
2021-10-06T00:57:04.000Z
sws.py
ltqusst/lpc_vocoder
baf29d40dcf9f4b80a73146dca939c7841045441
[ "MIT" ]
null
null
null
sws.py
ltqusst/lpc_vocoder
baf29d40dcf9f4b80a73146dca939c7841045441
[ "MIT" ]
2
2020-05-30T11:20:47.000Z
2022-01-07T07:46:28.000Z
## MIT License # Copyright (c) 2017 John Williamson # Copyright (c) 2008 Cournapeau David # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation t...
32.29697
131
0.595421
import numpy as np import scipy, scipy.io, scipy.io.wavfile, scipy.signal import os from pathlib import Path import argparse def levinson_1d(r, order): r = np.atleast_1d(r) if r.ndim > 1: raise ValueError("Only rank 1 are supported for now.") n = r.size if n < 1: raise Val...
true
true
f7456bdf1f0369e0c03a142fec9ff9b301f03aac
768
py
Python
resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtXml/QXmlDTDHandler.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
1
2020-04-20T02:27:20.000Z
2020-04-20T02:27:20.000Z
resources/dot_PyCharm/system/python_stubs/cache/d1acfdaecbc43dfcba0c1287ba0e29c0ef0e2d37695269b2505d76ec531b8b76/PySide/QtXml/QXmlDTDHandler.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
resources/dot_PyCharm/system/python_stubs/cache/d1acfdaecbc43dfcba0c1287ba0e29c0ef0e2d37695269b2505d76ec531b8b76/PySide/QtXml/QXmlDTDHandler.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
# encoding: utf-8 # module PySide.QtXml # from C:\Python27\lib\site-packages\PySide\QtXml.pyd # by generator 1.147 # no doc # imports import Shiboken as __Shiboken class QXmlDTDHandler(__Shiboken.Object): # no doc def errorString(self, *args, **kwargs): # real signature unknown pass def notation...
24.774194
77
0.65625
import Shiboken as __Shiboken class QXmlDTDHandler(__Shiboken.Object): def errorString(self, *args, **kwargs): pass def notationDecl(self, *args, **kwargs): pass def unparsedEntityDecl(self, *args, **kwargs): pass def __init__(self, *args, **kwargs): ...
true
true
f7456d24ad6d378777da480450d01423058bab88
7,432
py
Python
venv/Lib/site-packages/pandas/tests/extension/test_categorical.py
mokshagna517/recommendation_sys
bc8ced225dff3c93d619ff5da363f42d0aa0676c
[ "MIT" ]
5
2019-07-26T15:22:41.000Z
2021-09-28T09:22:17.000Z
venv/Lib/site-packages/pandas/tests/extension/test_categorical.py
mokshagna517/recommendation_sys
bc8ced225dff3c93d619ff5da363f42d0aa0676c
[ "MIT" ]
16
2021-03-19T09:44:52.000Z
2022-03-12T00:22:14.000Z
venv/Lib/site-packages/pandas/tests/extension/test_categorical.py
mokshagna517/recommendation_sys
bc8ced225dff3c93d619ff5da363f42d0aa0676c
[ "MIT" ]
9
2020-02-05T10:24:12.000Z
2020-02-10T13:08:50.000Z
""" This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal ...
30.211382
81
0.689047
import string import numpy as np import pytest import pandas as pd from pandas import Categorical from pandas.api.types import CategoricalDtype from pandas.tests.extension import base import pandas.util.testing as tm def make_data(): while True: values = np.random.choice(list(string.ascii_letters), size...
true
true
f7456d3f794dfc3a6bf867371ddbbc9c21454b8d
275
py
Python
artstdweb/infinityroom/apps.py
shaeed/ArtStudio
3e3e3ed16400592a0271108e04b3cce2f7f5f192
[ "MIT" ]
null
null
null
artstdweb/infinityroom/apps.py
shaeed/ArtStudio
3e3e3ed16400592a0271108e04b3cce2f7f5f192
[ "MIT" ]
null
null
null
artstdweb/infinityroom/apps.py
shaeed/ArtStudio
3e3e3ed16400592a0271108e04b3cce2f7f5f192
[ "MIT" ]
null
null
null
from django.apps import AppConfig #from infinityroom.models import GlobalVars class InfinityroomConfig(AppConfig): name = 'infinityroom' def ready(self): print('shaeed khan') #g = GlobalVars.objects.all() #for a in g: # a.delete()
25
43
0.643636
from django.apps import AppConfig class InfinityroomConfig(AppConfig): name = 'infinityroom' def ready(self): print('shaeed khan')
true
true
f7456dada54f0b7565b5df6cb40cc75a90b2f799
928
py
Python
video/migrations/0001_initial.py
rcy17/YuketangVideo
9ce82d3a64c7bd845743e131378117e5dfd5a8e2
[ "MIT" ]
null
null
null
video/migrations/0001_initial.py
rcy17/YuketangVideo
9ce82d3a64c7bd845743e131378117e5dfd5a8e2
[ "MIT" ]
null
null
null
video/migrations/0001_initial.py
rcy17/YuketangVideo
9ce82d3a64c7bd845743e131378117e5dfd5a8e2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-04-01 23:55 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Video', fields=[ ('id', models.AutoField(au...
34.37037
136
0.571121
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Video', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fa...
true
true
f7456e3b7cce5be716c2af7523db2419cd557cbb
2,074
py
Python
tests/wikipedia_page_test.py
fjhheras/Wikipedia-API
e276127e11851e461503eb4c935dc7864b8c11c5
[ "MIT" ]
null
null
null
tests/wikipedia_page_test.py
fjhheras/Wikipedia-API
e276127e11851e461503eb4c935dc7864b8c11c5
[ "MIT" ]
null
null
null
tests/wikipedia_page_test.py
fjhheras/Wikipedia-API
e276127e11851e461503eb4c935dc7864b8c11c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest import wikipediaapi from tests.mock_data import wikipedia_api_request class TestWikipediaPage(unittest.TestCase): def setUp(self): self.wiki = wikipediaapi.Wikipedia("en") self.wiki._query = wikipedia_api_request def test_repr_before_fetching(self): ...
31.424242
62
0.612343
import unittest import wikipediaapi from tests.mock_data import wikipedia_api_request class TestWikipediaPage(unittest.TestCase): def setUp(self): self.wiki = wikipediaapi.Wikipedia("en") self.wiki._query = wikipedia_api_request def test_repr_before_fetching(self): page = self.wiki....
true
true
f7456e7d15441eb8ad47cb8a56dbff9ed195c6e6
3,342
py
Python
cpp/codegen/cpp/entry_types.py
tjzhou23/profilo
baeea045a00d2403cc3f45778bf9cb69d33801da
[ "Apache-2.0" ]
1,466
2018-03-13T17:13:49.000Z
2022-03-31T07:08:51.000Z
cpp/codegen/cpp/entry_types.py
tjzhou23/profilo
baeea045a00d2403cc3f45778bf9cb69d33801da
[ "Apache-2.0" ]
101
2018-03-13T18:43:34.000Z
2022-03-15T00:44:52.000Z
cpp/codegen/cpp/entry_types.py
tjzhou23/profilo
baeea045a00d2403cc3f45778bf9cb69d33801da
[ "Apache-2.0" ]
160
2018-03-13T18:08:21.000Z
2022-03-14T00:46:34.000Z
""" Copyright 2018-present, Facebook, 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,...
26.314961
86
0.676242
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from ..codegen import Codegen from ..codegen import SIGNED_SOURCE class CppEntryTypesCodegen(Codegen): def __init__(self, entries): super(CppEntryTypesCode...
true
true
f7456f641343e56767c1d0d7cb8511116636424d
2,885
py
Python
year_2017/day_11.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
1
2020-04-12T16:14:29.000Z
2020-04-12T16:14:29.000Z
year_2017/day_11.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
year_2017/day_11.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
from unittest import TestCase import operator from aoc_utils.data import data_text class Coordinates(object): def __init__(self, coordinates): self.coordinates = coordinates[:] def __str__(self): return "{}".format(self.coordinates) def __getitem__(self, item): return self.coordi...
30.368421
89
0.632236
from unittest import TestCase import operator from aoc_utils.data import data_text class Coordinates(object): def __init__(self, coordinates): self.coordinates = coordinates[:] def __str__(self): return "{}".format(self.coordinates) def __getitem__(self, item): return self.coordi...
true
true
f7456fe5d61cd5715a7df3f5e12c7b3d41f8e356
1,107
py
Python
mopidy_gmusic/commands.py
jacobobryant/mopidy-gmusic
646fa6ebdf5381b4e7abdcf9a33f93fe122f68fe
[ "Apache-2.0" ]
null
null
null
mopidy_gmusic/commands.py
jacobobryant/mopidy-gmusic
646fa6ebdf5381b4e7abdcf9a33f93fe122f68fe
[ "Apache-2.0" ]
null
null
null
mopidy_gmusic/commands.py
jacobobryant/mopidy-gmusic
646fa6ebdf5381b4e7abdcf9a33f93fe122f68fe
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from oauth2client.client import OAuth2WebServerFlow import gmusicapi from mopidy import commands class GMusicCommand(commands.Command): def __init__(self): super(GMusicCommand, self).__init__() self.add_child('login', LoginCommand()) class LoginCommand(co...
30.75
76
0.65131
from __future__ import print_function from oauth2client.client import OAuth2WebServerFlow import gmusicapi from mopidy import commands class GMusicCommand(commands.Command): def __init__(self): super(GMusicCommand, self).__init__() self.add_child('login', LoginCommand()) class LoginCommand(co...
true
true
f7456fe98798d9817b89bca1a7905a31d2e01bc6
24,408
py
Python
tzpgc_2016/include/design.py
mpatacchiola/naogui
2c71c82362edcf66b1a24a5f2af23e9719011146
[ "MIT" ]
2
2017-12-22T14:33:07.000Z
2020-07-23T09:35:59.000Z
tzpgc_2016/include/design.py
mpatacchiola/naogui
2c71c82362edcf66b1a24a5f2af23e9719011146
[ "MIT" ]
null
null
null
tzpgc_2016/include/design.py
mpatacchiola/naogui
2c71c82362edcf66b1a24a5f2af23e9719011146
[ "MIT" ]
4
2016-04-01T10:02:39.000Z
2018-04-14T08:05:20.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '../include/mainwindow.ui' # # Created: Wed Mar 30 17:46:45 2016 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8...
57.161593
203
0.696534
from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _enc...
true
true
f7457113babcdb8375c142c5d21daefd5ec812a2
5,313
py
Python
meerkat/thermistor.py
crdietrich/meerkat
33f4e10fc7f0bbece79e4aefd7da179aa4574e52
[ "MIT" ]
2
2019-09-30T02:04:23.000Z
2020-02-23T19:28:59.000Z
meerkat/thermistor.py
crdietrich/meerkat
33f4e10fc7f0bbece79e4aefd7da179aa4574e52
[ "MIT" ]
1
2020-07-20T03:36:34.000Z
2020-08-03T04:26:01.000Z
meerkat/thermistor.py
crdietrich/meerkat
33f4e10fc7f0bbece79e4aefd7da179aa4574e52
[ "MIT" ]
1
2020-07-20T02:53:03.000Z
2020-07-20T02:53:03.000Z
"""Thermistor calculation methods, Semitec 103AT-2 thermistor using ADS1x15 ADC I2C Driver for Raspberry PI & MicroPython""" from math import log def steinhart_hart(r, a, b, c, degrees='celcius'): """Calculate temperature from a resistance based on the Steinhart-Hart equation. Defaults to degres in Celcius ...
28.260638
115
0.507811
from math import log def steinhart_hart(r, a, b, c, degrees='celcius'): t = 1.0 / (a + b * log(r) + c * (log(r) ** 3)) if degrees == 'celcius': t = KtoC(t) return t def KtoC(k): return k - 273.15 def CtoK(k): return k + 273.15 def compose_array(t1, t2, t3, r1, r2, r3, degrees='celci...
true
true
f74571b92ad819244cf77ecdc54c443cd31335e6
9,968
py
Python
libcloud/test/dns/test_hostvirtual.py
llambiel/libcloud
7123206a9ee32333da7fc92905acb0bb16d37d0a
[ "Apache-2.0" ]
1
2019-07-29T02:53:51.000Z
2019-07-29T02:53:51.000Z
libcloud/test/dns/test_hostvirtual.py
llambiel/libcloud
7123206a9ee32333da7fc92905acb0bb16d37d0a
[ "Apache-2.0" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
libcloud/test/dns/test_hostvirtual.py
llambiel/libcloud
7123206a9ee32333da7fc92905acb0bb16d37d0a
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.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 ...
38.486486
77
0.647673
import sys import unittest from libcloud.utils.py3 import httplib from libcloud.dns.types import RecordType, ZoneDoesNotExistError from libcloud.dns.types import RecordDoesNotExistError from libcloud.dns.drivers.hostvirtual import HostVirtualDNSDriver from libcloud.test import MockHttp from libcloud.te...
true
true
f745721ef2879cb2ebc492780afa09430d860ef4
1,197
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/9_features/numtrees_45/rule_31.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/9_features/numtrees_45/rule_31.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/9_features/numtrees_45/rule_31.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Education, obj[4]: Occupation, obj[5]: Bar, obj[6]: Restaurant20to50, obj[7]: Direction_same, obj[8]: Distance # {"feature": "Direction_same", "instances": 23, "metric_value": 0.9986, "depth": 1} if obj[7]<=0: # {"feature": "Coupon", "...
36.272727
191
0.581454
def findDecision(obj): if obj[7]<=0: if obj[2]>0: if obj[4]>1: if obj[6]>0.0: if obj[1]>0: return 'True' elif obj[1]<=0: if obj[3]>2: return 'False' elif obj[3]<=2: return 'True' else: return 'True' else: return 'False' elif ...
true
true
f745725b45de284e2e6cddae2c5d05fed02a3e3d
16,486
py
Python
wal_e/cmd.py
silkapp/wal-e
0488a4e0557650db5d3859081c7e6e31b3e702c1
[ "BSD-3-Clause" ]
1
2016-07-24T18:10:46.000Z
2016-07-24T18:10:46.000Z
wal_e/cmd.py
silkapp/wal-e
0488a4e0557650db5d3859081c7e6e31b3e702c1
[ "BSD-3-Clause" ]
null
null
null
wal_e/cmd.py
silkapp/wal-e
0488a4e0557650db5d3859081c7e6e31b3e702c1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """WAL-E is a program to assist in performing PostgreSQL continuous archiving on S3: it handles pushing and fetching of WAL segments and base backups of the PostgreSQL data directory. """ def gevent_monkey(*args, **kwargs): import gevent.monkey gevent.monkey.patch_socket(dns=True, aggre...
39.917676
79
0.608213
"""WAL-E is a program to assist in performing PostgreSQL continuous archiving on S3: it handles pushing and fetching of WAL segments and base backups of the PostgreSQL data directory. """ def gevent_monkey(*args, **kwargs): import gevent.monkey gevent.monkey.patch_socket(dns=True, aggressive=True) geven...
false
true
f74572c6f50b8bb296b7be3c548db46ff24a80a0
28,973
py
Python
netbox/dcim/migrations/0071_device_components_add_description_squashed_0088_powerfeed_available_power.py
BrnoPCmaniak/netbox
7b517abdb68a6324950dfd0375861163c7bfff00
[ "Apache-2.0" ]
1
2021-09-23T00:06:51.000Z
2021-09-23T00:06:51.000Z
netbox/dcim/migrations/0071_device_components_add_description_squashed_0088_powerfeed_available_power.py
BrnoPCmaniak/netbox
7b517abdb68a6324950dfd0375861163c7bfff00
[ "Apache-2.0" ]
2
2021-06-08T21:05:10.000Z
2021-09-08T01:46:58.000Z
netbox/dcim/migrations/0071_device_components_add_description_squashed_0088_powerfeed_available_power.py
BrnoPCmaniak/netbox
7b517abdb68a6324950dfd0375861163c7bfff00
[ "Apache-2.0" ]
null
null
null
import sys import django.core.validators import django.db.models.deletion import taggit.managers from django.db import migrations, models SITE_STATUS_CHOICES = ( (1, 'active'), (2, 'planned'), (4, 'retired'), ) RACK_TYPE_CHOICES = ( (100, '2-post-frame'), (200, '4-post-frame'), (300, '4-post-...
34.491667
763
0.602078
import sys import django.core.validators import django.db.models.deletion import taggit.managers from django.db import migrations, models SITE_STATUS_CHOICES = ( (1, 'active'), (2, 'planned'), (4, 'retired'), ) RACK_TYPE_CHOICES = ( (100, '2-post-frame'), (200, '4-post-frame'), (300, '4-post-...
true
true
f74572ddb69210ace109e7c28c04a4805203d3f1
54,677
py
Python
python/craftassist/ttad/generation_dialogues/templates/dig_templates.py
satyamedh/craftassist
d97cbc14bc25149d3ef41737231ab9f3cb7e392a
[ "MIT" ]
null
null
null
python/craftassist/ttad/generation_dialogues/templates/dig_templates.py
satyamedh/craftassist
d97cbc14bc25149d3ef41737231ab9f3cb7e392a
[ "MIT" ]
null
null
null
python/craftassist/ttad/generation_dialogues/templates/dig_templates.py
satyamedh/craftassist
d97cbc14bc25149d3ef41737231ab9f3cb7e392a
[ "MIT" ]
null
null
null
""" Copyright (c) Facebook, Inc. and its affiliates. """ # fmt: off ''' Every template contains an ordered list of TemplateObjects. TemplateObject is defined in template_objects.py Dig templates are written for a Location and represent the intent for the action: Dig. This action intends to dig a hole at a certain loc...
81.974513
153
0.786327
from template_objects import * DIG_WITH_CORRECTION = [ plate, LocationMobTemplate, Please]], [[Human, Dig, DigDimensions, DigSomeShape, NTimes], [HumanReplace, RelativeDirectionTemplate, LocationMobTemplate, Please]], [[Human, Dig, DigAbstractSize, DigSomeShape, NTimes], [HumanReplace, Relati...
true
true
f74573b52638d503ce8ae74bad9ae3ab15507b34
2,239
py
Python
corporative/forms.py
augustakingfoundation/queryjane_app
2c7b27db9e16288c49520b94704246b25dd262b6
[ "MIT" ]
5
2018-08-07T07:01:04.000Z
2021-03-19T00:16:59.000Z
corporative/forms.py
augustakingfoundation/queryjane_app
2c7b27db9e16288c49520b94704246b25dd262b6
[ "MIT" ]
1
2018-04-30T07:27:03.000Z
2018-04-30T07:27:03.000Z
corporative/forms.py
augustakingfoundation/queryjane_app
2c7b27db9e16288c49520b94704246b25dd262b6
[ "MIT" ]
3
2018-08-08T11:57:01.000Z
2020-10-02T05:42:13.000Z
from django import forms from django.utils.translation import ugettext as _ from .models import LegalItem from app.validators import FileSizeValidator class LegalItemForm(forms.ModelForm): """ Legal item update form. Only platform administrator users can submit this form. The 'notify_users' field mus...
24.877778
73
0.601608
from django import forms from django.utils.translation import ugettext as _ from .models import LegalItem from app.validators import FileSizeValidator class LegalItemForm(forms.ModelForm): notify_users = forms.BooleanField( required=False, label=_('notify users'), help_text=_('Check it to...
true
true
f74573c4b881d2713b8abda7ad81caca155bd168
24,093
py
Python
bshmodules/s411objects.py
noiromo/S-411_Ice_Loader
7165211d81f832cb721d802a910178c6d2e100b7
[ "MIT" ]
2
2020-04-04T15:09:44.000Z
2021-01-04T06:00:02.000Z
bshmodules/s411objects.py
noiromo/S-411_Ice_Loader
7165211d81f832cb721d802a910178c6d2e100b7
[ "MIT" ]
1
2019-12-23T17:02:19.000Z
2020-04-20T09:48:33.000Z
bshmodules/s411objects.py
noiromo/S-411_Ice_Loader
7165211d81f832cb721d802a910178c6d2e100b7
[ "MIT" ]
1
2022-02-09T02:44:35.000Z
2022-02-09T02:44:35.000Z
class IceFeature(object): def __init__(self): self.gmlId = None self.geometry = None def get_geometry(self): return self.__geometry def set_geometry(self, value): self.__geometry = value def get_gml_id(self): return self.__gmlI...
16.513365
56
0.585896
class IceFeature(object): def __init__(self): self.gmlId = None self.geometry = None def get_geometry(self): return self.__geometry def set_geometry(self, value): self.__geometry = value def get_gml_id(self): return self.__gmlI...
true
true
f7457496fd5628407e4f19f1ab888f3934a8c82e
19,670
py
Python
9z_ENSO_spatial_maps.py
nicpittman/tropical_pacific_carbon_export
eacd3e0382616388f418eb21cad859fe7ae0144a
[ "Apache-2.0" ]
null
null
null
9z_ENSO_spatial_maps.py
nicpittman/tropical_pacific_carbon_export
eacd3e0382616388f418eb21cad859fe7ae0144a
[ "Apache-2.0" ]
null
null
null
9z_ENSO_spatial_maps.py
nicpittman/tropical_pacific_carbon_export
eacd3e0382616388f418eb21cad859fe7ae0144a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 1 10:40:28 2020 @author: Nic Pittman This code will reproduce Figure 4 in Pittman et al., 2021. Trends and pvalues are calculated on the fly and not saved anywhere, however could be done easily. regridded data is required for this process This ...
36.697761
183
0.578139
import numpy as np import pandas as pd import xarray as xr import matplotlib.pyplot as plt from carbon_math import * from mpl_toolkits.basemap import Basemap from scipy.stats import linregress def plot_basemap(): m = Basemap(llcrnrlon=120.,llcrnrlat=-15,urcrnrlon=290,urcrnrlat=15.01, resolu...
true
true
f74574a3b1cd0e69bfe90925b198771d9b962996
1,559
py
Python
CLIP-ViL-VLN/modify.py
OdedH/CLIP-ViL
05180f64eef8365b9efae636eaaa88903ceb83f6
[ "MIT" ]
220
2021-06-18T19:16:49.000Z
2022-03-30T09:41:29.000Z
CLIP-ViL-VLN/modify.py
OdedH/CLIP-ViL
05180f64eef8365b9efae636eaaa88903ceb83f6
[ "MIT" ]
21
2021-07-14T18:01:26.000Z
2022-01-27T03:04:56.000Z
CLIP-ViL-VLN/modify.py
OdedH/CLIP-ViL
05180f64eef8365b9efae636eaaa88903ceb83f6
[ "MIT" ]
19
2021-07-15T04:29:42.000Z
2022-02-22T21:54:45.000Z
import os import shutil import argparse ORIG_FEAT = 'ResNet-152-imagenet' parser = argparse.ArgumentParser() parser.add_argument("--name", default="ResNet-152-imagenet") parser.add_argument("--dim", default="2048") parser.add_argument("--src-dir", default="r2r_src") args = parser.parse_args() print("Get ORIG files:...
29.980769
78
0.597178
import os import shutil import argparse ORIG_FEAT = 'ResNet-152-imagenet' parser = argparse.ArgumentParser() parser.add_argument("--name", default="ResNet-152-imagenet") parser.add_argument("--dim", default="2048") parser.add_argument("--src-dir", default="r2r_src") args = parser.parse_args() print("Get ORIG files:...
true
true
f745757955509a795ad1c7e9d15a5b2d89524dad
4,110
py
Python
redis/commands/sentinel.py
Avital-Fine/redis-py
42b937fa1f73f3e8251eba5ec8ead2fcbaec7c50
[ "MIT" ]
483
2021-10-11T22:11:32.000Z
2022-03-31T20:30:32.000Z
redis/commands/sentinel.py
Avital-Fine/redis-py
42b937fa1f73f3e8251eba5ec8ead2fcbaec7c50
[ "MIT" ]
423
2021-10-13T09:07:29.000Z
2022-03-31T09:13:03.000Z
redis/commands/sentinel.py
Avital-Fine/redis-py
42b937fa1f73f3e8251eba5ec8ead2fcbaec7c50
[ "MIT" ]
148
2021-10-19T09:43:51.000Z
2022-03-30T16:35:53.000Z
import warnings class SentinelCommands: """ A class containing the commands specific to redis sentinel. This class is to be used as a mixin. """ def sentinel(self, *args): """Redis Sentinel's SENTINEL command.""" warnings.warn(DeprecationWarning("Use the individual sentinel_* meth...
41.1
85
0.688808
import warnings class SentinelCommands: def sentinel(self, *args): warnings.warn(DeprecationWarning("Use the individual sentinel_* methods")) def sentinel_get_master_addr_by_name(self, service_name): return self.execute_command("SENTINEL GET-MASTER-ADDR-BY-NAME", service_name) def senti...
true
true
f74575883974a64ff5e0413b795eba18040f3842
3,360
py
Python
autotest/t011_test.py
jdlarsen-UA/flopy
bf2c59aaa689de186bd4c80685532802ac7149cd
[ "CC0-1.0", "BSD-3-Clause" ]
351
2015-01-03T15:18:48.000Z
2022-03-31T09:46:43.000Z
autotest/t011_test.py
jdlarsen-UA/flopy
bf2c59aaa689de186bd4c80685532802ac7149cd
[ "CC0-1.0", "BSD-3-Clause" ]
1,256
2015-01-15T21:10:42.000Z
2022-03-31T22:43:06.000Z
autotest/t011_test.py
jdlarsen-UA/flopy
bf2c59aaa689de186bd4c80685532802ac7149cd
[ "CC0-1.0", "BSD-3-Clause" ]
553
2015-01-31T22:46:48.000Z
2022-03-31T17:43:35.000Z
""" Some basic tests for mflistfile.py module (not super rigorous) """ import os import flopy import numpy as np from nose.tools import raises def test_mflistfile(): pth = os.path.join("..", "examples", "data", "freyberg") list_file = os.path.join(pth, "freyberg.gitlist") assert os.path.exists(list_file...
25.074627
66
0.639881
import os import flopy import numpy as np from nose.tools import raises def test_mflistfile(): pth = os.path.join("..", "examples", "data", "freyberg") list_file = os.path.join(pth, "freyberg.gitlist") assert os.path.exists(list_file) mflist = flopy.utils.MfListBudget(list_file) names = mflist.g...
true
true
f74575e217117382d68ea0a38063cb0901a9040c
3,882
py
Python
getBalamsatData.py
fernandorazon/blmsat
37b2c81d7d7760fb4a76e819fb386ac9184d54f6
[ "MIT" ]
null
null
null
getBalamsatData.py
fernandorazon/blmsat
37b2c81d7d7760fb4a76e819fb386ac9184d54f6
[ "MIT" ]
null
null
null
getBalamsatData.py
fernandorazon/blmsat
37b2c81d7d7760fb4a76e819fb386ac9184d54f6
[ "MIT" ]
null
null
null
from cansat import ReadLog import re import math as m temperatura = [] presion = [] aceleracion = [] ax = [] ay = [] az = [] orientacion = [] orientacionFloat =[] oy = [] oz =[] alt = [] cont = 0 #Esta funcion valida que los datos del documento sean numeros #Si no lo son retorna un string Nan #NO...
24.726115
96
0.648377
from cansat import ReadLog import re import math as m temperatura = [] presion = [] aceleracion = [] ax = [] ay = [] az = [] orientacion = [] orientacionFloat =[] oy = [] oz =[] alt = [] cont = 0 def validateData(i): try: value = re.split('=',i) values = float(value[1]) except Valu...
true
true
f7457617ca01442e8d82a9e28e33847447459e45
1,539
py
Python
lungSegmentation/RFunction.py
slowy07/medical-BCDU
dab1ddcacbe093b78e6830d52db2a4e6fabc3d52
[ "MIT" ]
null
null
null
lungSegmentation/RFunction.py
slowy07/medical-BCDU
dab1ddcacbe093b78e6830d52db2a4e6fabc3d52
[ "MIT" ]
null
null
null
lungSegmentation/RFunction.py
slowy07/medical-BCDU
dab1ddcacbe093b78e6830d52db2a4e6fabc3d52
[ "MIT" ]
null
null
null
from __future__ import division import numpy as np from scipy.ndimage.morphology import binary_erosion, binary_fill_holes def hu_to_grayscale(volume): volume = np.clip(volume, -512, 512) mxmal = np.max(volume) mnval = np.min(volume) im_volume = (volume - mnval) / max(mxval - mnval, 1e-3) im_volume ...
29.596154
112
0.643275
from __future__ import division import numpy as np from scipy.ndimage.morphology import binary_erosion, binary_fill_holes def hu_to_grayscale(volume): volume = np.clip(volume, -512, 512) mxmal = np.max(volume) mnval = np.min(volume) im_volume = (volume - mnval) / max(mxval - mnval, 1e-3) im_volume ...
true
true
f74578030a64151d52de6e7ef9809a73fe1e8ba7
4,325
py
Python
scripts/utils/toy_datasets.py
jlsuarezdiaz/pyDML-Stats
495de64dbcda73ce20d8e916bf5e5077a8dae98a
[ "MIT" ]
5
2018-10-30T18:05:18.000Z
2020-10-28T17:57:33.000Z
scripts/utils/toy_datasets.py
jlsuarezdiaz/pyDML-Stats
495de64dbcda73ce20d8e916bf5e5077a8dae98a
[ "MIT" ]
null
null
null
scripts/utils/toy_datasets.py
jlsuarezdiaz/pyDML-Stats
495de64dbcda73ce20d8e916bf5e5077a8dae98a
[ "MIT" ]
1
2019-10-16T15:56:48.000Z
2019-10-16T15:56:48.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 26 12:25:25 2018 Toy datasets. @author: jlsuarezdiaz """ import numpy as np import pandas as pd from six.moves import xrange from sklearn.preprocessing import LabelEncoder import seaborn as sns import matplotlib.pyplot as plt from sklearn.datasets...
26.212121
168
0.516532
import numpy as np import pandas as pd from six.moves import xrange from sklearn.preprocessing import LabelEncoder import seaborn as sns import matplotlib.pyplot as plt from sklearn.datasets import( load_iris, load_digits) def toy_plot(X,y): f, ax = plt.subplots(figsize=(12,9)) plt.axis('equal'...
true
true
f74579158806f66c70daf8beb8cf1af1cc587f74
1,577
py
Python
census_paleo/forms.py
wabarr/census-paleo
4d05d48c719d9d4b9a039227ab4102bceb3ae887
[ "MIT" ]
null
null
null
census_paleo/forms.py
wabarr/census-paleo
4d05d48c719d9d4b9a039227ab4102bceb3ae887
[ "MIT" ]
3
2016-08-10T02:14:02.000Z
2016-08-23T19:55:46.000Z
census_paleo/forms.py
wabarr/census-paleo
4d05d48c719d9d4b9a039227ab4102bceb3ae887
[ "MIT" ]
null
null
null
from django import forms from django.forms import ModelForm, Form from census_paleo.models import occurrence, taxonomy, measured_values, specimen from ajax_select import make_ajax_field class OccurrenceForm(ModelForm): taxon = make_ajax_field(occurrence, "taxon", "taxonLookup") ref = make_ajax_field(occurren...
39.425
106
0.745086
from django import forms from django.forms import ModelForm, Form from census_paleo.models import occurrence, taxonomy, measured_values, specimen from ajax_select import make_ajax_field class OccurrenceForm(ModelForm): taxon = make_ajax_field(occurrence, "taxon", "taxonLookup") ref = make_ajax_field(occurren...
true
true
f7457a708218c52fb773de91e6554ad751efbc00
21,525
py
Python
synapse/handlers/device.py
AP-whitehat/synapse
e73635191ff763fe5817d7a074c2bc1e9acb722c
[ "Apache-2.0" ]
2
2021-05-14T19:05:03.000Z
2021-05-26T23:00:43.000Z
synapse/handlers/device.py
AP-whitehat/synapse
e73635191ff763fe5817d7a074c2bc1e9acb722c
[ "Apache-2.0" ]
null
null
null
synapse/handlers/device.py
AP-whitehat/synapse
e73635191ff763fe5817d7a074c2bc1e9acb722c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2016 OpenMarket Ltd # # 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 la...
36.984536
88
0.598792
from synapse.api import errors from synapse.api.constants import EventTypes from synapse.api.errors import FederationDeniedError from synapse.util import stringutils from synapse.util.async import Linearizer from synapse.util.caches.expiringcache import ExpiringCache from synapse.util.retryutils import No...
false
true
f7457a8b059f9f8277466653a82994eeba869c28
57
py
Python
tests/quantfinpy/pricing/ir/cashflow/test_schedule.py
TradingPy/quantfinpy
20569c67314557b907dd2306dd48ec8be1b4a1a6
[ "BSD-3-Clause" ]
2
2022-03-13T12:44:17.000Z
2022-03-31T18:00:21.000Z
tests/quantfinpy/pricing/ir/cashflow/test_schedule.py
TradingPy/quantfinpy
20569c67314557b907dd2306dd48ec8be1b4a1a6
[ "BSD-3-Clause" ]
null
null
null
tests/quantfinpy/pricing/ir/cashflow/test_schedule.py
TradingPy/quantfinpy
20569c67314557b907dd2306dd48ec8be1b4a1a6
[ "BSD-3-Clause" ]
null
null
null
"""Test cases for the pricing of scheduled cashflows."""
28.5
56
0.736842
true
true
f7457bda10287c1c64239c9802aa4e6293ce12bf
15,413
py
Python
canalystii/device.py
projectgus/python-canalystii
7ef3a4a369a88976291ea91f93ef2b8c322855b9
[ "BSD-3-Clause" ]
3
2021-09-09T16:30:20.000Z
2022-03-11T10:29:19.000Z
canalystii/device.py
projectgus/python-canalystii
7ef3a4a369a88976291ea91f93ef2b8c322855b9
[ "BSD-3-Clause" ]
null
null
null
canalystii/device.py
projectgus/python-canalystii
7ef3a4a369a88976291ea91f93ef2b8c322855b9
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021 Angus Gratton # # SPDX-License-Identifier: Apache-2.0 # # This module contains device-level interface to Canalyst-II import ctypes import logging import usb.core import time from . import protocol logger = logging.getLogger(__name__) # "Fast" lookups to go from channel to USB endpoint number CHA...
44.417867
114
0.635957
import ctypes import logging import usb.core import time from . import protocol logger = logging.getLogger(__name__) CHANNEL_TO_COMMAND_EP = [2, 4] CHANNEL_TO_MESSAGE_EP = [1, 3] class CanalystDevice(object): COMMAND_MESSAGE_STATUS = protocol.SimpleCommand(protocol.COMMAND_MESSAGE_STATUS) ...
true
true
f7457ed7b6ff29bd798494ae4d888deb1cb69089
2,602
py
Python
common/metrics/basic_metrics.py
Ayushk4/tsat
07f9535157e45c4b27dae7d73d199fef7fb9d37a
[ "MIT" ]
null
null
null
common/metrics/basic_metrics.py
Ayushk4/tsat
07f9535157e45c4b27dae7d73d199fef7fb9d37a
[ "MIT" ]
null
null
null
common/metrics/basic_metrics.py
Ayushk4/tsat
07f9535157e45c4b27dae7d73d199fef7fb9d37a
[ "MIT" ]
null
null
null
#---------------------------------------- #--------- Torch Related Imports -------- #---------------------------------------- import torch import torch.distributed as distributed #---------------------------------------- #--------- Import Wandb Here ------------ #---------------------------------------- import wandb ...
28.593407
116
0.599154
import torch import torch.distributed as distributed import wandb class TrainAccuracyMetric(): def __init__(self, initial_value, allreduce=False, **kwargs): self.current_value = initial_value self.iterations = 1 self.allreduce = allreduce def update(self, new_value): ...
true
true
f7457ee1ff76645e069223188fb9dd3a27d7001c
3,821
py
Python
losses/loss_factory.py
iimmortall/QuantLib
29e83dad8738d0fb4efb18d0cb5dd3a7029abd86
[ "MIT" ]
null
null
null
losses/loss_factory.py
iimmortall/QuantLib
29e83dad8738d0fb4efb18d0cb5dd3a7029abd86
[ "MIT" ]
null
null
null
losses/loss_factory.py
iimmortall/QuantLib
29e83dad8738d0fb4efb18d0cb5dd3a7029abd86
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch def cross_entropy_dist_epoch(reduction='mean', **_): cross_entropy_fn = torch.nn.CrossEntropyLoss(reduction=reduction) l1_fn = torch.nn.L1Loss(reduction=reduction) def loss_fn(output...
33.517544
99
0.645904
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch def cross_entropy_dist_epoch(reduction='mean', **_): cross_entropy_fn = torch.nn.CrossEntropyLoss(reduction=reduction) l1_fn = torch.nn.L1Loss(reduction=reduction) def loss_fn(output...
true
true
f7457f8e9e82eb35f126a4968c31abe16b7ae9b3
5,658
py
Python
cardapioRestaurante.py
manot13/Python
5320a5e0fa3c55391387cedda03f5b79f8e165de
[ "MIT" ]
null
null
null
cardapioRestaurante.py
manot13/Python
5320a5e0fa3c55391387cedda03f5b79f8e165de
[ "MIT" ]
null
null
null
cardapioRestaurante.py
manot13/Python
5320a5e0fa3c55391387cedda03f5b79f8e165de
[ "MIT" ]
null
null
null
def escreverPratos(): for i in range(0, t): op = int(input("\nEscolha o prato de sua preferência: ")) if op == 1: vet.append("Bobó de Camarão") vetPrecoPrato.append(25.90) if op == 2: vet.append("Moqueca de Camarão") vetPrecoPrato.append(29.90)...
36.269231
116
0.557264
def escreverPratos(): for i in range(0, t): op = int(input("\nEscolha o prato de sua preferência: ")) if op == 1: vet.append("Bobó de Camarão") vetPrecoPrato.append(25.90) if op == 2: vet.append("Moqueca de Camarão") vetPrecoPrato.append(29.90)...
true
true
f7457fb7b4395380211e35c921dae707a03de2f2
5,081
py
Python
tests/build/_internal/config/test_source.py
hugueskamba/mbed-tools
05e3c5ade94f504240edff6a8e3d01a72c0fd7e6
[ "Apache-2.0" ]
null
null
null
tests/build/_internal/config/test_source.py
hugueskamba/mbed-tools
05e3c5ade94f504240edff6a8e3d01a72c0fd7e6
[ "Apache-2.0" ]
null
null
null
tests/build/_internal/config/test_source.py
hugueskamba/mbed-tools
05e3c5ade94f504240edff6a8e3d01a72c0fd7e6
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2020 Arm Mbed. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # import json import pathlib import tempfile from unittest import TestCase from mbed_tools.build._internal.config.source import ( Source, _namespace_data, _filter_target_overrides, _decode_json_file, ) class T...
35.531469
108
0.512498
import json import pathlib import tempfile from unittest import TestCase from mbed_tools.build._internal.config.source import ( Source, _namespace_data, _filter_target_overrides, _decode_json_file, ) class TestSource(TestCase): def test_from_mbed_lib(self): with tempfile.TemporaryDire...
true
true
f7458083858d62d0b01231f726ea52502ce08653
219
py
Python
3342.py
barroslipe/urionlinejudge
a20d8199d9a92b30ea394a6c949967d2fc51aa34
[ "MIT" ]
null
null
null
3342.py
barroslipe/urionlinejudge
a20d8199d9a92b30ea394a6c949967d2fc51aa34
[ "MIT" ]
null
null
null
3342.py
barroslipe/urionlinejudge
a20d8199d9a92b30ea394a6c949967d2fc51aa34
[ "MIT" ]
null
null
null
n = int(input()) brancas = pretas = 0 if n % 2 == 0: brancas = pretas = n * n / 2 else: brancas = int(n * n / 2) + 1 pretas = brancas - 1 print(f"{brancas:.0f} casas brancas e {pretas:.0f} casas pretas")
19.909091
65
0.561644
n = int(input()) brancas = pretas = 0 if n % 2 == 0: brancas = pretas = n * n / 2 else: brancas = int(n * n / 2) + 1 pretas = brancas - 1 print(f"{brancas:.0f} casas brancas e {pretas:.0f} casas pretas")
true
true
f74581304b1ec7afe6efed1c1a84fed53c39ec0a
3,460
py
Python
app/celery/process_ses_receipts_tasks.py
alphagov-mirror/notifications-api
4a2e47b118c51f0ad45e87c89521f6087b1fcc2f
[ "MIT" ]
null
null
null
app/celery/process_ses_receipts_tasks.py
alphagov-mirror/notifications-api
4a2e47b118c51f0ad45e87c89521f6087b1fcc2f
[ "MIT" ]
null
null
null
app/celery/process_ses_receipts_tasks.py
alphagov-mirror/notifications-api
4a2e47b118c51f0ad45e87c89521f6087b1fcc2f
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta import iso8601 from celery.exceptions import Retry from flask import current_app, json from notifications_utils.statsd_decorators import statsd from sqlalchemy.orm.exc import NoResultFound from app import notify_celery, statsd_client from app.clients.email.aws_ses import get_a...
39.770115
120
0.697399
from datetime import datetime, timedelta import iso8601 from celery.exceptions import Retry from flask import current_app, json from notifications_utils.statsd_decorators import statsd from sqlalchemy.orm.exc import NoResultFound from app import notify_celery, statsd_client from app.clients.email.aws_ses import get_a...
true
true
f74581da50ae282d849bc8e1f311118ba32066af
1,767
py
Python
utility.py
DFrye333/DynamicMaze
aefc751f67c39d86a8efd747260366f86f42b5c3
[ "MIT" ]
null
null
null
utility.py
DFrye333/DynamicMaze
aefc751f67c39d86a8efd747260366f86f42b5c3
[ "MIT" ]
null
null
null
utility.py
DFrye333/DynamicMaze
aefc751f67c39d86a8efd747260366f86f42b5c3
[ "MIT" ]
null
null
null
''' Module: utility Author: David Frye Description: Contains a variety of helper Classes. ''' import enum import random class Direction(enum.Enum): ''' Enum: Direction Description: Represents the four primary cardinal directions (North, East, South, and West) ''' NORTH = 0 EAST = 1 SOUTH = 2 WEST = 3 def ge...
27.609375
95
0.744765
import enum import random class Direction(enum.Enum): NORTH = 0 EAST = 1 SOUTH = 2 WEST = 3 def get_random(): return Direction(random.randint(0, 3)) def get_opposite(direction): return Direction((direction.value + 2) % 4) def get_next_clockwise(direction): return Direction((direction.value + 1) % 4...
true
true
f745822e65bfbe7fdb714bbbf2cb96f009608efc
1,716
py
Python
tensorforce/core/baselines/cnn_baseline.py
philipshurpik/tensorforce
0a30b4a4171fd279fc48a539d74dbd3153aafd9d
[ "Apache-2.0" ]
2
2021-11-14T12:28:24.000Z
2022-02-14T19:23:51.000Z
tensorforce/core/baselines/cnn_baseline.py
philipshurpik/tensorforce
0a30b4a4171fd279fc48a539d74dbd3153aafd9d
[ "Apache-2.0" ]
null
null
null
tensorforce/core/baselines/cnn_baseline.py
philipshurpik/tensorforce
0a30b4a4171fd279fc48a539d74dbd3153aafd9d
[ "Apache-2.0" ]
3
2021-03-04T17:26:43.000Z
2021-03-04T17:27:10.000Z
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.020408
102
0.667832
from __future__ import absolute_import from __future__ import print_function from __future__ import division from tensorforce.core.baselines import NetworkBaseline class CNNBaseline(NetworkBaseline): def __init__(self, conv_sizes, dense_sizes, scope='cnn-baseline', summary_labels=()): ne...
true
true
f7458245c2b01611137d23ff7826716abd4a3ebb
21,300
py
Python
legacy/src/EvoNN.py
Payuing/evoDNN
79b727d5062a27d3f8e95f175c509613f52e58aa
[ "MIT" ]
null
null
null
legacy/src/EvoNN.py
Payuing/evoDNN
79b727d5062a27d3f8e95f175c509613f52e58aa
[ "MIT" ]
null
null
null
legacy/src/EvoNN.py
Payuing/evoDNN
79b727d5062a27d3f8e95f175c509613f52e58aa
[ "MIT" ]
null
null
null
""" A module to implement the evolutionary algorithm for a feedforward neural network. Crossover and mutation """ from __future__ import absolute_import from __future__ import print_function import sys import math import csv import warnings import numpy as np import random import copy from datetime impo...
42.094862
176
0.691174
from __future__ import absolute_import from __future__ import print_function import sys import math import csv import warnings import numpy as np import random import copy from datetime import datetime warnings.filterwarnings("ignore") sys.path.append("/Users/Payu/Desktop/EvoNN_package/EvoNN_DNN") NUM_L...
true
true
f7458296b42991a6e37b5174ddc9f7ac51ed81c7
764
py
Python
ddtrace/contrib/aiopg/__init__.py
KDWSS/dd-trace-py
6d859bec403347f7c1e7efd039210908b562741e
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/aiopg/__init__.py
KDWSS/dd-trace-py
6d859bec403347f7c1e7efd039210908b562741e
[ "Apache-2.0", "BSD-3-Clause" ]
9
2021-07-26T01:22:38.000Z
2022-03-21T19:20:53.000Z
ddtrace/contrib/aiopg/__init__.py
KDWSS/dd-trace-py
6d859bec403347f7c1e7efd039210908b562741e
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-08-03T12:41:49.000Z
2021-08-03T12:41:49.000Z
""" Instrument aiopg to report a span for each executed Postgres queries:: from ddtrace import Pin, patch import aiopg # If not patched yet, you can patch aiopg specifically patch(aiopg=True) # This will report a span with the default settings async with aiopg.connect(DSN) as db: with...
27.285714
70
0.693717
from ...utils.importlib import require_modules required_modules = ["aiopg"] with require_modules(required_modules) as missing_modules: if not missing_modules: from .patch import patch __all__ = ["patch"]
true
true
f74583b01fe4bd95d2d76464213f5471947781ad
1,013
py
Python
aoc/year2021/day13/day13.py
Godsmith/adventofcode
3c59ea66830f82b63881e0ea19bfe3076f2a500d
[ "Unlicense" ]
null
null
null
aoc/year2021/day13/day13.py
Godsmith/adventofcode
3c59ea66830f82b63881e0ea19bfe3076f2a500d
[ "Unlicense" ]
null
null
null
aoc/year2021/day13/day13.py
Godsmith/adventofcode
3c59ea66830f82b63881e0ea19bfe3076f2a500d
[ "Unlicense" ]
null
null
null
from dataclasses import dataclass from functools import reduce from parse import findall from aocd import get_data @dataclass class Fold: x_or_y: str value: int def fold(self, coordinates): return {self._transform(x, y) for x, y in coordinates} def _transform(self, x, y): if self.x_...
28.942857
86
0.6308
from dataclasses import dataclass from functools import reduce from parse import findall from aocd import get_data @dataclass class Fold: x_or_y: str value: int def fold(self, coordinates): return {self._transform(x, y) for x, y in coordinates} def _transform(self, x, y): if self.x_...
true
true
f74584c44862caea53bd0ca8644859935ed5c5a8
4,445
py
Python
ezeeai/core/explainer.py
jmarine/ezeeai
091b4ce3bc5794c534084bff3301b15ba8a9be1a
[ "Apache-2.0" ]
19
2019-06-12T03:14:59.000Z
2021-05-31T16:02:53.000Z
ezeeai/core/explainer.py
jmarine/ezeeai
091b4ce3bc5794c534084bff3301b15ba8a9be1a
[ "Apache-2.0" ]
29
2019-06-27T10:15:38.000Z
2022-03-11T23:46:36.000Z
ezeeai/core/explainer.py
jmarine/ezeeai
091b4ce3bc5794c534084bff3301b15ba8a9be1a
[ "Apache-2.0" ]
10
2019-05-14T17:45:44.000Z
2020-08-26T13:25:04.000Z
from lime import lime_tabular, lime_image from scipy.misc import imresize import numpy as np import tensorflow as tf class TabularExplainer: def __init__(self, dataset, verbose=True): train_dataset, training_labels = dataset.make_numpy_array(dataset.get_train_file()) mode = dataset.get_mode() ...
47.795699
112
0.575253
from lime import lime_tabular, lime_image from scipy.misc import imresize import numpy as np import tensorflow as tf class TabularExplainer: def __init__(self, dataset, verbose=True): train_dataset, training_labels = dataset.make_numpy_array(dataset.get_train_file()) mode = dataset.get_mode() ...
true
true
f7458534f701392c1a444446f2da12e4651274fd
4,348
py
Python
composer/models/resnets.py
murthyn/composer
2a04cf387dd8558556500f7ef2bc6d3d131043d5
[ "Apache-2.0" ]
null
null
null
composer/models/resnets.py
murthyn/composer
2a04cf387dd8558556500f7ef2bc6d3d131043d5
[ "Apache-2.0" ]
null
null
null
composer/models/resnets.py
murthyn/composer
2a04cf387dd8558556500f7ef2bc6d3d131043d5
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. """The CIFAR ResNet torch module. See the :doc:`Model Card </model_cards/resnet>` for more details. """ # Code below adapted from https://github.com/facebookresearch/open_lth # and https://github.com/pytorch/vision from typing import List, Tuple import torch import t...
35.639344
104
0.608326
from typing import List, Tuple import torch import torch.nn as nn import torch.nn.functional as F from composer.models import Initializer __all__ = ["CIFAR_ResNet"] class CIFAR_ResNet(nn.Module): class Block(nn.Module): def __init__(self, f_in: int, f_out: int, downsample: bool = False): ...
true
true
f74585554fdf06104b6776fbdf41a0b17bc71777
7,817
py
Python
src/bindings/python/tests/test_ngraph/test_core.py
evgeniya-egupova/openvino
4b8d6c59e3444ecdc549bfdf357d19d625479b89
[ "Apache-2.0" ]
null
null
null
src/bindings/python/tests/test_ngraph/test_core.py
evgeniya-egupova/openvino
4b8d6c59e3444ecdc549bfdf357d19d625479b89
[ "Apache-2.0" ]
44
2020-11-18T10:49:27.000Z
2022-03-28T13:18:44.000Z
src/bindings/python/tests/test_ngraph/test_core.py
rkazants/openvino
a9a583eb42d43322b39b95b164b5b22c4f341111
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np import openvino.runtime.opset8 as ov from openvino.runtime.impl import Dimension, Function, PartialShape, Shape def test_dimension(): dim = Dimension() assert dim.is_dynamic assert not dim.is_static ...
29.722433
86
0.643469
import numpy as np import openvino.runtime.opset8 as ov from openvino.runtime.impl import Dimension, Function, PartialShape, Shape def test_dimension(): dim = Dimension() assert dim.is_dynamic assert not dim.is_static assert repr(dim) == "<Dimension: ?>" dim = Dimension.dynamic() assert d...
true
true
f74586a9a2e957cdc6a027edd7f741dc21f08c31
95
py
Python
helli5/contextprocessor.py
TheMn/internet-engineering-project
e41536552feff6f806ba099922df95e89da5bd31
[ "Apache-2.0" ]
7
2019-10-19T12:58:11.000Z
2020-11-05T07:02:17.000Z
helli5/contextprocessor.py
TheMn/internet-engineering-project
e41536552feff6f806ba099922df95e89da5bd31
[ "Apache-2.0" ]
35
2019-12-06T16:31:07.000Z
2022-03-12T00:56:35.000Z
helli5/contextprocessor.py
TheMn/internet-engineering-project
e41536552feff6f806ba099922df95e89da5bd31
[ "Apache-2.0" ]
1
2019-10-18T19:07:04.000Z
2019-10-18T19:07:04.000Z
from datetime import datetime def time_now(request): return {'time_now': datetime.now()}
15.833333
39
0.726316
from datetime import datetime def time_now(request): return {'time_now': datetime.now()}
true
true
f74586b65340aa36380793a1f23bd094d287cf09
64
py
Python
src/greenbudget/app/fringe/__init__.py
nickmflorin/django-proper-architecture-testing
da7c4019697e85f921695144375d2f548f1e98ad
[ "MIT" ]
null
null
null
src/greenbudget/app/fringe/__init__.py
nickmflorin/django-proper-architecture-testing
da7c4019697e85f921695144375d2f548f1e98ad
[ "MIT" ]
null
null
null
src/greenbudget/app/fringe/__init__.py
nickmflorin/django-proper-architecture-testing
da7c4019697e85f921695144375d2f548f1e98ad
[ "MIT" ]
null
null
null
default_app_config = 'greenbudget.app.fringe.apps.FringeConfig'
32
63
0.84375
default_app_config = 'greenbudget.app.fringe.apps.FringeConfig'
true
true
f74586fec08c6cb18fc3718d999cf795bfc6bd41
4,015
py
Python
control/base.py
majkee15/HiddenMarkovJumpProcess-RLEnvironment
730ef636bfa51f6137268ab7760f9a504ba583db
[ "MIT" ]
null
null
null
control/base.py
majkee15/HiddenMarkovJumpProcess-RLEnvironment
730ef636bfa51f6137268ab7760f9a504ba583db
[ "MIT" ]
null
null
null
control/base.py
majkee15/HiddenMarkovJumpProcess-RLEnvironment
730ef636bfa51f6137268ab7760f9a504ba583db
[ "MIT" ]
null
null
null
import os import logging import datetime import numpy as np import tensorflow as tf from gym.spaces import Box, Discrete from gym.utils import colorize from control.utils.misc import Config from control.utils.misc import REPO_ROOT, RESOURCE_ROOT from abc import ABC, abstractmethod class TrainConfigBase(Config):...
27.128378
115
0.625156
import os import logging import datetime import numpy as np import tensorflow as tf from gym.spaces import Box, Discrete from gym.utils import colorize from control.utils.misc import Config from control.utils.misc import REPO_ROOT, RESOURCE_ROOT from abc import ABC, abstractmethod class TrainConfigBase(Config):...
true
true
f74587955cf3c7c946f58e91763dcf1423875e36
13,578
py
Python
test/test_ops_jit.py
tenpercent/pytorch
7f996b855c5070ab4a6bea0f451c8a22c0ce2394
[ "Intel" ]
1
2022-03-29T00:44:31.000Z
2022-03-29T00:44:31.000Z
test/test_ops_jit.py
tenpercent/pytorch
7f996b855c5070ab4a6bea0f451c8a22c0ce2394
[ "Intel" ]
null
null
null
test/test_ops_jit.py
tenpercent/pytorch
7f996b855c5070ab4a6bea0f451c8a22c0ce2394
[ "Intel" ]
1
2022-03-28T21:49:41.000Z
2022-03-28T21:49:41.000Z
# Owner(s): ["module: unknown"] from functools import partial import torch from torch.testing import FileCheck from torch.testing._internal.common_utils import \ (run_tests, IS_SANDCASTLE, clone_input_helper, first_sample) from torch.testing._internal.common_methods_invocations import op_db from torch.testing._i...
48.320285
132
0.560024
from functools import partial import torch from torch.testing import FileCheck from torch.testing._internal.common_utils import \ (run_tests, IS_SANDCASTLE, clone_input_helper, first_sample) from torch.testing._internal.common_methods_invocations import op_db from torch.testing._internal.common_device_type impo...
true
true
f74587ad72d7181d0a60eca882d2765db3f99b2d
1,201
py
Python
src/DocClustering/data/document.py
jd-s/DocClustering
a7d4acff8464f960558cf9cc6d03de78d07d56bf
[ "Apache-2.0" ]
null
null
null
src/DocClustering/data/document.py
jd-s/DocClustering
a7d4acff8464f960558cf9cc6d03de78d07d56bf
[ "Apache-2.0" ]
null
null
null
src/DocClustering/data/document.py
jd-s/DocClustering
a7d4acff8464f960558cf9cc6d03de78d07d56bf
[ "Apache-2.0" ]
null
null
null
# Helper class that stores all relevant information of a document class document: def __init__(self, id, externalid=0, title="", author="", publishingYear=0, journal="", terms=[], uri="" ): self.id = id self.externalid = externalid self.title = title self.author = author sel...
26.688889
111
0.605329
class document: def __init__(self, id, externalid=0, title="", author="", publishingYear=0, journal="", terms=[], uri="" ): self.id = id self.externalid = externalid self.title = title self.author = author self.publishingYear = str(publishingYear).strip() self.journ...
true
true
f745882b7fa076b31cfecf66c9b6f8b109221cd1
1,962
py
Python
download_all_fx_data.py
feilongbk/FX-1-Minute-Data
83bd7eaef0dee7221e8acfa980ce180571b6ffce
[ "Apache-2.0" ]
326
2017-05-22T07:03:36.000Z
2022-03-31T21:57:21.000Z
download_all_fx_data.py
feilongbk/FX-1-Minute-Data
83bd7eaef0dee7221e8acfa980ce180571b6ffce
[ "Apache-2.0" ]
9
2017-12-15T10:30:17.000Z
2021-06-10T01:07:34.000Z
download_all_fx_data.py
feilongbk/FX-1-Minute-Data
83bd7eaef0dee7221e8acfa980ce180571b6ffce
[ "Apache-2.0" ]
140
2017-08-07T17:20:48.000Z
2022-03-29T19:46:23.000Z
import csv import os from histdata.api import download_hist_data def mkdir_p(path): import errno try: os.makedirs(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def download_all(): with open('pairs....
36.333333
85
0.445464
import csv import os from histdata.api import download_hist_data def mkdir_p(path): import errno try: os.makedirs(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def download_all(): with open('pairs....
true
true
f745897e4c8d34c7039d8c180efdb79da56c845d
232
py
Python
rest_framework_simplejwt/__init__.py
Alig1493/django-rest-framework-simplejwt
aaebe1aa453da392dff44690760b50cd2a10c6d1
[ "BSD-2-Clause", "MIT" ]
null
null
null
rest_framework_simplejwt/__init__.py
Alig1493/django-rest-framework-simplejwt
aaebe1aa453da392dff44690760b50cd2a10c6d1
[ "BSD-2-Clause", "MIT" ]
null
null
null
rest_framework_simplejwt/__init__.py
Alig1493/django-rest-framework-simplejwt
aaebe1aa453da392dff44690760b50cd2a10c6d1
[ "BSD-2-Clause", "MIT" ]
null
null
null
from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution("django-rest-framework-simplejwt").version except DistributionNotFound: # package is not installed __version__ = None
29
77
0.801724
from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution("django-rest-framework-simplejwt").version except DistributionNotFound: __version__ = None
true
true
f74589a41c15eec76623b27d04ad44dff7a510ed
630
py
Python
src/manage.py
AVRC26/blog-ui
fbecbf6f20f3df3da525e9c7963269cd5f4e8e65
[ "Apache-2.0" ]
null
null
null
src/manage.py
AVRC26/blog-ui
fbecbf6f20f3df3da525e9c7963269cd5f4e8e65
[ "Apache-2.0" ]
null
null
null
src/manage.py
AVRC26/blog-ui
fbecbf6f20f3df3da525e9c7963269cd5f4e8e65
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lllorigins.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Imp...
28.636364
74
0.684127
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lllorigins.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f7458a0fd5b4b626e4e84f3de4fa62431c2a0cf6
1,731
py
Python
Client-Python/client.py
iao113/transfer
45dcfbe3f5d98bc9fba873f005c6774ce5b53a68
[ "Apache-2.0" ]
null
null
null
Client-Python/client.py
iao113/transfer
45dcfbe3f5d98bc9fba873f005c6774ce5b53a68
[ "Apache-2.0" ]
null
null
null
Client-Python/client.py
iao113/transfer
45dcfbe3f5d98bc9fba873f005c6774ce5b53a68
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import socket from collections import namedtuple from enum import Enum, unique HeadTerm = namedtuple('HeadTerm', ['index', 'value']) @unique class Header(Enum): FILE_NAME = HeadTerm(index=0, value=0x80) FILE_SIZE = HeadTerm(index=0, value=0x40) FILE_CONTEXT = HeadTerm(in...
29.844828
105
0.650491
import os import socket from collections import namedtuple from enum import Enum, unique HeadTerm = namedtuple('HeadTerm', ['index', 'value']) @unique class Header(Enum): FILE_NAME = HeadTerm(index=0, value=0x80) FILE_SIZE = HeadTerm(index=0, value=0x40) FILE_CONTEXT = HeadTerm(index=0, value=0x20) de...
true
true
f7458ac7dade2736ba8d98e756a586fa9ab182a0
4,381
py
Python
test/functional/p2p_invalid_block.py
brewhaus2/Placeholders-X16R
8757eef1a0596df490be28a0f259ab26597ac851
[ "MIT" ]
23
2018-12-18T16:46:37.000Z
2022-01-03T23:11:09.000Z
test/functional/p2p_invalid_block.py
brewhaus2/Placeholders-X16R
8757eef1a0596df490be28a0f259ab26597ac851
[ "MIT" ]
1
2018-12-15T19:08:42.000Z
2018-12-15T19:09:35.000Z
test/functional/p2p_invalid_block.py
brewhaus2/Placeholders-X16R
8757eef1a0596df490be28a0f259ab26597ac851
[ "MIT" ]
11
2018-12-12T05:45:24.000Z
2021-04-23T03:07:21.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The Placeholder Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid blocks. In th...
37.127119
100
0.656928
from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, TestInstance, RejectResult from test_framework.blocktools import * import copy import time class InvalidBlockRequestTest(ComparisonTestFramework): def set_tes...
true
true
f7458afa231760bd28289b63d729c53a162ad8d7
7,942
py
Python
postprocessing/collectPostOutputGSweep.py
JoshMend/prebotc-graph-model
4002e51ab965be366b30c2a6d900ac288fa41245
[ "BSD-3-Clause" ]
null
null
null
postprocessing/collectPostOutputGSweep.py
JoshMend/prebotc-graph-model
4002e51ab965be366b30c2a6d900ac288fa41245
[ "BSD-3-Clause" ]
null
null
null
postprocessing/collectPostOutputGSweep.py
JoshMend/prebotc-graph-model
4002e51ab965be366b30c2a6d900ac288fa41245
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ collectPostOutputGSweep.py collect output from different runs & reps into single data structures to be used with the newer sweeps across gE, gI """ import sys import os import numpy as np import scipy.io import matplotlib.pyplot as plt import progressbar import pandas as pd #### config here...
38.931373
80
0.584739
""" collectPostOutputGSweep.py collect output from different runs & reps into single data structures to be used with the newer sweeps across gE, gI """ import sys import os import numpy as np import scipy.io import matplotlib.pyplot as plt import progressbar import pandas as pd ath.join(os.environ['HOME'], 'work', ...
false
true
f7458b00348cac441eb8387b8d6c77968cbe34a2
2,474
py
Python
Spyder/Ejercicios/Comparacion medias.py
AlexPC23/Python
77689d74c5444faa1aa253a122602307e52ac581
[ "Apache-2.0" ]
null
null
null
Spyder/Ejercicios/Comparacion medias.py
AlexPC23/Python
77689d74c5444faa1aa253a122602307e52ac581
[ "Apache-2.0" ]
null
null
null
Spyder/Ejercicios/Comparacion medias.py
AlexPC23/Python
77689d74c5444faa1aa253a122602307e52ac581
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Dec 6 19:54:52 2021 @author: Alex """ import os #sistema operativo import pandas as pd #gestionar datframes import numpy as np #numeric python (vectores, matrices,...) import matplotlib.py...
34.84507
101
0.671382
import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import scipy.stats as stats import seaborn as sns os.chdir('C:/Programacion Estadistica PEP...
true
true
f7458bcb1e64294e6ca55970c086596d20e0fedc
1,272
py
Python
day04/d04.py
jcisio/adventofcode2021
280e88b636e07772b3793b88d3298586661166e6
[ "MIT" ]
null
null
null
day04/d04.py
jcisio/adventofcode2021
280e88b636e07772b3793b88d3298586661166e6
[ "MIT" ]
null
null
null
day04/d04.py
jcisio/adventofcode2021
280e88b636e07772b3793b88d3298586661166e6
[ "MIT" ]
null
null
null
f = open('d04.in', 'r') def calculateScore(card, number): for i in range(5): if sum(card[i::5]) == -5 or sum(card[i*5:i*5+5]) == -5: return sum([x for x in card if x != -1]) * number return -1 def calculateFinalScore(cards, number): for card in cards: score = calculateScore(ca...
31.8
92
0.587264
f = open('d04.in', 'r') def calculateScore(card, number): for i in range(5): if sum(card[i::5]) == -5 or sum(card[i*5:i*5+5]) == -5: return sum([x for x in card if x != -1]) * number return -1 def calculateFinalScore(cards, number): for card in cards: score = calculateScore(ca...
true
true
f7458c3036734e4bb6e554097029270e11912a3a
4,528
py
Python
deploy/pdserving/ocr_local_server.py
happog/PaddleOCR
597bd9bf7e160e525dadaa3e519379ec9cc69669
[ "Apache-2.0" ]
21
2020-12-01T14:00:40.000Z
2022-03-29T03:26:10.000Z
deploy/pdserving/ocr_local_server.py
wangxinxin08/PaddleOCR
5ed1e2427b4e1759f0e9278f453e8d497db33b59
[ "Apache-2.0" ]
3
2021-04-28T09:22:27.000Z
2022-01-05T11:16:40.000Z
deploy/pdserving/ocr_local_server.py
wangxinxin08/PaddleOCR
5ed1e2427b4e1759f0e9278f453e8d497db33b59
[ "Apache-2.0" ]
4
2021-02-26T08:53:16.000Z
2021-12-11T08:17:48.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
39.719298
97
0.651943
from paddle_serving_client import Client from paddle_serving_app.reader import OCRReader import cv2 import sys import numpy as np import os from paddle_serving_client import Client from paddle_serving_app.reader import Sequential, URL2Image, ResizeByFactor from paddle_serving_app.reader import Div, Normal...
true
true
f7458c30cc2fa802624a2a70a9422c6c7e9ff1a0
351
py
Python
BioNetGen-2.3.0/source_Atomizer/stats/wordcloud.py
joseph-hellerstein/RuleBasedProgramming
fb88118ab764035979dc7c2bf8c89a7b484e4472
[ "MIT" ]
null
null
null
BioNetGen-2.3.0/source_Atomizer/stats/wordcloud.py
joseph-hellerstein/RuleBasedProgramming
fb88118ab764035979dc7c2bf8c89a7b484e4472
[ "MIT" ]
null
null
null
BioNetGen-2.3.0/source_Atomizer/stats/wordcloud.py
joseph-hellerstein/RuleBasedProgramming
fb88118ab764035979dc7c2bf8c89a7b484e4472
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Mar 27 18:06:08 2013 @author: proto """ from pytagcloud import create_tag_image, make_tags from pytagcloud.lang.counter import get_tag_counts def cloudText(text,fileName): tags = make_tags(get_tag_counts(text), maxsize=80) create_tag_image(tags, fileName, size=(800,...
23.4
76
0.732194
from pytagcloud import create_tag_image, make_tags from pytagcloud.lang.counter import get_tag_counts def cloudText(text,fileName): tags = make_tags(get_tag_counts(text), maxsize=80) create_tag_image(tags, fileName, size=(800, 600), fontname='Droid Sans')
true
true
f7458c85eb2099a8ad9fec140d062dfd10309958
19,258
py
Python
sdk/python/pulumi_aws/glue/get_script.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
260
2018-06-18T14:57:00.000Z
2022-03-29T11:41:03.000Z
sdk/python/pulumi_aws/glue/get_script.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
1,154
2018-06-19T20:38:20.000Z
2022-03-31T19:48:16.000Z
sdk/python/pulumi_aws/glue/get_script.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
115
2018-06-28T03:20:27.000Z
2022-03-29T11:41:06.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
37.613281
146
0.500571
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = [ 'GetScriptResult', 'AwaitableGetScriptResult', 'get_script', 'get_script_output', ] @pulumi.ou...
true
true
f7458d3d9c43dbaff12d196fdd13b750ee11b4ef
2,357
py
Python
Assignment 0/Part 2 - Getting Familiar with Python/SettingPixels.py
PMARINA/COS-429
25134e77101279c3f9f16a6738beb6170ba1fd09
[ "MIT" ]
null
null
null
Assignment 0/Part 2 - Getting Familiar with Python/SettingPixels.py
PMARINA/COS-429
25134e77101279c3f9f16a6738beb6170ba1fd09
[ "MIT" ]
null
null
null
Assignment 0/Part 2 - Getting Familiar with Python/SettingPixels.py
PMARINA/COS-429
25134e77101279c3f9f16a6738beb6170ba1fd09
[ "MIT" ]
null
null
null
import numpy as np import cv2 import os window_title = "The Input Image" input_image = "input.jpg" output_image = os.path.basename(__file__)[:-len(".py")] + ".jpg" HORIZONTAL = 0 VERTICAL = 1 def read_image(file_name = input_image): img = cv2.imread(file_name) return img def display_image(img,window_title = w...
34.15942
131
0.694103
import numpy as np import cv2 import os window_title = "The Input Image" input_image = "input.jpg" output_image = os.path.basename(__file__)[:-len(".py")] + ".jpg" HORIZONTAL = 0 VERTICAL = 1 def read_image(file_name = input_image): img = cv2.imread(file_name) return img def display_image(img,window_title = w...
true
true
f7458deb730a807b3c7db235ac0eea38dbbc1b53
185
py
Python
CursoEmVideo/107Cev/moeda.py
yazdejesus/FirstLessons-Python
e2c2d75c3aba459669c972a3c959b18ecc82e030
[ "MIT" ]
null
null
null
CursoEmVideo/107Cev/moeda.py
yazdejesus/FirstLessons-Python
e2c2d75c3aba459669c972a3c959b18ecc82e030
[ "MIT" ]
1
2021-01-28T17:06:06.000Z
2021-01-30T15:13:03.000Z
CursoEmVideo/107Cev/moeda.py
yazdejesus/FirstLessons-Python
e2c2d75c3aba459669c972a3c959b18ecc82e030
[ "MIT" ]
null
null
null
def metade(num): return num/2 def dobro(num): return num*2 def aumentar(num, perc): perc /= 100 return num + num*perc def diminuir(num, perc): perc /= 100 return num - num*perc
14.230769
24
0.675676
def metade(num): return num/2 def dobro(num): return num*2 def aumentar(num, perc): perc /= 100 return num + num*perc def diminuir(num, perc): perc /= 100 return num - num*perc
true
true
f7458e0bb7ab25751a418de308df0b366f9dce88
9,777
py
Python
tests/test_0017-multi-basket-multi-branch-fetch.py
raymondEhlers/uproot4
b266614eb3e24d02fa5ed2be4a2d95ab71a5e499
[ "BSD-3-Clause" ]
null
null
null
tests/test_0017-multi-basket-multi-branch-fetch.py
raymondEhlers/uproot4
b266614eb3e24d02fa5ed2be4a2d95ab71a5e499
[ "BSD-3-Clause" ]
null
null
null
tests/test_0017-multi-basket-multi-branch-fetch.py
raymondEhlers/uproot4
b266614eb3e24d02fa5ed2be4a2d95ab71a5e499
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/master/LICENSE from __future__ import absolute_import import sys import json try: from io import StringIO except ImportError: from StringIO import StringIO import numpy import pytest import skhep_testdata import uproot4 import uproot4.i...
25.933687
96
0.495551
from __future__ import absolute_import import sys import json try: from io import StringIO except ImportError: from StringIO import StringIO import numpy import pytest import skhep_testdata import uproot4 import uproot4.interpretation.numerical import uproot4.interpretation.library import uproot4.source.f...
true
true
f7458ed2d11532a6e2b9d851aa289d26ee6e21f0
761
py
Python
newcode/tests/test_helper.py
rchatterjee/nocrack
16523cb3f316a2a4ed147fe23f942b485d27d605
[ "MIT" ]
21
2015-05-12T17:38:07.000Z
2021-01-10T19:54:55.000Z
newcode/tests/test_helper.py
rchatterjee/nocrack
16523cb3f316a2a4ed147fe23f942b485d27d605
[ "MIT" ]
7
2015-08-27T10:57:40.000Z
2020-04-18T08:36:42.000Z
newcode/tests/test_helper.py
rchatterjee/nocrack
16523cb3f316a2a4ed147fe23f942b485d27d605
[ "MIT" ]
14
2015-08-27T10:53:37.000Z
2022-03-24T15:48:47.000Z
import os import sys BASE_DIR = os.getcwd() sys.path.append(BASE_DIR) from helper import random, diff import unittest class TestHelper(unittest.TestCase): def test_random(self): for l in [1, 2, 5, 10, 100]: a = random.randints(0, 1, l) self.assertEqual(len(a), l, "Not returning co...
26.241379
87
0.534823
import os import sys BASE_DIR = os.getcwd() sys.path.append(BASE_DIR) from helper import random, diff import unittest class TestHelper(unittest.TestCase): def test_random(self): for l in [1, 2, 5, 10, 100]: a = random.randints(0, 1, l) self.assertEqual(len(a), l, "Not returning co...
true
true
f74590161ee576b5d83826f1907fa3519d782343
2,144
py
Python
tests/models/symbol/scsi_alias_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/models/symbol/scsi_alias_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/models/symbol/scsi_alias_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions...
56.421053
845
0.76959
import unittest from netapp.santricity.models.symbol.scsi_alias import ScsiAlias class ScsiAliasTest(unittest.TestCase): def test_scsi_alias(self): scsi_alias_obj = ScsiAlias() self.assertNotEqual(scsi_alias_obj, None)
true
true
f745903ecbb955908d5bdc22ef154bdb36c285eb
173
py
Python
configs/cascade_rcnn/ranksort_cascade_rcnn_r50_fpn_1x_coco_lr0009_rpnw06.py
yinchimaoliang/ranksortloss
d2103598448633a108dbda4143ab8c9c3fd515f8
[ "Apache-2.0" ]
210
2021-07-27T01:30:05.000Z
2022-03-29T07:52:35.000Z
configs/cascade_rcnn/ranksort_cascade_rcnn_r50_fpn_1x_coco_lr0009_rpnw06.py
yinchimaoliang/ranksortloss
d2103598448633a108dbda4143ab8c9c3fd515f8
[ "Apache-2.0" ]
12
2021-07-31T06:36:36.000Z
2022-01-04T01:51:29.000Z
configs/cascade_rcnn/ranksort_cascade_rcnn_r50_fpn_1x_coco_lr0009_rpnw06.py
yinchimaoliang/ranksortloss
d2103598448633a108dbda4143ab8c9c3fd515f8
[ "Apache-2.0" ]
23
2021-07-28T01:30:33.000Z
2022-03-03T11:18:56.000Z
_base_ = 'ranksort_cascade_rcnn_r50_fpn_1x_coco.py' model = dict(rpn_head=dict(head_weight=0.60)) optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
34.6
73
0.768786
_base_ = 'ranksort_cascade_rcnn_r50_fpn_1x_coco.py' model = dict(rpn_head=dict(head_weight=0.60)) optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
true
true
f745911e5c38348d5697148e7bcc378ceda7c744
3,362
py
Python
facemask.py
sakshamji/FacemaskDetection
b274285ebaef51c110fab3dc608a2c2ef956ec95
[ "MIT" ]
null
null
null
facemask.py
sakshamji/FacemaskDetection
b274285ebaef51c110fab3dc608a2c2ef956ec95
[ "MIT" ]
null
null
null
facemask.py
sakshamji/FacemaskDetection
b274285ebaef51c110fab3dc608a2c2ef956ec95
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Jul 22 15:56:47 2020 @author: Saksham """ import numpy as np import keras import keras.backend as k from keras.layers import Conv2D,MaxPooling2D,SpatialDropout2D,Flatten,Dropout,Dense from keras.models import Sequential,load_model from keras.optimizers import adam from kera...
30.017857
143
0.692742
import numpy as np import keras import keras.backend as k from keras.layers import Conv2D,MaxPooling2D,SpatialDropout2D,Flatten,Dropout,Dense from keras.models import Sequential,load_model from keras.optimizers import adam from keras.preprocessing import image import cv2 import datetime model=Sequential() mode...
true
true
f745919fcceab783528c441f6f8a6043f6ba7750
678
py
Python
test_is_valid_binary_search_tree.py
kannanParamasivam/practice
f8f476ba5b97dfbe0b673a200c1668dcd9370b04
[ "Apache-2.0" ]
null
null
null
test_is_valid_binary_search_tree.py
kannanParamasivam/practice
f8f476ba5b97dfbe0b673a200c1668dcd9370b04
[ "Apache-2.0" ]
null
null
null
test_is_valid_binary_search_tree.py
kannanParamasivam/practice
f8f476ba5b97dfbe0b673a200c1668dcd9370b04
[ "Apache-2.0" ]
null
null
null
import unittest from typing import List from is_valid_binary_search_tree import Solution, TreeNode class TestSolution(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_isValidBST_when_tree_has_single_node_should_return_true(self): ...
23.37931
75
0.641593
import unittest from typing import List from is_valid_binary_search_tree import Solution, TreeNode class TestSolution(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_isValidBST_when_tree_has_single_node_should_return_true(self): ...
true
true
f74592b6ae400e6f402dd2a85c71abf45e1df7a1
3,839
py
Python
Improving the ANN.py
AjayJohnAlex/ANN
236bc4ca4aaa07038610bc6870578b1f0255da49
[ "MIT" ]
1
2021-05-06T15:05:09.000Z
2021-05-06T15:05:09.000Z
Improving the ANN.py
AjayJohnAlex/ANN
236bc4ca4aaa07038610bc6870578b1f0255da49
[ "MIT" ]
null
null
null
Improving the ANN.py
AjayJohnAlex/ANN
236bc4ca4aaa07038610bc6870578b1f0255da49
[ "MIT" ]
null
null
null
# coding: utf-8 # In[1]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns get_ipython().run_line_magic('matplotlib', 'inline') # In[2]: dataset = pd.read_csv('Churn_Modelling.csv') dataset.head() # In[3]: X = dataset.iloc[:,3:13].values # In[4]: y = dataset.i...
17.773148
89
0.678823
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns get_ipython().run_line_magic('matplotlib', 'inline') dataset = pd.read_csv('Churn_Modelling.csv') dataset.head() X = dataset.iloc[:,3:13].values y = dataset.iloc[:,13].values from sklearn.model_select...
true
true
f74593e5c940d1e7725f5d76b2bde70af39bdf91
2,273
py
Python
docs/source/conf.py
grcasanova/Reticulum
d326df6c5a467bf3af6e9ace2a020849ed3fd0be
[ "MIT" ]
null
null
null
docs/source/conf.py
grcasanova/Reticulum
d326df6c5a467bf3af6e9ace2a020849ed3fd0be
[ "MIT" ]
null
null
null
docs/source/conf.py
grcasanova/Reticulum
d326df6c5a467bf3af6e9ace2a020849ed3fd0be
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.426471
79
0.661681
import os import sys sys.path.insert(0, os.path.abspath('../..')) project = 'Reticulum Network Stack' copyright = '2021, Mark Qvist' author = 'Mark Qvist' release = '0.2.1 beta' extensions = [ 'sphinx.ext.autodoc', ] autodoc_member_order = 'bysource' templates_path = ['_templates']...
true
true
f74594241b62311f3ce32e2350126abb5c5bc41c
202
py
Python
config.py
TheEdu/backups-automation
0aaddb970e84c0327476eef8442c33c11862f2d3
[ "MIT" ]
null
null
null
config.py
TheEdu/backups-automation
0aaddb970e84c0327476eef8442c33c11862f2d3
[ "MIT" ]
null
null
null
config.py
TheEdu/backups-automation
0aaddb970e84c0327476eef8442c33c11862f2d3
[ "MIT" ]
null
null
null
# config.py DATABASE_CONFIG = { 'dialect': 'mysql+mysqlconnector', 'host': 'localhost', 'database': 'database', 'user': 'user', 'password': 'password', 'port': 3306 }
18.363636
39
0.544554
DATABASE_CONFIG = { 'dialect': 'mysql+mysqlconnector', 'host': 'localhost', 'database': 'database', 'user': 'user', 'password': 'password', 'port': 3306 }
true
true
f7459471e4cf38fb155f4a74f9eb11d22f68be73
10,028
py
Python
quicksort/questions.py
Tesla-CEO/Algorithm-Design-and-Analysis
fe1e4520019f37059e9dcdb0f749be0da42caae7
[ "MIT" ]
null
null
null
quicksort/questions.py
Tesla-CEO/Algorithm-Design-and-Analysis
fe1e4520019f37059e9dcdb0f749be0da42caae7
[ "MIT" ]
null
null
null
quicksort/questions.py
Tesla-CEO/Algorithm-Design-and-Analysis
fe1e4520019f37059e9dcdb0f749be0da42caae7
[ "MIT" ]
null
null
null
from typing import List, NoReturn from random import randint def return_rarray(_min=1, _max=10, size=5, duplicates=False) -> List[int]: """ Returns array of random elements [x0, x1, ..., xn] for each element in the range (_min >= x >= _max). Where the number of elements equals parameter -> size. ...
43.038627
119
0.594535
from typing import List, NoReturn from random import randint def return_rarray(_min=1, _max=10, size=5, duplicates=False) -> List[int]: if (duplicates): rv = [] for i in range(size): rv.append(randint(_min, _max)) return rv elif not (duplicates): if not ((m := 1 + _max - _min)...
true
true
f745984e2d1f5c9fd82d233a67b0a78499eeae57
9,663
py
Python
google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/routers/flags.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/routers/flags.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/routers/flags.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
3
2017-07-27T18:44:13.000Z
2020-07-25T17:48:53.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
37.599222
80
0.694505
from googlecloudsdk.api_lib.compute import utils from googlecloudsdk.calliope import arg_parsers from googlecloudsdk.command_lib.compute import completers as compute_completers from googlecloudsdk.command_lib.compute import flags as compute_flags DEFAULT_LIST_FORMAT = """\ table( name, re...
true
true
f74598d7c68cd24742d1198b62b8c325ab9c24cd
26,423
py
Python
events/importer/espoo.py
hamk-uas/TavastiaEventsOld
b808a1418ee89ba1e774c814364e5b55ea4f9a2c
[ "MIT" ]
null
null
null
events/importer/espoo.py
hamk-uas/TavastiaEventsOld
b808a1418ee89ba1e774c814364e5b55ea4f9a2c
[ "MIT" ]
null
null
null
events/importer/espoo.py
hamk-uas/TavastiaEventsOld
b808a1418ee89ba1e774c814364e5b55ea4f9a2c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import re import logging import time from datetime import datetime, timedelta import requests import bleach import dateutil.parser import pytz import requests_cache from django.utils.html import strip_tags from events.models import ( DataSource, Event, Keyword, Place ) from dja...
38.073487
119
0.596412
import re import logging import time from datetime import datetime, timedelta import requests import bleach import dateutil.parser import pytz import requests_cache from django.utils.html import strip_tags from events.models import ( DataSource, Event, Keyword, Place ) from django_orghierarchy.models...
true
true
f74599e4659819d2145375c222dd97d72e8bd303
1,737
py
Python
DataWranglingMongoDB/Lesson3/name.py
napjon/moocs_solution
5c96f43f6cb2ae643f482580446869953a99beb6
[ "MIT" ]
13
2016-04-29T07:21:44.000Z
2021-09-29T03:20:51.000Z
DataWranglingMongoDB/Lesson3/name.py
napjon/moocs_solution
5c96f43f6cb2ae643f482580446869953a99beb6
[ "MIT" ]
1
2017-02-07T07:37:20.000Z
2017-02-19T08:37:17.000Z
DataWranglingMongoDB/Lesson3/name.py
napjon/moocs_solution
5c96f43f6cb2ae643f482580446869953a99beb6
[ "MIT" ]
13
2016-01-25T03:23:57.000Z
2019-10-13T15:29:23.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up. In the previous quiz you recognized that the "name" value can be an array (or list in Python terms). It would make it easier to process and query the da...
28.95
115
0.637306
""" In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up. In the previous quiz you recognized that the "name" value can be an array (or list in Python terms). It would make it easier to process and query the data later, if all values for the name would ...
false
true
f7459bfa4d929b7a937b53849f0610d682c60491
2,325
py
Python
materializationengine/workflows/dummy_workflow.py
seung-lab/MaterializationEngine
b0dbda304db3f90c3e619edace6328dcf1b33f94
[ "MIT" ]
null
null
null
materializationengine/workflows/dummy_workflow.py
seung-lab/MaterializationEngine
b0dbda304db3f90c3e619edace6328dcf1b33f94
[ "MIT" ]
14
2021-05-28T00:05:37.000Z
2022-03-22T18:37:27.000Z
materializationengine/workflows/dummy_workflow.py
seung-lab/MaterializationEngine
b0dbda304db3f90c3e619edace6328dcf1b33f94
[ "MIT" ]
null
null
null
import time from celery import chain, chord from celery.utils.log import get_task_logger from materializationengine.celery_init import celery from materializationengine.shared_tasks import fin celery_logger = get_task_logger(__name__) @celery.task(name="process:start_test_workflow") def start_test_workflow(iterator...
26.724138
86
0.630538
import time from celery import chain, chord from celery.utils.log import get_task_logger from materializationengine.celery_init import celery from materializationengine.shared_tasks import fin celery_logger = get_task_logger(__name__) @celery.task(name="process:start_test_workflow") def start_test_workflow(iterator...
true
true
f7459cfe6074d7b225034ace38083d44b226c8a4
449
py
Python
jetbrains-academy/Numeric Matrix Processor/Problems/Piggy bank/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
null
null
null
jetbrains-academy/Numeric Matrix Processor/Problems/Piggy bank/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
null
null
null
jetbrains-academy/Numeric Matrix Processor/Problems/Piggy bank/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
null
null
null
class PiggyBank: # create __init__ and add_money methods def __init__(self, dollars, cents): self.dollars = dollars self.cents = cents def add_money(self, deposit_dollars, deposit_cents): self.dollars += deposit_dollars self.cents += deposit_cents if self.cents >= 10...
32.071429
56
0.616927
class PiggyBank: def __init__(self, dollars, cents): self.dollars = dollars self.cents = cents def add_money(self, deposit_dollars, deposit_cents): self.dollars += deposit_dollars self.cents += deposit_cents if self.cents >= 100: to_dollar = int(self.cen...
true
true
f7459d25fd7b1e2cce706d7503fd1caacff6c2d3
16,966
py
Python
cgat/tools/bam2wiggle.py
cgat-developers/cgat-apps
4de381418e80cfd085b17fc8a3048a48f55e57cf
[ "BSD-2-Clause", "MIT" ]
19
2018-09-07T11:32:49.000Z
2021-08-24T01:39:37.000Z
cgat/tools/bam2wiggle.py
cgat-developers/cgat-apps
4de381418e80cfd085b17fc8a3048a48f55e57cf
[ "BSD-2-Clause", "MIT" ]
55
2018-04-05T15:26:41.000Z
2022-03-17T09:27:43.000Z
cgat/tools/bam2wiggle.py
cgat-developers/cgat-apps
4de381418e80cfd085b17fc8a3048a48f55e57cf
[ "BSD-2-Clause", "MIT" ]
12
2018-02-11T20:07:03.000Z
2021-04-07T04:50:12.000Z
"""bam2wiggle.py - convert bam to wig/bigwig file ============================================== :Tags: Genomics NGS Intervals Conversion BAM WIGGLE BIGWIG BEDGRAPH Purpose ------- convert a bam file to a bigwig or bedgraph file. Depending on options chosen, this script either computes the densities itself or makes...
36.17484
88
0.545562
import os import sys import tempfile import shutil import subprocess import cgatcore.experiment as E import pysam import cgatcore.iotools as iotools from cgat.BamTools.bamtools import merge_pairs class SpanWriter(object): def __init__(self, span): self.span = span self.laststart = 0 sel...
true
true
f7459dd9070c8898f768605d0a670f18c376fd61
17,023
py
Python
build/android/run_tests.py
leiferikb/bitpop-private
4c967307d228e86f07f2576068a169e846c833ca
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-11-15T15:17:43.000Z
2021-11-15T15:17:43.000Z
build/android/run_tests.py
houseoflifeproperty/bitpop-private
4c967307d228e86f07f2576068a169e846c833ca
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
build/android/run_tests.py
houseoflifeproperty/bitpop-private
4c967307d228e86f07f2576068a169e846c833ca
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T07:24:02.000Z
2020-11-04T07:24:02.000Z
#!/usr/bin/env python # # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs all the native unit tests. 1. Copy over test binary to /data/local on device. 2. Resources: chrome/unit_tests requires r...
35.464583
80
0.654702
"""Runs all the native unit tests. 1. Copy over test binary to /data/local on device. 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) to be deployed to the device. We use the device's $EXTERNAL_STORAGE as the base dir (which maps to Context.getExternalFilesDir()). 3. Environme...
false
true
f7459df24059d2013a6f67fb04115a680542aa8c
20,107
py
Python
test/test_datetime.py
nehaljwani/orjson
669e4a269023b222a1f0ffa572947b37d06415a3
[ "Apache-2.0", "MIT" ]
3,041
2018-11-26T08:15:46.000Z
2022-03-31T22:14:51.000Z
test/test_datetime.py
brandery/orjson
02d6805af278493f657c17305a2f0cc054f04078
[ "Apache-2.0", "MIT" ]
240
2018-11-25T20:01:02.000Z
2022-03-31T19:48:08.000Z
test/test_datetime.py
brandery/orjson
02d6805af278493f657c17305a2f0cc054f04078
[ "Apache-2.0", "MIT" ]
145
2018-12-20T08:54:32.000Z
2022-03-30T06:17:47.000Z
# SPDX-License-Identifier: (Apache-2.0 OR MIT) import datetime import sys import unittest import pytest import pytz from dateutil import tz import orjson try: import pendulum except ImportError: pendulum = None # type: ignore if sys.version_info >= (3, 9): import zoneinfo class DatetimeTests(unittes...
28.765379
88
0.440145
import datetime import sys import unittest import pytest import pytz from dateutil import tz import orjson try: import pendulum except ImportError: pendulum = None if sys.version_info >= (3, 9): import zoneinfo class DatetimeTests(unittest.TestCase): def test_datetime_naive(self): self...
true
true