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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
82b230ee6c88c2d6cb205eaf3861e5ad0066af53 | 071a7144a0cc79ee0e39e1bd6a17aa025fe40351 | /guppe/modulos_built-in.py | e7acc3bbb88f3ec67effd8d98df2058b439720d3 | [] | no_license | mljdeveloper/Python_Source_Code | 6b9b514de40086bd270096a6f3ac54e67f457004 | 9e2be393e6c4f7a4d7cb36620494612249b55ce3 | refs/heads/master | 2022-09-02T00:18:30.031950 | 2020-05-29T23:20:11 | 2020-05-29T23:20:11 | 264,235,949 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | modulos_built-in.py | """
Modulos Builtin ( Modulos integrados, que ja vem instalados no Python)
https://docs.python.org/3/py-modindex.html
Python | Modulos Builtin
# Utilizando alias (apelidos) para modulos e funcoes
import random as rdm
print(rdm.random())
# Utilizando alias (apelidos) para modulos e funcoes
from random import randint ... |
1b6e520c3fd240dec99962b1eda87932dbf7a05b | 4301a8f1aeda774cff305f1562314063129a6833 | /HelloWorld/ranges.py | 7161be23e64b1083de3390bc909fd1a9bbb9020e | [] | no_license | grodgers7/PythonProgramming | d691af4eddd575ec802ecb32896f36ad437fae6e | 033101e92417869c2c40755ab2c7c083e924da17 | refs/heads/master | 2022-08-19T12:43:59.164318 | 2020-05-26T07:32:18 | 2020-05-26T07:32:18 | 263,642,729 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 116 | py | ranges.py | for i in range(20): # end value is not included in the range
print("i is now {}".format(i)) |
6f3d13ee898f3d18b50b04f04aefb4b1ad23850c | e5d7bc62f71d63fd49412d34f1a7528345d99ff2 | /numpy_old/hello_Matplotlib.py | fdaa560a2bf6622af349daf8cea2a0defa1dea74 | [] | no_license | leolulu/pystudy3-data-analysis | 9c538abb0fc694d697f5ad63bbae1cd43b3acf23 | 8583a23a2aea51eb8ffa423602cb53e80801aeb6 | refs/heads/master | 2022-01-05T06:30:12.743126 | 2019-07-08T15:00:03 | 2019-07-08T15:00:03 | 152,045,383 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | hello_Matplotlib.py | import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
print(fig)
# ax1 = fig.add_subplot(2, 2, 1)
dir_array = np.random.randn(100)
print(dir_array)
plt.plot(dir_array)
plt.show()
|
e37b3d8eacc8868d51e6359ca1aab2fd714bc7b5 | 3df2f1a69252fc28e1fb7e4486cfa4b151531d34 | /master/inconsistent_hash.py | 46300f8ad3c3834b2bc43422832e0678f5c8ff26 | [] | no_license | Jiawei0227/DistributedCache | 1cc2280dde32cce517a9ffe6795d1b92a1a8a23f | bd4b89bd6a51fc9aafd9cd63a7d3c910c69a0ab3 | refs/heads/master | 2023-05-31T17:31:20.318913 | 2020-05-14T21:19:37 | 2020-05-14T21:19:37 | 259,123,532 | 0 | 0 | null | 2023-05-22T23:26:49 | 2020-04-26T20:11:22 | Python | UTF-8 | Python | false | false | 991 | py | inconsistent_hash.py | from hashlib import md5
class InconsistentHash:
def __init__(self, cache_servers):
self.num_cache_servers = len(cache_servers)
self.cache_servers = cache_servers
def _get_cache_server(self, url):
if self.num_cache_servers == 0:
return "GET_CACHE_SERVER ERROR"
return... |
2b851cf0c91756204192d5491e6e7c64c177cdae | 46040c5f7498c1e3ec38cade479bd8335d955805 | /CH 5 F2021/Specific data points.py | 54f46bca8cc4d20ffbfa413441367026b0d1ad5f | [] | no_license | DrGMC1/Python | 152da2242707f11d3a7ef77a32e571776d7e7ed4 | a81e71b3cb64247a1d316518711a8b69cb98e708 | refs/heads/main | 2023-09-05T14:00:01.733525 | 2021-11-17T18:02:52 | 2021-11-17T18:02:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | Specific data points.py | def simpDataPoint(x, y):
z = x + y
print(z)
simpDataPoint ("hello ", "class")
simpDataPoint ("hello ", 89)
simpDataPoint ( 10, 89)
|
5ce92abb9f36c0f9d34e3be6496004e57b292f02 | 2ee46788abe151594ce1ed9a7ce5c1d584c7b268 | /readwrite.py | 62f8fe4a5354626a0c2e077e9abd89917c4de88b | [] | no_license | nitinawathare/RenoirExperiment | 1ab7063746f41a5a2308efd61ab921df9e8365f7 | cc972829b87ea2d90753b0b1ae0d113b702331d3 | refs/heads/master | 2023-02-09T21:17:44.169191 | 2020-02-08T19:07:42 | 2020-02-08T19:07:42 | 203,845,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,243 | py | readwrite.py |
def main():
sload = []
sstore = []
check=0
last =0
txcount=0
filename = '/home/shashi/renoir_exp/testData/readWrite'
file = ""
with open(filename) as f:
for line in f:
data = line.split(',')
if data[0] == 'Block_num ':
if last == 1:
... |
a5f605d8c4683d656ad5420783f7fd4a9d48affa | 8b87e4951e3ae8b1d084c7b7d857ce5694bfe51d | /part_1/chapter_3/ex1.py | 03b1f51f636e019bb3e28fd92471a9d9fbc71e91 | [] | no_license | jcwillian/Learning_Python_5th | b98bbf25d172c54688bcf880a20185e41cadf148 | cdf81e833b2c8bb454c540d1a27a2b14f0bf05a3 | refs/heads/master | 2020-06-06T10:47:25.168825 | 2015-02-02T11:55:42 | 2015-02-02T11:55:42 | 29,914,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35 | py | ex1.py | print('Hello World')
print(2 ** 8)
|
2651a56692a02986e47eccec148a558d6b7a0efb | 33944938ee84fbebcf5bd35810ee96cad4acd942 | /Assignment 1/gen_structure.py | 38792a81bcd316502f28c15a2d57dd8d2fb77bb9 | [] | no_license | yash-vm/CS60017-Social-Computing-Autumn-2020 | 0eaec8190f6775fe573fa88ce85274c8f29cfcf2 | 97ed5ed77c55a933d4008b8d6db4d4a77ca76862 | refs/heads/main | 2023-01-23T22:17:43.456241 | 2020-12-06T15:52:02 | 2020-12-06T15:52:02 | 319,062,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,237 | py | gen_structure.py | import snap
import sys
Rnd = snap.TRnd(42)
Rnd.Randomize()
#Please specify file paths for facebook and amazon graphs here
facebookgraph="/home/yash/Programs/socomp2020/facebook_combined.txt"
amazongraph="/home/yash/Programs/socomp2020/com-amazon.ungraph.txt"
NIdV=snap.TIntV();
fbsg=snap.LoadEdgeList(snap.PUNGraph, ... |
1c3f955828290d3642a062c58585f8f8544e3b9e | f675e4eb595f788a6c9577f38e36c2d6ceb45ce7 | /predict-server/AIPredict/utils/validators.py | 8292636acc7c06c82fc37adc379e5b0685e9caa8 | [] | no_license | KleeGroup-BaseCamp/ai-predict | c65f9829cffddc61e015819d8fc47b938418eac8 | af5d445a47eab51877c7a0a8139a96a51acba13e | refs/heads/main | 2023-08-28T00:09:01.950455 | 2021-10-26T12:15:16 | 2021-10-26T12:15:16 | 348,671,679 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 11,359 | py | validators.py | from typing import Dict, List
import logging
import importlib
from cerberus import Validator
import builtins
from pandas import DataFrame
from pathlib import Path
import os
from django.core.validators import ValidationError
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.utils.datastructure... |
0c9d37a2587b4924de3f666445174c0acac887da | d01b1b8372af397c859a56c2ea77ca578c5d0ddb | /Shuffle_validation.py | 196311accfb5761e20a5c82e1bbfa7cd6c25a38b | [] | no_license | Spokhim/MouseBrainModelling | 5fdd0bb8ddc5d28e79252f52fddf152f4ac5cedb | 5054d1ddaadda201179cc1a95c24c82a79cdfbf9 | refs/heads/master | 2022-05-25T00:33:45.615591 | 2022-04-07T08:00:38 | 2022-04-07T08:00:38 | 242,067,103 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,519 | py | Shuffle_validation.py | # This is code for Shuffling the Heterogeneity gradient randomly
# And then simulating. This is to validate that the heterogenous gradient is meaningful.
import numpy as np
import pandas as pd
import pylab
import matplotlib.pyplot as plt
from scipy import stats
import inspect
import os
import csv
import time
import ... |
5078c2ca316f7f9ec37d9d98dd939a33340e342a | 019fd2c29b8239d7b0a3906cfbdddfd440362417 | /spanner/google/cloud/spanner_admin_instance_v1/gapic/instance_admin_client.py | a5bbe386420aa7a3b61225ffb527864ff65941ec | [
"Apache-2.0"
] | permissive | tswast/google-cloud-python | 1334d26cdb994293f307d889251d7daef5fcb826 | d897d56bce03d1fda98b79afb08264e51d46c421 | refs/heads/master | 2021-06-10T17:40:06.968584 | 2020-01-11T17:41:29 | 2020-01-11T17:41:29 | 58,775,221 | 1 | 1 | Apache-2.0 | 2019-04-10T17:09:46 | 2016-05-13T22:06:37 | Python | UTF-8 | Python | false | false | 53,634 | py | instance_admin_client.py | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
22be1a15db1104e9019f9f1326fa8516479db325 | 6ca5549ea158b008d0f47cf1ba20d294f149a0b5 | /test/misc/geotext.py | a4aaaf9363a4d178a43c2853f7fae71ed291a3c6 | [] | no_license | yuviabhi/twitter | e76a438644277ee3c8bcfaabcf55bee1b1015eed | 3ef3721e73bf55db3640ba3acbda9a9d1a72c4fa | refs/heads/master | 2023-04-09T01:23:42.290422 | 2023-03-24T13:48:37 | 2023-03-24T13:48:37 | 100,293,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 92 | py | geotext.py | from geotext import GeoText
places = GeoText("London is a great city")
print places.cities
|
3e4ecbbbcbe4509fcf1bece341cfdd9510cc231e | 17faa6e8f9d2f19a6efce073adac10d483f2c9c5 | /neural_net.py | 15bbf110fab593c2b66994e0c1745688650952d2 | [] | no_license | lennartsteinhoff/belief-net | ba3af4e8a1143700c02aeac8f1594645ea69615f | bf96bde6762e221660bf61e737d690862334052f | refs/heads/master | 2022-11-25T14:10:41.592875 | 2017-12-15T14:46:51 | 2017-12-15T14:46:51 | 109,851,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,327 | py | neural_net.py | from numpy import array, exp, random, dot
def sigmoid(x):
return 1 / (1 + exp(-x))
def sigmoid_derivate(x):
return sigmoid(x) * (1-sigmoid(x))
class NeuralNet:
def __init__(self):
self.input_size = 2
self.hidden_size = 3
self.output_size = 1
self.W1 = random.randn(sel... |
f89e4cd40258f74e7281beed05c49214bb533c6c | 6c72e17b65daabd687587747b2b52ef604eb8f04 | /icp_project/icp_project/Tools/connect_configs.py | 7e2862ddb14d049f8e5cbb8888fa42f89ce240d7 | [] | no_license | jun-ge/icp_project | 26513d4a37a4ff90200d32a0bdf5e3eaaf9d2f11 | c1a6d72ec9c384eab818b170c22e4631693a7c32 | refs/heads/master | 2020-04-03T16:10:24.322669 | 2018-11-01T11:29:29 | 2018-11-01T11:29:29 | 155,394,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 674 | py | connect_configs.py | env = 'test'
if env == 'test':
# 本地测试mysql
MYSQL_LOCAL = {
'host': '127.0.0.1',
'port': 3306,
'user': 'root',
'password': '12345',
'db': 'xxx',
'charset': 'utf8',
}
# 本地测试Redis
REDIS_LOCAL = {
'host': '127.0.0.1',
'port': 6379,
... |
66fb89d7e9c1a1590b6a78aa18b4f1695423ae4c | 5e4eaf171503fcbae210baf5c68c8818b1c6da43 | /AI_Server.py | 59f06e89eccdbeab10333228bdd7f317b41da405 | [] | no_license | MNiko97/AI | 6fec91c7509773599e35cb60ba66bb278b88370c | a1f8b2a0bb2e9d839feb5d96838e0c337af1422a | refs/heads/master | 2022-06-17T21:08:56.153165 | 2020-05-08T21:48:35 | 2020-05-08T21:48:35 | 262,290,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,510 | py | AI_Server.py | import socket, json, transmitJSON, cherrypy, sys, copy, time
from random import randint
from ai.ai import AI
HOST = '0.0.0.0'
PORT = 8081
directions = {'RIGHT': [0, 1], 'LEFT': [0, -1], 'UP': [-1, 0], 'DOWN': [1, 0],
'UPRIGHT': [-1, 1], 'UPLEFT': [-1, -1], 'DOWNRIGHT': [1, 1], 'DOWNLEFT': [1, -1]}
cla... |
75a244fd1f35fca67b76569fe444264615fa5f69 | 9d355cd84d42f6e473c3d52e924d130778be3f24 | /useraccount/migrations/0006_merge_20210422_0902.py | 863736d758768e7a59f821662eb1a20394c87485 | [] | no_license | boyedandtoyed/BMI_calculator | 2d043640e3854a2d121cd99e73d6badb02614705 | 4a87a12eeca13af77f72173f7f1cede2cddd6078 | refs/heads/main | 2023-05-11T21:16:42.665903 | 2021-06-04T10:57:10 | 2021-06-04T10:57:10 | 357,409,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | 0006_merge_20210422_0902.py | # Generated by Django 3.2 on 2021-04-22 03:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('useraccount', '0002_alter_usermodel_age'),
('useraccount', '0005_auto_20210420_0842'),
]
operations = [
]
|
dd589f255b56f03cf4da31e302132123124e58a5 | 48ff27061070f4dc670ca085f90272bafaece60b | /3-Python-Project/snake game.py | 163e074cba2bcf8d1d4407d1d2164304467a5617 | [
"MIT"
] | permissive | snt-club/11daysbootcamp | 15fba2a9ac6a455d969894b44aa62b83f3a313df | e7db79f26d4164c6338cabe6498225b050f9f213 | refs/heads/master | 2023-08-16T09:50:58.551675 | 2021-10-14T15:39:18 | 2021-10-14T15:39:18 | 275,893,900 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,984 | py | snake game.py | # Curses library provides a terminal-independent SCREEN PAINTING and KEYBOARD handling
# for text based terminals.
import curses
import random
import time
# initscr() returns a window object representing the entire screen; called as STDSCR
window = curses.initscr()
# Echoing of input characters is turned off.
# cu... |
473613b72449c4f91bd2c9062fca9508f3f8d16f | c87efdbffcbf8bb36ea463cf618915708f22e6b1 | /test/test_model.py | 77175dfcb111ddf1e36a199b8a1316c3f88cd386 | [
"MIT"
] | permissive | EdanSneh/gpsr-command-understanding | 9dd08728ec4ac031b6d96d60cd62066d84a9d25a | e08cc16ba66c17737b6e90596f4b27ffa442225a | refs/heads/master | 2021-01-03T16:26:42.951045 | 2020-02-13T01:25:30 | 2020-02-13T01:25:30 | 240,150,771 | 0 | 1 | MIT | 2020-02-13T01:20:26 | 2020-02-13T01:20:25 | null | UTF-8 | Python | false | false | 536 | py | test_model.py | import os
from allennlp.common.testing import ModelTestCase
from .models import seq2seq
FIXTURE_DIR = os.path.join(os.path.dirname(__file__), "fixtures")
class GPSRSemanticParserTestCase(ModelTestCase):
def setUp(self):
super(GPSRSemanticParserTestCase, self).setUp()
self.set_up_model(os.path.jo... |
109fb180e64038ca6003e8a864b2fcdeef6dcb0c | eecd6eca57d1229035396442286fe2ac5f286b32 | /TMSHomeWork-3/z37.py | 5b75a1dbe3f1d1139eac10a7eb2165de395e30df | [] | no_license | ArtemDud10K/Homework | ffed4be74944f18b5fb92b7ac819e841d5a32c62 | da96b82fd1c003afa4f175b21ed5c8b7efa317d7 | refs/heads/master | 2021-01-20T10:05:24.912567 | 2017-06-21T16:29:09 | 2017-06-21T16:29:09 | 90,320,026 | 0 | 0 | null | 2017-06-20T20:27:51 | 2017-05-05T00:01:10 | Python | UTF-8 | Python | false | false | 80 | py | z37.py | sumq = 0
for i in range(11):
sumq += i
print(f'step{i:<2d}: {sumq:>3d}')
|
af3623764721469057603e362f90bf42b210e760 | 5b2b7c8ab0dde974dbbba2928690b2664183dbf4 | /linux/examples/example11.py | 4e768c607070eb23b2f641277c332af8b8572286 | [] | no_license | wangzhicheng2013/c-11 | ff6f40b0f2630de9a5c3a21733eb9ff7f8d7b158 | 76d2533581a86d86ceafa4f1f4ed64d298651791 | refs/heads/master | 2021-07-05T09:43:21.002577 | 2019-04-09T12:46:01 | 2019-04-09T12:46:01 | 146,904,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | example11.py | import sys
print abs(-10)
def Power(x, n = 2):
return x ** n
print Power(2)
def Show(name, age, kw):
print('name:',name,'age:',age,'other:',kw)
Show("ZhangSan", 18, "11")
|
e8414f4969df82883708e8622cf13809079f28c2 | 1bb3c20ce5a53889eac280826d7d54194c7db33f | /sort/1181.py | 3f900a10ad6eb198ab1ef155e703b1ef23c46e32 | [] | no_license | yejiiha/BaekJoon_step | bd2c040597766613985ae8d3a943999cb35d6671 | 3eaedbb832f14c51f3fb990e7e140f00d732df1e | refs/heads/master | 2023-03-24T06:36:28.851139 | 2021-03-21T14:15:40 | 2021-03-21T14:15:40 | 285,825,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | 1181.py | ## 단어 정렬
n = int(input())
li = []
for _ in range(n):
word = str(input())
word_len = len(word)
li.append((word, word_len))
li = list(set(li))
li.sort(key=lambda word:(word[1], word[0]))
for i in li:
print(i[0])
|
d21e800bb3da09fbd0290fb54d808fa0c6908d5e | 4f0da82215103cbe7e31275f8c48d882087cd714 | /python/string_whats_your_name.py | c5816a814c28685ccc90584af0c5770590df2fbe | [] | no_license | renuka28/hackerrank | c0f405f248cd1285d2eda40f5f11209b9b464690 | b5c73cfe30c930448165936864ea2c0f5de7b7dd | refs/heads/master | 2020-09-20T14:36:50.366182 | 2019-12-03T04:56:14 | 2019-12-03T04:56:14 | 224,512,043 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 347 | py | string_whats_your_name.py | def print_full_name(first_name, last_name):
print_str = "Hello {} {}! You just delved into python.".format(
first_name, last_name)
print(print_str)
return print_str
if __name__ == '__main__':
first_name = input("enter first name - ")
last_name = input("enter last name - ")
print_full_n... |
6567c86732e5f5e9ceb971a0e3e7f0da479d65fa | 893cdc4fc5313d9eade5347c43b13434bd64a083 | /openmc/deplete/__init__.py | 00b29e3196fe4b8cae82a1684200079376cb939f | [
"MIT"
] | permissive | paulromano/openmc | 9b4a3d742601f97217f905d8c50306e7ca90e7c7 | 66d76429a8f5f5104ed08f41d810a61fc0495072 | refs/heads/develop | 2023-09-01T02:27:14.945321 | 2021-01-07T14:16:34 | 2021-01-07T14:16:34 | 6,039,026 | 2 | 4 | MIT | 2023-04-26T13:27:39 | 2012-10-02T01:55:56 | Python | UTF-8 | Python | false | false | 542 | py | __init__.py | """
openmc.deplete
==============
A depletion front-end tool.
"""
import sys
from unittest.mock import Mock
from .dummy_comm import DummyCommunicator
try:
from mpi4py import MPI
comm = MPI.COMM_WORLD
except ImportError:
MPI = Mock()
comm = DummyCommunicator()
from .nuclide import *
from .chain impor... |
84c61be0516f4afdad5aba9f6800f7e68efa2569 | f0491858b59913d5447dc25e05216baff5304b0e | /Basic String Operations.py | cb56ba73623bdaa1779d92860bbfedeba209e20f | [] | no_license | SinKonn/PythonBasics | 239c2c29652bda90c3fd7f2cdbb894146bba31cb | 71f8ba53f9c8c428a0c7b8337fa0ae11b8b7c09c | refs/heads/main | 2023-02-06T09:28:49.298741 | 2020-12-27T14:22:22 | 2020-12-27T14:22:22 | 321,740,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,586 | py | Basic String Operations.py | def c1():
print("CHALLENGE 1:")
String1 = "New String" #Assigning new string
print("String is: %s" %String1)
String2 = String1.upper() #Switching to uppercase
print("Switching to UPPERCASE: %s" %String2)
strlen = len(String1) #calculating string length
print("String length is: %d" %strlen)
#splitting ... |
7a2c26a8e49b830c4b51ac0b8f9e2238354d6ea4 | 03921a1140e4c6ccc70436301259af20a75200b9 | /examples/add_shapes.py | 1fe961143e14d38cb3911aaca9be1610cd1d20c8 | [
"BSD-3-Clause"
] | permissive | donovanr/napari | 54ec4af881f88ed2ac91777248d1c1cec00a65c1 | 580b5eab8cc40af53aef780a65adb9216d968a32 | refs/heads/master | 2020-05-03T05:22:57.148596 | 2019-03-30T16:56:39 | 2019-03-30T16:56:39 | 178,446,446 | 0 | 0 | BSD-3-Clause | 2019-03-29T17:09:10 | 2019-03-29T17:09:09 | null | UTF-8 | Python | false | false | 2,013 | py | add_shapes.py | """
Display one shapes layer ontop of one image layer using the add_shapes and
add_image APIs. When the window is closed it will print the coordinates of
your shapes.
"""
import numpy as np
from skimage import data
from skimage.color import rgb2gray
from napari import ViewerApp
from napari.util import app_context
wi... |
2af915dbe85433049a8ba65c8ed342dd930f9457 | f29ec030a9a65709c0cacbefd489d0aabf9d253e | /Regression/generate/metric.py | 7e263fa8f80053db451fac9c177fe27b4206cbae | [] | no_license | hank-kuo-cs/Moon-Camera-Position-Regression | 0e06826623177c00122c58b289ca00ba6ee2fe23 | 3ea2977a2c3c76c17876f819bd4729f5520bc7a8 | refs/heads/master | 2021-07-30T15:43:51.683808 | 2021-07-23T10:42:41 | 2021-07-23T10:42:41 | 240,389,673 | 0 | 1 | null | 2020-06-04T07:23:41 | 2020-02-13T23:37:01 | Python | UTF-8 | Python | false | false | 4,121 | py | metric.py | import os
import cv2
import logging
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from tqdm import tqdm
from .dataset.camera import RandomCameraGenerator
from .renderer import Pytorch3DRenderer
from ..config import config
def get_random_sign():
a = np.random.rand()
... |
9515b23b13b8691b220d2502050c4eba933d1ecb | 618c96a4d6f9e841d07b29ae8d8bc9e2bfdc5da4 | /python/sorted.py | 83a601b942ac956303cd090f7b7e836288a66813 | [] | no_license | ChrisGottsacker/concept_demos | 773416f136b0717670e33a1756e7982beda8e1fe | 03c493db413cb281a1ac75831adf364a8bfb63fb | refs/heads/master | 2020-05-30T07:18:29.826094 | 2017-05-18T20:37:05 | 2017-05-18T20:37:05 | 69,289,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 176 | py | sorted.py | class c():
def __init__(self, avg):
self.avg = avg
def keyFn(self):
return self.avg
a = [c(.016), c(.005)]
for x in sorted(a, key=c.keyFn):
print(x.avg)
|
b7a3e44493428fa76253c3674379ad08e0aaf471 | 7afc904b4a75e70956b23f7201cdee22abf984e0 | /testCase/test_http_request.py | 0a4a92fcd7aad296eb0a718b6503ed859d608b4d | [] | no_license | hahali/MoreWinApiTestProject | 195cc217fb5b0ab6fcd8ae3655b75385d1d13913 | 15031e3a62356c6e0057589e004fb31c0ebfd508 | refs/heads/master | 2022-11-08T07:10:45.248596 | 2020-06-18T08:14:57 | 2020-06-18T08:14:57 | 273,208,000 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,699 | py | test_http_request.py | from tools.http_reqest import HttpReqest
import unittest
from tools.do_excel import DoExcel
from ddt import ddt,data
import json
from tools.get_data import GetData
from tools import project_path
import logging
# filename = '../testData/KXliveApiCase.xlsx'
sheel_name = 'community'
#读取excel的数据
test_data = DoExcel().ge... |
3b812a096f35ba17cfb007bb2590d36ebaecdc5c | c04895a2c0cf05d70adb0efeee9efef99bfd9f97 | /grade/main/models.py | f9b04b11918bb46e26c3763d564f7896e46f71eb | [] | no_license | AmyAmeesha/Grading-Histograms | 8b1212b2d3029f148219de43ec131360f4631f53 | 6907e23912786f6743f82a4d720aeb9611fe9b47 | refs/heads/master | 2020-07-10T17:25:22.729801 | 2016-08-24T16:20:23 | 2016-08-24T16:20:23 | 66,383,385 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | models.py | from django.db import models
# Create your models here
class Marksheet(models.Model):
f = models.FileField(upload_to='files/')
n = models.PositiveIntegerField()
t = models.PositiveIntegerField()
c = models.CharField(max_length = 4)
class Image(models.Model):
i = models.ImageField(upload_to='images... |
55146724246f36c7dfd1187e227111b80eb4630b | b2ed02a92a2e96688a029b21d9046ae9bd4da181 | /home/routes.py | 0003f89a1b21e6aee9593a170f23398d03eb05af | [] | no_license | KR0SIV/P25Master-Dashboard | 3737f9111bc71b0a5b6a00015623de3f6678db05 | a48b1f5b40ecd832bec88240b045be9163d4dda9 | refs/heads/master | 2020-04-02T02:43:26.214658 | 2018-10-20T19:07:28 | 2018-10-20T19:07:28 | 153,924,179 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 736 | py | routes.py | from flask import Blueprint, render_template
from flask_login import login_required
from modules import dockerData
from modules import dContent
blueprint = Blueprint(
'home_blueprint',
__name__,
url_prefix='/home',
template_folder='templates',
static_folder='static'
)
@blueprint.route('/index')
... |
1d66f9e775c22cf4fd525bada865c91296252f23 | 9409fa3a4403087f32db678031cfc3ccd4f49550 | /src/location/models.py | 25d099c218b088ad70df34f084c011bc9c5c1023 | [] | no_license | LeHoangLong/AwkwardAnt | b92c0d63dbc1bca928226fa762d1ada4db34e4ed | 28c0186cf70c51491b95ba7a061917a9f48c6ce6 | refs/heads/master | 2020-09-21T04:49:25.733537 | 2019-12-13T19:35:49 | 2019-12-13T19:35:49 | 224,681,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | models.py | from django.db import models
# Create your models here.
class Location(models.Model):
location = models.CharField() |
8d3747336ffe336e463e3aed1068472d631c4311 | 269264243a870be97cb7bb9bec951a186539814a | /tests/test_StreamerFlowchart.py | 4ee08ccefcb555e703e1319d04d1f452f4daa6be | [
"MIT"
] | permissive | kdungs/lhcb-hltflow | b4450c0ba6f0a961f015252976b03fe004c8e1de | 9fc4d6ac490e42df3d2bed800524cc626cfd2270 | refs/heads/master | 2021-01-18T15:14:37.763895 | 2014-10-05T17:12:38 | 2014-10-05T17:12:47 | 23,739,679 | 1 | 0 | null | 2014-09-30T16:27:44 | 2014-09-06T16:52:10 | Python | UTF-8 | Python | false | false | 2,122 | py | test_StreamerFlowchart.py | import unittest
from hltflow.core import StreamerFlowchart
class TestStreamerFlowchartDefaults(unittest.TestCase):
def setUp(self):
"""
Instantiate a test fixture.
"""
self.sf = StreamerFlowchart('Test % 1', 'SomeCode >> SomeMoreCode')
def testPrefix(self):
"""
... |
a73e7df0b1441a8eb2e210e0a42e96fe0132e255 | eabf4aa52b06535c36094f55da5503d649dba32d | /appPO/page/searchresult_page.py | 855b59337e8e1115fc80ff908733b79e53376009 | [] | no_license | CK17-Sunny/pythonProject | 38f3ec2be660682b780102eaead40bf1b342b20f | f6c898551bdaa92db9d6b3920645e199b8ff3fcc | refs/heads/master | 2023-06-15T19:40:00.568592 | 2021-07-14T05:19:57 | 2021-07-14T05:19:57 | 377,781,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 348 | py | searchresult_page.py | from appium.webdriver.common.mobileby import MobileBy
from appPO.page.base_page import BasePage
from appPO.page.editscontact_page import EditSContactPage
class SearchResultPage(BasePage):
def goto_clickdot(self):
self.driver.find_element(MobileBy.ID, "com.tencent.wework:id/guk").click()
return Ed... |
c6fe193c87cd8bb4be2e962553f294df11cd6ccb | d28af94268e7aa5f9c72fe359cc64aff3197c221 | /database.py | d2a987847acdac948d4a0100a067ed9d44b9845e | [] | no_license | michaelwachl/robot_manager_coding_challenge | 342aa0acfc45d569de6bd2b730de220fa04435b0 | 06d38fa599c7b3459fe63f07aa21100249501d43 | refs/heads/master | 2022-12-19T15:36:33.385882 | 2020-09-28T13:41:43 | 2020-09-28T13:41:43 | 299,319,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,027 | py | database.py | import sqlite3
from sqlite3 import Error
"""
Data: 27.09.2020
Author: Michael Wachl
Contact: wachlm@web.de
Project: Fleet Manager Coding Challenge
"""
class FleetDatabase(object):
"""A simple class for SQLite manipulation
"""
def __init__(self):
self.db_name = 'Fleet_SQLite_Database.db'
... |
2fb123c5164ce424cce50db015e60b4625751e97 | c58c9a0bad4f1e748dd56e30c78818e533eb2763 | /assignment2/Solution.py | 999d0f2b38d810221d6d5006285d033559832c97 | [] | no_license | HanqingWangAI/Data-Mining-Course-Assingment | 02a202bf3f1c77f6fa11f206776f3ff50d2ddd47 | 037b4d4ad0d27ea315f66b15dd2f052a43c49405 | refs/heads/master | 2021-09-13T11:36:35.601664 | 2018-04-29T03:55:17 | 2018-04-29T03:55:17 | 130,444,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,825 | py | Solution.py | import numpy as np
import pickle
from apyori import apriori
def test():
transactions = [
['beer','nuts','yes'],
['beer','cheese'],
['beer','nuts','no'],
['beer','nuts','no'],
['beer','nuts','no'],
['beer','nuts','no'],
['beer','nuts','no'],
['beer','... |
34b56b5f4a5e2733f0e17b731c9d7e256e33b0ea | 8c6a1e6f0a64827511e7f6ab62eb026a0d97068b | /_python/pgbench_python.py | 7e0b2ca875226eaf3646723add758330660a9f80 | [
"MIT"
] | permissive | MagicStack/pgbench | 6b6962c6c3ffae0bb34ce8315e6658fee43530f7 | f415bd5cad063b2dd4c830cabae02a23aa060af7 | refs/heads/master | 2023-09-04T02:02:07.015751 | 2023-06-22T23:19:17 | 2023-06-22T23:19:17 | 63,661,741 | 121 | 27 | MIT | 2023-06-22T22:19:06 | 2016-07-19T04:51:51 | Python | UTF-8 | Python | false | false | 15,630 | py | pgbench_python.py | #!/usr/bin/env python3
#
# Copyright (c) 2016 MagicStack Inc.
# All rights reserved.
#
# See LICENSE for details.
##
import argparse
import asyncio
import csv
import io
import itertools
import json
import re
import sys
import time
from concurrent import futures
import aiopg
import asyncpg
import numpy as np
import p... |
d1c978f91c28328335b51d93e74f477c5f0cdd05 | 783845ed9748b6eb20f5e18612a46341bf5296ef | /shopify_trois/models/event.py | 774916e27cb0f1a09037a3751976a2fad5a4bdc6 | [
"MIT"
] | permissive | masom/shopify-trois | 707411dc8f10dd12d347df5dd664b7b5ab6995ac | f7a0a3696fe963fe03d97581c1add1c38f8cdcd4 | refs/heads/master | 2021-01-15T23:12:38.948639 | 2015-09-01T15:55:54 | 2015-09-01T15:55:54 | 11,101,590 | 7 | 4 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | event.py | # -*- coding: utf-8 -*-
'''
shopify_trois.models.event
Shopify-Trois Event
:copyright: (c) 2015 Martin Samson
:license: MIT, see LICENSE for more details.
'''
from .model import Model
class Event(Model):
'''Event
http://docs.shopify.com/api/event
'''
resource = 'events'
suppor... |
2e88a2283c9b17326426d7534a2cb1b827eccb6e | 41be0df4639cbb974fb40ceda734cf80f931ebb1 | /1-Language_Fundamentals/05-Python_Reserved_Words.py | aef37c921c4417781e2d1014e13d9b4226fe8f5a | [] | no_license | smartvkodi/learn-python | 9ecf729ffe2beed32b197d3246d162d546f2ca35 | ac3af9af553c1a446477d826adbbaf2e553767b2 | refs/heads/master | 2020-12-15T14:53:33.721075 | 2020-01-20T17:01:09 | 2020-01-20T17:01:09 | 235,146,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 923 | py | 05-Python_Reserved_Words.py | ## Python 33 Reserved Words
print('\nPython Reserved Words - 33 Keywords')
print('Java Reserved Words - 53 Keywords')
print('\n1. Python Reserved Words - contin doar litere mici din alfabet')
print('\n2. Python Reserved Words - doar True, False si None incep cu litere Mari')
a = True
f = False
#
# a = true
# File ... |
87811e24bc66e01d749a9dc906d050aad4f3facb | e8b6818617c95d2f3e106f073721fc1af5cbad79 | /paddy/common/run/cases.py | eb4b1a0ee1c27ace62d53cc7eb9190913e3ec7cd | [] | no_license | guchengcao/sharewithhell | c0108ae4b16e28799ade2a683cf2f8e8a68c0359 | 623d58723da4c675b20d347951907d1e8957d743 | refs/heads/master | 2021-01-21T19:40:36.815160 | 2016-09-21T07:23:40 | 2016-09-21T07:23:40 | 68,789,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,400 | py | cases.py | #coding=utf-8
from __future__ import print_function
import importlib
from . import results
from os import listdir
import logging
LOG_DEBUG = lambda m: print('{0}'.format(m)) if __debug__ else logging.debug('{0}'.format(m))
LOG_ERROR = lambda m: print('{0}'.format(m)) if __debug__ else logging.error('{0}'.format(m))
L... |
d20afed0717a778a0cfb78e8bbd63949921939ca | f198d11710158c9c550374a54b727e2b10688a14 | /blog/views.py | 54dacd144177f5f48164f44fd073ab0b4297182a | [] | no_license | cropyxhtml/djangog | 8a9d524dcc19c0c555b5a980c41c4003eba02608 | c0320a70de7281673c8f5a74bdec5abbf2c72644 | refs/heads/master | 2020-07-17T14:28:04.814442 | 2019-09-03T18:06:46 | 2019-09-03T18:06:46 | 206,036,107 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | views.py | # Create your views here.
from django.shortcuts import render
from blog.models import Post
from django.utils import timezone
def post_list(req):
posts = Post.objects.filter(published_date__lte=timezone.now()).order_by('published_date')
return render(req,'blog/post_list.html',{'posts':posts})
|
b6b6d9361825452bf39c8e7b52264dac95bbe3ff | d9e2e24910ec3efe35dab8d897d3a3e85011557d | /Preprocess.py | 01c458ab12bb60424c731a9866e8de7324e9c7c9 | [] | no_license | vishnusharath/Consumer-behaviour-of-coursera-using-Clickstream-data | e12f23fa0ba6588752c32e2c32eba282e2ce1a4c | 7d0b43c60010e9992e8b56bc71461b5d7b0106a7 | refs/heads/master | 2020-05-28T07:20:00.417333 | 2019-05-27T23:11:31 | 2019-05-27T23:11:31 | 188,919,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,110 | py | Preprocess.py | import json
import pandas as pd
from datetime import datetime
from ua_parser import user_agent_parser
if __name__ == '__main__':
"""
Assigning an empty array to store the dataset
"""
counter = 0
click_data = []
for line in open('psy-001_clickstream_export.txt', 'r'):
json_va... |
b18999785adc02da1a9b3b07763f727844c18e77 | 518be6450863f6f22924ba5205d8866a8a408da7 | /backend/model.py | 665fa82beb758c56713ef598ea689bd52dadb385 | [] | no_license | diablokevin/hdf5client | 649f7b2378dc5a63da2b71e78f6b7b77fdfe529a | 4299eaf50d0d88cd0e4c893f11a8cdd592de3127 | refs/heads/master | 2023-08-16T21:53:04.886063 | 2021-10-08T15:02:28 | 2021-10-08T15:02:28 | 406,656,349 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 94 | py | model.py | class Hdf5BriefData:
tail_no = ''
flight_no = ''
city_from = ''
city_to = ''
|
49b5a21c37f8a56384a0f8517a418442c0f0a834 | 932de66921b25a282e504d341f7ad9628e53c013 | /ppodd/flags/base.py | 1e7414c0dd55fe29a7ca4ba51859b49663167ebd | [] | no_license | FAAM-146/decades-ppandas | 0542b24e7606a7084898295c15c0bb36bcb16466 | e8c54f78a97166c5f66b2196ea4d6eb7a33a0bc4 | refs/heads/master | 2023-07-10T21:44:35.408678 | 2023-06-26T12:40:02 | 2023-06-26T12:40:02 | 149,281,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,022 | py | base.py | """
Provides an abstract base class for flagging modules. Flagging modules run
after the main processing modules allowing modification to data quality flags
using data which may not be available at the time processing modules are run.
"""
import abc
import datetime
import logging
import numpy as np
import pandas as p... |
1cb8bd06aa359037b8000073ecf6f2d190c4aee1 | bec6e4f12e0bc58cf1bfdd692a0ebf200530061f | /Scripts/Convert_Signals/convert_wind_signal.py | f80423c56b5dbf9b352acd3edd3428422d1d7ece | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | DTU-ELMA/European_Dataset | 5744532fbdf764e5d209c168d6092dbc85445923 | 8fb79c61274c95277edc8ee7f60e724e5cc1e0f4 | refs/heads/master | 2021-01-16T18:30:59.536298 | 2017-09-28T09:43:14 | 2017-09-28T09:43:14 | 19,153,482 | 11 | 5 | null | null | null | null | UTF-8 | Python | false | false | 4,749 | py | convert_wind_signal.py | import numpy as np
import os
import datetime
import pygrib as pg
import argparse
import Myhelpers.defaults as defaults
import scipy.sparse as sparse
from windconversionfunctions2 import convertWind
from configobj import ConfigObj
from validate import Validator
from itertools import izip as zip
from Myhelpers import wr... |
fc296b6580bbff47f6a98d43c4f60044244705cd | 8adb811e18408aea9258db1696e46a3bc21e5847 | /src/collective/webservice/tests.py | 00be3a838e0dc9802daa80677235dcef0ebe37d7 | [] | no_license | collective/collective.webservice | 2b39f2480b6538dfd350416be4f1689c157b2c8a | 269cc42aa34c01201de738bbcfcdd33c232aa078 | refs/heads/master | 2023-03-22T14:39:18.918801 | 2018-07-27T12:28:50 | 2018-07-27T12:28:50 | 5,853,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | tests.py | # -*- coding: utf-8 -*-
from collective.webservice.config import PROJECTNAME
from collective.webservice.testing import COLLECTIVE_WEBSERVICE_INTEGRATION_TESTING
import unittest
class TestSetup(unittest.TestCase):
layer = COLLECTIVE_WEBSERVICE_INTEGRATION_TESTING
def setUp(self):
self.portal = self.l... |
ae43cc7e63404a312befc6fb6c8cbf7c33007e00 | ffab3393f49f6aa07257de95b18507eee3315528 | /GPA_Income_Admissions.py | 548acd8690d20e9f450da78f1990f333ce7c2d8a | [] | no_license | cak925/Continued-Learning | 37ad6f73f27e0a0e9a3ef5da316a75acc1636de8 | e3275d0cee8b02784f78179468a71cf67ed5a6be | refs/heads/master | 2021-01-21T04:42:12.860773 | 2016-06-20T17:14:54 | 2016-06-20T17:14:54 | 53,617,045 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,877 | py | GPA_Income_Admissions.py | import pandas as pd
import numpy as np
from scipy.stats import gaussian_kde
import matplotlib.pyplot as plt
# Analyze factors correlated with the GPA of students. A University would like to this information
# for admitance purposes.
df = pd.read_csv('admissions.csv')
df.head()
# columns are family_income, gpa and... |
31f5525564ec34113a663b727c0a6d85c6b07ee6 | d4fe3b3c53348cb8deb1de6cc154e8c727f71adf | /src/ondalear/backend/tests/docmgmt/__init__.py | 8768e3b157f60e103aa571fdbcecb2564689e8a7 | [] | no_license | ajaniv/document-management | 80b41e068b2d8727a18863ee20d48fe266bcc35c | 974ff553d93823312df906e9986155422b9d730b | refs/heads/master | 2022-02-26T08:14:03.853675 | 2019-10-16T22:57:11 | 2019-10-16T22:57:11 | 200,675,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | __init__.py | """
.. module:: ondalear.backend.tests.docmgmt
:synopsis: ondalear backend tests document management package
"""
|
b44d8331cfcbc8d75945bee92c095080e1b6f342 | 030933079bcf7aad50d69ddf3f9945aa485ff878 | /app_lib/Windows_a/__init__.py | b16539bff60e4ddb71650c50e900a5639f2724b3 | [] | no_license | IzoomVIN/WAoTKI | 635c7a6720d49ec87c6895a863d98f9cf04fb921 | 7f9a54777d7fd2c930ae57011a4e8ec637c71ac6 | refs/heads/master | 2020-04-11T17:03:27.628536 | 2018-12-15T21:58:11 | 2018-12-15T21:58:11 | 160,850,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 72 | py | __init__.py | __all__ = ["Add_window", "User_window.py", "Windows.py", "View_window"]
|
8e3ce2e30b2a43656dc5f4201da786cc76f2ba59 | 55732ec1ee035e019383bdb0421f17d7aee0a445 | /main_A2C.py | 73bc079db75826a2680703c0649777a2c2909961 | [] | no_license | AntoninDuval/Mario_RL | b81abec8c1763a17f1ce82d836e8c3b09c3c571c | aa020b92934f70e9c6e9d4a39a614f2115cd7d54 | refs/heads/master | 2022-06-12T02:10:06.479549 | 2020-05-05T16:00:30 | 2020-05-05T16:00:30 | 258,222,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,164 | py | main_A2C.py | import os
import sys
import time
import datetime
import math
import torch
import numpy as np
from environment.environment import Environment
from agents.random_agent import RandomAgent
from agents.dqn_agent import DQN_Agent
from agents.A2C import A2C_Agent
TRAINING = True
SAVE_MODEL = False
VISUALIZE = True
N_EPOCHS ... |
b08ca835c0afc6846174dbdcf741af08bae67df8 | ecfb08d9dd7edc4252a341ba0985b3fd5c1500dd | /recommend/migrations/0003_auto_20200609_1119.py | b54f054d50922e459bf1696afe40abba915b9827 | [
"MIT"
] | permissive | a-typical-sheep/move-recommender | 023951ef2444a6d27409f6c007a1bf06cff37b85 | a67dbba32fc4bf67b8c8287b75da44de031a9e64 | refs/heads/main | 2023-03-14T09:58:27.742393 | 2021-03-05T01:09:14 | 2021-03-05T01:09:14 | 344,654,758 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 510 | py | 0003_auto_20200609_1119.py | # Generated by Django 3.0.6 on 2020-06-09 05:49
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recommend', '0002_myrating'),
]
operations = [
migrations.AlterField(
model_name='myrating',
... |
b819d26b7cc605410f54c85f5d763c30e374166c | 81b87872886bcb0d355f865949da359ffe3bc9db | /範例程式/延伸學習/Lab05_TEST3.py | 1536d890ca7b208db51ac98d725efbc9292b4bc9 | [] | no_license | FlagTech/FM630A | cc8075e53acf5a5b41e12a015cb65ca394af26a6 | 66af72739c6fb94d5322bbc0d2495fcac607f4a6 | refs/heads/master | 2023-06-29T07:47:38.508242 | 2021-07-27T02:45:47 | 2021-07-27T02:45:47 | 386,197,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 888 | py | Lab05_TEST3.py | # 匯入控制板子相關 board 模組
import board
# 匯入時間相關 time 模組
import time
# 匯入數位輸出入的 DigitalInOut、Direction 模組
from digitalio import DigitalInOut, Direction
# 建立 GP15 腳位的 DigitalInOut 物件, 並命名為 led1
led1 = DigitalInOut(board.GP15)
# 設定 led 為輸出腳位
led1.direction = Direction.OUTPUT
# 建立 GP12 腳位的 DigitalInOut 物件, 並命名為 led2
led2 = Dig... |
f65f639410125c6b3b1f140ee54141fec72a0651 | 705c24eaf544c8215db35fb5e7d2bc51eb05a7d7 | /webapp/cronjobs.py | a5ea4894f56b22bf0a3083186fe087e50c5ca219 | [
"MIT"
] | permissive | shaynemei/Deadline | 2521b40ff0ac04ceff68dd3b5caa2b630629cbc2 | 42c38a82277d1b1367596fd8c14b345ab521e63d | refs/heads/master | 2022-12-10T19:02:27.132217 | 2020-09-02T09:59:21 | 2020-09-02T09:59:21 | 285,783,880 | 2 | 0 | MIT | 2020-09-02T09:59:22 | 2020-08-07T08:55:15 | HTML | UTF-8 | Python | false | false | 1,946 | py | cronjobs.py | """
Scheduled jobs to run in background.
- Penalise overdue tasks (24hrs)
- Hard reset at 00:00 on Mondays (system timezone)
"""
import webapp
import time
import random
RESOURCES = ["water", "food", "metal"]
def penalise_overdue():
"""
Cronjob to check and penalise overdue tasks every hour.
Change pena... |
2e2680537e54d28ea406f6699c485db5ab580319 | 5466fe0255c9c590fdbee3e1e2056a82d81f5eb1 | /image-gen/Wasserstein DCGAN/train.py | 39acfe3719c31c0328ad2b538fabbdcd2857e5d4 | [] | no_license | arcelien/hawc-deep-learning | e219b191dd296742326a8d1aa137db8b3aabdf5e | df8f66f0ee872a6628d6384c4d9bc0ff5d08d7a2 | refs/heads/master | 2020-03-20T06:37:07.444576 | 2018-08-02T20:40:57 | 2018-08-02T20:40:57 | 137,254,510 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,711 | py | train.py | """
Implementation of Wasserstein GANS
Data: HAWC dataset
Labels: Event parameters
Images: Event observations (channels: time and charge)
"""
## Imports ##
#------------------------------------------------#
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLo... |
b0579f92a6612ddac67084af470f0cbb4a92575d | 7debf3bc23bd38182b716dcf1eb4fa9f51b6d5bc | /expense_tracker/tests.py | cec921c630df24cc486d368403475932f706e39c | [
"MIT"
] | permissive | jjskim/expense_tracker_401d7 | 7b8ae545089200aa4801c48a118aef74d5bd6490 | 284d57829117e05aed700346c75e77b76fa25480 | refs/heads/master | 2021-07-22T05:37:57.603103 | 2017-10-31T19:09:16 | 2017-10-31T19:09:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 849 | py | tests.py | from pyramid.testing import DummyRequest
import pytest
def test_list_expenses_returns_list_of_expenses_in_dict():
from expense_tracker.views.default import list_expenses
req = DummyRequest()
response = list_expenses(req)
assert 'expenses' in response
assert isinstance(response['expenses'], list)
... |
8e31801621a6847af96339aaffb4d24d87fb6d2b | 5e6c03083dd95deef45881b00a1629ec48f36f6f | /phys_toolkit.py | f2d570b667e4f45ec8860443a30fb20e68bd380e | [] | no_license | avierich/variable-stars | d73dd67ab9538906fd78628fad24e9f0ce21a32b | 2d447e13d648bff6e11db4825fc29b1a1da9bf9d | refs/heads/master | 2021-01-23T02:43:35.259728 | 2017-04-07T19:17:13 | 2017-04-07T19:17:13 | 86,016,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,984 | py | phys_toolkit.py | # phys_toolkit.py
#
# David Lister
# 2017-02-18
#
import csv
import numpy as np
import matplotlib.pyplot as plt
import scipy as sp
import scipy.odr as odr
from uncertainties import ufloat
import math
class CsvInfo:
def __init__(self, fname, x, y, x_conv_factor, y_conv_factor):
self.fname =... |
39c60be983360a011e75a8b4286890d36b16ba64 | 7f73c6ea707e9978b7f11c3d1bf2e97df319d307 | /pythonProject4/main.py | 1a91f45946faf31e98e575e399c35f7a1d902894 | [] | no_license | theGreenJedi/pyprojects | 97da9c13b290773ba4d435b1fa2d599f62753a33 | 36339b699f9f67cf6331551415e4d3fb882a7978 | refs/heads/main | 2023-06-10T13:47:09.361447 | 2021-06-27T14:09:04 | 2021-06-27T14:09:04 | 378,738,185 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 41 | py | main.py | import numpy as np
import nnfs
import os
|
a5cad7650acdda7ea8e7603bad092308733d6dd7 | 4caeabfb1973ca86bc21e75391e01d3bb87c163f | /mes_scripts/ex3_booleens_chp3_s33.py | b1a5b3f3e3a29bda8ea7a830ede593be7440697a | [] | no_license | C-Joseph/formation_python_06_2020 | d5f57d5ff572bce5df1fc341f1a47fd417c41790 | 35370b3f92878d4cc0f29876be4d032d44822061 | refs/heads/master | 2022-10-24T00:44:38.524691 | 2020-06-18T14:13:30 | 2020-06-18T14:13:30 | 272,445,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 187 | py | ex3_booleens_chp3_s33.py | #!/usr/bin/env python3
v=True; f=False
a = v and f
b = v or f
c = not v
d = not f
e = v==f
f = not 0
g = not 0.01
h = not 1
i = v or f and f
j = (v or f) and f
print(a,b,c,d,e,f,g,h,i,j)
|
7cf1928e181b0781f79fc5148dd42522a40eac3d | 65fc5d549c59d69b3a14cc64fd19dc8ab94a861e | /ex6 | 766fb2f7fd5609c5f5c6a825c063085152043a6d | [] | no_license | RichardLaBella/PyLessons | b41344a2900a062225562a923feecbe6f10fb4e7 | 45a71d0e88edc0c985293869a2e64519a22bacfa | refs/heads/master | 2016-08-05T12:55:26.564833 | 2015-05-17T17:49:39 | 2015-05-17T17:49:39 | 35,583,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | ex6 | #!/usr/bin/python
# using %d format character to reference the 10
x = "There are %d types of people." % 10
binary = "binary"
do_not = "don't"
# using %s format character twice to reference the % variable in parenthesis
y = "Those who know %s and those who %s." % (binary, do_not)
# Just printing x and then printing y
... | |
378fb931d44a6899c99aa90ee61e39689dc4994f | 4178f2916d2da72cbb45454fbed941dcfe8f6460 | /POM_test/crops_dataPage.py | 152da119f25abe43ecda310f17327cdd14700e8d | [] | no_license | maxcrup007/Selenium_Webdriver_Python | 15196cb04ba5cafdc5b776c26d167f0b48fb0e14 | 6be7f0b9f53df1ba592957029e8a4d22e409d1c4 | refs/heads/main | 2023-03-24T21:04:31.976451 | 2021-03-22T09:16:04 | 2021-03-22T09:16:04 | 349,379,454 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,908 | py | crops_dataPage.py | from POM_test.locators import *
import os
class CropsPage():
def __init__(self, driver):
self.driver = driver
self.go_to_main_menu = Locator.go_main_menu
self.edit_crops = Locator.detail_crops
self.crops_selection = Locator.crops_select
self.crops_category = Locator.crops_... |
7b7edd6e52968832d2a87dbb493922e399ada6c6 | ba7a7e0197cbe7fe598dca507a31cc6c2fd448a7 | /UnitTest/testingtool.py | 33705e110d8693a04fded94ca28416087333f014 | [] | no_license | MarioR516/HW01 | 874967f8365525e938fc7a4daffa2fe28cb66485 | 4297f27d8e811b04f2c142eafb91f77c18cc24fa | refs/heads/master | 2020-08-05T07:17:23.774280 | 2019-11-18T22:24:57 | 2019-11-18T22:24:57 | 212,443,699 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 450 | py | testingtool.py | import json
import subprocess
with open("Test.json") as json_file:
data = json.load(json_file)
for p in data["cases"]:
print("name: " + p["name"] + "compiling.")
subprocess.call(['javac -cp junit-4.13-rc-1.jar'], shell=True)
for p in data["cases"]:
print("name: " + p[... |
0665851747b6e193eb9287d41d3b89d42b6bb201 | 2d2cbe51af5c2f43cc9179ebe22706d338dd2e37 | /notebooks/model-analysis/regression/train.py | 78b671f914e5abf9b57c235ddbbd0c02afbae099 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | chenhuims/Azureml-ResponsibleAI-Preview | da4bc82c0504a7e78e56d72abe5f86a2401c769e | 726199317481137db370a33bfe5b511bb65b5567 | refs/heads/main | 2023-08-31T12:19:25.236630 | 2021-11-01T23:48:30 | 2021-11-01T23:48:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,436 | py | train.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
"""Sample train script for azureml-responisbleai notebooks."""
import pickle
from sklearn.ensemble import RandomForestRegressor
from skle... |
97493fcc66f68da4514073cecf782dc0b1171baa | bb50ca618d8a6b1ed732184342eeeac5c9d5009f | /sort/merge_sort_single.py | 81a5037e7533db398f3dd8d9aa19e2e11a4bef8b | [
"MIT"
] | permissive | UniqueDing/some-worthless-code | 10e3b19820357cdb842736d24c72dedc572d23b6 | 9a6bd071f034d7a05efd248ea41854a42fa3ea35 | refs/heads/master | 2022-11-19T19:14:35.945304 | 2020-07-15T17:01:15 | 2020-07-15T17:01:15 | 275,827,938 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,003 | py | merge_sort_single.py | def merge_sort(l: list):
def sort(start: int, end: int):
middle = int((end - start) / 2 + start)
if end - start > 1:
sort(start, middle)
sort(middle + 1, end)
if end == start:
return
p = start
q = int((end - start) / 2 + start) + 1
... |
9fe26e5f30e29dd5ebdfe081fe2de0008f1c2052 | 2cc495ff6d945b075f8ed6b133248483375292f8 | /python_assignment4.py | b37f9a37cc961b2172c0d931a292a4cf8ab0fd0b | [] | no_license | Datapirate-98/python_assignment-4 | c95d256a3d8fdaf74910a7fd6c1594744826a7d9 | 732d1a37d16539e3f2bd282c7c8e93b4bcf9f79c | refs/heads/master | 2022-12-02T02:39:45.962479 | 2020-07-29T18:08:55 | 2020-07-29T18:08:55 | 283,525,367 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,055 | py | python_assignment4.py | 1.1
class sides:
def __init__(self,a,b,c):
self.a = float(a)
self.b = float(b)
self.c = float(c)
a= int(input("a="))
b= int(input("b="))
c= int(input("c="))
class triangle(sides):
def __init__(self,a,b,c):
super().__init__(a,b,c)
def area(self):
s = (... |
9395c4058339955557758af7a232b0d47951353a | b8169e4ab4811a7000d9a0c995c2779563f9320d | /SOURCE.py | 84013a0ab3162554c3e667f359381f6f3b036a8f | [] | no_license | shubham1286/CDM | 99a37f25c3419b71af5691297c97c250a060a983 | f0c562ad1ad79c713c328c767708cc910a7b32ed | refs/heads/master | 2020-12-24T14:09:28.507170 | 2014-06-26T08:56:24 | 2014-06-26T08:56:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,420 | py | SOURCE.py | from bs4 import BeautifulSoup
import urllib2
from urllib2 import urlopen, URLError
import re
import csv
import unicodedata
import codecs
import os
import sys
vv=0
tempo=0
total=0
flag=1
class app():
def cdm1(self,text,filename):
req=urllib2.Request(str(text))
t... |
6b97746180ea88e92708cbb77b3c759d68fcbfbe | e212edcbdd0968e8d0a5069eaf57e5edc693ae9c | /RasMMA/MotifAnalysis/OriginalPython/CollectForestInfo.py | 8f6bab99f64115a4af1da64ac0fea85a20b5e5cb | [] | no_license | tychen5/NTU_ANTS-lab | 5a72da87351f9a041e5d13f3e7cdda431e45ed84 | 3bf6f1a223db2a31700cd19e7161032455ebcf93 | refs/heads/master | 2021-03-27T16:15:28.436238 | 2019-12-04T01:42:54 | 2019-12-04T01:42:54 | 123,515,660 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,879 | py | CollectForestInfo.py | import pickle
class CollectForestInfo:
intermediateDict = None
residualDict = None
descendant_dict = None
groupMotif_dict = None
treeList = None
def __init__(self, intermidiatePicklePath, residualPicklePath, includePairwiseTree):
# read the results from pickle files
... |
bb12a2e6ac93f0294c2293bfc9c911c6cd66599e | 002eb599b7981143c760f50c37c424819f251e83 | /Python/5.py | 40d3ee70792062ebe72ad17aae28d12fa0ff5260 | [] | no_license | ducthach1401/Hackerrank | fc97660e9162e8aefdc51ab5e5a88bce0e7b8f5c | 8706525bba6fd9840ced2d25250a8b8e787a1dd3 | refs/heads/master | 2021-05-21T08:48:56.183283 | 2020-04-04T08:39:01 | 2020-04-04T08:39:01 | 252,624,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | 5.py | class stringS(object):
"""docstring for stringS"""
def __init__(self):
self.s = ""
def getString(self, temp):
self.s = temp
def caps(self):
self.s = self.s.upper()
def printS(self):
print (self.s)
result = stringS()
result.getString("abc")
result.caps()
result.p... |
5203cc9d68bb630f6668a0d547388e113c0cc659 | a94e3bb196bb1fb6f4af23896e836b3579961051 | /test_cases_cfg/common/fio/fio_parser.py | a74d849f67c76fa2c40ab8e1fcc693b0ac10ab27 | [] | no_license | htsat/caliper | cc6a52335a4f75a6c7990082357f97cd5afa89aa | 08f771e21c4f0f21fc32e07a00db4a7342e03474 | refs/heads/master | 2021-01-01T17:43:01.995563 | 2015-02-27T07:29:06 | 2015-02-27T07:29:06 | 30,823,119 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | fio_parser.py | ##chenxiang c00284940
##chenxiang66@hisilicon.com
import re
import os
import pdb
def bw_parser(content,outfp):
score = 0
SEARCH_PAT = re.compile(r'bw\s*=\s*(\d+)')
pat_search = SEARCH_PAT.search(content)
if pat_search:
print pat_search.group(1)
outfp.write("bw:"+pat_search.group(1)+"\n")
score... |
f34c1a257b5a11d1454307f1fef6ddedc3f76b9b | a3ea6421b283be77dff0f229f64dc5072f57855a | /scripts/mellanox_buffer_migrator.py | e449f3657eb0086b7e793b9e6a81d88f7924906c | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | madhanmellanox/sonic-utilities | 6f090e31d6dcb4930c84baad240e4a255c14ff73 | f1522b9fbde59e061849c3d8327cd875c2028472 | refs/heads/master | 2021-04-19T09:25:10.673914 | 2021-01-22T02:35:39 | 2021-01-22T02:35:39 | 249,597,097 | 1 | 0 | NOASSERTION | 2020-12-01T02:37:35 | 2020-03-24T02:48:45 | Python | UTF-8 | Python | false | false | 36,399 | py | mellanox_buffer_migrator.py | from sonic_py_common import logger
SYSLOG_IDENTIFIER = 'mellanox_buffer_migrator'
# Global logger instance
log = logger.Logger(SYSLOG_IDENTIFIER)
class MellanoxBufferMigrator():
def __init__(self, configDB):
self.configDB = configDB
self.pending_update_items = list()
self.default_speed_li... |
11a158f5e3a768ed50d454eaa473834ee10ced4e | 303e4fb0c6b8e24f93b4299a32c7620c046905c1 | /jewelrykim/practice/11399.py | f7f07a062ac54586733aca2b5eefbc4a59fa726d | [] | no_license | jewerlykim/week04 | a1b60756385270aa06474fb9a9043c96b0bf1970 | 0f76d52e64a1cc6e31f34e2f887f5141d3f6fa75 | refs/heads/main | 2023-02-19T18:10:32.115346 | 2021-01-15T02:37:54 | 2021-01-15T02:37:54 | 325,940,970 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 318 | py | 11399.py | # ATM
import sys
sys.stdin = open("week04/jewelrykim/practice/11399.txt", 'r')
people_num = int(sys.stdin.readline())
time_list = sorted(list(map(int, sys.stdin.readline().split())))
dp_table = [0 for _ in range(1001)]
for i in range(people_num):
dp_table[i+1] = dp_table[i] + time_list[i]
print(sum(dp_table))
|
a7f337e95bfca7c8baf38dc6ba6d6f3596d6f365 | 5c48b80645826ffb27238562df5c0a1d39fbbe24 | /lab/templatetags/methods.py | f7d97b824b54561cd2efd96ce71ec7988911b722 | [
"MIT"
] | permissive | betagouv/euphrosyne | b493d533e36bfa4895d8b7053e86cf79ee7d3234 | bffe7a134a31011cf08e4f0a9b9930bb83c42c97 | refs/heads/main | 2023-09-01T04:32:00.214410 | 2023-08-28T05:57:04 | 2023-08-28T05:57:04 | 404,642,095 | 3 | 2 | MIT | 2023-09-11T05:31:24 | 2021-09-09T08:20:28 | Python | UTF-8 | Python | false | false | 326 | py | methods.py | from django import template
from ..methods.templatetags import ( # pylint: disable=unused-import # noqa: F401
_get_adminfield_name,
detector_fields,
filters_field,
method_fields,
)
register = template.Library()
register.filter(method_fields)
register.filter(detector_fields)
register.filter(filters_f... |
d66fe4c95bca8a1c07cca315d1ca1f2d522d8474 | 1fd59f9fb1331cbb77b8ff14b7ab64e9aadd1db6 | /report/export.py | 7b535316de9f43b3078262ead41b2276dd999f2e | [] | no_license | saeedghx68/crawler | fccfa19494cd6e631948085c0dfe9949e4f3fecc | a2853f8acfbb1f3a3d19dc4df14db250d19b6d87 | refs/heads/master | 2023-08-04T08:49:39.625588 | 2021-10-31T15:58:18 | 2021-10-31T15:58:18 | 168,580,167 | 10 | 0 | null | 2022-07-06T19:59:11 | 2019-01-31T19:05:22 | Python | UTF-8 | Python | false | false | 877 | py | export.py | from .export_file.csv import CSV
from .export_file.xml import XML
from .export_factory import ExportFactory
class Export:
def __init__(self):
"""
register export file class in export factory
"""
self.__export_factory = ExportFactory()
self.__export_factory.register_type('cs... |
2a21f5d617981d277c8ed7ab25afa106ac66baa4 | 0de1f878d2f6dc959c98c9aa9c09bbe00cacf12d | /backend/mongodb/load_annotated_tweets.py | 6da6735017786705a8398117acbdebb1e8609851 | [] | no_license | Deepesh-Singh/brexit-sentiment | 57629dae3c70648dfb98bd07a802967d652fbbdf | 39813473cc5bac0e9ea220c160da8ad6f36b18cb | refs/heads/master | 2021-09-18T19:44:33.411243 | 2018-07-18T22:08:28 | 2018-07-18T22:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,383 | py | load_annotated_tweets.py | #--------------------------------------------------
# IMPORT MODULES
#--------------------------------------------------
from pymongo import MongoClient
import re
#--------------------------------------------------
# CONNECT TO DATABASE
#--------------------------------------------------
mongo_client = MongoClient()... |
2735923f50bc335dbd9b286db16c1e31a89f4f97 | 8b4039db3d52fb07249cf556addc33a04dd00322 | /tool/grabber.py | 7a1f27e7c0261220047b1f748ebc9de54f7fb753 | [] | no_license | kuarcis/ddqn_TWSE | 018b2ecc33d21710c32dc9e98e6e8a8450269931 | 181c3ed5e53330aa83ba6d85b0e166381f69f29a | refs/heads/master | 2020-03-17T16:19:15.941801 | 2018-07-27T01:37:53 | 2018-07-27T01:37:53 | 133,743,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,725 | py | grabber.py | import pandas_datareader.data as web_data
from pandas import ExcelWriter
import datetime, time
import os
vaild_tar = False
stock_target = '2330.TW'
while not vaild_tar:
try:
input_tar_tmp = input('enter yahoo finance data target (in the form of index:"^XXXX", stock:"XXXX.YY") (default:[%s]) ' %(stock_targe... |
f929d2ccfb1e686a970db80a1fa918f248f01db6 | 377f29256b4d575882833493a6d7e6c4ecfc9bed | /monitserial/advance_pi.py | b2dda5a4b37dd6ad05e70d19ee548264d2363fb0 | [] | no_license | yuanbosdu/monit | ffcbdcecbe1079cceb9289e98a479fe4c9f7451b | 6d707c0b92ef989625eec900490c7aea6be3cb9a | refs/heads/master | 2020-03-31T17:48:34.562061 | 2019-04-12T08:28:46 | 2019-04-12T08:29:13 | 152,434,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,645 | py | advance_pi.py | #-*- coding:utf-8 -*-
import serial
import requests
import time
import json
import threading
IOT_SERVER = 'http://172.22.116.53'
IOT_PORT = '8000'
SERIAL_PORT = '/dev/ttyUSB0'
SERIAL_BAUD = 115200
url = IOT_SERVER + ':' + IOT_PORT
url_push = url + '/serial/push/'
url_change = url + '/serial/change/'
ur... |
5caf4d0e7760fea06cfef602739713fe4c3800ce | e7e4afa6b1f6fad51835cd5e002523432e3abece | /time_machine_46/test_spotify.py | 12f6daed0cc4c9fcb2727ec87c6055a84a2cd2db | [] | no_license | akshatkatre/100-days | 3d0ef64e658e41e735b6c1bbc40fc6ebc12c8cf1 | 99648e8673e86803e1d6b9ebd030b1858addf6af | refs/heads/main | 2023-02-27T01:49:03.597285 | 2021-02-07T03:57:01 | 2021-02-07T03:57:01 | 319,174,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 579 | py | test_spotify.py | import spotipy
from spotipy.oauth2 import SpotifyOAuth
import common
spotify_client_id = common.resource.get_resource_key("spotify")['client_id']
spotify_client_secret = common.resource.get_resource_key("spotify")['client_secret']
sp = spotipy.Spotify(
auth_manager=SpotifyOAuth(
scope="playlist-modify-pri... |
5a0fe1a8bd8389f656ac9f54e2cfa808740220f1 | 70471b3e5b4a7bea4a200bef09577dc7dc9f1aa1 | /src/python-curso1-introducao/operadores/operadores.py | 15619497656766950a7a3c3c1d260f5d4a7586c5 | [] | no_license | franciellyferreira/python-courses | e2a023a0d2979522fdfe4f883a3efb3576dd9a81 | a9f91e1680abf10d77e8c1cd162d10377648509c | refs/heads/master | 2022-04-01T21:08:56.878750 | 2020-01-24T17:11:39 | 2020-01-24T17:11:39 | 194,744,164 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | operadores.py | # -*- coding: utf-8 -*-
x = 2
y = 3
# Verifica igualdade
print(x == y)
# Verifica menor
print(x > y)
# Verifica maior
print(x < y)
# Soma e Verifica igualdade
soma = x + y
print(soma >= x) |
09126114decd9d4786ef3d8ae161add6ab0b9c13 | c1da9aff530a66aebe2fb3eb28d2b806dd22cb85 | /eval_script/evaluate_sl_gd.py | 56afe6a843357261fd8115973f7594f361901fc1 | [] | no_license | XgDuan/WSDEC | 6a59e71a715aefe5701203f2741a34021a6b80bd | 64abf5ee041ac6ad138de31880dd6cad73c70b00 | refs/heads/master | 2020-04-02T14:00:32.408337 | 2020-03-21T03:53:27 | 2020-03-21T03:53:27 | 154,506,382 | 104 | 25 | null | null | null | null | UTF-8 | Python | false | false | 14,714 | py | evaluate_sl_gd.py | import argparse
import time
import sys
import os
from global_config import *
from torch.autograd import Variable
from torch.utils.data import DataLoader
from model.sentence_localizer import SentenceLocalizer
from dataset import ANetDataFull, ANetDataSample, collate_fn
from utils.model_saver import ModelSaver
from util... |
c849b2529b9e99c9fdb1d899cc8c1f14bb6f6cb6 | e22240719bd07507c562899126fb2a360df15405 | /knapsack.py | 3756f4771fd84f3aa394f55f2d6adbcb1565f8d3 | [] | no_license | Htrams/GeeksforGeeks | cb62a27c3c9f7f08eedd3466d3839bd6e1901581 | f1c2516a346f9bca127403ae0045262a2831cb4c | refs/heads/main | 2023-02-05T23:32:03.230889 | 2020-12-24T05:40:34 | 2020-12-24T05:40:34 | 324,075,256 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,087 | py | knapsack.py | # https://practice.geeksforgeeks.org/problems/0-1-knapsack-problem/0
# You are given weights and values of N items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Note that we have only one quantity of each item.
# In other words, given two integer arrays val[0..N-1] and w... |
339880cea1bdb3938836fbc9d5dcd3d527ed7e48 | ffec9c4fa94d271451d3b8a731255c3a6fc24b03 | /churn.py | 981204b85a3f0da83ed77697856dc21525ec60ba | [] | no_license | alexseong/mobile_hotspot_churn_predict | 71b4c0128ea4042caea8d2f28a78f480e1875891 | deac606b7a9b5d01151873e02f37a9d57e17f10d | refs/heads/master | 2021-07-03T23:56:33.438691 | 2017-09-26T21:24:16 | 2017-09-26T21:24:16 | 104,816,290 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,463 | py | churn.py | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as scs
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier, AdaBoostClassifier
f... |
6e47c7fe6984f1ad7eecd612108e83e40dae250a | 6020d9fca971194717a50eb9d118374a80d3ca1c | /backend/signup/views.py | 3ee717571fad2a273328f3ac01eff4628673a536 | [] | no_license | eve-klopfenstein/krypstock | 8f4a3714adc44eabcf86dcf39862395ddd6a176a | 712e598286a596329f547f0f1ae8c47984f79eaa | refs/heads/main | 2023-04-28T15:48:32.372025 | 2021-04-23T08:49:35 | 2021-04-23T08:49:35 | 367,724,267 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,491 | py | views.py | import random
from django.contrib.auth import get_user_model
from django.contrib.auth.hashers import make_password
from django.core.mail import send_mail
import os
# Create your views here.
from rest_framework import status
from rest_framework.generics import CreateAPIView, UpdateAPIView
from rest_framework.response ... |
065b139f3f39b29f5228b8ad045ae254153cd064 | 0b0ff5a56ffaa417eff56cd5344785db9156f648 | /old_testfiles/ce_opt.py | a5b5322630431da3744f84b1a5a3b2049135e1b2 | [] | no_license | qchempku2017/CMO | f49cac3d8e41dbaec8287ddb822b54646a54c3c0 | 32be3b94812634fe7e5bd8259fc25ec24bc0c205 | refs/heads/master | 2021-08-17T19:45:31.174304 | 2020-05-03T22:25:20 | 2020-05-03T22:25:20 | 176,344,087 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,150 | py | ce_opt.py | from __future__ import division
from __future__ import unicode_literals
import os
import sys
import argparse
import json
from copy import deepcopy
import numpy as np
import numpy.linalg as la
from itertools import permutations
from monty.serialization import loadfn, dumpfn
from math import gcd
from functool... |
43fdc0a3a22e18ac20a1ae008f85719aa4e125b2 | 242b7ff284be21bf6d42f91d91740daf48aa6bf9 | /comments/migrations/0002_auto_20190730_1821.py | 3fa6330f482776da285955e2b5d2d8e71ab0638c | [] | no_license | jacob-armiger/django-devblog | a5e9ba2ef8ac88ed7f38ba46a16a8986ea5313fc | 3a1fcfd30ac4bab93b05887327fe72e64e909c51 | refs/heads/master | 2023-06-13T06:35:04.008829 | 2023-05-28T16:32:02 | 2023-05-28T16:32:02 | 201,325,325 | 0 | 0 | null | 2023-04-22T04:23:30 | 2019-08-08T19:37:08 | Python | UTF-8 | Python | false | false | 768 | py | 0002_auto_20190730_1821.py | # Generated by Django 2.2.3 on 2019-07-30 23:21
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blogs', '0002_blogpost_owner'),
('comments', '0001_initial'),
]
operations... |
afaa2dcdca60888816ae39ad946f19e22250c5e9 | 86f5c2d21f9b21cbc29b1f8251ace87bf35896e2 | /Server.py | 8990d99573edb4e913056609b97c6e97ec1fe38e | [] | no_license | babak-badnava/quickdraw-tensorflow | f37ec308b77a4bbb843eae86b89c4ad590da7c5f | 2ec96b416e92868e803dbf8be8fcb4d6bc9c2b9b | refs/heads/master | 2021-08-31T13:42:22.526413 | 2017-12-21T14:42:37 | 2017-12-21T14:42:37 | 115,014,821 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 866 | py | Server.py | import numpy as np
import tensorflow as tf
from sklearn.model_selection import train_test_split
from Network import Network
from pre_processing.Config import Config
from ThreadTrainer import ThreadTrainer
from multiprocessing import Queue, Process
from ThreadTester import ThreadTester
class Server():
def __init... |
97ef90ec6b23fca2a273f6c1e87794f71ae96ac1 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_1_neat/16_0_1_Nera_problem1.py | 8acae9594c089c2bd6e16e4dc5b6fd2992b99a8c | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 828 | py | 16_0_1_Nera_problem1.py | import sys
MAX_ATTEMPTS = 1000
if len(sys.argv) != 3:
print "Usage: problem1 <input file> <output file>"
exit();
cases = []
inputFile = open(sys.argv[1], "r")
lines = inputFile.readlines()
for i in range(1, len(lines)):
cases += [int(lines[i])]
outputFile = open(sys.argv[2], "w")
def seenAll(see... |
ad64ad09d14bec85ed4beeb1cab70ad2c9ef1693 | b38b237d3886a601038652f1e2be15814da9f8c9 | /W2/2-18 secmax.py | ca7e028ba67c155e24daebdd7d1e99ab36716c73 | [] | no_license | denetti/PythonHSE | 24f223e11c430e3e1f1de44c96c29e9bfea46c20 | 8ea3ea91778cc6ac531f83f73025b3d5eaf3cd25 | refs/heads/master | 2023-04-12T10:47:08.783311 | 2021-04-30T08:56:53 | 2021-04-30T08:56:53 | 324,701,082 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py | 2-18 secmax.py | def sequence():
maximum = 0
maxsec = 0
seq = 1
while(seq != 0):
seq = int(input())
if maximum <= seq:
maxsec = maximum
maximum = seq
elif maximum > seq and maxsec < seq:
maxsec = seq
return maxsec
print(sequence())
|
7bd189146abbcb801c2808730301737dee2b1567 | 1ede1c1e61524b16423ae691d3e345fe21416f56 | /scoreboardme/apps/core/admin.py | c36489931c1377f4d3e56519256fa1e565aa67d8 | [] | no_license | arkravitz/scoreboardme | 283361a5aab9e24001431374a83e34125cbd2b47 | 0c4a92fee7980776418d632565ccd89c9441223e | refs/heads/master | 2021-05-01T15:27:04.759784 | 2018-07-18T13:05:04 | 2018-07-18T13:05:04 | 11,393,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 850 | py | admin.py | from django.contrib import admin
from django_extensions.admin import ForeignKeyAutocompleteAdmin
from .models import UserProfile
from ..events.models import EventRequest, Score, Event
class EventRequestInline(admin.TabularInline):
model = EventRequest
class ScoreInline(admin.StackedInline):
model = Score
c... |
cd334b2e4ba107d50a457c08fa9c10a35133b06a | 385c01f7337cf5031093147f6731251bfbf17430 | /lms/enrollment/containers/checks_student_enrolled_in_trail_default_class.py | f8e404988b8af45f6b502c3c929f673c763d7b6c | [] | no_license | lucassimon/lmswebaula | 23a73d6d2d43c78a2f9e3b552113cf50a11a3587 | 671276426685968458f240faa93b313427fa32d9 | refs/heads/master | 2021-01-19T13:26:12.352308 | 2017-08-16T21:07:43 | 2017-08-16T21:07:43 | 88,088,474 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,046 | py | checks_student_enrolled_in_trail_default_class.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import six
from lms.core.containers.response import (
SuccessContainerResponse, ErrorListResponse
)
class EnrolledInTrailDefaultClassRQ(object):
_user_id = 0
_trail_id = 0
_lms_trail_id = 0
def __init__(self, student_id, lms_tra... |
b008106947a49106fc5bdeb778cb3bf5a744a340 | 798960eb97cd1d46a2837f81fb69d123c05f1164 | /symphony/cli/pyinventory/graphql/fragment/survey.py | 7b30707de97100624c5921b14ddd766c4e72a4c1 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | kyaaqba/magma | 36d5fa00ce4f827e6ca5ebd82d97a3d36e5f5b5b | fdb7be22a2076f9a9b158c9670a9af6cad68b85f | refs/heads/master | 2023-01-27T12:04:52.393286 | 2020-08-20T20:23:50 | 2020-08-20T20:23:50 | 289,102,268 | 0 | 0 | NOASSERTION | 2020-08-20T20:18:42 | 2020-08-20T20:18:41 | null | UTF-8 | Python | false | false | 1,256 | py | survey.py | #!/usr/bin/env python3
# @generated AUTOGENERATED file. Do not Change!
from dataclasses import dataclass
from datetime import datetime
from gql.gql.datetime_utils import DATETIME_FIELD
from gql.gql.graphql_client import GraphqlClient
from gql.gql.client import OperationException
from gql.gql.reporter import FailedOper... |
6460268fea0d192cb266fb02d6e5604a32268f87 | 67304bff93926374e7fcbf5ab88c60b1558b233f | /Module_1_Project/bom_clean.py | 7d8237fefd7a89a932628cdd4fa7e63606b0e345 | [] | no_license | BenGeissel/Movie_Industry_Insights_Module_1_Project | 1d94a10791c75d773de30466f47e008b0ed7c230 | 37962f235638bd7b1cd84f578ab485ec49f6c49b | refs/heads/master | 2020-09-06T20:41:01.909315 | 2019-11-13T21:26:02 | 2019-11-13T21:26:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,458 | py | bom_clean.py | # Import libraries with proper aliases
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import csv
def clean(file):
'''
Function to clean the BOM Data CSV File.
Input: CSV File name as string
Output: Cleaned DataFrame
'''
# Read in the ... |
2657f3e2281e3f27d173ba05979f4a07af6c46b8 | 7cf1b8e657bd0720f678d28cc0e904130d801423 | /test.py | c91a303291d586afa453ecdcb45f19990d1c55af | [] | no_license | Avrmaster/InfoSearch | 598307f56e88c9dbb247c7c958fa3b5655c79cce | d68159ce68a5b63f948efd7e01a1601463007bae | refs/heads/master | 2021-03-30T17:14:09.073042 | 2018-04-19T16:24:32 | 2018-04-19T16:24:32 | 118,959,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | test.py | metadata = ((9, 'sjkhsakhkd Children in Prison and Other Cruelties of Prison Life', 'Oscar Wilde'),
(10, 'Children in Prison and Other Cruelties of Prison Life', 'Oscar Wilde'),
(19, 'The Dull Miss Archinard', 'Anne Douglas Sedgwick'),
(14, 'Raskaan syyt�ksen alla; Kun on olevinaan... |
573a6192b72bab0de65dae7dbe4ebb9d4f7b1222 | 54ed0a6bdb14c010b4540a15f19ab800b00fb58e | /Papa-s-Pancakeria-bot-master/win_control.py | 7742c1bc73bda961922d7ec751df48d3102bd70d | [] | no_license | AnthonyBrown-CPU/Papa-s-Pancakeria-Bot | c5db8b6d7890b0355c828787755f752450dd0a17 | 04f19b3458e0cac28e5d27a94f82ce12ecf47445 | refs/heads/main | 2023-02-15T01:37:43.907366 | 2021-01-07T23:03:10 | 2021-01-07T23:03:10 | 327,744,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,638 | py | win_control.py | import win32api, win32con, win32gui
import time
from rect import *
from constants import *
from key_codes import *
def pressKey(k):
win32api.keybd_event(VK_CODE[k], 0)
time.sleep(.05)
win32api.keybd_event(VK_CODE[k],0 ,win32con.KEYEVENTF_KEYUP ,0)
def holdKey(k):
win32api.keybd_event(VK_CODE[k], 0)
... |
59ffe2413cf3927875f9dcb853d7a12cccc4ea61 | 20fa584cf4d2603df07d0f12df88d87e8ccae168 | /userauth/migrations/0013_auto_20200825_2248.py | db05b6de8dcc1c9caed05f5c99c8d6f17f9add36 | [
"MIT"
] | permissive | noobdev59/oodles-interview | 6fc97c209efc2d79787512e5f3f41503f79c753e | 9780d0dcd358dd273dc60a2efc66718a3ccdacc9 | refs/heads/master | 2022-12-07T14:32:28.087510 | 2020-08-26T01:12:35 | 2020-08-26T01:12:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 372 | py | 0013_auto_20200825_2248.py | # Generated by Django 3.1 on 2020-08-25 22:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('userauth', '0012_auto_20200825_2242'),
]
operations = [
migrations.AlterUniqueTogether(
name='profile',
unique_together={('ema... |
7591f8010f2f44777654bf55540a21a7acad99b1 | 2d30c56ff47a378343dfd4adb8f0efc1bacbf8de | /app/models/game.py | 5e53ccf5c3e59960ffc1600a774b2e5169e78bcb | [] | no_license | GinBe/MedicalWar | af3a526d36654d8ec94587d24dd3b75403b9fd6e | 46350723f5eadb7a1feeaf1c87c247d5c5aa4a9d | refs/heads/master | 2022-12-13T09:37:49.515571 | 2020-09-05T13:19:30 | 2020-09-05T13:19:30 | 293,079,858 | 0 | 0 | null | 2020-09-05T13:19:42 | 2020-09-05T13:19:41 | null | UTF-8 | Python | false | false | 1,507 | py | game.py | import os
import shutil
from datetime import datetime
from sqlalchemy import Column, String, Integer, SmallInteger
from ..models.base import Base, db
class Game(Base):
id = Column(Integer, primary_key=True, autoincrement=True)
name = Column(String(50), unique=True, nullable=False)
description = Column(St... |
f4f64d623161e98f1a09a69563b10cbe3aa55e65 | deb9cb9ac136d3af0969b68c4b17233506b152ad | /policies/migrations/0001_initial.py | b435f7faf599c1150f2bbf591087abd4cd96c302 | [] | no_license | cpadiernos/triviacompany | 75c814edd4557cfe2565fb68f7bdb6ebda14fa66 | fc2a392edfb57c2af74a42ccf9b8068cc679e0ab | refs/heads/master | 2022-04-09T10:18:36.198633 | 2020-03-26T20:49:45 | 2020-03-26T20:49:45 | 219,570,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,256 | py | 0001_initial.py | # Generated by Django 2.2 on 2019-04-30 18:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Policy',
fields=[
... |
aae181e27747812356b9f8644a330071233ca29d | 26fd827b9cf3464472b2294eb29783b3516881cb | /009_Palindrome_Number.py | 99c998c220e5abff01c2cb447257943cc20bbfc5 | [] | no_license | ZhangNing777/LeetCode_Python | 8ab0aa6273b2a2edf2aa7fb2d4eceb2a1d6fdf96 | 10693cb991bdadd8b476a5edc6888e4c4de9a17a | refs/heads/master | 2021-07-08T15:50:23.964059 | 2020-08-22T15:53:10 | 2020-08-22T15:53:10 | 177,751,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 545 | py | 009_Palindrome_Number.py | #!/usr/bin/python2
# -*- coding: UTF-8 -*-
'''
判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。
'''
def Palindrome_Number(int):
a = int
d = 0
if(int < 0):
return False
else:
while(int != 0):
b = int // 10
c = int - b * 10
d = d * 10 + c
int =... |
8984623262cba6eac56fb6c790c9326dad942e10 | 71cdf5a1a352f2b42594ed6b10a33b8b4af645d6 | /shibboleth/src/main/scripts/setup | 088532a4702ec673b3ad5d7b6d5836f5d61206b9 | [
"Apache-2.0",
"BSD-2-Clause"
] | permissive | spaetow/icat_authn | 10390dfc5e6dcb7b42498d75cd2f06d625215978 | de3c0deab43a1338bea6b5afc6fbc530accb9f5f | refs/heads/master | 2020-12-30T14:55:57.604495 | 2014-03-07T11:53:39 | 2014-03-07T11:53:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 986 | setup | #!/usr/bin/env python
from setup_utils import *
import os
# authn_shibboleth
actions, options, arg = getActions()
prop_name = "authn_shibboleth.properties"
prop_list = []
if arg == "CONFIGURE":
actions.configure(prop_name, prop_list)
actions.setConfigured()
elif arg == "INSTALL":
actions.check... | |
61a201e7df662f424cb845e255af61958db9968f | eac52a8ae7c539acedaedf8744bd8e20172f0af6 | /epi_solutions/binary_tree/prefix-and-suffix-search.py | c9b435c5ba74e84228efcb8a16cdb513e239e9b2 | [] | no_license | mshekhar/random-algs | 3a0a0f6e6b21f6a59ed5e1970b7a2bc2044e191f | 7c9a8455f49027a754038b23aaa2df61fe5397ca | refs/heads/master | 2020-03-26T16:29:42.694785 | 2019-07-18T20:57:55 | 2019-07-18T20:57:55 | 145,105,593 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,828 | py | prefix-and-suffix-search.py | import Queue
class TrieNode(object):
def __init__(self):
self.is_word = False
self.word = None
self.weight = None
self.next_radix = [None] * 26
def __str__(self):
return str(id(self)) + "_" + str(self.word) + "_" + str(self.next_radix)
class Trie(object):
def __... |
f9e217be3268940ad9e33a88cc512024abdde123 | f43376422d5078f7b5ba990481b740f85adf942c | /para_MD/para_MD_processing.py | 1aebe64099e71c319058e40f900c96dbb18a42de | [] | no_license | PAWhalley/Parallel-Molecular-Dynamics | ca04502dd9f0471764262ebb5e14357e493fe5ab | 3bca4dbb5f9ee3cb925050c9ce6891d82b4c0fed | refs/heads/main | 2023-03-30T21:03:50.626797 | 2021-04-05T15:30:30 | 2021-04-05T15:30:30 | 343,801,127 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,699 | py | para_MD_processing.py | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from celluloid import Camera
## Importing data
imported_data = pd.read_csv("molecular_data.csv",sep = ',')
parameters = pd.read_csv("parameters.csv", sep = ',')
energy_data = pd.read_csv("energy_data.csv",sep = ',')
N = parameters.N.to_numpy()[0]
... |
b03529dc813d2ebf0a830169af559b9d1c927de0 | ff905b3c3613cea1037488d0508ae545f84bc948 | /lstm.py | bcc6e556f2cb0d42afc62e4631b5fbbad8901d9a | [] | no_license | KokoroKoishi/UBS-stock-recommendation | ac74783c943e2a219a0f5ad1aa6ba31bf40fc7cc | 2d50dae2e5260be5c5b6b2ec8a2e1bb71e8a354e | refs/heads/main | 2023-08-13T09:33:05.992531 | 2021-09-23T18:56:28 | 2021-09-23T18:56:28 | 409,707,181 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,597 | py | lstm.py | # -*- coding: utf-8 -*-
"""LSTM
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1R7NBa99ZGicEYOjRvQx-6-rTmKlL5yyN
"""
import pandas as pd
import numpy as np
import random
import sys
from google.colab import drive
drive.mount('/content/drive')
sys.path... |
16d55da8975647c67d94a206eb295e4406c5f2e6 | e30d6fe40d576d53fcc46622c19e4e4cc6f9bc8c | /demo.py | 70440c686d36f1b486caa5748913087ccd939767 | [] | no_license | caicai9000/first | 37a475375cfc678d86ea05fe4414940c095ce914 | 488d9799de7a04607fb7c558b0890eba44cb7e0c | refs/heads/master | 2022-11-30T17:00:18.916714 | 2020-08-14T07:24:17 | 2020-08-14T07:24:29 | 258,682,545 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 319 | py | demo.py | import requests
res = requests.post(url='http://123.56.99.53:9000/event/api/login/',
headers={"Content-Type": "application/x-www-form-urlencoded"},
data={"username": "zhangsan", "password": "MTIzMTIzNDU2"})
print(res.text)
assert res.status_code == 200, '相应状态码非200' |