blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e5d481fa4e6e7c59bd315d386241985c3ddbaa0a | 59595f47c8b6d463b4ed044a75dd0cf6487c799a | /src/main.py | f973787fd168be00a5ac7e3cc2381ba459d21bb7 | [] | no_license | AKKamath/Similarity-Computation | 1e0ddb083ffb140b93df9ca7800242ea146fbf98 | bc3c4755bccf18b99ed93530b87ccbc6dc336217 | refs/heads/master | 2020-04-02T02:05:05.107560 | 2018-10-27T14:09:09 | 2018-10-27T14:09:09 | 153,890,548 | 0 | 0 | null | 2018-10-27T14:09:10 | 2018-10-20T09:37:10 | Python | UTF-8 | Python | false | false | 2,732 | py | main.py | #!/usr/bin/env python
from algorithms import *
import csv
class data:
def __init__(self):
self.rowSize = 0
self.binaryType = True
self.headerRow = []
self.data = {}
def addRow(self, row):
if(self.rowSize == 0):
self.headerRow = row
else:
... |
578c8d61d68a0f5ca0fb312c3002c951cd9fd736 | 9b3ec37c7db8e7bbccc5d94f560a35886c761b1c | /project/api/migrations/versions/ffb1067151e6_club_comp_relation_added.py | a1480b1f79f6621c3834502ee4be3bc4197d3f8d | [] | no_license | utkuzun/odtu_ori | c57b9d925a00953224a7ff0e2b4e7b9a0cb084ec | 2d04caab3b0c8acd9c88da9a479b209678b9de12 | refs/heads/master | 2023-08-29T23:56:56.276233 | 2021-10-22T07:36:27 | 2021-10-22T07:36:27 | 409,946,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,399 | py | ffb1067151e6_club_comp_relation_added.py | """club comp relation added
Revision ID: ffb1067151e6
Revises: d93f00fdc2e3
Create Date: 2021-09-28 11:19:49.136077
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'ffb1067151e6'
down_revision = 'd93f00fdc2e3'
branch_labels ... |
68e5226d114cfd9f69e633d282a50f5324df8bc5 | d98d2f754dbec0c3947902b2e3d2ec52b12fb935 | /bot.py | 439b2917cdf98a863e83aea1ae4c99e68de9207f | [] | no_license | Olamyy/Terrabot | 2d95c33453c0e7de02f9eb90a80456209127ed98 | e736c96faf16f7a58b4ec39d3823fab8722e6702 | refs/heads/master | 2021-01-12T08:36:38.328648 | 2017-01-10T11:58:35 | 2017-01-10T11:58:35 | 76,635,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,492 | py | bot.py | from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer,ChatterBotCorpusTrainer,TwitterTrainer,UbuntuCorpusTrainer
import config
class Bot:
def __init__(self):
self.chatterbot = ChatBot(
name="Terrabot",
storage_adapter="chatterbot.storage.MongoDatabaseAdapter",
... |
33fbb0383583b519a0b65be2a3efec6c85822721 | cec0aed705d00f48b12a188ffe7de8d66c0a110b | /RNN__architecture_and_resulutst/CNN_att_surgery.py | b7b2628d0868cb12154846293d561f328ab2b299 | [] | no_license | NajwaMoursli/AI-based-Gym-Trainer | 5c387c55a7ac4a82e59477ad4ec9325b8e5e84d1 | 434c7718cc05e505c5db099bab58d8543ea9fd53 | refs/heads/master | 2022-09-25T22:11:44.034579 | 2020-06-05T20:29:57 | 2020-06-05T20:29:57 | 269,162,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,356 | py | CNN_att_surgery.py | import sys, os
#import json
#from keras.backend import tensorflow_backend as K
#from keras import Model
#import model_qual
#import data
import glob
from matplotlib import pyplot as plt
from statistics import mean
from math import *
import numpy as np
#from keras.utils import get_custom_objects
import scipy.io as sio
im... |
e2ce902288fbc9265243b2cdc33e4f37f12730c3 | 69d1a0192c736e4a28b268c7526752224f7c65bc | /supervised_learning/0x02-tensorflow/4-calculate_loss.py | 8e546c6209c836c1c9e36c613ab0957bca1b19db | [] | no_license | KoeusIss/holbertonschool-machine_learning | 5755cf2e944b4149e3c61e74f5d2e8be33e095c4 | 2ddae38cc25d914488451b8c30e1234f1fa55ebe | refs/heads/main | 2023-07-08T12:11:02.468770 | 2021-08-10T10:32:48 | 2021-08-10T10:32:48 | 317,158,467 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | 4-calculate_loss.py | #!/usr/bin/env python3
"""Tensorflow module"""
import tensorflow as tf
def calculate_loss(y, y_pred):
"""Calculates the softmax cross-entropy loss of a prediction
Args:
y (tf.placeholder): the labels of the input data
y_pred (tf.Tensor): Is a tensor containing the network's prediction
Re... |
e37214d1a4827dcb7c3d134c45448058434fd977 | 0682d2519f50dfacefcae69693350279c3da45c0 | /demos/file_uploader.py | e1f0c1af205a649416b9d56cbb6b4122bbee092d | [] | no_license | asaini/state-demo | 4f54a3458a850b40c06d67493f879dd4f6ce50d5 | a212d93a7c4b188bac9890964ce42f798413e3f5 | refs/heads/master | 2023-06-03T07:11:04.624622 | 2021-06-25T00:21:31 | 2021-06-25T00:21:31 | 377,949,162 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | file_uploader.py | import streamlit as st
def show():
st.write(
"""
## 💯 File Uploader
Callbacks with File Uploader
"""
)
def uploaded():
st.write('Inside the file uploader callback')
files = st.file_uploader('Upload a file', key='my_file_uploader', on_change=uploaded)
st.... |
192c08bf056f40441d75f20581c1723144a97beb | b8a5b049eae08834079bfdc41bec6bd9109272d9 | /hrpc/hcomm/SConstruct | 077385d654426da9a8b3c7103998dc70502f778e | [] | no_license | highinit/hiaux | bcb1723ec3c1749c76de53fce94e92892092b7f0 | 05b1f7565115c51d480075fa0cec31644dbebad4 | refs/heads/master | 2021-01-21T21:48:16.377093 | 2013-06-03T02:24:17 | 2013-06-03T02:24:17 | 10,445,555 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | SConstruct | import installer
env = Environment()
meroving = StaticLibrary('meroving',
['src/hcomm.cpp',
'src/hcomms.cpp',
'src/common.cpp',
'src/sendchannel.cpp',
'src/objrepr.cpp',
'src/hlog.cpp'])
# create the installer
install = installer.Installer( env )
# adds a library to the installer
#lib = env.Library( your_librar... | |
323e7997f2a60fd0258d6f2e3e89479315a111e2 | 0c3d67eabfbd326d472acd569b9bd3367040428b | /experiment/models/gcn.py | 078c038cbeec4c2f55fb4cfe519d4cfe9bd8dd6f | [
"Apache-2.0"
] | permissive | xkcd1838/bench-DGNN | cfb38ada41a2a8ecbfce6a75c5b208cdf00edb30 | 299fee7dda057c6e9479bcb713afbc1a7c31b16b | refs/heads/master | 2023-08-31T18:28:18.302999 | 2021-10-08T06:53:14 | 2021-10-08T06:53:14 | 376,082,184 | 12 | 2 | null | null | null | null | UTF-8 | Python | false | false | 804 | py | gcn.py | import torch
from torch_geometric.nn import GCNConv
class GCN(torch.nn.Module):
def __init__(self, args, activation):
super().__init__()
self.activation = activation
self.conv1 = GCNConv(args.feats_per_node, args.layer_1_feats, cached=False)
self.conv2 = GCNConv(args.layer_1_feats,... |
9be58c660fe46e51009964577630f462fa2adc03 | 71ba544346ae560c10a6d1b3ea6422ca614dab87 | /aser/utils/logging.py | 7ea42bd2139ea3bcf4736636cae3be2f393138e4 | [
"MIT"
] | permissive | HKUST-KnowComp/ASER | f78f64c46ecf2637a2c138b677728a7efd3af044 | ecf19896ba34dfc8ec06115baccb2cd7e937b662 | refs/heads/master | 2023-08-08T02:32:18.154665 | 2023-07-25T07:23:52 | 2023-07-25T07:23:52 | 184,387,399 | 299 | 34 | MIT | 2022-11-24T05:23:34 | 2019-05-01T08:14:32 | Python | UTF-8 | Python | false | false | 1,055 | py | logging.py | import logging
import os
def init_logger(log_file=""):
""" Initialize a logger
:param log_file: the file path to save logs
:type log_file: str
:return: a logger that binds the console and the file
:rtype: logging.RootLogger
"""
log_format = logging.Formatter("[%(asctime)s %(levelname)s] %... |
4492318f4773bae1b8e657f6f444ebc7ee33b036 | 0ee069bb0751351f36804daf605e45d5cc3cf82e | /setup.py | a282f18d8ac75f43ab83187b59eecc1687b80b53 | [
"MIT"
] | permissive | nicolas-chan-42/COMP-3359-Project-Deep-Q-RL | f75b064010e1227ed571eb4225953f8b999bee1b | 6e9098e6d55b8a813b27efc871f179ffeb2cfa9c | refs/heads/master | 2023-09-02T09:09:21.844399 | 2021-11-13T06:13:39 | 2021-11-13T06:13:39 | 255,833,059 | 0 | 0 | MIT | 2020-05-07T14:06:56 | 2020-04-15T07:03:29 | Python | UTF-8 | Python | false | false | 969 | py | setup.py | from setuptools import setup, find_packages
setup(
name="losing_connect_four",
version="0.1",
description="HKU COMP 3359 Project: "
"A RL agent that cannot win in playing connect four",
licence="MIT",
url="https://github.com/nicolas-chan-42/COMP-3359-Project-Deep-Q-RL",
author="... |
8d29234e1923025b5ee7628a8db8ee93d5e69e50 | 1b22e7303fd693df025c85f4d94b73357ea59aaf | /crypto_fun.py | b6fdac6ec5e7e701596752bcd00a9f2d5274fa5e | [] | no_license | RobinDavid/Python-samples | 925b9057e56cdac205ebcd4189e9da3b5074269d | dd79c201e460c0ba3796e8622d8fb9f5731e033a | refs/heads/master | 2020-05-18T18:55:41.929144 | 2015-11-30T20:24:26 | 2015-11-30T20:24:26 | 5,208,422 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,801 | py | crypto_fun.py | def toList(f):
l = list()
while True:
b = f.read(1)
if b == '':
break
else:
l.append(ord(b))
return l
def countFreq(l): # return list with (decimal_char, occ)
d={}
for elt in l:
if d.has_key(elt):
d[elt] += 1
else:
... |
3f9850ff51ef1d1148f44cfbd548c165da1b0490 | 1a8ac352f0266e952ee1e238482eb32351d277d9 | /src/csv2pg.py | 0e919cfbff5a800ce674efb01b0fb80663ccabc9 | [
"BSD-3-Clause"
] | permissive | shatteringlass/FIRDS-py | 51ac474767ef3e494312a315990b8c03a0cc2299 | ad419e286f6158eb5e41b5ca6176a2b8a9dbcc35 | refs/heads/master | 2020-04-02T22:40:35.840898 | 2018-10-26T13:42:16 | 2018-10-26T13:42:16 | 154,840,669 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,899 | py | csv2pg.py | import os
import sys
def main():
import argparse
parser = argparse.ArgumentParser(description='This tool loads a CSV file to any pgSQL DBMS table.')
requiredNamed = parser.add_argument_group('required named arguments')
requiredNamed.add_argument('--csv', type=str, help='The input CSV file to be loade... |
d51d64792eddad60f8f22a1588a1d71b59f9b22e | a7997050c67d4a203bc0e58f21d4f9fb9d41bf83 | /hope/models.py | b1496a44e119bf8624db99c2f390c9e1dc64d004 | [] | no_license | ddaitest/Hello3 | bc351c6b820f8a291b29104cd7d8e2b1835e95cc | 7f5c0068aba4070577d8fd3ec87775b8b5e7c7b6 | refs/heads/master | 2021-04-30T08:17:58.181937 | 2018-02-18T11:08:20 | 2018-02-18T11:08:20 | 121,370,704 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 823 | py | models.py | import datetime
from django.db import models
from django.utils import timezone
# Create your models here.
class Driver(models.Model):
avatar = models.CharField(max_length=200)
name = models.CharField(max_length=50)
phone = models.CharField(max_length=20)
reg_date = models.DateTimeField('register at')... |
93f2b19213ed4cd329f35444958f55dbaf35d882 | a3c0228b2d786dd625268674ddfe984cd5255245 | /vizapp/viewer/viewer1d.py | 4abdc7741741c28ed27bfee5c05f3e87d6a57a02 | [] | no_license | brechmos-stsci/gvizapp | c1851a828030763d672c51d1f576fb8cc30a8f24 | 9eb11ff4de2ba972e94bc82e8a19f1bc3bae7c9c | refs/heads/master | 2020-05-18T08:23:48.827804 | 2019-05-01T13:58:35 | 2019-05-01T13:58:35 | 184,293,012 | 0 | 1 | null | 2019-05-01T12:29:32 | 2019-04-30T16:07:23 | Python | UTF-8 | Python | false | false | 643 | py | viewer1d.py | import logging
from .simple_bqplot_profile import simple_profile
from .viewer import Viewer
logging.basicConfig(filename='/tmp/vizapp.log',
filemode='a',
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
datefmt='%H:%M:%S',
... |
886ce0f7574780e9594df90ddaa93aa6033ca8fb | 232e95f70f1c356fb38d2bc3c2f3909a14470f8d | /backend/tests/common/test_security.py | 4f73335c4825068f35381db8ff676553754ec5f8 | [] | no_license | escape-char/caboodle | 6bc8c90cb8378b596aef893db4dcc077498c5268 | 8e8a3dbf2d7c62b68bcb9ed0cd529b16a03443d2 | refs/heads/development | 2023-06-29T08:32:13.993033 | 2021-07-28T12:12:36 | 2021-07-28T12:12:36 | 374,770,715 | 0 | 0 | null | 2021-07-28T12:12:37 | 2021-06-07T18:56:27 | Python | UTF-8 | Python | false | false | 5,326 | py | test_security.py | import pytest
from unittest.mock import MagicMock, patch
from typing import Final, List, Optional
from backend.common.security import utils, constants
from backend.common.schema import (
AccessTokenData,
User,
Permission,
Role
)
from backend.settings import settings
from backend.common.utils import min_... |
535747b056e31cd295724529599ab91f0f295368 | 2791d947bb8ee3cd0063d935c17ccb76dcedc3bb | /polly/migrations/0002_auto_20171210_1537.py | 026e9cedbf5bf781e4176569dfc195f4e3792ebe | [] | no_license | meganroytman/polly | b707bff3e364cfdab0f533dbe878b7879dfa9ee8 | a12f850821caebda9b4ad558258e121110099055 | refs/heads/master | 2021-05-14T18:30:47.915266 | 2018-01-02T23:21:57 | 2018-01-02T23:21:57 | 116,067,819 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 724 | py | 0002_auto_20171210_1537.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-10 23:37
from __future__ import unicode_literals
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polly', '0001_initial'),
]
operations = [
... |
eca33d174ef564f004a68080c9db79f99ff28b13 | c769aa3ce648a3b99f254a0dc97fea9a22a2d196 | /0x0F-python-network_0/6-peak.py | 843c338ff10095df9622c3576f2a2d99aa4c1a09 | [] | no_license | JadsyHB/holbertonschool-python | a2f8a30bfcbf1f778329f5c7ee5bfdedbf5807e4 | 4c36228882714e1c60915bb418e10bc57bea4acd | refs/heads/main | 2023-06-13T02:06:54.735319 | 2021-07-07T18:37:39 | 2021-07-07T18:37:39 | 361,547,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 325 | py | 6-peak.py | #!/usr/bin/python3
"""
find peak module
"""
def find_peak(list_of_integers):
"""
returns peak
"""
l = list_of_integers
leng = len(l)
if leng == 0:
return None
max = 0
for i in range(len(l) - 2):
if l[i+1] >= l[i] and l[i+1] >= l[i+2]:
max = l[i+1]
return... |
e9c937ba569895a8973445f6da6a1694398231fc | b89ecd79fc9f300643aee3e40908ca639cda72f3 | /hooks/neutron_ovs_hooks.py | 14e4358626e89ae9047f9d754eb4edceb548652a | [
"Apache-2.0"
] | permissive | openstack/charm-neutron-openvswitch | 9f5ffcffef23914d7096f15fc4f63d268d7e7eb7 | d0731306393840e24e98b52a31977fe16d7aee54 | refs/heads/master | 2023-08-25T04:51:03.583757 | 2023-08-09T00:43:51 | 2023-08-09T00:43:51 | 52,858,841 | 18 | 24 | null | 2018-05-21T07:54:16 | 2016-03-01T07:55:53 | Python | UTF-8 | Python | false | false | 11,827 | py | neutron_ovs_hooks.py | #!/usr/bin/env python3
#
# Copyright 2016 Canonical 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 law o... |
d74cd5461f18ec20c8039f891f6565fadfba2f86 | fa6dc877b8ab1b3fef2b5afbbd6c39c837eca45f | /api_server_django/member/serializers.py | 8b2b09bf5dc6c5e6f6626c51ffd0984266d8e0ce | [
"MIT"
] | permissive | SuperBluestar/ThreadDjango | de273f24b2f3a93f5b825c200104501455797cd5 | 7da428506d4a2739da6e3c45500e4a7ee44d5efc | refs/heads/main | 2023-05-26T09:06:10.826339 | 2021-06-03T19:11:32 | 2021-06-03T19:11:32 | 367,049,973 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 348 | py | serializers.py | from rest_framework import serializers
from . import models
class MemberSerializer(serializers.ModelSerializer):
owner = serializers.HiddenField(
default=serializers.CurrentUserDefault()
)
class Meta:
model = models.Member
fields = ('email', 'nickname', 'role', 'is_active')
# and ... |
1a965ff4ff7cd35b8e04ab9ba47fcbebcb42b43e | 109e91033f44c9aaea92fe1e0145c68845d973fe | /SmoteUpsample.py | af1ad43231052dcaed0fb7b7377b9339f85c6870 | [] | no_license | acdehart/MediML | 465fd2d1961caaf12186c41fd95afff7515e3ba6 | a90aa4c5fa8f4e3bf6085403c701651722485e10 | refs/heads/main | 2023-09-06T09:40:39.359812 | 2021-09-11T23:53:08 | 2021-09-11T23:53:08 | 403,377,925 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 184 | py | SmoteUpsample.py | from imblearn.over_sampling import SMOTE
def SmoteTest(X, y):
sm = SMOTE(sampling_strategy='all', random_state=0)
X_new, y_new = sm.fit_resample(X, y)
return X_new, y_new |
d58bf62374789148adee9cbbb430efb5b872726d | 7596866ba3ed5a86b57f534f78a12333f4dd4406 | /flaskapi.py | ef1f54f90459ba464da93282ca8bb099ac2eae6c | [] | no_license | Arun2985/faceidentification | 421a39e96d1fca0383835db0846267878715b669 | 8c13ddd75ec1564e8375651632c32b07b0552642 | refs/heads/master | 2021-06-18T05:41:56.531248 | 2021-04-21T15:46:09 | 2021-04-21T15:46:09 | 201,412,817 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 251 | py | flaskapi.py | from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=[ 'POST'])
async def hello_world():
if request.method == 'POST':
return 'Hello, World!'
if __name__ == "__main__":
app.run(host="127.0.0.1", port=8000)
|
0863c181f5dbde953a8168e367a03c2242e4d9ae | d3950a5e3bd5c76be0ed55ec103a168743226735 | /calculatrice_1-2.py | a14641717ec7880153ca0c6da5cca5ca4e3cf18f | [] | no_license | RaphDuf/python-project | 7ee1a6b06b7f8446c6c4b46e440a76b5c75c846a | 8b6c2802990efd57b203ddfa7e7f42f30a0e9e34 | refs/heads/master | 2022-11-01T11:20:27.077255 | 2019-10-16T05:26:23 | 2019-10-16T05:26:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | calculatrice_1-2.py | chiffre1 = float(input("Entrer le 1er chiffre du calcul: \n"))
signe = input("Type de calcul: \t \t (+,-,x,÷) \n")
chiffre2 = float(input("Deuxième chiffre du calcul: \n"))
if signe=="+" :
print("Résultat:")
print(chiffre1+chiffre2)
if signe=="-" :
print("Résultat:")
print(chiffre1-chiffre2)
if signe==... |
3bfa4c0bf4f235cbbb01901501203779faaa8859 | a6ea3b13c6c6b11b9cbf6a970a33aa0b13dcfb15 | /holoview/__init__.py | 013e2e6b9e1f478cd17610f332e365c057a8fd57 | [
"MIT"
] | permissive | stelzch/holoview | e78885a049640b924a123c4f2a6e8334ebec01cd | 17b0d7ea1ee87104ced28a49ee1f02b3da49c4c2 | refs/heads/master | 2021-01-22T21:16:57.255508 | 2017-10-28T10:12:50 | 2017-10-28T10:12:50 | 85,406,626 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | __init__.py | """Main Module.
_____ _ _____ _____ _____
| | |___| | | | __|
| | . | | | | | | |__ |
|__|__|___|_|_|_|_|_____|_____|
"""
import gi
import cv2
import logging
import numpy as np
from gi.repository import Gtk, GObject
from holoview.mainwindow import MainWindow
from holoview import log
gi.requir... |
dc849757e15da459015f68566287fdb5f0b8f457 | 27c77cf90726ac1125d4036b4d0f6087e2d991f8 | /03day/0.py | a5720982861705e2989f9b3de0a8799dddf63378 | [] | no_license | jiuwangshiyan/1808 | 74fddbdbf746da58ac0b90ec28963a6868dfae2e | 706aa2a9267c4a0295f85c7018d0d82ad63e96da | refs/heads/master | 2020-03-25T19:34:22.082771 | 2018-08-17T00:35:44 | 2018-08-17T00:35:44 | 144,089,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 60 | py | 0.py | aaaaaadhbsahkfbaskjfbaksfbauiwbdkaaa
oooo
o
o
|
5004682b75933ef7bf7fd0265e04d0229e01b691 | bc6e4aaa8e3b61ce85a35dafc087a449f55e7c76 | /application/key_config.py | 83ccf6d3cccff930e2b7ad22820aa933dc7d2df2 | [] | no_license | asmodeii/tanki | 66ef9896f477f9fef8a30c1a2d2adae95c93279e | 51a2f2ecc09a05672a2c3deb00ab8c273d3b756b | refs/heads/master | 2020-05-15T09:54:57.085554 | 2015-06-07T11:44:45 | 2015-06-07T11:44:45 | 34,812,770 | 0 | 2 | null | 2015-05-31T21:36:20 | 2015-04-29T19:05:01 | Python | UTF-8 | Python | false | false | 3,859 | py | key_config.py | """Key Configuration"""
__author__ = 'Pawel Kalecinski, Tomasz Rzepka'
from application.state import State
import pygame
import sys
from application.configs import CONFIGURATION
from functools import partial
class KeyConfig(State):
"""Settings of Key Configuration"""
def __init__(self, screen, bg_color=(0, 0,... |
e14eaace6c9ba19fa87ccec0375910c9318bf12d | f10bc3709f0f8bedd0d0557a7d5a53448db11482 | /py-base/day02/day02_1.py | 2ae3c87f179e46d5825514a5b7ea8e45664c420a | [] | no_license | DenChyang/pyDemo | 1ce55600d4a36932ad58dc3ad3781c6f422b0e21 | f26c3e4f2b42f9bb6e6a918bbebe8d3229f4353a | refs/heads/master | 2022-10-30T03:12:30.757012 | 2020-01-13T10:06:17 | 2020-01-13T10:06:17 | 227,494,179 | 0 | 1 | null | 2022-10-12T21:34:08 | 2019-12-12T01:27:35 | Python | UTF-8 | Python | false | false | 79 | py | day02_1.py | # 比较运算
age = 11
#if age >=18:
if not age >=18:
print("成年人") |
bcde171df9bd5543326a393fd59e5eb108429d33 | 3ca67d69abd4e74b7145b340cdda65532f90053b | /LeetCode/String/Number of Strings That Appear as Substrings in Word/6047198844.py | 541191210c3304ae4e79df439cf52488117f423b | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 198 | py | 6047198844.py | class Solution:
def numOfStrings(self, patterns: List[str], word: str) -> int:
res = 0
for pattern in patterns:
res += int(word.count(pattern) > 0)
return res |
be5a53e4f11a08aaaaae2f90ab96fa20cfa949bc | 44cc94f9d8bc9285f6cf05903952f764b44c60e8 | /my_ecart/models.py | 43e19a1285f765250674b4832b0497483572178e | [
"MIT"
] | permissive | khushalt/my_ecart | 33e4d5334b733afb649295b17bd3187c212e19d2 | 5b897a0527f425bc2be59563a9d4c865f671bce0 | refs/heads/master | 2022-05-03T04:13:24.205111 | 2020-05-03T14:38:44 | 2020-05-03T14:38:44 | 250,811,508 | 2 | 1 | MIT | 2022-04-22T23:12:59 | 2020-03-28T14:11:27 | Python | UTF-8 | Python | false | false | 3,796 | py | models.py | from django.db import models
# Create your models here.
class User(models.Model):
id = models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')
name = models.CharField(max_length=30)
email = models.CharField(max_length=30)
mobile_no = models.CharField(max_length=30)
... |
cbe6f8837bc9c399a939b659cc3bee791fd7ef7a | 789a1fd8d4feb223fac2426c04848d9265149819 | /D07_SpiralMatrixII.py | c8d20043619bbdbee31e03ba6f07192c27c4d126 | [] | no_license | SantoshKumarSingh64/December-2020-LeetCode-Monthly-Challenge | 7515aeb5ebe3114cea432682bc42322c52475b6b | 5af7eed5bb0ff96c5aa197605c5b1a013b972361 | refs/heads/main | 2023-02-08T15:23:59.755006 | 2020-12-31T12:12:01 | 2020-12-31T12:12:01 | 317,530,263 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,507 | py | D07_SpiralMatrixII.py | '''
Question Description :-
Spiral Matrix II
Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order.
Example 1:
----------------------
| 1 | 2 | 3 |
----------------------
| 8 | 9 | 4 |
------------------... |
0ca118b485fea19123d64a0261d03ced647b14de | a44e8c2abcb587545ba2113ff3af3b2d1814129e | /urls.py | 26c88df3642b4a94fc1abee790e7e6ac3bc1d508 | [] | no_license | SurajHegde/DashKart | da9d3845d31127f95fefdd8ac7a2931aed0ea7c1 | e59377bce8fa876985dfe75f1f491ebb872032d1 | refs/heads/master | 2020-04-28T01:46:35.784932 | 2019-03-14T05:06:24 | 2019-03-14T05:06:24 | 174,871,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 480 | py | urls.py | from django.conf.urls import url,include
from .views import KartView
from .views import UserView
from .views import OTPView
from .views import TokenView
from .views import EntryView,AuthView
app_name = 'dashkart'
urlpatterns = [
url(r'^dashkart/',KartView.as_view()),
url(r'^verifyOTP/',UserView.as_view()),
url(r'^reque... |
a0589c84709b7c5577b27a7294778721717fd42b | b64b01741ecf8f80a5fc7851f78d38094e24864b | /sbs.py | f156a5803b7cce2f0b4803f6718a7cc9cec0a2f0 | [
"MIT"
] | permissive | AWS-Big-Data-Projects/IoT-Data-with-Amazon-Kinesis | 65dd8bede28f6ed4c1d58b592b2d07bf76a21f10 | 13b8342c8586d43bf51e3c5cb136c86ec470d85f | refs/heads/master | 2023-01-02T22:23:57.958734 | 2020-10-29T05:30:56 | 2020-10-29T05:30:56 | 284,426,520 | 11 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,537 | py | sbs.py | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
# Script to generate simulated IoT device parameters data
import json
import random
import datetime
import boto3
import time
deviceNames = ['SBS01', 'SBS02', 'SBS03', 'SBS04', 'SBS05']
iot =... |
a1ba9bec4b97813fc9d94a3eb620893d4e340e7a | 468d178f1cd65a4d72158692e2dc1e00189c7942 | /python-connect/tests.py | 11f425aaf27a29772d2b50d1a5bb811bd1824140 | [] | no_license | remilapeyre/python-connect | 08450b68e92afa4c4c11a416e812771bfd47481b | 3b3908a082a3e9432ea8abc4372c285908f513eb | refs/heads/master | 2020-04-03T21:43:27.656132 | 2018-10-29T23:11:58 | 2018-10-31T15:25:26 | 155,579,512 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,059 | py | tests.py | import requests
import socket
import subprocess
import time
import unittest
from multiprocessing import Process
from . import _main
class Consul:
def __init__(self):
self._consul = subprocess.Popen(
['consul', 'agent', '-dev'],
stdout=subprocess.DEVNULL
)
time.slee... |
f36f741e9b482ce5944a70fbf1cb51b2ea90748f | 2a35752ade027b59772ddb890b1f1b97ac712298 | /app/app.py | 8889dd4e86f5494af65a563781402e26a393358f | [] | no_license | Zirich99/Trentoniana-CSC315-Group9 | 8299a8a675ee04cdea1b4080066e1bbe386a98b7 | 5022f3ce11b71b3ecead709f4f992ca1d00df5b1 | refs/heads/main | 2023-05-01T05:20:50.813400 | 2021-05-08T06:13:54 | 2021-05-08T06:13:54 | 365,407,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,545 | py | app.py | #! /usr/bin/python3
# This is mikes branch
"""
ONE-TIME SETUP
To run this example in the CSC 315 VM you first need to make
the following one-time configuration changes:
# set the postgreSQL password for user 'lion'
sudo -u postgres psql
ALTER USER lion PASSWORD 'lion';
\q
# install pip for Python 3
sudo apt u... |
e42d29da471588d6847f1d26440742beb49260d0 | 85fbf5cfe832ade218b4b6f26decc3b69031419c | /src/Laby_main_upgrade1.py | 3b121083eb53f5f55cad90babbcfde19ae2de66a | [] | no_license | Simsalagrim/laby | 078f4fbc497b41062e0fce04f713edfc346f37b3 | ab7193ba527b25cc2b9e2118db210503de320cf5 | refs/heads/master | 2021-08-15T05:52:43.023643 | 2017-11-17T13:02:06 | 2017-11-17T13:02:06 | 110,572,436 | 0 | 1 | null | 2017-11-17T13:02:07 | 2017-11-13T16:26:25 | Python | UTF-8 | Python | false | false | 7,140 | py | Laby_main_upgrade1.py | # -*- coding: utf-8 -*-
"""
Created on Sat Sep 23 20:26:03 2017
@author: Grim
Laby : structure principale du jeu Labyrinthe
Jeu dans lequel on doit déplacer un personnage jusqu'a des bananes
Script Python
Fichiers : laby_main.py, laby_classes.py, laby_constantes.py, n1, n2 + images
Table : laby_table.py
... |
d74820033d798c246f3b6cec154bf7e5607e5cc6 | a108798b03c12a9d4d155ad8edd3b88c58dca053 | /cmp/protect/__init__.py | ca9f24097399c9f68e56cc7353fb4a8077fd7c03 | [] | no_license | luo1994/WCplus | 2c7a9124fd491d1e6e66afb69c67286594c84661 | e6afc9804c8fd017c535c6942e29b8b88054757d | refs/heads/master | 2020-05-16T08:54:09.550200 | 2019-04-24T02:20:12 | 2019-04-24T02:20:12 | 182,928,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,112 | py | __init__.py | # uncompyle6 version 3.2.6
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.6 (default, Jan 26 2019, 16:53:05)
# [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
# Embedded file name: cmp\protect\__init__.py
"""
如何解决证书会变化的问题?
"""
from utils.base import logger
from utils.time import get_internet_time
from datetime imp... |
a40a9a1d1ed91b6a739462009ac4c176e693096c | c7b93842a3edeca72e5f20448d74eaaf1632fc92 | /time_stream/test_base_single.py | 4e4dfeb974f9a371562ee4058367be91edd13ca3 | [] | no_license | mfouda/analysis_IM | fba738eefa79981e324b1f7c62475e8802062225 | eacf84b29ead08b59fcbaac648df5e49d2125b88 | refs/heads/master | 2021-01-19T13:42:05.149197 | 2014-07-24T21:08:03 | 2014-07-24T21:08:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,315 | py | test_base_single.py | """Unit tests for base_single.py."""
import unittest
import os
import base_single
from core import fitsGBT, data_block
class ExampleProcessor(base_single.BaseSingle) :
def nothing_to_do(self, Data) :
Data.add_history("Did Nothing.", self.params['a_parameter'])
return Data
action = nothi... |
78358dff97ebb04c55f172630c8f7aceb728069a | 8321569c641eb4f76742e17611a2096060585095 | /pcbgenerator/rules/IsInstance.py | c5e2b64a8d5198fabba743d18eb33fbd251dc5e3 | [
"MIT"
] | permissive | dexpota/pcbgenerator | 06b09a7556938d3ebb7b56f65d42590b4fb25ca4 | 4591b7e0bd6265d2d72ffafafa92f9f11180e4e3 | refs/heads/master | 2022-12-09T20:30:37.594609 | 2019-08-22T22:22:33 | 2019-08-22T22:22:33 | 157,002,478 | 0 | 1 | MIT | 2022-12-08T05:50:24 | 2018-11-10T17:04:28 | Python | UTF-8 | Python | false | false | 460 | py | IsInstance.py | from dxfgrabber.dxfentities import DXFEntity
class IsInstance:
"""
This rule checks that entity is of the given instance.
"""
def __init__(self, t):
"""
:param type:
:type type: type
"""
self.t = t
pass
def __call__(self, entity):
"""
... |
39b7cf0fd222eb4184edd755a91eec9cdf4d54bf | f2fb6f1884e3622a4ba29415ef8709ab40a5c947 | /test/test/util_test.py | 111f6fc6d3b0f5a4d8a0172df8c070413e180eb1 | [] | no_license | psm8/automated-business-process-discovery | 95f19f00f667d17a2e9dd485a6f01b0127450354 | 69e2242f2af40f28b0609a320a3ade8c208c7662 | refs/heads/master | 2023-04-06T01:27:30.507855 | 2021-04-26T16:57:11 | 2021-04-26T16:57:11 | 307,401,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,571 | py | util_test.py | import unittest
from process_discovery.event.event import Event
from process_discovery.event.event_group import EventGroup
from process_discovery.event.event_group_parallel import EventGroupParallel
from test.util.test_util import string_to_events
from process_discovery.util.util import flatten_values, event_list_leng... |
7d4f1d8fa1ee0ed2f4134b78ce760fd633b87bcc | 92852226b5139779545d2e1ca58955e8ced7b57f | /flow.py | ead946b2c473110614ba3cae88823f187ec75eaf | [] | no_license | moa1520/golfcapture | c09a998f510e83cbc3d3e4f6f0fe99cc4a2bea79 | 929e020bc061d91342ce06e6713e7fd1d3634dbd | refs/heads/master | 2023-07-30T18:33:49.238455 | 2021-10-07T04:21:10 | 2021-10-07T04:21:10 | 363,082,192 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,206 | py | flow.py | import cv2
import numpy as np
def dense_optical_flow(method, video_path, params=[], to_gray=False):
cap = cv2.VideoCapture(video_path)
ret, old_frame = cap.read()
hsv = np.zeros_like(old_frame)
hsv[..., 1] = 255
if to_gray:
old_frame = cv2.cvtColor(old_frame, cv2.COLOR_BGR2GRAY)
whi... |
f34bd98c2618c555984851facb3aa7224ed1d0d8 | 7280a183bc8de6568ea8269f5e69e61249019f4a | /robotsim/nextage/nxt.py | 7975f671003d436084906dfd807ac5764bcbac77 | [] | no_license | wanweiwei07/pymanipulator | d0eabc21df17c74ea2f2a0185b58843f27f1cd29 | 3f7492d890bd45c955a0cdf05b13d86a9ea39331 | refs/heads/master | 2021-06-19T02:05:33.250807 | 2020-12-25T13:55:59 | 2020-12-25T13:55:59 | 137,328,824 | 9 | 4 | null | null | null | null | UTF-8 | Python | false | false | 24,437 | py | nxt.py | import numpy as np
import exceptions as ep
import utils.robotmath as rm
import pandaplotutils.pandactrl as pandactrl
import pandaplotutils.pandageom as pg
import nxtik
class NxtRobot():
def __init__(self):
# initjnts has 16 elements where the first three are the waist yaw, head pitch, and head yaw
... |
2564ab30f33034638fed52192273a9d0bf7ee0d6 | 22ff413d304add4291dbbe93feff518d16746536 | /tests/tools/test_extract_corelevels.py | e404ab823b2f0e5fd623e548ef118ee48e661e2b | [
"MIT"
] | permissive | JuDFTteam/aiida-fleur | 455296cf12624ecef8d6633342fda34e6a591803 | c8ef565e8ad8bddbd0e9ceb77f7ea82418dff9dd | refs/heads/develop | 2023-08-18T17:28:22.340070 | 2023-05-12T15:14:18 | 2023-05-12T15:14:18 | 80,720,183 | 10 | 6 | NOASSERTION | 2023-06-05T17:45:50 | 2017-02-02T11:49:36 | Python | UTF-8 | Python | false | false | 3,457 | py | test_extract_corelevels.py | ###############################################################################
# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. #
# All rights reserved. #
# This file is part of the AiiDA-FLEUR package. #
... |
353f016293bd43e9e34b4159a951b241b8c662b0 | 1dc03aa44c3808cd4ed75ca68c94191838a81957 | /backend/plugins/plugins_market_backend/settings.py | 7b000a77a0a06a54f8fc20b457cf8fa765c2b8f0 | [
"Apache-2.0"
] | permissive | pycgo/dvadmin | 7a29e21b09fa9a71aad256574d78d037a36f7628 | e65c364469d5731057348c94d29b839447c5ca7a | refs/heads/master | 2023-08-27T18:45:44.863622 | 2021-10-29T09:16:16 | 2021-10-29T09:16:16 | 422,510,673 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 157 | py | settings.py | from django.conf import settings
# 注册app
app = 'plugins.plugins_market_backend'
if app not in settings.MIDDLEWARE:
settings.INSTALLED_APPS += [app]
|
669ed49a8eb4978959549ae3d0ab9fb8c920e6b0 | 8f4c2244b0bf4bd42bc802e218904b8e03ca4c8f | /quiz/10_09_20.py | 0a67dee5cbd97e67d9a709859d17e9caed727e2b | [] | no_license | stamp465/01204111-Computer-and-Programming | 26ba57d42d16aba9bd692351264bddb02ffd9473 | 49d08407e9d2f107209961b6dfa7a083dbdb5170 | refs/heads/master | 2023-01-09T19:11:14.428057 | 2020-10-29T04:45:19 | 2020-10-29T04:45:19 | 299,288,002 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,816 | py | 10_09_20.py | #print([i for i in range(20,8,-1)])
#print([i**2 for i in range(1,13)])
#print([ (i*2-1)*(-1)**i for i in range(1,14) ])
#print( [ i*(i+1)//2 for i in range(1,10) ] )
#print( [ (i*2-1)*'*' for i in range(1,6) ] )
'''def create_zero_matrix(m,n):
res = []
for i in range(m):
row = []
... |
356e02ba4c8e921c12bfd9a7b4c88a2ac36f4ca0 | c928c13ceaed43980d37c9f2b5b86f41bfc8cd6e | /ROLTR/run_ReOLTR.py | 8432960f539381aed95f324f8a82402e8a9b3554 | [] | no_license | ArvinZhuang/OLTR | 20a35971af9d2e0cbfecea516c1b9f69bd84a3db | d601047dada88750aa9735b32c3592ad5938ca51 | refs/heads/master | 2021-06-21T01:06:21.992090 | 2021-05-09T04:51:22 | 2021-05-09T04:51:22 | 215,214,976 | 6 | 3 | null | 2019-12-19T01:15:48 | 2019-10-15T05:36:15 | Python | UTF-8 | Python | false | false | 5,393 | py | run_ReOLTR.py | import os
import sys
sys.path.append('../')
from dataset import LetorDataset
import numpy as np
from clickModel.PBM import PBM
from ranker.MDPRankerV2 import MDPRankerV2
from utils import evl_tool
from utils.utility import get_DCG_rewards, get_DCG_MDPrewards
import multiprocessing as mp
import pickle
# %%
def run(tr... |
4b37d217982264ede768466e6169a061a96c495c | cc64c5eb18b0e0516fa09e89e7426a5df1930f26 | /apps/documentos/views.py | 6bda550ecb5b81ea7e677fc04639cd35caea676d | [] | no_license | junioregito/gestao_rh | 61cf929272bb35d0a0661297dcfc112327585ead | 2d1d4d8f1dc845faa71ea808be4952ab3095ae4e | refs/heads/master | 2022-12-08T11:07:17.542129 | 2020-08-30T13:12:04 | 2020-08-30T13:12:04 | 286,853,304 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 888 | py | views.py | from django.http import HttpResponse
from django.views.generic.edit import CreateView, UpdateView
from .models import Documento
class DocumentoCreate(CreateView):
model = Documento
fields = ['descricao','arquivo']
#override no post para adicinar um objeto de instância
def post(self, request, *args, ... |
70e961351ded325771030b673128481b295ad13c | 7226a7fd3e3dc6936b09c431d03a29372f6f0fd0 | /upa_encuestas/encuestas/views.py | dca093a5fbca315be1441f81bac4699e2edd9af5 | [] | no_license | pwac092/upa | ba5a64c2ee023cb217b101e859133cd3c2a5dd93 | de2dabe94eb87070dd520cb647bb2cbada940aa9 | refs/heads/master | 2020-12-14T11:55:41.235624 | 2016-08-08T22:40:40 | 2016-08-08T22:40:40 | 54,505,536 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,547 | py | views.py | from django.shortcuts import render,loader, HttpResponse, redirect
from django.contrib.auth import authenticate, login
from django.utils.html import escape
from django.template import RequestContext
from collections import defaultdict
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResp... |
0f3e6bfc518f5637c622905c3d35812f3ddd8a7e | 5ac97fd7760ede653225478b1d4f26ade12ad7d6 | /61a/Labs/lab2/lab2.py | 676910991e91706419be3931fef1cca9269b11aa | [] | no_license | strollinghome/class | dd625183671f4886db5c713d7c18f38cf32a91fb | 07d25944dbf892781797daa1dbd78f14922ba662 | refs/heads/master | 2021-09-09T00:00:11.516188 | 2015-05-21T05:32:48 | 2015-05-21T05:32:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | lab2.py | def abs(x):
if x >= 0:
return x
else:
return -x
def abs1(x):
if x >= 0:
return x
return -x
def exp_decay(n):
if n % 2 != 0:
return
while n > 0:
print(n)
n = n // 2
def funky(k):
while k < 50:
if k % 2 == 0:
k += 13
else:
k += 1
print (k)
return k
def function():
n, i = 7, 0
while... |
f3f2fbd6ccc3eeda301d7113bcb3d87490b5ccac | 0088c125abeaa79368f3dc42efb4c3eeb6cc0518 | /mysite/core/views.py | cb5f9d62263bbe589dc4a456916c2fe6480a02ae | [
"MIT"
] | permissive | Ligthz/pksun-123-hotmail.com | 9a595f10b418ca0e27d66fd3ab6f06c754258641 | e8c24cad4e4516e4da494555df2e60f33b4286d0 | refs/heads/master | 2022-12-06T19:43:34.643452 | 2020-04-17T17:37:27 | 2020-04-17T17:37:27 | 252,361,331 | 0 | 0 | MIT | 2022-11-22T03:17:52 | 2020-04-02T05:12:44 | CSS | UTF-8 | Python | false | false | 5,395 | py | views.py | from django.shortcuts import render, redirect
from django.views.generic import TemplateView, ListView, CreateView
from django.core.files.storage import FileSystemStorage
from django.urls import reverse_lazy
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.c... |
d8e066df0b7503948ee34ab6b6d7a1ba1165a04f | 0c7afc81d1197a43b3d2b35246782b9ac5623114 | /solutions/l1_l2_norm.py | cf570700177572147567023c1fa6e98d841b1129 | [] | no_license | Praveenstein/numpy_pandasProject | eaa7886ada2350a5b1b4ce0b8eba03318804c42b | 7ff5f16afde624d33b5a07dc44060b69e6994cda | refs/heads/master | 2023-01-07T23:20:38.460891 | 2020-11-04T11:29:04 | 2020-11-04T11:29:04 | 309,118,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,627 | py | l1_l2_norm.py | # -*- coding: utf-8 -*-
"""
Module to Find the L1 Norm and L2 Norm of a Given Vector
=============================================================
Module for Finding the L1 Norm and L2 Norm of a Given Vector
This script requires the following modules be installed in the python environment
* logging - to perform... |
2a083ae0fa1073d8084d96de6043bb44ebe826d0 | 1052fec0144e5da03350fd9de3dc7e1334bbb4aa | /72.py | 9316dcbc2898a54c2cdbb722d62f626ee770bdac | [] | no_license | 7286065491/python.py | 831af052dc042a7d71981decb946f55ae1f6ca5d | c7d4cabd5a5d35466549f5401933b09ac275d798 | refs/heads/master | 2020-03-24T06:41:49.709757 | 2018-09-25T05:29:41 | 2018-09-25T05:29:41 | 142,538,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | 72.py | ab=input()
for i in range(0,len(ab)):
if ab[i]=='a' or ab[i]=='e' or ab[i]=='i' or ab[i]=='o' or ab[i]=='u':
print("yes")
break
else:print("no")
|
956b9d0877229d0befc7fef149480b5f732c149b | 21c69d6cf7876f18bdce40944c150c1ce1b7f9a7 | /experiments/inhomogeneous/pwconvergence.py | bbc68349d839b305975f128b1af0401a1d27ddef | [] | no_license | tbetcke/PyPWDG | c880fb4e32f4f44b831e09aa1b5554807544f6dc | 47e26c704b37d80a45f777d47467997dc318c81d | refs/heads/master | 2021-01-01T18:54:01.570789 | 2012-09-28T10:27:37 | 2012-09-28T10:27:37 | 711,496 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,004 | py | pwconvergence.py | '''
Created on Aug 24, 2011
@author: joel
'''
import pypwdg.core.bases as pcb
import pypwdg.core.bases.variable as pcbv
import pypwdg.core.bases.reference as pcbr
import pypwdg.core.boundary_data as pcbd
import pypwdg.setup.problem as psp
import pypwdg.setup.computation as psc
import pypwdg.core.physics as pcp
import ... |
0bf4692d49a827dc7ee20f68b8677a30985ae40b | a2d9132e9f69e42d2114daf3bd161ab7f14677e5 | /Data/extra_code/combiner.py | 921768f771ac356248aa7801e2116732933b9347 | [] | no_license | shaifulcse/GreenScaler-Tools-and-Data | 8d6f19f278739e02cc7340911d2ea09fe193c31e | 8505632bc7bf4d9736ce5225f00601b425a81878 | refs/heads/master | 2021-01-19T16:34:43.712261 | 2018-02-28T19:01:45 | 2018-02-28T19:01:45 | 101,005,565 | 5 | 1 | null | 2018-02-28T19:01:46 | 2017-08-22T01:02:31 | Shell | UTF-8 | Python | false | false | 515 | py | combiner.py | import re
fw=open("androzoo_batch6.csv","w")
fw.write("Shaw\tUrl\t")
src="/home/shaiful/research/shaiful_random_test_energy/final_data_upload_for_ICSE/greenscaler/Random_apps_472/"
fr1=open("batch6_apks.txt","r")
fr2=open(src+"androzoo_batch6.csv","r")
line2=fr2.readline().strip()
fw.write(line2+"\n")
lines2=fr2.r... |
c3d9ee92d37dc902bc2840a876d3ac987d66fe8d | 00c9d74f3725bc7eaf685e939adf34fbbec8004f | /scraper.py | 574ce3127081641f0bbe3181f1dabbaade9b519e | [] | no_license | royopa/morph-petrobras-scraper | 5f1c98e2619fdb1a5d0d66fd7ae405b492423f9b | 57c3abd215179c53e380f7527ab25ec0c787dfd2 | refs/heads/master | 2022-08-30T08:53:15.192942 | 2022-08-03T11:14:30 | 2022-08-03T11:14:30 | 182,433,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 635 | py | scraper.py | # -*- coding: utf-8 -*-
import pandas as pd
import scraperwiki
# dados da petrobrás a partir de 2018-09-18
url = 'http://www.petrobras.com.br/lumis/api/rest/pricegraphnovo/pricedata?n=4'
df = pd.read_json(url)
df.columns = ['data_publicacao', 'data_variacao', 'vr_diesel', 'vr_gasolina']
for index, row in df.iterrows... |
704b411597f4f9b3a0b284e8c4b6d5dbbc63d326 | c54c0324ca37863d11ab69e830cce144e414f935 | /spider_mzitu/settings.py | 9d295901ce9edc72a8e3b1207e0b17f70a95e2c4 | [] | no_license | james3566/mzitu | d18e2c77ab225d9fe9a44da8eec28f29420363fd | 1e3758b4fb5fe6c53a24aa21ee865a4effdfda7e | refs/heads/master | 2020-04-15T14:58:30.357230 | 2019-01-09T02:54:50 | 2019-01-09T02:54:50 | 164,775,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,019 | py | settings.py | #python/spider/setings.py
"""目标网站、数据保存、代理服务器等相关信息"""
class Mzitu():
"""mzitu.com的相关设置"""
def __init__(self):
self.Hostreferer = {
'User-Agent':'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)',
'Referer':'http://www.mzitu.com/'}
... |
606ac7674afd5db4b949703e9809865d2dec5271 | 0f0451c1c3e379bb4bdd13af1a1f278a13885c45 | /Tkinter/ControlListbox.py | 69f1e581ae4acbcfdb4cb37e6cc4116461201393 | [] | no_license | Nataliodg/Python | 1b860aae5135d9a5d34ca14f74f656adb8e76b11 | 59b66f1f67151eb5c3deec90249077c55291206a | refs/heads/main | 2023-01-07T11:24:45.420199 | 2020-11-14T02:09:02 | 2020-11-14T02:09:02 | 312,727,510 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,866 | py | ControlListbox.py | #El control visual Listbox se emplea para mostrar una lista de items.
# El usuario puede seleccionar uno o más elementos de la lista según como se lo configure al crearlo.
#1)
#Disponer un Listbox con una serie de nombres de frutas. Permitir la selección solo de uno de ellos.
# Cuando se presione un botón recuperar la... |
e033405432cd2e070729b93d65057fe20f3ae50c | 5f4950604c41319ae0ab51cf4234785916d711fa | /nipype/interfaces/dtitk/registration.py | 3dd1c068c81d9fb64c1a088dd6cc1330bc950cae | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | schahid/nipype | 4c456f15e2cd2c9ba3d0826291a53ff349784d64 | 1e1adc8ec03f76718638e81a2d149d4a9bacfe8d | refs/heads/master | 2021-10-24T01:32:59.892205 | 2019-03-21T11:29:55 | 2019-03-21T11:29:55 | 111,550,690 | 1 | 0 | null | 2017-11-21T13:12:00 | 2017-11-21T13:12:00 | null | UTF-8 | Python | false | false | 16,187 | py | registration.py | from ..base import TraitedSpec, CommandLineInputSpec, traits, isdefined
from ...utils.filemanip import fname_presuffix
import os
from .base import CommandLineDtitk
class RigidInputSpec(CommandLineInputSpec):
fixed_file = traits.Str(desc="fixed diffusion tensor image",
exists=True, mand... |
a07ed59c8a28b266ffad72b09cd88fe2be74d3df | 75ba129130705103c49a60d52170c2aea8b2ac40 | /scripts/parse.py | 789b433a774dacf6ca54c4b736c169bcd5ca7a53 | [] | no_license | asasher/dot-clean-web | cc689d87a7532f589d347cd12357ba1cb316d942 | f8202b5e59896edde41d5a0e4b4853eb2491acfb | refs/heads/master | 2021-01-19T13:50:22.725824 | 2015-08-23T20:55:44 | 2015-08-23T20:55:44 | 40,962,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 592 | py | parse.py | import fileinput
import json
import sys
from glob import glob
lines = [line.strip() for line in fileinput.input(glob(sys.argv[1]))]
at = 0
data = []
while at < len(lines):
n = int(lines[at])
at = at + 1
matrix = [[int(x) for x in lines[i].split()] for i in range(at, at + n)]
at = at + n
nodes = [[float(x) for... |
74d16d9a332653b6494bf59a77b82e6c422885c3 | 25dda94672497e3287a7403e283fb279ad171b79 | /practice/구현/소수 찾기.py | 10113dcc9e2962cf1043a93fbf14801920dff07f | [] | no_license | woorud/Algorithm | c94b844e8c96a446c5fdee5c0abb159bfee384d7 | f5b8e3cf0aea7fc4400e6f5bb0c1531fad93e541 | refs/heads/master | 2023-02-23T13:53:28.645036 | 2021-01-29T12:24:23 | 2021-01-29T12:24:23 | 230,908,288 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 560 | py | 소수 찾기.py | from itertools import permutations
def prime(n):
if n < 2:
return False
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
return False
return True
def solution(numbers):
num = set()
for i in range(1, len(numbers) + 1):
tmp = permutations(nu... |
0c9f0c207ed2be9d5dd7999777ce6c7626fb419d | 35894bca47cf0c9a51a05caf7b56a0d69c05b033 | /02_estruturas_de_dados/17_tuplas.py | 195f78067c05c159d813d02c9932d42e6909981d | [] | no_license | alcebytes/Phyton-Estudo | 0a2d33f5f3e668e6ab2f99e5e4499545a3bc1273 | a3f9a0b3e0a91d71a9359480d6ec17e692572694 | refs/heads/master | 2023-01-14T17:24:16.486956 | 2020-10-08T02:02:02 | 2020-10-08T02:02:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | 17_tuplas.py | # TUPLAS
T = (1, 2, 3, 4, 5)
print(T)
print(T[3])
# T[3] = 8
T = (10, 20, 30, 40, 50)
a, b, c, d, e = T
print("a=", a, "b=", b) # a= 10 b= 20
print("d+e=", d + e) # d+e= 90
*a, b = [1, 2, 3, 4, 5]
print(a) # [1, 2, 3, 4]
print(b) # 5
a, *b = [1, 2, 3, 4, 5]
print(a) # 1
print(b) # [2, 3, 4, 5]
# SyntaxErr... |
c928a16328c40390babe2f87def57a028ec27399 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_censor.py | 73d68649db1100aebde6b307eb0e59e3ba36f8c8 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | _censor.py |
#calss header
class _CENSOR():
def __init__(self,):
self.name = "CENSOR"
self.definitions = [u'to remove anything offensive from books, films, etc., or to remove parts considered unsuitable from private letters, especially ones sent during war or from a prison: ']
self.parents = []
self.childen = []
self... |
ced35de4f9cf7d6af74bbe9958f1b9ccdd664ce0 | 2a95e18fd08c43f4134be8dcb1d7e08457b2b1c3 | /nobos_dataset_manager/dataset_tools/rtsim_action_to_rnnopar.py | 91f437bd03d6feec13ca862e097526c2fd421e6b | [] | no_license | tommysugiarto/nobos_dataset_manager | 1bd3736626572bbad0174dbce03aa025a27a6530 | e8ec2046184a3d52fd7420ba6d1ab9ab2f983db9 | refs/heads/master | 2022-02-24T20:34:26.061833 | 2019-08-27T05:26:02 | 2019-08-27T05:26:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,846 | py | rtsim_action_to_rnnopar.py | import os
from _ast import Dict
import numpy as np
from nobos_commons.utils.file_helper import get_immediate_subdirectories, get_last_dir_name
action_mapping = {
"idle": 0,
"rom": 0,
"walk": 0,
"wave": 1
}
def vecs_per_frame_to_time_frame_vecs(feature_vecs_per_frame: list, time_frame_length) -> list... |
fb994175761812845176415650eda937e279d567 | c6e09e9fe076b1f66a44ce346a564ed2e16468d7 | /cms/convert_sensor_data.py | 387d58a43f7eb988e355efc6fc2f0c6d3ed8b764 | [] | no_license | Ryuta-Abe/mysite | 8fbf7d79b41ffe59fd441d0e92b97877f000512d | 690d906a37c7d088b6a603395800fc03142c63f9 | refs/heads/master | 2021-01-25T17:49:15.229752 | 2018-02-13T03:45:26 | 2018-02-13T03:45:26 | 40,276,919 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,408 | py | convert_sensor_data.py | # -*- coding: utf-8 -*-import math
from cms.convert_device_id import convert_device_id
import math
def convert_sensor_data(s):
s.update({"date":s["datetime"][0:10], "time":s["datetime"][11:23]})
# 子機のidと座標
s["device_id"],tmp_pos_x,tmp_pos_y = convert_device_id(s["device_id"])
s.update({"pos_x":tmp_pos_x, ... |
e104a7b62097eeccf3596cf67ec9a3e809c20949 | 339d87527fad15273449bb215bb60716c1bb1615 | /app/run.py | 54d473d05d51c6f43e923c2901debcb96e9796b5 | [] | no_license | Bbw0706/Data-Visualization | cb2170799afef6490f8570726e1e68069341d250 | 14b00fdd96fe235f958fa5907f3880f95c375cb6 | refs/heads/master | 2020-04-07T04:35:07.364053 | 2018-11-18T08:22:01 | 2018-11-18T08:22:01 | 158,063,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,359 | py | run.py | import scrapy
from scrapy.crawler import CrawlerProcess
from collections import Counter
import sta
import os
from os import path
import numpy as np
import wordcloud
import matplotlib.pyplot as plt
from PIL import Image, ImageFilter
import random
class DetikScrap(scrapy.Spider):
'Terjawabnya Misteri Diam Si Kancil ... |
93bb2d3cd398830852e9b4d7a8e9317bb1ab8146 | f8d8decb949bcf98dbd0f1c7761f219d960d2999 | /src/explanations.py | ac4c89cb6fc38f033c1caa58a87677d3a92b59e5 | [
"Apache-2.0"
] | permissive | marcopost-it/PASTLE | e88935edfe7f38f4dfd7bdeb4e3369d619854562 | 042c63aed70aaf6a3ef365db4065f2cf3e8fa06e | refs/heads/main | 2023-05-10T01:35:11.340058 | 2021-06-16T07:07:27 | 2021-06-16T07:07:27 | 346,144,837 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,184 | py | explanations.py | import collections
import copy
from functools import partial
import json
import warnings
import numpy as np
import scipy as sp
import pandas as pd
import scipy
import sklearn
import sklearn.preprocessing
import sklearn.pipeline
from sklearn.utils import check_random_state
from lime.discretize import QuartileDiscretiz... |
7fc4a1dc24bc036d76e208fcb565616f2ded07a5 | a0394aa44cdbde41e9dcc850753ecaad9007a096 | /network.py | f61e05d5935e8ada38fa9cb16bea3f749ca2379a | [] | no_license | cjg429/sparse_actor_critic | 03371d0248b8aa8971674b14e3555110c803bbc9 | 92d1f4a35c50ea4f099f8e2fce44a1d06e5f424d | refs/heads/master | 2020-03-19T05:54:23.368139 | 2018-07-04T09:18:39 | 2018-07-04T09:18:39 | 135,973,017 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,684 | py | network.py | import tensorflow as tf
import numpy as np
from sklearn.utils import shuffle
class Value(object):
def __init__(self, sess, obs_dim, epochs=20, lr=1e-4, hdim=64, seed=0):
self.sess = sess
self.seed = seed
self.obs_dim = obs_dim
self.epochs = epochs
self.lr = lr
... |
db35aec37a973e11ebc256dfc46883fd88661a02 | fcba2d1873f868abf7965cc14fe674afbd6af81e | /benchmarks.py | 80d11255c38cdd1b786b990cf056b1e6f7225789 | [] | no_license | DaiZhiyuan/microbenchmark-aarch64 | d5c3aed99eec9873484254c9b6fe710cdb8e9936 | cbe4f786e6604ddef3fe92a0b795855932cc8dbb | refs/heads/master | 2022-01-24T01:34:17.265149 | 2019-07-23T05:52:26 | 2019-07-23T05:52:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,742 | py | benchmarks.py | """
This file templates a bunch of benchmarks
"""
import csv
import subprocess
import math
from jinja2 import Environment, FileSystemLoader
return_register = "x0"
template_env = Environment(loader=FileSystemLoader('benchmarks'))
def vector_value_register(register, type):
"""Convert x0 to v0.16b
Expects x... |
0e40349d330467fc38ebbb5e9c8c3448356ba390 | bf0b7912cc776467dd456b48c3b30b360c536ca0 | /doge/migrations/0005_auto_20210515_1510.py | 88ef1c26363bd9fb5a3980d131d18de633751df2 | [] | no_license | HawkUs-Git/CknLinks-2 | 2a91d6532d8289160ce4d382929da77901742c89 | 6769b09ca2c081fd4b28b97a28fe2b4ea160d6da | refs/heads/master | 2023-05-04T14:56:02.550947 | 2021-05-21T14:47:19 | 2021-05-21T14:47:19 | 369,566,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | 0005_auto_20210515_1510.py | # Generated by Django 3.1.5 on 2021-05-15 15:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doge', '0004_auto_20210515_1509'),
]
operations = [
migrations.AlterField(
model_name='link',
name='title',
... |
ed61b4d08a3961c7aeb40756902b8c0a20c296ec | 2052fb3a0958dc0153ba1b73dda402ddcc8e5686 | /41-60_py/43-stringMultiple.py | 18981187ca6ac6ed2f03369458b166ed7287d768 | [] | no_license | AnnanShu/LeetCode | 47f6214c9680e695c68bc639b42a6b705416f921 | db1183ffee145b934e6d22a7415ac267e02a70f3 | refs/heads/main | 2023-02-18T21:08:20.242305 | 2021-01-13T13:15:19 | 2021-01-13T13:15:19 | 296,492,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | 43-stringMultiple.py | class Solution:
def multiply(self, num1: str, num2: str) -> str:
if num1 == '0' or num2 == '0': return '0'
ans = '0'
m, n = len(num1), len(num2)
for i in range(n-1, -1, -1):
add = 0
def addStrings(self, num1: str, num2: str) -> str:
... |
3f85716b6c66a3abfc08c74bfe481c038ae1508f | 28e23f6bd65555062a44f1c857480ef40d11de2b | /notes/2. download_html.py | e5fca89671b195e3b725fed0f98dec7b87183c17 | [] | no_license | laispace/py-notes | bc688c04eb3dc0364d7721413ac7e90442ae38fa | cd9d0f530f78d77138c56fb7ec5f1c3ad19be962 | refs/heads/master | 2021-01-10T08:03:21.329629 | 2015-11-01T14:28:06 | 2015-11-01T14:28:06 | 45,343,204 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 461 | py | 2. download_html.py | # -*- coding: UTF-8 -*-
import urllib.request
# 下载一个网页到本地
import urllib
url = 'http://www.laispace.com/'
filename = './download/laisace.com.html'
def callback(num, size, total):
# num 已经下载好的数据块
# size 每个数据块的大小
# total 远程文件的大小
percentage = 100.0 * num * size / total
if percentage > 100:
percentage = 100
prin... |
a774c29a2864e61d9999d3c8c600a1ca8da1221d | 878c81a5a911febc583b10640585cc1db20b08b7 | /consts.py | 8a7a5f04c21c0fb3cb3d38402dbeedf76422692b | [] | no_license | Fudalinm/EpidemicSpreadModels | f18e43abe4360dcc325794ef19d00733a7a7a1b6 | 812cf8b6a075df606b8b6fcefaba6091d492b2d9 | refs/heads/master | 2021-05-22T13:55:32.299280 | 2020-05-23T16:50:47 | 2020-06-16T18:27:04 | 252,953,864 | 0 | 0 | null | 2020-04-19T13:11:04 | 2020-04-04T09:11:15 | Jupyter Notebook | UTF-8 | Python | false | false | 375 | py | consts.py | class URLS:
EUROPE_LOCATIONS = 'https://covid.ourworldindata.org/data/ecdc/full_data.csv'
EUROPE_COVID19_STATISTICS = 'https://covid.ourworldindata.org/data/ecdc/full_data.csv'
class PATHS:
DATA_DIR = './data/'
PLOT_DIR = './plots/'
EUROPE_LOCATIONS = DATA_DIR + 'EU_localizations.csv'
EUROPE_... |
cc29aa7f69ede155241e4105585d7d7c0acc2f15 | 561f4e79b2aa0951828b9fa46039eed77e98bb09 | /segundoModulo/5.py | 32dffda9f960db0a8d7b499ebd113cbaa4cbcbcf | [
"MIT"
] | permissive | TharlesClaysson/Python-Basico | fc7da4aaf00e9a66c71e764cd9ad8f2df4e1550b | 16a135e08d4f1c7e46e33d4df5d4f36f7498b4ea | refs/heads/main | 2023-06-04T21:33:20.100413 | 2021-06-28T15:01:46 | 2021-06-28T15:01:46 | 381,044,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,704 | py | 5.py | class TipoCadastroB:
numeroC = 0
nomeTit = ''
saldoTitu = 0.0
def menuOp():
vetorContas = []
while True:
print('__'*30)
print('Menu de opções:')
print('1.Cadastrar contas')
print('2.Visualizar todas as contas')
print('3.Consultar por nome')
print('4.A... |
c27c8bb0606f1656c6004081e27505d017f515c1 | a7e07ff190eb4cfe3bb77a132b04e91f2db64dec | /cards/migrations/0005_auto_20210403_2232.py | d124f6bec367a506dbf8117fdd94bbf16d8bcbf9 | [] | no_license | sultanmirzapydev/new_django_site | 4bfcca36fdb286bfe8440a42e9b87a859eece89e | 90328f241eb752faea5946b11e9aa5644cb3842e | refs/heads/main | 2023-03-30T23:08:43.751049 | 2021-04-08T09:17:43 | 2021-04-08T09:17:43 | 338,855,960 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | 0005_auto_20210403_2232.py | # Generated by Django 3.1.7 on 2021-04-03 17:02
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('cards', '0004_auto_20210308_0037'),
]
operations = [
migrations.AlterField(
... |
301c335fa90bd78843038927757fad6e6d24db57 | 422ab6627932ca84c862ad7a3bf44e9d62a29bf8 | /myW2VModel/text_cleaner_smart.py | 554a01e8950ceecf6520655219153ff96ab09a49 | [] | no_license | AlexandrShestak/nlp | d432ad8bd97b7a20314a53ff9609d08d22447dd3 | e6a39ac6272472c4bc788df5ff66a541bc84ffc1 | refs/heads/master | 2016-09-01T14:35:00.176744 | 2016-04-23T14:31:31 | 2016-04-23T14:31:31 | 50,245,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,710 | py | text_cleaner_smart.py | # -*- coding: utf-8 -*-
import csv
import string
import sys
from nltk.stem.snowball import RussianStemmer
reload(sys)
sys.setdefaultencoding("utf-8")
from stop_words import get_stop_words
from gensim.models import Word2Vec
model_name = "myW2VModel"
model = Word2Vec.load(model_name)
# next line delete file content
o... |
7609ed5a92cffc00a99438723259c19705f6a54f | 8b6f678e0a6f34e2143309a3bf2d943cf82b144f | /tests/apps/email/emailer_tests.py | e506509be8a0ba5ebb7309cdc82bb8103bf05c1e | [] | no_license | takoman/santa-takoman | 012f1832d91a6fffd341ec0fa8b2e2b51abf6f8d | c2f6d94b9be3d53d82586cc82733ba2a5ac57c5e | refs/heads/master | 2021-03-30T18:32:02.168842 | 2016-02-14T17:25:53 | 2016-02-14T17:25:53 | 19,056,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,748 | py | emailer_tests.py | # -*- coding: utf-8 -*-
from tests import AppTestCase
from santa.apps.email.models.emailer import Emailer
import unittest, mock
class UsersTests(AppTestCase):
def test_init_emailer_with_default_value(self):
emailer = Emailer()
self.assertIsNone(emailer.to_name)
self.assertIsNone(emailer.t... |
fc7743a1fdaba073c1ee650550332e7ddbe5d60f | e1a3915f5099f6db69eb826c5e9fea8ef8d014f5 | /day_two/list_count.py | c706029cd525034ff0dcfce854b8e4ed5fe30e1f | [] | no_license | mayankkushal/python_sdp | 09aa88c8b3b1db6e0db465749de8e5fb50d3507e | 12ffe0cbad13034297bb1784765f966d59a0e3a3 | refs/heads/master | 2021-05-08T15:45:00.730658 | 2018-07-15T11:06:31 | 2018-07-15T11:06:31 | 120,125,629 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 221 | py | list_count.py | def countrange(data,min,max):
count=0
for e in data:
if min<=e and e<max:
count=count+1
return count
def main():
data=[1,2,3,4,5,6,7,8]
print(countrange(data,2,6))
main()
|
b917a2f8a9766136c9927a37d8c9601d1ed24315 | 9184e230f8b212e8f686a466c84ecc89abe375d1 | /arcseventdata/gui/web/drchops/content/actors/instrument.odb | b133f3daf0331ee5df515e16c26251bc738a6cde | [] | no_license | danse-inelastic/DrChops | 75b793d806e6351dde847f1d92ab6eebb1ef24d2 | 7ba4ce07a5a4645942192b4b81f7afcae505db90 | refs/heads/master | 2022-04-26T17:37:41.666851 | 2015-05-02T23:21:13 | 2015-05-02T23:21:13 | 34,094,584 | 0 | 1 | null | 2020-09-10T01:50:10 | 2015-04-17T03:30:52 | Python | UTF-8 | Python | false | false | 1,606 | odb | instrument.odb | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2008 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
8ea59b68d297ac4b076e0aec48a4f9f4085e8a3f | 3a792cbffabd88a3ed534cfc53df8d8379b1f803 | /strings/regex.py | 0d84fba446b8e3bb00313d5af598a02adee1ba22 | [] | no_license | albert-santos/meu-estudos-de-python | c0a7f538c74072385ae4c2b20308fa04c2555321 | c99e63f465152fd2fd4da7f96a1220077eda0c72 | refs/heads/master | 2022-11-23T04:26:39.690568 | 2020-07-31T15:45:18 | 2020-07-31T15:45:18 | 282,684,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | regex.py | import re
email1 = "Meu numero é 91234-1234"
email2 = "Fale comigo em 1234-1234 esse é meu telefone"
email3 = "1234-1234 é o meu celular 91234-1234"
padrao = "[0-9]{4,5}[-]*[0-9]{4}"
retorno = re.findall(padrao,email3)
print(retorno)
|
679746a18a910f4c26b169226dc418aec22d9092 | 154ddc1a8f346d3d8799e9ff0e953bb0430a5193 | /manila/share/drivers/netapp/cluster_mode.py | e3921a95249f924ae3a525ee80399ddf86d67cf2 | [
"Apache-2.0"
] | permissive | mbr4v0v/manila | af6a731abea2a8a55291bbeb78e2b727065b721a | fa24580fcf332d68f9eafe767c1ec8bfa8347b48 | refs/heads/master | 2021-01-15T18:04:36.649180 | 2014-08-15T07:34:24 | 2014-08-15T07:34:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 34,927 | py | cluster_mode.py | # Copyright (c) 2014 NetApp, 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... |
6ee37f405e59f43faa9375a03209237c7d9ec7ca | c5bf9adab88d15b8b0a31875e58873329140c4be | /authservice/resources/user.py | 6699cafc0e9629e823c010b98bca20b79baea5e9 | [] | no_license | maei1337/pch_service_v2 | 3b6ff63341f1fa3351f38d195258eeb94c889017 | d8bca9a360f8c8ca25555ed850523482238bfbdf | refs/heads/master | 2020-04-17T15:50:13.549566 | 2019-01-24T19:47:39 | 2019-01-24T19:47:39 | 166,715,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,080 | py | user.py | from flask_restful import Resource, reqparse
from models.user import UserModel
from models.token import TokenModel
from flask_jwt_extended import (create_access_token,
create_refresh_token,
jwt_refresh_token_required,
get_jw... |
60e7203089ed2d7b13ae63cfa5198c36a9e48ca5 | 9e092d94421b65d8521aaa761dd1818273be6e99 | /Lab7/Source/NLP.py | fdd05bed360bc59fccb33116ef73f4864811f9d0 | [] | no_license | rajeswari-namana/PythonCSAssignments | bb7d4097be2b3d144728f9dd16fe37f0651360ac | 7e31247b5c8ec71485bdea529c849cf052c53e99 | refs/heads/master | 2021-01-25T10:49:43.797510 | 2017-07-29T18:54:01 | 2017-07-29T18:54:01 | 93,879,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,805 | py | NLP.py | #import modules
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from nltk.tag import pos_tag
#Read file
my_file=open("test.txt")
s=my_file.read()
#Remove all meaningless words
meaninglessWords = set(stopwords.words('english'))
word_tokens =... |
4f37ecba3bf4ba66c8b364fc21abecbbce8534ce | c796578c7878c3080949c23d0af0b98365cd3cd2 | /core/models.py | 52e4b8df9667ed9285db26e0c08571b36167ccd7 | [] | no_license | dasaderto/reestrdoma | def391e1a6f223411069c6eb7a9e34c635bd4a40 | 8708d3af2a0e2f2b6cf9819a4428a5da05c7fbf3 | refs/heads/master | 2022-06-29T12:37:13.844328 | 2020-04-02T19:31:39 | 2020-04-02T19:31:39 | 248,185,868 | 0 | 0 | null | 2022-05-25T05:09:01 | 2020-03-18T09:16:33 | Python | UTF-8 | Python | false | false | 704 | py | models.py | from django.contrib.auth.models import AbstractUser
from django.db import models
# Create your models here.
from rest_framework_simplejwt.tokens import RefreshToken
class TimeStampedModel(models.Model):
created_at = models.DateTimeField(auto_now_add=True, db_index=True)
updated_at = models.DateTimeField(auto... |
a664f728b43f1d7b9fa6f87c4ce01fd415066057 | 6a4686fb9e01dc552f0b61684afb1a3c34418dfb | /main.py | 9e2927c8f401d2cdbb343022f140bdeab7546519 | [] | no_license | jeru27/Homework_8.3_calc | 9b5c7106e4c240f4242026d436aae41ac8190160 | 53c763f66ea79a2f59fe849a86daac0305c66411 | refs/heads/master | 2023-02-26T14:25:33.838333 | 2021-01-28T23:58:24 | 2021-01-28T23:58:24 | 333,988,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | main.py |
x = int(input("Enter the first number: "))
y = int(input("Enter the second number: "))
operation = input("Choose a math operation(+, -, /, *): ")
if operation == "+":
print(x+y)
elif operation == "-":
print(x-y)
elif operation == "/":
print(x/y)
elif operation == "*":
print(x*y)
else:
print("You ... |
4c3ac6dba5914c29e53e1b89d928a6178fa9d152 | 3578d4b6766724b6bd165064cb138d2311add1b7 | /登录测试.py | f05557dfe04edba984353ad7248b7e1f2d6af031 | [] | no_license | kaililin/mygit | bb268d53eea98bcde99515c1bd51938d24e36ffb | 89880b79b7eca44dd372d5f4345c5acd18d2be37 | refs/heads/master | 2020-05-31T07:01:53.938129 | 2019-11-28T08:19:17 | 2019-11-28T08:19:17 | 190,156,755 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 935 | py | 登录测试.py | # -*- encoding=utf8 -*-
__author__ = "jason"
from airtest.core.api import *
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from airtest.utils.selenium_proxy import WebChrome
driver = WebChrome()
driver.implicitly_wait(20)
# -*- encoding=utf8 -*-
__author__ = "User"
from airtest.core.... |
b93821e30a28b943ba7cc751894945d052d1d4ed | b41fbb20068bf4e73c14af159fc049958551d7c1 | /tests/test_dud.py | 94fe90c3c1b2c38cfce40ab137ad9bda8dab8b47 | [
"MIT"
] | permissive | opencollab/debile | df48d0f82d9363f0c762c7e5ed19658778d0e977 | 62c068ab011d95fa069df512cbdb6ac699a157c7 | refs/heads/master | 2020-04-06T07:04:25.790873 | 2016-07-31T09:59:43 | 2016-07-31T09:59:43 | 31,259,163 | 3 | 11 | null | 2016-08-01T08:08:51 | 2015-02-24T12:34:23 | Python | UTF-8 | Python | false | false | 3,601 | py | test_dud.py | from debile.master.dud import Dud, DudFileException
import unittest
import mock
class DudTestCase(unittest.TestCase):
@mock.patch('debile.utils.deb822.Changes', return_value='Update package')
def setUp(self, mock):
self.dud = Dud(string='Update package')
def test_dud_constructor_type_error_exce... |
fffdc06550841fb02f92ee3a03bcee1a27ca0b23 | a7a1802acea7681eb6b0cbdc1ba940e7d8d301c6 | /ex3.14.py | dd02bd91373b4f08c3aabd0626231c0464857a23 | [] | no_license | Vasimnizar/python | 1717c9df1fc95ad4c5c0d4c9912e98452f00ef97 | cfe1b28b38bb2455b95a47d9a16d7628da0f11c5 | refs/heads/master | 2023-06-19T04:42:07.649450 | 2021-07-21T16:27:35 | 2021-07-21T16:27:35 | 388,182,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | ex3.14.py | with open('first.txt') as f1,open('second.txt') as f2:
for l1,l2 in zip(f1,f2):
# print(l1+l2)
l1=l1.strip()
l2=l2.strip()
print(l1+l2)
|
508a7cd960d9b7086887bd29fae8a97694ee19ca | dc743ec50a12acdd03c53576e25f23af37fe573e | /metadata-wrangling/BIBFRAME/Converter/APP-WIP/Flask-based/Dynamic_WIP.py | 2c75394c304843e3c32aa0bb726e83ead55d56e6 | [] | no_license | ualbertalib/metadata | 860c103145bac86cfc1ef857f73b114b6a5ed4ce | ab125986975c688284c0c5da2fd2e2a812988d46 | refs/heads/master | 2023-07-19T20:29:09.542577 | 2023-02-07T19:01:34 | 2023-02-07T19:01:34 | 37,545,489 | 20 | 7 | null | 2023-07-06T21:19:44 | 2015-06-16T17:33:22 | null | UTF-8 | Python | false | false | 5,642 | py | Dynamic_WIP.py | import os
from Bib_F import main, trans
from time import sleep
from flask import Flask, Response, request, redirect, url_for, send_from_directory, jsonify, flash, render_template
from werkzeug.utils import secure_filename
from pymarc import MARCReader, XmlHandler, record_to_xml, XMLWriter
from os import listdir
import ... |
b5cd228f3b035a66effd425e2e8db72f9058505c | 6421b0fd83795d627e6850b52060ff2eaf38d0ea | /brainmri/tinnvt/brain-mri-abnormal/cvcore/data/dataset.py | b5356466165be62836be668859239192a909ee39 | [] | no_license | StevenNguyen0501/VBDI_brain_mri | 57b7d1eb81532e18e9f94287f9093f14c9dcb7a9 | 0e9feea09996c52820f81c74e15b6692727bfb0e | refs/heads/master | 2023-05-24T15:24:46.099212 | 2021-06-14T02:35:13 | 2021-06-14T02:35:13 | 364,526,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,648 | py | dataset.py | from collections import OrderedDict
import cv2
cv2.setNumThreads(0)
cv2.ocl.setUseOpenCL(False)
import gc
import numpy as np
import os
import pandas as pd
from PIL import Image, ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
from tqdm import tqdm
import torch
from torch.utils.data import Dataset
import albumentations... |
6abaee9daa8835662318a9025d2d3adc310358a6 | 63e668d323312f5c48367f2ec6e51828bd46ede4 | /Kmeans_Hadoop/reducer.py | 7b045ef636e9592966035ddc2004015781fea121 | [] | no_license | liuyan8023/Clustering-Algorithms | b387aada8ce68ed3ab6f7b028f6a07afa6c04e9a | 45ecd4401cd4dde0904da954cc1ba974d26655b1 | refs/heads/master | 2021-08-16T02:46:07.923729 | 2017-11-18T21:58:47 | 2017-11-18T21:58:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,415 | py | reducer.py | #!/usr/bin/env python
import sys
import numpy as np
current_centroid = None
current_points = ""
centroid = None
count_of_points = 0
sum_array = None
# input comes from STDIN
for line in sys.stdin:
# remove leading and trailing whitespace
line = line.strip()
# parse the input we got from mapper.py
cen... |
1aa5f63998fbed784f05af4e69f8956614eb79d5 | d87ef6fe86f42113cd7e80065fcf6de83c849aad | /exos/doublelinkedlist.py | a362d23be76e7627b5ee61837b8720cf28812e96 | [
"MIT"
] | permissive | pmleveque/snippets | c0b53be821bb10a342af4c3a9f9ec0e76581b0b8 | 0caa129036d9844b98b34b00130a7c771f0663b9 | refs/heads/master | 2018-12-28T13:45:57.556603 | 2015-07-22T22:55:10 | 2015-07-22T22:55:13 | 33,005,245 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,584 | py | doublelinkedlist.py | '''
Double Linked List
In a doubly linked list, each element has the property that if element A has a "before" link to element B, then element B has an "after" link to element A
Provide a definition for an insert function that will create an ordered doubly linked list. This function is defined outside of the class Frob... |
c56d4066c3f901cca5f76460e1b20f17633c3b69 | c29f81c0486ba00066cde9c7dd65f46c3c73f50a | /XMLData.py | c8f3608380701ff13eda5b981043eb34efc16a55 | [] | no_license | otrajman/snargecast | 962d3fc2815592faba71e5141d2b25da2bc8a4cd | c575822e8a4027f70f4edb5493b52d85143c5446 | refs/heads/master | 2020-05-17T00:20:58.757857 | 2009-09-20T17:38:05 | 2009-09-20T17:38:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,936 | py | XMLData.py | #import pdb
"""
<xml>
<prop1>
Value
</prop1>
<prop2>
<prop3>Value</prop3>
<prop4>Value</prop4>
</prop2>
</xml>
"""
__version__ = '1.2'
import os
import urllib, re
from xml.dom.minidom import parseString
from xml.parsers.expat import ErrorString, ExpatError
class XMLData:
_... |
900a843826ec3ad98ffbc50c8a25fcd27fa5223d | 10528744025e6b17e47f5803e53080638763ca79 | /2908.py | 5dc7af28e0eefec5b5555679e3a1d4a4a959bfcf | [] | no_license | kla0629/Backjoon | 61ae7f938e46bfa7e534625b210fda4bad16403e | 6c5be0ff456627a981bba19b3df68ecc05811407 | refs/heads/main | 2023-01-22T12:58:20.966883 | 2020-11-19T13:06:47 | 2020-11-19T13:06:47 | 313,021,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | 2908.py | a = input().split()
b = []
for i in range(2):
try:
b.append(0)
for j in range(3):
b[i] = b[i] + int(a[i][2-j])*pow(10,2-j)
except:
break
if b[0] > b[1]:
print(b[0])
else:
print(b[1])
|
f43f566a6e5023c4ee1de76dbc2de8dd0e08f2f2 | 2130d9d0a110540dc55baec9f32025ba778c5b2a | /instances_management/celery.py | 3fd3ab7882a2b850467fea4137431c514ecaf37e | [] | no_license | luigibertaco/spike-k8s-instances-mngmt | c66af68f296926a3a429d2c1947e0a2f0ed4c3df | ee4eb8d4c2e6cd890d0bd90d6edb0d77b0b8889b | refs/heads/main | 2023-03-29T03:04:02.946067 | 2021-04-06T05:10:11 | 2021-04-06T05:10:11 | 353,236,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 235 | py | celery.py | import os
from celery import Celery
app = Celery("tasks", backend="rpc://", broker="amqp://guest:guest@rabbitmq:5672")
@app.task
def add(x, y):
worker = os.environ.get("WORKER_NAME")
return f"{x} + {y} = {x + y} [{worker}]"
|
93ddb10e72c904fa3ef1a86b741e8187d35f6487 | 15f026c383a5437680e865b45dc81c675c02f173 | /locale/reptile_img.py | 6e304a1bd6c4b02d11d97f348cc8d9ee7da69ed7 | [] | no_license | wendell-cy/mydjango | 7a6bcba9961e3525e6b5daddd3ed95034e9bed15 | 6b2df73c2a02be7cb08c55c23c04a1fde5af7937 | refs/heads/master | 2023-02-18T06:30:53.798530 | 2021-01-07T06:35:59 | 2021-01-07T06:35:59 | 321,292,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,477 | py | reptile_img.py | import bs4
import requests
import time
import os
import threading
# def ojue(i):
# bs = bs4.BeautifulSoup(requests.get(r"http://www.umei.cc/bizhitupian/diannaobizhi/"+i+".htm").text)
# bs = bs4.BeautifulSoup(requests.get(r"http://www.jj20.com/tx/katong/").text)
req = requests.get(r"http://www.jj20.com/tx/katong... |
52ca19d26e6da7f0a8af98486b2be4ad9ad7de5c | bf3e4fc067a15efe0eaeb377069ca2f66631ded7 | /passwordgenerator.py | 00d7253513316d9585b0451d3f2964d48beacc65 | [] | no_license | danbuck84/mystuff | 2dcf43e6ed105ff4046c1d61ba811b30b5c92c92 | 05e8820487da1cb4c389322fe28171082a0fa33c | refs/heads/master | 2020-04-07T00:31:55.296878 | 2019-12-07T12:22:05 | 2019-12-07T12:22:05 | 157,907,421 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | passwordgenerator.py | import random
import string
def create_password(n):
allChars = list(string.ascii_letters)+list(string.digits)+list(string.punctuation)
passphrase = []
for i in range(n):
tmp = random.choice(allChars)
passphrase.append(tmp)
res = "".join(passphrase)
return res
test1 ... |
a62091739bf9e1503f163fb2d97c301b0d7ffb2b | 03ebc094f517a06c8249c0e1ae9ce953ce69ff8a | /Femur_axes.py | 2c01e83bfa9d79e9433409d5d685633111493f6d | [] | no_license | wpwow/Femur-Pre-op-Planning-in-Blender-using-Python-scripting | c5ad380511c1b1305c682ca3d6d964ad21656206 | 5ed68b51a9aba4f0c5222401bf63d8ecc1fbbe60 | refs/heads/master | 2023-04-28T23:47:13.533984 | 2021-05-23T09:41:44 | 2021-05-23T09:41:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,938 | py | Femur_axes.py | import bpy
from bpy.types import Operator
from .myPackage.Femur_functions import copy_object, make_axis, unhide_list,unhide, move_to_collection, delete_obj, check_obj_list, check_create_collection
class FEMUR_OT_MechanicalAxis(Operator):
""" """
bl_label = "Mechanical Axis"
bl_idname = "object.mechanicalax... |
0e3543098cabb5c6b2c47165d090ee5c78afb2f1 | 56b63013206ad9616927c25986334c5c2d9c85b8 | /1.py | 1d1fccc86a24c154eca0d7f7626f45b4236e8443 | [] | no_license | grizzlytheodore/Computer-Vision-Edge-detection | df4da2634da8dabbddf05d6bc1dd4bf5aa7c8227 | bd6e303749d32f2df63e00570bf635569dcbd907 | refs/heads/master | 2020-06-25T09:31:36.156671 | 2017-06-13T17:41:16 | 2017-06-13T17:41:16 | 94,238,534 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,138 | py | 1.py | import numpy as np
import cv2
from scipy import signal
import math
import matplotlib.pyplot as plt
from PIL import Image
def rescale(matrix):
scaled = ((matrix - matrix.min()) * (255 / (matrix.max() - matrix.min()))).astype(np.uint8)
return scaled
def computeC2(sigma, theta, filterRadius):
num... |
8ad8c626a46688458c167d374f627fe6675c3100 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/S/shervinafshar/the_meta-activism_project_dataset.py | 7477c3171ac6ca44be8560791ea83635888b5c8b | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,586 | py | the_meta-activism_project_dataset.py | import scraperwiki
import urllib
import xlrd
import StringIO
try:
scraperwiki.sqlite.execute("DROP TABLE IF EXISTS Meta_Activism_Dataset")
scraperwiki.sqlite.execute("CREATE TABLE Meta_Activism_Dataset ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, 'sheet_id' STRING, 'title' STRING, 'country' STRING,... |
6f79202f943977aa0be5cb6696884153b51bfc46 | 0bed617dc177fffb592a5d00ab68768f552f6911 | /fireweather.py | 149a5f52ade50dd1a272ab27d126de3e7ae42b75 | [] | no_license | yoons12055/ice911Clinic | 647e5a5b8f4e6dce050f9590bc4d7c7ce2536913 | 5e9e5d79c840921bd8569f2016630f7a77765541 | refs/heads/master | 2023-03-22T00:25:35.172539 | 2020-05-12T02:08:03 | 2020-05-12T02:08:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,820 | py | fireweather.py | # SPEI Calculator for netCDF files
import datetime as dt
from dateutil.relativedelta import relativedelta
import numpy as np
import os
from netCDF4 import Dataset
import pickle
import sharppy
from sharppy.sharptab import profile, fire, thermo, utils
# method to generate time bounds given a starting month and how many... |
1e651839abd5ade327dcca6fdb0b1fa8eb1c3565 | 143fd49858528d25d4695b4563be5defe701a61f | /0x0B-python-input_output/12-pascal_triangle.py | 1be98cf9f344a8a2ae1e8a2b6e0c77ef4bf1e8fb | [] | no_license | jemn21819/holbertonschool-higher_level_programming | a64e0ead14165542d3eb17cf10c8b915e1f8570e | bb8ad3e7c15086fcd3d94f1d103ac38bc851e01f | refs/heads/master | 2023-04-17T10:24:35.623482 | 2021-05-04T21:22:58 | 2021-05-04T21:22:58 | 319,295,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 449 | py | 12-pascal_triangle.py | #!/usr/bin/python3
"""
Module Pascal Triangle
"""
def pascal_triangle(n):
"""pascal_triangle """
if n <= 0:
return []
if n == 1:
return [[1]]
triangle = [
[1],
[1, 1]]
for i in range(1, n-1):
row = [1]
for j in range(0, len(triangle[i]) - 1):... |
5d1b1bd18113e6dd0e61570e2eb40a2186972c78 | 4d526420fabc759b99ad9292d14ae8fe33471879 | /练习题/00020斐波那契数列.py | ef9a5ed562936919b8a3c147e5cf972b5dc5954f | [] | no_license | jerryfeng007/pythonCodes | 6d69fb2f8cef24608b012d814acea350e5987a30 | 69a1ece78741abe9a0aad931918c6fff607f21f2 | refs/heads/master | 2020-05-18T06:37:23.039701 | 2019-11-13T04:23:36 | 2019-11-13T04:23:36 | 184,239,405 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 421 | py | 00020斐波那契数列.py | # 斐波那契数列指的是这样一个数列 0, 1, 1, 2, 3, 5, 8, 13
# 特别指出:第0项是0,第1项是第一个1。从第三项开始,每一项都等于前两项之和。
def feibo(n): # n代表第几项的值
if n == 1:
return 0
elif n == 2:
return 1
return feibo(n-1) + feibo(n-2)
num = eval(input('返回几项:'))
for i in range(1, num+1):
print(feibo(i), end=',')
|