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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
64093ea3d2802a3c5371ac7a1ee39314376dc617 | ae0f8ffce9b41d4833aec3f91dab74dbf28e0db9 | /app_aeronaves_light/provincias/migrations/0003_auto_20161129_1505.py | c2a912f69f4e21a417f534de1cfc194debefe3cb | [] | no_license | gfcarbonell/app_aeronave_light | 19db35eb5b42657aab67b7895d3e50146f3df786 | 2730f88f0d5bf5603585dce705bb098e0fbd3f40 | refs/heads/master | 2020-06-10T23:52:09.479200 | 2016-12-21T15:32:52 | 2016-12-21T15:32:52 | 75,839,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,229 | py | 0003_auto_20161129_1505.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2016-11-29 20:05
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('provincias', '0002_auto_20161122_1245'),
]
operations = [
migrations.RemoveField(
... |
0705c13570b774ce0164d9db0ab1e7353abb1e05 | ff3acb417fb9126071166836a4e7826c4e8a3298 | /processor.py | c84a549b26de1b17589111044914d4e2da28d8ea | [] | no_license | NickOzzy/Fusion2 | 39dff8205933148b19ff283fca4ea16707b70e7a | 3cec6e0bb37416ce0f8fd8cf928104cfcad7912a | refs/heads/master | 2023-08-13T01:22:10.589937 | 2021-09-23T17:01:47 | 2021-09-23T17:01:47 | 388,076,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 898 | py | processor.py | import amjuel_tables as ajt
def get_H2plus_H2_ratio(ne, Te):
ratio = (ajt.amjuel_tables('h2', "H2_3_2_3", ne, Te) + ajt.amjuel_tables('h4', "H4_2_2_9", ne, Te))\
/ (ajt.amjuel_tables('h4', "H4_2_2_14", ne, Te) + ajt.amjuel_tables('h4', "H4_2_2_11", ne, Te)
+ ajt.amjuel_tables('h4', "H4_... |
58f052c156a5df7ad0ec6bac6fe9f069ad192382 | 4d39c10df2863d24d50106612b1081b765df5728 | /2.2a.py | 29f04f0775b12539b33b3c325ab8d6fd356c1e2d | [] | no_license | Shailaj97/Python-Weekend-Assignment | 12528a8abc20e5a992922494d7e08ce0b2ce32c2 | 73aeff00643a70e687e07a649425687a5043b54e | refs/heads/main | 2023-07-18T02:14:40.886637 | 2021-09-06T09:07:22 | 2021-09-06T09:07:22 | 403,555,082 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 457 | py | 2.2a.py | #Par2, Q.no.2a
#Custom Error implemented using class
class AgeGroup(Exception):
#Exception raised for errors if the age is not in range
def __init__(self, age, message="Your age is not in the (18, 60) age group"):
self.age= age
self.message = message
super().__init__(self.me... |
dc1b0cebf7f39507ee7ea4fec8360a1d9b288bd3 | f0af6aee0ba81523292de4fae00fbd448d4b48be | /deeplearning/configure_notebook.py | fec7b040269b5530d62c36e82306ce61ceb670dd | [
"MIT"
] | permissive | adityajn105/my_docker_files | b3584be1ed164c9c6fabd891fdec4da8466f4c64 | b698059f4278b2a0db8e8b2ae9e139b33becd260 | refs/heads/master | 2022-12-03T00:03:36.977220 | 2020-08-22T15:08:06 | 2020-08-22T15:08:06 | 245,835,813 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | configure_notebook.py | import os
from notebook.auth import passwd
import json
sha = passwd(os.getenv('PASSWORD'))
configuration = { "NotebookApp" : { "password": f"{sha}" } }
if not os.path.exists('/root/.jupyter'): os.mkdir('/root/.jupyter')
with open("/root/.jupyter/jupyter_notebook_config.json",'w') as fp:
fp.write(json.dumps(configu... |
e6ea012665f1429cb7ad53e4f8284044dc952217 | 150c492f3a2f25d3419a36131d2e13b24ee3d69b | /dx_selenium_tests/lib/manage_organizations.py | ed8adb0206264c46be10eeeb579df8d00bc658f8 | [] | no_license | balaprasadmb/automation | b5c0e1838f3daa8c1eec9afd867b33ec6638ce1c | c2660e78fad970ac55ce1f72102e96805ff1ff51 | refs/heads/master | 2021-01-23T16:21:15.243835 | 2018-07-16T13:51:53 | 2018-07-16T13:51:53 | 102,739,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,026 | py | manage_organizations.py | import yaml
import os
import sys
class ManageOrganizations(object):
def __init__(self):
self.file_path = os.path.dirname(__file__) + "/../configs/dx_constants.yml"
with open(self.file_path, 'r') as ymlfile:
self.file_data = yaml.load(ymlfile)
def override_advertiser(self, adverti... |
0c351647c124098af4f3d3b7d3dd2a9282b639a1 | f8cc051b8c2d05bbe387d5607b8ab6e50e9b8e2d | /utils/sqlconnect.py | 575dc1b548c47e366346fd59afda60ef036bf8b8 | [] | no_license | RelativelyValuable/FrustratinglyUnnamedDesign | 4171681ecbbaa4a79ff62b4d7f6b2a7dfb0bbcc0 | f256f5e5732abad8dd7a9c37d0eafe3b32d18783 | refs/heads/master | 2022-12-19T08:10:55.923831 | 2019-10-20T22:24:30 | 2019-10-20T22:24:30 | 211,728,121 | 0 | 0 | null | 2022-12-08T06:43:33 | 2019-09-29T21:24:14 | Python | UTF-8 | Python | false | false | 873 | py | sqlconnect.py | import json
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
def _extract_postgres_settings(appsettings_file_path):
with open('appsettings.json', 'r') as fh:
settings = json.load(fh)
postgres_configs = [config.items() for config in settings['Postgres']][0]
postgres_con... |
1249148070ca6f544562dac6037421ccd0bcbdfe | 74fb73c5ef124d3563ee60e72f52885214d36d0d | /app/main/model/blog.py | f892bd738782829fb9ed039d75dd619f0c0fa595 | [] | no_license | KMaina/supplements | 48d4dea310dc5b63c7f1b35a78b4475958d84352 | 1dc40ec3adfbfdc0a0f2b47021866c76b9db88db | refs/heads/master | 2023-02-01T22:53:13.599613 | 2020-12-08T18:37:10 | 2020-12-08T18:37:10 | 305,522,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | blog.py | import datetime
from .. import db
class Blog(db.Model):
""" BLog Model for storing blog related details """
__tablename__ = "blogs"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
title = db.Column(db.String(255), unique=True, nullable=False)
body = db.Column(db.String(5000), uniq... |
a4cabcaf618365574b4267c6823b2958ca53ed91 | 9d767c7df630aa7782264cc51073065e1f5d4c5d | /mlia-examples/src/network_analysis/small_world.py | 8877e84e8fdaf41432fc831f5215f056aceacf55 | [] | no_license | GomesNayagam/workspace | 497e6eaad2785875a02f870cd384516b72501110 | d23e806cbbe0decc8a34bcd61636468a46f439a4 | refs/heads/master | 2016-09-06T17:45:52.800243 | 2014-09-25T13:51:20 | 2014-09-25T13:51:20 | 24,454,554 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,009 | py | small_world.py | from __future__ import division
import networkx as nx
import numpy as np
def print_stats(G, name):
G = G.to_undirected()
num_nodes = G.number_of_nodes()
num_edges = G.number_of_edges()
# network clustering coeff is given by watts and strogatz as the
# average of the local clustering coeffs of all the vertic... |
3878b8d3755b64649be4459685546043c9f0620f | a5a48328b54a831eed5231feb58c23b522c53726 | /Code/coverage.py | 4e1c2907a126ce659e9c950eb1d50456b53dc14e | [] | no_license | charlesrambo/AFP | 6a06e20439f7a6fc097971a186bd74912baa76ee | 04b5785062dfa997b0bffcbca33a7825057da17c | refs/heads/main | 2023-03-12T03:52:53.065767 | 2021-02-04T19:53:10 | 2021-02-04T19:53:10 | 322,986,192 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,439 | py | coverage.py | import pandas as pd
import matplotlib.pyplot as plt
import time
import numpy as np
import datetime as dt
from pandas.tseries.offsets import MonthEnd
import custom_functions as cf
# Record start time
start_time = time.time()
# Record path
path = r'C:\\Users\\rambocha\\Desktop\\Intern_UCLA_AFP_2020'
# Wh... |
f30bfe2ec5e0873da3a288de68e7fe5fd1c6c1cc | 52fec946659fbbefee69be981b2ae829821716c1 | /tools/testgpio.py | 38fb60683e84f1cb24077d634e83eeb51de581d3 | [] | no_license | gnikoloudakis/IlioupoliCompost | 0833fc2588c24428643455241c5b8bbec038dbca | 9fb24373ac2c6e4d05ad277fc26434763d92f743 | refs/heads/master | 2022-07-22T07:52:38.207231 | 2017-07-14T18:57:52 | 2017-07-14T18:57:52 | 84,944,764 | 0 | 0 | null | 2022-07-06T20:07:48 | 2017-03-14T12:08:52 | JavaScript | UTF-8 | Python | false | false | 742 | py | testgpio.py | import time
import RPi.GPIO as gpio
def testtt():
gpio.setmode(gpio.BCM)
gpio.setup(5, gpio.IN, pull_up_down=gpio.PUD_DOWN) # Motor1
gpio.setup(6, gpio.IN, pull_up_down=gpio.PUD_DOWN) # Motor2
gpio.setup(13, gpio.IN, pull_up_down=gpio.PUD_DOWN) # Vent
gpio.setup(19, gpio.IN, pull_up_down=gpio.... |
7f619f60756b5e26ddef2110a25ca5d266ed1603 | 7d799de049e1ad046020c51cc7f4653d00d3ad9e | /cartoon img/cartoon_img.py | 97f654159a4044a1cac39b46c71e7fc32df8068a | [] | no_license | YashDoke/MY-Python-Turorials | 3a980dd63cc6ee77c545aaeac6cb341873e27bfd | 2ddc4c3f5678c70e8f17231784b7c92219cc8933 | refs/heads/main | 2023-05-31T02:44:58.776904 | 2021-06-28T05:51:38 | 2021-06-28T05:51:38 | 371,673,580 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | cartoon_img.py |
# importing required libraeies
import cv2
import numpy as np
# reading image
img = cv2.imread("yash2.jpg")
cv2.imshow("img",img)
# converting img to RGB
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
cv2.imshow("RGB",img)
# etecting edges ogf the input image
gray = cv2.cvtColor(img,cv2.C... |
995f5bf04798b292fdc9c405fc6e6e472f61d939 | 00b0774725fa2ee3bc2fc32ea06f9a6113da07fe | /lecture03/lecture3_v2.0.py | 06a466c9dbcdeb8f8290c48fba4728d4f70612ca | [] | no_license | Aleks-du/Pyhton | 4c85a10834a5d066524489338d97314902ff0958 | 8569585ec341442ff4c89a4cd6c70fef3bb5ebfa | refs/heads/master | 2023-02-02T15:12:53.184861 | 2020-12-24T11:23:44 | 2020-12-24T11:23:44 | 297,014,596 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,853 | py | lecture3_v2.0.py | stroka = input('введите температуру, и поставьте значек "C" или "F" соответственно: ')
stroka = stroka.strip() # удаляем пробелы
if len(stroka) < 2: #длина строки должна быть больше двух символов
print('мало')
exit(1)
# оператор присваивания # <-отрезаем саму строку с числом, если оно там есть
snu... |
88cf29d1a82e568fc8a1bbb3d95db5655c023b01 | 2558ee962f83929830c00741e8ad5b04f0dbc254 | /04/16.py | b545b22a23db85a77f3f88beac9fdba3248e2546 | [] | no_license | loveQt/PythonWebSourceCode | 80ffc7cdd8882acb2ab70c4b8fa46a51560d2e04 | 086ac2acbb388eda0656c99e86b00c7020e4acba | refs/heads/master | 2021-01-10T21:08:32.485624 | 2015-06-16T15:39:55 | 2015-06-16T15:39:55 | 37,539,522 | 0 | 1 | null | null | null | null | GB18030 | Python | false | false | 265 | py | 16.py | def addUser (usernames = [] , realname='无名', addres = '河南省郑州市'):
username = usernames[0]
if username == 'admin':
print "添加成功!"
else:
print "添加失败!"
addUser(['admin','maxianglin','yangxiaona'])
|
c554721c3c6462a7a3d70a565cf14fa820055083 | 230f133e2160a713750506617ff3af185e4660ec | /tests/test_misc.py | a14ce06fa1ba7604b40fda17b0f7977874e6b032 | [] | no_license | UriCW/GS-Scrape | 46c903b44e5701106e8a2b1fa00dd17ffc43a04d | ccc70c416243e6d5310ec3329b5bd85abc57f58a | refs/heads/master | 2020-06-13T16:12:08.202034 | 2016-12-18T00:54:50 | 2016-12-18T00:54:50 | 75,359,864 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,217 | py | test_misc.py | import sys
from bs4 import BeautifulSoup as bs
from ..src.ContentHarvesters import *
from ..src.DirectoryHarvesters import *
from ..src.Helpers import *
import urllib.request
import urllib.parse
import warnings
import json
import http.cookiejar
def prt(txt):
sys.stdout.write(str(txt)+"\n")
def get_html_string(fna... |
d79cecf048e3ce6ac8decc232552fd7037711d04 | 5163827e31d9a8b6a830327e162b9504c4f50b82 | /henipipe/samComp.py | 76016c52a2e979f5adf3a01dfebfd54d1031ddd8 | [
"MIT"
] | permissive | scfurl/henipipe | eef3566c500bf9cb879f07eaaedc5c24535e4279 | b399123ef0a12380daef442606967da73aaea302 | refs/heads/master | 2023-06-25T14:47:01.970324 | 2023-06-12T14:30:25 | 2023-06-12T14:30:25 | 207,971,695 | 6 | 5 | MIT | 2022-11-13T18:13:05 | 2019-09-12T05:29:11 | Python | UTF-8 | Python | false | false | 2,480 | py | samComp.py | #!/usr/bin/python
#v0.2
import sys
import argparse
# inFileA = args.sam1
# inFileB = args.sam2
def samComp_writer(inFileA, inFileB, outfile, mode):
reads = {}
for line in inFileA:
#deal with header
if line[0] != "@":
data = line.strip().split('\t')
name = data[0]
... |
0929da52998a0d25b5e0443af4cab212460953ce | 9a44a90b916939b3a923d23c6eb4256e7f5a6432 | /Version.py | fc710f4708529578dfc485f69707d9aa80a47ce3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jeremykenedy/PlexConnect | e8d8c96a0dd1d966daad64a893ba57fb1c192dff | 1088c3cedc0380d74a7553ba1fd8bae792db5a5c | refs/heads/master | 2022-02-16T01:46:23.434670 | 2015-05-24T07:48:22 | 2015-05-24T07:48:22 | 36,347,694 | 1 | 0 | NOASSERTION | 2022-02-01T02:29:14 | 2015-05-27T06:25:04 | Python | UTF-8 | Python | false | false | 143 | py | Version.py | #!/usr/bin/env python
"""
Version.py
"""
# Version string - globally available
__VERSION__ = '0.5-dev'
__COMMIT__ = '24 May 2015 07:46UTC'
|
06b19196199f371bbb84614503ee239009e77280 | 849ccea02c442c00e8fbb810e309550b79f8b7de | /preprocessing/spliting_data/split_tr_valid.py | 346f36c1c9b715eea726c6cd033665faf49dc13f | [] | no_license | Ash1909/session-rec | df06ff85180dfd287951c233ac2a59bde12b3892 | 5dcd583cbd8d44703a5248b9a308945f24b91390 | refs/heads/master | 2023-08-28T23:03:37.611126 | 2021-11-05T10:41:47 | 2021-11-05T10:41:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,979 | py | split_tr_valid.py | import pandas as pd
import numpy as np
import evaluation.loader as dl
from datetime import timedelta, timezone, datetime
FOLDER = 'data/'
PREFIX = 'train-item-views'
DAYS_TEST = 5
def main():
train, test = dl.load_data( FOLDER, PREFIX )
split_data(train, FOLDER + PREFIX, DAYS_TEST)
def split_data( data, ... |
11c287459b7768a14f45dda4c310eb6094884451 | de8f9a1dfbeb2547527ac260a6b5d7d97a7f4914 | /Flow Control/guessTheNumberAuto.py | b6ba2f25895d4196061e01cdca42e84aeec2e67f | [] | no_license | cliffmieser/ATBS-notes | 1025ab1c9f3886c112d50e76d62eda906e55ec71 | 6ea30e67710ee1f5b92bc2fc04d353c02c476e49 | refs/heads/main | 2023-08-11T07:06:26.025578 | 2021-09-25T05:51:02 | 2021-09-25T05:51:02 | 397,681,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | guessTheNumberAuto.py | #guess the number auto
import random
secretNumber = random.randint(1,1000)
print("Looking for secret number...")
guess = 0
for guessesTaken in range(1,950):
print("guessing number")
guess = random.randint(1, 1000)
print("I'm guessing: " + str(guess))
if guess < secretNumber:
print("Guess ... |
43db971d4df752617800c26e543466412b119d6d | c1f2d0e7df396dc13526998e2af10702131a3ba1 | /aristotle_mdr/admin.py | 0bfcdfdcc3cb264ca71994e5009a6309ba2e9378 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | DIN-DKE/ISO_IEC_11179__jadedjester_aristotle-metadata-registry | 178e26d37b519c07767bc124601336a0e9286566 | e1140c626783afa26362696aea43d5bed04c37a3 | refs/heads/master | 2023-03-27T23:51:59.925863 | 2014-11-23T04:24:33 | 2014-11-23T04:24:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,795 | py | admin.py | from django import forms
from django.db.models import Q
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.contrib.admin.filters import RelatedFieldListFilter
import aristotle_mdr.models as MDR
import ... |
e7fbc11a7a610744f6ebcebe1f68db2936439150 | 8bfeaf46c79de64ac059e8215ec78a1bc90a4287 | /mimic/number.py | eb127b02a71ce4831a9b1143cad3f8000a87a4e4 | [
"MIT"
] | permissive | ramazanpolat/mimic-fraud-data | 6ad94b21e3c4ffeae794696cd4aff6fb21f3cb20 | 61a76604d1cdecdea0d92234ba83c11866aee7a0 | refs/heads/main | 2023-04-05T01:10:47.493698 | 2021-04-01T20:34:23 | 2021-04-01T20:34:23 | 349,770,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | number.py | import random
class Number:
@classmethod
def integer(cls):
return random.randint(1, 1000)
@classmethod
def between(cls, a, b):
return random.randint(a, b)
@classmethod
def binomial_dist(cls):
return None
@classmethod
def normal_dist(cls):
return None
... |
83d2b8797edc79ab0c36d68bd204fba9179831f2 | b79e1d5f465de9ab089dbdfd016516732a0ee7f4 | /models/BIDAF/utils/layers/customLayers.py | 0397496e6c1fa4de58674621486a77cb55e4fa84 | [] | no_license | amrlnic/SQuAD | 8b0788f448e74a4b1e27d5112c533ab41bbb982a | 5a2da8bbfd6b61e37b3b9c56cf4400c6a5148c8b | refs/heads/main | 2023-04-08T21:34:48.471035 | 2021-04-14T17:18:32 | 2021-04-14T17:18:32 | 339,973,368 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,172 | py | customLayers.py | from tensorflow.keras.layers import (Embedding, Layer, Conv1D,
TimeDistributed, GlobalMaxPooling1D,
Dense, Bidirectional, LSTM, Dropout)
import tensorflow as tf
class WordEmbedding(Layer):
def __init__(self, input_dim, output_dim, input_len, embedding_matrix, trainable = False, mask_zero = True... |
9d9d23702fa5ba228e90f5ffdc97790f1e701e8a | dc121ef8cfb9c4a8659698d15dc6bd27236ff093 | /blog30-lh&cy/blog30_09.py | decf8f66c7aab5eb34b61c8d27786ee45836a499 | [] | no_license | WeiSen0011/ImageProcessing-Python | 29328179d26f16242953957ae0d5a190a5265387 | 85438d642cb6093a100dcd1b9146e784b43b2b53 | refs/heads/master | 2023-07-14T01:16:30.481792 | 2021-08-20T09:54:03 | 2021-08-20T09:54:03 | 400,161,692 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 332 | py | blog30_09.py | # -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
#读取原始图像
img = cv2.imread('lena.png')
#图像向上取样
r = cv2.pyrUp(img)
#显示图像
cv2.imshow('original', img)
cv2.imshow('PyrUp', r)
cv2.waitKey()
cv2.destroyAllWindows()
|
16096c71e3a77f138d6da8a46db600d4c2274e60 | 58fcb934a27824a2dc2bbec2214ab3d01e2016ea | /play/tests/test_tiebreaker.py | 260081554595d00f63942f2cf735f543d1195802 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | edelgm6/montecarlo-holdem | 0ea19887dbb914319ffa4f4ab74a8c0157870dda | 90e4d50b44b0c2da01dcb31babcbefb7bbe4a96e | refs/heads/master | 2021-09-09T19:39:37.516934 | 2021-08-30T17:32:23 | 2021-08-30T17:32:23 | 162,742,210 | 2 | 0 | MIT | 2021-06-10T21:05:25 | 2018-12-21T17:42:54 | Python | UTF-8 | Python | false | false | 22,641 | py | test_tiebreaker.py | from django.test import TestCase
from play.models import Game, Deck, Card, Stage, Suit, Hand, Player
class HighCardBreakerTestCase(TestCase):
def test_returns_winner_for_tied_high_card(self):
players = [Player(), Player()]
game = Game(players)
game.community.append(Card(s... |
6506763657189c9b64d3d955b6f1f31476ccee87 | 7ba211e88f94fb145123010b16386b10ae413611 | /4/yield.py | cb1dc6b354fa56807f76ebadb8ac70c9a2f3b9cd | [
"MIT"
] | permissive | gdaPythonProjects/training2019 | 644020628c731aec0f9916baa0ac975537310aa8 | 19b61c77918b25caf30bbb15e3f5ead6cbad1af3 | refs/heads/master | 2020-09-03T01:50:05.472045 | 2019-12-17T14:40:12 | 2020-01-12T16:27:52 | 219,355,258 | 4 | 3 | MIT | 2020-01-12T16:27:54 | 2019-11-03T19:40:07 | Python | UTF-8 | Python | false | false | 318 | py | yield.py | numbers = [1, 2, 8, 4]
def multiply_two(lst):
for num in lst:
yield num * 2
result = multiply_two(numbers)
print(next(result))
print(next(result))
print(next(result))
print(next(result))
result = multiply_two(numbers)
print(list(result))
result = multiply_two(numbers)
for i in result:
print(i)
|
df0ad2b7c75da51e98a9c9ef818f19e178231bd5 | f5408d4760b6a88b5b3c5ae883622a9d182780c0 | /arrays_and_strings/check_permutation.py | c1030c3aee2ea392ab784e0da9bb7d87e848e91c | [] | no_license | josephcampion/get_cracking | 6d747956c33e4a5252e7185f1263692b4ca2f78e | c9f2706b6d98342cb909f53e21ad25b54bce13dd | refs/heads/main | 2023-07-13T10:54:47.321616 | 2021-08-09T22:48:53 | 2021-08-09T22:48:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,390 | py | check_permutation.py |
from hash_table import HashTable
def check_permutation(str1, str2):
if (len(str1) != len(str2)):
return False
str1 = ''.join(sorted(str1))
str2 = ''.join(sorted(str2))
print(str1)
print(str2)
for i in range(len(str1)):
if str1[i] != str2[i]:
return False
ret... |
2dbdc9f2953ea153c1a7fbe599db4b97440e43b8 | 52c91f45055e5a6ab146ff36ab203ef0b09e715c | /src/data/explore.py | 99f1bad02b1fcc262aececfcdee3df483389ffdc | [] | no_license | apanchal/iima-epaba-batch03 | 71eed78a8f4bae22cdb6eea93b2745ab894ac556 | b3e2c82982570769d019c60246cfb86baf365a69 | refs/heads/master | 2022-10-16T08:25:43.386389 | 2020-06-11T14:38:37 | 2020-06-11T14:38:37 | 259,266,198 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,088 | py | explore.py | """
Project: Object Recognising Traffic Signs Using Deep Learning
Mentor: Prof. Ankur Sinha
This file contains all functions related to data exploration.
@author: Ashish Panchal(aashish.panchal@gmail.com)
"""
import matplotlib.pyplot as plt
import random
import os
import sys
import numpy as np
import statistics
fr... |
3d09cbfb21e00756f573dc4ef2c2847f5d49e92c | 89284da682f723c6aaad8ef6bba37ac31cd30c92 | /PythonTutorial/Basic/6.1_file_method.py | d779ed4cf07c1e3dd63568a300a5eb46ca617253 | [] | no_license | Danielyan86/Python-Study | 9d9912e0385c5b4d2b7272e9eaca542ff556dc1a | 782c1638eb9733a4be4acbc4c805a78f0fe77546 | refs/heads/master | 2023-03-17T13:26:31.865927 | 2023-03-05T12:30:07 | 2023-03-05T12:30:07 | 26,902,349 | 28 | 25 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | 6.1_file_method.py | import os
try:
# 创建文件夹
os.mkdir("new_folder")
except FileExistsError as e:
print(e)
print("file is existing")
# 获取当前目录
print("=" * 20)
print("print current folder path:{0}".format(os.getcwd()))
# 获取指定目录文件列表
os.listdir(".")
print("list the files:{0}".format(os.listdir(".")))
# 切换到子目录
os.chdir("./new_... |
6d87e1b36caf7e5485219d318ed037d658f9b566 | 09caa57cf3de9d72f6dcf84dc5e6d91cb31d2011 | /privilege/migrations/0001_initial.py | 2af1b88f57030b7621bb19917faf7fbf6df4871f | [] | no_license | dingzheng12A/devops | c95616ed69ebc4f5d82872a96c586f00fdca4f0f | 23220833a880c1211f87e1496cfa9aa59c5a2d39 | refs/heads/master | 2022-12-10T17:53:57.897717 | 2018-09-26T00:44:04 | 2018-09-26T00:44:04 | 146,391,441 | 1 | 0 | null | 2022-12-08T02:56:56 | 2018-08-28T04:21:03 | Python | UTF-8 | Python | false | false | 840 | py | 0001_initial.py | # Generated by Django 2.0.7 on 2018-09-13 07:09
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Privilege',
fields=[
... |
26ae65db80d0b888128ad6e63d710d16f4c964dd | c39fedfd05971908d4cc2f388b55ac6551f78695 | /kmer.py | 4481c078cf4d258102fb556689d468aaff8a06dd | [] | no_license | paulkarayan/rosalind | 3b2e3ef8a08ab622a58abb89b7924c0c3ea65a24 | 8ea33424265d31bef5da97f1389c7590f69699b2 | refs/heads/master | 2018-12-25T07:40:43.543690 | 2018-11-13T16:04:41 | 2018-11-13T16:04:41 | 58,022,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,134 | py | kmer.py | # Order all kmers lexicographically
# The 4-mer composition of s.
import itertools
from utils import fasta_breakup
## test cases
SAMPLE_DATASET = """>Rosalind_6431
CTTCGAAAGTTTGGGCCGAGTCTTACAGTCGGTCTTGAAGCAAAGTAACGAACTCCACGG
CCCTGACTACCGAACCAGTTGTGAGTACTCAACTGGGTGAGAGTGCAGTCCCTATTGAGT
TTCCGAGACTCACCGGGATTTTCGATCCAGC... |
84b1c8160bc85dee50b8f7d58271aec5a6908ceb | 02efdd3b2603a13e8ae2de20597123f8057baaa0 | /draw_disparity.py | 0ade4d0440f49ea42c0b3a1efa48061cbc0a92b3 | [] | no_license | liweim/cone-detection | 7bb66055283d1c1511c282651d69deb1beb69207 | 3957de9301df4a0686f63cc3023b92967ab811f2 | refs/heads/master | 2023-03-10T21:11:58.764433 | 2018-05-24T22:32:06 | 2018-05-24T22:32:06 | 107,757,977 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,712 | py | draw_disparity.py | import numpy as np
import cv2
import pandas as pd
import xml.etree.ElementTree as ET
colors = [(0, 255, 255), (255, 0, 0), (0, 165, 255)]
def draw_disparity():
csv_path = 'tmp/result/1513418744.114132.csv'
img_path = 'tmp/disparity.png'
img_source = cv2.imread(img_path)
img = cv2.resize(i... |
dcf887315155db89f05031b1961dea4f3f00b73d | cd402bd56994f30d8fac6aeb4607a495d797c578 | /Introduction_to_MPI/Solutions/python/ex1-hello/hello.py | 78bed76e6f51dd0f96ce66d3979ed95eba0675f0 | [
"CC0-1.0"
] | permissive | ADACS-Australia/HPC-Workshop | 90155c74bf6980ccdf87b5be8d15462c091bb758 | 5fccfa8a3d9fd67760722656d41f6ba8de80339c | refs/heads/master | 2021-08-20T10:25:23.594429 | 2017-11-28T22:13:08 | 2017-11-28T22:13:08 | 111,770,883 | 6 | 5 | null | 2017-11-27T21:43:08 | 2017-11-23T06:17:20 | C | UTF-8 | Python | false | false | 453 | py | hello.py | ##################################################################################
#
# An introductory MPI program using the default communicator
# MPI_COMM_WORLD to print a message to the screen on each rank.
#
##################################################################################
from mpi4py impor... |
861218795d008b4e93cad8a6119a7f14fc7e2f52 | 0446f1a084386bd6f712af04a1c180bbefcde4d9 | /Field.py | 34739cbfb1133596966e009118f0336322ff94fc | [] | no_license | nielsly/2WF90-polynomial-and-finite-field-arithmetic | f98dde277d29deb266eaff7f38bd7d36da75fecb | 3be773c4dd6c7b6122bba6371ada9024155f1eb5 | refs/heads/master | 2023-04-13T10:52:50.610374 | 2020-10-22T19:29:32 | 2020-10-22T19:29:32 | 303,215,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,425 | py | Field.py | from random import randint
from Poly import Poly, find_irred
known_primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
class Field:
def __init__(self, m: int, poly: list or Poly):
"""
Initialise a Field
:param m: Modulus of the field
... |
b1a0ea9dccf7732d717372dc2adcbd3136073e10 | f82cd0310cea3c89cd557c99f8805696cce00256 | /PyPoll/main.py | 53d82e6a250e272f08d9ba6d5fb475331cef1e39 | [] | no_license | WWatkins142/python-challenge | 8a147b60cd161a4bf40c2c01d5ece0d8db96377c | 0079a2e50b8446814d0edc68773772b1ba398120 | refs/heads/main | 2023-09-01T17:41:51.966905 | 2021-10-03T00:41:30 | 2021-10-03T00:41:30 | 411,878,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,087 | py | main.py | # import modules
import csv
import os
# source to read the csv data
fileLoad = os.path.join("Resources", "election_data.csv")
# variables
totalVotes = 0
candidates = []
candidateVotes = {}
winningTotal = 0
winningCandidate = []
# output file for election analysis
outputFile = os.path.join("Analysis", "election_analy... |
962d047faf452b52014d1b35948ca85b1fba50a9 | 88de8bc1890ea0a2e734406e50738092badaf7e4 | /basics/common/module_ex1c.py | 75971664516c3ccd25dcc2f41ddf9012ec90775f | [] | no_license | GitLeeRepo/PythonNotes | fe3a577a33a3343f2aac2836f775b0bacc0d9a79 | 39bc1a1526864439b3e6f093eef1b42c036dd5e8 | refs/heads/master | 2021-08-24T13:54:32.129903 | 2018-11-02T21:09:47 | 2018-11-02T21:09:47 | 106,147,369 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | module_ex1c.py | #!/usr/bin/python3
# Example of a module imported by module_ex1a.py This one is in a
# subfolder named 'common' from where module_ex1a is located, which
# along with the __init_.py file makes it part of a package called
# common. The __init__.py file can be empty or contain initaliztion
# code for the package.
# ... |
36b43201728c29a1d23e9c02ec2cbbebc54f107a | 6808de6580210d820e7f5621141944847563d594 | /src/openprocurement/tender/openua/procedure/state/lot.py | 76da9513378e3b145f05fba04ec27d95a5e5221f | [
"Apache-2.0"
] | permissive | ProzorroUKR/openprocurement.api | 038512afea924d644db16cfac76abad4aa4e6638 | f901e1d8913cb10fee044dc267ef7c0f42c6a947 | refs/heads/master | 2023-08-18T15:49:43.870313 | 2023-08-17T08:47:17 | 2023-08-17T08:47:17 | 132,997,417 | 14 | 16 | Apache-2.0 | 2023-03-21T22:46:44 | 2018-05-11T06:16:18 | Python | UTF-8 | Python | false | false | 264 | py | lot.py | from openprocurement.tender.openua.procedure.state.tender_details import TenderDetailsState
from openprocurement.tender.core.procedure.state.lot import LotInvalidationBidStateMixin
class TenderLotState(LotInvalidationBidStateMixin, TenderDetailsState):
pass
|
0c354d23ba04d8cefb5a8ec9dd59c5cb7292686b | c28b7444b8569bb0b80d8ed3e5bb478eca168af6 | /electrical.py | 0b994c547a22990da9602ba3584c4627a86f4355 | [] | no_license | huazhixixi/library2 | 5be8938eeba3106e6a8835d0bf71e9834b9dff66 | 48957b88a4b2b6871267df2fa35b108bd92c0982 | refs/heads/master | 2021-02-21T08:54:09.623541 | 2020-07-17T02:26:13 | 2020-07-17T02:26:13 | 245,354,661 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | electrical.py | class Resampler(object):
@staticmethod
def prop(signal, new_sps):
if signal.is_on_cuda:
import cusignal
signal.samples = cusignal.resample_poly(signal[:], signal.sps, new_sps, axis=-1)
else:
import resampy
signal.samples = resampy.resample(signal... |
a3d2767cb515fd817dd047cfc30d4568d1f38f3a | 1a8b2f59c9695c031a0693e7028c594eb75716ec | /I0320029_soal 2_tugas 3.py | 702782cef981da0603db1f58223c37c84648e37e | [] | no_license | DwiZaki/Dwi-Zaki-Nurfaizi_I0320029_Tiffany-Bella_Tugas-3 | 1188de3b40a80b1c3449416a770392abfc243ddb | 66369b8350f70245e9f28d0ed5c209878a6e7b77 | refs/heads/main | 2023-03-31T21:50:30.392706 | 2021-03-18T07:55:15 | 2021-03-18T07:55:15 | 348,414,912 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,018 | py | I0320029_soal 2_tugas 3.py | # Data diri awal
data_diri = {'nama':'Dwi Zaki Nurfaizi', 'hobi':{1:'bernyanyi', 2:'mendengarkan musik', 3:'main game', 4:'nongkrong'},
'sosmed':{1:'ig @dwizaki86_', 2:'line : dwi.zaki', 3:'fb : Dwi Zaki Nurfaizi'},
'lagu fav':{1:'Mungkin Hari Ini Esok Atau Nanti', 2:'Pengungkapan Hatimu', 3:'... |
6d77e15532ca809c5f67d95d1b66b2b8956093e6 | a5c586f7caac4e8f0dcc758ede66a926b0748b70 | /Project4_Game_api/main.py | b57217c6970d114f79c751fbf4e464c34c01bd43 | [] | no_license | archzzz/Udacity-Full-Stack-Nanodegree-Projects | 2ec936cda2238fa1a855529fb480de4b53e5828f | b921b7aae66ac8957cc1c7e2137565930b172b4a | refs/heads/master | 2021-01-21T04:38:30.067396 | 2016-07-03T08:03:27 | 2016-07-03T08:03:27 | 49,624,143 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,142 | py | main.py | """main.py - this file contains handlers that are called by taskqueue or/and
cronjobs."""
import logging
import webapp2
from google.appengine.api import mail, app_identity
from concentration import ConcentrationGameApi
from models import User, Game
logger = logging.getLogger('google.appengine.tools.appengine_rpc'... |
d41c18af1c79d67799b6c7d1f40a0ced5753bf17 | fc8ab1e8edd56a3fbea2cb1965a453fe60c3fbfa | /text.py | 7a957f60e7dcfa8d6fe19d3f3378ae3dc55536c3 | [] | no_license | jennLam/task-assign | 1e2809417a40e122f4e4c909538845511d775d7a | 0614bcf7a582514ee56e86d61bb472ab05508886 | refs/heads/master | 2021-05-12T14:51:32.925480 | 2018-01-10T20:10:21 | 2018-01-10T20:10:21 | 116,970,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | text.py | from twilio.rest import Client
import os
def send_sms(to_number, body_message):
# Your Account SID from twilio.com/console
account_sid = os.environ.get("ACCOUNT_SID")
# Your Auth Token from twilio.com/console
auth_token = os.environ.get("AUTH_TOKEN")
client = Client(account_sid, auth_token)
... |
28efa1d9cf70943c6144715a460b37867e14599b | 8e74e3f7df5c42dfd96402c37f4de1dd8e6a95a5 | /blatann/gap/bond_db.py | 146dcbaa6d4aab9575d5d2abe38529e4c42969e2 | [
"BSD-3-Clause"
] | permissive | ThomasGerstenberg/blatann | a52b036c29c5b28cd9989dea5f35c7819d346ad9 | fe2d85b3e39ff681bb43a0e98c3e41b5d6f06b83 | refs/heads/master | 2023-04-01T12:05:02.236808 | 2023-03-24T05:42:48 | 2023-03-24T05:42:48 | 104,029,646 | 60 | 22 | BSD-3-Clause | 2023-03-24T05:42:50 | 2017-09-19T05:16:37 | Python | UTF-8 | Python | false | false | 5,716 | py | bond_db.py | from __future__ import annotations
import typing
import logging
from blatann.gap import smp_crypto
from blatann.nrf.nrf_types import (
BLEGapAddr, BLEGapAddrTypes, BLEGapEncryptKey, BLEGapIdKey, BLEGapSignKey, BLEGapSecKeyset, BLEGapMasterId
)
if typing.TYPE_CHECKING:
from blatann.gap.gap_types impo... |
5f0c16e3bbc6056ea1403549d18bd613806ecaa4 | f9d02e4a77223c55807be41409366ad01f05930e | /newfile.py | c52e7e78049c154facc7b6829d6b67fb1d88ea9c | [] | no_license | kyleniemeyer/analysis_code_2020 | 7aeab0aaae1c9b7d9218b989bdc4963345551048 | d44188af535270280cfb11a9ebd953531de70a2a | refs/heads/master | 2021-05-21T03:27:57.821927 | 2020-04-02T18:03:08 | 2020-04-02T18:03:08 | 252,519,415 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 112 | py | newfile.py | def function():
variable = 3.14159
print(f'value: {variable}')
return
def bad_function():
blah
|
9a4d00b1dd5a3f654c9742fc02a7a4049a2a4404 | 7a5db378df8a14423c5487d1ffac9c9975b380b8 | /src/sequential_heuristic_search.py | b4fe751a0de0b2212af60fa4e6389dc177154429 | [] | no_license | razorwu1994/BrandY-RW-3 | ea4d96f6aac18779e90e4d7b93e2d7c9870c6bf9 | a1f2bceaf794321676e18f8d5ac24b3f8929c598 | refs/heads/master | 2023-02-09T17:59:11.170128 | 2017-11-27T01:45:43 | 2017-11-27T01:45:43 | 109,974,001 | 0 | 0 | null | 2023-01-25T01:18:09 | 2017-11-08T12:37:16 | Python | UTF-8 | Python | false | false | 12,860 | py | sequential_heuristic_search.py | import math
from priority_queue import PriorityQueue
import heuristics as hrsts
from cell2 import Cell2
import copy
# Constants for terrain type
BLOCKED = 0
UNBLOCKED = 1
ROUGH = 2 # aka hard-to-traverse
INFINITY = 20000 # infinity value
class SequentialHeuristicSearch:
"""
Class that performs sequential heu... |
cfe8c67d6f3082a11c25197a897d853e313546d6 | 7968248b800599e090190df7835871dac3a4f1ec | /sensor/image_collector.py | 7098b6e34df3a04ddf5210fde4c9795e70b37fe8 | [] | no_license | timmodav000/PRUC | 8e83f79c4fd7dee6987b71ca98d4d0ff78fc68ca | b09690da621b7abe00ae14863479c8ce2a129393 | refs/heads/master | 2020-05-05T05:31:24.738928 | 2019-04-23T20:16:06 | 2019-04-23T20:16:06 | 179,755,723 | 1 | 2 | null | 2019-04-23T20:16:08 | 2019-04-05T21:14:49 | Python | UTF-8 | Python | false | false | 1,203 | py | image_collector.py | import os
from image_capture.pir_trigger import *
import time
from threading import Thread,Event
def get_image_list():
"""
Retrieves the current list of images in the images/ directory
:return: list of image filenames, relative to the images/ directory
"""
return [name for name in os.listdir('images') if
os.... |
32bef16f2bb7f09e9fe86ee453bb8741c6308919 | d75584ebe775cb113743c1482108b06b7d66c81b | /2020.03.31/servidor1.py | e6f564fe90ce1be6737e19148392b6f49e43c191 | [] | no_license | PabloLabriola/PNT2 | 0fad7f57b6af0cbac919c43536bec0d64e8ad467 | 90f30d50296e6e84bcd556571669bbf375e206ef | refs/heads/master | 2022-06-27T20:50:37.783833 | 2020-04-28T23:44:00 | 2020-04-28T23:44:00 | 261,536,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py | servidor1.py | from flask import Flask, request, Response
app = Flask(__name__)
@app.route('/') # Por default es GET
def saludar():
return 'Hola mundo'
@app.route('/', methods=['POST'])
def saludar_servidor():
print('me saludan')
return 'Salude'
@app.route('/', methods=['DELETE'])
def borrar():
... |
7b715137001362cc210d3f5ca608b1c596244c5e | ebe9c9ea705317954e7fc816e23c50c9202bee7f | /pagecode/contact.py | d84863bea57e303746c0a0ea66c454c4aa22f6cc | [] | no_license | shuyunchen/LG05-6-1 | 765ecf2810046ece4121b644439816651eb4d3c9 | eba7ba322a838ce0204c8bdc99df1c396f28fc5f | refs/heads/main | 2023-03-11T21:54:03.271068 | 2021-02-28T09:25:36 | 2021-02-28T09:25:36 | 343,064,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | contact.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021/2/22 0:55
# @Author : 陈庆云
# @File : contact.py
# @Software: PyCharm
from appium.webdriver.common.mobileby import MobileBy
from pagecode.add_member_page import AddMemberPage
from pagecode.basepage import BasePage
class Contact(BasePage):
def goto... |
a9762a8c6792dffab55e9bc95d0ecb70f5a027f7 | e3a44084de8c7e0d557595ad1e54f07f5a6adde7 | /2020_winter/2020_02_03/11123_GU.py | 42989e2852fc3290867074f9aa11cef0e4816615 | [] | no_license | hoon4233/Algo-study | 01fcc06c4dce4bfb4bf81c0e9ff208a0d2521512 | 817ec715bd6b2df920ed96921558387995dcfa76 | refs/heads/main | 2023-05-01T08:40:50.438250 | 2021-05-24T05:57:03 | 2021-05-24T05:57:03 | 335,468,042 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | 11123_GU.py | import sys
def inRange(y, x):
return ((0 <= y < H) and (0 <= x < W))
def sol(y, x):
dy, dx = [0, 0, 1, -1], [1, -1, 0, 0]
q = [[y, x]]
visited[y][x] = True
while q:
cur_y, cur_x = q.pop(0)
for i in range(4):
ny, nx = cur_y+dy[i], cur_x+dx[i]
if inRange(ny... |
5990ecfedac3a09924b4b34ae38e5ad45c1f460c | 9323df187f21fc631adaf09fa5c477ee49e715a9 | /Climbing.py | 68474ac8208af9cfa5b510aa19dfd8118065d510 | [] | no_license | SLGood/LostInTheMask | da0fca25e927e57a6a71909fb123265bdba4c91e | 3b1d32bc8ef451c3b34ec77482a29a81ba39e898 | refs/heads/main | 2023-04-17T06:34:03.111830 | 2021-04-27T19:24:23 | 2021-04-27T19:24:23 | 352,220,666 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | Climbing.py | # LostInTheMask
Lost in the Mask 1802
import pygame
import math
import time
pygame.init()
screen=pygame.display.set_mode([640,480])
background=pygame.Surface(screen.get_size())
background.fill((255,255,255))
background = background.convert()
r = 255
g = 230
b = 200
circlex = 50
circley = 440
clock = pygame.time.Clock(... |
7e8d455812c3793b1bca9c4cba521ca219392cce | 8ad3b7d16fba79766bdb68e7cab4dae905ffb12e | /code/network_minimal_example.py | 96fd9f2a95be52c5a73030744d9b5ef4040bd9f8 | [] | no_license | ModelDBRepository/183371 | a2e82519ee9a73063d6cb3c0f47ad44a4190e9d9 | a4e9f6e2ceac0467fbf2adc24d4cdffcb14c6eb2 | refs/heads/master | 2020-05-29T18:23:15.686380 | 2019-05-31T03:46:46 | 2019-05-31T03:46:46 | 189,298,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,445 | py | network_minimal_example.py | ## This script simulates NO diffusion over a randomly connected network of excitatory
## and inhibitory integrate-and-fire neurons. The concenctration of NO is used as
## homeostatic signal by a mechanism which adjusts the firing threshold of each neuron
## depending on how the NO concentration at that point differs fr... |
69d46801d7200b13a1b559b78aa4ac0b86ec6754 | 165f2972afbbd689a860d9d37f54e067c7fa6280 | /cnn/loss.py | 9c9caf6e327f0de250128bca0c3a8a4319d49781 | [] | no_license | Yangyixin27/Diabetic-Retinopathy-Detection_NEW | b9f9e311571a55eef15b23dd66c02e87ae049d53 | 801ca7ba70562c81403f0891e4ae28fb0ff9f6ce | refs/heads/master | 2020-05-03T20:49:20.446137 | 2019-04-01T07:55:55 | 2019-04-01T07:55:55 | 178,811,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,862 | py | loss.py | def dice_coef(y_true, y_pred):
import keras.backend as K
K.set_image_dim_ordering('th')
smooth = 1.
y_true_f = K.flatten(y_true)
y_pred_f = K.flatten(y_pred)
intersection = K.sum(y_true_f * y_pred_f)
return (2. * intersection + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth)
de... |
dbecdb3c31c9ef700acf231fe3c05eabf50fb77f | d77ede016e1423ba19a5efaabcaae12e6777e726 | /got_got/apps/got_got_app/models.py | 7077b1f8339f809ad718a018711f8cd8a3b5c802 | [] | no_license | vanhornmj4054/CodingDojo_Got_GOT | 886c00f0c1dd7e4a9e837bb34dd08cf3c28629ff | 9e4fe1795e1f289b578319cbab06ec0663de016a | refs/heads/master | 2020-06-23T19:06:31.074611 | 2019-09-05T22:59:18 | 2019-09-05T22:59:18 | 198,726,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,380 | py | models.py | from __future__ import unicode_literals
from django.db import models
from datetime import date
from django.utils.dateparse import parse_date
import re
EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$')
class LoginManager(models.Manager):
def user_validator(self, postData):
errors = {}
if... |
ad44847a94d34fd42add259d9cd620c2e54a3704 | e8b9e19df8aa09502fd4c2520f9d86ba400b4dab | /migrations/versions/52f4e05d2ad2_.py | 73454eb0fecd1aad60a13bc08e01295a8afa2539 | [] | no_license | NULL-OPERATOR/oh_crud | 140b0e36fe9b4be67bb7d0461b204c9a6f89c16f | 8422ad47220c75bbd0739aa5ec6817ec44b94b60 | refs/heads/master | 2023-05-10T18:31:10.376377 | 2020-01-20T16:51:36 | 2020-01-20T16:51:36 | 235,132,215 | 0 | 0 | null | 2023-05-01T20:38:00 | 2020-01-20T15:22:36 | Python | UTF-8 | Python | false | false | 1,395 | py | 52f4e05d2ad2_.py | """empty message
Revision ID: 52f4e05d2ad2
Revises:
Create Date: 2020-01-20 14:44:37.424255
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '52f4e05d2ad2'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... |
ede35b4e62f93521d289788e5fe2b0ee550c5092 | 4577d8169613b1620d70e3c2f50b6f36e6c46993 | /students/1746561/homework02/program01.py | ffb071ee7f44e68bc38d7f188bcd2a38b98199db | [] | no_license | Fondamenti18/fondamenti-di-programmazione | cbaf31810a17b5bd2afaa430c4bf85d05b597bf0 | 031ec9761acb1a425fcc4a18b07884b45154516b | refs/heads/master | 2020-03-24T03:25:58.222060 | 2018-08-01T17:52:06 | 2018-08-01T17:52:06 | 142,419,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,393 | py | program01.py | #OTTIMIZZA E RENDI PIU' COMPATTO
import re
def parole(fposts): #Prende un file e crea una lista delle righe non vuote minuscole
with open(fposts, 'r') as f: return list(filter(None, (map(lambda x:x.lower()[:-1],f))))
def normale(fposts): #Elimina spazi dal titolo dei post
text = parole(fposts)
for p i... |
238a71d9326f9db6f046e3e12ed9eba6e86d7df8 | 78bbec6f648d62dcc13fe348b059aa2b3d3d148b | /mscf/hf/DIIS.py | b23d8ad79af0ed3c7ff1c6c217674a834afa4d2b | [] | no_license | masaya0222/mscf | e1dcae7af5cf7e8669f4944fb2d8f3a371917fdc | 5c5cc8fd0384138de197cdfb59b36563e3a2981a | refs/heads/master | 2022-04-27T03:03:05.550791 | 2020-04-22T12:22:25 | 2020-04-22T12:22:25 | 254,801,145 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,374 | py | DIIS.py | import numpy as np
class DIIS:
def __init__(self, mol):
self.ind = 0
self.store_max = 5
self.store_num = 0
self.mo_num = mol.occ
self.occ_num = mol.occ_num
self.store_fock = []
self.store_error = []
def return_error(self, fock_ao, coeff):
fock_m... |
dece2781d0f1bc57eb07a6eaea2e3d50a5faa7ff | b1d6595dab93372fac9f59052e460f52a2c74744 | /database/migrations/0063_auto_20211207_1841.py | bac63b698d8a29ec75a5172a19304eacda832f43 | [
"BSD-3-Clause"
] | permissive | onnela-lab/beiwe-backend | 0e7a49fb3591f50a3d8c14c2a994a11f510e425c | cc25a60bfa8ccab953c55ac82f68d160ab00652a | refs/heads/main | 2023-07-20T13:17:33.910181 | 2023-07-11T13:17:58 | 2023-07-12T01:00:00 | 53,344,506 | 68 | 43 | BSD-3-Clause | 2023-07-12T01:01:29 | 2016-03-07T17:23:15 | JavaScript | UTF-8 | Python | false | false | 631 | py | 0063_auto_20211207_1841.py | # Generated by Django 2.2.24 on 2021-12-07 18:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('database', '0062_forest_rename'),
]
operations = [
migrations.AlterField(
model_name='summarystatisticdaily',
name=... |
f0f319e1b100d4d333c66a80f296484d6172980e | 0dccccdd7481e0fcbec3da6a715417f91012161c | /animals.py | 239f7c447bd9c845f03e691f48578b3d2513a55a | [] | no_license | Machine-Academy/python-animal_kingdom | f42eee9c62b9962ddd55287ca12450b40fb54a77 | 33b8fab135755c4b38c1a137f56ebe1fa2eea458 | refs/heads/main | 2023-06-07T09:45:47.849584 | 2021-07-14T22:30:02 | 2021-07-14T22:30:02 | 384,835,558 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 9,528 | py | animals.py | # Step 1: Create an Animal base class
# the class should support "name" and "year_discovered" properties
# Step 2: Create a Mamal class that inherits from your Animal base class
# be sure to create the class variables move, breathe and reproduce and assign
# the values descirbed in the README for this animal type.
... |
b114bcce87744c6aacfdf7fb7aec9997f8335e3a | 57599e009bb7bc59d7795b281164880d3e753890 | /lesson_6.2.py | cc00d12668d2b1b4559dd91981cb77257ad36618 | [] | no_license | EgorBedokurov/-6-16.11.2020 | ff47aeb34c03fc2d38c967b23f5db296c11bae8c | 7c896a9f97464a3302a72b011915346f93dfd522 | refs/heads/main | 2023-01-19T11:40:42.883068 | 2020-11-28T12:13:19 | 2020-11-28T12:13:19 | 314,051,564 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | lesson_6.2.py | import time
def countdown(m_f):
def inner():
m_f()
time.sleep(1)
print(time.strftime('%H:%M'))
return inner
@countdown
def what_time():
print('What time is now?')
for i in range(3,0,-1):
time.sleep(1)
print(i)
what_time() |
9fdacf43ba4d44afccdc28b058885206f3086ff9 | 6220f7c428ab4b505801c4baf470c0424c02ee83 | /tests/__init__.py | cf7225c870bbcd21787d4519bacd16d6458b17a1 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"Python-2.0",
"MIT"
] | permissive | tyagidevank1/python-redmine | c028a5b4fbe0e32d17b6da6d957e5c864202d3b2 | f85e1f8c10cffafb3b6bf024ef59018f4aebd4e1 | refs/heads/master | 2022-12-20T05:30:42.564557 | 2020-10-01T03:36:50 | 2020-10-01T03:36:50 | 300,129,784 | 0 | 0 | NOASSERTION | 2020-10-01T03:33:29 | 2020-10-01T03:33:28 | null | UTF-8 | Python | false | false | 870 | py | __init__.py | import unittest
try:
from unittest import mock
except ImportError:
import mock
from redminelib import Redmine
class BaseRedmineTestCase(unittest.TestCase):
url = 'http://foo.bar'
patch_prefix = 'patch'
patch_targets = {'requests': 'redminelib.engines.sync.requests.Session.request'}
def setU... |
8875f19bc0356d7b88ee3b27129fe8489143a181 | 832831808d48f1f62caf95a21df8276feb749c65 | /config.py | 0229fbd6705ec23fe85db94366c3be4d32051aad | [
"BSD-2-Clause"
] | permissive | dacb/viscount | 31f2be3a21d5c6d1664cf3b46aa92559af1ac961 | a1965fcf0537a64fcaa60f31e9b00fb09afc4ce0 | refs/heads/master | 2020-04-05T22:41:40.493730 | 2014-11-10T21:11:12 | 2014-11-10T21:11:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,313 | py | config.py | import os
class Config(object):
DEBUG = False
TESTING = False
BASEDIR = os.path.abspath(os.path.dirname(__file__))
DATADIR = os.path.join(BASEDIR, 'data')
WTF_CSRF_ENABLED = True
# generate your own key, e.g.
# import os
# os.urandom(24)
# copy it and use it here
SECRET_KEY = 'c\xde\xb0\xc2S\x0b\x88\xbbN\x... |
e0163d124a5197bdf1b53155d907b4181d38a916 | 7bd9314628dbaaacfb3a434cc9201480f9843c99 | /spotlightapp/apps.py | d326be96a43d9e9874833dcfbf7d955a29ad0f7d | [] | no_license | zweed/spotlightsocial | 37f5d874e1e0401374504a402d10e92c788e4fc1 | 1c01ac3ce45ca2e758814511b8dd9b866f73ecfe | refs/heads/master | 2021-01-18T15:06:41.667990 | 2016-03-07T06:57:57 | 2016-03-07T06:57:57 | 53,302,677 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | apps.py | from __future__ import unicode_literals
from django.apps import AppConfig
class SpotlightappConfig(AppConfig):
name = 'spotlightapp'
|
1e60b87fee6ad5ac816f9e83e8926f233781aef1 | 8102c1163dc59d509ec8131bd8f7f8eff9671142 | /euler-30.py | 2b75de0ee89577fee93e54d6be299494cfd6db1e | [
"MIT"
] | permissive | TFabijo/euler | 63bee4dde24cbabe276dda8d93d22a85c573c8a1 | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | refs/heads/main | 2023-08-03T18:55:06.751778 | 2021-09-06T19:38:11 | 2021-09-06T19:38:11 | 403,737,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | euler-30.py | #kje bo zaustavitveni pogoj??? nekako bomo iskali njavecje potencialno stevilo, katerega vsota stevk na peto je enaka samemu stevilu
#nvazgor bomo ocenili s pomočjo 9
# 9 ** 5 je enako 59046 ki je pet mestno število
# ce bi za stevilo vzeli 99999 bi dobili 295245, ki je šest mestno število, ki bi se ga POTENCIALO da... |
eff805a032594bc2483297dbe7e36d16a29458e1 | 204df3b6083e655741ccf1eaaf9324579811499a | /function_io/function_io/modify.py | bb6a0909544a0be492216cd96b886ff9cc8b8fee | [
"MIT"
] | permissive | sraviroshan/Hulk-R-D | f16adf4935a807abc20ed4a887c4d3eb5d68621e | 21467774a617eebea844b3b5c7ca97793ed9342f | refs/heads/master | 2020-12-25T22:47:10.329747 | 2015-11-19T07:07:52 | 2015-11-19T07:07:52 | 46,364,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | modify.py | array_sp = [
['chrome.storage.local.get', 'mychrome_storage_local_set']
]
def replace_string(file_name):
myfile = open(file_name, "r")
string_f = myfile.read();
print string_f
myfile.close();
for pair in array_sp:
string_f = string_f.replace(pair[0], pair[1])
# print string_f
myfile1 = open(file_name,... |
0a1e1c3e1bc0028513b7d646362e56f4b3043260 | d6543911e6333819d171acf1a4f43fa3467c9c3b | /user_profile/views.py | 4f2e04b03472f8ade0708eed11b3f350903e0181 | [] | no_license | KevinCastPer/django_vuejs | 4511ff7674119480199e49f7da51f5c15e424d68 | f6ef06cc82373a94a2cfd1f34d82f8ec6433e6fe | refs/heads/master | 2020-04-30T23:04:50.446664 | 2019-03-25T11:05:58 | 2019-03-25T11:05:58 | 177,135,477 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,293 | py | views.py | from django.shortcuts import render
from django.views.generic import TemplateView, FormView
from .forms import RegisterUserForm
from django.contrib.auth.models import User
from .models import UserProfile
from django.http import JsonResponse
class IndexTemplate(TemplateView):
template_name = "index.html"
class C... |
2a04b346e267bd68c58cca74584838c5a8b76556 | 2aeb5930bd62cb899fd32022e8a17d86f0c1ff8e | /data_reader.py | dd6b37c47a469754448d64281b95e6dac5c262be | [] | no_license | VinayMV/forward_collision_warning | 376070bc3dc014d0bdf6114a72c19f95dc9d2be6 | 533705deef6055719c60c110673946fdab69f1a0 | refs/heads/master | 2020-07-17T22:14:36.303805 | 2018-03-29T04:48:14 | 2018-03-29T04:48:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | data_reader.py | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 07 20:22:37 2015
@author: user
"""
import os
import csv
def read_vehicle_data(vehicle_data_directory, n=823):
vehicle_data = []
count = 1
for f in os.listdir(vehicle_data_directory):
if count > n:
break
with open(vehicle_data_dire... |
1dfee32920119ceb79bb4cc236b5961e3801d0b8 | 0ca02036e624093a16601362735668a2ad60c427 | /bin_questions.py | 4d973e8936cfe8d1d450971e58fd2c7f9968f974 | [] | no_license | zhuoyanw/nlp_qa_project | c26a56f86b6800c877310d69b46eb1ec15d8897f | 976ce90ffb2c37defdc49ce757679322c376d3ac | refs/heads/master | 2021-08-14T21:06:09.072190 | 2017-11-16T19:51:25 | 2017-11-16T19:51:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,657 | py | bin_questions.py | from parse import Parse
from nltk.tree import Tree
class BinQuestion:
binary_questions = []
def main(self, k):
binary_questions = []
sentences_top_k = Parse.main(k)
for si in sentences_top_k:
si_pt = Parse.parse(si)
bin_attemp = self.bin_question_extract(si_pt)
... |
139e394658a44566023ede3bf3a7e8724618ac36 | 91972cffc0e95e634c5752a2befdf141c494c24d | /PageObject/samples/chrome_H5.py | 465a2821cc9dfc9785b18b0de2f1fca0180d09e7 | [] | no_license | liseen001/MyProjects | 99d48fe58109565eec4eabf027f892b4881b5df0 | 0572de7a6f78a9d9474971e98794d88bce03994d | refs/heads/master | 2023-05-15T06:02:19.969378 | 2020-09-07T15:31:08 | 2020-09-07T15:31:08 | 258,478,084 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,292 | py | chrome_H5.py | #!/usr/bin/env python
# encoding: utf-8
# @author: Mrliu
# @file: demo.py
# @time: 2020/5/13 23:09
#https://blog.csdn.net/WZ18810463869/article/details/81157524
# import os
# from selenium import webdriver
# from time import sleep
#
# current_parh=os.path.dirname(__file__)
# chrome_driver_path=os.path.join(current_par... |
7facfd317f8d84b1592f08bd1cca9872c3d2ad1e | c78e67c6eb74e505fbcbbb38d2f7c17daaf72b60 | /leetcode/477. Total Hamming Distance.py | 7522ae6f00ced80f9820e9c10e3cf38f6880e88c | [] | no_license | CapSOSkw/My_leetcode | 8af706066a464ebeb91888048ee296e8c5f4d195 | 32c37aee41e6fdd5b95f639239b9d72d22d7541c | refs/heads/master | 2021-07-10T02:35:36.501353 | 2020-07-01T12:40:43 | 2020-07-01T12:40:43 | 141,933,204 | 0 | 1 | null | 2018-09-26T00:57:35 | 2018-07-22T21:51:14 | Python | UTF-8 | Python | false | false | 1,262 | py | 477. Total Hamming Distance.py | '''
The Hamming distance between two integers is the number of positions
at which the corresponding bits are different.
Now your job is to find the total Hamming distance between all pairs of the given numbers.
Example:
Input: 4, 14, 2
Output: 6
Explanation: In binary representation, the 4 is 0100, 14 is 1110, and ... |
ef2ee5a07ec9ee3973b16ac0a075d080f10fe0b2 | abb3875946443cc23fc43dab50fc5fd4ea1930d5 | /app.py | 2363d7092ad242ec82078a903be70fa18518fea1 | [] | no_license | anbarrosog/cerebral-vascular | b503075eaea3ec058615c5fa47f447912a7f8d75 | 8abe0ac07546ac4cb42317f49aaf105af5095d04 | refs/heads/main | 2023-08-02T23:01:38.711332 | 2021-09-14T09:16:27 | 2021-09-14T09:16:27 | 406,298,173 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42,294 | py | app.py | ######## LIBRARIES ########
import numpy as np
import plotly.express as px
from plotly.subplots import make_subplots
import dash
from dash.dependencies import Input, Output, State
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import dash_table
i... |
f5cbf70debe84c9fe4fea62abeb4a9bd9a6bde2a | b5ab03a8d8e0317869396434df43be26d4bc4eaa | /ssixa/handlers/claims.py | 73d7847ef27d53af8ca98ca792fb3e1885c0336f | [] | no_license | agruener2000/ssixa-core | 194076494d5b3782d6a15639b3d87dcd145c0c29 | bb90d4f664bbf3489cc0479b0f0ae1cb196c17c1 | refs/heads/master | 2021-05-17T10:57:11.114231 | 2020-04-02T16:37:36 | 2020-04-02T16:37:36 | 250,746,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,490 | py | claims.py | from ssixa.handlers.base import BaseHandler
from ssixa.base.utils import sanitize
from ssixa.base.ssi.jolocom import Jolocom
import tornado
import pyqrcode
import io
import json
import logging
log = logging.getLogger(__name__)
class ClaimsHandler(BaseHandler):
def get(self):
# Get enabled verification m... |
57f815ab144f8bbbeaf4f713b9bf7b705a823741 | e52c5c9bcd62c3ddb1fdea235797924b79990c1d | /tornado/views.py | 011b61c8825c9e329aeb653e1b9dde2d6a4a197f | [] | no_license | meganduffy/google_calender | 52bb8cb16908eb08e25cd6f74c1e485b3481eddc | 5489d7888f05f5c05e84612efec6d6dc6b187cd1 | refs/heads/master | 2021-09-09T11:20:51.189114 | 2018-03-15T14:39:59 | 2018-03-15T14:39:59 | 120,283,902 | 0 | 0 | null | 2018-03-15T14:40:00 | 2018-02-05T09:35:38 | Python | UTF-8 | Python | false | false | 8,462 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
import httplib2
import os
import datetime
# from dateutil import rrule
from dateutil.rrule import rrule, MINUTELY
from django.shortcuts import render, redirect
from django.core.urlresolvers import reverse
from django... |
953ab2d28f3482c787eca4a6c72fe9c4bd4e5bb4 | b135fda21fcf076d90a33c83f24b337d6275c816 | /문자열 인덱싱/집합 자료형.py | 9d9aba9d1f3d0edf06080e2f385ffb0b8fdf0b84 | [] | no_license | rudiness111/Practice | 7ebf6de8d8ef1004e6dda4f593e5e9f9f0c50068 | 9daebd8c290ce36a1723579f4b788a00f1ed326d | refs/heads/master | 2023-07-29T10:08:52.387847 | 2021-09-05T13:53:23 | 2021-09-05T13:53:23 | 403,321,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | 집합 자료형.py | s1 = set([1,2,3])
print(s1)
s1 = {1,2,3}
print(s1)
L= [1,2,2,3,3]
newlist = list(set(L))
print(newlist)
s1 = set("hello")
print(s1)
s1 = set([1,2,3,4,5,6,7,8])
s2 = set([4,5,6,7,8,9,10,11])
print(s1 & s2)
print(s1.intersection(s2))
print(s1 | s2)
print(s1.union(s2))
print(s1 - s2)
print(s2 - s1)
print(s2.difference(s1)... |
8faa3f0d7f24a1afc55d8ab02d365221a64a0495 | 831435c5beb56cd63ce99e815dfc526ab47dcea1 | /DEPRECATED/wgan/training.py | a034e12fc8981654d7c1db3eb3679edc91163850 | [] | no_license | Cynthia-Wang7/GANbalanced | 5ce7185c1929fec6d739c36c73ce47913b6dc53d | e397ca8dec44de3e3729c6ce28ce0c58c0bc6eee | refs/heads/master | 2023-03-16T00:02:58.022463 | 2019-09-30T07:37:22 | 2019-09-30T07:37:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,785 | py | training.py | import numpy as np
import torch
import torch.nn as nn
from torchvision.utils import make_grid
from torch.autograd import Variable
from torch.autograd import grad as torch_grad
class WGAN():
def __init__(self, generator, critic, G_optimizer, C_optimizer,
gp_weight=10, critic_iterations=5, verbose=... |
e5ed9f496570b5a137576279df338511230897ec | 11b3a4864bbf6e2f75b9cc3dc584423646778f2a | /helper_scripts/cosmic/wait_template_ready.py | f0d5769c9b695884287d5556b5971d3525ec24e8 | [
"Apache-2.0"
] | permissive | MissionCriticalCloud/bubble-toolkit | e742480244beeb33402be82872a8d93979990216 | f34e40b91d2dc86e5a3c0b67e8c69219db8bce2a | refs/heads/master | 2021-07-05T15:53:27.901747 | 2021-05-26T09:21:47 | 2021-05-26T09:21:47 | 34,800,489 | 8 | 7 | Apache-2.0 | 2021-05-26T09:24:31 | 2015-04-29T15:02:53 | Python | UTF-8 | Python | false | false | 4,453 | py | wait_template_ready.py | #!/usr/bin/env python
# Wait unil templates are ready
import urllib2
import sys
import json
import time
import os.path
import getopt
class Templates:
def __init__(self, argv):
self.target = None
self.retries = 100
self.handle_arguments(argv)
# Handle the arguments
def handle_ar... |
29da8ddf148e757409b73069e6b5484791470d8b | 426d8a395db59f366f86ecfa49198f9aeaccba12 | /ArchivoHQL.py | 524e3cd03c95cd4636923a610616ac624ab104a1 | [] | no_license | AlexPomiano/IngestaVPC | 4ef6ac540c1ff4fc59018d640863604e7a0cf055 | 8977d2370bc1cec4efcb8575bf9aef28401d47a6 | refs/heads/master | 2023-06-19T17:14:05.566874 | 2021-07-21T00:28:23 | 2021-07-21T00:28:23 | 387,938,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,515 | py | ArchivoHQL.py |
import pandas as pd
import PlantillaExcel as pe
class archivoHQL:
nombre_hql_perm = "perm.hql"
nombre_hql_tabla = "table.hql"
rutaDir=""
def __init__(self, nom, rutaDir):
self.nombreExcel = nom
self.rutaDir=rutaDir
def genera_hql_tabla(self):
... |
41ae714687f763a4aa48f261b0a13086533de932 | 93d30fd2787adf4ed12b97952038d0b06e30215d | /examapp/models.py | 228afac9711fd6b53584386d2f2ffa466b484f1a | [] | no_license | shankarvarat/online-exam | ec428d708b64058b97cd858540f3bf7d4069969b | 3ba8d6dae12e9289d3bf828fbfb577e1a1471624 | refs/heads/master | 2021-06-25T18:05:16.416982 | 2020-06-12T12:58:35 | 2020-06-12T12:58:35 | 195,568,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,620 | py | models.py | from django.db import models
# Create your models here.
from django.contrib.auth.models import User
class profile(models.Model):
name=models.CharField(max_length=200,default="No Name")
username=models.OneToOneField(User,on_delete='CASCADE')
gender=models.CharField(max_length=100)
mob=models.IntegerFiel... |
160e82413ff8dbde8bf1ae2d4e7f627f02043633 | 405842dde8c73f7586c0eca87960fdb6cf1b1d6f | /Python/greetings2.py | 5d417d6792fa91f488d32b7dd2f01f8b746a5174 | [] | no_license | tellefo92/Kattis | 190fd60aa39bb6acfb0e1ef930946eb1af60acf6 | b618beb18eea387b65d93fb40f357e57d40efb0a | refs/heads/main | 2023-09-05T15:38:20.548077 | 2021-11-10T23:47:19 | 2021-11-10T23:47:19 | 426,321,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 30 | py | greetings2.py | print("h"+input()[1:-1]*2+"y") |
6245a050ff0c6cc4f88d85d33b0471dd623f500d | e63478b185e30e079f113c72f58b2a290aafc33e | /glue_data/MV2/mv2___split3/convert.py | 55d6854426f88d9c572d2eaad8fb655e330bde06 | [
"MIT",
"Apache-2.0"
] | permissive | merionum/factuality_bert | 9da3e35e9054c261542f9ac7eeaab9c5a1c58d76 | ff5961c8488da67a8b18c7b2b2d75035a1400fa8 | refs/heads/main | 2023-08-27T23:25:05.988692 | 2021-11-04T04:15:04 | 2021-11-04T04:15:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | convert.py | import pandas as pd
for x in ["test.jsonl", "train.jsonl", "dev.jsonl"]:
df = pd.read_json(x)
df.to_json(x, orient="records", lines=True)
|
99d34ee4514d12083428684a21ddd6c4844dbdc1 | 9d6473398d5d92f6ca65e39f99ccf02b8dc51944 | /information_extraction/extract_line_feature.py | e128656e3e4c98988055e939effc5cf5ea3c1929 | [] | no_license | subhash-pujari/FindingAuthorRoles | fb0f52ec98c85b60e02b48224067136e990922f1 | 48cdbff633c4541a0c43be5983306c56f7c4113f | refs/heads/master | 2020-04-06T04:31:34.981774 | 2014-09-16T12:20:17 | 2014-09-16T12:20:17 | 20,196,602 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,522 | py | extract_line_feature.py | '''
Created on Jul 30, 2014
@author: subhash
'''
import re
#from nltk import corpus
from string_util import StringUtil
class ExtractFeature:
def __init__(self):
#self.stopwords = corpus.stopwords.words('english')
if "and" in self.stopwords:
self.stopwords.remove("and")
... |
9146510adeda46d7fcf160107efc8787d18a5263 | c52e1d52176e6884f1e1f567cbad0da3e173171e | /URLGenerator.py | 458cecb4fdb996e43af72b622af25ce7b4cefa23 | [
"MIT"
] | permissive | sumitsantape30/URL-Shortener | 84866cf87b850d598daee096764424e05e5f788e | fe5921bbb07fc4c7ae8d8646308b5d79bd0edbd6 | refs/heads/main | 2023-01-23T14:36:22.593882 | 2020-11-25T08:16:06 | 2020-11-25T08:16:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,547 | py | URLGenerator.py | import tkinter
import pyshorteners
import clipboard
window= tkinter.Tk()
#Set default window size
window.geometry("400x200") # width X height
#make window not resizable
window.resizable(False,False) #not resizable in x and y
#app title
window.title("URL Shortner")
#url Entry
url_input= tkinter.Entry(window, font... |
806a3c495f8f3415ff2effa1e8988e880b316154 | 4e8e1fd0cd0599c01203bdc5f474997c1e36ca97 | /indexator.py | 8e6335be6b28348a83ad406f676376a0b0de9d6f | [] | no_license | elciclon/Indexador | 134b07a9e334fd3e7d7760fa2a945d6d9cac2ff8 | 879d0abfffb78594ae40e1741ed56e5a52b6734c | refs/heads/main | 2023-05-03T14:24:05.801648 | 2021-05-21T20:05:51 | 2021-05-21T20:05:51 | 367,139,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,663 | py | indexator.py | #!/home/adrian/anaconda3/bin/python3
import sys
import pdfplumber
import unidecode
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from helpers import *
from operator import itemgetter
from PyPDF2 import PdfFileReader, PdfFileWriter
def main():
# Verify the two arguments in t... |
57548d67ec675eca4aedca0e85996e3eea95de82 | d3dc83b99c8cc3e16d06dcb4a44c5e4e23b9272d | /main.py | 04902220f20d5cc264ca210d6f272750af1aeb08 | [] | no_license | pvcodes-zz/codeforces-submissions | 0946f8137fe44d3afc620e5a6a64e53b2d73b555 | 43fd0f8fef799584f20c780eec0945bc29a8727c | refs/heads/main | 2023-04-18T13:28:47.914340 | 2021-05-07T03:26:03 | 2021-05-07T03:26:03 | 362,395,652 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,565 | py | main.py | from os import urandom
from bs4 import BeautifulSoup
import requests
import json
import os
from pathlib import Path
supported_lan = [
('++', 'cpp'),
('gcc', 'c'),
('clang', 'c'),
('JavaScript', 'js'),
('Java', 'java'),
('Python', 'py'),
('C#', 'cs'),
('D ', 'd'),
('Node', 'js'),
... |
6de3711ab92fbe63c6bf39a131ba09d88d80a464 | 29b6dd0a0e2206873c7222c913ccdc11abed7d36 | /Provider_App/models.py | e7e91f2f49853d820696a0f8e0de939f821023e9 | [] | no_license | djangovamshi/Provider_Project | 9d86c5a34e3e3c06639e7635a3d179d502afc93c | 9f1cb8fc2b68448c12013cbc378588b53b4a326f | refs/heads/master | 2023-08-24T03:16:08.534391 | 2021-10-06T09:47:10 | 2021-10-06T09:47:10 | 414,150,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 555 | py | models.py | from django.db import models
from django.urls import reverse
# Create your models here.
# This Model is Regarding The Employee Deatils....
# Where Employee Details of Ename,salary,location,mobile
class Employee(models.Model):
eno = models.IntegerField()
ename = models.CharField(max_length=50)
salary = mod... |
a85ca9867e44dfb34d309b81df4101ba78a7f677 | 0da1b49f788f5f3c3b1f75bccd8565360f9154a9 | /code_jam/2013/qualification_round/A.py | 00e4af516b37a144182cbdc647180927bf1d6d74 | [
"MIT"
] | permissive | jvrmaia/coding4fun | ea5ff54dbda713dc0deaef158863a55850352882 | 3e4ab5c50e055d7c41436f87ffc8493de8bb2b15 | refs/heads/main | 2023-03-16T05:02:59.509191 | 2021-02-27T19:28:20 | 2021-02-27T19:28:20 | 45,149,618 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py | A.py | T = int(raw_input())
def verify_winner(line, completed):
x, o, t, p = count(line)
winner = None
if x + t == 4:
winner = "X won"
elif o + t == 4:
winner = "O won"
elif p > 0:
completed = False
return [winner, completed]
def count(line):
x = o = t = p = 0
for i in... |
3fdbdbdd9e5a1c7c12d8b530e5bf4ff8c711786d | 9a72f0991afe0a66242da0329c5d213b194e4e52 | /embedded-png-extract | dfc2f5d8edcf61b2bc76b5e8dbb2443745dae92c | [
"MIT"
] | permissive | saddam1999/embedded-png-extract | a8737b18d0a9667a766b151545590af556d69c11 | d31b9b072d938372be121e9c0ae86c4b510a583d | refs/heads/main | 2023-07-16T20:58:14.129135 | 2021-08-07T21:57:01 | 2021-08-07T21:57:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 950 | embedded-png-extract | #!/usr/bin/env python
# extract embedded PNG files from binaries.
import sys, os, re, binascii
if len(sys.argv) != 3:
print('Usage: ' + sys.argv[0] + ' <binary_file> <desination_dir>')
print('<binary_file> - the binary containing embedded PNG images')
print('<desination_dir> - the output directory where ... | |
80d4978ae00526f1385018dbfc0f17c7e07f515d | b17befe76d07da3df9c7928e9c6c9b617740e46d | /online_Service/application/views.py | bcb2a0d7e1ce441b0578324e86920786d6bfbb48 | [] | no_license | Gunashekar0619/e-commerce_website_backend | 4ed4340ce8d46389123dbcb6fb47c44ec6d203ed | 59bdd7c54c4f751d87d89a1f4412ee6281f38ad4 | refs/heads/master | 2022-12-21T11:20:15.088326 | 2020-06-06T10:41:39 | 2020-06-06T10:41:39 | 269,946,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,368 | py | views.py | from rest_framework.views import APIView
from .models import Goods, Ratings, UserProfile
from .serializers import UserSerializers, GoodsSerializers, RatingsSerializers, ProfileSerializers
from django.contrib.auth.models import User
from rest_framework import viewsets, status
from rest_framework.response import Res... |
5e85c75961b9dd989cd672980a8815f93e3c3c7e | 4b70fee06a923810f678ce01a5953bc382099004 | /Django/tasking-and-analysis-system-django/tasking-and-analysis-system/apps/tasks/forms.py | 2363e79720c6111f790063abbdbd0500764bab6b | [
"MIT"
] | permissive | Yeva9/ITC-projects | aa16f1962205220203e26f76f18f2996dd35b455 | 19e967d656c86c64f04cc1ffbe03540f97c6eb34 | refs/heads/main | 2023-08-20T10:33:47.721393 | 2021-09-12T14:56:30 | 2021-09-12T14:56:30 | 351,127,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,150 | py | forms.py | from django import forms
from django.db.models.query import QuerySet
from .models import Task, Progress
from apps.constants import Style, TaskFields, General, Progress as PR
from apps.upload.models import Upload
def get_progress_queryset(current_progress):
if current_progress == PR.REJECTED or current_progress ==... |
15c8b83cc9afa87ed3fba5f62be0510f14d4c22e | 29de22303f564f0b70be9a59b7d78a867a5d9d49 | /src/calmjs/parse/tests/test_unparsers_extractor.py | 7004ee83da204d16a032e222b76c0f4bd88f01f8 | [
"MIT"
] | permissive | calmjs/calmjs.parse | 178ea4e86288272150631745fff0e047d7b39d69 | a9748e668e7111365d373f1edff07f0b779d6efc | refs/heads/master | 2022-07-08T19:05:46.925411 | 2022-07-02T05:22:04 | 2022-07-02T05:22:04 | 93,148,919 | 40 | 7 | MIT | 2021-11-17T09:00:43 | 2017-06-02T09:15:12 | Python | UTF-8 | Python | false | false | 42,962 | py | test_unparsers_extractor.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import textwrap
import unittest
from calmjs.parse.asttypes import (
Array,
Block,
Boolean,
Case,
Catch,
Default,
DoWhile,
Finally,
For,
ForIn,
FunctionCall,
Identifier,
If,
Object,
Null,
Num... |
a2e0454682745b9c915aabd903d5076a5f090f4f | 6213a4fdabe6481828d87c58650786a23bf4309a | /mensa/django-mensa/app/tests.py | b5df70af40b1d0b552a74818b699680c64a8e1af | [] | no_license | verlanti/Mensa-aziendale-Django- | 55ca3dd5d0775b9b4610d249a2ad69c3c2d4ef58 | bf01cc3cb33940e2204d3661355631599bd11a2e | refs/heads/master | 2020-09-14T00:16:25.153516 | 2019-11-21T09:34:51 | 2019-11-21T09:34:51 | 222,950,067 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,102 | py | tests.py | from django.test import TestCase
from app.models import Plates, Day,WeekDay, Service
from decimal import Decimal
from django.urls import reverse
class PlatesTestCase(TestCase):
# Test sugli input del modello Plates
# Test sul prezzo del piatto
def test_price_negative(self):
plate = Plates(50,"pia... |
22bd85c79127518a190131dac968bbb3043133b3 | 4ad317f1c31eecc64769ce32a4b13c37f0434a3b | /ticket/mo.py | 013031ca64e64b9abb4c5749ab2d917a982d2999 | [] | no_license | srinivas-surya/ticket_drf | e2dc96aee8aa74b9527652759aae273eac97f4bb | 2e8885a107343dc09ca01ff495a246faf1ec2ab3 | refs/heads/main | 2023-06-05T21:21:33.923361 | 2021-06-28T11:49:20 | 2021-06-28T11:49:20 | 381,012,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,968 | py | mo.py | from django.db import models, transaction
from django.conf import settings
class Event(models.Model):
name = models.CharField(max_length=255)
description = models.TextField()
class TicketType(models.Model):
name = models.CharField(max_length=255)
event = models.ForeignKey(Event, related_name='ticket... |
3eb92001f3e83a2436b3395f22b08c4c9792420e | 280cf86384a5df588d1df025b17345ee32ccc536 | /WellnessCompanion/WellnessApplication/views.py | b0e0ffc6af2546920971d0361c5b0e79b02dbc84 | [] | no_license | carter7k/wellnesstracker | c15ba64804d599eaa9fcb8dc1188028c4ac5994c | 16e107733271631e851871b4facbe8da2eba3e40 | refs/heads/main | 2023-07-29T02:31:30.136015 | 2021-09-12T17:26:34 | 2021-09-12T17:26:34 | 405,408,762 | 0 | 0 | null | 2021-09-12T16:23:58 | 2021-09-11T15:04:04 | Python | UTF-8 | Python | false | false | 4,056 | py | views.py | from django.utils.translation import activate
from .models import Activity
from django.shortcuts import get_object_or_404, render
from django.template import loader
from django.http import HttpResponse
import datetime
import random
from .models import Activity
# Create your views here.
def companionpage(request):
... |
40d76fcdb0e2c2367cea3ff0a48d000c244b1f02 | 4cee48854d8a020cd70576d45932017b23e9720b | /app/dataloader/dadosabertos.py | 7310a3205244262b50cced833d5db5f84f1eaf2b | [] | no_license | pgbrandao/camaraparticipacao | 9d2480a5d6a49f83a12d2f711a5880d3368345ec | a832db07f89c2ccadb9b000c9a34e17704d11de4 | refs/heads/master | 2023-05-12T14:23:27.260089 | 2021-06-04T18:05:24 | 2021-06-04T18:05:24 | 264,784,137 | 1 | 0 | null | 2021-06-04T18:05:25 | 2020-05-18T00:29:42 | JavaScript | UTF-8 | Python | false | false | 11,968 | py | dadosabertos.py | import datetime
import requests
import re
from django.db import connections, transaction, IntegrityError
import tenacity
from .common import *
@tenacity.retry(**TENACITY_ARGUMENTS)
@transaction.atomic
def load_deputados():
with connections['default'].cursor() as cursor:
url = 'https://dadosabertos.cam... |
70b5f0049bd4edfcad6d9791d855092a8b319c58 | ae7b88992c672690d62a07b8992e3b8006c23768 | /cfxdb/user/user_mrealm_role.py | 5d39e1738b10c49a6bbf0e329bb22209b139e8b1 | [
"MIT"
] | permissive | crossbario/cfxdb | 23d148eb5249978aa857d2d42cddcfd0d1407c25 | c9fe0a549ab8d7c64425805202e1dad34df669aa | refs/heads/master | 2023-01-27T12:13:10.372213 | 2023-01-22T22:27:08 | 2023-01-22T22:27:08 | 242,348,818 | 0 | 5 | MIT | 2023-01-22T22:27:10 | 2020-02-22T13:45:29 | Python | UTF-8 | Python | false | false | 2,121 | py | user_mrealm_role.py | ##############################################################################
#
# Crossbar.io Database
# Copyright (c) typedef int GmbH. Licensed under MIT.
#
##############################################################################
from pprint import pformat
from cfxdb.gen.user.UserRo... |
4cb72bec4afc99c750b5949c90b9d8d38937eeb0 | 1f629c486047faa72018e65d68ca3b97a7a68480 | /Python/hackerrank/Algorithmns/BitManipulation/counter_game.py | 94a7b81e79ca64de646f570cb12efa7127150721 | [] | no_license | oooseun/Project | ad65ed7d2e71221ecd4a609b8d13204ec7475f65 | 019cc68f235e359b4b666ba1bf64a825b0e87a7d | refs/heads/master | 2021-01-20T13:38:00.004982 | 2017-02-04T03:58:39 | 2017-02-04T03:58:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | counter_game.py | #!/bin/python3
import math
def play_game(n):
i = 0
while n>1:
if n == 2**int(math.log(n,2)):
n =int(n/2)
else:
for j in range(int(n)) :
if 2**j > n:
n = n - 2**(j-1)
break
i += 1
if i % 2 == 0:
p... |
40346b3050913dc9213f1b977490d5d4793a51ad | feedff2fc279690a2774c1aabdf8baa27673213d | /other/online_status.py | b26cfaf067b836e62431c86609305d12d5694343 | [] | no_license | Rightside-Two-0/python-challenges | 0a222abb13f6c4b7742e539e9e30e5eade2cc584 | 10ea108c8847d51659c9878f45ffa2ecb464fa27 | refs/heads/master | 2022-12-24T15:14:12.104649 | 2020-10-04T01:51:19 | 2020-10-04T01:51:19 | 291,353,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 650 | py | online_status.py | #Rightside Two.0: non.profit
#There is a rightside to money, business & property.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
#statuses = {
# "Alice": "online",
# "Bob": "offline",
# "Eve": "online",
#}
#In this case, the number of people online is 2.
#Write a function named online_count that takes one paramete... |
e37213583de2483e61e9b66719e2a96a3f329bfc | c952ec8e97c8d40fecc68dfdc939bdf10317cd01 | /scripts/var2d/var2nc.py | bf66060c7916865940f232185a1840ce6cf48cbe | [] | no_license | rishavgoyal/RWray | e3a2c4b050f2c3da386c9412f3af8a85d8b29803 | 7ba1a13eb8b592ec72fb824437d5b613524bd7f9 | refs/heads/master | 2022-01-14T10:52:07.117656 | 2019-07-16T07:30:39 | 2019-07-16T07:30:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26,746 | py | var2nc.py | from netCDF4 import Dataset
import numpy as np
import datetime as datetime # Python standard library datetime module
from windspharm.standard import VectorWind
from windspharm.tools import prep_data, recover_data, order_latdim
from scipy import interpolate
# This is a variation of the RW ray tracing for zonally sym... |
dc85b4a32c65876712894e22e4dd489168345651 | ecf4f39701250ecf63b8291c62c7ae8a7c192e8f | /parallelTest.py | 566366ceb45cf40e4dde6d8b2bddfd72e3936bd9 | [] | no_license | andreef1981/cnCameraAndPipeline | 6f850cb767ebcd453e3dfbdbfdb1b330a8d577be | 2515226a38977d83a5b02339943c98c722401322 | refs/heads/master | 2020-03-27T11:54:19.786208 | 2018-08-30T20:05:05 | 2018-08-30T20:05:05 | 146,513,385 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,220 | py | parallelTest.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 2 13:51:37 2018
@author: andreef
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import itertools
def main():
x, data = generate_data(256, 6)
model = [invert(x, y) for y in data.T]
sigma, mu, height = [... |
219edf9f87fcb9166cdc1864de33d7ca556ffe1f | 9a3a6ea2f16b75e950374629fe9df5dfe496adf6 | /download_weather_satellite.py | 2c58982ce260ba24ffa92d701d780383c673eea9 | [] | no_license | rkuo2000/tf | ba805809b0f19c3b9ab7dc8fdb62d9d244513a0f | 20a5e9fdedb45de404929d658b80cea70a72e776 | refs/heads/master | 2022-10-03T08:56:08.125812 | 2022-09-24T01:21:31 | 2022-09-24T01:21:31 | 223,726,930 | 1 | 26 | null | null | null | null | UTF-8 | Python | false | false | 1,241 | py | download_weather_satellite.py | ### download Taiwan Weather Satellite (.jpg)
# usage: python download_weather_satellite.py 2020-01-18
import os
import sys
import ssl
import urllib.request
ssl._create_default_https_context = ssl._create_unverified_context
import urllib.request
import cv2
date_txt = sys.argv[1] # 2020-01-18
data_path = "d... |
aa30d81d421b0d75d09b0c7969b9d8b75a6dac11 | e749fdc2dedb9b19a1447174d76adcdc738b7084 | /python/sparknlp/embeddings.py | fe82623b25c482ed28984e588731c711d9cc2112 | [
"Apache-2.0"
] | permissive | HOTFIGHTER/spark-nlp | cef498b8c74007a9fcaf10264fdb606dc9a5996f | 2d2c23084ca7d2e8ba89c47d3f763889f2e444d1 | refs/heads/master | 2020-04-04T09:31:10.343581 | 2018-10-31T17:46:00 | 2018-10-31T17:46:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,086 | py | embeddings.py | import sparknlp.internal as _internal
class Embeddings:
def __init__(self, embeddings):
self.jembeddings = embeddings
class EmbeddingsHelper:
@classmethod
def load(cls, path, spark_session, embeddings_format, embeddings_dim, embeddings_casesens=False):
jembeddings = _internal._Embeddings... |
8b252f2bda4ed912e4518e8a4260ff0019b844b9 | 59e639ce7052aae8c2fe0e195ebcd4701894193d | /generate_maze.py | 086e5712c847971feaee16b24533e5c2edb5909b | [] | no_license | MakeSchool-17/trees-mazes-python-naduhz | 663b8c72770b7bbdf241f2897252dde5d2043055 | 076928b322e40745633f5842969981d1adeb9edf | refs/heads/master | 2023-04-24T00:30:31.249635 | 2021-05-21T13:57:19 | 2021-05-21T13:57:19 | 369,453,578 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,488 | py | generate_maze.py | import maze
import random
# Create maze using Pre-Order DFS maze creation algorithm
def create_dfs(m):
# TODO: Implement create_dfs
# Create a stack for backtracking
stack = []
# Choose a cell index at random from the grid to be current cell
current_cell_index = random.randint(0, m.total_cells)
... |
07923286785533db70b6b76de995e9ebb1195723 | a2d2f985f0bf6b65ae61148f1d4f9be7d8371f4b | /Problema/scp/repair/cumpleRestricciones.py | 57b545a5af22338d6e1a6edc81b18926a7449eb2 | [] | no_license | mauriceaux/solverMH | 717b386ca9521163e7b1fee17d0ae5761e9958a7 | bf7b2eb63bae6c09890fcbdfe1b65cf77e0e71ab | refs/heads/master | 2022-12-24T08:44:38.953388 | 2020-09-29T17:52:11 | 2020-09-29T17:52:11 | 283,625,079 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,294 | py | cumpleRestricciones.py | import numpy as np
from numba import cuda, float32, jit, uint8, int8, uint16, int32
import math
import sys
from numba.cuda.random import create_xoroshiro128p_states, xoroshiro128p_uniform_float32
#cumple reparaSoluciones
#recibe (todos numpy array)
#matriz de n soluciones con m columnas
#matriz de o restricciones con... |
34c5c65b877b40ce3dcba40acb447a7050dc562a | 702e9f342b97b6dc73fff8bf8b63e4c0a92a7adf | /image_storage/dataset/urls.py | 7a0ed6412626803c62a23f0befdbc7b978fe5714 | [] | no_license | christophbrosch/image-storage | 315b4c25cf69f5fbecac02fc7d6b0a11cac42fd1 | 399c141592403525ff319676eeda1390ff1f58ef | refs/heads/master | 2023-06-17T16:36:09.992423 | 2021-07-06T20:10:52 | 2021-07-06T20:10:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | urls.py | from typing import List
from django.urls import path
from . import views
app_name='dataset'
urlpatterns = [
path('list/', views.ListView.as_view(), name='list'),
path('<int:pk>/', views.DetailView.as_view(), name='detail'),
path('create/', views.CreateView.as_view(), name='create'),
path('<int:pk>/de... |