Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PowerLanguage.Strategy; | |
using ATCenterProxy.interop; | |
namespace PowerLanguage.Strategy | |
{ | |
public enum OrderDirection | |
{ | |
Long, | |
Short |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using PowerLanguage.Function; | |
namespace PowerLanguage.Strategy | |
{ | |
[IOGMode(IOGMode.Enabled)] | |
public class CustomMACDStrategy : SignalObject | |
{ | |
[Input] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public UserPointResponseData getPoint(@PathVariable Integer id) { | |
Optional<UserPointResponseData> points = getPointInlet.getPoints(UUID.randomUUID(), "52251E57-15EC-4786-8161-46BF549D1704", id); | |
return points.get(); | |
// 1. initial a LoyaltyPlusGatewayAdapter(outlet adaptor) | |
// 2. since our usecase constructor takes in (an outlet interface) | |
// 3. initial a usecase and then pass in the adaptor implmenetation we created in step 1 | |
// new Usecase(outlet: LoyaltyPlusGatewayAdapter) | |
// return Usecase | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inlet interfaces | |
public interface GetUserPointBalanceInlet { | |
Result<Map<String,Object>, Error> getUserPointBalance(String ssoid); // <- ssoid?? | |
} | |
public interface PingTestInlet { | |
Result<Success, Error> pingTest(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RestAdaptor { | |
// path /loyalty/user/create | |
class loyalty_user_create (params, requestBody) -> Result<> { | |
// CreateProfileInlet | |
} | |
} | |
//MARK: - RESTfulAdaptor | |
class RESTfulAdaptor: CreateProfileInlet, QueryMissionListInlet { | |
func createProfile(with ssoid: String) -> Result<Bool, Error?> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function recordsReducer(state = { pageNumber: 0, records: [] }, action) { | |
switch (action.type) { | |
case 'first_load': | |
// Call API to get 100 records and pass the pageNumber as an argument | |
const records = api.getRecords(state.pageNumber); | |
// Update state.records with the records | |
return { | |
...state, | |
records |
In your Python package, you have:
- an
__init__.py
that designates this as a Python package - a
module_a.py
, containing a functionaction_a()
that references an attribute (like a function or variable) inmodule_b.py
, and - a
module_b.py
, containing a functionaction_b()
that references an attribute (like a function or variable) inmodule_a.py
.
This situation can introduce a circular import error: module_a
attempts to import module_b
, but can't, because module_b
needs to import module_a
, which is in the process of being interpreted.
But, sometimes Python is magic, and code that looks like it should cause this circular import error works just fine!